@linktr.ee/messaging-react 3.5.7-rc-1783064389 → 3.5.7-rc-1783067095

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{Card-DQdw5-A_.js → Card-6zV3sFbU.js} +2 -2
  2. package/dist/{Card-DQdw5-A_.js.map → Card-6zV3sFbU.js.map} +1 -1
  3. package/dist/{Card-BY5GWs2L.cjs → Card-BQJP7Y9f.cjs} +2 -2
  4. package/dist/{Card-BY5GWs2L.cjs.map → Card-BQJP7Y9f.cjs.map} +1 -1
  5. package/dist/{Card-CuWniEOV.js → Card-CAalQRJs.js} +2 -2
  6. package/dist/{Card-CuWniEOV.js.map → Card-CAalQRJs.js.map} +1 -1
  7. package/dist/{Card-CsQmLvWE.cjs → Card-CK_XUFsc.cjs} +2 -2
  8. package/dist/{Card-CsQmLvWE.cjs.map → Card-CK_XUFsc.cjs.map} +1 -1
  9. package/dist/{Card-DdUewLf6.cjs → Card-D2A5fCuk.cjs} +2 -2
  10. package/dist/{Card-DdUewLf6.cjs.map → Card-D2A5fCuk.cjs.map} +1 -1
  11. package/dist/{Card-CpgkVykU.js → Card-wg-7Dyut.js} +3 -3
  12. package/dist/{Card-CpgkVykU.js.map → Card-wg-7Dyut.js.map} +1 -1
  13. package/dist/{LockedThumbnail-D5hLQ6Kz.js → LockedThumbnail-CeTZqbzd.js} +2 -2
  14. package/dist/{LockedThumbnail-D5hLQ6Kz.js.map → LockedThumbnail-CeTZqbzd.js.map} +1 -1
  15. package/dist/{LockedThumbnail-s_LZkGm4.cjs → LockedThumbnail-DxwKL4A1.cjs} +2 -2
  16. package/dist/{LockedThumbnail-s_LZkGm4.cjs.map → LockedThumbnail-DxwKL4A1.cjs.map} +1 -1
  17. package/dist/index-DYBHXWJX.cjs +2 -0
  18. package/dist/index-DYBHXWJX.cjs.map +1 -0
  19. package/dist/{index-3vM1UOPb.js → index-gnuITMC7.js} +1045 -1036
  20. package/dist/index-gnuITMC7.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/ChannelHeaderRedesign.tsx +17 -17
  25. package/src/components/ChannelView.stories.tsx +119 -1
  26. package/src/components/ChannelView.tsx +62 -46
  27. package/dist/index-3vM1UOPb.js.map +0 -1
  28. package/dist/index-BIJpO0jL.cjs +0 -2
  29. package/dist/index-BIJpO0jL.cjs.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { jsx as n, jsxs as m, Fragment as se } from "react/jsx-runtime";
2
- import j, { createContext as Qe, useContext as Ce, useCallback as W, useState as O, useRef as H, useEffect as q, useId as An, useMemo as re, Suspense as et } from "react";
2
+ import j, { createContext as Qe, useContext as ke, useCallback as K, useState as $, useRef as V, useEffect as X, useId as An, useMemo as ie, Suspense as et } from "react";
3
3
  import { StreamChatService as Mn } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Rn, LinkPreviewsManager as $t } from "stream-chat";
5
- import { Chat as Dn, useChannelStateContext as oe, useChatContext as ce, DateSeparator as Ln, areMessageUIPropsEqual as zn, useMessageReminder as Fn, useComponentContext as Wt, Attachment as Pn, EditMessageModal as On, MessageBlocked as $n, MessageBouncePrompt as jn, MessageDeleted as Bn, MessageIsThreadReplyInChannelButtonIndicator as Un, MessageRepliesCountButton as Vn, ReminderNotification as Gn, StreamedMessageText as Hn, messageHasAttachments as Yn, messageHasReactions as qn, isDateSeparatorMessage as Wn, isMessageBlocked as Xn, isMessageBounced as Kn, MessageBounceModal as Jn, MessageText as jt, Poll as Zn, MessageErrorIcon as Qn, useMessageContext as ke, useMessageComposer as es, useStateStore as ts, MessageInput as ns, useMessageInputContext as ss, useMessageComposerHasSendableData as as, AttachmentPreviewList as rs, QuotedMessagePreview as is, TextareaComposer as ls, MessageTimestamp as Be, AIStates as Ue, useTypingContext as os, useAIState as cs, Channel as ds, WithComponents as us, Window as ms, MessageList as hs, ChannelList as fs, InfiniteScroll as gs } from "stream-chat-react";
6
- import { StarIcon as ye, DotsThreeIcon as ps, SpinnerGapIcon as Me, SignOutIcon as bs, ProhibitInsetIcon as Bt, FlagIcon as Xt, ArrowLeftIcon as We, CurrencyDollarIcon as vs, CaretRightIcon as ue, FileIcon as Kt, ImageIcon as xs, SpeakerHighIcon as ws, VideoCameraIcon as Jt, FileMdIcon as _s, FileTextIcon as Ns, FileZipIcon as ys, FilePptIcon as Cs, FileCsvIcon as ks, FileXlsIcon as Es, FileDocIcon as Is, FilePdfIcon as Ss, CircleNotchIcon as _e, PlayIcon as Xe, PauseIcon as Ts, LinkIcon as As, DownloadSimpleIcon as Ne, GiftIcon as Ms, ThumbsUpIcon as Rs, ThumbsDownIcon as Ds, TrashSimpleIcon as Ls, XIcon as Pe, ArrowUpIcon as zs, SparkleIcon as xe, ProhibitIcon as Fs, PencilSimpleIcon as Ps, CaretLeftIcon as Os } from "@phosphor-icons/react";
5
+ import { Chat as Dn, useChannelStateContext as ce, useChatContext as de, DateSeparator as Ln, areMessageUIPropsEqual as zn, useMessageReminder as Fn, useComponentContext as Wt, Attachment as Pn, EditMessageModal as On, MessageBlocked as $n, MessageBouncePrompt as jn, MessageDeleted as Bn, MessageIsThreadReplyInChannelButtonIndicator as Un, MessageRepliesCountButton as Vn, ReminderNotification as Gn, StreamedMessageText as Hn, messageHasAttachments as Yn, messageHasReactions as qn, isDateSeparatorMessage as Wn, isMessageBlocked as Xn, isMessageBounced as Kn, MessageBounceModal as Jn, MessageText as jt, Poll as Zn, MessageErrorIcon as Qn, useMessageContext as Ce, useMessageComposer as es, useStateStore as ts, MessageInput as ns, useMessageInputContext as ss, useMessageComposerHasSendableData as as, AttachmentPreviewList as rs, QuotedMessagePreview as is, TextareaComposer as ls, MessageTimestamp as Be, AIStates as Ue, useTypingContext as os, useAIState as cs, Channel as ds, WithComponents as us, Window as ms, MessageList as hs, ChannelList as fs, InfiniteScroll as gs } from "stream-chat-react";
6
+ import { StarIcon as ye, DotsThreeIcon as ps, SpinnerGapIcon as Me, SignOutIcon as bs, ProhibitInsetIcon as Bt, FlagIcon as Xt, ArrowLeftIcon as We, CurrencyDollarIcon as vs, CaretRightIcon as me, SparkleIcon as he, FileIcon as Kt, ImageIcon as xs, SpeakerHighIcon as ws, VideoCameraIcon as Jt, FileMdIcon as _s, FileTextIcon as Ns, FileZipIcon as ys, FilePptIcon as ks, FileCsvIcon as Cs, FileXlsIcon as Es, FileDocIcon as Is, FilePdfIcon as Ss, CircleNotchIcon as _e, PlayIcon as Xe, PauseIcon as Ts, LinkIcon as As, DownloadSimpleIcon as Ne, GiftIcon as Ms, ThumbsUpIcon as Rs, ThumbsDownIcon as Ds, TrashSimpleIcon as Ls, XIcon as Pe, ArrowUpIcon as zs, ProhibitIcon as Fs, PencilSimpleIcon as Ps, CaretLeftIcon as Os } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
8
  import { MessageActions as $s, DefaultDropdownActionButton as Zt } from "stream-chat-react/experimental";
