@linktr.ee/messaging-react 3.15.2 → 3.15.3

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,11 +1,11 @@
1
1
  import { jsx as s, jsxs as h, Fragment as ee } from "react/jsx-runtime";
2
- import j, { createContext as st, useContext as ye, useCallback as W, useState as F, useRef as G, useEffect as Y, useId as js, useMemo as se, Suspense as Vs } from "react";
3
- import { StreamChatService as Gs } from "@linktr.ee/messaging-core";
4
- import { StreamChat as Hs, LinkPreviewsManager as Ot } from "stream-chat";
5
- import { Chat as Ys, useChannelStateContext as ue, useChatContext as ke, DateSeparator as qs, MessageStatus as Ws, useMessageContext as pe, MessageErrorIcon as Ze, MessageText as Le, areMessageUIPropsEqual as Xs, useMessageReminder as Ks, useComponentContext as es, Attachment as Zs, EditMessageModal as Js, MessageBlocked as Qs, MessageBouncePrompt as en, MessageDeleted as tn, MessageIsThreadReplyInChannelButtonIndicator as sn, MessageRepliesCountButton as nn, ReminderNotification as an, StreamedMessageText as rn, messageHasAttachments as on, messageHasReactions as ln, isDateSeparatorMessage as cn, isMessageBlocked as dn, isMessageBounced as un, MessageBounceModal as mn, Poll as hn, useMessageComposer as fn, useStateStore as gn, MessageInput as Ft, useMessageInputContext as pn, useMessageComposerHasSendableData as bn, AttachmentPreviewList as vn, QuotedMessagePreview as xn, TextareaComposer as wn, MessageTimestamp as Ve, AIStates as Ge, useTypingContext as _n, useAIState as Nn, Channel as yn, WithComponents as kn, Window as Cn, MessageList as Bt, ChannelList as Sn, InfiniteScroll as En } from "stream-chat-react";
2
+ import j, { createContext as st, useContext as ye, useCallback as W, useState as F, useRef as G, useEffect as Y, useId as Vs, useMemo as se, Suspense as Gs } from "react";
3
+ import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as Ys, LinkPreviewsManager as Ot } from "stream-chat";
5
+ import { Chat as qs, useChannelStateContext as ue, useChatContext as ke, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as pe, MessageErrorIcon as Ze, MessageText as Le, areMessageUIPropsEqual as Ks, useMessageReminder as Zs, useComponentContext as es, 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 on, messageHasAttachments as ln, 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 Ft, useMessageInputContext as bn, useMessageComposerHasSendableData as vn, AttachmentPreviewList as xn, QuotedMessagePreview as wn, TextareaComposer as _n, MessageTimestamp as Ve, AIStates as Ge, useTypingContext as Nn, useAIState as yn, Channel as kn, WithComponents as Cn, Window as Sn, MessageList as Bt, ChannelList as En, InfiniteScroll as In } from "stream-chat-react";
6
6
  import N from "classnames";
