@linktr.ee/messaging-react 3.12.3-rc-1784036508 → 3.12.3-rc-1784036626

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.
@@ -4,7 +4,7 @@ import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
5
  import { Chat as qs, useChannelStateContext as oe, useChatContext as fe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as Ne, MessageErrorIcon as nt, MessageText as $e, areMessageUIPropsEqual as Ks, useMessageReminder as Zs, useComponentContext as rs, Attachment as Js, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Xe, AIStates as Ke, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as Mn } from "stream-chat-react";
6
6
  import { StarIcon as Ie, DotsThreeIcon as An, SpinnerGapIcon as Fe, SignOutIcon as Rn, ProhibitInsetIcon as qt, FlagIcon as is, ArrowLeftIcon as at, CurrencyDollarIcon as Ln, CaretRightIcon as xe, SparkleIcon as we, FileIcon as ls, ImageIcon as Dn, SpeakerHighIcon as zn, VideoCameraIcon as os, FileMdIcon as Fn, FileTextIcon as Pn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as Un, FileXlsIcon as Bn, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as Se, PlayIcon as rt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Ee, XIcon as Ge, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Zn, TrashSimpleIcon as Jn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
7
- import y from "classnames";
7
+ import k from "classnames";
8
8
  import { MessageActions as ta, DefaultDropdownActionButton as cs } from "stream-chat-react/experimental";
9
9
  const ds = ct({
10
10
  service: null,
@@ -16,7 +16,7 @@ const ds = ct({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), dt = () => Te(ds), hl = ({
19
+ }), dt = () => Te(ds), ml = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -25,7 +25,7 @@ const ds = ct({
25
25
  debug: i = !1,
26
26
  client: o
27
27
  }) => {
28
- var I, T;
28
+ var y, T;
29
29
  const l = J(
30
30
  (M, ...P) => {
31
31
  i && console.log(`🔥 [MessagingProvider] ${M}`, ...P);
@@ -38,11 +38,11 @@ const ds = ct({
38
38
  serviceConfig: !!n,
39
39
  capabilities: Object.keys(r)
40
40
  });
41
- const [d, m] = B(null), [f, h] = B(null), [g, c] = B(!1), [b, v] = B(!1), [x, p] = B(null), _ = G(!1), w = G(null), k = G(n);
42
- k.current = n;
41
+ const [d, m] = B(null), [f, h] = B(null), [g, c] = B(!1), [b, v] = B(!1), [x, p] = B(null), _ = G(!1), w = G(null), C = G(n);
42
+ C.current = n;
43
43
  const D = G(i);
44
44
  D.current = i;
45
- const S = G({
45
+ const E = G({
46
46
  userId: t == null ? void 0 : t.id,
47
47
  apiKey: a,
48
48
  serviceConfig: n,
@@ -52,22 +52,22 @@ const ds = ct({
52
52
  renderCount: R.current,
53
53
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
54
54
  propChanges: {
55
- userChanged: S.current.userId !== (t == null ? void 0 : t.id),
56
- apiKeyChanged: S.current.apiKey !== a,
57
- serviceConfigChanged: S.current.serviceConfig !== n,
58
- capabilitiesChanged: S.current.capabilities !== r
55
+ userChanged: E.current.userId !== (t == null ? void 0 : t.id),
56
+ apiKeyChanged: E.current.apiKey !== a,
57
+ serviceConfigChanged: E.current.serviceConfig !== n,
58
+ capabilitiesChanged: E.current.capabilities !== r
59
59
  }
60
- }), S.current = {
60
+ }), E.current = {
61
61
  userId: t == null ? void 0 : t.id,
62
62
  apiKey: a,
63
63
  serviceConfig: n,
64
64
  capabilities: r
65
65
  };
66
66
  const O = G(null);
67
- !o && a && ((I = O.current) == null ? void 0 : I.apiKey) !== a && (O.current = { apiKey: a, client: new Ys(a) });
67
+ !o && a && ((y = O.current) == null ? void 0 : y.apiKey) !== a && (O.current = { apiKey: a, client: new Ys(a) });
68
68
  const F = o || (a ? ((T = O.current) == null ? void 0 : T.client) ?? null : null);
69
69
  K(() => {
70
- const M = R.current, P = k.current;
70
+ const M = R.current, P = C.current;
71
71
  if (o) {
72
72
  w.current = null, m(null), h(null), c(!1), p(null), v(!1);
73
73
  return;
@@ -150,7 +150,7 @@ const ds = ct({
150
150
  M && (L.current = null, (P = w.current) == null || P.disconnectUser().catch(console.error));
151
151
  };
152
152
  }, [F]);
153
- const C = J(async () => {
153
+ const S = J(async () => {
154
154
  if (l("🔄 REFRESH CONNECTION CALLED", {
155
155
  hasService: !!d,
156
156
  hasUser: !!t
@@ -174,7 +174,7 @@ const ds = ct({
174
174
  v(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
175
175
  }
176
176
  }
177
- }, [d, t, l, o]), E = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
177
+ }, [d, t, l, o]), I = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
178
178
  hasService: !!d,
179
179
  hasClient: !!f,
180
180
  isConnected: g,
@@ -196,7 +196,7 @@ const ds = ct({
196
196
  isLoading: o ? !1 : b,
197
197
  error: o ? null : x,
198
198
  capabilities: r,
199
- refreshConnection: C,
199
+ refreshConnection: S,
200
200
  debug: i
201
201
  }), [
202
202
  d,
@@ -206,15 +206,15 @@ const ds = ct({
206
206
  b,
207
207
  x,
208
208
  r,
209
- C,
209
+ S,
210
210
  i,
211
211
  l
212
212
  ]);
213
213
  return l("🔄 RENDER END", {
214
214
  renderCount: R.current,
215
215
  willRenderChat: !!F,
216
- contextValueReady: !!E
217
- }), /* @__PURE__ */ s(ds.Provider, { value: E, children: F ? /* @__PURE__ */ s(
216
+ contextValueReady: !!I
217
+ }), /* @__PURE__ */ s(ds.Provider, { value: I, children: F ? /* @__PURE__ */ s(
218
218
  qs,
219
219
  {
220
220
  client: F,
@@ -341,7 +341,7 @@ const ne = ({
341
341
  "div",
342
342
  {
343
343
  "aria-hidden": "true",
344
- className: y(
344
+ className: k(
345
345
  "avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
346
346
  ),
347
347
  style: { fontSize: h, lineHeight: 1 },
@@ -351,7 +351,7 @@ const ne = ({
351
351
  return /* @__PURE__ */ u(
352
352
  "div",
353
353
  {
354
- className: y(
354
+ className: k(
355
355
  "relative flex-shrink-0",
356
356
  a
357
357
  ),
@@ -375,7 +375,7 @@ const ne = ({
375
375
  "div",
376
376
  {
377
377
  "data-testid": "avatar-ring",
378
- className: y(
378
+ className: k(
379
379
  "h-full w-full",
380
380
  "bg-transparent"
381
381
  ),
@@ -407,30 +407,30 @@ const ne = ({
407
407
  onActionComplete: m,
408
408
  logLabel: f = "useChannelModerationActions"
409
409
  }) => {
410
- var E;
411
- const { service: h, debug: g } = dt(), c = (E = t == null ? void 0 : t.user) == null ? void 0 : E.id, b = !!(a && n && h && c), [v, x] = B(!1), [p, _] = B(null), [w, k] = B(!1), [D, S] = B(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
410
+ var I;
411
+ const { service: h, debug: g } = dt(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, b = !!(a && n && h && c), [v, x] = B(!1), [p, _] = B(null), [w, C] = B(!1), [D, E] = B(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
412
412
  return K(() => {
413
413
  if (!b || !h || !c) {
414
414
  x(!1), _(null);
415
415
  return;
416
416
  }
417
- let I = !1;
417
+ let y = !1;
418
418
  return (async () => {
419
419
  try {
420
420
  const T = await h.getBlockedUsers();
421
- if (I) return;
421
+ if (y) return;
422
422
  x(
423
423
  T.some(
424
424
  (M) => M.blocked_user_id === c
425
425
  )
426
426
  );
427
427
  } catch (T) {
428
- I || console.error(`[${f}] Failed to check blocked status:`, T);
428
+ y || console.error(`[${f}] Failed to check blocked status:`, T);
429
429
  } finally {
430
- I || _({ participantId: c, service: h });
430
+ y || _({ participantId: c, service: h });
431
431
  }
432
432
  })(), () => {
433
- I = !0;
433
+ y = !0;
434
434
  };
435
435
  }, [b, h, c, f]), {
436
436
  isParticipantBlocked: v,
@@ -438,42 +438,42 @@ const ne = ({
438
438
  isLeaving: w,
439
439
  isUpdatingBlockStatus: D,
440
440
  handleLeaveConversation: async () => {
441
- var I;
441
+ var y;
442
442
  if (!w) {
443
- o == null || o(), g && console.log(`[${f}] Leave conversation`, e.cid), k(!0);
443
+ o == null || o(), g && console.log(`[${f}] Leave conversation`, e.cid), C(!0);
444
444
  try {
445
- const T = ((I = e._client) == null ? void 0 : I.userID) ?? null;
445
+ const T = ((y = e._client) == null ? void 0 : y.userID) ?? null;
446
446
  await e.hide(T, !1), r && await r(e), m == null || m();
447
447
  } catch (T) {
448
448
  console.error(`[${f}] Failed to leave conversation`, T);
449
449
  } finally {
450
- k(!1);
450
+ C(!1);
451
451
  }
452
452
  }
453
453
  },
454
454
  handleBlockUser: async () => {
455
- var I, T, M;
455
+ var y, T, M;
456
456
  if (!(D || !h)) {
457
- l == null || l(), g && console.log(`[${f}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
457
+ l == null || l(), g && console.log(`[${f}] Block member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), E(!0);
458
458
  try {
459
459
  await h.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
460
460
  } catch (P) {
461
461
  console.error(`[${f}] Failed to block member`, P);
462
462
  } finally {
463
- S(!1);
463
+ E(!1);
464
464
  }
465
465
  }
466
466
  },
467
467
  handleUnblockUser: async () => {
468
- var I, T, M;
468
+ var y, T, M;
469
469
  if (!(D || !h)) {
470
- l == null || l(), g && console.log(`[${f}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
470
+ l == null || l(), g && console.log(`[${f}] Unblock member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), E(!0);
471
471
  try {
472
472
  await h.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
473
473
  } catch (P) {
474
474
  console.error(`[${f}] Failed to unblock member`, P);
475
475
  } finally {
476
- S(!1);
476
+ E(!1);
477
477
  }
478
478
  }
479
479
  },
@@ -490,7 +490,7 @@ const ne = ({
490
490
  "button",
491
491
  {
492
492
  type: "button",
493
- className: y(
493
+ className: k(
494
494
  "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",
495
495
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
496
496
  t
@@ -516,9 +516,9 @@ const ne = ({
516
516
  isParticipantBlocked: p,
517
517
  isCheckingBlockedStatus: _,
518
518
  isLeaving: w,
519
- isUpdatingBlockStatus: k,
519
+ isUpdatingBlockStatus: C,
520
520
  handleLeaveConversation: D,
521
- handleBlockUser: S,
521
+ handleBlockUser: E,
522
522
  handleUnblockUser: R,
523
523
  handleReportUser: O
524
524
  } = ua({
@@ -536,13 +536,13 @@ const ne = ({
536
536
  });
537
537
  return K(() => {
538
538
  if (!g) return;
539
- const L = (E) => {
540
- b.current && !b.current.contains(E.target) && c(!1);
541
- }, C = (E) => {
542
- E.key === "Escape" && c(!1);
539
+ const L = (I) => {
540
+ b.current && !b.current.contains(I.target) && c(!1);
541
+ }, S = (I) => {
542
+ I.key === "Escape" && c(!1);
543
543
  };
544
- return document.addEventListener("mousedown", L), document.addEventListener("keydown", C), () => {
545
- document.removeEventListener("mousedown", L), document.removeEventListener("keydown", C);
544
+ return document.addEventListener("mousedown", L), document.addEventListener("keydown", S), () => {
545
+ document.removeEventListener("mousedown", L), document.removeEventListener("keydown", S);
546
546
  };
547
547
  }, [g]), !t || !(n || a || r || !!f) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
548
548
  /* @__PURE__ */ u(
@@ -565,7 +565,7 @@ const ne = ({
565
565
  {
566
566
  id: v,
567
567
  "aria-label": "Conversation options",
568
- className: y(
568
+ className: k(
569
569
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
570
570
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
571
571
  ),
@@ -593,21 +593,21 @@ const ne = ({
593
593
  ye,
594
594
  {
595
595
  onClick: R,
596
- disabled: k,
597
- "aria-busy": k,
596
+ disabled: C,
597
+ "aria-busy": C,
598
598
  children: [
599
- k ? /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
599
+ C ? /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
600
600
  /* @__PURE__ */ s("span", { children: "Unblock" })
601
601
  ]
602
602
  }
603
603
  ) : /* @__PURE__ */ u(
604
604
  ye,
605
605
  {
606
- onClick: S,
607
- disabled: k,
608
- "aria-busy": k,
606
+ onClick: E,
607
+ disabled: C,
608
+ "aria-busy": C,
609
609
  children: [
610
- k ? /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
610
+ C ? /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
611
611
  /* @__PURE__ */ s("span", { children: "Block" })
612
612
  ]
613
613
  }
@@ -621,10 +621,7 @@ const ne = ({
621
621
  }
622
622
  )
623
623
  ] });
624
- }, Ze = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ma = "CUSTOMER_PAID", ha = "Replies instantly with AI assistant", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, ga = (e) => {
625
- const t = e;
626
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
627
- }, pa = ({
624
+ }, Ze = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ma = "CUSTOMER_PAID", ha = "Replies instantly with AI assistant", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, ga = ({
628
625
  className: e,
629
626
  onBack: t,
630
627
  showBackButton: n,
@@ -643,31 +640,31 @@ const ne = ({
643
640
  showChannelInfo: v = !0,
644
641
  onParticipantNameClick: x
645
642
  }) => {
646
- var F, L, C;
643
+ var F, L, S, I;
647
644
  const { channel: p } = oe(), { client: _ } = fe(), w = V.useMemo(
648
645
  () => {
649
- var E;
646
+ var y;
650
647
  return He(
651
- (E = p.state) == null ? void 0 : E.members,
648
+ (y = p.state) == null ? void 0 : y.members,
652
649
  _ == null ? void 0 : _.userID,
653
650
  p.type
654
651
  );
655
652
  },
656
653
  [(F = p.state) == null ? void 0 : F.members, _ == null ? void 0 : _.userID, p.type]
657
- ), k = mt(w == null ? void 0 : w.user), D = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, S = ut(p), R = ga(w), O = async () => {
654
+ ), C = mt(w == null ? void 0 : w.user), D = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, E = ut(p), R = fa((S = p.data) == null ? void 0 : S.customer_tag) && (w == null ? void 0 : w.is_follower) === !0, O = async () => {
658
655
  try {
659
- S ? await p.unpin() : await p.pin();
660
- } catch (E) {
656
+ E ? await p.unpin() : await p.pin();
657
+ } catch (y) {
661
658
  console.error(
662
659
  "[ChannelHeaderRedesign] Failed to update pinned status:",
663
- E
660
+ y
664
661
  );
665
662
  }
666
663
  };
667
664
  return /* @__PURE__ */ s(
668
665
  "div",
669
666
  {
670
- className: y(
667
+ className: k(
671
668
  "@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
672
669
  e
673
670
  ),
@@ -675,7 +672,7 @@ const ne = ({
675
672
  /* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
676
673
  "button",
677
674
  {
678
- className: y(
675
+ className: k(
679
676
  Ze,
680
677
  "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
681
678
  ),
@@ -691,14 +688,14 @@ const ne = ({
691
688
  {
692
689
  type: "button",
693
690
  onClick: x,
694
- "aria-label": `View details for ${k}`,
691
+ "aria-label": `View details for ${C}`,
695
692
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
696
693
  children: [
697
694
  /* @__PURE__ */ s(
698
695
  ne,
699
696
  {
700
- id: ((C = w == null ? void 0 : w.user) == null ? void 0 : C.id) || p.id || "unknown",
701
- name: k,
697
+ id: ((I = w == null ? void 0 : w.user) == null ? void 0 : I.id) || p.id || "unknown",
698
+ name: C,
702
699
  image: D,
703
700
  dmAgentEnabled: r,
704
701
  shape: "circle",
@@ -708,7 +705,7 @@ const ne = ({
708
705
  ),
709
706
  /* @__PURE__ */ u("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
710
707
  /* @__PURE__ */ u("span", { className: "flex max-w-full items-center justify-center", children: [
711
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: k }),
708
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: C }),
712
709
  /* @__PURE__ */ u("span", { className: "ml-2 flex gap-1", children: [
713
710
  R && /* @__PURE__ */ s(
714
711
  "span",
@@ -718,7 +715,7 @@ const ne = ({
718
715
  children: /* @__PURE__ */ s(Ln, { className: "size-2.5", weight: "bold" })
719
716
  }
720
717
  ),
721
- a && S && /* @__PURE__ */ s(
718
+ a && E && /* @__PURE__ */ s(
722
719
  "span",
723
720
  {
724
721
  "aria-label": "Starred conversation",
@@ -751,16 +748,16 @@ const ne = ({
751
748
  className: Ze,
752
749
  onClick: O,
753
750
  type: "button",
754
- "aria-pressed": S,
755
- "aria-label": S ? "Unstar conversation" : "Star conversation",
751
+ "aria-pressed": E,
752
+ "aria-label": E ? "Unstar conversation" : "Star conversation",
756
753
  children: /* @__PURE__ */ s(
757
754
  Ie,
758
755
  {
759
- className: y("size-5", {
760
- "text-[#FFD60A]": S,
761
- "text-black/90": !S
756
+ className: k("size-5", {
757
+ "text-[#FFD60A]": E,
758
+ "text-black/90": !E
762
759
  }),
763
- weight: S ? "fill" : "regular"
760
+ weight: E ? "fill" : "regular"
764
761
  }
765
762
  )
766
763
  }
@@ -786,13 +783,13 @@ const ne = ({
786
783
  ] })
787
784
  }
788
785
  );
789
- }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), lt = "vote_up", ot = "vote_down";
790
- function va(e) {
786
+ }, pa = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), lt = "vote_up", ot = "vote_down";
787
+ function ba(e) {
791
788
  return e != null && e.length ? e.some((t) => t.type === ot) ? "down" : e.some((t) => t.type === lt) ? "up" : null : null;
792
789
  }
793
- function xa(e) {
790
+ function va(e) {
794
791
  const { channel: t } = oe(), { client: n } = fe("useMessageVote"), a = re(
795
- () => va(e.own_reactions),
792
+ () => ba(e.own_reactions),
796
793
  [e.own_reactions]
797
794
  ), r = J(async () => {
798
795
  if (n != null && n.userID)
@@ -817,7 +814,7 @@ function xa(e) {
817
814
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
818
815
  return { selected: a, voteUp: r, voteDown: i };
819
816
  }
820
- function wa(e) {
817
+ function xa(e) {
821
818
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
822
819
  }
823
820
  function ms({
@@ -825,31 +822,31 @@ function ms({
825
822
  viewerLanguage: t
826
823
  }) {
827
824
  var r;
828
- const n = e == null ? void 0 : e.text, a = wa(t);
825
+ const n = e == null ? void 0 : e.text, a = xa(t);
829
826
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
830
827
  }
831
- const _a = ["linktr.ee"], Kt = "messaging-attachment-v1_0";
832
- function Na(e) {
828
+ const wa = ["linktr.ee"], Kt = "messaging-attachment-v1_0";
829
+ function _a(e) {
833
830
  try {
834
831
  return new URL(e).hostname.toLowerCase();
835
832
  } catch {
836
833
  return null;
837
834
  }
838
835
  }
839
- function ya(e) {
840
- return _a.some(
836
+ function Na(e) {
837
+ return wa.some(
841
838
  (t) => e === t || e.endsWith(`.${t}`)
842
839
  );
843
840
  }
844
841
  function he(e) {
845
842
  const t = e == null ? void 0 : e.trim();
846
843
  if (!t) return;
847
- const n = Na(t);
848
- if (!n || !ya(n)) return t;
844
+ const n = _a(t);
845
+ if (!n || !Na(n)) return t;
849
846
  const a = new URL(t);
850
847
  return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Kt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Kt), a.toString());
851
848
  }
852
- const ka = [
849
+ const ya = [
853
850
  [/pdf/, "pdf"],
854
851
  [/wordprocessingml|msword|\.doc/, "doc"],
855
852
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -863,17 +860,17 @@ function ce(e) {
863
860
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
864
861
  }
865
862
  function hs(e) {
866
- const t = ka.find(
863
+ const t = ya.find(
867
864
  ([n]) => n.test(e)
868
865
  );
869
866
  return t ? t[1] : "generic";
870
867
  }
871
- const Ca = {
868
+ const ka = {
872
869
  video: os,
873
870
  audio: zn,
874
871
  image: Dn,
875
872
  document: ls
876
- }, Sa = {
873
+ }, Ca = {
877
874
  pdf: Vn,
878
875
  doc: jn,
879
876
  xls: Bn,
@@ -884,17 +881,17 @@ const Ca = {
884
881
  markdown: Fn,
885
882
  generic: ls
886
883
  };
887
- function Ea(e) {
884
+ function Sa(e) {
888
885
  const t = ce(e);
889
- return t !== "document" ? Ca[t] : Sa[hs(e)];
886
+ return t !== "document" ? ka[t] : Ca[hs(e)];
890
887
  }
891
888
  function _e(e, t) {
892
- return V.createElement(Ea(e), t);
889
+ return V.createElement(Sa(e), t);
893
890
  }
894
- const Ia = (e) => {
891
+ const Ea = (e) => {
895
892
  var t, n;
896
893
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
897
- }, Ta = ({
894
+ }, Ia = ({
898
895
  source: e,
899
896
  mimeType: t,
900
897
  poster: n,
@@ -906,7 +903,7 @@ const Ia = (e) => {
906
903
  muted: d = !1,
907
904
  onContainerClick: m
908
905
  }) => {
909
- const f = ce(t), h = G(null), g = G(null), c = G(null), b = G(r), [v, x] = B(a), [p, _] = B(0), [w, k] = B(!1), [D, S] = B(!1), [R, O] = B(!1), [F, L] = B(!1), [C, E] = B(!0), [I, T] = B(null), M = J(() => {
906
+ const f = ce(t), h = G(null), g = G(null), c = G(null), b = G(r), [v, x] = B(a), [p, _] = B(0), [w, C] = B(!1), [D, E] = B(!1), [R, O] = B(!1), [F, L] = B(!1), [S, I] = B(!0), [y, T] = B(null), M = J(() => {
910
907
  O(!1), x(!0);
911
908
  }, []), P = J((N) => {
912
909
  const A = g.current;
@@ -914,13 +911,13 @@ const Ia = (e) => {
914
911
  const H = A.getBoundingClientRect();
915
912
  return Math.max(
916
913
  0,
917
- Math.min(1, (Ia(N) - H.left) / H.width)
914
+ Math.min(1, (Ea(N) - H.left) / H.width)
918
915
  );
919
916
  }, []), $ = J((N) => {
920
917
  const A = h.current;
921
918
  A && A.duration && (A.currentTime = N * A.duration);
922
919
  }, []), j = (N) => {
923
- N.stopPropagation(), k(!0);
920
+ N.stopPropagation(), C(!0);
924
921
  const A = P(N);
925
922
  _(A), $(A);
926
923
  };
@@ -946,13 +943,13 @@ const Ia = (e) => {
946
943
  }, [v]), K(() => {
947
944
  if (!w) return;
948
945
  const N = (H) => _(P(H)), A = (H) => {
949
- k(!1), $(P(H));
946
+ C(!1), $(P(H));
950
947
  };
951
948
  return window.addEventListener("mousemove", N), window.addEventListener("mouseup", A), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", A), () => {
952
949
  window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", A);
953
950
  };
954
951
  }, [w, P, $]);
955
- const Q = I ? { aspectRatio: String(I) } : void 0, ee = I ? "" : " aspect-video", X = Math.round(p * 100);
952
+ const Q = y ? { aspectRatio: String(y) } : void 0, ee = y ? "" : " aspect-video", X = Math.round(p * 100);
956
953
  return /* @__PURE__ */ u(
957
954
  "div",
958
955
  {
@@ -977,7 +974,7 @@ const Ia = (e) => {
977
974
  }
978
975
  },
979
976
  children: [
980
- n && (f === "audio" || C) && /* @__PURE__ */ s(
977
+ n && (f === "audio" || S) && /* @__PURE__ */ s(
981
978
  "img",
982
979
  {
983
980
  src: n,
@@ -985,7 +982,7 @@ const Ia = (e) => {
985
982
  className: "absolute inset-0 h-full w-full object-cover"
986
983
  }
987
984
  ),
988
- !n && (f === "audio" || C) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: _e(t, {
985
+ !n && (f === "audio" || S) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: _e(t, {
989
986
  className: "size-12 text-black/20",
990
987
  weight: "regular"
991
988
  }) }),
@@ -999,7 +996,7 @@ const Ia = (e) => {
999
996
  style: { width: "100%", height: "100%" },
1000
997
  onLoadStart: () => L(!0),
1001
998
  onCanPlay: () => {
1002
- L(!1), E(!1);
999
+ L(!1), I(!1);
1003
1000
  },
1004
1001
  onWaiting: () => L(!0),
1005
1002
  onPlay: () => O(!1),
@@ -1019,7 +1016,7 @@ const Ia = (e) => {
1019
1016
  style: { width: "100%", height: "100%" },
1020
1017
  onLoadStart: () => L(!0),
1021
1018
  onCanPlay: () => {
1022
- L(!1), E(!1);
1019
+ L(!1), I(!1);
1023
1020
  },
1024
1021
  onWaiting: () => L(!0),
1025
1022
  onPlay: () => O(!1),
@@ -1109,8 +1106,8 @@ const Ia = (e) => {
1109
1106
  onMouseDown: j,
1110
1107
  onTouchStart: j,
1111
1108
  onClick: (N) => N.stopPropagation(),
1112
- onMouseEnter: () => S(!0),
1113
- onMouseLeave: () => S(!1),
1109
+ onMouseEnter: () => E(!0),
1110
+ onMouseLeave: () => E(!1),
1114
1111
  onKeyDown: (N) => {
1115
1112
  N.key === "ArrowRight" && $(Math.min(1, p + 0.05)), N.key === "ArrowLeft" && $(Math.max(0, p - 0.05));
1116
1113
  },
@@ -1142,7 +1139,7 @@ const Ia = (e) => {
1142
1139
  ]
1143
1140
  }
1144
1141
  );
1145
- }, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ma = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", fs = ({
1142
+ }, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ta = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", fs = ({
1146
1143
  mimeType: e,
1147
1144
  sourceUrl: t,
1148
1145
  thumbnailUrl: n,
@@ -1153,7 +1150,7 @@ const Ia = (e) => {
1153
1150
  }) => {
1154
1151
  const l = ce(e), [d, m] = B(!1), f = he(t), h = he(n);
1155
1152
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
1156
- Ta,
1153
+ Ia,
1157
1154
  {
1158
1155
  source: t,
1159
1156
  mimeType: e,
@@ -1204,7 +1201,7 @@ const Ia = (e) => {
1204
1201
  weight: "regular"
1205
1202
  })
1206
1203
  }
1207
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ma(r)}`, children: /* @__PURE__ */ s(
1204
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ta(r)}`, children: /* @__PURE__ */ s(
1208
1205
  "img",
1209
1206
  {
1210
1207
  src: h ?? n,
@@ -1242,7 +1239,7 @@ const Ia = (e) => {
1242
1239
  {
1243
1240
  ref: f,
1244
1241
  "data-testid": h,
1245
- className: y(
1242
+ className: k(
1246
1243
  "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)]",
1247
1244
  g ? "bg-[#1e2330]" : "bg-white"
1248
1245
  ),
@@ -1254,7 +1251,7 @@ const Ia = (e) => {
1254
1251
  c.trim() !== "" && /* @__PURE__ */ s(
1255
1252
  "p",
1256
1253
  {
1257
- className: y("mb-0.5 truncate text-base font-medium", {
1254
+ className: k("mb-0.5 truncate text-base font-medium", {
1258
1255
  "text-black": !g,
1259
1256
  "text-white/30": g && b,
1260
1257
  "text-white": g && !b
@@ -1264,7 +1261,7 @@ const Ia = (e) => {
1264
1261
  ),
1265
1262
  /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
1266
1263
  _e(r, {
1267
- className: y(
1264
+ className: k(
1268
1265
  "size-5 shrink-0",
1269
1266
  g ? "text-white/55" : "text-black/55"
1270
1267
  ),
@@ -1273,7 +1270,7 @@ const Ia = (e) => {
1273
1270
  i != null && i !== "" && /* @__PURE__ */ s(
1274
1271
  "span",
1275
1272
  {
1276
- className: y(
1273
+ className: k(
1277
1274
  "text-xs font-medium",
1278
1275
  g ? "text-white/55" : "text-black/55"
1279
1276
  ),
@@ -1294,19 +1291,19 @@ function ps(e) {
1294
1291
  function ht(e) {
1295
1292
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1296
1293
  }
1297
- function Aa(e) {
1294
+ function Ma(e) {
1298
1295
  return e ? "bg-white/10" : "bg-black/5";
1299
1296
  }
1300
- function Ra(e) {
1297
+ function Aa(e) {
1301
1298
  return e ? "text-white" : "text-black";
1302
1299
  }
1303
- function La(e) {
1300
+ function Ra(e) {
1304
1301
  return e ? "text-white/55" : "text-black/55";
1305
1302
  }
1306
- function Da(e) {
1303
+ function La(e) {
1307
1304
  return e ? "text-white/40" : "text-black/40";
1308
1305
  }
1309
- function za(e) {
1306
+ function Da(e) {
1310
1307
  return e ? "text-white/20" : "text-black/20";
1311
1308
  }
1312
1309
  const ft = ({ attachment: e, isMyMessage: t }) => {
@@ -1321,14 +1318,14 @@ const ft = ({ attachment: e, isMyMessage: t }) => {
1321
1318
  ) : /* @__PURE__ */ s(
1322
1319
  "div",
1323
1320
  {
1324
- className: `aspect-video w-full rounded-[20px] ${Aa(t)} flex items-center justify-center`,
1325
- children: /* @__PURE__ */ s(Hn, { className: `size-12 ${za(t)}` })
1321
+ className: `aspect-video w-full rounded-[20px] ${Ma(t)} flex items-center justify-center`,
1322
+ children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Da(t)}` })
1326
1323
  }
1327
1324
  ) }),
1328
1325
  /* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
1329
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Ra(t)}`, children: n }),
1330
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${La(t)}`, children: a }),
1331
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Da(t)}`, children: d })
1326
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Aa(t)}`, children: n }),
1327
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Ra(t)}`, children: a }),
1328
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${La(t)}`, children: d })
1332
1329
  ] })
1333
1330
  ] });
1334
1331
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
@@ -1340,7 +1337,7 @@ function gt(e) {
1340
1337
  var t;
1341
1338
  return (t = e.attachments) == null ? void 0 : t.find(bs);
1342
1339
  }
1343
- async function Fa(e, t) {
1340
+ async function za(e, t) {
1344
1341
  let n;
1345
1342
  try {
1346
1343
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1352,7 +1349,7 @@ async function Fa(e, t) {
1352
1349
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1353
1350
  o.href = i, o.download = n, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1354
1351
  }
1355
- const Pa = ({
1352
+ const Fa = ({
1356
1353
  url: e,
1357
1354
  filename: t
1358
1355
  }) => {
@@ -1364,7 +1361,7 @@ const Pa = ({
1364
1361
  onClick: (i) => {
1365
1362
  i.stopPropagation();
1366
1363
  const o = window.open("", "_blank", "noopener,noreferrer");
1367
- a(!0), Fa(e, t).then(() => {
1364
+ a(!0), za(e, t).then(() => {
1368
1365
  o == null || o.close();
1369
1366
  }).catch(() => {
1370
1367
  o && (o.location.href = e);
@@ -1454,10 +1451,10 @@ const vs = ({
1454
1451
  containedImage: i === "image" || i === "document"
1455
1452
  }
1456
1453
  ),
1457
- action: /* @__PURE__ */ s(Pa, { url: e, filename: n })
1454
+ action: /* @__PURE__ */ s(Fa, { url: e, filename: n })
1458
1455
  }
1459
1456
  );
1460
- }, Oa = ({
1457
+ }, Pa = ({
1461
1458
  message: e,
1462
1459
  isMyMessage: t = !1
1463
1460
  }) => {
@@ -1489,7 +1486,7 @@ const vs = ({
1489
1486
  }
1490
1487
  )
1491
1488
  ] });
1492
- }, $a = ({
1489
+ }, Oa = ({
1493
1490
  message: e
1494
1491
  }) => {
1495
1492
  const t = gt(e);
@@ -1497,7 +1494,7 @@ const vs = ({
1497
1494
  return /* @__PURE__ */ s("div", { className: ht(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !0 }) });
1498
1495
  const n = pt(e);
1499
1496
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(vs, { ...n }) }) : null;
1500
- }, Ua = ({
1497
+ }, $a = ({
1501
1498
  message: e
1502
1499
  }) => {
1503
1500
  const t = gt(e);
@@ -1505,19 +1502,19 @@ const vs = ({
1505
1502
  return /* @__PURE__ */ s("div", { className: ht(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !1 }) });
1506
1503
  const n = pt(e);
1507
1504
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(xs, { ...n }) }) : null;
1508
- }, fl = Object.assign(Oa, {
1509
- Creator: $a,
1510
- Visitor: Ua
1511
- }), Ba = {
1505
+ }, hl = Object.assign(Pa, {
1506
+ Creator: Oa,
1507
+ Visitor: $a
1508
+ }), Ua = {
1512
1509
  dark: "bg-[#1e2330]",
1513
1510
  light: "bg-[#f2f1ef]"
1514
- }, ja = {
1511
+ }, Ba = {
1515
1512
  dark: "text-white",
1516
1513
  light: "text-[#000000]"
1517
- }, Va = {
1514
+ }, ja = {
1518
1515
  dark: "border-white/[0.08]",
1519
1516
  light: "border-black/[0.08]"
1520
- }, Ga = (e) => e === "dark" ? "sender" : "receiver", Ha = {
1517
+ }, Va = (e) => e === "dark" ? "sender" : "receiver", Ga = {
1521
1518
  sender: {
1522
1519
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1523
1520
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1539,13 +1536,13 @@ const vs = ({
1539
1536
  children: i,
1540
1537
  "data-testid": o
1541
1538
  }) => {
1542
- const l = t != null && t !== "", d = Ha[Ga(e)][a];
1539
+ const l = t != null && t !== "", d = Ga[Va(e)][a];
1543
1540
  return /* @__PURE__ */ u(
1544
1541
  "div",
1545
1542
  {
1546
1543
  "data-testid": o,
1547
1544
  "data-group-position": a,
1548
- className: y(
1545
+ className: k(
1549
1546
  // 280px-wide bubble — matches the mobile chat attachment width
1550
1547
  // and keeps the document / image / audio bubbles visually
1551
1548
  // consistent inside the conversation timeline. The 8px / 16px
@@ -1554,10 +1551,10 @@ const vs = ({
1554
1551
  // as the surrounding `CustomMessage` text bubbles.
1555
1552
  "relative w-[280px] overflow-hidden px-2 py-2",
1556
1553
  d,
1554
+ Ua[e],
1557
1555
  Ba[e],
1558
- ja[e],
1559
1556
  n && "border",
1560
- n && Va[e],
1557
+ n && ja[e],
1561
1558
  r
1562
1559
  ),
1563
1560
  children: [
@@ -1565,7 +1562,7 @@ const vs = ({
1565
1562
  l ? /* @__PURE__ */ s(
1566
1563
  "p",
1567
1564
  {
1568
- className: y(
1565
+ className: k(
1569
1566
  // No `text-*` / `font-*` overrides here — caption inherits
1570
1567
  // the same font family + size as `.str-chat__message-text`
1571
1568
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -1594,22 +1591,22 @@ const vs = ({
1594
1591
  a.stopPropagation(), e();
1595
1592
  },
1596
1593
  "aria-label": n,
1597
- className: y(
1594
+ className: k(
1598
1595
  "flex size-6 items-center justify-center rounded-full text-white",
1599
1596
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
1600
1597
  ),
1601
1598
  children: /* @__PURE__ */ s(Ge, { className: "size-3", weight: "bold" })
1602
1599
  }
1603
- ), Re = (e) => e === "received" ? "light" : "dark", Ya = ({
1600
+ ), Re = (e) => e === "received" ? "light" : "dark", Ha = ({
1604
1601
  firstOfGroup: e,
1605
1602
  endOfGroup: t,
1606
1603
  groupedByUser: n
1607
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", qa = ({
1604
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ya = ({
1608
1605
  src: e,
1609
1606
  mimeType: t,
1610
1607
  filename: n,
1611
1608
  items: a
1612
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Wa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1609
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], qa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1613
1610
  /* @__PURE__ */ s(
1614
1611
  "audio",
1615
1612
  {
@@ -1632,7 +1629,7 @@ const vs = ({
1632
1629
  preload: l,
1633
1630
  onDismiss: d
1634
1631
  }) => {
1635
- const m = Re(e), f = e === "composer" && !!d, h = qa({ src: t, mimeType: n, filename: a, items: r });
1632
+ const m = Re(e), f = e === "composer" && !!d, h = Ya({ src: t, mimeType: n, filename: a, items: r });
1636
1633
  if (h.length === 0)
1637
1634
  return null;
1638
1635
  const g = l ?? (h.length > 1 ? "none" : "metadata");
@@ -1644,7 +1641,7 @@ const vs = ({
1644
1641
  groupPosition: o,
1645
1642
  "data-testid": "audio-attachment",
1646
1643
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, b) => /* @__PURE__ */ s(
1647
- Wa,
1644
+ qa,
1648
1645
  {
1649
1646
  item: c,
1650
1647
  preload: g,
@@ -1658,15 +1655,15 @@ const vs = ({
1658
1655
  )) })
1659
1656
  }
1660
1657
  );
1661
- }, Xa = (e) => /* @__PURE__ */ s(bt, { ...e, state: "composer" }), Ka = (e) => /* @__PURE__ */ s(bt, { ...e, state: "sent" }), Za = (e) => /* @__PURE__ */ s(bt, { ...e, state: "received" }), Ja = {
1662
- Composer: Xa,
1663
- Sent: Ka,
1664
- Received: Za
1658
+ }, Wa = (e) => /* @__PURE__ */ s(bt, { ...e, state: "composer" }), Xa = (e) => /* @__PURE__ */ s(bt, { ...e, state: "sent" }), Ka = (e) => /* @__PURE__ */ s(bt, { ...e, state: "received" }), Za = {
1659
+ Composer: Wa,
1660
+ Sent: Xa,
1661
+ Received: Ka
1665
1662
  };
1666
- function Qa(e) {
1663
+ function Ja(e) {
1667
1664
  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`;
1668
1665
  }
1669
- const er = {
1666
+ const Qa = {
1670
1667
  pdf: "PDF",
1671
1668
  doc: "DOC",
1672
1669
  xls: "XLS",
@@ -1676,7 +1673,7 @@ const er = {
1676
1673
  text: "TXT",
1677
1674
  markdown: "MD"
1678
1675
  };
1679
- function tr(e, t) {
1676
+ function er(e, t) {
1680
1677
  if (t) {
1681
1678
  const r = t.lastIndexOf(".");
1682
1679
  if (r > 0 && r < t.length - 1) {
@@ -1686,7 +1683,7 @@ function tr(e, t) {
1686
1683
  }
1687
1684
  if (!e) return;
1688
1685
  if (ce(e) === "document") {
1689
- const r = hs(e), i = er[r];
1686
+ const r = hs(e), i = Qa[r];
1690
1687
  if (i) return i;
1691
1688
  if (e === "application/octet-stream") return;
1692
1689
  }
@@ -1694,8 +1691,8 @@ function tr(e, t) {
1694
1691
  if (!(!a || a === "*"))
1695
1692
  return a.toUpperCase();
1696
1693
  }
1697
- function sr(e, t, n) {
1698
- const a = tr(e, t), r = typeof n == "number" && n > 0 ? Qa(n) : void 0;
1694
+ function tr(e, t, n) {
1695
+ const a = er(e, t), r = typeof n == "number" && n > 0 ? Ja(n) : void 0;
1699
1696
  return [a, r].filter(Boolean).join(" · ") || void 0;
1700
1697
  }
1701
1698
  function ie(e) {
@@ -1706,13 +1703,13 @@ function ie(e) {
1706
1703
  return "download";
1707
1704
  }
1708
1705
  }
1709
- const nr = {
1706
+ const sr = {
1710
1707
  dark: "text-white/55",
1711
1708
  light: "text-black/65"
1712
- }, ar = {
1709
+ }, nr = {
1713
1710
  dark: "bg-white/10",
1714
1711
  light: "bg-black/5"
1715
- }, rr = {
1712
+ }, ar = {
1716
1713
  dark: "text-white/85",
1717
1714
  light: "text-black/85"
1718
1715
  }, ws = ({
@@ -1725,16 +1722,16 @@ const nr = {
1725
1722
  activateLabel: o,
1726
1723
  trailingAction: l
1727
1724
  }) => {
1728
- const d = n ?? t ?? "File", m = sr(a, t, r), f = /* @__PURE__ */ s(
1725
+ const d = n ?? t ?? "File", m = tr(a, t, r), f = /* @__PURE__ */ s(
1729
1726
  "div",
1730
1727
  {
1731
- className: y(
1728
+ className: k(
1732
1729
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1733
- ar[e]
1730
+ nr[e]
1734
1731
  ),
1735
1732
  "aria-hidden": !0,
1736
1733
  children: _e(a, {
1737
- className: y("size-6", rr[e]),
1734
+ className: k("size-6", ar[e]),
1738
1735
  weight: "regular"
1739
1736
  })
1740
1737
  }
@@ -1743,9 +1740,9 @@ const nr = {
1743
1740
  m ? /* @__PURE__ */ s(
1744
1741
  "p",
1745
1742
  {
1746
- className: y(
1743
+ className: k(
1747
1744
  "truncate text-xs leading-4",
1748
- nr[e]
1745
+ sr[e]
1749
1746
  ),
1750
1747
  children: m
1751
1748
  }
@@ -1756,7 +1753,7 @@ const nr = {
1756
1753
  type: "button",
1757
1754
  onClick: i,
1758
1755
  "aria-label": o,
1759
- className: y(
1756
+ className: k(
1760
1757
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
1761
1758
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
1762
1759
  ),
@@ -1788,14 +1785,14 @@ async function _s(e, t) {
1788
1785
  }
1789
1786
  }
1790
1787
  }
1791
- const ir = ({
1788
+ const rr = ({
1792
1789
  src: e,
1793
1790
  filename: t,
1794
1791
  fileSize: n,
1795
1792
  mimeType: a,
1796
1793
  title: r,
1797
1794
  items: i
1798
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], lr = ({
1795
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], ir = ({
1799
1796
  variant: e,
1800
1797
  item: t,
1801
1798
  index: n,
@@ -1829,7 +1826,7 @@ const ir = ({
1829
1826
  onClick: m,
1830
1827
  onDismiss: f
1831
1828
  }) => {
1832
- const h = Re(e), g = e === "composer" && !!f, c = ir({
1829
+ const h = Re(e), g = e === "composer" && !!f, c = rr({
1833
1830
  src: t,
1834
1831
  filename: n,
1835
1832
  fileSize: a,
@@ -1848,7 +1845,7 @@ const ir = ({
1848
1845
  const v = /* @__PURE__ */ s(
1849
1846
  "span",
1850
1847
  {
1851
- className: y(
1848
+ className: k(
1852
1849
  "flex size-8 items-center justify-center rounded-full",
1853
1850
  h === "dark" ? "text-white/70" : "text-black/70"
1854
1851
  ),
@@ -1864,7 +1861,7 @@ const ir = ({
1864
1861
  groupPosition: d,
1865
1862
  "data-testid": "file-attachment",
1866
1863
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((x, p) => /* @__PURE__ */ s(
1867
- lr,
1864
+ ir,
1868
1865
  {
1869
1866
  variant: h,
1870
1867
  item: x,
@@ -1876,10 +1873,10 @@ const ir = ({
1876
1873
  )) })
1877
1874
  }
1878
1875
  );
1879
- }, or = (e) => /* @__PURE__ */ s(vt, { ...e, state: "composer" }), cr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "sent" }), dr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "received" }), ur = {
1880
- Composer: or,
1881
- Sent: cr,
1882
- Received: dr
1876
+ }, lr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "composer" }), or = (e) => /* @__PURE__ */ s(vt, { ...e, state: "sent" }), cr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "received" }), dr = {
1877
+ Composer: lr,
1878
+ Sent: or,
1879
+ Received: cr
1883
1880
  }, xt = ({
1884
1881
  onPrev: e,
1885
1882
  onNext: t,
@@ -1923,7 +1920,7 @@ const ir = ({
1923
1920
  }));
1924
1921
  },
1925
1922
  [l, e, t, o]
1926
- ), f = r ?? n !== "pill", g = { className: y(
1923
+ ), f = r ?? n !== "pill", g = { className: k(
1927
1924
  n === "pill" ? "size-4" : "size-5",
1928
1925
  "shrink-0"
1929
1926
  ), weight: "bold" };
@@ -1934,7 +1931,7 @@ const ir = ({
1934
1931
  onClick: m,
1935
1932
  disabled: l,
1936
1933
  "aria-label": a,
1937
- className: y(
1934
+ className: k(
1938
1935
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
1939
1936
  {
1940
1937
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -1974,7 +1971,7 @@ const ir = ({
1974
1971
  onClick: m,
1975
1972
  disabled: l,
1976
1973
  "aria-label": f ? a : void 0,
1977
- className: y(
1974
+ className: k(
1978
1975
  "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",
1979
1976
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
1980
1977
  ),
@@ -2162,7 +2159,7 @@ const ir = ({
2162
2159
  ]
2163
2160
  }
2164
2161
  ) : null;
2165
- }, mr = "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", ks = ({
2162
+ }, ur = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", ks = ({
2166
2163
  tiles: e,
2167
2164
  onTileActivate: t,
2168
2165
  maxVisible: n = 4,
@@ -2171,14 +2168,14 @@ const ir = ({
2171
2168
  const r = e.length;
2172
2169
  if (r === 0) return null;
2173
2170
  const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, f) => {
2174
- const h = y(mr, "h-full w-full");
2171
+ const h = k(ur, "h-full w-full");
2175
2172
  return t ? /* @__PURE__ */ u(
2176
2173
  "button",
2177
2174
  {
2178
2175
  type: "button",
2179
2176
  onClick: () => t(m),
2180
2177
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
2181
- className: y(h, "cursor-zoom-in"),
2178
+ className: k(h, "cursor-zoom-in"),
2182
2179
  children: [
2183
2180
  d.content,
2184
2181
  f
@@ -2190,10 +2187,10 @@ const ir = ({
2190
2187
  f
2191
2188
  ] }, m);
2192
2189
  };
2193
- return i.length === 1 ? /* @__PURE__ */ s("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ s(
2190
+ return i.length === 1 ? /* @__PURE__ */ s("div", { className: k("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ s(
2194
2191
  "div",
2195
2192
  {
2196
- className: y(
2193
+ className: k(
2197
2194
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
2198
2195
  a
2199
2196
  ),
@@ -2202,7 +2199,7 @@ const ir = ({
2202
2199
  ) : i.length === 3 ? /* @__PURE__ */ u(
2203
2200
  "div",
2204
2201
  {
2205
- className: y(
2202
+ className: k(
2206
2203
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
2207
2204
  a
2208
2205
  ),
@@ -2215,7 +2212,7 @@ const ir = ({
2215
2212
  ) : /* @__PURE__ */ s(
2216
2213
  "div",
2217
2214
  {
2218
- className: y(
2215
+ className: k(
2219
2216
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
2220
2217
  a
2221
2218
  ),
@@ -2240,7 +2237,7 @@ const ir = ({
2240
2237
  [e]
2241
2238
  ), o = J(() => n(!1), []);
2242
2239
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
2243
- }, hr = (e, t, n, a) => ({
2240
+ }, mr = (e, t, n, a) => ({
2244
2241
  ariaLabel: `Open image ${t + 1} of ${n}`,
2245
2242
  content: /* @__PURE__ */ s(
2246
2243
  "img",
@@ -2255,7 +2252,7 @@ const ir = ({
2255
2252
  className: "absolute inset-0 size-full rounded-md object-cover"
2256
2253
  }
2257
2254
  )
2258
- }), fr = ({
2255
+ }), hr = ({
2259
2256
  src: e,
2260
2257
  alt: t,
2261
2258
  items: n
@@ -2263,7 +2260,7 @@ const ir = ({
2263
2260
  src: n.src,
2264
2261
  alt: n.alt,
2265
2262
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2266
- })), gr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2263
+ })), fr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2267
2264
  const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Le(
2268
2265
  r
2269
2266
  );
@@ -2310,13 +2307,13 @@ const ir = ({
2310
2307
  loading: l = "lazy",
2311
2308
  onClick: d
2312
2309
  }) => {
2313
- const m = fr({ src: t, alt: n, items: r }), f = Re(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Le(
2310
+ const m = hr({ src: t, alt: n, items: r }), f = Re(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Le(
2314
2311
  d
2315
2312
  );
2316
2313
  if (m.length === 0)
2317
2314
  return null;
2318
2315
  const v = m.map(
2319
- (x, p) => hr(x, p, m.length, l)
2316
+ (x, p) => mr(x, p, m.length, l)
2320
2317
  );
2321
2318
  return /* @__PURE__ */ u(
2322
2319
  Me,
@@ -2339,11 +2336,11 @@ const ir = ({
2339
2336
  ]
2340
2337
  }
2341
2338
  );
2342
- }, pr = (e) => /* @__PURE__ */ s(gr, { ...e }), br = (e) => /* @__PURE__ */ s(Ss, { ...e, state: "sent" }), vr = (e) => /* @__PURE__ */ s(Ss, { ...e, state: "received" }), xr = {
2343
- Composer: pr,
2344
- Sent: br,
2345
- Received: vr
2346
- }, wr = ({
2339
+ }, gr = (e) => /* @__PURE__ */ s(fr, { ...e }), pr = (e) => /* @__PURE__ */ s(Ss, { ...e, state: "sent" }), br = (e) => /* @__PURE__ */ s(Ss, { ...e, state: "received" }), vr = {
2340
+ Composer: gr,
2341
+ Sent: pr,
2342
+ Received: br
2343
+ }, xr = ({
2347
2344
  open: e,
2348
2345
  items: t,
2349
2346
  initialIndex: n = 0,
@@ -2357,7 +2354,7 @@ const ir = ({
2357
2354
  () => (l == null ? void 0 : l.filename) ?? (l ? ie(l.src) : "document"),
2358
2355
  [l]
2359
2356
  ), m = re(
2360
- () => l ? _r(l.src) : void 0,
2357
+ () => l ? wr(l.src) : void 0,
2361
2358
  [l]
2362
2359
  );
2363
2360
  return !l || !m ? null : /* @__PURE__ */ u(
@@ -2391,16 +2388,16 @@ const ir = ({
2391
2388
  ]
2392
2389
  }
2393
2390
  );
2394
- }, _r = (e) => {
2391
+ }, wr = (e) => {
2395
2392
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2396
2393
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2397
- }, Nr = ({
2394
+ }, _r = ({
2398
2395
  src: e,
2399
2396
  filename: t,
2400
2397
  fileSize: n,
2401
2398
  title: a,
2402
2399
  items: r
2403
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], yr = ({
2400
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Nr = ({
2404
2401
  variant: e,
2405
2402
  item: t,
2406
2403
  index: n,
@@ -2433,7 +2430,7 @@ const ir = ({
2433
2430
  onClick: d,
2434
2431
  onDismiss: m
2435
2432
  }) => {
2436
- const f = Re(e), h = Nr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: v } = Le(
2433
+ const f = Re(e), h = _r({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: v } = Le(
2437
2434
  d
2438
2435
  ), x = e === "composer" && !!m;
2439
2436
  if (h.length === 0)
@@ -2451,18 +2448,18 @@ const ir = ({
2451
2448
  "data-testid": "pdf-attachment",
2452
2449
  children: [
2453
2450
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((_, w) => {
2454
- const k = _.filename ?? ie(_.src), D = x && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2451
+ const C = _.filename ?? ie(_.src), D = x && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2455
2452
  Ns,
2456
2453
  {
2457
2454
  url: _.src,
2458
- filename: k,
2455
+ filename: C,
2459
2456
  variant: "inline",
2460
- label: `Download ${k}`,
2457
+ label: `Download ${C}`,
2461
2458
  tone: f
2462
2459
  }
2463
2460
  );
2464
2461
  return /* @__PURE__ */ s(
2465
- yr,
2462
+ Nr,
2466
2463
  {
2467
2464
  variant: f,
2468
2465
  item: _,
@@ -2474,7 +2471,7 @@ const ir = ({
2474
2471
  );
2475
2472
  }) }),
2476
2473
  /* @__PURE__ */ s(
2477
- wr,
2474
+ xr,
2478
2475
  {
2479
2476
  open: g,
2480
2477
  items: p,
@@ -2485,10 +2482,10 @@ const ir = ({
2485
2482
  ]
2486
2483
  }
2487
2484
  );
2488
- }, kr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "composer" }), Cr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "received" }), Er = {
2489
- Composer: kr,
2490
- Sent: Cr,
2491
- Received: Sr
2485
+ }, yr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "composer" }), kr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "sent" }), Cr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "received" }), Sr = {
2486
+ Composer: yr,
2487
+ Sent: kr,
2488
+ Received: Cr
2492
2489
  }, Es = ({
2493
2490
  open: e,
2494
2491
  items: t,
@@ -2539,7 +2536,7 @@ const ir = ({
2539
2536
  ]
2540
2537
  }
2541
2538
  ) : null;
2542
- }, Ir = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Is = ({
2539
+ }, Er = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Is = ({
2543
2540
  item: e,
2544
2541
  index: t
2545
2542
  }) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2561,11 +2558,11 @@ const ir = ({
2561
2558
  "aria-hidden": !0
2562
2559
  }
2563
2560
  ) }),
2564
- /* @__PURE__ */ s(Ir, {})
2565
- ] }), Tr = (e, t, n) => ({
2561
+ /* @__PURE__ */ s(Er, {})
2562
+ ] }), Ir = (e, t, n) => ({
2566
2563
  ariaLabel: `Play video ${t + 1} of ${n}`,
2567
2564
  content: /* @__PURE__ */ s(Is, { item: e, index: t })
2568
- }), Mr = ({
2565
+ }), Tr = ({
2569
2566
  src: e,
2570
2567
  poster: t,
2571
2568
  mimeType: n,
@@ -2577,7 +2574,7 @@ const ir = ({
2577
2574
  mimeType: n.mimeType,
2578
2575
  preload: n.preload,
2579
2576
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2580
- })), Ar = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2577
+ })), Mr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2581
2578
  const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: f } = Le(
2582
2579
  i
2583
2580
  );
@@ -2618,13 +2615,13 @@ const ir = ({
2618
2615
  preload: d,
2619
2616
  onClick: m
2620
2617
  }) => {
2621
- const f = Mr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Re(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: v } = Le(
2618
+ const f = Tr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Re(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: v } = Le(
2622
2619
  m
2623
2620
  );
2624
2621
  if (f.length === 0)
2625
2622
  return null;
2626
2623
  const x = f.map(
2627
- (p, _) => Tr(p, _, f.length)
2624
+ (p, _) => Ir(p, _, f.length)
2628
2625
  );
2629
2626
  return /* @__PURE__ */ u(
2630
2627
  Me,
@@ -2654,31 +2651,31 @@ const ir = ({
2654
2651
  ]
2655
2652
  }
2656
2653
  );
2657
- }, Rr = (e) => /* @__PURE__ */ s(Ar, { ...e }), Lr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "sent" }), Dr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "received" }), zr = {
2658
- Composer: Rr,
2659
- Sent: Lr,
2660
- Received: Dr
2654
+ }, Ar = (e) => /* @__PURE__ */ s(Mr, { ...e }), Rr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "sent" }), Lr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "received" }), Dr = {
2655
+ Composer: Ar,
2656
+ Sent: Rr,
2657
+ Received: Lr
2661
2658
  }, ke = {
2662
- Image: xr,
2663
- Video: zr,
2664
- Audio: Ja,
2665
- Pdf: Er,
2666
- File: ur
2667
- }, Fr = {
2659
+ Image: vr,
2660
+ Video: Dr,
2661
+ Audio: Za,
2662
+ Pdf: Sr,
2663
+ File: dr
2664
+ }, zr = {
2668
2665
  isUnlocking: () => !1
2669
- }, Pr = {
2670
- LockedAttachment: Fr
2671
- }, As = ct({}), gl = As.Provider;
2672
- function Or(e) {
2673
- return Te(As)[e] ?? Pr[e];
2666
+ }, Fr = {
2667
+ LockedAttachment: zr
2668
+ }, As = ct({}), fl = As.Provider;
2669
+ function Pr(e) {
2670
+ return Te(As)[e] ?? Fr[e];
2674
2671
  }
2675
- const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import("./Card-CKM_PULl.js")), Br = () => /* @__PURE__ */ s(
2672
+ const Or = V.lazy(() => import("./Card-qS17qnN0.js")), $r = V.lazy(() => import("./Card-B-Sn9hc8.js")), Ur = () => /* @__PURE__ */ s(
2676
2673
  "div",
2677
2674
  {
2678
2675
  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)]",
2679
2676
  "aria-hidden": !0
2680
2677
  }
2681
- ), Pe = (e) => /* @__PURE__ */ s(Gs, { fallback: /* @__PURE__ */ s(Br, {}), children: e.contentType === "text" ? /* @__PURE__ */ s($r, { ...e }) : /* @__PURE__ */ s(Ur, { ...e }) }), jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2678
+ ), Pe = (e) => /* @__PURE__ */ s(Gs, { fallback: /* @__PURE__ */ s(Ur, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(Or, { ...e }) : /* @__PURE__ */ s($r, { ...e }) }), Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2682
2679
  "svg",
2683
2680
  {
2684
2681
  width: e,
@@ -2695,10 +2692,10 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2695
2692
  }
2696
2693
  )
2697
2694
  }
2698
- ), Vr = (e) => {
2695
+ ), jr = (e) => {
2699
2696
  var t;
2700
2697
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2701
- }, Gr = (e) => {
2698
+ }, Vr = (e) => {
2702
2699
  var t;
2703
2700
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2704
2701
  }, Ue = (e) => {
@@ -2707,13 +2704,13 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2707
2704
  }, yt = (e) => {
2708
2705
  var t;
2709
2706
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2710
- }, Hr = (e) => {
2707
+ }, Gr = (e) => {
2711
2708
  var t;
2712
2709
  return yt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
2713
- }, Yr = (e) => {
2710
+ }, Hr = (e) => {
2714
2711
  var t;
2715
2712
  return yt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2716
- }, Rs = (e) => Vr(e) || Gr(e), qr = (e) => {
2713
+ }, Rs = (e) => jr(e) || Vr(e), Yr = (e) => {
2717
2714
  var t;
2718
2715
  return Rs(e) && !((t = e.text) != null && t.trim());
2719
2716
  }, Qe = ({
@@ -2739,7 +2736,7 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2739
2736
  "message-chatbot-indicator",
2740
2737
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2741
2738
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2742
- ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(jr, { size: o ? 12 : 15 }) });
2739
+ ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Br, { size: o ? 12 : 15 }) });
2743
2740
  return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ u(se, { children: [
2744
2741
  m,
2745
2742
  f
@@ -2747,7 +2744,7 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2747
2744
  f,
2748
2745
  m
2749
2746
  ] }) });
2750
- }, Wr = ({
2747
+ }, qr = ({
2751
2748
  selected: e,
2752
2749
  onVoteUp: t,
2753
2750
  onVoteDown: n
@@ -2756,7 +2753,7 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2756
2753
  "button",
2757
2754
  {
2758
2755
  type: "button",
2759
- className: y("message-vote-button focus-ring", {
2756
+ className: k("message-vote-button focus-ring", {
2760
2757
  "message-vote-button--selected": e === "up"
2761
2758
  }),
2762
2759
  onClick: t,
@@ -2770,7 +2767,7 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2770
2767
  "button",
2771
2768
  {
2772
2769
  type: "button",
2773
- className: y("message-vote-button focus-ring", {
2770
+ className: k("message-vote-button focus-ring", {
2774
2771
  "message-vote-button--selected": e === "down"
2775
2772
  }),
2776
2773
  onClick: n,
@@ -2793,33 +2790,33 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2793
2790
  /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2794
2791
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2795
2792
  ] });
2796
- }, Xr = () => null, Kr = () => /* @__PURE__ */ s(
2793
+ }, Wr = () => null, Xr = () => /* @__PURE__ */ s(
2797
2794
  Xs,
2798
2795
  {
2799
2796
  MessageSentStatus: et,
2800
2797
  MessageDeliveredStatus: et,
2801
2798
  MessageReadStatus: et,
2802
- MessageSendingStatus: Xr
2799
+ MessageSendingStatus: Wr
2803
2800
  }
2804
- ), Zr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2801
+ ), Kr = /^([a-z][a-z0-9+.-]*):/i, Zr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2805
2802
  function kt(e) {
2806
2803
  if (typeof e != "string") return;
2807
2804
  const t = e.trim();
2808
2805
  if (t === "") return;
2809
- const n = Zr.exec(t);
2806
+ const n = Kr.exec(t);
2810
2807
  if (n) {
2811
2808
  const a = n[1].toLowerCase();
2812
- return Jr.has(a) ? t : void 0;
2809
+ return Zr.has(a) ? t : void 0;
2813
2810
  }
2814
2811
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2815
2812
  }
2816
- const Qr = {
2813
+ const Jr = {
2817
2814
  dark: "bg-white text-[#121110] hover:bg-white/90",
2818
2815
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2819
- }, ei = ({ variant: e, cta: t }) => {
2820
- const n = y(
2816
+ }, Qr = ({ variant: e, cta: t }) => {
2817
+ const n = k(
2821
2818
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2822
- Qr[e]
2819
+ Jr[e]
2823
2820
  ), a = kt(t.href);
2824
2821
  return a ? /* @__PURE__ */ s(
2825
2822
  "a",
@@ -2846,10 +2843,10 @@ const Qr = {
2846
2843
  children: t.label
2847
2844
  }
2848
2845
  );
2849
- }, ti = {
2846
+ }, ei = {
2850
2847
  dark: "text-white",
2851
2848
  light: "text-black/90"
2852
- }, si = "text-white/30", ni = {
2849
+ }, ti = "text-white/30", si = {
2853
2850
  dark: "text-white/55",
2854
2851
  light: "text-black/55"
2855
2852
  }, Ct = ({
@@ -2864,12 +2861,12 @@ const Qr = {
2864
2861
  }) => {
2865
2862
  const d = e === "dark", m = t ?? (d ? n : void 0) ?? "", f = m.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", b = o != null;
2866
2863
  if (!f && !h && !c && !b) return null;
2867
- const x = y(
2864
+ const x = k(
2868
2865
  "truncate text-base font-medium leading-6",
2869
- d && !t ? si : ti[e]
2870
- ), p = y(
2866
+ d && !t ? ti : ei[e]
2867
+ ), p = k(
2871
2868
  "truncate text-xs leading-4",
2872
- ni[e]
2869
+ si[e]
2873
2870
  );
2874
2871
  return /* @__PURE__ */ u("div", { className: "px-4 py-3", children: [
2875
2872
  /* @__PURE__ */ u("div", { className: "flex items-end gap-3", children: [
@@ -2877,7 +2874,7 @@ const Qr = {
2877
2874
  /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1", children: [
2878
2875
  f && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
2879
2876
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
2880
- /* @__PURE__ */ s("p", { className: y("min-w-0", x), children: m })
2877
+ /* @__PURE__ */ s("p", { className: k("min-w-0", x), children: m })
2881
2878
  ] }),
2882
2879
  h && /* @__PURE__ */ s("p", { className: p, children: a })
2883
2880
  ] }),
@@ -2885,9 +2882,9 @@ const Qr = {
2885
2882
  ] }),
2886
2883
  l && /* @__PURE__ */ s("div", { className: "shrink-0", children: l })
2887
2884
  ] }),
2888
- o && /* @__PURE__ */ s(ei, { variant: e, cta: o })
2885
+ o && /* @__PURE__ */ s(Qr, { variant: e, cta: o })
2889
2886
  ] });
2890
- }, ai = y(
2887
+ }, ni = k(
2891
2888
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2892
2889
  // 1px hairline border that sits flush with the card chrome — matches
2893
2890
  // the messaging design system's "small border around link attachments"
@@ -2905,8 +2902,8 @@ const Qr = {
2905
2902
  bgClassName: l,
2906
2903
  "data-testid": d
2907
2904
  }) => {
2908
- const m = n != null || a != null, f = y(
2909
- ai,
2905
+ const m = n != null || a != null, f = k(
2906
+ ni,
2910
2907
  l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
2911
2908
  // `focus-ring` is a design-system utility from the component-library
2912
2909
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2936,7 +2933,7 @@ const Qr = {
2936
2933
  onClick: a,
2937
2934
  "aria-label": r,
2938
2935
  "data-testid": d,
2939
- className: y(f, "text-left"),
2936
+ className: k(f, "text-left"),
2940
2937
  children: [
2941
2938
  t,
2942
2939
  h
@@ -2954,10 +2951,10 @@ const Qr = {
2954
2951
  ]
2955
2952
  }
2956
2953
  );
2957
- }, ri = {
2954
+ }, ai = {
2958
2955
  dark: "bg-white/10",
2959
2956
  light: "bg-black/5"
2960
- }, ii = {
2957
+ }, ri = {
2961
2958
  dark: "size-16 text-white/25",
2962
2959
  light: "size-16 text-black/25"
2963
2960
  }, Ye = (e, t) => !!t && !!e && ce(e) === "audio", St = (e, t) => {
@@ -2986,7 +2983,7 @@ const Qr = {
2986
2983
  ) }) : /* @__PURE__ */ u(
2987
2984
  "div",
2988
2985
  {
2989
- className: y(
2986
+ className: k(
2990
2987
  "relative h-[180px] w-full overflow-hidden",
2991
2988
  d && "bg-black"
2992
2989
  ),
@@ -3013,12 +3010,12 @@ const Qr = {
3013
3010
  ) : /* @__PURE__ */ s(
3014
3011
  "div",
3015
3012
  {
3016
- className: y(
3013
+ className: k(
3017
3014
  "flex h-full w-full items-center justify-center",
3018
- ri[e]
3015
+ ai[e]
3019
3016
  ),
3020
3017
  children: _e(r, {
3021
- className: ii[e],
3018
+ className: ri[e],
3022
3019
  weight: "regular"
3023
3020
  })
3024
3021
  }
@@ -3028,7 +3025,7 @@ const Qr = {
3028
3025
  ]
3029
3026
  }
3030
3027
  );
3031
- }, li = ({
3028
+ }, ii = ({
3032
3029
  title: e,
3033
3030
  placeholderTitle: t,
3034
3031
  description: n,
@@ -3105,7 +3102,7 @@ const Qr = {
3105
3102
  ]
3106
3103
  }
3107
3104
  );
3108
- }, oi = ({
3105
+ }, li = ({
3109
3106
  title: e,
3110
3107
  description: t,
3111
3108
  url: n,
@@ -3158,7 +3155,7 @@ const Qr = {
3158
3155
  ]
3159
3156
  }
3160
3157
  );
3161
- }, ci = ({
3158
+ }, oi = ({
3162
3159
  title: e,
3163
3160
  placeholderTitle: t,
3164
3161
  description: n,
@@ -3206,9 +3203,9 @@ const Qr = {
3206
3203
  }
3207
3204
  );
3208
3205
  }, Jt = {
3209
- Composer: li,
3210
- Sent: ci,
3211
- Received: oi
3206
+ Composer: ii,
3207
+ Sent: oi,
3208
+ Received: li
3212
3209
  };
3213
3210
  function z(e) {
3214
3211
  const t = e == null ? void 0 : e.trim();
@@ -3217,7 +3214,7 @@ function z(e) {
3217
3214
  function Qt(e) {
3218
3215
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3219
3216
  }
3220
- function di(e, t) {
3217
+ function ci(e, t) {
3221
3218
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3222
3219
  return !1;
3223
3220
  const n = Qt(e), a = Qt(t);
@@ -3242,7 +3239,7 @@ function es(e) {
3242
3239
  mimeType: r
3243
3240
  };
3244
3241
  }
3245
- function ui(e) {
3242
+ function di(e) {
3246
3243
  var t;
3247
3244
  return Ls(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3248
3245
  }
@@ -3272,21 +3269,21 @@ function Ds(e) {
3272
3269
  a(r);
3273
3270
  continue;
3274
3271
  }
3275
- const i = ui(r);
3272
+ const i = di(r);
3276
3273
  i && n(i, r);
3277
3274
  }
3278
3275
  return t;
3279
3276
  }
3280
- function mi(e) {
3277
+ function ui(e) {
3281
3278
  return e.filter((t) => t.type === "media").length;
3282
3279
  }
3283
- function hi(e, t, n) {
3280
+ function mi(e, t, n) {
3284
3281
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3285
3282
  }
3286
3283
  function ts(e) {
3287
3284
  return z(e.image_url) ?? z(e.asset_url) ?? "";
3288
3285
  }
3289
- function fi(e) {
3286
+ function hi(e) {
3290
3287
  switch (e) {
3291
3288
  case "image":
3292
3289
  return ke.Image;
@@ -3300,7 +3297,7 @@ function fi(e) {
3300
3297
  return ke.File;
3301
3298
  }
3302
3299
  }
3303
- function gi(e, t) {
3300
+ function fi(e, t) {
3304
3301
  if (t.length > 1)
3305
3302
  switch (e) {
3306
3303
  case "image":
@@ -3387,18 +3384,18 @@ function gi(e, t) {
3387
3384
  };
3388
3385
  }
3389
3386
  }
3390
- function pi({
3387
+ function gi({
3391
3388
  groupPosition: e,
3392
3389
  isMyMessage: t,
3393
3390
  segment: n
3394
3391
  }) {
3395
- const a = fi(n.kind), r = {
3396
- ...gi(n.kind, n.attachments),
3392
+ const a = hi(n.kind), r = {
3393
+ ...fi(n.kind, n.attachments),
3397
3394
  groupPosition: e
3398
3395
  };
3399
3396
  return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
3400
3397
  }
3401
- const bi = ({
3398
+ const pi = ({
3402
3399
  groupPosition: e,
3403
3400
  isMyMessage: t,
3404
3401
  message: n,
@@ -3407,7 +3404,7 @@ const bi = ({
3407
3404
  var b;
3408
3405
  const r = Ds(n.attachments);
3409
3406
  if (r.length === 0) return null;
3410
- const i = mi(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? es(l.attachments[0] ?? {}).url : void 0, m = o && di(o, d) ? void 0 : o;
3407
+ const i = ui(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? es(l.attachments[0] ?? {}).url : void 0, m = o && ci(o, d) ? void 0 : o;
3411
3408
  let f = 0;
3412
3409
  const h = [], g = (v, x) => {
3413
3410
  const p = t ? Jt.Sent : Jt.Received;
@@ -3415,14 +3412,14 @@ const bi = ({
3415
3412
  /* @__PURE__ */ s(p, { ...es(v) }, x)
3416
3413
  );
3417
3414
  }, c = (v, x) => {
3418
- const p = hi(
3415
+ const p = mi(
3419
3416
  f,
3420
3417
  i,
3421
3418
  e
3422
3419
  );
3423
3420
  f += 1, h.push(
3424
3421
  /* @__PURE__ */ s(
3425
- pi,
3422
+ gi,
3426
3423
  {
3427
3424
  groupPosition: p,
3428
3425
  isMyMessage: t,
@@ -3469,7 +3466,7 @@ const bi = ({
3469
3466
  /* @__PURE__ */ s(nt, {})
3470
3467
  ] }) : null
3471
3468
  ] });
3472
- }, vi = (e) => {
3469
+ }, bi = (e) => {
3473
3470
  var Dt, zt, Ft, Pt, Ot, $t, Ut, Bt, jt, Vt;
3474
3471
  const {
3475
3472
  additionalMessageInputProps: t,
@@ -3488,8 +3485,8 @@ const bi = ({
3488
3485
  renderText: b,
3489
3486
  threadList: v,
3490
3487
  viewerLanguage: x
3491
- } = e, { client: p } = fe("CustomMessage"), { channel: _ } = oe("CustomMessage"), { isUnlocking: w, onUnlockClick: k, onFetchSource: D, onDownloadClick: S } = Or("LockedAttachment"), [R, O] = B(!1), F = Zs(c.id), { selected: L, voteUp: C, voteDown: E } = xa(c), {
3492
- Attachment: I = Js,
3488
+ } = e, { client: p } = fe("CustomMessage"), { channel: _ } = oe("CustomMessage"), { isUnlocking: w, onUnlockClick: C, onFetchSource: D, onDownloadClick: E } = Pr("LockedAttachment"), [R, O] = B(!1), F = Zs(c.id), { selected: L, voteUp: S, voteDown: I } = va(c), {
3489
+ Attachment: y = Js,
3493
3490
  EditMessageModal: T = Qs,
3494
3491
  MessageActions: M,
3495
3492
  MessageBlocked: P = en,
@@ -3517,7 +3514,7 @@ const bi = ({
3517
3514
  }, [c, x]), de = W.length > 0, De = W.reduce(
3518
3515
  (me, be) => me + be.attachments.length,
3519
3516
  0
3520
- ) === ((U == null ? void 0 : U.length) ?? 0), ze = Ya({
3517
+ ) === ((U == null ? void 0 : U.length) ?? 0), ze = Ha({
3521
3518
  endOfGroup: r,
3522
3519
  firstOfGroup: i,
3523
3520
  groupedByUser: o
@@ -3531,7 +3528,7 @@ const bi = ({
3531
3528
  const ae = !v && !!c.reply_count, ue = !v && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((Dt = c.error) == null ? void 0 : Dt.status) !== 403, Tt = mn(c);
3532
3529
  let ge;
3533
3530
  le ? ge = () => m(c) : Tt && (ge = () => O(!0));
3534
- const te = g(), Us = y(
3531
+ const te = g(), Us = k(
3535
3532
  "str-chat__message str-chat__message-simple",
3536
3533
  `str-chat__message--${c.type}`,
3537
3534
  `str-chat__message--${c.status}`,
@@ -3548,7 +3545,7 @@ const bi = ({
3548
3545
  "str-chat__virtual-message__wrapper--first": i,
3549
3546
  "str-chat__virtual-message__wrapper--group": o
3550
3547
  }
3551
- ), qe = c.poll_id && p.polls.fromState(c.poll_id), Mt = qr(c), pe = Ue(c), Bs = yt(c), We = !!(U != null && U.length && !c.quoted_message), At = pe && te && We, js = de && De && !c.quoted_message && !qe && !Y && !pe, Rt = {
3548
+ ), qe = c.poll_id && p.polls.fromState(c.poll_id), Mt = Yr(c), pe = Ue(c), Bs = yt(c), We = !!(U != null && U.length && !c.quoted_message), At = pe && te && We, js = de && De && !c.quoted_message && !qe && !Y && !pe, Rt = {
3552
3549
  contentType: "text",
3553
3550
  amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
3554
3551
  paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
@@ -3602,7 +3599,7 @@ const bi = ({
3602
3599
  /* @__PURE__ */ s(
3603
3600
  "div",
3604
3601
  {
3605
- className: y("str-chat__message-inner", {
3602
+ className: k("str-chat__message-inner", {
3606
3603
  "str-chat__simple-message--error-failed": le || Tt
3607
3604
  }),
3608
3605
  "data-testid": "message-inner",
@@ -3616,7 +3613,7 @@ const bi = ({
3616
3613
  marginInlineEnd: 0,
3617
3614
  marginInlineStart: 0
3618
3615
  },
3619
- children: Mt ? /* @__PURE__ */ s(Qe, { message: c, standalone: !0 }) : Hr(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3616
+ children: Mt ? /* @__PURE__ */ s(Qe, { message: c, standalone: !0 }) : Gr(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3620
3617
  te && M && /* @__PURE__ */ s(M, {}),
3621
3618
  te ? /* @__PURE__ */ s(
3622
3619
  Pe,
@@ -3630,11 +3627,11 @@ const bi = ({
3630
3627
  ...Rt,
3631
3628
  isMine: !1,
3632
3629
  isUnlocking: w(c.id),
3633
- onUnlockClick: () => k == null ? void 0 : k(c, _)
3630
+ onUnlockClick: () => C == null ? void 0 : C(c, _)
3634
3631
  }
3635
3632
  ),
3636
3633
  !te && M && /* @__PURE__ */ s(M, {})
3637
- ] }) }) : Yr(c) ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3634
+ ] }) }) : Hr(c) ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3638
3635
  /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3639
3636
  te && M && /* @__PURE__ */ s(M, {}),
3640
3637
  te ? /* @__PURE__ */ s(
@@ -3642,7 +3639,7 @@ const bi = ({
3642
3639
  {
3643
3640
  ...Lt,
3644
3641
  isMine: !0,
3645
- onPreviewClick: () => k ? k(c, _) : void 0
3642
+ onPreviewClick: () => C ? C(c, _) : void 0
3646
3643
  }
3647
3644
  ) : /* @__PURE__ */ s(
3648
3645
  Pe,
@@ -3650,8 +3647,8 @@ const bi = ({
3650
3647
  ...Lt,
3651
3648
  isMine: !1,
3652
3649
  isUnlocking: w(c.id),
3653
- onUnlockClick: () => k ? k(c, _) : void 0,
3654
- onDownloadClick: () => S ? S(c, _) : void 0
3650
+ onUnlockClick: () => C ? C(c, _) : void 0,
3651
+ onDownloadClick: () => E ? E(c, _) : void 0
3655
3652
  }
3656
3653
  ),
3657
3654
  !te && M && /* @__PURE__ */ s(M, {})
@@ -3664,7 +3661,7 @@ const bi = ({
3664
3661
  }
3665
3662
  ) })
3666
3663
  ] }) : js ? /* @__PURE__ */ s(
3667
- bi,
3664
+ pi,
3668
3665
  {
3669
3666
  groupPosition: ze,
3670
3667
  isMyMessage: te,
@@ -3689,7 +3686,7 @@ const bi = ({
3689
3686
  ),
3690
3687
  qe && /* @__PURE__ */ s(fn, { poll: qe }),
3691
3688
  U != null && U.length && !c.quoted_message ? /* @__PURE__ */ s(
3692
- I,
3689
+ y,
3693
3690
  {
3694
3691
  actionHandler: l,
3695
3692
  attachments: U
@@ -3722,15 +3719,15 @@ const bi = ({
3722
3719
  }
3723
3720
  ),
3724
3721
  n && pe && /* @__PURE__ */ s(
3725
- Wr,
3722
+ qr,
3726
3723
  {
3727
3724
  selected: L,
3728
- onVoteUp: C,
3729
- onVoteDown: E
3725
+ onVoteUp: S,
3726
+ onVoteDown: I
3730
3727
  }
3731
3728
  )
3732
3729
  ] }),
3733
- /* @__PURE__ */ s(Kr, {}),
3730
+ /* @__PURE__ */ s(Xr, {}),
3734
3731
  ae && /* @__PURE__ */ s(
3735
3732
  ee,
3736
3733
  {
@@ -3744,13 +3741,13 @@ const bi = ({
3744
3741
  c.id
3745
3742
  )
3746
3743
  ] });
3747
- }, xi = V.memo(
3748
- vi,
3744
+ }, vi = V.memo(
3745
+ bi,
3749
3746
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
3750
- ), wi = (e) => {
3747
+ ), xi = (e) => {
3751
3748
  const t = Ne("CustomMessage");
3752
- return /* @__PURE__ */ s(xi, { ...t, ...e });
3753
- }, _i = () => {
3749
+ return /* @__PURE__ */ s(vi, { ...t, ...e });
3750
+ }, wi = () => {
3754
3751
  var n;
3755
3752
  const { handleDelete: e, message: t } = Ne("CustomMessageActions");
3756
3753
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
@@ -3763,7 +3760,7 @@ const bi = ({
3763
3760
  children: /* @__PURE__ */ s(Jn, { size: 16, weight: "light", "aria-hidden": !0 })
3764
3761
  }
3765
3762
  );
3766
- }, Ni = () => {
3763
+ }, _i = () => {
3767
3764
  const { handleFlag: e } = Ne("CustomMessageActions");
3768
3765
  return /* @__PURE__ */ s(
3769
3766
  cs,
@@ -3775,19 +3772,19 @@ const bi = ({
3775
3772
  children: /* @__PURE__ */ s(is, { size: 16, weight: "light", "aria-hidden": !0 })
3776
3773
  }
3777
3774
  );
3778
- }, yi = () => {
3775
+ }, Ni = () => {
3779
3776
  var t;
3780
3777
  const { message: e } = Ne("CustomMessageActions");
3781
3778
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3782
3779
  ta,
3783
3780
  {
3784
3781
  messageActionSet: [
3785
- { Component: _i, placement: "quick", type: "delete" },
3786
- { Component: Ni, placement: "quick", type: "flag" }
3782
+ { Component: wi, placement: "quick", type: "delete" },
3783
+ { Component: _i, placement: "quick", type: "flag" }
3787
3784
  ]
3788
3785
  }
3789
3786
  );
3790
- }, ki = ({
3787
+ }, yi = ({
3791
3788
  link: e,
3792
3789
  onDismiss: t
3793
3790
  }) => {
@@ -3827,14 +3824,14 @@ const bi = ({
3827
3824
  ]
3828
3825
  }
3829
3826
  );
3830
- }, Ci = (e) => ({
3827
+ }, ki = (e) => ({
3831
3828
  linkPreviews: Array.from(e.previews.values()).filter(
3832
3829
  (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3833
3830
  )
3834
- }), Si = () => {
3831
+ }), Ci = () => {
3835
3832
  const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3836
3833
  e.state,
3837
- Ci
3834
+ ki
3838
3835
  ), n = (r) => {
3839
3836
  e.dismissPreview(r);
3840
3837
  };
@@ -3847,9 +3844,9 @@ const bi = ({
3847
3844
  // block so it keeps its intrinsic height and the container scrolls — a
3848
3845
  // bare flex-column child would be shrunk on the column axis and its
3849
3846
  // fixed-height hero would spill out of the collapsed card box.
3850
- /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(ki, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3847
+ /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(yi, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3851
3848
  ) : null;
3852
- }, It = V.createContext(!1), pl = () => Te(It), Ei = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3849
+ }, It = V.createContext(!1), gl = () => Te(It), Si = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3853
3850
  "button",
3854
3851
  {
3855
3852
  ...n,
@@ -3859,9 +3856,9 @@ const bi = ({
3859
3856
  onClick: e,
3860
3857
  children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3861
3858
  }
3862
- ), Ii = () => {
3859
+ ), Ei = () => {
3863
3860
  const e = Te(It), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3864
- SendButton: r = Ei,
3861
+ SendButton: r = Si,
3865
3862
  AttachmentPreviewList: i = wn
3866
3863
  } = rs("CustomMessageInput");
3867
3864
  return (
@@ -3880,7 +3877,7 @@ const bi = ({
3880
3877
  "data-dd-privacy": "mask",
3881
3878
  children: [
3882
3879
  /* @__PURE__ */ s(_n, {}),
3883
- /* @__PURE__ */ s(Si, {}),
3880
+ /* @__PURE__ */ s(Ci, {}),
3884
3881
  /* @__PURE__ */ s(i, {}),
3885
3882
  /* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
3886
3883
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
@@ -3911,7 +3908,7 @@ const bi = ({
3911
3908
  }
3912
3909
  )
3913
3910
  );
3914
- }, Ti = ({
3911
+ }, Ii = ({
3915
3912
  renderActions: e,
3916
3913
  renderFooter: t,
3917
3914
  disabled: n = !1,
@@ -3932,23 +3929,23 @@ const bi = ({
3932
3929
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3933
3930
  children: [
3934
3931
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3935
- /* @__PURE__ */ s(It.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ii }) })
3932
+ /* @__PURE__ */ s(It.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ei }) })
3936
3933
  ]
3937
3934
  }
3938
3935
  ),
3939
3936
  t == null ? void 0 : t()
3940
3937
  ] });
3941
- }, Mi = [
3938
+ }, Ti = [
3942
3939
  "SYSTEM_DM_AGENT_PAUSED",
3943
3940
  "SYSTEM_DM_AGENT_RESUMED"
3944
- ], Ai = {
3941
+ ], Mi = {
3945
3942
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3946
3943
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3947
- }, Ri = [
3944
+ }, Ai = [
3948
3945
  "SYSTEM_AGE_SAFETY_BLOCKED"
3949
- ], Li = {
3946
+ ], Ri = {
3950
3947
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3951
- }, tt = "age safety guidelines.", Di = "https://linktr.ee/s/about/contact", ss = (e) => Mi.includes(e), zi = (e) => Ri.includes(e), Fi = (e) => {
3948
+ }, tt = "age safety guidelines.", Li = "https://linktr.ee/s/about/contact", ss = (e) => Ti.includes(e), Di = (e) => Ai.includes(e), zi = (e) => {
3952
3949
  var a;
3953
3950
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3954
3951
  if (ss(t))
@@ -3956,7 +3953,7 @@ const bi = ({
3956
3953
  kind: "dm-agent",
3957
3954
  type: t
3958
3955
  };
3959
- if (zi(t))
3956
+ if (Di(t))
3960
3957
  return {
3961
3958
  kind: "age-safety",
3962
3959
  type: t
@@ -3967,7 +3964,7 @@ const bi = ({
3967
3964
  kind: "dm-agent",
3968
3965
  type: n
3969
3966
  };
3970
- }, Pi = (e) => {
3967
+ }, Fi = (e) => {
3971
3968
  const t = e.indexOf(tt);
3972
3969
  if (t === -1)
3973
3970
  return e;
@@ -3977,7 +3974,7 @@ const bi = ({
3977
3974
  /* @__PURE__ */ s(
3978
3975
  "a",
3979
3976
  {
3980
- href: Di,
3977
+ href: Li,
3981
3978
  target: "_blank",
3982
3979
  rel: "noopener noreferrer",
3983
3980
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -3986,13 +3983,13 @@ const bi = ({
3986
3983
  ),
3987
3984
  e.slice(n)
3988
3985
  ] });
3989
- }, Oi = (e) => {
3986
+ }, Pi = (e) => {
3990
3987
  var a, r;
3991
- const t = e.message.hide_date === !0, n = Fi(
3988
+ const t = e.message.hide_date === !0, n = zi(
3992
3989
  e.message
3993
3990
  );
3994
3991
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3995
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
3992
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Mi[n.type];
3996
3993
  return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3997
3994
  /* @__PURE__ */ u(
3998
3995
  "div",
@@ -4018,7 +4015,7 @@ const bi = ({
4018
4015
  ] });
4019
4016
  }
4020
4017
  if ((n == null ? void 0 : n.kind) === "age-safety") {
4021
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Li[n.type];
4018
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ri[n.type];
4022
4019
  return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4023
4020
  /* @__PURE__ */ u(
4024
4021
  "div",
@@ -4037,7 +4034,7 @@ const bi = ({
4037
4034
  "data-testid": "age-safety-system-message-icon"
4038
4035
  }
4039
4036
  ),
4040
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Pi(i) }) })
4037
+ /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Fi(i) }) })
4041
4038
  ]
4042
4039
  }
4043
4040
  ),
@@ -4062,15 +4059,15 @@ const bi = ({
4062
4059
  begin: `${120 * t}ms`,
4063
4060
  repeatCount: "indefinite"
4064
4061
  }
4065
- ) }), $i = /* @__PURE__ */ new Set([
4062
+ ) }), Oi = /* @__PURE__ */ new Set([
4066
4063
  Ke.Thinking,
4067
4064
  Ke.Generating,
4068
4065
  Ke.ExternalSources
4069
- ]), Ui = ({ threadList: e }) => {
4066
+ ]), $i = ({ threadList: e }) => {
4070
4067
  var b, v;
4071
4068
  const { channel: t, channelConfig: n, thread: a } = oe(), { client: r } = fe(), { typing: i = {} } = yn(), { aiState: o } = kn(t), l = Te(zs);
4072
- if (!e && l && $i.has(o)) {
4073
- const x = Bi(t, (b = r.user) == null ? void 0 : b.id);
4069
+ if (!e && l && Oi.has(o)) {
4070
+ const x = Ui(t, (b = r.user) == null ? void 0 : b.id);
4074
4071
  return /* @__PURE__ */ s(
4075
4072
  ns,
4076
4073
  {
@@ -4150,7 +4147,7 @@ const bi = ({
4150
4147
  ] })
4151
4148
  }
4152
4149
  );
4153
- function Bi(e, t) {
4150
+ function Ui(e, t) {
4154
4151
  var a;
4155
4152
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4156
4153
  for (const r of Object.values(n)) {
@@ -4159,10 +4156,10 @@ function Bi(e, t) {
4159
4156
  return i;
4160
4157
  }
4161
4158
  }
4162
- const ji = () => null, Vi = ({ className: e, message: t }) => /* @__PURE__ */ u(
4159
+ const Bi = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ u(
4163
4160
  "div",
4164
4161
  {
4165
- className: y("flex items-center justify-center h-full", e),
4162
+ className: k("flex items-center justify-center h-full", e),
4166
4163
  children: [
4167
4164
  /* @__PURE__ */ u("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4168
4165
  /* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
@@ -4203,11 +4200,11 @@ const ji = () => null, Vi = ({ className: e, message: t }) => /* @__PURE__ */ u(
4203
4200
  ]
4204
4201
  }
4205
4202
  ), Ve = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center", children: [
4206
- /* @__PURE__ */ s(Vi, { className: "w-6 h-6" }),
4203
+ /* @__PURE__ */ s(ji, { className: "w-6 h-6" }),
4207
4204
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4208
4205
  ] }) }));
4209
4206
  Ve.displayName = "LoadingState";
4210
- const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Oe = "Replies instantly with AI assistant", Gi = ({
4207
+ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Oe = "Replies instantly with AI assistant", Vi = ({
4211
4208
  onBack: e,
4212
4209
  showBackButton: t,
4213
4210
  showStarButton: n = !1,
@@ -4226,7 +4223,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4226
4223
  onParticipantNameClick: v,
4227
4224
  renderHeaderTitleBadges: x
4228
4225
  }) => {
4229
- var E, I, T, M, P, $;
4226
+ var I, y, T, M, P, $;
4230
4227
  const { channel: p } = oe(), { client: _ } = fe(), w = V.useMemo(
4231
4228
  () => {
4232
4229
  var j;
@@ -4236,16 +4233,16 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4236
4233
  p.type
4237
4234
  );
4238
4235
  },
4239
- [(E = p.state) == null ? void 0 : E.members, _ == null ? void 0 : _.userID, p.type]
4240
- ), k = mt(w == null ? void 0 : w.user), D = (I = w == null ? void 0 : w.user) == null ? void 0 : I.image, S = ut(p), R = x == null ? void 0 : x({
4236
+ [(I = p.state) == null ? void 0 : I.members, _ == null ? void 0 : _.userID, p.type]
4237
+ ), C = mt(w == null ? void 0 : w.user), D = (y = w == null ? void 0 : w.user) == null ? void 0 : y.image, E = ut(p), R = x == null ? void 0 : x({
4241
4238
  channel: p,
4242
4239
  participant: w
4243
4240
  }), O = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", L = /* @__PURE__ */ u(se, { children: [
4244
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: k }),
4241
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: C }),
4245
4242
  R && /* @__PURE__ */ s("span", { className: "shrink-0", children: R })
4246
- ] }), C = async () => {
4243
+ ] }), S = async () => {
4247
4244
  try {
4248
- S ? await p.unpin() : await p.pin();
4245
+ E ? await p.unpin() : await p.pin();
4249
4246
  } catch (j) {
4250
4247
  console.error(
4251
4248
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -4258,7 +4255,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4258
4255
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ s(
4259
4256
  "button",
4260
4257
  {
4261
- className: y(
4258
+ className: k(
4262
4259
  ve,
4263
4260
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
4264
4261
  ),
@@ -4279,8 +4276,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4279
4276
  {
4280
4277
  type: "button",
4281
4278
  onClick: v,
4282
- "aria-label": `View details for ${k}`,
4283
- className: y(
4279
+ "aria-label": `View details for ${C}`,
4280
+ className: k(
4284
4281
  O,
4285
4282
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4286
4283
  ),
@@ -4289,9 +4286,9 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4289
4286
  ne,
4290
4287
  {
4291
4288
  id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || p.id || "unknown",
4292
- name: k,
4289
+ name: C,
4293
4290
  image: D,
4294
- starred: n && S,
4291
+ starred: n && E,
4295
4292
  dmAgentEnabled: a,
4296
4293
  size: 48
4297
4294
  }
@@ -4311,9 +4308,9 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4311
4308
  ne,
4312
4309
  {
4313
4310
  id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || p.id || "unknown",
4314
- name: k,
4311
+ name: C,
4315
4312
  image: D,
4316
- starred: n && S,
4313
+ starred: n && E,
4317
4314
  dmAgentEnabled: a,
4318
4315
  size: 48
4319
4316
  }
@@ -4340,17 +4337,17 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4340
4337
  "button",
4341
4338
  {
4342
4339
  className: ve,
4343
- onClick: C,
4340
+ onClick: S,
4344
4341
  type: "button",
4345
- "aria-label": S ? "Unstar conversation" : "Star conversation",
4342
+ "aria-label": E ? "Unstar conversation" : "Star conversation",
4346
4343
  children: /* @__PURE__ */ s(
4347
4344
  Ie,
4348
4345
  {
4349
- className: y("size-5", {
4350
- "text-yellow-600": S,
4351
- "text-black/90": !S
4346
+ className: k("size-5", {
4347
+ "text-yellow-600": E,
4348
+ "text-black/90": !E
4352
4349
  }),
4353
- weight: S ? "duotone" : "regular"
4350
+ weight: E ? "duotone" : "regular"
4354
4351
  }
4355
4352
  )
4356
4353
  }
@@ -4369,7 +4366,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4369
4366
  onBlockParticipantClick: f,
4370
4367
  onReportParticipantClick: h,
4371
4368
  customChannelActions: g,
4372
- triggerClassName: y(ve, "bg-[#F1F0EE]")
4369
+ triggerClassName: k(ve, "bg-[#F1F0EE]")
4373
4370
  }
4374
4371
  ))
4375
4372
  ] })
@@ -4379,7 +4376,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4379
4376
  t && e && /* @__PURE__ */ s(
4380
4377
  "button",
4381
4378
  {
4382
- className: y(
4379
+ className: k(
4383
4380
  ve,
4384
4381
  "messaging-channel-view-back-button-desktop"
4385
4382
  ),
@@ -4394,8 +4391,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4394
4391
  {
4395
4392
  type: "button",
4396
4393
  onClick: v,
4397
- "aria-label": `View details for ${k}`,
4398
- className: y(
4394
+ "aria-label": `View details for ${C}`,
4395
+ className: k(
4399
4396
  F,
4400
4397
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4401
4398
  ),
@@ -4404,9 +4401,9 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4404
4401
  ne,
4405
4402
  {
4406
4403
  id: ((P = w == null ? void 0 : w.user) == null ? void 0 : P.id) || p.id || "unknown",
4407
- name: k,
4404
+ name: C,
4408
4405
  image: D,
4409
- starred: n && S,
4406
+ starred: n && E,
4410
4407
  dmAgentEnabled: a,
4411
4408
  size: 48
4412
4409
  }
@@ -4428,9 +4425,9 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4428
4425
  ne,
4429
4426
  {
4430
4427
  id: (($ = w == null ? void 0 : w.user) == null ? void 0 : $.id) || p.id || "unknown",
4431
- name: k,
4428
+ name: C,
4432
4429
  image: D,
4433
- starred: n && S,
4430
+ starred: n && E,
4434
4431
  dmAgentEnabled: a,
4435
4432
  size: 48
4436
4433
  }
@@ -4458,17 +4455,17 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4458
4455
  "button",
4459
4456
  {
4460
4457
  className: ve,
4461
- onClick: C,
4458
+ onClick: S,
4462
4459
  type: "button",
4463
- "aria-label": S ? "Unstar conversation" : "Star conversation",
4460
+ "aria-label": E ? "Unstar conversation" : "Star conversation",
4464
4461
  children: /* @__PURE__ */ s(
4465
4462
  Ie,
4466
4463
  {
4467
- className: y("size-6", {
4468
- "text-yellow-600": S,
4469
- "text-black/90": !S
4464
+ className: k("size-6", {
4465
+ "text-yellow-600": E,
4466
+ "text-black/90": !E
4470
4467
  }),
4471
- weight: S ? "duotone" : "regular"
4468
+ weight: E ? "duotone" : "regular"
4472
4469
  }
4473
4470
  )
4474
4471
  }
@@ -4493,7 +4490,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4493
4490
  ] })
4494
4491
  ] })
4495
4492
  ] });
4496
- }, Hi = ({
4493
+ }, Gi = ({
4497
4494
  onBack: e,
4498
4495
  showBackButton: t,
4499
4496
  renderMessageInputActions: n,
@@ -4514,36 +4511,36 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4514
4511
  renderChannelBanner: p,
4515
4512
  renderHeaderTitleBadges: _,
4516
4513
  customChannelActions: w,
4517
- renderChannelActions: k,
4514
+ renderChannelActions: C,
4518
4515
  renderMessage: D,
4519
- dmAgentEnabled: S = !1,
4516
+ dmAgentEnabled: E = !1,
4520
4517
  viewerLanguage: R,
4521
4518
  showChannelInfo: O = !0,
4522
4519
  onParticipantNameClick: F,
4523
4520
  composerInput: L
4524
4521
  }) => {
4525
4522
  var N, A, H, q;
4526
- const { channel: C } = oe(), { client: E } = fe(), I = V.useMemo(
4523
+ const { channel: S } = oe(), { client: I } = fe(), y = V.useMemo(
4527
4524
  () => {
4528
4525
  var Y;
4529
4526
  return He(
4530
- (Y = C.state) == null ? void 0 : Y.members,
4531
- E == null ? void 0 : E.userID,
4532
- C.type
4527
+ (Y = S.state) == null ? void 0 : Y.members,
4528
+ I == null ? void 0 : I.userID,
4529
+ S.type
4533
4530
  );
4534
4531
  },
4535
- [(N = C.state) == null ? void 0 : N.members, E == null ? void 0 : E.userID, C.type]
4532
+ [(N = S.state) == null ? void 0 : N.members, I == null ? void 0 : I.userID, S.type]
4536
4533
  ), T = V.useMemo(() => {
4537
4534
  var W;
4538
- const Y = E == null ? void 0 : E.userID;
4539
- return Y ? Object.values(((W = C.state) == null ? void 0 : W.members) || {}).find((Z) => {
4535
+ const Y = I == null ? void 0 : I.userID;
4536
+ return Y ? Object.values(((W = S.state) == null ? void 0 : W.members) || {}).find((Z) => {
4540
4537
  var de;
4541
4538
  return ((de = Z.user) == null ? void 0 : de.id) === Y;
4542
4539
  }) : void 0;
4543
- }, [E == null ? void 0 : E.userID, (A = C.state) == null ? void 0 : A.members]), M = ((H = T == null ? void 0 : T.user) == null ? void 0 : H.is_account) ?? (T == null ? void 0 : T.is_account), P = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), $ = S && M === !1 && P === !0, j = C.state.messages.some(
4540
+ }, [I == null ? void 0 : I.userID, (A = S.state) == null ? void 0 : A.members]), M = ((H = T == null ? void 0 : T.user) == null ? void 0 : H.is_account) ?? (T == null ? void 0 : T.is_account), P = ((q = y == null ? void 0 : y.user) == null ? void 0 : q.is_account) ?? (y == null ? void 0 : y.is_account), $ = E && M === !1 && P === !0, j = S.state.messages.some(
4544
4541
  (Y) => Y.type !== "deleted"
4545
4542
  ), Q = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
4546
- pa,
4543
+ ga,
4547
4544
  {
4548
4545
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
4549
4546
  onBack: e,
@@ -4560,13 +4557,13 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4560
4557
  onBlockParticipantClick: m,
4561
4558
  onReportParticipantClick: f,
4562
4559
  customChannelActions: w,
4563
- renderChannelActions: k,
4560
+ renderChannelActions: C,
4564
4561
  onParticipantNameClick: F
4565
4562
  }
4566
4563
  ) : null, X = J(
4567
4564
  (Y) => {
4568
4565
  const { message: U } = Ne("ChannelView"), W = /* @__PURE__ */ s(
4569
- wi,
4566
+ xi,
4570
4567
  {
4571
4568
  ...Y,
4572
4569
  chatbotVotingEnabled: x,
@@ -4582,13 +4579,13 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4582
4579
  {
4583
4580
  overrides: {
4584
4581
  Message: X,
4585
- MessageActions: yi,
4582
+ MessageActions: Ni,
4586
4583
  UnreadMessagesSeparator: () => null
4587
4584
  },
4588
4585
  children: /* @__PURE__ */ u(En, { children: [
4589
4586
  !F && /* @__PURE__ */ u(se, { children: [
4590
4587
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4591
- Gi,
4588
+ Vi,
4592
4589
  {
4593
4590
  onBack: e,
4594
4591
  showBackButton: t,
@@ -4604,7 +4601,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4604
4601
  onBlockParticipantClick: m,
4605
4602
  onReportParticipantClick: f,
4606
4603
  customChannelActions: w,
4607
- renderChannelActions: k,
4604
+ renderChannelActions: C,
4608
4605
  renderHeaderTitleBadges: _
4609
4606
  }
4610
4607
  ) }, "lt-channel-header"),
@@ -4634,14 +4631,14 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4634
4631
  },
4635
4632
  "lt-channel-message-list"
4636
4633
  ),
4637
- r ? /* @__PURE__ */ s(V.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
4634
+ r ? /* @__PURE__ */ s(V.Fragment, { children: r(S) }, "lt-channel-conversation-footer") : null,
4638
4635
  /* @__PURE__ */ s(
4639
- Ti,
4636
+ Ii,
4640
4637
  {
4641
4638
  ...n && {
4642
- renderActions: () => n == null ? void 0 : n(C)
4639
+ renderActions: () => n == null ? void 0 : n(S)
4643
4640
  },
4644
- renderFooter: () => a == null ? void 0 : a(C),
4641
+ renderFooter: () => a == null ? void 0 : a(S),
4645
4642
  disabled: c,
4646
4643
  disabledReason: b,
4647
4644
  composerInput: L
@@ -4662,7 +4659,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4662
4659
  onLeaveConversation: o,
4663
4660
  onBlockParticipant: l,
4664
4661
  className: d,
4665
- CustomChannelEmptyState: m = ji,
4662
+ CustomChannelEmptyState: m = Bi,
4666
4663
  showDeleteConversation: f = !0,
4667
4664
  onDeleteConversationClick: h,
4668
4665
  onBlockParticipantClick: g,
@@ -4673,16 +4670,16 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4673
4670
  composerDisabledReason: p,
4674
4671
  dmAgentEnabled: _,
4675
4672
  messageMetadata: w,
4676
- onMessageSent: k,
4673
+ onMessageSent: C,
4677
4674
  showStarButton: D = !1,
4678
- chatbotVotingEnabled: S = !1,
4675
+ chatbotVotingEnabled: E = !1,
4679
4676
  renderChannelBanner: R,
4680
4677
  renderHeaderTitleBadges: O,
4681
4678
  customChannelActions: F,
4682
4679
  renderChannelActions: L,
4683
- renderMessage: C,
4684
- onMessageLinkClick: E,
4685
- sendButton: I,
4680
+ renderMessage: S,
4681
+ onMessageLinkClick: I,
4682
+ sendButton: y,
4686
4683
  attachmentPreviewList: T,
4687
4684
  viewerLanguage: M,
4688
4685
  showChannelInfo: P = !0,
@@ -4705,26 +4702,26 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4705
4702
  ...A,
4706
4703
  ...q && { skip_push: !0 }
4707
4704
  }, W = await e.sendMessage(Y, U);
4708
- return k == null || k(W), W;
4705
+ return C == null || C(W), W;
4709
4706
  },
4710
- [e, _, w, k]
4707
+ [e, _, w, C]
4711
4708
  ), ee = G(null);
4712
4709
  return K(() => {
4713
- if (!E) return;
4710
+ if (!I) return;
4714
4711
  const X = ee.current;
4715
4712
  if (!X) return;
4716
4713
  const N = (A) => {
4717
4714
  const H = A.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4718
4715
  if (!Y) return;
4719
4716
  const U = q == null ? void 0 : q.closest("[data-message-id]"), W = U == null ? void 0 : U.getAttribute("data-message-id"), Z = W ? e.state.messages.find((de) => de.id === W) : void 0;
4720
- E(Y, Z);
4717
+ I(Y, Z);
4721
4718
  };
4722
4719
  return X.addEventListener("click", N), () => X.removeEventListener("click", N);
4723
- }, [E, e]), /* @__PURE__ */ s(
4720
+ }, [I, e]), /* @__PURE__ */ s(
4724
4721
  "div",
4725
4722
  {
4726
4723
  ref: ee,
4727
- className: y(
4724
+ className: k(
4728
4725
  "messaging-channel-view h-full flex flex-col",
4729
4726
  d
4730
4727
  ),
@@ -4732,16 +4729,16 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4732
4729
  Cn,
4733
4730
  {
4734
4731
  channel: e,
4735
- MessageSystem: Oi,
4732
+ MessageSystem: Pi,
4736
4733
  EmptyStateIndicator: m,
4737
4734
  LoadingIndicator: Ve,
4738
- DateSeparator: ba,
4739
- TypingIndicator: Ui,
4735
+ DateSeparator: pa,
4736
+ TypingIndicator: $i,
4740
4737
  doSendMessageRequest: Q,
4741
- ...I ? { SendButton: I } : {},
4738
+ ...y ? { SendButton: y } : {},
4742
4739
  ...T ? { AttachmentPreviewList: T } : {},
4743
4740
  children: /* @__PURE__ */ s(
4744
- Hi,
4741
+ Gi,
4745
4742
  {
4746
4743
  onBack: t,
4747
4744
  showBackButton: n,
@@ -4761,12 +4758,12 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4761
4758
  composerDisabledReason: p,
4762
4759
  showStarButton: D,
4763
4760
  dmAgentEnabled: _,
4764
- chatbotVotingEnabled: S,
4761
+ chatbotVotingEnabled: E,
4765
4762
  renderChannelBanner: R,
4766
4763
  renderHeaderTitleBadges: O,
4767
4764
  customChannelActions: F,
4768
4765
  renderChannelActions: L,
4769
- renderMessage: C,
4766
+ renderMessage: S,
4770
4767
  viewerLanguage: M,
4771
4768
  showChannelInfo: P,
4772
4769
  onParticipantNameClick: $,
@@ -4795,7 +4792,7 @@ const Ce = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4795
4792
  )
4796
4793
  ] }) }));
4797
4794
  Ce.displayName = "ErrorState";
4798
- const bl = ({
4795
+ const pl = ({
4799
4796
  capabilities: e = {},
4800
4797
  renderMessageInputActions: t,
4801
4798
  renderConversationFooter: n,
@@ -4816,18 +4813,18 @@ const bl = ({
4816
4813
  renderChannelActions: p,
4817
4814
  onParticipantNameClick: _,
4818
4815
  renderMessage: w,
4819
- onMessageLinkClick: k,
4816
+ onMessageLinkClick: C,
4820
4817
  showChannelInfo: D,
4821
- composerInput: S
4818
+ composerInput: E
4822
4819
  }) => {
4823
4820
  const {
4824
4821
  client: R,
4825
4822
  isConnected: O,
4826
4823
  isLoading: F,
4827
4824
  error: L,
4828
- refreshConnection: C,
4829
- service: E,
4830
- debug: I
4825
+ refreshConnection: S,
4826
+ service: I,
4827
+ debug: y
4831
4828
  } = sa(), [T, M] = B(null), [P, $] = B(null), [j, Q] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
4832
4829
  X.current = o;
4833
4830
  const N = G(a);
@@ -4848,7 +4845,7 @@ const bl = ({
4848
4845
  (async () => {
4849
4846
  var De, ze;
4850
4847
  try {
4851
- I && console.log(
4848
+ y && console.log(
4852
4849
  "[MessagingShell] Loading initial conversation with:",
4853
4850
  i
4854
4851
  );
@@ -4861,27 +4858,27 @@ const bl = ({
4861
4858
  { limit: 1 }
4862
4859
  );
4863
4860
  if (ae.length > 0) {
4864
- M(ae[0]), $(null), (De = N.current) == null || De.call(N, ae[0]), I && console.log(
4861
+ M(ae[0]), $(null), (De = N.current) == null || De.call(N, ae[0]), y && console.log(
4865
4862
  "[MessagingShell] Initial conversation loaded:",
4866
4863
  ae[0].id
4867
4864
  );
4868
4865
  return;
4869
4866
  }
4870
4867
  const ue = X.current;
4871
- if (!ue || !E) {
4872
- Z(), $("No conversation found with this account"), I && console.log(
4868
+ if (!ue || !I) {
4869
+ Z(), $("No conversation found with this account"), y && console.log(
4873
4870
  "[MessagingShell] No conversation found for:",
4874
4871
  i
4875
4872
  );
4876
4873
  return;
4877
4874
  }
4878
4875
  try {
4879
- const le = await E.startChannelWithParticipant({
4876
+ const le = await I.startChannelWithParticipant({
4880
4877
  id: ue.id,
4881
4878
  name: ue.name,
4882
4879
  phone: ue.phone
4883
4880
  });
4884
- M(le), $(null), (ze = N.current) == null || ze.call(N, le), I && console.log(
4881
+ M(le), $(null), (ze = N.current) == null || ze.call(N, le), y && console.log(
4885
4882
  "[MessagingShell] Channel created and loaded:",
4886
4883
  le.id
4887
4884
  );
@@ -4898,18 +4895,18 @@ const bl = ({
4898
4895
  ), Z(), H.current || $("Failed to load conversation");
4899
4896
  }
4900
4897
  })();
4901
- }, [i, R, O, E, I]);
4898
+ }, [i, R, O, I, y]);
4902
4899
  const q = G(r);
4903
4900
  q.current = r;
4904
4901
  const Y = J(() => {
4905
4902
  var U;
4906
4903
  M(null), Q(!0), (U = q.current) == null || U.call(q);
4907
4904
  }, []);
4908
- return F ? /* @__PURE__ */ s(Ve, {}) : L ? /* @__PURE__ */ s(Ce, { message: L, onBack: C }) : !O || !R ? /* @__PURE__ */ s(
4905
+ return F ? /* @__PURE__ */ s(Ve, {}) : L ? /* @__PURE__ */ s(Ce, { message: L, onBack: S }) : !O || !R ? /* @__PURE__ */ s(
4909
4906
  Ce,
4910
4907
  {
4911
4908
  message: "Not connected to messaging service",
4912
- onBack: C
4909
+ onBack: S
4913
4910
  }
4914
4911
  ) : P ? /* @__PURE__ */ s(Ce, { message: P }) : j && !T ? /* @__PURE__ */ s(Ce, { message: "Conversation ended" }) : T ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4915
4912
  Fs,
@@ -4933,14 +4930,14 @@ const bl = ({
4933
4930
  renderChannelActions: p,
4934
4931
  onParticipantNameClick: _,
4935
4932
  renderMessage: w,
4936
- onMessageLinkClick: k,
4933
+ onMessageLinkClick: C,
4937
4934
  showChannelInfo: D,
4938
- composerInput: S
4935
+ composerInput: E
4939
4936
  },
4940
4937
  T.id
4941
4938
  ) }) }) : /* @__PURE__ */ s(Ve, {});
4942
4939
  };
4943
- function Yi(e) {
4940
+ function Hi(e) {
4944
4941
  const t = e.state.pending_messages;
4945
4942
  if (t != null && t.length)
4946
4943
  for (const n of t)
@@ -4954,18 +4951,18 @@ const Ps = V.createContext({
4954
4951
  renderMessagePreview: void 0,
4955
4952
  channelPreview: void 0,
4956
4953
  viewerLanguage: void 0
4957
- }), qi = Ps.Provider, Wi = () => V.useContext(Ps), Xi = (e, t) => {
4954
+ }), Yi = Ps.Provider, qi = () => V.useContext(Ps), Wi = (e, t) => {
4958
4955
  const n = new Date(
4959
4956
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4960
4957
  ), r = new Date(
4961
4958
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
4962
4959
  ).getTime() - n.getTime();
4963
4960
  return Math.floor(r / (1e3 * 60 * 60 * 24));
4964
- }, Ki = (e) => {
4961
+ }, Xi = (e) => {
4965
4962
  const t = /* @__PURE__ */ new Date();
4966
4963
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
4967
4964
  return "Just now";
4968
- const a = Xi(e, t);
4965
+ const a = Wi(e, t);
4969
4966
  return a === 0 ? e.toLocaleTimeString([], {
4970
4967
  hour: "numeric",
4971
4968
  minute: "2-digit",
@@ -4985,7 +4982,7 @@ const Ps = V.createContext({
4985
4982
  channelPreview: o,
4986
4983
  renderMessagePreview: l,
4987
4984
  viewerLanguage: d
4988
- } = Wi(), { client: m } = fe(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ut(t);
4985
+ } = qi(), { client: m } = fe(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ut(t);
4989
4986
  if (o)
4990
4987
  return /* @__PURE__ */ s(
4991
4988
  o,
@@ -4999,46 +4996,46 @@ const Ps = V.createContext({
4999
4996
  );
5000
4997
  const g = () => {
5001
4998
  t && r(t);
5002
- }, c = (C) => {
5003
- const E = C.key === "Enter" || C.key === " ", I = C.repeat;
5004
- !E || I || (C.preventDefault(), g());
4999
+ }, c = (S) => {
5000
+ const I = S.key === "Enter" || S.key === " ", y = S.repeat;
5001
+ !I || y || (S.preventDefault(), g());
5005
5002
  }, b = He(
5006
5003
  (O = t == null ? void 0 : t.state) == null ? void 0 : O.members,
5007
5004
  m == null ? void 0 : m.userID,
5008
5005
  t == null ? void 0 : t.type
5009
5006
  ), v = mt(b == null ? void 0 : b.user), x = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, p = (() => {
5010
- var E;
5011
- const C = (E = t == null ? void 0 : t.state) == null ? void 0 : E.messages;
5012
- if (C != null && C.length) {
5013
- for (let I = C.length - 1; I >= 0; I--)
5014
- if (C[I].type !== "system") return C[I];
5007
+ var I;
5008
+ const S = (I = t == null ? void 0 : t.state) == null ? void 0 : I.messages;
5009
+ if (S != null && S.length) {
5010
+ for (let y = S.length - 1; y >= 0; y--)
5011
+ if (S[y].type !== "system") return S[y];
5015
5012
  }
5016
5013
  })(), w = (() => {
5017
5014
  var M;
5018
- const C = ms({
5015
+ const S = ms({
5019
5016
  message: p,
5020
5017
  viewerLanguage: d
5021
- }), { custom_type: E, attachment_content_type: I } = (p == null ? void 0 : p.metadata) || {};
5022
- if (E === "MESSAGE_TIP")
5023
- return C || "Sent a tip";
5024
- if (E === "MESSAGE_PAID")
5025
- return C || "Sent a message";
5026
- if (E === "MESSAGE_ATTACHMENT") {
5027
- if (I === "text")
5018
+ }), { custom_type: I, attachment_content_type: y } = (p == null ? void 0 : p.metadata) || {};
5019
+ if (I === "MESSAGE_TIP")
5020
+ return S || "Sent a tip";
5021
+ if (I === "MESSAGE_PAID")
5022
+ return S || "Sent a message";
5023
+ if (I === "MESSAGE_ATTACHMENT") {
5024
+ if (y === "text")
5028
5025
  return "🔒 Sent a locked message";
5029
- if (I === "media")
5026
+ if (y === "media")
5030
5027
  return "🔒 Sent a locked attachment";
5031
5028
  }
5032
- if (C) return C;
5029
+ if (S) return S;
5033
5030
  const T = (M = p == null ? void 0 : p.attachments) == null ? void 0 : M[0];
5034
5031
  return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5035
- })(), k = p != null && p.created_at ? Ki(new Date(p.created_at)) : "", D = p ? Ue(p) : !1, S = l ? l(p, w) : `${D ? "✨ " : ""}${w}`, R = n ?? 0;
5032
+ })(), C = p != null && p.created_at ? Xi(new Date(p.created_at)) : "", D = p ? Ue(p) : !1, E = l ? l(p, w) : `${D ? "✨ " : ""}${w}`, R = n ?? 0;
5036
5033
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5037
5034
  channelId: t == null ? void 0 : t.id,
5038
5035
  isSelected: f,
5039
5036
  participantName: v,
5040
5037
  unreadCount: R,
5041
- hasTimestamp: !!k
5038
+ hasTimestamp: !!C
5042
5039
  }), /* @__PURE__ */ s(
5043
5040
  "div",
5044
5041
  {
@@ -5046,7 +5043,7 @@ const Ps = V.createContext({
5046
5043
  tabIndex: 0,
5047
5044
  onClick: g,
5048
5045
  onKeyDown: c,
5049
- className: y(
5046
+ className: k(
5050
5047
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
5051
5048
  {
5052
5049
  "bg-black/[0.04]": f,
@@ -5070,7 +5067,7 @@ const Ps = V.createContext({
5070
5067
  /* @__PURE__ */ u(
5071
5068
  "h3",
5072
5069
  {
5073
- className: y(
5070
+ className: k(
5074
5071
  "text-sm font-medium truncate text-[#191918]"
5075
5072
  ),
5076
5073
  children: [
@@ -5079,10 +5076,10 @@ const Ps = V.createContext({
5079
5076
  ]
5080
5077
  }
5081
5078
  ),
5082
- k && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: k })
5079
+ C && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: C })
5083
5080
  ] }),
5084
5081
  /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5085
- /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
5082
+ /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: E }),
5086
5083
  R > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: R > 99 ? "99+" : R })
5087
5084
  ] })
5088
5085
  ] })
@@ -5092,14 +5089,14 @@ const Ps = V.createContext({
5092
5089
  }
5093
5090
  );
5094
5091
  Os.displayName = "CustomChannelPreview";
5095
- const Zi = { last_message_at: -1 }, Ji = V.memo(
5092
+ const Ki = { last_message_at: -1 }, Zi = V.memo(
5096
5093
  ({
5097
5094
  onChannelSelect: e,
5098
5095
  selectedChannel: t,
5099
5096
  filters: n,
5100
5097
  allowNewMessagesFromUnfilteredChannels: a = !1,
5101
5098
  channelRenderFilterFn: r,
5102
- sort: i = Zi,
5099
+ sort: i = Ki,
5103
5100
  className: o,
5104
5101
  customEmptyStateIndicator: l,
5105
5102
  channelListPaginator: d = Mn,
@@ -5115,11 +5112,11 @@ const Zi = { last_message_at: -1 }, Ji = V.memo(
5115
5112
  }) => {
5116
5113
  const _ = V.useRef(0);
5117
5114
  _.current++;
5118
- const { debug: w = !1 } = dt(), k = V.useCallback(
5119
- (S) => {
5120
- for (const R of S)
5121
- Yi(R);
5122
- return r ? r(S) : S;
5115
+ const { debug: w = !1 } = dt(), C = V.useCallback(
5116
+ (E) => {
5117
+ for (const R of E)
5118
+ Hi(R);
5119
+ return r ? r(E) : E;
5123
5120
  },
5124
5121
  [r]
5125
5122
  );
@@ -5149,18 +5146,18 @@ const Zi = { last_message_at: -1 }, Ji = V.memo(
5149
5146
  return /* @__PURE__ */ s(
5150
5147
  "div",
5151
5148
  {
5152
- className: y(
5149
+ className: k(
5153
5150
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5154
5151
  o
5155
5152
  ),
5156
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(qi, { value: D, children: /* @__PURE__ */ s(
5153
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Yi, { value: D, children: /* @__PURE__ */ s(
5157
5154
  Tn,
5158
5155
  {
5159
5156
  filters: n,
5160
5157
  sort: i,
5161
5158
  options: { limit: 30 },
5162
5159
  allowNewMessagesFromUnfilteredChannels: a,
5163
- channelRenderFilterFn: k,
5160
+ channelRenderFilterFn: C,
5164
5161
  lockChannelOrder: g,
5165
5162
  onMessageNewHandler: c,
5166
5163
  onMessageNew: b,
@@ -5177,11 +5174,11 @@ const Zi = { last_message_at: -1 }, Ji = V.memo(
5177
5174
  );
5178
5175
  }
5179
5176
  );
5180
- Ji.displayName = "ChannelList";
5181
- const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Qi = {
5177
+ Zi.displayName = "ChannelList";
5178
+ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Ji = {
5182
5179
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5183
5180
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
5184
- }, el = ({ variant: e }) => /* @__PURE__ */ s(
5181
+ }, Qi = ({ variant: e }) => /* @__PURE__ */ s(
5185
5182
  "span",
5186
5183
  {
5187
5184
  "aria-hidden": "true",
@@ -5191,12 +5188,12 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5191
5188
  insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
5192
5189
  transform: e === "received" ? "scaleX(-1)" : void 0,
5193
5190
  transformOrigin: "center",
5194
- backgroundColor: Qi[e],
5191
+ backgroundColor: Ji[e],
5195
5192
  WebkitMask: as,
5196
5193
  mask: as
5197
5194
  }
5198
5195
  }
5199
- ), tl = {
5196
+ ), el = {
5200
5197
  sent: {
5201
5198
  backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5202
5199
  color: "var(--str-chat__own-message-bubble-color, #fff)"
@@ -5215,23 +5212,23 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5215
5212
  "div",
5216
5213
  {
5217
5214
  "data-dd-privacy": "mask",
5218
- className: y(
5215
+ className: k(
5219
5216
  "relative px-4 py-3",
5220
5217
  "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]",
5221
5218
  r
5222
5219
  ),
5223
5220
  style: {
5224
- ...tl[e],
5221
+ ...el[e],
5225
5222
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
5226
5223
  isolation: "isolate"
5227
5224
  },
5228
5225
  children: [
5229
5226
  a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
5230
5227
  /* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
5231
- n && /* @__PURE__ */ s(el, { variant: e })
5228
+ n && /* @__PURE__ */ s(Qi, { variant: e })
5232
5229
  ]
5233
5230
  }
5234
- ), sl = ({
5231
+ ), tl = ({
5235
5232
  text: e,
5236
5233
  tail: t,
5237
5234
  header: n,
@@ -5245,10 +5242,10 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5245
5242
  header: n,
5246
5243
  className: a
5247
5244
  }
5248
- ), nl = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s($s, { variant: "sent", text: e, tail: t, className: n }), vl = {
5249
- Sent: nl,
5250
- Received: sl
5251
- }, al = ({
5245
+ ), sl = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s($s, { variant: "sent", text: e, tail: t, className: n }), bl = {
5246
+ Sent: sl,
5247
+ Received: tl
5248
+ }, nl = ({
5252
5249
  question: e,
5253
5250
  onClick: t,
5254
5251
  loading: n = !1,
@@ -5260,7 +5257,7 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5260
5257
  onClick: t,
5261
5258
  disabled: n,
5262
5259
  style: { backgroundColor: "#E6E5E3" },
5263
- className: y(
5260
+ className: k(
5264
5261
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
5265
5262
  {
5266
5263
  "hover:brightness-95 active:brightness-90": !n,
@@ -5270,7 +5267,7 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5270
5267
  ),
5271
5268
  children: e
5272
5269
  }
5273
- ), xl = ({
5270
+ ), vl = ({
5274
5271
  faqs: e,
5275
5272
  onFaqClick: t,
5276
5273
  loadingFaqId: n,
@@ -5299,7 +5296,7 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5299
5296
  children: [
5300
5297
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5301
5298
  l.map((d) => /* @__PURE__ */ s(
5302
- al,
5299
+ nl,
5303
5300
  {
5304
5301
  question: d.question,
5305
5302
  onClick: () => t(d.id),
@@ -5315,40 +5312,40 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5315
5312
  export {
5316
5313
  fs as A,
5317
5314
  pt as B,
5318
- ji as C,
5315
+ Bi as C,
5319
5316
  mt as D,
5320
- pl as E,
5321
- xl as F,
5322
- Or as G,
5323
- xa as H,
5317
+ gl as E,
5318
+ vl as F,
5319
+ Pr as G,
5320
+ va as H,
5324
5321
  sa as I,
5325
5322
  Jt as L,
5326
- fl as M,
5323
+ hl as M,
5327
5324
  ye as a,
5328
5325
  ne as b,
5329
- Ji as c,
5326
+ Zi as c,
5330
5327
  Fs as d,
5331
- gl as e,
5332
- al as f,
5328
+ fl as e,
5329
+ nl as f,
5333
5330
  ce as g,
5334
5331
  Pe as h,
5335
5332
  ke as i,
5336
- vl as j,
5337
- Wr as k,
5338
- hl as l,
5339
- bl as m,
5340
- sr as n,
5333
+ bl as j,
5334
+ qr as k,
5335
+ ml as l,
5336
+ pl as m,
5337
+ tr as n,
5341
5338
  he as o,
5342
- Qa as p,
5343
- Ki as q,
5339
+ Ja as p,
5340
+ Xi as q,
5344
5341
  _e as r,
5345
- tr as s,
5342
+ er as s,
5346
5343
  ms as t,
5347
5344
  bs as u,
5348
5345
  ia as v,
5349
- Ya as w,
5350
- wa as x,
5346
+ Ha as w,
5347
+ xa as x,
5351
5348
  He as y,
5352
5349
  gt as z
5353
5350
  };
5354
- //# sourceMappingURL=index-FDgJhTIG.js.map
5351
+ //# sourceMappingURL=index-5kR8BcYv.js.map