9
9
  const Qt = Qe({
@@ -16,7 +16,7 @@ const Qt = Qe({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), tt = () => Ce(Qt), Di = ({
19
+ }), tt = () => ke(Qt), Li = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,10 +24,10 @@ const Qt = Qe({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var A, C;
28
- const l = W(
29
- (E, ...T) => {
30
- i && console.log(`🔥 [MessagingProvider] ${E}`, ...T);
27
+ var A, I;
28
+ const l = K(
29
+ (C, ...S) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${C}`, ...S);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,77 +37,77 @@ const Qt = Qe({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [o, d] = O(null), [u, p] = O(null), [h, g] = O(!1), [c, b] = O(!1), [_, v] = O(null), f = H(!1), N = H(null), x = H(s);
41
- x.current = s;
42
- const I = H(i);
43
- I.current = i;
44
- const R = H({
40
+ const [o, d] = $(null), [u, g] = $(null), [h, f] = $(!1), [c, v] = $(!1), [_, b] = $(null), p = V(!1), x = V(null), N = V(s);
41
+ N.current = s;
42
+ const E = V(i);
43
+ E.current = i;
44
+ const T = V({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), S = H(0);
50
- S.current++, l("📊 RENDER INFO", {
51
- renderCount: S.current,
49
+ }), M = V(0);
50
+ M.current++, l("📊 RENDER INFO", {
51
+ renderCount: M.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
54
- userChanged: R.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: R.current.apiKey !== a,
56
- serviceConfigChanged: R.current.serviceConfig !== s,
57
- capabilitiesChanged: R.current.capabilities !== r
54
+ userChanged: T.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: T.current.apiKey !== a,
56
+ serviceConfigChanged: T.current.serviceConfig !== s,
57
+ capabilitiesChanged: T.current.capabilities !== r
58
58
  }
59
- }), R.current = {
59
+ }), T.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const L = H(null);
65
+ const L = V(null);
66
66
  a && ((A = L.current) == null ? void 0 : A.apiKey) !== a && (L.current = { apiKey: a, client: new Rn(a) });
67
- const D = a ? ((C = L.current) == null ? void 0 : C.client) ?? null : null;
68
- q(() => {
69
- const E = S.current, T = x.current;
70
- if (!a || !D || !T) {
67
+ const D = a ? ((I = L.current) == null ? void 0 : I.client) ?? null : null;
68
+ X(() => {
69
+ const C = M.current, S = N.current;
70
+ if (!a || !D || !S) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: E,
72
+ renderCount: C,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
77
  l("🚀 CREATING SERVICE", {
78
- renderCount: E,
78
+ renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const P = new Mn({
82
- ...T,
81
+ const O = new Mn({
82
+ ...S,
83
83
  apiKey: a,
84
- debug: I.current,
84
+ debug: E.current,
85
85
  client: D
86
86
  });
87
- N.current = P, d(P), l("✅ SERVICE SET", {
88
- renderCount: E,
89
- serviceInstance: !!P
87
+ x.current = O, d(O), l("✅ SERVICE SET", {
88
+ renderCount: C,
89
+ serviceInstance: !!O
90
90
  });
91
91
  }, [a, D]);
92
- const $ = H(null);
93
- q(() => {
94
- var T, P;
92
+ const P = V(null);
93
+ X(() => {
94
+ var S, O;
95
95
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!o,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
- isConnecting: f.current,
99
+ isConnecting: p.current,
100
100
  isConnected: h,
101
101
  dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
102
102
  }), !o || !t) {
103
103
  l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
- if (f.current) {
106
+ if (p.current) {
107
107
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((T = $.current) == null ? void 0 : T.serviceId) === o && ((P = $.current) == null ? void 0 : P.userId) === t.id) {
110
+ if (((S = P.current) == null ? void 0 : S.serviceId) === o && ((O = P.current) == null ? void 0 : O.userId) === t.id) {
111
111
  l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -115,35 +115,35 @@ const Qt = Qe({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), f.current = !0, b(!0), v(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, v(!0), b(null);
119
119
  try {
120
120
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
121
  const F = await o.connectUser(t);
122
- p(F), g(!0), $.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
122
+ g(F), f(!0), P.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
124
  clientId: F.userID
125
125
  });
126
126
  } catch (F) {
127
127
  const B = F instanceof Error ? F.message : "Connection failed";
128
- v(B), l("❌ USER CONNECTION ERROR", {
128
+ b(B), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: B
131
131
  });
132
132
  } finally {
133
- b(!1), f.current = !1, l("🔄 USER CONNECTION FINISHED", {
133
+ v(!1), p.current = !1, l("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: h
136
136
  });
137
137
  }
138
138
  })();
139
- }, [o, t, l, h]), q(() => {
140
- const E = D;
139
+ }, [o, t, l, h]), X(() => {
140
+ const C = D;
141
141
  return () => {
142
- var T;
143
- E && ($.current = null, (T = N.current) == null || T.disconnectUser().catch(console.error));
142
+ var S;
143
+ C && (P.current = null, (S = x.current) == null || S.disconnectUser().catch(console.error));
144
144
  };
145
145
  }, [D]);
146
- const z = W(async () => {
146
+ const z = K(async () => {
147
147
  if (l("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!o,
149
149
  hasUser: !!t
@@ -151,19 +151,19 @@ const Qt = Qe({
151
151
  l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
154
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), v(!0);
155
155
  try {
156
156
  l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
- const E = await o.connectUser(t);
158
- p(E), g(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (E) {
160
- const T = E instanceof Error ? E.message : "Refresh failed";
161
- v(T), l("❌ CONNECTION REFRESH ERROR", {
157
+ const C = await o.connectUser(t);
158
+ g(C), f(!0), b(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (C) {
160
+ const S = C instanceof Error ? C.message : "Refresh failed";
161
+ b(S), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: T
163
+ error: S
164
164
  });
165
165
  } finally {
166
- b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ v(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
168
  }, [o, t, l]), y = j.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!o,
@@ -193,7 +193,7 @@ const Qt = Qe({
193
193
  l
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
- renderCount: S.current,
196
+ renderCount: M.current,
197
197
  willRenderChat: !!D,
198
198
  contextValueReady: !!y
199
199
  }), /* @__PURE__ */ n(Qt.Provider, { value: y, children: D ? /* @__PURE__ */ n(
@@ -208,10 +208,10 @@ const Qt = Qe({
208
208
  ) : e });
209
209
  }, js = () => tt(), nt = (e) => {
210
210
  var a, r;
211
- const [t, s] = O(
211
+ const [t, s] = $(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
- return q(() => {
214
+ return X(() => {
215
215
  var l;
216
216
  if (!e) {
217
217
  s(!1);
@@ -312,7 +312,7 @@ const ne = ({
312
312
  shape: i = "squircle",
313
313
  dmAgentEnabled: l = !1
314
314
  }) => {
315
- const o = Ys(e), d = qs(e), u = 0.45, h = 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" }, b = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n(
315
+ const o = Ys(e), d = qs(e), u = 0.45, h = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, f = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n(
316
316
  "img",
317
317
  {
318
318
  src: t,
@@ -364,13 +364,13 @@ const ne = ({
364
364
  style: {
365
365
  ...c,
366
366
  ...l && {
367
- borderWidth: `${g}px`,
367
+ borderWidth: `${f}px`,
368
368
  borderStyle: "solid",
369
369
  borderColor: "var(--AI-Gradient, #7F22FE)",
370
370
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
371
371
  }
372
372
  },
373
- children: b
373
+ children: v
374
374
  }
375
375
  )
376
376
  ]
@@ -387,75 +387,75 @@ const ne = ({
387
387
  onBlockParticipantClick: o,
388
388
  onReportParticipantClick: d,
389
389
  onActionComplete: u,
390
- logLabel: p = "useChannelModerationActions"
390
+ logLabel: g = "useChannelModerationActions"
391
391
  }) => {
392
392
  var A;
393
- const { service: h, debug: g } = tt(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, b = !!(a && s && h && c), [_, v] = O(!1), [f, N] = O(null), [x, I] = O(!1), [R, S] = O(!1), L = b && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
394
- return q(() => {
395
- if (!b || !h || !c) {
396
- v(!1), N(null);
393
+ const { service: h, debug: f } = tt(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && s && h && c), [_, b] = $(!1), [p, x] = $(null), [N, E] = $(!1), [T, M] = $(!1), L = v && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
394
+ return X(() => {
395
+ if (!v || !h || !c) {
396
+ b(!1), x(null);
397
397
  return;
398
398
  }
399
- let C = !1;
399
+ let I = !1;
400
400
  return (async () => {
401
401
  try {
402
- const E = await h.getBlockedUsers();
403
- if (C) return;
404
- v(
405
- E.some(
406
- (T) => T.blocked_user_id === c
402
+ const C = await h.getBlockedUsers();
403
+ if (I) return;
404
+ b(
405
+ C.some(
406
+ (S) => S.blocked_user_id === c
407
407
  )
408
408
  );
409
- } catch (E) {
410
- C || console.error(`[${p}] Failed to check blocked status:`, E);
409
+ } catch (C) {
410
+ I || console.error(`[${g}] Failed to check blocked status:`, C);
411
411
  } finally {
412
- C || N({ participantId: c, service: h });
412
+ I || x({ participantId: c, service: h });
413
413
  }
414
414
  })(), () => {
415
- C = !0;
415
+ I = !0;
416
416
  };
417
- }, [b, h, c, p]), {
417
+ }, [v, h, c, g]), {
418
418
  isParticipantBlocked: _,
419
419
  isCheckingBlockedStatus: L,
420
- isLeaving: x,
421
- isUpdatingBlockStatus: R,
420
+ isLeaving: N,
421
+ isUpdatingBlockStatus: T,
422
422
  handleLeaveConversation: async () => {
423
- var C;
424
- if (!x) {
425
- l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), I(!0);
423
+ var I;
424
+ if (!N) {
425
+ l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), E(!0);
426
426
  try {
427
- const E = ((C = e._client) == null ? void 0 : C.userID) ?? null;
428
- await e.hide(E, !1), r && await r(e), u == null || u();
429
- } catch (E) {
430
- console.error(`[${p}] Failed to leave conversation`, E);
427
+ const C = ((I = e._client) == null ? void 0 : I.userID) ?? null;
428
+ await e.hide(C, !1), r && await r(e), u == null || u();
429
+ } catch (C) {
430
+ console.error(`[${g}] Failed to leave conversation`, C);
431
431
  } finally {
432
- I(!1);
432
+ E(!1);
433
433
  }
434
434
  }
435
435
  },
436
436
  handleBlockUser: async () => {
437
- var C, E, T;
438
- if (!(R || !h)) {
439
- o == null || o(), g && console.log(`[${p}] Block member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), S(!0);
437
+ var I, C, S;
438
+ if (!(T || !h)) {
439
+ o == null || o(), f && console.log(`[${g}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), M(!0);
440
440
  try {
441
- await h.blockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
442
- } catch (P) {
443
- console.error(`[${p}] Failed to block member`, P);
441
+ await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), u == null || u();
442
+ } catch (O) {
443
+ console.error(`[${g}] Failed to block member`, O);
444
444
  } finally {
445
- S(!1);
445
+ M(!1);
446
446
  }
447
447
  }
448
448
  },
449
449
  handleUnblockUser: async () => {
450
- var C, E, T;
451
- if (!(R || !h)) {
452
- o == null || o(), g && console.log(`[${p}] Unblock member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), S(!0);
450
+ var I, C, S;
451
+ if (!(T || !h)) {
452
+ o == null || o(), f && console.log(`[${g}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), M(!0);
453
453
  try {
454
- await h.unBlockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
455
- } catch (P) {
456
- console.error(`[${p}] Failed to unblock member`, P);
454
+ await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), u == null || u();
455
+ } catch (O) {
456
+ console.error(`[${g}] Failed to unblock member`, O);
457
457
  } finally {
458
- S(!1);
458
+ M(!1);
459
459
  }
460
460
  }
461
461
  },
@@ -463,7 +463,7 @@ const ne = ({
463
463
  d == null || d(), u == null || u(), window.open(Ws, "_blank", "noopener,noreferrer");
464
464
  }
465
465
  };
466
- }, ve = ({
466
+ }, xe = ({
467
467
  variant: e = "default",
468
468
  className: t,
469
469
  children: s,
@@ -491,50 +491,50 @@ const ne = ({
491
491
  onDeleteConversationClick: o,
492
492
  onBlockParticipantClick: d,
493
493
  onReportParticipantClick: u,
494
- customChannelActions: p,
494
+ customChannelActions: g,
495
495
  triggerClassName: h
496
496
  }) => {
497
- const [g, c] = O(!1), b = H(null), _ = An(), v = W(() => c(!1), []), {
498
- isParticipantBlocked: f,
499
- isCheckingBlockedStatus: N,
500
- isLeaving: x,
501
- isUpdatingBlockStatus: I,
502
- handleLeaveConversation: R,
503
- handleBlockUser: S,
497
+ const [f, c] = $(!1), v = V(null), _ = An(), b = K(() => c(!1), []), {
498
+ isParticipantBlocked: p,
499
+ isCheckingBlockedStatus: x,
500
+ isLeaving: N,
501
+ isUpdatingBlockStatus: E,
502
+ handleLeaveConversation: T,
503
+ handleBlockUser: M,
504
504
  handleUnblockUser: L,
505
505
  handleReportUser: D
506
506
  } = Xs({
507
507
  channel: e,
508
508
  participant: t,
509
509
  showBlockParticipant: a,
510
- enabled: g,
510
+ enabled: f,
511
511
  onLeaveConversation: i,
512
512
  onBlockParticipant: l,
513
513
  onDeleteConversationClick: o,
514
514
  onBlockParticipantClick: d,
515
515
  onReportParticipantClick: u,
516
- onActionComplete: v,
516
+ onActionComplete: b,
517
517
  logLabel: "ChannelActionsMenu"
518
518
  });
519
- return q(() => {
520
- if (!g) return;
519
+ return X(() => {
520
+ if (!f) return;
521
521
  const z = (A) => {
522
- b.current && !b.current.contains(A.target) && c(!1);
522
+ v.current && !v.current.contains(A.target) && c(!1);
523
523
  }, y = (A) => {
524
524
  A.key === "Escape" && c(!1);
525
525
  };
526
526
  return document.addEventListener("mousedown", z), document.addEventListener("keydown", y), () => {
527
527
  document.removeEventListener("mousedown", z), document.removeEventListener("keydown", y);
528
528
  };
529
- }, [g]), !t || !(s || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: b, className: "relative", children: [
529
+ }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ m("div", { ref: v, className: "relative", children: [
530
530
  /* @__PURE__ */ m(
531
531
  "button",
532
532
  {
533
533
  className: h,
534
534
  type: "button",
535
535
  "aria-haspopup": "true",
536
- "aria-expanded": g,
537
- "aria-controls": g ? _ : void 0,
536
+ "aria-expanded": f,
537
+ "aria-controls": f ? _ : void 0,
538
538
  onClick: () => c((z) => !z),
539
539
  children: [
540
540
  /* @__PURE__ */ n(ps, { className: "size-5 text-black/90" }),
@@ -542,7 +542,7 @@ const ne = ({
542
542
  ]
543
543
  }
544
544
  ),
545
- g && /* @__PURE__ */ n(
545
+ f && /* @__PURE__ */ n(
546
546
  "div",
547
547
  {
548
548
  id: _,
@@ -553,60 +553,60 @@ const ne = ({
553
553
  ),
554
554
  children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
555
555
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ m(
556
- ve,
556
+ xe,
557
557
  {
558
- onClick: R,
559
- disabled: x,
560
- "aria-busy": x,
558
+ onClick: T,
559
+ disabled: N,
560
+ "aria-busy": N,
561
561
  children: [
562
- x ? /* @__PURE__ */ n(Me, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(bs, { className: "h-5 w-5" }),
562
+ N ? /* @__PURE__ */ n(Me, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(bs, { className: "h-5 w-5" }),
563
563
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
564
564
  ]
565
565
  }
566
566
  ) }),
567
- a && /* @__PURE__ */ n("li", { children: N ? (
567
+ a && /* @__PURE__ */ n("li", { children: x ? (
568
568
  // Block status not yet resolved — show a disabled placeholder
569
569
  // so a premature click can't act on a stale block state.
570
- /* @__PURE__ */ m(ve, { disabled: !0, "aria-busy": !0, children: [
570
+ /* @__PURE__ */ m(xe, { disabled: !0, "aria-busy": !0, children: [
571
571
  /* @__PURE__ */ n(Me, { className: "h-5 w-5 animate-spin" }),
572
572
  /* @__PURE__ */ n("span", { children: "Block" })
573
573
  ] })
574
- ) : f ? /* @__PURE__ */ m(
575
- ve,
574
+ ) : p ? /* @__PURE__ */ m(
575
+ xe,
576
576
  {
577
577
  onClick: L,
578
- disabled: I,
579
- "aria-busy": I,
578
+ disabled: E,
579
+ "aria-busy": E,
580
580
  children: [
581
- I ? /* @__PURE__ */ n(Me, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Bt, { className: "h-5 w-5" }),
581
+ E ? /* @__PURE__ */ n(Me, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Bt, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ n("span", { children: "Unblock" })
583
583
  ]
584
584
  }
585
585
  ) : /* @__PURE__ */ m(
586
- ve,
586
+ xe,
587
587
  {
588
- onClick: S,
589
- disabled: I,
590
- "aria-busy": I,
588
+ onClick: M,
589
+ disabled: E,
590
+ "aria-busy": E,
591
591
  children: [
592
- I ? /* @__PURE__ */ n(Me, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Bt, { className: "h-5 w-5" }),
592
+ E ? /* @__PURE__ */ n(Me, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Bt, { className: "h-5 w-5" }),
593
593
  /* @__PURE__ */ n("span", { children: "Block" })
594
594
  ]
595
595
  }
596
596
  ) }),
597
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ m(ve, { variant: "danger", onClick: D, children: [
597
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ m(xe, { variant: "danger", onClick: D, children: [
598
598
  /* @__PURE__ */ n(Xt, { className: "h-5 w-5" }),
599
599
  /* @__PURE__ */ n("span", { children: "Report" })
600
600
  ] }) }),
601
- p
601
+ g
602
602
  ] })
603
603
  }
604
604
  )
605
605
  ] });
606
- }, Ve = "pointer-events-auto 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", Ks = "CUSTOMER_PAID", Js = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ks, Zs = (e) => {
606
+ }, Ve = "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", Ks = "CUSTOMER_PAID", Js = "Replies instantly with AI assistant", Zs = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ks, Qs = (e) => {
607
607
  const t = e;
608
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(Js);
609
- }, Qs = ({
608
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(Zs);
609
+ }, ea = ({
610
610
  onBack: e,
611
611
  showBackButton: t,
612
612
  showStarButton: s = !1,
@@ -617,39 +617,35 @@ const ne = ({
617
617
  showBlockParticipant: o = !0,
618
618
  showReportParticipant: d = !0,
619
619
  onDeleteConversationClick: u,
620
- onBlockParticipantClick: p,
620
+ onBlockParticipantClick: g,
621
621
  onReportParticipantClick: h,
622
- customChannelActions: g,
622
+ customChannelActions: f,
623
623
  renderChannelActions: c,
624
- showChannelInfo: b = !0,
625
- onParticipantNameClick: _,
626
- renderHeaderTitleBadges: v
624
+ showChannelInfo: v = !0,
625
+ onParticipantNameClick: _
627
626
  }) => {
628
- var z, y, A;
629
- const { channel: f } = oe(), { client: N } = ce(), x = j.useMemo(
627
+ var D, P, z;
628
+ const { channel: b } = ce(), { client: p } = de(), x = j.useMemo(
630
629
  () => {
631
- var C;
630
+ var y;
632
631
  return Oe(
633
- (C = f.state) == null ? void 0 : C.members,
634
- N == null ? void 0 : N.userID,
635
- f.type
632
+ (y = b.state) == null ? void 0 : y.members,
633
+ p == null ? void 0 : p.userID,
634
+ b.type
636
635
  );
637
636
  },
638
- [(z = f.state) == null ? void 0 : z.members, N == null ? void 0 : N.userID, f.type]
639
- ), I = st(x == null ? void 0 : x.user), R = (y = x == null ? void 0 : x.user) == null ? void 0 : y.image, S = nt(f), L = Zs(x), D = v == null ? void 0 : v({
640
- channel: f,
641
- participant: x
642
- }), $ = async () => {
637
+ [(D = b.state) == null ? void 0 : D.members, p == null ? void 0 : p.userID, b.type]
638
+ ), N = st(x == null ? void 0 : x.user), E = (P = x == null ? void 0 : x.user) == null ? void 0 : P.image, T = nt(b), M = Qs(x), L = async () => {
643
639
  try {
644
- S ? await f.unpin() : await f.pin();
645
- } catch (C) {
640
+ T ? await b.unpin() : await b.pin();
641
+ } catch (y) {
646
642
  console.error(
647
643
  "[ChannelHeaderRedesign] Failed to update pinned status:",
648
- C
644
+ y
649
645
  );
650
646
  }
651
647
  };
652
- return /* @__PURE__ */ n("div", { className: "@container pointer-events-none sticky top-0 z-10 w-full bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]", children: /* @__PURE__ */ m("div", { className: "grid min-h-[100px] grid-cols-[40px_minmax(0,1fr)_40px] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
648
+ return /* @__PURE__ */ n("div", { className: "@container w-full bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]", children: /* @__PURE__ */ m("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
653
649
  /* @__PURE__ */ n("div", { className: "flex items-start", children: t && /* @__PURE__ */ n(
654
650
  "button",
655
651
  {
@@ -669,49 +665,54 @@ const ne = ({
669
665
  {
670
666
  type: "button",
671
667
  onClick: _,
672
- "aria-label": `View details for ${I}`,
673
- className: "group pointer-events-auto flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
668
+ "aria-label": `View details for ${N}`,
669
+ className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
674
670
  children: [
675
671
  /* @__PURE__ */ n(
676
672
  ne,
677
673
  {
678
- id: ((A = x == null ? void 0 : x.user) == null ? void 0 : A.id) || f.id || "unknown",
679
- name: I,
680
- image: R,
674
+ id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || b.id || "unknown",
675
+ name: N,
676
+ image: E,
681
677
  dmAgentEnabled: a,
682
678
  shape: "circle",
683
679
  size: 48,
684
680
  className: "-mb-2"
685
681
  }
686
682
  ),
687
- /* @__PURE__ */ m("span", { className: "relative z-10 inline-flex max-w-full items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-colors duration-150 group-hover:bg-white/80", children: [
688
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: I }),
689
- /* @__PURE__ */ m("div", { className: "ml-2 flex gap-1", children: [
690
- L && /* @__PURE__ */ n(
691
- "span",
692
- {
693
- "aria-label": "Paid customer",
694
- className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
695
- children: /* @__PURE__ */ n(vs, { className: "size-2.5", weight: "bold" })
696
- }
697
- ),
698
- s && S && /* @__PURE__ */ n(
699
- "span",
700
- {
701
- "aria-label": "Starred conversation",
702
- className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
703
- children: /* @__PURE__ */ n(ye, { className: "size-2.5", weight: "fill" })
704
- }
705
- ),
706
- D && /* @__PURE__ */ n("span", { className: "shrink-0", children: D }),
707
- /* @__PURE__ */ n(
708
- ue,
709
- {
710
- "aria-hidden": "true",
711
- className: "size-4 shrink-0 text-black/65",
712
- weight: "bold"
713
- }
714
- )
683
+ /* @__PURE__ */ m("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-colors duration-150 group-hover:bg-white/80", children: [
684
+ /* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
685
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
686
+ /* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
687
+ M && /* @__PURE__ */ n(
688
+ "span",
689
+ {
690
+ "aria-label": "Paid customer",
691
+ className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
692
+ children: /* @__PURE__ */ n(vs, { className: "size-2.5", weight: "bold" })
693
+ }
694
+ ),
695
+ s && T && /* @__PURE__ */ n(
696
+ "span",
697
+ {
698
+ "aria-label": "Starred conversation",
699
+ className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
700
+ children: /* @__PURE__ */ n(ye, { className: "size-2.5", weight: "fill" })
701
+ }
702
+ ),
703
+ /* @__PURE__ */ n(
704
+ me,
705
+ {
706
+ "aria-hidden": "true",
707
+ className: "size-4 shrink-0 text-black/65",
708
+ weight: "bold"
709
+ }
710
+ )
711
+ ] })
712
+ ] }),
713
+ a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
714
+ /* @__PURE__ */ n(he, { className: "size-3 shrink-0 text-black/55" }),
715
+ /* @__PURE__ */ n("span", { children: Js })
715
716
  ] })
716
717
  ] })
717
718
  ]
@@ -722,26 +723,26 @@ const ne = ({
722
723
  "button",
723
724
  {
724
725
  className: Ve,
725
- onClick: $,
726
+ onClick: L,
726
727
  type: "button",
727
- "aria-pressed": S,
728
- "aria-label": S ? "Unstar conversation" : "Star conversation",
728
+ "aria-pressed": T,
729
+ "aria-label": T ? "Unstar conversation" : "Star conversation",
729
730
  children: /* @__PURE__ */ n(
730
731
  ye,
731
732
  {
732
733
  className: k("size-5", {
733
- "text-[#FFD60A]": S,
734
- "text-black/90": !S
734
+ "text-[#FFD60A]": T,
735
+ "text-black/90": !T
735
736
  }),
736
- weight: S ? "fill" : "regular"
737
+ weight: T ? "fill" : "regular"
737
738
  }
738
739
  )
739
740
  }
740
741
  ),
741
- b && (c !== void 0 ? c : /* @__PURE__ */ n(
742
+ v && (c !== void 0 ? c : /* @__PURE__ */ n(
742
743
  Ke,
743
744
  {
744
- channel: f,
745
+ channel: b,
745
746
  participant: x,
746
747
  showDeleteConversation: l,
747
748
  showBlockParticipant: o,
@@ -749,23 +750,23 @@ const ne = ({
749
750
  onLeaveConversation: r,
750
751
  onBlockParticipant: i,
751
752
  onDeleteConversationClick: u,
752
- onBlockParticipantClick: p,
753
+ onBlockParticipantClick: g,
753
754
  onReportParticipantClick: h,
754
- customChannelActions: g,
755
+ customChannelActions: f,
755
756
  triggerClassName: Ve
756
757
  }
757
758
  ))
758
759
  ] })
759
760
  ] }) });
760
- }, ea = (e) => /* @__PURE__ */ n(Ln, { ...e, position: "center" }), Je = "vote_up", Ze = "vote_down";
761
- function ta(e) {
761
+ }, ta = (e) => /* @__PURE__ */ n(Ln, { ...e, position: "center" }), Je = "vote_up", Ze = "vote_down";
762
+ function na(e) {
762
763
  return e != null && e.length ? e.some((t) => t.type === Ze) ? "down" : e.some((t) => t.type === Je) ? "up" : null : null;
763
764
  }
764
- function na(e) {
765
- const { channel: t } = oe(), { client: s } = ce("useMessageVote"), a = re(
766
- () => ta(e.own_reactions),
765
+ function sa(e) {
766
+ const { channel: t } = ce(), { client: s } = de("useMessageVote"), a = ie(
767
+ () => na(e.own_reactions),
767
768
  [e.own_reactions]
768
- ), r = W(async () => {
769
+ ), r = K(async () => {
769
770
  if (s != null && s.userID)
770
771
  try {
771
772
  a === "up" ? await t.deleteReaction(e.id, Je) : await t.sendReaction(
@@ -775,7 +776,7 @@ function na(e) {
775
776
  );
776
777
  } catch {
777
778
  }
778
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = W(async () => {
779
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = K(async () => {
779
780
  if (s != null && s.userID)
780
781
  try {
781
782
  a === "down" ? await t.deleteReaction(e.id, Ze) : await t.sendReaction(
@@ -788,7 +789,7 @@ function na(e) {
788
789
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
789
790
  return { selected: a, voteUp: r, voteDown: i };
790
791
  }
791
- function sa(e) {
792
+ function aa(e) {
792
793
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
793
794
  }
794
795
  function tn({
@@ -796,16 +797,16 @@ function tn({
796
797
  viewerLanguage: t
797
798
  }) {
798
799
  var r;
799
- const s = e == null ? void 0 : e.text, a = sa(t);
800
+ const s = e == null ? void 0 : e.text, a = aa(t);
800
801
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
801
802
  }
802
- const aa = j.lazy(() => import("./Card-CuWniEOV.js")), ra = j.lazy(() => import("./Card-DQdw5-A_.js")), ia = j.lazy(() => import("./Card-CpgkVykU.js")), at = () => /* @__PURE__ */ n(
803
+ const ra = j.lazy(() => import("./Card-CAalQRJs.js")), ia = j.lazy(() => import("./Card-6zV3sFbU.js")), la = j.lazy(() => import("./Card-wg-7Dyut.js")), at = () => /* @__PURE__ */ n(
803
804
  "div",
804
805
  {
805
806
  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)]",
806
807
  "aria-hidden": !0
807
808
  }
808
- ), la = (e) => /* @__PURE__ */ n(et, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(aa, { ...e }) }), nn = (e) => /* @__PURE__ */ n(et, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(ra, { ...e }) }), sn = (e) => /* @__PURE__ */ n(et, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(ia, { ...e }) }), oa = nn, ca = sn, Gt = { Composer: la, Sent: nn, Received: sn, Creator: oa, Visitor: ca }, da = [
809
+ ), oa = (e) => /* @__PURE__ */ n(et, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(ra, { ...e }) }), nn = (e) => /* @__PURE__ */ n(et, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(ia, { ...e }) }), sn = (e) => /* @__PURE__ */ n(et, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(la, { ...e }) }), ca = nn, da = sn, Gt = { Composer: oa, Sent: nn, Received: sn, Creator: ca, Visitor: da }, ua = [
809
810
  [/pdf/, "pdf"],
810
811
  [/wordprocessingml|msword|\.doc/, "doc"],
811
812
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -815,42 +816,42 @@ const aa = j.lazy(() => import("./Card-CuWniEOV.js")), ra = j.lazy(() => import(
815
816
  [/plain|rtf/, "text"],
816
817
  [/markdown/, "markdown"]
817
818
  ];
818
- function ie(e) {
819
+ function le(e) {
819
820
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
820
821
  }
821
822
  function an(e) {
822
- const t = da.find(
823
+ const t = ua.find(
823
824
  ([s]) => s.test(e)
824
825
  );
825
826
  return t ? t[1] : "generic";
826
827
  }
827
- const ua = {
828
+ const ma = {
828
829
  video: Jt,
829
830
  audio: ws,
830
831
  image: xs,
831
832
  document: Kt
832
- }, ma = {
833
+ }, ha = {
833
834
  pdf: Ss,
834
835
  doc: Is,
835
836
  xls: Es,
836
- csv: ks,
837
- ppt: Cs,
837
+ csv: Cs,
838
+ ppt: ks,
838
839
  zip: ys,
839
840
  text: Ns,
840
841
  markdown: _s,
841
842
  generic: Kt
842
843
  };
843
- function ha(e) {
844
- const t = ie(e);
845
- return t !== "document" ? ua[t] : ma[an(e)];
844
+ function fa(e) {
845
+ const t = le(e);
846
+ return t !== "document" ? ma[t] : ha[an(e)];
846
847
  }
847
- function me(e, t) {
848
- return j.createElement(ha(e), t);
848
+ function fe(e, t) {
849
+ return j.createElement(fa(e), t);
849
850
  }
850
- const fa = (e) => {
851
+ const ga = (e) => {
851
852
  var t, s;
852
853
  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
- }, ga = ({
854
+ }, pa = ({
854
855
  source: e,
855
856
  mimeType: t,
856
857
  poster: s,
@@ -862,66 +863,66 @@ const fa = (e) => {
862
863
  muted: d = !1,
863
864
  onContainerClick: u
864
865
  }) => {
865
- const p = ie(t), h = H(null), g = H(null), c = H(null), b = H(r), [_, v] = O(a), [f, N] = O(0), [x, I] = O(!1), [R, S] = O(!1), [L, D] = O(!1), [$, z] = O(!1), [y, A] = O(!0), [C, E] = O(null), T = W(() => {
866
- D(!1), v(!0);
867
- }, []), P = W((w) => {
868
- const M = g.current;
869
- if (!M) return 0;
870
- const G = M.getBoundingClientRect();
866
+ const g = le(t), h = V(null), f = V(null), c = V(null), v = V(r), [_, b] = $(a), [p, x] = $(0), [N, E] = $(!1), [T, M] = $(!1), [L, D] = $(!1), [P, z] = $(!1), [y, A] = $(!0), [I, C] = $(null), S = K(() => {
867
+ D(!1), b(!0);
868
+ }, []), O = K((w) => {
869
+ const R = f.current;
870
+ if (!R) return 0;
871
+ const G = R.getBoundingClientRect();
871
872
  return Math.max(
872
873
  0,
873
- Math.min(1, (fa(w) - G.left) / G.width)
874
+ Math.min(1, (ga(w) - G.left) / G.width)
874
875
  );
875
- }, []), F = W((w) => {
876
- const M = h.current;
877
- M && M.duration && (M.currentTime = w * M.duration);
876
+ }, []), F = K((w) => {
877
+ const R = h.current;
878
+ R && R.duration && (R.currentTime = w * R.duration);
878
879
  }, []), B = (w) => {
879
- w.stopPropagation(), I(!0);
880
- const M = P(w);
881
- N(M), F(M);
880
+ w.stopPropagation(), E(!0);
881
+ const R = O(w);
882
+ x(R), F(R);
882
883
  };
883
- q(() => {
884
- r !== void 0 && r !== b.current && (b.current = r, v(r));
885
- }, [r]), q(() => {
884
+ X(() => {
885
+ r !== void 0 && r !== v.current && (v.current = r, b(r));
886
+ }, [r]), X(() => {
886
887
  if (!_) {
887
888
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
888
889
  return;
889
890
  }
890
891
  const w = () => {
891
- const M = h.current;
892
- M && M.duration && !x && N(M.currentTime / M.duration), c.current = requestAnimationFrame(w);
892
+ const R = h.current;
893
+ R && R.duration && !N && x(R.currentTime / R.duration), c.current = requestAnimationFrame(w);
893
894
  };
894
895
  return c.current = requestAnimationFrame(w), () => {
895
896
  c.current !== null && cancelAnimationFrame(c.current);
896
897
  };
897
- }, [_, x]), q(() => {
898
+ }, [_, N]), X(() => {
898
899
  const w = h.current;
899
- w && (_ ? w.play().catch((M) => {
900
- v(!1), D(!0);
900
+ w && (_ ? w.play().catch((R) => {
901
+ b(!1), D(!0);
901
902
  }) : w.pause());
902
- }, [_]), q(() => {
903
- if (!x) return;
904
- const w = (G) => N(P(G)), M = (G) => {
905
- I(!1), F(P(G));
903
+ }, [_]), X(() => {
904
+ if (!N) return;
905
+ const w = (G) => x(O(G)), R = (G) => {
906
+ E(!1), F(O(G));
906
907
  };
907
- return window.addEventListener("mousemove", w), window.addEventListener("mouseup", M), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", M), () => {
908
- window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", M), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", M);
908
+ return window.addEventListener("mousemove", w), window.addEventListener("mouseup", R), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", R), () => {
909
+ window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", R);
909
910
  };
910
- }, [x, P, F]);
911
- const X = C ? { aspectRatio: String(C) } : void 0, Z = C ? "" : " aspect-video", Y = Math.round(f * 100);
911
+ }, [N, O, F]);
912
+ const J = I ? { aspectRatio: String(I) } : void 0, ee = I ? "" : " aspect-video", q = Math.round(p * 100);
912
913
  return /* @__PURE__ */ m(
913
914
  "div",
914
915
  {
915
916
  role: "button",
916
917
  tabIndex: 0,
917
- className: `relative cursor-pointer overflow-hidden bg-black ${Z}`,
918
- style: X,
918
+ className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
919
+ style: J,
919
920
  onClick: (w) => {
920
921
  if (u) {
921
922
  u(w);
922
923
  return;
923
924
  }
924
- L || l && v((M) => !M);
925
+ L || l && b((R) => !R);
925
926
  },
926
927
  onKeyDown: (w) => {
927
928
  if (!(w.key !== "Enter" && w.key !== " ")) {
@@ -929,11 +930,11 @@ const fa = (e) => {
929
930
  u(w);
930
931
  return;
931
932
  }
932
- L || l && v((M) => !M);
933
+ L || l && b((R) => !R);
933
934
  }
934
935
  },
935
936
  children: [
936
- s && (p === "audio" || y) && /* @__PURE__ */ n(
937
+ s && (g === "audio" || y) && /* @__PURE__ */ n(
937
938
  "img",
938
939
  {
939
940
  src: s,
@@ -941,11 +942,11 @@ const fa = (e) => {
941
942
  className: "absolute inset-0 h-full w-full object-cover"
942
943
  }
943
944
  ),
944
- !s && (p === "audio" || y) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: me(t, {
945
+ !s && (g === "audio" || y) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: fe(t, {
945
946
  className: "size-12 text-black/20",
946
947
  weight: "regular"
947
948
  }) }),
948
- /* @__PURE__ */ n("div", { className: "absolute inset-0", children: p === "audio" ? /* @__PURE__ */ n(
949
+ /* @__PURE__ */ n("div", { className: "absolute inset-0", children: g === "audio" ? /* @__PURE__ */ n(
949
950
  "audio",
950
951
  {
951
952
  ref: h,
@@ -960,7 +961,7 @@ const fa = (e) => {
960
961
  onWaiting: () => z(!0),
961
962
  onPlay: () => D(!1),
962
963
  onEnded: () => {
963
- i || (v(!1), N(0));
964
+ i || (b(!1), x(0));
964
965
  },
965
966
  children: /* @__PURE__ */ n("track", { kind: "captions" })
966
967
  }
@@ -981,15 +982,15 @@ const fa = (e) => {
981
982
  onPlay: () => D(!1),
982
983
  onLoadedMetadata: () => {
983
984
  const w = h.current;
984
- w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && E(w.videoWidth / w.videoHeight);
985
+ w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && C(w.videoWidth / w.videoHeight);
985
986
  },
986
987
  onEnded: () => {
987
- i || (v(!1), N(0));
988
+ i || (b(!1), x(0));
988
989
  },
989
990
  children: /* @__PURE__ */ n("track", { kind: "captions" })
990
991
  }
991
992
  ) }),
992
- $ && !L && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
993
+ P && !L && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
993
994
  _e,
994
995
  {
995
996
  className: "size-8 animate-spin text-white/80",
@@ -1004,10 +1005,10 @@ const fa = (e) => {
1004
1005
  tabIndex: 0,
1005
1006
  "aria-label": "Play preview",
1006
1007
  onClick: (w) => {
1007
- w.stopPropagation(), T();
1008
+ w.stopPropagation(), S();
1008
1009
  },
1009
1010
  onKeyDown: (w) => {
1010
- w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), T());
1011
+ w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), S());
1011
1012
  },
1012
1013
  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(Xe, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1013
1014
  }
@@ -1017,23 +1018,23 @@ const fa = (e) => {
1017
1018
  {
1018
1019
  role: "slider",
1019
1020
  "aria-label": "Playback position",
1020
- "aria-valuenow": Y,
1021
+ "aria-valuenow": q,
1021
1022
  "aria-valuemin": 0,
1022
1023
  "aria-valuemax": 100,
1023
1024
  tabIndex: 0,
1024
- ref: g,
1025
+ ref: f,
1025
1026
  className: "relative flex h-4 w-full cursor-pointer items-center",
1026
1027
  onMouseDown: B,
1027
1028
  onTouchStart: B,
1028
1029
  onClick: (w) => w.stopPropagation(),
1029
1030
  onKeyDown: (w) => {
1030
- w.key === "ArrowRight" && F(Math.min(1, f + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
1031
+ w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
1031
1032
  },
1032
1033
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
1033
1034
  "div",
1034
1035
  {
1035
1036
  className: "h-full rounded-full bg-white",
1036
- style: { width: `${Y}%` }
1037
+ style: { width: `${q}%` }
1037
1038
  }
1038
1039
  ) })
1039
1040
  }
@@ -1044,7 +1045,7 @@ const fa = (e) => {
1044
1045
  {
1045
1046
  type: "button",
1046
1047
  onClick: (w) => {
1047
- w.stopPropagation(), v((M) => !M);
1048
+ w.stopPropagation(), b((R) => !R);
1048
1049
  },
1049
1050
  className: "shrink-0 text-white",
1050
1051
  "aria-label": _ ? "Pause" : "Play",
@@ -1056,30 +1057,30 @@ const fa = (e) => {
1056
1057
  {
1057
1058
  role: "slider",
1058
1059
  "aria-label": "Playback position",
1059
- "aria-valuenow": Y,
1060
+ "aria-valuenow": q,
1060
1061
  "aria-valuemin": 0,
1061
1062
  "aria-valuemax": 100,
1062
1063
  tabIndex: 0,
1063
- ref: g,
1064
+ ref: f,
1064
1065
  className: "relative flex h-4 w-full cursor-pointer items-center",
1065
1066
  onMouseDown: B,
1066
1067
  onTouchStart: B,
1067
1068
  onClick: (w) => w.stopPropagation(),
1068
- onMouseEnter: () => S(!0),
1069
- onMouseLeave: () => S(!1),
1069
+ onMouseEnter: () => M(!0),
1070
+ onMouseLeave: () => M(!1),
1070
1071
  onKeyDown: (w) => {
1071
- w.key === "ArrowRight" && F(Math.min(1, f + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
1072
+ w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
1072
1073
  },
1073
1074
  children: [
1074
1075
  /* @__PURE__ */ n(
1075
1076
  "div",
1076
1077
  {
1077
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || x ? "h-1.5" : "h-1"}`,
1078
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || N ? "h-1.5" : "h-1"}`,
1078
1079
  children: /* @__PURE__ */ n(
1079
1080
  "div",
1080
1081
  {
1081
1082
  className: "h-full rounded-full bg-white",
1082
- style: { width: `${Y}%` }
1083
+ style: { width: `${q}%` }
1083
1084
  }
1084
1085
  )
1085
1086
  }
@@ -1087,8 +1088,8 @@ const fa = (e) => {
1087
1088
  /* @__PURE__ */ n(
1088
1089
  "div",
1089
1090
  {
1090
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || x ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1091
- style: { left: `${Y}%` }
1091
+ 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"}`,
1092
+ style: { left: `${q}%` }
1092
1093
  }
1093
1094
  )
1094
1095
  ]
@@ -1098,7 +1099,7 @@ const fa = (e) => {
1098
1099
  ]
1099
1100
  }
1100
1101
  );
1101
- }, Ht = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", pa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", rn = ({
1102
+ }, Ht = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ba = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", rn = ({
1102
1103
  mimeType: e,
1103
1104
  sourceUrl: t,
1104
1105
  thumbnailUrl: s,
@@ -1107,9 +1108,9 @@ const fa = (e) => {
1107
1108
  mediaPlayerProps: i,
1108
1109
  containedImage: l = !1
1109
1110
  }) => {
1110
- const o = ie(e), [d, u] = O(!1);
1111
+ const o = le(e), [d, u] = $(!1);
1111
1112
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
1112
- ga,
1113
+ pa,
1113
1114
  {
1114
1115
  source: t,
1115
1116
  mimeType: e,
@@ -1155,12 +1156,12 @@ const fa = (e) => {
1155
1156
  "div",
1156
1157
  {
1157
1158
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1158
- children: me(e, {
1159
+ children: fe(e, {
1159
1160
  className: Ht(r),
1160
1161
  weight: "regular"
1161
1162
  })
1162
1163
  }
1163
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${pa(r)}`, children: /* @__PURE__ */ n(
1164
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${ba(r)}`, children: /* @__PURE__ */ n(
1164
1165
  "img",
1165
1166
  {
1166
1167
  src: s,
@@ -1172,7 +1173,7 @@ const fa = (e) => {
1172
1173
  "div",
1173
1174
  {
1174
1175
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1175
- children: me(e, {
1176
+ children: fe(e, {
1176
1177
  className: Ht(r),
1177
1178
  weight: "regular"
1178
1179
  })
@@ -1189,18 +1190,18 @@ const fa = (e) => {
1189
1190
  action: o,
1190
1191
  topLeft: d,
1191
1192
  topRight: u,
1192
- rootRef: p,
1193
+ rootRef: g,
1193
1194
  "data-testid": h
1194
1195
  }) => {
1195
- const g = e === "dark", c = g ? s ?? a : s ?? "", b = g && !s;
1196
+ const f = e === "dark", c = f ? s ?? a : s ?? "", v = f && !s;
1196
1197
  return /* @__PURE__ */ m(
1197
1198
  "div",
1198
1199
  {
1199
- ref: p,
1200
+ ref: g,
1200
1201
  "data-testid": h,
1201
1202
  className: k(
1202
1203
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1203
- g ? "bg-[#121110]" : "bg-white"
1204
+ f ? "bg-[#121110]" : "bg-white"
1204
1205
  ),
1205
1206
  children: [
1206
1207
  d ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
@@ -1211,18 +1212,18 @@ const fa = (e) => {
1211
1212
  "p",
1212
1213
  {
1213
1214
  className: k("mb-0.5 truncate text-base font-medium", {
1214
- "text-black": !g,
1215
- "text-white/30": g && b,
1216
- "text-white": g && !b
1215
+ "text-black": !f,
1216
+ "text-white/30": f && v,
1217
+ "text-white": f && !v
1217
1218
  }),
1218
1219
  children: c
1219
1220
  }
1220
1221
  ),
1221
1222
  /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
1222
- me(r, {
1223
+ fe(r, {
1223
1224
  className: k(
1224
1225
  "size-5 shrink-0",
1225
- g ? "text-white/55" : "text-black/55"
1226
+ f ? "text-white/55" : "text-black/55"
1226
1227
  ),
1227
1228
  weight: "regular"
1228
1229
  }),
@@ -1231,7 +1232,7 @@ const fa = (e) => {
1231
1232
  {
1232
1233
  className: k(
1233
1234
  "text-xs font-medium",
1234
- g ? "text-white/55" : "text-black/55"
1235
+ f ? "text-white/55" : "text-black/55"
1235
1236
  ),
1236
1237
  children: i
1237
1238
  }
@@ -1250,19 +1251,19 @@ function on(e) {
1250
1251
  function rt(e) {
1251
1252
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1252
1253
  }
1253
- function ba(e) {
1254
+ function va(e) {
1254
1255
  return e ? "bg-white/10" : "bg-black/5";
1255
1256
  }
1256
- function va(e) {
1257
+ function xa(e) {
1257
1258
  return e ? "text-white" : "text-black";
1258
1259
  }
1259
- function xa(e) {
1260
+ function wa(e) {
1260
1261
  return e ? "text-white/55" : "text-black/55";
1261
1262
  }
1262
- function wa(e) {
1263
+ function _a(e) {
1263
1264
  return e ? "text-white/40" : "text-black/40";
1264
1265
  }
1265
- function _a(e) {
1266
+ function Na(e) {
1266
1267
  return e ? "text-white/20" : "text-black/20";
1267
1268
  }
1268
1269
  const it = ({ attachment: e, isMyMessage: t }) => {
@@ -1277,14 +1278,14 @@ const it = ({ attachment: e, isMyMessage: t }) => {
1277
1278
  ) : /* @__PURE__ */ n(
1278
1279
  "div",
1279
1280
  {
1280
- className: `aspect-video w-full rounded-[20px] ${ba(t)} flex items-center justify-center`,
1281
- children: /* @__PURE__ */ n(As, { className: `size-12 ${_a(t)}` })
1281
+ className: `aspect-video w-full rounded-[20px] ${va(t)} flex items-center justify-center`,
1282
+ children: /* @__PURE__ */ n(As, { className: `size-12 ${Na(t)}` })
1282
1283
  }
1283
1284
  ) }),
1284
1285
  /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1285
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${va(t)}`, children: s }),
1286
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${xa(t)}`, children: a }),
1287
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${wa(t)}`, children: d })
1286
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${xa(t)}`, children: s }),
1287
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${wa(t)}`, children: a }),
1288
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${_a(t)}`, children: d })
1288
1289
  ] })
1289
1290
  ] });
1290
1291
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ n("div", { className: "block", children: u });
@@ -1296,7 +1297,7 @@ function lt(e) {
1296
1297
  var t;
1297
1298
  return (t = e.attachments) == null ? void 0 : t.find(cn);
1298
1299
  }
1299
- async function Na(e, t) {
1300
+ async function ya(e, t) {
1300
1301
  let s;
1301
1302
  try {
1302
1303
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1308,11 +1309,11 @@ async function Na(e, t) {
1308
1309
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1309
1310
  l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1310
1311
  }
1311
- const ya = ({
1312
+ const ka = ({
1312
1313
  url: e,
1313
1314
  filename: t
1314
1315
  }) => {
1315
- const [s, a] = O(!1);
1316
+ const [s, a] = $(!1);
1316
1317
  return /* @__PURE__ */ n(
1317
1318
  "button",
1318
1319
  {
@@ -1320,7 +1321,7 @@ const ya = ({
1320
1321
  onClick: (i) => {
1321
1322
  i.stopPropagation();
1322
1323
  const l = window.open("", "_blank", "noopener,noreferrer");
1323
- a(!0), Na(e, t).then(() => {
1324
+ a(!0), ya(e, t).then(() => {
1324
1325
  l == null || l.close();
1325
1326
  }).catch(() => {
1326
1327
  l && (l.location.href = e);
@@ -1336,24 +1337,24 @@ const ya = ({
1336
1337
  );
1337
1338
  };
1338
1339
  function ot(e) {
1339
- var h, g, c, b;
1340
+ var h, f, c, v;
1340
1341
  const t = (h = e.attachments) == null ? void 0 : h.find(
1341
1342
  (_) => _.type === "video" && _.asset_url
1342
- ), s = (g = e.attachments) == null ? void 0 : g.find(
1343
+ ), s = (f = e.attachments) == null ? void 0 : f.find(
1343
1344
  (_) => _.type === "image" && _.image_url
1344
1345
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1345
1346
  (_) => _.type === "audio" && _.asset_url
1346
- ), r = (b = e.attachments) == null ? void 0 : b.find(
1347
+ ), r = (v = e.attachments) == null ? void 0 : v.find(
1347
1348
  (_) => _.type === "file" && _.asset_url
1348
1349
  ), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1349
1350
  if (!l) return null;
1350
- const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, p = t == null ? void 0 : t.thumb_url;
1351
+ const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
1351
1352
  return {
1352
1353
  resolvedUrl: l,
1353
1354
  resolvedType: o,
1354
1355
  title: d,
1355
1356
  fileSize: u,
1356
- thumbnailUrl: p
1357
+ thumbnailUrl: g
1357
1358
  };
1358
1359
  }
1359
1360
  const dn = ({
@@ -1391,7 +1392,7 @@ const dn = ({
1391
1392
  fileSize: a,
1392
1393
  thumbnailUrl: r
1393
1394
  }) => {
1394
- const i = ie(t), l = a !== void 0 ? on(a) : void 0;
1395
+ const i = le(t), l = a !== void 0 ? on(a) : void 0;
1395
1396
  return /* @__PURE__ */ n(
1396
1397
  ln,
1397
1398
  {
@@ -1410,7 +1411,7 @@ const dn = ({
1410
1411
  containedImage: i === "image" || i === "document"
1411
1412
  }
1412
1413
  ),
1413
- action: /* @__PURE__ */ n(ya, { url: e, filename: s })
1414
+ action: /* @__PURE__ */ n(ka, { url: e, filename: s })
1414
1415
  }
1415
1416
  );
1416
1417
  }, Ca = ({
@@ -1444,7 +1445,7 @@ const dn = ({
1444
1445
  }
1445
1446
  )
1446
1447
  ] });
1447
- }, ka = ({
1448
+ }, Ea = ({
1448
1449
  message: e
1449
1450
  }) => {
1450
1451
  const t = lt(e);
@@ -1452,7 +1453,7 @@ const dn = ({
1452
1453
  return /* @__PURE__ */ n("div", { className: rt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(it, { attachment: t, isMyMessage: !0 }) });
1453
1454
  const s = ot(e);
1454
1455
  return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dn, { ...s }) }) : null;
1455
- }, Ea = ({
1456
+ }, Ia = ({
1456
1457
  message: e
1457
1458
  }) => {
1458
1459
  const t = lt(e);
@@ -1460,18 +1461,18 @@ const dn = ({
1460
1461
  return /* @__PURE__ */ n("div", { className: rt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(it, { attachment: t, isMyMessage: !1 }) });
1461
1462
  const s = ot(e);
1462
1463
  return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(un, { ...s }) }) : null;
1463
- }, Li = Object.assign(Ca, {
1464
- Creator: ka,
1465
- Visitor: Ea
1466
- }), Ia = {
1464
+ }, zi = Object.assign(Ca, {
1465
+ Creator: Ea,
1466
+ Visitor: Ia
1467
+ }), Sa = {
1467
1468
  isUnlocking: () => !1
1468
- }, Sa = {
1469
- LockedAttachment: Ia
1470
- }, mn = Qe({}), zi = mn.Provider;
1471
- function Ta(e) {
1472
- return Ce(mn)[e] ?? Sa[e];
1469
+ }, Ta = {
1470
+ LockedAttachment: Sa
1471
+ }, mn = Qe({}), Fi = mn.Provider;
1472
+ function Aa(e) {
1473
+ return ke(mn)[e] ?? Ta[e];
1473
1474
  }
1474
- const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1475
+ const Ma = ({ size: e = 15 }) => /* @__PURE__ */ n(
1475
1476
  "svg",
1476
1477
  {
1477
1478
  width: e,
@@ -1488,19 +1489,19 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1488
1489
  }
1489
1490
  )
1490
1491
  }
1491
- ), Ma = (e) => {
1492
+ ), Ra = (e) => {
1492
1493
  var t;
1493
1494
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1494
- }, Ra = (e) => {
1495
+ }, Da = (e) => {
1495
1496
  var t;
1496
1497
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1497
1498
  }, De = (e) => {
1498
1499
  var t;
1499
1500
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1500
- }, Da = (e) => {
1501
+ }, La = (e) => {
1501
1502
  var t;
1502
1503
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1503
- }, hn = (e) => Ma(e) || Ra(e), La = (e) => {
1504
+ }, hn = (e) => Ra(e) || Da(e), za = (e) => {
1504
1505
  var t;
1505
1506
  return hn(e) && !((t = e.text) != null && t.trim());
1506
1507
  }, Ge = ({
@@ -1514,27 +1515,27 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1514
1515
  if (!r && !i)
1515
1516
  return null;
1516
1517
  if (r) {
1517
- const g = (h = e.metadata) == null ? void 0 : h.amount_text;
1518
- if (!g) return null;
1519
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${g} tip` : `Delivered with ${g} tip`;
1518
+ const f = (h = e.metadata) == null ? void 0 : h.amount_text;
1519
+ if (!f) return null;
1520
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${f} tip` : `Delivered with ${f} tip`;
1520
1521
  return /* @__PURE__ */ m("div", { className: c, children: [
1521
1522
  /* @__PURE__ */ n(Ms, { size: t ? 14 : 12 }),
1522
- /* @__PURE__ */ n("span", { children: b })
1523
+ /* @__PURE__ */ n("span", { children: v })
1523
1524
  ] });
1524
1525
  }
1525
1526
  const l = s && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
1526
1527
  "message-chatbot-indicator",
1527
1528
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1528
1529
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1529
- ].join(" "), u = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(Aa, { size: l ? 12 : 15 }) });
1530
+ ].join(" "), u = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(Ma, { size: l ? 12 : 15 }) });
1530
1531
  return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ m(se, { children: [
1531
1532
  u,
1532
- p
1533
+ g
1533
1534
  ] }) : /* @__PURE__ */ m(se, { children: [
1534
- p,
1535
+ g,
1535
1536
  u
1536
1537
  ] }) });
1537
- }, za = ({
1538
+ }, Fa = ({
1538
1539
  selected: e,
1539
1540
  onVoteUp: t,
1540
1541
  onVoteDown: s
@@ -1567,8 +1568,8 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1567
1568
  children: /* @__PURE__ */ n(Ds, { size: 16, weight: e === "down" ? "fill" : "regular" })
1568
1569
  }
1569
1570
  )
1570
- ] }), Fa = (e) => {
1571
- var yt, Ct, kt, Et, It, St, Tt, At, Mt, Rt, Dt, Lt, zt, Ft;
1571
+ ] }), Pa = (e) => {
1572
+ var yt, kt, Ct, Et, It, St, Tt, At, Mt, Rt, Dt, Lt, zt, Ft;
1572
1573
  const {
1573
1574
  additionalMessageInputProps: t,
1574
1575
  chatbotVotingEnabled: s,
@@ -1579,47 +1580,47 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1579
1580
  handleAction: o,
1580
1581
  handleOpenThread: d,
1581
1582
  handleRetry: u,
1582
- highlighted: p,
1583
+ highlighted: g,
1583
1584
  isMessageAIGenerated: h,
1584
- isMyMessage: g,
1585
+ isMyMessage: f,
1585
1586
  message: c,
1586
- renderText: b,
1587
+ renderText: v,
1587
1588
  threadList: _,
1588
- viewerLanguage: v
1589
- } = e, { client: f } = ce("CustomMessage"), { channel: N } = oe("CustomMessage"), { isUnlocking: x, onUnlockClick: I, onFetchSource: R, onDownloadClick: S } = Ta("LockedAttachment"), [L, D] = O(!1), $ = Fn(c.id), { selected: z, voteUp: y, voteDown: A } = na(c), {
1590
- Attachment: C = Pn,
1591
- EditMessageModal: E = On,
1592
- MessageActions: T,
1593
- MessageBlocked: P = $n,
1589
+ viewerLanguage: b
1590
+ } = e, { client: p } = de("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: N, onUnlockClick: E, onFetchSource: T, onDownloadClick: M } = Aa("LockedAttachment"), [L, D] = $(!1), P = Fn(c.id), { selected: z, voteUp: y, voteDown: A } = sa(c), {
1591
+ Attachment: I = Pn,
1592
+ EditMessageModal: C = On,
1593
+ MessageActions: S,
1594
+ MessageBlocked: O = $n,
1594
1595
  MessageBouncePrompt: F = jn,
1595
1596
  MessageDeleted: B = Bn,
1596
- MessageIsThreadReplyInChannelButtonIndicator: X = Un,
1597
- MessageRepliesCountButton: Z = Vn,
1598
- ReminderNotification: Y = Gn,
1597
+ MessageIsThreadReplyInChannelButtonIndicator: J = Un,
1598
+ MessageRepliesCountButton: ee = Vn,
1599
+ ReminderNotification: q = Gn,
1599
1600
  StreamedMessageText: w = Hn,
1600
- PinIndicator: M
1601
- } = Wt("CustomMessage"), G = Yn(c), V = qn(c), Q = re(
1601
+ PinIndicator: R
1602
+ } = Wt("CustomMessage"), G = Yn(c), H = qn(c), W = ie(
1602
1603
  () => h == null ? void 0 : h(c),
1603
1604
  [h, c]
1604
- ), U = re(() => {
1605
- const be = c.attachments ?? [], Ae = c.shared_location ? [c.shared_location, ...be] : be;
1605
+ ), U = ie(() => {
1606
+ const ve = c.attachments ?? [], Ae = c.shared_location ? [c.shared_location, ...ve] : ve;
1606
1607
  if (!De(c)) return Ae;
1607
1608
  const Pt = Ae.filter((Ot) => !("type" in Ot) || !cn(Ot));
1608
1609
  return Pt.length === Ae.length ? Ae : Pt;
1609
- }, [c]), K = re(() => {
1610
- const be = tn({ message: c, viewerLanguage: v });
1611
- return be === c.text ? c : { ...c, text: be };
1612
- }, [c, v]);
1610
+ }, [c]), Y = ie(() => {
1611
+ const ve = tn({ message: c, viewerLanguage: b });
1612
+ return ve === c.text ? c : { ...c, text: ve };
1613
+ }, [c, b]);
1613
1614
  if (Wn(c))
1614
1615
  return null;
1615
1616
  if (c.deleted_at || c.type === "deleted")
1616
1617
  return /* @__PURE__ */ n(B, { message: c });
1617
1618
  if (Xn(c))
1618
- return /* @__PURE__ */ n(P, {});
1619
- const ee = !_ && !!c.reply_count, he = !_ && c.show_in_channel && c.parent_id, fe = c.status === "failed" && ((yt = c.error) == null ? void 0 : yt.status) !== 403, ge = Kn(c);
1620
- let J;
1621
- fe ? J = () => u(c) : ge && (J = () => D(!0));
1622
- const te = g(), le = k(
1619
+ return /* @__PURE__ */ n(O, {});
1620
+ const Z = !_ && !!c.reply_count, re = !_ && c.show_in_channel && c.parent_id, ge = c.status === "failed" && ((yt = c.error) == null ? void 0 : yt.status) !== 403, pe = Kn(c);
1621
+ let Q;
1622
+ ge ? Q = () => u(c) : pe && (Q = () => D(!0));
1623
+ const te = f(), oe = k(
1623
1624
  "str-chat__message str-chat__message-simple",
1624
1625
  `str-chat__message--${c.type}`,
1625
1626
  `str-chat__message--${c.status}`,
@@ -1627,19 +1628,19 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1627
1628
  c.text ? "str-chat__message--has-text" : "has-no-text",
1628
1629
  {
1629
1630
  "str-chat__message--has-attachment": G,
1630
- "str-chat__message--highlighted": p,
1631
+ "str-chat__message--highlighted": g,
1631
1632
  "str-chat__message--pinned pinned-message": c.pinned,
1632
- "str-chat__message--with-reactions": V,
1633
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Ct = c == null ? void 0 : c.error) == null ? void 0 : Ct.status) !== 403,
1634
- "str-chat__message-with-thread-link": ee || he,
1633
+ "str-chat__message--with-reactions": H,
1634
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((kt = c == null ? void 0 : c.error) == null ? void 0 : kt.status) !== 403,
1635
+ "str-chat__message-with-thread-link": Z || re,
1635
1636
  "str-chat__virtual-message__wrapper--end": r,
1636
1637
  "str-chat__virtual-message__wrapper--first": i,
1637
1638
  "str-chat__virtual-message__wrapper--group": l
1638
1639
  }
1639
- ), xt = c.poll_id && f.polls.fromState(c.poll_id), wt = La(c), pe = De(c), _t = Da(c), je = !!(U != null && U.length && !c.quoted_message), Nt = pe && te && je;
1640
+ ), xt = c.poll_id && p.polls.fromState(c.poll_id), wt = za(c), be = De(c), _t = La(c), je = !!(U != null && U.length && !c.quoted_message), Nt = be && te && je;
1640
1641
  return /* @__PURE__ */ m(se, { children: [
1641
1642
  a && /* @__PURE__ */ n(
1642
- E,
1643
+ C,
1643
1644
  {
1644
1645
  additionalMessageInputProps: t
1645
1646
  }
@@ -1655,12 +1656,12 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1655
1656
  /* @__PURE__ */ m(
1656
1657
  "div",
1657
1658
  {
1658
- className: le,
1659
+ className: oe,
1659
1660
  "data-message-id": c.id,
1660
1661
  "data-dd-privacy": "mask",
1661
1662
  children: [
1662
- M && /* @__PURE__ */ n(M, {}),
1663
- !!$ && /* @__PURE__ */ n(Y, { reminder: $ }),
1663
+ R && /* @__PURE__ */ n(R, {}),
1664
+ !!P && /* @__PURE__ */ n(q, { reminder: P }),
1664
1665
  c.user && /* @__PURE__ */ n(
1665
1666
  ne,
1666
1667
  {
@@ -1670,20 +1671,20 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1670
1671
  name: c.user.name || c.user.id,
1671
1672
  size: 24,
1672
1673
  shape: "circle",
1673
- dmAgentEnabled: pe
1674
+ dmAgentEnabled: be
1674
1675
  }
1675
1676
  ),
1676
1677
  /* @__PURE__ */ n(
1677
1678
  "div",
1678
1679
  {
1679
1680
  className: k("str-chat__message-inner", {
1680
- "str-chat__simple-message--error-failed": fe || ge
1681
+ "str-chat__simple-message--error-failed": ge || pe
1681
1682
  }),
1682
1683
  "data-testid": "message-inner",
1683
- onClick: J,
1684
- onKeyDown: J,
1685
- role: J ? "button" : void 0,
1686
- tabIndex: J ? 0 : void 0,
1684
+ onClick: Q,
1685
+ onKeyDown: Q,
1686
+ role: Q ? "button" : void 0,
1687
+ tabIndex: Q ? 0 : void 0,
1687
1688
  style: {
1688
1689
  // Force margins to 0 to prevent hover layout shift
1689
1690
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
@@ -1692,18 +1693,18 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1692
1693
  },
1693
1694
  children: _t ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
1694
1695
  te ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1695
- T && /* @__PURE__ */ n(T, {}),
1696
+ S && /* @__PURE__ */ n(S, {}),
1696
1697
  /* @__PURE__ */ n(
1697
1698
  Gt.Sent,
1698
1699
  {
1699
- title: (kt = c.metadata) == null ? void 0 : kt.attachment_title,
1700
+ title: (Ct = c.metadata) == null ? void 0 : Ct.attachment_title,
1700
1701
  mimeType: (Et = c.metadata) == null ? void 0 : Et.attachment_mime_type,
1701
1702
  thumbnailUrl: (It = c.metadata) == null ? void 0 : It.attachment_thumbnail,
1702
1703
  amountText: (St = c.metadata) == null ? void 0 : St.amount_text,
1703
1704
  detail: (Tt = c.metadata) == null ? void 0 : Tt.attachment_detail,
1704
1705
  paymentStatus: (At = c.metadata) == null ? void 0 : At.payment_status,
1705
- onPreviewClick: () => I == null ? void 0 : I(c, N),
1706
- onFetchSource: async () => await (R == null ? void 0 : R(c, N))
1706
+ onPreviewClick: () => E == null ? void 0 : E(c, x),
1707
+ onFetchSource: async () => await (T == null ? void 0 : T(c, x))
1707
1708
  }
1708
1709
  )
1709
1710
  ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
@@ -1716,26 +1717,26 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1716
1717
  amountText: (Lt = c.metadata) == null ? void 0 : Lt.amount_text,
1717
1718
  detail: (zt = c.metadata) == null ? void 0 : zt.attachment_detail,
1718
1719
  paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
1719
- isUnlocking: x(c.id),
1720
- onUnlockClick: () => I == null ? void 0 : I(c, N),
1721
- onFetchSource: async () => await (R == null ? void 0 : R(c, N)),
1722
- onDownloadClick: () => S == null ? void 0 : S(c, N)
1720
+ isUnlocking: N(c.id),
1721
+ onUnlockClick: () => E == null ? void 0 : E(c, x),
1722
+ onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
1723
+ onDownloadClick: () => M == null ? void 0 : M(c, x)
1723
1724
  }
1724
1725
  ),
1725
- T && /* @__PURE__ */ n(T, {})
1726
+ S && /* @__PURE__ */ n(S, {})
1726
1727
  ] }),
1727
1728
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1728
1729
  jt,
1729
1730
  {
1730
- message: K,
1731
- renderText: b
1731
+ message: Y,
1732
+ renderText: v
1732
1733
  }
1733
1734
  ) })
1734
1735
  ] }) : wt ? (
1735
1736
  /* Tip-only messages render as a standalone bubble */
1736
1737
  /* @__PURE__ */ n(Ge, { message: c, standalone: !0 })
1737
1738
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
1738
- pe && !Nt && /* @__PURE__ */ n(
1739
+ be && !Nt && /* @__PURE__ */ n(
1739
1740
  Ge,
1740
1741
  {
1741
1742
  message: c,
@@ -1745,23 +1746,23 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1745
1746
  ),
1746
1747
  xt && /* @__PURE__ */ n(Zn, { poll: xt }),
1747
1748
  U != null && U.length && !c.quoted_message ? /* @__PURE__ */ n(
1748
- C,
1749
+ I,
1749
1750
  {
1750
1751
  actionHandler: o,
1751
1752
  attachments: U
1752
1753
  }
1753
1754
  ) : null,
1754
- Q ? /* @__PURE__ */ n(
1755
+ W ? /* @__PURE__ */ n(
1755
1756
  w,
1756
1757
  {
1757
- message: K,
1758
- renderText: b
1758
+ message: Y,
1759
+ renderText: v
1759
1760
  }
1760
1761
  ) : /* @__PURE__ */ n(
1761
1762
  jt,
1762
1763
  {
1763
- message: K,
1764
- renderText: b
1764
+ message: Y,
1765
+ renderText: v
1765
1766
  }
1766
1767
  ),
1767
1768
  /* @__PURE__ */ n(Qn, {})
@@ -1769,7 +1770,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1769
1770
  }
1770
1771
  ),
1771
1772
  !_t && !wt && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
1772
- (!pe || Nt) && /* @__PURE__ */ n(
1773
+ (!be || Nt) && /* @__PURE__ */ n(
1773
1774
  Ge,
1774
1775
  {
1775
1776
  message: c,
@@ -1777,8 +1778,8 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1777
1778
  isMyMessage: te
1778
1779
  }
1779
1780
  ),
1780
- s && pe && /* @__PURE__ */ n(
1781
- za,
1781
+ s && be && /* @__PURE__ */ n(
1782
+ Fa,
1782
1783
  {
1783
1784
  selected: z,
1784
1785
  onVoteUp: y,
@@ -1786,28 +1787,28 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1786
1787
  }
1787
1788
  )
1788
1789
  ] }),
1789
- ee && /* @__PURE__ */ n(
1790
- Z,
1790
+ Z && /* @__PURE__ */ n(
1791
+ ee,
1791
1792
  {
1792
1793
  onClick: d,
1793
1794
  reply_count: c.reply_count
1794
1795
  }
1795
1796
  ),
1796
- he && /* @__PURE__ */ n(X, {})
1797
+ re && /* @__PURE__ */ n(J, {})
1797
1798
  ]
1798
1799
  },
1799
1800
  c.id
1800
1801
  )
1801
1802
  ] });
1802
- }, Pa = j.memo(
1803
- Fa,
1803
+ }, Oa = j.memo(
1804
+ Pa,
1804
1805
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : zn(e, t)
1805
- ), Oa = (e) => {
1806
- const t = ke("CustomMessage");
1807
- return /* @__PURE__ */ n(Pa, { ...t, ...e });
1808
- }, $a = () => {
1806
+ ), $a = (e) => {
1807
+ const t = Ce("CustomMessage");
1808
+ return /* @__PURE__ */ n(Oa, { ...t, ...e });
1809
+ }, ja = () => {
1809
1810
  var s;
1810
- const { handleDelete: e, message: t } = ke("CustomMessageActions");
1811
+ const { handleDelete: e, message: t } = Ce("CustomMessageActions");
1811
1812
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1812
1813
  Zt,
1813
1814
  {
@@ -1818,8 +1819,8 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1818
1819
  children: /* @__PURE__ */ n(Ls, { size: 16, weight: "light", "aria-hidden": !0 })
1819
1820
  }
1820
1821
  );
1821
- }, ja = () => {
1822
- const { handleFlag: e } = ke("CustomMessageActions");
1822
+ }, Ba = () => {
1823
+ const { handleFlag: e } = Ce("CustomMessageActions");
1823
1824
  return /* @__PURE__ */ n(
1824
1825
  Zt,
1825
1826
  {
@@ -1830,19 +1831,19 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1830
1831
  children: /* @__PURE__ */ n(Xt, { size: 16, weight: "light", "aria-hidden": !0 })
1831
1832
  }
1832
1833
  );
1833
- }, Ba = () => {
1834
+ }, Ua = () => {
1834
1835
  var t;
1835
- const { message: e } = ke("CustomMessageActions");
1836
+ const { message: e } = Ce("CustomMessageActions");
1836
1837
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1837
1838
  $s,
1838
1839
  {
1839
1840
  messageActionSet: [
1840
- { Component: $a, placement: "quick", type: "delete" },
1841
- { Component: ja, placement: "quick", type: "flag" }
1841
+ { Component: ja, placement: "quick", type: "delete" },
1842
+ { Component: Ba, placement: "quick", type: "flag" }
1842
1843
  ]
1843
1844
  }
1844
1845
  );
1845
- }, Ua = ({
1846
+ }, Va = ({
1846
1847
  link: e,
1847
1848
  onDismiss: t
1848
1849
  }) => {
@@ -1882,14 +1883,14 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1882
1883
  ]
1883
1884
  }
1884
1885
  );
1885
- }, Va = (e) => ({
1886
+ }, Ga = (e) => ({
1886
1887
  linkPreviews: Array.from(e.previews.values()).filter(
1887
1888
  (t) => $t.previewIsLoaded(t) || $t.previewIsLoading(t)
1888
1889
  )
1889
- }), Ga = () => {
1890
+ }), Ha = () => {
1890
1891
  const { linkPreviewsManager: e } = es(), { linkPreviews: t } = ts(
1891
1892
  e.state,
1892
- Va
1893
+ Ga
1893
1894
  ), s = (r) => {
1894
1895
  e.dismissPreview(r);
1895
1896
  };
@@ -1902,9 +1903,9 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1902
1903
  // block so it keeps its intrinsic height and the container scrolls — a
1903
1904
  // bare flex-column child would be shrunk on the column axis and its
1904
1905
  // fixed-height hero would spill out of the collapsed card box.
1905
- /* @__PURE__ */ n("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ n("div", { className: "w-full shrink-0", children: /* @__PURE__ */ n(Ua, { link: r, onDismiss: s }) }, r.og_scrape_url)) })
1906
+ /* @__PURE__ */ n("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ n("div", { className: "w-full shrink-0", children: /* @__PURE__ */ n(Va, { link: r, onDismiss: s }) }, r.og_scrape_url)) })
1906
1907
  ) : null;
1907
- }, ct = j.createContext(!1), Fi = () => Ce(ct), Ha = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1908
+ }, ct = j.createContext(!1), Pi = () => ke(ct), Ya = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1908
1909
  "button",
1909
1910
  {
1910
1911
  ...s,
@@ -1914,9 +1915,9 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1914
1915
  onClick: e,
1915
1916
  children: /* @__PURE__ */ n(zs, { weight: "bold", className: "size-4" })
1916
1917
  }
1917
- ), Ya = () => {
1918
- const e = Ce(ct), { handleSubmit: t } = ss(), s = as(), a = e || !s, {
1919
- SendButton: r = Ha,
1918
+ ), qa = () => {
1919
+ const e = ke(ct), { handleSubmit: t } = ss(), s = as(), a = e || !s, {
1920
+ SendButton: r = Ya,
1920
1921
  AttachmentPreviewList: i = rs
1921
1922
  } = Wt("CustomMessageInput");
1922
1923
  return (
@@ -1935,7 +1936,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1935
1936
  "data-dd-privacy": "mask",
1936
1937
  children: [
1937
1938
  /* @__PURE__ */ n(is, {}),
1938
- /* @__PURE__ */ n(Ga, {}),
1939
+ /* @__PURE__ */ n(Ha, {}),
1939
1940
  /* @__PURE__ */ n(i, {}),
1940
1941
  /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
1941
1942
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
@@ -1965,7 +1966,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1965
1966
  }
1966
1967
  )
1967
1968
  );
1968
- }, qa = ({
1969
+ }, Wa = ({
1969
1970
  renderActions: e,
1970
1971
  renderFooter: t,
1971
1972
  disabled: s = !1,
@@ -1973,7 +1974,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1973
1974
  composerInput: r
1974
1975
  }) => {
1975
1976
  var o;
1976
- const { channel: i } = oe(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
1977
+ const { channel: i } = ce(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
1977
1978
  return s ? /* @__PURE__ */ m(se, { children: [
1978
1979
  /* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
1979
1980
  t == null ? void 0 : t()
@@ -1986,23 +1987,23 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1986
1987
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
1987
1988
  children: [
1988
1989
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1989
- /* @__PURE__ */ n(ct.Provider, { value: l, children: /* @__PURE__ */ n(ns, { Input: r ?? Ya }) })
1990
+ /* @__PURE__ */ n(ct.Provider, { value: l, children: /* @__PURE__ */ n(ns, { Input: r ?? qa }) })
1990
1991
  ]
1991
1992
  }
1992
1993
  ),
1993
1994
  t == null ? void 0 : t()
1994
1995
  ] });
1995
- }, Wa = [
1996
+ }, Xa = [
1996
1997
  "SYSTEM_DM_AGENT_PAUSED",
1997
1998
  "SYSTEM_DM_AGENT_RESUMED"
1998
- ], Xa = {
1999
+ ], Ka = {
1999
2000
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
2000
2001
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
2001
- }, Ka = [
2002
+ }, Ja = [
2002
2003
  "SYSTEM_AGE_SAFETY_BLOCKED"
2003
- ], Ja = {
2004
+ ], Za = {
2004
2005
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
2005
- }, He = "age safety guidelines.", Za = "https://linktr.ee/s/about/contact", Yt = (e) => Wa.includes(e), Qa = (e) => Ka.includes(e), er = (e) => {
2006
+ }, He = "age safety guidelines.", Qa = "https://linktr.ee/s/about/contact", Yt = (e) => Xa.includes(e), er = (e) => Ja.includes(e), tr = (e) => {
2006
2007
  var a;
2007
2008
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
2008
2009
  if (Yt(t))
@@ -2010,7 +2011,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2010
2011
  kind: "dm-agent",
2011
2012
  type: t
2012
2013
  };
2013
- if (Qa(t))
2014
+ if (er(t))
2014
2015
  return {
2015
2016
  kind: "age-safety",
2016
2017
  type: t
@@ -2021,7 +2022,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2021
2022
  kind: "dm-agent",
2022
2023
  type: s
2023
2024
  };
2024
- }, tr = (e) => {
2025
+ }, nr = (e) => {
2025
2026
  const t = e.indexOf(He);
2026
2027
  if (t === -1)
2027
2028
  return e;
@@ -2031,7 +2032,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2031
2032
  /* @__PURE__ */ n(
2032
2033
  "a",
2033
2034
  {
2034
- href: Za,
2035
+ href: Qa,
2035
2036
  target: "_blank",
2036
2037
  rel: "noopener noreferrer",
2037
2038
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -2040,13 +2041,13 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2040
2041
  ),
2041
2042
  e.slice(s)
2042
2043
  ] });