7
- import { StarIcon as Je, DotsThreeIcon as In, SpinnerGapIcon as Ae, SignOutIcon as Tn, ProhibitInsetIcon as $t, FlagIcon as ts, CurrencyDollarIcon as Mn, CaretRightIcon as ss, ArrowLeftIcon as An, FileIcon as ns, ImageIcon as Rn, SpeakerHighIcon as Ln, VideoCameraIcon as as, FileMdIcon as Dn, FileTextIcon as Pn, FileZipIcon as zn, FilePptIcon as On, FileCsvIcon as Fn, FileXlsIcon as Bn, FileDocIcon as $n, FilePdfIcon as Un, CircleNotchIcon as _e, PlayIcon as Qe, PauseIcon as jn, LinkIcon as Vn, DownloadSimpleIcon as Ne, XIcon as Be, CaretLeftIcon as Gn, GiftIcon as Hn, ThumbsUpIcon as Yn, ThumbsDownIcon as qn, ChecksIcon as Wn, PencilSimpleIcon as Xn, TrashSimpleIcon as Kn, ArrowUpIcon as Zn, SparkleIcon as Jn, ProhibitIcon as Qn } from "@phosphor-icons/react";
8
- import { MessageActions as ea, DefaultDropdownActionButton as rs } from "stream-chat-react/experimental";
7
+ import { StarIcon as Je, DotsThreeIcon as Tn, SpinnerGapIcon as Ae, SignOutIcon as Mn, ProhibitInsetIcon as $t, FlagIcon as ts, CurrencyDollarIcon as An, CaretRightIcon as ss, ArrowLeftIcon as Rn, FileIcon as ns, ImageIcon as Ln, SpeakerHighIcon as Dn, VideoCameraIcon as as, FileMdIcon as Pn, FileTextIcon as zn, FileZipIcon as On, FilePptIcon as Fn, FileCsvIcon as Bn, FileXlsIcon as $n, FileDocIcon as Un, FilePdfIcon as jn, CircleNotchIcon as _e, PlayIcon as Qe, PauseIcon as Vn, LinkIcon as Gn, DownloadSimpleIcon as Ne, XIcon as Be, CaretLeftIcon as Hn, GiftIcon as Yn, ThumbsUpIcon as qn, ThumbsDownIcon as Wn, ChecksIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Zn, ArrowUpIcon as Jn, SparkleIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
8
+ import { MessageActions as ta, DefaultDropdownActionButton as rs } from "stream-chat-react/experimental";
9
9
  const is = st({
10
10
  service: null,
11
11
  client: null,
@@ -64,7 +64,7 @@ const is = st({
64
64
  capabilities: r
65
65
  };
66
66
  const B = G(null);
67
- !l && a && ((S = B.current) == null ? void 0 : S.apiKey) !== a && (B.current = { apiKey: a, client: new Hs(a) });
67
+ !l && a && ((S = B.current) == null ? void 0 : S.apiKey) !== a && (B.current = { apiKey: a, client: new Ys(a) });
68
68
  const O = l || (a ? ((I = B.current) == null ? void 0 : I.client) ?? null : null);
69
69
  Y(() => {
70
70
  const y = z.current, D = k.current;
@@ -83,7 +83,7 @@ const is = st({
83
83
  renderCount: y,
84
84
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
85
85
  });
86
- const H = new Gs({
86
+ const H = new Hs({
87
87
  ...D,
88
88
  apiKey: a,
89
89
  debug: R.current,
@@ -215,7 +215,7 @@ const is = st({
215
215
  willRenderChat: !!O,
216
216
  contextValueReady: !!T
217
217
  }), /* @__PURE__ */ s(is.Provider, { value: T, children: O ? /* @__PURE__ */ s(
218
- Ys,
218
+ qs,
219
219
  {
220
220
  client: O,
221
221
  customClasses: {
@@ -224,7 +224,7 @@ const is = st({
224
224
  children: e
225
225
  }
226
226
  ) : e });
227
- }, ta = () => nt(), os = (e) => {
227
+ }, sa = () => nt(), os = (e) => {
228
228
  var a, r;
229
229
  const [t, n] = F(
230
230
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -246,14 +246,14 @@ const is = st({
246
246
  e.off("member.updated", i);
247
247
  };
248
248
  }, [e]), t;
249
- }, sa = "linktree-official", na = "linktree-official-sender";
249
+ }, na = "linktree-official", aa = "linktree-official-sender";
250
250
  function ls(e, t, n) {
251
251
  const a = Object.values(e || {});
252
- if (n === sa) {
252
+ if (n === na) {
253
253
  const r = a.find(
254
254
  (i) => {
255
255
  var l;
256
- return ((l = i.user) == null ? void 0 : l.id) === na;
256
+ return ((l = i.user) == null ? void 0 : l.id) === aa;
257
257
  }
258
258
  );
259
259
  if (r) return r;
@@ -265,13 +265,13 @@ function ls(e, t, n) {
265
265
  }
266
266
  );
267
267
  }
268
- const aa = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
269
- function ra(e) {
270
- return aa.test(e.trim());
268
+ const ra = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
269
+ function ia(e) {
270
+ return ra.test(e.trim());
271
271
  }
272
272
  function Ut(e, t) {
273
273
  const n = e == null ? void 0 : e.trim();
274
- return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !ra(n);
274
+ return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !ia(n);
275
275
  }
276
276
  function cs(e) {
277
277
  return Ut(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Ut(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
@@ -304,7 +304,7 @@ const jt = [
304
304
  { emoji: "🍈", bgColor: "#D9F7E1" }
305
305
  // Melon
306
306
  ];
307
- function ia(e) {
307
+ function oa(e) {
308
308
  let t = 0;
309
309
  for (let n = 0; n < e.length; n++) {
310
310
  const a = e.charCodeAt(n);
@@ -313,12 +313,12 @@ function ia(e) {
313
313
  return Math.abs(t);
314
314
  }
315
315
  function ds(e) {
316
- return jt[ia(e) % jt.length];
316
+ return jt[oa(e) % jt.length];
317
317
  }
318
- function oa(e) {
318
+ function la(e) {
319
319
  return ds(e).emoji;
320
320
  }
321
- function la(e) {
321
+ function ca(e) {
322
322
  return ds(e).bgColor;
323
323
  }
324
324
  const be = ({
@@ -330,7 +330,7 @@ const be = ({
330
330
  shape: i = "squircle",
331
331
  dmAgentEnabled: l = !1
332
332
  }) => {
333
- const o = oa(e), d = la(e), u = 0.45, m = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
333
+ const o = la(e), d = ca(e), u = 0.45, m = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__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,
@@ -394,7 +394,7 @@ const be = ({
394
394
  ]
395
395
  }
396
396
  );
397
- }, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
397
+ }, da = "https://linktr.ee/s/about/trust-center/report", ua = ({
398
398
  channel: e,
399
399
  participant: t,
400
400
  showBlockParticipant: n = !0,
@@ -478,7 +478,7 @@ const be = ({
478
478
  }
479
479
  },
480
480
  handleReportUser: () => {
481
- d == null || d(), u == null || u(), window.open(ca, "_blank", "noopener,noreferrer");
481
+ d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
482
482
  }
483
483
  };
484
484
  }, ve = ({
@@ -498,7 +498,7 @@ const be = ({
498
498
  ...a,
499
499
  children: n
500
500
  }
501
- ), ua = ({
501
+ ), ma = ({
502
502
  channel: e,
503
503
  participant: t,
504
504
  showDeleteConversation: n = !0,
@@ -512,7 +512,7 @@ const be = ({
512
512
  customChannelActions: g,
513
513
  triggerClassName: m
514
514
  }) => {
515
- const [f, c] = F(!1), v = G(null), x = js(), p = W(() => c(!1), []), {
515
+ const [f, c] = F(!1), v = G(null), x = Vs(), p = W(() => c(!1), []), {
516
516
  isParticipantBlocked: b,
517
517
  isCheckingBlockedStatus: w,
518
518
  isLeaving: E,
@@ -521,7 +521,7 @@ const be = ({
521
521
  handleBlockUser: A,
522
522
  handleUnblockUser: z,
523
523
  handleReportUser: B
524
- } = da({
524
+ } = ua({
525
525
  channel: e,
526
526
  participant: t,
527
527
  showBlockParticipant: a,
@@ -555,7 +555,7 @@ const be = ({
555
555
  "aria-controls": f ? x : void 0,
556
556
  onClick: () => c((L) => !L),
557
557
  children: [
558
- /* @__PURE__ */ s(In, { className: "size-5 text-black/90" }),
558
+ /* @__PURE__ */ s(Tn, { className: "size-5 text-black/90" }),
559
559
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
560
560
  ]
561
561
  }
@@ -577,7 +577,7 @@ const be = ({
577
577
  disabled: E,
578
578
  "aria-busy": E,
579
579
  children: [
580
- E ? /* @__PURE__ */ s(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Tn, { className: "h-5 w-5" }),
580
+ E ? /* @__PURE__ */ s(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Mn, { className: "h-5 w-5" }),
581
581
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
582
582
  ]
583
583
  }
@@ -621,7 +621,7 @@ const be = ({
621
621
  }
622
622
  )
623
623
  ] });
624
- }, He = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ma = "CUSTOMER_PAID", ha = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, fa = ({
624
+ }, He = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ha = "CUSTOMER_PAID", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ha, ga = ({
625
625
  className: e,
626
626
  onBack: t,
627
627
  showBackButton: n,
@@ -650,7 +650,7 @@ const be = ({
650
650
  );
651
651
  },
652
652
  [(C = p.state) == null ? void 0 : C.members, b == null ? void 0 : b.userID, p.type]
653
- ), E = cs(w == null ? void 0 : w.user), k = (T = w == null ? void 0 : w.user) == null ? void 0 : T.image, R = os(p), A = ha((S = p.data) == null ? void 0 : S.customer_tag) && (w == null ? void 0 : w.is_follower) === !0, z = a && R, B = A || z || !!x, O = async () => {
653
+ ), E = cs(w == null ? void 0 : w.user), k = (T = w == null ? void 0 : w.user) == null ? void 0 : T.image, R = os(p), A = fa((S = p.data) == null ? void 0 : S.customer_tag) && (w == null ? void 0 : w.is_follower) === !0, z = a && R, B = A || z || !!x, O = async () => {
654
654
  try {
655
655
  R ? await p.unpin() : await p.pin();
656
656
  } catch (y) {
@@ -686,7 +686,7 @@ const be = ({
686
686
  {
687
687
  "aria-label": "Paid customer",
688
688
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
689
- children: /* @__PURE__ */ s(Mn, { className: "size-2.5", weight: "bold" })
689
+ children: /* @__PURE__ */ s(An, { className: "size-2.5", weight: "bold" })
690
690
  }
691
691
  ),
692
692
  z && /* @__PURE__ */ s(
@@ -729,7 +729,7 @@ const be = ({
729
729
  }),
730
730
  type: "button",
731
731
  "aria-label": "Back to conversations",
732
- children: /* @__PURE__ */ s(An, { className: "size-5 text-black/90" })
732
+ children: /* @__PURE__ */ s(Rn, { className: "size-5 text-black/90" })
733
733
  }
734
734
  ) }),
735
735
  /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: x ? /* @__PURE__ */ s(
@@ -764,7 +764,7 @@ const be = ({
764
764
  }
765
765
  ),
766
766
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
767
- ua,
767
+ ma,
768
768
  {
769
769
  channel: p,
770
770
  participant: w,
@@ -784,13 +784,13 @@ const be = ({
784
784
  ] })
785
785
  }
786
786
  );
787
- }, ga = (e) => /* @__PURE__ */ s(qs, { ...e, position: "center" }), et = "vote_up", tt = "vote_down";
788
- function pa(e) {
787
+ }, pa = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), et = "vote_up", tt = "vote_down";
788
+ function ba(e) {
789
789
  return e != null && e.length ? e.some((t) => t.type === tt) ? "down" : e.some((t) => t.type === et) ? "up" : null : null;
790
790
  }
791
- function ba(e) {
791
+ function va(e) {
792
792
  const { channel: t } = ue(), { client: n } = ke("useMessageVote"), a = se(
793
- () => pa(e.own_reactions),
793
+ () => ba(e.own_reactions),
794
794
  [e.own_reactions]
795
795
  ), r = W(async () => {
796
796
  if (n != null && n.userID)
@@ -815,7 +815,7 @@ function ba(e) {
815
815
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
816
816
  return { selected: a, voteUp: r, voteDown: i };
817
817
  }
818
- function va(e) {
818
+ function xa(e) {
819
819
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
820
820
  }
821
821
  function us({
@@ -823,31 +823,31 @@ function us({
823
823
  viewerLanguage: t
824
824
  }) {
825
825
  var r;
826
- const n = e == null ? void 0 : e.text, a = va(t);
826
+ const n = e == null ? void 0 : e.text, a = xa(t);
827
827
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
828
828
  }
829
- const xa = ["linktr.ee"], Vt = "messaging-attachment-v1_0";
830
- function wa(e) {
829
+ const wa = ["linktr.ee"], Vt = "messaging-attachment-v1_0";
830
+ function _a(e) {
831
831
  try {
832
832
  return new URL(e).hostname.toLowerCase();
833
833
  } catch {
834
834
  return null;
835
835
  }
836
836
  }
837
- function _a(e) {
838
- return xa.some(
837
+ function Na(e) {
838
+ return wa.some(
839
839
  (t) => e === t || e.endsWith(`.${t}`)
840
840
  );
841
841
  }
842
842
  function de(e) {
843
843
  const t = e == null ? void 0 : e.trim();
844
844
  if (!t) return;
845
- const n = wa(t);
846
- if (!n || !_a(n)) return t;
845
+ const n = _a(t);
846
+ if (!n || !Na(n)) return t;
847
847
  const a = new URL(t);
848
848
  return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Vt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Vt), a.toString());
849
849
  }
850
- const Na = [
850
+ const ya = [
851
851
  [/pdf/, "pdf"],
852
852
  [/wordprocessingml|msword|\.doc/, "doc"],
853
853
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -861,38 +861,38 @@ function oe(e) {
861
861
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
862
862
  }
863
863
  function ms(e) {
864
- const t = Na.find(
864
+ const t = ya.find(
865
865
  ([n]) => n.test(e)
866
866
  );
867
867
  return t ? t[1] : "generic";
868
868
  }
869
- const ya = {
869
+ const ka = {
870
870
  video: as,
871
- audio: Ln,
872
- image: Rn,
871
+ audio: Dn,
872
+ image: Ln,
873
873
  document: ns
874
- }, ka = {
875
- pdf: Un,
876
- doc: $n,
877
- xls: Bn,
878
- csv: Fn,
879
- ppt: On,
880
- zip: zn,
881
- text: Pn,
882
- markdown: Dn,
874
+ }, Ca = {
875
+ pdf: jn,
876
+ doc: Un,
877
+ xls: $n,
878
+ csv: Bn,
879
+ ppt: Fn,
880
+ zip: On,
881
+ text: zn,
882
+ markdown: Pn,
883
883
  generic: ns
884
884
  };
885
- function Ca(e) {
885
+ function Sa(e) {
886
886
  const t = oe(e);
887
- return t !== "document" ? ya[t] : ka[ms(e)];
887
+ return t !== "document" ? ka[t] : Ca[ms(e)];
888
888
  }
889
889
  function ge(e, t) {
890
- return j.createElement(Ca(e), t);
890
+ return j.createElement(Sa(e), t);
891
891
  }
892
- const Sa = (e) => {
892
+ const Ea = (e) => {
893
893
  var t, n;
894
894
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
895
- }, Ea = ({
895
+ }, Ia = ({
896
896
  source: e,
897
897
  mimeType: t,
898
898
  poster: n,
@@ -912,7 +912,7 @@ const Sa = (e) => {
912
912
  const $ = M.getBoundingClientRect();
913
913
  return Math.max(
914
914
  0,
915
- Math.min(1, (Sa(_) - $.left) / $.width)
915
+ Math.min(1, (Ea(_) - $.left) / $.width)
916
916
  );
917
917
  }, []), H = W((_) => {
918
918
  const M = m.current;
@@ -1090,7 +1090,7 @@ const Sa = (e) => {
1090
1090
  },
1091
1091
  className: "shrink-0 text-white",
1092
1092
  "aria-label": x ? "Pause" : "Play",
1093
- children: x ? /* @__PURE__ */ s(jn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(Qe, { className: "size-5 translate-x-px", weight: "fill" })
1093
+ children: x ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(Qe, { className: "size-5 translate-x-px", weight: "fill" })
1094
1094
  }
1095
1095
  ),
1096
1096
  /* @__PURE__ */ h(
@@ -1140,7 +1140,7 @@ const Sa = (e) => {
1140
1140
  ]
1141
1141
  }
1142
1142
  );
1143
- }, Gt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ia = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", hs = ({
1143
+ }, Gt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ta = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", hs = ({
1144
1144
  mimeType: e,
1145
1145
  sourceUrl: t,
1146
1146
  thumbnailUrl: n,
@@ -1151,7 +1151,7 @@ const Sa = (e) => {
1151
1151
  }) => {
1152
1152
  const o = oe(e), [d, u] = F(!1), g = de(t), m = de(n);
1153
1153
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1154
- Ea,
1154
+ Ia,
1155
1155
  {
1156
1156
  source: t,
1157
1157
  mimeType: e,
@@ -1202,7 +1202,7 @@ const Sa = (e) => {
1202
1202
  weight: "regular"
1203
1203
  })
1204
1204
  }
1205
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ia(r)}`, children: /* @__PURE__ */ s(
1205
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ta(r)}`, children: /* @__PURE__ */ s(
1206
1206
  "img",
1207
1207
  {
1208
1208
  src: m ?? n,
@@ -1292,19 +1292,19 @@ function gs(e) {
1292
1292
  function at(e) {
1293
1293
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1294
1294
  }
1295
- function Ta(e) {
1295
+ function Ma(e) {
1296
1296
  return e ? "bg-white/10" : "bg-black/5";
1297
1297
  }
1298
- function Ma(e) {
1298
+ function Aa(e) {
1299
1299
  return e ? "text-white" : "text-black";
1300
1300
  }
1301
- function Aa(e) {
1301
+ function Ra(e) {
1302
1302
  return e ? "text-white/55" : "text-black/55";
1303
1303
  }
1304
- function Ra(e) {
1304
+ function La(e) {
1305
1305
  return e ? "text-white/40" : "text-black/40";
1306
1306
  }
1307
- function La(e) {
1307
+ function Da(e) {
1308
1308
  return e ? "text-white/20" : "text-black/20";
1309
1309
  }
1310
1310
  const rt = ({ attachment: e, isMyMessage: t }) => {
@@ -1319,14 +1319,14 @@ const rt = ({ attachment: e, isMyMessage: t }) => {
1319
1319
  ) : /* @__PURE__ */ s(
1320
1320
  "div",
1321
1321
  {
1322
- className: `aspect-video w-full rounded-[20px] ${Ta(t)} flex items-center justify-center`,
1323
- children: /* @__PURE__ */ s(Vn, { className: `size-12 ${La(t)}` })
1322
+ className: `aspect-video w-full rounded-[20px] ${Ma(t)} flex items-center justify-center`,
1323
+ children: /* @__PURE__ */ s(Gn, { className: `size-12 ${Da(t)}` })
1324
1324
  }
1325
1325
  ) }),
1326
1326
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1327
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Ma(t)}`, children: n }),
1328
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Aa(t)}`, children: a }),
1329
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Ra(t)}`, children: d })
1327
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Aa(t)}`, children: n }),
1328
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Ra(t)}`, children: a }),
1329
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${La(t)}`, children: d })
1330
1330
  ] })
1331
1331
  ] });
1332
1332
  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 });
@@ -1338,7 +1338,7 @@ function it(e) {
1338
1338
  var t;
1339
1339
  return (t = e.attachments) == null ? void 0 : t.find(ps);
1340
1340
  }
1341
- async function Da(e, t) {
1341
+ async function Pa(e, t) {
1342
1342
  let n;
1343
1343
  try {
1344
1344
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1350,7 +1350,7 @@ async function Da(e, t) {
1350
1350
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1351
1351
  l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1352
1352
  }
1353
- const Pa = ({
1353
+ const za = ({
1354
1354
  url: e,
1355
1355
  filename: t
1356
1356
  }) => {
@@ -1362,7 +1362,7 @@ const Pa = ({
1362
1362
  onClick: (i) => {
1363
1363
  i.stopPropagation();
1364
1364
  const l = window.open("", "_blank", "noopener,noreferrer");
1365
- a(!0), Da(e, t).then(() => {
1365
+ a(!0), Pa(e, t).then(() => {
1366
1366
  l == null || l.close();
1367
1367
  }).catch(() => {
1368
1368
  l && (l.location.href = e);
@@ -1452,10 +1452,10 @@ const bs = ({
1452
1452
  containedImage: i === "image" || i === "document"
1453
1453
  }
1454
1454
  ),
1455
- action: /* @__PURE__ */ s(Pa, { url: e, filename: n })
1455
+ action: /* @__PURE__ */ s(za, { url: e, filename: n })
1456
1456
  }
1457
1457
  );
1458
- }, za = ({
1458
+ }, Oa = ({
1459
1459
  message: e,
1460
1460
  isMyMessage: t = !1
1461
1461
  }) => {
@@ -1487,7 +1487,7 @@ const bs = ({
1487
1487
  }
1488
1488
  )
1489
1489
  ] });
1490
- }, Oa = ({
1490
+ }, Fa = ({
1491
1491
  message: e
1492
1492
  }) => {
1493
1493
  const t = it(e);
@@ -1495,7 +1495,7 @@ const bs = ({
1495
1495
  return /* @__PURE__ */ s("div", { className: at(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(rt, { attachment: t, isMyMessage: !0 }) });
1496
1496
  const n = ot(e);
1497
1497
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(bs, { ...n }) }) : null;
1498
- }, Fa = ({
1498
+ }, Ba = ({
1499
1499
  message: e
1500
1500
  }) => {
1501
1501
  const t = it(e);
@@ -1503,19 +1503,19 @@ const bs = ({
1503
1503
  return /* @__PURE__ */ s("div", { className: at(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(rt, { attachment: t, isMyMessage: !1 }) });
1504
1504
  const n = ot(e);
1505
1505
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(vs, { ...n }) }) : null;
1506
- }, fo = Object.assign(za, {
1507
- Creator: Oa,
1508
- Visitor: Fa
1509
- }), Ba = {
1506
+ }, fo = Object.assign(Oa, {
1507
+ Creator: Fa,
1508
+ Visitor: Ba
1509
+ }), $a = {
1510
1510
  dark: "bg-[#1e2330]",
1511
1511
  light: "bg-[#f2f1ef]"
1512
- }, $a = {
1512
+ }, Ua = {
1513
1513
  dark: "text-white",
1514
1514
  light: "text-[#000000]"
1515
- }, Ua = {
1515
+ }, ja = {
1516
1516
  dark: "border-white/[0.08]",
1517
1517
  light: "border-black/[0.08]"
1518
- }, ja = (e) => e === "dark" ? "sender" : "receiver", Va = {
1518
+ }, Va = (e) => e === "dark" ? "sender" : "receiver", Ga = {
1519
1519
  sender: {
1520
1520
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1521
1521
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1537,7 +1537,7 @@ const bs = ({
1537
1537
  children: i,
1538
1538
  "data-testid": l
1539
1539
  }) => {
1540
- const o = t != null && t !== "", d = Va[ja(e)][a];
1540
+ const o = t != null && t !== "", d = Ga[Va(e)][a];
1541
1541
  return /* @__PURE__ */ h(
1542
1542
  "div",
1543
1543
  {
@@ -1552,10 +1552,10 @@ const bs = ({
1552
1552
  // as the surrounding `CustomMessage` text bubbles.
1553
1553
  "relative w-[280px] overflow-hidden px-2 py-2",
1554
1554
  d,
1555
- Ba[e],
1556
1555
  $a[e],
1556
+ Ua[e],
1557
1557
  n && "border",
1558
- n && Ua[e],
1558
+ n && ja[e],
1559
1559
  r
1560
1560
  ),
1561
1561
  children: [
@@ -1598,16 +1598,16 @@ const bs = ({
1598
1598
  ),
1599
1599
  children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
1600
1600
  }
1601
- ), Ee = (e) => e === "received" ? "light" : "dark", Ga = ({
1601
+ ), Ee = (e) => e === "received" ? "light" : "dark", Ha = ({
1602
1602
  firstOfGroup: e,
1603
1603
  endOfGroup: t,
1604
1604
  groupedByUser: n
1605
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ha = ({
1605
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ya = ({
1606
1606
  src: e,
1607
1607
  mimeType: t,
1608
1608
  filename: n,
1609
1609
  items: a
1610
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ya = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1610
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], qa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1611
1611
  /* @__PURE__ */ s(
1612
1612
  "audio",
1613
1613
  {
@@ -1630,7 +1630,7 @@ const bs = ({
1630
1630
  preload: o,
1631
1631
  onDismiss: d
1632
1632
  }) => {
1633
- const u = Ee(e), g = e === "composer" && !!d, m = Ha({ src: t, mimeType: n, filename: a, items: r });
1633
+ const u = Ee(e), g = e === "composer" && !!d, m = Ya({ src: t, mimeType: n, filename: a, items: r });
1634
1634
  if (m.length === 0)
1635
1635
  return null;
1636
1636
  const f = o ?? (m.length > 1 ? "none" : "metadata");
@@ -1642,7 +1642,7 @@ const bs = ({
1642
1642
  groupPosition: l,
1643
1643
  "data-testid": "audio-attachment",
1644
1644
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: m.map((c, v) => /* @__PURE__ */ s(
1645
- Ya,
1645
+ qa,
1646
1646
  {
1647
1647
  item: c,
1648
1648
  preload: f,
@@ -1656,15 +1656,15 @@ const bs = ({
1656
1656
  )) })
1657
1657
  }
1658
1658
  );
1659
- }, qa = (e) => /* @__PURE__ */ s(lt, { ...e, state: "composer" }), Wa = (e) => /* @__PURE__ */ s(lt, { ...e, state: "sent" }), Xa = (e) => /* @__PURE__ */ s(lt, { ...e, state: "received" }), Ka = {
1660
- Composer: qa,
1661
- Sent: Wa,
1662
- Received: Xa
1659
+ }, Wa = (e) => /* @__PURE__ */ s(lt, { ...e, state: "composer" }), Xa = (e) => /* @__PURE__ */ s(lt, { ...e, state: "sent" }), Ka = (e) => /* @__PURE__ */ s(lt, { ...e, state: "received" }), Za = {
1660
+ Composer: Wa,
1661
+ Sent: Xa,
1662
+ Received: Ka
1663
1663
  };
1664
- function Za(e) {
1664
+ function Ja(e) {
1665
1665
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
1666
1666
  }
1667
- const Ja = {
1667
+ const Qa = {
1668
1668
  pdf: "PDF",
1669
1669
  doc: "DOC",
1670
1670
  xls: "XLS",
@@ -1674,7 +1674,7 @@ const Ja = {
1674
1674
  text: "TXT",
1675
1675
  markdown: "MD"
1676
1676
  };
1677
- function Qa(e, t) {
1677
+ function er(e, t) {
1678
1678
  if (t) {
1679
1679
  const r = t.lastIndexOf(".");
1680
1680
  if (r > 0 && r < t.length - 1) {
@@ -1684,7 +1684,7 @@ function Qa(e, t) {
1684
1684
  }
1685
1685
  if (!e) return;
1686
1686
  if (oe(e) === "document") {
1687
- const r = ms(e), i = Ja[r];
1687
+ const r = ms(e), i = Qa[r];
1688
1688
  if (i) return i;
1689
1689
  if (e === "application/octet-stream") return;
1690
1690
  }
@@ -1692,8 +1692,8 @@ function Qa(e, t) {
1692
1692
  if (!(!a || a === "*"))
1693
1693
  return a.toUpperCase();
1694
1694
  }
1695
- function er(e, t, n) {
1696
- const a = Qa(e, t), r = typeof n == "number" && n > 0 ? Za(n) : void 0;
1695
+ function tr(e, t, n) {
1696
+ const a = er(e, t), r = typeof n == "number" && n > 0 ? Ja(n) : void 0;
1697
1697
  return [a, r].filter(Boolean).join(" · ") || void 0;
1698
1698
  }
1699
1699
  function ne(e) {
@@ -1704,13 +1704,13 @@ function ne(e) {
1704
1704
  return "download";
1705
1705
  }
1706
1706
  }
1707
- const tr = {
1707
+ const sr = {
1708
1708
  dark: "text-white/55",
1709
1709
  light: "text-black/65"
1710
- }, sr = {
1710
+ }, nr = {
1711
1711
  dark: "bg-white/10",
1712
1712
  light: "bg-black/5"
1713
- }, nr = {
1713
+ }, ar = {
1714
1714
  dark: "text-white/85",
1715
1715
  light: "text-black/85"
1716
1716
  }, xs = ({
@@ -1723,16 +1723,16 @@ const tr = {
1723
1723
  activateLabel: l,
1724
1724
  trailingAction: o
1725
1725
  }) => {
1726
- const d = n ?? t ?? "File", u = er(a, t, r), g = /* @__PURE__ */ s(
1726
+ const d = n ?? t ?? "File", u = tr(a, t, r), g = /* @__PURE__ */ s(
1727
1727
  "div",
1728
1728
  {
1729
1729
  className: N(
1730
1730
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1731
- sr[e]
1731
+ nr[e]
1732
1732
  ),
1733
1733
  "aria-hidden": !0,
1734
1734
  children: ge(a, {
1735
- className: N("size-6", nr[e]),
1735
+ className: N("size-6", ar[e]),
1736
1736
  weight: "regular"
1737
1737
  })
1738
1738
  }
@@ -1743,7 +1743,7 @@ const tr = {
1743
1743
  {
1744
1744
  className: N(
1745
1745
  "truncate text-xs leading-4",
1746
- tr[e]
1746
+ sr[e]
1747
1747
  ),
1748
1748
  children: u
1749
1749
  }
@@ -1786,14 +1786,14 @@ async function ws(e, t) {
1786
1786
  }
1787
1787
  }
1788
1788
  }
1789
- const ar = ({
1789
+ const rr = ({
1790
1790
  src: e,
1791
1791
  filename: t,
1792
1792
  fileSize: n,
1793
1793
  mimeType: a,
1794
1794
  title: r,
1795
1795
  items: i
1796
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], rr = ({
1796
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], ir = ({
1797
1797
  variant: e,
1798
1798
  item: t,
1799
1799
  index: n,
@@ -1827,7 +1827,7 @@ const ar = ({
1827
1827
  onClick: u,
1828
1828
  onDismiss: g
1829
1829
  }) => {
1830
- const m = Ee(e), f = e === "composer" && !!g, c = ar({
1830
+ const m = Ee(e), f = e === "composer" && !!g, c = rr({
1831
1831
  src: t,
1832
1832
  filename: n,
1833
1833
  fileSize: a,
@@ -1862,7 +1862,7 @@ const ar = ({
1862
1862
  groupPosition: d,
1863
1863
  "data-testid": "file-attachment",
1864
1864
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((p, b) => /* @__PURE__ */ s(
1865
- rr,
1865
+ ir,
1866
1866
  {
1867
1867
  variant: m,
1868
1868
  item: p,
@@ -1874,10 +1874,10 @@ const ar = ({
1874
1874
  )) })
1875
1875
  }
1876
1876
  );
1877
- }, ir = (e) => /* @__PURE__ */ s(ct, { ...e, state: "composer" }), or = (e) => /* @__PURE__ */ s(ct, { ...e, state: "sent" }), lr = (e) => /* @__PURE__ */ s(ct, { ...e, state: "received" }), cr = {
1878
- Composer: ir,
1879
- Sent: or,
1880
- Received: lr
1877
+ }, or = (e) => /* @__PURE__ */ s(ct, { ...e, state: "composer" }), lr = (e) => /* @__PURE__ */ s(ct, { ...e, state: "sent" }), cr = (e) => /* @__PURE__ */ s(ct, { ...e, state: "received" }), dr = {
1878
+ Composer: or,
1879
+ Sent: lr,
1880
+ Received: cr
1881
1881
  }, dt = ({
1882
1882
  onPrev: e,
1883
1883
  onNext: t,
@@ -1891,7 +1891,7 @@ const ar = ({
1891
1891
  onClick: e,
1892
1892
  "aria-label": n,
1893
1893
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
1894
- children: /* @__PURE__ */ s(Gn, { size: 20, weight: "bold", "aria-hidden": !0 })
1894
+ children: /* @__PURE__ */ s(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
1895
1895
  }
1896
1896
  ),
1897
1897
  /* @__PURE__ */ s(
@@ -2160,7 +2160,7 @@ const ar = ({
2160
2160
  ]
2161
2161
  }
2162
2162
  ) : null;
2163
- }, dr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", ys = ({
2163
+ }, ur = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", ys = ({
2164
2164
  tiles: e,
2165
2165
  onTileActivate: t,
2166
2166
  maxVisible: n = 4,
@@ -2169,7 +2169,7 @@ const ar = ({
2169
2169
  const r = e.length;
2170
2170
  if (r === 0) return null;
2171
2171
  const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, g) => {
2172
- const m = N(dr, "h-full w-full");
2172
+ const m = N(ur, "h-full w-full");
2173
2173
  return t ? /* @__PURE__ */ h(
2174
2174
  "button",
2175
2175
  {
@@ -2238,7 +2238,7 @@ const ar = ({
2238
2238
  [e]
2239
2239
  ), l = W(() => n(!1), []);
2240
2240
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2241
- }, ur = (e, t, n, a) => ({
2241
+ }, mr = (e, t, n, a) => ({
2242
2242
  ariaLabel: `Open image ${t + 1} of ${n}`,
2243
2243
  content: /* @__PURE__ */ s(
2244
2244
  "img",
@@ -2253,7 +2253,7 @@ const ar = ({
2253
2253
  className: "absolute inset-0 size-full rounded-md object-cover"
2254
2254
  }
2255
2255
  )
2256
- }), mr = ({
2256
+ }), hr = ({
2257
2257
  src: e,
2258
2258
  alt: t,
2259
2259
  items: n
@@ -2261,7 +2261,7 @@ const ar = ({
2261
2261
  src: n.src,
2262
2262
  alt: n.alt,
2263
2263
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2264
- })), hr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2264
+ })), fr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2265
2265
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Ie(
2266
2266
  r
2267
2267
  );
@@ -2308,13 +2308,13 @@ const ar = ({
2308
2308
  loading: o = "lazy",
2309
2309
  onClick: d
2310
2310
  }) => {
2311
- const u = mr({ src: t, alt: n, items: r }), g = Ee(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: v } = Ie(
2311
+ const u = hr({ src: t, alt: n, items: r }), g = Ee(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: v } = Ie(
2312
2312
  d
2313
2313
  );
2314
2314
  if (u.length === 0)
2315
2315
  return null;
2316
2316
  const x = u.map(
2317
- (p, b) => ur(p, b, u.length, o)
2317
+ (p, b) => mr(p, b, u.length, o)
2318
2318
  );
2319
2319
  return /* @__PURE__ */ h(
2320
2320
  Ce,
@@ -2337,11 +2337,11 @@ const ar = ({
2337
2337
  ]
2338
2338
  }
2339
2339
  );
2340
- }, fr = (e) => /* @__PURE__ */ s(hr, { ...e }), gr = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "sent" }), pr = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "received" }), br = {
2341
- Composer: fr,
2342
- Sent: gr,
2343
- Received: pr
2344
- }, vr = ({
2340
+ }, gr = (e) => /* @__PURE__ */ s(fr, { ...e }), pr = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "sent" }), br = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "received" }), vr = {
2341
+ Composer: gr,
2342
+ Sent: pr,
2343
+ Received: br
2344
+ }, xr = ({
2345
2345
  open: e,
2346
2346
  items: t,
2347
2347
  initialIndex: n = 0,
@@ -2355,7 +2355,7 @@ const ar = ({
2355
2355
  () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "document"),
2356
2356
  [o]
2357
2357
  ), u = se(
2358
- () => o ? xr(o.src) : void 0,
2358
+ () => o ? wr(o.src) : void 0,
2359
2359
  [o]
2360
2360
  );
2361
2361
  return !o || !u ? null : /* @__PURE__ */ h(
@@ -2389,16 +2389,16 @@ const ar = ({
2389
2389
  ]
2390
2390
  }
2391
2391
  );
2392
- }, xr = (e) => {
2392
+ }, wr = (e) => {
2393
2393
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2394
2394
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2395
- }, wr = ({
2395
+ }, _r = ({
2396
2396
  src: e,
2397
2397
  filename: t,
2398
2398
  fileSize: n,
2399
2399
  title: a,
2400
2400
  items: r
2401
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], _r = ({
2401
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Nr = ({
2402
2402
  variant: e,
2403
2403
  item: t,
2404
2404
  index: n,
@@ -2431,7 +2431,7 @@ const ar = ({
2431
2431
  onClick: d,
2432
2432
  onDismiss: u
2433
2433
  }) => {
2434
- const g = Ee(e), m = wr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: x } = Ie(
2434
+ const g = Ee(e), m = _r({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: x } = Ie(
2435
2435
  d
2436
2436
  ), p = e === "composer" && !!u;
2437
2437
  if (m.length === 0)
@@ -2460,7 +2460,7 @@ const ar = ({
2460
2460
  }
2461
2461
  );
2462
2462
  return /* @__PURE__ */ s(
2463
- _r,
2463
+ Nr,
2464
2464
  {
2465
2465
  variant: g,
2466
2466
  item: w,
@@ -2472,7 +2472,7 @@ const ar = ({
2472
2472
  );
2473
2473
  }) }),
2474
2474
  /* @__PURE__ */ s(
2475
- vr,
2475
+ xr,
2476
2476
  {
2477
2477
  open: f,
2478
2478
  items: b,
@@ -2483,10 +2483,10 @@ const ar = ({
2483
2483
  ]
2484
2484
  }
2485
2485
  );
2486
- }, Nr = (e) => /* @__PURE__ */ s(ht, { ...e, state: "composer" }), yr = (e) => /* @__PURE__ */ s(ht, { ...e, state: "sent" }), kr = (e) => /* @__PURE__ */ s(ht, { ...e, state: "received" }), Cr = {
2487
- Composer: Nr,
2488
- Sent: yr,
2489
- Received: kr
2486
+ }, yr = (e) => /* @__PURE__ */ s(ht, { ...e, state: "composer" }), kr = (e) => /* @__PURE__ */ s(ht, { ...e, state: "sent" }), Cr = (e) => /* @__PURE__ */ s(ht, { ...e, state: "received" }), Sr = {
2487
+ Composer: yr,
2488
+ Sent: kr,
2489
+ Received: Cr
2490
2490
  }, Ss = ({
2491
2491
  open: e,
2492
2492
  items: t,
@@ -2537,7 +2537,7 @@ const ar = ({
2537
2537
  ]
2538
2538
  }
2539
2539
  ) : null;
2540
- }, Sr = () => /* @__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(Qe, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Es = ({
2540
+ }, 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(Qe, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Es = ({
2541
2541
  item: e,
2542
2542
  index: t
2543
2543
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2559,11 +2559,11 @@ const ar = ({
2559
2559
  "aria-hidden": !0
2560
2560
  }
2561
2561
  ) }),
2562
- /* @__PURE__ */ s(Sr, {})
2563
- ] }), Er = (e, t, n) => ({
2562
+ /* @__PURE__ */ s(Er, {})
2563
+ ] }), Ir = (e, t, n) => ({
2564
2564
  ariaLabel: `Play video ${t + 1} of ${n}`,
2565
2565
  content: /* @__PURE__ */ s(Es, { item: e, index: t })
2566
- }), Ir = ({
2566
+ }), Tr = ({
2567
2567
  src: e,
2568
2568
  poster: t,
2569
2569
  mimeType: n,
@@ -2575,7 +2575,7 @@ const ar = ({
2575
2575
  mimeType: n.mimeType,
2576
2576
  preload: n.preload,
2577
2577
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2578
- })), Tr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2578
+ })), Mr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2579
2579
  const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: g } = Ie(
2580
2580
  i
2581
2581
  );
@@ -2616,13 +2616,13 @@ const ar = ({
2616
2616
  preload: d,
2617
2617
  onClick: u
2618
2618
  }) => {
2619
- const g = Ir({ src: t, poster: n, mimeType: a, preload: d, items: i }), m = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: x } = Ie(
2619
+ const g = Tr({ src: t, poster: n, mimeType: a, preload: d, items: i }), m = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: x } = Ie(
2620
2620
  u
2621
2621
  );
2622
2622
  if (g.length === 0)
2623
2623
  return null;
2624
2624
  const p = g.map(
2625
- (b, w) => Er(b, w, g.length)
2625
+ (b, w) => Ir(b, w, g.length)
2626
2626
  );
2627
2627
  return /* @__PURE__ */ h(
2628
2628
  Ce,
@@ -2652,31 +2652,31 @@ const ar = ({
2652
2652
  ]
2653
2653
  }
2654
2654
  );
2655
- }, Mr = (e) => /* @__PURE__ */ s(Tr, { ...e }), Ar = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), Rr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), Lr = {
2656
- Composer: Mr,
2657
- Sent: Ar,
2658
- Received: Rr
2655
+ }, Ar = (e) => /* @__PURE__ */ s(Mr, { ...e }), Rr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), Lr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), Dr = {
2656
+ Composer: Ar,
2657
+ Sent: Rr,
2658
+ Received: Lr
2659
2659
  }, xe = {
2660
- Image: br,
2661
- Video: Lr,
2662
- Audio: Ka,
2663
- Pdf: Cr,
2664
- File: cr
2665
- }, Dr = {
2666
- isUnlocking: () => !1
2660
+ Image: vr,
2661
+ Video: Dr,
2662
+ Audio: Za,
2663
+ Pdf: Sr,
2664
+ File: dr
2667
2665
  }, Pr = {
2668
- LockedAttachment: Dr
2666
+ isUnlocking: () => !1
2667
+ }, zr = {
2668
+ LockedAttachment: Pr
2669
2669
  }, Ms = st({}), go = Ms.Provider;
2670
- function zr(e) {
2671
- return ye(Ms)[e] ?? Pr[e];
2670
+ function Or(e) {
2671
+ return ye(Ms)[e] ?? zr[e];
2672
2672
  }
2673
- const Or = j.lazy(() => import("./Card-qS17qnN0.js")), Fr = j.lazy(() => import("./Card-CL8BkAA9.js")), Br = () => /* @__PURE__ */ s(
2673
+ const Fr = j.lazy(() => import("./Card-qS17qnN0.js")), Br = j.lazy(() => import("./Card-CdouSSmP.js")), $r = () => /* @__PURE__ */ s(
2674
2674
  "div",
2675
2675
  {
2676
2676
  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)]",
2677
2677
  "aria-hidden": !0
2678
2678
  }
2679
- ), Re = (e) => /* @__PURE__ */ s(Vs, { fallback: /* @__PURE__ */ s(Br, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(Or, { ...e }) : /* @__PURE__ */ s(Fr, { ...e }) }), $r = ({ size: e = 15 }) => /* @__PURE__ */ s(
2679
+ ), Re = (e) => /* @__PURE__ */ s(Gs, { fallback: /* @__PURE__ */ s($r, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(Fr, { ...e }) : /* @__PURE__ */ s(Br, { ...e }) }), Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2680
2680
  "svg",
2681
2681
  {
2682
2682
  width: e,
@@ -2693,10 +2693,10 @@ const Or = j.lazy(() => import("./Card-qS17qnN0.js")), Fr = j.lazy(() => import(
2693
2693
  }
2694
2694
  )
2695
2695
  }
2696
- ), Ur = (e) => {
2696
+ ), jr = (e) => {
2697
2697
  var t;
2698
2698
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2699
- }, jr = (e) => {
2699
+ }, As = (e) => {
2700
2700
  var t;
2701
2701
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2702
2702
  }, De = (e) => {
@@ -2711,9 +2711,9 @@ const Or = j.lazy(() => import("./Card-qS17qnN0.js")), Fr = j.lazy(() => import(
2711
2711
  }, Gr = (e) => {
2712
2712
  var t;
2713
2713
  return ft(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2714
- }, As = (e) => Ur(e) || jr(e), Hr = (e) => {
2714
+ }, Rs = (e) => jr(e) || As(e), Hr = (e) => {
2715
2715
  var t;
2716
- return As(e) && !((t = e.text) != null && t.trim());
2716
+ return Rs(e) && !((t = e.text) != null && t.trim());
2717
2717
  }, qe = ({
2718
2718
  message: e,
2719
2719
  standalone: t = !1,
@@ -2721,23 +2721,23 @@ const Or = j.lazy(() => import("./Card-qS17qnN0.js")), Fr = j.lazy(() => import(
2721
2721
  hasAttachment: a = !1
2722
2722
  }) => {
2723
2723
  var m;
2724
- const r = As(e), i = De(e);
2724
+ const r = Rs(e), i = De(e);
2725
2725
  if (!r && !i)
2726
2726
  return null;
2727
2727
  if (r) {
2728
2728
  const f = (m = e.metadata) == null ? void 0 : m.amount_text;
2729
2729
  if (!f) return null;
2730
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${f} tip` : `Delivered with ${f} tip`;
2730
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = As(e) ? "message" : "tip", x = t ? `${f} ${v}` : `Delivered with ${f} ${v}`;
2731
2731
  return /* @__PURE__ */ h("div", { className: c, children: [
2732
- /* @__PURE__ */ s(Hn, { size: t ? 14 : 12 }),
2733
- /* @__PURE__ */ s("span", { children: v })
2732
+ /* @__PURE__ */ s(Yn, { size: t ? 14 : 12 }),
2733
+ /* @__PURE__ */ s("span", { children: x })
2734
2734
  ] });
2735
2735
  }
2736
2736
  const l = n && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
2737
2737
  "message-chatbot-indicator",
2738
2738
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2739
2739
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2740
- ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s($r, { size: l ? 12 : 15 }) });
2740
+ ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Ur, { size: l ? 12 : 15 }) });
2741
2741
  return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ h(ee, { children: [
2742
2742
  u,
2743
2743
  g
@@ -2761,7 +2761,7 @@ const Or = j.lazy(() => import("./Card-qS17qnN0.js")), Fr = j.lazy(() => import(
2761
2761
  "aria-label": "Good response",
2762
2762
  "aria-pressed": e === "up",
2763
2763
  "data-tooltip": "Good response",
2764
- children: /* @__PURE__ */ s(Yn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2764
+ children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2765
2765
  }
2766
2766
  ),
2767
2767
  /* @__PURE__ */ s(
@@ -2775,7 +2775,7 @@ const Or = j.lazy(() => import("./Card-qS17qnN0.js")), Fr = j.lazy(() => import(
2775
2775
  "aria-label": "Bad response",
2776
2776
  "aria-pressed": e === "down",
2777
2777
  "data-tooltip": "Bad response",
2778
- children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2778
+ children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2779
2779
  }
2780
2780
  )
2781
2781
  ] }), We = () => {
@@ -2788,11 +2788,11 @@ const Or = j.lazy(() => import("./Card-qS17qnN0.js")), Fr = j.lazy(() => import(
2788
2788
  }
2789
2789
  })();
2790
2790
  return e.id !== n ? null : /* @__PURE__ */ h(ee, { children: [
2791
- /* @__PURE__ */ s(Wn, { weight: "bold", "aria-hidden": "true" }),
2791
+ /* @__PURE__ */ s(Xn, { weight: "bold", "aria-hidden": "true" }),
2792
2792
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2793
2793
  ] });
2794
2794
  }, qr = () => null, Wr = () => /* @__PURE__ */ s(
2795
- Ws,
2795
+ Xs,
2796
2796
  {
2797
2797
  MessageSentStatus: We,
2798
2798
  MessageDeliveredStatus: We,
@@ -3056,7 +3056,7 @@ const Zr = {
3056
3056
  onClick: m,
3057
3057
  "aria-label": "Edit attachment",
3058
3058
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3059
- children: /* @__PURE__ */ s(Xn, { className: "size-5", weight: "regular" })
3059
+ children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
3060
3060
  }
3061
3061
  ) : void 0;
3062
3062
  return c ? /* @__PURE__ */ s(Pe, { variant: "dark", bgClassName: vt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
@@ -3242,13 +3242,13 @@ function qt(e) {
3242
3242
  }
3243
3243
  function ci(e) {
3244
3244
  var t;
3245
- return Rs(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3245
+ return Ls(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3246
3246
  }
3247
- function Rs(e) {
3247
+ function Ls(e) {
3248
3248
  const t = P(e.og_scrape_url);
3249
3249
  return e.type === "link" || !!t && !e.asset_url;
3250
3250
  }
3251
- function Ls(e) {
3251
+ function Ds(e) {
3252
3252
  if (!(e != null && e.length)) return [];
3253
3253
  const t = [], n = (r, i) => {
3254
3254
  const l = t[t.length - 1];
@@ -3266,7 +3266,7 @@ function Ls(e) {
3266
3266
  t.push({ type: "link", attachments: [r] });
3267
3267
  };
3268
3268
  for (const r of e) {
3269
- if (Rs(r)) {
3269
+ if (Ls(r)) {
3270
3270
  a(r);
3271
3271
  continue;
3272
3272
  }
@@ -3403,7 +3403,7 @@ const gi = ({
3403
3403
  renderText: a
3404
3404
  }) => {
3405
3405
  var v;
3406
- const r = Ls(n.attachments);
3406
+ const r = Ds(n.attachments);
3407
3407
  if (r.length === 0) return null;
3408
3408
  const i = di(r), l = (v = n.text) == null ? void 0 : v.trim(), o = r.find((x) => x.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? qt(o.attachments[0] ?? {}).url : void 0, u = l && li(l, d) ? void 0 : l;
3409
3409
  let g = 0;
@@ -3486,19 +3486,19 @@ const gi = ({
3486
3486
  renderText: v,
3487
3487
  threadList: x,
3488
3488
  viewerLanguage: p
3489
- } = e, { client: b } = ke("CustomMessage"), { channel: w } = ue("CustomMessage"), { isUnlocking: E, onUnlockClick: k, onFetchSource: R, onDownloadClick: A } = zr("LockedAttachment"), [z, B] = F(!1), O = Ks(c.id), { selected: L, voteUp: C, voteDown: T } = ba(c), {
3490
- Attachment: S = Zs,
3491
- EditMessageModal: I = Js,
3489
+ } = e, { client: b } = ke("CustomMessage"), { channel: w } = ue("CustomMessage"), { isUnlocking: E, onUnlockClick: k, onFetchSource: R, onDownloadClick: A } = Or("LockedAttachment"), [z, B] = F(!1), O = Zs(c.id), { selected: L, voteUp: C, voteDown: T } = va(c), {
3490
+ Attachment: S = Js,
3491
+ EditMessageModal: I = Qs,
3492
3492
  MessageActions: y,
3493
- MessageBlocked: D = Qs,
3494
- MessageBouncePrompt: H = en,
3495
- MessageDeleted: q = tn,
3496
- MessageIsThreadReplyInChannelButtonIndicator: K = sn,
3497
- MessageRepliesCountButton: Z = nn,
3498
- ReminderNotification: V = an,
3499
- StreamedMessageText: _ = rn,
3493
+ MessageBlocked: D = en,
3494
+ MessageBouncePrompt: H = tn,
3495
+ MessageDeleted: q = sn,
3496
+ MessageIsThreadReplyInChannelButtonIndicator: K = nn,
3497
+ MessageRepliesCountButton: Z = an,
3498
+ ReminderNotification: V = rn,
3499
+ StreamedMessageText: _ = on,
3500
3500
  PinIndicator: M
3501
- } = es("CustomMessage"), $ = on(c), te = ln(c), X = se(
3501
+ } = es("CustomMessage"), $ = ln(c), te = cn(c), X = se(
3502
3502
  () => m == null ? void 0 : m(c),
3503
3503
  [m, c]
3504
3504
  ), U = se(() => {
@@ -3507,7 +3507,7 @@ const gi = ({
3507
3507
  const Pt = fe.filter((zt) => !("type" in zt) || !ps(zt));
3508
3508
  return Pt.length === fe.length ? fe : Pt;
3509
3509
  }, [c]), J = se(
3510
- () => Ls(U),
3510
+ () => Ds(U),
3511
3511
  [U]
3512
3512
  ), ae = se(() => {
3513
3513
  const ce = us({ message: c, viewerLanguage: p });
@@ -3515,21 +3515,21 @@ const gi = ({
3515
3515
  }, [c, p]), Te = J.length > 0, Me = J.reduce(
3516
3516
  (ce, fe) => ce + fe.attachments.length,
3517
3517
  0
3518
- ) === ((U == null ? void 0 : U.length) ?? 0), re = Ga({
3518
+ ) === ((U == null ? void 0 : U.length) ?? 0), re = Ha({
3519
3519
  endOfGroup: r,
3520
3520
  firstOfGroup: i,
3521
3521
  groupedByUser: l
3522
3522
  });
3523
- if (cn(c))
3523
+ if (dn(c))
3524
3524
  return null;
3525
3525
  if (c.deleted_at || c.type === "deleted")
3526
3526
  return /* @__PURE__ */ s(q, { message: c });
3527
- if (dn(c))
3527
+ if (un(c))
3528
3528
  return /* @__PURE__ */ s(D, {});
3529
- const le = !x && !!c.reply_count, ie = !x && c.show_in_channel && c.parent_id, xt = c.status === "failed" && ((Ct = c.error) == null ? void 0 : Ct.status) !== 403, wt = un(c);
3529
+ const le = !x && !!c.reply_count, ie = !x && c.show_in_channel && c.parent_id, xt = c.status === "failed" && ((Ct = c.error) == null ? void 0 : Ct.status) !== 403, wt = mn(c);
3530
3530
  let me;
3531
3531
  xt ? me = () => u(c) : wt && (me = () => B(!0));
3532
- const Q = f(), Bs = N(
3532
+ const Q = f(), $s = N(
3533
3533
  "str-chat__message str-chat__message-simple",
3534
3534
  `str-chat__message--${c.type}`,
3535
3535
  `str-chat__message--${c.status}`,
@@ -3546,7 +3546,7 @@ const gi = ({
3546
3546
  "str-chat__virtual-message__wrapper--first": i,
3547
3547
  "str-chat__virtual-message__wrapper--group": l
3548
3548
  }
3549
- ), Ue = c.poll_id && b.polls.fromState(c.poll_id), _t = Hr(c), he = De(c), $s = ft(c), je = !!(U != null && U.length && !c.quoted_message), Nt = he && Q && je, Us = Te && Me && !c.quoted_message && !Ue && !X && !he, yt = {
3549
+ ), Ue = c.poll_id && b.polls.fromState(c.poll_id), _t = Hr(c), he = De(c), Us = ft(c), je = !!(U != null && U.length && !c.quoted_message), Nt = he && Q && je, js = Te && Me && !c.quoted_message && !Ue && !X && !he, yt = {
3550
3550
  contentType: "text",
3551
3551
  amountText: (Et = c.metadata) == null ? void 0 : Et.amount_text,
3552
3552
  paymentStatus: (It = c.metadata) == null ? void 0 : It.payment_status,
@@ -3569,7 +3569,7 @@ const gi = ({
3569
3569
  }
3570
3570
  ),
3571
3571
  z && /* @__PURE__ */ s(
3572
- mn,
3572
+ hn,
3573
3573
  {
3574
3574
  MessageBouncePrompt: H,
3575
3575
  onClose: () => B(!1),
@@ -3579,7 +3579,7 @@ const gi = ({
3579
3579
  /* @__PURE__ */ h(
3580
3580
  "div",
3581
3581
  {
3582
- className: Bs,
3582
+ className: $s,
3583
3583
  "data-message-id": c.id,
3584
3584
  "data-dd-privacy": "mask",
3585
3585
  children: [
@@ -3661,7 +3661,7 @@ const gi = ({
3661
3661
  renderText: v
3662
3662
  }
3663
3663
  ) })
3664
- ] }) : Us ? /* @__PURE__ */ s(
3664
+ ] }) : js ? /* @__PURE__ */ s(
3665
3665
  gi,
3666
3666
  {
3667
3667
  groupPosition: re,
@@ -3685,7 +3685,7 @@ const gi = ({
3685
3685
  isMyMessage: Q
3686
3686
  }
3687
3687
  ),
3688
- Ue && /* @__PURE__ */ s(hn, { poll: Ue }),
3688
+ Ue && /* @__PURE__ */ s(fn, { poll: Ue }),
3689
3689
  U != null && U.length && !c.quoted_message ? /* @__PURE__ */ s(
3690
3690
  S,
3691
3691
  {
@@ -3710,7 +3710,7 @@ const gi = ({
3710
3710
  ] }) })
3711
3711
  }
3712
3712
  ),
3713
- !$s && !_t && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
3713
+ !Us && !_t && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
3714
3714
  (!he || Nt) && /* @__PURE__ */ s(
3715
3715
  qe,
3716
3716
  {
@@ -3744,7 +3744,7 @@ const gi = ({
3744
3744
  ] });
3745
3745
  }, bi = j.memo(
3746
3746
  pi,
3747
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Xs(e, t)
3747
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
3748
3748
  ), vi = (e) => {
3749
3749
  const t = pe("CustomMessage");
3750
3750
  return /* @__PURE__ */ s(bi, { ...t, ...e });
@@ -3758,7 +3758,7 @@ const gi = ({
3758
3758
  "aria-label": "Delete",
3759
3759
  title: "Delete",
3760
3760
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3761
- children: /* @__PURE__ */ s(Kn, { size: 16, weight: "light", "aria-hidden": !0 })
3761
+ children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3762
3762
  }
3763
3763
  );
3764
3764
  }, wi = () => {
@@ -3777,7 +3777,7 @@ const gi = ({
3777
3777
  var t;
3778
3778
  const { message: e } = pe("CustomMessageActions");
3779
3779
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3780
- ea,
3780
+ ta,
3781
3781
  {
3782
3782
  messageActionSet: [
3783
3783
  { Component: xi, placement: "quick", type: "delete" },
@@ -3830,7 +3830,7 @@ const gi = ({
3830
3830
  (t) => Ot.previewIsLoaded(t) || Ot.previewIsLoading(t)
3831
3831
  )
3832
3832
  }), ki = () => {
3833
- const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
3833
+ const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3834
3834
  e.state,
3835
3835
  yi
3836
3836
  ), n = (r) => {
@@ -3856,12 +3856,12 @@ const gi = ({
3856
3856
  disabled: t,
3857
3857
  onPointerDown: (a) => a.preventDefault(),
3858
3858
  onClick: e,
3859
- children: /* @__PURE__ */ s(Zn, { weight: "bold", className: "size-4" })
3859
+ children: /* @__PURE__ */ s(Jn, { weight: "bold", className: "size-4" })
3860
3860
  }
3861
3861
  ), Xt = () => {
3862
- const e = ye(Oe), { handleSubmit: t } = pn(), n = bn(), a = e || !n, {
3862
+ const e = ye(Oe), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
3863
3863
  SendButton: r = Si,
3864
- AttachmentPreviewList: i = vn
3864
+ AttachmentPreviewList: i = xn
3865
3865
  } = es("CustomMessageInput");
3866
3866
  return (
3867
3867
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
@@ -3892,13 +3892,13 @@ const gi = ({
3892
3892
  "data-dd-privacy": "mask",
3893
3893
  children: [
3894
3894
  /* @__PURE__ */ h("div", { className: "messaging-composer-previews empty:hidden flex min-h-0 flex-col gap-2 px-2 pt-2", children: [
3895
- /* @__PURE__ */ s(xn, {}),
3895
+ /* @__PURE__ */ s(wn, {}),
3896
3896
  /* @__PURE__ */ s(ki, {}),
3897
3897
  /* @__PURE__ */ s(i, {})
3898
3898
  ] }),
3899
3899
  /* @__PURE__ */ h("div", { className: "messaging-composer-row flex shrink-0 items-start", children: [
3900
3900
  /* @__PURE__ */ s(
3901
- wn,
3901
+ _n,
3902
3902
  {
3903
3903
  "aria-disabled": e || void 0,
3904
3904
  containerClassName: "min-w-0 flex-1 leading-[0]",
@@ -4104,7 +4104,7 @@ const gi = ({
4104
4104
  "data-dm-agent-system-type": n.type,
4105
4105
  children: [
4106
4106
  /* @__PURE__ */ s(
4107
- Jn,
4107
+ Qn,
4108
4108
  {
4109
4109
  size: 16,
4110
4110
  weight: "regular",
@@ -4130,7 +4130,7 @@ const gi = ({
4130
4130
  "data-age-safety-system-type": n.type,
4131
4131
  children: [
4132
4132
  /* @__PURE__ */ s(
4133
- Qn,
4133
+ ea,
4134
4134
  {
4135
4135
  size: 24,
4136
4136
  weight: "duotone",
@@ -4154,7 +4154,7 @@ const gi = ({
4154
4154
  ] }),
4155
4155
  !t && /* @__PURE__ */ s(Ve, { message: e.message })
4156
4156
  ] });
4157
- }, Ds = st(!1), Ke = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4157
+ }, Ps = st(!1), Ke = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4158
4158
  "animateTransform",
4159
4159
  {
4160
4160
  attributeName: "transform",
@@ -4170,7 +4170,7 @@ const gi = ({
4170
4170
  Ge.ExternalSources
4171
4171
  ]), $i = ({ threadList: e }) => {
4172
4172
  var v, x;
4173
- const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = ke(), { typing: i = {} } = _n(), { aiState: l } = Nn(t), o = ye(Ds);
4173
+ const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = ke(), { typing: i = {} } = Nn(), { aiState: l } = yn(t), o = ye(Ps);
4174
4174
  if (!e && o && Bi.has(l)) {
4175
4175
  const p = Ui(t, (v = r.user) == null ? void 0 : v.id);
4176
4176
  return /* @__PURE__ */ s(
@@ -4339,7 +4339,7 @@ const Gi = ({
4339
4339
  const { channel: O } = ue(), L = O.state.messages.some(
4340
4340
  (I) => I.type !== "deleted"
4341
4341
  ), C = b ? /* @__PURE__ */ s(j.Fragment, { children: b() }, "lt-channel-banner") : null, T = /* @__PURE__ */ s(
4342
- fa,
4342
+ ga,
4343
4343
  {
4344
4344
  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%)]",
4345
4345
  onBack: e,
@@ -4373,7 +4373,7 @@ const Gi = ({
4373
4373
  [p, k, R]
4374
4374
  );
4375
4375
  return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4376
- kn,
4376
+ Cn,
4377
4377
  {
4378
4378
  overrides: {
4379
4379
  Message: S,
@@ -4381,7 +4381,7 @@ const Gi = ({
4381
4381
  UnreadMessagesNotification: () => null,
4382
4382
  UnreadMessagesSeparator: () => null
4383
4383
  },
4384
- children: /* @__PURE__ */ s(Cn, { children: B ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4384
+ children: /* @__PURE__ */ s(Sn, { children: B ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4385
4385
  /* @__PURE__ */ h(
4386
4386
  "div",
4387
4387
  {
@@ -4464,7 +4464,7 @@ const Gi = ({
4464
4464
  ] }) })
4465
4465
  }
4466
4466
  ) });
4467
- }, Ps = j.memo(
4467
+ }, zs = j.memo(
4468
4468
  ({
4469
4469
  channel: e,
4470
4470
  onBack: t,
@@ -4540,14 +4540,14 @@ const Gi = ({
4540
4540
  "messaging-channel-view h-full flex flex-col",
4541
4541
  d
4542
4542
  ),
4543
- children: /* @__PURE__ */ s(Ds.Provider, { value: w ?? !1, children: /* @__PURE__ */ s(
4544
- yn,
4543
+ children: /* @__PURE__ */ s(Ps.Provider, { value: w ?? !1, children: /* @__PURE__ */ s(
4544
+ kn,
4545
4545
  {
4546
4546
  channel: e,
4547
4547
  MessageSystem: Fi,
4548
4548
  EmptyStateIndicator: u,
4549
4549
  LoadingIndicator: Fe,
4550
- DateSeparator: ga,
4550
+ DateSeparator: pa,
4551
4551
  TypingIndicator: $i,
4552
4552
  doSendMessageRequest: q,
4553
4553
  ...T ? { SendButton: T } : {},
@@ -4589,7 +4589,7 @@ const Gi = ({
4589
4589
  );
4590
4590
  }
4591
4591
  );
4592
- Ps.displayName = "ChannelView";
4592
+ zs.displayName = "ChannelView";
4593
4593
  const we = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
4594
4594
  /* @__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: "⚠️" }) }),
4595
4595
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
@@ -4637,7 +4637,7 @@ const bo = ({
4637
4637
  refreshConnection: L,
4638
4638
  service: C,
4639
4639
  debug: T
4640
- } = ta(), [S, I] = F(null), [y, D] = F(null), [H, q] = F(!1), { showDeleteConversation: K = !0 } = e, Z = G(l);
4640
+ } = sa(), [S, I] = F(null), [y, D] = F(null), [H, q] = F(!1), { showDeleteConversation: K = !0 } = e, Z = G(l);
4641
4641
  Z.current = l;
4642
4642
  const V = G(a);
4643
4643
  V.current = a;
@@ -4721,7 +4721,7 @@ const bo = ({
4721
4721
  onBack: L
4722
4722
  }
4723
4723
  ) : y ? /* @__PURE__ */ s(we, { message: y }) : H && !S ? /* @__PURE__ */ s(we, { message: "Conversation ended" }) : S ? /* @__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(
4724
- Ps,
4724
+ zs,
4725
4725
  {
4726
4726
  channel: S,
4727
4727
  renderMessageInputActions: t,
@@ -4754,7 +4754,7 @@ function Hi(e) {
4754
4754
  for (const n of t)
4755
4755
  e.state.addMessageSorted(n.message);
4756
4756
  }
4757
- const zs = j.createContext({
4757
+ const Os = j.createContext({
4758
4758
  selectedChannel: void 0,
4759
4759
  onChannelSelect: () => {
4760
4760
  },
@@ -4762,7 +4762,7 @@ const zs = j.createContext({
4762
4762
  renderMessagePreview: void 0,
4763
4763
  channelPreview: void 0,
4764
4764
  viewerLanguage: void 0
4765
- }), Yi = zs.Provider, qi = () => j.useContext(zs), Wi = (e, t) => {
4765
+ }), Yi = Os.Provider, qi = () => j.useContext(Os), Wi = (e, t) => {
4766
4766
  const n = new Date(
4767
4767
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4768
4768
  ), r = new Date(
@@ -4783,7 +4783,7 @@ const zs = j.createContext({
4783
4783
  month: "short",
4784
4784
  year: "2-digit"
4785
4785
  });
4786
- }, Os = j.memo(
4786
+ }, Fs = j.memo(
4787
4787
  (e) => {
4788
4788
  var B, O, L;
4789
4789
  const { channel: t, unread: n } = e, {
@@ -4899,7 +4899,7 @@ const zs = j.createContext({
4899
4899
  );
4900
4900
  }
4901
4901
  );
4902
- Os.displayName = "CustomChannelPreview";
4902
+ Fs.displayName = "CustomChannelPreview";
4903
4903
  const Ki = { last_message_at: -1 }, Zi = j.memo(
4904
4904
  ({
4905
4905
  onChannelSelect: e,
@@ -4910,7 +4910,7 @@ const Ki = { last_message_at: -1 }, Zi = j.memo(
4910
4910
  sort: i = Ki,
4911
4911
  className: l,
4912
4912
  customEmptyStateIndicator: o,
4913
- channelListPaginator: d = En,
4913
+ channelListPaginator: d = In,
4914
4914
  channelPreview: u,
4915
4915
  renderMessagePreview: g,
4916
4916
  viewerLanguage: m,
@@ -4962,7 +4962,7 @@ const Ki = { last_message_at: -1 }, Zi = j.memo(
4962
4962
  l
4963
4963
  ),
4964
4964
  children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Yi, { value: R, children: /* @__PURE__ */ s(
4965
- Sn,
4965
+ En,
4966
4966
  {
4967
4967
  filters: n,
4968
4968
  sort: i,
@@ -4976,7 +4976,7 @@ const Ki = { last_message_at: -1 }, Zi = j.memo(
4976
4976
  onAddedToChannel: p,
4977
4977
  onChannelUpdated: b,
4978
4978
  Paginator: d,
4979
- Preview: Os,
4979
+ Preview: Fs,
4980
4980
  EmptyStateIndicator: o
4981
4981
  },
4982
4982
  `${JSON.stringify(n)}:${JSON.stringify(i)}`
@@ -5013,7 +5013,7 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5013
5013
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
5014
5014
  color: "var(--str-chat__message-bubble-color, #000000)"
5015
5015
  }
5016
- }, Fs = ({
5016
+ }, Bs = ({
5017
5017
  variant: e,
5018
5018
  text: t,
5019
5019
  tail: n = !0,
@@ -5045,7 +5045,7 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5045
5045
  header: n,
5046
5046
  className: a
5047
5047
  }) => /* @__PURE__ */ s(
5048
- Fs,
5048
+ Bs,
5049
5049
  {
5050
5050
  variant: "received",
5051
5051
  text: e,
@@ -5053,7 +5053,7 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5053
5053
  header: n,
5054
5054
  className: a
5055
5055
  }
5056
- ), so = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Fs, { variant: "sent", text: e, tail: t, className: n }), vo = {
5056
+ ), so = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Bs, { variant: "sent", text: e, tail: t, className: n }), vo = {
5057
5057
  Sent: so,
5058
5058
  Received: to
5059
5059
  }, no = ({
@@ -5127,15 +5127,15 @@ export {
5127
5127
  cs as D,
5128
5128
  po as E,
5129
5129
  xo as F,
5130
- zr as G,
5131
- ba as H,
5132
- ta as I,
5130
+ Or as G,
5131
+ va as H,
5132
+ sa as I,
5133
5133
  Ht as L,
5134
5134
  fo as M,
5135
5135
  ve as a,
5136
5136
  be as b,
5137
5137
  Zi as c,
5138
- Ps as d,
5138
+ zs as d,
5139
5139
  go as e,
5140
5140
  no as f,
5141
5141
  oe as g,
@@ -5145,18 +5145,18 @@ export {
5145
5145
  Yr as k,
5146
5146
  ho as l,
5147
5147
  bo as m,
5148
- er as n,
5148
+ tr as n,
5149
5149
  de as o,
5150
- Za as p,
5150
+ Ja as p,
5151
5151
  Xi as q,
5152
5152
  ge as r,
5153
- Qa as s,
5153
+ er as s,
5154
5154
  us as t,
5155
5155
  ps as u,
5156
- ra as v,
5157
- Ga as w,
5158
- va as x,
5156
+ ia as v,
5157
+ Ha as w,
5158
+ xa as x,
5159
5159
  ls as y,
5160
5160
  it as z
5161
5161
  };
5162
- //# sourceMappingURL=index-CGWNR062.js.map
5162
+ //# sourceMappingURL=index-B5xEngCd.js.map