@linktr.ee/messaging-react 4.0.5-rc-1786706994 → 4.0.6-rc-1786770596

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 (57) hide show
  1. package/dist/Card-Be81K6su.cjs +2 -0
  2. package/dist/{Card-415OfRhw.cjs.map → Card-Be81K6su.cjs.map} +1 -1
  3. package/dist/{Card-DaJtDL7m.js → Card-BzvDr-pU.js} +2 -2
  4. package/dist/{Card-DaJtDL7m.js.map → Card-BzvDr-pU.js.map} +1 -1
  5. package/dist/{Card-CQShGiad.js → Card-CBj04-pC.js} +3 -3
  6. package/dist/Card-CBj04-pC.js.map +1 -0
  7. package/dist/Card-_TP7bDao.cjs +2 -0
  8. package/dist/Card-_TP7bDao.cjs.map +1 -0
  9. package/dist/PurchaseStatusBadge-BmqAQEV9.cjs +2 -0
  10. package/dist/PurchaseStatusBadge-BmqAQEV9.cjs.map +1 -0
  11. package/dist/{LoadingDots-Ct3WmVlT.js → PurchaseStatusBadge-D1RRsubZ.js} +30 -30
  12. package/dist/PurchaseStatusBadge-D1RRsubZ.js.map +1 -0
  13. package/dist/index-BjkDB6yi.cjs +3 -0
  14. package/dist/index-BjkDB6yi.cjs.map +1 -0
  15. package/dist/{index-CZY29se6.js → index-DXlI1QQw.js} +924 -933
  16. package/dist/index-DXlI1QQw.js.map +1 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/testing.cjs.map +1 -1
  20. package/dist/testing.js.map +1 -1
  21. package/package.json +2 -2
  22. package/src/components/AttachmentCard/index.tsx +1 -3
  23. package/src/components/AttachmentCard/utils/icons.ts +2 -2
  24. package/src/components/ChannelActionsMenu/index.tsx +0 -2
  25. package/src/components/ChannelView.test.tsx +0 -22
  26. package/src/components/ChannelView.tsx +0 -10
  27. package/src/components/CustomMessage/LockedAttachment/components/_shared/LockBadge.tsx +0 -2
  28. package/src/components/CustomMessage/LockedAttachment/index.tsx +0 -1
  29. package/src/components/CustomMessage/MessageTag.tsx +3 -3
  30. package/src/components/CustomMessage/StreamAttachmentMessage.tsx +5 -9
  31. package/src/components/CustomSystemMessage/index.tsx +1 -1
  32. package/src/components/LinkAttachment/components/_shared/CardShell.tsx +1 -4
  33. package/src/components/LinkAttachment/components/_shared/CardThumbnail.tsx +3 -10
  34. package/src/components/MediaMessage/index.tsx +1 -1
  35. package/src/components/MessageAttachment/_shared/triggerDownload.ts +0 -2
  36. package/src/components/MessageAttachment/_shared/useCarousel.ts +0 -2
  37. package/src/components/MessageAttachment/_shared/useViewer.ts +0 -2
  38. package/src/components/MessageAttachment/stories/StoryTable.tsx +1 -1
  39. package/src/stories/mocks.tsx +0 -28
  40. package/src/testing/createMockMessagingClient.ts +4 -8
  41. package/src/testing/createMockStreamChatClient.ts +7 -2
  42. package/src/testing/index.ts +1 -1
  43. package/dist/Card-415OfRhw.cjs +0 -2
  44. package/dist/Card-CQShGiad.js.map +0 -1
  45. package/dist/Card-CnhpeORQ.cjs +0 -2
  46. package/dist/Card-CnhpeORQ.cjs.map +0 -1
  47. package/dist/LoadingDots-Ct3WmVlT.js.map +0 -1
  48. package/dist/LoadingDots-D9GGphgM.cjs +0 -2
  49. package/dist/LoadingDots-D9GGphgM.cjs.map +0 -1
  50. package/dist/index-BqB49F8e.cjs +0 -3
  51. package/dist/index-BqB49F8e.cjs.map +0 -1
  52. package/dist/index-CZY29se6.js.map +0 -1
  53. package/src/components/LinkAttachment/components/Composer/index.ts +0 -2
  54. package/src/components/LinkAttachment/components/Received/index.ts +0 -2
  55. package/src/components/LinkAttachment/components/Sent/index.ts +0 -2
  56. package/src/components/MessageBubble/components/Received/index.ts +0 -1
  57. package/src/components/MessageBubble/components/Sent/index.ts +0 -1
@@ -1,12 +1,12 @@
1
- import { jsx as n, jsxs as f, Fragment as K } from "react/jsx-runtime";
2
- import z, { createContext as je, useContext as xe, useCallback as q, useState as B, useRef as H, useEffect as Y, useId as rs, Suspense as is, useMemo as le } from "react";
3
- import { StreamChatService as ls } from "@linktr.ee/messaging-core";
4
- import { StreamChat as os, LinkPreviewsManager as tt } from "stream-chat";
5
- import { Chat as cs, useChannelStateContext as we, useChatContext as He, DateSeparator as ds, useMessageContext as fe, MessageStatus as us, MessageErrorIcon as nt, MessageText as ze, areMessageUIPropsEqual as ms, useMessageReminder as hs, useComponentContext as dn, Attachment as fs, EditMessageModal as gs, MessageBlocked as ps, MessageBouncePrompt as bs, MessageDeleted as vs, MessageIsThreadReplyInChannelButtonIndicator as xs, MessageRepliesCountButton as ws, ReminderNotification as _s, StreamedMessageText as ys, messageHasAttachments as Ns, messageHasReactions as ks, isDateSeparatorMessage as Cs, isMessageBlocked as Ss, isMessageBounced as Es, MessageBounceModal as Is, Poll as Ts, useMessageComposer as As, useStateStore as Rs, MessageInput as Ht, useMessageInputContext as Ls, useMessageComposerHasSendableData as Ms, AttachmentPreviewList as Ds, QuotedMessagePreview as Os, TextareaComposer as Ps, MessageTimestamp as We, AIStates as Xe, useTypingContext as zs, useAIState as Fs, Channel as $s, WithComponents as Bs, Window as Us, MessageList as Vt, ChannelList as js, InfiniteScroll as Hs } from "stream-chat-react";
6
- import { isOfficialChannel as un, OFFICIAL_SENDER_USER_ID as Vs, MESSAGE_CUSTOM_TYPE as oe, isDmAgentSystemType as Gt, isAgeSafetySystemType as Gs, resolveRichCardImagePresentation as Ys, selectEnabledFaqs as Ws } from "@linktr.ee/messaging-taxonomy";
1
+ import { jsx as n, jsxs as f, Fragment as J } from "react/jsx-runtime";
2
+ import z, { createContext as je, useContext as ve, useCallback as Z, useState as B, useRef as j, useEffect as Y, useId as ss, Suspense as as, useMemo as le } from "react";
3
+ import { StreamChatService as rs } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as is, LinkPreviewsManager as nt } from "stream-chat";
5
+ import { Chat as ls, useChannelStateContext as xe, useChatContext as He, DateSeparator as os, useMessageContext as he, MessageStatus as cs, MessageErrorIcon as st, MessageText as ze, areMessageUIPropsEqual as ds, useMessageReminder as us, useComponentContext as un, Attachment as ms, EditMessageModal as hs, MessageBlocked as fs, MessageBouncePrompt as gs, MessageDeleted as ps, MessageIsThreadReplyInChannelButtonIndicator as bs, MessageRepliesCountButton as vs, ReminderNotification as xs, StreamedMessageText as ws, messageHasAttachments as _s, messageHasReactions as ys, isDateSeparatorMessage as Ns, isMessageBlocked as ks, isMessageBounced as Cs, MessageBounceModal as Ss, Poll as Es, useMessageComposer as Is, useStateStore as Ts, MessageInput as Vt, useMessageInputContext as As, useMessageComposerHasSendableData as Rs, AttachmentPreviewList as Ls, QuotedMessagePreview as Ms, TextareaComposer as Ds, MessageTimestamp as Xe, AIStates as qe, useTypingContext as Os, useAIState as Ps, Channel as zs, WithComponents as Fs, Window as $s, MessageList as Gt, ChannelList as Bs, InfiniteScroll as Us } from "stream-chat-react";
7
6
  import k from "classnames";