2043
- }, nr = (e) => {
2044
+ }, sr = (e) => {
2044
2045
  var a, r;
2045
- const t = e.message.hide_date === !0, s = er(
2046
+ const t = e.message.hide_date === !0, s = tr(
2046
2047
  e.message
2047
2048
  );
2048
2049
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
2049
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Xa[s.type];
2050
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ka[s.type];
2050
2051
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
2051
2052
  /* @__PURE__ */ m(
2052
2053
  "div",
@@ -2056,7 +2057,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2056
2057
  "data-dm-agent-system-type": s.type,
2057
2058
  children: [
2058
2059
  /* @__PURE__ */ n(
2059
- xe,
2060
+ he,
2060
2061
  {
2061
2062
  size: 16,
2062
2063
  weight: "regular",
@@ -2072,7 +2073,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2072
2073
  ] });
2073
2074
  }
2074
2075
  if ((s == null ? void 0 : s.kind) === "age-safety") {
2075
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ja[s.type];
2076
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Za[s.type];
2076
2077
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
2077
2078
  /* @__PURE__ */ m(
2078
2079
  "div",
@@ -2091,7 +2092,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2091
2092
  "data-testid": "age-safety-system-message-icon"
2092
2093
  }
2093
2094
  ),
2094
- /* @__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: tr(i) }) })
2095
+ /* @__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: nr(i) }) })
2095
2096
  ]
2096
2097
  }
2097
2098
  ),
@@ -2116,21 +2117,21 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2116
2117
  begin: `${120 * t}ms`,
2117
2118
  repeatCount: "indefinite"
2118
2119
  }
2119
- ) }), sr = /* @__PURE__ */ new Set([
2120
+ ) }), ar = /* @__PURE__ */ new Set([
2120
2121
  Ue.Thinking,
2121
2122
  Ue.Generating,
2122
2123
  Ue.ExternalSources
2123
- ]), ar = ({ threadList: e }) => {
2124
- var b, _;
2125
- const { channel: t, channelConfig: s, thread: a } = oe(), { client: r } = ce(), { typing: i = {} } = os(), { aiState: l } = cs(t), o = Ce(fn);
2126
- if (!e && o && sr.has(l)) {
2127
- const v = rr(t, (b = r.user) == null ? void 0 : b.id);
2124
+ ]), rr = ({ threadList: e }) => {
2125
+ var v, _;
2126
+ const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = de(), { typing: i = {} } = os(), { aiState: l } = cs(t), o = ke(fn);
2127
+ if (!e && o && ar.has(l)) {
2128
+ const b = ir(t, (v = r.user) == null ? void 0 : v.id);
2128
2129
  return /* @__PURE__ */ n(
2129
2130
  qt,
2130
2131
  {
2131
- avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
2132
- avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
2133
- avatarImage: v == null ? void 0 : v.image,
2132
+ avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
2133
+ avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
2134
+ avatarImage: b == null ? void 0 : b.image,
2134
2135
  testId: "typing-indicator-ai"
2135
2136
  }
2136
2137
  );
@@ -2138,25 +2139,25 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2138
2139
  if ((s == null ? void 0 : s.typing_events) === !1)
2139
2140
  return null;
2140
2141
  const u = e ? [] : Object.values(i).filter(
2141
- ({ parent_id: v, user: f }) => {
2142
- var N;
2143
- return (f == null ? void 0 : f.id) !== ((N = r.user) == null ? void 0 : N.id) && !v;
2142
+ ({ parent_id: b, user: p }) => {
2143
+ var x;
2144
+ return (p == null ? void 0 : p.id) !== ((x = r.user) == null ? void 0 : x.id) && !b;
2144
2145
  }
2145
- ), p = e ? Object.values(i).filter(
2146
- ({ parent_id: v, user: f }) => {
2147
- var N;
2148
- return (f == null ? void 0 : f.id) !== ((N = r.user) == null ? void 0 : N.id) && v === (a == null ? void 0 : a.id);
2146
+ ), g = e ? Object.values(i).filter(
2147
+ ({ parent_id: b, user: p }) => {
2148
+ var x;
2149
+ return (p == null ? void 0 : p.id) !== ((x = r.user) == null ? void 0 : x.id) && b === (a == null ? void 0 : a.id);
2149
2150
  }
2150
- ) : [], h = e ? p : u;
2151
+ ) : [], h = e ? g : u;
2151
2152
  if (!h.length)
2152
2153
  return null;
2153
- const g = (_ = h[0]) == null ? void 0 : _.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
2154
+ const f = (_ = h[0]) == null ? void 0 : _.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
2154
2155
  return /* @__PURE__ */ n(
2155
2156
  qt,
2156
2157
  {
2157
- avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
2158
- avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
2159
- avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
2158
+ avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
2159
+ avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
2160
+ avatarImage: (f == null ? void 0 : f.image) ?? (c == null ? void 0 : c.image),
2160
2161
  testId: "typing-indicator"
2161
2162
  }
2162
2163
  );
@@ -2204,7 +2205,7 @@ const Aa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2204
2205
  ] })
2205
2206
  }
