@linktr.ee/messaging-react 3.24.2-rc-1785436624 → 3.25.0-rc-1785440433

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{Card-BI3bA2Cj.js → Card-DcyixIfP.js} +2 -2
  2. package/dist/{Card-BI3bA2Cj.js.map → Card-DcyixIfP.js.map} +1 -1
  3. package/dist/{Card-iXdD3NF2.cjs → Card-_fDH4x4V.cjs} +2 -2
  4. package/dist/{Card-iXdD3NF2.cjs.map → Card-_fDH4x4V.cjs.map} +1 -1
  5. package/dist/{index-BlHbSVwK.js → index-DSQieSNh.js} +881 -798
  6. package/dist/index-DSQieSNh.js.map +1 -0
  7. package/dist/index-quV01XX7.cjs +2 -0
  8. package/dist/index-quV01XX7.cjs.map +1 -0
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +1 -1
  12. package/package.json +2 -2
  13. package/src/components/LinkAttachment/LinkAttachment.stories.tsx +17 -9
  14. package/src/components/LinkAttachment/LinkAttachment.test.tsx +87 -53
  15. package/src/components/LinkAttachment/components/Composer/Card.tsx +1 -1
  16. package/src/components/LinkAttachment/components/Received/Card.tsx +1 -1
  17. package/src/components/LinkAttachment/components/Sent/Card.tsx +1 -1
  18. package/src/components/LinkAttachment/components/_shared/CardBody.tsx +11 -10
  19. package/src/components/LinkAttachment/components/_shared/CardShell.tsx +7 -1
  20. package/src/components/LinkAttachment/components/_shared/CardThumbnail.tsx +9 -0
  21. package/src/components/LinkAttachment/components/_shared/accentSurface.test.ts +151 -0
  22. package/src/components/LinkAttachment/components/_shared/accentSurface.ts +211 -0
  23. package/src/components/LinkAttachment/components/_shared/chinContrast.test.ts +64 -124
  24. package/src/components/LinkAttachment/components/_shared/chinContrast.ts +68 -71
  25. package/src/components/LinkAttachment/components/_shared/useChinPalette.ts +35 -31
  26. package/src/components/LinkAttachment/types.ts +2 -2
  27. package/dist/index-BlHbSVwK.js.map +0 -1
  28. package/dist/index-F3RRurYR.cjs +0 -2
  29. package/dist/index-F3RRurYR.cjs.map +0 -1
@@ -1,13 +1,13 @@
1
1
  import { jsx as s, jsxs as h, Fragment as J } from "react/jsx-runtime";
2
- import F, { createContext as lt, useContext as ke, useCallback as W, useState as B, useRef as H, useEffect as Y, useId as en, useMemo as ne, Suspense as tn } from "react";
3
- import { StreamChatService as sn } from "@linktr.ee/messaging-core";
4
- import { StreamChat as nn, LinkPreviewsManager as et } from "stream-chat";
5
- import { Chat as an, useChannelStateContext as he, useChatContext as Se, DateSeparator as rn, useMessageContext as fe, MessageStatus as on, MessageErrorIcon as tt, MessageText as ze, areMessageUIPropsEqual as ln, useMessageReminder as cn, useComponentContext as ds, Attachment as dn, EditMessageModal as un, MessageBlocked as mn, MessageBouncePrompt as hn, MessageDeleted as fn, MessageIsThreadReplyInChannelButtonIndicator as gn, MessageRepliesCountButton as pn, ReminderNotification as bn, StreamedMessageText as vn, messageHasAttachments as xn, messageHasReactions as _n, isDateSeparatorMessage as wn, isMessageBlocked as Nn, isMessageBounced as yn, MessageBounceModal as Cn, Poll as kn, useMessageComposer as Sn, useStateStore as En, MessageInput as Yt, useMessageInputContext as In, useMessageComposerHasSendableData as Tn, AttachmentPreviewList as An, QuotedMessagePreview as Ln, TextareaComposer as Mn, MessageTimestamp as Ge, AIStates as Ye, useTypingContext as Rn, useAIState as Dn, Channel as Pn, WithComponents as On, Window as zn, MessageList as Wt, ChannelList as Bn, InfiniteScroll as Fn } from "stream-chat-react";
2
+ import B, { createContext as mt, useContext as ke, useCallback as W, useState as F, useRef as H, useEffect as Y, useId as rn, useMemo as ne, Suspense as on } from "react";
3
+ import { StreamChatService as ln } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as cn, LinkPreviewsManager as st } from "stream-chat";
5
+ import { Chat as dn, useChannelStateContext as he, useChatContext as Se, DateSeparator as un, useMessageContext as fe, MessageStatus as mn, MessageErrorIcon as nt, MessageText as Oe, areMessageUIPropsEqual as hn, useMessageReminder as fn, useComponentContext as gs, Attachment as gn, EditMessageModal as pn, MessageBlocked as bn, MessageBouncePrompt as vn, MessageDeleted as xn, MessageIsThreadReplyInChannelButtonIndicator as _n, MessageRepliesCountButton as wn, ReminderNotification as Nn, StreamedMessageText as yn, messageHasAttachments as Cn, messageHasReactions as kn, isDateSeparatorMessage as Sn, isMessageBlocked as En, isMessageBounced as In, MessageBounceModal as Tn, Poll as An, useMessageComposer as Mn, useStateStore as Ln, MessageInput as Kt, useMessageInputContext as Rn, useMessageComposerHasSendableData as Dn, AttachmentPreviewList as Pn, QuotedMessagePreview as On, TextareaComposer as zn, MessageTimestamp as He, AIStates as Ge, useTypingContext as Fn, useAIState as Bn, Channel as $n, WithComponents as Un, Window as Vn, MessageList as Zt, ChannelList as jn, InfiniteScroll as Hn } from "stream-chat-react";
6
6
  import y from "classnames";
