@linktr.ee/messaging-react 3.3.4 → 3.3.6-rc-1780987607

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 (56) hide show
  1. package/dist/{Card-DLmUSU4A.cjs → Card-BlviN8Fb.cjs} +2 -2
  2. package/dist/{Card-DLmUSU4A.cjs.map → Card-BlviN8Fb.cjs.map} +1 -1
  3. package/dist/{Card-DmPpcrSU.js → Card-C4ncqjxJ.js} +2 -2
  4. package/dist/{Card-DmPpcrSU.js.map → Card-C4ncqjxJ.js.map} +1 -1
  5. package/dist/{Card-0BgubwgM.cjs → Card-Cn7Zxc6U.cjs} +2 -2
  6. package/dist/{Card-0BgubwgM.cjs.map → Card-Cn7Zxc6U.cjs.map} +1 -1
  7. package/dist/{Card-DchJqvYq.js → Card-DE5bfj0l.js} +2 -2
  8. package/dist/{Card-DchJqvYq.js.map → Card-DE5bfj0l.js.map} +1 -1
  9. package/dist/{Card-B7AF5uOB.js → Card-IjOI7UXs.js} +3 -3
  10. package/dist/{Card-B7AF5uOB.js.map → Card-IjOI7UXs.js.map} +1 -1
  11. package/dist/{Card-CvBbAoUo.cjs → Card-KgQxeR-B.cjs} +2 -2
  12. package/dist/{Card-CvBbAoUo.cjs.map → Card-KgQxeR-B.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-BQjA4HaB.js → LockedThumbnail-4-54cyJG.js} +2 -2
  14. package/dist/{LockedThumbnail-BQjA4HaB.js.map → LockedThumbnail-4-54cyJG.js.map} +1 -1
  15. package/dist/{LockedThumbnail-D9fSb4N-.cjs → LockedThumbnail-DL5NZzWJ.cjs} +2 -2
  16. package/dist/{LockedThumbnail-D9fSb4N-.cjs.map → LockedThumbnail-DL5NZzWJ.cjs.map} +1 -1
  17. package/dist/{index-BcHUpyyw.js → index-C2wfgpUU.js} +855 -823
  18. package/dist/index-C2wfgpUU.js.map +1 -0
  19. package/dist/index-nanry0Io.cjs +2 -0
  20. package/dist/index-nanry0Io.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +5 -2
  24. package/src/components/ActionButton/ActionButton.test.tsx +0 -25
  25. package/src/components/AttachmentCard/AttachmentCard.stories.tsx +226 -0
  26. package/src/components/Avatar/Avatar.stories.tsx +20 -0
  27. package/src/components/ChannelActionsMenu/ChannelActionsMenu.test.tsx +33 -8
  28. package/src/components/ChannelList/ChannelList.stories.tsx +5 -0
  29. package/src/components/ChannelList/CustomChannelPreview.stories.tsx +77 -47
  30. package/src/components/ChannelView.stories.tsx +8 -7
  31. package/src/components/ChannelView.test.tsx +12 -1
  32. package/src/components/ChannelView.tsx +34 -17
  33. package/src/components/CloseButton/CloseButton.stories.tsx +31 -0
  34. package/src/components/CustomDateSeparator/CustomDateSeparator.stories.tsx +33 -0
  35. package/src/components/CustomLinkPreviewList/CustomLinkPreviewCard.stories.tsx +63 -0
  36. package/src/components/CustomLinkPreviewList/CustomLinkPreviewCard.tsx +57 -0
  37. package/src/components/CustomLinkPreviewList/index.tsx +2 -54
  38. package/src/components/CustomMessage/CustomMessage.stories.tsx +3 -18
  39. package/src/components/CustomMessage/MessageAttachmentConversations.stories.tsx +13 -0
  40. package/src/components/CustomMessage/MessageTag.stories.tsx +22 -2
  41. package/src/components/CustomMessage/MessageVoteButtons.stories.tsx +9 -0
  42. package/src/components/CustomMessageInput/index.tsx +14 -4
  43. package/src/components/CustomSystemMessage/CustomSystemMessage.stories.tsx +54 -0
  44. package/src/components/CustomTypingIndicator/CustomTypingIndicator.stories.tsx +7 -0
  45. package/src/components/LinkAttachment/LinkAttachment.stories.tsx +11 -1
  46. package/src/components/LockedAttachment/LockedAttachment.stories.tsx +4 -0
  47. package/src/components/MediaMessage/MediaMessage.stories.tsx +4 -2
  48. package/src/components/MediaMessage/MediaMessage.test.tsx +0 -38
  49. package/src/components/MessageAttachment/MessageAttachment.test.tsx +25 -84
  50. package/src/components/SearchInput/SearchInput.test.tsx +0 -8
  51. package/src/hooks/useChannelModerationActions.ts +32 -14
  52. package/src/stories/decorators/storyTime.ts +31 -0
  53. package/src/utils/formatRelativeTime.test.ts +1 -32
  54. package/dist/index-BcHUpyyw.js.map +0 -1
  55. package/dist/index-DTZNltUC.cjs +0 -2
  56. package/dist/index-DTZNltUC.cjs.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