2206
2207
  );
2207
- function rr(e, t) {
2208
+ function ir(e, t) {
2208
2209
  var a;
2209
2210
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2210
2211
  for (const r of Object.values(s)) {
@@ -2213,7 +2214,7 @@ function rr(e, t) {
2213
2214
  return i;
2214
2215
  }
2215
2216
  }
2216
- const ir = () => null, lr = ({ className: e, message: t }) => /* @__PURE__ */ m(
2217
+ const lr = () => null, or = ({ className: e, message: t }) => /* @__PURE__ */ m(
2217
2218
  "div",
2218
2219
  {
2219
2220
  className: k("flex items-center justify-center h-full", e),
@@ -2257,11 +2258,11 @@ const ir = () => null, lr = ({ className: e, message: t }) => /* @__PURE__ */ m(
2257
2258
  ]
2258
2259
  }
2259
2260
  ), Le = j.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
2260
- /* @__PURE__ */ n(lr, { className: "w-6 h-6" }),
2261
+ /* @__PURE__ */ n(or, { className: "w-6 h-6" }),
2261
2262
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2262
2263
  ] }) }));
2263
2264
  Le.displayName = "LoadingState";
2264
- const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Re = "Replies instantly with AI assistant", or = ({
2265
+ const ue = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Re = "Replies instantly with AI assistant", cr = ({
2265
2266
  onBack: e,
2266
2267
  showBackButton: t,
2267
2268
  showStarButton: s = !1,
@@ -2272,34 +2273,34 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2272
2273
  showBlockParticipant: o = !0,
2273
2274
  showReportParticipant: d = !0,
2274
2275
  onDeleteConversationClick: u,
2275
- onBlockParticipantClick: p,
2276
+ onBlockParticipantClick: g,
2276
2277
  onReportParticipantClick: h,
2277
- customChannelActions: g,
2278
+ customChannelActions: f,
2278
2279
  renderChannelActions: c,
2279
- showChannelInfo: b = !0,
2280
+ showChannelInfo: v = !0,
2280
2281
  onParticipantNameClick: _,
2281
- renderHeaderTitleBadges: v
2282
+ renderHeaderTitleBadges: b
2282
2283
  }) => {
2283
- var A, C, E, T, P, F;
2284
- const { channel: f } = oe(), { client: N } = ce(), x = j.useMemo(
2284
+ var A, I, C, S, O, F;
2285
+ const { channel: p } = ce(), { client: x } = de(), N = j.useMemo(
2285
2286
  () => {
2286
2287
  var B;
2287
2288
  return Oe(
2288
- (B = f.state) == null ? void 0 : B.members,
2289
- N == null ? void 0 : N.userID,
2290
- f.type
2289
+ (B = p.state) == null ? void 0 : B.members,
2290
+ x == null ? void 0 : x.userID,
2291
+ p.type
2291
2292
  );
2292
2293
  },
2293
- [(A = f.state) == null ? void 0 : A.members, N == null ? void 0 : N.userID, f.type]
2294
- ), I = st(x == null ? void 0 : x.user), R = (C = x == null ? void 0 : x.user) == null ? void 0 : C.image, S = nt(f), L = v == null ? void 0 : v({
2295
- channel: f,
2296
- participant: x
2297
- }), D = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", $ = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(se, { children: [
2298
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: I }),
2294
+ [(A = p.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, p.type]
2295
+ ), E = st(N == null ? void 0 : N.user), T = (I = N == null ? void 0 : N.user) == null ? void 0 : I.image, M = nt(p), L = b == null ? void 0 : b({
2296
+ channel: p,
2297
+ participant: N
2298
+ }), D = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", P = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(se, { children: [
2299
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: E }),
2299
2300
  L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