7
- import { StarIcon as st, DotsThreeIcon as $n, SpinnerGapIcon as De, SignOutIcon as Un, ProhibitInsetIcon as qt, FlagIcon as us, CurrencyDollarIcon as Vn, CaretRightIcon as ms, ArrowLeftIcon as jn, FileIcon as hs, ImageIcon as Hn, SpeakerHighIcon as Gn, VideoCameraIcon as fs, FileMdIcon as Yn, FileTextIcon as Wn, FileZipIcon as qn, FilePptIcon as Xn, FileCsvIcon as Kn, FileXlsIcon as Zn, FileDocIcon as Jn, FilePdfIcon as Qn, CircleNotchIcon as ve, PlayIcon as nt, PauseIcon as ea, LinkIcon as ta, DownloadSimpleIcon as Ce, XIcon as ct, CaretLeftIcon as sa, GiftIcon as na, ThumbsUpIcon as aa, ThumbsDownIcon as ra, WarningCircleIcon as ia, MegaphoneIcon as oa, ChecksIcon as la, PencilSimpleIcon as ca, TrashSimpleIcon as da, ArrowUpIcon as ua, SparkleIcon as ma, ProhibitIcon as ha } from "@phosphor-icons/react";
8
- import { isOfficialChannel as fa, OFFICIAL_SENDER_USER_ID as ga, MESSAGE_CUSTOM_TYPE as le, isDmAgentSystemType as Xt, isAgeSafetySystemType as pa, selectEnabledFaqs as ba } from "@linktr.ee/messaging-taxonomy";
9
- import { MessageActions as va, DefaultDropdownActionButton as gs } from "stream-chat-react/experimental";
10
- const ps = lt({
7
+ import { StarIcon as at, DotsThreeIcon as Gn, SpinnerGapIcon as De, SignOutIcon as Yn, ProhibitInsetIcon as Jt, FlagIcon as ps, CurrencyDollarIcon as Wn, CaretRightIcon as bs, ArrowLeftIcon as Xn, FileIcon as vs, ImageIcon as qn, SpeakerHighIcon as Kn, VideoCameraIcon as xs, FileMdIcon as Zn, FileTextIcon as Jn, FileZipIcon as Qn, FilePptIcon as ea, FileCsvIcon as ta, FileXlsIcon as sa, FileDocIcon as na, FilePdfIcon as aa, CircleNotchIcon as ve, PlayIcon as rt, PauseIcon as ra, LinkIcon as ia, DownloadSimpleIcon as Ce, XIcon as ht, CaretLeftIcon as oa, GiftIcon as la, ThumbsUpIcon as ca, ThumbsDownIcon as da, WarningCircleIcon as ua, MegaphoneIcon as ma, ChecksIcon as ha, PencilSimpleIcon as fa, TrashSimpleIcon as ga, ArrowUpIcon as pa, SparkleIcon as ba, ProhibitIcon as va } from "@phosphor-icons/react";
8
+ import { isOfficialChannel as xa, OFFICIAL_SENDER_USER_ID as _a, MESSAGE_CUSTOM_TYPE as le, isDmAgentSystemType as Qt, isAgeSafetySystemType as wa, selectEnabledFaqs as Na } from "@linktr.ee/messaging-taxonomy";
9
+ import { MessageActions as ya, DefaultDropdownActionButton as _s } from "stream-chat-react/experimental";
10
+ const ws = mt({
11
11
  service: null,
12
12
  client: null,
13
13
  isConnected: !1,
@@ -17,7 +17,7 @@ const ps = lt({
17
17
  refreshConnection: async () => {
18
18
  },
19
19
  debug: !1
20
- }), dt = () => ke(ps), Ho = ({
20
+ }), ft = () => ke(ws), il = ({
21
21
  children: e,
22
22
  user: t,
23
23
  serviceConfig: n,
@@ -39,7 +39,7 @@ const ps = lt({
39
39
  serviceConfig: !!n,
40
40
  capabilities: Object.keys(r)
41
41
  });
42
- const [d, m] = B(null), [f, u] = B(null), [g, c] = B(!1), [x, _] = B(!1), [b, p] = B(null), v = H(!1), w = H(null), C = H(n);
42
+ const [d, m] = F(null), [f, u] = F(null), [g, c] = F(!1), [x, _] = F(!1), [b, p] = F(null), v = H(!1), w = H(null), C = H(n);
43
43
  C.current = n;
44
44
  const T = H(i);
45
45
  T.current = i;
@@ -65,7 +65,7 @@ const ps = lt({
65
65
  capabilities: r
66
66
  };
67
67
  const z = H(null);
68
- !l && a && ((k = z.current) == null ? void 0 : k.apiKey) !== a && (z.current = { apiKey: a, client: new nn(a) });
68
+ !l && a && ((k = z.current) == null ? void 0 : k.apiKey) !== a && (z.current = { apiKey: a, client: new cn(a) });
69
69
  const $ = l || (a ? ((E = z.current) == null ? void 0 : E.client) ?? null : null);
70
70
  Y(() => {
71
71
  const I = R.current, A = C.current;
@@ -84,7 +84,7 @@ const ps = lt({
84
84
  renderCount: I,
85
85
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
86
86
  });
87
- const U = new sn({
87
+ const U = new ln({
88
88
  ...A,
89
89
  apiKey: a,
90
90
  debug: T.current,
@@ -95,7 +95,7 @@ const ps = lt({
95
95
  serviceInstance: !!U
96
96
  });
97
97
  }, [a, $, l]);
98
- const L = H(null);
98
+ const M = H(null);
99
99
  Y(() => {
100
100
  var A, U;
101
101
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
@@ -115,7 +115,7 @@ const ps = lt({
115
115
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
116
116
  return;
117
117
  }
118
- if (((A = L.current) == null ? void 0 : A.serviceId) === d && ((U = L.current) == null ? void 0 : U.userId) === t.id) {
118
+ if (((A = M.current) == null ? void 0 : A.serviceId) === d && ((U = M.current) == null ? void 0 : U.userId) === t.id) {
119
119
  o(
120
120
  "⚠️ USER CONNECTION SKIPPED",
121
121
  "Already connected this user with this service"
@@ -127,15 +127,15 @@ const ps = lt({
127
127
  try {
128
128
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
129
129
  const j = await d.connectUser(t);
130
- u(j), c(!0), L.current = { serviceId: d, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
130
+ u(j), c(!0), M.current = { serviceId: d, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
131
131
  userId: t.id,
132
132
  clientId: j.userID
133
133
  });
134
134
  } catch (j) {
135
- const q = j instanceof Error ? j.message : "Connection failed";
136
- p(q), o("❌ USER CONNECTION ERROR", {
135
+ const X = j instanceof Error ? j.message : "Connection failed";
136
+ p(X), o("❌ USER CONNECTION ERROR", {
137
137
  userId: t.id,
138
- error: q
138
+ error: X
139
139
  });
140
140
  } finally {
141
141
  _(!1), v.current = !1, o("🔄 USER CONNECTION FINISHED", {
@@ -148,7 +148,7 @@ const ps = lt({
148
148
  const I = $;
149
149
  return () => {
150
150
  var A;
151
- I && (L.current = null, (A = w.current) == null || A.disconnectUser().catch(console.error));
151
+ I && (M.current = null, (A = w.current) == null || A.disconnectUser().catch(console.error));
152
152
  };
153
153
  }, [$]);
154
154
  const S = W(async () => {
@@ -175,7 +175,7 @@ const ps = lt({
175
175
  _(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
176
176
  }
177
177
  }
178
- }, [d, t, o, l]), P = F.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
178
+ }, [d, t, o, l]), P = B.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
179
179
  hasService: !!d,
180
180
  hasClient: !!f,
181
181
  isConnected: g,
@@ -215,8 +215,8 @@ const ps = lt({
215
215
  renderCount: R.current,
216
216
  willRenderChat: !!$,
217
217
  contextValueReady: !!P
218
- }), /* @__PURE__ */ s(ps.Provider, { value: P, children: $ ? /* @__PURE__ */ s(
219
- an,
218
+ }), /* @__PURE__ */ s(ws.Provider, { value: P, children: $ ? /* @__PURE__ */ s(
219
+ dn,
220
220
  {
221
221
  client: $,
222
222
  customClasses: {
@@ -225,9 +225,9 @@ const ps = lt({
225
225
  children: e
226
226
  }
227
227
  ) : e });
228
- }, xa = () => dt(), bs = (e) => {
228
+ }, Ca = () => ft(), Ns = (e) => {
229
229
  var a, r;
230
- const [t, n] = B(
230
+ const [t, n] = F(
231
231
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
232
232
  );
233
233
  return Y(() => {
@@ -248,13 +248,13 @@ const ps = lt({
248
248
  };
249
249
  }, [e]), t;
250
250
  };
251
- function vs(e, t, n) {
251
+ function ys(e, t, n) {
252
252
  const a = Object.values(e || {});
253
- if (fa(n)) {
253
+ if (xa(n)) {
254
254
  const r = a.find(
255
255
  (i) => {
256
256
  var l;
257
- return ((l = i.user) == null ? void 0 : l.id) === ga;
257
+ return ((l = i.user) == null ? void 0 : l.id) === _a;
258
258
  }
259
259
  );
260
260
  if (r) return r;
@@ -266,18 +266,18 @@ function vs(e, t, n) {
266
266
  }
267
267
  );
268
268
  }
269
- const _a = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
270
- function wa(e) {
271
- return _a.test(e.trim());
269
+ const ka = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
270
+ function Sa(e) {
271
+ return ka.test(e.trim());
272
272
  }
273
- function Kt(e, t) {
273
+ function es(e, t) {
274
274
  const n = e == null ? void 0 : e.trim();
275
- return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !wa(n);
275
+ return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !Sa(n);
276
276
  }
277
- function xs(e) {
278
- return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
277
+ function Cs(e) {
278
+ return es(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : es(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
279
279
  }
280
- const Zt = [
280
+ const ts = [
281
281
  { emoji: "🍎", bgColor: "#FFD1DD" },
282
282
  // Apple
283
283
  { emoji: "🍌", bgColor: "#FFF1C9" },
@@ -305,7 +305,7 @@ const Zt = [
305
305
  { emoji: "🍈", bgColor: "#D9F7E1" }
306
306
  // Melon
307
307
  ];
308
- function Na(e) {
308
+ function Ea(e) {
309
309
  let t = 0;
310
310
  for (let n = 0; n < e.length; n++) {
311
311
  const a = e.charCodeAt(n);
@@ -313,14 +313,14 @@ function Na(e) {
313
313
  }
314
314
  return Math.abs(t);
315
315
  }
316
- function _s(e) {
317
- return Zt[Na(e) % Zt.length];
316
+ function ks(e) {
317
+ return ts[Ea(e) % ts.length];
318
318
  }
319
- function ya(e) {
320
- return _s(e).emoji;
319
+ function Ia(e) {
320
+ return ks(e).emoji;
321
321
  }
322
- function Ca(e) {
323
- return _s(e).bgColor;
322
+ function Ta(e) {
323
+ return ks(e).bgColor;
324
324
  }
325
325
  const _e = ({
326
326
  id: e,
@@ -331,7 +331,7 @@ const _e = ({
331
331
  shape: i = "squircle",
332
332
  dmAgentEnabled: l = !1
333
333
  }) => {
334
- const o = ya(e), d = Ca(e), m = 0.45, u = 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" }, x = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
334
+ const o = Ia(e), d = Ta(e), m = 0.45, u = 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" }, x = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
335
335
  "img",
336
336
  {
337
337
  src: t,
@@ -369,7 +369,7 @@ const _e = ({
369
369
  {
370
370
  "aria-hidden": "true",
371
371
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
372
- children: /* @__PURE__ */ s(st, { className: "size-3 text-yellow-600", weight: "duotone" })
372
+ children: /* @__PURE__ */ s(at, { className: "size-3 text-yellow-600", weight: "duotone" })
373
373
  }
374
374
  ),
375
375
  /* @__PURE__ */ s(
@@ -395,7 +395,7 @@ const _e = ({
395
395
  ]
396
396
  }
397
397
  );
398
- }, ka = "https://linktr.ee/s/about/trust-center/report", Sa = ({
398
+ }, Aa = "https://linktr.ee/s/about/trust-center/report", Ma = ({
399
399
  channel: e,
400
400
  participant: t,
401
401
  showBlockParticipant: n = !0,
@@ -409,7 +409,7 @@ const _e = ({
409
409
  logLabel: f = "useChannelModerationActions"
410
410
  }) => {
411
411
  var P;
412
- const { service: u, debug: g } = dt(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, x = !!(a && n && u && c), [_, b] = B(!1), [p, v] = B(null), [w, C] = B(!1), [T, O] = B(!1), R = x && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
412
+ const { service: u, debug: g } = ft(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, x = !!(a && n && u && c), [_, b] = F(!1), [p, v] = F(null), [w, C] = F(!1), [T, O] = F(!1), R = x && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
413
413
  return Y(() => {
414
414
  if (!x || !u || !c) {
415
415
  b(!1), v(null);
@@ -479,7 +479,7 @@ const _e = ({
479
479
  }
480
480
  },
481
481
  handleReportUser: () => {
482
- d == null || d(), m == null || m(), window.open(ka, "_blank", "noopener,noreferrer");
482
+ d == null || d(), m == null || m(), window.open(Aa, "_blank", "noopener,noreferrer");
483
483
  }
484
484
  };
485
485
  }, we = ({
@@ -499,7 +499,7 @@ const _e = ({
499
499
  ...a,
500
500
  children: n
501
501
  }
502
- ), Ea = ({
502
+ ), La = ({
503
503
  channel: e,
504
504
  participant: t,
505
505
  showDeleteConversation: n = !0,
@@ -513,7 +513,7 @@ const _e = ({
513
513
  customChannelActions: f,
514
514
  triggerClassName: u
515
515
  }) => {
516
- const [g, c] = B(!1), x = H(null), _ = en(), b = W(() => c(!1), []), {
516
+ const [g, c] = F(!1), x = H(null), _ = rn(), b = W(() => c(!1), []), {
517
517
  isParticipantBlocked: p,
518
518
  isCheckingBlockedStatus: v,
519
519
  isLeaving: w,
@@ -522,7 +522,7 @@ const _e = ({
522
522
  handleBlockUser: O,
523
523
  handleUnblockUser: R,
524
524
  handleReportUser: z
525
- } = Sa({
525
+ } = Ma({
526
526
  channel: e,
527
527
  participant: t,
528
528
  showBlockParticipant: a,
@@ -537,13 +537,13 @@ const _e = ({
537
537
  });
538
538
  return Y(() => {
539
539
  if (!g) return;
540
- const L = (P) => {
540
+ const M = (P) => {
541
541
  x.current && !x.current.contains(P.target) && c(!1);
542
542
  }, S = (P) => {
543
543
  P.key === "Escape" && c(!1);
544
544
  };
545
- return document.addEventListener("mousedown", L), document.addEventListener("keydown", S), () => {
546
- document.removeEventListener("mousedown", L), document.removeEventListener("keydown", S);
545
+ return document.addEventListener("mousedown", M), document.addEventListener("keydown", S), () => {
546
+ document.removeEventListener("mousedown", M), document.removeEventListener("keydown", S);
547
547
  };
548
548
  }, [g]), !t || !(n || a || r || !!f) ? null : /* @__PURE__ */ h("div", { ref: x, className: "relative", children: [
549
549
  /* @__PURE__ */ h(
@@ -554,9 +554,9 @@ const _e = ({
554
554
  "aria-haspopup": "true",
555
555
  "aria-expanded": g,
556
556
  "aria-controls": g ? _ : void 0,
557
- onClick: () => c((L) => !L),
557
+ onClick: () => c((M) => !M),
558
558
  children: [
559
- /* @__PURE__ */ s($n, { className: "size-5 text-black/90" }),
559
+ /* @__PURE__ */ s(Gn, { className: "size-5 text-black/90" }),
560
560
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
561
561
  ]
562
562
  }
@@ -578,7 +578,7 @@ const _e = ({
578
578
  disabled: w,
579
579
  "aria-busy": w,
580
580
  children: [
581
- w ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Un, { className: "h-5 w-5" }),
581
+ w ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yn, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
583
583
  ]
584
584
  }
@@ -597,7 +597,7 @@ const _e = ({
597
597
  disabled: C,
598
598
  "aria-busy": C,
599
599
  children: [
600
- C ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
600
+ C ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Jt, { className: "h-5 w-5" }),
601
601
  /* @__PURE__ */ s("span", { children: "Unblock" })
602
602
  ]
603
603
  }
@@ -608,13 +608,13 @@ const _e = ({
608
608
  disabled: C,
609
609
  "aria-busy": C,
610
610
  children: [
611
- C ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
611
+ C ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Jt, { className: "h-5 w-5" }),
612
612
  /* @__PURE__ */ s("span", { children: "Block" })
613
613
  ]
614
614
  }
615
615
  ) }),
616
616
  r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(we, { variant: "danger", onClick: z, children: [
617
- /* @__PURE__ */ s(us, { className: "h-5 w-5" }),
617
+ /* @__PURE__ */ s(ps, { className: "h-5 w-5" }),
618
618
  /* @__PURE__ */ s("span", { children: "Report" })
619
619
  ] }) }),
620
620
  f
@@ -622,7 +622,7 @@ const _e = ({
622
622
  }
623
623
  )
624
624
  ] });
625
- }, We = "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", Ia = "CUSTOMER_PAID", Ta = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ia, Aa = ({
625
+ }, Ye = "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", Ra = "CUSTOMER_PAID", Da = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ra, Pa = ({
626
626
  className: e,
627
627
  onBack: t,
628
628
  showBackButton: n,
@@ -641,17 +641,17 @@ const _e = ({
641
641
  onParticipantNameClick: _
642
642
  }) => {
643
643
  var S, P, k, E;
644
- const { channel: b } = he(), { client: p } = Se(), v = F.useMemo(
644
+ const { channel: b } = he(), { client: p } = Se(), v = B.useMemo(
645
645
  () => {
646
646
  var I;
647
- return vs(
647
+ return ys(
648
648
  (I = b.state) == null ? void 0 : I.members,
649
649
  p == null ? void 0 : p.userID,
650
650
  b.type
651
651
  );
652
652
  },
653
653
  [(S = b.state) == null ? void 0 : S.members, p == null ? void 0 : p.userID, b.type]
654
- ), w = xs(v == null ? void 0 : v.user), C = (P = v == null ? void 0 : v.user) == null ? void 0 : P.image, T = bs(b), O = Ta((k = b.data) == null ? void 0 : k.customer_tag) && (v == null ? void 0 : v.is_follower) === !0, R = a && T, z = O || R || !!_, $ = async () => {
654
+ ), w = Cs(v == null ? void 0 : v.user), C = (P = v == null ? void 0 : v.user) == null ? void 0 : P.image, T = Ns(b), O = Da((k = b.data) == null ? void 0 : k.customer_tag) && (v == null ? void 0 : v.is_follower) === !0, R = a && T, z = O || R || !!_, $ = async () => {
655
655
  try {
656
656
  T ? await b.unpin() : await b.pin();
657
657
  } catch (I) {
@@ -660,7 +660,7 @@ const _e = ({
660
660
  I
661
661
  );
662
662
  }
663
- }, L = /* @__PURE__ */ h(J, { children: [
663
+ }, M = /* @__PURE__ */ h(J, { children: [
664
664
  /* @__PURE__ */ s(
665
665
  _e,
666
666
  {
@@ -687,7 +687,7 @@ const _e = ({
687
687
  {
688
688
  "aria-label": "Paid customer",
689
689
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
690
- children: /* @__PURE__ */ s(Vn, { className: "size-2.5", weight: "bold" })
690
+ children: /* @__PURE__ */ s(Wn, { className: "size-2.5", weight: "bold" })
691
691
  }
692
692
  ),
693
693
  R && /* @__PURE__ */ s(
@@ -695,11 +695,11 @@ const _e = ({
695
695
  {
696
696
  "aria-label": "Starred conversation",
697
697
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
698
- children: /* @__PURE__ */ s(st, { className: "size-2.5", weight: "fill" })
698
+ children: /* @__PURE__ */ s(at, { className: "size-2.5", weight: "fill" })
699
699
  }
700
700
  ),
701
701
  _ && /* @__PURE__ */ s(
702
- ms,
702
+ bs,
703
703
  {
704
704
  "aria-hidden": "true",
705
705
  className: "size-4 shrink-0 text-black/65",
@@ -723,14 +723,14 @@ const _e = ({
723
723
  "button",
724
724
  {
725
725
  className: y(
726
- We,
726
+ Ye,
727
727
  "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
728
728
  ),
729
729
  onClick: t || (() => {
730
730
  }),
731
731
  type: "button",
732
732
  "aria-label": "Back to conversations",
733
- children: /* @__PURE__ */ s(jn, { className: "size-5 text-black/90" })
733
+ children: /* @__PURE__ */ s(Xn, { className: "size-5 text-black/90" })
734
734
  }
735
735
  ) }),
736
736
  /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: _ ? /* @__PURE__ */ s(
@@ -740,20 +740,20 @@ const _e = ({
740
740
  onClick: _,
741
741
  "aria-label": `View details for ${w}`,
742
742
  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",
743
- children: L
743
+ children: M
744
744
  }
745
- ) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: L }) }),
745
+ ) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: M }) }),
746
746
  /* @__PURE__ */ h("div", { className: "flex items-start justify-end gap-2", children: [
747
747
  a && /* @__PURE__ */ s(
748
748
  "button",
749
749
  {
750
- className: We,
750
+ className: Ye,
751
751
  onClick: $,
752
752
  type: "button",
753
753
  "aria-pressed": T,
754
754
  "aria-label": T ? "Unstar conversation" : "Star conversation",
755
755
  children: /* @__PURE__ */ s(
756
- st,
756
+ at,
757
757
  {
758
758
  className: y("size-5", {
759
759
  "text-[#FFD60A]": T,
@@ -765,7 +765,7 @@ const _e = ({
765
765
  }
766
766
  ),
767
767
  x && (c !== void 0 ? c : /* @__PURE__ */ s(
768
- Ea,
768
+ La,
769
769
  {
770
770
  channel: b,
771
771
  participant: v,
@@ -778,27 +778,27 @@ const _e = ({
778
778
  onBlockParticipantClick: f,
779
779
  onReportParticipantClick: u,
780
780
  customChannelActions: g,
781
- triggerClassName: We
781
+ triggerClassName: Ye
782
782
  }
783
783
  ))
784
784
  ] })
785
785
  ] })
786
786
  }
787
787
  );
788
- }, La = (e) => /* @__PURE__ */ s(rn, { ...e, position: "center" }), at = "vote_up", rt = "vote_down";
789
- function Ma(e) {
790
- return e != null && e.length ? e.some((t) => t.type === rt) ? "down" : e.some((t) => t.type === at) ? "up" : null : null;
788
+ }, Oa = (e) => /* @__PURE__ */ s(un, { ...e, position: "center" }), it = "vote_up", ot = "vote_down";
789
+ function za(e) {
790
+ return e != null && e.length ? e.some((t) => t.type === ot) ? "down" : e.some((t) => t.type === it) ? "up" : null : null;
791
791
  }
792
- function Ra(e) {
792
+ function Fa(e) {
793
793
  const { channel: t } = he(), { client: n } = Se("useMessageVote"), a = ne(
794
- () => Ma(e.own_reactions),
794
+ () => za(e.own_reactions),
795
795
  [e.own_reactions]
796
796
  ), r = W(async () => {
797
797
  if (n != null && n.userID)
798
798
  try {
799
- a === "up" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
799
+ a === "up" ? await t.deleteReaction(e.id, it) : await t.sendReaction(
800
800
  e.id,
801
- { type: at },
801
+ { type: it },
802
802
  { enforce_unique: !0, skip_push: !0 }
803
803
  );
804
804
  } catch {
@@ -806,9 +806,9 @@ function Ra(e) {
806
806
  }, [t, n == null ? void 0 : n.userID, e.id, a]), i = W(async () => {
807
807
  if (n != null && n.userID)
808
808
  try {
809
- a === "down" ? await t.deleteReaction(e.id, rt) : await t.sendReaction(
809
+ a === "down" ? await t.deleteReaction(e.id, ot) : await t.sendReaction(
810
810
  e.id,
811
- { type: rt },
811
+ { type: ot },
812
812
  { enforce_unique: !0, skip_push: !0 }
813
813
  );
814
814
  } catch {
@@ -816,39 +816,39 @@ function Ra(e) {
816
816
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
817
817
  return { selected: a, voteUp: r, voteDown: i };
818
818
  }
819
- function Da(e) {
819
+ function Ba(e) {
820
820
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
821
821
  }
822
- function ws({
822
+ function Ss({
823
823
  message: e,
824
824
  viewerLanguage: t
825
825
  }) {
826
826
  var r;
827
- const n = e == null ? void 0 : e.text, a = Da(t);
827
+ const n = e == null ? void 0 : e.text, a = Ba(t);
828
828
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
829
829
  }
830
- const Pa = ["linktr.ee"], Jt = "messaging-attachment-v1_0";
831
- function Oa(e) {
830
+ const $a = ["linktr.ee"], ss = "messaging-attachment-v1_0";
831
+ function Ua(e) {
832
832
  try {
833
833
  return new URL(e).hostname.toLowerCase();
834
834
  } catch {
835
835
  return null;
836
836
  }
837
837
  }
838
- function za(e) {
839
- return Pa.some(
838
+ function Va(e) {
839
+ return $a.some(
840
840
  (t) => e === t || e.endsWith(`.${t}`)
841
841
  );
842
842
  }
843
843
  function me(e) {
844
844
  const t = e == null ? void 0 : e.trim();
845
845
  if (!t) return;
846
- const n = Oa(t);
847
- if (!n || !za(n)) return t;
846
+ const n = Ua(t);
847
+ if (!n || !Va(n)) return t;
848
848
  const a = new URL(t);
849
- return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Jt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Jt), a.toString());
849
+ return a.searchParams.get("io") === "true" && a.searchParams.get("size") === ss ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", ss), a.toString());
850
850
  }
851
- const Ba = [
851
+ const ja = [
852
852
  [/pdf/, "pdf"],
853
853
  [/wordprocessingml|msword|\.doc/, "doc"],
854
854
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -861,39 +861,39 @@ const Ba = [
861
861
  function ce(e) {
862
862
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
863
863
  }
864
- function Ns(e) {
865
- const t = Ba.find(
864
+ function Es(e) {
865
+ const t = ja.find(
866
866
  ([n]) => n.test(e)
867
867
  );
868
868
  return t ? t[1] : "generic";
869
869
  }
870
- const Fa = {
871
- video: fs,
872
- audio: Gn,
873
- image: Hn,
874
- document: hs
875
- }, $a = {
876
- pdf: Qn,
877
- doc: Jn,
878
- xls: Zn,
879
- csv: Kn,
880
- ppt: Xn,
881
- zip: qn,
882
- text: Wn,
883
- markdown: Yn,
884
- generic: hs
870
+ const Ha = {
871
+ video: xs,
872
+ audio: Kn,
873
+ image: qn,
874
+ document: vs
875
+ }, Ga = {
876
+ pdf: aa,
877
+ doc: na,
878
+ xls: sa,
879
+ csv: ta,
880
+ ppt: ea,
881
+ zip: Qn,
882
+ text: Jn,
883
+ markdown: Zn,
884
+ generic: vs
885
885
  };
886
- function Ua(e) {
886
+ function Ya(e) {
887
887
  const t = ce(e);
888
- return t !== "document" ? Fa[t] : $a[Ns(e)];
888
+ return t !== "document" ? Ha[t] : Ga[Es(e)];
889
889
  }
890
890
  function xe(e, t) {
891
- return F.createElement(Ua(e), t);
891
+ return B.createElement(Ya(e), t);
892
892
  }
893
- const Va = (e) => {
893
+ const Wa = (e) => {
894
894
  var t, n;
895
895
  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;
896
- }, ja = ({
896
+ }, Xa = ({
897
897
  source: e,
898
898
  mimeType: t,
899
899
  poster: n,
@@ -905,23 +905,23 @@ const Va = (e) => {
905
905
  muted: d = !1,
906
906
  onContainerClick: m
907
907
  }) => {
908
- const f = ce(t), u = H(null), g = H(null), c = H(null), x = H(r), [_, b] = B(a), [p, v] = B(0), [w, C] = B(!1), [T, O] = B(!1), [R, z] = B(!1), [$, L] = B(!1), [S, P] = B(!0), [k, E] = B(null), I = W(() => {
908
+ const f = ce(t), u = H(null), g = H(null), c = H(null), x = H(r), [_, b] = F(a), [p, v] = F(0), [w, C] = F(!1), [T, O] = F(!1), [R, z] = F(!1), [$, M] = F(!1), [S, P] = F(!0), [k, E] = F(null), I = W(() => {
909
909
  z(!1), b(!0);
910
910
  }, []), A = W((N) => {
911
- const M = g.current;
912
- if (!M) return 0;
913
- const G = M.getBoundingClientRect();
911
+ const L = g.current;
912
+ if (!L) return 0;
913
+ const G = L.getBoundingClientRect();
914
914
  return Math.max(
915
915
  0,
916
- Math.min(1, (Va(N) - G.left) / G.width)
916
+ Math.min(1, (Wa(N) - G.left) / G.width)
917
917
  );
918
918
  }, []), U = W((N) => {
919
- const M = u.current;
920
- M && M.duration && (M.currentTime = N * M.duration);
919
+ const L = u.current;
920
+ L && L.duration && (L.currentTime = N * L.duration);
921
921
  }, []), j = (N) => {
922
922
  N.stopPropagation(), C(!0);
923
- const M = A(N);
924
- v(M), U(M);
923
+ const L = A(N);
924
+ v(L), U(L);
925
925
  };
926
926
  Y(() => {
927
927
  r !== void 0 && r !== x.current && (x.current = r, b(r));
@@ -931,40 +931,40 @@ const Va = (e) => {
931
931
  return;
932
932
  }
933
933
  const N = () => {
934
- const M = u.current;
935
- M && M.duration && !w && v(M.currentTime / M.duration), c.current = requestAnimationFrame(N);
934
+ const L = u.current;
935
+ L && L.duration && !w && v(L.currentTime / L.duration), c.current = requestAnimationFrame(N);
936
936
  };
937
937
  return c.current = requestAnimationFrame(N), () => {
938
938
  c.current !== null && cancelAnimationFrame(c.current);
939
939
  };
940
940
  }, [_, w]), Y(() => {
941
941
  const N = u.current;
942
- N && (_ ? N.play().catch((M) => {
942
+ N && (_ ? N.play().catch((L) => {
943
943
  b(!1), z(!0);
944
944
  }) : N.pause());
945
945
  }, [_]), Y(() => {
946
946
  if (!w) return;
947
- const N = (G) => v(A(G)), M = (G) => {
947
+ const N = (G) => v(A(G)), L = (G) => {
948
948
  C(!1), U(A(G));
949
949
  };
950
- return window.addEventListener("mousemove", N), window.addEventListener("mouseup", M), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", M), () => {
951
- window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", M), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", M);
950
+ return window.addEventListener("mousemove", N), window.addEventListener("mouseup", L), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", L), () => {
951
+ window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", L), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", L);
952
952
  };
953
953
  }, [w, A, U]);
954
- const q = k ? { aspectRatio: String(k) } : void 0, Q = k ? "" : " aspect-video", K = Math.round(p * 100);
954
+ const X = k ? { aspectRatio: String(k) } : void 0, Q = k ? "" : " aspect-video", K = Math.round(p * 100);
955
955
  return /* @__PURE__ */ h(
956
956
  "div",
957
957
  {
958
958
  role: "button",
959
959
  tabIndex: 0,
960
960
  className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
961
- style: q,
961
+ style: X,
962
962
  onClick: (N) => {
963
963
  if (m) {
964
964
  m(N);
965
965
  return;
966
966
  }
967
- R || l && b((M) => !M);
967
+ R || l && b((L) => !L);
968
968
  },
969
969
  onKeyDown: (N) => {
970
970
  if (!(N.key !== "Enter" && N.key !== " ")) {
@@ -972,7 +972,7 @@ const Va = (e) => {
972
972
  m(N);
973
973
  return;
974
974
  }
975
- R || l && b((M) => !M);
975
+ R || l && b((L) => !L);
976
976
  }
977
977
  },
978
978
  children: [
@@ -996,11 +996,11 @@ const Va = (e) => {
996
996
  loop: i,
997
997
  muted: d,
998
998
  style: { width: "100%", height: "100%" },
999
- onLoadStart: () => L(!0),
999
+ onLoadStart: () => M(!0),
1000
1000
  onCanPlay: () => {
1001
- L(!1), P(!1);
1001
+ M(!1), P(!1);
1002
1002
  },
1003
- onWaiting: () => L(!0),
1003
+ onWaiting: () => M(!0),
1004
1004
  onPlay: () => z(!1),
1005
1005
  onEnded: () => {
1006
1006
  i || (b(!1), v(0));
@@ -1016,11 +1016,11 @@ const Va = (e) => {
1016
1016
  muted: d,
1017
1017
  playsInline: !0,
1018
1018
  style: { width: "100%", height: "100%" },
1019
- onLoadStart: () => L(!0),
1019
+ onLoadStart: () => M(!0),
1020
1020
  onCanPlay: () => {
1021
- L(!1), P(!1);
1021
+ M(!1), P(!1);
1022
1022
  },
1023
- onWaiting: () => L(!0),
1023
+ onWaiting: () => M(!0),
1024
1024
  onPlay: () => z(!1),
1025
1025
  onLoadedMetadata: () => {
1026
1026
  const N = u.current;
@@ -1052,7 +1052,7 @@ const Va = (e) => {
1052
1052
  onKeyDown: (N) => {
1053
1053
  N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), I());
1054
1054
  },
1055
- children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(nt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1055
+ children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(rt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1056
1056
  }
1057
1057
  ),
1058
1058
  o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
@@ -1087,11 +1087,11 @@ const Va = (e) => {
1087
1087
  {
1088
1088
  type: "button",
1089
1089
  onClick: (N) => {
1090
- N.stopPropagation(), b((M) => !M);
1090
+ N.stopPropagation(), b((L) => !L);
1091
1091
  },
1092
1092
  className: "shrink-0 text-white",
1093
1093
  "aria-label": _ ? "Pause" : "Play",
1094
- children: _ ? /* @__PURE__ */ s(ea, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(nt, { className: "size-5 translate-x-px", weight: "fill" })
1094
+ children: _ ? /* @__PURE__ */ s(ra, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(rt, { className: "size-5 translate-x-px", weight: "fill" })
1095
1095
  }
1096
1096
  ),
1097
1097
  /* @__PURE__ */ h(
@@ -1141,7 +1141,7 @@ const Va = (e) => {
1141
1141
  ]
1142
1142
  }
1143
1143
  );
1144
- }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ha = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ys = ({
1144
+ }, ns = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", qa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Is = ({
1145
1145
  mimeType: e,
1146
1146
  sourceUrl: t,
1147
1147
  thumbnailUrl: n,
@@ -1150,9 +1150,9 @@ const Va = (e) => {
1150
1150
  mediaPlayerProps: i,
1151
1151
  containedImage: l = !1
1152
1152
  }) => {
1153
- const o = ce(e), [d, m] = B(!1), f = me(t), u = me(n);
1153
+ const o = ce(e), [d, m] = F(!1), f = me(t), u = me(n);
1154
1154
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1155
- ja,
1155
+ Xa,
1156
1156
  {
1157
1157
  source: t,
1158
1158
  mimeType: e,
@@ -1199,11 +1199,11 @@ const Va = (e) => {
1199
1199
  {
1200
1200
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1201
1201
  children: xe(e, {
1202
- className: Qt(r),
1202
+ className: ns(r),
1203
1203
  weight: "regular"
1204
1204
  })
1205
1205
  }
1206
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ha(r)}`, children: /* @__PURE__ */ s(
1206
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${qa(r)}`, children: /* @__PURE__ */ s(
1207
1207
  "img",
1208
1208
  {
1209
1209
  src: u ?? n,
@@ -1216,12 +1216,12 @@ const Va = (e) => {
1216
1216
  {
1217
1217
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1218
1218
  children: xe(e, {
1219
- className: Qt(r),
1219
+ className: ns(r),
1220
1220
  weight: "regular"
1221
1221
  })
1222
1222
  }
1223
1223
  );
1224
- }, Cs = ({
1224
+ }, Ts = ({
1225
1225
  variant: e,
1226
1226
  thumbnail: t,
1227
1227
  title: n,
@@ -1287,29 +1287,29 @@ const Va = (e) => {
1287
1287
  }
1288
1288
  );
1289
1289
  };
1290
- function ks(e) {
1290
+ function As(e) {
1291
1291
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1292
1292
  }
1293
- function ut(e) {
1293
+ function gt(e) {
1294
1294
  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)]`;
1295
1295
  }
1296
- function Ga(e) {
1296
+ function Ka(e) {
1297
1297
  return e ? "bg-white/10" : "bg-black/5";
1298
1298
  }
1299
- function Ya(e) {
1299
+ function Za(e) {
1300
1300
  return e ? "text-white" : "text-black";
1301
1301
  }
1302
- function Wa(e) {
1302
+ function Ja(e) {
1303
1303
  return e ? "text-white/55" : "text-black/55";
1304
1304
  }
1305
- function qa(e) {
1305
+ function Qa(e) {
1306
1306
  return e ? "text-white/40" : "text-black/40";
1307
1307
  }
1308
- function Xa(e) {
1308
+ function er(e) {
1309
1309
  return e ? "text-white/20" : "text-black/20";
1310
1310
  }
1311
- const mt = ({ attachment: e, isMyMessage: t }) => {
1312
- const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, m = /* @__PURE__ */ h(F.Fragment, { children: [
1311
+ const pt = ({ attachment: e, isMyMessage: t }) => {
1312
+ const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, m = /* @__PURE__ */ h(B.Fragment, { children: [
1313
1313
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1314
1314
  "img",
1315
1315
  {
@@ -1320,26 +1320,26 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
1320
1320
  ) : /* @__PURE__ */ s(
1321
1321
  "div",
1322
1322
  {
1323
- className: `aspect-video w-full rounded-[20px] ${Ga(t)} flex items-center justify-center`,
1324
- children: /* @__PURE__ */ s(ta, { className: `size-12 ${Xa(t)}` })
1323
+ className: `aspect-video w-full rounded-[20px] ${Ka(t)} flex items-center justify-center`,
1324
+ children: /* @__PURE__ */ s(ia, { className: `size-12 ${er(t)}` })
1325
1325
  }
1326
1326
  ) }),
1327
1327
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1328
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Ya(t)}`, children: n }),
1329
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Wa(t)}`, children: a }),
1330
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${qa(t)}`, children: d })
1328
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Za(t)}`, children: n }),
1329
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Ja(t)}`, children: a }),
1330
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Qa(t)}`, children: d })
1331
1331
  ] })
1332
1332
  ] });
1333
1333
  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 });
1334
1334
  };
1335
- function Ss(e) {
1335
+ function Ms(e) {
1336
1336
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1337
1337
  }
1338
- function ht(e) {
1338
+ function bt(e) {
1339
1339
  var t;
1340
- return (t = e.attachments) == null ? void 0 : t.find(Ss);
1340
+ return (t = e.attachments) == null ? void 0 : t.find(Ms);
1341
1341
  }
1342
- async function Ka(e, t) {
1342
+ async function tr(e, t) {
1343
1343
  let n;
1344
1344
  try {
1345
1345
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1351,11 +1351,11 @@ async function Ka(e, t) {
1351
1351
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1352
1352
  l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1353
1353
  }
1354
- const Za = ({
1354
+ const sr = ({
1355
1355
  url: e,
1356
1356
  filename: t
1357
1357
  }) => {
1358
- const [n, a] = B(!1);
1358
+ const [n, a] = F(!1);
1359
1359
  return /* @__PURE__ */ s(
1360
1360
  "button",
1361
1361
  {
@@ -1363,7 +1363,7 @@ const Za = ({
1363
1363
  onClick: (i) => {
1364
1364
  i.stopPropagation();
1365
1365
  const l = window.open("", "_blank", "noopener,noreferrer");
1366
- a(!0), Ka(e, t).then(() => {
1366
+ a(!0), tr(e, t).then(() => {
1367
1367
  l == null || l.close();
1368
1368
  }).catch(() => {
1369
1369
  l && (l.location.href = e);
@@ -1371,14 +1371,14 @@ const Za = ({
1371
1371
  },
1372
1372
  disabled: n,
1373
1373
  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",
1374
- children: n ? /* @__PURE__ */ s(ve, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(F.Fragment, { children: [
1374
+ children: n ? /* @__PURE__ */ s(ve, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(B.Fragment, { children: [
1375
1375
  /* @__PURE__ */ s(Ce, { className: "size-4 text-white", weight: "bold" }),
1376
1376
  "Download"
1377
1377
  ] })
1378
1378
  }
1379
1379
  );
1380
1380
  };
1381
- function ft(e) {
1381
+ function vt(e) {
1382
1382
  var u, g, c, x;
1383
1383
  const t = (u = e.attachments) == null ? void 0 : u.find(
1384
1384
  (_) => _.type === "video" && _.asset_url
@@ -1399,16 +1399,16 @@ function ft(e) {
1399
1399
  thumbnailUrl: f
1400
1400
  };
1401
1401
  }
1402
- const Es = ({
1402
+ const Ls = ({
1403
1403
  resolvedUrl: e,
1404
1404
  resolvedType: t,
1405
1405
  title: n,
1406
1406
  fileSize: a,
1407
1407
  thumbnailUrl: r
1408
1408
  }) => {
1409
- const i = a !== void 0 ? ks(a) : void 0;
1409
+ const i = a !== void 0 ? As(a) : void 0;
1410
1410
  return /* @__PURE__ */ s(
1411
- Cs,
1411
+ Ts,
1412
1412
  {
1413
1413
  variant: "dark",
1414
1414
  title: n,
@@ -1416,7 +1416,7 @@ const Es = ({
1416
1416
  mimeType: t,
1417
1417
  detail: i,
1418
1418
  thumbnail: /* @__PURE__ */ s(
1419
- ys,
1419
+ Is,
1420
1420
  {
1421
1421
  mimeType: t,
1422
1422
  sourceUrl: e,
@@ -1427,23 +1427,23 @@ const Es = ({
1427
1427
  )
1428
1428
  }
1429
1429
  );
1430
- }, Is = ({
1430
+ }, Rs = ({
1431
1431
  resolvedUrl: e,
1432
1432
  resolvedType: t,
1433
1433
  title: n,
1434
1434
  fileSize: a,
1435
1435
  thumbnailUrl: r
1436
1436
  }) => {
1437
- const i = ce(t), l = a !== void 0 ? ks(a) : void 0;
1437
+ const i = ce(t), l = a !== void 0 ? As(a) : void 0;
1438
1438
  return /* @__PURE__ */ s(
1439
- Cs,
1439
+ Ts,
1440
1440
  {
1441
1441
  variant: "light",
1442
1442
  title: n,
1443
1443
  mimeType: t,
1444
1444
  detail: l,
1445
1445
  thumbnail: /* @__PURE__ */ s(
1446
- ys,
1446
+ Is,
1447
1447
  {
1448
1448
  mimeType: t,
1449
1449
  sourceUrl: e,
@@ -1453,14 +1453,14 @@ const Es = ({
1453
1453
  containedImage: i === "image" || i === "document"
1454
1454
  }
1455
1455
  ),
1456
- action: /* @__PURE__ */ s(Za, { url: e, filename: n })
1456
+ action: /* @__PURE__ */ s(sr, { url: e, filename: n })
1457
1457
  }
1458
1458
  );
1459
- }, Ja = ({
1459
+ }, nr = ({
1460
1460
  message: e,
1461
1461
  isMyMessage: t = !1
1462
1462
  }) => {
1463
- const n = ht(e), a = ft(e);
1463
+ const n = bt(e), a = vt(e);
1464
1464
  return !n && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1465
1465
  !t && e.user && /* @__PURE__ */ s(
1466
1466
  _e,
@@ -1482,41 +1482,41 @@ const Es = ({
1482
1482
  className: "str-chat__message-bubble",
1483
1483
  "data-attachment-bubble": "true",
1484
1484
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1485
- children: n ? /* @__PURE__ */ s("div", { className: ut(t), children: /* @__PURE__ */ s(mt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(Es, { ...a }) : /* @__PURE__ */ s(Is, { ...a })
1485
+ children: n ? /* @__PURE__ */ s("div", { className: gt(t), children: /* @__PURE__ */ s(pt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(Ls, { ...a }) : /* @__PURE__ */ s(Rs, { ...a })
1486
1486
  }
1487
1487
  ) })
1488
1488
  }
1489
1489
  )
1490
1490
  ] });
1491
- }, Qa = ({
1491
+ }, ar = ({
1492
1492
  message: e
1493
1493
  }) => {
1494
- const t = ht(e);
1494
+ const t = bt(e);
1495
1495
  if (t)
1496
- return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
1497
- const n = ft(e);
1498
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Es, { ...n }) }) : null;
1499
- }, er = ({
1496
+ return /* @__PURE__ */ s("div", { className: gt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(pt, { attachment: t, isMyMessage: !0 }) });
1497
+ const n = vt(e);
1498
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ls, { ...n }) }) : null;
1499
+ }, rr = ({
1500
1500
  message: e
1501
1501
  }) => {
1502
- const t = ht(e);
1502
+ const t = bt(e);
1503
1503
  if (t)
1504
- return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
1505
- const n = ft(e);
1506
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Is, { ...n }) }) : null;
1507
- }, Go = Object.assign(Ja, {
1508
- Creator: Qa,
1509
- Visitor: er
1510
- }), tr = {
1504
+ return /* @__PURE__ */ s("div", { className: gt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(pt, { attachment: t, isMyMessage: !1 }) });
1505
+ const n = vt(e);
1506
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Rs, { ...n }) }) : null;
1507
+ }, ol = Object.assign(nr, {
1508
+ Creator: ar,
1509
+ Visitor: rr
1510
+ }), ir = {
1511
1511
  dark: "bg-[#1e2330]",
1512
1512
  light: "bg-[#f2f1ef]"
1513
- }, sr = {
1513
+ }, or = {
1514
1514
  dark: "text-white",
1515
1515
  light: "text-[#000000]"
1516
- }, nr = {
1516
+ }, lr = {
1517
1517
  dark: "border-white/[0.08]",
1518
1518
  light: "border-black/[0.08]"
1519
- }, ar = (e) => e === "dark" ? "sender" : "receiver", rr = {
1519
+ }, cr = (e) => e === "dark" ? "sender" : "receiver", dr = {
1520
1520
  sender: {
1521
1521
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1522
1522
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1541,7 +1541,7 @@ const Es = ({
1541
1541
  children: d,
1542
1542
  "data-testid": m
1543
1543
  }) => {
1544
- const f = t != null && t !== "", u = l ?? rr[ar(e)][a];
1544
+ const f = t != null && t !== "", u = l ?? dr[cr(e)][a];
1545
1545
  return /* @__PURE__ */ h(
1546
1546
  "div",
1547
1547
  {
@@ -1570,10 +1570,10 @@ const Es = ({
1570
1570
  // there is no ambiguity to resolve.
1571
1571
  f && "pb-0",
1572
1572
  u,
1573
- tr[e],
1574
- sr[e],
1573
+ ir[e],
1574
+ or[e],
1575
1575
  n && "border",
1576
- n && nr[e],
1576
+ n && lr[e],
1577
1577
  o
1578
1578
  ),
1579
1579
  children: [
@@ -1617,18 +1617,18 @@ const Es = ({
1617
1617
  "flex size-6 items-center justify-center rounded-full text-white",
1618
1618
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
1619
1619
  ),
1620
- children: /* @__PURE__ */ s(ct, { className: "size-3", weight: "bold" })
1620
+ children: /* @__PURE__ */ s(ht, { className: "size-3", weight: "bold" })
1621
1621
  }
1622
- ), Te = (e) => e === "received" ? "light" : "dark", ir = ({
1622
+ ), Te = (e) => e === "received" ? "light" : "dark", ur = ({
1623
1623
  firstOfGroup: e,
1624
1624
  endOfGroup: t,
1625
1625
  groupedByUser: n
1626
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", or = ({
1626
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", mr = ({
1627
1627
  src: e,
1628
1628
  mimeType: t,
1629
1629
  filename: n,
1630
1630
  items: a
1631
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], lr = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1631
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], hr = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1632
1632
  /* @__PURE__ */ s(
1633
1633
  "audio",
1634
1634
  {
@@ -1640,7 +1640,7 @@ const Es = ({
1640
1640
  }
1641
1641
  ),
1642
1642
  n ?? null
1643
- ] }), gt = ({
1643
+ ] }), xt = ({
1644
1644
  state: e,
1645
1645
  src: t,
1646
1646
  mimeType: n,
@@ -1651,7 +1651,7 @@ const Es = ({
1651
1651
  preload: o,
1652
1652
  onDismiss: d
1653
1653
  }) => {
1654
- const m = Te(e), f = e === "composer" && !!d, u = or({ src: t, mimeType: n, filename: a, items: r });
1654
+ const m = Te(e), f = e === "composer" && !!d, u = mr({ src: t, mimeType: n, filename: a, items: r });
1655
1655
  if (u.length === 0)
1656
1656
  return null;
1657
1657
  const g = o ?? (u.length > 1 ? "none" : "metadata");
@@ -1663,7 +1663,7 @@ const Es = ({
1663
1663
  groupPosition: l,
1664
1664
  "data-testid": "audio-attachment",
1665
1665
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((c, x) => /* @__PURE__ */ s(
1666
- lr,
1666
+ hr,
1667
1667
  {
1668
1668
  item: c,
1669
1669
  preload: g,
@@ -1677,15 +1677,15 @@ const Es = ({
1677
1677
  )) })
1678
1678
  }
1679
1679
  );
1680
- }, cr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), mr = {
1681
- Composer: cr,
1682
- Sent: dr,
1683
- Received: ur
1680
+ }, fr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), gr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), pr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), br = {
1681
+ Composer: fr,
1682
+ Sent: gr,
1683
+ Received: pr
1684
1684
  };
1685
- function hr(e) {
1685
+ function vr(e) {
1686
1686
  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`;
1687
1687
  }
1688
- const fr = {
1688
+ const xr = {
1689
1689
  pdf: "PDF",
1690
1690
  doc: "DOC",
1691
1691
  xls: "XLS",
@@ -1695,7 +1695,7 @@ const fr = {
1695
1695
  text: "TXT",
1696
1696
  markdown: "MD"
1697
1697
  };
1698
- function gr(e, t) {
1698
+ function _r(e, t) {
1699
1699
  if (t) {
1700
1700
  const r = t.lastIndexOf(".");
1701
1701
  if (r > 0 && r < t.length - 1) {
@@ -1705,7 +1705,7 @@ function gr(e, t) {
1705
1705
  }
1706
1706
  if (!e) return;
1707
1707
  if (ce(e) === "document") {
1708
- const r = Ns(e), i = fr[r];
1708
+ const r = Es(e), i = xr[r];
1709
1709
  if (i) return i;
1710
1710
  if (e === "application/octet-stream") return;
1711
1711
  }
@@ -1713,8 +1713,8 @@ function gr(e, t) {
1713
1713
  if (!(!a || a === "*"))
1714
1714
  return a.toUpperCase();
1715
1715
  }
1716
- function pr(e, t, n) {
1717
- const a = gr(e, t), r = typeof n == "number" && n > 0 ? hr(n) : void 0;
1716
+ function wr(e, t, n) {
1717
+ const a = _r(e, t), r = typeof n == "number" && n > 0 ? vr(n) : void 0;
1718
1718
  return [a, r].filter(Boolean).join(" · ") || void 0;
1719
1719
  }
1720
1720
  function ae(e) {
@@ -1725,16 +1725,16 @@ function ae(e) {
1725
1725
  return "download";
1726
1726
  }
1727
1727
  }
1728
- const br = {
1728
+ const Nr = {
1729
1729
  dark: "text-white/55",
1730
1730
  light: "text-black/65"
1731
- }, vr = {
1731
+ }, yr = {
1732
1732
  dark: "bg-white/10",
1733
1733
  light: "bg-black/5"
1734
- }, xr = {
1734
+ }, Cr = {
1735
1735
  dark: "text-white/85",
1736
1736
  light: "text-black/85"
1737
- }, Ts = ({
1737
+ }, Ds = ({
1738
1738
  variant: e,
1739
1739
  filename: t,
1740
1740
  title: n,
@@ -1744,16 +1744,16 @@ const br = {
1744
1744
  activateLabel: l,
1745
1745
  trailingAction: o
1746
1746
  }) => {
1747
- const d = n ?? t ?? "File", m = pr(a, t, r), f = /* @__PURE__ */ s(
1747
+ const d = n ?? t ?? "File", m = wr(a, t, r), f = /* @__PURE__ */ s(
1748
1748
  "div",
1749
1749
  {
1750
1750
  className: y(
1751
1751
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1752
- vr[e]
1752
+ yr[e]
1753
1753
  ),
1754
1754
  "aria-hidden": !0,
1755
1755
  children: xe(a, {
1756
- className: y("size-6", xr[e]),
1756
+ className: y("size-6", Cr[e]),
1757
1757
  weight: "regular"
1758
1758
  })
1759
1759
  }
@@ -1764,7 +1764,7 @@ const br = {
1764
1764
  {
1765
1765
  className: y(
1766
1766
  "truncate text-xs leading-4",
1767
- br[e]
1767
+ Nr[e]
1768
1768
  ),
1769
1769
  children: m
1770
1770
  }
@@ -1793,7 +1793,7 @@ const br = {
1793
1793
  o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
1794
1794
  ] });
1795
1795
  };
1796
- async function As(e, t) {
1796
+ async function Ps(e, t) {
1797
1797
  const n = t ?? ae(e);
1798
1798
  try {
1799
1799
  const a = await fetch(e, { mode: "cors" });
@@ -1807,14 +1807,14 @@ async function As(e, t) {
1807
1807
  }
1808
1808
  }
1809
1809
  }
1810
- const _r = ({
1810
+ const kr = ({
1811
1811
  src: e,
1812
1812
  filename: t,
1813
1813
  fileSize: n,
1814
1814
  mimeType: a,
1815
1815
  title: r,
1816
1816
  items: i
1817
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], wr = ({
1817
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], Sr = ({
1818
1818
  variant: e,
1819
1819
  item: t,
1820
1820
  index: n,
@@ -1823,7 +1823,7 @@ const _r = ({
1823
1823
  }) => {
1824
1824
  const i = t.filename ?? ae(t.src);
1825
1825
  return /* @__PURE__ */ s(
1826
- Ts,
1826
+ Ds,
1827
1827
  {
1828
1828
  variant: e,
1829
1829
  filename: i,
@@ -1835,7 +1835,7 @@ const _r = ({
1835
1835
  trailingAction: r
1836
1836
  }
1837
1837
  );
1838
- }, pt = ({
1838
+ }, _t = ({
1839
1839
  state: e,
1840
1840
  src: t,
1841
1841
  filename: n,
@@ -1848,7 +1848,7 @@ const _r = ({
1848
1848
  onClick: m,
1849
1849
  onDismiss: f
1850
1850
  }) => {
1851
- const u = Te(e), g = e === "composer" && !!f, c = _r({
1851
+ const u = Te(e), g = e === "composer" && !!f, c = kr({
1852
1852
  src: t,
1853
1853
  filename: n,
1854
1854
  fileSize: a,
@@ -1860,7 +1860,7 @@ const _r = ({
1860
1860
  const p = c[b];
1861
1861
  if (!p) return;
1862
1862
  const v = p.filename ?? ae(p.src);
1863
- As(p.src, v);
1863
+ Ps(p.src, v);
1864
1864
  };
1865
1865
  if (c.length === 0)
1866
1866
  return null;
@@ -1883,7 +1883,7 @@ const _r = ({
1883
1883
  groupPosition: d,
1884
1884
  "data-testid": "file-attachment",
1885
1885
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, p) => /* @__PURE__ */ s(
1886
- wr,
1886
+ Sr,
1887
1887
  {
1888
1888
  variant: u,
1889
1889
  item: b,
@@ -1895,11 +1895,11 @@ const _r = ({
1895
1895
  )) })
1896
1896
  }
1897
1897
  );
1898
- }, Nr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), yr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), Cr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), kr = {
1899
- Composer: Nr,
1900
- Sent: yr,
1901
- Received: Cr
1902
- }, bt = ({
1898
+ }, Er = (e) => /* @__PURE__ */ s(_t, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(_t, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "received" }), Ar = {
1899
+ Composer: Er,
1900
+ Sent: Ir,
1901
+ Received: Tr
1902
+ }, wt = ({
1903
1903
  onPrev: e,
1904
1904
  onNext: t,
1905
1905
  prevLabel: n = "Previous",
@@ -1912,7 +1912,7 @@ const _r = ({
1912
1912
  onClick: e,
1913
1913
  "aria-label": n,
1914
1914
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
1915
- children: /* @__PURE__ */ s(sa, { size: 20, weight: "bold", "aria-hidden": !0 })
1915
+ children: /* @__PURE__ */ s(oa, { size: 20, weight: "bold", "aria-hidden": !0 })
1916
1916
  }
1917
1917
  ),
1918
1918
  /* @__PURE__ */ s(
@@ -1922,10 +1922,10 @@ const _r = ({
1922
1922
  onClick: t,
1923
1923
  "aria-label": a,
1924
1924
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
1925
- children: /* @__PURE__ */ s(ms, { size: 20, weight: "bold", "aria-hidden": !0 })
1925
+ children: /* @__PURE__ */ s(bs, { size: 20, weight: "bold", "aria-hidden": !0 })
1926
1926
  }
1927
1927
  )
1928
- ] }), Ls = ({
1928
+ ] }), Os = ({
1929
1929
  url: e,
1930
1930
  filename: t,
1931
1931
  variant: n = "pill",
@@ -1934,9 +1934,9 @@ const _r = ({
1934
1934
  tone: i = "dark",
1935
1935
  onTriggered: l
1936
1936
  }) => {
1937
- const [o, d] = B(!1), m = W(
1937
+ const [o, d] = F(!1), m = W(
1938
1938
  (c) => {
1939
- c.stopPropagation(), !o && (d(!0), As(e, t).catch(() => {
1939
+ c.stopPropagation(), !o && (d(!0), Ps(e, t).catch(() => {
1940
1940
  }).finally(() => {
1941
1941
  d(!1), l == null || l();
1942
1942
  }));
@@ -2010,16 +2010,16 @@ const _r = ({
2010
2010
  ]
2011
2011
  }
2012
2012
  );
2013
- }, qe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
2013
+ }, We = (e, t, n) => Math.min(Math.max(e, t), n), Nt = ({
2014
2014
  length: e,
2015
2015
  initialIndex: t,
2016
2016
  open: n
2017
2017
  }) => {
2018
- const a = qe(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
2018
+ const a = We(t, 0, Math.max(e - 1, 0)), [r, i] = F(a);
2019
2019
  Y(() => {
2020
- n && i(qe(t, 0, Math.max(e - 1, 0)));
2020
+ n && i(We(t, 0, Math.max(e - 1, 0)));
2021
2021
  }, [n, t, e]), Y(() => {
2022
- i((d) => qe(d, 0, Math.max(e - 1, 0)));
2022
+ i((d) => We(d, 0, Math.max(e - 1, 0)));
2023
2023
  }, [e]);
2024
2024
  const l = W(() => {
2025
2025
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
@@ -2035,7 +2035,7 @@ const _r = ({
2035
2035
  };
2036
2036
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2037
2037
  }, [n, e, l, o]), { index: r, prev: l, next: o };
2038
- }, xt = ({
2038
+ }, yt = ({
2039
2039
  open: e,
2040
2040
  onClose: t,
2041
2041
  ariaLabel: n,
@@ -2116,7 +2116,7 @@ const _r = ({
2116
2116
  onClick: t,
2117
2117
  "aria-label": "Close viewer",
2118
2118
  className: "mes-media-viewer__action",
2119
- children: /* @__PURE__ */ s(ct, { size: 20, weight: "bold", "aria-hidden": !0 })
2119
+ children: /* @__PURE__ */ s(ht, { size: 20, weight: "bold", "aria-hidden": !0 })
2120
2120
  }
2121
2121
  )
2122
2122
  ] })
@@ -2125,13 +2125,13 @@ const _r = ({
2125
2125
  ]
2126
2126
  }
2127
2127
  );
2128
- }, Ms = ({
2128
+ }, zs = ({
2129
2129
  open: e,
2130
2130
  items: t,
2131
2131
  initialIndex: n = 0,
2132
2132
  onClose: a
2133
2133
  }) => {
2134
- const { index: r, prev: i, next: l } = vt({
2134
+ const { index: r, prev: i, next: l } = Nt({
2135
2135
  length: t.length,
2136
2136
  initialIndex: n,
2137
2137
  open: e
@@ -2140,14 +2140,14 @@ const _r = ({
2140
2140
  [o]
2141
2141
  );
2142
2142
  return o ? /* @__PURE__ */ h(
2143
- xt,
2143
+ yt,
2144
2144
  {
2145
2145
  open: e,
2146
2146
  onClose: a,
2147
2147
  ariaLabel: d,
2148
2148
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
2149
2149
  actions: /* @__PURE__ */ s(
2150
- Ls,
2150
+ Os,
2151
2151
  {
2152
2152
  url: o.src,
2153
2153
  filename: d,
@@ -2170,7 +2170,7 @@ const _r = ({
2170
2170
  `${r}:${o.src}`
2171
2171
  ) : null,
2172
2172
  t.length > 1 ? /* @__PURE__ */ s(
2173
- bt,
2173
+ wt,
2174
2174
  {
2175
2175
  onPrev: i,
2176
2176
  onNext: l,
@@ -2181,7 +2181,7 @@ const _r = ({
2181
2181
  ]
2182
2182
  }
2183
2183
  ) : null;
2184
- }, Sr = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", Er = {
2184
+ }, Mr = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", Lr = {
2185
2185
  1: ["rounded-[18px]"],
2186
2186
  2: ["rounded-l-[18px]", "rounded-r-[18px]"],
2187
2187
  3: ["rounded-l-[18px]", "rounded-tr-[18px]", "rounded-br-[18px]"],
@@ -2191,7 +2191,7 @@ const _r = ({
2191
2191
  "rounded-bl-[18px]",
2192
2192
  "rounded-br-[18px]"
2193
2193
  ]
2194
- }, Ir = "--mes-single-width-cap", Tr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Ar = 436, Rs = ({
2194
+ }, Rr = "--mes-single-width-cap", Dr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Pr = 436, Fs = ({
2195
2195
  tiles: e,
2196
2196
  onTileActivate: t,
2197
2197
  maxVisible: n = 4,
@@ -2203,9 +2203,9 @@ const _r = ({
2203
2203
  const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (f, u, g) => {
2204
2204
  var x;
2205
2205
  const c = y(
2206
- Sr,
2206
+ Mr,
2207
2207
  "h-full w-full",
2208
- (x = Er[l.length]) == null ? void 0 : x[u]
2208
+ (x = Lr[l.length]) == null ? void 0 : x[u]
2209
2209
  );
2210
2210
  return t ? /* @__PURE__ */ h(
2211
2211
  "button",
@@ -2230,14 +2230,14 @@ const _r = ({
2230
2230
  aspectRatio: a,
2231
2231
  // Hundredths keep the emitted declaration readable in devtools;
2232
2232
  // the rounding error is well under a device pixel.
2233
- width: `min(var(${Ir}), ${Math.round(Ar * a * 100) / 100}px)`,
2233
+ width: `min(var(${Rr}), ${Math.round(Pr * a * 100) / 100}px)`,
2234
2234
  // Only bites in a container narrower than the width cap.
2235
2235
  maxWidth: "100%"
2236
2236
  }), l.length === 1 ? /* @__PURE__ */ s(
2237
2237
  "div",
2238
2238
  {
2239
2239
  className: y(
2240
- a ? Tr : "aspect-square w-full",
2240
+ a ? Dr : "aspect-square w-full",
2241
2241
  r
2242
2242
  ),
2243
2243
  style: m,
@@ -2293,14 +2293,14 @@ const _r = ({
2293
2293
  }
2294
2294
  );
2295
2295
  }, Ae = (e) => {
2296
- const [t, n] = B(!1), [a, r] = B(0), i = W(
2296
+ const [t, n] = F(!1), [a, r] = F(0), i = W(
2297
2297
  (o) => {
2298
2298
  (e == null ? void 0 : e(o)) !== !1 && (r(o), n(!0));
2299
2299
  },
2300
2300
  [e]
2301
2301
  ), l = W(() => n(!1), []);
2302
2302
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2303
- }, Lr = ({
2303
+ }, Or = ({
2304
2304
  item: e,
2305
2305
  index: t,
2306
2306
  totalCount: n,
@@ -2328,15 +2328,15 @@ const _r = ({
2328
2328
  }
2329
2329
  )
2330
2330
  )
2331
- }), Mr = ({
2331
+ }), zr = ({
2332
2332
  src: e,
2333
2333
  alt: t,
2334
2334
  items: n
2335
- }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ds = (e, t) => e.map((n, a) => ({
2335
+ }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Bs = (e, t) => e.map((n, a) => ({
2336
2336
  src: n.src,
2337
2337
  alt: n.alt,
2338
2338
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2339
- })), Rr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2339
+ })), Fr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2340
2340
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = Ae(
2341
2341
  r
2342
2342
  );
@@ -2363,17 +2363,17 @@ const _r = ({
2363
2363
  ),
2364
2364
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ie, { onClick: i }) }) : null,
2365
2365
  /* @__PURE__ */ s(
2366
- Ms,
2366
+ zs,
2367
2367
  {
2368
2368
  open: l,
2369
- items: Ds([{ src: e, alt: t }], n),
2369
+ items: Bs([{ src: e, alt: t }], n),
2370
2370
  initialIndex: o,
2371
2371
  onClose: m
2372
2372
  }
2373
2373
  )
2374
2374
  ] });
2375
- }, Dr = 326 / 246, Pr = (e) => {
2376
- const t = e == null ? void 0 : e.src, [n, a] = F.useState(), r = F.useCallback(
2375
+ }, Br = 326 / 246, $r = (e) => {
2376
+ const t = e == null ? void 0 : e.src, [n, a] = B.useState(), r = B.useCallback(
2377
2377
  (d) => {
2378
2378
  if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
2379
2379
  const m = d.naturalWidth / d.naturalHeight;
@@ -2382,16 +2382,16 @@ const _r = ({
2382
2382
  );
2383
2383
  },
2384
2384
  [t]
2385
- ), i = F.useCallback(
2385
+ ), i = B.useCallback(
2386
2386
  (d) => r(d.currentTarget),
2387
2387
  [r]
2388
2388
  ), l = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, o = n && n.src === t ? n.ratio : void 0;
2389
2389
  return {
2390
- ratio: l ?? o ?? Dr,
2390
+ ratio: l ?? o ?? Br,
2391
2391
  imgRef: r,
2392
2392
  onLoad: i
2393
2393
  };
2394
- }, Ps = ({
2394
+ }, $s = ({
2395
2395
  state: e,
2396
2396
  src: t,
2397
2397
  alt: n,
@@ -2402,13 +2402,13 @@ const _r = ({
2402
2402
  loading: o = "lazy",
2403
2403
  onClick: d
2404
2404
  }) => {
2405
- const m = Mr({ src: t, alt: n, items: r }), f = Te(e), { viewerOpen: u, viewerIndex: g, handleActivate: c, closeViewer: x } = Ae(
2405
+ const m = zr({ src: t, alt: n, items: r }), f = Te(e), { viewerOpen: u, viewerIndex: g, handleActivate: c, closeViewer: x } = Ae(
2406
2406
  d
2407
- ), _ = m.length === 1, b = Pr(_ ? m[0] : void 0);
2407
+ ), _ = m.length === 1, b = $r(_ ? m[0] : void 0);
2408
2408
  if (m.length === 0)
2409
2409
  return null;
2410
2410
  const p = m.map(
2411
- (v, w) => Lr({
2411
+ (v, w) => Or({
2412
2412
  item: v,
2413
2413
  index: w,
2414
2414
  totalCount: m.length,
@@ -2430,7 +2430,7 @@ const _r = ({
2430
2430
  "data-testid": "image-attachment",
2431
2431
  children: [
2432
2432
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2433
- Rs,
2433
+ Fs,
2434
2434
  {
2435
2435
  tiles: p,
2436
2436
  onTileActivate: c,
@@ -2438,10 +2438,10 @@ const _r = ({
2438
2438
  }
2439
2439
  ) }),
2440
2440
  /* @__PURE__ */ s(
2441
- Ms,
2441
+ zs,
2442
2442
  {
2443
2443
  open: u,
2444
- items: Ds(m, a),
2444
+ items: Bs(m, a),
2445
2445
  initialIndex: g,
2446
2446
  onClose: x
2447
2447
  }
@@ -2449,17 +2449,17 @@ const _r = ({
2449
2449
  ]
2450
2450
  }
2451
2451
  );
2452
- }, Or = (e) => /* @__PURE__ */ s(Rr, { ...e }), zr = (e) => /* @__PURE__ */ s(Ps, { ...e, state: "sent" }), Br = (e) => /* @__PURE__ */ s(Ps, { ...e, state: "received" }), Fr = {
2453
- Composer: Or,
2454
- Sent: zr,
2455
- Received: Br
2456
- }, $r = ({
2452
+ }, Ur = (e) => /* @__PURE__ */ s(Fr, { ...e }), Vr = (e) => /* @__PURE__ */ s($s, { ...e, state: "sent" }), jr = (e) => /* @__PURE__ */ s($s, { ...e, state: "received" }), Hr = {
2453
+ Composer: Ur,
2454
+ Sent: Vr,
2455
+ Received: jr
2456
+ }, Gr = ({
2457
2457
  open: e,
2458
2458
  items: t,
2459
2459
  initialIndex: n = 0,
2460
2460
  onClose: a
2461
2461
  }) => {
2462
- const { index: r, prev: i, next: l } = vt({
2462
+ const { index: r, prev: i, next: l } = Nt({
2463
2463
  length: t.length,
2464
2464
  initialIndex: n,
2465
2465
  open: e
@@ -2467,11 +2467,11 @@ const _r = ({
2467
2467
  () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
2468
2468
  [o]
2469
2469
  ), m = ne(
2470
- () => o ? Ur(o.src) : void 0,
2470
+ () => o ? Yr(o.src) : void 0,
2471
2471
  [o]
2472
2472
  );
2473
2473
  return !o || !m ? null : /* @__PURE__ */ h(
2474
- xt,
2474
+ yt,
2475
2475
  {
2476
2476
  open: e,
2477
2477
  onClose: a,
@@ -2490,7 +2490,7 @@ const _r = ({
2490
2490
  `${r}:${o.src}`
2491
2491
  ),
2492
2492
  t.length > 1 ? /* @__PURE__ */ s(
2493
- bt,
2493
+ wt,
2494
2494
  {
2495
2495
  onPrev: i,
2496
2496
  onNext: l,
@@ -2501,16 +2501,16 @@ const _r = ({
2501
2501
  ]
2502
2502
  }
2503
2503
  );
2504
- }, Ur = (e) => {
2504
+ }, Yr = (e) => {
2505
2505
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2506
2506
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2507
- }, Vr = ({
2507
+ }, Wr = ({
2508
2508
  src: e,
2509
2509
  filename: t,
2510
2510
  fileSize: n,
2511
2511
  title: a,
2512
2512
  items: r
2513
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], jr = ({
2513
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Xr = ({
2514
2514
  variant: e,
2515
2515
  item: t,
2516
2516
  index: n,
@@ -2519,7 +2519,7 @@ const _r = ({
2519
2519
  }) => {
2520
2520
  const i = t.filename ?? ae(t.src);
2521
2521
  return /* @__PURE__ */ s(
2522
- Ts,
2522
+ Ds,
2523
2523
  {
2524
2524
  variant: e,
2525
2525
  filename: i,
@@ -2531,7 +2531,7 @@ const _r = ({
2531
2531
  trailingAction: r
2532
2532
  }
2533
2533
  );
2534
- }, _t = ({
2534
+ }, Ct = ({
2535
2535
  state: e,
2536
2536
  src: t,
2537
2537
  filename: n,
@@ -2543,7 +2543,7 @@ const _r = ({
2543
2543
  onClick: d,
2544
2544
  onDismiss: m
2545
2545
  }) => {
2546
- const f = Te(e), u = Vr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Ae(
2546
+ const f = Te(e), u = Wr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Ae(
2547
2547
  d
2548
2548
  ), b = e === "composer" && !!m;
2549
2549
  if (u.length === 0)
@@ -2562,7 +2562,7 @@ const _r = ({
2562
2562
  children: [
2563
2563
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((v, w) => {
2564
2564
  const C = v.filename ?? ae(v.src), T = b && w === 0 ? /* @__PURE__ */ s(Ie, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2565
- Ls,
2565
+ Os,
2566
2566
  {
2567
2567
  url: v.src,
2568
2568
  filename: C,
@@ -2572,7 +2572,7 @@ const _r = ({
2572
2572
  }
2573
2573
  );
2574
2574
  return /* @__PURE__ */ s(
2575
- jr,
2575
+ Xr,
2576
2576
  {
2577
2577
  variant: f,
2578
2578
  item: v,
@@ -2584,7 +2584,7 @@ const _r = ({
2584
2584
  );
2585
2585
  }) }),
2586
2586
  /* @__PURE__ */ s(
2587
- $r,
2587
+ Gr,
2588
2588
  {
2589
2589
  open: g,
2590
2590
  items: p,
@@ -2595,17 +2595,17 @@ const _r = ({
2595
2595
  ]
2596
2596
  }
2597
2597
  );
2598
- }, Hr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "composer" }), Gr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "sent" }), Yr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "received" }), Wr = {
2599
- Composer: Hr,
2600
- Sent: Gr,
2601
- Received: Yr
2602
- }, Os = ({
2598
+ }, qr = (e) => /* @__PURE__ */ s(Ct, { ...e, state: "composer" }), Kr = (e) => /* @__PURE__ */ s(Ct, { ...e, state: "sent" }), Zr = (e) => /* @__PURE__ */ s(Ct, { ...e, state: "received" }), Jr = {
2599
+ Composer: qr,
2600
+ Sent: Kr,
2601
+ Received: Zr
2602
+ }, Us = ({
2603
2603
  open: e,
2604
2604
  items: t,
2605
2605
  initialIndex: n = 0,
2606
2606
  onClose: a
2607
2607
  }) => {
2608
- const { index: r, prev: i, next: l } = vt({
2608
+ const { index: r, prev: i, next: l } = Nt({
2609
2609
  length: t.length,
2610
2610
  initialIndex: n,
2611
2611
  open: e
@@ -2614,7 +2614,7 @@ const _r = ({
2614
2614
  [o]
2615
2615
  );
2616
2616
  return o ? /* @__PURE__ */ h(
2617
- xt,
2617
+ yt,
2618
2618
  {
2619
2619
  open: e,
2620
2620
  onClose: a,
@@ -2638,7 +2638,7 @@ const _r = ({
2638
2638
  `${r}:${o.src}`
2639
2639
  ),
2640
2640
  t.length > 1 ? /* @__PURE__ */ s(
2641
- bt,
2641
+ wt,
2642
2642
  {
2643
2643
  onPrev: i,
2644
2644
  onNext: l,
@@ -2649,7 +2649,7 @@ const _r = ({
2649
2649
  ]
2650
2650
  }
2651
2651
  ) : null;
2652
- }, qr = () => /* @__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(nt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), zs = ({
2652
+ }, Qr = () => /* @__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 }) }) }), Vs = ({
2653
2653
  item: e,
2654
2654
  index: t
2655
2655
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2664,30 +2664,30 @@ const _r = ({
2664
2664
  className: "absolute inset-0 size-full object-cover"
2665
2665
  }
2666
2666
  ) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
2667
- fs,
2667
+ xs,
2668
2668
  {
2669
2669
  className: "size-16 text-white/30",
2670
2670
  weight: "regular",
2671
2671
  "aria-hidden": !0
2672
2672
  }
2673
2673
  ) }),
2674
- /* @__PURE__ */ s(qr, {})
2675
- ] }), Xr = (e, t, n) => ({
2674
+ /* @__PURE__ */ s(Qr, {})
2675
+ ] }), ei = (e, t, n) => ({
2676
2676
  ariaLabel: `Play video ${t + 1} of ${n}`,
2677
- content: /* @__PURE__ */ s(zs, { item: e, index: t })
2678
- }), Kr = ({
2677
+ content: /* @__PURE__ */ s(Vs, { item: e, index: t })
2678
+ }), ti = ({
2679
2679
  src: e,
2680
2680
  poster: t,
2681
2681
  mimeType: n,
2682
2682
  preload: a,
2683
2683
  items: r
2684
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Bs = (e, t) => e.map((n, a) => ({
2684
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], js = (e, t) => e.map((n, a) => ({
2685
2685
  src: n.src,
2686
2686
  poster: n.poster,
2687
2687
  mimeType: n.mimeType,
2688
2688
  preload: n.preload,
2689
2689
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2690
- })), Zr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2690
+ })), si = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2691
2691
  const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: f } = Ae(
2692
2692
  i
2693
2693
  );
@@ -2699,15 +2699,15 @@ const _r = ({
2699
2699
  onClick: () => m(0),
2700
2700
  "aria-label": "Play video",
2701
2701
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2702
- children: /* @__PURE__ */ s(zs, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2702
+ children: /* @__PURE__ */ s(Vs, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2703
2703
  }
2704
2704
  ),
2705
2705
  l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ie, { onClick: l }) }) : null,
2706
2706
  /* @__PURE__ */ s(
2707
- Os,
2707
+ Us,
2708
2708
  {
2709
2709
  open: o,
2710
- items: Bs(
2710
+ items: js(
2711
2711
  [{ src: e, poster: t, mimeType: n, preload: r }],
2712
2712
  a
2713
2713
  ),
@@ -2716,7 +2716,7 @@ const _r = ({
2716
2716
  }
2717
2717
  )
2718
2718
  ] });
2719
- }, Fs = ({
2719
+ }, Hs = ({
2720
2720
  state: e,
2721
2721
  src: t,
2722
2722
  poster: n,
@@ -2728,13 +2728,13 @@ const _r = ({
2728
2728
  preload: d,
2729
2729
  onClick: m
2730
2730
  }) => {
2731
- const f = Kr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Te(e), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Ae(
2731
+ const f = ti({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Te(e), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Ae(
2732
2732
  m
2733
2733
  );
2734
2734
  if (f.length === 0)
2735
2735
  return null;
2736
2736
  const b = f.map(
2737
- (p, v) => Xr(p, v, f.length)
2737
+ (p, v) => ei(p, v, f.length)
2738
2738
  );
2739
2739
  return /* @__PURE__ */ h(
2740
2740
  Ee,
@@ -2744,12 +2744,12 @@ const _r = ({
2744
2744
  groupPosition: o,
2745
2745
  "data-testid": "video-attachment",
2746
2746
  children: [
2747
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Rs, { tiles: b, onTileActivate: x }) }),
2747
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Fs, { tiles: b, onTileActivate: x }) }),
2748
2748
  /* @__PURE__ */ s(
2749
- Os,
2749
+ Us,
2750
2750
  {
2751
2751
  open: g,
2752
- items: Bs(f, r),
2752
+ items: js(f, r),
2753
2753
  initialIndex: c,
2754
2754
  onClose: _
2755
2755
  }
@@ -2757,31 +2757,31 @@ const _r = ({
2757
2757
  ]
2758
2758
  }
2759
2759
  );
2760
- }, Jr = (e) => /* @__PURE__ */ s(Zr, { ...e }), Qr = (e) => /* @__PURE__ */ s(Fs, { ...e, state: "sent" }), ei = (e) => /* @__PURE__ */ s(Fs, { ...e, state: "received" }), ti = {
2761
- Composer: Jr,
2762
- Sent: Qr,
2763
- Received: ei
2760
+ }, ni = (e) => /* @__PURE__ */ s(si, { ...e }), ai = (e) => /* @__PURE__ */ s(Hs, { ...e, state: "sent" }), ri = (e) => /* @__PURE__ */ s(Hs, { ...e, state: "received" }), ii = {
2761
+ Composer: ni,
2762
+ Sent: ai,
2763
+ Received: ri
2764
2764
  }, Ne = {
2765
- Image: Fr,
2766
- Video: ti,
2767
- Audio: mr,
2768
- Pdf: Wr,
2769
- File: kr
2770
- }, si = {
2765
+ Image: Hr,
2766
+ Video: ii,
2767
+ Audio: br,
2768
+ Pdf: Jr,
2769
+ File: Ar
2770
+ }, oi = {
2771
2771
  isUnlocking: () => !1
2772
- }, ni = {
2773
- LockedAttachment: si
2774
- }, $s = lt({}), Yo = $s.Provider;
2775
- function ai(e) {
2776
- return ke($s)[e] ?? ni[e];
2772
+ }, li = {
2773
+ LockedAttachment: oi
2774
+ }, Gs = mt({}), ll = Gs.Provider;
2775
+ function ci(e) {
2776
+ return ke(Gs)[e] ?? li[e];
2777
2777
  }
2778
- const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import("./Card-BI3bA2Cj.js")), oi = () => /* @__PURE__ */ s(
2778
+ const di = B.lazy(() => import("./Card-qS17qnN0.js")), ui = B.lazy(() => import("./Card-DcyixIfP.js")), mi = () => /* @__PURE__ */ s(
2779
2779
  "div",
2780
2780
  {
2781
2781
  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)]",
2782
2782
  "aria-hidden": !0
2783
2783
  }
2784
- ), Pe = (e) => /* @__PURE__ */ s(tn, { fallback: /* @__PURE__ */ s(oi, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(ri, { ...e }) : /* @__PURE__ */ s(ii, { ...e }) }), li = ({ size: e = 15 }) => /* @__PURE__ */ s(
2784
+ ), Pe = (e) => /* @__PURE__ */ s(on, { fallback: /* @__PURE__ */ s(mi, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(di, { ...e }) : /* @__PURE__ */ s(ui, { ...e }) }), hi = ({ size: e = 15 }) => /* @__PURE__ */ s(
2785
2785
  "svg",
2786
2786
  {
2787
2787
  width: e,
@@ -2798,27 +2798,27 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2798
2798
  }
2799
2799
  )
2800
2800
  }
2801
- ), ci = (e) => {
2801
+ ), fi = (e) => {
2802
2802
  var t;
2803
2803
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.TIP;
2804
- }, Us = (e) => {
2804
+ }, Ys = (e) => {
2805
2805
  var t;
2806
2806
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.PAID;
2807
- }, Be = (e) => {
2807
+ }, ze = (e) => {
2808
2808
  var t;
2809
2809
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.CHATBOT;
2810
- }, wt = (e) => {
2810
+ }, kt = (e) => {
2811
2811
  var t;
2812
2812
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.ATTACHMENT;
2813
- }, di = (e) => {
2813
+ }, gi = (e) => {
2814
2814
  var t;
2815
- return wt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
2816
- }, ui = (e) => {
2815
+ return kt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
2816
+ }, pi = (e) => {
2817
2817
  var t;
2818
- return wt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2819
- }, Vs = (e) => ci(e) || Us(e), mi = (e) => {
2818
+ return kt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2819
+ }, Ws = (e) => fi(e) || Ys(e), bi = (e) => {
2820
2820
  var t;
2821
- return Vs(e) && !((t = e.text) != null && t.trim());
2821
+ return Ws(e) && !((t = e.text) != null && t.trim());
2822
2822
  }, Xe = ({
2823
2823
  message: e,
2824
2824
  standalone: t = !1,
@@ -2826,15 +2826,15 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2826
2826
  hasAttachment: a = !1
2827
2827
  }) => {
2828
2828
  var u;
2829
- const r = Vs(e), i = Be(e);
2829
+ const r = Ws(e), i = ze(e);
2830
2830
  if (!r && !i)
2831
2831
  return null;
2832
2832
  if (r) {
2833
2833
  const g = (u = e.metadata) == null ? void 0 : u.amount_text;
2834
2834
  if (!g) return null;
2835
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = Us(e) ? "message" : "tip", _ = t ? `${g} ${x}` : `Delivered with ${g} ${x}`;
2835
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = Ys(e) ? "message" : "tip", _ = t ? `${g} ${x}` : `Delivered with ${g} ${x}`;
2836
2836
  return /* @__PURE__ */ h("div", { className: c, children: [
2837
- /* @__PURE__ */ s(na, { size: t ? 14 : 12 }),
2837
+ /* @__PURE__ */ s(la, { size: t ? 14 : 12 }),
2838
2838
  /* @__PURE__ */ s("span", { children: _ })
2839
2839
  ] });
2840
2840
  }
@@ -2842,7 +2842,7 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2842
2842
  "message-chatbot-indicator",
2843
2843
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2844
2844
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2845
- ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(li, { size: l ? 12 : 15 }) });
2845
+ ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(hi, { size: l ? 12 : 15 }) });
2846
2846
  return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ h(J, { children: [
2847
2847
  m,
2848
2848
  f
@@ -2850,7 +2850,7 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2850
2850
  f,
2851
2851
  m
2852
2852
  ] }) });
2853
- }, hi = ({
2853
+ }, vi = ({
2854
2854
  selected: e,
2855
2855
  onVoteUp: t,
2856
2856
  onVoteDown: n
@@ -2866,7 +2866,7 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2866
2866
  "aria-label": "Good response",
2867
2867
  "aria-pressed": e === "up",
2868
2868
  "data-tooltip": "Good response",
2869
- children: /* @__PURE__ */ s(aa, { size: 16, weight: e === "up" ? "fill" : "regular" })
2869
+ children: /* @__PURE__ */ s(ca, { size: 16, weight: e === "up" ? "fill" : "regular" })
2870
2870
  }
2871
2871
  ),
2872
2872
  /* @__PURE__ */ s(
@@ -2880,10 +2880,10 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2880
2880
  "aria-label": "Bad response",
2881
2881
  "aria-pressed": e === "down",
2882
2882
  "data-tooltip": "Bad response",
2883
- children: /* @__PURE__ */ s(ra, { size: 16, weight: e === "down" ? "fill" : "regular" })
2883
+ children: /* @__PURE__ */ s(da, { size: 16, weight: e === "down" ? "fill" : "regular" })
2884
2884
  }
2885
2885
  )
2886
- ] }), Nt = () => {
2886
+ ] }), St = () => {
2887
2887
  const { message: e } = fe("SentMessageDeliveryStatus"), { messages: t } = he("SentMessageDeliveryStatus"), n = (() => {
2888
2888
  if (t)
2889
2889
  for (let a = t.length - 1; a >= 0; a -= 1) {
@@ -2893,10 +2893,10 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2893
2893
  }
2894
2894
  })();
2895
2895
  return e.id === n;
2896
- }, Ke = () => Nt() ? /* @__PURE__ */ h(J, { children: [
2897
- /* @__PURE__ */ s(la, { weight: "bold", "aria-hidden": "true" }),
2896
+ }, qe = () => St() ? /* @__PURE__ */ h(J, { children: [
2897
+ /* @__PURE__ */ s(ha, { weight: "bold", "aria-hidden": "true" }),
2898
2898
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2899
- ] }) : null, fi = () => Nt() ? /* @__PURE__ */ h(J, { children: [
2899
+ ] }) : null, xi = () => St() ? /* @__PURE__ */ h(J, { children: [
2900
2900
  /* @__PURE__ */ s(
2901
2901
  ve,
2902
2902
  {
@@ -2906,13 +2906,13 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2906
2906
  }
2907
2907
  ),
2908
2908
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
2909
- ] }) : null, gi = ({
2909
+ ] }) : null, _i = ({
2910
2910
  broadcastId: e,
2911
2911
  broadcastName: t,
2912
2912
  onBroadcastClick: n
2913
2913
  }) => {
2914
2914
  const a = t || "Broadcast", r = /* @__PURE__ */ h(J, { children: [
2915
- /* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(oa, { weight: "fill" }) }),
2915
+ /* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(ma, { weight: "fill" }) }),
2916
2916
  /* @__PURE__ */ s(
2917
2917
  "span",
2918
2918
  {
@@ -2935,36 +2935,36 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2935
2935
  children: r
2936
2936
  }
2937
2937
  ) : r;
2938
- }, pi = () => /* @__PURE__ */ h("span", { className: "str-chat__message-status sent-message-status--failed", children: [
2939
- /* @__PURE__ */ s(ia, { weight: "bold", "aria-hidden": "true" }),
2938
+ }, wi = () => /* @__PURE__ */ h("span", { className: "str-chat__message-status sent-message-status--failed", children: [
2939
+ /* @__PURE__ */ s(ua, { weight: "bold", "aria-hidden": "true" }),
2940
2940
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
2941
- ] }), bi = ({
2941
+ ] }), Ni = ({
2942
2942
  onBroadcastClick: e
2943
2943
  }) => {
2944
2944
  var f, u;
2945
2945
  const { isMyMessage: t, message: n, threadList: a } = fe(
2946
2946
  "SentMessageDeliveryStatus"
2947
- ), r = t(), i = Nt();
2947
+ ), r = t(), i = St();
2948
2948
  if (a)
2949
2949
  return null;
2950
2950
  if (n.status === "failed" && r && n.type !== "error")
2951
- return /* @__PURE__ */ s(pi, {});
2951
+ return /* @__PURE__ */ s(wi, {});
2952
2952
  if (!r)
2953
2953
  return null;
2954
2954
  const l = (f = n.metadata) == null ? void 0 : f.broadcast_id, o = (u = n.metadata) == null ? void 0 : u.broadcast_name, d = n.status !== "sending" && n.status !== "failed" && l ? /* @__PURE__ */ s(
2955
- gi,
2955
+ _i,
2956
2956
  {
2957
2957
  broadcastId: l,
2958
2958
  broadcastName: o,
2959
2959
  onBroadcastClick: e
2960
2960
  }
2961
2961
  ) : null, m = /* @__PURE__ */ s(
2962
- on,
2962
+ mn,
2963
2963
  {
2964
- MessageSentStatus: Ke,
2965
- MessageDeliveredStatus: Ke,
2966
- MessageReadStatus: Ke,
2967
- MessageSendingStatus: fi
2964
+ MessageSentStatus: qe,
2965
+ MessageDeliveredStatus: qe,
2966
+ MessageReadStatus: qe,
2967
+ MessageSendingStatus: xi
2968
2968
  }
2969
2969
  );
2970
2970
  return d ? /* @__PURE__ */ h("span", { className: "sent-message-status-row", children: [
@@ -2979,26 +2979,26 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2979
2979
  ),
2980
2980
  d
2981
2981
  ] }) : m;
2982
- }, vi = /^([a-z][a-z0-9+.-]*):/i, xi = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2983
- function yt(e) {
2982
+ }, yi = /^([a-z][a-z0-9+.-]*):/i, Ci = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2983
+ function Et(e) {
2984
2984
  if (typeof e != "string") return;
2985
2985
  const t = e.trim();
2986
2986
  if (t === "") return;
2987
- const n = vi.exec(t);
2987
+ const n = yi.exec(t);
2988
2988
  if (n) {
2989
2989
  const a = n[1].toLowerCase();
2990
- return xi.has(a) ? t : void 0;
2990
+ return Ci.has(a) ? t : void 0;
2991
2991
  }
2992
2992
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2993
2993
  }
2994
- const _i = {
2994
+ const ki = {
2995
2995
  dark: "bg-white text-[#121110] hover:bg-white/90",
2996
2996
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2997
- }, wi = ({ variant: e, cta: t }) => {
2997
+ }, Si = ({ variant: e, cta: t }) => {
2998
2998
  const n = y(
2999
2999
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
3000
- _i[e]
3001
- ), a = yt(t.href);
3000
+ ki[e]
3001
+ ), a = Et(t.href);
3002
3002
  return a ? /* @__PURE__ */ s(
3003
3003
  "a",
3004
3004
  {
@@ -3024,52 +3024,53 @@ const _i = {
3024
3024
  children: t.label
3025
3025
  }
3026
3026
  );
3027
- }, Ni = {
3027
+ }, Ei = {
3028
3028
  dark: "text-white",
3029
3029
  light: "text-black/90"
3030
- }, yi = "text-white/30", Ci = {
3030
+ }, Ii = "text-white/30", Ti = {
3031
3031
  dark: "text-white/55",
3032
3032
  light: "text-black/55"
3033
- }, ki = {
3033
+ }, Ai = {
3034
3034
  dark: "bg-white/25",
3035
3035
  light: "bg-black/15"
3036
- }, Ct = ({
3036
+ }, It = ({
3037
3037
  variant: e,
3038
- title: t,
3039
- placeholderTitle: n,
3040
- description: a,
3041
- url: r,
3042
- appIcon: i,
3043
- cta: l,
3044
- trailingAction: o,
3045
- chinTextColor: d,
3038
+ chinTextColor: t,
3039
+ title: n,
3040
+ placeholderTitle: a,
3041
+ description: r,
3042
+ url: i,
3043
+ appIcon: l,
3044
+ cta: o,
3045
+ trailingAction: d,
3046
3046
  isLoading: m = !1
3047
3047
  }) => {
3048
- const f = e === "dark", u = t ?? (f ? n : void 0) ?? "", g = u.trim() !== "", c = a != null && a.trim() !== "", x = typeof r == "string" ? r.trim() : "", _ = x !== "", b = l != null;
3048
+ const f = e === "dark", u = n ?? (f ? a : void 0) ?? "", g = u.trim() !== "", c = r != null && r.trim() !== "", x = typeof i == "string" ? i.trim() : "", _ = x !== "", b = o != null;
3049
3049
  if (!m && !g && !c && !_ && !b)
3050
3050
  return null;
3051
- const p = f && !t, v = y(
3051
+ const p = f && !n, v = y(
3052
3052
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
3053
- d == null && (p ? yi : Ni[e])
3053
+ t == null && (p ? Ii : Ei[e])
3054
3054
  ), w = y(
3055
3055
  "truncate text-[12px] leading-4 tracking-[0.24px]",
3056
- d == null && Ci[e]
3057
- ), C = d ? { color: d } : void 0;
3056
+ t == null && Ti[e]
3057
+ );
3058
3058
  if (m) {
3059
3059
  const T = y(
3060
3060
  "animate-pulse rounded",
3061
- ki[e]
3061
+ Ai[e]
3062
3062
  );
3063
3063
  return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
3064
3064
  /* @__PURE__ */ s("div", { className: y("h-5 w-3/4", T), "aria-hidden": !0 }),
3065
3065
  /* @__PURE__ */ s("div", { className: y("h-4 w-1/2", T), "aria-hidden": !0 })
3066
3066
  ] }) });
3067
3067
  }
3068
+ const C = t ? { color: t } : void 0;
3068
3069
  return /* @__PURE__ */ h("div", { className: "shrink-0 px-4 py-3", children: [
3069
3070
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
3070
3071
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
3071
3072
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
3072
- i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
3073
+ l ? /* @__PURE__ */ s("span", { className: "shrink-0", children: l }) : null,
3073
3074
  /* @__PURE__ */ s(
3074
3075
  "p",
3075
3076
  {
@@ -3079,19 +3080,19 @@ const _i = {
3079
3080
  }
3080
3081
  )
3081
3082
  ] }),
3082
- c && /* @__PURE__ */ s("p", { className: w, style: C, children: a }),
3083
+ c && /* @__PURE__ */ s("p", { className: w, style: C, children: r }),
3083
3084
  !b && _ && /* @__PURE__ */ s("p", { className: w, style: C, children: x })
3084
3085
  ] }),
3085
- o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
3086
+ d && /* @__PURE__ */ s("div", { className: "shrink-0", children: d })
3086
3087
  ] }),
3087
- l && /* @__PURE__ */ s(wi, { variant: e, cta: l })
3088
+ o && /* @__PURE__ */ s(Si, { variant: e, cta: o })
3088
3089
  ] });
3089
- }, Si = "Loading link preview", Ei = y(
3090
+ }, Mi = "Loading link preview", Li = y(
3090
3091
  "relative w-[290px] select-none overflow-hidden",
3091
3092
  // 20px corners — no token exists for it in the component-library preset,
3092
3093
  // whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
3093
3094
  "rounded-[20px]"
3094
- ), Ii = "flex h-[250px] flex-col", Fe = ({
3095
+ ), Ri = "flex h-[250px] flex-col", Fe = ({
3095
3096
  variant: e,
3096
3097
  children: t,
3097
3098
  href: n,
@@ -3106,8 +3107,8 @@ const _i = {
3106
3107
  "data-testid": u
3107
3108
  }) => {
3108
3109
  const g = n != null || a != null, c = y(
3109
- Ei,
3110
- m ? Ii : "block",
3110
+ Li,
3111
+ m ? Ri : "block",
3111
3112
  // Kept underneath `accentStyle` rather than swapped out: the inline
3112
3113
  // background wins on specificity, and leaving the class in place means
3113
3114
  // an accent that somehow doesn't paint still lands on a sane surface.
@@ -3121,12 +3122,18 @@ const _i = {
3121
3122
  // dropped, the chin rendered transparent, and the own-message `color: white`
3122
3123
  // left the title and URL invisible (MES-1388). An arbitrary value is
3123
3124
  // generated from the class name alone and cannot depend on consumer theme.
3124
- o ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
3125
+ //
3126
+ // Both values are the plain message bubble's own fill, so a card with no
3127
+ // usable accent matches the text bubbles around it: `#1e2330` is
3128
+ // `--str-chat__own-message-bubble-background-color` and `#f1f0ee` is
3129
+ // `--str-chat__message-bubble-background-color`. Mirrored in
3130
+ // `chinContrast.BUBBLE_BG_BY_VARIANT`, which the bubble tail reads.
3131
+ o ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"),
3125
3132
  // `focus-ring` is a design-system utility from the component-library
3126
3133
  // tailwind preset — outline-none + a black 2px focus-visible ring
3127
3134
  // with offset, so keyboard users can see the focused card.
3128
3135
  g ? "cursor-pointer no-underline focus-ring" : null
3129
- ), x = f ? { role: "status", "aria-busy": !0, "aria-label": Si } : void 0, _ = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3136
+ ), x = f ? { role: "status", "aria-busy": !0, "aria-label": Mi } : void 0, _ = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3130
3137
  return n ? /* @__PURE__ */ h(
3131
3138
  "a",
3132
3139
  {
@@ -3174,17 +3181,17 @@ const _i = {
3174
3181
  ]
3175
3182
  }
3176
3183
  );
3177
- }, es = {
3184
+ }, as = {
3178
3185
  dark: "bg-white/10",
3179
3186
  light: "bg-black/5"
3180
- }, Ti = {
3187
+ }, Di = {
3181
3188
  dark: "size-16 text-white/25",
3182
3189
  light: "size-16 text-black/25"
3183
- }, Le = (e, t) => !!t && !!e && ce(e) === "audio", kt = (e, t) => {
3190
+ }, Me = (e, t) => !!t && !!e && ce(e) === "audio", Tt = (e, t) => {
3184
3191
  if (!t || !e) return !1;
3185
3192
  const n = ce(e);
3186
3193
  return n === "video" || n === "audio";
3187
- }, St = "bg-[#F2F3F4]", $e = ({
3194
+ }, Pi = "#F2F3F4", At = "bg-[#F2F3F4]", Be = ({
3188
3195
  variant: e,
3189
3196
  thumbnailUrl: t,
3190
3197
  sourceUrl: n,
@@ -3196,7 +3203,7 @@ const _i = {
3196
3203
  onImageError: d
3197
3204
  }) => {
3198
3205
  const m = ce(r), f = !!n && m === "video", u = me(t);
3199
- return !o && Le(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
3206
+ return !o && Me(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
3200
3207
  "audio",
3201
3208
  {
3202
3209
  src: n,
@@ -3227,7 +3234,7 @@ const _i = {
3227
3234
  {
3228
3235
  className: y(
3229
3236
  "h-full w-full animate-pulse",
3230
- es[e]
3237
+ as[e]
3231
3238
  ),
3232
3239
  "aria-hidden": !0
3233
3240
  }
@@ -3271,10 +3278,10 @@ const _i = {
3271
3278
  {
3272
3279
  className: y(
3273
3280
  "flex h-full w-full items-center justify-center",
3274
- es[e]
3281
+ as[e]
3275
3282
  ),
3276
3283
  children: xe(r, {
3277
- className: Ti[e],
3284
+ className: Di[e],
3278
3285
  weight: "regular"
3279
3286
  })
3280
3287
  }
@@ -3284,45 +3291,121 @@ const _i = {
3284
3291
  ]
3285
3292
  }
3286
3293
  );
3287
- }, Oe = "#FFFFFF", ts = "#040403", Ai = "#1e2330", Li = 3, Mi = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
3288
- function Ri(e) {
3289
- if (typeof e != "string" || !Mi.test(e.trim())) return;
3290
- const t = e.trim().replace(/^#/, ""), n = t.length === Li ? t.replace(/./g, (a) => a + a) : t;
3294
+ }, Oi = 4.5, zi = {
3295
+ dark: "#1e2330",
3296
+ light: "#f1f0ee"
3297
+ }, Fi = 3, Bi = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
3298
+ function $i(e) {
3299
+ if (typeof e != "string" || !Bi.test(e.trim())) return;
3300
+ const t = e.trim().replace(/^#/, ""), n = t.length === Fi ? t.replace(/./g, (a) => a + a) : t;
3291
3301
  return [
3292
3302
  Number.parseInt(n.slice(0, 2), 16),
3293
3303
  Number.parseInt(n.slice(2, 4), 16),
3294
3304
  Number.parseInt(n.slice(4, 6), 16)
3295
3305
  ];
3296
3306
  }
3297
- function Ze(e) {
3307
+ function Ke(e) {
3298
3308
  const t = e / 255;
3299
3309
  return t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
3300
3310
  }
3301
- function it(e) {
3302
- const t = Ri(e);
3303
- return t ? 0.2126 * Ze(t[0]) + 0.7152 * Ze(t[1]) + 0.0722 * Ze(t[2]) : Number.NaN;
3311
+ function Ui(e) {
3312
+ return 0.2126 * Ke(e[0]) + 0.7152 * Ke(e[1]) + 0.0722 * Ke(e[2]);
3313
+ }
3314
+ function rs(e) {
3315
+ const t = $i(e);
3316
+ return t ? Ui(t) : Number.NaN;
3304
3317
  }
3305
- function ss(e, t) {
3306
- const n = it(e), a = it(t);
3307
- if (Number.isNaN(n) || Number.isNaN(a)) return Number.NaN;
3308
- const r = Math.max(n, a), i = Math.min(n, a);
3309
- return (r + 0.05) / (i + 0.05);
3318
+ function Vi(e, t) {
3319
+ return Number.isNaN(e) || Number.isNaN(t) ? Number.NaN : (Math.max(e, t) + 0.05) / (Math.min(e, t) + 0.05);
3310
3320
  }
3311
- function Di(e) {
3312
- if (e == null) return Oe;
3313
- const t = ss(e, Oe);
3314
- return Number.isNaN(t) || t >= ss(e, ts) ? Oe : ts;
3321
+ function lt(e, t) {
3322
+ return Vi(rs(e), rs(t));
3315
3323
  }
3316
- function Pi(e) {
3317
- if (e == null || Number.isNaN(it(e))) return;
3318
- const t = e.trim();
3319
- return t.startsWith("#") ? t : `#${t}`;
3324
+ const ct = "#FFFFFF", dt = "#040403";
3325
+ function ji(e) {
3326
+ const t = lt(e, dt);
3327
+ if (!Number.isNaN(t))
3328
+ return t >= lt(e, ct) ? dt : ct;
3320
3329
  }
3321
- const Oi = {
3322
- dark: Ai,
3323
- light: "#ffffff"
3324
- };
3325
- function Et({
3330
+ const Hi = {
3331
+ dark: 0.3,
3332
+ light: 0.9
3333
+ }, Gi = {
3334
+ dark: ct,
3335
+ light: dt
3336
+ }, Yi = 3, Wi = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i, is = 0.5, Xi = 25;
3337
+ function qi(e) {
3338
+ if (typeof e != "string" || !Wi.test(e.trim())) return;
3339
+ const t = e.trim().replace(/^#/, ""), n = t.length === Yi ? t.replace(/./g, (a) => a + a) : t;
3340
+ return [
3341
+ Number.parseInt(n.slice(0, 2), 16),
3342
+ Number.parseInt(n.slice(2, 4), 16),
3343
+ Number.parseInt(n.slice(4, 6), 16)
3344
+ ];
3345
+ }
3346
+ function Ki(e) {
3347
+ return `#${e.map(
3348
+ (t) => Math.round(Math.min(255, Math.max(0, t))).toString(16).padStart(2, "0")
3349
+ ).join("")}`;
3350
+ }
3351
+ function Ze(e) {
3352
+ return e <= 0.04045 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
3353
+ }
3354
+ function Je(e) {
3355
+ return e <= 31308e-7 ? 12.92 * e : 1.055 * e ** (1 / 2.4) - 0.055;
3356
+ }
3357
+ function Zi(e) {
3358
+ const t = Ze(e[0] / 255), n = Ze(e[1] / 255), a = Ze(e[2] / 255), r = Math.cbrt(
3359
+ 0.4122214708 * t + 0.5363325363 * n + 0.0514459929 * a
3360
+ ), i = Math.cbrt(
3361
+ 0.2119034982 * t + 0.6806995451 * n + 0.1073969566 * a
3362
+ ), l = Math.cbrt(
3363
+ 0.0883024619 * t + 0.2817188376 * n + 0.6299787005 * a
3364
+ ), o = 0.2104542553 * r + 0.793617785 * i - 0.0040720468 * l, d = 1.9779984951 * r - 2.428592205 * i + 0.4505937099 * l, m = 0.0259040371 * r + 0.7827717662 * i - 0.808675766 * l;
3365
+ return [
3366
+ o,
3367
+ Math.hypot(d, m),
3368
+ (Math.atan2(m, d) * 180 / Math.PI + 360) % 360
3369
+ ];
3370
+ }
3371
+ function Qe([e, t, n]) {
3372
+ const a = n * Math.PI / 180, r = t * Math.cos(a), i = t * Math.sin(a), l = (e + 0.3963377774 * r + 0.2158037573 * i) ** 3, o = (e - 0.1055613458 * r - 0.0638541728 * i) ** 3, d = (e - 0.0894841775 * r - 1.291485548 * i) ** 3;
3373
+ return [
3374
+ 255 * Je(
3375
+ 4.0767416621 * l - 3.3077115913 * o + 0.2309699292 * d
3376
+ ),
3377
+ 255 * Je(
3378
+ -1.2684380046 * l + 2.6097574011 * o - 0.3413193965 * d
3379
+ ),
3380
+ 255 * Je(
3381
+ -0.0041960863 * l - 0.7034186147 * o + 1.707614701 * d
3382
+ )
3383
+ ];
3384
+ }
3385
+ function os(e) {
3386
+ return e.every(
3387
+ (t) => t >= -is && t <= 255 + is
3388
+ );
3389
+ }
3390
+ function Ji(e, t) {
3391
+ if (e == null) return;
3392
+ const n = qi(e);
3393
+ if (!n) return;
3394
+ const [, a, r] = Zi(n), i = Hi[t];
3395
+ let l = 0;
3396
+ if (os(Qe([i, a, r])))
3397
+ l = a;
3398
+ else {
3399
+ let d = 0, m = a;
3400
+ for (let f = 0; f < Xi; f++) {
3401
+ const u = (d + m) / 2;
3402
+ os(Qe([i, u, r])) ? (l = u, d = u) : m = u;
3403
+ }
3404
+ }
3405
+ const o = Ki(Qe([i, l, r]));
3406
+ return lt(o, Gi[t]) >= Oi ? o : void 0;
3407
+ }
3408
+ function Mt({
3326
3409
  variant: e,
3327
3410
  accentColor: t,
3328
3411
  status: n = "ready",
@@ -3331,23 +3414,23 @@ function Et({
3331
3414
  mimeType: i,
3332
3415
  sourceUrl: l
3333
3416
  }) {
3334
- const [o, d] = F.useState(!1);
3335
- F.useEffect(() => {
3417
+ const [o, d] = B.useState(!1);
3418
+ B.useEffect(() => {
3336
3419
  d(!1);
3337
3420
  }, [r]);
3338
- const m = F.useCallback(() => {
3421
+ const m = B.useCallback(() => {
3339
3422
  d(!0);
3340
- }, []), u = a === "featured" && !!r && !Le(i, l) && !o && n === "ready" ? Pi(t) : void 0;
3423
+ }, []), f = a === "featured" && !!r && !o, u = Me(i, l), g = f && n === "ready" ? Ji(t, e) : void 0, c = g ?? (u ? Pi : zi[e]);
3341
3424
  return {
3342
3425
  thumbnailUrl: o ? void 0 : r,
3343
- accentStyle: u ? { backgroundColor: u } : void 0,
3344
- chinTextColor: u ? Di(u) : void 0,
3345
- tailColor: u ?? Oi[e],
3426
+ accentStyle: g ? { backgroundColor: g } : void 0,
3427
+ chinTextColor: ji(c),
3428
+ tailColor: c,
3346
3429
  isLoading: n === "loading",
3347
3430
  onImageError: m
3348
3431
  };
3349
3432
  }
3350
- const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Bi = "relative before:absolute before:-inset-[10px] before:content-['']", Fi = ({
3433
+ const Qi = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", eo = "relative before:absolute before:-inset-[10px] before:content-['']", to = ({
3351
3434
  title: e,
3352
3435
  placeholderTitle: t,
3353
3436
  description: n,
@@ -3364,7 +3447,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3364
3447
  onEditClick: c,
3365
3448
  dismissLabel: x = "Dismiss attachment"
3366
3449
  }) => {
3367
- const _ = o === "classic", b = Le(r, l), p = Et({
3450
+ const _ = o === "classic", b = Me(r, l), p = Mt({
3368
3451
  variant: "dark",
3369
3452
  accentColor: f,
3370
3453
  status: u,
@@ -3379,10 +3462,10 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3379
3462
  onClick: g,
3380
3463
  "aria-label": x,
3381
3464
  className: y(
3382
- zi,
3383
- !b && Bi
3465
+ Qi,
3466
+ !b && eo
3384
3467
  ),
3385
- children: /* @__PURE__ */ s(ct, { className: "size-3", weight: "bold" })
3468
+ children: /* @__PURE__ */ s(ht, { className: "size-3", weight: "bold" })
3386
3469
  }
3387
3470
  ) : void 0, w = c ? /* @__PURE__ */ s(
3388
3471
  "button",
@@ -3391,12 +3474,12 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3391
3474
  onClick: c,
3392
3475
  "aria-label": "Edit attachment",
3393
3476
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3394
- children: /* @__PURE__ */ s(ca, { className: "size-5", weight: "regular" })
3477
+ children: /* @__PURE__ */ s(fa, { className: "size-5", weight: "regular" })
3395
3478
  }
3396
3479
  ) : void 0;
3397
- return b && !p.isLoading ? /* @__PURE__ */ s(Fe, { variant: "dark", bgClassName: St, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3480
+ return b && !p.isLoading ? /* @__PURE__ */ s(Fe, { variant: "dark", bgClassName: At, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3398
3481
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3399
- $e,
3482
+ Be,
3400
3483
  {
3401
3484
  variant: "dark",
3402
3485
  sourceUrl: l,
@@ -3415,7 +3498,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3415
3498
  topRight: _ ? v : void 0,
3416
3499
  children: [
3417
3500
  !_ && /* @__PURE__ */ s(
3418
- $e,
3501
+ Be,
3419
3502
  {
3420
3503
  variant: "dark",
3421
3504
  thumbnailUrl: p.thumbnailUrl,
@@ -3428,8 +3511,9 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3428
3511
  }
3429
3512
  ),
3430
3513
  /* @__PURE__ */ s(
3431
- Ct,
3514
+ It,
3432
3515
  {
3516
+ chinTextColor: p.chinTextColor,
3433
3517
  variant: "dark",
3434
3518
  title: e,
3435
3519
  placeholderTitle: t,
@@ -3438,14 +3522,13 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3438
3522
  appIcon: d,
3439
3523
  cta: m,
3440
3524
  trailingAction: w,
3441
- chinTextColor: p.chinTextColor,
3442
3525
  isLoading: p.isLoading
3443
3526
  }
3444
3527
  )
3445
3528
  ]
3446
3529
  }
3447
3530
  );
3448
- }, js = ({
3531
+ }, Xs = ({
3449
3532
  color: e,
3450
3533
  side: t,
3451
3534
  visible: n,
@@ -3469,7 +3552,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3469
3552
  }
3470
3553
  )
3471
3554
  ] })
3472
- ) : /* @__PURE__ */ s(J, { children: a }), $i = ({
3555
+ ) : /* @__PURE__ */ s(J, { children: a }), so = ({
3473
3556
  title: e,
3474
3557
  description: t,
3475
3558
  url: n,
@@ -3484,13 +3567,13 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3484
3567
  onClick: u,
3485
3568
  groupPosition: g = "single"
3486
3569
  }) => {
3487
- const c = kt(a, i), x = yt(n), _ = d == null && x != null && !c ? x : void 0, b = d == null && !c ? u : void 0, p = f !== "loading" && Le(a, i) ? St : void 0, v = d && u ? {
3570
+ const c = Tt(a, i), x = Et(n), _ = d == null && x != null && !c ? x : void 0, b = d == null && !c ? u : void 0, p = f !== "loading" && Me(a, i) ? At : void 0, v = d && u ? {
3488
3571
  ...d,
3489
3572
  onClick: () => {
3490
3573
  var C;
3491
3574
  u(), (C = d.onClick) == null || C.call(d);
3492
3575
  }
3493
- } : d, w = Et({
3576
+ } : d, w = Mt({
3494
3577
  variant: "light",
3495
3578
  accentColor: m,
3496
3579
  status: f,
@@ -3500,7 +3583,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3500
3583
  sourceUrl: i
3501
3584
  });
3502
3585
  return /* @__PURE__ */ s(
3503
- js,
3586
+ Xs,
3504
3587
  {
3505
3588
  color: w.tailColor,
3506
3589
  side: "receiver",
@@ -3519,7 +3602,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3519
3602
  "data-testid": "link-attachment",
3520
3603
  children: [
3521
3604
  l === "featured" && /* @__PURE__ */ s(
3522
- $e,
3605
+ Be,
3523
3606
  {
3524
3607
  variant: "light",
3525
3608
  thumbnailUrl: w.thumbnailUrl,
@@ -3531,15 +3614,15 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3531
3614
  }
3532
3615
  ),
3533
3616
  /* @__PURE__ */ s(
3534
- Ct,
3617
+ It,
3535
3618
  {
3619
+ chinTextColor: w.chinTextColor,
3536
3620
  variant: "light",
3537
3621
  title: e,
3538
3622
  description: t,
3539
3623
  url: n,
3540
3624
  appIcon: o,
3541
3625
  cta: v,
3542
- chinTextColor: w.chinTextColor,
3543
3626
  isLoading: w.isLoading
3544
3627
  }
3545
3628
  )
@@ -3548,7 +3631,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3548
3631
  )
3549
3632
  }
3550
3633
  );
3551
- }, Ui = ({
3634
+ }, no = ({
3552
3635
  title: e,
3553
3636
  placeholderTitle: t,
3554
3637
  description: n,
@@ -3564,7 +3647,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3564
3647
  onClick: g,
3565
3648
  groupPosition: c = "single"
3566
3649
  }) => {
3567
- const x = kt(r, l), _ = yt(a), b = m == null && _ != null && !x ? _ : void 0, p = m == null && !x && b != null ? g : void 0, v = u !== "loading" && Le(r, l), w = Et({
3650
+ const x = Tt(r, l), _ = Et(a), b = m == null && _ != null && !x ? _ : void 0, p = m == null && !x && b != null ? g : void 0, v = u !== "loading" && Me(r, l), w = Mt({
3568
3651
  variant: "dark",
3569
3652
  accentColor: f,
3570
3653
  status: u,
@@ -3574,7 +3657,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3574
3657
  sourceUrl: l
3575
3658
  });
3576
3659
  return /* @__PURE__ */ s(
3577
- js,
3660
+ Xs,
3578
3661
  {
3579
3662
  color: w.tailColor,
3580
3663
  side: "sender",
@@ -3588,10 +3671,10 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3588
3671
  fixedHeight: o === "featured" && !v,
3589
3672
  accentStyle: w.accentStyle,
3590
3673
  busy: w.isLoading,
3591
- bgClassName: v ? St : void 0,
3674
+ bgClassName: v ? At : void 0,
3592
3675
  children: [
3593
3676
  o === "featured" && /* @__PURE__ */ s(
3594
- $e,
3677
+ Be,
3595
3678
  {
3596
3679
  variant: "dark",
3597
3680
  thumbnailUrl: w.thumbnailUrl,
@@ -3603,8 +3686,9 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3603
3686
  }
3604
3687
  ),
3605
3688
  /* @__PURE__ */ s(
3606
- Ct,
3689
+ It,
3607
3690
  {
3691
+ chinTextColor: w.chinTextColor,
3608
3692
  variant: "dark",
3609
3693
  title: e,
3610
3694
  placeholderTitle: t,
@@ -3612,7 +3696,6 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3612
3696
  url: a,
3613
3697
  appIcon: d,
3614
3698
  cta: m,
3615
- chinTextColor: w.chinTextColor,
3616
3699
  isLoading: w.isLoading
3617
3700
  }
3618
3701
  )
@@ -3621,22 +3704,22 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3621
3704
  )
3622
3705
  }
3623
3706
  );
3624
- }, ot = {
3625
- Composer: Fi,
3626
- Sent: Ui,
3627
- Received: $i
3707
+ }, ut = {
3708
+ Composer: to,
3709
+ Sent: no,
3710
+ Received: so
3628
3711
  };
3629
3712
  function D(e) {
3630
3713
  const t = e == null ? void 0 : e.trim();
3631
3714
  return t || void 0;
3632
3715
  }
3633
- function ns(e) {
3716
+ function ls(e) {
3634
3717
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3635
3718
  }
3636
- function Vi(e, t) {
3719
+ function ao(e, t) {
3637
3720
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3638
3721
  return !1;
3639
- const n = ns(e), a = ns(t);
3722
+ const n = ls(e), a = ls(t);
3640
3723
  if (n === a)
3641
3724
  return !0;
3642
3725
  if (!n.includes(a))
@@ -3644,7 +3727,7 @@ function Vi(e, t) {
3644
3727
  const r = n.split(a).join("");
3645
3728
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3646
3729
  }
3647
- function as(e) {
3730
+ function cs(e) {
3648
3731
  const t = D(e.og_scrape_url) ?? D(e.title_link), n = D(e.image_url) ?? D(e.thumb_url), a = D(e.asset_url), r = D(e.mime_type);
3649
3732
  return {
3650
3733
  title: D(e.title),
@@ -3654,7 +3737,7 @@ function as(e) {
3654
3737
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3655
3738
  // native video/audio player in the hero instead of a static thumbnail.
3656
3739
  sourceUrl: a,
3657
- layout: n || kt(r, a) ? "featured" : "classic",
3740
+ layout: n || Tt(r, a) ? "featured" : "classic",
3658
3741
  mimeType: r,
3659
3742
  // Dominant colour of the image, resolved by the sender at stage time and
3660
3743
  // persisted on the attachment (`stream-custom-data.ts`), so every viewer
@@ -3666,15 +3749,15 @@ function as(e) {
3666
3749
  status: "ready"
3667
3750
  };
3668
3751
  }
3669
- function ji(e) {
3752
+ function ro(e) {
3670
3753
  var t;
3671
- return Hs(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;
3754
+ return qs(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;
3672
3755
  }
3673
- function Hs(e) {
3756
+ function qs(e) {
3674
3757
  const t = D(e.og_scrape_url);
3675
3758
  return e.type === "link" || !!t && !e.asset_url;
3676
3759
  }
3677
- function Gs(e) {
3760
+ function Ks(e) {
3678
3761
  if (!(e != null && e.length)) return [];
3679
3762
  const t = [], n = (r, i) => {
3680
3763
  const l = t[t.length - 1];
@@ -3692,25 +3775,25 @@ function Gs(e) {
3692
3775
  t.push({ type: "link", attachments: [r] });
3693
3776
  };
3694
3777
  for (const r of e) {
3695
- if (Hs(r)) {
3778
+ if (qs(r)) {
3696
3779
  a(r);
3697
3780
  continue;
3698
3781
  }
3699
- const i = ji(r);
3782
+ const i = ro(r);
3700
3783
  i && n(i, r);
3701
3784
  }
3702
3785
  return t;
3703
3786
  }
3704
- function Hi(e) {
3787
+ function io(e) {
3705
3788
  return e.filter((t) => t.type === "media").length;
3706
3789
  }
3707
- function Gi(e, t, n) {
3790
+ function oo(e, t, n) {
3708
3791
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3709
3792
  }
3710
- function rs(e) {
3793
+ function ds(e) {
3711
3794
  return D(e.image_url) ?? D(e.asset_url) ?? "";
3712
3795
  }
3713
- function Yi(e) {
3796
+ function lo(e) {
3714
3797
  switch (e) {
3715
3798
  case "image":
3716
3799
  return Ne.Image;
@@ -3724,13 +3807,13 @@ function Yi(e) {
3724
3807
  return Ne.File;
3725
3808
  }
3726
3809
  }
3727
- function Wi(e, t) {
3810
+ function co(e, t) {
3728
3811
  if (t.length > 1)
3729
3812
  switch (e) {
3730
3813
  case "image":
3731
3814
  return {
3732
3815
  items: t.map((a) => ({
3733
- src: rs(a),
3816
+ src: ds(a),
3734
3817
  alt: D(a.title)
3735
3818
  }))
3736
3819
  };
@@ -3775,7 +3858,7 @@ function Wi(e, t) {
3775
3858
  switch (e) {
3776
3859
  case "image":
3777
3860
  return {
3778
- src: rs(n),
3861
+ src: ds(n),
3779
3862
  alt: D(n.title)
3780
3863
  };
3781
3864
  case "video":
@@ -3807,49 +3890,49 @@ function Wi(e, t) {
3807
3890
  };
3808
3891
  }
3809
3892
  }
3810
- function qi({
3893
+ function uo({
3811
3894
  groupPosition: e,
3812
3895
  isMyMessage: t,
3813
3896
  segment: n
3814
3897
  }) {
3815
- const a = Yi(n.kind), r = {
3816
- ...Wi(n.kind, n.attachments),
3898
+ const a = lo(n.kind), r = {
3899
+ ...co(n.kind, n.attachments),
3817
3900
  groupPosition: e
3818
3901
  };
3819
3902
  return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
3820
3903
  }
3821
- const Xi = ({
3904
+ const mo = ({
3822
3905
  groupPosition: e,
3823
3906
  isMyMessage: t,
3824
3907
  message: n,
3825
3908
  renderText: a
3826
3909
  }) => {
3827
3910
  var _;
3828
- const r = Gs(n.attachments);
3911
+ const r = Ks(n.attachments);
3829
3912
  if (r.length === 0) return null;
3830
- const i = Hi(r), l = (_ = n.text) == null ? void 0 : _.trim(), o = r.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? as(o.attachments[0] ?? {}).url : void 0, m = l && Vi(l, d) ? void 0 : l;
3913
+ const i = io(r), l = (_ = n.text) == null ? void 0 : _.trim(), o = r.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? cs(o.attachments[0] ?? {}).url : void 0, m = l && ao(l, d) ? void 0 : l;
3831
3914
  let f = 0;
3832
3915
  const u = [], g = m ? "middle" : e, c = (b, p, v) => {
3833
- const w = t ? ot.Sent : ot.Received;
3916
+ const w = t ? ut.Sent : ut.Received;
3834
3917
  u.push(
3835
3918
  /* @__PURE__ */ s(
3836
3919
  w,
3837
3920
  {
3838
- ...as(b),
3921
+ ...cs(b),
3839
3922
  groupPosition: v ? g : "middle"
3840
3923
  },
3841
3924
  p
3842
3925
  )
3843
3926
  );
3844
3927
  }, x = (b, p) => {
3845
- const v = Gi(
3928
+ const v = oo(
3846
3929
  f,
3847
3930
  i,
3848
3931
  e
3849
3932
  );
3850
3933
  f += 1, u.push(
3851
3934
  /* @__PURE__ */ s(
3852
- qi,
3935
+ uo,
3853
3936
  {
3854
3937
  groupPosition: v,
3855
3938
  isMyMessage: t,
@@ -3886,17 +3969,17 @@ const Xi = ({
3886
3969
  },
3887
3970
  children: [
3888
3971
  u,
3889
- !m && /* @__PURE__ */ s(tt, {})
3972
+ !m && /* @__PURE__ */ s(nt, {})
3890
3973
  ]
3891
3974
  }
3892
3975
  ),
3893
3976
  m ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
3894
- /* @__PURE__ */ s(ze, { message: n, renderText: a }),
3895
- /* @__PURE__ */ s(tt, {})
3977
+ /* @__PURE__ */ s(Oe, { message: n, renderText: a }),
3978
+ /* @__PURE__ */ s(nt, {})
3896
3979
  ] }) : null
3897
3980
  ] });
3898
- }, Ki = (e) => {
3899
- var Dt, Pt, Ot, zt, Bt, Ft, $t, Ut, Vt, jt;
3981
+ }, ho = (e) => {
3982
+ var Ft, Bt, $t, Ut, Vt, jt, Ht, Gt, Yt, Wt;
3900
3983
  const {
3901
3984
  additionalMessageInputProps: t,
3902
3985
  chatbotVotingEnabled: n,
@@ -3915,79 +3998,79 @@ const Xi = ({
3915
3998
  threadList: _,
3916
3999
  viewerLanguage: b,
3917
4000
  onBroadcastClick: p
3918
- } = e, { client: v } = Se("CustomMessage"), { channel: w } = he("CustomMessage"), { isUnlocking: C, onUnlockClick: T, onFetchSource: O, onDownloadClick: R } = ai("LockedAttachment"), [z, $] = B(!1), L = cn(c.id), { selected: S, voteUp: P, voteDown: k } = Ra(c), {
3919
- Attachment: E = dn,
3920
- EditMessageModal: I = un,
4001
+ } = e, { client: v } = Se("CustomMessage"), { channel: w } = he("CustomMessage"), { isUnlocking: C, onUnlockClick: T, onFetchSource: O, onDownloadClick: R } = ci("LockedAttachment"), [z, $] = F(!1), M = fn(c.id), { selected: S, voteUp: P, voteDown: k } = Fa(c), {
4002
+ Attachment: E = gn,
4003
+ EditMessageModal: I = pn,
3921
4004
  MessageActions: A,
3922
- MessageBlocked: U = mn,
3923
- MessageBouncePrompt: j = hn,
3924
- MessageDeleted: q = fn,
3925
- MessageIsThreadReplyInChannelButtonIndicator: Q = gn,
3926
- MessageRepliesCountButton: K = pn,
3927
- ReminderNotification: N = bn,
3928
- StreamedMessageText: M = vn,
4005
+ MessageBlocked: U = bn,
4006
+ MessageBouncePrompt: j = vn,
4007
+ MessageDeleted: X = xn,
4008
+ MessageIsThreadReplyInChannelButtonIndicator: Q = _n,
4009
+ MessageRepliesCountButton: K = wn,
4010
+ ReminderNotification: N = Nn,
4011
+ StreamedMessageText: L = yn,
3929
4012
  PinIndicator: G
3930
- } = ds("CustomMessage"), X = xn(c), se = _n(c), Z = ne(
4013
+ } = gs("CustomMessage"), q = Cn(c), se = kn(c), Z = ne(
3931
4014
  () => u == null ? void 0 : u(c),
3932
4015
  [u, c]
3933
4016
  ), V = ne(() => {
3934
4017
  const ue = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...ue] : ue;
3935
- if (!Be(c)) return be;
3936
- const Ht = be.filter((Gt) => !("type" in Gt) || !Ss(Gt));
3937
- return Ht.length === be.length ? be : Ht;
4018
+ if (!ze(c)) return be;
4019
+ const Xt = be.filter((qt) => !("type" in qt) || !Ms(qt));
4020
+ return Xt.length === be.length ? be : Xt;
3938
4021
  }, [c]), ee = ne(
3939
- () => Gs(V),
4022
+ () => Ks(V),
3940
4023
  [V]
3941
4024
  ), re = ne(() => {
3942
- const ue = ws({ message: c, viewerLanguage: b });
4025
+ const ue = Ss({ message: c, viewerLanguage: b });
3943
4026
  return ue === c.text ? c : { ...c, text: ue };
3944
- }, [c, b]), Me = ee.length > 0, Re = ee.reduce(
4027
+ }, [c, b]), Le = ee.length > 0, Re = ee.reduce(
3945
4028
  (ue, be) => ue + be.attachments.length,
3946
4029
  0
3947
- ) === ((V == null ? void 0 : V.length) ?? 0), ie = ir({
4030
+ ) === ((V == null ? void 0 : V.length) ?? 0), ie = ur({
3948
4031
  endOfGroup: r,
3949
4032
  firstOfGroup: i,
3950
4033
  groupedByUser: l
3951
4034
  });
3952
- if (wn(c))
4035
+ if (Sn(c))
3953
4036
  return null;
3954
4037
  if (c.deleted_at || c.type === "deleted")
3955
- return /* @__PURE__ */ s(q, { message: c });
3956
- if (Nn(c))
4038
+ return /* @__PURE__ */ s(X, { message: c });
4039
+ if (En(c))
3957
4040
  return /* @__PURE__ */ s(U, {});
3958
- const de = !_ && !!c.reply_count, oe = !_ && c.show_in_channel && c.parent_id, It = c.status === "failed" && ((Dt = c.error) == null ? void 0 : Dt.status) !== 403, Tt = yn(c);
4041
+ const de = !_ && !!c.reply_count, oe = !_ && c.show_in_channel && c.parent_id, Lt = c.status === "failed" && ((Ft = c.error) == null ? void 0 : Ft.status) !== 403, Rt = In(c);
3959
4042
  let ge;
3960
- It ? ge = () => m(c) : Tt && (ge = () => $(!0));
3961
- const te = g(), Zs = y(
4043
+ Lt ? ge = () => m(c) : Rt && (ge = () => $(!0));
4044
+ const te = g(), sn = y(
3962
4045
  "str-chat__message str-chat__message-simple",
3963
4046
  `str-chat__message--${c.type}`,
3964
4047
  `str-chat__message--${c.status}`,
3965
4048
  te ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3966
4049
  c.text ? "str-chat__message--has-text" : "has-no-text",
3967
4050
  {
3968
- "str-chat__message--has-attachment": X,
4051
+ "str-chat__message--has-attachment": q,
3969
4052
  "str-chat__message--highlighted": f,
3970
4053
  "str-chat__message--pinned pinned-message": c.pinned,
3971
4054
  "str-chat__message--with-reactions": se,
3972
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Pt = c == null ? void 0 : c.error) == null ? void 0 : Pt.status) !== 403,
4055
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Bt = c == null ? void 0 : c.error) == null ? void 0 : Bt.status) !== 403,
3973
4056
  "str-chat__message-with-thread-link": de || oe,
3974
4057
  "str-chat__virtual-message__wrapper--end": r,
3975
4058
  "str-chat__virtual-message__wrapper--first": i,
3976
4059
  "str-chat__virtual-message__wrapper--group": l
3977
4060
  }
3978
- ), je = c.poll_id && v.polls.fromState(c.poll_id), At = mi(c), pe = Be(c), Js = wt(c), He = !!(V != null && V.length && !c.quoted_message), Lt = pe && te && He, Qs = Me && Re && !c.quoted_message && !je && !Z && !pe, Mt = {
4061
+ ), Ve = c.poll_id && v.polls.fromState(c.poll_id), Dt = bi(c), pe = ze(c), nn = kt(c), je = !!(V != null && V.length && !c.quoted_message), Pt = pe && te && je, an = Le && Re && !c.quoted_message && !Ve && !Z && !pe, Ot = {
3979
4062
  contentType: "text",
3980
- amountText: (Ot = c.metadata) == null ? void 0 : Ot.amount_text,
3981
- paymentStatus: (zt = c.metadata) == null ? void 0 : zt.payment_status,
3982
- renderedText: c.text && /* @__PURE__ */ s(ze, { message: re, renderText: x })
3983
- }, Rt = {
4063
+ amountText: ($t = c.metadata) == null ? void 0 : $t.amount_text,
4064
+ paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
4065
+ renderedText: c.text && /* @__PURE__ */ s(Oe, { message: re, renderText: x })
4066
+ }, zt = {
3984
4067
  contentType: "media",
3985
- title: (Bt = c.metadata) == null ? void 0 : Bt.attachment_title,
3986
- mimeType: (Ft = c.metadata) == null ? void 0 : Ft.attachment_mime_type,
3987
- thumbnailUrl: ($t = c.metadata) == null ? void 0 : $t.attachment_thumbnail,
3988
- amountText: (Ut = c.metadata) == null ? void 0 : Ut.amount_text,
3989
- detail: (Vt = c.metadata) == null ? void 0 : Vt.attachment_detail,
3990
- paymentStatus: (jt = c.metadata) == null ? void 0 : jt.payment_status,
4068
+ title: (Vt = c.metadata) == null ? void 0 : Vt.attachment_title,
4069
+ mimeType: (jt = c.metadata) == null ? void 0 : jt.attachment_mime_type,
4070
+ thumbnailUrl: (Ht = c.metadata) == null ? void 0 : Ht.attachment_thumbnail,
4071
+ amountText: (Gt = c.metadata) == null ? void 0 : Gt.amount_text,
4072
+ detail: (Yt = c.metadata) == null ? void 0 : Yt.attachment_detail,
4073
+ paymentStatus: (Wt = c.metadata) == null ? void 0 : Wt.payment_status,
3991
4074
  onFetchSource: O ? () => O(c, w) : void 0
3992
4075
  };
3993
4076
  return /* @__PURE__ */ h(J, { children: [
@@ -3998,7 +4081,7 @@ const Xi = ({
3998
4081
  }
3999
4082
  ),
4000
4083
  z && /* @__PURE__ */ s(
4001
- Cn,
4084
+ Tn,
4002
4085
  {
4003
4086
  MessageBouncePrompt: j,
4004
4087
  onClose: () => $(!1),
@@ -4008,12 +4091,12 @@ const Xi = ({
4008
4091
  /* @__PURE__ */ h(
4009
4092
  "div",
4010
4093
  {
4011
- className: Zs,
4094
+ className: sn,
4012
4095
  "data-message-id": c.id,
4013
4096
  "data-dd-privacy": "mask",
4014
4097
  children: [
4015
4098
  G && /* @__PURE__ */ s(G, {}),
4016
- !!L && /* @__PURE__ */ s(N, { reminder: L }),
4099
+ !!M && /* @__PURE__ */ s(N, { reminder: M }),
4017
4100
  c.user && /* @__PURE__ */ s(
4018
4101
  _e,
4019
4102
  {
@@ -4030,7 +4113,7 @@ const Xi = ({
4030
4113
  "div",
4031
4114
  {
4032
4115
  className: y("str-chat__message-inner", {
4033
- "str-chat__simple-message--error-failed": It || Tt
4116
+ "str-chat__simple-message--error-failed": Lt || Rt
4034
4117
  }),
4035
4118
  "data-testid": "message-inner",
4036
4119
  onClick: ge,
@@ -4043,38 +4126,38 @@ const Xi = ({
4043
4126
  marginInlineEnd: 0,
4044
4127
  marginInlineStart: 0
4045
4128
  },
4046
- children: At ? /* @__PURE__ */ s(Xe, { message: c, standalone: !0 }) : di(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
4129
+ children: Dt ? /* @__PURE__ */ s(Xe, { message: c, standalone: !0 }) : gi(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
4047
4130
  te && A && /* @__PURE__ */ s(A, {}),
4048
4131
  te ? /* @__PURE__ */ s(
4049
4132
  Pe,
4050
4133
  {
4051
- ...Mt,
4134
+ ...Ot,
4052
4135
  isMine: !0
4053
4136
  }
4054
4137
  ) : /* @__PURE__ */ s(
4055
4138
  Pe,
4056
4139
  {
4057
- ...Mt,
4140
+ ...Ot,
4058
4141
  isMine: !1,
4059
4142
  isUnlocking: C(c.id),
4060
4143
  onUnlockClick: () => T == null ? void 0 : T(c, w)
4061
4144
  }
4062
4145
  ),
4063
4146
  !te && A && /* @__PURE__ */ s(A, {})
4064
- ] }) }) : ui(c) ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
4147
+ ] }) }) : pi(c) ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
4065
4148
  /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
4066
4149
  te && A && /* @__PURE__ */ s(A, {}),
4067
4150
  te ? /* @__PURE__ */ s(
4068
4151
  Pe,
4069
4152
  {
4070
- ...Rt,
4153
+ ...zt,
4071
4154
  isMine: !0,
4072
4155
  onPreviewClick: () => T ? T(c, w) : void 0
4073
4156
  }
4074
4157
  ) : /* @__PURE__ */ s(
4075
4158
  Pe,
4076
4159
  {
4077
- ...Rt,
4160
+ ...zt,
4078
4161
  isMine: !1,
4079
4162
  isUnlocking: C(c.id),
4080
4163
  onUnlockClick: () => T ? T(c, w) : void 0,
@@ -4084,14 +4167,14 @@ const Xi = ({
4084
4167
  !te && A && /* @__PURE__ */ s(A, {})
4085
4168
  ] }),
4086
4169
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
4087
- ze,
4170
+ Oe,
4088
4171
  {
4089
4172
  message: re,
4090
4173
  renderText: x
4091
4174
  }
4092
4175
  ) })
4093
- ] }) : Qs ? /* @__PURE__ */ s(
4094
- Xi,
4176
+ ] }) : an ? /* @__PURE__ */ s(
4177
+ mo,
4095
4178
  {
4096
4179
  groupPosition: ie,
4097
4180
  isMyMessage: te,
@@ -4106,15 +4189,15 @@ const Xi = ({
4106
4189
  renderText: x
4107
4190
  }
4108
4191
  ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
4109
- pe && !Lt && /* @__PURE__ */ s(
4192
+ pe && !Pt && /* @__PURE__ */ s(
4110
4193
  Xe,
4111
4194
  {
4112
4195
  message: c,
4113
- hasAttachment: He,
4196
+ hasAttachment: je,
4114
4197
  isMyMessage: te
4115
4198
  }
4116
4199
  ),
4117
- je && /* @__PURE__ */ s(kn, { poll: je }),
4200
+ Ve && /* @__PURE__ */ s(An, { poll: Ve }),
4118
4201
  V != null && V.length && !c.quoted_message ? /* @__PURE__ */ s(
4119
4202
  E,
4120
4203
  {
@@ -4123,33 +4206,33 @@ const Xi = ({
4123
4206
  }
4124
4207
  ) : null,
4125
4208
  Z ? /* @__PURE__ */ s(
4126
- M,
4209
+ L,
4127
4210
  {
4128
4211
  message: re,
4129
4212
  renderText: x
4130
4213
  }
4131
4214
  ) : /* @__PURE__ */ s(
4132
- ze,
4215
+ Oe,
4133
4216
  {
4134
4217
  message: re,
4135
4218
  renderText: x
4136
4219
  }
4137
4220
  ),
4138
- /* @__PURE__ */ s(tt, {})
4221
+ /* @__PURE__ */ s(nt, {})
4139
4222
  ] }) })
4140
4223
  }
4141
4224
  ),
4142
- !Js && !At && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
4143
- (!pe || Lt) && /* @__PURE__ */ s(
4225
+ !nn && !Dt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
4226
+ (!pe || Pt) && /* @__PURE__ */ s(
4144
4227
  Xe,
4145
4228
  {
4146
4229
  message: c,
4147
- hasAttachment: He,
4230
+ hasAttachment: je,
4148
4231
  isMyMessage: te
4149
4232
  }
4150
4233
  ),
4151
4234
  n && pe && /* @__PURE__ */ s(
4152
- hi,
4235
+ vi,
4153
4236
  {
4154
4237
  selected: S,
4155
4238
  onVoteUp: P,
@@ -4157,7 +4240,7 @@ const Xi = ({
4157
4240
  }
4158
4241
  )
4159
4242
  ] }),
4160
- /* @__PURE__ */ s(bi, { onBroadcastClick: p }),
4243
+ /* @__PURE__ */ s(Ni, { onBroadcastClick: p }),
4161
4244
  de && /* @__PURE__ */ s(
4162
4245
  K,
4163
4246
  {
@@ -4171,57 +4254,57 @@ const Xi = ({
4171
4254
  c.id
4172
4255
  )
4173
4256
  ] });
4174
- }, Zi = F.memo(
4175
- Ki,
4176
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick ? !1 : ln(e, t)
4177
- ), Ji = (e) => {
4257
+ }, fo = B.memo(
4258
+ ho,
4259
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick ? !1 : hn(e, t)
4260
+ ), go = (e) => {
4178
4261
  const t = fe("CustomMessage");
4179
- return /* @__PURE__ */ s(Zi, { ...t, ...e });
4180
- }, Qi = () => {
4262
+ return /* @__PURE__ */ s(fo, { ...t, ...e });
4263
+ }, po = () => {
4181
4264
  var n;
4182
4265
  const { handleDelete: e, message: t } = fe("CustomMessageActions");
4183
4266
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
4184
- gs,
4267
+ _s,
4185
4268
  {
4186
4269
  onClick: e,
4187
4270
  "aria-label": "Delete",
4188
4271
  title: "Delete",
4189
4272
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4190
- children: /* @__PURE__ */ s(da, { size: 16, weight: "light", "aria-hidden": !0 })
4273
+ children: /* @__PURE__ */ s(ga, { size: 16, weight: "light", "aria-hidden": !0 })
4191
4274
  }
4192
4275
  );
4193
- }, eo = () => {
4276
+ }, bo = () => {
4194
4277
  const { handleFlag: e } = fe("CustomMessageActions");
4195
4278
  return /* @__PURE__ */ s(
4196
- gs,
4279
+ _s,
4197
4280
  {
4198
4281
  onClick: e,
4199
4282
  "aria-label": "Report",
4200
4283
  title: "Report",
4201
4284
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4202
- children: /* @__PURE__ */ s(us, { size: 16, weight: "light", "aria-hidden": !0 })
4285
+ children: /* @__PURE__ */ s(ps, { size: 16, weight: "light", "aria-hidden": !0 })
4203
4286
  }
4204
4287
  );
4205
- }, to = () => {
4288
+ }, vo = () => {
4206
4289
  var t;
4207
4290
  const { message: e } = fe("CustomMessageActions");
4208
4291
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== le.ATTACHMENT ? null : /* @__PURE__ */ s(
4209
- va,
4292
+ ya,
4210
4293
  {
4211
4294
  messageActionSet: [
4212
- { Component: Qi, placement: "quick", type: "delete" },
4213
- { Component: eo, placement: "quick", type: "flag" }
4295
+ { Component: po, placement: "quick", type: "delete" },
4296
+ { Component: bo, placement: "quick", type: "flag" }
4214
4297
  ]
4215
4298
  }
4216
4299
  );
4217
- }, so = (e) => ({
4300
+ }, xo = (e) => ({
4218
4301
  linkPreviews: Array.from(e.previews.values()).filter(
4219
- (t) => et.previewIsLoaded(t) || et.previewIsLoading(t)
4302
+ (t) => st.previewIsLoaded(t) || st.previewIsLoading(t)
4220
4303
  )
4221
- }), no = () => {
4222
- const { linkPreviewsManager: e } = Sn(), { linkPreviews: t } = En(
4304
+ }), _o = () => {
4305
+ const { linkPreviewsManager: e } = Mn(), { linkPreviews: t } = Ln(
4223
4306
  e.state,
4224
- so
4307
+ xo
4225
4308
  ), n = (r) => {
4226
4309
  e.dismissPreview(r);
4227
4310
  };
@@ -4269,9 +4352,9 @@ const Xi = ({
4269
4352
  // past the fold, reachable by scrolling. That residue belongs to whoever
4270
4353
  // owns the mobile layout contract, not to this component.
4271
4354
  /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 overflow-y-auto overscroll-contain", children: t.map((r) => {
4272
- const i = et.previewIsLoading(r);
4355
+ const i = st.previewIsLoading(r);
4273
4356
  return /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(
4274
- ot.Composer,
4357
+ ut.Composer,
4275
4358
  {
4276
4359
  title: r.title,
4277
4360
  url: r.og_scrape_url,
@@ -4283,7 +4366,7 @@ const Xi = ({
4283
4366
  ) }, r.og_scrape_url);
4284
4367
  }) })
4285
4368
  ) : null;
4286
- }, Ue = F.createContext(!1), ao = 200, Wo = () => ke(Ue), ro = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
4369
+ }, $e = B.createContext(!1), wo = 200, cl = () => ke($e), No = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
4287
4370
  "button",
4288
4371
  {
4289
4372
  ...n,
@@ -4292,13 +4375,13 @@ const Xi = ({
4292
4375
  disabled: t,
4293
4376
  onPointerDown: (a) => a.preventDefault(),
4294
4377
  onClick: e,
4295
- children: /* @__PURE__ */ s(ua, { weight: "bold", className: "size-4" })
4378
+ children: /* @__PURE__ */ s(pa, { weight: "bold", className: "size-4" })
4296
4379
  }
4297
- ), is = () => {
4298
- const e = ke(Ue), { handleSubmit: t } = In(), n = Tn(), a = e || !n, {
4299
- SendButton: r = ro,
4300
- AttachmentPreviewList: i = An
4301
- } = ds("CustomMessageInput");
4380
+ ), us = () => {
4381
+ const e = ke($e), { handleSubmit: t } = Rn(), n = Dn(), a = e || !n, {
4382
+ SendButton: r = No,
4383
+ AttachmentPreviewList: i = Pn
4384
+ } = gs("CustomMessageInput");
4302
4385
  return (
4303
4386
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
4304
4387
  // preview list inside is the scrollable region); the textarea + send row
@@ -4328,13 +4411,13 @@ const Xi = ({
4328
4411
  "data-dd-privacy": "mask",
4329
4412
  children: [
4330
4413
  /* @__PURE__ */ h("div", { className: "messaging-composer-previews empty:hidden flex min-h-0 flex-col gap-2 px-2 pt-2", children: [
4331
- /* @__PURE__ */ s(Ln, {}),
4332
- /* @__PURE__ */ s(no, {}),
4414
+ /* @__PURE__ */ s(On, {}),
4415
+ /* @__PURE__ */ s(_o, {}),
4333
4416
  /* @__PURE__ */ s(i, {})
4334
4417
  ] }),
4335
4418
  /* @__PURE__ */ h("div", { className: "messaging-composer-row flex shrink-0 items-start", children: [
4336
4419
  /* @__PURE__ */ s(
4337
- Mn,
4420
+ zn,
4338
4421
  {
4339
4422
  "aria-disabled": e || void 0,
4340
4423
  containerClassName: "min-w-0 flex-1 leading-[0]",
@@ -4362,7 +4445,7 @@ const Xi = ({
4362
4445
  }
4363
4446
  )
4364
4447
  );
4365
- }, os = ({
4448
+ }, ms = ({
4366
4449
  renderActions: e,
4367
4450
  renderHeader: t,
4368
4451
  renderFooter: n,
@@ -4371,8 +4454,8 @@ const Xi = ({
4371
4454
  composerInput: i
4372
4455
  }) => {
4373
4456
  var f;
4374
- const { channel: l } = he(), o = ((f = l == null ? void 0 : l.data) == null ? void 0 : f.frozen) === !0, d = !!i, m = F.useRef(null);
4375
- return F.useEffect(() => {
4457
+ const { channel: l } = he(), o = ((f = l == null ? void 0 : l.data) == null ? void 0 : f.frozen) === !0, d = !!i, m = B.useRef(null);
4458
+ return B.useEffect(() => {
4376
4459
  if (!d)
4377
4460
  return;
4378
4461
  const u = m.current, g = u == null ? void 0 : u.parentElement;
@@ -4384,7 +4467,7 @@ const Xi = ({
4384
4467
  c = b;
4385
4468
  const v = Array.from(
4386
4469
  g.querySelectorAll(".str-chat__list")
4387
- ).find((C) => C.scrollHeight > C.clientHeight) ?? null, w = v ? v.scrollHeight - v.scrollTop - v.clientHeight < ao : !1;
4470
+ ).find((C) => C.scrollHeight > C.clientHeight) ?? null, w = v ? v.scrollHeight - v.scrollTop - v.clientHeight < wo : !1;
4388
4471
  g.style.setProperty(
4389
4472
  "--messaging-composer-height",
4390
4473
  `${b}px`
@@ -4446,7 +4529,7 @@ const Xi = ({
4446
4529
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4447
4530
  children: [
4448
4531
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4449
- /* @__PURE__ */ s(Ue.Provider, { value: o, children: /* @__PURE__ */ s(Yt, { Input: i ?? is }) })
4532
+ /* @__PURE__ */ s($e.Provider, { value: o, children: /* @__PURE__ */ s(Kt, { Input: i ?? us }) })
4450
4533
  ]
4451
4534
  }
4452
4535
  ),
@@ -4465,67 +4548,67 @@ const Xi = ({
4465
4548
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4466
4549
  children: [
4467
4550
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4468
- /* @__PURE__ */ s(Ue.Provider, { value: o, children: /* @__PURE__ */ s(Yt, { Input: is }) })
4551
+ /* @__PURE__ */ s($e.Provider, { value: o, children: /* @__PURE__ */ s(Kt, { Input: us }) })
4469
4552
  ]
4470
4553
  }
4471
4554
  ),
4472
4555
  n == null ? void 0 : n()
4473
4556
  ] });
4474
- }, io = {
4557
+ }, yo = {
4475
4558
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
4476
4559
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
4477
- }, oo = ["SYSTEM_AGE_SAFETY_BLOCKED"], lo = {
4560
+ }, Co = ["SYSTEM_AGE_SAFETY_BLOCKED"], ko = {
4478
4561
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
4479
- }, Je = "age safety guidelines.", co = "https://linktr.ee/s/about/contact", uo = (e) => oo.includes(
4562
+ }, et = "age safety guidelines.", So = "https://linktr.ee/s/about/contact", Eo = (e) => Co.includes(
4480
4563
  e
4481
- ), mo = (e) => {
4564
+ ), Io = (e) => {
4482
4565
  var t;
4483
- return uo((t = e.metadata) == null ? void 0 : t.custom_type);
4484
- }, ho = (e) => {
4566
+ return Eo((t = e.metadata) == null ? void 0 : t.custom_type);
4567
+ }, To = (e) => {
4485
4568
  var a;
4486
4569
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
4487
- if (Xt(t))
4570
+ if (Qt(t))
4488
4571
  return {
4489
4572
  kind: "dm-agent",
4490
4573
  type: t
4491
4574
  };
4492
- if (pa(t))
4575
+ if (wa(t))
4493
4576
  return {
4494
4577
  kind: "age-safety",
4495
4578
  type: t
4496
4579
  };
4497
4580
  const n = e.dm_agent_system_type;
4498
- if (Xt(n))
4581
+ if (Qt(n))
4499
4582
  return {
4500
4583
  kind: "dm-agent",
4501
4584
  type: n
4502
4585
  };
4503
- }, fo = (e) => {
4504
- const t = e.indexOf(Je);
4586
+ }, Ao = (e) => {
4587
+ const t = e.indexOf(et);
4505
4588
  if (t === -1)
4506
4589
  return e;
4507
- const n = t + Je.length;
4590
+ const n = t + et.length;
4508
4591
  return /* @__PURE__ */ h(J, { children: [
4509
4592
  e.slice(0, t),
4510
4593
  /* @__PURE__ */ s(
4511
4594
  "a",
4512
4595
  {
4513
- href: co,
4596
+ href: So,
4514
4597
  target: "_blank",
4515
4598
  rel: "noopener noreferrer",
4516
4599
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
4517
- children: Je
4600
+ children: et
4518
4601
  }
4519
4602
  ),
4520
4603
  e.slice(n)
4521
4604
  ] });
4522
- }, go = (e) => {
4605
+ }, Mo = (e) => {
4523
4606
  var a, r;
4524
- const t = !mo(e.message), n = ho(
4607
+ const t = !Io(e.message), n = To(
4525
4608
  e.message
4526
4609
  );
4527
4610
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
4528
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || io[n.type];
4611
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || yo[n.type];
4529
4612
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4530
4613
  /* @__PURE__ */ h(
4531
4614
  "div",
@@ -4535,7 +4618,7 @@ const Xi = ({
4535
4618
  "data-dm-agent-system-type": n.type,
4536
4619
  children: [
4537
4620
  /* @__PURE__ */ s(
4538
- ma,
4621
+ ba,
4539
4622
  {
4540
4623
  size: 16,
4541
4624
  weight: "regular",
@@ -4547,11 +4630,11 @@ const Xi = ({
4547
4630
  ]
4548
4631
  }
4549
4632
  ),
4550
- !t && /* @__PURE__ */ s(Ge, { message: e.message })
4633
+ !t && /* @__PURE__ */ s(He, { message: e.message })
4551
4634
  ] });
4552
4635
  }
4553
4636
  if ((n == null ? void 0 : n.kind) === "age-safety") {
4554
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || lo[n.type];
4637
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || ko[n.type];
4555
4638
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4556
4639
  /* @__PURE__ */ h(
4557
4640
  "div",
@@ -4561,7 +4644,7 @@ const Xi = ({
4561
4644
  "data-age-safety-system-type": n.type,
4562
4645
  children: [
4563
4646
  /* @__PURE__ */ s(
4564
- ha,
4647
+ va,
4565
4648
  {
4566
4649
  size: 24,
4567
4650
  weight: "duotone",
@@ -4570,11 +4653,11 @@ const Xi = ({
4570
4653
  "data-testid": "age-safety-system-message-icon"
4571
4654
  }
4572
4655
  ),
4573
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: fo(i) }) })
4656
+ /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ao(i) }) })
4574
4657
  ]
4575
4658
  }
4576
4659
  ),
4577
- !t && /* @__PURE__ */ s(Ge, { message: e.message })
4660
+ !t && /* @__PURE__ */ s(He, { message: e.message })
4578
4661
  ] });
4579
4662
  }
4580
4663
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -4583,9 +4666,9 @@ const Xi = ({
4583
4666
  /* @__PURE__ */ s("p", { children: e.message.text }),
4584
4667
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
4585
4668
  ] }),
4586
- !t && /* @__PURE__ */ s(Ge, { message: e.message })
4669
+ !t && /* @__PURE__ */ s(He, { message: e.message })
4587
4670
  ] });
4588
- }, Ys = lt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4671
+ }, Zs = mt(!1), tt = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4589
4672
  "animateTransform",
4590
4673
  {
4591
4674
  attributeName: "transform",
@@ -4595,17 +4678,17 @@ const Xi = ({
4595
4678
  begin: `${120 * t}ms`,
4596
4679
  repeatCount: "indefinite"
4597
4680
  }
4598
- ) }), po = /* @__PURE__ */ new Set([
4599
- Ye.Thinking,
4600
- Ye.Generating,
4601
- Ye.ExternalSources
4602
- ]), bo = ({ threadList: e }) => {
4681
+ ) }), Lo = /* @__PURE__ */ new Set([
4682
+ Ge.Thinking,
4683
+ Ge.Generating,
4684
+ Ge.ExternalSources
4685
+ ]), Ro = ({ threadList: e }) => {
4603
4686
  var x, _;
4604
- const { channel: t, channelConfig: n, thread: a } = he(), { client: r } = Se(), { typing: i = {} } = Rn(), { aiState: l } = Dn(t), o = ke(Ys);
4605
- if (!e && o && po.has(l)) {
4606
- const b = vo(t, (x = r.user) == null ? void 0 : x.id);
4687
+ const { channel: t, channelConfig: n, thread: a } = he(), { client: r } = Se(), { typing: i = {} } = Fn(), { aiState: l } = Bn(t), o = ke(Zs);
4688
+ if (!e && o && Lo.has(l)) {
4689
+ const b = Do(t, (x = r.user) == null ? void 0 : x.id);
4607
4690
  return /* @__PURE__ */ s(
4608
- ls,
4691
+ hs,
4609
4692
  {
4610
4693
  avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
4611
4694
  avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
@@ -4631,7 +4714,7 @@ const Xi = ({
4631
4714
  return null;
4632
4715
  const g = (_ = u[0]) == null ? void 0 : _.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4633
4716
  return /* @__PURE__ */ s(
4634
- ls,
4717
+ hs,
4635
4718
  {
4636
4719
  avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4637
4720
  avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
@@ -4639,7 +4722,7 @@ const Xi = ({
4639
4722
  testId: "typing-indicator"
4640
4723
  }
4641
4724
  );
4642
- }, ls = ({
4725
+ }, hs = ({
4643
4726
  avatarId: e,
4644
4727
  avatarName: t,
4645
4728
  avatarImage: n,
@@ -4674,16 +4757,16 @@ const Xi = ({
4674
4757
  height: "13",
4675
4758
  overflow: "visible",
4676
4759
  children: [
4677
- /* @__PURE__ */ s(Qe, { cx: "4", index: 0 }),
4678
- /* @__PURE__ */ s(Qe, { cx: "16", index: 1 }),
4679
- /* @__PURE__ */ s(Qe, { cx: "28", index: 2 })
4760
+ /* @__PURE__ */ s(tt, { cx: "4", index: 0 }),
4761
+ /* @__PURE__ */ s(tt, { cx: "16", index: 1 }),
4762
+ /* @__PURE__ */ s(tt, { cx: "28", index: 2 })
4680
4763
  ]
4681
4764
  }
4682
4765
  ) }) }) }) }) })
4683
4766
  ] })
4684
4767
  }
4685
4768
  );
4686
- function vo(e, t) {
4769
+ function Do(e, t) {
4687
4770
  var a;
4688
4771
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4689
4772
  for (const r of Object.values(n)) {
@@ -4692,7 +4775,7 @@ function vo(e, t) {
4692
4775
  return i;
4693
4776
  }
4694
4777
  }
4695
- const xo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */ h(
4778
+ const Po = () => null, Oo = ({ className: e, message: t }) => /* @__PURE__ */ h(
4696
4779
  "div",
4697
4780
  {
4698
4781
  className: y("flex items-center justify-center h-full", e),
@@ -4735,12 +4818,12 @@ const xo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */ h(
4735
4818
  t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
4736
4819
  ]
4737
4820
  }
4738
- ), Ve = F.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
4739
- /* @__PURE__ */ s(_o, { className: "w-6 h-6" }),
4821
+ ), Ue = B.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
4822
+ /* @__PURE__ */ s(Oo, { className: "w-6 h-6" }),
4740
4823
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4741
4824
  ] }) }));
4742
- Ve.displayName = "LoadingState";
4743
- const wo = ({
4825
+ Ue.displayName = "LoadingState";
4826
+ const zo = ({
4744
4827
  onBack: e,
4745
4828
  showBackButton: t,
4746
4829
  renderMessageInputActions: n,
@@ -4768,17 +4851,17 @@ const wo = ({
4768
4851
  onBroadcastClick: z,
4769
4852
  composerInput: $
4770
4853
  }) => {
4771
- const { channel: L } = he(), S = H(z);
4854
+ const { channel: M } = he(), S = H(z);
4772
4855
  Y(() => {
4773
4856
  S.current = z;
4774
4857
  }, [z]);
4775
4858
  const P = W((j) => {
4776
- var q;
4777
- (q = S.current) == null || q.call(S, j);
4778
- }, []), k = z ? P : void 0, E = L.state.messages.some(
4859
+ var X;
4860
+ (X = S.current) == null || X.call(S, j);
4861
+ }, []), k = z ? P : void 0, E = M.state.messages.some(
4779
4862
  (j) => j.type !== "deleted"
4780
- ), I = p ? /* @__PURE__ */ s(F.Fragment, { children: p() }, "lt-channel-banner") : null, A = /* @__PURE__ */ s(
4781
- Aa,
4863
+ ), I = p ? /* @__PURE__ */ s(B.Fragment, { children: p() }, "lt-channel-banner") : null, A = /* @__PURE__ */ s(
4864
+ Pa,
4782
4865
  {
4783
4866
  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%)]",
4784
4867
  onBack: e,
@@ -4799,8 +4882,8 @@ const wo = ({
4799
4882
  }
4800
4883
  ), U = W(
4801
4884
  (j) => {
4802
- const { message: q } = fe("ChannelView"), Q = /* @__PURE__ */ s(
4803
- Ji,
4885
+ const { message: X } = fe("ChannelView"), Q = /* @__PURE__ */ s(
4886
+ go,
4804
4887
  {
4805
4888
  ...j,
4806
4889
  chatbotVotingEnabled: b,
@@ -4808,20 +4891,20 @@ const wo = ({
4808
4891
  onBroadcastClick: k
4809
4892
  }
4810
4893
  );
4811
- return !C || !q ? Q : C(Q, q);
4894
+ return !C || !X ? Q : C(Q, X);
4812
4895
  },
4813
4896
  [b, k, C, T]
4814
4897
  );
4815
4898
  return /* @__PURE__ */ s(J, { children: /* @__PURE__ */ s(
4816
- On,
4899
+ Un,
4817
4900
  {
4818
4901
  overrides: {
4819
4902
  Message: U,
4820
- MessageActions: to,
4903
+ MessageActions: vo,
4821
4904
  UnreadMessagesNotification: () => null,
4822
4905
  UnreadMessagesSeparator: () => null
4823
4906
  },
4824
- children: /* @__PURE__ */ s(zn, { children: $ ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4907
+ children: /* @__PURE__ */ s(Vn, { children: $ ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4825
4908
  /* @__PURE__ */ h(
4826
4909
  "div",
4827
4910
  {
@@ -4832,7 +4915,7 @@ const wo = ({
4832
4915
  I
4833
4916
  ] }) }),
4834
4917
  /* @__PURE__ */ s(
4835
- Wt,
4918
+ Zt,
4836
4919
  {
4837
4920
  head: E ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4838
4921
  A,
@@ -4847,15 +4930,15 @@ const wo = ({
4847
4930
  "lt-channel-message-list"
4848
4931
  ),
4849
4932
  /* @__PURE__ */ s(
4850
- os,
4933
+ ms,
4851
4934
  {
4852
4935
  ...n && {
4853
- renderActions: () => n == null ? void 0 : n(L)
4936
+ renderActions: () => n == null ? void 0 : n(M)
4854
4937
  },
4855
4938
  ...r && {
4856
- renderHeader: () => r(L)
4939
+ renderHeader: () => r(M)
4857
4940
  },
4858
- renderFooter: () => a == null ? void 0 : a(L),
4941
+ renderFooter: () => a == null ? void 0 : a(M),
4859
4942
  disabled: c,
4860
4943
  disabledReason: x,
4861
4944
  composerInput: $
@@ -4873,7 +4956,7 @@ const wo = ({
4873
4956
  I
4874
4957
  ] }) }),
4875
4958
  /* @__PURE__ */ s(
4876
- Wt,
4959
+ Zt,
4877
4960
  {
4878
4961
  head: E ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4879
4962
  A,
@@ -4887,14 +4970,14 @@ const wo = ({
4887
4970
  },
4888
4971
  "lt-channel-message-list"
4889
4972
  ),
4890
- r ? /* @__PURE__ */ s(F.Fragment, { children: r(L) }, "lt-channel-conversation-footer") : null,
4973
+ r ? /* @__PURE__ */ s(B.Fragment, { children: r(M) }, "lt-channel-conversation-footer") : null,
4891
4974
  /* @__PURE__ */ s(
4892
- os,
4975
+ ms,
4893
4976
  {
4894
4977
  ...n && {
4895
- renderActions: () => n == null ? void 0 : n(L)
4978
+ renderActions: () => n == null ? void 0 : n(M)
4896
4979
  },
4897
- renderFooter: () => a == null ? void 0 : a(L),
4980
+ renderFooter: () => a == null ? void 0 : a(M),
4898
4981
  disabled: c,
4899
4982
  disabledReason: x,
4900
4983
  composerInput: $
@@ -4904,7 +4987,7 @@ const wo = ({
4904
4987
  ] }) })
4905
4988
  }
4906
4989
  ) });
4907
- }, Ws = F.memo(
4990
+ }, Js = B.memo(
4908
4991
  ({
4909
4992
  channel: e,
4910
4993
  onBack: t,
@@ -4915,7 +4998,7 @@ const wo = ({
4915
4998
  onLeaveConversation: l,
4916
4999
  onBlockParticipant: o,
4917
5000
  className: d,
4918
- CustomChannelEmptyState: m = xo,
5001
+ CustomChannelEmptyState: m = Po,
4919
5002
  showDeleteConversation: f = !0,
4920
5003
  onDeleteConversationClick: u,
4921
5004
  onBlockParticipantClick: g,
@@ -4932,7 +5015,7 @@ const wo = ({
4932
5015
  renderChannelBanner: R,
4933
5016
  customChannelActions: z,
4934
5017
  renderChannelActions: $,
4935
- renderMessage: L,
5018
+ renderMessage: M,
4936
5019
  onMessageLinkClick: S,
4937
5020
  sendButton: P,
4938
5021
  attachmentPreviewList: k,
@@ -4942,12 +5025,12 @@ const wo = ({
4942
5025
  onBroadcastClick: U,
4943
5026
  composerInput: j
4944
5027
  }) => {
4945
- const q = W(
4946
- async (K, N, M) => {
5028
+ const X = W(
5029
+ async (K, N, L) => {
4947
5030
  var ee;
4948
- const G = ((ee = e.data) == null ? void 0 : ee.chatbot_paused) === !0, X = v && !G, se = {
5031
+ const G = ((ee = e.data) == null ? void 0 : ee.chatbot_paused) === !0, q = v && !G, se = {
4949
5032
  ...N,
4950
- ...X && { silent: !0 },
5033
+ ...q && { silent: !0 },
4951
5034
  ...w && {
4952
5035
  metadata: {
4953
5036
  ...N.metadata ?? {},
@@ -4955,8 +5038,8 @@ const wo = ({
4955
5038
  }
4956
5039
  }
4957
5040
  }, Z = {
4958
- ...M,
4959
- ...X && { skip_push: !0 }
5041
+ ...L,
5042
+ ...q && { skip_push: !0 }
4960
5043
  }, V = await e.sendMessage(se, Z);
4961
5044
  return C == null || C(V), V;
4962
5045
  },
@@ -4966,10 +5049,10 @@ const wo = ({
4966
5049
  if (!S) return;
4967
5050
  const K = Q.current;
4968
5051
  if (!K) return;
4969
- const N = (M) => {
4970
- const G = M.target, X = G == null ? void 0 : G.closest("a[href]"), se = X == null ? void 0 : X.getAttribute("href");
5052
+ const N = (L) => {
5053
+ const G = L.target, q = G == null ? void 0 : G.closest("a[href]"), se = q == null ? void 0 : q.getAttribute("href");
4971
5054
  if (!se) return;
4972
- const Z = X == null ? void 0 : X.closest("[data-message-id]"), V = Z == null ? void 0 : Z.getAttribute("data-message-id"), ee = V ? e.state.messages.find((re) => re.id === V) : void 0;
5055
+ const Z = q == null ? void 0 : q.closest("[data-message-id]"), V = Z == null ? void 0 : Z.getAttribute("data-message-id"), ee = V ? e.state.messages.find((re) => re.id === V) : void 0;
4973
5056
  S(se, ee);
4974
5057
  };
4975
5058
  return K.addEventListener("click", N), () => K.removeEventListener("click", N);
@@ -4981,20 +5064,20 @@ const wo = ({
4981
5064
  "messaging-channel-view h-full flex flex-col",
4982
5065
  d
4983
5066
  ),
4984
- children: /* @__PURE__ */ s(Ys.Provider, { value: v ?? !1, children: /* @__PURE__ */ s(
4985
- Pn,
5067
+ children: /* @__PURE__ */ s(Zs.Provider, { value: v ?? !1, children: /* @__PURE__ */ s(
5068
+ $n,
4986
5069
  {
4987
5070
  channel: e,
4988
- MessageSystem: go,
5071
+ MessageSystem: Mo,
4989
5072
  EmptyStateIndicator: m,
4990
- LoadingIndicator: Ve,
4991
- DateSeparator: La,
4992
- TypingIndicator: bo,
4993
- doSendMessageRequest: q,
5073
+ LoadingIndicator: Ue,
5074
+ DateSeparator: Oa,
5075
+ TypingIndicator: Ro,
5076
+ doSendMessageRequest: X,
4994
5077
  ...P ? { SendButton: P } : {},
4995
5078
  ...k ? { AttachmentPreviewList: k } : {},
4996
5079
  children: /* @__PURE__ */ s(
4997
- wo,
5080
+ zo,
4998
5081
  {
4999
5082
  onBack: t,
5000
5083
  showBackButton: n,
@@ -5017,7 +5100,7 @@ const wo = ({
5017
5100
  renderChannelBanner: R,
5018
5101
  customChannelActions: z,
5019
5102
  renderChannelActions: $,
5020
- renderMessage: L,
5103
+ renderMessage: M,
5021
5104
  viewerLanguage: E,
5022
5105
  showChannelInfo: I,
5023
5106
  onParticipantNameClick: A,
@@ -5031,8 +5114,8 @@ const wo = ({
5031
5114
  );
5032
5115
  }
5033
5116
  );
5034
- Ws.displayName = "ChannelView";
5035
- const ye = F.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: [
5117
+ Js.displayName = "ChannelView";
5118
+ const ye = B.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: [
5036
5119
  /* @__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: "⚠️" }) }),
5037
5120
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
5038
5121
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -5047,7 +5130,7 @@ const ye = F.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
5047
5130
  )
5048
5131
  ] }) }));
5049
5132
  ye.displayName = "ErrorState";
5050
- const qo = ({
5133
+ const dl = ({
5051
5134
  capabilities: e = {},
5052
5135
  renderMessageInputActions: t,
5053
5136
  renderConversationFooter: n,
@@ -5076,15 +5159,15 @@ const qo = ({
5076
5159
  client: R,
5077
5160
  isConnected: z,
5078
5161
  isLoading: $,
5079
- error: L,
5162
+ error: M,
5080
5163
  refreshConnection: S,
5081
5164
  service: P,
5082
5165
  debug: k
5083
- } = xa(), [E, I] = B(null), [A, U] = B(null), [j, q] = B(!1), { showDeleteConversation: Q = !0 } = e, K = H(l);
5166
+ } = Ca(), [E, I] = F(null), [A, U] = F(null), [j, X] = F(!1), { showDeleteConversation: Q = !0 } = e, K = H(l);
5084
5167
  K.current = l;
5085
5168
  const N = H(a);
5086
5169
  N.current = a;
5087
- const M = H(null), G = H(null);
5170
+ const L = H(null), G = H(null);
5088
5171
  Y(() => {
5089
5172
  G.current = E;
5090
5173
  }, [E]), Y(() => {
@@ -5092,13 +5175,13 @@ const qo = ({
5092
5175
  const Z = R.userID;
5093
5176
  if (!Z) return;
5094
5177
  const V = `${Z}::${i}`;
5095
- if (M.current === V) return;
5096
- M.current = V;
5178
+ if (L.current === V) return;
5179
+ L.current = V;
5097
5180
  const ee = () => {
5098
- M.current === V && (M.current = null);
5181
+ L.current === V && (L.current = null);
5099
5182
  };
5100
5183
  (async () => {
5101
- var Me, Re;
5184
+ var Le, Re;
5102
5185
  try {
5103
5186
  k && console.log(
5104
5187
  "[MessagingShell] Loading initial conversation with:",
@@ -5113,7 +5196,7 @@ const qo = ({
5113
5196
  { limit: 1 }
5114
5197
  );
5115
5198
  if (ie.length > 0) {
5116
- I(ie[0]), U(null), (Me = N.current) == null || Me.call(N, ie[0]), k && console.log(
5199
+ I(ie[0]), U(null), (Le = N.current) == null || Le.call(N, ie[0]), k && console.log(
5117
5200
  "[MessagingShell] Initial conversation loaded:",
5118
5201
  ie[0].id
5119
5202
  );
@@ -5151,20 +5234,20 @@ const qo = ({
5151
5234
  }
5152
5235
  })();
5153
5236
  }, [i, R, z, P, k]);
5154
- const X = H(r);
5155
- X.current = r;
5237
+ const q = H(r);
5238
+ q.current = r;
5156
5239
  const se = W(() => {
5157
5240
  var Z;
5158
- I(null), q(!0), (Z = X.current) == null || Z.call(X);
5241
+ I(null), X(!0), (Z = q.current) == null || Z.call(q);
5159
5242
  }, []);
5160
- return $ ? /* @__PURE__ */ s(Ve, {}) : L ? /* @__PURE__ */ s(ye, { message: L, onBack: S }) : !z || !R ? /* @__PURE__ */ s(
5243
+ return $ ? /* @__PURE__ */ s(Ue, {}) : M ? /* @__PURE__ */ s(ye, { message: M, onBack: S }) : !z || !R ? /* @__PURE__ */ s(
5161
5244
  ye,
5162
5245
  {
5163
5246
  message: "Not connected to messaging service",
5164
5247
  onBack: S
5165
5248
  }
5166
5249
  ) : A ? /* @__PURE__ */ s(ye, { message: A }) : j && !E ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : E ? /* @__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(
5167
- Ws,
5250
+ Js,
5168
5251
  {
5169
5252
  channel: E,
5170
5253
  renderMessageInputActions: t,
@@ -5190,15 +5273,15 @@ const qo = ({
5190
5273
  composerInput: O
5191
5274
  },
5192
5275
  E.id
5193
- ) }) }) : /* @__PURE__ */ s(Ve, {});
5276
+ ) }) }) : /* @__PURE__ */ s(Ue, {});
5194
5277
  };
5195
- function No(e) {
5278
+ function Fo(e) {
5196
5279
  const t = e.state.pending_messages;
5197
5280
  if (t != null && t.length)
5198
5281
  for (const n of t)
5199
5282
  e.state.addMessageSorted(n.message);
5200
5283
  }
5201
- const qs = F.createContext({
5284
+ const Qs = B.createContext({
5202
5285
  selectedChannel: void 0,
5203
5286
  onChannelSelect: () => {
5204
5287
  },
@@ -5206,18 +5289,18 @@ const qs = F.createContext({
5206
5289
  renderMessagePreview: void 0,
5207
5290
  channelPreview: void 0,
5208
5291
  viewerLanguage: void 0
5209
- }), yo = qs.Provider, Co = () => F.useContext(qs), ko = (e, t) => {
5292
+ }), Bo = Qs.Provider, $o = () => B.useContext(Qs), Uo = (e, t) => {
5210
5293
  const n = new Date(
5211
5294
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
5212
5295
  ), r = new Date(
5213
5296
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
5214
5297
  ).getTime() - n.getTime();
5215
5298
  return Math.floor(r / (1e3 * 60 * 60 * 24));
5216
- }, So = (e) => {
5299
+ }, Vo = (e) => {
5217
5300
  const t = /* @__PURE__ */ new Date();
5218
5301
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
5219
5302
  return "Just now";
5220
- const a = ko(e, t);
5303
+ const a = Uo(e, t);
5221
5304
  return a === 0 ? e.toLocaleTimeString([], {
5222
5305
  hour: "numeric",
5223
5306
  minute: "2-digit",
@@ -5227,9 +5310,9 @@ const qs = F.createContext({
5227
5310
  month: "short",
5228
5311
  year: "2-digit"
5229
5312
  });
5230
- }, Xs = F.memo(
5313
+ }, en = B.memo(
5231
5314
  (e) => {
5232
- var z, $, L;
5315
+ var z, $, M;
5233
5316
  const { channel: t, unread: n } = e, {
5234
5317
  selectedChannel: a,
5235
5318
  onChannelSelect: r,
@@ -5237,7 +5320,7 @@ const qs = F.createContext({
5237
5320
  channelPreview: l,
5238
5321
  renderMessagePreview: o,
5239
5322
  viewerLanguage: d
5240
- } = Co(), { client: m } = Se(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), u = bs(t);
5323
+ } = $o(), { client: m } = Se(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), u = Ns(t);
5241
5324
  if (l)
5242
5325
  return /* @__PURE__ */ s(
5243
5326
  l,
@@ -5254,11 +5337,11 @@ const qs = F.createContext({
5254
5337
  }, c = (S) => {
5255
5338
  const P = S.key === "Enter" || S.key === " ", k = S.repeat;
5256
5339
  !P || k || (S.preventDefault(), g());
5257
- }, x = vs(
5340
+ }, x = ys(
5258
5341
  (z = t == null ? void 0 : t.state) == null ? void 0 : z.members,
5259
5342
  m == null ? void 0 : m.userID,
5260
5343
  t == null ? void 0 : t.type
5261
- ), _ = xs(x == null ? void 0 : x.user), b = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, p = (() => {
5344
+ ), _ = Cs(x == null ? void 0 : x.user), b = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, p = (() => {
5262
5345
  var P;
5263
5346
  const S = (P = t == null ? void 0 : t.state) == null ? void 0 : P.messages;
5264
5347
  if (S != null && S.length) {
@@ -5267,7 +5350,7 @@ const qs = F.createContext({
5267
5350
  }
5268
5351
  })(), w = (() => {
5269
5352
  var I;
5270
- const S = ws({
5353
+ const S = Ss({
5271
5354
  message: p,
5272
5355
  viewerLanguage: d
5273
5356
  }), { custom_type: P, attachment_content_type: k } = (p == null ? void 0 : p.metadata) || {};
@@ -5284,7 +5367,7 @@ const qs = F.createContext({
5284
5367
  if (S) return S;
5285
5368
  const E = (I = p == null ? void 0 : p.attachments) == null ? void 0 : I[0];
5286
5369
  return E ? E.og_scrape_url ? E.og_scrape_url : E.type === "image" ? "📷 Sent an image" : E.type === "video" ? "🎥 Sent a video" : E.type === "audio" ? "🎵 Sent audio" : E.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5287
- })(), C = p != null && p.created_at ? So(new Date(p.created_at)) : "", T = p ? Be(p) : !1, O = o ? o(p, w) : `${T ? "✨ " : ""}${w}`, R = n ?? 0;
5370
+ })(), C = p != null && p.created_at ? Vo(new Date(p.created_at)) : "", T = p ? ze(p) : !1, O = o ? o(p, w) : `${T ? "✨ " : ""}${w}`, R = n ?? 0;
5288
5371
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5289
5372
  channelId: t == null ? void 0 : t.id,
5290
5373
  isSelected: f,
@@ -5310,7 +5393,7 @@ const qs = F.createContext({
5310
5393
  /* @__PURE__ */ s(
5311
5394
  _e,
5312
5395
  {
5313
- id: ((L = x == null ? void 0 : x.user) == null ? void 0 : L.id) || t.id || "unknown",
5396
+ id: ((M = x == null ? void 0 : x.user) == null ? void 0 : M.id) || t.id || "unknown",
5314
5397
  name: _,
5315
5398
  image: b,
5316
5399
  size: 48,
@@ -5343,18 +5426,18 @@ const qs = F.createContext({
5343
5426
  );
5344
5427
  }
5345
5428
  );
5346
- Xs.displayName = "CustomChannelPreview";
5347
- const Eo = { last_message_at: -1 }, Io = F.memo(
5429
+ en.displayName = "CustomChannelPreview";
5430
+ const jo = { last_message_at: -1 }, Ho = B.memo(
5348
5431
  ({
5349
5432
  onChannelSelect: e,
5350
5433
  selectedChannel: t,
5351
5434
  filters: n,
5352
5435
  allowNewMessagesFromUnfilteredChannels: a = !1,
5353
5436
  channelRenderFilterFn: r,
5354
- sort: i = Eo,
5437
+ sort: i = jo,
5355
5438
  className: l,
5356
5439
  customEmptyStateIndicator: o,
5357
- channelListPaginator: d = Fn,
5440
+ channelListPaginator: d = Hn,
5358
5441
  channelPreview: m,
5359
5442
  renderMessagePreview: f,
5360
5443
  viewerLanguage: u,
@@ -5365,12 +5448,12 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5365
5448
  onAddedToChannel: b,
5366
5449
  onChannelUpdated: p
5367
5450
  }) => {
5368
- const v = F.useRef(0);
5451
+ const v = B.useRef(0);
5369
5452
  v.current++;
5370
- const { debug: w = !1 } = dt(), C = F.useCallback(
5453
+ const { debug: w = !1 } = ft(), C = B.useCallback(
5371
5454
  (O) => {
5372
5455
  for (const R of O)
5373
- No(R);
5456
+ Fo(R);
5374
5457
  return r ? r(O) : O;
5375
5458
  },
5376
5459
  [r]
@@ -5380,7 +5463,7 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5380
5463
  selectedChannelId: t == null ? void 0 : t.id,
5381
5464
  filters: n
5382
5465
  });
5383
- const T = F.useMemo(
5466
+ const T = B.useMemo(
5384
5467
  () => ({
5385
5468
  selectedChannel: t,
5386
5469
  onChannelSelect: e,
@@ -5405,8 +5488,8 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5405
5488
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5406
5489
  l
5407
5490
  ),
5408
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(yo, { value: T, children: /* @__PURE__ */ s(
5409
- Bn,
5491
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Bo, { value: T, children: /* @__PURE__ */ s(
5492
+ jn,
5410
5493
  {
5411
5494
  filters: n,
5412
5495
  sort: i,
@@ -5420,7 +5503,7 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5420
5503
  onAddedToChannel: b,
5421
5504
  onChannelUpdated: p,
5422
5505
  Paginator: d,
5423
- Preview: Xs,
5506
+ Preview: en,
5424
5507
  EmptyStateIndicator: o
5425
5508
  },
5426
5509
  `${JSON.stringify(n)}:${JSON.stringify(i)}`
@@ -5429,11 +5512,11 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5429
5512
  );
5430
5513
  }
5431
5514
  );
5432
- Io.displayName = "ChannelList";
5433
- const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, To = {
5515
+ Ho.displayName = "ChannelList";
5516
+ const fs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Go = {
5434
5517
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5435
5518
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
5436
- }, Ao = ({ variant: e }) => /* @__PURE__ */ s(
5519
+ }, Yo = ({ variant: e }) => /* @__PURE__ */ s(
5437
5520
  "span",
5438
5521
  {
5439
5522
  "aria-hidden": "true",
@@ -5443,12 +5526,12 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5443
5526
  insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
5444
5527
  transform: e === "received" ? "scaleX(-1)" : void 0,
5445
5528
  transformOrigin: "center",
5446
- backgroundColor: To[e],
5447
- WebkitMask: cs,
5448
- mask: cs
5529
+ backgroundColor: Go[e],
5530
+ WebkitMask: fs,
5531
+ mask: fs
5449
5532
  }
5450
5533
  }
5451
- ), Lo = {
5534
+ ), Wo = {
5452
5535
  sent: {
5453
5536
  backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5454
5537
  color: "var(--str-chat__own-message-bubble-color, #fff)"
@@ -5457,7 +5540,7 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5457
5540
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
5458
5541
  color: "var(--str-chat__message-bubble-color, #000000)"
5459
5542
  }
5460
- }, Ks = ({
5543
+ }, tn = ({
5461
5544
  variant: e,
5462
5545
  text: t,
5463
5546
  tail: n = !0,
@@ -5473,23 +5556,23 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5473
5556
  r
5474
5557
  ),
5475
5558
  style: {
5476
- ...Lo[e],
5559
+ ...Wo[e],
5477
5560
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
5478
5561
  isolation: "isolate"
5479
5562
  },
5480
5563
  children: [
5481
5564
  a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
5482
5565
  /* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
5483
- n && /* @__PURE__ */ s(Ao, { variant: e })
5566
+ n && /* @__PURE__ */ s(Yo, { variant: e })
5484
5567
  ]
5485
5568
  }
5486
- ), Mo = ({
5569
+ ), Xo = ({
5487
5570
  text: e,
5488
5571
  tail: t,
5489
5572
  header: n,
5490
5573
  className: a
5491
5574
  }) => /* @__PURE__ */ s(
5492
- Ks,
5575
+ tn,
5493
5576
  {
5494
5577
  variant: "received",
5495
5578
  text: e,
@@ -5497,10 +5580,10 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5497
5580
  header: n,
5498
5581
  className: a
5499
5582
  }
5500
- ), Ro = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Ks, { variant: "sent", text: e, tail: t, className: n }), Xo = {
5501
- Sent: Ro,
5502
- Received: Mo
5503
- }, Do = ({
5583
+ ), qo = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(tn, { variant: "sent", text: e, tail: t, className: n }), ul = {
5584
+ Sent: qo,
5585
+ Received: Xo
5586
+ }, Ko = ({
5504
5587
  question: e,
5505
5588
  onClick: t,
5506
5589
  loading: n = !1,
@@ -5522,7 +5605,7 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5522
5605
  ),
5523
5606
  children: e
5524
5607
  }
5525
- ), Ko = ({
5608
+ ), ml = ({
5526
5609
  faqs: e,
5527
5610
  onFaqClick: t,
5528
5611
  loadingFaqId: n,
@@ -5531,7 +5614,7 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5531
5614
  avatarImage: i,
5532
5615
  avatarName: l
5533
5616
  }) => {
5534
- const o = ba(e);
5617
+ const o = Na(e);
5535
5618
  return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
5536
5619
  (i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
5537
5620
  _e,
@@ -5551,7 +5634,7 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5551
5634
  children: [
5552
5635
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5553
5636
  o.map((d) => /* @__PURE__ */ s(
5554
- Do,
5637
+ Ko,
5555
5638
  {
5556
5639
  question: d.question,
5557
5640
  onClick: () => t(d.id),
@@ -5565,42 +5648,42 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5565
5648
  ] }) });
5566
5649
  };
5567
5650
  export {
5568
- ys as A,
5569
- ft as B,
5570
- xo as C,
5571
- xs as D,
5572
- Wo as E,
5573
- Ko as F,
5574
- ai as G,
5575
- Ra as H,
5576
- xa as I,
5577
- ot as L,
5578
- Go as M,
5651
+ Is as A,
5652
+ vt as B,
5653
+ Po as C,
5654
+ Cs as D,
5655
+ cl as E,
5656
+ ml as F,
5657
+ ci as G,
5658
+ Fa as H,
5659
+ Ca as I,
5660
+ ut as L,
5661
+ ol as M,
5579
5662
  we as a,
5580
5663
  _e as b,
5581
- Io as c,
5582
- Ws as d,
5583
- Yo as e,
5584
- Do as f,
5664
+ Ho as c,
5665
+ Js as d,
5666
+ ll as e,
5667
+ Ko as f,
5585
5668
  ce as g,
5586
5669
  Pe as h,
5587
5670
  Ne as i,
5588
- Xo as j,
5589
- hi as k,
5590
- Ho as l,
5591
- qo as m,
5592
- pr as n,
5671
+ ul as j,
5672
+ vi as k,
5673
+ il as l,
5674
+ dl as m,
5675
+ wr as n,
5593
5676
  me as o,
5594
- hr as p,
5595
- So as q,
5677
+ vr as p,
5678
+ Vo as q,
5596
5679
  xe as r,
5597
- gr as s,
5598
- ws as t,
5599
- Ss as u,
5600
- wa as v,
5601
- ir as w,
5602
- Da as x,
5603
- vs as y,
5604
- ht as z
5680
+ _r as s,
5681
+ Ss as t,
5682
+ Ms as u,
5683
+ Sa as v,
5684
+ ur as w,
5685
+ Ba as x,
5686
+ ys as y,
5687
+ bt as z
5605
5688
  };
5606
- //# sourceMappingURL=index-BlHbSVwK.js.map
5689
+ //# sourceMappingURL=index-DSQieSNh.js.map