8
- import { StarIcon as st, DotsThreeIcon as Xs, SpinnerGapIcon as Oe, SignOutIcon as qs, ProhibitInsetIcon as Yt, FlagIcon as mn, CurrencyDollarIcon as Ks, CaretRightIcon as hn, ArrowLeftIcon as Zs, FileIcon as fn, ImageIcon as Js, SpeakerHighIcon as Qs, VideoCameraIcon as gn, FileMdIcon as ea, FileTextIcon as ta, FileZipIcon as na, FilePptIcon as sa, FileCsvIcon as aa, FileXlsIcon as ra, FileDocIcon as ia, FilePdfIcon as la, CircleNotchIcon as be, PlayIcon as at, PauseIcon as oa, LinkIcon as ca, DownloadSimpleIcon as Se, GiftIcon as da, WarningCircleIcon as ua, MegaphoneIcon as ma, ChecksIcon as ha, XIcon as it, PencilSimpleIcon as fa, CaretLeftIcon as ga, TrashSimpleIcon as pa, ArrowUpIcon as ba, SparkleIcon as va, ProhibitIcon as xa } from "@phosphor-icons/react";
9
- import { MessageActions as wa, DefaultDropdownActionButton as pn } from "stream-chat-react/experimental";
7
+ import { StarIcon as at, DotsThreeIcon as js, SpinnerGapIcon as Oe, SignOutIcon as Hs, ProhibitInsetIcon as Yt, FlagIcon as mn, CurrencyDollarIcon as Vs, CaretRightIcon as hn, ArrowLeftIcon as Gs, FileIcon as fn, ImageIcon as Ys, SpeakerHighIcon as Ws, VideoCameraIcon as gn, FileMdIcon as Xs, FileTextIcon as qs, FileZipIcon as Ks, FilePptIcon as Zs, FileCsvIcon as Js, FileXlsIcon as Qs, FileDocIcon as ea, FilePdfIcon as ta, CircleNotchIcon as pe, PlayIcon as rt, PauseIcon as na, LinkIcon as sa, DownloadSimpleIcon as Ce, GiftIcon as aa, WarningCircleIcon as ra, MegaphoneIcon as ia, ChecksIcon as la, XIcon as lt, PencilSimpleIcon as oa, CaretLeftIcon 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 oe, isDmAgentSystemType as Wt, isAgeSafetySystemType as pa, resolveRichCardImagePresentation as ba, selectEnabledFaqs as va } from "@linktr.ee/messaging-taxonomy";
9
+ import { MessageActions as xa, DefaultDropdownActionButton as pn } from "stream-chat-react/experimental";
10
10
  const bn = je({
11
11
  service: null,
12
12
  client: null,
@@ -17,7 +17,7 @@ const bn = je({
17
17
  refreshConnection: async () => {
18
18
  },
19
19
  debug: !1
20
- }), lt = () => xe(bn), eo = ({
20
+ }), ot = () => ve(bn), Ql = ({
21
21
  children: e,
22
22
  user: t,
23
23
  serviceConfig: s,
@@ -27,7 +27,7 @@ const bn = je({
27
27
  client: o
28
28
  }) => {
29
29
  var S, C;
30
- const l = q(
30
+ const l = Z(
31
31
  (A, ...P) => {
32
32
  i && console.log(`🔥 [MessagingProvider] ${A}`, ...P);
33
33
  },
@@ -39,16 +39,16 @@ const bn = je({
39
39
  serviceConfig: !!s,
40
40
  capabilities: Object.keys(r)
41
41
  });
42
- const [d, u] = B(null), [h, m] = B(null), [g, c] = B(!1), [p, w] = B(!1), [v, x] = B(null), b = H(!1), N = H(null), _ = H(s);
42
+ const [d, u] = B(null), [h, m] = B(null), [g, c] = B(!1), [p, w] = B(!1), [v, x] = B(null), b = j(!1), N = j(null), _ = j(s);
43
43
  _.current = s;
44
- const T = H(i);
44
+ const T = j(i);
45
45
  T.current = i;
46
- const L = H({
46
+ const L = j({
47
47
  userId: t == null ? void 0 : t.id,
48
48
  apiKey: a,
49
49
  serviceConfig: s,
50
50
  capabilities: r
51
- }), E = H(0);
51
+ }), E = j(0);
52
52
  E.current++, l("📊 RENDER INFO", {
53
53
  renderCount: E.current,
54
54
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
@@ -64,8 +64,8 @@ const bn = je({
64
64
  serviceConfig: s,
65
65
  capabilities: r
66
66
  };
67
- const $ = H(null);
68
- !o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new os(a) });
67
+ const $ = j(null);
68
+ !o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new is(a) });
69
69
  const F = o || (a ? ((C = $.current) == null ? void 0 : C.client) ?? null : null);
70
70
  Y(() => {
71
71
  const A = E.current, P = _.current;
@@ -84,7 +84,7 @@ const bn = je({
84
84
  renderCount: A,
85
85
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
86
86
  });
87
- const U = new ls({
87
+ const U = new rs({
88
88
  ...P,
89
89
  apiKey: a,
90
90
  debug: T.current,
@@ -95,7 +95,7 @@ const bn = je({
95
95
  serviceInstance: !!U
96
96
  });
97
97
  }, [a, F, o]);
98
- const R = H(null);
98
+ const R = j(null);
99
99
  Y(() => {
100
100
  var P, U;
101
101
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
@@ -126,13 +126,13 @@ const bn = je({
126
126
  l("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, w(!0), x(null);
127
127
  try {
128
128
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
129
- const V = await d.connectUser(t);
130
- m(V), c(!0), R.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
129
+ const H = await d.connectUser(t);
130
+ m(H), c(!0), R.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
131
131
  userId: t.id,
132
- clientId: V.userID
132
+ clientId: H.userID
133
133
  });
134
- } catch (V) {
135
- const te = V instanceof Error ? V.message : "Connection failed";
134
+ } catch (H) {
135
+ const te = H instanceof Error ? H.message : "Connection failed";
136
136
  x(te), l("❌ USER CONNECTION ERROR", {
137
137
  userId: t.id,
138
138
  error: te
@@ -151,7 +151,7 @@ const bn = je({
151
151
  A && (R.current = null, (P = N.current) == null || P.disconnectUser().catch(console.error));
152
152
  };
153
153
  }, [F]);
154
- const I = q(async () => {
154
+ const I = Z(async () => {
155
155
  if (l("🔄 REFRESH CONNECTION CALLED", {
156
156
  hasService: !!d,
157
157
  hasUser: !!t
@@ -175,7 +175,7 @@ const bn = je({
175
175
  w(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
176
176
  }
177
177
  }
178
- }, [d, t, l, o]), D = z.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
178
+ }, [d, t, l, o]), M = z.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
179
179
  hasService: !!d,
180
180
  hasClient: !!h,
181
181
  isConnected: g,
@@ -214,9 +214,9 @@ const bn = je({
214
214
  return l("🔄 RENDER END", {
215
215
  renderCount: E.current,
216
216
  willRenderChat: !!F,
217
- contextValueReady: !!D
218
- }), /* @__PURE__ */ n(bn.Provider, { value: D, children: F ? /* @__PURE__ */ n(
219
- cs,
217
+ contextValueReady: !!M
218
+ }), /* @__PURE__ */ n(bn.Provider, { value: M, children: F ? /* @__PURE__ */ n(
219
+ ls,
220
220
  {
221
221
  client: F,
222
222
  customClasses: {
@@ -225,7 +225,7 @@ const bn = je({
225
225
  children: e
226
226
  }
227
227
  ) : e });
228
- }, _a = () => lt(), vn = (e) => {
228
+ }, wa = () => ot(), vn = (e) => {
229
229
  var a, r;
230
230
  const [t, s] = B(
231
231
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -250,11 +250,11 @@ const bn = je({
250
250
  };
251
251
  function xn(e, t, s) {
252
252
  const a = Object.values(e || {});
253
- if (un(s)) {
253
+ if (fa(s)) {
254
254
  const r = a.find(
255
255
  (i) => {
256
256
  var o;
257
- return ((o = i.user) == null ? void 0 : o.id) === Vs;
257
+ return ((o = i.user) == null ? void 0 : o.id) === ga;
258
258
  }
259
259
  );
260
260
  if (r) return r;
@@ -266,18 +266,18 @@ function xn(e, t, s) {
266
266
  }
267
267
  );
268
268
  }
269
- const ya = /^[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 Na(e) {
271
- return ya.test(e.trim());
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 ya(e) {
271
+ return _a.test(e.trim());
272
272
  }
273
- function Wt(e, t) {
273
+ function Xt(e, t) {
274
274
  const s = e == null ? void 0 : e.trim();
275
- return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !Na(s);
275
+ return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !ya(s);
276
276
  }
277
277
  function wn(e) {
278
- return Wt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Wt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
278
+ return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
279
279
  }
280
- const Xt = [
280
+ const qt = [
281
281
  { emoji: "🍎", bgColor: "#FFD1DD" },
282
282
  // Apple
283
283
  { emoji: "🍌", bgColor: "#FFF1C9" },
@@ -305,7 +305,7 @@ const Xt = [
305
305
  { emoji: "🍈", bgColor: "#D9F7E1" }
306
306
  // Melon
307
307
  ];
308
- function ka(e) {
308
+ function Na(e) {
309
309
  let t = 0;
310
310
  for (let s = 0; s < e.length; s++) {
311
311
  const a = e.charCodeAt(s);
@@ -314,15 +314,15 @@ function ka(e) {
314
314
  return Math.abs(t);
315
315
  }
316
316
  function _n(e) {
317
- return Xt[ka(e) % Xt.length];
317
+ return qt[Na(e) % qt.length];
318
318
  }
319
- function Ca(e) {
319
+ function ka(e) {
320
320
  return _n(e).emoji;
321
321
  }
322
- function Sa(e) {
322
+ function Ca(e) {
323
323
  return _n(e).bgColor;
324
324
  }
325
- const _e = ({
325
+ const we = ({
326
326
  id: e,
327
327
  image: t,
328
328
  size: s = 40,
@@ -331,7 +331,7 @@ const _e = ({
331
331
  shape: i = "squircle",
332
332
  dmAgentEnabled: o = !1
333
333
  }) => {
334
- const l = Ca(e), d = Sa(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, p = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ n(
334
+ const l = ka(e), d = Ca(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, p = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ n(
335
335
  "div",
336
336
  {
337
337
  "aria-hidden": "true",
@@ -359,7 +359,7 @@ const _e = ({
359
359
  {
360
360
  "aria-hidden": "true",
361
361
  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)]",
362
- children: /* @__PURE__ */ n(st, { className: "size-3 text-yellow-600", weight: "duotone" })
362
+ children: /* @__PURE__ */ n(at, { className: "size-3 text-yellow-600", weight: "duotone" })
363
363
  }
364
364
  ),
365
365
  /* @__PURE__ */ n(
@@ -382,7 +382,7 @@ const _e = ({
382
382
  ]
383
383
  }
384
384
  );
385
- }, Ea = "https://linktr.ee/s/about/trust-center/report", Ia = ({
385
+ }, Sa = "https://linktr.ee/s/about/trust-center/report", Ea = ({
386
386
  channel: e,
387
387
  participant: t,
388
388
  showBlockParticipant: s = !0,
@@ -395,8 +395,8 @@ const _e = ({
395
395
  onActionComplete: u,
396
396
  logLabel: h = "useChannelModerationActions"
397
397
  }) => {
398
- var D;
399
- const { service: m, debug: g } = lt(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, p = !!(a && s && m && c), [w, v] = B(!1), [x, b] = B(null), [N, _] = B(!1), [T, L] = B(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
398
+ var M;
399
+ const { service: m, debug: g } = ot(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, p = !!(a && s && m && c), [w, v] = B(!1), [x, b] = B(null), [N, _] = B(!1), [T, L] = B(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
400
400
  return Y(() => {
401
401
  if (!p || !m || !c) {
402
402
  v(!1), b(null);
@@ -466,10 +466,10 @@ const _e = ({
466
466
  }
467
467
  },
468
468
  handleReportUser: () => {
469
- d == null || d(), u == null || u(), window.open(Ea, "_blank", "noopener,noreferrer");
469
+ d == null || d(), u == null || u(), window.open(Sa, "_blank", "noopener,noreferrer");
470
470
  }
471
471
  };
472
- }, Ne = ({
472
+ }, ye = ({
473
473
  variant: e = "default",
474
474
  className: t,
475
475
  children: s,
@@ -486,7 +486,7 @@ const _e = ({
486
486
  ...a,
487
487
  children: s
488
488
  }
489
- ), Ta = ({
489
+ ), Ia = ({
490
490
  channel: e,
491
491
  participant: t,
492
492
  showDeleteConversation: s = !0,
@@ -500,7 +500,7 @@ const _e = ({
500
500
  customChannelActions: h,
501
501
  triggerClassName: m
502
502
  }) => {
503
- const [g, c] = B(!1), p = H(null), w = rs(), v = q(() => c(!1), []), {
503
+ const [g, c] = B(!1), p = j(null), w = ss(), v = Z(() => c(!1), []), {
504
504
  isParticipantBlocked: x,
505
505
  isCheckingBlockedStatus: b,
506
506
  isLeaving: N,
@@ -509,7 +509,7 @@ const _e = ({
509
509
  handleBlockUser: L,
510
510
  handleUnblockUser: E,
511
511
  handleReportUser: $
512
- } = Ia({
512
+ } = Ea({
513
513
  channel: e,
514
514
  participant: t,
515
515
  showBlockParticipant: a,
@@ -524,10 +524,10 @@ const _e = ({
524
524
  });
525
525
  return Y(() => {
526
526
  if (!g) return;
527
- const R = (D) => {
528
- p.current && !p.current.contains(D.target) && c(!1);
529
- }, I = (D) => {
530
- D.key === "Escape" && c(!1);
527
+ const R = (M) => {
528
+ p.current && !p.current.contains(M.target) && c(!1);
529
+ }, I = (M) => {
530
+ M.key === "Escape" && c(!1);
531
531
  };
532
532
  return document.addEventListener("mousedown", R), document.addEventListener("keydown", I), () => {
533
533
  document.removeEventListener("mousedown", R), document.removeEventListener("keydown", I);
@@ -543,7 +543,7 @@ const _e = ({
543
543
  "aria-controls": g ? w : void 0,
544
544
  onClick: () => c((R) => !R),
545
545
  children: [
546
- /* @__PURE__ */ n(Xs, { className: "size-5 text-black/90" }),
546
+ /* @__PURE__ */ n(js, { className: "size-5 text-black/90" }),
547
547
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
548
548
  ]
549
549
  }
@@ -559,13 +559,13 @@ const _e = ({
559
559
  ),
560
560
  children: /* @__PURE__ */ f("ul", { className: "flex flex-col gap-1", children: [
561
561
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(
562
- Ne,
562
+ ye,
563
563
  {
564
564
  onClick: T,
565
565
  disabled: N,
566
566
  "aria-busy": N,
567
567
  children: [
568
- N ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(qs, { className: "h-5 w-5" }),
568
+ N ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Hs, { className: "h-5 w-5" }),
569
569
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
570
570
  ]
571
571
  }
@@ -573,12 +573,12 @@ const _e = ({
573
573
  a && /* @__PURE__ */ n("li", { children: b ? (
574
574
  // Block status not yet resolved — show a disabled placeholder
575
575
  // so a premature click can't act on a stale block state.
576
- /* @__PURE__ */ f(Ne, { disabled: !0, "aria-busy": !0, children: [
576
+ /* @__PURE__ */ f(ye, { disabled: !0, "aria-busy": !0, children: [
577
577
  /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }),
578
578
  /* @__PURE__ */ n("span", { children: "Block" })
579
579
  ] })
580
580
  ) : x ? /* @__PURE__ */ f(
581
- Ne,
581
+ ye,
582
582
  {
583
583
  onClick: E,
584
584
  disabled: _,
@@ -589,7 +589,7 @@ const _e = ({
589
589
  ]
590
590
  }
591
591
  ) : /* @__PURE__ */ f(
592
- Ne,
592
+ ye,
593
593
  {
594
594
  onClick: L,
595
595
  disabled: _,
@@ -600,7 +600,7 @@ const _e = ({
600
600
  ]
601
601
  }
602
602
  ) }),
603
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(Ne, { variant: "danger", onClick: $, children: [
603
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(ye, { variant: "danger", onClick: $, children: [
604
604
  /* @__PURE__ */ n(mn, { className: "h-5 w-5" }),
605
605
  /* @__PURE__ */ n("span", { children: "Report" })
606
606
  ] }) }),
@@ -609,7 +609,7 @@ const _e = ({
609
609
  }
610
610
  )
611
611
  ] });
612
- }, qe = "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", Aa = "CUSTOMER_PAID", Ra = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Aa, La = ({
612
+ }, Ke = "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", Ta = "CUSTOMER_PAID", Aa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ta, Ra = ({
613
613
  className: e,
614
614
  onBack: t,
615
615
  showBackButton: s,
@@ -627,8 +627,8 @@ const _e = ({
627
627
  showChannelInfo: p = !0,
628
628
  onParticipantNameClick: w
629
629
  }) => {
630
- var I, D, S, C;
631
- const { channel: v } = we(), { client: x } = He(), b = z.useMemo(
630
+ var I, M, S, C;
631
+ const { channel: v } = xe(), { client: x } = He(), b = z.useMemo(
632
632
  () => {
633
633
  var A;
634
634
  return xn(
@@ -638,7 +638,7 @@ const _e = ({
638
638
  );
639
639
  },
640
640
  [(I = v.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, v.type]
641
- ), N = wn(b == null ? void 0 : b.user), _ = (D = b == null ? void 0 : b.user) == null ? void 0 : D.image, T = vn(v), L = Ra((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, $ = L || E || !!w, F = async () => {
641
+ ), N = wn(b == null ? void 0 : b.user), _ = (M = b == null ? void 0 : b.user) == null ? void 0 : M.image, T = vn(v), L = Aa((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, $ = L || E || !!w, F = async () => {
642
642
  try {
643
643
  T ? await v.unpin() : await v.pin();
644
644
  } catch (A) {
@@ -647,9 +647,9 @@ const _e = ({
647
647
  A
648
648
  );
649
649
  }
650
- }, R = /* @__PURE__ */ f(K, { children: [
650
+ }, R = /* @__PURE__ */ f(J, { children: [
651
651
  /* @__PURE__ */ n(
652
- _e,
652
+ we,
653
653
  {
654
654
  id: ((C = b == null ? void 0 : b.user) == null ? void 0 : C.id) || v.id || "unknown",
655
655
  name: N,
@@ -674,7 +674,7 @@ const _e = ({
674
674
  {
675
675
  "aria-label": "Paid customer",
676
676
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
677
- children: /* @__PURE__ */ n(Ks, { className: "size-2.5", weight: "bold" })
677
+ children: /* @__PURE__ */ n(Vs, { className: "size-2.5", weight: "bold" })
678
678
  }
679
679
  ),
680
680
  E && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
@@ -682,7 +682,7 @@ const _e = ({
682
682
  {
683
683
  "aria-label": "Starred conversation",
684
684
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
685
- children: /* @__PURE__ */ n(st, { className: "size-2.5", weight: "fill" })
685
+ children: /* @__PURE__ */ n(at, { className: "size-2.5", weight: "fill" })
686
686
  }
687
687
  ) }),
688
688
  w && /* @__PURE__ */ n(
@@ -710,14 +710,14 @@ const _e = ({
710
710
  "button",
711
711
  {
712
712
  className: k(
713
- qe,
713
+ Ke,
714
714
  "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
715
715
  ),
716
716
  onClick: t || (() => {
717
717
  }),
718
718
  type: "button",
719
719
  "aria-label": "Back to conversations",
720
- children: /* @__PURE__ */ n(Zs, { className: "size-5 text-black/90" })
720
+ children: /* @__PURE__ */ n(Gs, { className: "size-5 text-black/90" })
721
721
  }
722
722
  ) }),
723
723
  /* @__PURE__ */ n("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: w ? /* @__PURE__ */ n(
@@ -734,13 +734,13 @@ const _e = ({
734
734
  a && /* @__PURE__ */ n(
735
735
  "button",
736
736
  {
737
- className: qe,
737
+ className: Ke,
738
738
  onClick: F,
739
739
  type: "button",
740
740
  "aria-pressed": T,
741
741
  "aria-label": T ? "Unstar conversation" : "Star conversation",
742
742
  children: /* @__PURE__ */ n(
743
- st,
743
+ at,
744
744
  {
745
745
  className: k("size-5", {
746
746
  "text-[#FFD60A]": T,
@@ -752,7 +752,7 @@ const _e = ({
752
752
  }
753
753
  ),
754
754
  p && (c !== void 0 ? c : /* @__PURE__ */ n(
755
- Ta,
755
+ Ia,
756
756
  {
757
757
  channel: v,
758
758
  participant: b,
@@ -765,15 +765,15 @@ const _e = ({
765
765
  onBlockParticipantClick: h,
766
766
  onReportParticipantClick: m,
767
767
  customChannelActions: g,
768
- triggerClassName: qe
768
+ triggerClassName: Ke
769
769
  }
770
770
  ))
771
771
  ] })
772
772
  ] })
773
773
  }
774
774
  );
775
- }, Ma = (e) => /* @__PURE__ */ n(ds, { ...e, position: "center" });
776
- function Da(e) {
775
+ }, La = (e) => /* @__PURE__ */ n(os, { ...e, position: "center" });
776
+ function Ma(e) {
777
777
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
778
778
  }
779
779
  function yn({
@@ -781,31 +781,31 @@ function yn({
781
781
  viewerLanguage: t
782
782
  }) {
783
783
  var r;
784
- const s = e == null ? void 0 : e.text, a = Da(t);
784
+ const s = e == null ? void 0 : e.text, a = Ma(t);
785
785
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
786
786
  }
787
- const Oa = ["linktr.ee"], qt = "messaging-attachment-v1_0";
788
- function Pa(e) {
787
+ const Da = ["linktr.ee"], Kt = "messaging-attachment-v1_0";
788
+ function Oa(e) {
789
789
  try {
790
790
  return new URL(e).hostname.toLowerCase();
791
791
  } catch {
792
792
  return null;
793
793
  }
794
794
  }
795
- function za(e) {
796
- return Oa.some(
795
+ function Pa(e) {
796
+ return Da.some(
797
797
  (t) => e === t || e.endsWith(`.${t}`)
798
798
  );
799
799
  }
800
800
  function ce(e) {
801
801
  const t = e == null ? void 0 : e.trim();
802
802
  if (!t) return;
803
- const s = Pa(t);
804
- if (!s || !za(s)) return t;
803
+ const s = Oa(t);
804
+ if (!s || !Pa(s)) return t;
805
805
  const a = new URL(t);
806
- return a.searchParams.get("io") === "true" && a.searchParams.get("size") === qt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", qt), a.toString());
806
+ return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Kt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Kt), a.toString());
807
807
  }
808
- const Fa = [
808
+ const za = [
809
809
  [/pdf/, "pdf"],
810
810
  [/wordprocessingml|msword|\.doc/, "doc"],
811
811
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -819,38 +819,38 @@ function de(e) {
819
819
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
820
820
  }
821
821
  function Nn(e) {
822
- const t = Fa.find(
822
+ const t = za.find(
823
823
  ([s]) => s.test(e)
824
824
  );
825
825
  return t ? t[1] : "generic";
826
826
  }
827
- const $a = {
827
+ const Fa = {
828
828
  video: gn,
829
- audio: Qs,
830
- image: Js,
829
+ audio: Ws,
830
+ image: Ys,
831
831
  document: fn
832
- }, Ba = {
833
- pdf: la,
834
- doc: ia,
835
- xls: ra,
836
- csv: aa,
837
- ppt: sa,
838
- zip: na,
839
- text: ta,
840
- markdown: ea,
832
+ }, $a = {
833
+ pdf: ta,
834
+ doc: ea,
835
+ xls: Qs,
836
+ csv: Js,
837
+ ppt: Zs,
838
+ zip: Ks,
839
+ text: qs,
840
+ markdown: Xs,
841
841
  generic: fn
842
842
  };
843
- function Ua(e) {
843
+ function Ba(e) {
844
844
  const t = de(e);
845
- return t !== "document" ? $a[t] : Ba[Nn(e)];
845
+ return t !== "document" ? Fa[t] : $a[Nn(e)];
846
846
  }
847
- function ve(e, t) {
848
- return z.createElement(Ua(e), t);
847
+ function be(e, t) {
848
+ return z.createElement(Ba(e), t);
849
849
  }
850
- const ja = (e) => {
850
+ const Ua = (e) => {
851
851
  var t, s;
852
852
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
853
- }, Ha = ({
853
+ }, ja = ({
854
854
  source: e,
855
855
  mimeType: t,
856
856
  poster: s,
@@ -862,23 +862,23 @@ const ja = (e) => {
862
862
  muted: d = !1,
863
863
  onContainerClick: u
864
864
  }) => {
865
- const h = de(t), m = H(null), g = H(null), c = H(null), p = H(r), [w, v] = B(a), [x, b] = B(0), [N, _] = B(!1), [T, L] = B(!1), [E, $] = B(!1), [F, R] = B(!1), [I, D] = B(!0), [S, C] = B(null), A = q(() => {
865
+ const h = de(t), m = j(null), g = j(null), c = j(null), p = j(r), [w, v] = B(a), [x, b] = B(0), [N, _] = B(!1), [T, L] = B(!1), [E, $] = B(!1), [F, R] = B(!1), [I, M] = B(!0), [S, C] = B(null), A = Z(() => {
866
866
  $(!1), v(!0);
867
- }, []), P = q((y) => {
868
- const M = g.current;
869
- if (!M) return 0;
870
- const W = M.getBoundingClientRect();
867
+ }, []), P = Z((y) => {
868
+ const D = g.current;
869
+ if (!D) return 0;
870
+ const W = D.getBoundingClientRect();
871
871
  return Math.max(
872
872
  0,
873
- Math.min(1, (ja(y) - W.left) / W.width)
873
+ Math.min(1, (Ua(y) - W.left) / W.width)
874
874
  );
875
- }, []), U = q((y) => {
876
- const M = m.current;
877
- M && M.duration && (M.currentTime = y * M.duration);
878
- }, []), V = (y) => {
875
+ }, []), U = Z((y) => {
876
+ const D = m.current;
877
+ D && D.duration && (D.currentTime = y * D.duration);
878
+ }, []), H = (y) => {
879
879
  y.stopPropagation(), _(!0);
880
- const M = P(y);
881
- b(M), U(M);
880
+ const D = P(y);
881
+ b(D), U(D);
882
882
  };
883
883
  Y(() => {
884
884
  r !== void 0 && r !== p.current && (p.current = r, v(r));
@@ -888,40 +888,40 @@ const ja = (e) => {
888
888
  return;
889
889
  }
890
890
  const y = () => {
891
- const M = m.current;
892
- M && M.duration && !N && b(M.currentTime / M.duration), c.current = requestAnimationFrame(y);
891
+ const D = m.current;
892
+ D && D.duration && !N && b(D.currentTime / D.duration), c.current = requestAnimationFrame(y);
893
893
  };
894
894
  return c.current = requestAnimationFrame(y), () => {
895
895
  c.current !== null && cancelAnimationFrame(c.current);
896
896
  };
897
897
  }, [w, N]), Y(() => {
898
898
  const y = m.current;
899
- y && (w ? y.play().catch((M) => {
899
+ y && (w ? y.play().catch((D) => {
900
900
  v(!1), $(!0);
901
901
  }) : y.pause());
902
902
  }, [w]), Y(() => {
903
903
  if (!N) return;
904
- const y = (W) => b(P(W)), M = (W) => {
904
+ const y = (W) => b(P(W)), D = (W) => {
905
905
  _(!1), U(P(W));
906
906
  };
907
- return window.addEventListener("mousemove", y), window.addEventListener("mouseup", M), window.addEventListener("touchmove", y, { passive: !0 }), window.addEventListener("touchend", M), () => {
908
- window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", M), window.removeEventListener("touchmove", y), window.removeEventListener("touchend", M);
907
+ return window.addEventListener("mousemove", y), window.addEventListener("mouseup", D), window.addEventListener("touchmove", y, { passive: !0 }), window.addEventListener("touchend", D), () => {
908
+ window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", D), window.removeEventListener("touchmove", y), window.removeEventListener("touchend", D);
909
909
  };
910
910
  }, [N, P, U]);
911
- const te = S ? { aspectRatio: String(S) } : void 0, Z = S ? "" : " aspect-video", G = Math.round(x * 100);
911
+ const te = S ? { aspectRatio: String(S) } : void 0, Q = S ? "" : " aspect-video", V = Math.round(x * 100);
912
912
  return /* @__PURE__ */ f(
913
913
  "div",
914
914
  {
915
915
  role: "button",
916
916
  tabIndex: 0,
917
- className: `relative cursor-pointer overflow-hidden bg-black ${Z}`,
917
+ className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
918
918
  style: te,
919
919
  onClick: (y) => {
920
920
  if (u) {
921
921
  u(y);
922
922
  return;
923
923
  }
924
- E || o && v((M) => !M);
924
+ E || o && v((D) => !D);
925
925
  },
926
926
  onKeyDown: (y) => {
927
927
  if (!(y.key !== "Enter" && y.key !== " ")) {
@@ -929,7 +929,7 @@ const ja = (e) => {
929
929
  u(y);
930
930
  return;
931
931
  }
932
- E || o && v((M) => !M);
932
+ E || o && v((D) => !D);
933
933
  }
934
934
  },
935
935
  children: [
@@ -941,7 +941,7 @@ const ja = (e) => {
941
941
  className: "absolute inset-0 h-full w-full object-cover"
942
942
  }
943
943
  ),
944
- !s && (h === "audio" || I) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ve(t, {
944
+ !s && (h === "audio" || I) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: be(t, {
945
945
  className: "size-12 text-black/20",
946
946
  weight: "regular"
947
947
  }) }),
@@ -955,7 +955,7 @@ const ja = (e) => {
955
955
  style: { width: "100%", height: "100%" },
956
956
  onLoadStart: () => R(!0),
957
957
  onCanPlay: () => {
958
- R(!1), D(!1);
958
+ R(!1), M(!1);
959
959
  },
960
960
  onWaiting: () => R(!0),
961
961
  onPlay: () => $(!1),
@@ -975,7 +975,7 @@ const ja = (e) => {
975
975
  style: { width: "100%", height: "100%" },
976
976
  onLoadStart: () => R(!0),
977
977
  onCanPlay: () => {
978
- R(!1), D(!1);
978
+ R(!1), M(!1);
979
979
  },
980
980
  onWaiting: () => R(!0),
981
981
  onPlay: () => $(!1),
@@ -990,7 +990,7 @@ const ja = (e) => {
990
990
  }
991
991
  ) }),
992
992
  F && !E && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
993
- be,
993
+ pe,
994
994
  {
995
995
  className: "size-8 animate-spin text-white/80",
996
996
  weight: "bold"
@@ -1009,7 +1009,7 @@ const ja = (e) => {
1009
1009
  onKeyDown: (y) => {
1010
1010
  y.key !== "Enter" && y.key !== " " || (y.preventDefault(), y.stopPropagation(), A());
1011
1011
  },
1012
- children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(at, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1012
+ children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(rt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1013
1013
  }
1014
1014
  ),
1015
1015
  l && !o && /* @__PURE__ */ n("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__ */ n(
@@ -1017,14 +1017,14 @@ const ja = (e) => {
1017
1017
  {
1018
1018
  role: "slider",
1019
1019
  "aria-label": "Playback position",
1020
- "aria-valuenow": G,
1020
+ "aria-valuenow": V,
1021
1021
  "aria-valuemin": 0,
1022
1022
  "aria-valuemax": 100,
1023
1023
  tabIndex: 0,
1024
1024
  ref: g,
1025
1025
  className: "relative flex h-4 w-full cursor-pointer items-center",
1026
- onMouseDown: V,
1027
- onTouchStart: V,
1026
+ onMouseDown: H,
1027
+ onTouchStart: H,
1028
1028
  onClick: (y) => y.stopPropagation(),
1029
1029
  onKeyDown: (y) => {
1030
1030
  y.key === "ArrowRight" && U(Math.min(1, x + 0.05)), y.key === "ArrowLeft" && U(Math.max(0, x - 0.05));
@@ -1033,7 +1033,7 @@ const ja = (e) => {
1033
1033
  "div",
1034
1034
  {
1035
1035
  className: "h-full rounded-full bg-white",
1036
- style: { width: `${G}%` }
1036
+ style: { width: `${V}%` }
1037
1037
  }
1038
1038
  ) })
1039
1039
  }
@@ -1044,11 +1044,11 @@ const ja = (e) => {
1044
1044
  {
1045
1045
  type: "button",
1046
1046
  onClick: (y) => {
1047
- y.stopPropagation(), v((M) => !M);
1047
+ y.stopPropagation(), v((D) => !D);
1048
1048
  },
1049
1049
  className: "shrink-0 text-white",
1050
1050
  "aria-label": w ? "Pause" : "Play",
1051
- children: w ? /* @__PURE__ */ n(oa, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(at, { className: "size-5 translate-x-px", weight: "fill" })
1051
+ children: w ? /* @__PURE__ */ n(na, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(rt, { className: "size-5 translate-x-px", weight: "fill" })
1052
1052
  }
1053
1053
  ),
1054
1054
  /* @__PURE__ */ f(
@@ -1056,14 +1056,14 @@ const ja = (e) => {
1056
1056
  {
1057
1057
  role: "slider",
1058
1058
  "aria-label": "Playback position",
1059
- "aria-valuenow": G,
1059
+ "aria-valuenow": V,
1060
1060
  "aria-valuemin": 0,
1061
1061
  "aria-valuemax": 100,
1062
1062
  tabIndex: 0,
1063
1063
  ref: g,
1064
1064
  className: "relative flex h-4 w-full cursor-pointer items-center",
1065
- onMouseDown: V,
1066
- onTouchStart: V,
1065
+ onMouseDown: H,
1066
+ onTouchStart: H,
1067
1067
  onClick: (y) => y.stopPropagation(),
1068
1068
  onMouseEnter: () => L(!0),
1069
1069
  onMouseLeave: () => L(!1),
@@ -1079,7 +1079,7 @@ const ja = (e) => {
1079
1079
  "div",
1080
1080
  {
1081
1081
  className: "h-full rounded-full bg-white",
1082
- style: { width: `${G}%` }
1082
+ style: { width: `${V}%` }
1083
1083
  }
1084
1084
  )
1085
1085
  }
@@ -1088,7 +1088,7 @@ const ja = (e) => {
1088
1088
  "div",
1089
1089
  {
1090
1090
  className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || N ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1091
- style: { left: `${G}%` }
1091
+ style: { left: `${V}%` }
1092
1092
  }
1093
1093
  )
1094
1094
  ]
@@ -1098,7 +1098,7 @@ const ja = (e) => {
1098
1098
  ]
1099
1099
  }
1100
1100
  );
1101
- }, Kt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Va = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", kn = ({
1101
+ }, Zt = (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", kn = ({
1102
1102
  mimeType: e,
1103
1103
  sourceUrl: t,
1104
1104
  thumbnailUrl: s,
@@ -1109,7 +1109,7 @@ const ja = (e) => {
1109
1109
  }) => {
1110
1110
  const l = de(e), [d, u] = B(!1), h = ce(t), m = ce(s);
1111
1111
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
1112
- Ha,
1112
+ ja,
1113
1113
  {
1114
1114
  source: t,
1115
1115
  mimeType: e,
@@ -1155,12 +1155,12 @@ const ja = (e) => {
1155
1155
  "div",
1156
1156
  {
1157
1157
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1158
- children: ve(e, {
1159
- className: Kt(r),
1158
+ children: be(e, {
1159
+ className: Zt(r),
1160
1160
  weight: "regular"
1161
1161
  })
1162
1162
  }
1163
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${Va(r)}`, children: /* @__PURE__ */ n(
1163
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${Ha(r)}`, children: /* @__PURE__ */ n(
1164
1164
  "img",
1165
1165
  {
1166
1166
  src: m ?? s,
@@ -1172,8 +1172,8 @@ const ja = (e) => {
1172
1172
  "div",
1173
1173
  {
1174
1174
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1175
- children: ve(e, {
1176
- className: Kt(r),
1175
+ children: be(e, {
1176
+ className: Zt(r),
1177
1177
  weight: "regular"
1178
1178
  })
1179
1179
  }
@@ -1219,7 +1219,7 @@ const ja = (e) => {
1219
1219
  }
1220
1220
  ),
1221
1221
  /* @__PURE__ */ f("div", { className: "flex flex-wrap items-center gap-1", children: [
1222
- ve(r, {
1222
+ be(r, {
1223
1223
  className: k(
1224
1224
  "size-5 shrink-0",
1225
1225
  g ? "text-white/55" : "text-black/55"
@@ -1247,25 +1247,25 @@ const ja = (e) => {
1247
1247
  function Sn(e) {
1248
1248
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1249
1249
  }
1250
- function ot(e) {
1250
+ function ct(e) {
1251
1251
  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)]`;
1252
1252
  }
1253
- function Ga(e) {
1253
+ function Va(e) {
1254
1254
  return e ? "bg-white/10" : "bg-black/5";
1255
1255
  }
1256
- function Ya(e) {
1256
+ function Ga(e) {
1257
1257
  return e ? "text-white" : "text-black";
1258
1258
  }
1259
- function Wa(e) {
1259
+ function Ya(e) {
1260
1260
  return e ? "text-white/55" : "text-black/55";
1261
1261
  }
1262
- function Xa(e) {
1262
+ function Wa(e) {
1263
1263
  return e ? "text-white/40" : "text-black/40";
1264
1264
  }
1265
- function qa(e) {
1265
+ function Xa(e) {
1266
1266
  return e ? "text-white/20" : "text-black/20";
1267
1267
  }
1268
- const ct = ({ attachment: e, isMyMessage: t }) => {
1268
+ const dt = ({ attachment: e, isMyMessage: t }) => {
1269
1269
  const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ f(z.Fragment, { children: [
1270
1270
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1271
1271
  "img",
@@ -1277,29 +1277,29 @@ const ct = ({ attachment: e, isMyMessage: t }) => {
1277
1277
  ) : /* @__PURE__ */ n(
1278
1278
  "div",
1279
1279
  {
1280
- className: `aspect-video w-full rounded-[20px] ${Ga(t)} flex items-center justify-center`,
1281
- children: /* @__PURE__ */ n(ca, { className: `size-12 ${qa(t)}` })
1280
+ className: `aspect-video w-full rounded-[20px] ${Va(t)} flex items-center justify-center`,
1281
+ children: /* @__PURE__ */ n(sa, { className: `size-12 ${Xa(t)}` })
1282
1282
  }
1283
1283
  ) }),
1284
1284
  /* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
1285
1285
  s && /* @__PURE__ */ n(
1286
1286
  "p",
1287
1287
  {
1288
- className: `truncate text-[14px] font-medium leading-5 ${Ya(t)}`,
1288
+ className: `truncate text-[14px] font-medium leading-5 ${Ga(t)}`,
1289
1289
  children: s
1290
1290
  }
1291
1291
  ),
1292
1292
  a && /* @__PURE__ */ n(
1293
1293
  "p",
1294
1294
  {
1295
- className: `truncate text-[12px] leading-4 ${Wa(t)}`,
1295
+ className: `truncate text-[12px] leading-4 ${Ya(t)}`,
1296
1296
  children: a
1297
1297
  }
1298
1298
  ),
1299
1299
  d && /* @__PURE__ */ n(
1300
1300
  "p",
1301
1301
  {
1302
- className: `mt-1 truncate text-[12px] leading-4 ${Xa(t)}`,
1302
+ className: `mt-1 truncate text-[12px] leading-4 ${Wa(t)}`,
1303
1303
  children: d
1304
1304
  }
1305
1305
  )
@@ -1316,14 +1316,15 @@ const ct = ({ attachment: e, isMyMessage: t }) => {
1316
1316
  }
1317
1317
  ) : /* @__PURE__ */ n("div", { className: "block", children: u });
1318
1318
  };
1319
- function En(e) {
1320
- return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1319
+ function Ve(e) {
1320
+ var t;
1321
+ return e.type === "link" || !!((t = e.og_scrape_url) != null && t.trim()) && !e.asset_url;
1321
1322
  }
1322
- function dt(e) {
1323
+ function ut(e) {
1323
1324
  var t;
1324
- return (t = e.attachments) == null ? void 0 : t.find(En);
1325
+ return (t = e.attachments) == null ? void 0 : t.find(Ve);
1325
1326
  }
1326
- async function Ka(e, t) {
1327
+ async function qa(e, t) {
1327
1328
  let s;
1328
1329
  try {
1329
1330
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1335,7 +1336,7 @@ async function Ka(e, t) {
1335
1336
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1336
1337
  o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1337
1338
  }
1338
- const Za = ({
1339
+ const Ka = ({
1339
1340
  url: e,
1340
1341
  filename: t
1341
1342
  }) => {
@@ -1347,7 +1348,7 @@ const Za = ({
1347
1348
  onClick: (i) => {
1348
1349
  i.stopPropagation();
1349
1350
  const o = window.open("", "_blank", "noopener,noreferrer");
1350
- a(!0), Ka(e, t).then(() => {
1351
+ a(!0), qa(e, t).then(() => {
1351
1352
  o == null || o.close();
1352
1353
  }).catch(() => {
1353
1354
  o && (o.location.href = e);
@@ -1356,19 +1357,19 @@ const Za = ({
1356
1357
  disabled: s,
1357
1358
  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",
1358
1359
  children: s ? /* @__PURE__ */ n(
1359
- be,
1360
+ pe,
1360
1361
  {
1361
1362
  className: "size-4 animate-spin text-white",
1362
1363
  weight: "bold"
1363
1364
  }
1364
1365
  ) : /* @__PURE__ */ f(z.Fragment, { children: [
1365
- /* @__PURE__ */ n(Se, { className: "size-4 text-white", weight: "bold" }),
1366
+ /* @__PURE__ */ n(Ce, { className: "size-4 text-white", weight: "bold" }),
1366
1367
  "Download"
1367
1368
  ] })
1368
1369
  }
1369
1370
  );
1370
1371
  };
1371
- function ut(e) {
1372
+ function mt(e) {
1372
1373
  var m, g, c, p;
1373
1374
  const t = (m = e.attachments) == null ? void 0 : m.find(
1374
1375
  (w) => w.type === "video" && w.asset_url
@@ -1389,7 +1390,7 @@ function ut(e) {
1389
1390
  thumbnailUrl: h
1390
1391
  };
1391
1392
  }
1392
- const In = ({
1393
+ const En = ({
1393
1394
  resolvedUrl: e,
1394
1395
  resolvedType: t,
1395
1396
  title: s,
@@ -1417,7 +1418,7 @@ const In = ({
1417
1418
  )
1418
1419
  }
1419
1420
  );
1420
- }, Tn = ({
1421
+ }, In = ({
1421
1422
  resolvedUrl: e,
1422
1423
  resolvedType: t,
1423
1424
  title: s,
@@ -1443,17 +1444,17 @@ const In = ({
1443
1444
  containedImage: i === "image" || i === "document"
1444
1445
  }
1445
1446
  ),
1446
- action: /* @__PURE__ */ n(Za, { url: e, filename: s })
1447
+ action: /* @__PURE__ */ n(Ka, { url: e, filename: s })
1447
1448
  }
1448
1449
  );
1449
- }, Ja = ({
1450
+ }, Za = ({
1450
1451
  message: e,
1451
1452
  isMyMessage: t = !1
1452
1453
  }) => {
1453
- const s = dt(e), a = ut(e);
1454
+ const s = ut(e), a = mt(e);
1454
1455
  return !s && !a ? null : /* @__PURE__ */ f("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: [
1455
1456
  !t && e.user && /* @__PURE__ */ n(
1456
- _e,
1457
+ we,
1457
1458
  {
1458
1459
  className: "str-chat__avatar str-chat__message-sender-avatar",
1459
1460
  id: e.user.id,
@@ -1477,52 +1478,52 @@ const In = ({
1477
1478
  overflow: "visible",
1478
1479
  background: "transparent"
1479
1480
  },
1480
- children: s ? /* @__PURE__ */ n("div", { className: ot(t), children: /* @__PURE__ */ n(
1481
- ct,
1481
+ children: s ? /* @__PURE__ */ n("div", { className: ct(t), children: /* @__PURE__ */ n(
1482
+ dt,
1482
1483
  {
1483
1484
  attachment: s,
1484
1485
  isMyMessage: t
1485
1486
  }
1486
- ) }) : t ? /* @__PURE__ */ n(In, { ...a }) : /* @__PURE__ */ n(Tn, { ...a })
1487
+ ) }) : t ? /* @__PURE__ */ n(En, { ...a }) : /* @__PURE__ */ n(In, { ...a })
1487
1488
  }
1488
1489
  ) })
1489
1490
  }
1490
1491
  )
1491
1492
  ] });
1492
- }, Qa = ({
1493
+ }, Ja = ({
1493
1494
  message: e
1494
1495
  }) => {
1495
- const t = dt(e);
1496
+ const t = ut(e);
1496
1497
  if (t)
1497
- return /* @__PURE__ */ n("div", { className: ot(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ct, { attachment: t, isMyMessage: !0 }) });
1498
- const s = ut(e);
1499
- return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(In, { ...s }) }) : null;
1500
- }, er = ({
1498
+ return /* @__PURE__ */ n("div", { className: ct(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !0 }) });
1499
+ const s = mt(e);
1500
+ return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(En, { ...s }) }) : null;
1501
+ }, Qa = ({
1501
1502
  message: e
1502
1503
  }) => {
1503
- const t = dt(e);
1504
+ const t = ut(e);
1504
1505
  if (t)
1505
- return /* @__PURE__ */ n("div", { className: ot(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ct, { attachment: t, isMyMessage: !1 }) });
1506
- const s = ut(e);
1507
- return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Tn, { ...s }) }) : null;
1508
- }, to = Object.assign(Ja, {
1509
- Creator: Qa,
1510
- Visitor: er
1511
- }), tr = {
1506
+ return /* @__PURE__ */ n("div", { className: ct(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !1 }) });
1507
+ const s = mt(e);
1508
+ return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(In, { ...s }) }) : null;
1509
+ }, eo = Object.assign(Za, {
1510
+ Creator: Ja,
1511
+ Visitor: Qa
1512
+ }), er = {
1512
1513
  isUnlocking: () => !1
1513
- }, nr = {
1514
- LockedAttachment: tr
1515
- }, An = je({}), no = An.Provider;
1516
- function sr(e) {
1517
- return xe(An)[e] ?? nr[e];
1514
+ }, tr = {
1515
+ LockedAttachment: er
1516
+ }, Tn = je({}), to = Tn.Provider;
1517
+ function nr(e) {
1518
+ return ve(Tn)[e] ?? tr[e];
1518
1519
  }
1519
- const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import("./Card-CQShGiad.js")), ir = () => /* @__PURE__ */ n(
1520
+ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import("./Card-CBj04-pC.js")), rr = () => /* @__PURE__ */ n(
1520
1521
  "div",
1521
1522
  {
1522
1523
  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)]",
1523
1524
  "aria-hidden": !0
1524
1525
  }
1525
- ), Pe = (e) => /* @__PURE__ */ n(is, { fallback: /* @__PURE__ */ n(ir, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(ar, { ...e }) : /* @__PURE__ */ n(rr, { ...e }) }), lr = ({ size: e = 15 }) => /* @__PURE__ */ n(
1526
+ ), Pe = (e) => /* @__PURE__ */ n(as, { fallback: /* @__PURE__ */ n(rr, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(sr, { ...e }) : /* @__PURE__ */ n(ar, { ...e }) }), ir = ({ size: e = 15 }) => /* @__PURE__ */ n(
1526
1527
  "svg",
1527
1528
  {
1528
1529
  width: e,
@@ -1539,62 +1540,62 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1539
1540
  }
1540
1541
  )
1541
1542
  }
1542
- ), or = (e) => {
1543
+ ), lr = (e) => {
1543
1544
  var t;
1544
1545
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.TIP;
1545
- }, Rn = (e) => {
1546
+ }, An = (e) => {
1546
1547
  var t;
1547
1548
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.PAID;
1548
1549
  }, Fe = (e) => {
1549
1550
  var t;
1550
1551
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.CHATBOT;
1551
- }, mt = (e) => {
1552
+ }, ht = (e) => {
1552
1553
  var t;
1553
1554
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.ATTACHMENT;
1554
- }, cr = (e) => {
1555
+ }, or = (e) => {
1555
1556
  var t;
1556
- return mt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
1557
- }, dr = (e) => {
1557
+ return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
1558
+ }, cr = (e) => {
1558
1559
  var t;
1559
- return mt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
1560
- }, Ln = (e) => or(e) || Rn(e), ur = (e) => {
1560
+ return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
1561
+ }, Rn = (e) => lr(e) || An(e), dr = (e) => {
1561
1562
  var t;
1562
- return Ln(e) && !((t = e.text) != null && t.trim());
1563
- }, Ke = ({
1563
+ return Rn(e) && !((t = e.text) != null && t.trim());
1564
+ }, Ze = ({
1564
1565
  message: e,
1565
1566
  standalone: t = !1,
1566
1567
  isMyMessage: s = !1,
1567
1568
  hasAttachment: a = !1
1568
1569
  }) => {
1569
1570
  var g;
1570
- const r = Ln(e), i = Fe(e);
1571
+ const r = Rn(e), i = Fe(e);
1571
1572
  if (!r && !i)
1572
1573
  return null;
1573
1574
  if (r) {
1574
1575
  const c = (g = e.metadata) == null ? void 0 : g.amount_text;
1575
1576
  if (!c) return null;
1576
- const p = t ? "message-tip-standalone inline-flex items-center gap-1.5 px-3.5 py-2.5 rounded-[18px] text-[14px] font-medium text-[#016e1a] bg-[#dbf0e0]" : "message-tag--tip inline-flex items-center gap-1 text-[12px] leading-[2] font-medium text-[#016630]", w = Rn(e) ? "message" : "tip", v = t ? `${c} ${w}` : `Delivered with ${c} ${w}`;
1577
+ const p = t ? "message-tip-standalone inline-flex items-center gap-1.5 px-3.5 py-2.5 rounded-[18px] text-[14px] font-medium text-[#016e1a] bg-[#dbf0e0]" : "message-tag--tip inline-flex items-center gap-1 text-[12px] leading-[2] font-medium text-[#016630]", w = An(e) ? "message" : "tip", v = t ? `${c} ${w}` : `Delivered with ${c} ${w}`;
1577
1578
  return /* @__PURE__ */ f("div", { className: p, children: [
1578
- /* @__PURE__ */ n(da, { size: t ? 14 : 12 }),
1579
+ /* @__PURE__ */ n(aa, { size: t ? 14 : 12 }),
1579
1580
  /* @__PURE__ */ n("span", { children: v })
1580
1581
  ] });
1581
1582
  }
1582
- const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = o ? "justify-end gap-2 text-black/30" : s ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ n("span", { className: "text-left", children: l }), m = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(lr, { size: o ? 12 : 15 }) });
1583
+ const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = o ? "justify-end gap-2 text-black/30" : s ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ n("span", { className: "text-left", children: l }), m = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(ir, { size: o ? 12 : 15 }) });
1583
1584
  return /* @__PURE__ */ n(
1584
1585
  "div",
1585
1586
  {
1586
1587
  className: `${d} ${u}`,
1587
1588
  "data-testid": "message-chatbot-indicator",
1588
- children: s && !o ? /* @__PURE__ */ f(K, { children: [
1589
+ children: s && !o ? /* @__PURE__ */ f(J, { children: [
1589
1590
  h,
1590
1591
  m
1591
- ] }) : /* @__PURE__ */ f(K, { children: [
1592
+ ] }) : /* @__PURE__ */ f(J, { children: [
1592
1593
  m,
1593
1594
  h
1594
1595
  ] })
1595
1596
  }
1596
1597
  );
1597
- }, Zt = `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%`, mr = {
1598
+ }, Jt = `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%`, ur = {
1598
1599
  me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
1599
1600
  other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
1600
1601
  }, $e = ({ side: e }) => /* @__PURE__ */ n(
@@ -1607,24 +1608,24 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1607
1608
  insetInlineStart: e === "other" ? "calc(-1 * 0.3125rem)" : void 0,
1608
1609
  transform: e === "other" ? "scaleX(-1)" : void 0,
1609
1610
  transformOrigin: "center",
1610
- backgroundColor: mr[e],
1611
- WebkitMask: Zt,
1612
- mask: Zt
1611
+ backgroundColor: ur[e],
1612
+ WebkitMask: Jt,
1613
+ mask: Jt
1613
1614
  }
1614
1615
  }
1615
- ), Mn = je(
1616
+ ), Ln = je(
1616
1617
  void 0
1617
- ), hr = (e) => {
1618
+ ), mr = (e) => {
1618
1619
  var s;
1619
1620
  const t = (s = e.metadata) == null ? void 0 : s.outbound_id;
1620
1621
  return typeof t == "string" ? t : void 0;
1621
- }, fr = (e, t) => {
1622
+ }, hr = (e, t) => {
1622
1623
  if (!t || !(e != null && e.length))
1623
1624
  return;
1624
1625
  const s = /* @__PURE__ */ new Set();
1625
1626
  let a;
1626
1627
  for (const r of e) {
1627
- const i = hr(r);
1628
+ const i = mr(r);
1628
1629
  if (!i || s.has(i))
1629
1630
  continue;
1630
1631
  s.add(i);
@@ -1635,7 +1636,7 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1635
1636
  });
1636
1637
  }
1637
1638
  return a;
1638
- }, gr = (e, t) => {
1639
+ }, fr = (e, t) => {
1639
1640
  if (e === t)
1640
1641
  return !0;
1641
1642
  if (!e || !t)
@@ -1647,11 +1648,11 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1647
1648
  return e[r].id === ((i = t[r]) == null ? void 0 : i.id) && e[r].name === ((o = t[r]) == null ? void 0 : o.name);
1648
1649
  }
1649
1650
  );
1650
- }, pr = (e, t) => {
1651
- const s = fr(e, t), [a, r] = B(s);
1652
- return gr(a, s) ? a : (r(s), s);
1653
- }, ht = () => {
1654
- const { message: e } = fe("SentMessageDeliveryStatus"), { messages: t } = we("SentMessageDeliveryStatus"), s = (() => {
1651
+ }, gr = (e, t) => {
1652
+ const s = hr(e, t), [a, r] = B(s);
1653
+ return fr(a, s) ? a : (r(s), s);
1654
+ }, ft = () => {
1655
+ const { message: e } = he("SentMessageDeliveryStatus"), { messages: t } = xe("SentMessageDeliveryStatus"), s = (() => {
1655
1656
  if (t)
1656
1657
  for (let a = t.length - 1; a >= 0; a -= 1) {
1657
1658
  const r = t[a];
@@ -1660,12 +1661,12 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1660
1661
  }
1661
1662
  })();
1662
1663
  return e.id === s;
1663
- }, Ze = () => ht() ? /* @__PURE__ */ f(K, { children: [
1664
- /* @__PURE__ */ n(ha, { weight: "bold", "aria-hidden": "true" }),
1664
+ }, Je = () => ft() ? /* @__PURE__ */ f(J, { children: [
1665
+ /* @__PURE__ */ n(la, { weight: "bold", "aria-hidden": "true" }),
1665
1666
  /* @__PURE__ */ n("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
1666
- ] }) : null, br = () => ht() ? /* @__PURE__ */ f(K, { children: [
1667
+ ] }) : null, pr = () => ft() ? /* @__PURE__ */ f(J, { children: [
1667
1668
  /* @__PURE__ */ n(
1668
- be,
1669
+ pe,
1669
1670
  {
1670
1671
  className: "sent-message-status__spinner animate-spin",
1671
1672
  weight: "bold",
@@ -1673,12 +1674,12 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1673
1674
  }
1674
1675
  ),
1675
1676
  /* @__PURE__ */ n("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
1676
- ] }) : null, vr = ({
1677
+ ] }) : null, br = ({
1677
1678
  outbound: e,
1678
1679
  onOutboundClick: t
1679
1680
  }) => {
1680
- const s = e.name || "Broadcast", r = /* @__PURE__ */ f(K, { children: [
1681
- /* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(ma, { weight: "fill" }) }),
1681
+ const s = e.name || "Broadcast", r = /* @__PURE__ */ f(J, { children: [
1682
+ /* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(ia, { weight: "fill" }) }),
1682
1683
  /* @__PURE__ */ n(
1683
1684
  "span",
1684
1685
  {
@@ -1700,36 +1701,36 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1700
1701
  children: r
1701
1702
  }
1702
1703
  ) : r;
1703
- }, xr = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
1704
- /* @__PURE__ */ n(ua, { weight: "bold", "aria-hidden": "true" }),
1704
+ }, vr = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
1705
+ /* @__PURE__ */ n(ra, { weight: "bold", "aria-hidden": "true" }),
1705
1706
  /* @__PURE__ */ n("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
1706
- ] }), wr = ({
1707
+ ] }), xr = ({
1707
1708
  onOutboundClick: e,
1708
1709
  resolvedOutbound: t
1709
1710
  }) => {
1710
1711
  var h;
1711
- const { isMyMessage: s, message: a, threadList: r } = fe(
1712
+ const { isMyMessage: s, message: a, threadList: r } = he(
1712
1713
  "SentMessageDeliveryStatus"
1713
- ), i = s(), o = ht();
1714
+ ), i = s(), o = ft();
1714
1715
  if (r)
1715
1716
  return null;
1716
1717
  if (a.status === "failed" && i && a.type !== "error")
1717
- return /* @__PURE__ */ n(xr, {});
1718
+ return /* @__PURE__ */ n(vr, {});
1718
1719
  if (!i)
1719
1720
  return null;
1720
1721
  const l = (h = a.metadata) == null ? void 0 : h.outbound_id, d = a.status !== "sending" && a.status !== "failed" && l && t ? /* @__PURE__ */ n(
1721
- vr,
1722
+ br,
1722
1723
  {
1723
1724
  outbound: t,
1724
1725
  onOutboundClick: e
1725
1726
  }
1726
1727
  ) : null, u = /* @__PURE__ */ n(
1727
- us,
1728
+ cs,
1728
1729
  {
1729
- MessageSentStatus: Ze,
1730
- MessageDeliveredStatus: Ze,
1731
- MessageReadStatus: Ze,
1732
- MessageSendingStatus: br
1730
+ MessageSentStatus: Je,
1731
+ MessageDeliveredStatus: Je,
1732
+ MessageReadStatus: Je,
1733
+ MessageSendingStatus: pr
1733
1734
  }
1734
1735
  );
1735
1736
  return d ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
@@ -1737,19 +1738,19 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
1737
1738
  o && /* @__PURE__ */ n("span", { className: "sent-message-outbound-separator", "aria-hidden": "true", children: "•" }),
1738
1739
  d
1739
1740
  ] }) : u;
1740
- }, _r = /^([a-z][a-z0-9+.-]*):/i, yr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
1741
- function ft(e) {
1741
+ }, wr = /^([a-z][a-z0-9+.-]*):/i, _r = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
1742
+ function gt(e) {
1742
1743
  if (typeof e != "string") return;
1743
1744
  const t = e.trim();
1744
1745
  if (t === "") return;
1745
- const s = _r.exec(t);
1746
+ const s = wr.exec(t);
1746
1747
  if (s) {
1747
1748
  const a = s[1].toLowerCase();
1748
- return yr.has(a) ? t : void 0;
1749
+ return _r.has(a) ? t : void 0;
1749
1750
  }
1750
1751
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
1751
1752
  }
1752
- const Nr = {
1753
+ const yr = {
1753
1754
  dark: {
1754
1755
  primary: "bg-white text-[#121110] hover:bg-white/90",
1755
1756
  secondary: "bg-white/15 text-white hover:bg-white/25"
@@ -1758,7 +1759,7 @@ const Nr = {
1758
1759
  primary: "bg-[#121110] text-white hover:bg-[#2a2928]",
1759
1760
  secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
1760
1761
  }
1761
- }, Dn = ({
1762
+ }, Mn = ({
1762
1763
  variant: e,
1763
1764
  cta: t,
1764
1765
  fullWidth: s = !0,
@@ -1768,8 +1769,8 @@ const Nr = {
1768
1769
  "inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
1769
1770
  s ? "w-full" : "min-w-0",
1770
1771
  !a && "mt-2",
1771
- Nr[e][r]
1772
- ), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = ft(t.href);
1772
+ yr[e][r]
1773
+ ), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = gt(t.href);
1773
1774
  return l ? /* @__PURE__ */ n(
1774
1775
  "a",
1775
1776
  {
@@ -1795,16 +1796,16 @@ const Nr = {
1795
1796
  children: o
1796
1797
  }
1797
1798
  );
1798
- }, kr = {
1799
+ }, Nr = {
1799
1800
  dark: "text-white",
1800
1801
  light: "text-black/90"
1801
- }, Cr = "text-white/30", Jt = {
1802
+ }, kr = "text-white/30", Qt = {
1802
1803
  dark: "text-white/55",
1803
1804
  light: "text-black/55"
1804
- }, Sr = {
1805
+ }, Cr = {
1805
1806
  dark: "bg-white/25",
1806
1807
  light: "bg-black/15"
1807
- }, gt = ({
1808
+ }, pt = ({
1808
1809
  variant: e,
1809
1810
  ctaSurface: t,
1810
1811
  chinTextColor: s,
@@ -1823,19 +1824,19 @@ const Nr = {
1823
1824
  return null;
1824
1825
  const N = g && !a, _ = k(
1825
1826
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
1826
- s == null && (N ? Cr : kr[e])
1827
+ s == null && (N ? kr : Nr[e])
1827
1828
  ), T = k(
1828
1829
  "truncate text-[12px] leading-4 tracking-[0.24px]",
1829
- s == null && Jt[e]
1830
+ s == null && Qt[e]
1830
1831
  ), L = k(
1831
1832
  "text-[12px] leading-4 tracking-[0.24px]",
1832
1833
  o <= 1 && "truncate",
1833
- s == null && Jt[e]
1834
+ s == null && Qt[e]
1834
1835
  );
1835
1836
  if (m) {
1836
1837
  const F = k(
1837
1838
  "animate-pulse rounded",
1838
- Sr[e]
1839
+ Cr[e]
1839
1840
  );
1840
1841
  return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
1841
1842
  /* @__PURE__ */ n("div", { className: k("h-5 w-3/4", F), "aria-hidden": !0 }),
@@ -1868,17 +1869,14 @@ const Nr = {
1868
1869
  ] }),
1869
1870
  h && /* @__PURE__ */ n("div", { className: "shrink-0", children: h })
1870
1871
  ] }),
1871
- u && /* @__PURE__ */ n(Dn, { variant: t ?? e, cta: u })
1872
+ u && /* @__PURE__ */ n(Mn, { variant: t ?? e, cta: u })
1872
1873
  ] });
1873
- }, Er = "Loading link preview", Ir = k(
1874
- // Width is a channel-scoped token: default 290px, but a read-only surface with no
1875
- // composer (the official channel) sets `--lt-msg-card-width` on its root to widen the
1876
- // content column (see ChannelView). Consumers that don't set the var keep 290px.
1877
- "relative w-[var(--lt-msg-card-width,290px)] select-none overflow-hidden",
1874
+ }, Sr = "Loading link preview", Er = k(
1875
+ "relative w-[290px] select-none overflow-hidden",
1878
1876
  // 20px corners — no token exists for it in the component-library preset,
1879
1877
  // whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
1880
1878
  "rounded-[20px]"
1881
- ), Tr = "flex h-[250px] flex-col", Ee = ({
1879
+ ), Ir = "flex h-[250px] flex-col", Se = ({
1882
1880
  variant: e,
1883
1881
  children: t,
1884
1882
  href: s,
@@ -1894,8 +1892,8 @@ const Nr = {
1894
1892
  }) => {
1895
1893
  const g = s != null || a != null, c = k(
1896
1894
  "messaging-link-card",
1897
- Ir,
1898
- u ? Tr : "block",
1895
+ Er,
1896
+ u ? Ir : "block",
1899
1897
  // The plain fallback fill, kept underneath the `--accent` derivation: the
1900
1898
  // `.messaging-link-card[style*='--accent']` rule in `styles.css` outranks
1901
1899
  // this single class, so a published accent paints over it and an unset one
@@ -1917,7 +1915,7 @@ const Nr = {
1917
1915
  // tailwind preset — outline-none + a black 2px focus-visible ring
1918
1916
  // with offset, so keyboard users can see the focused card.
1919
1917
  g ? "cursor-pointer no-underline focus-ring" : null
1920
- ), p = h ? { role: "status", "aria-busy": !0, "aria-label": Er } : void 0, w = d ? { "--accent": d } : void 0, v = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
1918
+ ), p = h ? { role: "status", "aria-busy": !0, "aria-label": Sr } : void 0, w = d ? { "--accent": d } : void 0, v = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
1921
1919
  return s ? /* @__PURE__ */ f(
1922
1920
  "a",
1923
1921
  {
@@ -1968,17 +1966,17 @@ const Nr = {
1968
1966
  ]
1969
1967
  }
1970
1968
  );
1971
- }, Qt = {
1969
+ }, en = {
1972
1970
  dark: "bg-white/10",
1973
1971
  light: "bg-black/5"
1974
- }, Ar = {
1972
+ }, Tr = {
1975
1973
  dark: "size-16 text-white/25",
1976
1974
  light: "size-16 text-black/25"
1977
- }, Te = (e, t) => !!t && !!e && de(e) === "audio", pt = (e, t) => {
1975
+ }, Ie = (e, t) => !!t && !!e && de(e) === "audio", bt = (e, t) => {
1978
1976
  if (!t || !e) return !1;
1979
1977
  const s = de(e);
1980
1978
  return s === "video" || s === "audio";
1981
- }, bt = "bg-[#F2F3F4]", Ie = ({
1979
+ }, vt = "bg-[#F2F3F4]", Ee = ({
1982
1980
  variant: e,
1983
1981
  thumbnailUrl: t,
1984
1982
  sourceUrl: s,
@@ -1990,7 +1988,7 @@ const Nr = {
1990
1988
  onImageError: d
1991
1989
  }) => {
1992
1990
  const u = de(r), h = !!s && u === "video", m = ce(t);
1993
- return !l && Te(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
1991
+ return !l && Ie(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
1994
1992
  "audio",
1995
1993
  {
1996
1994
  src: s,
@@ -2021,12 +2019,12 @@ const Nr = {
2021
2019
  {
2022
2020
  className: k(
2023
2021
  "h-full w-full animate-pulse",
2024
- Qt[e]
2022
+ en[e]
2025
2023
  ),
2026
2024
  "aria-hidden": !0
2027
2025
  }
2028
2026
  )
2029
- ) : h ? /* @__PURE__ */ f(K, { children: [
2027
+ ) : h ? /* @__PURE__ */ f(J, { children: [
2030
2028
  /* @__PURE__ */ n(
2031
2029
  "video",
2032
2030
  {
@@ -2065,10 +2063,10 @@ const Nr = {
2065
2063
  {
2066
2064
  className: k(
2067
2065
  "flex h-full w-full items-center justify-center",
2068
- Qt[e]
2066
+ en[e]
2069
2067
  ),
2070
- children: ve(r, {
2071
- className: Ar[e],
2068
+ children: be(r, {
2069
+ className: Tr[e],
2072
2070
  weight: "regular"
2073
2071
  })
2074
2072
  }
@@ -2078,16 +2076,16 @@ const Nr = {
2078
2076
  ]
2079
2077
  }
2080
2078
  );
2081
- }, Rr = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2082
- function Lr(e) {
2079
+ }, Ar = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2080
+ function Rr(e) {
2083
2081
  const t = e.trim();
2084
2082
  return t.startsWith("#") ? t : `#${t}`;
2085
2083
  }
2086
- const Mr = "#FFFFFF", On = "#040403", Dr = {
2087
- dark: Mr,
2088
- light: On
2084
+ const Lr = "#FFFFFF", Dn = "#040403", Mr = {
2085
+ dark: Lr,
2086
+ light: Dn
2089
2087
  };
2090
- function Ve({
2088
+ function Ge({
2091
2089
  variant: e,
2092
2090
  accentColor: t,
2093
2091
  status: s = "ready",
@@ -2102,7 +2100,7 @@ function Ve({
2102
2100
  }, [r]);
2103
2101
  const u = z.useCallback(() => {
2104
2102
  d(!0);
2105
- }, []), h = Te(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Rr.test(t.trim()) ? Lr(t) : void 0, p = h ? On : Dr[e];
2103
+ }, []), h = Ie(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Ar.test(t.trim()) ? Rr(t) : void 0, p = h ? Dn : Mr[e];
2106
2104
  return {
2107
2105
  thumbnailUrl: l ? void 0 : r,
2108
2106
  accentHex: c,
@@ -2112,7 +2110,7 @@ function Ve({
2112
2110
  onImageError: u
2113
2111
  };
2114
2112
  }
2115
- const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Pr = "relative before:absolute before:-inset-[10px] before:content-['']", zr = ({
2113
+ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Or = "relative before:absolute before:-inset-[10px] before:content-['']", Pr = ({
2116
2114
  title: e,
2117
2115
  placeholderTitle: t,
2118
2116
  description: s,
@@ -2130,7 +2128,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2130
2128
  onEditClick: p,
2131
2129
  dismissLabel: w = "Dismiss attachment"
2132
2130
  }) => {
2133
- const v = d === "classic", x = Te(i, l), b = Ve({
2131
+ const v = d === "classic", x = Ie(i, l), b = Ge({
2134
2132
  variant: "dark",
2135
2133
  accentColor: m,
2136
2134
  status: g,
@@ -2145,10 +2143,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2145
2143
  onClick: c,
2146
2144
  "aria-label": w,
2147
2145
  className: k(
2148
- Or,
2149
- !x && Pr
2146
+ Dr,
2147
+ !x && Or
2150
2148
  ),
2151
- children: /* @__PURE__ */ n(it, { className: "size-3", weight: "bold" })
2149
+ children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
2152
2150
  }
2153
2151
  ) : void 0, _ = p ? /* @__PURE__ */ n(
2154
2152
  "button",
@@ -2157,12 +2155,12 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2157
2155
  onClick: p,
2158
2156
  "aria-label": "Edit attachment",
2159
2157
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
2160
- children: /* @__PURE__ */ n(fa, { className: "size-5", weight: "regular" })
2158
+ children: /* @__PURE__ */ n(oa, { className: "size-5", weight: "regular" })
2161
2159
  }
2162
2160
  ) : void 0;
2163
- return x && !b.isLoading ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: bt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
2161
+ return x && !b.isLoading ? /* @__PURE__ */ n(Se, { variant: "dark", bgClassName: vt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
2164
2162
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
2165
- Ie,
2163
+ Ee,
2166
2164
  {
2167
2165
  variant: "dark",
2168
2166
  sourceUrl: l,
@@ -2172,7 +2170,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2172
2170
  ) }),
2173
2171
  N && /* @__PURE__ */ n("div", { className: "shrink-0", children: N })
2174
2172
  ] }) }) : /* @__PURE__ */ f(
2175
- Ee,
2173
+ Se,
2176
2174
  {
2177
2175
  variant: "dark",
2178
2176
  fixedHeight: !v,
@@ -2181,7 +2179,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2181
2179
  topRight: v ? N : void 0,
2182
2180
  children: [
2183
2181
  !v && /* @__PURE__ */ n(
2184
- Ie,
2182
+ Ee,
2185
2183
  {
2186
2184
  variant: "dark",
2187
2185
  thumbnailUrl: b.thumbnailUrl,
@@ -2194,7 +2192,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2194
2192
  }
2195
2193
  ),
2196
2194
  /* @__PURE__ */ n(
2197
- gt,
2195
+ pt,
2198
2196
  {
2199
2197
  chinTextColor: b.chinTextColor,
2200
2198
  variant: "dark",
@@ -2213,7 +2211,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2213
2211
  ]
2214
2212
  }
2215
2213
  );
2216
- }, vt = ({
2214
+ }, xt = ({
2217
2215
  accentHex: e,
2218
2216
  side: t,
2219
2217
  visible: s,
@@ -2238,7 +2236,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2238
2236
  }
2239
2237
  )
2240
2238
  ] })
2241
- ) : /* @__PURE__ */ n(K, { children: a }), Fr = ({
2239
+ ) : /* @__PURE__ */ n(J, { children: a }), zr = ({
2242
2240
  title: e,
2243
2241
  description: t,
2244
2242
  descriptionLines: s,
@@ -2254,13 +2252,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2254
2252
  onClick: g,
2255
2253
  groupPosition: c = "single"
2256
2254
  }) => {
2257
- const p = pt(r, o), w = ft(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Te(r, o) ? bt : void 0, N = u && g ? {
2255
+ const p = bt(r, o), w = gt(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Ie(r, o) ? vt : void 0, N = u && g ? {
2258
2256
  ...u,
2259
2257
  onClick: () => {
2260
2258
  var T;
2261
2259
  g(), (T = u.onClick) == null || T.call(u);
2262
2260
  }
2263
- } : u, _ = Ve({
2261
+ } : u, _ = Ge({
2264
2262
  variant: "light",
2265
2263
  accentColor: h,
2266
2264
  status: m,
@@ -2270,13 +2268,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2270
2268
  sourceUrl: o
2271
2269
  });
2272
2270
  return /* @__PURE__ */ n(
2273
- vt,
2271
+ xt,
2274
2272
  {
2275
2273
  accentHex: _.accentHex,
2276
2274
  side: "receiver",
2277
2275
  visible: b == null && (c === "single" || c === "end"),
2278
2276
  children: /* @__PURE__ */ f(
2279
- Ee,
2277
+ Se,
2280
2278
  {
2281
2279
  variant: "light",
2282
2280
  href: v,
@@ -2289,7 +2287,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2289
2287
  "data-testid": "link-attachment",
2290
2288
  children: [
2291
2289
  l === "featured" && /* @__PURE__ */ n(
2292
- Ie,
2290
+ Ee,
2293
2291
  {
2294
2292
  variant: "light",
2295
2293
  thumbnailUrl: _.thumbnailUrl,
@@ -2301,7 +2299,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2301
2299
  }
2302
2300
  ),
2303
2301
  /* @__PURE__ */ n(
2304
- gt,
2302
+ pt,
2305
2303
  {
2306
2304
  chinTextColor: _.chinTextColor,
2307
2305
  variant: "light",
@@ -2320,7 +2318,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2320
2318
  )
2321
2319
  }
2322
2320
  );
2323
- }, $r = ({
2321
+ }, Fr = ({
2324
2322
  title: e,
2325
2323
  placeholderTitle: t,
2326
2324
  description: s,
@@ -2337,7 +2335,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2337
2335
  onClick: c,
2338
2336
  groupPosition: p = "single"
2339
2337
  }) => {
2340
- const w = pt(i, l), v = ft(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, N = g !== "loading" && Te(i, l), _ = Ve({
2338
+ const w = bt(i, l), v = gt(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, N = g !== "loading" && Ie(i, l), _ = Ge({
2341
2339
  variant: "dark",
2342
2340
  accentColor: m,
2343
2341
  status: g,
@@ -2347,13 +2345,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2347
2345
  sourceUrl: l
2348
2346
  });
2349
2347
  return /* @__PURE__ */ n(
2350
- vt,
2348
+ xt,
2351
2349
  {
2352
2350
  accentHex: _.accentHex,
2353
2351
  side: "sender",
2354
2352
  visible: !N && (p === "single" || p === "end"),
2355
2353
  children: /* @__PURE__ */ f(
2356
- Ee,
2354
+ Se,
2357
2355
  {
2358
2356
  variant: "dark",
2359
2357
  href: x,
@@ -2361,10 +2359,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2361
2359
  fixedHeight: d === "featured" && !N,
2362
2360
  accentHex: _.accentHex,
2363
2361
  busy: _.isLoading,
2364
- bgClassName: N ? bt : void 0,
2362
+ bgClassName: N ? vt : void 0,
2365
2363
  children: [
2366
2364
  d === "featured" && /* @__PURE__ */ n(
2367
- Ie,
2365
+ Ee,
2368
2366
  {
2369
2367
  variant: "dark",
2370
2368
  thumbnailUrl: _.thumbnailUrl,
@@ -2376,7 +2374,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2376
2374
  }
2377
2375
  ),
2378
2376
  /* @__PURE__ */ n(
2379
- gt,
2377
+ pt,
2380
2378
  {
2381
2379
  chinTextColor: _.chinTextColor,
2382
2380
  variant: "dark",
@@ -2396,20 +2394,20 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2396
2394
  )
2397
2395
  }
2398
2396
  );
2399
- }, rt = {
2400
- Composer: zr,
2401
- Sent: $r,
2402
- Received: Fr
2403
- }, Br = {
2397
+ }, it = {
2398
+ Composer: Pr,
2399
+ Sent: Fr,
2400
+ Received: zr
2401
+ }, $r = {
2404
2402
  dark: "bg-[#1e2330]",
2405
2403
  light: "bg-[#f2f1ef]"
2406
- }, Ur = {
2404
+ }, Br = {
2407
2405
  dark: "text-white",
2408
2406
  light: "text-[#000000]"
2409
- }, jr = {
2407
+ }, Ur = {
2410
2408
  dark: "border-white/[0.08]",
2411
2409
  light: "border-black/[0.08]"
2412
- }, Hr = (e) => e === "dark" ? "sender" : "receiver", Vr = {
2410
+ }, jr = (e) => e === "dark" ? "sender" : "receiver", Hr = {
2413
2411
  sender: {
2414
2412
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
2415
2413
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -2422,7 +2420,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2422
2420
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
2423
2421
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
2424
2422
  }
2425
- }, Ae = ({
2423
+ }, Te = ({
2426
2424
  variant: e,
2427
2425
  text: t,
2428
2426
  bordered: s = !0,
@@ -2434,7 +2432,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2434
2432
  children: d,
2435
2433
  "data-testid": u
2436
2434
  }) => {
2437
- const h = t != null && t !== "", m = o ?? Vr[Hr(e)][a];
2435
+ const h = t != null && t !== "", m = o ?? Hr[jr(e)][a];
2438
2436
  return /* @__PURE__ */ f(
2439
2437
  "div",
2440
2438
  {
@@ -2463,10 +2461,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2463
2461
  // there is no ambiguity to resolve.
2464
2462
  h && "pb-0",
2465
2463
  m,
2464
+ $r[e],
2466
2465
  Br[e],
2467
- Ur[e],
2468
2466
  s && "border",
2469
- s && jr[e],
2467
+ s && Ur[e],
2470
2468
  l
2471
2469
  ),
2472
2470
  children: [
@@ -2494,7 +2492,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2494
2492
  ]
2495
2493
  }
2496
2494
  );
2497
- }, Re = ({
2495
+ }, Ae = ({
2498
2496
  onClick: e,
2499
2497
  variant: t = "overlay",
2500
2498
  ariaLabel: s = "Dismiss attachment"
@@ -2510,18 +2508,18 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2510
2508
  "flex size-6 items-center justify-center rounded-full text-white",
2511
2509
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
2512
2510
  ),
2513
- children: /* @__PURE__ */ n(it, { className: "size-3", weight: "bold" })
2511
+ children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
2514
2512
  }
2515
- ), Le = (e) => e === "received" ? "light" : "dark", so = ({
2513
+ ), Re = (e) => e === "received" ? "light" : "dark", no = ({
2516
2514
  firstOfGroup: e,
2517
2515
  endOfGroup: t,
2518
2516
  groupedByUser: s
2519
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Gr = ({
2517
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Vr = ({
2520
2518
  src: e,
2521
2519
  mimeType: t,
2522
2520
  filename: s,
2523
2521
  items: a
2524
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Yr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
2522
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Gr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
2525
2523
  /* @__PURE__ */ n(
2526
2524
  "audio",
2527
2525
  {
@@ -2533,7 +2531,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2533
2531
  }
2534
2532
  ),
2535
2533
  s ?? null
2536
- ] }), xt = ({
2534
+ ] }), wt = ({
2537
2535
  state: e,
2538
2536
  src: t,
2539
2537
  mimeType: s,
@@ -2544,41 +2542,41 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2544
2542
  preload: l,
2545
2543
  onDismiss: d
2546
2544
  }) => {
2547
- const u = Le(e), h = e === "composer" && !!d, m = Gr({ src: t, mimeType: s, filename: a, items: r });
2545
+ const u = Re(e), h = e === "composer" && !!d, m = Vr({ src: t, mimeType: s, filename: a, items: r });
2548
2546
  if (m.length === 0)
2549
2547
  return null;
2550
2548
  const g = l ?? (m.length > 1 ? "none" : "metadata");
2551
2549
  return /* @__PURE__ */ n(
2552
- Ae,
2550
+ Te,
2553
2551
  {
2554
2552
  variant: u,
2555
2553
  text: i,
2556
2554
  groupPosition: o,
2557
2555
  "data-testid": "audio-attachment",
2558
2556
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, p) => /* @__PURE__ */ n(
2559
- Yr,
2557
+ Gr,
2560
2558
  {
2561
2559
  item: c,
2562
2560
  preload: g,
2563
2561
  trailingAction: (
2564
2562
  // Composer only supports a single attachment, so the
2565
2563
  // dismiss control sits on the only player.
2566
- h && p === 0 ? /* @__PURE__ */ n(Re, { onClick: d, variant: "inline" }) : void 0
2564
+ h && p === 0 ? /* @__PURE__ */ n(Ae, { onClick: d, variant: "inline" }) : void 0
2567
2565
  )
2568
2566
  },
2569
2567
  `${c.src}-${p}`
2570
2568
  )) })
2571
2569
  }
2572
2570
  );
2573
- }, Wr = (e) => /* @__PURE__ */ n(xt, { ...e, state: "composer" }), Xr = (e) => /* @__PURE__ */ n(xt, { ...e, state: "sent" }), qr = (e) => /* @__PURE__ */ n(xt, { ...e, state: "received" }), Kr = {
2574
- Composer: Wr,
2575
- Sent: Xr,
2576
- Received: qr
2571
+ }, Yr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }), Wr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "received" }), qr = {
2572
+ Composer: Yr,
2573
+ Sent: Wr,
2574
+ Received: Xr
2577
2575
  };
2578
- function Zr(e) {
2576
+ function Kr(e) {
2579
2577
  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`;
2580
2578
  }
2581
- const Jr = {
2579
+ const Zr = {
2582
2580
  pdf: "PDF",
2583
2581
  doc: "DOC",
2584
2582
  xls: "XLS",
@@ -2588,7 +2586,7 @@ const Jr = {
2588
2586
  text: "TXT",
2589
2587
  markdown: "MD"
2590
2588
  };
2591
- function Qr(e, t) {
2589
+ function Jr(e, t) {
2592
2590
  if (t) {
2593
2591
  const r = t.lastIndexOf(".");
2594
2592
  if (r > 0 && r < t.length - 1) {
@@ -2598,7 +2596,7 @@ function Qr(e, t) {
2598
2596
  }
2599
2597
  if (!e) return;
2600
2598
  if (de(e) === "document") {
2601
- const r = Nn(e), i = Jr[r];
2599
+ const r = Nn(e), i = Zr[r];
2602
2600
  if (i) return i;
2603
2601
  if (e === "application/octet-stream") return;
2604
2602
  }
@@ -2606,11 +2604,11 @@ function Qr(e, t) {
2606
2604
  if (!(!a || a === "*"))
2607
2605
  return a.toUpperCase();
2608
2606
  }
2609
- function ei(e, t, s) {
2610
- const a = Qr(e, t), r = typeof s == "number" && s > 0 ? Zr(s) : void 0;
2607
+ function Qr(e, t, s) {
2608
+ const a = Jr(e, t), r = typeof s == "number" && s > 0 ? Kr(s) : void 0;
2611
2609
  return [a, r].filter(Boolean).join(" · ") || void 0;
2612
2610
  }
2613
- function re(e) {
2611
+ function ae(e) {
2614
2612
  try {
2615
2613
  const s = new URL(e).pathname.split("/").pop();
2616
2614
  return s && s.length > 0 ? decodeURIComponent(s) : "download";
@@ -2618,16 +2616,16 @@ function re(e) {
2618
2616
  return "download";
2619
2617
  }
2620
2618
  }
2621
- const ti = {
2619
+ const ei = {
2622
2620
  dark: "text-white/55",
2623
2621
  light: "text-black/65"
2624
- }, ni = {
2622
+ }, ti = {
2625
2623
  dark: "bg-white/10",
2626
2624
  light: "bg-black/5"
2627
- }, si = {
2625
+ }, ni = {
2628
2626
  dark: "text-white/85",
2629
2627
  light: "text-black/85"
2630
- }, Pn = ({
2628
+ }, On = ({
2631
2629
  variant: e,
2632
2630
  filename: t,
2633
2631
  title: s,
@@ -2637,16 +2635,16 @@ const ti = {
2637
2635
  activateLabel: o,
2638
2636
  trailingAction: l
2639
2637
  }) => {
2640
- const d = s ?? t ?? "File", u = ei(a, t, r), h = /* @__PURE__ */ n(
2638
+ const d = s ?? t ?? "File", u = Qr(a, t, r), h = /* @__PURE__ */ n(
2641
2639
  "div",
2642
2640
  {
2643
2641
  className: k(
2644
2642
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
2645
- ni[e]
2643
+ ti[e]
2646
2644
  ),
2647
2645
  "aria-hidden": !0,
2648
- children: ve(a, {
2649
- className: k("size-6", si[e]),
2646
+ children: be(a, {
2647
+ className: k("size-6", ni[e]),
2650
2648
  weight: "regular"
2651
2649
  })
2652
2650
  }
@@ -2657,7 +2655,7 @@ const ti = {
2657
2655
  {
2658
2656
  className: k(
2659
2657
  "truncate text-xs leading-4",
2660
- ti[e]
2658
+ ei[e]
2661
2659
  ),
2662
2660
  children: u
2663
2661
  }
@@ -2677,7 +2675,7 @@ const ti = {
2677
2675
  m
2678
2676
  ]
2679
2677
  }
2680
- ) : /* @__PURE__ */ f(K, { children: [
2678
+ ) : /* @__PURE__ */ f(J, { children: [
2681
2679
  h,
2682
2680
  m
2683
2681
  ] });
@@ -2686,8 +2684,8 @@ const ti = {
2686
2684
  l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
2687
2685
  ] });
2688
2686
  };
2689
- async function zn(e, t) {
2690
- const s = t ?? re(e);
2687
+ async function Pn(e, t) {
2688
+ const s = t ?? ae(e);
2691
2689
  try {
2692
2690
  const a = await fetch(e, { mode: "cors" });
2693
2691
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -2700,23 +2698,23 @@ async function zn(e, t) {
2700
2698
  }
2701
2699
  }
2702
2700
  }
2703
- const ai = ({
2701
+ const si = ({
2704
2702
  src: e,
2705
2703
  filename: t,
2706
2704
  fileSize: s,
2707
2705
  mimeType: a,
2708
2706
  title: r,
2709
2707
  items: i
2710
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], ri = ({
2708
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], ai = ({
2711
2709
  variant: e,
2712
2710
  item: t,
2713
2711
  index: s,
2714
2712
  onActivate: a,
2715
2713
  trailingAction: r
2716
2714
  }) => {
2717
- const i = t.filename ?? re(t.src);
2715
+ const i = t.filename ?? ae(t.src);
2718
2716
  return /* @__PURE__ */ n(
2719
- Pn,
2717
+ On,
2720
2718
  {
2721
2719
  variant: e,
2722
2720
  filename: i,
@@ -2728,7 +2726,7 @@ const ai = ({
2728
2726
  trailingAction: r
2729
2727
  }
2730
2728
  );
2731
- }, wt = ({
2729
+ }, _t = ({
2732
2730
  state: e,
2733
2731
  src: t,
2734
2732
  filename: s,
@@ -2741,7 +2739,7 @@ const ai = ({
2741
2739
  onClick: u,
2742
2740
  onDismiss: h
2743
2741
  }) => {
2744
- const m = Le(e), g = e === "composer" && !!h, c = ai({
2742
+ const m = Re(e), g = e === "composer" && !!h, c = si({
2745
2743
  src: t,
2746
2744
  filename: s,
2747
2745
  fileSize: a,
@@ -2752,8 +2750,8 @@ const ai = ({
2752
2750
  if ((u == null ? void 0 : u(v)) === !1) return;
2753
2751
  const x = c[v];
2754
2752
  if (!x) return;
2755
- const b = x.filename ?? re(x.src);
2756
- zn(x.src, b);
2753
+ const b = x.filename ?? ae(x.src);
2754
+ Pn(x.src, b);
2757
2755
  };
2758
2756
  if (c.length === 0)
2759
2757
  return null;
@@ -2765,47 +2763,47 @@ const ai = ({
2765
2763
  m === "dark" ? "text-white/70" : "text-black/70"
2766
2764
  ),
2767
2765
  "aria-hidden": !0,
2768
- children: /* @__PURE__ */ n(Se, { className: "size-5", weight: "bold" })
2766
+ children: /* @__PURE__ */ n(Ce, { className: "size-5", weight: "bold" })
2769
2767
  }
2770
2768
  );
2771
2769
  return /* @__PURE__ */ n(
2772
- Ae,
2770
+ Te,
2773
2771
  {
2774
2772
  variant: m,
2775
2773
  text: l,
2776
2774
  groupPosition: d,
2777
2775
  "data-testid": "file-attachment",
2778
2776
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
2779
- ri,
2777
+ ai,
2780
2778
  {
2781
2779
  variant: m,
2782
2780
  item: v,
2783
2781
  index: x,
2784
2782
  onActivate: p,
2785
- trailingAction: g && x === 0 ? /* @__PURE__ */ n(Re, { onClick: h, variant: "inline" }) : w
2783
+ trailingAction: g && x === 0 ? /* @__PURE__ */ n(Ae, { onClick: h, variant: "inline" }) : w
2786
2784
  },
2787
2785
  `${v.src}-${x}`
2788
2786
  )) })
2789
2787
  }
2790
2788
  );
2791
- }, ii = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }), li = (e) => /* @__PURE__ */ n(wt, { ...e, state: "sent" }), oi = (e) => /* @__PURE__ */ n(wt, { ...e, state: "received" }), ci = {
2792
- Composer: ii,
2793
- Sent: li,
2794
- Received: oi
2795
- }, Fn = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", en = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", _t = ({
2789
+ }, ri = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }), ii = (e) => /* @__PURE__ */ n(_t, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(_t, { ...e, state: "received" }), oi = {
2790
+ Composer: ri,
2791
+ Sent: ii,
2792
+ Received: li
2793
+ }, zn = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", tn = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", yt = ({
2796
2794
  onPrev: e,
2797
2795
  onNext: t,
2798
2796
  prevLabel: s = "Previous",
2799
2797
  nextLabel: a = "Next"
2800
- }) => /* @__PURE__ */ f(K, { children: [
2798
+ }) => /* @__PURE__ */ f(J, { children: [
2801
2799
  /* @__PURE__ */ n(
2802
2800
  "button",
2803
2801
  {
2804
2802
  type: "button",
2805
2803
  onClick: e,
2806
2804
  "aria-label": s,
2807
- className: `${en} left-4`,
2808
- children: /* @__PURE__ */ n(ga, { size: 20, weight: "bold", "aria-hidden": !0 })
2805
+ className: `${tn} left-4`,
2806
+ children: /* @__PURE__ */ n(ca, { size: 20, weight: "bold", "aria-hidden": !0 })
2809
2807
  }
2810
2808
  ),
2811
2809
  /* @__PURE__ */ n(
@@ -2814,11 +2812,11 @@ const ai = ({
2814
2812
  type: "button",
2815
2813
  onClick: t,
2816
2814
  "aria-label": a,
2817
- className: `${en} right-4`,
2815
+ className: `${tn} right-4`,
2818
2816
  children: /* @__PURE__ */ n(hn, { size: 20, weight: "bold", "aria-hidden": !0 })
2819
2817
  }
2820
2818
  )
2821
- ] }), $n = ({
2819
+ ] }), Fn = ({
2822
2820
  url: e,
2823
2821
  filename: t,
2824
2822
  variant: s = "pill",
@@ -2827,9 +2825,9 @@ const ai = ({
2827
2825
  tone: i = "dark",
2828
2826
  onTriggered: o
2829
2827
  }) => {
2830
- const [l, d] = B(!1), u = q(
2828
+ const [l, d] = B(!1), u = Z(
2831
2829
  (c) => {
2832
- c.stopPropagation(), !l && (d(!0), zn(e, t).catch(() => {
2830
+ c.stopPropagation(), !l && (d(!0), Pn(e, t).catch(() => {
2833
2831
  }).finally(() => {
2834
2832
  d(!1), o == null || o();
2835
2833
  }));
@@ -2854,14 +2852,14 @@ const ai = ({
2854
2852
  }[i]
2855
2853
  ),
2856
2854
  children: l ? /* @__PURE__ */ n(
2857
- be,
2855
+ pe,
2858
2856
  {
2859
2857
  className: "size-4 animate-spin",
2860
2858
  weight: "bold",
2861
2859
  "aria-hidden": !0
2862
2860
  }
2863
2861
  ) : /* @__PURE__ */ n(
2864
- Se,
2862
+ Ce,
2865
2863
  {
2866
2864
  className: "size-5 shrink-0",
2867
2865
  weight: "bold",
@@ -2876,8 +2874,8 @@ const ai = ({
2876
2874
  onClick: u,
2877
2875
  disabled: l,
2878
2876
  "aria-label": a,
2879
- className: Fn,
2880
- children: l ? /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
2877
+ className: zn,
2878
+ children: l ? /* @__PURE__ */ n(pe, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ce, { size: 20, weight: "bold", "aria-hidden": !0 })
2881
2879
  }
2882
2880
  ) : /* @__PURE__ */ f(
2883
2881
  "button",
@@ -2892,31 +2890,31 @@ const ai = ({
2892
2890
  ),
2893
2891
  children: [
2894
2892
  l ? /* @__PURE__ */ n(
2895
- be,
2893
+ pe,
2896
2894
  {
2897
2895
  className: "size-4 animate-spin",
2898
2896
  weight: "bold",
2899
2897
  "aria-hidden": !0
2900
2898
  }
2901
- ) : /* @__PURE__ */ n(Se, { ...g, "aria-hidden": !0 }),
2899
+ ) : /* @__PURE__ */ n(Ce, { ...g, "aria-hidden": !0 }),
2902
2900
  h ? null : a
2903
2901
  ]
2904
2902
  }
2905
2903
  );
2906
- }, Je = (e, t, s) => Math.min(Math.max(e, t), s), yt = ({
2904
+ }, Qe = (e, t, s) => Math.min(Math.max(e, t), s), Nt = ({
2907
2905
  length: e,
2908
2906
  initialIndex: t,
2909
2907
  open: s
2910
2908
  }) => {
2911
- const a = Je(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
2909
+ const a = Qe(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
2912
2910
  Y(() => {
2913
- s && i(Je(t, 0, Math.max(e - 1, 0)));
2911
+ s && i(Qe(t, 0, Math.max(e - 1, 0)));
2914
2912
  }, [s, t, e]), Y(() => {
2915
- i((d) => Je(d, 0, Math.max(e - 1, 0)));
2913
+ i((d) => Qe(d, 0, Math.max(e - 1, 0)));
2916
2914
  }, [e]);
2917
- const o = q(() => {
2915
+ const o = Z(() => {
2918
2916
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
2919
- }, [e]), l = q(() => {
2917
+ }, [e]), l = Z(() => {
2920
2918
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
2921
2919
  }, [e]);
2922
2920
  return Y(() => {
@@ -2928,7 +2926,7 @@ const ai = ({
2928
2926
  };
2929
2927
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2930
2928
  }, [s, e, o, l]), { index: r, prev: o, next: l };
2931
- }, Nt = ({
2929
+ }, kt = ({
2932
2930
  open: e,
2933
2931
  onClose: t,
2934
2932
  ariaLabel: s,
@@ -2937,7 +2935,7 @@ const ai = ({
2937
2935
  children: i,
2938
2936
  "data-testid": o
2939
2937
  }) => {
2940
- const l = H(null), d = H(null);
2938
+ const l = j(null), d = j(null);
2941
2939
  return Y(() => {
2942
2940
  var g;
2943
2941
  const m = l.current;
@@ -3008,8 +3006,8 @@ const ai = ({
3008
3006
  type: "button",
3009
3007
  onClick: t,
3010
3008
  "aria-label": "Close viewer",
3011
- className: Fn,
3012
- children: /* @__PURE__ */ n(it, { size: 20, weight: "bold", "aria-hidden": !0 })
3009
+ className: zn,
3010
+ children: /* @__PURE__ */ n(lt, { size: 20, weight: "bold", "aria-hidden": !0 })
3013
3011
  }
3014
3012
  )
3015
3013
  ] })
@@ -3018,29 +3016,29 @@ const ai = ({
3018
3016
  ]
3019
3017
  }
3020
3018
  );
3021
- }, Bn = ({
3019
+ }, $n = ({
3022
3020
  open: e,
3023
3021
  items: t,
3024
3022
  initialIndex: s = 0,
3025
3023
  onClose: a
3026
3024
  }) => {
3027
- const { index: r, prev: i, next: o } = yt({
3025
+ const { index: r, prev: i, next: o } = Nt({
3028
3026
  length: t.length,
3029
3027
  initialIndex: s,
3030
3028
  open: e
3031
3029
  }), l = t[r], d = le(
3032
- () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "image"),
3030
+ () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "image"),
3033
3031
  [l]
3034
3032
  );
3035
3033
  return l ? /* @__PURE__ */ f(
3036
- Nt,
3034
+ kt,
3037
3035
  {
3038
3036
  open: e,
3039
3037
  onClose: a,
3040
3038
  ariaLabel: d,
3041
3039
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
3042
3040
  actions: /* @__PURE__ */ n(
3043
- $n,
3041
+ Fn,
3044
3042
  {
3045
3043
  url: l.src,
3046
3044
  filename: d,
@@ -3062,7 +3060,7 @@ const ai = ({
3062
3060
  `${r}:${l.src}`
3063
3061
  ) : null,
3064
3062
  t.length > 1 ? /* @__PURE__ */ n(
3065
- _t,
3063
+ yt,
3066
3064
  {
3067
3065
  onPrev: i,
3068
3066
  onNext: o,
@@ -3073,7 +3071,7 @@ const ai = ({
3073
3071
  ]
3074
3072
  }
3075
3073
  ) : null;
3076
- }, di = "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", ui = {
3074
+ }, ci = "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", di = {
3077
3075
  1: ["rounded-[18px]"],
3078
3076
  2: ["rounded-l-[18px]", "rounded-r-[18px]"],
3079
3077
  3: ["rounded-l-[18px]", "rounded-tr-[18px]", "rounded-br-[18px]"],
@@ -3083,7 +3081,7 @@ const ai = ({
3083
3081
  "rounded-bl-[18px]",
3084
3082
  "rounded-br-[18px]"
3085
3083
  ]
3086
- }, mi = "--mes-single-width-cap", hi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", fi = 436, Un = ({
3084
+ }, ui = "--mes-single-width-cap", mi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", hi = 436, Bn = ({
3087
3085
  tiles: e,
3088
3086
  onTileActivate: t,
3089
3087
  maxVisible: s = 4,
@@ -3095,9 +3093,9 @@ const ai = ({
3095
3093
  const o = e.slice(0, Math.min(i, s)), l = i - o.length, d = (h, m, g) => {
3096
3094
  var p;
3097
3095
  const c = k(
3098
- di,
3096
+ ci,
3099
3097
  "h-full w-full",
3100
- (p = ui[o.length]) == null ? void 0 : p[m]
3098
+ (p = di[o.length]) == null ? void 0 : p[m]
3101
3099
  );
3102
3100
  return t ? /* @__PURE__ */ f(
3103
3101
  "button",
@@ -3122,14 +3120,14 @@ const ai = ({
3122
3120
  aspectRatio: a,
3123
3121
  // Hundredths keep the emitted declaration readable in devtools;
3124
3122
  // the rounding error is well under a device pixel.
3125
- width: `min(var(${mi}), ${Math.round(fi * a * 100) / 100}px)`,
3123
+ width: `min(var(${ui}), ${Math.round(hi * a * 100) / 100}px)`,
3126
3124
  // Only bites in a container narrower than the width cap.
3127
3125
  maxWidth: "100%"
3128
3126
  }), o.length === 1 ? /* @__PURE__ */ n(
3129
3127
  "div",
3130
3128
  {
3131
3129
  className: k(
3132
- a ? hi : "aspect-square w-full",
3130
+ a ? mi : "aspect-square w-full",
3133
3131
  r
3134
3132
  ),
3135
3133
  style: u,
@@ -3184,15 +3182,15 @@ const ai = ({
3184
3182
  })
3185
3183
  }
3186
3184
  );
3187
- }, Me = (e) => {
3188
- const [t, s] = B(!1), [a, r] = B(0), i = q(
3185
+ }, Le = (e) => {
3186
+ const [t, s] = B(!1), [a, r] = B(0), i = Z(
3189
3187
  (l) => {
3190
3188
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
3191
3189
  },
3192
3190
  [e]
3193
- ), o = q(() => s(!1), []);
3191
+ ), o = Z(() => s(!1), []);
3194
3192
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
3195
- }, gi = ({
3193
+ }, fi = ({
3196
3194
  item: e,
3197
3195
  index: t,
3198
3196
  totalCount: s,
@@ -3220,16 +3218,16 @@ const ai = ({
3220
3218
  }
3221
3219
  )
3222
3220
  )
3223
- }), pi = ({
3221
+ }), gi = ({
3224
3222
  src: e,
3225
3223
  alt: t,
3226
3224
  items: s
3227
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], jn = (e, t) => e.map((s, a) => ({
3225
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Un = (e, t) => e.map((s, a) => ({
3228
3226
  src: s.src,
3229
3227
  alt: s.alt,
3230
3228
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3231
- })), bi = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
3232
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Me(r);
3229
+ })), pi = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
3230
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Le(r);
3233
3231
  return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
3234
3232
  /* @__PURE__ */ n(
3235
3233
  "button",
@@ -3251,18 +3249,18 @@ const ai = ({
3251
3249
  )
3252
3250
  }
3253
3251
  ),
3254
- i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Re, { onClick: i }) }) : null,
3252
+ i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ae, { onClick: i }) }) : null,
3255
3253
  /* @__PURE__ */ n(
3256
- Bn,
3254
+ $n,
3257
3255
  {
3258
3256
  open: o,
3259
- items: jn([{ src: e, alt: t }], s),
3257
+ items: Un([{ src: e, alt: t }], s),
3260
3258
  initialIndex: l,
3261
3259
  onClose: u
3262
3260
  }
3263
3261
  )
3264
3262
  ] });
3265
- }, vi = 326 / 246, xi = (e) => {
3263
+ }, bi = 326 / 246, vi = (e) => {
3266
3264
  const t = e == null ? void 0 : e.src, [s, a] = z.useState(), r = z.useCallback(
3267
3265
  (d) => {
3268
3266
  if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
@@ -3277,11 +3275,11 @@ const ai = ({
3277
3275
  [r]
3278
3276
  ), o = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, l = s && s.src === t ? s.ratio : void 0;
3279
3277
  return {
3280
- ratio: o ?? l ?? vi,
3278
+ ratio: o ?? l ?? bi,
3281
3279
  imgRef: r,
3282
3280
  onLoad: i
3283
3281
  };
3284
- }, Hn = ({
3282
+ }, jn = ({
3285
3283
  state: e,
3286
3284
  src: t,
3287
3285
  alt: s,
@@ -3292,11 +3290,11 @@ const ai = ({
3292
3290
  loading: l = "lazy",
3293
3291
  onClick: d
3294
3292
  }) => {
3295
- const u = pi({ src: t, alt: s, items: r }), h = Le(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = Me(d), w = u.length === 1, v = xi(w ? u[0] : void 0);
3293
+ const u = gi({ src: t, alt: s, items: r }), h = Re(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = Le(d), w = u.length === 1, v = vi(w ? u[0] : void 0);
3296
3294
  if (u.length === 0)
3297
3295
  return null;
3298
3296
  const x = u.map(
3299
- (b, N) => gi({
3297
+ (b, N) => fi({
3300
3298
  item: b,
3301
3299
  index: N,
3302
3300
  totalCount: u.length,
@@ -3306,7 +3304,7 @@ const ai = ({
3306
3304
  })
3307
3305
  );
3308
3306
  return /* @__PURE__ */ f(
3309
- Ae,
3307
+ Te,
3310
3308
  {
3311
3309
  variant: h,
3312
3310
  text: i,
@@ -3318,7 +3316,7 @@ const ai = ({
3318
3316
  "data-testid": "image-attachment",
3319
3317
  children: [
3320
3318
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
3321
- Un,
3319
+ Bn,
3322
3320
  {
3323
3321
  tiles: x,
3324
3322
  onTileActivate: c,
@@ -3326,10 +3324,10 @@ const ai = ({
3326
3324
  }
3327
3325
  ) }),
3328
3326
  /* @__PURE__ */ n(
3329
- Bn,
3327
+ $n,
3330
3328
  {
3331
3329
  open: m,
3332
- items: jn(u, a),
3330
+ items: Un(u, a),
3333
3331
  initialIndex: g,
3334
3332
  onClose: p
3335
3333
  }
@@ -3337,29 +3335,29 @@ const ai = ({
3337
3335
  ]
3338
3336
  }
3339
3337
  );
3340
- }, wi = (e) => /* @__PURE__ */ n(bi, { ...e }), _i = (e) => /* @__PURE__ */ n(Hn, { ...e, state: "sent" }), yi = (e) => /* @__PURE__ */ n(Hn, { ...e, state: "received" }), Ni = {
3341
- Composer: wi,
3342
- Sent: _i,
3343
- Received: yi
3344
- }, ki = ({
3338
+ }, xi = (e) => /* @__PURE__ */ n(pi, { ...e }), wi = (e) => /* @__PURE__ */ n(jn, { ...e, state: "sent" }), _i = (e) => /* @__PURE__ */ n(jn, { ...e, state: "received" }), yi = {
3339
+ Composer: xi,
3340
+ Sent: wi,
3341
+ Received: _i
3342
+ }, Ni = ({
3345
3343
  open: e,
3346
3344
  items: t,
3347
3345
  initialIndex: s = 0,
3348
3346
  onClose: a
3349
3347
  }) => {
3350
- const { index: r, prev: i, next: o } = yt({
3348
+ const { index: r, prev: i, next: o } = Nt({
3351
3349
  length: t.length,
3352
3350
  initialIndex: s,
3353
3351
  open: e
3354
3352
  }), l = t[r], d = le(
3355
- () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "document"),
3353
+ () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "document"),
3356
3354
  [l]
3357
3355
  ), u = le(
3358
- () => l ? Ci(l.src) : void 0,
3356
+ () => l ? ki(l.src) : void 0,
3359
3357
  [l]
3360
3358
  );
3361
3359
  return !l || !u ? null : /* @__PURE__ */ f(
3362
- Nt,
3360
+ kt,
3363
3361
  {
3364
3362
  open: e,
3365
3363
  onClose: a,
@@ -3378,7 +3376,7 @@ const ai = ({
3378
3376
  `${r}:${l.src}`
3379
3377
  ),
3380
3378
  t.length > 1 ? /* @__PURE__ */ n(
3381
- _t,
3379
+ yt,
3382
3380
  {
3383
3381
  onPrev: i,
3384
3382
  onNext: o,
@@ -3389,25 +3387,25 @@ const ai = ({
3389
3387
  ]
3390
3388
  }
3391
3389
  );
3392
- }, Ci = (e) => {
3390
+ }, ki = (e) => {
3393
3391
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
3394
3392
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
3395
- }, Si = ({
3393
+ }, Ci = ({
3396
3394
  src: e,
3397
3395
  filename: t,
3398
3396
  fileSize: s,
3399
3397
  title: a,
3400
3398
  items: r
3401
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Ei = ({
3399
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Si = ({
3402
3400
  variant: e,
3403
3401
  item: t,
3404
3402
  index: s,
3405
3403
  onActivate: a,
3406
3404
  trailingAction: r
3407
3405
  }) => {
3408
- const i = t.filename ?? re(t.src);
3406
+ const i = t.filename ?? ae(t.src);
3409
3407
  return /* @__PURE__ */ n(
3410
- Pn,
3408
+ On,
3411
3409
  {
3412
3410
  variant: e,
3413
3411
  filename: i,
@@ -3419,7 +3417,7 @@ const ai = ({
3419
3417
  trailingAction: r
3420
3418
  }
3421
3419
  );
3422
- }, kt = ({
3420
+ }, Ct = ({
3423
3421
  state: e,
3424
3422
  src: t,
3425
3423
  filename: s,
@@ -3431,15 +3429,15 @@ const ai = ({
3431
3429
  onClick: d,
3432
3430
  onDismiss: u
3433
3431
  }) => {
3434
- const h = Le(e), m = Si({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(d), v = e === "composer" && !!u;
3432
+ const h = Re(e), m = Ci({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Le(d), v = e === "composer" && !!u;
3435
3433
  if (m.length === 0)
3436
3434
  return null;
3437
3435
  const x = m.map((b) => ({
3438
3436
  src: b.src,
3439
- filename: b.filename ?? re(b.src)
3437
+ filename: b.filename ?? ae(b.src)
3440
3438
  }));
3441
3439
  return /* @__PURE__ */ f(
3442
- Ae,
3440
+ Te,
3443
3441
  {
3444
3442
  variant: h,
3445
3443
  text: o,
@@ -3447,8 +3445,8 @@ const ai = ({
3447
3445
  "data-testid": "pdf-attachment",
3448
3446
  children: [
3449
3447
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((b, N) => {
3450
- const _ = b.filename ?? re(b.src), T = v && N === 0 ? /* @__PURE__ */ n(Re, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
3451
- $n,
3448
+ const _ = b.filename ?? ae(b.src), T = v && N === 0 ? /* @__PURE__ */ n(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
3449
+ Fn,
3452
3450
  {
3453
3451
  url: b.src,
3454
3452
  filename: _,
@@ -3458,7 +3456,7 @@ const ai = ({
3458
3456
  }
3459
3457
  );
3460
3458
  return /* @__PURE__ */ n(
3461
- Ei,
3459
+ Si,
3462
3460
  {
3463
3461
  variant: h,
3464
3462
  item: b,
@@ -3470,7 +3468,7 @@ const ai = ({
3470
3468
  );
3471
3469
  }) }),
3472
3470
  /* @__PURE__ */ n(
3473
- ki,
3471
+ Ni,
3474
3472
  {
3475
3473
  open: g,
3476
3474
  items: x,
@@ -3481,26 +3479,26 @@ const ai = ({
3481
3479
  ]
3482
3480
  }
3483
3481
  );
3484
- }, Ii = (e) => /* @__PURE__ */ n(kt, { ...e, state: "composer" }), Ti = (e) => /* @__PURE__ */ n(kt, { ...e, state: "sent" }), Ai = (e) => /* @__PURE__ */ n(kt, { ...e, state: "received" }), Ri = {
3485
- Composer: Ii,
3486
- Sent: Ti,
3487
- Received: Ai
3488
- }, Vn = ({
3482
+ }, Ei = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "composer" }), Ii = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "sent" }), Ti = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "received" }), Ai = {
3483
+ Composer: Ei,
3484
+ Sent: Ii,
3485
+ Received: Ti
3486
+ }, Hn = ({
3489
3487
  open: e,
3490
3488
  items: t,
3491
3489
  initialIndex: s = 0,
3492
3490
  onClose: a
3493
3491
  }) => {
3494
- const { index: r, prev: i, next: o } = yt({
3492
+ const { index: r, prev: i, next: o } = Nt({
3495
3493
  length: t.length,
3496
3494
  initialIndex: s,
3497
3495
  open: e
3498
3496
  }), l = t[r], d = le(
3499
- () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "video"),
3497
+ () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "video"),
3500
3498
  [l]
3501
3499
  );
3502
3500
  return l ? /* @__PURE__ */ f(
3503
- Nt,
3501
+ kt,
3504
3502
  {
3505
3503
  open: e,
3506
3504
  onClose: a,
@@ -3524,7 +3522,7 @@ const ai = ({
3524
3522
  `${r}:${l.src}`
3525
3523
  ),
3526
3524
  t.length > 1 ? /* @__PURE__ */ n(
3527
- _t,
3525
+ yt,
3528
3526
  {
3529
3527
  onPrev: i,
3530
3528
  onNext: o,
@@ -3535,7 +3533,7 @@ const ai = ({
3535
3533
  ]
3536
3534
  }
3537
3535
  ) : null;
3538
- }, Li = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(at, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Gn = ({
3536
+ }, Ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Vn = ({
3539
3537
  item: e,
3540
3538
  index: t
3541
3539
  }) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -3557,24 +3555,24 @@ const ai = ({
3557
3555
  "aria-hidden": !0
3558
3556
  }
3559
3557
  ) }),
3560
- /* @__PURE__ */ n(Li, {})
3561
- ] }), Mi = (e, t, s) => ({
3558
+ /* @__PURE__ */ n(Ri, {})
3559
+ ] }), Li = (e, t, s) => ({
3562
3560
  ariaLabel: `Play video ${t + 1} of ${s}`,
3563
- content: /* @__PURE__ */ n(Gn, { item: e, index: t })
3564
- }), Di = ({
3561
+ content: /* @__PURE__ */ n(Vn, { item: e, index: t })
3562
+ }), Mi = ({
3565
3563
  src: e,
3566
3564
  poster: t,
3567
3565
  mimeType: s,
3568
3566
  preload: a,
3569
3567
  items: r
3570
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Yn = (e, t) => e.map((s, a) => ({
3568
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Gn = (e, t) => e.map((s, a) => ({
3571
3569
  src: s.src,
3572
3570
  poster: s.poster,
3573
3571
  mimeType: s.mimeType,
3574
3572
  preload: s.preload,
3575
3573
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3576
- })), Oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
3577
- const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: h } = Me(i);
3574
+ })), Di = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
3575
+ const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: h } = Le(i);
3578
3576
  return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
3579
3577
  /* @__PURE__ */ n(
3580
3578
  "button",
@@ -3583,21 +3581,21 @@ const ai = ({
3583
3581
  onClick: () => u(0),
3584
3582
  "aria-label": "Play video",
3585
3583
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
3586
- children: /* @__PURE__ */ n(Gn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
3584
+ children: /* @__PURE__ */ n(Vn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
3587
3585
  }
3588
3586
  ),
3589
- o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Re, { onClick: o }) }) : null,
3587
+ o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ae, { onClick: o }) }) : null,
3590
3588
  /* @__PURE__ */ n(
3591
- Vn,
3589
+ Hn,
3592
3590
  {
3593
3591
  open: l,
3594
- items: Yn([{ src: e, poster: t, mimeType: s, preload: r }], a),
3592
+ items: Gn([{ src: e, poster: t, mimeType: s, preload: r }], a),
3595
3593
  initialIndex: d,
3596
3594
  onClose: h
3597
3595
  }
3598
3596
  )
3599
3597
  ] });
3600
- }, Wn = ({
3598
+ }, Yn = ({
3601
3599
  state: e,
3602
3600
  src: t,
3603
3601
  poster: s,
@@ -3609,26 +3607,26 @@ const ai = ({
3609
3607
  preload: d,
3610
3608
  onClick: u
3611
3609
  }) => {
3612
- const h = Di({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Le(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(u);
3610
+ const h = Mi({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Re(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Le(u);
3613
3611
  if (h.length === 0)
3614
3612
  return null;
3615
3613
  const v = h.map(
3616
- (x, b) => Mi(x, b, h.length)
3614
+ (x, b) => Li(x, b, h.length)
3617
3615
  );
3618
3616
  return /* @__PURE__ */ f(
3619
- Ae,
3617
+ Te,
3620
3618
  {
3621
3619
  variant: m,
3622
3620
  text: o,
3623
3621
  groupPosition: l,
3624
3622
  "data-testid": "video-attachment",
3625
3623
  children: [
3626
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Un, { tiles: v, onTileActivate: p }) }),
3624
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Bn, { tiles: v, onTileActivate: p }) }),
3627
3625
  /* @__PURE__ */ n(
3628
- Vn,
3626
+ Hn,
3629
3627
  {
3630
3628
  open: g,
3631
- items: Yn(h, r),
3629
+ items: Gn(h, r),
3632
3630
  initialIndex: c,
3633
3631
  onClose: w
3634
3632
  }
@@ -3636,28 +3634,28 @@ const ai = ({
3636
3634
  ]
3637
3635
  }
3638
3636
  );
3639
- }, Pi = (e) => /* @__PURE__ */ n(Oi, { ...e }), zi = (e) => /* @__PURE__ */ n(Wn, { ...e, state: "sent" }), Fi = (e) => /* @__PURE__ */ n(Wn, { ...e, state: "received" }), $i = {
3640
- Composer: Pi,
3641
- Sent: zi,
3642
- Received: Fi
3643
- }, ke = {
3644
- Image: Ni,
3645
- Video: $i,
3646
- Audio: Kr,
3647
- Pdf: Ri,
3648
- File: ci
3637
+ }, Oi = (e) => /* @__PURE__ */ n(Di, { ...e }), Pi = (e) => /* @__PURE__ */ n(Yn, { ...e, state: "sent" }), zi = (e) => /* @__PURE__ */ n(Yn, { ...e, state: "received" }), Fi = {
3638
+ Composer: Oi,
3639
+ Sent: Pi,
3640
+ Received: zi
3641
+ }, Ne = {
3642
+ Image: yi,
3643
+ Video: Fi,
3644
+ Audio: qr,
3645
+ Pdf: Ai,
3646
+ File: oi
3649
3647
  };
3650
3648
  function O(e) {
3651
3649
  const t = e == null ? void 0 : e.trim();
3652
3650
  return t || void 0;
3653
3651
  }
3654
- function tn(e) {
3652
+ function nn(e) {
3655
3653
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3656
3654
  }
3657
- function Bi(e, t) {
3655
+ function $i(e, t) {
3658
3656
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3659
3657
  return !1;
3660
- const s = tn(e), a = tn(t);
3658
+ const s = nn(e), a = nn(t);
3661
3659
  if (s === a)
3662
3660
  return !0;
3663
3661
  if (!s.includes(a))
@@ -3665,7 +3663,7 @@ function Bi(e, t) {
3665
3663
  const r = s.split(a).join("");
3666
3664
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3667
3665
  }
3668
- function nn(e) {
3666
+ function sn(e) {
3669
3667
  const t = O(e.og_scrape_url) ?? O(e.title_link), s = O(e.image_url) ?? O(e.thumb_url), a = O(e.asset_url), r = O(e.mime_type);
3670
3668
  return {
3671
3669
  title: O(e.title),
@@ -3675,7 +3673,7 @@ function nn(e) {
3675
3673
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3676
3674
  // native video/audio player in the hero instead of a static thumbnail.
3677
3675
  sourceUrl: a,
3678
- layout: s || pt(r, a) ? "featured" : "classic",
3676
+ layout: s || bt(r, a) ? "featured" : "classic",
3679
3677
  mimeType: r,
3680
3678
  // Dominant colour of the image, resolved by the sender at stage time and
3681
3679
  // persisted on the attachment (`stream-custom-data.ts`), so every viewer
@@ -3687,15 +3685,11 @@ function nn(e) {
3687
3685
  status: "ready"
3688
3686
  };
3689
3687
  }
3690
- function Ui(e) {
3688
+ function Bi(e) {
3691
3689
  var t;
3692
- return Xn(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;
3693
- }
3694
- function Xn(e) {
3695
- const t = O(e.og_scrape_url);
3696
- return e.type === "link" || !!t && !e.asset_url;
3690
+ return Ve(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;
3697
3691
  }
3698
- function qn(e) {
3692
+ function Wn(e) {
3699
3693
  if (!(e != null && e.length)) return [];
3700
3694
  const t = [], s = (r, i) => {
3701
3695
  const o = t[t.length - 1];
@@ -3713,45 +3707,45 @@ function qn(e) {
3713
3707
  t.push({ type: "link", attachments: [r] });
3714
3708
  };
3715
3709
  for (const r of e) {
3716
- if (Xn(r)) {
3710
+ if (Ve(r)) {
3717
3711
  a(r);
3718
3712
  continue;
3719
3713
  }
3720
- const i = Ui(r);
3714
+ const i = Bi(r);
3721
3715
  i && s(i, r);
3722
3716
  }
3723
3717
  return t;
3724
3718
  }
3725
- function ji(e) {
3719
+ function Ui(e) {
3726
3720
  return e.filter((t) => t.type === "media").length;
3727
3721
  }
3728
- function Hi(e, t, s) {
3722
+ function ji(e, t, s) {
3729
3723
  return t <= 1 ? s : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3730
3724
  }
3731
- function sn(e) {
3725
+ function an(e) {
3732
3726
  return O(e.image_url) ?? O(e.asset_url) ?? "";
3733
3727
  }
3734
- function Vi(e) {
3728
+ function Hi(e) {
3735
3729
  switch (e) {
3736
3730
  case "image":
3737
- return ke.Image;
3731
+ return Ne.Image;
3738
3732
  case "video":
3739
- return ke.Video;
3733
+ return Ne.Video;
3740
3734
  case "audio":
3741
- return ke.Audio;
3735
+ return Ne.Audio;
3742
3736
  case "pdf":
3743
- return ke.Pdf;
3737
+ return Ne.Pdf;
3744
3738
  default:
3745
- return ke.File;
3739
+ return Ne.File;
3746
3740
  }
3747
3741
  }
3748
- function Gi(e, t) {
3742
+ function Vi(e, t) {
3749
3743
  if (t.length > 1)
3750
3744
  switch (e) {
3751
3745
  case "image":
3752
3746
  return {
3753
3747
  items: t.map((a) => ({
3754
- src: sn(a),
3748
+ src: an(a),
3755
3749
  alt: O(a.title)
3756
3750
  }))
3757
3751
  };
@@ -3796,7 +3790,7 @@ function Gi(e, t) {
3796
3790
  switch (e) {
3797
3791
  case "image":
3798
3792
  return {
3799
- src: sn(s),
3793
+ src: an(s),
3800
3794
  alt: O(s.title)
3801
3795
  };
3802
3796
  case "video":
@@ -3828,49 +3822,49 @@ function Gi(e, t) {
3828
3822
  };
3829
3823
  }
3830
3824
  }
3831
- function Yi({
3825
+ function Gi({
3832
3826
  groupPosition: e,
3833
3827
  isMyMessage: t,
3834
3828
  segment: s
3835
3829
  }) {
3836
- const a = Vi(s.kind), r = {
3837
- ...Gi(s.kind, s.attachments),
3830
+ const a = Hi(s.kind), r = {
3831
+ ...Vi(s.kind, s.attachments),
3838
3832
  groupPosition: e
3839
3833
  };
3840
3834
  return t ? /* @__PURE__ */ n(a.Sent, { ...r }) : /* @__PURE__ */ n(a.Received, { ...r });
3841
3835
  }
3842
- const Wi = ({
3836
+ const Yi = ({
3843
3837
  groupPosition: e,
3844
3838
  isMyMessage: t,
3845
3839
  message: s,
3846
3840
  renderText: a
3847
3841
  }) => {
3848
3842
  var v;
3849
- const r = qn(s.attachments);
3843
+ const r = Wn(s.attachments);
3850
3844
  if (r.length === 0) return null;
3851
- const i = ji(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? nn(l.attachments[0] ?? {}).url : void 0, u = o && Bi(o, d) ? void 0 : o;
3845
+ const i = Ui(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? sn(l.attachments[0] ?? {}).url : void 0, u = o && $i(o, d) ? void 0 : o;
3852
3846
  let h = 0;
3853
3847
  const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", p = (x, b, N) => {
3854
- const _ = t ? rt.Sent : rt.Received;
3848
+ const _ = t ? it.Sent : it.Received;
3855
3849
  m.push(
3856
3850
  /* @__PURE__ */ n(
3857
3851
  _,
3858
3852
  {
3859
- ...nn(x),
3853
+ ...sn(x),
3860
3854
  groupPosition: N ? g : "middle"
3861
3855
  },
3862
3856
  b
3863
3857
  )
3864
3858
  );
3865
3859
  }, w = (x, b) => {
3866
- const N = Hi(
3860
+ const N = ji(
3867
3861
  h,
3868
3862
  i,
3869
3863
  e
3870
3864
  );
3871
3865
  h += 1, m.push(
3872
3866
  /* @__PURE__ */ n(
3873
- Yi,
3867
+ Gi,
3874
3868
  {
3875
3869
  groupPosition: N,
3876
3870
  isMyMessage: t,
@@ -3907,7 +3901,7 @@ const Wi = ({
3907
3901
  },
3908
3902
  children: [
3909
3903
  m,
3910
- !u && /* @__PURE__ */ n(nt, {})
3904
+ !u && /* @__PURE__ */ n(st, {})
3911
3905
  ]
3912
3906
  }
3913
3907
  ),
@@ -3919,14 +3913,14 @@ const Wi = ({
3919
3913
  }),
3920
3914
  children: [
3921
3915
  /* @__PURE__ */ n(ze, { message: s, renderText: a }),
3922
- /* @__PURE__ */ n(nt, {}),
3916
+ /* @__PURE__ */ n(st, {}),
3923
3917
  c && /* @__PURE__ */ n($e, { side: t ? "me" : "other" })
3924
3918
  ]
3925
3919
  }
3926
3920
  ) : null
3927
3921
  ] });
3928
- }, Xi = (e) => {
3929
- var Rt, Lt, Mt, Dt, Ot, Pt, zt, Ft, $t, Bt;
3922
+ }, Wi = (e) => {
3923
+ var Lt, Mt, Dt, Ot, Pt, zt, Ft, $t, Bt, Ut;
3930
3924
  const {
3931
3925
  additionalMessageInputProps: t,
3932
3926
  editing: s,
@@ -3946,78 +3940,78 @@ const Wi = ({
3946
3940
  viewerLanguage: v,
3947
3941
  onOutboundClick: x,
3948
3942
  resolvedOutbound: b
3949
- } = e, { client: N } = He("CustomMessage"), { channel: _ } = we("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick: $ } = sr("LockedAttachment"), [F, R] = B(!1), I = hs(c.id), {
3950
- Attachment: D = fs,
3951
- EditMessageModal: S = gs,
3943
+ } = e, { client: N } = He("CustomMessage"), { channel: _ } = xe("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick: $ } = nr("LockedAttachment"), [F, R] = B(!1), I = us(c.id), {
3944
+ Attachment: M = ms,
3945
+ EditMessageModal: S = hs,
3952
3946
  MessageActions: C,
3953
- MessageBlocked: A = ps,
3954
- MessageBouncePrompt: P = bs,
3955
- MessageDeleted: U = vs,
3956
- MessageIsThreadReplyInChannelButtonIndicator: V = xs,
3957
- MessageRepliesCountButton: te = ws,
3958
- ReminderNotification: Z = _s,
3959
- StreamedMessageText: G = ys,
3947
+ MessageBlocked: A = fs,
3948
+ MessageBouncePrompt: P = gs,
3949
+ MessageDeleted: U = ps,
3950
+ MessageIsThreadReplyInChannelButtonIndicator: H = bs,
3951
+ MessageRepliesCountButton: te = vs,
3952
+ ReminderNotification: Q = xs,
3953
+ StreamedMessageText: V = ws,
3960
3954
  PinIndicator: y
3961
- } = dn("CustomMessage"), M = Ns(c), W = ks(c), Q = le(
3955
+ } = un("CustomMessage"), D = _s(c), W = ys(c), X = le(
3962
3956
  () => m == null ? void 0 : m(c),
3963
3957
  [m, c]
3964
- ), j = le(() => {
3965
- const he = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...he] : he;
3966
- if (!Fe(c)) return pe;
3967
- const Ut = pe.filter((jt) => !("type" in jt) || !En(jt));
3968
- return Ut.length === pe.length ? pe : Ut;
3969
- }, [c]), J = le(
3970
- () => qn(j),
3971
- [j]
3972
- ), X = le(() => {
3973
- const he = yn({ message: c, viewerLanguage: v });
3974
- return he === c.text ? c : { ...c, text: he };
3975
- }, [c, v]), ne = J.length > 0, ue = J.reduce(
3976
- (he, pe) => he + pe.attachments.length,
3958
+ ), G = le(() => {
3959
+ const me = c.attachments ?? [], ge = c.shared_location ? [c.shared_location, ...me] : me;
3960
+ if (!Fe(c)) return ge;
3961
+ const jt = ge.filter((Ht) => !("type" in Ht) || !Ve(Ht));
3962
+ return jt.length === ge.length ? ge : jt;
3963
+ }, [c]), q = le(
3964
+ () => Wn(G),
3965
+ [G]
3966
+ ), K = le(() => {
3967
+ const me = yn({ message: c, viewerLanguage: v });
3968
+ return me === c.text ? c : { ...c, text: me };
3969
+ }, [c, v]), se = q.length > 0, Me = q.reduce(
3970
+ (me, ge) => me + ge.attachments.length,
3977
3971
  0
3978
- ) === ((j == null ? void 0 : j.length) ?? 0), ae = (i == null ? void 0 : i[0]) ?? "", De = ae === "top" ? "first" : ae === "middle" ? "middle" : ae === "bottom" ? "end" : "single", se = ae === "single" || ae === "bottom";
3979
- if (Cs(c))
3972
+ ) === ((G == null ? void 0 : G.length) ?? 0), re = (i == null ? void 0 : i[0]) ?? "", De = re === "top" ? "first" : re === "middle" ? "middle" : re === "bottom" ? "end" : "single", ne = re === "single" || re === "bottom";
3973
+ if (Ns(c))
3980
3974
  return null;
3981
3975
  if (c.deleted_at || c.type === "deleted")
3982
3976
  return /* @__PURE__ */ n(U, { message: c });
3983
- if (Ss(c))
3977
+ if (ks(c))
3984
3978
  return /* @__PURE__ */ n(A, {});
3985
- const me = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, Ct = c.status === "failed" && ((Rt = c.error) == null ? void 0 : Rt.status) !== 403, St = Es(c);
3986
- let ge;
3987
- Ct ? ge = () => u(c) : St && (ge = () => R(!0));
3988
- const ee = g(), ns = k(
3979
+ const ue = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, St = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, Et = Cs(c);
3980
+ let fe;
3981
+ St ? fe = () => u(c) : Et && (fe = () => R(!0));
3982
+ const ee = g(), es = k(
3989
3983
  "str-chat__message str-chat__message-simple",
3990
3984
  `str-chat__message--${c.type}`,
3991
3985
  `str-chat__message--${c.status}`,
3992
3986
  ee ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3993
3987
  c.text ? "str-chat__message--has-text" : "has-no-text",
3994
3988
  {
3995
- "str-chat__message--has-attachment": M,
3989
+ "str-chat__message--has-attachment": D,
3996
3990
  "str-chat__message--highlighted": h,
3997
3991
  "str-chat__message--pinned pinned-message": c.pinned,
3998
3992
  "str-chat__message--with-reactions": W,
3999
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Lt = c == null ? void 0 : c.error) == null ? void 0 : Lt.status) !== 403,
4000
- "str-chat__message-with-thread-link": me || ie,
3993
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
3994
+ "str-chat__message-with-thread-link": ue || ie,
4001
3995
  "str-chat__virtual-message__wrapper--end": a,
4002
3996
  "str-chat__virtual-message__wrapper--first": r,
4003
3997
  "str-chat__virtual-message__wrapper--group": o
4004
3998
  }
4005
- ), Ge = c.poll_id && N.polls.fromState(c.poll_id), Et = ur(c), ye = Fe(c), ss = mt(c), Ye = !!(j != null && j.length && !c.quoted_message), It = ye && ee && Ye, as = ne && ue && !c.quoted_message && !Ge && !Q && !ye, Tt = {
3999
+ ), Ye = c.poll_id && N.polls.fromState(c.poll_id), It = dr(c), _e = Fe(c), ts = ht(c), We = !!(G != null && G.length && !c.quoted_message), Tt = _e && ee && We, ns = se && Me && !c.quoted_message && !Ye && !X && !_e, At = {
4006
4000
  contentType: "text",
4007
- amountText: (Mt = c.metadata) == null ? void 0 : Mt.amount_text,
4008
- paymentStatus: (Dt = c.metadata) == null ? void 0 : Dt.payment_status,
4009
- renderedText: c.text && /* @__PURE__ */ n(ze, { message: X, renderText: p })
4010
- }, At = {
4001
+ amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
4002
+ paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
4003
+ renderedText: c.text && /* @__PURE__ */ n(ze, { message: K, renderText: p })
4004
+ }, Rt = {
4011
4005
  contentType: "media",
4012
- title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
4013
- mimeType: (Pt = c.metadata) == null ? void 0 : Pt.attachment_mime_type,
4014
- thumbnailUrl: (zt = c.metadata) == null ? void 0 : zt.attachment_thumbnail,
4015
- amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
4016
- detail: ($t = c.metadata) == null ? void 0 : $t.attachment_detail,
4017
- paymentStatus: (Bt = c.metadata) == null ? void 0 : Bt.payment_status,
4006
+ title: (Pt = c.metadata) == null ? void 0 : Pt.attachment_title,
4007
+ mimeType: (zt = c.metadata) == null ? void 0 : zt.attachment_mime_type,
4008
+ thumbnailUrl: (Ft = c.metadata) == null ? void 0 : Ft.attachment_thumbnail,
4009
+ amountText: ($t = c.metadata) == null ? void 0 : $t.amount_text,
4010
+ detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
4011
+ paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
4018
4012
  onFetchSource: E ? () => E(c, _) : void 0
4019
4013
  };
4020
- return /* @__PURE__ */ f(K, { children: [
4014
+ return /* @__PURE__ */ f(J, { children: [
4021
4015
  s && /* @__PURE__ */ n(
4022
4016
  S,
4023
4017
  {
@@ -4025,7 +4019,7 @@ const Wi = ({
4025
4019
  }
4026
4020
  ),
4027
4021
  F && /* @__PURE__ */ n(
4028
- Is,
4022
+ Ss,
4029
4023
  {
4030
4024
  MessageBouncePrompt: P,
4031
4025
  onClose: () => R(!1),
@@ -4035,14 +4029,14 @@ const Wi = ({
4035
4029
  /* @__PURE__ */ f(
4036
4030
  "div",
4037
4031
  {
4038
- className: ns,
4032
+ className: es,
4039
4033
  "data-message-id": c.id,
4040
4034
  "data-dd-privacy": "mask",
4041
4035
  children: [
4042
4036
  y && /* @__PURE__ */ n(y, {}),
4043
- !!I && /* @__PURE__ */ n(Z, { reminder: I }),
4037
+ !!I && /* @__PURE__ */ n(Q, { reminder: I }),
4044
4038
  c.user && /* @__PURE__ */ n(
4045
- _e,
4039
+ we,
4046
4040
  {
4047
4041
  className: "str-chat__avatar str-chat__message-sender-avatar",
4048
4042
  id: c.user.id,
@@ -4050,52 +4044,52 @@ const Wi = ({
4050
4044
  name: c.user.name || c.user.id,
4051
4045
  size: 24,
4052
4046
  shape: "circle",
4053
- dmAgentEnabled: ye
4047
+ dmAgentEnabled: _e
4054
4048
  }
4055
4049
  ),
4056
4050
  /* @__PURE__ */ n(
4057
4051
  "div",
4058
4052
  {
4059
4053
  className: k("str-chat__message-inner", {
4060
- "str-chat__simple-message--error-failed": Ct || St
4054
+ "str-chat__simple-message--error-failed": St || Et
4061
4055
  }),
4062
4056
  "data-testid": "message-inner",
4063
- onClick: ge,
4064
- onKeyDown: ge,
4065
- role: ge ? "button" : void 0,
4066
- tabIndex: ge ? 0 : void 0,
4057
+ onClick: fe,
4058
+ onKeyDown: fe,
4059
+ role: fe ? "button" : void 0,
4060
+ tabIndex: fe ? 0 : void 0,
4067
4061
  style: {
4068
4062
  // Force margins to 0 to prevent hover layout shift
4069
4063
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
4070
4064
  marginInlineEnd: 0,
4071
4065
  marginInlineStart: 0
4072
4066
  },
4073
- children: Et ? /* @__PURE__ */ n(Ke, { message: c, standalone: !0 }) : cr(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4067
+ children: It ? /* @__PURE__ */ n(Ze, { message: c, standalone: !0 }) : or(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4074
4068
  ee && C && /* @__PURE__ */ n(C, {}),
4075
- ee ? /* @__PURE__ */ n(Pe, { ...Tt, isMine: !0 }) : /* @__PURE__ */ n(
4069
+ ee ? /* @__PURE__ */ n(Pe, { ...At, isMine: !0 }) : /* @__PURE__ */ n(
4076
4070
  Pe,
4077
4071
  {
4078
- ...Tt,
4072
+ ...At,
4079
4073
  isMine: !1,
4080
4074
  isUnlocking: T(c.id),
4081
4075
  onUnlockClick: () => L == null ? void 0 : L(c, _)
4082
4076
  }
4083
4077
  ),
4084
4078
  !ee && C && /* @__PURE__ */ n(C, {})
4085
- ] }) }) : dr(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
4079
+ ] }) }) : cr(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
4086
4080
  /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4087
4081
  ee && C && /* @__PURE__ */ n(C, {}),
4088
4082
  ee ? /* @__PURE__ */ n(
4089
4083
  Pe,
4090
4084
  {
4091
- ...At,
4085
+ ...Rt,
4092
4086
  isMine: !0,
4093
4087
  onPreviewClick: () => L ? L(c, _) : void 0
4094
4088
  }
4095
4089
  ) : /* @__PURE__ */ n(
4096
4090
  Pe,
4097
4091
  {
4098
- ...At,
4092
+ ...Rt,
4099
4093
  isMine: !1,
4100
4094
  isUnlocking: T(c.id),
4101
4095
  onUnlockClick: () => L ? L(c, _) : void 0,
@@ -4108,28 +4102,28 @@ const Wi = ({
4108
4102
  "div",
4109
4103
  {
4110
4104
  className: k("str-chat__message-bubble", {
4111
- "relative isolate": se
4105
+ "relative isolate": ne
4112
4106
  }),
4113
4107
  children: [
4114
4108
  /* @__PURE__ */ n(
4115
4109
  ze,
4116
4110
  {
4117
- message: X,
4111
+ message: K,
4118
4112
  renderText: p
4119
4113
  }
4120
4114
  ),
4121
- se && /* @__PURE__ */ n($e, { side: ee ? "me" : "other" })
4115
+ ne && /* @__PURE__ */ n($e, { side: ee ? "me" : "other" })
4122
4116
  ]
4123
4117
  }
4124
4118
  )
4125
- ] }) : as ? /* @__PURE__ */ n(
4126
- Wi,
4119
+ ] }) : ns ? /* @__PURE__ */ n(
4120
+ Yi,
4127
4121
  {
4128
4122
  groupPosition: De,
4129
4123
  isMyMessage: ee,
4130
4124
  message: {
4131
- ...X,
4132
- attachments: j,
4125
+ ...K,
4126
+ attachments: G,
4133
4127
  // MessageText prefers message.i18n[userLanguage_text] from
4134
4128
  // Stream's TranslationContext over message.text. Drop i18n so
4135
4129
  // the caption uses displayMessage.text from viewerLanguage.
@@ -4141,93 +4135,93 @@ const Wi = ({
4141
4135
  "div",
4142
4136
  {
4143
4137
  className: k("str-chat__message-bubble", {
4144
- "relative isolate": se
4138
+ "relative isolate": ne
4145
4139
  }),
4146
4140
  children: [
4147
- ye && !It && /* @__PURE__ */ n(
4148
- Ke,
4141
+ _e && !Tt && /* @__PURE__ */ n(
4142
+ Ze,
4149
4143
  {
4150
4144
  message: c,
4151
- hasAttachment: Ye,
4145
+ hasAttachment: We,
4152
4146
  isMyMessage: ee
4153
4147
  }
4154
4148
  ),
4155
- Ge && /* @__PURE__ */ n(Ts, { poll: Ge }),
4156
- j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
4157
- D,
4149
+ Ye && /* @__PURE__ */ n(Es, { poll: Ye }),
4150
+ G != null && G.length && !c.quoted_message ? /* @__PURE__ */ n(
4151
+ M,
4158
4152
  {
4159
4153
  actionHandler: l,
4160
- attachments: j
4154
+ attachments: G
4161
4155
  }
4162
4156
  ) : null,
4163
- Q ? /* @__PURE__ */ n(
4164
- G,
4157
+ X ? /* @__PURE__ */ n(
4158
+ V,
4165
4159
  {
4166
- message: X,
4160
+ message: K,
4167
4161
  renderText: p
4168
4162
  }
4169
4163
  ) : /* @__PURE__ */ n(
4170
4164
  ze,
4171
4165
  {
4172
- message: X,
4166
+ message: K,
4173
4167
  renderText: p
4174
4168
  }
4175
4169
  ),
4176
- /* @__PURE__ */ n(nt, {}),
4177
- se && /* @__PURE__ */ n($e, { side: ee ? "me" : "other" })
4170
+ /* @__PURE__ */ n(st, {}),
4171
+ ne && /* @__PURE__ */ n($e, { side: ee ? "me" : "other" })
4178
4172
  ]
4179
4173
  }
4180
4174
  ) })
4181
4175
  }
4182
4176
  ),
4183
- !ss && !Et && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!ye || It) && /* @__PURE__ */ n(
4184
- Ke,
4177
+ !ts && !It && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!_e || Tt) && /* @__PURE__ */ n(
4178
+ Ze,
4185
4179
  {
4186
4180
  message: c,
4187
- hasAttachment: Ye,
4181
+ hasAttachment: We,
4188
4182
  isMyMessage: ee
4189
4183
  }
4190
4184
  ) }),
4191
4185
  /* @__PURE__ */ n(
4192
- wr,
4186
+ xr,
4193
4187
  {
4194
4188
  onOutboundClick: x,
4195
4189
  resolvedOutbound: b
4196
4190
  }
4197
4191
  ),
4198
- me && /* @__PURE__ */ n(
4192
+ ue && /* @__PURE__ */ n(
4199
4193
  te,
4200
4194
  {
4201
4195
  onClick: d,
4202
4196
  reply_count: c.reply_count
4203
4197
  }
4204
4198
  ),
4205
- ie && /* @__PURE__ */ n(V, {})
4199
+ ie && /* @__PURE__ */ n(H, {})
4206
4200
  ]
4207
4201
  },
4208
4202
  c.id
4209
4203
  )
4210
4204
  ] });
4211
- }, qi = z.memo(
4212
- Xi,
4205
+ }, Xi = z.memo(
4206
+ Wi,
4213
4207
  (e, t) => {
4214
4208
  var s, a, r, i;
4215
- return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : ms(e, t);
4209
+ return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : ds(e, t);
4216
4210
  }
4217
- ), Ki = (e) => {
4211
+ ), qi = (e) => {
4218
4212
  var i;
4219
- const t = fe("CustomMessage"), s = xe(Mn), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
4213
+ const t = he("CustomMessage"), s = ve(Ln), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
4220
4214
  return /* @__PURE__ */ n(
4221
- qi,
4215
+ Xi,
4222
4216
  {
4223
4217
  ...t,
4224
4218
  ...e,
4225
4219
  resolvedOutbound: r
4226
4220
  }
4227
4221
  );
4228
- }, Zi = () => {
4222
+ }, Ki = () => {
4229
4223
  var s;
4230
- const { handleDelete: e, message: t } = fe("CustomMessageActions");
4224
+ const { handleDelete: e, message: t } = he("CustomMessageActions");
4231
4225
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
4232
4226
  pn,
4233
4227
  {
@@ -4235,11 +4229,11 @@ const Wi = ({
4235
4229
  "aria-label": "Delete",
4236
4230
  title: "Delete",
4237
4231
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4238
- children: /* @__PURE__ */ n(pa, { size: 16, weight: "light", "aria-hidden": !0 })
4232
+ children: /* @__PURE__ */ n(da, { size: 16, weight: "light", "aria-hidden": !0 })
4239
4233
  }
4240
4234
  );
4241
- }, Ji = () => {
4242
- const { handleFlag: e } = fe("CustomMessageActions");
4235
+ }, Zi = () => {
4236
+ const { handleFlag: e } = he("CustomMessageActions");
4243
4237
  return /* @__PURE__ */ n(
4244
4238
  pn,
4245
4239
  {
@@ -4250,26 +4244,26 @@ const Wi = ({
4250
4244
  children: /* @__PURE__ */ n(mn, { size: 16, weight: "light", "aria-hidden": !0 })
4251
4245
  }
4252
4246
  );
4253
- }, Qi = () => {
4247
+ }, Ji = () => {
4254
4248
  var t;
4255
- const { message: e } = fe("CustomMessageActions");
4249
+ const { message: e } = he("CustomMessageActions");
4256
4250
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== oe.ATTACHMENT ? null : /* @__PURE__ */ n(
4257
- wa,
4251
+ xa,
4258
4252
  {
4259
4253
  messageActionSet: [
4260
- { Component: Zi, placement: "quick", type: "delete" },
4261
- { Component: Ji, placement: "quick", type: "flag" }
4254
+ { Component: Ki, placement: "quick", type: "delete" },
4255
+ { Component: Zi, placement: "quick", type: "flag" }
4262
4256
  ]
4263
4257
  }
4264
4258
  );
4265
- }, el = (e) => ({
4259
+ }, Qi = (e) => ({
4266
4260
  linkPreviews: Array.from(e.previews.values()).filter(
4267
- (t) => tt.previewIsLoaded(t) || tt.previewIsLoading(t)
4261
+ (t) => nt.previewIsLoaded(t) || nt.previewIsLoading(t)
4268
4262
  )
4269
- }), tl = () => {
4270
- const { linkPreviewsManager: e } = As(), { linkPreviews: t } = Rs(
4263
+ }), el = () => {
4264
+ const { linkPreviewsManager: e } = Is(), { linkPreviews: t } = Ts(
4271
4265
  e.state,
4272
- el
4266
+ Qi
4273
4267
  ), s = (r) => {
4274
4268
  e.dismissPreview(r);
4275
4269
  };
@@ -4318,9 +4312,9 @@ const Wi = ({
4318
4312
  // edge lands ~6px past the fold, reachable by scrolling. That residue
4319
4313
  // belongs to whoever owns the mobile layout contract, not to this component.
4320
4314
  /* @__PURE__ */ n("div", { className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2", children: t.map((r) => {
4321
- const i = tt.previewIsLoading(r);
4315
+ const i = nt.previewIsLoading(r);
4322
4316
  return /* @__PURE__ */ n(
4323
- rt.Composer,
4317
+ it.Composer,
4324
4318
  {
4325
4319
  title: r.title,
4326
4320
  url: r.og_scrape_url,
@@ -4333,7 +4327,7 @@ const Wi = ({
4333
4327
  );
4334
4328
  }) })
4335
4329
  ) : null;
4336
- }, Be = z.createContext(!1), nl = 200, ao = () => xe(Be), sl = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
4330
+ }, Be = z.createContext(!1), tl = 200, so = () => ve(Be), nl = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
4337
4331
  "button",
4338
4332
  {
4339
4333
  ...s,
@@ -4342,13 +4336,13 @@ const Wi = ({
4342
4336
  disabled: t,
4343
4337
  onPointerDown: (a) => a.preventDefault(),
4344
4338
  onClick: e,
4345
- children: /* @__PURE__ */ n(ba, { weight: "bold", className: "size-4" })
4339
+ children: /* @__PURE__ */ n(ua, { weight: "bold", className: "size-4" })
4346
4340
  }
4347
- ), an = () => {
4348
- const e = xe(Be), { handleSubmit: t } = Ls(), s = Ms(), a = e || !s, {
4349
- SendButton: r = sl,
4350
- AttachmentPreviewList: i = Ds
4351
- } = dn("CustomMessageInput"), o = z.useRef(null);
4341
+ ), rn = () => {
4342
+ const e = ve(Be), { handleSubmit: t } = As(), s = Rs(), a = e || !s, {
4343
+ SendButton: r = nl,
4344
+ AttachmentPreviewList: i = Ls
4345
+ } = un("CustomMessageInput"), o = z.useRef(null);
4352
4346
  return z.useEffect(() => {
4353
4347
  const l = o.current;
4354
4348
  if (!l || typeof ResizeObserver > "u")
@@ -4411,13 +4405,13 @@ const Wi = ({
4411
4405
  "data-dd-privacy": "mask",
4412
4406
  children: [
4413
4407
  /* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
4414
- /* @__PURE__ */ n(Os, {}),
4415
- /* @__PURE__ */ n(tl, {}),
4408
+ /* @__PURE__ */ n(Ms, {}),
4409
+ /* @__PURE__ */ n(el, {}),
4416
4410
  /* @__PURE__ */ n(i, {})
4417
4411
  ] }),
4418
4412
  /* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
4419
4413
  /* @__PURE__ */ n(
4420
- Ps,
4414
+ Ds,
4421
4415
  {
4422
4416
  "aria-disabled": e || void 0,
4423
4417
  containerClassName: "min-w-0 flex-1 leading-[0]",
@@ -4444,7 +4438,7 @@ const Wi = ({
4444
4438
  ]
4445
4439
  }
4446
4440
  );
4447
- }, rn = ({
4441
+ }, ln = ({
4448
4442
  renderActions: e,
4449
4443
  renderHeader: t,
4450
4444
  renderFooter: s,
@@ -4453,7 +4447,7 @@ const Wi = ({
4453
4447
  composerInput: i
4454
4448
  }) => {
4455
4449
  var h;
4456
- const { channel: o } = we(), l = ((h = o == null ? void 0 : o.data) == null ? void 0 : h.frozen) === !0, d = !!i, u = z.useRef(null);
4450
+ const { channel: o } = xe(), l = ((h = o == null ? void 0 : o.data) == null ? void 0 : h.frozen) === !0, d = !!i, u = z.useRef(null);
4457
4451
  return z.useEffect(() => {
4458
4452
  if (!d)
4459
4453
  return;
@@ -4466,7 +4460,7 @@ const Wi = ({
4466
4460
  c = v;
4467
4461
  const b = Array.from(
4468
4462
  g.querySelectorAll(".str-chat__list")
4469
- ).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight < nl : !1;
4463
+ ).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight < tl : !1;
4470
4464
  g.style.setProperty(
4471
4465
  "--messaging-composer-height",
4472
4466
  `${v}px`
@@ -4499,7 +4493,7 @@ const Wi = ({
4499
4493
  ] })
4500
4494
  ]
4501
4495
  }
4502
- ) : /* @__PURE__ */ f(K, { children: [
4496
+ ) : /* @__PURE__ */ f(J, { children: [
4503
4497
  t == null ? void 0 : t(),
4504
4498
  /* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
4505
4499
  s == null ? void 0 : s()
@@ -4528,7 +4522,7 @@ const Wi = ({
4528
4522
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4529
4523
  children: [
4530
4524
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4531
- /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Ht, { Input: i ?? an }) })
4525
+ /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: i ?? rn }) })
4532
4526
  ]
4533
4527
  }
4534
4528
  ),
@@ -4547,67 +4541,67 @@ const Wi = ({
4547
4541
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4548
4542
  children: [
4549
4543
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4550
- /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Ht, { Input: an }) })
4544
+ /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: rn }) })
4551
4545
  ]
4552
4546
  }
4553
4547
  ),
4554
4548
  s == null ? void 0 : s()
4555
4549
  ] });
4556
- }, al = {
4550
+ }, sl = {
4557
4551
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
4558
4552
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
4559
- }, rl = ["SYSTEM_AGE_SAFETY_BLOCKED"], il = {
4553
+ }, al = ["SYSTEM_AGE_SAFETY_BLOCKED"], rl = {
4560
4554
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
4561
- }, Qe = "age safety guidelines.", ll = "https://linktr.ee/s/about/contact", ol = (e) => rl.includes(
4555
+ }, et = "age safety guidelines.", il = "https://linktr.ee/s/about/contact", ll = (e) => al.includes(
4562
4556
  e
4563
- ), cl = (e) => {
4557
+ ), ol = (e) => {
4564
4558
  var t;
4565
- return ol((t = e.metadata) == null ? void 0 : t.custom_type);
4566
- }, dl = (e) => {
4559
+ return ll((t = e.metadata) == null ? void 0 : t.custom_type);
4560
+ }, cl = (e) => {
4567
4561
  var a;
4568
4562
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
4569
- if (Gt(t))
4563
+ if (Wt(t))
4570
4564
  return {
4571
4565
  kind: "dm-agent",
4572
4566
  type: t
4573
4567
  };
4574
- if (Gs(t))
4568
+ if (pa(t))
4575
4569
  return {
4576
4570
  kind: "age-safety",
4577
4571
  type: t
4578
4572
  };
4579
4573
  const s = e.dm_agent_system_type;
4580
- if (Gt(s))
4574
+ if (Wt(s))
4581
4575
  return {
4582
4576
  kind: "dm-agent",
4583
4577
  type: s
4584
4578
  };
4585
- }, ul = (e) => {
4586
- const t = e.indexOf(Qe);
4579
+ }, dl = (e) => {
4580
+ const t = e.indexOf(et);
4587
4581
  if (t === -1)
4588
4582
  return e;
4589
- const s = t + Qe.length;
4590
- return /* @__PURE__ */ f(K, { children: [
4583
+ const s = t + et.length;
4584
+ return /* @__PURE__ */ f(J, { children: [
4591
4585
  e.slice(0, t),
4592
4586
  /* @__PURE__ */ n(
4593
4587
  "a",
4594
4588
  {
4595
- href: ll,
4589
+ href: il,
4596
4590
  target: "_blank",
4597
4591
  rel: "noopener noreferrer",
4598
4592
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
4599
- children: Qe
4593
+ children: et
4600
4594
  }
4601
4595
  ),
4602
4596
  e.slice(s)
4603
4597
  ] });
4604
- }, ml = (e) => {
4598
+ }, ul = (e) => {
4605
4599
  var a, r;
4606
- const t = !cl(e.message), s = dl(
4600
+ const t = !ol(e.message), s = cl(
4607
4601
  e.message
4608
4602
  );
4609
4603
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
4610
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || al[s.type];
4604
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || sl[s.type];
4611
4605
  return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4612
4606
  /* @__PURE__ */ f(
4613
4607
  "div",
@@ -4617,7 +4611,7 @@ const Wi = ({
4617
4611
  "data-dm-agent-system-type": s.type,
4618
4612
  children: [
4619
4613
  /* @__PURE__ */ n(
4620
- va,
4614
+ ma,
4621
4615
  {
4622
4616
  size: 16,
4623
4617
  weight: "regular",
@@ -4629,11 +4623,11 @@ const Wi = ({
4629
4623
  ]
4630
4624
  }
4631
4625
  ),
4632
- !t && /* @__PURE__ */ n(We, { message: e.message })
4626
+ !t && /* @__PURE__ */ n(Xe, { message: e.message })
4633
4627
  ] });
4634
4628
  }
4635
4629
  if ((s == null ? void 0 : s.kind) === "age-safety") {
4636
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || il[s.type];
4630
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || rl[s.type];
4637
4631
  return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4638
4632
  /* @__PURE__ */ f(
4639
4633
  "div",
@@ -4643,7 +4637,7 @@ const Wi = ({
4643
4637
  "data-age-safety-system-type": s.type,
4644
4638
  children: [
4645
4639
  /* @__PURE__ */ n(
4646
- xa,
4640
+ ha,
4647
4641
  {
4648
4642
  size: 24,
4649
4643
  weight: "duotone",
@@ -4652,11 +4646,11 @@ const Wi = ({
4652
4646
  "data-testid": "age-safety-system-message-icon"
4653
4647
  }
4654
4648
  ),
4655
- /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: ul(i) }) })
4649
+ /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: dl(i) }) })
4656
4650
  ]
4657
4651
  }
4658
4652
  ),
4659
- !t && /* @__PURE__ */ n(We, { message: e.message })
4653
+ !t && /* @__PURE__ */ n(Xe, { message: e.message })
4660
4654
  ] });
4661
4655
  }
4662
4656
  return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -4665,9 +4659,9 @@ const Wi = ({
4665
4659
  /* @__PURE__ */ n("p", { children: e.message.text }),
4666
4660
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
4667
4661
  ] }),
4668
- !t && /* @__PURE__ */ n(We, { message: e.message })
4662
+ !t && /* @__PURE__ */ n(Xe, { message: e.message })
4669
4663
  ] });
4670
- }, Kn = je(!1), et = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
4664
+ }, Xn = je(!1), tt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
4671
4665
  "animateTransform",
4672
4666
  {
4673
4667
  attributeName: "transform",
@@ -4677,17 +4671,17 @@ const Wi = ({
4677
4671
  begin: `${120 * t}ms`,
4678
4672
  repeatCount: "indefinite"
4679
4673
  }
4680
- ) }), hl = /* @__PURE__ */ new Set([
4681
- Xe.Thinking,
4682
- Xe.Generating,
4683
- Xe.ExternalSources
4684
- ]), fl = ({ threadList: e }) => {
4674
+ ) }), ml = /* @__PURE__ */ new Set([
4675
+ qe.Thinking,
4676
+ qe.Generating,
4677
+ qe.ExternalSources
4678
+ ]), hl = ({ threadList: e }) => {
4685
4679
  var p, w;
4686
- const { channel: t, channelConfig: s, thread: a } = we(), { client: r } = He(), { typing: i = {} } = zs(), { aiState: o } = Fs(t), l = xe(Kn);
4687
- if (!e && l && hl.has(o)) {
4688
- const v = gl(t, (p = r.user) == null ? void 0 : p.id);
4680
+ const { channel: t, channelConfig: s, thread: a } = xe(), { client: r } = He(), { typing: i = {} } = Os(), { aiState: o } = Ps(t), l = ve(Xn);
4681
+ if (!e && l && ml.has(o)) {
4682
+ const v = fl(t, (p = r.user) == null ? void 0 : p.id);
4689
4683
  return /* @__PURE__ */ n(
4690
- ln,
4684
+ on,
4691
4685
  {
4692
4686
  avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
4693
4687
  avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
@@ -4713,7 +4707,7 @@ const Wi = ({
4713
4707
  return null;
4714
4708
  const g = (w = m[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4715
4709
  return /* @__PURE__ */ n(
4716
- ln,
4710
+ on,
4717
4711
  {
4718
4712
  avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4719
4713
  avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
@@ -4721,7 +4715,7 @@ const Wi = ({
4721
4715
  testId: "typing-indicator"
4722
4716
  }
4723
4717
  );
4724
- }, ln = ({
4718
+ }, on = ({
4725
4719
  avatarId: e,
4726
4720
  avatarName: t,
4727
4721
  avatarImage: s,
@@ -4736,7 +4730,7 @@ const Wi = ({
4736
4730
  },
4737
4731
  children: /* @__PURE__ */ f("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4738
4732
  /* @__PURE__ */ n(
4739
- _e,
4733
+ we,
4740
4734
  {
4741
4735
  className: "str-chat__avatar str-chat__message-sender-avatar",
4742
4736
  id: e,
@@ -4757,9 +4751,9 @@ const Wi = ({
4757
4751
  height: "13",
4758
4752
  overflow: "visible",
4759
4753
  children: [
4760
- /* @__PURE__ */ n(et, { cx: "4", index: 0 }),
4761
- /* @__PURE__ */ n(et, { cx: "16", index: 1 }),
4762
- /* @__PURE__ */ n(et, { cx: "28", index: 2 })
4754
+ /* @__PURE__ */ n(tt, { cx: "4", index: 0 }),
4755
+ /* @__PURE__ */ n(tt, { cx: "16", index: 1 }),
4756
+ /* @__PURE__ */ n(tt, { cx: "28", index: 2 })
4763
4757
  ]
4764
4758
  }
4765
4759
  ) }) }),
@@ -4768,7 +4762,7 @@ const Wi = ({
4768
4762
  ] })
4769
4763
  }
4770
4764
  );
4771
- function gl(e, t) {
4765
+ function fl(e, t) {
4772
4766
  var a;
4773
4767
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4774
4768
  for (const r of Object.values(s)) {
@@ -4777,7 +4771,7 @@ function gl(e, t) {
4777
4771
  return i;
4778
4772
  }
4779
4773
  }
4780
- const pl = () => null, bl = ({ className: e, message: t }) => /* @__PURE__ */ f(
4774
+ const gl = () => null, pl = ({ className: e, message: t }) => /* @__PURE__ */ f(
4781
4775
  "div",
4782
4776
  {
4783
4777
  className: k("flex items-center justify-center h-full", e),
@@ -4821,11 +4815,11 @@ const pl = () => null, bl = ({ className: e, message: t }) => /* @__PURE__ */ f(
4821
4815
  ]
4822
4816
  }
4823
4817
  ), Ue = z.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
4824
- /* @__PURE__ */ n(bl, { className: "w-6 h-6" }),
4818
+ /* @__PURE__ */ n(pl, { className: "w-6 h-6" }),
4825
4819
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
4826
4820
  ] }) }));
4827
4821
  Ue.displayName = "LoadingState";
4828
- const vl = ({
4822
+ const bl = ({
4829
4823
  onBack: e,
4830
4824
  showBackButton: t,
4831
4825
  renderMessageInputActions: s,
@@ -4853,17 +4847,17 @@ const vl = ({
4853
4847
  resolveOutbound: $,
4854
4848
  composerInput: F
4855
4849
  }) => {
4856
- const { channel: R, messages: I } = we(), D = H(E);
4850
+ const { channel: R, messages: I } = xe(), M = j(E);
4857
4851
  Y(() => {
4858
- D.current = E;
4852
+ M.current = E;
4859
4853
  }, [E]);
4860
- const S = q((Z) => {
4861
- var G;
4862
- (G = D.current) == null || G.call(D, Z);
4863
- }, []), C = E ? S : void 0, A = pr(I, $), P = R.state.messages.some(
4864
- (Z) => Z.type !== "deleted"
4865
- ), U = v ? /* @__PURE__ */ n(z.Fragment, { children: v() }, "lt-channel-banner") : null, V = /* @__PURE__ */ n(
4866
- La,
4854
+ const S = Z((Q) => {
4855
+ var V;
4856
+ (V = M.current) == null || V.call(M, Q);
4857
+ }, []), C = E ? S : void 0, A = gr(I, $), P = R.state.messages.some(
4858
+ (Q) => Q.type !== "deleted"
4859
+ ), U = v ? /* @__PURE__ */ n(z.Fragment, { children: v() }, "lt-channel-banner") : null, H = /* @__PURE__ */ n(
4860
+ Ra,
4867
4861
  {
4868
4862
  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%)]",
4869
4863
  onBack: e,
@@ -4882,44 +4876,44 @@ const vl = ({
4882
4876
  renderChannelActions: b,
4883
4877
  onParticipantNameClick: L
4884
4878
  }
4885
- ), te = q(
4886
- (Z) => {
4887
- const { message: G } = fe("ChannelView"), y = /* @__PURE__ */ n(
4888
- Ki,
4879
+ ), te = Z(
4880
+ (Q) => {
4881
+ const { message: V } = he("ChannelView"), y = /* @__PURE__ */ n(
4882
+ qi,
4889
4883
  {
4890
- ...Z,
4884
+ ...Q,
4891
4885
  viewerLanguage: _,
4892
4886
  onOutboundClick: C
4893
4887
  }
4894
4888
  );
4895
- return !N || !G ? y : N(y, G);
4889
+ return !N || !V ? y : N(y, V);
4896
4890
  },
4897
4891
  [C, N, _]
4898
4892
  );
4899
- return /* @__PURE__ */ n(Mn.Provider, { value: A, children: /* @__PURE__ */ n(
4900
- Bs,
4893
+ return /* @__PURE__ */ n(Ln.Provider, { value: A, children: /* @__PURE__ */ n(
4894
+ Fs,
4901
4895
  {
4902
4896
  overrides: {
4903
4897
  Message: te,
4904
- MessageActions: Qi,
4898
+ MessageActions: Ji,
4905
4899
  UnreadMessagesNotification: () => null,
4906
4900
  UnreadMessagesSeparator: () => null
4907
4901
  },
4908
- children: /* @__PURE__ */ n(Us, { children: F ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4902
+ children: /* @__PURE__ */ n($s, { children: F ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4909
4903
  /* @__PURE__ */ f(
4910
4904
  "div",
4911
4905
  {
4912
4906
  className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
4913
4907
  children: [
4914
4908
  !P && /* @__PURE__ */ n("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
4915
- V,
4909
+ H,
4916
4910
  U
4917
4911
  ] }) }),
4918
4912
  /* @__PURE__ */ n(
4919
- Vt,
4913
+ Gt,
4920
4914
  {
4921
4915
  head: P ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
4922
- V,
4916
+ H,
4923
4917
  U
4924
4918
  ] }) : void 0,
4925
4919
  hideDeletedMessages: !0,
@@ -4931,7 +4925,7 @@ const vl = ({
4931
4925
  "lt-channel-message-list"
4932
4926
  ),
4933
4927
  /* @__PURE__ */ n(
4934
- rn,
4928
+ ln,
4935
4929
  {
4936
4930
  ...s && {
4937
4931
  renderActions: () => s == null ? void 0 : s(R)
@@ -4946,21 +4940,21 @@ const vl = ({
4946
4940
  },
4947
4941
  "lt-channel-message-input"
4948
4942
  )
4949
- ] }) : /* @__PURE__ */ f(K, { children: [
4943
+ ] }) : /* @__PURE__ */ f(J, { children: [
4950
4944
  /* @__PURE__ */ f(
4951
4945
  "div",
4952
4946
  {
4953
4947
  className: "flex-1 overflow-hidden relative",
4954
4948
  children: [
4955
4949
  !P && /* @__PURE__ */ n("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
4956
- V,
4950
+ H,
4957
4951
  U
4958
4952
  ] }) }),
4959
4953
  /* @__PURE__ */ n(
4960
- Vt,
4954
+ Gt,
4961
4955
  {
4962
4956
  head: P ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
4963
- V,
4957
+ H,
4964
4958
  U
4965
4959
  ] }) : void 0,
4966
4960
  hideDeletedMessages: !0,
@@ -4973,7 +4967,7 @@ const vl = ({
4973
4967
  ),
4974
4968
  r ? /* @__PURE__ */ n(z.Fragment, { children: r(R) }, "lt-channel-conversation-footer") : null,
4975
4969
  /* @__PURE__ */ n(
4976
- rn,
4970
+ ln,
4977
4971
  {
4978
4972
  ...s && {
4979
4973
  renderActions: () => s == null ? void 0 : s(R)
@@ -4988,7 +4982,7 @@ const vl = ({
4988
4982
  ] }) })
4989
4983
  }
4990
4984
  ) });
4991
- }, Zn = z.memo(
4985
+ }, qn = z.memo(
4992
4986
  ({
4993
4987
  channel: e,
4994
4988
  onBack: t,
@@ -4999,7 +4993,7 @@ const vl = ({
4999
4993
  onLeaveConversation: o,
5000
4994
  onBlockParticipant: l,
5001
4995
  className: d,
5002
- CustomChannelEmptyState: u = pl,
4996
+ CustomChannelEmptyState: u = gl,
5003
4997
  showDeleteConversation: h = !0,
5004
4998
  onDeleteConversationClick: m,
5005
4999
  onBlockParticipantClick: g,
@@ -5018,70 +5012,67 @@ const vl = ({
5018
5012
  renderMessage: F,
5019
5013
  onMessageLinkClick: R,
5020
5014
  sendButton: I,
5021
- attachmentPreviewList: D,
5015
+ attachmentPreviewList: M,
5022
5016
  viewerLanguage: S,
5023
5017
  showChannelInfo: C = !0,
5024
5018
  onParticipantNameClick: A,
5025
5019
  onOutboundClick: P,
5026
5020
  resolveOutbound: U,
5027
- composerInput: V
5021
+ composerInput: H
5028
5022
  }) => {
5029
- const te = q(
5030
- async (y, M, W) => {
5031
- var ue;
5032
- const Q = ((ue = e.data) == null ? void 0 : ue.chatbot_paused) === !0, j = b && !Q, J = {
5033
- ...M,
5034
- ...j && { silent: !0 },
5023
+ const te = Z(
5024
+ async (V, y, D) => {
5025
+ var se;
5026
+ const W = ((se = e.data) == null ? void 0 : se.chatbot_paused) === !0, X = b && !W, G = {
5027
+ ...y,
5028
+ ...X && { silent: !0 },
5035
5029
  ...N && {
5036
5030
  metadata: {
5037
- ...M.metadata ?? {},
5031
+ ...y.metadata ?? {},
5038
5032
  ...N
5039
5033
  }
5040
5034
  }
5041
- }, X = {
5042
- ...W,
5043
- ...j && { skip_push: !0 }
5044
- }, ne = await e.sendMessage(J, X);
5045
- return _ == null || _(ne), ne;
5035
+ }, q = {
5036
+ ...D,
5037
+ ...X && { skip_push: !0 }
5038
+ }, K = await e.sendMessage(G, q);
5039
+ return _ == null || _(K), K;
5046
5040
  },
5047
5041
  [e, b, N, _]
5048
- ), Z = H(null);
5049
- Y(() => {
5042
+ ), Q = j(null);
5043
+ return Y(() => {
5050
5044
  if (!R) return;
5051
- const y = Z.current;
5052
- if (!y) return;
5053
- const M = (W) => {
5054
- const Q = W.target, j = Q == null ? void 0 : Q.closest("a[href]"), J = j == null ? void 0 : j.getAttribute("href");
5055
- if (!J) return;
5056
- const X = j == null ? void 0 : j.closest("[data-message-id]"), ne = X == null ? void 0 : X.getAttribute("data-message-id"), ue = ne ? e.state.messages.find((ae) => ae.id === ne) : void 0;
5057
- R(J, ue);
5045
+ const V = Q.current;
5046
+ if (!V) return;
5047
+ const y = (D) => {
5048
+ const W = D.target, X = W == null ? void 0 : W.closest("a[href]"), G = X == null ? void 0 : X.getAttribute("href");
5049
+ if (!G) return;
5050
+ const q = X == null ? void 0 : X.closest("[data-message-id]"), K = q == null ? void 0 : q.getAttribute("data-message-id"), se = K ? e.state.messages.find((Me) => Me.id === K) : void 0;
5051
+ R(G, se);
5058
5052
  };
5059
- return y.addEventListener("click", M), () => y.removeEventListener("click", M);
5060
- }, [R, e]);
5061
- const G = un(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
5062
- return /* @__PURE__ */ n(
5053
+ return V.addEventListener("click", y), () => V.removeEventListener("click", y);
5054
+ }, [R, e]), /* @__PURE__ */ n(
5063
5055
  "div",
5064
5056
  {
5065
- ref: Z,
5057
+ ref: Q,
5066
5058
  className: k(
5067
5059
  "messaging-channel-view h-full flex flex-col",
5068
5060
  d
5069
5061
  ),
5070
- style: G,
5071
- children: /* @__PURE__ */ n(Kn.Provider, { value: b ?? !1, children: /* @__PURE__ */ n(
5072
- $s,
5062
+ children: /* @__PURE__ */ n(Xn.Provider, { value: b ?? !1, children: /* @__PURE__ */ n(
5063
+ zs,
5073
5064
  {
5074
5065
  channel: e,
5075
- MessageSystem: ml,
5066
+ MessageSystem: ul,
5076
5067
  EmptyStateIndicator: u,
5077
5068
  LoadingIndicator: Ue,
5078
- DateSeparator: Ma,
5079
- TypingIndicator: fl,
5069
+ DateSeparator: La,
5070
+ TypingIndicator: hl,
5080
5071
  doSendMessageRequest: te,
5081
5072
  ...I ? { SendButton: I } : {},
5082
- ...D ? { AttachmentPreviewList: D } : {},
5073
+ ...M ? { AttachmentPreviewList: M } : {},
5083
5074
  children: /* @__PURE__ */ n(
5084
- vl,
5075
+ bl,
5085
5076
  {
5086
5077
  onBack: t,
5087
5078
  showBackButton: s,
@@ -5109,7 +5100,7 @@ const vl = ({
5109
5100
  onParticipantNameClick: A,
5110
5101
  onOutboundClick: P,
5111
5102
  resolveOutbound: U,
5112
- composerInput: V
5103
+ composerInput: H
5113
5104
  }
5114
5105
  )
5115
5106
  }
@@ -5118,8 +5109,8 @@ const vl = ({
5118
5109
  );
5119
5110
  }
5120
5111
  );
5121
- Zn.displayName = "ChannelView";
5122
- const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
5112
+ qn.displayName = "ChannelView";
5113
+ const ke = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
5123
5114
  /* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
5124
5115
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
5125
5116
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -5133,8 +5124,8 @@ const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
5133
5124
  }
5134
5125
  )
5135
5126
  ] }) }));
5136
- Ce.displayName = "ErrorState";
5137
- const ro = ({
5127
+ ke.displayName = "ErrorState";
5128
+ const ao = ({
5138
5129
  capabilities: e = {},
5139
5130
  renderMessageInputActions: t,
5140
5131
  renderConversationFooter: s,
@@ -5165,60 +5156,60 @@ const ro = ({
5165
5156
  isLoading: F,
5166
5157
  error: R,
5167
5158
  refreshConnection: I,
5168
- service: D,
5159
+ service: M,
5169
5160
  debug: S
5170
- } = _a(), [C, A] = B(null), [P, U] = B(null), [V, te] = B(!1), { showDeleteConversation: Z = !0 } = e, G = H(o);
5171
- G.current = o;
5172
- const y = H(a);
5161
+ } = wa(), [C, A] = B(null), [P, U] = B(null), [H, te] = B(!1), { showDeleteConversation: Q = !0 } = e, V = j(o);
5162
+ V.current = o;
5163
+ const y = j(a);
5173
5164
  y.current = a;
5174
- const M = H(null), W = H(null);
5165
+ const D = j(null), W = j(null);
5175
5166
  Y(() => {
5176
5167
  W.current = C;
5177
5168
  }, [C]), Y(() => {
5178
5169
  if (!E || !$) return;
5179
- const J = E.userID;
5180
- if (!J) return;
5181
- const X = `${J}::${i}`;
5182
- if (M.current === X) return;
5183
- M.current = X;
5184
- const ne = () => {
5185
- M.current === X && (M.current = null);
5170
+ const q = E.userID;
5171
+ if (!q) return;
5172
+ const K = `${q}::${i}`;
5173
+ if (D.current === K) return;
5174
+ D.current = K;
5175
+ const se = () => {
5176
+ D.current === K && (D.current = null);
5186
5177
  };
5187
5178
  (async () => {
5188
- var ae, De;
5179
+ var re, De;
5189
5180
  try {
5190
5181
  S && console.log(
5191
5182
  "[MessagingShell] Loading initial conversation with:",
5192
5183
  i
5193
5184
  );
5194
- const se = await E.queryChannels(
5185
+ const ne = await E.queryChannels(
5195
5186
  {
5196
5187
  type: "messaging",
5197
- members: { $eq: [J, i] }
5188
+ members: { $eq: [q, i] }
5198
5189
  },
5199
5190
  {},
5200
5191
  { limit: 1 }
5201
5192
  );
5202
- if (se.length > 0) {
5203
- A(se[0]), U(null), (ae = y.current) == null || ae.call(y, se[0]), S && console.log(
5193
+ if (ne.length > 0) {
5194
+ A(ne[0]), U(null), (re = y.current) == null || re.call(y, ne[0]), S && console.log(
5204
5195
  "[MessagingShell] Initial conversation loaded:",
5205
- se[0].id
5196
+ ne[0].id
5206
5197
  );
5207
5198
  return;
5208
5199
  }
5209
- const me = G.current;
5210
- if (!me || !D) {
5211
- ne(), U("No conversation found with this account"), S && console.log(
5200
+ const ue = V.current;
5201
+ if (!ue || !M) {
5202
+ se(), U("No conversation found with this account"), S && console.log(
5212
5203
  "[MessagingShell] No conversation found for:",
5213
5204
  i
5214
5205
  );
5215
5206
  return;
5216
5207
  }
5217
5208
  try {
5218
- const ie = await D.startChannelWithParticipant({
5219
- id: me.id,
5220
- name: me.name,
5221
- phone: me.phone
5209
+ const ie = await M.startChannelWithParticipant({
5210
+ id: ue.id,
5211
+ name: ue.name,
5212
+ phone: ue.phone
5222
5213
  });
5223
5214
  A(ie), U(null), (De = y.current) == null || De.call(y, ie), S && console.log(
5224
5215
  "[MessagingShell] Channel created and loaded:",
@@ -5228,39 +5219,39 @@ const ro = ({
5228
5219
  console.error(
5229
5220
  "[MessagingShell] Failed to create conversation:",
5230
5221
  ie
5231
- ), ne(), U("Failed to create conversation");
5222
+ ), se(), U("Failed to create conversation");
5232
5223
  }
5233
- } catch (se) {
5224
+ } catch (ne) {
5234
5225
  console.error(
5235
5226
  "[MessagingShell] Failed to load initial conversation:",
5236
- se
5237
- ), ne(), W.current || U("Failed to load conversation");
5227
+ ne
5228
+ ), se(), W.current || U("Failed to load conversation");
5238
5229
  }
5239
5230
  })();
5240
- }, [i, E, $, D, S]);
5241
- const Q = H(r);
5242
- Q.current = r;
5243
- const j = q(() => {
5244
- var J;
5245
- A(null), te(!0), (J = Q.current) == null || J.call(Q);
5231
+ }, [i, E, $, M, S]);
5232
+ const X = j(r);
5233
+ X.current = r;
5234
+ const G = Z(() => {
5235
+ var q;
5236
+ A(null), te(!0), (q = X.current) == null || q.call(X);
5246
5237
  }, []);
5247
- return F ? /* @__PURE__ */ n(Ue, {}) : R ? /* @__PURE__ */ n(Ce, { message: R, onBack: I }) : !$ || !E ? /* @__PURE__ */ n(
5248
- Ce,
5238
+ return F ? /* @__PURE__ */ n(Ue, {}) : R ? /* @__PURE__ */ n(ke, { message: R, onBack: I }) : !$ || !E ? /* @__PURE__ */ n(
5239
+ ke,
5249
5240
  {
5250
5241
  message: "Not connected to messaging service",
5251
5242
  onBack: I
5252
5243
  }
5253
- ) : P ? /* @__PURE__ */ n(Ce, { message: P }) : V && !C ? /* @__PURE__ */ n(Ce, { message: "Conversation ended" }) : C ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
5254
- Zn,
5244
+ ) : P ? /* @__PURE__ */ n(ke, { message: P }) : H && !C ? /* @__PURE__ */ n(ke, { message: "Conversation ended" }) : C ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
5245
+ qn,
5255
5246
  {
5256
5247
  channel: C,
5257
5248
  renderMessageInputActions: t,
5258
5249
  renderConversationFooter: s,
5259
5250
  renderChannelBanner: c,
5260
- onLeaveConversation: j,
5261
- onBlockParticipant: j,
5251
+ onLeaveConversation: G,
5252
+ onBlockParticipant: G,
5262
5253
  CustomChannelEmptyState: l,
5263
- showDeleteConversation: Z,
5254
+ showDeleteConversation: Q,
5264
5255
  onBlockParticipantClick: d,
5265
5256
  onReportParticipantClick: u,
5266
5257
  dmAgentEnabled: h,
@@ -5279,13 +5270,13 @@ const ro = ({
5279
5270
  C.id
5280
5271
  ) }) }) : /* @__PURE__ */ n(Ue, {});
5281
5272
  };
5282
- function xl(e) {
5273
+ function vl(e) {
5283
5274
  const t = e.state.pending_messages;
5284
5275
  if (t != null && t.length)
5285
5276
  for (const s of t)
5286
5277
  e.state.addMessageSorted(s.message);
5287
5278
  }
5288
- const Jn = z.createContext({
5279
+ const Kn = z.createContext({
5289
5280
  selectedChannel: void 0,
5290
5281
  onChannelSelect: () => {
5291
5282
  },
@@ -5293,14 +5284,14 @@ const Jn = z.createContext({
5293
5284
  renderMessagePreview: void 0,
5294
5285
  channelPreview: void 0,
5295
5286
  viewerLanguage: void 0
5296
- }), wl = Jn.Provider, _l = () => z.useContext(Jn), yl = (e, t) => {
5287
+ }), xl = Kn.Provider, wl = () => z.useContext(Kn), _l = (e, t) => {
5297
5288
  const s = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
5298
5289
  return Math.floor((a - s) / (1e3 * 60 * 60 * 24));
5299
- }, Nl = (e) => {
5290
+ }, yl = (e) => {
5300
5291
  const t = /* @__PURE__ */ new Date();
5301
5292
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
5302
5293
  return "Just now";
5303
- const a = yl(e, t);
5294
+ const a = _l(e, t);
5304
5295
  return a === 0 ? e.toLocaleTimeString([], {
5305
5296
  hour: "numeric",
5306
5297
  minute: "2-digit",
@@ -5313,7 +5304,7 @@ const Jn = z.createContext({
5313
5304
  day: "numeric",
5314
5305
  year: "numeric"
5315
5306
  });
5316
- }, Qn = z.memo(
5307
+ }, Zn = z.memo(
5317
5308
  (e) => {
5318
5309
  var $, F, R;
5319
5310
  const { channel: t, unread: s } = e, {
@@ -5323,7 +5314,7 @@ const Jn = z.createContext({
5323
5314
  channelPreview: o,
5324
5315
  renderMessagePreview: l,
5325
5316
  viewerLanguage: d
5326
- } = _l(), { client: u } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = vn(t);
5317
+ } = wl(), { client: u } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = vn(t);
5327
5318
  if (o)
5328
5319
  return /* @__PURE__ */ n(
5329
5320
  o,
@@ -5338,15 +5329,15 @@ const Jn = z.createContext({
5338
5329
  const g = () => {
5339
5330
  t && r(t);
5340
5331
  }, c = (I) => {
5341
- const D = I.key === "Enter" || I.key === " ", S = I.repeat;
5342
- !D || S || (I.preventDefault(), g());
5332
+ const M = I.key === "Enter" || I.key === " ", S = I.repeat;
5333
+ !M || S || (I.preventDefault(), g());
5343
5334
  }, p = xn(
5344
5335
  ($ = t == null ? void 0 : t.state) == null ? void 0 : $.members,
5345
5336
  u == null ? void 0 : u.userID,
5346
5337
  t == null ? void 0 : t.type
5347
5338
  ), w = wn(p == null ? void 0 : p.user), v = (F = p == null ? void 0 : p.user) == null ? void 0 : F.image, x = (() => {
5348
- var D;
5349
- const I = (D = t == null ? void 0 : t.state) == null ? void 0 : D.messages;
5339
+ var M;
5340
+ const I = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
5350
5341
  if (I != null && I.length) {
5351
5342
  for (let S = I.length - 1; S >= 0; S--)
5352
5343
  if (I[S].type !== "system") return I[S];
@@ -5356,12 +5347,12 @@ const Jn = z.createContext({
5356
5347
  const I = yn({
5357
5348
  message: x,
5358
5349
  viewerLanguage: d
5359
- }), { custom_type: D, attachment_content_type: S } = (x == null ? void 0 : x.metadata) || {};
5360
- if (D === oe.TIP)
5350
+ }), { custom_type: M, attachment_content_type: S } = (x == null ? void 0 : x.metadata) || {};
5351
+ if (M === oe.TIP)
5361
5352
  return I || "Sent a tip";
5362
- if (D === oe.PAID)
5353
+ if (M === oe.PAID)
5363
5354
  return I || "Sent a message";
5364
- if (D === oe.ATTACHMENT) {
5355
+ if (M === oe.ATTACHMENT) {
5365
5356
  if (S === "text")
5366
5357
  return "🔒 Sent a locked message";
5367
5358
  if (S === "media")
@@ -5370,7 +5361,7 @@ const Jn = z.createContext({
5370
5361
  if (I) return I;
5371
5362
  const C = (A = x == null ? void 0 : x.attachments) == null ? void 0 : A[0];
5372
5363
  return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5373
- })(), _ = x != null && x.created_at ? Nl(new Date(x.created_at)) : "", T = x ? Fe(x) : !1, L = l ? l(x, N) : `${T ? "✨ " : ""}${N}`, E = s ?? 0;
5364
+ })(), _ = x != null && x.created_at ? yl(new Date(x.created_at)) : "", T = x ? Fe(x) : !1, L = l ? l(x, N) : `${T ? "✨ " : ""}${N}`, E = s ?? 0;
5374
5365
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5375
5366
  channelId: t == null ? void 0 : t.id,
5376
5367
  isSelected: h,
@@ -5394,7 +5385,7 @@ const Jn = z.createContext({
5394
5385
  "data-dd-privacy": "mask",
5395
5386
  children: /* @__PURE__ */ f("div", { className: "flex items-start gap-4", children: [
5396
5387
  /* @__PURE__ */ n(
5397
- _e,
5388
+ we,
5398
5389
  {
5399
5390
  id: ((R = p == null ? void 0 : p.user) == null ? void 0 : R.id) || t.id || "unknown",
5400
5391
  name: w,
@@ -5429,18 +5420,18 @@ const Jn = z.createContext({
5429
5420
  );
5430
5421
  }
5431
5422
  );
5432
- Qn.displayName = "CustomChannelPreview";
5433
- const kl = { last_message_at: -1 }, Cl = z.memo(
5423
+ Zn.displayName = "CustomChannelPreview";
5424
+ const Nl = { last_message_at: -1 }, kl = z.memo(
5434
5425
  ({
5435
5426
  onChannelSelect: e,
5436
5427
  selectedChannel: t,
5437
5428
  filters: s,
5438
5429
  allowNewMessagesFromUnfilteredChannels: a = !1,
5439
5430
  channelRenderFilterFn: r,
5440
- sort: i = kl,
5431
+ sort: i = Nl,
5441
5432
  className: o,
5442
5433
  customEmptyStateIndicator: l,
5443
- channelListPaginator: d = Hs,
5434
+ channelListPaginator: d = Us,
5444
5435
  channelPreview: u,
5445
5436
  renderMessagePreview: h,
5446
5437
  viewerLanguage: m,
@@ -5453,10 +5444,10 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5453
5444
  }) => {
5454
5445
  const b = z.useRef(0);
5455
5446
  b.current++;
5456
- const { debug: N = !1 } = lt(), _ = z.useCallback(
5447
+ const { debug: N = !1 } = ot(), _ = z.useCallback(
5457
5448
  (L) => {
5458
5449
  for (const E of L)
5459
- xl(E);
5450
+ vl(E);
5460
5451
  return r ? r(L) : L;
5461
5452
  },
5462
5453
  [r]
@@ -5491,8 +5482,8 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5491
5482
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5492
5483
  o
5493
5484
  ),
5494
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(wl, { value: T, children: /* @__PURE__ */ n(
5495
- js,
5485
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(xl, { value: T, children: /* @__PURE__ */ n(
5486
+ Bs,
5496
5487
  {
5497
5488
  filters: s,
5498
5489
  sort: i,
@@ -5506,7 +5497,7 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5506
5497
  onAddedToChannel: v,
5507
5498
  onChannelUpdated: x,
5508
5499
  Paginator: d,
5509
- Preview: Qn,
5500
+ Preview: Zn,
5510
5501
  EmptyStateIndicator: l
5511
5502
  },
5512
5503
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
@@ -5515,8 +5506,8 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
5515
5506
  );
5516
5507
  }
5517
5508
  );
5518
- Cl.displayName = "ChannelList";
5519
- const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", El = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", on = ({ surface: e, actions: t, layout: s }) => {
5509
+ kl.displayName = "ChannelList";
5510
+ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", Sl = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", cn = ({ surface: e, actions: t, layout: s }) => {
5520
5511
  if (t == null || t.length === 0) return null;
5521
5512
  const a = s === "stacked";
5522
5513
  return /* @__PURE__ */ n(
@@ -5531,7 +5522,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5531
5522
  a ? "mt-3 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"
5532
5523
  ),
5533
5524
  children: t.map((r, i) => /* @__PURE__ */ n(
5534
- Dn,
5525
+ Mn,
5535
5526
  {
5536
5527
  variant: e,
5537
5528
  cta: r,
@@ -5542,7 +5533,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5542
5533
  ))
5543
5534
  }
5544
5535
  );
5545
- }, Il = ({
5536
+ }, El = ({
5546
5537
  ctaSurface: e,
5547
5538
  chinTextColor: t,
5548
5539
  title: s,
@@ -5566,7 +5557,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5566
5557
  /* @__PURE__ */ n(
5567
5558
  "p",
5568
5559
  {
5569
- className: k("min-w-0", Sl),
5560
+ className: k("min-w-0", Cl),
5570
5561
  style: h,
5571
5562
  children: s
5572
5563
  }
@@ -5576,7 +5567,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5576
5567
  "p",
5577
5568
  {
5578
5569
  className: k(
5579
- El,
5570
+ Sl,
5580
5571
  r > 1 && "whitespace-pre-line",
5581
5572
  r <= 1 && "truncate"
5582
5573
  ),
@@ -5587,11 +5578,11 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5587
5578
  ] });
5588
5579
  return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: g ? /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-3", children: [
5589
5580
  c,
5590
- /* @__PURE__ */ n(on, { surface: e, actions: o, layout: "row" })
5591
- ] }) : /* @__PURE__ */ f(K, { children: [
5581
+ /* @__PURE__ */ n(cn, { surface: e, actions: o, layout: "row" })
5582
+ ] }) : /* @__PURE__ */ f(J, { children: [
5592
5583
  c,
5593
5584
  /* @__PURE__ */ n(
5594
- on,
5585
+ cn,
5595
5586
  {
5596
5587
  surface: e,
5597
5588
  actions: o,
@@ -5599,36 +5590,36 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5599
5590
  }
5600
5591
  )
5601
5592
  ] }) });
5602
- }, Tl = {
5593
+ }, Il = {
5603
5594
  dark: "bg-white/[0.06]",
5604
5595
  light: "bg-black/[0.04]"
5605
- }, Al = {
5596
+ }, Tl = {
5606
5597
  1: [0],
5607
5598
  2: [-10, 10],
5608
5599
  3: [-13, 0, 13]
5609
- }, Rl = {
5600
+ }, Al = {
5610
5601
  1: [0],
5611
5602
  2: [-26, 26],
5612
5603
  3: [-40, 0, 40]
5613
- }, Ll = {
5604
+ }, Rl = {
5614
5605
  1: [0],
5615
5606
  2: [0, 1],
5616
5607
  3: [1, 3, 2]
5617
- }, Ml = {
5608
+ }, Ll = {
5618
5609
  1: [1],
5619
5610
  2: [1, 1],
5620
5611
  3: [1, 1.08, 1]
5621
- }, Dl = ({ variant: e, images: t }) => {
5612
+ }, Ml = ({ variant: e, images: t }) => {
5622
5613
  const [s, a] = z.useState({}), r = t.join(`
5623
5614
  `), [i, o] = z.useState(r);
5624
5615
  r !== i && (o(r), a({}));
5625
- const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u = Al[d], h = Rl[d], m = Ll[d], g = Ml[d];
5616
+ const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u = Tl[d], h = Al[d], m = Rl[d], g = Ll[d];
5626
5617
  return /* @__PURE__ */ n(
5627
5618
  "div",
5628
5619
  {
5629
5620
  className: k(
5630
5621
  "relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
5631
- Tl[e]
5622
+ Il[e]
5632
5623
  ),
5633
5624
  children: l.map(({ src: c, index: p }, w) => /* @__PURE__ */ n(
5634
5625
  "img",
@@ -5649,19 +5640,19 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5649
5640
  ))
5650
5641
  }
5651
5642
  );
5652
- }, Ol = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", Pl = ({
5643
+ }, Dl = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", Ol = ({
5653
5644
  variant: e,
5654
5645
  presentation: t,
5655
5646
  images: s,
5656
5647
  title: a,
5657
5648
  heroUrl: r,
5658
5649
  onHeroError: i
5659
- }) => /* @__PURE__ */ n("div", { className: Ol, children: t === "fan" ? /* @__PURE__ */ n(Dl, { variant: e, images: s }) : (
5650
+ }) => /* @__PURE__ */ n("div", { className: Dl, children: t === "fan" ? /* @__PURE__ */ n(Ml, { variant: e, images: s }) : (
5660
5651
  // `heroUrl` is the palette-tracked source: it becomes `undefined` when the
5661
5652
  // hero image errors, so `CardThumbnail` falls through to its placeholder.
5662
5653
  // Do NOT `?? images[0]` here — that would re-instate the failed URL.
5663
5654
  /* @__PURE__ */ n(
5664
- Ie,
5655
+ Ee,
5665
5656
  {
5666
5657
  variant: e,
5667
5658
  thumbnailUrl: r,
@@ -5670,7 +5661,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5670
5661
  onImageError: i
5671
5662
  }
5672
5663
  )
5673
- ) }), es = ({
5664
+ ) }), Jn = ({
5674
5665
  variant: e,
5675
5666
  title: t,
5676
5667
  subtitle: s,
@@ -5682,30 +5673,30 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5682
5673
  accentColor: d,
5683
5674
  groupPosition: u = "single"
5684
5675
  }) => {
5685
- const h = Ys({
5676
+ const h = ba({
5686
5677
  imagePresentation: i,
5687
5678
  images: r
5688
- }), m = r.length > 0, g = m && h === "hero", c = Ve({
5679
+ }), m = r.length > 0, g = m && h === "hero", c = Ge({
5689
5680
  variant: e,
5690
5681
  accentColor: d,
5691
5682
  layout: "featured",
5692
5683
  thumbnailUrl: g ? r[0] : void 0
5693
5684
  }), p = u === "single" || u === "end";
5694
5685
  return /* @__PURE__ */ n(
5695
- vt,
5686
+ xt,
5696
5687
  {
5697
5688
  accentHex: c.accentHex,
5698
5689
  side: e === "dark" ? "sender" : "receiver",
5699
5690
  visible: p,
5700
5691
  children: /* @__PURE__ */ f(
5701
- Ee,
5692
+ Se,
5702
5693
  {
5703
5694
  variant: e,
5704
5695
  accentHex: c.accentHex,
5705
5696
  "data-testid": "rich-card",
5706
5697
  children: [
5707
5698
  m && /* @__PURE__ */ n(
5708
- Pl,
5699
+ Ol,
5709
5700
  {
5710
5701
  variant: e,
5711
5702
  presentation: h,
@@ -5716,7 +5707,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5716
5707
  }
5717
5708
  ),
5718
5709
  /* @__PURE__ */ n(
5719
- Il,
5710
+ El,
5720
5711
  {
5721
5712
  ctaSurface: c.surface,
5722
5713
  chinTextColor: c.chinTextColor,
@@ -5732,13 +5723,13 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5732
5723
  )
5733
5724
  }
5734
5725
  );
5735
- }, zl = (e) => /* @__PURE__ */ n(es, { ...e, variant: "dark" }), Fl = (e) => /* @__PURE__ */ n(es, { ...e, variant: "light" }), io = {
5736
- Sent: zl,
5737
- Received: Fl
5738
- }, cn = `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%`, $l = {
5726
+ }, Pl = (e) => /* @__PURE__ */ n(Jn, { ...e, variant: "dark" }), zl = (e) => /* @__PURE__ */ n(Jn, { ...e, variant: "light" }), ro = {
5727
+ Sent: Pl,
5728
+ Received: zl
5729
+ }, dn = `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%`, Fl = {
5739
5730
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5740
5731
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
5741
- }, Bl = ({ variant: e }) => /* @__PURE__ */ n(
5732
+ }, $l = ({ variant: e }) => /* @__PURE__ */ n(
5742
5733
  "span",
5743
5734
  {
5744
5735
  "aria-hidden": "true",
@@ -5748,12 +5739,12 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5748
5739
  insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
5749
5740
  transform: e === "received" ? "scaleX(-1)" : void 0,
5750
5741
  transformOrigin: "center",
5751
- backgroundColor: $l[e],
5752
- WebkitMask: cn,
5753
- mask: cn
5742
+ backgroundColor: Fl[e],
5743
+ WebkitMask: dn,
5744
+ mask: dn
5754
5745
  }
5755
5746
  }
5756
- ), Ul = {
5747
+ ), Bl = {
5757
5748
  sent: {
5758
5749
  backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5759
5750
  color: "var(--str-chat__own-message-bubble-color, #fff)"
@@ -5762,7 +5753,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5762
5753
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
5763
5754
  color: "var(--str-chat__message-bubble-color, #000000)"
5764
5755
  }
5765
- }, ts = ({
5756
+ }, Qn = ({
5766
5757
  variant: e,
5767
5758
  text: t,
5768
5759
  tail: s = !0,
@@ -5778,23 +5769,23 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5778
5769
  r
5779
5770
  ),
5780
5771
  style: {
5781
- ...Ul[e],
5772
+ ...Bl[e],
5782
5773
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
5783
5774
  isolation: "isolate"
5784
5775
  },
5785
5776
  children: [
5786
5777
  a != null && /* @__PURE__ */ n("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
5787
5778
  /* @__PURE__ */ n("p", { className: "m-0 whitespace-pre-wrap break-words hyphens-manual", children: t }),
5788
- s && /* @__PURE__ */ n(Bl, { variant: e })
5779
+ s && /* @__PURE__ */ n($l, { variant: e })
5789
5780
  ]
5790
5781
  }
5791
- ), jl = ({
5782
+ ), Ul = ({
5792
5783
  text: e,
5793
5784
  tail: t,
5794
5785
  header: s,
5795
5786
  className: a
5796
5787
  }) => /* @__PURE__ */ n(
5797
- ts,
5788
+ Qn,
5798
5789
  {
5799
5790
  variant: "received",
5800
5791
  text: e,
@@ -5802,10 +5793,10 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5802
5793
  header: s,
5803
5794
  className: a
5804
5795
  }
5805
- ), Hl = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(ts, { variant: "sent", text: e, tail: t, className: s }), lo = {
5806
- Sent: Hl,
5807
- Received: jl
5808
- }, Vl = ({
5796
+ ), jl = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(Qn, { variant: "sent", text: e, tail: t, className: s }), io = {
5797
+ Sent: jl,
5798
+ Received: Ul
5799
+ }, Hl = ({
5809
5800
  question: e,
5810
5801
  onClick: t,
5811
5802
  loading: s = !1,
@@ -5827,7 +5818,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5827
5818
  ),
5828
5819
  children: e
5829
5820
  }
5830
- ), oo = ({
5821
+ ), lo = ({
5831
5822
  faqs: e,
5832
5823
  onFaqClick: t,
5833
5824
  loadingFaqId: s,
@@ -5836,10 +5827,10 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5836
5827
  avatarImage: i,
5837
5828
  avatarName: o
5838
5829
  }) => {
5839
- const l = Ws(e);
5830
+ const l = va(e);
5840
5831
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
5841
5832
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
5842
- _e,
5833
+ we,
5843
5834
  {
5844
5835
  id: o || "account",
5845
5836
  name: o || "Account",
@@ -5856,7 +5847,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5856
5847
  children: [
5857
5848
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
5858
5849
  l.map((d) => /* @__PURE__ */ n(
5859
- Vl,
5850
+ Hl,
5860
5851
  {
5861
5852
  question: d.question,
5862
5853
  onClick: () => t(d.id),
@@ -5872,39 +5863,39 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5872
5863
  export {
5873
5864
  kn as A,
5874
5865
  wn as B,
5875
- pl as C,
5876
- ao as D,
5877
- sr as E,
5878
- oo as F,
5879
- _a as G,
5880
- rt as L,
5881
- to as M,
5882
- io as R,
5883
- Ne as a,
5884
- _e as b,
5885
- Cl as c,
5886
- Zn as d,
5887
- no as e,
5888
- Vl as f,
5866
+ gl as C,
5867
+ so as D,
5868
+ nr as E,
5869
+ lo as F,
5870
+ wa as G,
5871
+ it as L,
5872
+ eo as M,
5873
+ ro as R,
5874
+ ye as a,
5875
+ we as b,
5876
+ kl as c,
5877
+ qn as d,
5878
+ to as e,
5879
+ Hl as f,
5889
5880
  de as g,
5890
5881
  Pe as h,
5891
- ke as i,
5892
- lo as j,
5893
- eo as k,
5894
- ro as l,
5895
- ei as m,
5896
- Zr as n,
5882
+ Ne as i,
5883
+ io as j,
5884
+ Ql as k,
5885
+ ao as l,
5886
+ Qr as m,
5887
+ Kr as n,
5897
5888
  ce as o,
5898
- Nl as p,
5899
- Qr as q,
5900
- ve as r,
5889
+ yl as p,
5890
+ Jr as q,
5891
+ be as r,
5901
5892
  yn as s,
5902
- En as t,
5903
- Na as u,
5904
- so as v,
5905
- Da as w,
5893
+ Ve as t,
5894
+ ya as u,
5895
+ no as v,
5896
+ Ma as w,
5906
5897
  xn as x,
5907
- dt as y,
5908
- ut as z
5898
+ ut as y,
5899
+ mt as z
5909
5900
  };
5910
- //# sourceMappingURL=index-CZY29se6.js.map
5901
+ //# sourceMappingURL=index-DXlI1QQw.js.map