2300
2301
  ] }), y = async () => {
2301
2302
  try {
2302
- S ? await f.unpin() : await f.pin();
2303
+ M ? await p.unpin() : await p.pin();
2303
2304
  } catch (B) {
2304
2305
  console.error(
2305
2306
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -2313,7 +2314,7 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2313
2314
  "button",
2314
2315
  {
2315
2316
  className: k(
2316
- de,
2317
+ ue,
2317
2318
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2318
2319
  ),
2319
2320
  onClick: e || (() => {
@@ -2333,7 +2334,7 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2333
2334
  {
2334
2335
  type: "button",
2335
2336
  onClick: _,
2336
- "aria-label": `View details for ${I}`,
2337
+ "aria-label": `View details for ${E}`,
2337
2338
  className: k(
2338
2339
  D,
2339
2340
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
@@ -2342,20 +2343,20 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2342
2343
  /* @__PURE__ */ n(
2343
2344
  ne,
2344
2345
  {
2345
- id: ((E = x == null ? void 0 : x.user) == null ? void 0 : E.id) || f.id || "unknown",
2346
- name: I,
2347
- image: R,
2348
- starred: s && S,
2346
+ id: ((C = N == null ? void 0 : N.user) == null ? void 0 : C.id) || p.id || "unknown",
2347
+ name: E,
2348
+ image: T,
2349
+ starred: s && M,
2349
2350
  dmAgentEnabled: a,
2350
2351
  size: 48
2351
2352
  }
2352
2353
  ),
2353
2354
  /* @__PURE__ */ m("span", { className: "flex max-w-full items-center gap-0.5", children: [
2354
2355
  z,
2355
- /* @__PURE__ */ n(ue, { className: "size-3 shrink-0", weight: "bold" })
2356
+ /* @__PURE__ */ n(me, { className: "size-3 shrink-0", weight: "bold" })
2356
2357
  ] }),
2357
2358
  a && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2358
- /* @__PURE__ */ n(xe, { className: "size-3 shrink-0 text-black/55" }),
2359
+ /* @__PURE__ */ n(he, { className: "size-3 shrink-0 text-black/55" }),
2359
2360
  /* @__PURE__ */ n("span", { children: Re })
2360
2361
  ] })
2361
2362
  ]
@@ -2364,10 +2365,10 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2364
2365
  /* @__PURE__ */ n(
2365
2366
  ne,
2366
2367
  {
2367
- id: ((T = x == null ? void 0 : x.user) == null ? void 0 : T.id) || f.id || "unknown",
2368
- name: I,
2369
- image: R,
2370
- starred: s && S,
2368
+ id: ((S = N == null ? void 0 : N.user) == null ? void 0 : S.id) || p.id || "unknown",
2369
+ name: E,
2370
+ image: T,
2371
+ starred: s && M,
2371
2372
  dmAgentEnabled: a,
2372
2373
  size: 48
2373
2374
  }
@@ -2375,7 +2376,7 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2375
2376
  /* @__PURE__ */ m("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
2376
2377
  z,
2377
2378
  /* @__PURE__ */ n(
2378
- ue,
2379
+ me,
2379
2380
  {
2380
2381
  className: "invisible size-3 shrink-0",
2381
2382
  weight: "bold"
@@ -2383,7 +2384,7 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2383
2384
  )
2384
2385
  ] }),
2385
2386
  a && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2386
- /* @__PURE__ */ n(xe, { className: "size-3 shrink-0 text-black/55" }),
2387
+ /* @__PURE__ */ n(he, { className: "size-3 shrink-0 text-black/55" }),
2387
2388
  /* @__PURE__ */ n("span", { children: Re })
2388
2389
  ] })
2389
2390
  ] })
@@ -2393,37 +2394,37 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2393
2394
  s && /* @__PURE__ */ n(
2394
2395
  "button",
2395
2396
  {
2396
- className: de,
2397
+ className: ue,
2397
2398
  onClick: y,
2398
2399
  type: "button",
2399
- "aria-label": S ? "Unstar conversation" : "Star conversation",
2400
+ "aria-label": M ? "Unstar conversation" : "Star conversation",
2400
2401
  children: /* @__PURE__ */ n(
2401
2402
  ye,
2402
2403
  {
2403
2404
  className: k("size-5", {
2404
- "text-yellow-600": S,
2405
- "text-black/90": !S
2405
+ "text-yellow-600": M,
2406
+ "text-black/90": !M
2406
2407
  }),
2407
- weight: S ? "duotone" : "regular"
2408
+ weight: M ? "duotone" : "regular"
2408
2409
  }
2409
2410
  )
2410
2411
  }
2411
2412
  ),
2412
- b && (c !== void 0 ? c : /* @__PURE__ */ n(
2413
+ v && (c !== void 0 ? c : /* @__PURE__ */ n(
2413
2414
  Ke,
2414
2415
  {
2415
- channel: f,
2416
- participant: x,
2416
+ channel: p,
2417
+ participant: N,
2417
2418
  showDeleteConversation: l,
2418
2419
  showBlockParticipant: o,
2419
2420
  showReportParticipant: d,
2420
2421
  onLeaveConversation: r,
2421
2422
  onBlockParticipant: i,
2422
2423
  onDeleteConversationClick: u,
2423
- onBlockParticipantClick: p,
2424
+ onBlockParticipantClick: g,
2424
2425
  onReportParticipantClick: h,
2425
- customChannelActions: g,
2426
- triggerClassName: k(de, "bg-[#F1F0EE]")
2426
+ customChannelActions: f,
2427
+ triggerClassName: k(ue, "bg-[#F1F0EE]")
2427
2428
  }
2428
2429
  ))
2429
2430
  ] })
@@ -2434,7 +2435,7 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2434
2435
  "button",
2435
2436
  {
2436
2437
  className: k(
2437
- de,
2438
+ ue,
2438
2439
  "messaging-channel-view-back-button-desktop"
2439
2440
  ),
2440
2441
  type: "button",
@@ -2448,19 +2449,19 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2448
2449
  {
2449
2450
  type: "button",
2450
2451
  onClick: _,
2451
- "aria-label": `View details for ${I}`,
2452
+ "aria-label": `View details for ${E}`,
2452
2453
  className: k(
2453
- $,
2454
+ P,
2454
2455
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2455
2456
  ),
2456
2457
  children: [
2457
2458
  /* @__PURE__ */ n(
2458
2459
  ne,
2459
2460
  {
2460
- id: ((P = x == null ? void 0 : x.user) == null ? void 0 : P.id) || f.id || "unknown",
2461
- name: I,
2462
- image: R,
2463
- starred: s && S,
2461
+ id: ((O = N == null ? void 0 : N.user) == null ? void 0 : O.id) || p.id || "unknown",
2462
+ name: E,
2463
+ image: T,
2464
+ starred: s && M,
2464
2465
  dmAgentEnabled: a,
2465
2466
  size: 48
2466
2467
  }
@@ -2468,23 +2469,23 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2468
2469
  /* @__PURE__ */ m("div", { className: "min-w-0", children: [
2469
2470
  /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2470
2471
  z,
2471
- /* @__PURE__ */ n(ue, { className: "size-4 shrink-0", weight: "bold" })
2472
+ /* @__PURE__ */ n(me, { className: "size-4 shrink-0", weight: "bold" })
2472
2473
  ] }),
2473
2474
  a && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2474
- /* @__PURE__ */ n(xe, { className: "size-3 shrink-0 text-black/55" }),
2475
+ /* @__PURE__ */ n(he, { className: "size-3 shrink-0 text-black/55" }),
2475
2476
  /* @__PURE__ */ n("span", { className: "truncate", children: Re })
2476
2477
  ] })
2477
2478
  ] })
2478
2479
  ]
2479
2480
  }
2480
- ) : /* @__PURE__ */ m("div", { className: $, children: [
2481
+ ) : /* @__PURE__ */ m("div", { className: P, children: [
2481
2482
  /* @__PURE__ */ n(
2482
2483
  ne,
2483
2484
  {
2484
- id: ((F = x == null ? void 0 : x.user) == null ? void 0 : F.id) || f.id || "unknown",
2485
- name: I,
2486
- image: R,
2487
- starred: s && S,
2485
+ id: ((F = N == null ? void 0 : N.user) == null ? void 0 : F.id) || p.id || "unknown",
2486
+ name: E,
2487
+ image: T,
2488
+ starred: s && M,
2488
2489
  dmAgentEnabled: a,
2489
2490
  size: 48
2490
2491
  }
@@ -2493,7 +2494,7 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2493
2494
  /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2494
2495
  z,
2495
2496
  /* @__PURE__ */ n(
2496
- ue,
2497
+ me,
2497
2498
  {
2498
2499
  className: "invisible size-4 shrink-0",
2499
2500
  weight: "bold"
@@ -2501,7 +2502,7 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2501
2502
  )
2502
2503
  ] }),
2503
2504
  a && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2504
- /* @__PURE__ */ n(xe, { className: "size-3 shrink-0 text-black/55" }),
2505
+ /* @__PURE__ */ n(he, { className: "size-3 shrink-0 text-black/55" }),
2505
2506
  /* @__PURE__ */ n("span", { className: "truncate", children: Re })
2506
2507
  ] })
2507
2508
  ] })
@@ -2511,43 +2512,43 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2511
2512
  s && /* @__PURE__ */ n(
2512
2513
  "button",
2513
2514
  {
2514
- className: de,
2515
+ className: ue,
2515
2516
  onClick: y,
2516
2517
  type: "button",
2517
- "aria-label": S ? "Unstar conversation" : "Star conversation",
2518
+ "aria-label": M ? "Unstar conversation" : "Star conversation",
2518
2519
  children: /* @__PURE__ */ n(
2519
2520
  ye,
2520
2521
  {
2521
2522
  className: k("size-6", {
2522
- "text-yellow-600": S,
2523
- "text-black/90": !S
2523
+ "text-yellow-600": M,
2524
+ "text-black/90": !M
2524
2525
  }),
2525
- weight: S ? "duotone" : "regular"
2526
+ weight: M ? "duotone" : "regular"
2526
2527
  }
2527
2528
  )
2528
2529
  }
2529
2530
  ),
2530
- b && (c !== void 0 ? c : /* @__PURE__ */ n(
2531
+ v && (c !== void 0 ? c : /* @__PURE__ */ n(
2531
2532
  Ke,
2532
2533
  {
2533
- channel: f,
2534
- participant: x,
2534
+ channel: p,
2535
+ participant: N,
2535
2536
  showDeleteConversation: l,
2536
2537
  showBlockParticipant: o,
2537
2538
  showReportParticipant: d,
2538
2539
  onLeaveConversation: r,
2539
2540
  onBlockParticipant: i,
2540
2541
  onDeleteConversationClick: u,
2541
- onBlockParticipantClick: p,
2542
+ onBlockParticipantClick: g,
2542
2543
  onReportParticipantClick: h,
2543
- customChannelActions: g,
2544
- triggerClassName: de
2544
+ customChannelActions: f,
2545
+ triggerClassName: ue
2545
2546
  }
2546
2547
  ))
2547
2548
  ] })
2548
2549
  ] })
2549
2550
  ] });