2
- import z, { createContext as Ge, useContext as Te, useCallback as W, useState as D, useRef as H, useEffect as Y, useId as En, useMemo as ee, Suspense as He } from "react";
3
- import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
4
- import { Chat as In, DateSeparator as Tn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Dn, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as $n, ReminderNotification as Fn, StreamedMessageText as Bn, messageHasAttachments as Un, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Tt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as pe, useMessageComposer as Xn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Zn, useMessageComposerHasSendableData as Qn, AttachmentPreviewList as es, QuotedMessagePreview as ts, TextareaComposer as ns, MessageTimestamp as Le, AIStates as De, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, ChannelList as cs } from "stream-chat-react";
5
- import { StarIcon as Fe, DotsThreeIcon as ds, SpinnerGapIcon as Ce, SignOutIcon as us, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as ms, SpeakerHighIcon as hs, VideoCameraIcon as Gt, FileMdIcon as fs, FileTextIcon as gs, FileZipIcon as bs, FilePptIcon as ps, FileCsvIcon as vs, FileXlsIcon as xs, FileDocIcon as ws, FilePdfIcon as Ns, CircleNotchIcon as ge, PlayIcon as Be, PauseIcon as _s, LinkIcon as ys, DownloadSimpleIcon as be, GiftIcon as Cs, ThumbsUpIcon as ks, ThumbsDownIcon as Es, TrashSimpleIcon as Ss, XIcon as Ae, ArrowUpIcon as Is, SparkleIcon as Ue, ProhibitIcon as Ts, ArrowLeftIcon as Mt, PencilSimpleIcon as As, CaretLeftIcon as Ms, CaretRightIcon as Rs } from "@phosphor-icons/react";
6
- import C from "classnames";
7
- import { MessageActions as Ls, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
2
+ import j, { createContext as Ge, useContext as Te, useCallback as W, useState as O, useRef as H, useEffect as Y, useId as En, useMemo as ee, Suspense as He } from "react";
3
+ import { StreamChatService as In } from "@linktr.ee/messaging-core";
4
+ import { Chat as Sn, DateSeparator as Tn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Dn, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as $n, ReminderNotification as Fn, StreamedMessageText as Bn, messageHasAttachments as Un, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Tt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as pe, useMessageComposer as Xn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Zn, useMessageComposerHasSendableData as Qn, AttachmentPreviewList as es, QuotedMessagePreview as ts, TextareaComposer as ns, MessageTimestamp as Le, AIStates as De, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, defaultRenderMessages as cs, ChannelList as ds } from "stream-chat-react";
5
+ import { StarIcon as Fe, DotsThreeIcon as us, SpinnerGapIcon as Ce, SignOutIcon as ms, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as hs, SpeakerHighIcon as fs, VideoCameraIcon as Gt, FileMdIcon as gs, FileTextIcon as bs, FileZipIcon as ps, FilePptIcon as vs, FileCsvIcon as xs, FileXlsIcon as ws, FileDocIcon as Ns, FilePdfIcon as _s, CircleNotchIcon as ge, PlayIcon as Be, PauseIcon as ys, LinkIcon as Cs, DownloadSimpleIcon as be, GiftIcon as ks, ThumbsUpIcon as Es, ThumbsDownIcon as Is, TrashSimpleIcon as Ss, XIcon as Ae, ArrowUpIcon as Ts, SparkleIcon as Ue, ProhibitIcon as As, ArrowLeftIcon as Mt, PencilSimpleIcon as Ms, CaretLeftIcon as Rs, CaretRightIcon as Ls } from "@phosphor-icons/react";
6
+ import y from "classnames";
7
+ import { MessageActions as Ds, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
8
8
  import { LinkPreviewsManager as Rt } from "stream-chat";
9
9
  const Yt = Ge({
10
10
  service: null,
@@ -16,7 +16,7 @@ const Yt = Ge({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), qe = () => Te(Yt), wi = ({
19
+ }), qe = () => Te(Yt), Ni = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -25,8 +25,8 @@ const Yt = Ge({
25
25
  debug: i = !1
26
26
  }) => {
27
27
  const o = W(
28
- (E, ...A) => {
29
- i && console.log(`🔥 [MessagingProvider] ${E}`, ...A);
28
+ (k, ...T) => {
29
+ i && console.log(`🔥 [MessagingProvider] ${k}`, ...T);
30
30
  },
31
31
  [i]
32
32
  );
@@ -36,14 +36,14 @@ const Yt = Ge({
36
36
  serviceConfig: !!s,
37
37
  capabilities: Object.keys(r)
38
38
  });
39
- const [l, d] = D(null), [m, b] = D(null), [u, f] = D(!1), [c, g] = D(!1), [v, p] = D(null), N = H(!1), x = H({
39
+ const [l, d] = O(null), [m, b] = O(null), [u, f] = O(!1), [c, g] = O(!1), [p, v] = O(null), N = H(!1), x = H({
40
40
  userId: t == null ? void 0 : t.id,
41
41
  apiKey: a,
42
42
  serviceConfig: s,
43
43
  capabilities: r
44
- }), T = H(0);
45
- T.current++, o("📊 RENDER INFO", {
46
- renderCount: T.current,
44
+ }), I = H(0);
45
+ I.current++, o("📊 RENDER INFO", {
46
+ renderCount: I.current,
47
47
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
48
48
  propChanges: {
49
49
  userChanged: x.current.userId !== (t == null ? void 0 : t.id),
@@ -57,9 +57,9 @@ const Yt = Ge({
57
57
  serviceConfig: s,
58
58
  capabilities: r
59
59
  }, Y(() => {
60
- const E = T.current;
60
+ const k = I.current;
61
61
  if (o("🔧 SERVICE INIT EFFECT TRIGGERED", {
62
- renderCount: E,
62
+ renderCount: k,
63
63
  apiKey: !!a,
64
64
  serviceConfig: !!s,
65
65
  dependencies: {
@@ -70,34 +70,34 @@ const Yt = Ge({
70
70
  }
71
71
  }), !a || !s) {
72
72
  o("⚠️ SERVICE INIT SKIPPED", {
73
- renderCount: E,
73
+ renderCount: k,
74
74
  reason: "Missing apiKey or serviceConfig"
75
75
  });
76
76
  return;
77
77
  }
78
78
  o("🚀 CREATING NEW SERVICE", {
79
- renderCount: E,
79
+ renderCount: k,
80
80
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
81
81
  serviceConfigChanged: x.current.serviceConfig !== s
82
82
  });
83
- const A = new Sn({
83
+ const T = new In({
84
84
  ...s,
85
85
  apiKey: a,
86
86
  debug: i
87
87
  });
88
- return d(A), o("✅ SERVICE SET", {
89
- renderCount: E,
90
- serviceInstance: !!A
88
+ return d(T), o("✅ SERVICE SET", {
89
+ renderCount: k,
90
+ serviceInstance: !!T
91
91
  }), () => {
92
92
  o("🧹 SERVICE CLEANUP", {
93
- renderCount: E,
93
+ renderCount: k,
94
94
  reason: "Effect cleanup"
95
- }), A.disconnectUser().catch(console.error);
95
+ }), T.disconnectUser().catch(console.error);
96
96
  };
97
97
  }, [a, s, i, o]);
98
- const S = H(null);
98
+ const E = H(null);
99
99
  Y(() => {
100
- var A, y;
100
+ var T, _;
101
101
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
102
102
  hasService: !!l,
103
103
  hasUser: !!t,
@@ -113,7 +113,7 @@ const Yt = Ge({
113
113
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
114
114
  return;
115
115
  }
116
- if (((A = S.current) == null ? void 0 : A.serviceId) === l && ((y = S.current) == null ? void 0 : y.userId) === t.id) {
116
+ if (((T = E.current) == null ? void 0 : T.serviceId) === l && ((_ = E.current) == null ? void 0 : _.userId) === t.id) {
117
117
  o(
118
118
  "⚠️ USER CONNECTION SKIPPED",
119
119
  "Already connected this user with this service"
@@ -121,19 +121,19 @@ const Yt = Ge({
121
121
  return;
122
122
  }
123
123
  (async () => {
124
- o("🚀 STARTING USER CONNECTION", { userId: t.id }), N.current = !0, g(!0), p(null);
124
+ o("🚀 STARTING USER CONNECTION", { userId: t.id }), N.current = !0, g(!0), v(null);
125
125
  try {
126
126
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
127
- const _ = await l.connectUser(t);
128
- b(_), f(!0), S.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
127
+ const S = await l.connectUser(t);
128
+ b(S), f(!0), E.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
129
129
  userId: t.id,
130
- clientId: _.userID
130
+ clientId: S.userID
131
131
  });
132
- } catch (_) {
133
- const I = _ instanceof Error ? _.message : "Connection failed";
134
- p(I), o("❌ USER CONNECTION ERROR", {
132
+ } catch (S) {
133
+ const R = S instanceof Error ? S.message : "Connection failed";
134
+ v(R), o("❌ USER CONNECTION ERROR", {
135
135
  userId: t.id,
136
- error: I
136
+ error: R
137
137
  });
138
138
  } finally {
139
139
  g(!1), N.current = !1, o("🔄 USER CONNECTION FINISHED", {
@@ -149,12 +149,12 @@ const Yt = Ge({
149
149
  l && u ? (o(
150
150
  "🧹 CLEANUP EFFECT TRIGGERED",
151
151
  "Cleaning up connection on unmount"
152
- ), S.current = null, l.disconnectUser().catch(console.error)) : o("🔇 CLEANUP EFFECT SKIPPED", {
152
+ ), E.current = null, l.disconnectUser().catch(console.error)) : o("🔇 CLEANUP EFFECT SKIPPED", {
153
153
  hasService: !!l,
154
154
  isConnected: u
155
155
  });
156
156
  }), [l, u, o]);
157
- const R = W(async () => {
157
+ const M = W(async () => {
158
158
  if (o("🔄 REFRESH CONNECTION CALLED", {
159
159
  hasService: !!l,
160
160
  hasUser: !!t
@@ -165,50 +165,50 @@ const Yt = Ge({
165
165
  o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), g(!0);
166
166
  try {
167
167
  o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
168
- const E = await l.connectUser(t);
169
- b(E), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
170
- } catch (E) {
171
- const A = E instanceof Error ? E.message : "Refresh failed";
172
- p(A), o("❌ CONNECTION REFRESH ERROR", {
168
+ const k = await l.connectUser(t);
169
+ b(k), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
170
+ } catch (k) {
171
+ const T = k instanceof Error ? k.message : "Refresh failed";
172
+ v(T), o("❌ CONNECTION REFRESH ERROR", {
173
173
  userId: t.id,
174
- error: A
174
+ error: T
175
175
  });
176
176
  } finally {
177
177
  g(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
178
178
  }
179
- }, [l, t, o]), O = z.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
179
+ }, [l, t, o]), P = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
180
180
  hasService: !!l,
181
181
  hasClient: !!m,
182
182
  isConnected: u,
183
183
  isLoading: c,
184
- hasError: !!v,
184
+ hasError: !!p,
185
185
  capabilitiesKeys: Object.keys(r)
186
186
  }), {
187
187
  service: l,
188
188
  client: m,
189
189
  isConnected: u,
190
190
  isLoading: c,
191
- error: v,
191
+ error: p,
192
192
  capabilities: r,
193
- refreshConnection: R,
193
+ refreshConnection: M,
194
194
  debug: i
195
195
  }), [
196
196
  l,
197
197
  m,
198
198
  u,
199
199
  c,
200
- v,
200
+ p,
201
201
  r,
202
- R,
202
+ M,
203
203
  i,
204
204
  o
205
205
  ]);
206
206
  return o("🔄 RENDER END", {
207
- renderCount: T.current,
207
+ renderCount: I.current,
208
208
  willRenderChat: !!(m && u),
209
- contextValueReady: !!O
210
- }), /* @__PURE__ */ n(Yt.Provider, { value: O, children: m && u ? /* @__PURE__ */ n(
211
- In,
209
+ contextValueReady: !!P
210
+ }), /* @__PURE__ */ n(Yt.Provider, { value: P, children: m && u ? /* @__PURE__ */ n(
211
+ Sn,
212
212
  {
213
213
  client: m,
214
214
  customClasses: {
@@ -217,9 +217,9 @@ const Yt = Ge({
217
217
  children: e
218
218
  }
219
219
  ) : e });
220
- }, Ds = () => qe(), qt = (e) => {
220
+ }, Ps = () => qe(), qt = (e) => {
221
221
  var a, r;
222
- const [t, s] = D(
222
+ const [t, s] = O(
223
223
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
224
224
  );
225
225
  return Y(() => {
@@ -239,13 +239,13 @@ const Yt = Ge({
239
239
  e.off("member.updated", i);
240
240
  };
241
241
  }, [e]), t;
242
- }, Ps = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
243
- function Os(e) {
244
- return Ps.test(e.trim());
242
+ }, Os = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
243
+ function zs(e) {
244
+ return Os.test(e.trim());
245
245
  }
246
246
  function Lt(e, t) {
247
247
  const s = e == null ? void 0 : e.trim();
248
- return !s || t && s === t ? !1 : !Os(s);
248
+ return !s || t && s === t ? !1 : !zs(s);
249
249
  }
250
250
  function Wt(e) {
251
251
  return Lt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Lt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
@@ -278,7 +278,7 @@ const Dt = [
278
278
  "🍈"
279
279
  // Melon
280
280
  ];
281
- function zs(e) {
281
+ function $s(e) {
282
282
  let t = 0;
283
283
  for (let s = 0; s < e.length; s++) {
284
284
  const a = e.charCodeAt(s);
@@ -286,8 +286,8 @@ function zs(e) {
286
286
  }
287
287
  return Math.abs(t);
288
288
  }
289
- function $s(e) {
290
- const s = zs(e) % Dt.length;
289
+ function Fs(e) {
290
+ const s = $s(e) % Dt.length;
291
291
  return Dt[s];
292
292
  }
293
293
  const ae = ({
@@ -299,7 +299,7 @@ const ae = ({
299
299
  shape: i = "squircle",
300
300
  dmAgentEnabled: o = !1
301
301
  }) => {
302
- const l = $s(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", b = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
302
+ const l = Fs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", b = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
303
303
  "img",
304
304
  {
305
305
  src: t,
@@ -310,7 +310,7 @@ const ae = ({
310
310
  "div",
311
311
  {
312
312
  "aria-hidden": "true",
313
- className: C(
313
+ className: y(
314
314
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
315
315
  m
316
316
  ),
@@ -320,7 +320,7 @@ const ae = ({
320
320
  return /* @__PURE__ */ h(
321
321
  "div",
322
322
  {
323
- className: C(
323
+ className: y(
324
324
  "relative flex-shrink-0 !bg-transparent",
325
325
  a
326
326
  ),
@@ -342,7 +342,7 @@ const ae = ({
342
342
  "div",
343
343
  {
344
344
  "data-testid": "avatar-ring",
345
- className: C(
345
+ className: y(
346
346
  "h-full w-full",
347
347
  "bg-transparent"
348
348
  ),
@@ -361,7 +361,7 @@ const ae = ({
361
361
  ]
362
362
  }
363
363
  );
364
- }, Fs = "https://linktr.ee/s/about/trust-center/report", Bs = ({
364
+ }, Bs = "https://linktr.ee/s/about/trust-center/report", Us = ({
365
365
  channel: e,
366
366
  participant: t,
367
367
  showBlockParticipant: s = !0,
@@ -374,80 +374,78 @@ const ae = ({
374
374
  onActionComplete: m,
375
375
  logLabel: b = "useChannelModerationActions"
376
376
  }) => {
377
- var y;
378
- const { service: u, debug: f } = qe(), [c, g] = D(!1), [v, p] = D(!1), [N, x] = D(!1), [T, S] = D(!1);
377
+ var $;
378
+ const { service: u, debug: f } = qe(), c = ($ = t == null ? void 0 : t.user) == null ? void 0 : $.id, g = !!(a && s && u && c), [p, v] = O(!1), [N, x] = O(null), [I, E] = O(!1), [M, P] = O(!1), k = g && ((N == null ? void 0 : N.participantId) !== c || (N == null ? void 0 : N.service) !== u);
379
379
  return Y(() => {
380
- var L;
381
- if (!a || !s || !u || !((L = t == null ? void 0 : t.user) != null && L.id)) {
382
- g(!1), p(!1);
380
+ if (!g || !u || !c) {
381
+ v(!1), x(null);
383
382
  return;
384
383
  }
385
- let _ = !1;
386
- const I = t.user.id;
387
- return p(!0), (async () => {
384
+ let A = !1;
385
+ return (async () => {
388
386
  try {
389
- const M = await u.getBlockedUsers();
390
- if (_) return;
391
- g(
392
- M.some(
393
- (j) => j.blocked_user_id === I
387
+ const D = await u.getBlockedUsers();
388
+ if (A) return;
389
+ v(
390
+ D.some(
391
+ (z) => z.blocked_user_id === c
394
392
  )
395
393
  );
396
- } catch (M) {
397
- _ || console.error(`[${b}] Failed to check blocked status:`, M);
394
+ } catch (D) {
395
+ A || console.error(`[${b}] Failed to check blocked status:`, D);
398
396
  } finally {
399
- _ || p(!1);
397
+ A || x({ participantId: c, service: u });
400
398
  }
401
399
  })(), () => {
402
- _ = !0;
400
+ A = !0;
403
401
  };
404
- }, [a, u, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id, s, b]), {
405
- isParticipantBlocked: c,
406
- isCheckingBlockedStatus: v,
407
- isLeaving: N,
408
- isUpdatingBlockStatus: T,
402
+ }, [g, u, c, b]), {
403
+ isParticipantBlocked: p,
404
+ isCheckingBlockedStatus: k,
405
+ isLeaving: I,
406
+ isUpdatingBlockStatus: M,
409
407
  handleLeaveConversation: async () => {
410
- var _;
411
- if (!N) {
412
- o == null || o(), f && console.log(`[${b}] Leave conversation`, e.cid), x(!0);
408
+ var A;
409
+ if (!I) {
410
+ o == null || o(), f && console.log(`[${b}] Leave conversation`, e.cid), E(!0);
413
411
  try {
414
- const I = ((_ = e._client) == null ? void 0 : _.userID) ?? null;
415
- await e.hide(I, !1), r && await r(e), m == null || m();
416
- } catch (I) {
417
- console.error(`[${b}] Failed to leave conversation`, I);
412
+ const D = ((A = e._client) == null ? void 0 : A.userID) ?? null;
413
+ await e.hide(D, !1), r && await r(e), m == null || m();
414
+ } catch (D) {
415
+ console.error(`[${b}] Failed to leave conversation`, D);
418
416
  } finally {
419
- x(!1);
417
+ E(!1);
420
418
  }
421
419
  }
422
420
  },
423
421
  handleBlockUser: async () => {
424
- var _, I, L;
425
- if (!(T || !u)) {
426
- l == null || l(), f && console.log(`[${b}] Block member`, (_ = t == null ? void 0 : t.user) == null ? void 0 : _.id), S(!0);
422
+ var A, D, z;
423
+ if (!(M || !u)) {
424
+ l == null || l(), f && console.log(`[${b}] Block member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), P(!0);
427
425
  try {
428
- await u.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((L = t == null ? void 0 : t.user) == null ? void 0 : L.id), m == null || m();
429
- } catch (M) {
430
- console.error(`[${b}] Failed to block member`, M);
426
+ await u.blockUser((D = t == null ? void 0 : t.user) == null ? void 0 : D.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
427
+ } catch (G) {
428
+ console.error(`[${b}] Failed to block member`, G);
431
429
  } finally {
432
- S(!1);
430
+ P(!1);
433
431
  }
434
432
  }
435
433
  },
436
434
  handleUnblockUser: async () => {
437
- var _, I, L;
438
- if (!(T || !u)) {
439
- l == null || l(), f && console.log(`[${b}] Unblock member`, (_ = t == null ? void 0 : t.user) == null ? void 0 : _.id), S(!0);
435
+ var A, D, z;
436
+ if (!(M || !u)) {
437
+ l == null || l(), f && console.log(`[${b}] Unblock member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), P(!0);
440
438
  try {
441
- await u.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((L = t == null ? void 0 : t.user) == null ? void 0 : L.id), m == null || m();
442
- } catch (M) {
443
- console.error(`[${b}] Failed to unblock member`, M);
439
+ await u.unBlockUser((D = t == null ? void 0 : t.user) == null ? void 0 : D.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
440
+ } catch (G) {
441
+ console.error(`[${b}] Failed to unblock member`, G);
444
442
  } finally {
445
- S(!1);
443
+ P(!1);
446
444
  }
447
445
  }
448
446
  },
449
447
  handleReportUser: () => {
450
- d == null || d(), m == null || m(), window.open(Fs, "_blank", "noopener,noreferrer");
448
+ d == null || d(), m == null || m(), window.open(Bs, "_blank", "noopener,noreferrer");
451
449
  }
452
450
  };
453
451
  }, he = ({
@@ -459,7 +457,7 @@ const ae = ({
459
457
  "button",
460
458
  {
461
459
  type: "button",
462
- className: C(
460
+ className: y(
463
461
  "flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
464
462
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
465
463
  t
@@ -481,16 +479,16 @@ const ae = ({
481
479
  customChannelActions: b,
482
480
  triggerClassName: u
483
481
  }) => {
484
- const [f, c] = D(!1), g = H(null), v = En(), p = W(() => c(!1), []), {
482
+ const [f, c] = O(!1), g = H(null), p = En(), v = W(() => c(!1), []), {
485
483
  isParticipantBlocked: N,
486
484
  isCheckingBlockedStatus: x,
487
- isLeaving: T,
488
- isUpdatingBlockStatus: S,
489
- handleLeaveConversation: R,
490
- handleBlockUser: O,
491
- handleUnblockUser: E,
492
- handleReportUser: A
493
- } = Bs({
485
+ isLeaving: I,
486
+ isUpdatingBlockStatus: E,
487
+ handleLeaveConversation: M,
488
+ handleBlockUser: P,
489
+ handleUnblockUser: k,
490
+ handleReportUser: T
491
+ } = Us({
494
492
  channel: e,
495
493
  participant: t,
496
494
  showBlockParticipant: a,
@@ -500,18 +498,18 @@ const ae = ({
500
498
  onDeleteConversationClick: l,
501
499
  onBlockParticipantClick: d,
502
500
  onReportParticipantClick: m,
503
- onActionComplete: p,
501
+ onActionComplete: v,
504
502
  logLabel: "ChannelActionsMenu"
505
503
  });
506
504
  return Y(() => {
507
505
  if (!f) return;
508
- const _ = (L) => {
509
- g.current && !g.current.contains(L.target) && c(!1);
510
- }, I = (L) => {
511
- L.key === "Escape" && c(!1);
506
+ const S = ($) => {
507
+ g.current && !g.current.contains($.target) && c(!1);
508
+ }, R = ($) => {
509
+ $.key === "Escape" && c(!1);
512
510
  };
513
- return document.addEventListener("mousedown", _), document.addEventListener("keydown", I), () => {
514
- document.removeEventListener("mousedown", _), document.removeEventListener("keydown", I);
511
+ return document.addEventListener("mousedown", S), document.addEventListener("keydown", R), () => {
512
+ document.removeEventListener("mousedown", S), document.removeEventListener("keydown", R);
515
513
  };
516
514
  }, [f]), !t || !(s || a || r || !!b) ? null : /* @__PURE__ */ h("div", { ref: g, className: "relative", children: [
517
515
  /* @__PURE__ */ h(
@@ -521,10 +519,10 @@ const ae = ({
521
519
  type: "button",
522
520
  "aria-haspopup": "true",
523
521
  "aria-expanded": f,
524
- "aria-controls": f ? v : void 0,
525
- onClick: () => c((_) => !_),
522
+ "aria-controls": f ? p : void 0,
523
+ onClick: () => c((S) => !S),
526
524
  children: [
527
- /* @__PURE__ */ n(ds, { className: "size-5 text-black/90" }),
525
+ /* @__PURE__ */ n(us, { className: "size-5 text-black/90" }),
528
526
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
529
527
  ]
530
528
  }
@@ -532,9 +530,9 @@ const ae = ({
532
530
  f && /* @__PURE__ */ n(
533
531
  "div",
534
532
  {
535
- id: v,
533
+ id: p,
536
534
  "aria-label": "Conversation options",
537
- className: C(
535
+ className: y(
538
536
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
539
537
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
540
538
  ),
@@ -542,11 +540,11 @@ const ae = ({
542
540
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
543
541
  he,
544
542
  {
545
- onClick: R,
546
- disabled: T,
547
- "aria-busy": T,
543
+ onClick: M,
544
+ disabled: I,
545
+ "aria-busy": I,
548
546
  children: [
549
- T ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(us, { className: "h-5 w-5" }),
547
+ I ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ms, { className: "h-5 w-5" }),
550
548
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
551
549
  ]
552
550
  }
@@ -561,27 +559,27 @@ const ae = ({
561
559
  ) : N ? /* @__PURE__ */ h(
562
560
  he,
563
561
  {
564
- onClick: E,
565
- disabled: S,
566
- "aria-busy": S,
562
+ onClick: k,
563
+ disabled: E,
564
+ "aria-busy": E,
567
565
  children: [
568
- S ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(At, { className: "h-5 w-5" }),
566
+ E ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(At, { className: "h-5 w-5" }),
569
567
  /* @__PURE__ */ n("span", { children: "Unblock" })
570
568
  ]
571
569
  }
572
570
  ) : /* @__PURE__ */ h(
573
571
  he,
574
572
  {
575
- onClick: O,
576
- disabled: S,
577
- "aria-busy": S,
573
+ onClick: P,
574
+ disabled: E,
575
+ "aria-busy": E,
578
576
  children: [
579
- S ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(At, { className: "h-5 w-5" }),
577
+ E ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(At, { className: "h-5 w-5" }),
580
578
  /* @__PURE__ */ n("span", { children: "Block" })
581
579
  ]
582
580
  }
583
581
  ) }),
584
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(he, { variant: "danger", onClick: A, children: [
582
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(he, { variant: "danger", onClick: T, children: [
585
583
  /* @__PURE__ */ n(jt, { className: "h-5 w-5" }),
586
584
  /* @__PURE__ */ n("span", { children: "Report" })
587
585
  ] }) }),
@@ -590,13 +588,13 @@ const ae = ({
590
588
  }
591
589
  )
592
590
  ] });
593
- }, Us = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
594
- function js(e) {
591
+ }, js = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
592
+ function Vs(e) {
595
593
  return e != null && e.length ? e.some((t) => t.type === Ve) ? "down" : e.some((t) => t.type === je) ? "up" : null : null;
596
594
  }
597
- function Vs(e) {
595
+ function Gs(e) {
598
596
  const { channel: t } = ce(), { client: s } = Ye("useMessageVote"), a = ee(
599
- () => js(e.own_reactions),
597
+ () => Vs(e.own_reactions),
600
598
  [e.own_reactions]
601
599
  ), r = W(async () => {
602
600
  if (s != null && s.userID)
@@ -621,7 +619,7 @@ function Vs(e) {
621
619
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
622
620
  return { selected: a, voteUp: r, voteDown: i };
623
621
  }
624
- function Gs(e) {
622
+ function Hs(e) {
625
623
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
626
624
  }
627
625
  function Xt({
@@ -629,16 +627,16 @@ function Xt({
629
627
  viewerLanguage: t
630
628
  }) {
631
629
  var r;
632
- const s = e == null ? void 0 : e.text, a = Gs(t);
630
+ const s = e == null ? void 0 : e.text, a = Hs(t);
633
631
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
634
632
  }
635
- const Hs = z.lazy(() => import("./Card-DchJqvYq.js")), Ys = z.lazy(() => import("./Card-DmPpcrSU.js")), qs = z.lazy(() => import("./Card-B7AF5uOB.js")), We = () => /* @__PURE__ */ n(
633
+ const Ys = j.lazy(() => import("./Card-DE5bfj0l.js")), qs = j.lazy(() => import("./Card-C4ncqjxJ.js")), Ws = j.lazy(() => import("./Card-IjOI7UXs.js")), We = () => /* @__PURE__ */ n(
636
634
  "div",
637
635
  {
638
636
  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)]",
639
637
  "aria-hidden": !0
640
638
  }
641
- ), Ws = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Xs = Kt, Ks = Jt, Ot = { Composer: Ws, Sent: Kt, Received: Jt, Creator: Xs, Visitor: Ks }, Js = [
639
+ ), Xs = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Ks = Kt, Js = Jt, Ot = { Composer: Xs, Sent: Kt, Received: Jt, Creator: Ks, Visitor: Js }, Zs = [
642
640
  [/pdf/, "pdf"],
643
641
  [/wordprocessingml|msword|\.doc/, "doc"],
644
642
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -652,38 +650,38 @@ function ne(e) {
652
650
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
653
651
  }
654
652
  function Zt(e) {
655
- const t = Js.find(
653
+ const t = Zs.find(
656
654
  ([s]) => s.test(e)
657
655
  );
658
656
  return t ? t[1] : "generic";
659
657
  }
660
- const Zs = {
658
+ const Qs = {
661
659
  video: Gt,
662
- audio: hs,
663
- image: ms,
660
+ audio: fs,
661
+ image: hs,
664
662
  document: Vt
665
- }, Qs = {
666
- pdf: Ns,
667
- doc: ws,
668
- xls: xs,
669
- csv: vs,
670
- ppt: ps,
671
- zip: bs,
672
- text: gs,
673
- markdown: fs,
663
+ }, ea = {
664
+ pdf: _s,
665
+ doc: Ns,
666
+ xls: ws,
667
+ csv: xs,
668
+ ppt: vs,
669
+ zip: ps,
670
+ text: bs,
671
+ markdown: gs,
674
672
  generic: Vt
675
673
  };
676
- function ea(e) {
674
+ function ta(e) {
677
675
  const t = ne(e);
678
- return t !== "document" ? Zs[t] : Qs[Zt(e)];
676
+ return t !== "document" ? Qs[t] : ea[Zt(e)];
679
677
  }
680
678
  function le(e, t) {
681
- return z.createElement(ea(e), t);
679
+ return j.createElement(ta(e), t);
682
680
  }
683
- const ta = (e) => {
681
+ const na = (e) => {
684
682
  var t, s;
685
683
  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;
686
- }, na = ({
684
+ }, sa = ({
687
685
  source: e,
688
686
  mimeType: t,
689
687
  poster: s,
@@ -695,66 +693,66 @@ const ta = (e) => {
695
693
  muted: d = !1,
696
694
  onContainerClick: m
697
695
  }) => {
698
- const b = ne(t), u = H(null), f = H(null), c = H(null), g = H(r), [v, p] = D(a), [N, x] = D(0), [T, S] = D(!1), [R, O] = D(!1), [E, A] = D(!1), [y, _] = D(!1), [I, L] = D(!0), [M, j] = D(null), V = W(() => {
699
- A(!1), p(!0);
696
+ const b = ne(t), u = H(null), f = H(null), c = H(null), g = H(r), [p, v] = O(a), [N, x] = O(0), [I, E] = O(!1), [M, P] = O(!1), [k, T] = O(!1), [_, S] = O(!1), [R, $] = O(!0), [A, D] = O(null), z = W(() => {
697
+ T(!1), v(!0);
700
698
  }, []), G = W((w) => {
701
- const k = f.current;
702
- if (!k) return 0;
703
- const B = k.getBoundingClientRect();
699
+ const C = f.current;
700
+ if (!C) return 0;
701
+ const U = C.getBoundingClientRect();
704
702
  return Math.max(
705
703
  0,
706
- Math.min(1, (ta(w) - B.left) / B.width)
704
+ Math.min(1, (na(w) - U.left) / U.width)
707
705
  );
708
- }, []), $ = W((w) => {
709
- const k = u.current;
710
- k && k.duration && (k.currentTime = w * k.duration);
711
- }, []), F = (w) => {
712
- w.stopPropagation(), S(!0);
713
- const k = G(w);
714
- x(k), $(k);
706
+ }, []), F = W((w) => {
707
+ const C = u.current;
708
+ C && C.duration && (C.currentTime = w * C.duration);
709
+ }, []), B = (w) => {
710
+ w.stopPropagation(), E(!0);
711
+ const C = G(w);
712
+ x(C), F(C);
715
713
  };
716
714
  Y(() => {
717
- r !== void 0 && r !== g.current && (g.current = r, p(r));
715
+ r !== void 0 && r !== g.current && (g.current = r, v(r));
718
716
  }, [r]), Y(() => {
719
- if (!v) {
717
+ if (!p) {
720
718
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
721
719
  return;
722
720
  }
723
721
  const w = () => {
724
- const k = u.current;
725
- k && k.duration && !T && x(k.currentTime / k.duration), c.current = requestAnimationFrame(w);
722
+ const C = u.current;
723
+ C && C.duration && !I && x(C.currentTime / C.duration), c.current = requestAnimationFrame(w);
726
724
  };
727
725
  return c.current = requestAnimationFrame(w), () => {
728
726
  c.current !== null && cancelAnimationFrame(c.current);
729
727
  };
730
- }, [v, T]), Y(() => {
728
+ }, [p, I]), Y(() => {
731
729
  const w = u.current;
732
- w && (v ? w.play().catch((k) => {
733
- p(!1), A(!0);
730
+ w && (p ? w.play().catch((C) => {
731
+ v(!1), T(!0);
734
732
  }) : w.pause());
735
- }, [v]), Y(() => {
736
- if (!T) return;
737
- const w = (B) => x(G(B)), k = (B) => {
738
- S(!1), $(G(B));
733
+ }, [p]), Y(() => {
734
+ if (!I) return;
735
+ const w = (U) => x(G(U)), C = (U) => {
736
+ E(!1), F(G(U));
739
737
  };
740
- return window.addEventListener("mousemove", w), window.addEventListener("mouseup", k), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", k), () => {
741
- window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", k);
738
+ return window.addEventListener("mousemove", w), window.addEventListener("mouseup", C), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", C), () => {
739
+ window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", C);
742
740
  };
743
- }, [T, G, $]);
744
- const X = M ? { aspectRatio: String(M) } : void 0, U = M ? "" : " aspect-video", P = Math.round(N * 100);
741
+ }, [I, G, F]);
742
+ const X = A ? { aspectRatio: String(A) } : void 0, V = A ? "" : " aspect-video", L = Math.round(N * 100);
745
743
  return /* @__PURE__ */ h(
746
744
  "div",
747
745
  {
748
746
  role: "button",
749
747
  tabIndex: 0,
750
- className: `relative cursor-pointer overflow-hidden bg-black ${U}`,
748
+ className: `relative cursor-pointer overflow-hidden bg-black ${V}`,
751
749
  style: X,
752
750
  onClick: (w) => {
753
751
  if (m) {
754
752
  m(w);
755
753
  return;
756
754
  }
757
- E || o && p((k) => !k);
755
+ k || o && v((C) => !C);
758
756
  },
759
757
  onKeyDown: (w) => {
760
758
  if (!(w.key !== "Enter" && w.key !== " ")) {
@@ -762,11 +760,11 @@ const ta = (e) => {
762
760
  m(w);
763
761
  return;
764
762
  }
765
- E || o && p((k) => !k);
763
+ k || o && v((C) => !C);
766
764
  }
767
765
  },
768
766
  children: [
769
- s && (b === "audio" || I) && /* @__PURE__ */ n(
767
+ s && (b === "audio" || R) && /* @__PURE__ */ n(
770
768
  "img",
771
769
  {
772
770
  src: s,
@@ -774,7 +772,7 @@ const ta = (e) => {
774
772
  className: "absolute inset-0 h-full w-full object-cover"
775
773
  }
776
774
  ),
777
- !s && (b === "audio" || I) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
775
+ !s && (b === "audio" || R) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
778
776
  className: "size-12 text-black/20",
779
777
  weight: "regular"
780
778
  }) }),
@@ -786,14 +784,14 @@ const ta = (e) => {
786
784
  loop: i,
787
785
  muted: d,
788
786
  style: { width: "100%", height: "100%" },
789
- onLoadStart: () => _(!0),
787
+ onLoadStart: () => S(!0),
790
788
  onCanPlay: () => {
791
- _(!1), L(!1);
789
+ S(!1), $(!1);
792
790
  },
793
- onWaiting: () => _(!0),
794
- onPlay: () => A(!1),
791
+ onWaiting: () => S(!0),
792
+ onPlay: () => T(!1),
795
793
  onEnded: () => {
796
- i || (p(!1), x(0));
794
+ i || (v(!1), x(0));
797
795
  },
798
796
  children: /* @__PURE__ */ n("track", { kind: "captions" })
799
797
  }
@@ -806,30 +804,30 @@ const ta = (e) => {
806
804
  muted: d,
807
805
  playsInline: !0,
808
806
  style: { width: "100%", height: "100%" },
809
- onLoadStart: () => _(!0),
807
+ onLoadStart: () => S(!0),
810
808
  onCanPlay: () => {
811
- _(!1), L(!1);
809
+ S(!1), $(!1);
812
810
  },
813
- onWaiting: () => _(!0),
814
- onPlay: () => A(!1),
811
+ onWaiting: () => S(!0),
812
+ onPlay: () => T(!1),
815
813
  onLoadedMetadata: () => {
816
814
  const w = u.current;
817
- w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && j(w.videoWidth / w.videoHeight);
815
+ w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && D(w.videoWidth / w.videoHeight);
818
816
  },
819
817
  onEnded: () => {
820
- i || (p(!1), x(0));
818
+ i || (v(!1), x(0));
821
819
  },
822
820
  children: /* @__PURE__ */ n("track", { kind: "captions" })
823
821
  }
824
822
  ) }),
825
- y && !E && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
823
+ _ && !k && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
826
824
  ge,
827
825
  {
828
826
  className: "size-8 animate-spin text-white/80",
829
827
  weight: "bold"
830
828
  }
831
829
  ) }),
832
- E && !o && /* @__PURE__ */ n(
830
+ k && !o && /* @__PURE__ */ n(
833
831
  "div",
834
832
  {
835
833
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -837,10 +835,10 @@ const ta = (e) => {
837
835
  tabIndex: 0,
838
836
  "aria-label": "Play preview",
839
837
  onClick: (w) => {
840
- w.stopPropagation(), V();
838
+ w.stopPropagation(), z();
841
839
  },
842
840
  onKeyDown: (w) => {
843
- w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), V());
841
+ w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), z());
844
842
  },
845
843
  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(Be, { className: "size-9 translate-x-0.5", weight: "fill" }) })
846
844
  }
@@ -850,23 +848,23 @@ const ta = (e) => {
850
848
  {
851
849
  role: "slider",
852
850
  "aria-label": "Playback position",
853
- "aria-valuenow": P,
851
+ "aria-valuenow": L,
854
852
  "aria-valuemin": 0,
855
853
  "aria-valuemax": 100,
856
854
  tabIndex: 0,
857
855
  ref: f,
858
856
  className: "relative flex h-4 w-full cursor-pointer items-center",
859
- onMouseDown: F,
860
- onTouchStart: F,
857
+ onMouseDown: B,
858
+ onTouchStart: B,
861
859
  onClick: (w) => w.stopPropagation(),
862
860
  onKeyDown: (w) => {
863
- w.key === "ArrowRight" && $(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && $(Math.max(0, N - 0.05));
861
+ w.key === "ArrowRight" && F(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, N - 0.05));
864
862
  },
865
863
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
866
864
  "div",
867
865
  {
868
866
  className: "h-full rounded-full bg-white",
869
- style: { width: `${P}%` }
867
+ style: { width: `${L}%` }
870
868
  }
871
869
  ) })
872
870
  }
@@ -877,11 +875,11 @@ const ta = (e) => {
877
875
  {
878
876
  type: "button",
879
877
  onClick: (w) => {
880
- w.stopPropagation(), p((k) => !k);
878
+ w.stopPropagation(), v((C) => !C);
881
879
  },
882
880
  className: "shrink-0 text-white",
883
- "aria-label": v ? "Pause" : "Play",
884
- children: v ? /* @__PURE__ */ n(_s, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
881
+ "aria-label": p ? "Pause" : "Play",
882
+ children: p ? /* @__PURE__ */ n(ys, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
885
883
  }
886
884
  ),
887
885
  /* @__PURE__ */ h(
@@ -889,30 +887,30 @@ const ta = (e) => {
889
887
  {
890
888
  role: "slider",
891
889
  "aria-label": "Playback position",
892
- "aria-valuenow": P,
890
+ "aria-valuenow": L,
893
891
  "aria-valuemin": 0,
894
892
  "aria-valuemax": 100,
895
893
  tabIndex: 0,
896
894
  ref: f,
897
895
  className: "relative flex h-4 w-full cursor-pointer items-center",
898
- onMouseDown: F,
899
- onTouchStart: F,
896
+ onMouseDown: B,
897
+ onTouchStart: B,
900
898
  onClick: (w) => w.stopPropagation(),
901
- onMouseEnter: () => O(!0),
902
- onMouseLeave: () => O(!1),
899
+ onMouseEnter: () => P(!0),
900
+ onMouseLeave: () => P(!1),
903
901
  onKeyDown: (w) => {
904
- w.key === "ArrowRight" && $(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && $(Math.max(0, N - 0.05));
902
+ w.key === "ArrowRight" && F(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, N - 0.05));
905
903
  },
906
904
  children: [
907
905
  /* @__PURE__ */ n(
908
906
  "div",
909
907
  {
910
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || T ? "h-1.5" : "h-1"}`,
908
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${M || I ? "h-1.5" : "h-1"}`,
911
909
  children: /* @__PURE__ */ n(
912
910
  "div",
913
911
  {
914
912
  className: "h-full rounded-full bg-white",
915
- style: { width: `${P}%` }
913
+ style: { width: `${L}%` }
916
914
  }
917
915
  )
918
916
  }
@@ -920,8 +918,8 @@ const ta = (e) => {
920
918
  /* @__PURE__ */ n(
921
919
  "div",
922
920
  {
923
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || T ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
924
- style: { left: `${P}%` }
921
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${M || I ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
922
+ style: { left: `${L}%` }
925
923
  }
926
924
  )
927
925
  ]
@@ -931,7 +929,7 @@ const ta = (e) => {
931
929
  ]
932
930
  }
933
931
  );
934
- }, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", sa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Qt = ({
932
+ }, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", aa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Qt = ({
935
933
  mimeType: e,
936
934
  sourceUrl: t,
937
935
  thumbnailUrl: s,
@@ -940,9 +938,9 @@ const ta = (e) => {
940
938
  mediaPlayerProps: i,
941
939
  containedImage: o = !1
942
940
  }) => {
943
- const l = ne(e), [d, m] = D(!1);
941
+ const l = ne(e), [d, m] = O(!1);
944
942
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
945
- na,
943
+ sa,
946
944
  {
947
945
  source: t,
948
946
  mimeType: e,
@@ -993,7 +991,7 @@ const ta = (e) => {
993
991
  weight: "regular"
994
992
  })
995
993
  }
996
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${sa(r)}`, children: /* @__PURE__ */ n(
994
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${aa(r)}`, children: /* @__PURE__ */ n(
997
995
  "img",
998
996
  {
999
997
  src: s,
@@ -1031,7 +1029,7 @@ const ta = (e) => {
1031
1029
  {
1032
1030
  ref: b,
1033
1031
  "data-testid": u,
1034
- className: C(
1032
+ className: y(
1035
1033
  "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)]",
1036
1034
  f ? "bg-[#121110]" : "bg-white"
1037
1035
  ),
@@ -1043,7 +1041,7 @@ const ta = (e) => {
1043
1041
  c.trim() !== "" && /* @__PURE__ */ n(
1044
1042
  "p",
1045
1043
  {
1046
- className: C("mb-0.5 truncate text-base font-medium", {
1044
+ className: y("mb-0.5 truncate text-base font-medium", {
1047
1045
  "text-black": !f,
1048
1046
  "text-white/30": f && g,
1049
1047
  "text-white": f && !g
@@ -1053,7 +1051,7 @@ const ta = (e) => {
1053
1051
  ),
1054
1052
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1055
1053
  le(r, {
1056
- className: C(
1054
+ className: y(
1057
1055
  "size-5 shrink-0",
1058
1056
  f ? "text-white/55" : "text-black/55"
1059
1057
  ),
@@ -1062,7 +1060,7 @@ const ta = (e) => {
1062
1060
  i != null && i !== "" && /* @__PURE__ */ n(
1063
1061
  "span",
1064
1062
  {
1065
- className: C(
1063
+ className: y(
1066
1064
  "text-xs font-medium",
1067
1065
  f ? "text-white/55" : "text-black/55"
1068
1066
  ),
@@ -1083,23 +1081,23 @@ function tn(e) {
1083
1081
  function Xe(e) {
1084
1082
  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)]`;
1085
1083
  }
1086
- function aa(e) {
1084
+ function ra(e) {
1087
1085
  return e ? "bg-white/10" : "bg-black/5";
1088
1086
  }
1089
- function ra(e) {
1087
+ function ia(e) {
1090
1088
  return e ? "text-white" : "text-black";
1091
1089
  }
1092
- function ia(e) {
1090
+ function oa(e) {
1093
1091
  return e ? "text-white/55" : "text-black/55";
1094
1092
  }
1095
- function oa(e) {
1093
+ function la(e) {
1096
1094
  return e ? "text-white/40" : "text-black/40";
1097
1095
  }
1098
- function la(e) {
1096
+ function ca(e) {
1099
1097
  return e ? "text-white/20" : "text-black/20";
1100
1098
  }
1101
1099
  const Ke = ({ attachment: e, isMyMessage: t }) => {
1102
- const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(z.Fragment, { children: [
1100
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(j.Fragment, { children: [
1103
1101
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1104
1102
  "img",
1105
1103
  {
@@ -1110,14 +1108,14 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
1110
1108
  ) : /* @__PURE__ */ n(
1111
1109
  "div",
1112
1110
  {
1113
- className: `aspect-video w-full rounded-[20px] ${aa(t)} flex items-center justify-center`,
1114
- children: /* @__PURE__ */ n(ys, { className: `size-12 ${la(t)}` })
1111
+ className: `aspect-video w-full rounded-[20px] ${ra(t)} flex items-center justify-center`,
1112
+ children: /* @__PURE__ */ n(Cs, { className: `size-12 ${ca(t)}` })
1115
1113
  }
1116
1114
  ) }),
1117
1115
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1118
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ra(t)}`, children: s }),
1119
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${ia(t)}`, children: a }),
1120
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${oa(t)}`, children: d })
1116
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ia(t)}`, children: s }),
1117
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${oa(t)}`, children: a }),
1118
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${la(t)}`, children: d })
1121
1119
  ] })
1122
1120
  ] });
1123
1121
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
@@ -1129,7 +1127,7 @@ function Je(e) {
1129
1127
  var t;
1130
1128
  return (t = e.attachments) == null ? void 0 : t.find(nn);
1131
1129
  }
1132
- async function ca(e, t) {
1130
+ async function da(e, t) {
1133
1131
  let s;
1134
1132
  try {
1135
1133
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1141,11 +1139,11 @@ async function ca(e, t) {
1141
1139
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1142
1140
  o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1143
1141
  }
1144
- const da = ({
1142
+ const ua = ({
1145
1143
  url: e,
1146
1144
  filename: t
1147
1145
  }) => {
1148
- const [s, a] = D(!1);
1146
+ const [s, a] = O(!1);
1149
1147
  return /* @__PURE__ */ n(
1150
1148
  "button",
1151
1149
  {
@@ -1153,7 +1151,7 @@ const da = ({
1153
1151
  onClick: (i) => {
1154
1152
  i.stopPropagation();
1155
1153
  const o = window.open("", "_blank", "noopener,noreferrer");
1156
- a(!0), ca(e, t).then(() => {
1154
+ a(!0), da(e, t).then(() => {
1157
1155
  o == null || o.close();
1158
1156
  }).catch(() => {
1159
1157
  o && (o.location.href = e);
@@ -1161,7 +1159,7 @@ const da = ({
1161
1159
  },
1162
1160
  disabled: s,
1163
1161
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1164
- children: s ? /* @__PURE__ */ n(ge, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(z.Fragment, { children: [
1162
+ children: s ? /* @__PURE__ */ n(ge, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1165
1163
  /* @__PURE__ */ n(be, { className: "size-4 text-white", weight: "bold" }),
1166
1164
  "Download"
1167
1165
  ] })
@@ -1171,13 +1169,13 @@ const da = ({
1171
1169
  function Ze(e) {
1172
1170
  var u, f, c, g;
1173
1171
  const t = (u = e.attachments) == null ? void 0 : u.find(
1174
- (v) => v.type === "video" && v.asset_url
1172
+ (p) => p.type === "video" && p.asset_url
1175
1173
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1176
- (v) => v.type === "image" && v.image_url
1174
+ (p) => p.type === "image" && p.image_url
1177
1175
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1178
- (v) => v.type === "audio" && v.asset_url
1176
+ (p) => p.type === "audio" && p.asset_url
1179
1177
  ), r = (g = e.attachments) == null ? void 0 : g.find(
1180
- (v) => v.type === "file" && v.asset_url
1178
+ (p) => p.type === "file" && p.asset_url
1181
1179
  ), i = t ?? s ?? a ?? r, o = (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);
1182
1180
  if (!o) return null;
1183
1181
  const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, b = t == null ? void 0 : t.thumb_url;
@@ -1243,10 +1241,10 @@ const sn = ({
1243
1241
  containedImage: i === "image" || i === "document"
1244
1242
  }
1245
1243
  ),
1246
- action: /* @__PURE__ */ n(da, { url: e, filename: s })
1244
+ action: /* @__PURE__ */ n(ua, { url: e, filename: s })
1247
1245
  }
1248
1246
  );
1249
- }, ua = ({
1247
+ }, ma = ({
1250
1248
  message: e,
1251
1249
  isMyMessage: t = !1
1252
1250
  }) => {
@@ -1277,7 +1275,7 @@ const sn = ({
1277
1275
  }
1278
1276
  )
1279
1277
  ] });
1280
- }, ma = ({
1278
+ }, ha = ({
1281
1279
  message: e
1282
1280
  }) => {
1283
1281
  const t = Je(e);
@@ -1285,7 +1283,7 @@ const sn = ({
1285
1283
  return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
1286
1284
  const s = Ze(e);
1287
1285
  return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
1288
- }, ha = ({
1286
+ }, fa = ({
1289
1287
  message: e
1290
1288
  }) => {
1291
1289
  const t = Je(e);
@@ -1293,18 +1291,18 @@ const sn = ({
1293
1291
  return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
1294
1292
  const s = Ze(e);
1295
1293
  return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1296
- }, Ni = Object.assign(ua, {
1297
- Creator: ma,
1298
- Visitor: ha
1299
- }), fa = {
1294
+ }, _i = Object.assign(ma, {
1295
+ Creator: ha,
1296
+ Visitor: fa
1297
+ }), ga = {
1300
1298
  isUnlocking: () => !1
1301
- }, ga = {
1302
- LockedAttachment: fa
1303
- }, rn = Ge({}), _i = rn.Provider;
1304
- function ba(e) {
1305
- return Te(rn)[e] ?? ga[e];
1299
+ }, ba = {
1300
+ LockedAttachment: ga
1301
+ }, rn = Ge({}), yi = rn.Provider;
1302
+ function pa(e) {
1303
+ return Te(rn)[e] ?? ba[e];
1306
1304
  }
1307
- const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1305
+ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1308
1306
  "svg",
1309
1307
  {
1310
1308
  width: e,
@@ -1321,19 +1319,19 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1321
1319
  }
1322
1320
  )
1323
1321
  }
1324
- ), va = (e) => {
1322
+ ), xa = (e) => {
1325
1323
  var t;
1326
1324
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1327
- }, xa = (e) => {
1325
+ }, wa = (e) => {
1328
1326
  var t;
1329
1327
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1330
1328
  }, ke = (e) => {
1331
1329
  var t;
1332
1330
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1333
- }, wa = (e) => {
1331
+ }, Na = (e) => {
1334
1332
  var t;
1335
1333
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1336
- }, on = (e) => va(e) || xa(e), Na = (e) => {
1334
+ }, on = (e) => xa(e) || wa(e), _a = (e) => {
1337
1335
  var t;
1338
1336
  return on(e) && !((t = e.text) != null && t.trim());
1339
1337
  }, Pe = ({
@@ -1351,7 +1349,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1351
1349
  if (!f) return null;
1352
1350
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", g = t ? `${f} tip` : `Delivered with ${f} tip`;
1353
1351
  return /* @__PURE__ */ h("div", { className: c, children: [
1354
- /* @__PURE__ */ n(Cs, { size: t ? 14 : 12 }),
1352
+ /* @__PURE__ */ n(ks, { size: t ? 14 : 12 }),
1355
1353
  /* @__PURE__ */ n("span", { children: g })
1356
1354
  ] });
1357
1355
  }
@@ -1359,7 +1357,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1359
1357
  "message-chatbot-indicator",
1360
1358
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1361
1359
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1362
- ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(pa, { size: o ? 12 : 15 }) });
1360
+ ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(va, { size: o ? 12 : 15 }) });
1363
1361
  return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(te, { children: [
1364
1362
  m,
1365
1363
  b
@@ -1367,7 +1365,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1367
1365
  b,
1368
1366
  m
1369
1367
  ] }) });
1370
- }, _a = ({
1368
+ }, ya = ({
1371
1369
  selected: e,
1372
1370
  onVoteUp: t,
1373
1371
  onVoteDown: s
@@ -1376,31 +1374,31 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1376
1374
  "button",
1377
1375
  {
1378
1376
  type: "button",
1379
- className: C("message-vote-button focus-ring", {
1377
+ className: y("message-vote-button focus-ring", {
1380
1378
  "message-vote-button--selected": e === "up"
1381
1379
  }),
1382
1380
  onClick: t,
1383
1381
  "aria-label": "Good response",
1384
1382
  "aria-pressed": e === "up",
1385
1383
  "data-tooltip": "Good response",
1386
- children: /* @__PURE__ */ n(ks, { size: 16, weight: e === "up" ? "fill" : "regular" })
1384
+ children: /* @__PURE__ */ n(Es, { size: 16, weight: e === "up" ? "fill" : "regular" })
1387
1385
  }
1388
1386
  ),
1389
1387
  /* @__PURE__ */ n(
1390
1388
  "button",
1391
1389
  {
1392
1390
  type: "button",
1393
- className: C("message-vote-button focus-ring", {
1391
+ className: y("message-vote-button focus-ring", {
1394
1392
  "message-vote-button--selected": e === "down"
1395
1393
  }),
1396
1394
  onClick: s,
1397
1395
  "aria-label": "Bad response",
1398
1396
  "aria-pressed": e === "down",
1399
1397
  "data-tooltip": "Bad response",
1400
- children: /* @__PURE__ */ n(Es, { size: 16, weight: e === "down" ? "fill" : "regular" })
1398
+ children: /* @__PURE__ */ n(Is, { size: 16, weight: e === "down" ? "fill" : "regular" })
1401
1399
  }
1402
1400
  )
1403
- ] }), ya = (e) => {
1401
+ ] }), Ca = (e) => {
1404
1402
  var ht, ft, gt, bt, pt, vt, xt, wt, Nt, _t, yt, Ct, kt, Et;
1405
1403
  const {
1406
1404
  additionalMessageInputProps: t,
@@ -1417,49 +1415,49 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1417
1415
  isMyMessage: f,
1418
1416
  message: c,
1419
1417
  renderText: g,
1420
- threadList: v,
1421
- viewerLanguage: p
1422
- } = e, { client: N } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: T, onUnlockClick: S, onFetchSource: R, onDownloadClick: O } = ba("LockedAttachment"), [E, A] = D(!1), y = Mn(c.id), { selected: _, voteUp: I, voteDown: L } = Vs(c), {
1423
- Attachment: M = Rn,
1424
- EditMessageModal: j = Ln,
1425
- MessageActions: V,
1418
+ threadList: p,
1419
+ viewerLanguage: v
1420
+ } = e, { client: N } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: I, onUnlockClick: E, onFetchSource: M, onDownloadClick: P } = pa("LockedAttachment"), [k, T] = O(!1), _ = Mn(c.id), { selected: S, voteUp: R, voteDown: $ } = Gs(c), {
1421
+ Attachment: A = Rn,
1422
+ EditMessageModal: D = Ln,
1423
+ MessageActions: z,
1426
1424
  MessageBlocked: G = Dn,
1427
- MessageBouncePrompt: $ = Pn,
1428
- MessageDeleted: F = On,
1425
+ MessageBouncePrompt: F = Pn,
1426
+ MessageDeleted: B = On,
1429
1427
  MessageIsThreadReplyInChannelButtonIndicator: X = zn,
1430
- MessageRepliesCountButton: U = $n,
1431
- ReminderNotification: P = Fn,
1428
+ MessageRepliesCountButton: V = $n,
1429
+ ReminderNotification: L = Fn,
1432
1430
  StreamedMessageText: w = Bn,
1433
- PinIndicator: k
1434
- } = Ut("CustomMessage"), B = Un(c), q = jn(c), _e = ee(
1431
+ PinIndicator: C
1432
+ } = Ut("CustomMessage"), U = Un(c), q = jn(c), _e = ee(
1435
1433
  () => u == null ? void 0 : u(c),
1436
1434
  [u, c]
1437
1435
  ), K = ee(() => {
1438
1436
  const me = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...me] : me;
1439
1437
  if (!ke(c)) return ye;
1440
- const St = ye.filter((It) => !("type" in It) || !nn(It));
1441
- return St.length === ye.length ? ye : St;
1438
+ const It = ye.filter((St) => !("type" in St) || !nn(St));
1439
+ return It.length === ye.length ? ye : It;
1442
1440
  }, [c]), re = ee(() => {
1443
- const me = Xt({ message: c, viewerLanguage: p });
1441
+ const me = Xt({ message: c, viewerLanguage: v });
1444
1442
  return me === c.text ? c : { ...c, text: me };
1445
- }, [c, p]);
1443
+ }, [c, v]);
1446
1444
  if (Vn(c))
1447
1445
  return null;
1448
1446
  if (c.deleted_at || c.type === "deleted")
1449
- return /* @__PURE__ */ n(F, { message: c });
1447
+ return /* @__PURE__ */ n(B, { message: c });
1450
1448
  if (Gn(c))
1451
1449
  return /* @__PURE__ */ n(G, {});
1452
- const J = !v && !!c.reply_count, se = !v && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Hn(c);
1450
+ const J = !p && !!c.reply_count, se = !p && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Hn(c);
1453
1451
  let ie;
1454
- Q ? ie = () => m(c) : lt && (ie = () => A(!0));
1455
- const de = f(), kn = C(
1452
+ Q ? ie = () => m(c) : lt && (ie = () => T(!0));
1453
+ const de = f(), kn = y(
1456
1454
  "str-chat__message str-chat__message-simple",
1457
1455
  `str-chat__message--${c.type}`,
1458
1456
  `str-chat__message--${c.status}`,
1459
1457
  de ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1460
1458
  c.text ? "str-chat__message--has-text" : "has-no-text",
1461
1459
  {
1462
- "str-chat__message--has-attachment": B,
1460
+ "str-chat__message--has-attachment": U,
1463
1461
  "str-chat__message--highlighted": b,
1464
1462
  "str-chat__message--pinned pinned-message": c.pinned,
1465
1463
  "str-chat__message--with-reactions": q,
@@ -1469,20 +1467,20 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1469
1467
  "str-chat__virtual-message__wrapper--first": i,
1470
1468
  "str-chat__virtual-message__wrapper--group": o
1471
1469
  }
1472
- ), ct = c.poll_id && N.polls.fromState(c.poll_id), dt = Na(c), ue = ke(c), ut = wa(c), Re = !!(K != null && K.length && !c.quoted_message), mt = ue && de && Re;
1470
+ ), ct = c.poll_id && N.polls.fromState(c.poll_id), dt = _a(c), ue = ke(c), ut = Na(c), Re = !!(K != null && K.length && !c.quoted_message), mt = ue && de && Re;
1473
1471
  return /* @__PURE__ */ h(te, { children: [
1474
1472
  a && /* @__PURE__ */ n(
1475
- j,
1473
+ D,
1476
1474
  {
1477
1475
  additionalMessageInputProps: t
1478
1476
  }
1479
1477
  ),
1480
- E && /* @__PURE__ */ n(
1478
+ k && /* @__PURE__ */ n(
1481
1479
  Yn,
1482
1480
  {
1483
- MessageBouncePrompt: $,
1484
- onClose: () => A(!1),
1485
- open: E
1481
+ MessageBouncePrompt: F,
1482
+ onClose: () => T(!1),
1483
+ open: k
1486
1484
  }
1487
1485
  ),
1488
1486
  /* @__PURE__ */ h(
@@ -1491,8 +1489,8 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1491
1489
  className: kn,
1492
1490
  "data-message-id": c.id,
1493
1491
  children: [
1494
- k && /* @__PURE__ */ n(k, {}),
1495
- !!y && /* @__PURE__ */ n(P, { reminder: y }),
1492
+ C && /* @__PURE__ */ n(C, {}),
1493
+ !!_ && /* @__PURE__ */ n(L, { reminder: _ }),
1496
1494
  c.user && /* @__PURE__ */ n(
1497
1495
  ae,
1498
1496
  {
@@ -1508,7 +1506,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1508
1506
  /* @__PURE__ */ n(
1509
1507
  "div",
1510
1508
  {
1511
- className: C("str-chat__message-inner", {
1509
+ className: y("str-chat__message-inner", {
1512
1510
  "str-chat__simple-message--error-failed": Q || lt
1513
1511
  }),
1514
1512
  "data-testid": "message-inner",
@@ -1524,7 +1522,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1524
1522
  },
1525
1523
  children: ut ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1526
1524
  de ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1527
- V && /* @__PURE__ */ n(V, {}),
1525
+ z && /* @__PURE__ */ n(z, {}),
1528
1526
  /* @__PURE__ */ n(
1529
1527
  Ot.Sent,
1530
1528
  {
@@ -1534,8 +1532,8 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1534
1532
  amountText: (vt = c.metadata) == null ? void 0 : vt.amount_text,
1535
1533
  detail: (xt = c.metadata) == null ? void 0 : xt.attachment_detail,
1536
1534
  paymentStatus: (wt = c.metadata) == null ? void 0 : wt.payment_status,
1537
- onPreviewClick: () => S == null ? void 0 : S(c, x),
1538
- onFetchSource: async () => await (R == null ? void 0 : R(c, x))
1535
+ onPreviewClick: () => E == null ? void 0 : E(c, x),
1536
+ onFetchSource: async () => await (M == null ? void 0 : M(c, x))
1539
1537
  }
1540
1538
  )
1541
1539
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1548,13 +1546,13 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1548
1546
  amountText: (Ct = c.metadata) == null ? void 0 : Ct.amount_text,
1549
1547
  detail: (kt = c.metadata) == null ? void 0 : kt.attachment_detail,
1550
1548
  paymentStatus: (Et = c.metadata) == null ? void 0 : Et.payment_status,
1551
- isUnlocking: T(c.id),
1552
- onUnlockClick: () => S == null ? void 0 : S(c, x),
1553
- onFetchSource: async () => await (R == null ? void 0 : R(c, x)),
1554
- onDownloadClick: () => O == null ? void 0 : O(c, x)
1549
+ isUnlocking: I(c.id),
1550
+ onUnlockClick: () => E == null ? void 0 : E(c, x),
1551
+ onFetchSource: async () => await (M == null ? void 0 : M(c, x)),
1552
+ onDownloadClick: () => P == null ? void 0 : P(c, x)
1555
1553
  }
1556
1554
  ),
1557
- V && /* @__PURE__ */ n(V, {})
1555
+ z && /* @__PURE__ */ n(z, {})
1558
1556
  ] }),
1559
1557
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1560
1558
  Tt,
@@ -1577,7 +1575,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1577
1575
  ),
1578
1576
  ct && /* @__PURE__ */ n(qn, { poll: ct }),
1579
1577
  K != null && K.length && !c.quoted_message ? /* @__PURE__ */ n(
1580
- M,
1578
+ A,
1581
1579
  {
1582
1580
  actionHandler: l,
1583
1581
  attachments: K
@@ -1610,16 +1608,16 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1610
1608
  }
1611
1609
  ),
1612
1610
  s && ue && /* @__PURE__ */ n(
1613
- _a,
1611
+ ya,
1614
1612
  {
1615
- selected: _,
1616
- onVoteUp: I,
1617
- onVoteDown: L
1613
+ selected: S,
1614
+ onVoteUp: R,
1615
+ onVoteDown: $
1618
1616
  }
1619
1617
  )
1620
1618
  ] }),
1621
1619
  J && /* @__PURE__ */ n(
1622
- U,
1620
+ V,
1623
1621
  {
1624
1622
  onClick: d,
1625
1623
  reply_count: c.reply_count
@@ -1631,13 +1629,13 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1631
1629
  c.id
1632
1630
  )
1633
1631
  ] });
1634
- }, Ca = z.memo(
1635
- ya,
1632
+ }, ka = j.memo(
1633
+ Ca,
1636
1634
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
1637
- ), ka = (e) => {
1635
+ ), Ea = (e) => {
1638
1636
  const t = pe("CustomMessage");
1639
- return /* @__PURE__ */ n(Ca, { ...t, ...e });
1640
- }, Ea = () => {
1637
+ return /* @__PURE__ */ n(ka, { ...t, ...e });
1638
+ }, Ia = () => {
1641
1639
  var s;
1642
1640
  const { handleDelete: e, message: t } = pe("CustomMessageActions");
1643
1641
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
@@ -1662,23 +1660,19 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1662
1660
  children: /* @__PURE__ */ n(jt, { size: 16, weight: "light", "aria-hidden": !0 })
1663
1661
  }
1664
1662
  );
1665
- }, Ia = () => {
1663
+ }, Ta = () => {
1666
1664
  var t;
1667
1665
  const { message: e } = pe("CustomMessageActions");
1668
1666
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1669
- Ls,
1667
+ Ds,
1670
1668
  {
1671
1669
  messageActionSet: [
1672
- { Component: Ea, placement: "quick", type: "delete" },
1670
+ { Component: Ia, placement: "quick", type: "delete" },
1673
1671
  { Component: Sa, placement: "quick", type: "flag" }
1674
1672
  ]
1675
1673
  }
1676
1674
  );
1677
- }, Ta = (e) => ({
1678
- linkPreviews: Array.from(e.previews.values()).filter(
1679
- (t) => Rt.previewIsLoaded(t) || Rt.previewIsLoading(t)
1680
- )
1681
- }), Aa = ({
1675
+ }, Aa = ({
1682
1676
  link: e,
1683
1677
  onDismiss: t
1684
1678
  }) => {
@@ -1718,10 +1712,14 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1718
1712
  ]
1719
1713
  }
1720
1714
  );
1721
- }, Ma = () => {
1715
+ }, Ma = (e) => ({
1716
+ linkPreviews: Array.from(e.previews.values()).filter(
1717
+ (t) => Rt.previewIsLoaded(t) || Rt.previewIsLoading(t)
1718
+ )
1719
+ }), Ra = () => {
1722
1720
  const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
1723
1721
  e.state,
1724
- Ta
1722
+ Ma
1725
1723
  ), s = (r) => {
1726
1724
  e.dismissPreview(r);
1727
1725
  };
@@ -1733,7 +1731,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1733
1731
  },
1734
1732
  r.og_scrape_url
1735
1733
  )) }) : null;
1736
- }, ln = z.createContext(!1), Ra = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1734
+ }, ln = j.createContext(!1), La = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1737
1735
  "button",
1738
1736
  {
1739
1737
  ...s,
@@ -1741,16 +1739,16 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1741
1739
  "aria-label": "Send",
1742
1740
  disabled: t,
1743
1741
  onClick: e,
1744
- children: /* @__PURE__ */ n(Is, { weight: "bold", className: "size-4" })
1742
+ children: /* @__PURE__ */ n(Ts, { weight: "bold", className: "size-4" })
1745
1743
  }
1746
- ), La = () => {
1744
+ ), Da = () => {
1747
1745
  const e = Te(ln), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
1748
- SendButton: r = Ra,
1746
+ SendButton: r = La,
1749
1747
  AttachmentPreviewList: i = es
1750
1748
  } = Ut("CustomMessageInput");
1751
1749
  return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
1752
1750
  /* @__PURE__ */ n(ts, {}),
1753
- /* @__PURE__ */ n(Ma, {}),
1751
+ /* @__PURE__ */ n(Ra, {}),
1754
1752
  /* @__PURE__ */ n(i, {}),
1755
1753
  /* @__PURE__ */ h("div", { className: "flex", children: [
1756
1754
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
@@ -1777,43 +1775,56 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1777
1775
  )
1778
1776
  ] })
1779
1777
  ] });
1780
- }, Da = ({
1781
- renderActions: e,
1782
- renderFooter: t,
1783
- disabled: s = !1,
1784
- disabledReason: a
1778
+ }, Pa = ({
1779
+ className: e,
1780
+ renderActions: t,
1781
+ renderFooter: s,
1782
+ disabled: a = !1,
1783
+ disabledReason: r
1785
1784
  }) => {
1786
- var o;
1787
- const { channel: r } = ce(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1788
- return s ? /* @__PURE__ */ h(te, { children: [
1789
- /* @__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 }),
1790
- t == null ? void 0 : t()
1791
- ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
1785
+ var d;
1786
+ const { channel: i } = ce(), o = ((d = i == null ? void 0 : i.data) == null ? void 0 : d.frozen) === !0;
1787
+ if (a)
1788
+ return /* @__PURE__ */ h(te, { children: [
1789
+ /* @__PURE__ */ n(
1790
+ "div",
1791
+ {
1792
+ className: y(
1793
+ "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3",
1794
+ e
1795
+ ),
1796
+ children: r ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null
1797
+ }
1798
+ ),
1799
+ s == null ? void 0 : s()
1800
+ ] });
1801
+ const l = t == null ? void 0 : t();
1802
+ return /* @__PURE__ */ h("div", { className: y("flex flex-col gap-4", e), children: [
1792
1803
  /* @__PURE__ */ h(
1793
1804
  "div",
1794
1805
  {
1795
- inert: i ? "" : void 0,
1796
- "aria-disabled": i || void 0,
1806
+ inert: o ? "" : void 0,
1807
+ "aria-disabled": o || void 0,
1797
1808
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1798
1809
  children: [
1799
- e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1800
- /* @__PURE__ */ n(ln.Provider, { value: i, children: /* @__PURE__ */ n(Jn, { Input: La }) })
1810
+ l && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: l }),
1811
+ /* @__PURE__ */ n(ln.Provider, { value: o, children: /* @__PURE__ */ n(Jn, { Input: Da }) })
1801
1812
  ]
1802
1813
  }
1803
1814
  ),
1804
- t == null ? void 0 : t()
1815
+ s == null ? void 0 : s()
1805
1816
  ] });
1806
- }, Pa = [
1817
+ }, Oa = [
1807
1818
  "SYSTEM_DM_AGENT_PAUSED",
1808
1819
  "SYSTEM_DM_AGENT_RESUMED"
1809
- ], Oa = {
1820
+ ], za = {
1810
1821
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1811
1822
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1812
- }, za = [
1823
+ }, $a = [
1813
1824
  "SYSTEM_AGE_SAFETY_BLOCKED"
1814
- ], $a = {
1825
+ ], Fa = {
1815
1826
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1816
- }, Oe = "age safety guidelines.", Fa = "https://linktr.ee/s/about/contact", $t = (e) => Pa.includes(e), Ba = (e) => za.includes(e), Ua = (e) => {
1827
+ }, Oe = "age safety guidelines.", Ba = "https://linktr.ee/s/about/contact", $t = (e) => Oa.includes(e), Ua = (e) => $a.includes(e), ja = (e) => {
1817
1828
  var a;
1818
1829
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1819
1830
  if ($t(t))
@@ -1821,7 +1832,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1821
1832
  kind: "dm-agent",
1822
1833
  type: t
1823
1834
  };
1824
- if (Ba(t))
1835
+ if (Ua(t))
1825
1836
  return {
1826
1837
  kind: "age-safety",
1827
1838
  type: t
@@ -1832,7 +1843,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1832
1843
  kind: "dm-agent",
1833
1844
  type: s
1834
1845
  };
1835
- }, ja = (e) => {
1846
+ }, Va = (e) => {
1836
1847
  const t = e.indexOf(Oe);
1837
1848
  if (t === -1)
1838
1849
  return e;
@@ -1842,7 +1853,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1842
1853
  /* @__PURE__ */ n(
1843
1854
  "a",
1844
1855
  {
1845
- href: Fa,
1856
+ href: Ba,
1846
1857
  target: "_blank",
1847
1858
  rel: "noopener noreferrer",
1848
1859
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -1851,13 +1862,13 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1851
1862
  ),
1852
1863
  e.slice(s)
1853
1864
  ] });
1854
- }, Va = (e) => {
1865
+ }, Ga = (e) => {
1855
1866
  var a, r;
1856
- const t = e.message.hide_date === !0, s = Ua(
1867
+ const t = e.message.hide_date === !0, s = ja(
1857
1868
  e.message
1858
1869
  );
1859
1870
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1860
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Oa[s.type];
1871
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || za[s.type];
1861
1872
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1862
1873
  /* @__PURE__ */ h(
1863
1874
  "div",
@@ -1883,7 +1894,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1883
1894
  ] });
1884
1895
  }
1885
1896
  if ((s == null ? void 0 : s.kind) === "age-safety") {
1886
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || $a[s.type];
1897
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Fa[s.type];
1887
1898
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1888
1899
  /* @__PURE__ */ h(
1889
1900
  "div",
@@ -1893,7 +1904,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1893
1904
  "data-age-safety-system-type": s.type,
1894
1905
  children: [
1895
1906
  /* @__PURE__ */ n(
1896
- Ts,
1907
+ As,
1897
1908
  {
1898
1909
  size: 24,
1899
1910
  weight: "duotone",
@@ -1902,7 +1913,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1902
1913
  "data-testid": "age-safety-system-message-icon"
1903
1914
  }
1904
1915
  ),
1905
- /* @__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: ja(i) }) })
1916
+ /* @__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: Va(i) }) })
1906
1917
  ]
1907
1918
  }
1908
1919
  ),
@@ -1927,21 +1938,21 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1927
1938
  begin: `${120 * t}ms`,
1928
1939
  repeatCount: "indefinite"
1929
1940
  }
1930
- ) }), Ga = /* @__PURE__ */ new Set([
1941
+ ) }), Ha = /* @__PURE__ */ new Set([
1931
1942
  De.Thinking,
1932
1943
  De.Generating,
1933
1944
  De.ExternalSources
1934
- ]), Ha = ({ threadList: e }) => {
1935
- var g, v;
1945
+ ]), Ya = ({ threadList: e }) => {
1946
+ var g, p;
1936
1947
  const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Te(cn);
1937
- if (!e && l && Ga.has(o)) {
1938
- const p = Ya(t, (g = r.user) == null ? void 0 : g.id);
1948
+ if (!e && l && Ha.has(o)) {
1949
+ const v = qa(t, (g = r.user) == null ? void 0 : g.id);
1939
1950
  return /* @__PURE__ */ n(
1940
1951
  Ft,
1941
1952
  {
1942
- avatarId: (p == null ? void 0 : p.id) ?? "ai-agent",
1943
- avatarName: (p == null ? void 0 : p.name) ?? (p == null ? void 0 : p.id) ?? "Agent",
1944
- avatarImage: p == null ? void 0 : p.image,
1953
+ avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
1954
+ avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
1955
+ avatarImage: v == null ? void 0 : v.image,
1945
1956
  testId: "typing-indicator-ai"
1946
1957
  }
1947
1958
  );
@@ -1949,19 +1960,19 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1949
1960
  if ((s == null ? void 0 : s.typing_events) === !1)
1950
1961
  return null;
1951
1962
  const m = e ? [] : Object.values(i).filter(
1952
- ({ parent_id: p, user: N }) => {
1963
+ ({ parent_id: v, user: N }) => {
1953
1964
  var x;
1954
- return (N == null ? void 0 : N.id) !== ((x = r.user) == null ? void 0 : x.id) && !p;
1965
+ return (N == null ? void 0 : N.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
1955
1966
  }
1956
1967
  ), b = e ? Object.values(i).filter(
1957
- ({ parent_id: p, user: N }) => {
1968
+ ({ parent_id: v, user: N }) => {
1958
1969
  var x;
1959
- return (N == null ? void 0 : N.id) !== ((x = r.user) == null ? void 0 : x.id) && p === (a == null ? void 0 : a.id);
1970
+ return (N == null ? void 0 : N.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (a == null ? void 0 : a.id);
1960
1971
  }
1961
1972
  ) : [], u = e ? b : m;
1962
1973
  if (!u.length)
1963
1974
  return null;
1964
- const f = (v = u[0]) == null ? void 0 : v.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1975
+ const f = (p = u[0]) == null ? void 0 : p.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1965
1976
  return /* @__PURE__ */ n(
1966
1977
  Ft,
1967
1978
  {
@@ -2012,7 +2023,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2012
2023
  ]
2013
2024
  }
2014
2025
  );
2015
- function Ya(e, t) {
2026
+ function qa(e, t) {
2016
2027
  var a;
2017
2028
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2018
2029
  for (const r of Object.values(s)) {
@@ -2021,10 +2032,10 @@ function Ya(e, t) {
2021
2032
  return i;
2022
2033
  }
2023
2034
  }
2024
- const qa = () => null, Wa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2035
+ const Wa = () => null, Xa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2025
2036
  "div",
2026
2037
  {
2027
- className: C("flex items-center justify-center h-full", e),
2038
+ className: y("flex items-center justify-center h-full", e),
2028
2039
  children: [
2029
2040
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2030
2041
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2064,12 +2075,12 @@ const qa = () => null, Wa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2064
2075
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2065
2076
  ]
2066
2077
  }
2067
- ), Ee = z.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2068
- /* @__PURE__ */ n(Wa, { className: "w-6 h-6" }),
2078
+ ), Ee = j.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2079
+ /* @__PURE__ */ n(Xa, { className: "w-6 h-6" }),
2069
2080
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2070
2081
  ] }) }));
2071
2082
  Ee.displayName = "LoadingState";
2072
- const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Xa = ({
2083
+ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Ka = ({
2073
2084
  onBack: e,
2074
2085
  showBackButton: t,
2075
2086
  showStarButton: s = !1,
@@ -2085,23 +2096,23 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2085
2096
  customChannelActions: f,
2086
2097
  showActionsMenu: c = !0
2087
2098
  }) => {
2088
- var S, R, O, E, A;
2089
- const { channel: g } = ce(), v = z.useMemo(() => {
2090
- var I, L;
2091
- const y = (I = g._client) == null ? void 0 : I.userID;
2092
- return y ? Object.values(((L = g.state) == null ? void 0 : L.members) || {}).find(
2093
- (M) => {
2094
- var j;
2095
- return ((j = M.user) == null ? void 0 : j.id) && M.user.id !== y;
2099
+ var E, M, P, k, T;
2100
+ const { channel: g } = ce(), p = j.useMemo(() => {
2101
+ var R, $;
2102
+ const _ = (R = g._client) == null ? void 0 : R.userID;
2103
+ return _ ? Object.values((($ = g.state) == null ? void 0 : $.members) || {}).find(
2104
+ (A) => {
2105
+ var D;
2106
+ return ((D = A.user) == null ? void 0 : D.id) && A.user.id !== _;
2096
2107
  }
2097
2108
  ) : void 0;
2098
- }, [(S = g._client) == null ? void 0 : S.userID, (R = g.state) == null ? void 0 : R.members]), p = Wt(v == null ? void 0 : v.user), N = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, x = qt(g), T = async () => {
2109
+ }, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), N = (P = p == null ? void 0 : p.user) == null ? void 0 : P.image, x = qt(g), I = async () => {
2099
2110
  try {
2100
2111
  x ? await g.unpin() : await g.pin();
2101
- } catch (y) {
2112
+ } catch (_) {
2102
2113
  console.error(
2103
2114
  "[CustomChannelHeader] Failed to update pinned status:",
2104
- y
2115
+ _
2105
2116
  );
2106
2117
  }
2107
2118
  };
@@ -2110,7 +2121,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2110
2121
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2111
2122
  "button",
2112
2123
  {
2113
- className: C(
2124
+ className: y(
2114
2125
  oe,
2115
2126
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2116
2127
  ),
@@ -2125,15 +2136,15 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2125
2136
  /* @__PURE__ */ n(
2126
2137
  ae,
2127
2138
  {
2128
- id: ((E = v == null ? void 0 : v.user) == null ? void 0 : E.id) || g.id || "unknown",
2129
- name: p,
2139
+ id: ((k = p == null ? void 0 : p.user) == null ? void 0 : k.id) || g.id || "unknown",
2140
+ name: v,
2130
2141
  image: N,
2131
2142
  starred: s && x,
2132
2143
  dmAgentEnabled: a,
2133
2144
  size: 48
2134
2145
  }
2135
2146
  ),
2136
- /* @__PURE__ */ n("p", { className: "text-center text-xs font-medium text-black/90", children: p }),
2147
+ /* @__PURE__ */ n("p", { className: "text-center text-xs font-medium text-black/90", children: v }),
2137
2148
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2138
2149
  /* @__PURE__ */ n(Ue, { className: "size-3 shrink-0 text-black/55" }),
2139
2150
  /* @__PURE__ */ n("span", { children: Bt })
@@ -2144,13 +2155,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2144
2155
  "button",
2145
2156
  {
2146
2157
  className: oe,
2147
- onClick: T,
2158
+ onClick: I,
2148
2159
  type: "button",
2149
2160
  "aria-label": x ? "Unstar conversation" : "Star conversation",
2150
2161
  children: /* @__PURE__ */ n(
2151
2162
  Fe,
2152
2163
  {
2153
- className: C("size-5", {
2164
+ className: y("size-5", {
2154
2165
  "text-yellow-600": x,
2155
2166
  "text-black/90": !x
2156
2167
  }),
@@ -2163,7 +2174,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2163
2174
  Pt,
2164
2175
  {
2165
2176
  channel: g,
2166
- participant: v,
2177
+ participant: p,
2167
2178
  showDeleteConversation: o,
2168
2179
  showBlockParticipant: l,
2169
2180
  showReportParticipant: d,
@@ -2173,7 +2184,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2173
2184
  onBlockParticipantClick: b,
2174
2185
  onReportParticipantClick: u,
2175
2186
  customChannelActions: f,
2176
- triggerClassName: C(oe, "bg-[#F1F0EE]")
2187
+ triggerClassName: y(oe, "bg-[#F1F0EE]")
2177
2188
  }
2178
2189
  )
2179
2190
  ] })
@@ -2183,7 +2194,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2183
2194
  t && e && /* @__PURE__ */ n(
2184
2195
  "button",
2185
2196
  {
2186
- className: C(
2197
+ className: y(
2187
2198
  oe,
2188
2199
  "messaging-channel-view-back-button-desktop"
2189
2200
  ),
@@ -2196,8 +2207,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2196
2207
  /* @__PURE__ */ n(
2197
2208
  ae,
2198
2209
  {
2199
- id: ((A = v == null ? void 0 : v.user) == null ? void 0 : A.id) || g.id || "unknown",
2200
- name: p,
2210
+ id: ((T = p == null ? void 0 : p.user) == null ? void 0 : T.id) || g.id || "unknown",
2211
+ name: v,
2201
2212
  image: N,
2202
2213
  starred: s && x,
2203
2214
  dmAgentEnabled: a,
@@ -2205,7 +2216,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2205
2216
  }
2206
2217
  ),
2207
2218
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2208
- /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: p }),
2219
+ /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: v }),
2209
2220
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2210
2221
  /* @__PURE__ */ n(Ue, { className: "size-3 shrink-0 text-black/55" }),
2211
2222
  /* @__PURE__ */ n("span", { className: "truncate", children: Bt })
@@ -2217,13 +2228,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2217
2228
  "button",
2218
2229
  {
2219
2230
  className: oe,
2220
- onClick: T,
2231
+ onClick: I,
2221
2232
  type: "button",
2222
2233
  "aria-label": x ? "Unstar conversation" : "Star conversation",
2223
2234
  children: /* @__PURE__ */ n(
2224
2235
  Fe,
2225
2236
  {
2226
- className: C("size-6", {
2237
+ className: y("size-6", {
2227
2238
  "text-yellow-600": x,
2228
2239
  "text-black/90": !x
2229
2240
  }),
@@ -2236,7 +2247,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2236
2247
  Pt,
2237
2248
  {
2238
2249
  channel: g,
2239
- participant: v,
2250
+ participant: p,
2240
2251
  showDeleteConversation: o,
2241
2252
  showBlockParticipant: l,
2242
2253
  showReportParticipant: d,
@@ -2252,7 +2263,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2252
2263
  ] })
2253
2264
  ] })
2254
2265
  ] });
2255
- }, Ka = ({
2266
+ }, Ja = ({
2256
2267
  onBack: e,
2257
2268
  showBackButton: t,
2258
2269
  renderMessageInputActions: s,
@@ -2268,62 +2279,62 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2268
2279
  showReportParticipant: f = !0,
2269
2280
  composerDisabled: c = !1,
2270
2281
  composerDisabledReason: g,
2271
- showStarButton: v = !1,
2272
- chatbotVotingEnabled: p = !1,
2282
+ showStarButton: p = !1,
2283
+ chatbotVotingEnabled: v = !1,
2273
2284
  renderChannelBanner: N,
2274
2285
  customChannelActions: x,
2275
- renderMessage: T,
2276
- dmAgentEnabled: S = !1,
2277
- viewerLanguage: R,
2278
- showChannelInfo: O = !0
2286
+ renderMessage: I,
2287
+ dmAgentEnabled: E = !1,
2288
+ viewerLanguage: M,
2289
+ showChannelInfo: P = !0
2279
2290
  }) => {
2280
- var j, V, G, $, F, X;
2281
- const { channel: E } = ce(), A = z.useMemo(() => {
2282
- var w, k;
2283
- const U = (w = E._client) == null ? void 0 : w.userID;
2284
- return U ? Object.values(((k = E.state) == null ? void 0 : k.members) || {}).find(
2285
- (B) => {
2291
+ var D, z, G, F, B, X;
2292
+ const { channel: k } = ce(), T = j.useMemo(() => {
2293
+ var w, C;
2294
+ const V = (w = k._client) == null ? void 0 : w.userID;
2295
+ return V ? Object.values(((C = k.state) == null ? void 0 : C.members) || {}).find(
2296
+ (U) => {
2286
2297
  var q;
2287
- return ((q = B.user) == null ? void 0 : q.id) && B.user.id !== U;
2298
+ return ((q = U.user) == null ? void 0 : q.id) && U.user.id !== V;
2288
2299
  }
2289
2300
  ) : void 0;
2290
- }, [(j = E._client) == null ? void 0 : j.userID, (V = E.state) == null ? void 0 : V.members]), y = z.useMemo(() => {
2291
- var w, k;
2292
- const U = (w = E._client) == null ? void 0 : w.userID;
2293
- return U ? Object.values(((k = E.state) == null ? void 0 : k.members) || {}).find((B) => {
2301
+ }, [(D = k._client) == null ? void 0 : D.userID, (z = k.state) == null ? void 0 : z.members]), _ = j.useMemo(() => {
2302
+ var w, C;
2303
+ const V = (w = k._client) == null ? void 0 : w.userID;
2304
+ return V ? Object.values(((C = k.state) == null ? void 0 : C.members) || {}).find((U) => {
2294
2305
  var q;
2295
- return ((q = B.user) == null ? void 0 : q.id) === U;
2306
+ return ((q = U.user) == null ? void 0 : q.id) === V;
2296
2307
  }) : void 0;
2297
- }, [(G = E._client) == null ? void 0 : G.userID, ($ = E.state) == null ? void 0 : $.members]), _ = ((F = y == null ? void 0 : y.user) == null ? void 0 : F.is_account) ?? (y == null ? void 0 : y.is_account), I = ((X = A == null ? void 0 : A.user) == null ? void 0 : X.is_account) ?? (A == null ? void 0 : A.is_account), L = S && _ === !1 && I === !0, M = W(
2298
- (U) => {
2299
- const { message: P } = pe("ChannelView"), w = /* @__PURE__ */ n(
2300
- ka,
2308
+ }, [(G = k._client) == null ? void 0 : G.userID, (F = k.state) == null ? void 0 : F.members]), S = ((B = _ == null ? void 0 : _.user) == null ? void 0 : B.is_account) ?? (_ == null ? void 0 : _.is_account), R = ((X = T == null ? void 0 : T.user) == null ? void 0 : X.is_account) ?? (T == null ? void 0 : T.is_account), $ = E && S === !1 && R === !0, A = W(
2309
+ (V) => {
2310
+ const { message: L } = pe("ChannelView"), w = /* @__PURE__ */ n(
2311
+ Ea,
2301
2312
  {
2302
- ...U,
2303
- chatbotVotingEnabled: p,
2304
- viewerLanguage: R
2313
+ ...V,
2314
+ chatbotVotingEnabled: v,
2315
+ viewerLanguage: M
2305
2316
  }
2306
2317
  );
2307
- return !T || !P ? w : T(w, P);
2318
+ return !I || !L ? w : I(w, L);
2308
2319
  },
2309
- [p, T, R]
2320
+ [v, I, M]
2310
2321
  );
2311
2322
  return /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(
2312
2323
  is,
2313
2324
  {
2314
2325
  overrides: {
2315
- Message: M,
2316
- MessageActions: Ia
2326
+ Message: A,
2327
+ MessageActions: Ta
2317
2328
  },
2318
2329
  children: /* @__PURE__ */ h(os, { children: [
2319
2330
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2320
- Xa,
2331
+ Ka,
2321
2332
  {
2322
2333
  onBack: e,
2323
2334
  showBackButton: t,
2324
- showActionsMenu: O,
2325
- showStarButton: v,
2326
- dmAgentEnabled: L,
2335
+ showActionsMenu: P,
2336
+ showStarButton: p,
2337
+ dmAgentEnabled: $,
2327
2338
  onLeaveConversation: i,
2328
2339
  onBlockParticipant: o,
2329
2340
  showDeleteConversation: l,
@@ -2335,32 +2346,53 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2335
2346
  customChannelActions: x
2336
2347
  }
2337
2348
  ) }, "lt-channel-header"),
2338
- N ? /* @__PURE__ */ n(z.Fragment, { children: N() }, "lt-channel-banner") : null,
2349
+ N ? /* @__PURE__ */ n(j.Fragment, { children: N() }, "lt-channel-banner") : null,
2339
2350
  /* @__PURE__ */ n(
2340
2351
  "div",
2341
2352
  {
2342
2353
  className: "flex-1 overflow-hidden relative",
2343
- children: /* @__PURE__ */ n(ls, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2354
+ children: /* @__PURE__ */ n(
2355
+ ls,
2356
+ {
2357
+ hideDeletedMessages: !0,
2358
+ hideNewMessageSeparator: !1,
2359
+ renderMessages: (V) => {
2360
+ const L = cs(V);
2361
+ return r && L.push(
2362
+ /* @__PURE__ */ n("li", { children: r(k) }, "lt-channel-conversation-footer")
2363
+ ), L.push(
2364
+ // Message Input
2365
+ /* @__PURE__ */ h(
2366
+ "li",
2367
+ {
2368
+ className: "flex sticky bottom-0 p-4 pt-1 inset-x-0 mx-[calc(-1*var(--str-chat\\_\\_spacing-2))] md:mx-[calc(-1*min(var(--str-chat\\_\\_spacing-10),4%))]",
2369
+ children: [
2370
+ /* @__PURE__ */ n("div", { className: "absolute bottom-0 inset-x-0 w-full h-4/5 backdrop-blur-[16px] [mask-image:linear-gradient(to_top,black_0%,transparent_100%)] [-webkit-mask-image:linear-gradient(to_top,black_0%,transparent_100%)]" }),
2371
+ /* @__PURE__ */ n(
2372
+ Pa,
2373
+ {
2374
+ className: "isolate w-full",
2375
+ renderActions: () => s == null ? void 0 : s(k),
2376
+ renderFooter: () => a == null ? void 0 : a(k),
2377
+ disabled: c,
2378
+ disabledReason: g
2379
+ }
2380
+ )
2381
+ ]
2382
+ },
2383
+ "lt-channel-message-input"
2384
+ )
2385
+ ), L;
2386
+ }
2387
+ }
2388
+ )
2344
2389
  },
2345
2390
  "lt-channel-message-list"
2346
- ),
2347
- r ? /* @__PURE__ */ n(z.Fragment, { children: r(E) }, "lt-channel-conversation-footer") : null,
2348
- /* @__PURE__ */ n(
2349
- Da,
2350
- {
2351
- ...s && {
2352
- renderActions: () => s == null ? void 0 : s(E)
2353
- },
2354
- renderFooter: () => a == null ? void 0 : a(E),
2355
- disabled: c,
2356
- disabledReason: g
2357
- },
2358
- "lt-channel-message-input"
2359
2391
  )
2360
2392
  ] })
2361
2393
  }
2362
2394
  ) });
2363
- }, dn = z.memo(
2395
+ }, dn = j.memo(
2364
2396
  ({
2365
2397
  channel: e,
2366
2398
  onBack: t,
@@ -2371,65 +2403,65 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2371
2403
  onLeaveConversation: o,
2372
2404
  onBlockParticipant: l,
2373
2405
  className: d,
2374
- CustomChannelEmptyState: m = qa,
2406
+ CustomChannelEmptyState: m = Wa,
2375
2407
  showDeleteConversation: b = !0,
2376
2408
  onDeleteConversationClick: u,
2377
2409
  onBlockParticipantClick: f,
2378
2410
  onReportParticipantClick: c,
2379
2411
  showBlockParticipant: g = !0,
2380
- showReportParticipant: v = !0,
2381
- composerDisabled: p = !1,
2412
+ showReportParticipant: p = !0,
2413
+ composerDisabled: v = !1,
2382
2414
  composerDisabledReason: N,
2383
2415
  dmAgentEnabled: x,
2384
- messageMetadata: T,
2385
- onMessageSent: S,
2386
- showStarButton: R = !1,
2387
- chatbotVotingEnabled: O = !1,
2388
- renderChannelBanner: E,
2389
- customChannelActions: A,
2390
- renderMessage: y,
2391
- onMessageLinkClick: _,
2392
- sendButton: I,
2393
- attachmentPreviewList: L,
2394
- viewerLanguage: M,
2395
- showChannelInfo: j = !0
2416
+ messageMetadata: I,
2417
+ onMessageSent: E,
2418
+ showStarButton: M = !1,
2419
+ chatbotVotingEnabled: P = !1,
2420
+ renderChannelBanner: k,
2421
+ customChannelActions: T,
2422
+ renderMessage: _,
2423
+ onMessageLinkClick: S,
2424
+ sendButton: R,
2425
+ attachmentPreviewList: $,
2426
+ viewerLanguage: A,
2427
+ showChannelInfo: D = !0
2396
2428
  }) => {
2397
- const V = W(
2398
- async ($, F, X) => {
2429
+ const z = W(
2430
+ async (F, B, X) => {
2399
2431
  var q;
2400
- const U = ((q = e.data) == null ? void 0 : q.chatbot_paused) === !0, P = x && !U, w = {
2401
- ...F,
2402
- ...P && { silent: !0 },
2403
- ...T && {
2432
+ const V = ((q = e.data) == null ? void 0 : q.chatbot_paused) === !0, L = x && !V, w = {
2433
+ ...B,
2434
+ ...L && { silent: !0 },
2435
+ ...I && {
2404
2436
  metadata: {
2405
- ...F.metadata ?? {},
2406
- ...T
2437
+ ...B.metadata ?? {},
2438
+ ...I
2407
2439
  }
2408
2440
  }
2409
- }, k = {
2441
+ }, C = {
2410
2442
  ...X,
2411
- ...P && { skip_push: !0 }
2412
- }, B = await e.sendMessage(w, k);
2413
- return S == null || S(B), B;
2443
+ ...L && { skip_push: !0 }
2444
+ }, U = await e.sendMessage(w, C);
2445
+ return E == null || E(U), U;
2414
2446
  },
2415
- [e, x, T, S]
2447
+ [e, x, I, E]
2416
2448
  ), G = H(null);
2417
2449
  return Y(() => {
2418
- if (!_) return;
2419
- const $ = G.current;
2420
- if (!$) return;
2421
- const F = (X) => {
2422
- const U = X.target, P = U == null ? void 0 : U.closest("a[href]"), w = P == null ? void 0 : P.getAttribute("href");
2450
+ if (!S) return;
2451
+ const F = G.current;
2452
+ if (!F) return;
2453
+ const B = (X) => {
2454
+ const V = X.target, L = V == null ? void 0 : V.closest("a[href]"), w = L == null ? void 0 : L.getAttribute("href");
2423
2455
  if (!w) return;
2424
- const k = P == null ? void 0 : P.closest("[data-message-id]"), B = k == null ? void 0 : k.getAttribute("data-message-id"), q = B ? e.state.messages.find((_e) => _e.id === B) : void 0;
2425
- _(w, q);
2456
+ const C = L == null ? void 0 : L.closest("[data-message-id]"), U = C == null ? void 0 : C.getAttribute("data-message-id"), q = U ? e.state.messages.find((_e) => _e.id === U) : void 0;
2457
+ S(w, q);
2426
2458
  };
2427
- return $.addEventListener("click", F), () => $.removeEventListener("click", F);
2428
- }, [_, e]), /* @__PURE__ */ n(
2459
+ return F.addEventListener("click", B), () => F.removeEventListener("click", B);
2460
+ }, [S, e]), /* @__PURE__ */ n(
2429
2461
  "div",
2430
2462
  {
2431
2463
  ref: G,
2432
- className: C(
2464
+ className: y(
2433
2465
  "messaging-channel-view h-full flex flex-col",
2434
2466
  d
2435
2467
  ),
@@ -2437,16 +2469,16 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2437
2469
  rs,
2438
2470
  {
2439
2471
  channel: e,
2440
- MessageSystem: Va,
2472
+ MessageSystem: Ga,
2441
2473
  EmptyStateIndicator: m,
2442
2474
  LoadingIndicator: Ee,
2443
- DateSeparator: Us,
2444
- TypingIndicator: Ha,
2445
- doSendMessageRequest: V,
2446
- ...I ? { SendButton: I } : {},
2447
- ...L ? { AttachmentPreviewList: L } : {},
2475
+ DateSeparator: js,
2476
+ TypingIndicator: Ya,
2477
+ doSendMessageRequest: z,
2478
+ ...R ? { SendButton: R } : {},
2479
+ ...$ ? { AttachmentPreviewList: $ } : {},
2448
2480
  children: /* @__PURE__ */ n(
2449
- Ka,
2481
+ Ja,
2450
2482
  {
2451
2483
  onBack: t,
2452
2484
  showBackButton: s,
@@ -2461,17 +2493,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2461
2493
  onBlockParticipantClick: f,
2462
2494
  onReportParticipantClick: c,
2463
2495
  showBlockParticipant: g,
2464
- showReportParticipant: v,
2465
- composerDisabled: p,
2496
+ showReportParticipant: p,
2497
+ composerDisabled: v,
2466
2498
  composerDisabledReason: N,
2467
- showStarButton: R,
2499
+ showStarButton: M,
2468
2500
  dmAgentEnabled: x,
2469
- chatbotVotingEnabled: O,
2470
- renderChannelBanner: E,
2471
- customChannelActions: A,
2472
- renderMessage: y,
2473
- viewerLanguage: M,
2474
- showChannelInfo: j
2501
+ chatbotVotingEnabled: P,
2502
+ renderChannelBanner: k,
2503
+ customChannelActions: T,
2504
+ renderMessage: _,
2505
+ viewerLanguage: A,
2506
+ showChannelInfo: D
2475
2507
  }
2476
2508
  )
2477
2509
  }
@@ -2481,7 +2513,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2481
2513
  }
2482
2514
  );
2483
2515
  dn.displayName = "ChannelView";
2484
- const fe = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2516
+ const fe = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2485
2517
  /* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
2486
2518
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2487
2519
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2496,7 +2528,7 @@ const fe = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2496
2528
  )
2497
2529
  ] }) }));
2498
2530
  fe.displayName = "ErrorState";
2499
- const yi = ({
2531
+ const Ci = ({
2500
2532
  capabilities: e = {},
2501
2533
  renderMessageInputActions: t,
2502
2534
  renderConversationFooter: s,
@@ -2512,73 +2544,73 @@ const yi = ({
2512
2544
  chatbotVotingEnabled: f = !1,
2513
2545
  viewerLanguage: c,
2514
2546
  renderChannelBanner: g,
2515
- customChannelActions: v,
2516
- renderMessage: p,
2547
+ customChannelActions: p,
2548
+ renderMessage: v,
2517
2549
  onMessageLinkClick: N,
2518
2550
  showChannelInfo: x
2519
2551
  }) => {
2520
2552
  const {
2521
- client: T,
2522
- isConnected: S,
2523
- isLoading: R,
2524
- error: O,
2525
- refreshConnection: E,
2526
- service: A,
2527
- debug: y
2528
- } = Ds(), [_, I] = D(null), [L, M] = D(null), [j, V] = D(!1), { showDeleteConversation: G = !0 } = e, $ = H(o);
2529
- $.current = o;
2530
- const F = H(a);
2531
- F.current = a;
2532
- const X = H(null), U = H(null);
2553
+ client: I,
2554
+ isConnected: E,
2555
+ isLoading: M,
2556
+ error: P,
2557
+ refreshConnection: k,
2558
+ service: T,
2559
+ debug: _
2560
+ } = Ps(), [S, R] = O(null), [$, A] = O(null), [D, z] = O(!1), { showDeleteConversation: G = !0 } = e, F = H(o);
2561
+ F.current = o;
2562
+ const B = H(a);
2563
+ B.current = a;
2564
+ const X = H(null), V = H(null);
2533
2565
  Y(() => {
2534
- U.current = _;
2535
- }, [_]), Y(() => {
2536
- if (!T || !S) return;
2537
- const k = T.userID;
2538
- if (!k) return;
2539
- const B = `${k}::${i}`;
2540
- if (X.current === B) return;
2541
- X.current = B;
2566
+ V.current = S;
2567
+ }, [S]), Y(() => {
2568
+ if (!I || !E) return;
2569
+ const C = I.userID;
2570
+ if (!C) return;
2571
+ const U = `${C}::${i}`;
2572
+ if (X.current === U) return;
2573
+ X.current = U;
2542
2574
  const q = () => {
2543
- X.current === B && (X.current = null);
2575
+ X.current === U && (X.current = null);
2544
2576
  };
2545
2577
  (async () => {
2546
2578
  var K, re;
2547
2579
  try {
2548
- y && console.log(
2580
+ _ && console.log(
2549
2581
  "[MessagingShell] Loading initial conversation with:",
2550
2582
  i
2551
2583
  );
2552
- const J = await T.queryChannels(
2584
+ const J = await I.queryChannels(
2553
2585
  {
2554
2586
  type: "messaging",
2555
- members: { $eq: [k, i] }
2587
+ members: { $eq: [C, i] }
2556
2588
  },
2557
2589
  {},
2558
2590
  { limit: 1 }
2559
2591
  );
2560
2592
  if (J.length > 0) {
2561
- I(J[0]), M(null), (K = F.current) == null || K.call(F, J[0]), y && console.log(
2593
+ R(J[0]), A(null), (K = B.current) == null || K.call(B, J[0]), _ && console.log(
2562
2594
  "[MessagingShell] Initial conversation loaded:",
2563
2595
  J[0].id
2564
2596
  );
2565
2597
  return;
2566
2598
  }
2567
- const se = $.current;
2568
- if (!se || !A) {
2569
- q(), M("No conversation found with this account"), y && console.log(
2599
+ const se = F.current;
2600
+ if (!se || !T) {
2601
+ q(), A("No conversation found with this account"), _ && console.log(
2570
2602
  "[MessagingShell] No conversation found for:",
2571
2603
  i
2572
2604
  );
2573
2605
  return;
2574
2606
  }
2575
2607
  try {
2576
- const Q = await A.startChannelWithParticipant({
2608
+ const Q = await T.startChannelWithParticipant({
2577
2609
  id: se.id,
2578
2610
  name: se.name,
2579
2611
  phone: se.phone
2580
2612
  });
2581
- I(Q), M(null), (re = F.current) == null || re.call(F, Q), y && console.log(
2613
+ R(Q), A(null), (re = B.current) == null || re.call(B, Q), _ && console.log(
2582
2614
  "[MessagingShell] Channel created and loaded:",
2583
2615
  Q.id
2584
2616
  );
@@ -2586,32 +2618,32 @@ const yi = ({
2586
2618
  console.error(
2587
2619
  "[MessagingShell] Failed to create conversation:",
2588
2620
  Q
2589
- ), q(), M("Failed to create conversation");
2621
+ ), q(), A("Failed to create conversation");
2590
2622
  }
2591
2623
  } catch (J) {
2592
2624
  console.error(
2593
2625
  "[MessagingShell] Failed to load initial conversation:",
2594
2626
  J
2595
- ), q(), U.current || M("Failed to load conversation");
2627
+ ), q(), V.current || A("Failed to load conversation");
2596
2628
  }
2597
2629
  })();
2598
- }, [i, T, S, A, y]);
2599
- const P = H(r);
2600
- P.current = r;
2630
+ }, [i, I, E, T, _]);
2631
+ const L = H(r);
2632
+ L.current = r;
2601
2633
  const w = W(() => {
2602
- var k;
2603
- I(null), V(!0), (k = P.current) == null || k.call(P);
2634
+ var C;
2635
+ R(null), z(!0), (C = L.current) == null || C.call(L);
2604
2636
  }, []);
2605
- return R ? /* @__PURE__ */ n(Ee, {}) : O ? /* @__PURE__ */ n(fe, { message: O, onBack: E }) : !S || !T ? /* @__PURE__ */ n(
2637
+ return M ? /* @__PURE__ */ n(Ee, {}) : P ? /* @__PURE__ */ n(fe, { message: P, onBack: k }) : !E || !I ? /* @__PURE__ */ n(
2606
2638
  fe,
2607
2639
  {
2608
2640
  message: "Not connected to messaging service",
2609
- onBack: E
2641
+ onBack: k
2610
2642
  }
2611
- ) : L ? /* @__PURE__ */ n(fe, { message: L }) : j && !_ ? /* @__PURE__ */ n(fe, { message: "Conversation ended" }) : _ ? /* @__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(
2643
+ ) : $ ? /* @__PURE__ */ n(fe, { message: $ }) : D && !S ? /* @__PURE__ */ n(fe, { message: "Conversation ended" }) : S ? /* @__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(
2612
2644
  dn,
2613
2645
  {
2614
- channel: _,
2646
+ channel: S,
2615
2647
  renderMessageInputActions: t,
2616
2648
  renderConversationFooter: s,
2617
2649
  renderChannelBanner: g,
@@ -2625,39 +2657,39 @@ const yi = ({
2625
2657
  onMessageSent: u,
2626
2658
  chatbotVotingEnabled: f,
2627
2659
  viewerLanguage: c,
2628
- customChannelActions: v,
2629
- renderMessage: p,
2660
+ customChannelActions: p,
2661
+ renderMessage: v,
2630
2662
  onMessageLinkClick: N,
2631
2663
  showChannelInfo: x
2632
2664
  },
2633
- _.id
2665
+ S.id
2634
2666
  ) }) }) : /* @__PURE__ */ n(Ee, {});
2635
2667
  };
2636
- function Ja(e) {
2668
+ function Za(e) {
2637
2669
  const t = e.state.pending_messages;
2638
2670
  if (t != null && t.length)
2639
2671
  for (const s of t)
2640
2672
  e.state.addMessageSorted(s.message);
2641
2673
  }
2642
- const un = z.createContext({
2674
+ const un = j.createContext({
2643
2675
  selectedChannel: void 0,
2644
2676
  onChannelSelect: () => {
2645
2677
  },
2646
2678
  debug: !1,
2647
2679
  renderMessagePreview: void 0,
2648
2680
  viewerLanguage: void 0
2649
- }), Za = un.Provider, Qa = () => z.useContext(un), er = (e, t) => {
2681
+ }), Qa = un.Provider, er = () => j.useContext(un), tr = (e, t) => {
2650
2682
  const s = new Date(
2651
2683
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2652
2684
  ), r = new Date(
2653
2685
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2654
2686
  ).getTime() - s.getTime();
2655
2687
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2656
- }, tr = (e) => {
2688
+ }, nr = (e) => {
2657
2689
  const t = /* @__PURE__ */ new Date();
2658
2690
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2659
2691
  return "Just now";
2660
- const a = er(e, t);
2692
+ const a = tr(e, t);
2661
2693
  return a === 0 ? e.toLocaleTimeString([], {
2662
2694
  hour: "numeric",
2663
2695
  minute: "2-digit",
@@ -2667,50 +2699,50 @@ const un = z.createContext({
2667
2699
  day: "numeric",
2668
2700
  year: "2-digit"
2669
2701
  });
2670
- }, mn = z.memo(
2702
+ }, mn = j.memo(
2671
2703
  ({ channel: e, unread: t }) => {
2672
- var O, E, A;
2704
+ var P, k, T;
2673
2705
  const {
2674
2706
  selectedChannel: s,
2675
2707
  onChannelSelect: a,
2676
2708
  debug: r,
2677
2709
  renderMessagePreview: i,
2678
2710
  viewerLanguage: o
2679
- } = Qa(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2711
+ } = er(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2680
2712
  e && a(e);
2681
- }, m = (y) => {
2682
- const _ = y.key === "Enter" || y.key === " ", I = y.repeat;
2683
- !_ || I || (y.preventDefault(), d());
2684
- }, u = Object.values(((O = e == null ? void 0 : e.state) == null ? void 0 : O.members) || {}).find(
2685
- (y) => {
2686
- var _, I;
2687
- return ((_ = y.user) == null ? void 0 : _.id) && y.user.id !== ((I = e == null ? void 0 : e._client) == null ? void 0 : I.userID);
2713
+ }, m = (_) => {
2714
+ const S = _.key === "Enter" || _.key === " ", R = _.repeat;
2715
+ !S || R || (_.preventDefault(), d());
2716
+ }, u = Object.values(((P = e == null ? void 0 : e.state) == null ? void 0 : P.members) || {}).find(
2717
+ (_) => {
2718
+ var S, R;
2719
+ return ((S = _.user) == null ? void 0 : S.id) && _.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
2688
2720
  }
2689
- ), f = Wt(u == null ? void 0 : u.user), c = (E = u == null ? void 0 : u.user) == null ? void 0 : E.image, g = (() => {
2690
- var _;
2691
- const y = (_ = e == null ? void 0 : e.state) == null ? void 0 : _.messages;
2692
- if (y != null && y.length) {
2693
- for (let I = y.length - 1; I >= 0; I--)
2694
- if (y[I].type !== "system") return y[I];
2721
+ ), f = Wt(u == null ? void 0 : u.user), c = (k = u == null ? void 0 : u.user) == null ? void 0 : k.image, g = (() => {
2722
+ var S;
2723
+ const _ = (S = e == null ? void 0 : e.state) == null ? void 0 : S.messages;
2724
+ if (_ != null && _.length) {
2725
+ for (let R = _.length - 1; R >= 0; R--)
2726
+ if (_[R].type !== "system") return _[R];
2695
2727
  }
2696
- })(), p = (() => {
2697
- var j, V, G, $;
2698
- const y = Xt({
2728
+ })(), v = (() => {
2729
+ var D, z, G, F;
2730
+ const _ = Xt({
2699
2731
  message: g,
2700
2732
  viewerLanguage: o
2701
2733
  });
2702
- if (((j = g == null ? void 0 : g.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
2703
- if (((V = g == null ? void 0 : g.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
2704
- if (((G = g == null ? void 0 : g.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_ATTACHMENT") return y ? `📎 ${y}` : "📎 Sent an attachment";
2705
- if (y) return y;
2706
- const M = ($ = g == null ? void 0 : g.attachments) == null ? void 0 : $[0];
2707
- return M ? M.og_scrape_url ? M.og_scrape_url : M.type === "image" ? "📷 Sent an image" : M.type === "video" ? "🎥 Sent a video" : M.type === "audio" ? "🎵 Sent audio" : M.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2708
- })(), N = g != null && g.created_at ? tr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, T = i ? i(g, p) : `${x ? "✨ " : ""}${p}`, S = qt(e), R = t ?? 0;
2734
+ if (((D = g == null ? void 0 : g.metadata) == null ? void 0 : D.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
2735
+ if (((z = g == null ? void 0 : g.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_PAID") return _ ? `💰 ${_}` : "💰 Sent a message";
2736
+ if (((G = g == null ? void 0 : g.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_ATTACHMENT") return _ ? `📎 ${_}` : "📎 Sent an attachment";
2737
+ if (_) return _;
2738
+ const A = (F = g == null ? void 0 : g.attachments) == null ? void 0 : F[0];
2739
+ return A ? A.og_scrape_url ? A.og_scrape_url : A.type === "image" ? "📷 Sent an image" : A.type === "video" ? "🎥 Sent a video" : A.type === "audio" ? "🎵 Sent audio" : A.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2740
+ })(), N = g != null && g.created_at ? nr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, I = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = qt(e), M = t ?? 0;
2709
2741
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2710
2742
  channelId: e == null ? void 0 : e.id,
2711
2743
  isSelected: l,
2712
2744
  participantName: f,
2713
- unreadCount: R,
2745
+ unreadCount: M,
2714
2746
  hasTimestamp: !!N
2715
2747
  }), /* @__PURE__ */ n(
2716
2748
  "div",
@@ -2719,7 +2751,7 @@ const un = z.createContext({
2719
2751
  tabIndex: 0,
2720
2752
  onClick: d,
2721
2753
  onKeyDown: m,
2722
- className: C(
2754
+ className: y(
2723
2755
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2724
2756
  {
2725
2757
  "bg-black/[0.04]": l,
@@ -2730,11 +2762,11 @@ const un = z.createContext({
2730
2762
  /* @__PURE__ */ n(
2731
2763
  ae,
2732
2764
  {
2733
- id: ((A = u == null ? void 0 : u.user) == null ? void 0 : A.id) || e.id || "unknown",
2765
+ id: ((T = u == null ? void 0 : u.user) == null ? void 0 : T.id) || e.id || "unknown",
2734
2766
  name: f,
2735
2767
  image: c,
2736
2768
  size: 48,
2737
- starred: S
2769
+ starred: E
2738
2770
  }
2739
2771
  ),
2740
2772
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
@@ -2742,11 +2774,11 @@ const un = z.createContext({
2742
2774
  /* @__PURE__ */ h(
2743
2775
  "h3",
2744
2776
  {
2745
- className: C(
2777
+ className: y(
2746
2778
  "text-sm font-medium truncate text-[#191918]"
2747
2779
  ),
2748
2780
  children: [
2749
- S && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2781
+ E && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2750
2782
  f
2751
2783
  ]
2752
2784
  }
@@ -2754,8 +2786,8 @@ const un = z.createContext({
2754
2786
  N && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: N })
2755
2787
  ] }),
2756
2788
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2757
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: T }),
2758
- R > 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: R > 99 ? "99+" : R })
2789
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
2790
+ M > 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: M > 99 ? "99+" : M })
2759
2791
  ] })
2760
2792
  ] })
2761
2793
  ] })
@@ -2764,25 +2796,25 @@ const un = z.createContext({
2764
2796
  }
2765
2797
  );
2766
2798
  mn.displayName = "CustomChannelPreview";
2767
- const nr = { last_message_at: -1 }, sr = z.memo(
2799
+ const sr = { last_message_at: -1 }, ar = j.memo(
2768
2800
  ({
2769
2801
  onChannelSelect: e,
2770
2802
  selectedChannel: t,
2771
2803
  filters: s,
2772
2804
  allowNewMessagesFromUnfilteredChannels: a = !1,
2773
2805
  channelRenderFilterFn: r,
2774
- sort: i = nr,
2806
+ sort: i = sr,
2775
2807
  className: o,
2776
2808
  customEmptyStateIndicator: l,
2777
2809
  renderMessagePreview: d,
2778
2810
  viewerLanguage: m
2779
2811
  }) => {
2780
- const b = z.useRef(0);
2812
+ const b = j.useRef(0);
2781
2813
  b.current++;
2782
- const { debug: u = !1 } = qe(), f = z.useCallback(
2814
+ const { debug: u = !1 } = qe(), f = j.useCallback(
2783
2815
  (g) => {
2784
- for (const v of g)
2785
- Ja(v);
2816
+ for (const p of g)
2817
+ Za(p);
2786
2818
  return r ? r(g) : g;
2787
2819
  },
2788
2820
  [r]
@@ -2792,7 +2824,7 @@ const nr = { last_message_at: -1 }, sr = z.memo(
2792
2824
  selectedChannelId: t == null ? void 0 : t.id,
2793
2825
  filters: s
2794
2826
  });
2795
- const c = z.useMemo(
2827
+ const c = j.useMemo(
2796
2828
  () => ({
2797
2829
  selectedChannel: t,
2798
2830
  onChannelSelect: e,
@@ -2811,12 +2843,12 @@ const nr = { last_message_at: -1 }, sr = z.memo(
2811
2843
  return /* @__PURE__ */ n(
2812
2844
  "div",
2813
2845
  {
2814
- className: C(
2846
+ className: y(
2815
2847
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2816
2848
  o
2817
2849
  ),
2818
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Za, { value: c, children: /* @__PURE__ */ n(
2819
- cs,
2850
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Qa, { value: c, children: /* @__PURE__ */ n(
2851
+ ds,
2820
2852
  {
2821
2853
  filters: s,
2822
2854
  sort: i,
@@ -2832,26 +2864,26 @@ const nr = { last_message_at: -1 }, sr = z.memo(
2832
2864
  );
2833
2865
  }
2834
2866
  );
2835
- sr.displayName = "ChannelList";
2836
- const ar = /^([a-z][a-z0-9+.-]*):/i, rr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2867
+ ar.displayName = "ChannelList";
2868
+ const rr = /^([a-z][a-z0-9+.-]*):/i, ir = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2837
2869
  function Qe(e) {
2838
2870
  if (typeof e != "string") return;
2839
2871
  const t = e.trim();
2840
2872
  if (t === "") return;
2841
- const s = ar.exec(t);
2873
+ const s = rr.exec(t);
2842
2874
  if (s) {
2843
2875
  const a = s[1].toLowerCase();
2844
- return rr.has(a) ? t : void 0;
2876
+ return ir.has(a) ? t : void 0;
2845
2877
  }
2846
2878
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2847
2879
  }
2848
- const ir = {
2880
+ const or = {
2849
2881
  dark: "bg-white text-[#121110] hover:bg-white/90",
2850
2882
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2851
- }, or = ({ variant: e, cta: t }) => {
2852
- const s = C(
2883
+ }, lr = ({ variant: e, cta: t }) => {
2884
+ const s = y(
2853
2885
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2854
- ir[e]
2886
+ or[e]
2855
2887
  ), a = Qe(t.href);
2856
2888
  return a ? /* @__PURE__ */ n(
2857
2889
  "a",
@@ -2878,10 +2910,10 @@ const ir = {
2878
2910
  children: t.label
2879
2911
  }
2880
2912
  );
2881
- }, lr = {
2913
+ }, cr = {
2882
2914
  dark: "text-white",
2883
2915
  light: "text-black/90"
2884
- }, cr = "text-white/30", dr = {
2916
+ }, dr = "text-white/30", ur = {
2885
2917
  dark: "text-white/55",
2886
2918
  light: "text-black/55"
2887
2919
  }, et = ({
@@ -2896,12 +2928,12 @@ const ir = {
2896
2928
  }) => {
2897
2929
  const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", b = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", g = o != null;
2898
2930
  if (!b && !u && !c && !g) return null;
2899
- const p = C(
2931
+ const v = y(
2900
2932
  "truncate text-base font-medium leading-6",
2901
- d && !t ? cr : lr[e]
2902
- ), N = C(
2933
+ d && !t ? dr : cr[e]
2934
+ ), N = y(
2903
2935
  "truncate text-xs leading-4",
2904
- dr[e]
2936
+ ur[e]
2905
2937
  );
2906
2938
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
2907
2939
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -2909,7 +2941,7 @@ const ir = {
2909
2941
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2910
2942
  b && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2911
2943
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2912
- /* @__PURE__ */ n("p", { className: C("min-w-0", p), children: m })
2944
+ /* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
2913
2945
  ] }),
2914
2946
  u && /* @__PURE__ */ n("p", { className: N, children: a })
2915
2947
  ] }),
@@ -2917,16 +2949,16 @@ const ir = {
2917
2949
  ] }),
2918
2950
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2919
2951
  ] }),
2920
- o && /* @__PURE__ */ n(or, { variant: e, cta: o })
2952
+ o && /* @__PURE__ */ n(lr, { variant: e, cta: o })
2921
2953
  ] });
2922
- }, ur = C(
2954
+ }, mr = y(
2923
2955
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2924
2956
  // 1px hairline border that sits flush with the card chrome — matches
2925
2957
  // the messaging design system's "small border around link attachments"
2926
2958
  // treatment from the mobile spec. The drop shadow remains for depth.
2927
2959
  "border border-black/[0.08]",
2928
2960
  "shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
2929
- ), Se = ({
2961
+ ), Ie = ({
2930
2962
  variant: e,
2931
2963
  children: t,
2932
2964
  href: s,
@@ -2937,8 +2969,8 @@ const ir = {
2937
2969
  bgClassName: l,
2938
2970
  "data-testid": d
2939
2971
  }) => {
2940
- const m = s != null || a != null, b = C(
2941
- ur,
2972
+ const m = s != null || a != null, b = y(
2973
+ mr,
2942
2974
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2943
2975
  // `focus-ring` is a design-system utility from the component-library
2944
2976
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2968,7 +3000,7 @@ const ir = {
2968
3000
  onClick: a,
2969
3001
  "aria-label": r,
2970
3002
  "data-testid": d,
2971
- className: C(b, "text-left"),
3003
+ className: y(b, "text-left"),
2972
3004
  children: [
2973
3005
  t,
2974
3006
  u
@@ -2986,17 +3018,17 @@ const ir = {
2986
3018
  ]
2987
3019
  }
2988
3020
  );
2989
- }, mr = {
3021
+ }, hr = {
2990
3022
  dark: "bg-white/10",
2991
3023
  light: "bg-black/5"
2992
- }, hr = {
3024
+ }, fr = {
2993
3025
  dark: "size-16 text-white/25",
2994
3026
  light: "size-16 text-black/25"
2995
3027
  }, Me = (e, t) => !!t && !!e && ne(e) === "audio", hn = (e, t) => {
2996
3028
  if (!t || !e) return !1;
2997
3029
  const s = ne(e);
2998
3030
  return s === "video" || s === "audio";
2999
- }, tt = "bg-[#F2F3F4]", Ie = ({
3031
+ }, tt = "bg-[#F2F3F4]", Se = ({
3000
3032
  variant: e,
3001
3033
  thumbnailUrl: t,
3002
3034
  sourceUrl: s,
@@ -3018,7 +3050,7 @@ const ir = {
3018
3050
  ) }) : /* @__PURE__ */ h(
3019
3051
  "div",
3020
3052
  {
3021
- className: C(
3053
+ className: y(
3022
3054
  "relative h-[180px] w-full overflow-hidden",
3023
3055
  d && "bg-black"
3024
3056
  ),
@@ -3045,12 +3077,12 @@ const ir = {
3045
3077
  ) : /* @__PURE__ */ n(
3046
3078
  "div",
3047
3079
  {
3048
- className: C(
3080
+ className: y(
3049
3081
  "flex h-full w-full items-center justify-center",
3050
- mr[e]
3082
+ hr[e]
3051
3083
  ),
3052
3084
  children: le(r, {
3053
- className: hr[e],
3085
+ className: fr[e],
3054
3086
  weight: "regular"
3055
3087
  })
3056
3088
  }
@@ -3060,7 +3092,7 @@ const ir = {
3060
3092
  ]
3061
3093
  }
3062
3094
  );
3063
- }, fr = ({
3095
+ }, gr = ({
3064
3096
  title: e,
3065
3097
  placeholderTitle: t,
3066
3098
  description: s,
@@ -3083,19 +3115,19 @@ const ir = {
3083
3115
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3084
3116
  children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
3085
3117
  }
3086
- ) : void 0, v = u ? /* @__PURE__ */ n(
3118
+ ) : void 0, p = u ? /* @__PURE__ */ n(
3087
3119
  "button",
3088
3120
  {
3089
3121
  type: "button",
3090
3122
  onClick: u,
3091
3123
  "aria-label": "Edit attachment",
3092
3124
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3093
- children: /* @__PURE__ */ n(As, { className: "size-5", weight: "regular" })
3125
+ children: /* @__PURE__ */ n(Ms, { className: "size-5", weight: "regular" })
3094
3126
  }
3095
3127
  ) : void 0;
3096
- return c ? /* @__PURE__ */ n(Se, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3128
+ return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3097
3129
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3098
- Ie,
3130
+ Se,
3099
3131
  {
3100
3132
  variant: "dark",
3101
3133
  sourceUrl: o,
@@ -3105,13 +3137,13 @@ const ir = {
3105
3137
  ) }),
3106
3138
  g && /* @__PURE__ */ n("div", { className: "shrink-0", children: g })
3107
3139
  ] }) }) : /* @__PURE__ */ h(
3108
- Se,
3140
+ Ie,
3109
3141
  {
3110
3142
  variant: "dark",
3111
3143
  topRight: f ? g : void 0,
3112
3144
  children: [
3113
3145
  !f && /* @__PURE__ */ n(
3114
- Ie,
3146
+ Se,
3115
3147
  {
3116
3148
  variant: "dark",
3117
3149
  thumbnailUrl: i,
@@ -3131,13 +3163,13 @@ const ir = {
3131
3163
  url: a,
3132
3164
  appIcon: d,
3133
3165
  cta: m,
3134
- trailingAction: v
3166
+ trailingAction: p
3135
3167
  }
3136
3168
  )
3137
3169
  ]
3138
3170
  }
3139
3171
  );
3140
- }, gr = ({
3172
+ }, br = ({
3141
3173
  title: e,
3142
3174
  description: t,
3143
3175
  url: s,
@@ -3149,15 +3181,15 @@ const ir = {
3149
3181
  cta: d,
3150
3182
  onClick: m
3151
3183
  }) => {
3152
- const b = hn(a, i), u = Qe(s), f = d == null && u != null && !b ? u : void 0, c = d == null && !b ? m : void 0, g = Me(a, i) ? tt : void 0, v = d && m ? {
3184
+ const b = hn(a, i), u = Qe(s), f = d == null && u != null && !b ? u : void 0, c = d == null && !b ? m : void 0, g = Me(a, i) ? tt : void 0, p = d && m ? {
3153
3185
  ...d,
3154
3186
  onClick: () => {
3155
- var p;
3156
- m(), (p = d.onClick) == null || p.call(d);
3187
+ var v;
3188
+ m(), (v = d.onClick) == null || v.call(d);
3157
3189
  }
3158
3190
  } : d;
3159
3191
  return /* @__PURE__ */ h(
3160
- Se,
3192
+ Ie,
3161
3193
  {
3162
3194
  variant: "light",
3163
3195
  href: f,
@@ -3167,7 +3199,7 @@ const ir = {
3167
3199
  "data-testid": "link-attachment",
3168
3200
  children: [
3169
3201
  o === "featured" && /* @__PURE__ */ n(
3170
- Ie,
3202
+ Se,
3171
3203
  {
3172
3204
  variant: "light",
3173
3205
  thumbnailUrl: r,
@@ -3184,13 +3216,13 @@ const ir = {
3184
3216
  description: t,
3185
3217
  url: s,
3186
3218
  appIcon: l,
3187
- cta: v
3219
+ cta: p
3188
3220
  }
3189
3221
  )
3190
3222
  ]
3191
3223
  }
3192
3224
  );
3193
- }, br = ({
3225
+ }, pr = ({
3194
3226
  title: e,
3195
3227
  placeholderTitle: t,
3196
3228
  description: s,
@@ -3205,7 +3237,7 @@ const ir = {
3205
3237
  }) => {
3206
3238
  const u = hn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, g = m == null && !u && c != null ? b : void 0;
3207
3239
  return /* @__PURE__ */ h(
3208
- Se,
3240
+ Ie,
3209
3241
  {
3210
3242
  variant: "dark",
3211
3243
  href: c,
@@ -3213,7 +3245,7 @@ const ir = {
3213
3245
  bgClassName: Me(r, o) ? tt : void 0,
3214
3246
  children: [
3215
3247
  l === "featured" && /* @__PURE__ */ n(
3216
- Ie,
3248
+ Se,
3217
3249
  {
3218
3250
  variant: "dark",
3219
3251
  thumbnailUrl: i,
@@ -3237,20 +3269,20 @@ const ir = {
3237
3269
  ]
3238
3270
  }
3239
3271
  );
3240
- }, Ci = {
3241
- Composer: fr,
3242
- Sent: br,
3243
- Received: gr
3244
- }, pr = {
3272
+ }, ki = {
3273
+ Composer: gr,
3274
+ Sent: pr,
3275
+ Received: br
3276
+ }, vr = {
3245
3277
  dark: "bg-[#121110]",
3246
3278
  light: "bg-[#e9eaed]"
3247
- }, vr = {
3279
+ }, xr = {
3248
3280
  dark: "text-white",
3249
3281
  light: "text-[#080707]"
3250
- }, xr = {
3282
+ }, wr = {
3251
3283
  dark: "border-white/[0.08]",
3252
3284
  light: "border-black/[0.08]"
3253
- }, wr = (e) => e === "dark" ? "sender" : "receiver", Nr = {
3285
+ }, Nr = (e) => e === "dark" ? "sender" : "receiver", _r = {
3254
3286
  sender: {
3255
3287
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3256
3288
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3272,13 +3304,13 @@ const ir = {
3272
3304
  children: i,
3273
3305
  "data-testid": o
3274
3306
  }) => {
3275
- const l = t != null && t !== "", d = Nr[wr(e)][a];
3307
+ const l = t != null && t !== "", d = _r[Nr(e)][a];
3276
3308
  return /* @__PURE__ */ h(
3277
3309
  "div",
3278
3310
  {
3279
3311
  "data-testid": o,
3280
3312
  "data-group-position": a,
3281
- className: C(
3313
+ className: y(
3282
3314
  // 280px-wide bubble — matches the mobile chat attachment width
3283
3315
  // and keeps the document / image / audio bubbles visually
3284
3316
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3287,10 +3319,10 @@ const ir = {
3287
3319
  // as the surrounding `CustomMessage` text bubbles.
3288
3320
  "relative w-[280px] overflow-hidden px-2 py-2",
3289
3321
  d,
3290
- pr[e],
3291
3322
  vr[e],
3323
+ xr[e],
3292
3324
  s && "border",
3293
- s && xr[e],
3325
+ s && wr[e],
3294
3326
  r
3295
3327
  ),
3296
3328
  children: [
@@ -3298,7 +3330,7 @@ const ir = {
3298
3330
  l ? /* @__PURE__ */ n(
3299
3331
  "p",
3300
3332
  {
3301
- className: C(
3333
+ className: y(
3302
3334
  // No `text-*` / `font-*` overrides here — caption inherits
3303
3335
  // the same font family + size as `.str-chat__message-text`
3304
3336
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3327,22 +3359,22 @@ const ir = {
3327
3359
  a.stopPropagation(), e();
3328
3360
  },
3329
3361
  "aria-label": s,
3330
- className: C(
3362
+ className: y(
3331
3363
  "flex size-6 items-center justify-center rounded-full text-white",
3332
3364
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3333
3365
  ),
3334
3366
  children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
3335
3367
  }
3336
- ), we = (e) => e === "received" ? "light" : "dark", ki = ({
3368
+ ), we = (e) => e === "received" ? "light" : "dark", Ei = ({
3337
3369
  firstOfGroup: e,
3338
3370
  endOfGroup: t,
3339
3371
  groupedByUser: s
3340
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", _r = ({
3372
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", yr = ({
3341
3373
  src: e,
3342
3374
  mimeType: t,
3343
3375
  filename: s,
3344
3376
  items: a
3345
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], yr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3377
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Cr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3346
3378
  /* @__PURE__ */ n(
3347
3379
  "audio",
3348
3380
  {
@@ -3365,7 +3397,7 @@ const ir = {
3365
3397
  preload: l,
3366
3398
  onDismiss: d
3367
3399
  }) => {
3368
- const m = we(e), b = e === "composer" && !!d, u = _r({ src: t, mimeType: s, filename: a, items: r });
3400
+ const m = we(e), b = e === "composer" && !!d, u = yr({ src: t, mimeType: s, filename: a, items: r });
3369
3401
  if (u.length === 0)
3370
3402
  return null;
3371
3403
  const f = l ?? (u.length > 1 ? "none" : "metadata");
@@ -3377,7 +3409,7 @@ const ir = {
3377
3409
  groupPosition: o,
3378
3410
  "data-testid": "audio-attachment",
3379
3411
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, g) => /* @__PURE__ */ n(
3380
- yr,
3412
+ Cr,
3381
3413
  {
3382
3414
  item: c,
3383
3415
  preload: f,
@@ -3391,15 +3423,15 @@ const ir = {
3391
3423
  )) })
3392
3424
  }
3393
3425
  );
3394
- }, Cr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), kr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Er = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Sr = {
3395
- Composer: Cr,
3396
- Sent: kr,
3397
- Received: Er
3426
+ }, kr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Sr = {
3427
+ Composer: kr,
3428
+ Sent: Er,
3429
+ Received: Ir
3398
3430
  };
3399
- function Ir(e) {
3431
+ function Tr(e) {
3400
3432
  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`;
3401
3433
  }
3402
- const Tr = {
3434
+ const Ar = {
3403
3435
  pdf: "PDF",
3404
3436
  doc: "DOC",
3405
3437
  xls: "XLS",
@@ -3409,7 +3441,7 @@ const Tr = {
3409
3441
  text: "TXT",
3410
3442
  markdown: "MD"
3411
3443
  };
3412
- function Ar(e, t) {
3444
+ function Mr(e, t) {
3413
3445
  if (t) {
3414
3446
  const r = t.lastIndexOf(".");
3415
3447
  if (r > 0 && r < t.length - 1) {
@@ -3419,7 +3451,7 @@ function Ar(e, t) {
3419
3451
  }
3420
3452
  if (!e) return;
3421
3453
  if (ne(e) === "document") {
3422
- const r = Zt(e), i = Tr[r];
3454
+ const r = Zt(e), i = Ar[r];
3423
3455
  if (i) return i;
3424
3456
  if (e === "application/octet-stream") return;
3425
3457
  }
@@ -3427,8 +3459,8 @@ function Ar(e, t) {
3427
3459
  if (!(!a || a === "*"))
3428
3460
  return a.toUpperCase();
3429
3461
  }
3430
- function Mr(e, t, s) {
3431
- const a = Ar(e, t), r = typeof s == "number" && s > 0 ? Ir(s) : void 0;
3462
+ function Rr(e, t, s) {
3463
+ const a = Mr(e, t), r = typeof s == "number" && s > 0 ? Tr(s) : void 0;
3432
3464
  return [a, r].filter(Boolean).join(" · ") || void 0;
3433
3465
  }
3434
3466
  function Z(e) {
@@ -3439,13 +3471,13 @@ function Z(e) {
3439
3471
  return "download";
3440
3472
  }
3441
3473
  }
3442
- const Rr = {
3474
+ const Lr = {
3443
3475
  dark: "text-white/55",
3444
3476
  light: "text-black/65"
3445
- }, Lr = {
3477
+ }, Dr = {
3446
3478
  dark: "bg-white/10",
3447
3479
  light: "bg-black/5"
3448
- }, Dr = {
3480
+ }, Pr = {
3449
3481
  dark: "text-white/85",
3450
3482
  light: "text-black/85"
3451
3483
  }, fn = ({
@@ -3458,16 +3490,16 @@ const Rr = {
3458
3490
  activateLabel: o,
3459
3491
  trailingAction: l
3460
3492
  }) => {
3461
- const d = s ?? t ?? "File", m = Mr(a, t, r), b = /* @__PURE__ */ n(
3493
+ const d = s ?? t ?? "File", m = Rr(a, t, r), b = /* @__PURE__ */ n(
3462
3494
  "div",
3463
3495
  {
3464
- className: C(
3496
+ className: y(
3465
3497
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3466
- Lr[e]
3498
+ Dr[e]
3467
3499
  ),
3468
3500
  "aria-hidden": !0,
3469
3501
  children: le(a, {
3470
- className: C("size-6", Dr[e]),
3502
+ className: y("size-6", Pr[e]),
3471
3503
  weight: "regular"
3472
3504
  })
3473
3505
  }
@@ -3476,9 +3508,9 @@ const Rr = {
3476
3508
  m ? /* @__PURE__ */ n(
3477
3509
  "p",
3478
3510
  {
3479
- className: C(
3511
+ className: y(
3480
3512
  "truncate text-xs leading-4",
3481
- Rr[e]
3513
+ Lr[e]
3482
3514
  ),
3483
3515
  children: m
3484
3516
  }
@@ -3489,7 +3521,7 @@ const Rr = {
3489
3521
  type: "button",
3490
3522
  onClick: i,
3491
3523
  "aria-label": o,
3492
- className: C(
3524
+ className: y(
3493
3525
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3494
3526
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3495
3527
  ),
@@ -3521,14 +3553,14 @@ async function gn(e, t) {
3521
3553
  }
3522
3554
  }
3523
3555
  }
3524
- const Pr = ({
3556
+ const Or = ({
3525
3557
  src: e,
3526
3558
  filename: t,
3527
3559
  fileSize: s,
3528
3560
  mimeType: a,
3529
3561
  title: r,
3530
3562
  items: i
3531
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Or = ({
3563
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], zr = ({
3532
3564
  variant: e,
3533
3565
  item: t,
3534
3566
  index: s,
@@ -3562,26 +3594,26 @@ const Pr = ({
3562
3594
  onClick: m,
3563
3595
  onDismiss: b
3564
3596
  }) => {
3565
- const u = we(e), f = e === "composer" && !!b, c = Pr({
3597
+ const u = we(e), f = e === "composer" && !!b, c = Or({
3566
3598
  src: t,
3567
3599
  filename: s,
3568
3600
  fileSize: a,
3569
3601
  mimeType: r,
3570
3602
  title: i,
3571
3603
  items: o
3572
- }), g = (p) => {
3573
- if ((m == null ? void 0 : m(p)) === !1) return;
3574
- const N = c[p];
3604
+ }), g = (v) => {
3605
+ if ((m == null ? void 0 : m(v)) === !1) return;
3606
+ const N = c[v];
3575
3607
  if (!N) return;
3576
3608
  const x = N.filename ?? Z(N.src);
3577
3609
  gn(N.src, x);
3578
3610
  };
3579
3611
  if (c.length === 0)
3580
3612
  return null;
3581
- const v = /* @__PURE__ */ n(
3613
+ const p = /* @__PURE__ */ n(
3582
3614
  "span",
3583
3615
  {
3584
- className: C(
3616
+ className: y(
3585
3617
  "flex size-8 items-center justify-center rounded-full",
3586
3618
  u === "dark" ? "text-white/70" : "text-black/70"
3587
3619
  ),
@@ -3596,23 +3628,23 @@ const Pr = ({
3596
3628
  text: l,
3597
3629
  groupPosition: d,
3598
3630
  "data-testid": "file-attachment",
3599
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((p, N) => /* @__PURE__ */ n(
3600
- Or,
3631
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, N) => /* @__PURE__ */ n(
3632
+ zr,
3601
3633
  {
3602
3634
  variant: u,
3603
- item: p,
3635
+ item: v,
3604
3636
  index: N,
3605
3637
  onActivate: g,
3606
- trailingAction: f && N === 0 ? /* @__PURE__ */ n(xe, { onClick: b, variant: "inline" }) : v
3638
+ trailingAction: f && N === 0 ? /* @__PURE__ */ n(xe, { onClick: b, variant: "inline" }) : p
3607
3639
  },
3608
- `${p.src}-${N}`
3640
+ `${v.src}-${N}`
3609
3641
  )) })
3610
3642
  }
3611
3643
  );
3612
- }, zr = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), $r = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Br = {
3613
- Composer: zr,
3614
- Sent: $r,
3615
- Received: Fr
3644
+ }, $r = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Br = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Ur = {
3645
+ Composer: $r,
3646
+ Sent: Fr,
3647
+ Received: Br
3616
3648
  }, at = ({
3617
3649
  onPrev: e,
3618
3650
  onNext: t,
@@ -3626,7 +3658,7 @@ const Pr = ({
3626
3658
  onClick: e,
3627
3659
  "aria-label": s,
3628
3660
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3629
- children: /* @__PURE__ */ n(Ms, { size: 20, weight: "bold", "aria-hidden": !0 })
3661
+ children: /* @__PURE__ */ n(Rs, { size: 20, weight: "bold", "aria-hidden": !0 })
3630
3662
  }
3631
3663
  ),
3632
3664
  /* @__PURE__ */ n(
@@ -3636,7 +3668,7 @@ const Pr = ({
3636
3668
  onClick: t,
3637
3669
  "aria-label": a,
3638
3670
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3639
- children: /* @__PURE__ */ n(Rs, { size: 20, weight: "bold", "aria-hidden": !0 })
3671
+ children: /* @__PURE__ */ n(Ls, { size: 20, weight: "bold", "aria-hidden": !0 })
3640
3672
  }
3641
3673
  )
3642
3674
  ] }), bn = ({
@@ -3648,7 +3680,7 @@ const Pr = ({
3648
3680
  tone: i = "dark",
3649
3681
  onTriggered: o
3650
3682
  }) => {
3651
- const [l, d] = D(!1), m = W(
3683
+ const [l, d] = O(!1), m = W(
3652
3684
  (c) => {
3653
3685
  c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
3654
3686
  }).finally(() => {
@@ -3656,7 +3688,7 @@ const Pr = ({
3656
3688
  }));
3657
3689
  },
3658
3690
  [l, e, t, o]
3659
- ), b = r ?? s !== "pill", f = { className: C(
3691
+ ), b = r ?? s !== "pill", f = { className: y(
3660
3692
  s === "pill" ? "size-4" : "size-5",
3661
3693
  "shrink-0"
3662
3694
  ), weight: "bold" };
@@ -3667,7 +3699,7 @@ const Pr = ({
3667
3699
  onClick: m,
3668
3700
  disabled: l,
3669
3701
  "aria-label": a,
3670
- className: C(
3702
+ className: y(
3671
3703
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3672
3704
  {
3673
3705
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3707,7 +3739,7 @@ const Pr = ({
3707
3739
  onClick: m,
3708
3740
  disabled: l,
3709
3741
  "aria-label": b ? a : void 0,
3710
- className: C(
3742
+ className: y(
3711
3743
  "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",
3712
3744
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3713
3745
  ),
@@ -3729,7 +3761,7 @@ const Pr = ({
3729
3761
  initialIndex: t,
3730
3762
  open: s
3731
3763
  }) => {
3732
- const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] = D(a);
3764
+ const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
3733
3765
  Y(() => {
3734
3766
  s && i($e(t, 0, Math.max(e - 1, 0)));
3735
3767
  }, [s, t, e]), Y(() => {
@@ -3895,7 +3927,7 @@ const Pr = ({
3895
3927
  ]
3896
3928
  }
3897
3929
  ) : null;
3898
- }, Ur = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", vn = ({
3930
+ }, jr = "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", vn = ({
3899
3931
  tiles: e,
3900
3932
  onTileActivate: t,
3901
3933
  maxVisible: s = 4,
@@ -3904,14 +3936,14 @@ const Pr = ({
3904
3936
  const r = e.length;
3905
3937
  if (r === 0) return null;
3906
3938
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, b) => {
3907
- const u = C(Ur, "h-full w-full");
3939
+ const u = y(jr, "h-full w-full");
3908
3940
  return t ? /* @__PURE__ */ h(
3909
3941
  "button",
3910
3942
  {
3911
3943
  type: "button",
3912
3944
  onClick: () => t(m),
3913
3945
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3914
- className: C(u, "cursor-zoom-in"),
3946
+ className: y(u, "cursor-zoom-in"),
3915
3947
  children: [
3916
3948
  d.content,
3917
3949
  b
@@ -3923,10 +3955,10 @@ const Pr = ({
3923
3955
  b
3924
3956
  ] }, m);
3925
3957
  };
3926
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3958
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3927
3959
  "div",
3928
3960
  {
3929
- className: C(
3961
+ className: y(
3930
3962
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3931
3963
  a
3932
3964
  ),
@@ -3935,7 +3967,7 @@ const Pr = ({
3935
3967
  ) : i.length === 3 ? /* @__PURE__ */ h(
3936
3968
  "div",
3937
3969
  {
3938
- className: C(
3970
+ className: y(
3939
3971
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3940
3972
  a
3941
3973
  ),
@@ -3948,7 +3980,7 @@ const Pr = ({
3948
3980
  ) : /* @__PURE__ */ n(
3949
3981
  "div",
3950
3982
  {
3951
- className: C(
3983
+ className: y(
3952
3984
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3953
3985
  a
3954
3986
  ),
@@ -3966,14 +3998,14 @@ const Pr = ({
3966
3998
  }
3967
3999
  );
3968
4000
  }, Ne = (e) => {
3969
- const [t, s] = D(!1), [a, r] = D(0), i = W(
4001
+ const [t, s] = O(!1), [a, r] = O(0), i = W(
3970
4002
  (l) => {
3971
4003
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
3972
4004
  },
3973
4005
  [e]
3974
4006
  ), o = W(() => s(!1), []);
3975
4007
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
3976
- }, jr = (e, t, s, a) => ({
4008
+ }, Vr = (e, t, s, a) => ({
3977
4009
  ariaLabel: `Open image ${t + 1} of ${s}`,
3978
4010
  content: /* @__PURE__ */ n(
3979
4011
  "img",
@@ -3988,7 +4020,7 @@ const Pr = ({
3988
4020
  className: "absolute inset-0 size-full rounded-md object-cover"
3989
4021
  }
3990
4022
  )
3991
- }), Vr = ({
4023
+ }), Gr = ({
3992
4024
  src: e,
3993
4025
  alt: t,
3994
4026
  items: s
@@ -3996,7 +4028,7 @@ const Pr = ({
3996
4028
  src: s.src,
3997
4029
  alt: s.alt,
3998
4030
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3999
- })), Gr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4031
+ })), Hr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4000
4032
  const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
4001
4033
  r
4002
4034
  );
@@ -4043,13 +4075,13 @@ const Pr = ({
4043
4075
  loading: l = "lazy",
4044
4076
  onClick: d
4045
4077
  }) => {
4046
- const m = Vr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = Ne(
4078
+ const m = Gr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = Ne(
4047
4079
  d
4048
4080
  );
4049
4081
  if (m.length === 0)
4050
4082
  return null;
4051
- const v = m.map(
4052
- (p, N) => jr(p, N, m.length, l)
4083
+ const p = m.map(
4084
+ (v, N) => Vr(v, N, m.length, l)
4053
4085
  );
4054
4086
  return /* @__PURE__ */ h(
4055
4087
  ve,
@@ -4059,7 +4091,7 @@ const Pr = ({
4059
4091
  groupPosition: o,
4060
4092
  "data-testid": "image-attachment",
4061
4093
  children: [
4062
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(vn, { tiles: v, onTileActivate: c }) }),
4094
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(vn, { tiles: p, onTileActivate: c }) }),
4063
4095
  /* @__PURE__ */ n(
4064
4096
  pn,
4065
4097
  {
@@ -4072,11 +4104,11 @@ const Pr = ({
4072
4104
  ]
4073
4105
  }
4074
4106
  );
4075
- }, Hr = (e) => /* @__PURE__ */ n(Gr, { ...e }), Yr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), qr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Wr = {
4076
- Composer: Hr,
4077
- Sent: Yr,
4078
- Received: qr
4079
- }, Xr = ({
4107
+ }, Yr = (e) => /* @__PURE__ */ n(Hr, { ...e }), qr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Wr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Xr = {
4108
+ Composer: Yr,
4109
+ Sent: qr,
4110
+ Received: Wr
4111
+ }, Kr = ({
4080
4112
  open: e,
4081
4113
  items: t,
4082
4114
  initialIndex: s = 0,
@@ -4090,7 +4122,7 @@ const Pr = ({
4090
4122
  () => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "document"),
4091
4123
  [l]
4092
4124
  ), m = ee(
4093
- () => l ? Kr(l.src) : void 0,
4125
+ () => l ? Jr(l.src) : void 0,
4094
4126
  [l]
4095
4127
  );
4096
4128
  return !l || !m ? null : /* @__PURE__ */ h(
@@ -4124,16 +4156,16 @@ const Pr = ({
4124
4156
  ]
4125
4157
  }
4126
4158
  );
4127
- }, Kr = (e) => {
4159
+ }, Jr = (e) => {
4128
4160
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4129
4161
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4130
- }, Jr = ({
4162
+ }, Zr = ({
4131
4163
  src: e,
4132
4164
  filename: t,
4133
4165
  fileSize: s,
4134
4166
  title: a,
4135
4167
  items: r
4136
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Zr = ({
4168
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Qr = ({
4137
4169
  variant: e,
4138
4170
  item: t,
4139
4171
  index: s,
@@ -4166,9 +4198,9 @@ const Pr = ({
4166
4198
  onClick: d,
4167
4199
  onDismiss: m
4168
4200
  }) => {
4169
- const b = we(e), u = Jr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: v } = Ne(
4201
+ const b = we(e), u = Zr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = Ne(
4170
4202
  d
4171
- ), p = e === "composer" && !!m;
4203
+ ), v = e === "composer" && !!m;
4172
4204
  if (u.length === 0)
4173
4205
  return null;
4174
4206
  const N = u.map((x) => ({
@@ -4183,45 +4215,45 @@ const Pr = ({
4183
4215
  groupPosition: l,
4184
4216
  "data-testid": "pdf-attachment",
4185
4217
  children: [
4186
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, T) => {
4187
- const S = x.filename ?? Z(x.src), R = p && T === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4218
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, I) => {
4219
+ const E = x.filename ?? Z(x.src), M = v && I === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4188
4220
  bn,
4189
4221
  {
4190
4222
  url: x.src,
4191
- filename: S,
4223
+ filename: E,
4192
4224
  variant: "inline",
4193
- label: `Download ${S}`,
4225
+ label: `Download ${E}`,
4194
4226
  tone: b
4195
4227
  }
4196
4228
  );
4197
4229
  return /* @__PURE__ */ n(
4198
- Zr,
4230
+ Qr,
4199
4231
  {
4200
4232
  variant: b,
4201
4233
  item: x,
4202
- index: T,
4234
+ index: I,
4203
4235
  onActivate: g,
4204
- trailingAction: R
4236
+ trailingAction: M
4205
4237
  },
4206
- `${x.src}-${T}`
4238
+ `${x.src}-${I}`
4207
4239
  );
4208
4240
  }) }),
4209
4241
  /* @__PURE__ */ n(
4210
- Xr,
4242
+ Kr,
4211
4243
  {
4212
4244
  open: f,
4213
4245
  items: N,
4214
4246
  initialIndex: c,
4215
- onClose: v
4247
+ onClose: p
4216
4248
  }
4217
4249
  )
4218
4250
  ]
4219
4251
  }
4220
4252
  );
4221
- }, Qr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ei = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ti = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), ni = {
4222
- Composer: Qr,
4223
- Sent: ei,
4224
- Received: ti
4253
+ }, ei = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ti = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ni = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), si = {
4254
+ Composer: ei,
4255
+ Sent: ti,
4256
+ Received: ni
4225
4257
  }, Nn = ({
4226
4258
  open: e,
4227
4259
  items: t,
@@ -4272,7 +4304,7 @@ const Pr = ({
4272
4304
  ]
4273
4305
  }
4274
4306
  ) : null;
4275
- }, si = () => /* @__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(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), _n = ({
4307
+ }, ai = () => /* @__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(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), _n = ({
4276
4308
  item: e,
4277
4309
  index: t
4278
4310
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4294,11 +4326,11 @@ const Pr = ({
4294
4326
  "aria-hidden": !0
4295
4327
  }
4296
4328
  ) }),
4297
- /* @__PURE__ */ n(si, {})
4298
- ] }), ai = (e, t, s) => ({
4329
+ /* @__PURE__ */ n(ai, {})
4330
+ ] }), ri = (e, t, s) => ({
4299
4331
  ariaLabel: `Play video ${t + 1} of ${s}`,
4300
4332
  content: /* @__PURE__ */ n(_n, { item: e, index: t })
4301
- }), ri = ({
4333
+ }), ii = ({
4302
4334
  src: e,
4303
4335
  poster: t,
4304
4336
  mimeType: s,
@@ -4310,7 +4342,7 @@ const Pr = ({
4310
4342
  mimeType: s.mimeType,
4311
4343
  preload: s.preload,
4312
4344
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4313
- })), ii = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4345
+ })), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4314
4346
  const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = Ne(
4315
4347
  i
4316
4348
  );
@@ -4351,13 +4383,13 @@ const Pr = ({
4351
4383
  preload: d,
4352
4384
  onClick: m
4353
4385
  }) => {
4354
- const b = ri({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: v } = Ne(
4386
+ const b = ii({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = Ne(
4355
4387
  m
4356
4388
  );
4357
4389
  if (b.length === 0)
4358
4390
  return null;
4359
- const p = b.map(
4360
- (N, x) => ai(N, x, b.length)
4391
+ const v = b.map(
4392
+ (N, x) => ri(N, x, b.length)
4361
4393
  );
4362
4394
  return /* @__PURE__ */ h(
4363
4395
  ve,
@@ -4370,7 +4402,7 @@ const Pr = ({
4370
4402
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4371
4403
  vn,
4372
4404
  {
4373
- tiles: p,
4405
+ tiles: v,
4374
4406
  onTileActivate: g,
4375
4407
  className: "overflow-hidden rounded-md"
4376
4408
  }
@@ -4381,23 +4413,23 @@ const Pr = ({
4381
4413
  open: f,
4382
4414
  items: yn(b, r),
4383
4415
  initialIndex: c,
4384
- onClose: v
4416
+ onClose: p
4385
4417
  }
4386
4418
  )
4387
4419
  ]
4388
4420
  }
4389
4421
  );
4390
- }, oi = (e) => /* @__PURE__ */ n(ii, { ...e }), li = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), ci = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), di = {
4391
- Composer: oi,
4392
- Sent: li,
4393
- Received: ci
4394
- }, Ei = {
4395
- Image: Wr,
4396
- Video: di,
4422
+ }, li = (e) => /* @__PURE__ */ n(oi, { ...e }), ci = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), di = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), ui = {
4423
+ Composer: li,
4424
+ Sent: ci,
4425
+ Received: di
4426
+ }, Ii = {
4427
+ Image: Xr,
4428
+ Video: ui,
4397
4429
  Audio: Sr,
4398
- Pdf: ni,
4399
- File: Br
4400
- }, ui = ({
4430
+ Pdf: si,
4431
+ File: Ur
4432
+ }, mi = ({
4401
4433
  question: e,
4402
4434
  onClick: t,
4403
4435
  loading: s = !1,
@@ -4409,7 +4441,7 @@ const Pr = ({
4409
4441
  onClick: t,
4410
4442
  disabled: s,
4411
4443
  style: { backgroundColor: "#E6E5E3" },
4412
- className: C(
4444
+ className: y(
4413
4445
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4414
4446
  {
4415
4447
  "hover:brightness-95 active:brightness-90": !s,
@@ -4448,7 +4480,7 @@ const Pr = ({
4448
4480
  children: [
4449
4481
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4450
4482
  l.map((d) => /* @__PURE__ */ n(
4451
- ui,
4483
+ mi,
4452
4484
  {
4453
4485
  question: d.question,
4454
4486
  onClick: () => t(d.id),
@@ -4463,37 +4495,37 @@ const Pr = ({
4463
4495
  };
4464
4496
  export {
4465
4497
  Qt as A,
4466
- Vs as B,
4467
- qa as C,
4468
- Ds as D,
4498
+ Gs as B,
4499
+ Wa as C,
4500
+ Ps as D,
4469
4501
  Si as F,
4470
- Ci as L,
4471
- Ni as M,
4502
+ ki as L,
4503
+ _i as M,
4472
4504
  he as a,
4473
4505
  ae as b,
4474
- sr as c,
4506
+ ar as c,
4475
4507
  dn as d,
4476
- _i as e,
4477
- ui as f,
4508
+ yi as e,
4509
+ mi as f,
4478
4510
  ne as g,
4479
4511
  Ot as h,
4480
- Ei as i,
4481
- _a as j,
4482
- wi as k,
4483
- yi as l,
4484
- Mr as m,
4485
- Ir as n,
4486
- tr as o,
4487
- Ar as p,
4512
+ Ii as i,
4513
+ ya as j,
4514
+ Ni as k,
4515
+ Ci as l,
4516
+ Rr as m,
4517
+ Tr as n,
4518
+ nr as o,
4519
+ Mr as p,
4488
4520
  Xt as q,
4489
4521
  le as r,
4490
4522
  nn as s,
4491
- Os as t,
4492
- ki as u,
4493
- Gs as v,
4523
+ zs as t,
4524
+ Ei as u,
4525
+ Hs as v,
4494
4526
  Je as w,
4495
4527
  Ze as x,
4496
4528
  Wt as y,
4497
- ba as z
4529
+ pa as z
4498
4530
  };
4499
- //# sourceMappingURL=index-BcHUpyyw.js.map
4531
+ //# sourceMappingURL=index-C2wfgpUU.js.map