@linktr.ee/messaging-react 3.12.7 → 3.13.0-rc-1784206423

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { jsx as s, jsxs as u, Fragment as se } from "react/jsx-runtime";
2
- import V, { createContext as ct, useContext as Te, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Vs, useMemo as re, Suspense as Gs } from "react";
1
+ import { jsx as s, jsxs as m, Fragment as ne } from "react/jsx-runtime";
2
+ import j, { createContext as ct, useContext as Te, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Vs, useMemo as re, Suspense as Gs } from "react";
3
3
  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";
@@ -38,7 +38,7 @@ 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), C = G(n);
41
+ const [d, u] = 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
42
  C.current = n;
43
43
  const D = G(i);
44
44
  D.current = i;
@@ -69,7 +69,7 @@ const ds = ct({
69
69
  K(() => {
70
70
  const M = R.current, P = C.current;
71
71
  if (o) {
72
- w.current = null, m(null), h(null), c(!1), p(null), v(!1);
72
+ w.current = null, u(null), h(null), c(!1), p(null), v(!1);
73
73
  return;
74
74
  }
75
75
  if (!a || !F || !P) {
@@ -89,7 +89,7 @@ const ds = ct({
89
89
  debug: D.current,
90
90
  client: F
91
91
  });
92
- w.current = $, m($), l("✅ SERVICE SET", {
92
+ w.current = $, u($), l("✅ SERVICE SET", {
93
93
  renderCount: M,
94
94
  serviceInstance: !!$
95
95
  });
@@ -125,13 +125,13 @@ const ds = ct({
125
125
  l("🚀 STARTING USER CONNECTION", { userId: t.id }), _.current = !0, v(!0), p(null);
126
126
  try {
127
127
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
128
- const j = await d.connectUser(t);
129
- h(j), c(!0), L.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
128
+ const V = await d.connectUser(t);
129
+ h(V), c(!0), L.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
130
130
  userId: t.id,
131
- clientId: j.userID
131
+ clientId: V.userID
132
132
  });
133
- } catch (j) {
134
- const Q = j instanceof Error ? j.message : "Connection failed";
133
+ } catch (V) {
134
+ const Q = V instanceof Error ? V.message : "Connection failed";
135
135
  p(Q), l("❌ USER CONNECTION ERROR", {
136
136
  userId: t.id,
137
137
  error: Q
@@ -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]), I = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
177
+ }, [d, t, l, o]), I = j.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
178
178
  hasService: !!d,
179
179
  hasClient: !!f,
180
180
  isConnected: g,
@@ -321,7 +321,7 @@ function oa(e) {
321
321
  function ca(e) {
322
322
  return us(e).bgColor;
323
323
  }
324
- const ne = ({
324
+ const se = ({
325
325
  id: e,
326
326
  image: t,
327
327
  size: n = 40,
@@ -330,7 +330,7 @@ const ne = ({
330
330
  shape: i = "squircle",
331
331
  dmAgentEnabled: o = !1
332
332
  }) => {
333
- const l = oa(e), d = ca(e), m = 0.45, h = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
333
+ const l = oa(e), d = ca(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
334
334
  "img",
335
335
  {
336
336
  src: t,
@@ -348,7 +348,7 @@ const ne = ({
348
348
  children: l
349
349
  }
350
350
  ) });
351
- return /* @__PURE__ */ u(
351
+ return /* @__PURE__ */ m(
352
352
  "div",
353
353
  {
354
354
  className: k(
@@ -404,7 +404,7 @@ const ne = ({
404
404
  onDeleteConversationClick: o,
405
405
  onBlockParticipantClick: l,
406
406
  onReportParticipantClick: d,
407
- onActionComplete: m,
407
+ onActionComplete: u,
408
408
  logLabel: f = "useChannelModerationActions"
409
409
  }) => {
410
410
  var I;
@@ -443,7 +443,7 @@ const ne = ({
443
443
  o == null || o(), g && console.log(`[${f}] Leave conversation`, e.cid), C(!0);
444
444
  try {
445
445
  const T = ((y = e._client) == null ? void 0 : y.userID) ?? null;
446
- await e.hide(T, !1), r && await r(e), m == null || m();
446
+ await e.hide(T, !1), r && await r(e), u == null || u();
447
447
  } catch (T) {
448
448
  console.error(`[${f}] Failed to leave conversation`, T);
449
449
  } finally {
@@ -456,7 +456,7 @@ const ne = ({
456
456
  if (!(D || !h)) {
457
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
- 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();
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), u == null || u();
460
460
  } catch (P) {
461
461
  console.error(`[${f}] Failed to block member`, P);
462
462
  } finally {
@@ -469,7 +469,7 @@ const ne = ({
469
469
  if (!(D || !h)) {
470
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
- 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();
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), u == null || u();
473
473
  } catch (P) {
474
474
  console.error(`[${f}] Failed to unblock member`, P);
475
475
  } finally {
@@ -478,7 +478,7 @@ const ne = ({
478
478
  }
479
479
  },
480
480
  handleReportUser: () => {
481
- d == null || d(), m == null || m(), window.open(da, "_blank", "noopener,noreferrer");
481
+ d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
482
482
  }
483
483
  };
484
484
  }, ye = ({
@@ -508,7 +508,7 @@ const ne = ({
508
508
  onBlockParticipant: o,
509
509
  onDeleteConversationClick: l,
510
510
  onBlockParticipantClick: d,
511
- onReportParticipantClick: m,
511
+ onReportParticipantClick: u,
512
512
  customChannelActions: f,
513
513
  triggerClassName: h
514
514
  }) => {
@@ -530,7 +530,7 @@ const ne = ({
530
530
  onBlockParticipant: o,
531
531
  onDeleteConversationClick: l,
532
532
  onBlockParticipantClick: d,
533
- onReportParticipantClick: m,
533
+ onReportParticipantClick: u,
534
534
  onActionComplete: x,
535
535
  logLabel: "ChannelActionsMenu"
536
536
  });
@@ -544,8 +544,8 @@ const ne = ({
544
544
  return document.addEventListener("mousedown", L), document.addEventListener("keydown", S), () => {
545
545
  document.removeEventListener("mousedown", L), document.removeEventListener("keydown", S);
546
546
  };
547
- }, [g]), !t || !(n || a || r || !!f) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
548
- /* @__PURE__ */ u(
547
+ }, [g]), !t || !(n || a || r || !!f) ? null : /* @__PURE__ */ m("div", { ref: b, className: "relative", children: [
548
+ /* @__PURE__ */ m(
549
549
  "button",
550
550
  {
551
551
  className: h,
@@ -569,8 +569,8 @@ const ne = ({
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
  ),
572
- children: /* @__PURE__ */ u("ul", { className: "flex flex-col gap-1", children: [
573
- n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(
572
+ children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
573
+ n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
574
574
  ye,
575
575
  {
576
576
  onClick: D,
@@ -585,11 +585,11 @@ const ne = ({
585
585
  a && /* @__PURE__ */ s("li", { children: _ ? (
586
586
  // Block status not yet resolved — show a disabled placeholder
587
587
  // so a premature click can't act on a stale block state.
588
- /* @__PURE__ */ u(ye, { disabled: !0, "aria-busy": !0, children: [
588
+ /* @__PURE__ */ m(ye, { disabled: !0, "aria-busy": !0, children: [
589
589
  /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }),
590
590
  /* @__PURE__ */ s("span", { children: "Block" })
591
591
  ] })
592
- ) : p ? /* @__PURE__ */ u(
592
+ ) : p ? /* @__PURE__ */ m(
593
593
  ye,
594
594
  {
595
595
  onClick: R,
@@ -600,7 +600,7 @@ const ne = ({
600
600
  /* @__PURE__ */ s("span", { children: "Unblock" })
601
601
  ]
602
602
  }
603
- ) : /* @__PURE__ */ u(
603
+ ) : /* @__PURE__ */ m(
604
604
  ye,
605
605
  {
606
606
  onClick: E,
@@ -612,7 +612,7 @@ const ne = ({
612
612
  ]
613
613
  }
614
614
  ) }),
615
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(ye, { variant: "danger", onClick: O, children: [
615
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(ye, { variant: "danger", onClick: O, children: [
616
616
  /* @__PURE__ */ s(is, { className: "h-5 w-5" }),
617
617
  /* @__PURE__ */ s("span", { children: "Report" })
618
618
  ] }) }),
@@ -631,7 +631,7 @@ const ne = ({
631
631
  onBlockParticipant: o,
632
632
  showDeleteConversation: l = !0,
633
633
  showBlockParticipant: d = !0,
634
- showReportParticipant: m = !0,
634
+ showReportParticipant: u = !0,
635
635
  onDeleteConversationClick: f,
636
636
  onBlockParticipantClick: h,
637
637
  onReportParticipantClick: g,
@@ -641,7 +641,7 @@ const ne = ({
641
641
  onParticipantNameClick: x
642
642
  }) => {
643
643
  var F, L, S, I;
644
- const { channel: p } = oe(), { client: _ } = fe(), w = V.useMemo(
644
+ const { channel: p } = oe(), { client: _ } = fe(), w = j.useMemo(
645
645
  () => {
646
646
  var y;
647
647
  return He(
@@ -668,7 +668,7 @@ const ne = ({
668
668
  "@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
669
669
  e
670
670
  ),
671
- children: /* @__PURE__ */ u("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
671
+ children: /* @__PURE__ */ m("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
672
672
  /* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
673
673
  "button",
674
674
  {
@@ -683,7 +683,7 @@ const ne = ({
683
683
  children: /* @__PURE__ */ s(at, { className: "size-5 text-black/90" })
684
684
  }
685
685
  ) }),
686
- /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ u(
686
+ /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
687
687
  "button",
688
688
  {
689
689
  type: "button",
@@ -692,7 +692,7 @@ const ne = ({
692
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",
693
693
  children: [
694
694
  /* @__PURE__ */ s(
695
- ne,
695
+ se,
696
696
  {
697
697
  id: ((I = w == null ? void 0 : w.user) == null ? void 0 : I.id) || p.id || "unknown",
698
698
  name: C,
@@ -703,10 +703,10 @@ const ne = ({
703
703
  className: "-mb-2"
704
704
  }
705
705
  ),
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: [
707
- /* @__PURE__ */ u("span", { className: "flex max-w-full items-center justify-center", children: [
706
+ /* @__PURE__ */ m("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: [
707
+ /* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
708
708
  /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: C }),
709
- /* @__PURE__ */ u("span", { className: "ml-2 flex gap-1", children: [
709
+ /* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
710
710
  R && /* @__PURE__ */ s(
711
711
  "span",
712
712
  {
@@ -733,7 +733,7 @@ const ne = ({
733
733
  )
734
734
  ] })
735
735
  ] }),
736
- r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
736
+ r && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
737
737
  /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
738
738
  /* @__PURE__ */ s("span", { children: ha })
739
739
  ] })
@@ -741,7 +741,7 @@ const ne = ({
741
741
  ]
742
742
  }
743
743
  ) }),
744
- /* @__PURE__ */ u("div", { className: "flex items-start justify-end gap-2", children: [
744
+ /* @__PURE__ */ m("div", { className: "flex items-start justify-end gap-2", children: [
745
745
  a && /* @__PURE__ */ s(
746
746
  "button",
747
747
  {
@@ -769,7 +769,7 @@ const ne = ({
769
769
  participant: w,
770
770
  showDeleteConversation: l,
771
771
  showBlockParticipant: d,
772
- showReportParticipant: m,
772
+ showReportParticipant: u,
773
773
  onLeaveConversation: i,
774
774
  onBlockParticipant: o,
775
775
  onDeleteConversationClick: f,
@@ -886,7 +886,7 @@ function Sa(e) {
886
886
  return t !== "document" ? ka[t] : Ca[hs(e)];
887
887
  }
888
888
  function _e(e, t) {
889
- return V.createElement(Sa(e), t);
889
+ return j.createElement(Sa(e), t);
890
890
  }
891
891
  const Ea = (e) => {
892
892
  var t, n;
@@ -901,7 +901,7 @@ const Ea = (e) => {
901
901
  controls: o = !0,
902
902
  showProgress: l = !1,
903
903
  muted: d = !1,
904
- onContainerClick: m
904
+ onContainerClick: u
905
905
  }) => {
906
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(() => {
907
907
  O(!1), x(!0);
@@ -916,7 +916,7 @@ const Ea = (e) => {
916
916
  }, []), $ = J((N) => {
917
917
  const A = h.current;
918
918
  A && A.duration && (A.currentTime = N * A.duration);
919
- }, []), j = (N) => {
919
+ }, []), V = (N) => {
920
920
  N.stopPropagation(), C(!0);
921
921
  const A = P(N);
922
922
  _(A), $(A);
@@ -950,7 +950,7 @@ const Ea = (e) => {
950
950
  };
951
951
  }, [w, P, $]);
952
952
  const Q = y ? { aspectRatio: String(y) } : void 0, ee = y ? "" : " aspect-video", X = Math.round(p * 100);
953
- return /* @__PURE__ */ u(
953
+ return /* @__PURE__ */ m(
954
954
  "div",
955
955
  {
956
956
  role: "button",
@@ -958,16 +958,16 @@ const Ea = (e) => {
958
958
  className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
959
959
  style: Q,
960
960
  onClick: (N) => {
961
- if (m) {
962
- m(N);
961
+ if (u) {
962
+ u(N);
963
963
  return;
964
964
  }
965
965
  R || o && x((A) => !A);
966
966
  },
967
967
  onKeyDown: (N) => {
968
968
  if (!(N.key !== "Enter" && N.key !== " ")) {
969
- if (N.preventDefault(), m) {
970
- m(N);
969
+ if (N.preventDefault(), u) {
970
+ u(N);
971
971
  return;
972
972
  }
973
973
  R || o && x((A) => !A);
@@ -1064,8 +1064,8 @@ const Ea = (e) => {
1064
1064
  tabIndex: 0,
1065
1065
  ref: g,
1066
1066
  className: "relative flex h-4 w-full cursor-pointer items-center",
1067
- onMouseDown: j,
1068
- onTouchStart: j,
1067
+ onMouseDown: V,
1068
+ onTouchStart: V,
1069
1069
  onClick: (N) => N.stopPropagation(),
1070
1070
  onKeyDown: (N) => {
1071
1071
  N.key === "ArrowRight" && $(Math.min(1, p + 0.05)), N.key === "ArrowLeft" && $(Math.max(0, p - 0.05));
@@ -1079,7 +1079,7 @@ const Ea = (e) => {
1079
1079
  ) })
1080
1080
  }
1081
1081
  ) }),
1082
- o && /* @__PURE__ */ u("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
1082
+ o && /* @__PURE__ */ m("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
1083
1083
  /* @__PURE__ */ s(
1084
1084
  "button",
1085
1085
  {
@@ -1092,7 +1092,7 @@ const Ea = (e) => {
1092
1092
  children: v ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(rt, { className: "size-5 translate-x-px", weight: "fill" })
1093
1093
  }
1094
1094
  ),
1095
- /* @__PURE__ */ u(
1095
+ /* @__PURE__ */ m(
1096
1096
  "div",
1097
1097
  {
1098
1098
  role: "slider",
@@ -1103,8 +1103,8 @@ const Ea = (e) => {
1103
1103
  tabIndex: 0,
1104
1104
  ref: g,
1105
1105
  className: "relative flex h-4 w-full cursor-pointer items-center",
1106
- onMouseDown: j,
1107
- onTouchStart: j,
1106
+ onMouseDown: V,
1107
+ onTouchStart: V,
1108
1108
  onClick: (N) => N.stopPropagation(),
1109
1109
  onMouseEnter: () => E(!0),
1110
1110
  onMouseLeave: () => E(!1),
@@ -1148,7 +1148,7 @@ const Ea = (e) => {
1148
1148
  mediaPlayerProps: i,
1149
1149
  containedImage: o = !1
1150
1150
  }) => {
1151
- const l = ce(e), [d, m] = B(!1), f = he(t), h = he(n);
1151
+ const l = ce(e), [d, u] = B(!1), f = he(t), h = he(n);
1152
1152
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
1153
1153
  Ia,
1154
1154
  {
@@ -1165,7 +1165,7 @@ const Ea = (e) => {
1165
1165
  alt: a ?? "",
1166
1166
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
1167
1167
  draggable: !1,
1168
- onLoad: () => m(!0)
1168
+ onLoad: () => u(!0)
1169
1169
  }
1170
1170
  ) }) : /* @__PURE__ */ s(
1171
1171
  "img",
@@ -1182,7 +1182,7 @@ const Ea = (e) => {
1182
1182
  alt: a ?? "",
1183
1183
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
1184
1184
  draggable: !1,
1185
- onLoad: () => m(!0)
1185
+ onLoad: () => u(!0)
1186
1186
  }
1187
1187
  ) }) : /* @__PURE__ */ s(
1188
1188
  "img",
@@ -1229,12 +1229,12 @@ const Ea = (e) => {
1229
1229
  statusBadge: o,
1230
1230
  action: l,
1231
1231
  topLeft: d,
1232
- topRight: m,
1232
+ topRight: u,
1233
1233
  rootRef: f,
1234
1234
  "data-testid": h
1235
1235
  }) => {
1236
1236
  const g = e === "dark", c = g ? n ?? a : n ?? "", b = g && !n;
1237
- return /* @__PURE__ */ u(
1237
+ return /* @__PURE__ */ m(
1238
1238
  "div",
1239
1239
  {
1240
1240
  ref: f,
@@ -1245,9 +1245,9 @@ const Ea = (e) => {
1245
1245
  ),
1246
1246
  children: [
1247
1247
  d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
1248
- m ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: m }) : null,
1248
+ u ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
1249
1249
  t,
1250
- /* @__PURE__ */ u("div", { className: "px-4 pb-3 pt-3", children: [
1250
+ /* @__PURE__ */ m("div", { className: "px-4 pb-3 pt-3", children: [
1251
1251
  c.trim() !== "" && /* @__PURE__ */ s(
1252
1252
  "p",
1253
1253
  {
@@ -1259,7 +1259,7 @@ const Ea = (e) => {
1259
1259
  children: c
1260
1260
  }
1261
1261
  ),
1262
- /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
1262
+ /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
1263
1263
  _e(r, {
1264
1264
  className: k(
1265
1265
  "size-5 shrink-0",
@@ -1307,7 +1307,7 @@ function Da(e) {
1307
1307
  return e ? "text-white/20" : "text-black/20";
1308
1308
  }
1309
1309
  const ft = ({ attachment: e, isMyMessage: t }) => {
1310
- const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ u(V.Fragment, { children: [
1310
+ const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ m(j.Fragment, { children: [
1311
1311
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1312
1312
  "img",
1313
1313
  {
@@ -1322,13 +1322,13 @@ const ft = ({ attachment: e, isMyMessage: t }) => {
1322
1322
  children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Da(t)}` })
1323
1323
  }
1324
1324
  ) }),
1325
- /* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
1325
+ /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1326
1326
  n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Aa(t)}`, children: n }),
1327
1327
  a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Ra(t)}`, children: a }),
1328
1328
  d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${La(t)}`, children: d })
1329
1329
  ] })
1330
1330
  ] });
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 });
1331
+ return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
1332
1332
  };
1333
1333
  function bs(e) {
1334
1334
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
@@ -1369,7 +1369,7 @@ const Fa = ({
1369
1369
  },
1370
1370
  disabled: n,
1371
1371
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1372
- children: n ? /* @__PURE__ */ s(Se, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ u(V.Fragment, { children: [
1372
+ children: n ? /* @__PURE__ */ s(Se, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(j.Fragment, { children: [
1373
1373
  /* @__PURE__ */ s(Ee, { className: "size-4 text-white", weight: "bold" }),
1374
1374
  "Download"
1375
1375
  ] })
@@ -1388,12 +1388,12 @@ function pt(e) {
1388
1388
  (v) => v.type === "file" && v.asset_url
1389
1389
  ), i = t ?? n ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1390
1390
  if (!o) return null;
1391
- const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, f = t == null ? void 0 : t.thumb_url;
1391
+ const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, f = t == null ? void 0 : t.thumb_url;
1392
1392
  return {
1393
1393
  resolvedUrl: o,
1394
1394
  resolvedType: l,
1395
1395
  title: d,
1396
- fileSize: m,
1396
+ fileSize: u,
1397
1397
  thumbnailUrl: f
1398
1398
  };
1399
1399
  }
@@ -1459,9 +1459,9 @@ const vs = ({
1459
1459
  isMyMessage: t = !1
1460
1460
  }) => {
1461
1461
  const n = gt(e), a = pt(e);
1462
- return !n && !a ? null : /* @__PURE__ */ u("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1462
+ return !n && !a ? null : /* @__PURE__ */ m("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1463
1463
  !t && e.user && /* @__PURE__ */ s(
1464
- ne,
1464
+ se,
1465
1465
  {
1466
1466
  className: "str-chat__avatar str-chat__message-sender-avatar",
1467
1467
  id: e.user.id,
@@ -1537,7 +1537,7 @@ const vs = ({
1537
1537
  "data-testid": o
1538
1538
  }) => {
1539
1539
  const l = t != null && t !== "", d = Ga[Va(e)][a];
1540
- return /* @__PURE__ */ u(
1540
+ return /* @__PURE__ */ m(
1541
1541
  "div",
1542
1542
  {
1543
1543
  "data-testid": o,
@@ -1606,7 +1606,7 @@ const vs = ({
1606
1606
  mimeType: t,
1607
1607
  filename: n,
1608
1608
  items: a
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: [
1609
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], qa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1610
1610
  /* @__PURE__ */ s(
1611
1611
  "audio",
1612
1612
  {
@@ -1629,14 +1629,14 @@ const vs = ({
1629
1629
  preload: l,
1630
1630
  onDismiss: d
1631
1631
  }) => {
1632
- const m = Re(e), f = e === "composer" && !!d, h = Ya({ src: t, mimeType: n, filename: a, items: r });
1632
+ const u = Re(e), f = e === "composer" && !!d, h = Ya({ src: t, mimeType: n, filename: a, items: r });
1633
1633
  if (h.length === 0)
1634
1634
  return null;
1635
1635
  const g = l ?? (h.length > 1 ? "none" : "metadata");
1636
1636
  return /* @__PURE__ */ s(
1637
1637
  Me,
1638
1638
  {
1639
- variant: m,
1639
+ variant: u,
1640
1640
  text: i,
1641
1641
  groupPosition: o,
1642
1642
  "data-testid": "audio-attachment",
@@ -1722,7 +1722,7 @@ const sr = {
1722
1722
  activateLabel: o,
1723
1723
  trailingAction: l
1724
1724
  }) => {
1725
- const d = n ?? t ?? "File", m = tr(a, t, r), f = /* @__PURE__ */ s(
1725
+ const d = n ?? t ?? "File", u = tr(a, t, r), f = /* @__PURE__ */ s(
1726
1726
  "div",
1727
1727
  {
1728
1728
  className: k(
@@ -1735,19 +1735,19 @@ const sr = {
1735
1735
  weight: "regular"
1736
1736
  })
1737
1737
  }
1738
- ), h = /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
1738
+ ), h = /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
1739
1739
  /* @__PURE__ */ s("p", { className: "truncate font-medium leading-snug", children: d }),
1740
- m ? /* @__PURE__ */ s(
1740
+ u ? /* @__PURE__ */ s(
1741
1741
  "p",
1742
1742
  {
1743
1743
  className: k(
1744
1744
  "truncate text-xs leading-4",
1745
1745
  sr[e]
1746
1746
  ),
1747
- children: m
1747
+ children: u
1748
1748
  }
1749
1749
  ) : null
1750
- ] }), g = i ? /* @__PURE__ */ u(
1750
+ ] }), g = i ? /* @__PURE__ */ m(
1751
1751
  "button",
1752
1752
  {
1753
1753
  type: "button",
@@ -1762,11 +1762,11 @@ const sr = {
1762
1762
  h
1763
1763
  ]
1764
1764
  }
1765
- ) : /* @__PURE__ */ u(se, { children: [
1765
+ ) : /* @__PURE__ */ m(ne, { children: [
1766
1766
  f,
1767
1767
  h
1768
1768
  ] });
1769
- return /* @__PURE__ */ u("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1769
+ return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1770
1770
  g,
1771
1771
  l ? /* @__PURE__ */ s("div", { className: "shrink-0", children: l }) : null
1772
1772
  ] });
@@ -1823,7 +1823,7 @@ const rr = ({
1823
1823
  items: o,
1824
1824
  text: l,
1825
1825
  groupPosition: d,
1826
- onClick: m,
1826
+ onClick: u,
1827
1827
  onDismiss: f
1828
1828
  }) => {
1829
1829
  const h = Re(e), g = e === "composer" && !!f, c = rr({
@@ -1834,7 +1834,7 @@ const rr = ({
1834
1834
  title: i,
1835
1835
  items: o
1836
1836
  }), b = (x) => {
1837
- if ((m == null ? void 0 : m(x)) === !1) return;
1837
+ if ((u == null ? void 0 : u(x)) === !1) return;
1838
1838
  const p = c[x];
1839
1839
  if (!p) return;
1840
1840
  const _ = p.filename ?? ie(p.src);
@@ -1882,7 +1882,7 @@ const rr = ({
1882
1882
  onNext: t,
1883
1883
  prevLabel: n = "Previous",
1884
1884
  nextLabel: a = "Next"
1885
- }) => /* @__PURE__ */ u(se, { children: [
1885
+ }) => /* @__PURE__ */ m(ne, { children: [
1886
1886
  /* @__PURE__ */ s(
1887
1887
  "button",
1888
1888
  {
@@ -1912,7 +1912,7 @@ const rr = ({
1912
1912
  tone: i = "dark",
1913
1913
  onTriggered: o
1914
1914
  }) => {
1915
- const [l, d] = B(!1), m = J(
1915
+ const [l, d] = B(!1), u = J(
1916
1916
  (c) => {
1917
1917
  c.stopPropagation(), !l && (d(!0), _s(e, t).catch(() => {
1918
1918
  }).finally(() => {
@@ -1928,7 +1928,7 @@ const rr = ({
1928
1928
  "button",
1929
1929
  {
1930
1930
  type: "button",
1931
- onClick: m,
1931
+ onClick: u,
1932
1932
  disabled: l,
1933
1933
  "aria-label": a,
1934
1934
  className: k(
@@ -1958,17 +1958,17 @@ const rr = ({
1958
1958
  "button",
1959
1959
  {
1960
1960
  type: "button",
1961
- onClick: m,
1961
+ onClick: u,
1962
1962
  disabled: l,
1963
1963
  "aria-label": a,
1964
1964
  className: "mes-media-viewer__action",
1965
1965
  children: l ? /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ee, { size: 20, weight: "bold", "aria-hidden": !0 })
1966
1966
  }
1967
- ) : /* @__PURE__ */ u(
1967
+ ) : /* @__PURE__ */ m(
1968
1968
  "button",
1969
1969
  {
1970
1970
  type: "button",
1971
- onClick: m,
1971
+ onClick: u,
1972
1972
  disabled: l,
1973
1973
  "aria-label": f ? a : void 0,
1974
1974
  className: k(
@@ -2006,10 +2006,10 @@ const rr = ({
2006
2006
  }, [e]);
2007
2007
  return K(() => {
2008
2008
  if (!n || e <= 1) return;
2009
- const d = (m) => {
2010
- if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
2009
+ const d = (u) => {
2010
+ if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
2011
2011
  const f = document.activeElement;
2012
- f && (f.tagName === "VIDEO" || f.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
2012
+ f && (f.tagName === "VIDEO" || f.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? o() : l());
2013
2013
  };
2014
2014
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2015
2015
  }, [n, e, o, l]), { index: r, prev: o, next: l };
@@ -2068,7 +2068,7 @@ const rr = ({
2068
2068
  // `jsx-a11y` rules below don't model `<dialog>` as interactive, so
2069
2069
  // we silence them locally with the rationale captured here.
2070
2070
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
2071
- /* @__PURE__ */ u(
2071
+ /* @__PURE__ */ m(
2072
2072
  "dialog",
2073
2073
  {
2074
2074
  ref: l,
@@ -2082,9 +2082,9 @@ const rr = ({
2082
2082
  h.target === l.current && t();
2083
2083
  },
2084
2084
  children: [
2085
- /* @__PURE__ */ u("div", { className: "mes-media-viewer__chrome", children: [
2085
+ /* @__PURE__ */ m("div", { className: "mes-media-viewer__chrome", children: [
2086
2086
  a ? /* @__PURE__ */ s("span", { className: "mes-media-viewer__counter", children: a }) : null,
2087
- /* @__PURE__ */ u("div", { className: "mes-media-viewer__actions", children: [
2087
+ /* @__PURE__ */ m("div", { className: "mes-media-viewer__actions", children: [
2088
2088
  r,
2089
2089
  /* @__PURE__ */ s(
2090
2090
  "button",
@@ -2117,7 +2117,7 @@ const rr = ({
2117
2117
  () => (l == null ? void 0 : l.filename) ?? (l ? ie(l.src) : "image"),
2118
2118
  [l]
2119
2119
  );
2120
- return l ? /* @__PURE__ */ u(
2120
+ return l ? /* @__PURE__ */ m(
2121
2121
  _t,
2122
2122
  {
2123
2123
  open: e,
@@ -2167,25 +2167,25 @@ const rr = ({
2167
2167
  }) => {
2168
2168
  const r = e.length;
2169
2169
  if (r === 0) return null;
2170
- const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, f) => {
2170
+ const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, u, f) => {
2171
2171
  const h = k(ur, "h-full w-full");
2172
- return t ? /* @__PURE__ */ u(
2172
+ return t ? /* @__PURE__ */ m(
2173
2173
  "button",
2174
2174
  {
2175
2175
  type: "button",
2176
- onClick: () => t(m),
2177
- "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
2176
+ onClick: () => t(u),
2177
+ "aria-label": d.ariaLabel ?? `Open media ${u + 1}`,
2178
2178
  className: k(h, "cursor-zoom-in"),
2179
2179
  children: [
2180
2180
  d.content,
2181
2181
  f
2182
2182
  ]
2183
2183
  },
2184
- m
2185
- ) : /* @__PURE__ */ u("div", { className: h, children: [
2184
+ u
2185
+ ) : /* @__PURE__ */ m("div", { className: h, children: [
2186
2186
  d.content,
2187
2187
  f
2188
- ] }, m);
2188
+ ] }, u);
2189
2189
  };
2190
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(
2191
2191
  "div",
@@ -2194,9 +2194,9 @@ const rr = ({
2194
2194
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
2195
2195
  a
2196
2196
  ),
2197
- children: i.map((d, m) => l(d, m))
2197
+ children: i.map((d, u) => l(d, u))
2198
2198
  }
2199
- ) : i.length === 3 ? /* @__PURE__ */ u(
2199
+ ) : i.length === 3 ? /* @__PURE__ */ m(
2200
2200
  "div",
2201
2201
  {
2202
2202
  className: k(
@@ -2216,12 +2216,12 @@ const rr = ({
2216
2216
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
2217
2217
  a
2218
2218
  ),
2219
- children: i.map((d, m) => {
2220
- const f = o > 0 && m === i.length - 1;
2219
+ children: i.map((d, u) => {
2220
+ const f = o > 0 && u === i.length - 1;
2221
2221
  return l(
2222
2222
  d,
2223
- m,
2224
- f ? /* @__PURE__ */ u("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2223
+ u,
2224
+ f ? /* @__PURE__ */ m("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2225
2225
  "+",
2226
2226
  o
2227
2227
  ] }) : null
@@ -2261,10 +2261,10 @@ const rr = ({
2261
2261
  alt: n.alt,
2262
2262
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2263
2263
  })), fr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2264
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Le(
2264
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Le(
2265
2265
  r
2266
2266
  );
2267
- return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
2267
+ return /* @__PURE__ */ m("div", { className: "relative w-fit", children: [
2268
2268
  /* @__PURE__ */ s(
2269
2269
  "button",
2270
2270
  {
@@ -2292,7 +2292,7 @@ const rr = ({
2292
2292
  open: o,
2293
2293
  items: Cs([{ src: e, alt: t }], n),
2294
2294
  initialIndex: l,
2295
- onClose: m
2295
+ onClose: u
2296
2296
  }
2297
2297
  )
2298
2298
  ] });
@@ -2307,15 +2307,15 @@ const rr = ({
2307
2307
  loading: l = "lazy",
2308
2308
  onClick: d
2309
2309
  }) => {
2310
- const m = hr({ src: t, alt: n, items: r }), f = Re(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Le(
2310
+ const u = hr({ src: t, alt: n, items: r }), f = Re(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Le(
2311
2311
  d
2312
2312
  );
2313
- if (m.length === 0)
2313
+ if (u.length === 0)
2314
2314
  return null;
2315
- const v = m.map(
2316
- (x, p) => mr(x, p, m.length, l)
2315
+ const v = u.map(
2316
+ (x, p) => mr(x, p, u.length, l)
2317
2317
  );
2318
- return /* @__PURE__ */ u(
2318
+ return /* @__PURE__ */ m(
2319
2319
  Me,
2320
2320
  {
2321
2321
  variant: f,
@@ -2328,7 +2328,7 @@ const rr = ({
2328
2328
  ys,
2329
2329
  {
2330
2330
  open: h,
2331
- items: Cs(m, a),
2331
+ items: Cs(u, a),
2332
2332
  initialIndex: g,
2333
2333
  onClose: b
2334
2334
  }
@@ -2353,11 +2353,11 @@ const rr = ({
2353
2353
  }), l = t[r], d = re(
2354
2354
  () => (l == null ? void 0 : l.filename) ?? (l ? ie(l.src) : "document"),
2355
2355
  [l]
2356
- ), m = re(
2356
+ ), u = re(
2357
2357
  () => l ? wr(l.src) : void 0,
2358
2358
  [l]
2359
2359
  );
2360
- return !l || !m ? null : /* @__PURE__ */ u(
2360
+ return !l || !u ? null : /* @__PURE__ */ m(
2361
2361
  _t,
2362
2362
  {
2363
2363
  open: e,
@@ -2369,7 +2369,7 @@ const rr = ({
2369
2369
  /* @__PURE__ */ s(
2370
2370
  "iframe",
2371
2371
  {
2372
- src: m,
2372
+ src: u,
2373
2373
  title: d,
2374
2374
  className: "mes-media-viewer__iframe",
2375
2375
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
@@ -2428,18 +2428,18 @@ const rr = ({
2428
2428
  text: o,
2429
2429
  groupPosition: l,
2430
2430
  onClick: d,
2431
- onDismiss: m
2431
+ onDismiss: u
2432
2432
  }) => {
2433
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(
2434
2434
  d
2435
- ), x = e === "composer" && !!m;
2435
+ ), x = e === "composer" && !!u;
2436
2436
  if (h.length === 0)
2437
2437
  return null;
2438
2438
  const p = h.map((_) => ({
2439
2439
  src: _.src,
2440
2440
  filename: _.filename ?? ie(_.src)
2441
2441
  }));
2442
- return /* @__PURE__ */ u(
2442
+ return /* @__PURE__ */ m(
2443
2443
  Me,
2444
2444
  {
2445
2445
  variant: f,
@@ -2448,7 +2448,7 @@ const rr = ({
2448
2448
  "data-testid": "pdf-attachment",
2449
2449
  children: [
2450
2450
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((_, w) => {
2451
- const C = _.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: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2452
2452
  Ns,
2453
2453
  {
2454
2454
  url: _.src,
@@ -2500,7 +2500,7 @@ const rr = ({
2500
2500
  () => (l == null ? void 0 : l.filename) ?? (l ? ie(l.src) : "video"),
2501
2501
  [l]
2502
2502
  );
2503
- return l ? /* @__PURE__ */ u(
2503
+ return l ? /* @__PURE__ */ m(
2504
2504
  _t,
2505
2505
  {
2506
2506
  open: e,
@@ -2539,7 +2539,7 @@ const rr = ({
2539
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 = ({
2540
2540
  item: e,
2541
2541
  index: t
2542
- }) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
2542
+ }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
2543
2543
  e.poster ? /* @__PURE__ */ s(
2544
2544
  "img",
2545
2545
  {
@@ -2575,15 +2575,15 @@ const rr = ({
2575
2575
  preload: n.preload,
2576
2576
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2577
2577
  })), Mr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2578
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: f } = Le(
2578
+ const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: f } = Le(
2579
2579
  i
2580
2580
  );
2581
- return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
2581
+ return /* @__PURE__ */ m("div", { className: "relative w-fit", children: [
2582
2582
  /* @__PURE__ */ s(
2583
2583
  "button",
2584
2584
  {
2585
2585
  type: "button",
2586
- onClick: () => m(0),
2586
+ onClick: () => u(0),
2587
2587
  "aria-label": "Play video",
2588
2588
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2589
2589
  children: /* @__PURE__ */ s(Is, { item: { src: e, poster: t, mimeType: n }, index: 0 })
@@ -2613,17 +2613,17 @@ const rr = ({
2613
2613
  text: o,
2614
2614
  groupPosition: l,
2615
2615
  preload: d,
2616
- onClick: m
2616
+ onClick: u
2617
2617
  }) => {
2618
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(
2619
- m
2619
+ u
2620
2620
  );
2621
2621
  if (f.length === 0)
2622
2622
  return null;
2623
2623
  const x = f.map(
2624
2624
  (p, _) => Ir(p, _, f.length)
2625
2625
  );
2626
- return /* @__PURE__ */ u(
2626
+ return /* @__PURE__ */ m(
2627
2627
  Me,
2628
2628
  {
2629
2629
  variant: h,
@@ -2669,7 +2669,7 @@ const rr = ({
2669
2669
  function Pr(e) {
2670
2670
  return Te(As)[e] ?? Fr[e];
2671
2671
  }
2672
- const Or = V.lazy(() => import("./Card-qS17qnN0.js")), $r = V.lazy(() => import("./Card-Dvcwvr5y.js")), Ur = () => /* @__PURE__ */ s(
2672
+ const Or = j.lazy(() => import("./Card-qS17qnN0.js")), $r = j.lazy(() => import("./Card-DRuAkKPA.js")), Ur = () => /* @__PURE__ */ s(
2673
2673
  "div",
2674
2674
  {
2675
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)]",
@@ -2727,7 +2727,7 @@ const Or = V.lazy(() => import("./Card-qS17qnN0.js")), $r = V.lazy(() => import(
2727
2727
  const g = (h = e.metadata) == null ? void 0 : h.amount_text;
2728
2728
  if (!g) return null;
2729
2729
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${g} tip` : `Delivered with ${g} tip`;
2730
- return /* @__PURE__ */ u("div", { className: c, children: [
2730
+ return /* @__PURE__ */ m("div", { className: c, children: [
2731
2731
  /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2732
2732
  /* @__PURE__ */ s("span", { children: b })
2733
2733
  ] });
@@ -2736,19 +2736,19 @@ const Or = V.lazy(() => import("./Card-qS17qnN0.js")), $r = V.lazy(() => import(
2736
2736
  "message-chatbot-indicator",
2737
2737
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2738
2738
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
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 }) });
2740
- return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ u(se, { children: [
2741
- m,
2739
+ ].join(" "), u = /* @__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 }) });
2740
+ return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ m(ne, { children: [
2741
+ u,
2742
2742
  f
2743
- ] }) : /* @__PURE__ */ u(se, { children: [
2743
+ ] }) : /* @__PURE__ */ m(ne, { children: [
2744
2744
  f,
2745
- m
2745
+ u
2746
2746
  ] }) });
2747
2747
  }, qr = ({
2748
2748
  selected: e,
2749
2749
  onVoteUp: t,
2750
2750
  onVoteDown: n
2751
- }) => /* @__PURE__ */ u("div", { className: "message-vote-buttons", children: [
2751
+ }) => /* @__PURE__ */ m("div", { className: "message-vote-buttons", children: [
2752
2752
  /* @__PURE__ */ s(
2753
2753
  "button",
2754
2754
  {
@@ -2786,7 +2786,7 @@ const Or = V.lazy(() => import("./Card-qS17qnN0.js")), $r = V.lazy(() => import(
2786
2786
  return r.id;
2787
2787
  }
2788
2788
  })();
2789
- return e.id !== n ? null : /* @__PURE__ */ u(se, { children: [
2789
+ return e.id !== n ? null : /* @__PURE__ */ m(ne, { children: [
2790
2790
  /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2791
2791
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2792
2792
  ] });
@@ -2859,7 +2859,7 @@ const Jr = {
2859
2859
  cta: o,
2860
2860
  trailingAction: l
2861
2861
  }) => {
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;
2862
+ const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", f = u.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", b = o != null;
2863
2863
  if (!f && !h && !c && !b) return null;
2864
2864
  const x = k(
2865
2865
  "truncate text-base font-medium leading-6",
@@ -2868,13 +2868,13 @@ const Jr = {
2868
2868
  "truncate text-xs leading-4",
2869
2869
  si[e]
2870
2870
  );
2871
- return /* @__PURE__ */ u("div", { className: "px-4 py-3", children: [
2872
- /* @__PURE__ */ u("div", { className: "flex items-end gap-3", children: [
2873
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2874
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1", children: [
2875
- f && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
2871
+ return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
2872
+ /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
2873
+ /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2874
+ /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
2875
+ f && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
2876
2876
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
2877
- /* @__PURE__ */ s("p", { className: k("min-w-0", x), children: m })
2877
+ /* @__PURE__ */ s("p", { className: k("min-w-0", x), children: u })
2878
2878
  ] }),
2879
2879
  h && /* @__PURE__ */ s("p", { className: p, children: a })
2880
2880
  ] }),
@@ -2902,15 +2902,15 @@ const Jr = {
2902
2902
  bgClassName: l,
2903
2903
  "data-testid": d
2904
2904
  }) => {
2905
- const m = n != null || a != null, f = k(
2905
+ const u = n != null || a != null, f = k(
2906
2906
  ni,
2907
2907
  l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
2908
2908
  // `focus-ring` is a design-system utility from the component-library
2909
2909
  // tailwind preset — outline-none + a black 2px focus-visible ring
2910
2910
  // with offset, so keyboard users can see the focused card.
2911
- m ? "cursor-pointer no-underline focus-ring" : null
2911
+ u ? "cursor-pointer no-underline focus-ring" : null
2912
2912
  ), h = o ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
2913
- return n ? /* @__PURE__ */ u(
2913
+ return n ? /* @__PURE__ */ m(
2914
2914
  "a",
2915
2915
  {
2916
2916
  ref: i,
@@ -2925,7 +2925,7 @@ const Jr = {
2925
2925
  h
2926
2926
  ]
2927
2927
  }
2928
- ) : a ? /* @__PURE__ */ u(
2928
+ ) : a ? /* @__PURE__ */ m(
2929
2929
  "button",
2930
2930
  {
2931
2931
  ref: i,
@@ -2939,7 +2939,7 @@ const Jr = {
2939
2939
  h
2940
2940
  ]
2941
2941
  }
2942
- ) : /* @__PURE__ */ u(
2942
+ ) : /* @__PURE__ */ m(
2943
2943
  "div",
2944
2944
  {
2945
2945
  ref: i,
@@ -2970,7 +2970,7 @@ const Jr = {
2970
2970
  topLeft: i,
2971
2971
  topRight: o
2972
2972
  }) => {
2973
- const l = ce(r), d = !!n && l === "video", m = he(t);
2973
+ const l = ce(r), d = !!n && l === "video", u = he(t);
2974
2974
  return Ye(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2975
2975
  "audio",
2976
2976
  {
@@ -2980,7 +2980,7 @@ const Jr = {
2980
2980
  className: "block w-full",
2981
2981
  children: /* @__PURE__ */ s("track", { kind: "captions" })
2982
2982
  }
2983
- ) }) : /* @__PURE__ */ u(
2983
+ ) }) : /* @__PURE__ */ m(
2984
2984
  "div",
2985
2985
  {
2986
2986
  className: k(
@@ -2992,7 +2992,7 @@ const Jr = {
2992
2992
  "video",
2993
2993
  {
2994
2994
  src: n,
2995
- poster: m,
2995
+ poster: u,
2996
2996
  controls: !0,
2997
2997
  playsInline: !0,
2998
2998
  preload: "metadata",
@@ -3002,7 +3002,7 @@ const Jr = {
3002
3002
  ) : t ? /* @__PURE__ */ s(
3003
3003
  "img",
3004
3004
  {
3005
- src: m ?? t,
3005
+ src: u ?? t,
3006
3006
  alt: a ?? "",
3007
3007
  draggable: !1,
3008
3008
  className: "absolute inset-0 h-full w-full object-cover"
@@ -3035,7 +3035,7 @@ const Jr = {
3035
3035
  sourceUrl: o,
3036
3036
  layout: l = "featured",
3037
3037
  appIcon: d,
3038
- cta: m,
3038
+ cta: u,
3039
3039
  onDismiss: f,
3040
3040
  onEditClick: h
3041
3041
  }) => {
@@ -3058,7 +3058,7 @@ const Jr = {
3058
3058
  children: /* @__PURE__ */ s(Zn, { className: "size-5", weight: "regular" })
3059
3059
  }
3060
3060
  ) : void 0;
3061
- return c ? /* @__PURE__ */ s(Be, { variant: "dark", bgClassName: Et, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pr-3", children: [
3061
+ return c ? /* @__PURE__ */ s(Be, { variant: "dark", bgClassName: Et, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3062
3062
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3063
3063
  je,
3064
3064
  {
@@ -3069,7 +3069,7 @@ const Jr = {
3069
3069
  }
3070
3070
  ) }),
3071
3071
  b && /* @__PURE__ */ s("div", { className: "shrink-0", children: b })
3072
- ] }) }) : /* @__PURE__ */ u(
3072
+ ] }) }) : /* @__PURE__ */ m(
3073
3073
  Be,
3074
3074
  {
3075
3075
  variant: "dark",
@@ -3095,7 +3095,7 @@ const Jr = {
3095
3095
  description: n,
3096
3096
  url: a,
3097
3097
  appIcon: d,
3098
- cta: m,
3098
+ cta: u,
3099
3099
  trailingAction: v
3100
3100
  }
3101
3101
  )
@@ -3112,16 +3112,16 @@ const Jr = {
3112
3112
  layout: o = "featured",
3113
3113
  appIcon: l,
3114
3114
  cta: d,
3115
- onClick: m
3115
+ onClick: u
3116
3116
  }) => {
3117
- const f = St(a, i), h = kt(n), g = d == null && h != null && !f ? h : void 0, c = d == null && !f ? m : void 0, b = Ye(a, i) ? Et : void 0, v = d && m ? {
3117
+ const f = St(a, i), h = kt(n), g = d == null && h != null && !f ? h : void 0, c = d == null && !f ? u : void 0, b = Ye(a, i) ? Et : void 0, v = d && u ? {
3118
3118
  ...d,
3119
3119
  onClick: () => {
3120
3120
  var x;
3121
- m(), (x = d.onClick) == null || x.call(d);
3121
+ u(), (x = d.onClick) == null || x.call(d);
3122
3122
  }
3123
3123
  } : d;
3124
- return /* @__PURE__ */ u(
3124
+ return /* @__PURE__ */ m(
3125
3125
  Be,
3126
3126
  {
3127
3127
  variant: "light",
@@ -3165,11 +3165,11 @@ const Jr = {
3165
3165
  sourceUrl: o,
3166
3166
  layout: l = "featured",
3167
3167
  appIcon: d,
3168
- cta: m,
3168
+ cta: u,
3169
3169
  onClick: f
3170
3170
  }) => {
3171
- const h = St(r, o), g = kt(a), c = m == null && g != null && !h ? g : void 0, b = m == null && !h && c != null ? f : void 0;
3172
- return /* @__PURE__ */ u(
3171
+ const h = St(r, o), g = kt(a), c = u == null && g != null && !h ? g : void 0, b = u == null && !h && c != null ? f : void 0;
3172
+ return /* @__PURE__ */ m(
3173
3173
  Be,
3174
3174
  {
3175
3175
  variant: "dark",
@@ -3196,7 +3196,7 @@ const Jr = {
3196
3196
  description: n,
3197
3197
  url: a,
3198
3198
  appIcon: d,
3199
- cta: m
3199
+ cta: u
3200
3200
  }
3201
3201
  )
3202
3202
  ]
@@ -3404,7 +3404,7 @@ const pi = ({
3404
3404
  var b;
3405
3405
  const r = Ds(n.attachments);
3406
3406
  if (r.length === 0) return null;
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;
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, u = o && ci(o, d) ? void 0 : o;
3408
3408
  let f = 0;
3409
3409
  const h = [], g = (v, x) => {
3410
3410
  const p = t ? Jt.Sent : Jt.Received;
@@ -3437,8 +3437,8 @@ const pi = ({
3437
3437
  return;
3438
3438
  }
3439
3439
  c(v, `media-${x}`);
3440
- }), /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3441
- /* @__PURE__ */ u(
3440
+ }), /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3441
+ /* @__PURE__ */ m(
3442
3442
  "div",
3443
3443
  {
3444
3444
  className: "str-chat__message-bubble",
@@ -3451,11 +3451,11 @@ const pi = ({
3451
3451
  },
3452
3452
  children: [
3453
3453
  h,
3454
- !m && /* @__PURE__ */ s(nt, {})
3454
+ !u && /* @__PURE__ */ s(nt, {})
3455
3455
  ]
3456
3456
  }
3457
3457
  ),
3458
- m ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
3458
+ u ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
3459
3459
  /* @__PURE__ */ s(
3460
3460
  $e,
3461
3461
  {
@@ -3477,7 +3477,7 @@ const pi = ({
3477
3477
  groupedByUser: o,
3478
3478
  handleAction: l,
3479
3479
  handleOpenThread: d,
3480
- handleRetry: m,
3480
+ handleRetry: u,
3481
3481
  highlighted: f,
3482
3482
  isMessageAIGenerated: h,
3483
3483
  isMyMessage: g,
@@ -3491,7 +3491,7 @@ const pi = ({
3491
3491
  MessageActions: M,
3492
3492
  MessageBlocked: P = en,
3493
3493
  MessageBouncePrompt: $ = tn,
3494
- MessageDeleted: j = sn,
3494
+ MessageDeleted: V = sn,
3495
3495
  MessageIsThreadReplyInChannelButtonIndicator: Q = nn,
3496
3496
  MessageRepliesCountButton: ee = an,
3497
3497
  ReminderNotification: X = rn,
@@ -3522,12 +3522,12 @@ const pi = ({
3522
3522
  if (dn(c))
3523
3523
  return null;
3524
3524
  if (c.deleted_at || c.type === "deleted")
3525
- return /* @__PURE__ */ s(j, { message: c });
3525
+ return /* @__PURE__ */ s(V, { message: c });
3526
3526
  if (un(c))
3527
3527
  return /* @__PURE__ */ s(P, {});
3528
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);
3529
3529
  let ge;
3530
- le ? ge = () => m(c) : Tt && (ge = () => O(!0));
3530
+ le ? ge = () => u(c) : Tt && (ge = () => O(!0));
3531
3531
  const te = g(), Us = k(
3532
3532
  "str-chat__message str-chat__message-simple",
3533
3533
  `str-chat__message--${c.type}`,
@@ -3560,7 +3560,7 @@ const pi = ({
3560
3560
  paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3561
3561
  onFetchSource: D ? () => D(c, _) : void 0
3562
3562
  };
3563
- return /* @__PURE__ */ u(se, { children: [
3563
+ return /* @__PURE__ */ m(ne, { children: [
3564
3564
  a && /* @__PURE__ */ s(
3565
3565
  T,
3566
3566
  {
@@ -3575,7 +3575,7 @@ const pi = ({
3575
3575
  open: R
3576
3576
  }
3577
3577
  ),
3578
- /* @__PURE__ */ u(
3578
+ /* @__PURE__ */ m(
3579
3579
  "div",
3580
3580
  {
3581
3581
  className: Us,
@@ -3585,7 +3585,7 @@ const pi = ({
3585
3585
  A && /* @__PURE__ */ s(A, {}),
3586
3586
  !!F && /* @__PURE__ */ s(X, { reminder: F }),
3587
3587
  c.user && /* @__PURE__ */ s(
3588
- ne,
3588
+ se,
3589
3589
  {
3590
3590
  className: "str-chat__avatar str-chat__message-sender-avatar",
3591
3591
  id: c.user.id,
@@ -3613,7 +3613,7 @@ const pi = ({
3613
3613
  marginInlineEnd: 0,
3614
3614
  marginInlineStart: 0
3615
3615
  },
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: [
3616
+ children: Mt ? /* @__PURE__ */ s(Qe, { message: c, standalone: !0 }) : Gr(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3617
3617
  te && M && /* @__PURE__ */ s(M, {}),
3618
3618
  te ? /* @__PURE__ */ s(
3619
3619
  Pe,
@@ -3631,8 +3631,8 @@ const pi = ({
3631
3631
  }
3632
3632
  ),
3633
3633
  !te && M && /* @__PURE__ */ s(M, {})
3634
- ] }) }) : Hr(c) ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3635
- /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3634
+ ] }) }) : Hr(c) ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3635
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3636
3636
  te && M && /* @__PURE__ */ s(M, {}),
3637
3637
  te ? /* @__PURE__ */ s(
3638
3638
  Pe,
@@ -3675,7 +3675,7 @@ const pi = ({
3675
3675
  },
3676
3676
  renderText: b
3677
3677
  }
3678
- ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
3678
+ ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
3679
3679
  pe && !At && /* @__PURE__ */ s(
3680
3680
  Qe,
3681
3681
  {
@@ -3709,7 +3709,7 @@ const pi = ({
3709
3709
  ] }) })
3710
3710
  }
3711
3711
  ),
3712
- !Bs && !Mt && /* @__PURE__ */ u("div", { className: "str-chat__message-footer", children: [
3712
+ !Bs && !Mt && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3713
3713
  (!pe || At) && /* @__PURE__ */ s(
3714
3714
  Qe,
3715
3715
  {
@@ -3741,7 +3741,7 @@ const pi = ({
3741
3741
  c.id
3742
3742
  )
3743
3743
  ] });
3744
- }, vi = V.memo(
3744
+ }, vi = j.memo(
3745
3745
  bi,
3746
3746
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
3747
3747
  ), xi = (e) => {
@@ -3789,7 +3789,7 @@ const pi = ({
3789
3789
  onDismiss: t
3790
3790
  }) => {
3791
3791
  const { og_scrape_url: n, title: a, image_url: r } = e;
3792
- return /* @__PURE__ */ u(
3792
+ return /* @__PURE__ */ m(
3793
3793
  "a",
3794
3794
  {
3795
3795
  href: n,
@@ -3817,7 +3817,7 @@ const pi = ({
3817
3817
  children: /* @__PURE__ */ s(Ge, { className: "size-4 text-black/90" })
3818
3818
  }
3819
3819
  ),
3820
- /* @__PURE__ */ u("div", { className: "p-2", children: [
3820
+ /* @__PURE__ */ m("div", { className: "p-2", children: [
3821
3821
  a && /* @__PURE__ */ s("div", { className: "truncate text-[14px] font-medium leading-5 text-white", children: a }),
3822
3822
  /* @__PURE__ */ s("div", { className: "truncate text-[12px] leading-4 text-white/55", children: n })
3823
3823
  ] })
@@ -3846,7 +3846,7 @@ const pi = ({
3846
3846
  // fixed-height hero would spill out of the collapsed card box.
3847
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)) })
3848
3848
  ) : null;
3849
- }, It = V.createContext(!1), gl = () => Te(It), Si = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3849
+ }, It = j.createContext(!1), gl = () => Te(It), Si = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3850
3850
  "button",
3851
3851
  {
3852
3852
  ...n,
@@ -3870,7 +3870,7 @@ const pi = ({
3870
3870
  // content height and the squeeze never reaches the preview list. Stream's
3871
3871
  // <MessageInput> renders its Input directly (context providers only, no
3872
3872
  // wrapper element), so this is a direct flex item of that row.
3873
- /* @__PURE__ */ u(
3873
+ /* @__PURE__ */ m(
3874
3874
  "div",
3875
3875
  {
3876
3876
  className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
@@ -3879,7 +3879,7 @@ const pi = ({
3879
3879
  /* @__PURE__ */ s(_n, {}),
3880
3880
  /* @__PURE__ */ s(Ci, {}),
3881
3881
  /* @__PURE__ */ s(i, {}),
3882
- /* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
3882
+ /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3883
3883
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3884
3884
  Nn,
3885
3885
  {
@@ -3915,25 +3915,61 @@ const pi = ({
3915
3915
  disabledReason: a,
3916
3916
  composerInput: r
3917
3917
  }) => {
3918
- var l;
3919
- const { channel: i } = oe(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
3920
- return n ? /* @__PURE__ */ u(se, { children: [
3921
- /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
3922
- t == null ? void 0 : t()
3923
- ] }) : /* @__PURE__ */ u("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
3924
- /* @__PURE__ */ u(
3925
- "div",
3926
- {
3927
- inert: o ? "" : void 0,
3928
- "aria-disabled": o || void 0,
3929
- className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3930
- children: [
3931
- e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3932
- /* @__PURE__ */ s(It.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ei }) })
3933
- ]
3934
- }
3935
- ),
3936
- t == null ? void 0 : t()
3918
+ var d;
3919
+ const { channel: i } = oe(), o = ((d = i == null ? void 0 : i.data) == null ? void 0 : d.frozen) === !0, l = j.useRef(null);
3920
+ return j.useEffect(() => {
3921
+ const u = l.current, f = u == null ? void 0 : u.parentElement;
3922
+ if (!u || !f)
3923
+ return;
3924
+ const h = () => {
3925
+ f.style.setProperty(
3926
+ "--messaging-composer-height",
3927
+ `${u.offsetHeight + 16}px`
3928
+ );
3929
+ };
3930
+ if (h(), typeof ResizeObserver > "u")
3931
+ return;
3932
+ const g = new ResizeObserver(h);
3933
+ return g.observe(u), () => {
3934
+ g.disconnect(), f.style.removeProperty("--messaging-composer-height");
3935
+ };
3936
+ }, []), n ? /* @__PURE__ */ m("div", { ref: l, className: "messaging-composer-chrome", children: [
3937
+ /* @__PURE__ */ m("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
3938
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3939
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3940
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3941
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3942
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3943
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-gradient" })
3944
+ ] }),
3945
+ /* @__PURE__ */ m("div", { className: "relative z-10 flex flex-col", children: [
3946
+ /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
3947
+ t == null ? void 0 : t()
3948
+ ] })
3949
+ ] }) : /* @__PURE__ */ m("div", { ref: l, className: "messaging-composer-chrome", children: [
3950
+ /* @__PURE__ */ m("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
3951
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3952
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3953
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3954
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3955
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
3956
+ /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-gradient" })
3957
+ ] }),
3958
+ /* @__PURE__ */ m("div", { className: "relative z-10 flex min-h-0 flex-col gap-4 p-4", children: [
3959
+ /* @__PURE__ */ m(
3960
+ "div",
3961
+ {
3962
+ inert: o ? "" : void 0,
3963
+ "aria-disabled": o || void 0,
3964
+ className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3965
+ children: [
3966
+ e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3967
+ /* @__PURE__ */ s(It.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ei }) })
3968
+ ]
3969
+ }
3970
+ ),
3971
+ t == null ? void 0 : t()
3972
+ ] })
3937
3973
  ] });
3938
3974
  }, Ti = [
3939
3975
  "SYSTEM_DM_AGENT_PAUSED",
@@ -3969,7 +4005,7 @@ const pi = ({
3969
4005
  if (t === -1)
3970
4006
  return e;
3971
4007
  const n = t + tt.length;
3972
- return /* @__PURE__ */ u(se, { children: [
4008
+ return /* @__PURE__ */ m(ne, { children: [
3973
4009
  e.slice(0, t),
3974
4010
  /* @__PURE__ */ s(
3975
4011
  "a",
@@ -3990,8 +4026,8 @@ const pi = ({
3990
4026
  );
3991
4027
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3992
4028
  const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Mi[n.type];
3993
- return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3994
- /* @__PURE__ */ u(
4029
+ return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4030
+ /* @__PURE__ */ m(
3995
4031
  "div",
3996
4032
  {
3997
4033
  className: "mes-dm-agent-system-message mx-auto mb-2 inline-flex w-fit max-w-[min(100%,480px)] items-center justify-center gap-[10px] rounded-[12px] border border-[rgba(0,0,0,0.08)] p-3 text-[rgba(0,0,0,0.55)]",
@@ -4016,8 +4052,8 @@ const pi = ({
4016
4052
  }
4017
4053
  if ((n == null ? void 0 : n.kind) === "age-safety") {
4018
4054
  const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ri[n.type];
4019
- return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4020
- /* @__PURE__ */ u(
4055
+ return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4056
+ /* @__PURE__ */ m(
4021
4057
  "div",
4022
4058
  {
4023
4059
  className: "mes-age-safety-system-message box-border mx-auto mb-2 flex w-full max-w-[329px] items-start justify-center gap-3 rounded-[12px] border border-[var(--border-secondary,rgba(0,0,0,0.08))] bg-[var(--bg-warning-subtle,#fef3c6)] px-2 py-4 pl-5 text-[color:var(--text-warning-on-warning,#894b00)]",
@@ -4041,8 +4077,8 @@ const pi = ({
4041
4077
  !t && /* @__PURE__ */ s(Xe, { message: e.message })
4042
4078
  ] });
4043
4079
  }
4044
- return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4045
- /* @__PURE__ */ u("div", { className: "str-chat__message--system__text", children: [
4080
+ return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4081
+ /* @__PURE__ */ m("div", { className: "str-chat__message--system__text", children: [
4046
4082
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" }),
4047
4083
  /* @__PURE__ */ s("p", { children: e.message.text }),
4048
4084
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
@@ -4080,7 +4116,7 @@ const pi = ({
4080
4116
  }
4081
4117
  if ((n == null ? void 0 : n.typing_events) === !1)
4082
4118
  return null;
4083
- const m = e ? [] : Object.values(i).filter(
4119
+ const u = e ? [] : Object.values(i).filter(
4084
4120
  ({ parent_id: x, user: p }) => {
4085
4121
  var _;
4086
4122
  return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && !x;
@@ -4090,7 +4126,7 @@ const pi = ({
4090
4126
  var _;
4091
4127
  return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && x === (a == null ? void 0 : a.id);
4092
4128
  }
4093
- ) : [], h = e ? f : m;
4129
+ ) : [], h = e ? f : u;
4094
4130
  if (!h.length)
4095
4131
  return null;
4096
4132
  const g = (v = h[0]) == null ? void 0 : v.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
@@ -4116,9 +4152,9 @@ const pi = ({
4116
4152
  style: {
4117
4153
  marginBottom: "var(--messaging-channel-input-spacer-height, 80px)"
4118
4154
  },
4119
- children: /* @__PURE__ */ u("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4155
+ children: /* @__PURE__ */ m("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4120
4156
  /* @__PURE__ */ s(
4121
- ne,
4157
+ se,
4122
4158
  {
4123
4159
  className: "str-chat__avatar str-chat__message-sender-avatar",
4124
4160
  id: e,
@@ -4128,7 +4164,7 @@ const pi = ({
4128
4164
  shape: "circle"
4129
4165
  }
4130
4166
  ),
4131
- /* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ u(
4167
+ /* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ m(
4132
4168
  "svg",
4133
4169
  {
4134
4170
  "aria-hidden": "true",
@@ -4156,12 +4192,12 @@ function Ui(e, t) {
4156
4192
  return i;
4157
4193
  }
4158
4194
  }
4159
- const Bi = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ u(
4195
+ const Bi = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ m(
4160
4196
  "div",
4161
4197
  {
4162
4198
  className: k("flex items-center justify-center h-full", e),
4163
4199
  children: [
4164
- /* @__PURE__ */ u("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4200
+ /* @__PURE__ */ m("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4165
4201
  /* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
4166
4202
  "animateTransform",
4167
4203
  {
@@ -4199,7 +4235,7 @@ const Bi = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ u(
4199
4235
  t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
4200
4236
  ]
4201
4237
  }
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: [
4238
+ ), Ve = j.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
4203
4239
  /* @__PURE__ */ s(ji, { className: "w-6 h-6" }),
4204
4240
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4205
4241
  ] }) }));
@@ -4214,7 +4250,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4214
4250
  showDeleteConversation: o = !0,
4215
4251
  showBlockParticipant: l = !0,
4216
4252
  showReportParticipant: d = !0,
4217
- onDeleteConversationClick: m,
4253
+ onDeleteConversationClick: u,
4218
4254
  onBlockParticipantClick: f,
4219
4255
  onReportParticipantClick: h,
4220
4256
  customChannelActions: g,
@@ -4224,11 +4260,11 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4224
4260
  renderHeaderTitleBadges: x
4225
4261
  }) => {
4226
4262
  var I, y, T, M, P, $;
4227
- const { channel: p } = oe(), { client: _ } = fe(), w = V.useMemo(
4263
+ const { channel: p } = oe(), { client: _ } = fe(), w = j.useMemo(
4228
4264
  () => {
4229
- var j;
4265
+ var V;
4230
4266
  return He(
4231
- (j = p.state) == null ? void 0 : j.members,
4267
+ (V = p.state) == null ? void 0 : V.members,
4232
4268
  _ == null ? void 0 : _.userID,
4233
4269
  p.type
4234
4270
  );
@@ -4237,21 +4273,21 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4237
4273
  ), 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({
4238
4274
  channel: p,
4239
4275
  participant: w
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: [
4276
+ }), 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__ */ m(ne, { children: [
4241
4277
  /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: C }),
4242
4278
  R && /* @__PURE__ */ s("span", { className: "shrink-0", children: R })
4243
4279
  ] }), S = async () => {
4244
4280
  try {
4245
4281
  E ? await p.unpin() : await p.pin();
4246
- } catch (j) {
4282
+ } catch (V) {
4247
4283
  console.error(
4248
4284
  "[CustomChannelHeader] Failed to update pinned status:",
4249
- j
4285
+ V
4250
4286
  );
4251
4287
  }
4252
4288
  };
4253
- return /* @__PURE__ */ u("div", { className: "@container", children: [
4254
- /* @__PURE__ */ u("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden px-6 py-3", children: [
4289
+ return /* @__PURE__ */ m("div", { className: "@container", children: [
4290
+ /* @__PURE__ */ m("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden px-6 py-3", children: [
4255
4291
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ s(
4256
4292
  "button",
4257
4293
  {
@@ -4271,7 +4307,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4271
4307
  {
4272
4308
  className: "flex flex-col gap-1 items-center",
4273
4309
  "data-dd-privacy": "mask",
4274
- children: v ? /* @__PURE__ */ u(
4310
+ children: v ? /* @__PURE__ */ m(
4275
4311
  "button",
4276
4312
  {
4277
4313
  type: "button",
@@ -4283,7 +4319,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4283
4319
  ),
4284
4320
  children: [
4285
4321
  /* @__PURE__ */ s(
4286
- ne,
4322
+ se,
4287
4323
  {
4288
4324
  id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || p.id || "unknown",
4289
4325
  name: C,
@@ -4293,19 +4329,19 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4293
4329
  size: 48
4294
4330
  }
4295
4331
  ),
4296
- /* @__PURE__ */ u("span", { className: "flex max-w-full items-center gap-0.5", children: [
4332
+ /* @__PURE__ */ m("span", { className: "flex max-w-full items-center gap-0.5", children: [
4297
4333
  L,
4298
4334
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0", weight: "bold" })
4299
4335
  ] }),
4300
- a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4336
+ a && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4301
4337
  /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
4302
4338
  /* @__PURE__ */ s("span", { children: Oe })
4303
4339
  ] })
4304
4340
  ]
4305
4341
  }
4306
- ) : /* @__PURE__ */ u("div", { className: O, children: [
4342
+ ) : /* @__PURE__ */ m("div", { className: O, children: [
4307
4343
  /* @__PURE__ */ s(
4308
- ne,
4344
+ se,
4309
4345
  {
4310
4346
  id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || p.id || "unknown",
4311
4347
  name: C,
@@ -4315,7 +4351,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4315
4351
  size: 48
4316
4352
  }
4317
4353
  ),
4318
- /* @__PURE__ */ u("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
4354
+ /* @__PURE__ */ m("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
4319
4355
  L,
4320
4356
  /* @__PURE__ */ s(
4321
4357
  xe,
@@ -4325,14 +4361,14 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4325
4361
  }
4326
4362
  )
4327
4363
  ] }),
4328
- a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4364
+ a && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4329
4365
  /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
4330
4366
  /* @__PURE__ */ s("span", { children: Oe })
4331
4367
  ] })
4332
4368
  ] })
4333
4369
  }
4334
4370
  ),
4335
- /* @__PURE__ */ u("div", { className: "flex justify-end items-center gap-2", children: [
4371
+ /* @__PURE__ */ m("div", { className: "flex justify-end items-center gap-2", children: [
4336
4372
  n && /* @__PURE__ */ s(
4337
4373
  "button",
4338
4374
  {
@@ -4362,7 +4398,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4362
4398
  showReportParticipant: d,
4363
4399
  onLeaveConversation: r,
4364
4400
  onBlockParticipant: i,
4365
- onDeleteConversationClick: m,
4401
+ onDeleteConversationClick: u,
4366
4402
  onBlockParticipantClick: f,
4367
4403
  onReportParticipantClick: h,
4368
4404
  customChannelActions: g,
@@ -4371,8 +4407,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4371
4407
  ))
4372
4408
  ] })
4373
4409
  ] }),
4374
- /* @__PURE__ */ u("div", { className: "px-6 py-3 hidden @lg:flex items-center justify-between gap-3 min-h-12 border-b border-b-black/[0.08]", children: [
4375
- /* @__PURE__ */ u("div", { className: "flex items-center gap-4 min-w-0", "data-dd-privacy": "mask", children: [
4410
+ /* @__PURE__ */ m("div", { className: "px-6 py-3 hidden @lg:flex items-center justify-between gap-3 min-h-12 border-b border-b-black/[0.08]", children: [
4411
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-4 min-w-0", "data-dd-privacy": "mask", children: [
4376
4412
  t && e && /* @__PURE__ */ s(
4377
4413
  "button",
4378
4414
  {
@@ -4386,7 +4422,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4386
4422
  children: /* @__PURE__ */ s(at, { className: "size-5 text-black/90" })
4387
4423
  }
4388
4424
  ),
4389
- v ? /* @__PURE__ */ u(
4425
+ v ? /* @__PURE__ */ m(
4390
4426
  "button",
4391
4427
  {
4392
4428
  type: "button",
@@ -4398,7 +4434,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4398
4434
  ),
4399
4435
  children: [
4400
4436
  /* @__PURE__ */ s(
4401
- ne,
4437
+ se,
4402
4438
  {
4403
4439
  id: ((P = w == null ? void 0 : w.user) == null ? void 0 : P.id) || p.id || "unknown",
4404
4440
  name: C,
@@ -4408,21 +4444,21 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4408
4444
  size: 48
4409
4445
  }
4410
4446
  ),
4411
- /* @__PURE__ */ u("div", { className: "min-w-0", children: [
4412
- /* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4447
+ /* @__PURE__ */ m("div", { className: "min-w-0", children: [
4448
+ /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4413
4449
  L,
4414
4450
  /* @__PURE__ */ s(xe, { className: "size-4 shrink-0", weight: "bold" })
4415
4451
  ] }),
4416
- a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4452
+ a && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4417
4453
  /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
4418
4454
  /* @__PURE__ */ s("span", { className: "truncate", children: Oe })
4419
4455
  ] })
4420
4456
  ] })
4421
4457
  ]
4422
4458
  }
4423
- ) : /* @__PURE__ */ u("div", { className: F, children: [
4459
+ ) : /* @__PURE__ */ m("div", { className: F, children: [
4424
4460
  /* @__PURE__ */ s(
4425
- ne,
4461
+ se,
4426
4462
  {
4427
4463
  id: (($ = w == null ? void 0 : w.user) == null ? void 0 : $.id) || p.id || "unknown",
4428
4464
  name: C,
@@ -4432,8 +4468,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4432
4468
  size: 48
4433
4469
  }
4434
4470
  ),
4435
- /* @__PURE__ */ u("div", { className: "min-w-0", children: [
4436
- /* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4471
+ /* @__PURE__ */ m("div", { className: "min-w-0", children: [
4472
+ /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4437
4473
  L,
4438
4474
  /* @__PURE__ */ s(
4439
4475
  xe,
@@ -4443,14 +4479,14 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4443
4479
  }
4444
4480
  )
4445
4481
  ] }),
4446
- a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4482
+ a && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4447
4483
  /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
4448
4484
  /* @__PURE__ */ s("span", { className: "truncate", children: Oe })
4449
4485
  ] })
4450
4486
  ] })
4451
4487
  ] })
4452
4488
  ] }),
4453
- /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
4489
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
4454
4490
  n && /* @__PURE__ */ s(
4455
4491
  "button",
4456
4492
  {
@@ -4480,7 +4516,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4480
4516
  showReportParticipant: d,
4481
4517
  onLeaveConversation: r,
4482
4518
  onBlockParticipant: i,
4483
- onDeleteConversationClick: m,
4519
+ onDeleteConversationClick: u,
4484
4520
  onBlockParticipantClick: f,
4485
4521
  onReportParticipantClick: h,
4486
4522
  customChannelActions: g,
@@ -4500,7 +4536,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4500
4536
  onBlockParticipant: o,
4501
4537
  showDeleteConversation: l = !0,
4502
4538
  onDeleteConversationClick: d,
4503
- onBlockParticipantClick: m,
4539
+ onBlockParticipantClick: u,
4504
4540
  onReportParticipantClick: f,
4505
4541
  showBlockParticipant: h = !0,
4506
4542
  showReportParticipant: g = !0,
@@ -4520,7 +4556,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4520
4556
  composerInput: L
4521
4557
  }) => {
4522
4558
  var N, A, H, q;
4523
- const { channel: S } = oe(), { client: I } = fe(), y = V.useMemo(
4559
+ const { channel: S } = oe(), { client: I } = fe(), y = j.useMemo(
4524
4560
  () => {
4525
4561
  var Y;
4526
4562
  return He(
@@ -4530,16 +4566,16 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4530
4566
  );
4531
4567
  },
4532
4568
  [(N = S.state) == null ? void 0 : N.members, I == null ? void 0 : I.userID, S.type]
4533
- ), T = V.useMemo(() => {
4569
+ ), T = j.useMemo(() => {
4534
4570
  var W;
4535
4571
  const Y = I == null ? void 0 : I.userID;
4536
4572
  return Y ? Object.values(((W = S.state) == null ? void 0 : W.members) || {}).find((Z) => {
4537
4573
  var de;
4538
4574
  return ((de = Z.user) == null ? void 0 : de.id) === Y;
4539
4575
  }) : void 0;
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(
4576
+ }, [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, V = S.state.messages.some(
4541
4577
  (Y) => Y.type !== "deleted"
4542
- ), Q = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
4578
+ ), Q = p ? /* @__PURE__ */ s(j.Fragment, { children: p() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
4543
4579
  ga,
4544
4580
  {
4545
4581
  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%)]",
@@ -4554,7 +4590,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4554
4590
  showBlockParticipant: h,
4555
4591
  showReportParticipant: g,
4556
4592
  onDeleteConversationClick: d,
4557
- onBlockParticipantClick: m,
4593
+ onBlockParticipantClick: u,
4558
4594
  onReportParticipantClick: f,
4559
4595
  customChannelActions: w,
4560
4596
  renderChannelActions: C,
@@ -4574,7 +4610,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4574
4610
  },
4575
4611
  [x, D, R]
4576
4612
  );
4577
- return /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(
4613
+ return /* @__PURE__ */ s(ne, { children: /* @__PURE__ */ s(
4578
4614
  Sn,
4579
4615
  {
4580
4616
  overrides: {
@@ -4583,8 +4619,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4583
4619
  UnreadMessagesNotification: () => null,
4584
4620
  UnreadMessagesSeparator: () => null
4585
4621
  },
4586
- children: /* @__PURE__ */ u(En, { children: [
4587
- !F && /* @__PURE__ */ u(se, { children: [
4622
+ children: /* @__PURE__ */ m(En, { children: [
4623
+ !F && /* @__PURE__ */ m(ne, { children: [
4588
4624
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4589
4625
  Vi,
4590
4626
  {
@@ -4599,7 +4635,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4599
4635
  showBlockParticipant: h,
4600
4636
  showReportParticipant: g,
4601
4637
  onDeleteConversationClick: d,
4602
- onBlockParticipantClick: m,
4638
+ onBlockParticipantClick: u,
4603
4639
  onReportParticipantClick: f,
4604
4640
  customChannelActions: w,
4605
4641
  renderChannelActions: C,
@@ -4608,48 +4644,50 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4608
4644
  ) }, "lt-channel-header"),
4609
4645
  Q
4610
4646
  ] }),
4611
- /* @__PURE__ */ u(
4612
- "div",
4613
- {
4614
- className: "flex-1 overflow-hidden relative",
4615
- children: [
4616
- F && !j && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ u("div", { className: "str-chat__message-list-scroll", children: [
4617
- ee,
4618
- Q
4619
- ] }) }),
4620
- /* @__PURE__ */ s(
4621
- In,
4622
- {
4623
- head: F && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
4624
- ee,
4625
- Q
4626
- ] }) : void 0,
4627
- hideDeletedMessages: !0,
4628
- hideNewMessageSeparator: !1
4629
- }
4630
- )
4631
- ]
4632
- },
4633
- "lt-channel-message-list"
4634
- ),
4635
- r ? /* @__PURE__ */ s(V.Fragment, { children: r(S) }, "lt-channel-conversation-footer") : null,
4636
- /* @__PURE__ */ s(
4637
- Ii,
4638
- {
4639
- ...n && {
4640
- renderActions: () => n == null ? void 0 : n(S)
4647
+ /* @__PURE__ */ m("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4648
+ /* @__PURE__ */ m(
4649
+ "div",
4650
+ {
4651
+ className: "messaging-channel-message-list relative min-h-0 flex-1 overflow-hidden",
4652
+ children: [
4653
+ F && !V && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ m("div", { className: "str-chat__message-list-scroll", children: [
4654
+ ee,
4655
+ Q
4656
+ ] }) }),
4657
+ /* @__PURE__ */ s(
4658
+ In,
4659
+ {
4660
+ head: F && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4661
+ ee,
4662
+ Q
4663
+ ] }) : void 0,
4664
+ hideDeletedMessages: !0,
4665
+ hideNewMessageSeparator: !1
4666
+ }
4667
+ )
4668
+ ]
4641
4669
  },
4642
- renderFooter: () => a == null ? void 0 : a(S),
4643
- disabled: c,
4644
- disabledReason: b,
4645
- composerInput: L
4646
- },
4647
- "lt-channel-message-input"
4648
- )
4670
+ "lt-channel-message-list"
4671
+ ),
4672
+ r ? /* @__PURE__ */ s(j.Fragment, { children: r(S) }, "lt-channel-conversation-footer") : null,
4673
+ /* @__PURE__ */ s(
4674
+ Ii,
4675
+ {
4676
+ ...n && {
4677
+ renderActions: () => n == null ? void 0 : n(S)
4678
+ },
4679
+ renderFooter: () => a == null ? void 0 : a(S),
4680
+ disabled: c,
4681
+ disabledReason: b,
4682
+ composerInput: L
4683
+ },
4684
+ "lt-channel-message-input"
4685
+ )
4686
+ ] })
4649
4687
  ] })
4650
4688
  }
4651
4689
  ) });
4652
- }, Fs = V.memo(
4690
+ }, Fs = j.memo(
4653
4691
  ({
4654
4692
  channel: e,
4655
4693
  onBack: t,
@@ -4660,7 +4698,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4660
4698
  onLeaveConversation: o,
4661
4699
  onBlockParticipant: l,
4662
4700
  className: d,
4663
- CustomChannelEmptyState: m = Bi,
4701
+ CustomChannelEmptyState: u = Bi,
4664
4702
  showDeleteConversation: f = !0,
4665
4703
  onDeleteConversationClick: h,
4666
4704
  onBlockParticipantClick: g,
@@ -4685,7 +4723,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4685
4723
  viewerLanguage: M,
4686
4724
  showChannelInfo: P = !0,
4687
4725
  onParticipantNameClick: $,
4688
- composerInput: j
4726
+ composerInput: V
4689
4727
  }) => {
4690
4728
  const Q = J(
4691
4729
  async (X, N, A) => {
@@ -4731,7 +4769,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4731
4769
  {
4732
4770
  channel: e,
4733
4771
  MessageSystem: Pi,
4734
- EmptyStateIndicator: m,
4772
+ EmptyStateIndicator: u,
4735
4773
  LoadingIndicator: Ve,
4736
4774
  DateSeparator: pa,
4737
4775
  TypingIndicator: $i,
@@ -4748,7 +4786,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4748
4786
  renderConversationFooter: i,
4749
4787
  onLeaveConversation: o,
4750
4788
  onBlockParticipant: l,
4751
- CustomChannelEmptyState: m,
4789
+ CustomChannelEmptyState: u,
4752
4790
  showDeleteConversation: f,
4753
4791
  onDeleteConversationClick: h,
4754
4792
  onBlockParticipantClick: g,
@@ -4768,7 +4806,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4768
4806
  viewerLanguage: M,
4769
4807
  showChannelInfo: P,
4770
4808
  onParticipantNameClick: $,
4771
- composerInput: j
4809
+ composerInput: V
4772
4810
  }
4773
4811
  )
4774
4812
  }
@@ -4778,7 +4816,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4778
4816
  }
4779
4817
  );
4780
4818
  Fs.displayName = "ChannelView";
4781
- const Ce = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ u("div", { className: "text-center max-w-sm", children: [
4819
+ const Ce = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4782
4820
  /* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
4783
4821
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4784
4822
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4803,7 +4841,7 @@ const pl = ({
4803
4841
  initialParticipantData: o,
4804
4842
  CustomChannelEmptyState: l,
4805
4843
  onBlockParticipantClick: d,
4806
- onReportParticipantClick: m,
4844
+ onReportParticipantClick: u,
4807
4845
  dmAgentEnabled: f,
4808
4846
  onMessageSent: h,
4809
4847
  chatbotVotingEnabled: g = !1,
@@ -4826,7 +4864,7 @@ const pl = ({
4826
4864
  refreshConnection: S,
4827
4865
  service: I,
4828
4866
  debug: y
4829
- } = sa(), [T, M] = B(null), [P, $] = B(null), [j, Q] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
4867
+ } = sa(), [T, M] = B(null), [P, $] = B(null), [V, Q] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
4830
4868
  X.current = o;
4831
4869
  const N = G(a);
4832
4870
  N.current = a;
@@ -4909,7 +4947,7 @@ const pl = ({
4909
4947
  message: "Not connected to messaging service",
4910
4948
  onBack: S
4911
4949
  }
4912
- ) : 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(
4950
+ ) : P ? /* @__PURE__ */ s(Ce, { message: P }) : V && !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(
4913
4951
  Fs,
4914
4952
  {
4915
4953
  channel: T,
@@ -4921,7 +4959,7 @@ const pl = ({
4921
4959
  CustomChannelEmptyState: l,
4922
4960
  showDeleteConversation: ee,
4923
4961
  onBlockParticipantClick: d,
4924
- onReportParticipantClick: m,
4962
+ onReportParticipantClick: u,
4925
4963
  dmAgentEnabled: f,
4926
4964
  onMessageSent: h,
4927
4965
  chatbotVotingEnabled: g,
@@ -4944,7 +4982,7 @@ function Hi(e) {
4944
4982
  for (const n of t)
4945
4983
  e.state.addMessageSorted(n.message);
4946
4984
  }
4947
- const Ps = V.createContext({
4985
+ const Ps = j.createContext({
4948
4986
  selectedChannel: void 0,
4949
4987
  onChannelSelect: () => {
4950
4988
  },
@@ -4952,7 +4990,7 @@ const Ps = V.createContext({
4952
4990
  renderMessagePreview: void 0,
4953
4991
  channelPreview: void 0,
4954
4992
  viewerLanguage: void 0
4955
- }), Yi = Ps.Provider, qi = () => V.useContext(Ps), Wi = (e, t) => {
4993
+ }), Yi = Ps.Provider, qi = () => j.useContext(Ps), Wi = (e, t) => {
4956
4994
  const n = new Date(
4957
4995
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4958
4996
  ), r = new Date(
@@ -4973,7 +5011,7 @@ const Ps = V.createContext({
4973
5011
  day: "numeric",
4974
5012
  year: "2-digit"
4975
5013
  });
4976
- }, Os = V.memo(
5014
+ }, Os = j.memo(
4977
5015
  (e) => {
4978
5016
  var O, F, L;
4979
5017
  const { channel: t, unread: n } = e, {
@@ -4983,7 +5021,7 @@ const Ps = V.createContext({
4983
5021
  channelPreview: o,
4984
5022
  renderMessagePreview: l,
4985
5023
  viewerLanguage: d
4986
- } = qi(), { client: m } = fe(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ut(t);
5024
+ } = qi(), { client: u } = fe(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ut(t);
4987
5025
  if (o)
4988
5026
  return /* @__PURE__ */ s(
4989
5027
  o,
@@ -5002,7 +5040,7 @@ const Ps = V.createContext({
5002
5040
  !I || y || (S.preventDefault(), g());
5003
5041
  }, b = He(
5004
5042
  (O = t == null ? void 0 : t.state) == null ? void 0 : O.members,
5005
- m == null ? void 0 : m.userID,
5043
+ u == null ? void 0 : u.userID,
5006
5044
  t == null ? void 0 : t.type
5007
5045
  ), v = mt(b == null ? void 0 : b.user), x = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, p = (() => {
5008
5046
  var I;
@@ -5052,9 +5090,9 @@ const Ps = V.createContext({
5052
5090
  }
5053
5091
  ),
5054
5092
  "data-dd-privacy": "mask",
5055
- children: /* @__PURE__ */ u("div", { className: "flex items-start gap-4", children: [
5093
+ children: /* @__PURE__ */ m("div", { className: "flex items-start gap-4", children: [
5056
5094
  /* @__PURE__ */ s(
5057
- ne,
5095
+ se,
5058
5096
  {
5059
5097
  id: ((L = b == null ? void 0 : b.user) == null ? void 0 : L.id) || t.id || "unknown",
5060
5098
  name: v,
@@ -5063,9 +5101,9 @@ const Ps = V.createContext({
5063
5101
  starred: h
5064
5102
  }
5065
5103
  ),
5066
- /* @__PURE__ */ u("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
5067
- /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2", children: [
5068
- /* @__PURE__ */ u(
5104
+ /* @__PURE__ */ m("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
5105
+ /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2", children: [
5106
+ /* @__PURE__ */ m(
5069
5107
  "h3",
5070
5108
  {
5071
5109
  className: k(
@@ -5079,7 +5117,7 @@ const Ps = V.createContext({
5079
5117
  ),
5080
5118
  C && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: C })
5081
5119
  ] }),
5082
- /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5120
+ /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5083
5121
  /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: E }),
5084
5122
  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 })
5085
5123
  ] })
@@ -5090,7 +5128,7 @@ const Ps = V.createContext({
5090
5128
  }
5091
5129
  );
5092
5130
  Os.displayName = "CustomChannelPreview";
5093
- const Ki = { last_message_at: -1 }, Zi = V.memo(
5131
+ const Ki = { last_message_at: -1 }, Zi = j.memo(
5094
5132
  ({
5095
5133
  onChannelSelect: e,
5096
5134
  selectedChannel: t,
@@ -5101,7 +5139,7 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
5101
5139
  className: o,
5102
5140
  customEmptyStateIndicator: l,
5103
5141
  channelListPaginator: d = Mn,
5104
- channelPreview: m,
5142
+ channelPreview: u,
5105
5143
  renderMessagePreview: f,
5106
5144
  viewerLanguage: h,
5107
5145
  lockChannelOrder: g,
@@ -5111,9 +5149,9 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
5111
5149
  onAddedToChannel: x,
5112
5150
  onChannelUpdated: p
5113
5151
  }) => {
5114
- const _ = V.useRef(0);
5152
+ const _ = j.useRef(0);
5115
5153
  _.current++;
5116
- const { debug: w = !1 } = dt(), C = V.useCallback(
5154
+ const { debug: w = !1 } = dt(), C = j.useCallback(
5117
5155
  (E) => {
5118
5156
  for (const R of E)
5119
5157
  Hi(R);
@@ -5126,12 +5164,12 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
5126
5164
  selectedChannelId: t == null ? void 0 : t.id,
5127
5165
  filters: n
5128
5166
  });
5129
- const D = V.useMemo(
5167
+ const D = j.useMemo(
5130
5168
  () => ({
5131
5169
  selectedChannel: t,
5132
5170
  onChannelSelect: e,
5133
5171
  debug: w,
5134
- channelPreview: m,
5172
+ channelPreview: u,
5135
5173
  renderMessagePreview: f,
5136
5174
  viewerLanguage: h
5137
5175
  }),
@@ -5139,7 +5177,7 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
5139
5177
  t,
5140
5178
  e,
5141
5179
  w,
5142
- m,
5180
+ u,
5143
5181
  f,
5144
5182
  h
5145
5183
  ]
@@ -5209,7 +5247,7 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5209
5247
  tail: n = !0,
5210
5248
  header: a,
5211
5249
  className: r
5212
- }) => /* @__PURE__ */ u(
5250
+ }) => /* @__PURE__ */ m(
5213
5251
  "div",
5214
5252
  {
5215
5253
  "data-dd-privacy": "mask",
@@ -5277,10 +5315,10 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5277
5315
  avatarImage: i,
5278
5316
  avatarName: o
5279
5317
  }) => {
5280
- const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
5281
- return l.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ u("div", { className: "flex gap-3 items-end", children: [
5318
+ const l = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
5319
+ return l.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ m("div", { className: "flex gap-3 items-end", children: [
5282
5320
  (i || o) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
5283
- ne,
5321
+ se,
5284
5322
  {
5285
5323
  id: o || "account",
5286
5324
  name: o || "Account",
@@ -5289,7 +5327,7 @@ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5289
5327
  shape: "circle"
5290
5328
  }
5291
5329
  ) }),
5292
- /* @__PURE__ */ u(
5330
+ /* @__PURE__ */ m(
5293
5331
  "div",
5294
5332
  {
5295
5333
  className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
@@ -5323,7 +5361,7 @@ export {
5323
5361
  Jt as L,
5324
5362
  hl as M,
5325
5363
  ye as a,
5326
- ne as b,
5364
+ se as b,
5327
5365
  Zi as c,
5328
5366
  Fs as d,
5329
5367
  fl as e,
@@ -5349,4 +5387,4 @@ export {
5349
5387
  He as y,
5350
5388
  gt as z
5351
5389
  };
5352
- //# sourceMappingURL=index-CQm_f20V.js.map
5390
+ //# sourceMappingURL=index-5x3u5nJw.js.map