2550
- }, cr = ({
2551
+ }, dr = ({
2551
2552
  onBack: e,
2552
2553
  showBackButton: t,
2553
2554
  renderMessageInputActions: s,
@@ -2558,86 +2559,112 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2558
2559
  showDeleteConversation: o = !0,
2559
2560
  onDeleteConversationClick: d,
2560
2561
  onBlockParticipantClick: u,
2561
- onReportParticipantClick: p,
2562
+ onReportParticipantClick: g,
2562
2563
  showBlockParticipant: h = !0,
2563
- showReportParticipant: g = !0,
2564
+ showReportParticipant: f = !0,
2564
2565
  composerDisabled: c = !1,
2565
- composerDisabledReason: b,
2566
+ composerDisabledReason: v,
2566
2567
  showStarButton: _ = !1,
2567
- chatbotVotingEnabled: v = !1,
2568
- renderChannelBanner: f,
2569
- renderHeaderTitleBadges: N,
2570
- customChannelActions: x,
2571
- renderChannelActions: I,
2572
- renderMessage: R,
2573
- dmAgentEnabled: S = !1,
2568
+ chatbotVotingEnabled: b = !1,
2569
+ renderChannelBanner: p,
2570
+ renderHeaderTitleBadges: x,
2571
+ customChannelActions: N,
2572
+ renderChannelActions: E,
2573
+ renderMessage: T,
2574
+ dmAgentEnabled: M = !1,
2574
2575
  viewerLanguage: L,
2575
2576
  showChannelInfo: D = !0,
2576
- onParticipantNameClick: $,
2577
+ onParticipantNameClick: P,
2577
2578
  composerInput: z
2578
2579
  }) => {
2579
- var X, Z, Y, w;
2580
- const { channel: y } = oe(), { client: A } = ce(), C = j.useMemo(
2580
+ var w, R, G, H;
2581
+ const { channel: y } = ce(), { client: A } = de(), I = j.useMemo(
2581
2582
  () => {
2582
- var M;
2583
+ var W;
2583
2584
  return Oe(
2584
- (M = y.state) == null ? void 0 : M.members,
2585
+ (W = y.state) == null ? void 0 : W.members,
2585
2586
  A == null ? void 0 : A.userID,
2586
2587
  y.type
2587
2588
  );
2588
2589
  },
2589
- [(X = y.state) == null ? void 0 : X.members, A == null ? void 0 : A.userID, y.type]
2590
- ), E = j.useMemo(() => {
2591
- var V;
2592
- const M = A == null ? void 0 : A.userID;
2593
- return M ? Object.values(((V = y.state) == null ? void 0 : V.members) || {}).find((Q) => {
2594
- var U;
2595
- return ((U = Q.user) == null ? void 0 : U.id) === M;
2590
+ [(w = y.state) == null ? void 0 : w.members, A == null ? void 0 : A.userID, y.type]
2591
+ ), C = j.useMemo(() => {
2592
+ var Y;
2593
+ const W = A == null ? void 0 : A.userID;
2594
+ return W ? Object.values(((Y = y.state) == null ? void 0 : Y.members) || {}).find((Z) => {
2595
+ var re;
2596
+ return ((re = Z.user) == null ? void 0 : re.id) === W;
2596
2597
  }) : void 0;
2597
- }, [A == null ? void 0 : A.userID, (Z = y.state) == null ? void 0 : Z.members]), T = ((Y = E == null ? void 0 : E.user) == null ? void 0 : Y.is_account) ?? (E == null ? void 0 : E.is_account), P = ((w = C == null ? void 0 : C.user) == null ? void 0 : w.is_account) ?? (C == null ? void 0 : C.is_account), F = S && T === !1 && P === !0, B = W(
2598
- (M) => {
2599
- const { message: G } = ke("ChannelView"), V = /* @__PURE__ */ n(
2600
- Oa,
2598
+ }, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), S = ((G = C == null ? void 0 : C.user) == null ? void 0 : G.is_account) ?? (C == null ? void 0 : C.is_account), O = ((H = I == null ? void 0 : I.user) == null ? void 0 : H.is_account) ?? (I == null ? void 0 : I.is_account), F = M && S === !1 && O === !0, B = y.state.messages.length > 0, J = p ? /* @__PURE__ */ n(j.Fragment, { children: p() }, "lt-channel-banner") : null, ee = P ? /* @__PURE__ */ n(
2599
+ ea,
2600
+ {
2601
+ onBack: e,
2602
+ showBackButton: t,
2603
+ showChannelInfo: D,
2604
+ showStarButton: _,
2605
+ dmAgentEnabled: F,
2606
+ onLeaveConversation: i,
2607
+ onBlockParticipant: l,
2608
+ showDeleteConversation: o,
2609
+ showBlockParticipant: h,
2610
+ showReportParticipant: f,
2611
+ onDeleteConversationClick: d,
2612
+ onBlockParticipantClick: u,
2613
+ onReportParticipantClick: g,
2614
+ customChannelActions: N,
2615
+ renderChannelActions: E,
2616
+ onParticipantNameClick: P
2617
+ }
2618
+ ) : null, q = K(
2619
+ (W) => {
2620
+ const { message: U } = Ce("ChannelView"), Y = /* @__PURE__ */ n(
2621
+ $a,
2601
2622
  {
2602
- ...M,
2603
- chatbotVotingEnabled: v,
2623
+ ...W,
2624
+ chatbotVotingEnabled: b,
2604
2625
  viewerLanguage: L
2605
2626
  }
2606
2627
  );
2607
- return !R || !G ? V : R(V, G);
2628
+ return !T || !U ? Y : T(Y, U);
2608
2629
  },
2609
- [v, R, L]
2630
+ [b, T, L]
2610
2631
  );
2611
2632
  return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
2612
2633
  us,
2613
2634
  {
2614
2635
  overrides: {
2615
- Message: B,
2616
- MessageActions: Ba
2636
+ Message: q,
2637
+ MessageActions: Ua
2617
2638
  },
2618
2639
  children: /* @__PURE__ */ m(ms, { children: [
2619
- !$ && /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2620
- or,
2621
- {
2622
- onBack: e,
2623
- showBackButton: t,
2624
- showChannelInfo: D,
2625
- showStarButton: _,
2626
- dmAgentEnabled: F,
2627
- onLeaveConversation: i,
2628
- onBlockParticipant: l,
2629
- showDeleteConversation: o,
2630
- showBlockParticipant: h,
2631
- showReportParticipant: g,
2632
- onDeleteConversationClick: d,
2633
- onBlockParticipantClick: u,
2634
- onReportParticipantClick: p,
2635
- customChannelActions: x,
2636
- renderChannelActions: I,
2637
- renderHeaderTitleBadges: N
2638
- }
2639
- ) }, "lt-channel-header"),
2640
- f ? /* @__PURE__ */ n(j.Fragment, { children: f() }, "lt-channel-banner") : null,
2640
+ !P && /* @__PURE__ */ m(se, { children: [
2641
+ /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2642
+ cr,
2643
+ {
2644
+ onBack: e,
2645
+ showBackButton: t,
2646
+ showChannelInfo: D,
2647
+ showStarButton: _,
2648
+ dmAgentEnabled: F,
2649
+ onLeaveConversation: i,
2650
+ onBlockParticipant: l,
2651
+ showDeleteConversation: o,
2652
+ showBlockParticipant: h,
2653
+ showReportParticipant: f,
2654
+ onDeleteConversationClick: d,
2655
+ onBlockParticipantClick: u,
2656
+ onReportParticipantClick: g,
2657
+ customChannelActions: N,
2658
+ renderChannelActions: E,
2659
+ renderHeaderTitleBadges: x
2660
+ }
2661
+ ) }, "lt-channel-header"),
2662
+ J
2663
+ ] }),
2664
+ P && !B && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
2665
+ ee,
2666
+ J
2667
+ ] }),
2641
2668
  /* @__PURE__ */ n(
2642
2669
  "div",
2643
2670
  {
@@ -2645,28 +2672,10 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2645
2672
  children: /* @__PURE__ */ n(
2646
2673
  hs,
2647
2674
  {
2648
- head: $ ? /* @__PURE__ */ n(
2649
- Qs,
2650
- {
2651
- onBack: e,
2652
- showBackButton: t,
2653
- showChannelInfo: D,
2654
- showStarButton: _,
2655
- dmAgentEnabled: F,
2656
- onLeaveConversation: i,
2657
- onBlockParticipant: l,
2658
- showDeleteConversation: o,
2659
- showBlockParticipant: h,
2660
- showReportParticipant: g,
2661
- onDeleteConversationClick: d,
2662
- onBlockParticipantClick: u,
2663
- onReportParticipantClick: p,
2664
- customChannelActions: x,
2665
- renderChannelActions: I,
2666
- onParticipantNameClick: $,
2667
- renderHeaderTitleBadges: N
2668
- }
2669
- ) : void 0,
2675
+ head: P && B ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
2676
+ ee,
2677
+ J
2678
+ ] }) : void 0,
2670
2679
  hideDeletedMessages: !0,
2671
2680
  hideNewMessageSeparator: !1
2672
2681
  }
@@ -2676,14 +2685,14 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2676
2685
  ),
2677
2686
  r ? /* @__PURE__ */ n(j.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
2678
2687
  /* @__PURE__ */ n(
2679
- qa,
2688
+ Wa,
2680
2689
  {
2681
2690
  ...s && {
2682
2691
  renderActions: () => s == null ? void 0 : s(y)
2683
2692
  },
2684
2693
  renderFooter: () => a == null ? void 0 : a(y),
2685
2694
  disabled: c,
2686
- disabledReason: b,
2695
+ disabledReason: v,
2687
2696
  composerInput: z
2688
2697
  },
2689
2698
  "lt-channel-message-input"
@@ -2702,86 +2711,86 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2702
2711
  onLeaveConversation: l,
2703
2712
  onBlockParticipant: o,
2704
2713
  className: d,
2705
- CustomChannelEmptyState: u = ir,
2706
- showDeleteConversation: p = !0,
2714
+ CustomChannelEmptyState: u = lr,
2715
+ showDeleteConversation: g = !0,
2707
2716
  onDeleteConversationClick: h,
2708
- onBlockParticipantClick: g,
2717
+ onBlockParticipantClick: f,
2709
2718
  onReportParticipantClick: c,
2710
- showBlockParticipant: b = !0,
2719
+ showBlockParticipant: v = !0,
2711
2720
  showReportParticipant: _ = !0,
2712
- composerDisabled: v = !1,
2713
- composerDisabledReason: f,
2714
- dmAgentEnabled: N,
2715
- messageMetadata: x,
2716
- onMessageSent: I,
2717
- showStarButton: R = !1,
2718
- chatbotVotingEnabled: S = !1,
2721
+ composerDisabled: b = !1,
2722
+ composerDisabledReason: p,
2723
+ dmAgentEnabled: x,
2724
+ messageMetadata: N,
2725
+ onMessageSent: E,
2726
+ showStarButton: T = !1,
2727
+ chatbotVotingEnabled: M = !1,
2719
2728
  renderChannelBanner: L,
2720
2729
  renderHeaderTitleBadges: D,
2721
- customChannelActions: $,
2730
+ customChannelActions: P,
2722
2731
  renderChannelActions: z,
2723
2732
  renderMessage: y,
2724
2733
  onMessageLinkClick: A,
2725
- sendButton: C,
2726
- attachmentPreviewList: E,
2727
- viewerLanguage: T,
2728
- showChannelInfo: P = !0,
2734
+ sendButton: I,
2735
+ attachmentPreviewList: C,
2736
+ viewerLanguage: S,
2737
+ showChannelInfo: O = !0,
2729
2738
  onParticipantNameClick: F,
2730
2739
  composerInput: B
2731
2740
  }) => {
2732
- const X = W(
2733
- async (Y, w, M) => {
2734
- var ee;
2735
- const G = ((ee = e.data) == null ? void 0 : ee.chatbot_paused) === !0, V = N && !G, Q = {
2741
+ const J = K(
2742
+ async (q, w, R) => {
2743
+ var Z;
2744
+ const G = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, H = x && !G, W = {
2736
2745
  ...w,
2737
- ...V && { silent: !0 },
2738
- ...x && {
2746
+ ...H && { silent: !0 },
2747
+ ...N && {
2739
2748
  metadata: {
2740
2749
  ...w.metadata ?? {},
2741
- ...x
2750
+ ...N
2742
2751
  }
2743
2752
  }
2744
2753
  }, U = {
2745
- ...M,
2746
- ...V && { skip_push: !0 }
2747
- }, K = await e.sendMessage(Q, U);
2748
- return I == null || I(K), K;
2754
+ ...R,
2755
+ ...H && { skip_push: !0 }
2756
+ }, Y = await e.sendMessage(W, U);
2757
+ return E == null || E(Y), Y;
2749
2758
  },
2750
- [e, N, x, I]
2751
- ), Z = H(null);
2752
- return q(() => {
2759
+ [e, x, N, E]
2760
+ ), ee = V(null);
2761
+ return X(() => {
2753
2762
  if (!A) return;
2754
- const Y = Z.current;
2755
- if (!Y) return;
2756
- const w = (M) => {
2757
- const G = M.target, V = G == null ? void 0 : G.closest("a[href]"), Q = V == null ? void 0 : V.getAttribute("href");
2758
- if (!Q) return;
2759
- const U = V == null ? void 0 : V.closest("[data-message-id]"), K = U == null ? void 0 : U.getAttribute("data-message-id"), ee = K ? e.state.messages.find((he) => he.id === K) : void 0;
2760
- A(Q, ee);
2763
+ const q = ee.current;
2764
+ if (!q) return;
2765
+ const w = (R) => {
2766
+ const G = R.target, H = G == null ? void 0 : G.closest("a[href]"), W = H == null ? void 0 : H.getAttribute("href");
2767
+ if (!W) return;
2768
+ const U = H == null ? void 0 : H.closest("[data-message-id]"), Y = U == null ? void 0 : U.getAttribute("data-message-id"), Z = Y ? e.state.messages.find((re) => re.id === Y) : void 0;
2769
+ A(W, Z);
2761
2770
  };
2762
- return Y.addEventListener("click", w), () => Y.removeEventListener("click", w);
2771
+ return q.addEventListener("click", w), () => q.removeEventListener("click", w);
2763
2772
  }, [A, e]), /* @__PURE__ */ n(
2764
2773
  "div",
2765
2774
  {
2766
- ref: Z,
2775
+ ref: ee,
2767
2776
  className: k(
2768
2777
  "messaging-channel-view h-full flex flex-col",
2769
2778
  d
2770
2779
  ),
2771
- children: /* @__PURE__ */ n(fn.Provider, { value: N ?? !1, children: /* @__PURE__ */ n(
2780
+ children: /* @__PURE__ */ n(fn.Provider, { value: x ?? !1, children: /* @__PURE__ */ n(
2772
2781
  ds,
2773
2782
  {
2774
2783
  channel: e,
2775
- MessageSystem: nr,
2784
+ MessageSystem: sr,
2776
2785
  EmptyStateIndicator: u,
2777
2786
  LoadingIndicator: Le,
2778
- DateSeparator: ea,
2779
- TypingIndicator: ar,
2780
- doSendMessageRequest: X,
2781
- ...C ? { SendButton: C } : {},
2782
- ...E ? { AttachmentPreviewList: E } : {},
2787
+ DateSeparator: ta,
2788
+ TypingIndicator: rr,
2789
+ doSendMessageRequest: J,
2790
+ ...I ? { SendButton: I } : {},
2791
+ ...C ? { AttachmentPreviewList: C } : {},
2783
2792
  children: /* @__PURE__ */ n(
2784
- cr,
2793
+ dr,
2785
2794
  {
2786
2795
  onBack: t,
2787
2796
  showBackButton: s,
@@ -2791,24 +2800,24 @@ const de = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2791
2800
  onLeaveConversation: l,
2792
2801
  onBlockParticipant: o,
2793
2802
  CustomChannelEmptyState: u,
2794
- showDeleteConversation: p,
2803
+ showDeleteConversation: g,
2795
2804
  onDeleteConversationClick: h,
2796
- onBlockParticipantClick: g,
2805
+ onBlockParticipantClick: f,
2797
2806
  onReportParticipantClick: c,
2798
- showBlockParticipant: b,
2807
+ showBlockParticipant: v,
2799
2808
  showReportParticipant: _,
2800
- composerDisabled: v,
2801
- composerDisabledReason: f,
2802
- showStarButton: R,
2803
- dmAgentEnabled: N,
2804
- chatbotVotingEnabled: S,
2809
+ composerDisabled: b,
2810
+ composerDisabledReason: p,
2811
+ showStarButton: T,
2812
+ dmAgentEnabled: x,
2813
+ chatbotVotingEnabled: M,
2805
2814
  renderChannelBanner: L,
2806
2815
  renderHeaderTitleBadges: D,
2807
- customChannelActions: $,
2816
+ customChannelActions: P,
2808
2817
  renderChannelActions: z,
2809
2818
  renderMessage: y,
2810
- viewerLanguage: T,
2811
- showChannelInfo: P,
2819
+ viewerLanguage: S,
2820
+ showChannelInfo: O,
2812
2821
  onParticipantNameClick: F,
2813
2822
  composerInput: B
2814
2823
  }
@@ -2835,7 +2844,7 @@ const we = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2835
2844
  )
2836
2845
  ] }) }));
2837
2846
  we.displayName = "ErrorState";
2838
- const Pi = ({
2847
+ const Oi = ({
2839
2848
  capabilities: e = {},
2840
2849
  renderMessageInputActions: t,
2841
2850
  renderConversationFooter: s,
@@ -2846,53 +2855,53 @@ const Pi = ({
2846
2855
  CustomChannelEmptyState: o,
2847
2856
  onBlockParticipantClick: d,
2848
2857
  onReportParticipantClick: u,
2849
- dmAgentEnabled: p,
2858
+ dmAgentEnabled: g,
2850
2859
  onMessageSent: h,
2851
- chatbotVotingEnabled: g = !1,
2860
+ chatbotVotingEnabled: f = !1,
2852
2861
  viewerLanguage: c,
2853
- renderHeaderTitleBadges: b,
2862
+ renderHeaderTitleBadges: v,
2854
2863
  renderChannelBanner: _,
2855
- customChannelActions: v,
2856
- renderChannelActions: f,
2857
- onParticipantNameClick: N,
2858
- renderMessage: x,
2859
- onMessageLinkClick: I,
2860
- showChannelInfo: R,
2861
- composerInput: S
2864
+ customChannelActions: b,
2865
+ renderChannelActions: p,
2866
+ onParticipantNameClick: x,
2867
+ renderMessage: N,
2868
+ onMessageLinkClick: E,
2869
+ showChannelInfo: T,
2870
+ composerInput: M
2862
2871
  }) => {
2863
2872
  const {
2864
2873
  client: L,
2865
2874
  isConnected: D,
2866
- isLoading: $,
2875
+ isLoading: P,
2867
2876
  error: z,
2868
2877
  refreshConnection: y,
2869
2878
  service: A,
2870
- debug: C
2871
- } = js(), [E, T] = O(null), [P, F] = O(null), [B, X] = O(!1), { showDeleteConversation: Z = !0 } = e, Y = H(l);
2872
- Y.current = l;
2873
- const w = H(a);
2879
+ debug: I
2880
+ } = js(), [C, S] = $(null), [O, F] = $(null), [B, J] = $(!1), { showDeleteConversation: ee = !0 } = e, q = V(l);
2881
+ q.current = l;
2882
+ const w = V(a);
2874
2883
  w.current = a;
2875
- const M = H(null), G = H(null);
2876
- q(() => {
2877
- G.current = E;
2878
- }, [E]), q(() => {
2884
+ const R = V(null), G = V(null);
2885
+ X(() => {
2886
+ G.current = C;
2887
+ }, [C]), X(() => {
2879
2888
  if (!L || !D) return;
2880
2889
  const U = L.userID;
2881
2890
  if (!U) return;
2882
- const K = `${U}::${i}`;
2883
- if (M.current === K) return;
2884
- M.current = K;
2885
- const ee = () => {
2886
- M.current === K && (M.current = null);
2891
+ const Y = `${U}::${i}`;
2892
+ if (R.current === Y) return;
2893
+ R.current = Y;
2894
+ const Z = () => {
2895
+ R.current === Y && (R.current = null);
2887
2896
  };
2888
2897
  (async () => {
2889
- var fe, ge;
2898
+ var ge, pe;
2890
2899
  try {
2891
- C && console.log(
2900
+ I && console.log(
2892
2901
  "[MessagingShell] Loading initial conversation with:",
2893
2902
  i
2894
2903
  );
2895
- const J = await L.queryChannels(
2904
+ const Q = await L.queryChannels(
2896
2905
  {
2897
2906
  type: "messaging",
2898
2907
  members: { $eq: [U, i] }
@@ -2900,87 +2909,87 @@ const Pi = ({
2900
2909
  {},
2901
2910
  { limit: 1 }
2902
2911
  );
2903
- if (J.length > 0) {
2904
- T(J[0]), F(null), (fe = w.current) == null || fe.call(w, J[0]), C && console.log(
2912
+ if (Q.length > 0) {
2913
+ S(Q[0]), F(null), (ge = w.current) == null || ge.call(w, Q[0]), I && console.log(
2905
2914
  "[MessagingShell] Initial conversation loaded:",
2906
- J[0].id
2915
+ Q[0].id
2907
2916
  );
2908
2917
  return;
2909
2918
  }
2910
- const te = Y.current;
2919
+ const te = q.current;
2911
2920
  if (!te || !A) {
2912
- ee(), F("No conversation found with this account"), C && console.log(
2921
+ Z(), F("No conversation found with this account"), I && console.log(
2913
2922
  "[MessagingShell] No conversation found for:",
2914
2923
  i
2915
2924
  );
2916
2925
  return;
2917
2926
  }
2918
2927
  try {
2919
- const le = await A.startChannelWithParticipant({
2928
+ const oe = await A.startChannelWithParticipant({
2920
2929
  id: te.id,
2921
2930
  name: te.name,
2922
2931
  phone: te.phone
2923
2932
  });
2924
- T(le), F(null), (ge = w.current) == null || ge.call(w, le), C && console.log(
2933
+ S(oe), F(null), (pe = w.current) == null || pe.call(w, oe), I && console.log(
2925
2934
  "[MessagingShell] Channel created and loaded:",
2926
- le.id
2935
+ oe.id
2927
2936
  );
2928
- } catch (le) {
2937
+ } catch (oe) {
2929
2938
  console.error(
2930
2939
  "[MessagingShell] Failed to create conversation:",
2931
- le
2932
- ), ee(), F("Failed to create conversation");
2940
+ oe
2941
+ ), Z(), F("Failed to create conversation");
2933
2942
  }
2934
- } catch (J) {
2943
+ } catch (Q) {
2935
2944
  console.error(
2936
2945
  "[MessagingShell] Failed to load initial conversation:",
2937
- J
2938
- ), ee(), G.current || F("Failed to load conversation");
2946
+ Q
2947
+ ), Z(), G.current || F("Failed to load conversation");
2939
2948
  }
2940
2949
  })();
2941
- }, [i, L, D, A, C]);
2942
- const V = H(r);
2943
- V.current = r;
2944
- const Q = W(() => {
2950
+ }, [i, L, D, A, I]);
2951
+ const H = V(r);
2952
+ H.current = r;
2953
+ const W = K(() => {
2945
2954
  var U;
2946
- T(null), X(!0), (U = V.current) == null || U.call(V);
2955
+ S(null), J(!0), (U = H.current) == null || U.call(H);
2947
2956
  }, []);
2948
- return $ ? /* @__PURE__ */ n(Le, {}) : z ? /* @__PURE__ */ n(we, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ n(
2957
+ return P ? /* @__PURE__ */ n(Le, {}) : z ? /* @__PURE__ */ n(we, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ n(
2949
2958
  we,
2950
2959
  {
2951
2960
  message: "Not connected to messaging service",
2952
2961
  onBack: y
2953
2962
  }
2954
- ) : P ? /* @__PURE__ */ n(we, { message: P }) : B && !E ? /* @__PURE__ */ n(we, { message: "Conversation ended" }) : E ? /* @__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(
2963
+ ) : O ? /* @__PURE__ */ n(we, { message: O }) : B && !C ? /* @__PURE__ */ n(we, { 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(
2955
2964
  gn,
2956
2965
  {
2957
- channel: E,
2966
+ channel: C,
2958
2967
  renderMessageInputActions: t,
2959
2968
  renderConversationFooter: s,
2960
2969
  renderChannelBanner: _,
2961
- onLeaveConversation: Q,
2962
- onBlockParticipant: Q,
2970
+ onLeaveConversation: W,
2971
+ onBlockParticipant: W,
2963
2972
  CustomChannelEmptyState: o,
2964
- showDeleteConversation: Z,
2973
+ showDeleteConversation: ee,
2965
2974
  onBlockParticipantClick: d,
2966
2975
  onReportParticipantClick: u,
2967
- dmAgentEnabled: p,
2976
+ dmAgentEnabled: g,
2968
2977
  onMessageSent: h,
2969
- chatbotVotingEnabled: g,
2978
+ chatbotVotingEnabled: f,
2970
2979
  viewerLanguage: c,
2971
- renderHeaderTitleBadges: b,
2972
- customChannelActions: v,
2973
- renderChannelActions: f,
2974
- onParticipantNameClick: N,
2975
- renderMessage: x,
2976
- onMessageLinkClick: I,
2977
- showChannelInfo: R,
2978
- composerInput: S
2980
+ renderHeaderTitleBadges: v,
2981
+ customChannelActions: b,
2982
+ renderChannelActions: p,
2983
+ onParticipantNameClick: x,
2984
+ renderMessage: N,
2985
+ onMessageLinkClick: E,
2986
+ showChannelInfo: T,
2987
+ composerInput: M
2979
2988
  },
2980
- E.id
2989
+ C.id
2981
2990
  ) }) }) : /* @__PURE__ */ n(Le, {});
2982
2991
  };
2983
- function dr(e) {
2992
+ function ur(e) {
2984
2993
  const t = e.state.pending_messages;
2985
2994
  if (t != null && t.length)
2986
2995
  for (const s of t)
@@ -2994,18 +3003,18 @@ const pn = j.createContext({
2994
3003
  renderMessagePreview: void 0,
2995
3004
  channelPreview: void 0,
2996
3005
  viewerLanguage: void 0
2997
- }), ur = pn.Provider, mr = () => j.useContext(pn), hr = (e, t) => {
3006
+ }), mr = pn.Provider, hr = () => j.useContext(pn), fr = (e, t) => {
2998
3007
  const s = new Date(
2999
3008
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
3000
3009
  ), r = new Date(
3001
3010
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
3002
3011
  ).getTime() - s.getTime();
3003
3012
  return Math.floor(r / (1e3 * 60 * 60 * 24));
3004
- }, fr = (e) => {
3013
+ }, gr = (e) => {
3005
3014
  const t = /* @__PURE__ */ new Date();
3006
3015
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
3007
3016
  return "Just now";
3008
- const a = hr(e, t);
3017
+ const a = fr(e, t);
3009
3018
  return a === 0 ? e.toLocaleTimeString([], {
3010
3019
  hour: "numeric",
3011
3020
  minute: "2-digit",
@@ -3017,7 +3026,7 @@ const pn = j.createContext({
3017
3026
  });
3018
3027
  }, bn = j.memo(
3019
3028
  (e) => {
3020
- var D, $, z;
3029
+ var D, P, z;
3021
3030
  const { channel: t, unread: s } = e, {
3022
3031
  selectedChannel: a,
3023
3032
  onChannelSelect: r,
@@ -3025,66 +3034,66 @@ const pn = j.createContext({
3025
3034
  channelPreview: l,
3026
3035
  renderMessagePreview: o,
3027
3036
  viewerLanguage: d
3028
- } = mr(), { client: u } = ce(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = nt(t);
3037
+ } = hr(), { client: u } = de(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = nt(t);
3029
3038
  if (l)
3030
3039
  return /* @__PURE__ */ n(
3031
3040
  l,
3032
3041
  {
3033
3042
  ...e,
3034
- active: p,
3043
+ active: g,
3035
3044
  selectedChannel: a,
3036
3045
  onChannelSelect: r,
3037
3046
  viewerLanguage: d
3038
3047
  }
3039
3048
  );
3040
- const g = () => {
3049
+ const f = () => {
3041
3050
  t && r(t);
3042
3051
  }, c = (y) => {
3043
- const A = y.key === "Enter" || y.key === " ", C = y.repeat;
3044
- !A || C || (y.preventDefault(), g());
3045
- }, b = Oe(
3052
+ const A = y.key === "Enter" || y.key === " ", I = y.repeat;
3053
+ !A || I || (y.preventDefault(), f());
3054
+ }, v = Oe(
3046
3055
  (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
3047
3056
  u == null ? void 0 : u.userID,
3048
3057
  t == null ? void 0 : t.type
3049
- ), _ = st(b == null ? void 0 : b.user), v = ($ = b == null ? void 0 : b.user) == null ? void 0 : $.image, f = (() => {
3058
+ ), _ = st(v == null ? void 0 : v.user), b = (P = v == null ? void 0 : v.user) == null ? void 0 : P.image, p = (() => {
3050
3059
  var A;
3051
3060
  const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
3052
3061
  if (y != null && y.length) {
3053
- for (let C = y.length - 1; C >= 0; C--)
3054
- if (y[C].type !== "system") return y[C];
3062
+ for (let I = y.length - 1; I >= 0; I--)
3063
+ if (y[I].type !== "system") return y[I];
3055
3064
  }
3056
- })(), x = (() => {
3057
- var P, F, B, X;
3065
+ })(), N = (() => {
3066
+ var O, F, B, J;
3058
3067
  const y = tn({
3059
- message: f,
3068
+ message: p,
3060
3069
  viewerLanguage: d
3061
3070
  });
3062
- if (((P = f == null ? void 0 : f.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
3063
- if (((F = f == null ? void 0 : f.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
3064
- if (((B = f == null ? void 0 : f.metadata) == null ? void 0 : B.custom_type) === "MESSAGE_ATTACHMENT")
3071
+ if (((O = p == null ? void 0 : p.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
3072
+ if (((F = p == null ? void 0 : p.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
3073
+ if (((B = p == null ? void 0 : p.metadata) == null ? void 0 : B.custom_type) === "MESSAGE_ATTACHMENT")
3065
3074
  return y ? `📎 ${y}` : "📎 Sent an attachment";
3066
3075
  if (y) return y;
3067
- const T = (X = f == null ? void 0 : f.attachments) == null ? void 0 : X[0];
3068
- return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
3069
- })(), I = f != null && f.created_at ? fr(new Date(f.created_at)) : "", R = f ? De(f) : !1, S = o ? o(f, x) : `${R ? "✨ " : ""}${x}`, L = s ?? 0;
3076
+ const S = (J = p == null ? void 0 : p.attachments) == null ? void 0 : J[0];
3077
+ return S ? S.og_scrape_url ? S.og_scrape_url : S.type === "image" ? "📷 Sent an image" : S.type === "video" ? "🎥 Sent a video" : S.type === "audio" ? "🎵 Sent audio" : S.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
3078
+ })(), E = p != null && p.created_at ? gr(new Date(p.created_at)) : "", T = p ? De(p) : !1, M = o ? o(p, N) : `${T ? "✨ " : ""}${N}`, L = s ?? 0;
3070
3079
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
3071
3080
  channelId: t == null ? void 0 : t.id,
3072
- isSelected: p,
3081
+ isSelected: g,
3073
3082
  participantName: _,
3074
3083
  unreadCount: L,
3075
- hasTimestamp: !!I
3084
+ hasTimestamp: !!E
3076
3085
  }), /* @__PURE__ */ n(
3077
3086
  "div",
3078
3087
  {
3079
3088
  role: "button",
3080
3089
  tabIndex: 0,
3081
- onClick: g,
3090
+ onClick: f,
3082
3091
  onKeyDown: c,
3083
3092
  className: k(
3084
3093
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
3085
3094
  {
3086
- "bg-black/[0.04]": p,
3087
- "hover:bg-black/[0.02]": !p
3095
+ "bg-black/[0.04]": g,
3096
+ "hover:bg-black/[0.02]": !g
3088
3097
  }
3089
3098
  ),
3090
3099
  "data-dd-privacy": "mask",
@@ -3092,9 +3101,9 @@ const pn = j.createContext({
3092
3101
  /* @__PURE__ */ n(
3093
3102
  ne,
3094
3103
  {
3095
- id: ((z = b == null ? void 0 : b.user) == null ? void 0 : z.id) || t.id || "unknown",
3104
+ id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || t.id || "unknown",
3096
3105
  name: _,
3097
- image: v,
3106
+ image: b,
3098
3107
  size: 48,
3099
3108
  starred: h
3100
3109
  }
@@ -3113,10 +3122,10 @@ const pn = j.createContext({
3113
3122
  ]
3114
3123
  }
3115
3124
  ),
3116
- I && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: I })
3125
+ E && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: E })
3117
3126
  ] }),
3118
3127
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
3119
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
3128
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
3120
3129
  L > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
3121
3130
  ] })
3122
3131
  ] })
@@ -3126,33 +3135,33 @@ const pn = j.createContext({
3126
3135
  }
3127
3136
  );
3128
3137
  bn.displayName = "CustomChannelPreview";
3129
- const gr = { last_message_at: -1 }, pr = j.memo(
3138
+ const pr = { last_message_at: -1 }, br = j.memo(
3130
3139
  ({
3131
3140
  onChannelSelect: e,
3132
3141
  selectedChannel: t,
3133
3142
  filters: s,
3134
3143
  allowNewMessagesFromUnfilteredChannels: a = !1,
3135
3144
  channelRenderFilterFn: r,
3136
- sort: i = gr,
3145
+ sort: i = pr,
3137
3146
  className: l,
3138
3147
  customEmptyStateIndicator: o,
3139
3148
  channelListPaginator: d = gs,
3140
3149
  channelPreview: u,
3141
- renderMessagePreview: p,
3150
+ renderMessagePreview: g,
3142
3151
  viewerLanguage: h
3143
3152
  }) => {
3144
- const g = j.useRef(0);
3145
- g.current++;
3146
- const { debug: c = !1 } = tt(), b = j.useCallback(
3147
- (v) => {
3148
- for (const f of v)
3149
- dr(f);
3150
- return r ? r(v) : v;
3153
+ const f = j.useRef(0);
3154
+ f.current++;
3155
+ const { debug: c = !1 } = tt(), v = j.useCallback(
3156
+ (b) => {
3157
+ for (const p of b)
3158
+ ur(p);
3159
+ return r ? r(b) : b;
3151
3160
  },
3152
3161
  [r]
3153
3162
  );
3154
3163
  c && console.log("📺 [ChannelList] 🔄 RENDER START", {
3155
- renderCount: g.current,
3164
+ renderCount: f.current,
3156
3165
  selectedChannelId: t == null ? void 0 : t.id,
3157
3166
  filters: s
3158
3167
  });
@@ -3162,7 +3171,7 @@ const gr = { last_message_at: -1 }, pr = j.memo(
3162
3171
  onChannelSelect: e,
3163
3172
  debug: c,
3164
3173
  channelPreview: u,
3165
- renderMessagePreview: p,
3174
+ renderMessagePreview: g,
3166
3175
  viewerLanguage: h
3167
3176
  }),
3168
3177
  [
@@ -3170,7 +3179,7 @@ const gr = { last_message_at: -1 }, pr = j.memo(
3170
3179
  e,
3171
3180
  c,
3172
3181
  u,
3173
- p,
3182
+ g,
3174
3183
  h
3175
3184
  ]
3176
3185
  );
@@ -3181,14 +3190,14 @@ const gr = { last_message_at: -1 }, pr = j.memo(
3181
3190
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
3182
3191
  l
3183
3192
  ),
3184
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(ur, { value: _, children: /* @__PURE__ */ n(
3193
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(mr, { value: _, children: /* @__PURE__ */ n(
3185
3194
  fs,
3186
3195
  {
3187
3196
  filters: s,
3188
3197
  sort: i,
3189
3198
  options: { limit: 30 },
3190
3199
  allowNewMessagesFromUnfilteredChannels: a,
3191
- channelRenderFilterFn: b,
3200
+ channelRenderFilterFn: v,
3192
3201
  Paginator: d,
3193
3202
  Preview: bn,
3194
3203
  EmptyStateIndicator: o
@@ -3199,26 +3208,26 @@ const gr = { last_message_at: -1 }, pr = j.memo(
3199
3208
  );
3200
3209
  }
3201
3210
  );
3202
- pr.displayName = "ChannelList";
3203
- const br = /^([a-z][a-z0-9+.-]*):/i, vr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3211
+ br.displayName = "ChannelList";
3212
+ const vr = /^([a-z][a-z0-9+.-]*):/i, xr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3204
3213
  function dt(e) {
3205
3214
  if (typeof e != "string") return;
3206
3215
  const t = e.trim();
3207
3216
  if (t === "") return;
3208
- const s = br.exec(t);
3217
+ const s = vr.exec(t);
3209
3218
  if (s) {
3210
3219
  const a = s[1].toLowerCase();
3211
- return vr.has(a) ? t : void 0;
3220
+ return xr.has(a) ? t : void 0;
3212
3221
  }
3213
3222
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
3214
3223
  }
3215
- const xr = {
3224
+ const wr = {
3216
3225
  dark: "bg-white text-[#121110] hover:bg-white/90",
3217
3226
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
3218
- }, wr = ({ variant: e, cta: t }) => {
3227
+ }, _r = ({ variant: e, cta: t }) => {
3219
3228
  const s = k(
3220
3229
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
3221
- xr[e]
3230
+ wr[e]
3222
3231
  ), a = dt(t.href);
3223
3232
  return a ? /* @__PURE__ */ n(
3224
3233
  "a",
@@ -3245,10 +3254,10 @@ const xr = {
3245
3254
  children: t.label
3246
3255
  }
3247
3256
  );
3248
- }, _r = {
3257
+ }, Nr = {
3249
3258
  dark: "text-white",
3250
3259
  light: "text-black/90"
3251
- }, Nr = "text-white/30", yr = {
3260
+ }, yr = "text-white/30", kr = {
3252
3261
  dark: "text-white/55",
3253
3262
  light: "text-black/55"
3254
3263
  }, ut = ({
@@ -3261,30 +3270,30 @@ const xr = {
3261
3270
  cta: l,
3262
3271
  trailingAction: o
3263
3272
  }) => {
3264
- const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", b = l != null;
3265
- if (!p && !h && !c && !b) return null;
3266
- const v = k(
3273
+ const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", g = u.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", v = l != null;
3274
+ if (!g && !h && !c && !v) return null;
3275
+ const b = k(
3267
3276
  "truncate text-base font-medium leading-6",
3268
- d && !t ? Nr : _r[e]
3269
- ), f = k(
3277
+ d && !t ? yr : Nr[e]
3278
+ ), p = k(
3270
3279
  "truncate text-xs leading-4",
3271
- yr[e]
3280
+ kr[e]
3272
3281
  );
3273
3282
  return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
3274
3283
  /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
3275
3284
  /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
3276
3285
  /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
3277
- p && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
3286
+ g && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
3278
3287
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
3279
- /* @__PURE__ */ n("p", { className: k("min-w-0", v), children: u })
3288
+ /* @__PURE__ */ n("p", { className: k("min-w-0", b), children: u })
3280
3289
  ] }),
3281
- h && /* @__PURE__ */ n("p", { className: f, children: a })
3290
+ h && /* @__PURE__ */ n("p", { className: p, children: a })
3282
3291
  ] }),
3283
- !b && c && /* @__PURE__ */ n("p", { className: f, children: g })
3292
+ !v && c && /* @__PURE__ */ n("p", { className: p, children: f })
3284
3293
  ] }),
3285
3294
  o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
3286
3295
  ] }),
3287
- l && /* @__PURE__ */ n(wr, { variant: e, cta: l })
3296
+ l && /* @__PURE__ */ n(_r, { variant: e, cta: l })
3288
3297
  ] });
3289
3298
  }, Cr = k(
3290
3299
  "relative block w-[280px] select-none overflow-hidden rounded-md",
@@ -3304,7 +3313,7 @@ const xr = {
3304
3313
  bgClassName: o,
3305
3314
  "data-testid": d
3306
3315
  }) => {
3307
- const u = s != null || a != null, p = k(
3316
+ const u = s != null || a != null, g = k(
3308
3317
  Cr,
3309
3318
  o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3310
3319
  // `focus-ring` is a design-system utility from the component-library
@@ -3321,7 +3330,7 @@ const xr = {
3321
3330
  rel: "noopener noreferrer",
3322
3331
  onClick: a,
3323
3332
  "data-testid": d,
3324
- className: p,
3333
+ className: g,
3325
3334
  children: [
3326
3335
  t,
3327
3336
  h
@@ -3335,7 +3344,7 @@ const xr = {
3335
3344
  onClick: a,
3336
3345
  "aria-label": r,
3337
3346
  "data-testid": d,
3338
- className: k(p, "text-left"),
3347
+ className: k(g, "text-left"),
3339
3348
  children: [
3340
3349
  t,
3341
3350
  h
@@ -3346,22 +3355,22 @@ const xr = {
3346
3355
  {
3347
3356
  ref: i,
3348
3357
  "data-testid": d,
3349
- className: p,
3358
+ className: g,
3350
3359
  children: [
3351
3360
  t,
3352
3361
  h
3353
3362
  ]
3354
3363
  }
3355
3364
  );
3356
- }, kr = {
3365
+ }, Er = {
3357
3366
  dark: "bg-white/10",
3358
3367
  light: "bg-black/5"
3359
- }, Er = {
3368
+ }, Ir = {
3360
3369
  dark: "size-16 text-white/25",
3361
3370
  light: "size-16 text-black/25"
3362
- }, $e = (e, t) => !!t && !!e && ie(e) === "audio", vn = (e, t) => {
3371
+ }, $e = (e, t) => !!t && !!e && le(e) === "audio", vn = (e, t) => {
3363
3372
  if (!t || !e) return !1;
3364
- const s = ie(e);
3373
+ const s = le(e);
3365
3374
  return s === "video" || s === "audio";
3366
3375
  }, mt = "bg-[#F2F3F4]", Fe = ({
3367
3376
  variant: e,
@@ -3372,7 +3381,7 @@ const xr = {
3372
3381
  topLeft: i,
3373
3382
  topRight: l
3374
3383
  }) => {
3375
- const o = ie(r), d = !!s && o === "video";
3384
+ const o = le(r), d = !!s && o === "video";
3376
3385
  return $e(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3377
3386
  "audio",
3378
3387
  {
@@ -3414,10 +3423,10 @@ const xr = {
3414
3423
  {
3415
3424
  className: k(
3416
3425
  "flex h-full w-full items-center justify-center",
3417
- kr[e]
3426
+ Er[e]
3418
3427
  ),
3419
- children: me(r, {
3420
- className: Er[e],
3428
+ children: fe(r, {
3429
+ className: Ir[e],
3421
3430
  weight: "regular"
3422
3431
  })
3423
3432
  }
@@ -3427,7 +3436,7 @@ const xr = {
3427
3436
  ]
3428
3437
  }
3429
3438
  );
3430
- }, Ir = ({
3439
+ }, Sr = ({
3431
3440
  title: e,
3432
3441
  placeholderTitle: t,
3433
3442
  description: s,
@@ -3438,14 +3447,14 @@ const xr = {
3438
3447
  layout: o = "featured",
3439
3448
  appIcon: d,
3440
3449
  cta: u,
3441
- onDismiss: p,
3450
+ onDismiss: g,
3442
3451
  onEditClick: h
3443
3452
  }) => {
3444
- const g = o === "classic", c = $e(r, l), b = p ? /* @__PURE__ */ n(
3453
+ const f = o === "classic", c = $e(r, l), v = g ? /* @__PURE__ */ n(
3445
3454
  "button",
3446
3455
  {
3447
3456
  type: "button",
3448
- onClick: p,
3457
+ onClick: g,
3449
3458
  "aria-label": "Dismiss attachment",
3450
3459
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3451
3460
  children: /* @__PURE__ */ n(Pe, { className: "size-3", weight: "bold" })
@@ -3470,14 +3479,14 @@ const xr = {
3470
3479
  mimeType: r
3471
3480
  }
3472
3481
  ) }),
3473
- b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3482
+ v && /* @__PURE__ */ n("div", { className: "shrink-0", children: v })
3474
3483
  ] }) }) : /* @__PURE__ */ m(
3475
3484
  ze,
3476
3485
  {
3477
3486
  variant: "dark",
3478
- topRight: g ? b : void 0,
3487
+ topRight: f ? v : void 0,
3479
3488
  children: [
3480
- !g && /* @__PURE__ */ n(
3489
+ !f && /* @__PURE__ */ n(
3481
3490
  Fe,
3482
3491
  {
3483
3492
  variant: "dark",
@@ -3485,7 +3494,7 @@ const xr = {
3485
3494
  sourceUrl: l,
3486
3495
  title: e,
3487
3496
  mimeType: r,
3488
- topRight: b
3497
+ topRight: v
3489
3498
  }
3490
3499
  ),
3491
3500
  /* @__PURE__ */ n(
@@ -3504,7 +3513,7 @@ const xr = {
3504
3513
  ]
3505
3514
  }
3506
3515
  );
3507
- }, Sr = ({
3516
+ }, Tr = ({
3508
3517
  title: e,
3509
3518
  description: t,
3510
3519
  url: s,
@@ -3516,21 +3525,21 @@ const xr = {
3516
3525
  cta: d,
3517
3526
  onClick: u
3518
3527
  }) => {
3519
- const p = vn(a, i), h = dt(s), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, b = $e(a, i) ? mt : void 0, _ = d && u ? {
3528
+ const g = vn(a, i), h = dt(s), f = d == null && h != null && !g ? h : void 0, c = d == null && !g ? u : void 0, v = $e(a, i) ? mt : void 0, _ = d && u ? {
3520
3529
  ...d,
3521
3530
  onClick: () => {
3522
- var v;
3523
- u(), (v = d.onClick) == null || v.call(d);
3531
+ var b;
3532
+ u(), (b = d.onClick) == null || b.call(d);
3524
3533
  }
3525
3534
  } : d;
3526
3535
  return /* @__PURE__ */ m(
3527
3536
  ze,
3528
3537
  {
3529
3538
  variant: "light",
3530
- href: g,
3539
+ href: f,
3531
3540
  onClick: c,
3532
3541
  ariaLabel: e ?? "Open attachment preview",
3533
- bgClassName: b,
3542
+ bgClassName: v,
3534
3543
  "data-testid": "link-attachment",
3535
3544
  children: [
3536
3545
  l === "featured" && /* @__PURE__ */ n(
@@ -3557,7 +3566,7 @@ const xr = {
3557
3566
  ]
3558
3567
  }
3559
3568
  );
3560
- }, Tr = ({
3569
+ }, Ar = ({
3561
3570
  title: e,
3562
3571
  placeholderTitle: t,
3563
3572
  description: s,
@@ -3568,15 +3577,15 @@ const xr = {
3568
3577
  layout: o = "featured",
3569
3578
  appIcon: d,
3570
3579
  cta: u,
3571
- onClick: p
3580
+ onClick: g
3572
3581
  }) => {
3573
- const h = vn(r, l), g = dt(a), c = u == null && g != null && !h ? g : void 0, b = u == null && !h && c != null ? p : void 0;
3582
+ const h = vn(r, l), f = dt(a), c = u == null && f != null && !h ? f : void 0, v = u == null && !h && c != null ? g : void 0;
3574
3583
  return /* @__PURE__ */ m(
3575
3584
  ze,
3576
3585
  {
3577
3586
  variant: "dark",
3578
3587
  href: c,
3579
- onClick: b,
3588
+ onClick: v,
3580
3589
  bgClassName: $e(r, l) ? mt : void 0,
3581
3590
  children: [
3582
3591
  o === "featured" && /* @__PURE__ */ n(
@@ -3604,20 +3613,20 @@ const xr = {
3604
3613
  ]
3605
3614
  }
3606
3615
  );
3607
- }, Oi = {
3608
- Composer: Ir,
3609
- Sent: Tr,
3610
- Received: Sr
3611
- }, Ar = {
3616
+ }, $i = {
3617
+ Composer: Sr,
3618
+ Sent: Ar,
3619
+ Received: Tr
3620
+ }, Mr = {
3612
3621
  dark: "bg-[#121110]",
3613
3622
  light: "bg-[#e9eaed]"
3614
- }, Mr = {
3623
+ }, Rr = {
3615
3624
  dark: "text-white",
3616
3625
  light: "text-[#080707]"
3617
- }, Rr = {
3626
+ }, Dr = {
3618
3627
  dark: "border-white/[0.08]",
3619
3628
  light: "border-black/[0.08]"
3620
- }, Dr = (e) => e === "dark" ? "sender" : "receiver", Lr = {
3629
+ }, Lr = (e) => e === "dark" ? "sender" : "receiver", zr = {
3621
3630
  sender: {
3622
3631
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3623
3632
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3639,7 +3648,7 @@ const xr = {
3639
3648
  children: i,
3640
3649
  "data-testid": l
3641
3650
  }) => {
3642
- const o = t != null && t !== "", d = Lr[Dr(e)][a];
3651
+ const o = t != null && t !== "", d = zr[Lr(e)][a];
3643
3652
  return /* @__PURE__ */ m(
3644
3653
  "div",
3645
3654
  {
@@ -3654,10 +3663,10 @@ const xr = {
3654
3663
  // as the surrounding `CustomMessage` text bubbles.
3655
3664
  "relative w-[280px] overflow-hidden px-2 py-2",
3656
3665
  d,
3657
- Ar[e],
3658
3666
  Mr[e],
3667
+ Rr[e],
3659
3668
  s && "border",
3660
- s && Rr[e],
3669
+ s && Dr[e],
3661
3670
  r
3662
3671
  ),
3663
3672
  children: [
@@ -3700,16 +3709,16 @@ const xr = {
3700
3709
  ),
3701
3710
  children: /* @__PURE__ */ n(Pe, { className: "size-3", weight: "bold" })
3702
3711
  }
3703
- ), Se = (e) => e === "received" ? "light" : "dark", $i = ({
3712
+ ), Se = (e) => e === "received" ? "light" : "dark", ji = ({
3704
3713
  firstOfGroup: e,
3705
3714
  endOfGroup: t,
3706
3715
  groupedByUser: s
3707
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", zr = ({
3716
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Fr = ({
3708
3717
  src: e,
3709
3718
  mimeType: t,
3710
3719
  filename: s,
3711
3720
  items: a
3712
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Fr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3721
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Pr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3713
3722
  /* @__PURE__ */ n(
3714
3723
  "audio",
3715
3724
  {
@@ -3732,10 +3741,10 @@ const xr = {
3732
3741
  preload: o,
3733
3742
  onDismiss: d
3734
3743
  }) => {
3735
- const u = Se(e), p = e === "composer" && !!d, h = zr({ src: t, mimeType: s, filename: a, items: r });
3744
+ const u = Se(e), g = e === "composer" && !!d, h = Fr({ src: t, mimeType: s, filename: a, items: r });
3736
3745
  if (h.length === 0)
3737
3746
  return null;
3738
- const g = o ?? (h.length > 1 ? "none" : "metadata");
3747
+ const f = o ?? (h.length > 1 ? "none" : "metadata");
3739
3748
  return /* @__PURE__ */ n(
3740
3749
  Ee,
3741
3750
  {
@@ -3743,30 +3752,30 @@ const xr = {
3743
3752
  text: i,
3744
3753
  groupPosition: l,
3745
3754
  "data-testid": "audio-attachment",
3746
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: h.map((c, b) => /* @__PURE__ */ n(
3747
- Fr,
3755
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ n(
3756
+ Pr,
3748
3757
  {
3749
3758
  item: c,
3750
- preload: g,
3759
+ preload: f,
3751
3760
  trailingAction: (
3752
3761
  // Composer only supports a single attachment, so the
3753
3762
  // dismiss control sits on the only player.
3754
- p && b === 0 ? /* @__PURE__ */ n(Ie, { onClick: d, variant: "inline" }) : void 0
3763
+ g && v === 0 ? /* @__PURE__ */ n(Ie, { onClick: d, variant: "inline" }) : void 0
3755
3764
  )
3756
3765
  },
3757
- `${c.src}-${b}`
3766
+ `${c.src}-${v}`
3758
3767
  )) })
3759
3768
  }
3760
3769
  );
3761
- }, Pr = (e) => /* @__PURE__ */ n(ht, { ...e, state: "composer" }), Or = (e) => /* @__PURE__ */ n(ht, { ...e, state: "sent" }), $r = (e) => /* @__PURE__ */ n(ht, { ...e, state: "received" }), jr = {
3762
- Composer: Pr,
3763
- Sent: Or,
3764
- Received: $r
3770
+ }, Or = (e) => /* @__PURE__ */ n(ht, { ...e, state: "composer" }), $r = (e) => /* @__PURE__ */ n(ht, { ...e, state: "sent" }), jr = (e) => /* @__PURE__ */ n(ht, { ...e, state: "received" }), Br = {
3771
+ Composer: Or,
3772
+ Sent: $r,
3773
+ Received: jr
3765
3774
  };
3766
- function Br(e) {
3775
+ function Ur(e) {
3767
3776
  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`;
3768
3777
  }
3769
- const Ur = {
3778
+ const Vr = {
3770
3779
  pdf: "PDF",
3771
3780
  doc: "DOC",
3772
3781
  xls: "XLS",
@@ -3776,7 +3785,7 @@ const Ur = {
3776
3785
  text: "TXT",
3777
3786
  markdown: "MD"
3778
3787
  };
3779
- function Vr(e, t) {
3788
+ function Gr(e, t) {
3780
3789
  if (t) {
3781
3790
  const r = t.lastIndexOf(".");
3782
3791
  if (r > 0 && r < t.length - 1) {
@@ -3785,8 +3794,8 @@ function Vr(e, t) {
3785
3794
  }
3786
3795
  }
3787
3796
  if (!e) return;
3788
- if (ie(e) === "document") {
3789
- const r = an(e), i = Ur[r];
3797
+ if (le(e) === "document") {
3798
+ const r = an(e), i = Vr[r];
3790
3799
  if (i) return i;
3791
3800
  if (e === "application/octet-stream") return;
3792
3801
  }
@@ -3794,8 +3803,8 @@ function Vr(e, t) {
3794
3803
  if (!(!a || a === "*"))
3795
3804
  return a.toUpperCase();
3796
3805
  }
3797
- function Gr(e, t, s) {
3798
- const a = Vr(e, t), r = typeof s == "number" && s > 0 ? Br(s) : void 0;
3806
+ function Hr(e, t, s) {
3807
+ const a = Gr(e, t), r = typeof s == "number" && s > 0 ? Ur(s) : void 0;
3799
3808
  return [a, r].filter(Boolean).join(" · ") || void 0;
3800
3809
  }
3801
3810
  function ae(e) {
@@ -3806,13 +3815,13 @@ function ae(e) {
3806
3815
  return "download";
3807
3816
  }
3808
3817
  }
3809
- const Hr = {
3818
+ const Yr = {
3810
3819
  dark: "text-white/55",
3811
3820
  light: "text-black/65"
3812
- }, Yr = {
3821
+ }, qr = {
3813
3822
  dark: "bg-white/10",
3814
3823
  light: "bg-black/5"
3815
- }, qr = {
3824
+ }, Wr = {
3816
3825
  dark: "text-white/85",
3817
3826
  light: "text-black/85"
3818
3827
  }, xn = ({
@@ -3825,16 +3834,16 @@ const Hr = {
3825
3834
  activateLabel: l,
3826
3835
  trailingAction: o
3827
3836
  }) => {
3828
- const d = s ?? t ?? "File", u = Gr(a, t, r), p = /* @__PURE__ */ n(
3837
+ const d = s ?? t ?? "File", u = Hr(a, t, r), g = /* @__PURE__ */ n(
3829
3838
  "div",
3830
3839
  {
3831
3840
  className: k(
3832
3841
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3833
- Yr[e]
3842
+ qr[e]
3834
3843
  ),
3835
3844
  "aria-hidden": !0,
3836
- children: me(a, {
3837
- className: k("size-6", qr[e]),
3845
+ children: fe(a, {
3846
+ className: k("size-6", Wr[e]),
3838
3847
  weight: "regular"
3839
3848
  })
3840
3849
  }
@@ -3845,12 +3854,12 @@ const Hr = {
3845
3854
  {
3846
3855
  className: k(
3847
3856
  "truncate text-xs leading-4",
3848
- Hr[e]
3857
+ Yr[e]
3849
3858
  ),
3850
3859
  children: u
3851
3860
  }
3852
3861
  ) : null
3853
- ] }), g = i ? /* @__PURE__ */ m(
3862
+ ] }), f = i ? /* @__PURE__ */ m(
3854
3863
  "button",
3855
3864
  {
3856
3865
  type: "button",
@@ -3861,16 +3870,16 @@ const Hr = {
3861
3870
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3862
3871
  ),
3863
3872
  children: [
3864
- p,
3873
+ g,
3865
3874
  h
3866
3875
  ]
3867
3876
  }
3868
3877
  ) : /* @__PURE__ */ m(se, { children: [
3869
- p,
3878
+ g,
3870
3879
  h
3871
3880
  ] });
3872
3881
  return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 px-3 py-2", children: [
3873
- g,
3882
+ f,
3874
3883
  o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
3875
3884
  ] });
3876
3885
  };
@@ -3888,14 +3897,14 @@ async function wn(e, t) {
3888
3897
  }
3889
3898
  }
3890
3899
  }
3891
- const Wr = ({
3900
+ const Xr = ({
3892
3901
  src: e,
3893
3902
  filename: t,
3894
3903
  fileSize: s,
3895
3904
  mimeType: a,
3896
3905
  title: r,
3897
3906
  items: i
3898
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Xr = ({
3907
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Kr = ({
3899
3908
  variant: e,
3900
3909
  item: t,
3901
3910
  index: s,
@@ -3927,21 +3936,21 @@ const Wr = ({
3927
3936
  text: o,
3928
3937
  groupPosition: d,
3929
3938
  onClick: u,
3930
- onDismiss: p
3939
+ onDismiss: g
3931
3940
  }) => {
3932
- const h = Se(e), g = e === "composer" && !!p, c = Wr({
3941
+ const h = Se(e), f = e === "composer" && !!g, c = Xr({
3933
3942
  src: t,
3934
3943
  filename: s,
3935
3944
  fileSize: a,
3936
3945
  mimeType: r,
3937
3946
  title: i,
3938
3947
  items: l
3939
- }), b = (v) => {
3940
- if ((u == null ? void 0 : u(v)) === !1) return;
3941
- const f = c[v];
3942
- if (!f) return;
3943
- const N = f.filename ?? ae(f.src);
3944
- wn(f.src, N);
3948
+ }), v = (b) => {
3949
+ if ((u == null ? void 0 : u(b)) === !1) return;
3950
+ const p = c[b];
3951
+ if (!p) return;
3952
+ const x = p.filename ?? ae(p.src);
3953
+ wn(p.src, x);
3945
3954
  };
3946
3955
  if (c.length === 0)
3947
3956
  return null;
@@ -3963,23 +3972,23 @@ const Wr = ({
3963
3972
  text: o,
3964
3973
  groupPosition: d,
3965
3974
  "data-testid": "file-attachment",
3966
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, f) => /* @__PURE__ */ n(
3967
- Xr,
3975
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((b, p) => /* @__PURE__ */ n(
3976
+ Kr,
3968
3977
  {
3969
3978
  variant: h,
3970
- item: v,
3971
- index: f,
3972
- onActivate: b,
3973
- trailingAction: g && f === 0 ? /* @__PURE__ */ n(Ie, { onClick: p, variant: "inline" }) : _
3979
+ item: b,
3980
+ index: p,
3981
+ onActivate: v,
3982
+ trailingAction: f && p === 0 ? /* @__PURE__ */ n(Ie, { onClick: g, variant: "inline" }) : _
3974
3983
  },
3975
- `${v.src}-${f}`
3984
+ `${b.src}-${p}`
3976
3985
  )) })
3977
3986
  }
3978
3987
  );
3979
- }, Kr = (e) => /* @__PURE__ */ n(ft, { ...e, state: "composer" }), Jr = (e) => /* @__PURE__ */ n(ft, { ...e, state: "sent" }), Zr = (e) => /* @__PURE__ */ n(ft, { ...e, state: "received" }), Qr = {
3980
- Composer: Kr,
3981
- Sent: Jr,
3982
- Received: Zr
3988
+ }, Jr = (e) => /* @__PURE__ */ n(ft, { ...e, state: "composer" }), Zr = (e) => /* @__PURE__ */ n(ft, { ...e, state: "sent" }), Qr = (e) => /* @__PURE__ */ n(ft, { ...e, state: "received" }), ei = {
3989
+ Composer: Jr,
3990
+ Sent: Zr,
3991
+ Received: Qr
3983
3992
  }, gt = ({
3984
3993
  onPrev: e,
3985
3994
  onNext: t,
@@ -4003,7 +4012,7 @@ const Wr = ({
4003
4012
  onClick: t,
4004
4013
  "aria-label": a,
4005
4014
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
4006
- children: /* @__PURE__ */ n(ue, { size: 20, weight: "bold", "aria-hidden": !0 })
4015
+ children: /* @__PURE__ */ n(me, { size: 20, weight: "bold", "aria-hidden": !0 })
4007
4016
  }
4008
4017
  )
4009
4018
  ] }), _n = ({
@@ -4015,7 +4024,7 @@ const Wr = ({
4015
4024
  tone: i = "dark",
4016
4025
  onTriggered: l
4017
4026
  }) => {
4018
- const [o, d] = O(!1), u = W(
4027
+ const [o, d] = $(!1), u = K(
4019
4028
  (c) => {
4020
4029
  c.stopPropagation(), !o && (d(!0), wn(e, t).catch(() => {
4021
4030
  }).finally(() => {
@@ -4023,7 +4032,7 @@ const Wr = ({
4023
4032
  }));
4024
4033
  },
4025
4034
  [o, e, t, l]
4026
- ), p = r ?? s !== "pill", g = { className: k(
4035
+ ), g = r ?? s !== "pill", f = { className: k(
4027
4036
  s === "pill" ? "size-4" : "size-5",
4028
4037
  "shrink-0"
4029
4038
  ), weight: "bold" };
@@ -4073,7 +4082,7 @@ const Wr = ({
4073
4082
  type: "button",
4074
4083
  onClick: u,
4075
4084
  disabled: o,
4076
- "aria-label": p ? a : void 0,
4085
+ "aria-label": g ? a : void 0,
4077
4086
  className: k(
4078
4087
  "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
4079
4088
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
@@ -4086,8 +4095,8 @@ const Wr = ({
4086
4095
  weight: "bold",
4087
4096
  "aria-hidden": !0
4088
4097
  }
4089
- ) : /* @__PURE__ */ n(Ne, { ...g, "aria-hidden": !0 }),
4090
- p ? null : a
4098
+ ) : /* @__PURE__ */ n(Ne, { ...f, "aria-hidden": !0 }),
4099
+ g ? null : a
4091
4100
  ]
4092
4101
  }
4093
4102
  );
@@ -4096,23 +4105,23 @@ const Wr = ({
4096
4105
  initialIndex: t,
4097
4106
  open: s
4098
4107
  }) => {
4099
- const a = qe(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
4100
- q(() => {
4108
+ const a = qe(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
4109
+ X(() => {
4101
4110
  s && i(qe(t, 0, Math.max(e - 1, 0)));
4102
- }, [s, t, e]), q(() => {
4111
+ }, [s, t, e]), X(() => {
4103
4112
  i((d) => qe(d, 0, Math.max(e - 1, 0)));
4104
4113
  }, [e]);
4105
- const l = W(() => {
4114
+ const l = K(() => {
4106
4115
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
4107
- }, [e]), o = W(() => {
4116
+ }, [e]), o = K(() => {
4108
4117
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
4109
4118
  }, [e]);
4110
- return q(() => {
4119
+ return X(() => {
4111
4120
  if (!s || e <= 1) return;
4112
4121
  const d = (u) => {
4113
4122
  if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
4114
- const p = document.activeElement;
4115
- p && (p.tagName === "VIDEO" || p.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? l() : o());
4123
+ const g = document.activeElement;
4124
+ g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? l() : o());
4116
4125
  };
4117
4126
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
4118
4127
  }, [s, e, l, o]), { index: r, prev: l, next: o };
@@ -4125,9 +4134,9 @@ const Wr = ({
4125
4134
  children: i,
4126
4135
  "data-testid": l
4127
4136
  }) => {
4128
- const o = H(null), d = H(null);
4129
- return q(() => {
4130
- var g;
4137
+ const o = V(null), d = V(null);
4138
+ return X(() => {
4139
+ var f;
4131
4140
  const h = o.current;
4132
4141
  if (h) {
4133
4142
  if (e) {
@@ -4141,7 +4150,7 @@ const Wr = ({
4141
4150
  else
4142
4151
  h.setAttribute("open", "");
4143
4152
  const c = typeof document < "u" ? document.activeElement : null;
4144
- return (g = d.current) == null || g.focus(), () => {
4153
+ return (f = d.current) == null || f.focus(), () => {
4145
4154
  if (h.open)
4146
4155
  if (typeof h.close == "function")
4147
4156
  try {
@@ -4216,7 +4225,7 @@ const Wr = ({
4216
4225
  length: t.length,
4217
4226
  initialIndex: s,
4218
4227
  open: e
4219
- }), o = t[r], d = re(
4228
+ }), o = t[r], d = ie(
4220
4229
  () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "image"),
4221
4230
  [o]
4222
4231
  );
@@ -4262,7 +4271,7 @@ const Wr = ({
4262
4271
  ]
4263
4272
  }
4264
4273
  ) : null;
4265
- }, ei = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", yn = ({
4274
+ }, ti = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", yn = ({
4266
4275
  tiles: e,
4267
4276
  onTileActivate: t,
4268
4277
  maxVisible: s = 4,
@@ -4270,8 +4279,8 @@ const Wr = ({
4270
4279
  }) => {
4271
4280
  const r = e.length;
4272
4281
  if (r === 0) return null;
4273
- const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, u, p) => {
4274
- const h = k(ei, "h-full w-full");
4282
+ const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, u, g) => {
4283
+ const h = k(ti, "h-full w-full");
4275
4284
  return t ? /* @__PURE__ */ m(
4276
4285
  "button",
4277
4286
  {
@@ -4281,13 +4290,13 @@ const Wr = ({
4281
4290
  className: k(h, "cursor-zoom-in"),
4282
4291
  children: [
4283
4292
  d.content,
4284
- p
4293
+ g
4285
4294
  ]
4286
4295
  },
4287
4296
  u
4288
4297
  ) : /* @__PURE__ */ m("div", { className: h, children: [
4289
4298
  d.content,
4290
- p
4299
+ g
4291
4300
  ] }, u);
4292
4301
  };
4293
4302
  return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: o(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
@@ -4320,11 +4329,11 @@ const Wr = ({
4320
4329
  a
4321
4330
  ),
4322
4331
  children: i.map((d, u) => {
4323
- const p = l > 0 && u === i.length - 1;
4332
+ const g = l > 0 && u === i.length - 1;
4324
4333
  return o(
4325
4334
  d,
4326
4335
  u,
4327
- p ? /* @__PURE__ */ m("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
4336
+ g ? /* @__PURE__ */ m("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
4328
4337
  "+",
4329
4338
  l
4330
4339
  ] }) : null
@@ -4333,14 +4342,14 @@ const Wr = ({
4333
4342
  }
4334
4343
  );
4335
4344
  }, Te = (e) => {
4336
- const [t, s] = O(!1), [a, r] = O(0), i = W(
4345
+ const [t, s] = $(!1), [a, r] = $(0), i = K(
4337
4346
  (o) => {
4338
4347
  (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
4339
4348
  },
4340
4349
  [e]
4341
- ), l = W(() => s(!1), []);
4350
+ ), l = K(() => s(!1), []);
4342
4351
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
4343
- }, ti = (e, t, s, a) => ({
4352
+ }, ni = (e, t, s, a) => ({
4344
4353
  ariaLabel: `Open image ${t + 1} of ${s}`,
4345
4354
  content: /* @__PURE__ */ n(
4346
4355
  "img",
@@ -4355,15 +4364,15 @@ const Wr = ({
4355
4364
  className: "absolute inset-0 size-full rounded-md object-cover"
4356
4365
  }
4357
4366
  )
4358
- }), ni = ({
4367
+ }), si = ({
4359
4368
  src: e,
4360
4369
  alt: t,
4361
4370
  items: s
4362
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Cn = (e, t) => e.map((s, a) => ({
4371
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], kn = (e, t) => e.map((s, a) => ({
4363
4372
  src: s.src,
4364
4373
  alt: s.alt,
4365
4374
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4366
- })), si = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4375
+ })), ai = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4367
4376
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Te(
4368
4377
  r
4369
4378
  );
@@ -4393,13 +4402,13 @@ const Wr = ({
4393
4402
  Nn,
4394
4403
  {
4395
4404
  open: l,
4396
- items: Cn([{ src: e, alt: t }], s),
4405
+ items: kn([{ src: e, alt: t }], s),
4397
4406
  initialIndex: o,
4398
4407
  onClose: u
4399
4408
  }
4400
4409
  )
4401
4410
  ] });
4402
- }, kn = ({
4411
+ }, Cn = ({
4403
4412
  state: e,
4404
4413
  src: t,
4405
4414
  alt: s,
@@ -4410,18 +4419,18 @@ const Wr = ({
4410
4419
  loading: o = "lazy",
4411
4420
  onClick: d
4412
4421
  }) => {
4413
- const u = ni({ src: t, alt: s, items: r }), p = Se(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Te(
4422
+ const u = si({ src: t, alt: s, items: r }), g = Se(e), { viewerOpen: h, viewerIndex: f, handleActivate: c, closeViewer: v } = Te(
4414
4423
  d
4415
4424
  );
4416
4425
  if (u.length === 0)
4417
4426
  return null;
4418
4427
  const _ = u.map(
4419
- (v, f) => ti(v, f, u.length, o)
4428
+ (b, p) => ni(b, p, u.length, o)
4420
4429
  );
4421
4430
  return /* @__PURE__ */ m(
4422
4431
  Ee,
4423
4432
  {
4424
- variant: p,
4433
+ variant: g,
4425
4434
  text: i,
4426
4435
  groupPosition: l,
4427
4436
  "data-testid": "image-attachment",
@@ -4431,19 +4440,19 @@ const Wr = ({
4431
4440
  Nn,
4432
4441
  {
4433
4442
  open: h,
4434
- items: Cn(u, a),
4435
- initialIndex: g,
4436
- onClose: b
4443
+ items: kn(u, a),
4444
+ initialIndex: f,
4445
+ onClose: v
4437
4446
  }
4438
4447
  )
4439
4448
  ]
4440
4449
  }
4441
4450
  );
4442
- }, ai = (e) => /* @__PURE__ */ n(si, { ...e }), ri = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), ii = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), li = {
4443
- Composer: ai,
4444
- Sent: ri,
4445
- Received: ii
4446
- }, oi = ({
4451
+ }, ri = (e) => /* @__PURE__ */ n(ai, { ...e }), ii = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), oi = {
4452
+ Composer: ri,
4453
+ Sent: ii,
4454
+ Received: li
4455
+ }, ci = ({
4447
4456
  open: e,
4448
4457
  items: t,
4449
4458
  initialIndex: s = 0,
@@ -4453,11 +4462,11 @@ const Wr = ({
4453
4462
  length: t.length,
4454
4463
  initialIndex: s,
4455
4464
  open: e
4456
- }), o = t[r], d = re(
4465
+ }), o = t[r], d = ie(
4457
4466
  () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
4458
4467
  [o]
4459
- ), u = re(
4460
- () => o ? ci(o.src) : void 0,
4468
+ ), u = ie(
4469
+ () => o ? di(o.src) : void 0,
4461
4470
  [o]
4462
4471
  );
4463
4472
  return !o || !u ? null : /* @__PURE__ */ m(
@@ -4491,16 +4500,16 @@ const Wr = ({
4491
4500
  ]
4492
4501
  }
4493
4502
  );
4494
- }, ci = (e) => {
4503
+ }, di = (e) => {
4495
4504
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4496
4505
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4497
- }, di = ({
4506
+ }, ui = ({
4498
4507
  src: e,
4499
4508
  filename: t,
4500
4509
  fileSize: s,
4501
4510
  title: a,
4502
4511
  items: r
4503
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ui = ({
4512
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], mi = ({
4504
4513
  variant: e,
4505
4514
  item: t,
4506
4515
  index: s,
@@ -4533,51 +4542,51 @@ const Wr = ({
4533
4542
  onClick: d,
4534
4543
  onDismiss: u
4535
4544
  }) => {
4536
- const p = Se(e), h = di({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: _ } = Te(
4545
+ const g = Se(e), h = ui({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: _ } = Te(
4537
4546
  d
4538
- ), v = e === "composer" && !!u;
4547
+ ), b = e === "composer" && !!u;
4539
4548
  if (h.length === 0)
4540
4549
  return null;
4541
- const f = h.map((N) => ({
4542
- src: N.src,
4543
- filename: N.filename ?? ae(N.src)
4550
+ const p = h.map((x) => ({
4551
+ src: x.src,
4552
+ filename: x.filename ?? ae(x.src)
4544
4553
  }));
4545
4554
  return /* @__PURE__ */ m(
4546
4555
  Ee,
4547
4556
  {
4548
- variant: p,
4557
+ variant: g,
4549
4558
  text: l,
4550
4559
  groupPosition: o,
4551
4560
  "data-testid": "pdf-attachment",
4552
4561
  children: [
4553
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: h.map((N, x) => {
4554
- const I = N.filename ?? ae(N.src), R = v && x === 0 ? /* @__PURE__ */ n(Ie, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4562
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
4563
+ const E = x.filename ?? ae(x.src), T = b && N === 0 ? /* @__PURE__ */ n(Ie, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4555
4564
  _n,
4556
4565
  {
4557
- url: N.src,
4558
- filename: I,
4566
+ url: x.src,
4567
+ filename: E,
4559
4568
  variant: "inline",
4560
- label: `Download ${I}`,
4561
- tone: p
4569
+ label: `Download ${E}`,
4570
+ tone: g
4562
4571
  }
4563
4572
  );
4564
4573
  return /* @__PURE__ */ n(
4565
- ui,
4574
+ mi,
4566
4575
  {
4567
- variant: p,
4568
- item: N,
4569
- index: x,
4570
- onActivate: b,
4571
- trailingAction: R
4576
+ variant: g,
4577
+ item: x,
4578
+ index: N,
4579
+ onActivate: v,
4580
+ trailingAction: T
4572
4581
  },
4573
- `${N.src}-${x}`
4582
+ `${x.src}-${N}`
4574
4583
  );
4575
4584
  }) }),
4576
4585
  /* @__PURE__ */ n(
4577
- oi,
4586
+ ci,
4578
4587
  {
4579
- open: g,
4580
- items: f,
4588
+ open: f,
4589
+ items: p,
4581
4590
  initialIndex: c,
4582
4591
  onClose: _
4583
4592
  }
@@ -4585,10 +4594,10 @@ const Wr = ({
4585
4594
  ]
4586
4595
  }
4587
4596
  );
4588
- }, mi = (e) => /* @__PURE__ */ n(vt, { ...e, state: "composer" }), hi = (e) => /* @__PURE__ */ n(vt, { ...e, state: "sent" }), fi = (e) => /* @__PURE__ */ n(vt, { ...e, state: "received" }), gi = {
4589
- Composer: mi,
4590
- Sent: hi,
4591
- Received: fi
4597
+ }, hi = (e) => /* @__PURE__ */ n(vt, { ...e, state: "composer" }), fi = (e) => /* @__PURE__ */ n(vt, { ...e, state: "sent" }), gi = (e) => /* @__PURE__ */ n(vt, { ...e, state: "received" }), pi = {
4598
+ Composer: hi,
4599
+ Sent: fi,
4600
+ Received: gi
4592
4601
  }, En = ({
4593
4602
  open: e,
4594
4603
  items: t,
@@ -4599,7 +4608,7 @@ const Wr = ({
4599
4608
  length: t.length,
4600
4609
  initialIndex: s,
4601
4610
  open: e
4602
- }), o = t[r], d = re(
4611
+ }), o = t[r], d = ie(
4603
4612
  () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "video"),
4604
4613
  [o]
4605
4614
  );
@@ -4639,7 +4648,7 @@ const Wr = ({
4639
4648
  ]
4640
4649
  }
4641
4650
  ) : null;
4642
- }, pi = () => /* @__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(Xe, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), In = ({
4651
+ }, bi = () => /* @__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(Xe, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), In = ({
4643
4652
  item: e,
4644
4653
  index: t
4645
4654
  }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4661,11 +4670,11 @@ const Wr = ({
4661
4670
  "aria-hidden": !0
4662
4671
  }
4663
4672
  ) }),
4664
- /* @__PURE__ */ n(pi, {})
4665
- ] }), bi = (e, t, s) => ({
4673
+ /* @__PURE__ */ n(bi, {})
4674
+ ] }), vi = (e, t, s) => ({
4666
4675
  ariaLabel: `Play video ${t + 1} of ${s}`,
4667
4676
  content: /* @__PURE__ */ n(In, { item: e, index: t })
4668
- }), vi = ({
4677
+ }), xi = ({
4669
4678
  src: e,
4670
4679
  poster: t,
4671
4680
  mimeType: s,
@@ -4677,8 +4686,8 @@ const Wr = ({
4677
4686
  mimeType: s.mimeType,
4678
4687
  preload: s.preload,
4679
4688
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4680
- })), xi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
4681
- const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: p } = Te(
4689
+ })), wi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
4690
+ const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: g } = Te(
4682
4691
  i
4683
4692
  );
4684
4693
  return /* @__PURE__ */ m("div", { className: "relative w-fit", children: [
@@ -4702,7 +4711,7 @@ const Wr = ({
4702
4711
  a
4703
4712
  ),
4704
4713
  initialIndex: d,
4705
- onClose: p
4714
+ onClose: g
4706
4715
  }
4707
4716
  )
4708
4717
  ] });
@@ -4718,13 +4727,13 @@ const Wr = ({
4718
4727
  preload: d,
4719
4728
  onClick: u
4720
4729
  }) => {
4721
- const p = vi({ src: t, poster: s, mimeType: a, preload: d, items: i }), h = Se(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: _ } = Te(
4730
+ const g = xi({ src: t, poster: s, mimeType: a, preload: d, items: i }), h = Se(e), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: _ } = Te(
4722
4731
  u
4723
4732
  );
4724
- if (p.length === 0)
4733
+ if (g.length === 0)
4725
4734
  return null;
4726
- const v = p.map(
4727
- (f, N) => bi(f, N, p.length)
4735
+ const b = g.map(
4736
+ (p, x) => vi(p, x, g.length)
4728
4737
  );
4729
4738
  return /* @__PURE__ */ m(
4730
4739
  Ee,
@@ -4737,16 +4746,16 @@ const Wr = ({
4737
4746
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4738
4747
  yn,
4739
4748
  {
4740
- tiles: v,
4741
- onTileActivate: b,
4749
+ tiles: b,
4750
+ onTileActivate: v,
4742
4751
  className: "overflow-hidden rounded-md"
4743
4752
  }
4744
4753
  ) }),
4745
4754
  /* @__PURE__ */ n(
4746
4755
  En,
4747
4756
  {
4748
- open: g,
4749
- items: Sn(p, r),
4757
+ open: f,
4758
+ items: Sn(g, r),
4750
4759
  initialIndex: c,
4751
4760
  onClose: _
4752
4761
  }
@@ -4754,16 +4763,16 @@ const Wr = ({
4754
4763
  ]
4755
4764
  }
4756
4765
  );
4757
- }, wi = (e) => /* @__PURE__ */ n(xi, { ...e }), _i = (e) => /* @__PURE__ */ n(Tn, { ...e, state: "sent" }), Ni = (e) => /* @__PURE__ */ n(Tn, { ...e, state: "received" }), yi = {
4758
- Composer: wi,
4759
- Sent: _i,
4760
- Received: Ni
4761
- }, ji = {
4762
- Image: li,
4763
- Video: yi,
4764
- Audio: jr,
4765
- Pdf: gi,
4766
- File: Qr
4766
+ }, _i = (e) => /* @__PURE__ */ n(wi, { ...e }), Ni = (e) => /* @__PURE__ */ n(Tn, { ...e, state: "sent" }), yi = (e) => /* @__PURE__ */ n(Tn, { ...e, state: "received" }), ki = {
4767
+ Composer: _i,
4768
+ Sent: Ni,
4769
+ Received: yi
4770
+ }, Bi = {
4771
+ Image: oi,
4772
+ Video: ki,
4773
+ Audio: Br,
4774
+ Pdf: pi,
4775
+ File: ei
4767
4776
  }, Ci = ({
4768
4777
  question: e,
4769
4778
  onClick: t,
@@ -4786,7 +4795,7 @@ const Wr = ({
4786
4795
  ),
4787
4796
  children: e
4788
4797
  }
4789
- ), Bi = ({
4798
+ ), Ui = ({
4790
4799
  faqs: e,
4791
4800
  onFaqClick: t,
4792
4801
  loadingFaqId: s,
@@ -4830,39 +4839,39 @@ const Wr = ({
4830
4839
  };
4831
4840
  export {
4832
4841
  rn as A,
4833
- Fi as B,
4834
- ir as C,
4835
- Ta as D,
4836
- na as E,
4837
- Bi as F,
4842
+ Pi as B,
4843
+ lr as C,
4844
+ Aa as D,
4845
+ sa as E,
4846
+ Ui as F,
4838
4847
  js as G,
4839
- Oi as L,
4840
- Li as M,
4841
- ve as a,
4848
+ $i as L,
4849
+ zi as M,
4850
+ xe as a,
4842
4851
  ne as b,
4843
- pr as c,
4852
+ br as c,
4844
4853
  gn as d,
4845
- zi as e,
4854
+ Fi as e,
4846
4855
  Ci as f,
4847
- ie as g,
4856
+ le as g,
4848
4857
  Gt as h,
4849
- ji as i,
4850
- za as j,
4851
- Di as k,
4852
- Pi as l,
4853
- Gr as m,
4854
- Br as n,
4855
- fr as o,
4856
- Vr as p,
4858
+ Bi as i,
4859
+ Fa as j,
4860
+ Li as k,
4861
+ Oi as l,
4862
+ Hr as m,
4863
+ Ur as n,
4864
+ gr as o,
4865
+ Gr as p,
4857
4866
  tn as q,
4858
- me as r,
4867
+ fe as r,
4859
4868
  cn as s,
4860
4869
  Gs as t,
4861
- $i as u,
4862
- sa as v,
4870
+ ji as u,
4871
+ aa as v,
4863
4872
  Oe as w,
4864
4873
  lt as x,
4865
4874
  ot as y,
4866
4875
  st as z
4867
4876
  };
4868
- //# sourceMappingURL=index-3vM1UOPb.js.map
4877
+ //# sourceMappingURL=index-gnuITMC7.js.map