@linktr.ee/messaging-react 3.3.13 → 3.4.0-rc-1782373728

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 (30) hide show
  1. package/dist/{Card-p74GBYEd.cjs → Card-B9Z659Y-.cjs} +2 -2
  2. package/dist/{Card-p74GBYEd.cjs.map → Card-B9Z659Y-.cjs.map} +1 -1
  3. package/dist/{Card-BSIZi_Cu.cjs → Card-C3icBnXT.cjs} +2 -2
  4. package/dist/{Card-BSIZi_Cu.cjs.map → Card-C3icBnXT.cjs.map} +1 -1
  5. package/dist/{Card-CI6Trmpw.js → Card-DGkh6_ti.js} +2 -2
  6. package/dist/{Card-CI6Trmpw.js.map → Card-DGkh6_ti.js.map} +1 -1
  7. package/dist/{Card-BCFhuR1g.cjs → Card-DVo2e4rF.cjs} +2 -2
  8. package/dist/{Card-BCFhuR1g.cjs.map → Card-DVo2e4rF.cjs.map} +1 -1
  9. package/dist/{Card-jmfDlxVY.js → Card-TNeK_nFK.js} +2 -2
  10. package/dist/{Card-jmfDlxVY.js.map → Card-TNeK_nFK.js.map} +1 -1
  11. package/dist/{Card-Bl0tPvn7.js → Card-h43tRi_a.js} +3 -3
  12. package/dist/{Card-Bl0tPvn7.js.map → Card-h43tRi_a.js.map} +1 -1
  13. package/dist/{LockedThumbnail-qhUBSijq.js → LockedThumbnail-DE3KLtk1.js} +2 -2
  14. package/dist/{LockedThumbnail-qhUBSijq.js.map → LockedThumbnail-DE3KLtk1.js.map} +1 -1
  15. package/dist/{LockedThumbnail-yoFQqnl6.cjs → LockedThumbnail-DjFuOEgv.cjs} +2 -2
  16. package/dist/{LockedThumbnail-yoFQqnl6.cjs.map → LockedThumbnail-DjFuOEgv.cjs.map} +1 -1
  17. package/dist/index--bjxhW3D.cjs +2 -0
  18. package/dist/index--bjxhW3D.cjs.map +1 -0
  19. package/dist/{index-BHFdqj7Z.js → index-DKq7HA0h.js} +874 -845
  20. package/dist/index-DKq7HA0h.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +10 -0
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/ChannelView.test.tsx +20 -0
  26. package/src/components/ChannelView.tsx +43 -7
  27. package/src/types.ts +11 -0
  28. package/dist/index-BHFdqj7Z.js.map +0 -1
  29. package/dist/index-D31aF4s2.cjs +0 -2
  30. package/dist/index-D31aF4s2.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
- import { jsx as n, jsxs as h, Fragment as ne } from "react/jsx-runtime";
2
- import j, { createContext as He, useContext as Ae, useCallback as X, useState as P, useRef as V, useEffect as Y, useId as En, useMemo as te, Suspense as Ye } from "react";
3
- import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
4
- import { StreamChat as In, LinkPreviewsManager as Tt } from "stream-chat";
5
- import { Chat as Tn, DateSeparator as An, useChannelStateContext as de, useChatContext as qe, areMessageUIPropsEqual as Mn, useMessageReminder as Rn, useComponentContext as Ut, Attachment as Ln, EditMessageModal as Dn, MessageBlocked as Pn, MessageBouncePrompt as On, MessageDeleted as zn, MessageIsThreadReplyInChannelButtonIndicator as $n, MessageRepliesCountButton as Fn, ReminderNotification as Bn, StreamedMessageText as Un, messageHasAttachments as jn, messageHasReactions as Vn, isDateSeparatorMessage as Gn, isMessageBlocked as Hn, isMessageBounced as Yn, MessageBounceModal as qn, MessageText as At, Poll as Wn, MessageErrorIcon as Xn, useMessageContext as xe, useMessageComposer as Kn, useStateStore as Jn, MessageInput as Zn, useMessageInputContext as Qn, useMessageComposerHasSendableData as es, AttachmentPreviewList as ts, QuotedMessagePreview as ns, TextareaComposer as ss, MessageTimestamp as De, AIStates as Pe, useTypingContext as as, useAIState as rs, Channel as is, WithComponents as os, Window as ls, MessageList as cs, ChannelList as ds, InfiniteScroll as us } from "stream-chat-react";
6
- import { StarIcon as Be, DotsThreeIcon as ms, SpinnerGapIcon as ke, SignOutIcon as hs, ProhibitInsetIcon as Mt, FlagIcon as jt, FileIcon as Vt, ImageIcon as fs, SpeakerHighIcon as gs, VideoCameraIcon as Gt, FileMdIcon as bs, FileTextIcon as ps, FileZipIcon as vs, FilePptIcon as xs, FileCsvIcon as ws, FileXlsIcon as _s, FileDocIcon as Ns, FilePdfIcon as ys, CircleNotchIcon as pe, PlayIcon as Ue, PauseIcon as Cs, LinkIcon as ks, DownloadSimpleIcon as ve, GiftIcon as Es, ThumbsUpIcon as Ss, ThumbsDownIcon as Is, TrashSimpleIcon as Ts, XIcon as Me, ArrowUpIcon as As, SparkleIcon as je, ProhibitIcon as Ms, ArrowLeftIcon as Rt, PencilSimpleIcon as Rs, CaretLeftIcon as Ls, CaretRightIcon as Ds } from "@phosphor-icons/react";
7
- import y from "classnames";
8
- import { MessageActions as Ps, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
9
- const Yt = He({
1
+ import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
+ import U, { createContext as Ye, useContext as Ae, useCallback as J, useState as z, useRef as j, useEffect as X, useId as Sn, useMemo as ne, Suspense as qe } from "react";
3
+ import { StreamChatService as In } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as Tn, LinkPreviewsManager as At } from "stream-chat";
5
+ import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as We, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as jt, Attachment as Dn, EditMessageModal as On, MessageBlocked as Pn, MessageBouncePrompt as zn, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Mt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as xe, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as De, AIStates as Oe, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
6
+ import { StarIcon as Be, DotsThreeIcon as hs, SpinnerGapIcon as ke, SignOutIcon as fs, ProhibitInsetIcon as Rt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Ht, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as Ue, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Me, ArrowUpIcon as Ms, SparkleIcon as je, ProhibitIcon as Rs, ArrowLeftIcon as Lt, CaretRightIcon as Ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
7
+ import C from "classnames";
8
+ import { MessageActions as Os, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
9
+ const qt = Ye({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const Yt = He({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), We = () => Ae(Yt), Ni = ({
19
+ }), Xe = () => Ae(qt), Ni = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,10 +24,10 @@ const Yt = He({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var z, M;
28
- const o = X(
29
- (C, ...A) => {
30
- i && console.log(`🔥 [MessagingProvider] ${C}`, ...A);
27
+ var F, T;
28
+ const o = J(
29
+ (E, ...A) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${E}`, ...A);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,77 +37,77 @@ const Yt = He({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [l, d] = P(null), [m, g] = P(null), [u, f] = P(!1), [c, b] = P(!1), [x, p] = P(null), w = V(!1), _ = V(null), I = V(s);
41
- I.current = s;
42
- const E = V(i);
43
- E.current = i;
44
- const R = V({
40
+ const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, b] = z(!1), [w, p] = z(null), v = j(!1), _ = j(null), R = j(s);
41
+ R.current = s;
42
+ const y = j(i);
43
+ y.current = i;
44
+ const M = j({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), D = V(0);
49
+ }), D = j(0);
50
50
  D.current++, o("📊 RENDER INFO", {
51
51
  renderCount: D.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
54
- userChanged: R.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: R.current.apiKey !== a,
56
- serviceConfigChanged: R.current.serviceConfig !== s,
57
- capabilitiesChanged: R.current.capabilities !== r
54
+ userChanged: M.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: M.current.apiKey !== a,
56
+ serviceConfigChanged: M.current.serviceConfig !== s,
57
+ capabilitiesChanged: M.current.capabilities !== r
58
58
  }
59
- }), R.current = {
59
+ }), M.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const O = V(null);
66
- a && ((z = O.current) == null ? void 0 : z.apiKey) !== a && (O.current = { apiKey: a, client: new In(a) });
67
- const T = a ? ((M = O.current) == null ? void 0 : M.client) ?? null : null;
68
- Y(() => {
69
- const C = D.current, A = I.current;
70
- if (!a || !T || !A) {
65
+ const $ = j(null);
66
+ a && ((F = $.current) == null ? void 0 : F.apiKey) !== a && ($.current = { apiKey: a, client: new Tn(a) });
67
+ const L = a ? ((T = $.current) == null ? void 0 : T.client) ?? null : null;
68
+ X(() => {
69
+ const E = D.current, A = R.current;
70
+ if (!a || !L || !A) {
71
71
  o("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: C,
72
+ renderCount: E,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
77
  o("🚀 CREATING SERVICE", {
78
- renderCount: C,
78
+ renderCount: E,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const $ = new Sn({
81
+ const O = new In({
82
82
  ...A,
83
83
  apiKey: a,
84
- debug: E.current,
85
- client: T
84
+ debug: y.current,
85
+ client: L
86
86
  });
87
- _.current = $, d($), o("✅ SERVICE SET", {
88
- renderCount: C,
89
- serviceInstance: !!$
87
+ _.current = O, d(O), o("✅ SERVICE SET", {
88
+ renderCount: E,
89
+ serviceInstance: !!O
90
90
  });
91
- }, [a, T]);
92
- const N = V(null);
93
- Y(() => {
94
- var A, $;
91
+ }, [a, L]);
92
+ const N = j(null);
93
+ X(() => {
94
+ var A, O;
95
95
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!l,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
- isConnecting: w.current,
99
+ isConnecting: v.current,
100
100
  isConnected: u,
101
101
  dependencies: { service: !!l, userId: t == null ? void 0 : t.id }
102
102
  }), !l || !t) {
103
103
  o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
- if (w.current) {
106
+ if (v.current) {
107
107
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((A = N.current) == null ? void 0 : A.serviceId) === l && (($ = N.current) == null ? void 0 : $.userId) === t.id) {
110
+ if (((A = N.current) == null ? void 0 : A.serviceId) === l && ((O = N.current) == null ? void 0 : O.userId) === t.id) {
111
111
  o(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -115,7 +115,7 @@ const Yt = He({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- o("🚀 STARTING USER CONNECTION", { userId: t.id }), w.current = !0, b(!0), p(null);
118
+ o("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, b(!0), p(null);
119
119
  try {
120
120
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
121
  const B = await l.connectUser(t);
@@ -124,26 +124,26 @@ const Yt = He({
124
124
  clientId: B.userID
125
125
  });
126
126
  } catch (B) {
127
- const G = B instanceof Error ? B.message : "Connection failed";
128
- p(G), o("❌ USER CONNECTION ERROR", {
127
+ const H = B instanceof Error ? B.message : "Connection failed";
128
+ p(H), o("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
- error: G
130
+ error: H
131
131
  });
132
132
  } finally {
133
- b(!1), w.current = !1, o("🔄 USER CONNECTION FINISHED", {
133
+ b(!1), v.current = !1, o("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: u
136
136
  });
137
137
  }
138
138
  })();
139
- }, [l, t, o, u]), Y(() => {
140
- const C = T;
139
+ }, [l, t, o, u]), X(() => {
140
+ const E = L;
141
141
  return () => {
142
142
  var A;
143
- C && (N.current = null, (A = _.current) == null || A.disconnectUser().catch(console.error));
143
+ E && (N.current = null, (A = _.current) == null || A.disconnectUser().catch(console.error));
144
144
  };
145
- }, [T]);
146
- const S = X(async () => {
145
+ }, [L]);
146
+ const I = J(async () => {
147
147
  if (o("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!l,
149
149
  hasUser: !!t
@@ -154,10 +154,10 @@ const Yt = He({
154
154
  o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
155
155
  try {
156
156
  o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
157
- const C = await l.connectUser(t);
158
- g(C), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (C) {
160
- const A = C instanceof Error ? C.message : "Refresh failed";
157
+ const E = await l.connectUser(t);
158
+ g(E), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (E) {
160
+ const A = E instanceof Error ? E.message : "Refresh failed";
161
161
  p(A), o("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
163
  error: A
@@ -165,53 +165,53 @@ const Yt = He({
165
165
  } finally {
166
166
  b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [l, t, o]), L = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [l, t, o]), S = U.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!l,
170
170
  hasClient: !!m,
171
171
  isConnected: u,
172
172
  isLoading: c,
173
- hasError: !!x,
173
+ hasError: !!w,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
176
  service: l,
177
177
  client: m,
178
178
  isConnected: u,
179
179
  isLoading: c,
180
- error: x,
180
+ error: w,
181
181
  capabilities: r,
182
- refreshConnection: S,
182
+ refreshConnection: I,
183
183
  debug: i
184
184
  }), [
185
185
  l,
186
186
  m,
187
187
  u,
188
188
  c,
189
- x,
189
+ w,
190
190
  r,
191
- S,
191
+ I,
192
192
  i,
193
193
  o
194
194
  ]);
195
195
  return o("🔄 RENDER END", {
196
196
  renderCount: D.current,
197
- willRenderChat: !!T,
198
- contextValueReady: !!L
199
- }), /* @__PURE__ */ n(Yt.Provider, { value: L, children: T ? /* @__PURE__ */ n(
200
- Tn,
197
+ willRenderChat: !!L,
198
+ contextValueReady: !!S
199
+ }), /* @__PURE__ */ n(qt.Provider, { value: S, children: L ? /* @__PURE__ */ n(
200
+ An,
201
201
  {
202
- client: T,
202
+ client: L,
203
203
  customClasses: {
204
204
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
205
205
  },
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, Os = () => We(), qt = (e) => {
209
+ }, Ps = () => Xe(), Wt = (e) => {
210
210
  var a, r;
211
- const [t, s] = P(
211
+ const [t, s] = z(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
- return Y(() => {
214
+ return X(() => {
215
215
  var o;
216
216
  if (!e) {
217
217
  s(!1);
@@ -232,14 +232,14 @@ const Yt = He({
232
232
  function $s(e) {
233
233
  return zs.test(e.trim());
234
234
  }
235
- function Lt(e, t) {
235
+ function Dt(e, t) {
236
236
  const s = e == null ? void 0 : e.trim();
237
237
  return !s || t && s === t ? !1 : !$s(s);
238
238
  }
239
- function Wt(e) {
240
- 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";
239
+ function Xt(e) {
240
+ return Dt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Dt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
241
241
  }
242
- const Dt = [
242
+ const Ot = [
243
243
  "🍎",
244
244
  // Apple
245
245
  "🍌",
@@ -276,10 +276,10 @@ function Fs(e) {
276
276
  return Math.abs(t);
277
277
  }
278
278
  function Bs(e) {
279
- const s = Fs(e) % Dt.length;
280
- return Dt[s];
279
+ const s = Fs(e) % Ot.length;
280
+ return Ot[s];
281
281
  }
282
- const re = ({
282
+ const ie = ({
283
283
  id: e,
284
284
  image: t,
285
285
  size: s = 40,
@@ -299,7 +299,7 @@ const re = ({
299
299
  "div",
300
300
  {
301
301
  "aria-hidden": "true",
302
- className: y(
302
+ className: C(
303
303
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
304
304
  m
305
305
  ),
@@ -309,7 +309,7 @@ const re = ({
309
309
  return /* @__PURE__ */ h(
310
310
  "div",
311
311
  {
312
- className: y(
312
+ className: C(
313
313
  "relative flex-shrink-0 !bg-transparent",
314
314
  a
315
315
  ),
@@ -331,7 +331,7 @@ const re = ({
331
331
  "div",
332
332
  {
333
333
  "data-testid": "avatar-ring",
334
- className: y(
334
+ className: C(
335
335
  "h-full w-full",
336
336
  "bg-transparent"
337
337
  ),
@@ -363,71 +363,71 @@ const re = ({
363
363
  onActionComplete: m,
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
- var z;
367
- const { service: u, debug: f } = We(), c = (z = t == null ? void 0 : t.user) == null ? void 0 : z.id, b = !!(a && s && u && c), [x, p] = P(!1), [w, _] = P(null), [I, E] = P(!1), [R, D] = P(!1), O = b && ((w == null ? void 0 : w.participantId) !== c || (w == null ? void 0 : w.service) !== u);
368
- return Y(() => {
366
+ var F;
367
+ const { service: u, debug: f } = Xe(), c = (F = t == null ? void 0 : t.user) == null ? void 0 : F.id, b = !!(a && s && u && c), [w, p] = z(!1), [v, _] = z(null), [R, y] = z(!1), [M, D] = z(!1), $ = b && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
368
+ return X(() => {
369
369
  if (!b || !u || !c) {
370
370
  p(!1), _(null);
371
371
  return;
372
372
  }
373
- let M = !1;
373
+ let T = !1;
374
374
  return (async () => {
375
375
  try {
376
- const C = await u.getBlockedUsers();
377
- if (M) return;
376
+ const E = await u.getBlockedUsers();
377
+ if (T) return;
378
378
  p(
379
- C.some(
379
+ E.some(
380
380
  (A) => A.blocked_user_id === c
381
381
  )
382
382
  );
383
- } catch (C) {
384
- M || console.error(`[${g}] Failed to check blocked status:`, C);
383
+ } catch (E) {
384
+ T || console.error(`[${g}] Failed to check blocked status:`, E);
385
385
  } finally {
386
- M || _({ participantId: c, service: u });
386
+ T || _({ participantId: c, service: u });
387
387
  }
388
388
  })(), () => {
389
- M = !0;
389
+ T = !0;
390
390
  };
391
391
  }, [b, u, c, g]), {
392
- isParticipantBlocked: x,
393
- isCheckingBlockedStatus: O,
394
- isLeaving: I,
395
- isUpdatingBlockStatus: R,
392
+ isParticipantBlocked: w,
393
+ isCheckingBlockedStatus: $,
394
+ isLeaving: R,
395
+ isUpdatingBlockStatus: M,
396
396
  handleLeaveConversation: async () => {
397
- var M;
398
- if (!I) {
399
- o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), E(!0);
397
+ var T;
398
+ if (!R) {
399
+ o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), y(!0);
400
400
  try {
401
- const C = ((M = e._client) == null ? void 0 : M.userID) ?? null;
402
- await e.hide(C, !1), r && await r(e), m == null || m();
403
- } catch (C) {
404
- console.error(`[${g}] Failed to leave conversation`, C);
401
+ const E = ((T = e._client) == null ? void 0 : T.userID) ?? null;
402
+ await e.hide(E, !1), r && await r(e), m == null || m();
403
+ } catch (E) {
404
+ console.error(`[${g}] Failed to leave conversation`, E);
405
405
  } finally {
406
- E(!1);
406
+ y(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var M, C, A;
412
- if (!(R || !u)) {
413
- l == null || l(), f && console.log(`[${g}] Block member`, (M = t == null ? void 0 : t.user) == null ? void 0 : M.id), D(!0);
411
+ var T, E, A;
412
+ if (!(M || !u)) {
413
+ l == null || l(), f && console.log(`[${g}] Block member`, (T = t == null ? void 0 : t.user) == null ? void 0 : T.id), D(!0);
414
414
  try {
415
- await u.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
416
- } catch ($) {
417
- console.error(`[${g}] Failed to block member`, $);
415
+ await u.blockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
416
+ } catch (O) {
417
+ console.error(`[${g}] Failed to block member`, O);
418
418
  } finally {
419
419
  D(!1);
420
420
  }
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var M, C, A;
425
- if (!(R || !u)) {
426
- l == null || l(), f && console.log(`[${g}] Unblock member`, (M = t == null ? void 0 : t.user) == null ? void 0 : M.id), D(!0);
424
+ var T, E, A;
425
+ if (!(M || !u)) {
426
+ l == null || l(), f && console.log(`[${g}] Unblock member`, (T = t == null ? void 0 : t.user) == null ? void 0 : T.id), D(!0);
427
427
  try {
428
- await u.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
429
- } catch ($) {
430
- console.error(`[${g}] Failed to unblock member`, $);
428
+ await u.unBlockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
429
+ } catch (O) {
430
+ console.error(`[${g}] Failed to unblock member`, O);
431
431
  } finally {
432
432
  D(!1);
433
433
  }
@@ -446,7 +446,7 @@ const re = ({
446
446
  "button",
447
447
  {
448
448
  type: "button",
449
- className: y(
449
+ className: C(
450
450
  "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",
451
451
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
452
452
  t
@@ -468,15 +468,15 @@ const re = ({
468
468
  customChannelActions: g,
469
469
  triggerClassName: u
470
470
  }) => {
471
- const [f, c] = P(!1), b = V(null), x = En(), p = X(() => c(!1), []), {
472
- isParticipantBlocked: w,
471
+ const [f, c] = z(!1), b = j(null), w = Sn(), p = J(() => c(!1), []), {
472
+ isParticipantBlocked: v,
473
473
  isCheckingBlockedStatus: _,
474
- isLeaving: I,
475
- isUpdatingBlockStatus: E,
476
- handleLeaveConversation: R,
474
+ isLeaving: R,
475
+ isUpdatingBlockStatus: y,
476
+ handleLeaveConversation: M,
477
477
  handleBlockUser: D,
478
- handleUnblockUser: O,
479
- handleReportUser: T
478
+ handleUnblockUser: $,
479
+ handleReportUser: L
480
480
  } = js({
481
481
  channel: e,
482
482
  participant: t,
@@ -490,15 +490,15 @@ const re = ({
490
490
  onActionComplete: p,
491
491
  logLabel: "ChannelActionsMenu"
492
492
  });
493
- return Y(() => {
493
+ return X(() => {
494
494
  if (!f) return;
495
- const S = (z) => {
496
- b.current && !b.current.contains(z.target) && c(!1);
497
- }, L = (z) => {
498
- z.key === "Escape" && c(!1);
495
+ const I = (F) => {
496
+ b.current && !b.current.contains(F.target) && c(!1);
497
+ }, S = (F) => {
498
+ F.key === "Escape" && c(!1);
499
499
  };
500
- return document.addEventListener("mousedown", S), document.addEventListener("keydown", L), () => {
501
- document.removeEventListener("mousedown", S), document.removeEventListener("keydown", L);
500
+ return document.addEventListener("mousedown", I), document.addEventListener("keydown", S), () => {
501
+ document.removeEventListener("mousedown", I), document.removeEventListener("keydown", S);
502
502
  };
503
503
  }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
504
504
  /* @__PURE__ */ h(
@@ -508,10 +508,10 @@ const re = ({
508
508
  type: "button",
509
509
  "aria-haspopup": "true",
510
510
  "aria-expanded": f,
511
- "aria-controls": f ? x : void 0,
512
- onClick: () => c((S) => !S),
511
+ "aria-controls": f ? w : void 0,
512
+ onClick: () => c((I) => !I),
513
513
  children: [
514
- /* @__PURE__ */ n(ms, { className: "size-5 text-black/90" }),
514
+ /* @__PURE__ */ n(hs, { className: "size-5 text-black/90" }),
515
515
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
516
516
  ]
517
517
  }
@@ -519,9 +519,9 @@ const re = ({
519
519
  f && /* @__PURE__ */ n(
520
520
  "div",
521
521
  {
522
- id: x,
522
+ id: w,
523
523
  "aria-label": "Conversation options",
524
- className: y(
524
+ className: C(
525
525
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
526
526
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
527
527
  ),
@@ -529,11 +529,11 @@ const re = ({
529
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
530
  ge,
531
531
  {
532
- onClick: R,
533
- disabled: I,
534
- "aria-busy": I,
532
+ onClick: M,
533
+ disabled: R,
534
+ "aria-busy": R,
535
535
  children: [
536
- I ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(hs, { className: "h-5 w-5" }),
536
+ R ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
537
537
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
538
538
  ]
539
539
  }
@@ -545,14 +545,14 @@ const re = ({
545
545
  /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }),
546
546
  /* @__PURE__ */ n("span", { children: "Block" })
547
547
  ] })
548
- ) : w ? /* @__PURE__ */ h(
548
+ ) : v ? /* @__PURE__ */ h(
549
549
  ge,
550
550
  {
551
- onClick: O,
552
- disabled: E,
553
- "aria-busy": E,
551
+ onClick: $,
552
+ disabled: y,
553
+ "aria-busy": y,
554
554
  children: [
555
- E ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
555
+ y ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
556
556
  /* @__PURE__ */ n("span", { children: "Unblock" })
557
557
  ]
558
558
  }
@@ -560,16 +560,16 @@ const re = ({
560
560
  ge,
561
561
  {
562
562
  onClick: D,
563
- disabled: E,
564
- "aria-busy": E,
563
+ disabled: y,
564
+ "aria-busy": y,
565
565
  children: [
566
- E ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
566
+ y ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
567
567
  /* @__PURE__ */ n("span", { children: "Block" })
568
568
  ]
569
569
  }
570
570
  ) }),
571
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: T, children: [
572
- /* @__PURE__ */ n(jt, { className: "h-5 w-5" }),
571
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: L, children: [
572
+ /* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
573
573
  /* @__PURE__ */ n("span", { children: "Report" })
574
574
  ] }) }),
575
575
  g
@@ -577,30 +577,30 @@ const re = ({
577
577
  }
578
578
  )
579
579
  ] });
580
- }, Vs = (e) => /* @__PURE__ */ n(An, { ...e, position: "center" }), Ve = "vote_up", Ge = "vote_down";
580
+ }, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ge = "vote_up", He = "vote_down";
581
581
  function Gs(e) {
582
- return e != null && e.length ? e.some((t) => t.type === Ge) ? "down" : e.some((t) => t.type === Ve) ? "up" : null : null;
582
+ return e != null && e.length ? e.some((t) => t.type === He) ? "down" : e.some((t) => t.type === Ge) ? "up" : null : null;
583
583
  }
584
584
  function Hs(e) {
585
- const { channel: t } = de(), { client: s } = qe("useMessageVote"), a = te(
585
+ const { channel: t } = de(), { client: s } = We("useMessageVote"), a = ne(
586
586
  () => Gs(e.own_reactions),
587
587
  [e.own_reactions]
588
- ), r = X(async () => {
588
+ ), r = J(async () => {
589
589
  if (s != null && s.userID)
590
590
  try {
591
- a === "up" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
591
+ a === "up" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
592
592
  e.id,
593
- { type: Ve },
593
+ { type: Ge },
594
594
  { enforce_unique: !0, skip_push: !0 }
595
595
  );
596
596
  } catch {
597
597
  }
598
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = X(async () => {
598
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = J(async () => {
599
599
  if (s != null && s.userID)
600
600
  try {
601
- a === "down" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
601
+ a === "down" ? await t.deleteReaction(e.id, He) : await t.sendReaction(
602
602
  e.id,
603
- { type: Ge },
603
+ { type: He },
604
604
  { enforce_unique: !0, skip_push: !0 }
605
605
  );
606
606
  } catch {
@@ -611,7 +611,7 @@ function Hs(e) {
611
611
  function Ys(e) {
612
612
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
613
613
  }
614
- function Xt({
614
+ function Kt({
615
615
  message: e,
616
616
  viewerLanguage: t
617
617
  }) {
@@ -619,13 +619,13 @@ function Xt({
619
619
  const s = e == null ? void 0 : e.text, a = Ys(t);
620
620
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
621
621
  }
622
- const qs = j.lazy(() => import("./Card-CI6Trmpw.js")), Ws = j.lazy(() => import("./Card-jmfDlxVY.js")), Xs = j.lazy(() => import("./Card-Bl0tPvn7.js")), Xe = () => /* @__PURE__ */ n(
622
+ const qs = U.lazy(() => import("./Card-DGkh6_ti.js")), Ws = U.lazy(() => import("./Card-TNeK_nFK.js")), Xs = U.lazy(() => import("./Card-h43tRi_a.js")), Ke = () => /* @__PURE__ */ n(
623
623
  "div",
624
624
  {
625
625
  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)]",
626
626
  "aria-hidden": !0
627
627
  }
628
- ), Ks = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Kt, Zs = Jt, Ot = { Composer: Ks, Sent: Kt, Received: Jt, Creator: Js, Visitor: Zs }, Qs = [
628
+ ), Ks = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Jt, Zs = Zt, zt = { Composer: Ks, Sent: Jt, Received: Zt, Creator: Js, Visitor: Zs }, Qs = [
629
629
  [/pdf/, "pdf"],
630
630
  [/wordprocessingml|msword|\.doc/, "doc"],
631
631
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -635,37 +635,37 @@ const qs = j.lazy(() => import("./Card-CI6Trmpw.js")), Ws = j.lazy(() => import(
635
635
  [/plain|rtf/, "text"],
636
636
  [/markdown/, "markdown"]
637
637
  ];
638
- function se(e) {
638
+ function ae(e) {
639
639
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
640
640
  }
641
- function Zt(e) {
641
+ function Qt(e) {
642
642
  const t = Qs.find(
643
643
  ([s]) => s.test(e)
644
644
  );
645
645
  return t ? t[1] : "generic";
646
646
  }
647
647
  const ea = {
648
- video: Gt,
649
- audio: gs,
650
- image: fs,
651
- document: Vt
648
+ video: Ht,
649
+ audio: bs,
650
+ image: gs,
651
+ document: Gt
652
652
  }, ta = {
653
- pdf: ys,
654
- doc: Ns,
655
- xls: _s,
656
- csv: ws,
657
- ppt: xs,
658
- zip: vs,
659
- text: ps,
660
- markdown: bs,
661
- generic: Vt
653
+ pdf: Cs,
654
+ doc: ys,
655
+ xls: Ns,
656
+ csv: _s,
657
+ ppt: ws,
658
+ zip: xs,
659
+ text: vs,
660
+ markdown: ps,
661
+ generic: Gt
662
662
  };
663
663
  function na(e) {
664
- const t = se(e);
665
- return t !== "document" ? ea[t] : ta[Zt(e)];
664
+ const t = ae(e);
665
+ return t !== "document" ? ea[t] : ta[Qt(e)];
666
666
  }
667
667
  function ce(e, t) {
668
- return j.createElement(na(e), t);
668
+ return U.createElement(na(e), t);
669
669
  }
670
670
  const sa = (e) => {
671
671
  var t, s;
@@ -682,78 +682,78 @@ const sa = (e) => {
682
682
  muted: d = !1,
683
683
  onContainerClick: m
684
684
  }) => {
685
- const g = se(t), u = V(null), f = V(null), c = V(null), b = V(r), [x, p] = P(a), [w, _] = P(0), [I, E] = P(!1), [R, D] = P(!1), [O, T] = P(!1), [N, S] = P(!1), [L, z] = P(!0), [M, C] = P(null), A = X(() => {
686
- T(!1), p(!0);
687
- }, []), $ = X((v) => {
685
+ const g = ae(t), u = j(null), f = j(null), c = j(null), b = j(r), [w, p] = z(a), [v, _] = z(0), [R, y] = z(!1), [M, D] = z(!1), [$, L] = z(!1), [N, I] = z(!1), [S, F] = z(!0), [T, E] = z(null), A = J(() => {
686
+ L(!1), p(!0);
687
+ }, []), O = J((x) => {
688
688
  const k = f.current;
689
689
  if (!k) return 0;
690
- const F = k.getBoundingClientRect();
690
+ const P = k.getBoundingClientRect();
691
691
  return Math.max(
692
692
  0,
693
- Math.min(1, (sa(v) - F.left) / F.width)
693
+ Math.min(1, (sa(x) - P.left) / P.width)
694
694
  );
695
- }, []), B = X((v) => {
695
+ }, []), B = J((x) => {
696
696
  const k = u.current;
697
- k && k.duration && (k.currentTime = v * k.duration);
698
- }, []), G = (v) => {
699
- v.stopPropagation(), E(!0);
700
- const k = $(v);
697
+ k && k.duration && (k.currentTime = x * k.duration);
698
+ }, []), H = (x) => {
699
+ x.stopPropagation(), y(!0);
700
+ const k = O(x);
701
701
  _(k), B(k);
702
702
  };
703
- Y(() => {
703
+ X(() => {
704
704
  r !== void 0 && r !== b.current && (b.current = r, p(r));
705
- }, [r]), Y(() => {
706
- if (!x) {
705
+ }, [r]), X(() => {
706
+ if (!w) {
707
707
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
708
708
  return;
709
709
  }
710
- const v = () => {
710
+ const x = () => {
711
711
  const k = u.current;
712
- k && k.duration && !I && _(k.currentTime / k.duration), c.current = requestAnimationFrame(v);
712
+ k && k.duration && !R && _(k.currentTime / k.duration), c.current = requestAnimationFrame(x);
713
713
  };
714
- return c.current = requestAnimationFrame(v), () => {
714
+ return c.current = requestAnimationFrame(x), () => {
715
715
  c.current !== null && cancelAnimationFrame(c.current);
716
716
  };
717
- }, [x, I]), Y(() => {
718
- const v = u.current;
719
- v && (x ? v.play().catch((k) => {
720
- p(!1), T(!0);
721
- }) : v.pause());
722
- }, [x]), Y(() => {
723
- if (!I) return;
724
- const v = (F) => _($(F)), k = (F) => {
725
- E(!1), B($(F));
717
+ }, [w, R]), X(() => {
718
+ const x = u.current;
719
+ x && (w ? x.play().catch((k) => {
720
+ p(!1), L(!0);
721
+ }) : x.pause());
722
+ }, [w]), X(() => {
723
+ if (!R) return;
724
+ const x = (P) => _(O(P)), k = (P) => {
725
+ y(!1), B(O(P));
726
726
  };
727
- return window.addEventListener("mousemove", v), window.addEventListener("mouseup", k), window.addEventListener("touchmove", v, { passive: !0 }), window.addEventListener("touchend", k), () => {
728
- window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", v), window.removeEventListener("touchend", k);
727
+ return window.addEventListener("mousemove", x), window.addEventListener("mouseup", k), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", k), () => {
728
+ window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", k);
729
729
  };
730
- }, [I, $, B]);
731
- const H = M ? { aspectRatio: String(M) } : void 0, K = M ? "" : " aspect-video", U = Math.round(w * 100);
730
+ }, [R, O, B]);
731
+ const V = T ? { aspectRatio: String(T) } : void 0, Y = T ? "" : " aspect-video", q = Math.round(v * 100);
732
732
  return /* @__PURE__ */ h(
733
733
  "div",
734
734
  {
735
735
  role: "button",
736
736
  tabIndex: 0,
737
- className: `relative cursor-pointer overflow-hidden bg-black ${K}`,
738
- style: H,
739
- onClick: (v) => {
737
+ className: `relative cursor-pointer overflow-hidden bg-black ${Y}`,
738
+ style: V,
739
+ onClick: (x) => {
740
740
  if (m) {
741
- m(v);
741
+ m(x);
742
742
  return;
743
743
  }
744
- O || o && p((k) => !k);
744
+ $ || o && p((k) => !k);
745
745
  },
746
- onKeyDown: (v) => {
747
- if (!(v.key !== "Enter" && v.key !== " ")) {
748
- if (v.preventDefault(), m) {
749
- m(v);
746
+ onKeyDown: (x) => {
747
+ if (!(x.key !== "Enter" && x.key !== " ")) {
748
+ if (x.preventDefault(), m) {
749
+ m(x);
750
750
  return;
751
751
  }
752
- O || o && p((k) => !k);
752
+ $ || o && p((k) => !k);
753
753
  }
754
754
  },
755
755
  children: [
756
- s && (g === "audio" || L) && /* @__PURE__ */ n(
756
+ s && (g === "audio" || S) && /* @__PURE__ */ n(
757
757
  "img",
758
758
  {
759
759
  src: s,
@@ -761,7 +761,7 @@ const sa = (e) => {
761
761
  className: "absolute inset-0 h-full w-full object-cover"
762
762
  }
763
763
  ),
764
- !s && (g === "audio" || L) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
764
+ !s && (g === "audio" || S) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
765
765
  className: "size-12 text-black/20",
766
766
  weight: "regular"
767
767
  }) }),
@@ -773,12 +773,12 @@ const sa = (e) => {
773
773
  loop: i,
774
774
  muted: d,
775
775
  style: { width: "100%", height: "100%" },
776
- onLoadStart: () => S(!0),
776
+ onLoadStart: () => I(!0),
777
777
  onCanPlay: () => {
778
- S(!1), z(!1);
778
+ I(!1), F(!1);
779
779
  },
780
- onWaiting: () => S(!0),
781
- onPlay: () => T(!1),
780
+ onWaiting: () => I(!0),
781
+ onPlay: () => L(!1),
782
782
  onEnded: () => {
783
783
  i || (p(!1), _(0));
784
784
  },
@@ -793,15 +793,15 @@ const sa = (e) => {
793
793
  muted: d,
794
794
  playsInline: !0,
795
795
  style: { width: "100%", height: "100%" },
796
- onLoadStart: () => S(!0),
796
+ onLoadStart: () => I(!0),
797
797
  onCanPlay: () => {
798
- S(!1), z(!1);
798
+ I(!1), F(!1);
799
799
  },
800
- onWaiting: () => S(!0),
801
- onPlay: () => T(!1),
800
+ onWaiting: () => I(!0),
801
+ onPlay: () => L(!1),
802
802
  onLoadedMetadata: () => {
803
- const v = u.current;
804
- v instanceof HTMLVideoElement && v.videoWidth && v.videoHeight && C(v.videoWidth / v.videoHeight);
803
+ const x = u.current;
804
+ x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && E(x.videoWidth / x.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
807
  i || (p(!1), _(0));
@@ -809,25 +809,25 @@ const sa = (e) => {
809
809
  children: /* @__PURE__ */ n("track", { kind: "captions" })
810
810
  }
811
811
  ) }),
812
- N && !O && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
812
+ N && !$ && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
813
  pe,
814
814
  {
815
815
  className: "size-8 animate-spin text-white/80",
816
816
  weight: "bold"
817
817
  }
818
818
  ) }),
819
- O && !o && /* @__PURE__ */ n(
819
+ $ && !o && /* @__PURE__ */ n(
820
820
  "div",
821
821
  {
822
822
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
823
823
  role: "button",
824
824
  tabIndex: 0,
825
825
  "aria-label": "Play preview",
826
- onClick: (v) => {
827
- v.stopPropagation(), A();
826
+ onClick: (x) => {
827
+ x.stopPropagation(), A();
828
828
  },
829
- onKeyDown: (v) => {
830
- v.key !== "Enter" && v.key !== " " || (v.preventDefault(), v.stopPropagation(), A());
829
+ onKeyDown: (x) => {
830
+ x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), A());
831
831
  },
832
832
  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(Ue, { className: "size-9 translate-x-0.5", weight: "fill" }) })
833
833
  }
@@ -837,23 +837,23 @@ const sa = (e) => {
837
837
  {
838
838
  role: "slider",
839
839
  "aria-label": "Playback position",
840
- "aria-valuenow": U,
840
+ "aria-valuenow": q,
841
841
  "aria-valuemin": 0,
842
842
  "aria-valuemax": 100,
843
843
  tabIndex: 0,
844
844
  ref: f,
845
845
  className: "relative flex h-4 w-full cursor-pointer items-center",
846
- onMouseDown: G,
847
- onTouchStart: G,
848
- onClick: (v) => v.stopPropagation(),
849
- onKeyDown: (v) => {
850
- v.key === "ArrowRight" && B(Math.min(1, w + 0.05)), v.key === "ArrowLeft" && B(Math.max(0, w - 0.05));
846
+ onMouseDown: H,
847
+ onTouchStart: H,
848
+ onClick: (x) => x.stopPropagation(),
849
+ onKeyDown: (x) => {
850
+ x.key === "ArrowRight" && B(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && B(Math.max(0, v - 0.05));
851
851
  },
852
852
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
853
853
  "div",
854
854
  {
855
855
  className: "h-full rounded-full bg-white",
856
- style: { width: `${U}%` }
856
+ style: { width: `${q}%` }
857
857
  }
858
858
  ) })
859
859
  }
@@ -863,12 +863,12 @@ const sa = (e) => {
863
863
  "button",
864
864
  {
865
865
  type: "button",
866
- onClick: (v) => {
867
- v.stopPropagation(), p((k) => !k);
866
+ onClick: (x) => {
867
+ x.stopPropagation(), p((k) => !k);
868
868
  },
869
869
  className: "shrink-0 text-white",
870
- "aria-label": x ? "Pause" : "Play",
871
- children: x ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ue, { className: "size-5 translate-x-px", weight: "fill" })
870
+ "aria-label": w ? "Pause" : "Play",
871
+ children: w ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ue, { className: "size-5 translate-x-px", weight: "fill" })
872
872
  }
873
873
  ),
874
874
  /* @__PURE__ */ h(
@@ -876,30 +876,30 @@ const sa = (e) => {
876
876
  {
877
877
  role: "slider",
878
878
  "aria-label": "Playback position",
879
- "aria-valuenow": U,
879
+ "aria-valuenow": q,
880
880
  "aria-valuemin": 0,
881
881
  "aria-valuemax": 100,
882
882
  tabIndex: 0,
883
883
  ref: f,
884
884
  className: "relative flex h-4 w-full cursor-pointer items-center",
885
- onMouseDown: G,
886
- onTouchStart: G,
887
- onClick: (v) => v.stopPropagation(),
885
+ onMouseDown: H,
886
+ onTouchStart: H,
887
+ onClick: (x) => x.stopPropagation(),
888
888
  onMouseEnter: () => D(!0),
889
889
  onMouseLeave: () => D(!1),
890
- onKeyDown: (v) => {
891
- v.key === "ArrowRight" && B(Math.min(1, w + 0.05)), v.key === "ArrowLeft" && B(Math.max(0, w - 0.05));
890
+ onKeyDown: (x) => {
891
+ x.key === "ArrowRight" && B(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && B(Math.max(0, v - 0.05));
892
892
  },
893
893
  children: [
894
894
  /* @__PURE__ */ n(
895
895
  "div",
896
896
  {
897
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || I ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${M || R ? "h-1.5" : "h-1"}`,
898
898
  children: /* @__PURE__ */ n(
899
899
  "div",
900
900
  {
901
901
  className: "h-full rounded-full bg-white",
902
- style: { width: `${U}%` }
902
+ style: { width: `${q}%` }
903
903
  }
904
904
  )
905
905
  }
@@ -907,8 +907,8 @@ const sa = (e) => {
907
907
  /* @__PURE__ */ n(
908
908
  "div",
909
909
  {
910
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || I ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
- style: { left: `${U}%` }
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${M || R ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
+ style: { left: `${q}%` }
912
912
  }
913
913
  )
914
914
  ]
@@ -918,7 +918,7 @@ const sa = (e) => {
918
918
  ]
919
919
  }
920
920
  );
921
- }, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Qt = ({
921
+ }, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
922
922
  mimeType: e,
923
923
  sourceUrl: t,
924
924
  thumbnailUrl: s,
@@ -927,7 +927,7 @@ const sa = (e) => {
927
927
  mediaPlayerProps: i,
928
928
  containedImage: o = !1
929
929
  }) => {
930
- const l = se(e), [d, m] = P(!1);
930
+ const l = ae(e), [d, m] = z(!1);
931
931
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
932
932
  aa,
933
933
  {
@@ -976,7 +976,7 @@ const sa = (e) => {
976
976
  {
977
977
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
978
978
  children: ce(e, {
979
- className: zt(r),
979
+ className: $t(r),
980
980
  weight: "regular"
981
981
  })
982
982
  }
@@ -993,12 +993,12 @@ const sa = (e) => {
993
993
  {
994
994
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
995
995
  children: ce(e, {
996
- className: zt(r),
996
+ className: $t(r),
997
997
  weight: "regular"
998
998
  })
999
999
  }
1000
1000
  );
1001
- }, en = ({
1001
+ }, tn = ({
1002
1002
  variant: e,
1003
1003
  thumbnail: t,
1004
1004
  title: s,
@@ -1018,7 +1018,7 @@ const sa = (e) => {
1018
1018
  {
1019
1019
  ref: g,
1020
1020
  "data-testid": u,
1021
- className: y(
1021
+ className: C(
1022
1022
  "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)]",
1023
1023
  f ? "bg-[#121110]" : "bg-white"
1024
1024
  ),
@@ -1030,7 +1030,7 @@ const sa = (e) => {
1030
1030
  c.trim() !== "" && /* @__PURE__ */ n(
1031
1031
  "p",
1032
1032
  {
1033
- className: y("mb-0.5 truncate text-base font-medium", {
1033
+ className: C("mb-0.5 truncate text-base font-medium", {
1034
1034
  "text-black": !f,
1035
1035
  "text-white/30": f && b,
1036
1036
  "text-white": f && !b
@@ -1040,7 +1040,7 @@ const sa = (e) => {
1040
1040
  ),
1041
1041
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1042
1042
  ce(r, {
1043
- className: y(
1043
+ className: C(
1044
1044
  "size-5 shrink-0",
1045
1045
  f ? "text-white/55" : "text-black/55"
1046
1046
  ),
@@ -1049,7 +1049,7 @@ const sa = (e) => {
1049
1049
  i != null && i !== "" && /* @__PURE__ */ n(
1050
1050
  "span",
1051
1051
  {
1052
- className: y(
1052
+ className: C(
1053
1053
  "text-xs font-medium",
1054
1054
  f ? "text-white/55" : "text-black/55"
1055
1055
  ),
@@ -1064,10 +1064,10 @@ const sa = (e) => {
1064
1064
  }
1065
1065
  );
1066
1066
  };
1067
- function tn(e) {
1067
+ function nn(e) {
1068
1068
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1069
1069
  }
1070
- function Ke(e) {
1070
+ function Je(e) {
1071
1071
  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)]`;
1072
1072
  }
1073
1073
  function ia(e) {
@@ -1085,8 +1085,8 @@ function ca(e) {
1085
1085
  function da(e) {
1086
1086
  return e ? "text-white/20" : "text-black/20";
1087
1087
  }
1088
- const Je = ({ attachment: e, isMyMessage: t }) => {
1089
- 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: [
1088
+ const Ze = ({ attachment: e, isMyMessage: t }) => {
1089
+ 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(U.Fragment, { children: [
1090
1090
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1091
1091
  "img",
1092
1092
  {
@@ -1098,7 +1098,7 @@ const Je = ({ attachment: e, isMyMessage: t }) => {
1098
1098
  "div",
1099
1099
  {
1100
1100
  className: `aspect-video w-full rounded-[20px] ${ia(t)} flex items-center justify-center`,
1101
- children: /* @__PURE__ */ n(ks, { className: `size-12 ${da(t)}` })
1101
+ children: /* @__PURE__ */ n(Es, { className: `size-12 ${da(t)}` })
1102
1102
  }
1103
1103
  ) }),
1104
1104
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
@@ -1109,12 +1109,12 @@ const Je = ({ attachment: e, isMyMessage: t }) => {
1109
1109
  ] });
1110
1110
  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 });
1111
1111
  };
1112
- function nn(e) {
1112
+ function sn(e) {
1113
1113
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1114
1114
  }
1115
- function Ze(e) {
1115
+ function Qe(e) {
1116
1116
  var t;
1117
- return (t = e.attachments) == null ? void 0 : t.find(nn);
1117
+ return (t = e.attachments) == null ? void 0 : t.find(sn);
1118
1118
  }
1119
1119
  async function ua(e, t) {
1120
1120
  let s;
@@ -1132,7 +1132,7 @@ const ma = ({
1132
1132
  url: e,
1133
1133
  filename: t
1134
1134
  }) => {
1135
- const [s, a] = P(!1);
1135
+ const [s, a] = z(!1);
1136
1136
  return /* @__PURE__ */ n(
1137
1137
  "button",
1138
1138
  {
@@ -1148,23 +1148,23 @@ const ma = ({
1148
1148
  },
1149
1149
  disabled: s,
1150
1150
  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",
1151
- children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1151
+ children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(U.Fragment, { children: [
1152
1152
  /* @__PURE__ */ n(ve, { className: "size-4 text-white", weight: "bold" }),
1153
1153
  "Download"
1154
1154
  ] })
1155
1155
  }
1156
1156
  );
1157
1157
  };
1158
- function Qe(e) {
1158
+ function et(e) {
1159
1159
  var u, f, c, b;
1160
1160
  const t = (u = e.attachments) == null ? void 0 : u.find(
1161
- (x) => x.type === "video" && x.asset_url
1161
+ (w) => w.type === "video" && w.asset_url
1162
1162
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1163
- (x) => x.type === "image" && x.image_url
1163
+ (w) => w.type === "image" && w.image_url
1164
1164
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1165
- (x) => x.type === "audio" && x.asset_url
1165
+ (w) => w.type === "audio" && w.asset_url
1166
1166
  ), r = (b = e.attachments) == null ? void 0 : b.find(
1167
- (x) => x.type === "file" && x.asset_url
1167
+ (w) => w.type === "file" && w.asset_url
1168
1168
  ), 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);
1169
1169
  if (!o) return null;
1170
1170
  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, g = t == null ? void 0 : t.thumb_url;
@@ -1176,16 +1176,16 @@ function Qe(e) {
1176
1176
  thumbnailUrl: g
1177
1177
  };
1178
1178
  }
1179
- const sn = ({
1179
+ const an = ({
1180
1180
  resolvedUrl: e,
1181
1181
  resolvedType: t,
1182
1182
  title: s,
1183
1183
  fileSize: a,
1184
1184
  thumbnailUrl: r
1185
1185
  }) => {
1186
- const i = a !== void 0 ? tn(a) : void 0;
1186
+ const i = a !== void 0 ? nn(a) : void 0;
1187
1187
  return /* @__PURE__ */ n(
1188
- en,
1188
+ tn,
1189
1189
  {
1190
1190
  variant: "dark",
1191
1191
  title: s,
@@ -1193,7 +1193,7 @@ const sn = ({
1193
1193
  mimeType: t,
1194
1194
  detail: i,
1195
1195
  thumbnail: /* @__PURE__ */ n(
1196
- Qt,
1196
+ en,
1197
1197
  {
1198
1198
  mimeType: t,
1199
1199
  sourceUrl: e,
@@ -1204,23 +1204,23 @@ const sn = ({
1204
1204
  )
1205
1205
  }
1206
1206
  );
1207
- }, an = ({
1207
+ }, rn = ({
1208
1208
  resolvedUrl: e,
1209
1209
  resolvedType: t,
1210
1210
  title: s,
1211
1211
  fileSize: a,
1212
1212
  thumbnailUrl: r
1213
1213
  }) => {
1214
- const i = se(t), o = a !== void 0 ? tn(a) : void 0;
1214
+ const i = ae(t), o = a !== void 0 ? nn(a) : void 0;
1215
1215
  return /* @__PURE__ */ n(
1216
- en,
1216
+ tn,
1217
1217
  {
1218
1218
  variant: "light",
1219
1219
  title: s,
1220
1220
  mimeType: t,
1221
1221
  detail: o,
1222
1222
  thumbnail: /* @__PURE__ */ n(
1223
- Qt,
1223
+ en,
1224
1224
  {
1225
1225
  mimeType: t,
1226
1226
  sourceUrl: e,
@@ -1237,10 +1237,10 @@ const sn = ({
1237
1237
  message: e,
1238
1238
  isMyMessage: t = !1
1239
1239
  }) => {
1240
- const s = Ze(e), a = Qe(e);
1240
+ const s = Qe(e), a = et(e);
1241
1241
  return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
1242
1242
  !t && e.user && /* @__PURE__ */ n(
1243
- re,
1243
+ ie,
1244
1244
  {
1245
1245
  className: "str-chat__avatar str-chat__message-sender-avatar",
1246
1246
  id: e.user.id,
@@ -1258,7 +1258,7 @@ const sn = ({
1258
1258
  {
1259
1259
  className: "str-chat__message-bubble",
1260
1260
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1261
- children: s ? /* @__PURE__ */ n("div", { className: Ke(t), children: /* @__PURE__ */ n(Je, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(sn, { ...a }) : /* @__PURE__ */ n(an, { ...a })
1261
+ children: s ? /* @__PURE__ */ n("div", { className: Je(t), children: /* @__PURE__ */ n(Ze, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(an, { ...a }) : /* @__PURE__ */ n(rn, { ...a })
1262
1262
  }
1263
1263
  ) })
1264
1264
  }
@@ -1267,19 +1267,19 @@ const sn = ({
1267
1267
  }, fa = ({
1268
1268
  message: e
1269
1269
  }) => {
1270
- const t = Ze(e);
1270
+ const t = Qe(e);
1271
1271
  if (t)
1272
- return /* @__PURE__ */ n("div", { className: Ke(!0), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !0 }) });
1273
- const s = Qe(e);
1274
- return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
1272
+ return /* @__PURE__ */ n("div", { className: Je(!0), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !0 }) });
1273
+ const s = et(e);
1274
+ return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1275
1275
  }, ga = ({
1276
1276
  message: e
1277
1277
  }) => {
1278
- const t = Ze(e);
1278
+ const t = Qe(e);
1279
1279
  if (t)
1280
- return /* @__PURE__ */ n("div", { className: Ke(!1), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !1 }) });
1281
- const s = Qe(e);
1282
- return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1280
+ return /* @__PURE__ */ n("div", { className: Je(!1), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !1 }) });
1281
+ const s = et(e);
1282
+ return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
1283
1283
  }, yi = Object.assign(ha, {
1284
1284
  Creator: fa,
1285
1285
  Visitor: ga
@@ -1287,9 +1287,9 @@ const sn = ({
1287
1287
  isUnlocking: () => !1
1288
1288
  }, pa = {
1289
1289
  LockedAttachment: ba
1290
- }, rn = He({}), Ci = rn.Provider;
1290
+ }, on = Ye({}), Ci = on.Provider;
1291
1291
  function va(e) {
1292
- return Ae(rn)[e] ?? pa[e];
1292
+ return Ae(on)[e] ?? pa[e];
1293
1293
  }
1294
1294
  const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1295
1295
  "svg",
@@ -1320,17 +1320,17 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1320
1320
  }, Na = (e) => {
1321
1321
  var t;
1322
1322
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1323
- }, on = (e) => wa(e) || _a(e), ya = (e) => {
1323
+ }, ln = (e) => wa(e) || _a(e), ya = (e) => {
1324
1324
  var t;
1325
- return on(e) && !((t = e.text) != null && t.trim());
1326
- }, Oe = ({
1325
+ return ln(e) && !((t = e.text) != null && t.trim());
1326
+ }, Pe = ({
1327
1327
  message: e,
1328
1328
  standalone: t = !1,
1329
1329
  isMyMessage: s = !1,
1330
1330
  hasAttachment: a = !1
1331
1331
  }) => {
1332
1332
  var u;
1333
- const r = on(e), i = Ee(e);
1333
+ const r = ln(e), i = Ee(e);
1334
1334
  if (!r && !i)
1335
1335
  return null;
1336
1336
  if (r) {
@@ -1338,7 +1338,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1338
1338
  if (!f) return null;
1339
1339
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
1340
1340
  return /* @__PURE__ */ h("div", { className: c, children: [
1341
- /* @__PURE__ */ n(Es, { size: t ? 14 : 12 }),
1341
+ /* @__PURE__ */ n(Ss, { size: t ? 14 : 12 }),
1342
1342
  /* @__PURE__ */ n("span", { children: b })
1343
1343
  ] });
1344
1344
  }
@@ -1347,10 +1347,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1347
1347
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1348
1348
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1349
1349
  ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: o ? 12 : 15 }) });
1350
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(ne, { children: [
1350
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
1351
1351
  m,
1352
1352
  g
1353
- ] }) : /* @__PURE__ */ h(ne, { children: [
1353
+ ] }) : /* @__PURE__ */ h(se, { children: [
1354
1354
  g,
1355
1355
  m
1356
1356
  ] }) });
@@ -1363,32 +1363,32 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1363
1363
  "button",
1364
1364
  {
1365
1365
  type: "button",
1366
- className: y("message-vote-button focus-ring", {
1366
+ className: C("message-vote-button focus-ring", {
1367
1367
  "message-vote-button--selected": e === "up"
1368
1368
  }),
1369
1369
  onClick: t,
1370
1370
  "aria-label": "Good response",
1371
1371
  "aria-pressed": e === "up",
1372
1372
  "data-tooltip": "Good response",
1373
- children: /* @__PURE__ */ n(Ss, { size: 16, weight: e === "up" ? "fill" : "regular" })
1373
+ children: /* @__PURE__ */ n(Is, { size: 16, weight: e === "up" ? "fill" : "regular" })
1374
1374
  }
1375
1375
  ),
1376
1376
  /* @__PURE__ */ n(
1377
1377
  "button",
1378
1378
  {
1379
1379
  type: "button",
1380
- className: y("message-vote-button focus-ring", {
1380
+ className: C("message-vote-button focus-ring", {
1381
1381
  "message-vote-button--selected": e === "down"
1382
1382
  }),
1383
1383
  onClick: s,
1384
1384
  "aria-label": "Bad response",
1385
1385
  "aria-pressed": e === "down",
1386
1386
  "data-tooltip": "Bad response",
1387
- children: /* @__PURE__ */ n(Is, { size: 16, weight: e === "down" ? "fill" : "regular" })
1387
+ children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "down" ? "fill" : "regular" })
1388
1388
  }
1389
1389
  )
1390
1390
  ] }), ka = (e) => {
1391
- var ht, ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et;
1391
+ var ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St;
1392
1392
  const {
1393
1393
  additionalMessageInputProps: t,
1394
1394
  chatbotVotingEnabled: s,
@@ -1404,84 +1404,84 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1404
1404
  isMyMessage: f,
1405
1405
  message: c,
1406
1406
  renderText: b,
1407
- threadList: x,
1407
+ threadList: w,
1408
1408
  viewerLanguage: p
1409
- } = e, { client: w } = qe("CustomMessage"), { channel: _ } = de("CustomMessage"), { isUnlocking: I, onUnlockClick: E, onFetchSource: R, onDownloadClick: D } = va("LockedAttachment"), [O, T] = P(!1), N = Rn(c.id), { selected: S, voteUp: L, voteDown: z } = Hs(c), {
1410
- Attachment: M = Ln,
1411
- EditMessageModal: C = Dn,
1409
+ } = e, { client: v } = We("CustomMessage"), { channel: _ } = de("CustomMessage"), { isUnlocking: R, onUnlockClick: y, onFetchSource: M, onDownloadClick: D } = va("LockedAttachment"), [$, L] = z(!1), N = Ln(c.id), { selected: I, voteUp: S, voteDown: F } = Hs(c), {
1410
+ Attachment: T = Dn,
1411
+ EditMessageModal: E = On,
1412
1412
  MessageActions: A,
1413
- MessageBlocked: $ = Pn,
1414
- MessageBouncePrompt: B = On,
1415
- MessageDeleted: G = zn,
1416
- MessageIsThreadReplyInChannelButtonIndicator: H = $n,
1417
- MessageRepliesCountButton: K = Fn,
1418
- ReminderNotification: U = Bn,
1419
- StreamedMessageText: v = Un,
1413
+ MessageBlocked: O = Pn,
1414
+ MessageBouncePrompt: B = zn,
1415
+ MessageDeleted: H = $n,
1416
+ MessageIsThreadReplyInChannelButtonIndicator: V = Fn,
1417
+ MessageRepliesCountButton: Y = Bn,
1418
+ ReminderNotification: q = Un,
1419
+ StreamedMessageText: x = jn,
1420
1420
  PinIndicator: k
1421
- } = Ut("CustomMessage"), F = jn(c), q = Vn(c), W = te(
1421
+ } = jt("CustomMessage"), P = Vn(c), W = Gn(c), K = ne(
1422
1422
  () => u == null ? void 0 : u(c),
1423
1423
  [u, c]
1424
- ), J = te(() => {
1424
+ ), G = ne(() => {
1425
1425
  const fe = c.attachments ?? [], Ce = c.shared_location ? [c.shared_location, ...fe] : fe;
1426
1426
  if (!Ee(c)) return Ce;
1427
- const St = Ce.filter((It) => !("type" in It) || !nn(It));
1428
- return St.length === Ce.length ? Ce : St;
1429
- }, [c]), ie = te(() => {
1430
- const fe = Xt({ message: c, viewerLanguage: p });
1427
+ const It = Ce.filter((Tt) => !("type" in Tt) || !sn(Tt));
1428
+ return It.length === Ce.length ? Ce : It;
1429
+ }, [c]), ee = ne(() => {
1430
+ const fe = Kt({ message: c, viewerLanguage: p });
1431
1431
  return fe === c.text ? c : { ...c, text: fe };
1432
1432
  }, [c, p]);
1433
- if (Gn(c))
1433
+ if (Hn(c))
1434
1434
  return null;
1435
1435
  if (c.deleted_at || c.type === "deleted")
1436
- return /* @__PURE__ */ n(G, { message: c });
1437
- if (Hn(c))
1438
- return /* @__PURE__ */ n($, {});
1439
- const ue = !x && !!c.reply_count, Z = !x && c.show_in_channel && c.parent_id, ae = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, ee = Yn(c);
1436
+ return /* @__PURE__ */ n(H, { message: c });
1437
+ if (Yn(c))
1438
+ return /* @__PURE__ */ n(O, {});
1439
+ const ue = !w && !!c.reply_count, Z = !w && c.show_in_channel && c.parent_id, re = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, te = qn(c);
1440
1440
  let oe;
1441
- ae ? oe = () => m(c) : ee && (oe = () => T(!0));
1442
- const me = f(), kn = y(
1441
+ re ? oe = () => m(c) : te && (oe = () => L(!0));
1442
+ const me = f(), En = C(
1443
1443
  "str-chat__message str-chat__message-simple",
1444
1444
  `str-chat__message--${c.type}`,
1445
1445
  `str-chat__message--${c.status}`,
1446
1446
  me ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1447
1447
  c.text ? "str-chat__message--has-text" : "has-no-text",
1448
1448
  {
1449
- "str-chat__message--has-attachment": F,
1449
+ "str-chat__message--has-attachment": P,
1450
1450
  "str-chat__message--highlighted": g,
1451
1451
  "str-chat__message--pinned pinned-message": c.pinned,
1452
- "str-chat__message--with-reactions": q,
1453
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((ft = c == null ? void 0 : c.error) == null ? void 0 : ft.status) !== 403,
1452
+ "str-chat__message--with-reactions": W,
1453
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((gt = c == null ? void 0 : c.error) == null ? void 0 : gt.status) !== 403,
1454
1454
  "str-chat__message-with-thread-link": ue || Z,
1455
1455
  "str-chat__virtual-message__wrapper--end": r,
1456
1456
  "str-chat__virtual-message__wrapper--first": i,
1457
1457
  "str-chat__virtual-message__wrapper--group": o
1458
1458
  }
1459
- ), ct = c.poll_id && w.polls.fromState(c.poll_id), dt = ya(c), he = Ee(c), ut = Na(c), Le = !!(J != null && J.length && !c.quoted_message), mt = he && me && Le;
1460
- return /* @__PURE__ */ h(ne, { children: [
1459
+ ), dt = c.poll_id && v.polls.fromState(c.poll_id), ut = ya(c), he = Ee(c), mt = Na(c), Le = !!(G != null && G.length && !c.quoted_message), ht = he && me && Le;
1460
+ return /* @__PURE__ */ h(se, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
- C,
1462
+ E,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
1466
1466
  ),
1467
- O && /* @__PURE__ */ n(
1468
- qn,
1467
+ $ && /* @__PURE__ */ n(
1468
+ Wn,
1469
1469
  {
1470
1470
  MessageBouncePrompt: B,
1471
- onClose: () => T(!1),
1472
- open: O
1471
+ onClose: () => L(!1),
1472
+ open: $
1473
1473
  }
1474
1474
  ),
1475
1475
  /* @__PURE__ */ h(
1476
1476
  "div",
1477
1477
  {
1478
- className: kn,
1478
+ className: En,
1479
1479
  "data-message-id": c.id,
1480
1480
  children: [
1481
1481
  k && /* @__PURE__ */ n(k, {}),
1482
- !!N && /* @__PURE__ */ n(U, { reminder: N }),
1482
+ !!N && /* @__PURE__ */ n(q, { reminder: N }),
1483
1483
  c.user && /* @__PURE__ */ n(
1484
- re,
1484
+ ie,
1485
1485
  {
1486
1486
  className: "str-chat__avatar str-chat__message-sender-avatar",
1487
1487
  id: c.user.id,
@@ -1495,8 +1495,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1495
1495
  /* @__PURE__ */ n(
1496
1496
  "div",
1497
1497
  {
1498
- className: y("str-chat__message-inner", {
1499
- "str-chat__simple-message--error-failed": ae || ee
1498
+ className: C("str-chat__message-inner", {
1499
+ "str-chat__simple-message--error-failed": re || te
1500
1500
  }),
1501
1501
  "data-testid": "message-inner",
1502
1502
  onClick: oe,
@@ -1509,87 +1509,87 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1509
1509
  marginInlineEnd: 0,
1510
1510
  marginInlineStart: 0
1511
1511
  },
1512
- children: ut ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1512
+ children: mt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
1513
  me ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
1514
  A && /* @__PURE__ */ n(A, {}),
1515
1515
  /* @__PURE__ */ n(
1516
- Ot.Sent,
1516
+ zt.Sent,
1517
1517
  {
1518
- title: (gt = c.metadata) == null ? void 0 : gt.attachment_title,
1519
- mimeType: (bt = c.metadata) == null ? void 0 : bt.attachment_mime_type,
1520
- thumbnailUrl: (pt = c.metadata) == null ? void 0 : pt.attachment_thumbnail,
1521
- amountText: (vt = c.metadata) == null ? void 0 : vt.amount_text,
1522
- detail: (xt = c.metadata) == null ? void 0 : xt.attachment_detail,
1523
- paymentStatus: (wt = c.metadata) == null ? void 0 : wt.payment_status,
1524
- onPreviewClick: () => E == null ? void 0 : E(c, _),
1525
- onFetchSource: async () => await (R == null ? void 0 : R(c, _))
1518
+ title: (bt = c.metadata) == null ? void 0 : bt.attachment_title,
1519
+ mimeType: (pt = c.metadata) == null ? void 0 : pt.attachment_mime_type,
1520
+ thumbnailUrl: (vt = c.metadata) == null ? void 0 : vt.attachment_thumbnail,
1521
+ amountText: (xt = c.metadata) == null ? void 0 : xt.amount_text,
1522
+ detail: (wt = c.metadata) == null ? void 0 : wt.attachment_detail,
1523
+ paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
1524
+ onPreviewClick: () => y == null ? void 0 : y(c, _),
1525
+ onFetchSource: async () => await (M == null ? void 0 : M(c, _))
1526
1526
  }
1527
1527
  )
1528
1528
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1529
1529
  /* @__PURE__ */ n(
1530
- Ot.Received,
1530
+ zt.Received,
1531
1531
  {
1532
- title: (_t = c.metadata) == null ? void 0 : _t.attachment_title,
1533
- mimeType: (Nt = c.metadata) == null ? void 0 : Nt.attachment_mime_type,
1534
- thumbnailUrl: (yt = c.metadata) == null ? void 0 : yt.attachment_thumbnail,
1535
- amountText: (Ct = c.metadata) == null ? void 0 : Ct.amount_text,
1536
- detail: (kt = c.metadata) == null ? void 0 : kt.attachment_detail,
1537
- paymentStatus: (Et = c.metadata) == null ? void 0 : Et.payment_status,
1538
- isUnlocking: I(c.id),
1539
- onUnlockClick: () => E == null ? void 0 : E(c, _),
1540
- onFetchSource: async () => await (R == null ? void 0 : R(c, _)),
1532
+ title: (Nt = c.metadata) == null ? void 0 : Nt.attachment_title,
1533
+ mimeType: (yt = c.metadata) == null ? void 0 : yt.attachment_mime_type,
1534
+ thumbnailUrl: (Ct = c.metadata) == null ? void 0 : Ct.attachment_thumbnail,
1535
+ amountText: (kt = c.metadata) == null ? void 0 : kt.amount_text,
1536
+ detail: (Et = c.metadata) == null ? void 0 : Et.attachment_detail,
1537
+ paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
1538
+ isUnlocking: R(c.id),
1539
+ onUnlockClick: () => y == null ? void 0 : y(c, _),
1540
+ onFetchSource: async () => await (M == null ? void 0 : M(c, _)),
1541
1541
  onDownloadClick: () => D == null ? void 0 : D(c, _)
1542
1542
  }
1543
1543
  ),
1544
1544
  A && /* @__PURE__ */ n(A, {})
1545
1545
  ] }),
1546
1546
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1547
- At,
1547
+ Mt,
1548
1548
  {
1549
- message: ie,
1549
+ message: ee,
1550
1550
  renderText: b
1551
1551
  }
1552
1552
  ) })
1553
- ] }) : dt ? (
1553
+ ] }) : ut ? (
1554
1554
  /* Tip-only messages render as a standalone bubble */
1555
- /* @__PURE__ */ n(Oe, { message: c, standalone: !0 })
1555
+ /* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
1556
1556
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1557
- he && !mt && /* @__PURE__ */ n(
1558
- Oe,
1557
+ he && !ht && /* @__PURE__ */ n(
1558
+ Pe,
1559
1559
  {
1560
1560
  message: c,
1561
1561
  hasAttachment: Le,
1562
1562
  isMyMessage: me
1563
1563
  }
1564
1564
  ),
1565
- ct && /* @__PURE__ */ n(Wn, { poll: ct }),
1566
- J != null && J.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
- M,
1565
+ dt && /* @__PURE__ */ n(Xn, { poll: dt }),
1566
+ G != null && G.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
+ T,
1568
1568
  {
1569
1569
  actionHandler: l,
1570
- attachments: J
1570
+ attachments: G
1571
1571
  }
1572
1572
  ) : null,
1573
- W ? /* @__PURE__ */ n(
1574
- v,
1573
+ K ? /* @__PURE__ */ n(
1574
+ x,
1575
1575
  {
1576
- message: ie,
1576
+ message: ee,
1577
1577
  renderText: b
1578
1578
  }
1579
1579
  ) : /* @__PURE__ */ n(
1580
- At,
1580
+ Mt,
1581
1581
  {
1582
- message: ie,
1582
+ message: ee,
1583
1583
  renderText: b
1584
1584
  }
1585
1585
  ),
1586
- /* @__PURE__ */ n(Xn, {})
1586
+ /* @__PURE__ */ n(Kn, {})
1587
1587
  ] }) })
1588
1588
  }
1589
1589
  ),
1590
- !ut && !dt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
- (!he || mt) && /* @__PURE__ */ n(
1592
- Oe,
1590
+ !mt && !ut && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
+ (!he || ht) && /* @__PURE__ */ n(
1592
+ Pe,
1593
1593
  {
1594
1594
  message: c,
1595
1595
  hasAttachment: Le,
@@ -1599,28 +1599,28 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1599
1599
  s && he && /* @__PURE__ */ n(
1600
1600
  Ca,
1601
1601
  {
1602
- selected: S,
1603
- onVoteUp: L,
1604
- onVoteDown: z
1602
+ selected: I,
1603
+ onVoteUp: S,
1604
+ onVoteDown: F
1605
1605
  }
1606
1606
  )
1607
1607
  ] }),
1608
1608
  ue && /* @__PURE__ */ n(
1609
- K,
1609
+ Y,
1610
1610
  {
1611
1611
  onClick: d,
1612
1612
  reply_count: c.reply_count
1613
1613
  }
1614
1614
  ),
1615
- Z && /* @__PURE__ */ n(H, {})
1615
+ Z && /* @__PURE__ */ n(V, {})
1616
1616
  ]
1617
1617
  },
1618
1618
  c.id
1619
1619
  )
1620
1620
  ] });
1621
- }, Ea = j.memo(
1621
+ }, Ea = U.memo(
1622
1622
  ka,
1623
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Mn(e, t)
1623
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
1624
1624
  ), Sa = (e) => {
1625
1625
  const t = xe("CustomMessage");
1626
1626
  return /* @__PURE__ */ n(Ea, { ...t, ...e });
@@ -1628,32 +1628,32 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1628
1628
  var s;
1629
1629
  const { handleDelete: e, message: t } = xe("CustomMessageActions");
1630
1630
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1631
- Ht,
1631
+ Yt,
1632
1632
  {
1633
1633
  onClick: e,
1634
1634
  "aria-label": "Delete",
1635
1635
  title: "Delete",
1636
1636
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1637
- children: /* @__PURE__ */ n(Ts, { size: 16, weight: "light", "aria-hidden": !0 })
1637
+ children: /* @__PURE__ */ n(As, { size: 16, weight: "light", "aria-hidden": !0 })
1638
1638
  }
1639
1639
  );
1640
1640
  }, Ta = () => {
1641
1641
  const { handleFlag: e } = xe("CustomMessageActions");
1642
1642
  return /* @__PURE__ */ n(
1643
- Ht,
1643
+ Yt,
1644
1644
  {
1645
1645
  onClick: e,
1646
1646
  "aria-label": "Report",
1647
1647
  title: "Report",
1648
1648
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1649
- children: /* @__PURE__ */ n(jt, { size: 16, weight: "light", "aria-hidden": !0 })
1649
+ children: /* @__PURE__ */ n(Vt, { size: 16, weight: "light", "aria-hidden": !0 })
1650
1650
  }
1651
1651
  );
1652
1652
  }, Aa = () => {
1653
1653
  var t;
1654
1654
  const { message: e } = xe("CustomMessageActions");
1655
1655
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1656
- Ps,
1656
+ Os,
1657
1657
  {
1658
1658
  messageActionSet: [
1659
1659
  { Component: Ia, placement: "quick", type: "delete" },
@@ -1703,10 +1703,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1703
1703
  );
1704
1704
  }, Ra = (e) => ({
1705
1705
  linkPreviews: Array.from(e.previews.values()).filter(
1706
- (t) => Tt.previewIsLoaded(t) || Tt.previewIsLoading(t)
1706
+ (t) => At.previewIsLoaded(t) || At.previewIsLoading(t)
1707
1707
  )
1708
1708
  }), La = () => {
1709
- const { linkPreviewsManager: e } = Kn(), { linkPreviews: t } = Jn(
1709
+ const { linkPreviewsManager: e } = Jn(), { linkPreviews: t } = Zn(
1710
1710
  e.state,
1711
1711
  Ra
1712
1712
  ), s = (r) => {
@@ -1720,7 +1720,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1720
1720
  },
1721
1721
  r.og_scrape_url
1722
1722
  )) }) : null;
1723
- }, ln = j.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1723
+ }, cn = U.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
1724
  "button",
1725
1725
  {
1726
1726
  ...s,
@@ -1728,20 +1728,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1728
1728
  "aria-label": "Send",
1729
1729
  disabled: t,
1730
1730
  onClick: e,
1731
- children: /* @__PURE__ */ n(As, { weight: "bold", className: "size-4" })
1731
+ children: /* @__PURE__ */ n(Ms, { weight: "bold", className: "size-4" })
1732
1732
  }
1733
- ), Pa = () => {
1734
- const e = Ae(ln), { handleSubmit: t } = Qn(), s = es(), a = e || !s, {
1733
+ ), Oa = () => {
1734
+ const e = Ae(cn), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
1735
1735
  SendButton: r = Da,
1736
- AttachmentPreviewList: i = ts
1737
- } = Ut("CustomMessageInput");
1736
+ AttachmentPreviewList: i = ns
1737
+ } = jt("CustomMessageInput");
1738
1738
  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: [
1739
- /* @__PURE__ */ n(ns, {}),
1739
+ /* @__PURE__ */ n(ss, {}),
1740
1740
  /* @__PURE__ */ n(La, {}),
1741
1741
  /* @__PURE__ */ n(i, {}),
1742
1742
  /* @__PURE__ */ h("div", { className: "flex", children: [
1743
1743
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1744
- ss,
1744
+ as,
1745
1745
  {
1746
1746
  "aria-disabled": e || void 0,
1747
1747
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -1764,7 +1764,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1764
1764
  )
1765
1765
  ] })
1766
1766
  ] });
1767
- }, Oa = ({
1767
+ }, Pa = ({
1768
1768
  renderActions: e,
1769
1769
  renderFooter: t,
1770
1770
  disabled: s = !1,
@@ -1772,7 +1772,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1772
1772
  }) => {
1773
1773
  var o;
1774
1774
  const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1775
- return s ? /* @__PURE__ */ h(ne, { children: [
1775
+ return s ? /* @__PURE__ */ h(se, { children: [
1776
1776
  /* @__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 }),
1777
1777
  t == null ? void 0 : t()
1778
1778
  ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
@@ -1784,7 +1784,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1784
1784
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1785
1785
  children: [
1786
1786
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1787
- /* @__PURE__ */ n(ln.Provider, { value: i, children: /* @__PURE__ */ n(Zn, { Input: Pa }) })
1787
+ /* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Qn, { Input: Oa }) })
1788
1788
  ]
1789
1789
  }
1790
1790
  ),
@@ -1800,10 +1800,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1800
1800
  "SYSTEM_AGE_SAFETY_BLOCKED"
1801
1801
  ], Ba = {
1802
1802
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1803
- }, ze = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", $t = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1803
+ }, ze = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", Ft = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1804
1804
  var a;
1805
1805
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1806
- if ($t(t))
1806
+ if (Ft(t))
1807
1807
  return {
1808
1808
  kind: "dm-agent",
1809
1809
  type: t
@@ -1814,7 +1814,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1814
1814
  type: t
1815
1815
  };
1816
1816
  const s = e.dm_agent_system_type;
1817
- if ($t(s))
1817
+ if (Ft(s))
1818
1818
  return {
1819
1819
  kind: "dm-agent",
1820
1820
  type: s
@@ -1824,7 +1824,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1824
1824
  if (t === -1)
1825
1825
  return e;
1826
1826
  const s = t + ze.length;
1827
- return /* @__PURE__ */ h(ne, { children: [
1827
+ return /* @__PURE__ */ h(se, { children: [
1828
1828
  e.slice(0, t),
1829
1829
  /* @__PURE__ */ n(
1830
1830
  "a",
@@ -1880,7 +1880,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1880
1880
  "data-age-safety-system-type": s.type,
1881
1881
  children: [
1882
1882
  /* @__PURE__ */ n(
1883
- Ms,
1883
+ Rs,
1884
1884
  {
1885
1885
  size: 24,
1886
1886
  weight: "duotone",
@@ -1904,7 +1904,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1904
1904
  ] }),
1905
1905
  !t && /* @__PURE__ */ n(De, { message: e.message })
1906
1906
  ] });
1907
- }, cn = He(!1), $e = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1907
+ }, dn = Ye(!1), $e = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1908
1908
  "animateTransform",
1909
1909
  {
1910
1910
  attributeName: "transform",
@@ -1915,16 +1915,16 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1915
1915
  repeatCount: "indefinite"
1916
1916
  }
1917
1917
  ) }), Ya = /* @__PURE__ */ new Set([
1918
- Pe.Thinking,
1919
- Pe.Generating,
1920
- Pe.ExternalSources
1918
+ Oe.Thinking,
1919
+ Oe.Generating,
1920
+ Oe.ExternalSources
1921
1921
  ]), qa = ({ threadList: e }) => {
1922
- var b, x;
1923
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = qe(), { typing: i = {} } = as(), { aiState: o } = rs(t), l = Ae(cn);
1922
+ var b, w;
1923
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = We(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = Ae(dn);
1924
1924
  if (!e && l && Ya.has(o)) {
1925
1925
  const p = Wa(t, (b = r.user) == null ? void 0 : b.id);
1926
1926
  return /* @__PURE__ */ n(
1927
- Ft,
1927
+ Bt,
1928
1928
  {
1929
1929
  avatarId: (p == null ? void 0 : p.id) ?? "ai-agent",
1930
1930
  avatarName: (p == null ? void 0 : p.name) ?? (p == null ? void 0 : p.id) ?? "Agent",
@@ -1936,21 +1936,21 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1936
1936
  if ((s == null ? void 0 : s.typing_events) === !1)
1937
1937
  return null;
1938
1938
  const m = e ? [] : Object.values(i).filter(
1939
- ({ parent_id: p, user: w }) => {
1939
+ ({ parent_id: p, user: v }) => {
1940
1940
  var _;
1941
- return (w == null ? void 0 : w.id) !== ((_ = r.user) == null ? void 0 : _.id) && !p;
1941
+ return (v == null ? void 0 : v.id) !== ((_ = r.user) == null ? void 0 : _.id) && !p;
1942
1942
  }
1943
1943
  ), g = e ? Object.values(i).filter(
1944
- ({ parent_id: p, user: w }) => {
1944
+ ({ parent_id: p, user: v }) => {
1945
1945
  var _;
1946
- return (w == null ? void 0 : w.id) !== ((_ = r.user) == null ? void 0 : _.id) && p === (a == null ? void 0 : a.id);
1946
+ return (v == null ? void 0 : v.id) !== ((_ = r.user) == null ? void 0 : _.id) && p === (a == null ? void 0 : a.id);
1947
1947
  }
1948
1948
  ) : [], u = e ? g : m;
1949
1949
  if (!u.length)
1950
1950
  return null;
1951
- const f = (x = u[0]) == null ? void 0 : x.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1951
+ const f = (w = u[0]) == null ? void 0 : w.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1952
1952
  return /* @__PURE__ */ n(
1953
- Ft,
1953
+ Bt,
1954
1954
  {
1955
1955
  avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
1956
1956
  avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
@@ -1958,7 +1958,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1958
1958
  testId: "typing-indicator"
1959
1959
  }
1960
1960
  );
1961
- }, Ft = ({
1961
+ }, Bt = ({
1962
1962
  avatarId: e,
1963
1963
  avatarName: t,
1964
1964
  avatarImage: s,
@@ -1973,7 +1973,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1973
1973
  },
1974
1974
  children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
1975
1975
  /* @__PURE__ */ n(
1976
- re,
1976
+ ie,
1977
1977
  {
1978
1978
  className: "str-chat__avatar str-chat__message-sender-avatar",
1979
1979
  id: e,
@@ -2014,7 +2014,7 @@ function Wa(e, t) {
2014
2014
  const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2015
2015
  "div",
2016
2016
  {
2017
- className: y("flex items-center justify-center h-full", e),
2017
+ className: C("flex items-center justify-center h-full", e),
2018
2018
  children: [
2019
2019
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2020
2020
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2054,12 +2054,12 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2054
2054
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2055
2055
  ]
2056
2056
  }
2057
- ), Se = 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: [
2057
+ ), Se = U.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2058
2058
  /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2059
2059
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2060
2060
  ] }) }));
2061
2061
  Se.displayName = "LoadingState";
2062
- const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Ja = ({
2062
+ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Ja = ({
2063
2063
  onBack: e,
2064
2064
  showBackButton: t,
2065
2065
  showStarButton: s = !1,
@@ -2074,21 +2074,22 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2074
2074
  onReportParticipantClick: u,
2075
2075
  customChannelActions: f,
2076
2076
  renderChannelActions: c,
2077
- showChannelInfo: b = !0
2077
+ showChannelInfo: b = !0,
2078
+ onParticipantNameClick: w
2078
2079
  }) => {
2079
- var R, D, O, T, N;
2080
- const { channel: x } = de(), p = j.useMemo(() => {
2081
- var z, M;
2082
- const S = (z = x._client) == null ? void 0 : z.userID;
2083
- return S ? Object.values(((M = x.state) == null ? void 0 : M.members) || {}).find(
2084
- (C) => {
2085
- var A;
2086
- return ((A = C.user) == null ? void 0 : A.id) && C.user.id !== S;
2080
+ var D, $, L, N, I;
2081
+ const { channel: p } = de(), v = U.useMemo(() => {
2082
+ var T, E;
2083
+ const S = (T = p._client) == null ? void 0 : T.userID;
2084
+ return S ? Object.values(((E = p.state) == null ? void 0 : E.members) || {}).find(
2085
+ (A) => {
2086
+ var O;
2087
+ return ((O = A.user) == null ? void 0 : O.id) && A.user.id !== S;
2087
2088
  }
2088
2089
  ) : void 0;
2089
- }, [(R = x._client) == null ? void 0 : R.userID, (D = x.state) == null ? void 0 : D.members]), w = Wt(p == null ? void 0 : p.user), _ = (O = p == null ? void 0 : p.user) == null ? void 0 : O.image, I = qt(x), E = async () => {
2090
+ }, [(D = p._client) == null ? void 0 : D.userID, ($ = p.state) == null ? void 0 : $.members]), _ = Xt(v == null ? void 0 : v.user), R = (L = v == null ? void 0 : v.user) == null ? void 0 : L.image, y = Wt(p), M = async () => {
2090
2091
  try {
2091
- I ? await x.unpin() : await x.pin();
2092
+ y ? await p.unpin() : await p.pin();
2092
2093
  } catch (S) {
2093
2094
  console.error(
2094
2095
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -2101,7 +2102,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2101
2102
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2102
2103
  "button",
2103
2104
  {
2104
- className: y(
2105
+ className: C(
2105
2106
  le,
2106
2107
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2107
2108
  ),
@@ -2109,25 +2110,37 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2109
2110
  }),
2110
2111
  type: "button",
2111
2112
  "aria-label": "Back to conversations",
2112
- children: /* @__PURE__ */ n(Rt, { className: "size-5 text-black/90" })
2113
+ children: /* @__PURE__ */ n(Lt, { className: "size-5 text-black/90" })
2113
2114
  }
2114
2115
  ) }),
2115
2116
  /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2116
2117
  /* @__PURE__ */ n(
2117
- re,
2118
+ ie,
2118
2119
  {
2119
- id: ((T = p == null ? void 0 : p.user) == null ? void 0 : T.id) || x.id || "unknown",
2120
- name: w,
2121
- image: _,
2122
- starred: s && I,
2120
+ id: ((N = v == null ? void 0 : v.user) == null ? void 0 : N.id) || p.id || "unknown",
2121
+ name: _,
2122
+ image: R,
2123
+ starred: s && y,
2123
2124
  dmAgentEnabled: a,
2124
2125
  size: 48
2125
2126
  }
2126
2127
  ),
2127
- /* @__PURE__ */ n("p", { className: "text-center text-xs font-medium text-black/90", children: w }),
2128
+ w ? /* @__PURE__ */ h(
2129
+ "button",
2130
+ {
2131
+ type: "button",
2132
+ onClick: w,
2133
+ "aria-label": `View details for ${_}`,
2134
+ className: "flex max-w-full items-center gap-0.5 rounded text-center text-xs font-medium text-black/90 transition-opacity hover:opacity-70",
2135
+ children: [
2136
+ /* @__PURE__ */ n("span", { className: "truncate", children: _ }),
2137
+ /* @__PURE__ */ n(Ve, { className: "size-3 shrink-0", weight: "bold" })
2138
+ ]
2139
+ }
2140
+ ) : /* @__PURE__ */ n("p", { className: "text-center text-xs font-medium text-black/90", children: _ }),
2128
2141
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2129
2142
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2130
- /* @__PURE__ */ n("span", { children: Bt })
2143
+ /* @__PURE__ */ n("span", { children: Ut })
2131
2144
  ] })
2132
2145
  ] }),
2133
2146
  /* @__PURE__ */ h("div", { className: "flex justify-end items-center gap-2", children: [
@@ -2135,17 +2148,17 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2135
2148
  "button",
2136
2149
  {
2137
2150
  className: le,
2138
- onClick: E,
2151
+ onClick: M,
2139
2152
  type: "button",
2140
- "aria-label": I ? "Unstar conversation" : "Star conversation",
2153
+ "aria-label": y ? "Unstar conversation" : "Star conversation",
2141
2154
  children: /* @__PURE__ */ n(
2142
2155
  Be,
2143
2156
  {
2144
- className: y("size-5", {
2145
- "text-yellow-600": I,
2146
- "text-black/90": !I
2157
+ className: C("size-5", {
2158
+ "text-yellow-600": y,
2159
+ "text-black/90": !y
2147
2160
  }),
2148
- weight: I ? "duotone" : "regular"
2161
+ weight: y ? "duotone" : "regular"
2149
2162
  }
2150
2163
  )
2151
2164
  }
@@ -2153,8 +2166,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2153
2166
  b && (c !== void 0 ? c : /* @__PURE__ */ n(
2154
2167
  Pt,
2155
2168
  {
2156
- channel: x,
2157
- participant: p,
2169
+ channel: p,
2170
+ participant: v,
2158
2171
  showDeleteConversation: o,
2159
2172
  showBlockParticipant: l,
2160
2173
  showReportParticipant: d,
@@ -2164,7 +2177,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2164
2177
  onBlockParticipantClick: g,
2165
2178
  onReportParticipantClick: u,
2166
2179
  customChannelActions: f,
2167
- triggerClassName: y(le, "bg-[#F1F0EE]")
2180
+ triggerClassName: C(le, "bg-[#F1F0EE]")
2168
2181
  }
2169
2182
  ))
2170
2183
  ] })
@@ -2174,32 +2187,44 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2174
2187
  t && e && /* @__PURE__ */ n(
2175
2188
  "button",
2176
2189
  {
2177
- className: y(
2190
+ className: C(
2178
2191
  le,
2179
2192
  "messaging-channel-view-back-button-desktop"
2180
2193
  ),
2181
2194
  type: "button",
2182
2195
  onClick: e,
2183
2196
  "aria-label": "Back to conversations",
2184
- children: /* @__PURE__ */ n(Rt, { className: "size-5 text-black/90" })
2197
+ children: /* @__PURE__ */ n(Lt, { className: "size-5 text-black/90" })
2185
2198
  }
2186
2199
  ),
2187
2200
  /* @__PURE__ */ n(
2188
- re,
2201
+ ie,
2189
2202
  {
2190
- id: ((N = p == null ? void 0 : p.user) == null ? void 0 : N.id) || x.id || "unknown",
2191
- name: w,
2192
- image: _,
2193
- starred: s && I,
2203
+ id: ((I = v == null ? void 0 : v.user) == null ? void 0 : I.id) || p.id || "unknown",
2204
+ name: _,
2205
+ image: R,
2206
+ starred: s && y,
2194
2207
  dmAgentEnabled: a,
2195
2208
  size: 48
2196
2209
  }
2197
2210
  ),
2198
2211
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2199
- /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: w }),
2212
+ w ? /* @__PURE__ */ h(
2213
+ "button",
2214
+ {
2215
+ type: "button",
2216
+ onClick: w,
2217
+ "aria-label": `View details for ${_}`,
2218
+ className: "flex min-w-0 max-w-full items-center gap-1 rounded font-medium text-black/90 transition-opacity hover:opacity-70",
2219
+ children: [
2220
+ /* @__PURE__ */ n("span", { className: "truncate", children: _ }),
2221
+ /* @__PURE__ */ n(Ve, { className: "size-4 shrink-0", weight: "bold" })
2222
+ ]
2223
+ }
2224
+ ) : /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: _ }),
2200
2225
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2201
2226
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2202
- /* @__PURE__ */ n("span", { className: "truncate", children: Bt })
2227
+ /* @__PURE__ */ n("span", { className: "truncate", children: Ut })
2203
2228
  ] })
2204
2229
  ] })
2205
2230
  ] }),
@@ -2208,17 +2233,17 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2208
2233
  "button",
2209
2234
  {
2210
2235
  className: le,
2211
- onClick: E,
2236
+ onClick: M,
2212
2237
  type: "button",
2213
- "aria-label": I ? "Unstar conversation" : "Star conversation",
2238
+ "aria-label": y ? "Unstar conversation" : "Star conversation",
2214
2239
  children: /* @__PURE__ */ n(
2215
2240
  Be,
2216
2241
  {
2217
- className: y("size-6", {
2218
- "text-yellow-600": I,
2219
- "text-black/90": !I
2242
+ className: C("size-6", {
2243
+ "text-yellow-600": y,
2244
+ "text-black/90": !y
2220
2245
  }),
2221
- weight: I ? "duotone" : "regular"
2246
+ weight: y ? "duotone" : "regular"
2222
2247
  }
2223
2248
  )
2224
2249
  }
@@ -2226,8 +2251,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2226
2251
  b && (c !== void 0 ? c : /* @__PURE__ */ n(
2227
2252
  Pt,
2228
2253
  {
2229
- channel: x,
2230
- participant: p,
2254
+ channel: p,
2255
+ participant: v,
2231
2256
  showDeleteConversation: o,
2232
2257
  showBlockParticipant: l,
2233
2258
  showReportParticipant: d,
@@ -2259,63 +2284,64 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2259
2284
  showReportParticipant: f = !0,
2260
2285
  composerDisabled: c = !1,
2261
2286
  composerDisabledReason: b,
2262
- showStarButton: x = !1,
2287
+ showStarButton: w = !1,
2263
2288
  chatbotVotingEnabled: p = !1,
2264
- renderChannelBanner: w,
2289
+ renderChannelBanner: v,
2265
2290
  customChannelActions: _,
2266
- renderChannelActions: I,
2267
- renderMessage: E,
2268
- dmAgentEnabled: R = !1,
2291
+ renderChannelActions: R,
2292
+ renderMessage: y,
2293
+ dmAgentEnabled: M = !1,
2269
2294
  viewerLanguage: D,
2270
- showChannelInfo: O = !0
2295
+ showChannelInfo: $ = !0,
2296
+ onParticipantNameClick: L
2271
2297
  }) => {
2272
- var A, $, B, G, H, K;
2273
- const { channel: T } = de(), N = j.useMemo(() => {
2274
- var k, F;
2275
- const U = (k = T._client) == null ? void 0 : k.userID;
2276
- return U ? Object.values(((F = T.state) == null ? void 0 : F.members) || {}).find(
2277
- (q) => {
2278
- var W;
2279
- return ((W = q.user) == null ? void 0 : W.id) && q.user.id !== U;
2298
+ var O, B, H, V, Y, q;
2299
+ const { channel: N } = de(), I = U.useMemo(() => {
2300
+ var P, W;
2301
+ const x = (P = N._client) == null ? void 0 : P.userID;
2302
+ return x ? Object.values(((W = N.state) == null ? void 0 : W.members) || {}).find(
2303
+ (K) => {
2304
+ var G;
2305
+ return ((G = K.user) == null ? void 0 : G.id) && K.user.id !== x;
2280
2306
  }
2281
2307
  ) : void 0;
2282
- }, [(A = T._client) == null ? void 0 : A.userID, ($ = T.state) == null ? void 0 : $.members]), S = j.useMemo(() => {
2283
- var k, F;
2284
- const U = (k = T._client) == null ? void 0 : k.userID;
2285
- return U ? Object.values(((F = T.state) == null ? void 0 : F.members) || {}).find((q) => {
2286
- var W;
2287
- return ((W = q.user) == null ? void 0 : W.id) === U;
2308
+ }, [(O = N._client) == null ? void 0 : O.userID, (B = N.state) == null ? void 0 : B.members]), S = U.useMemo(() => {
2309
+ var P, W;
2310
+ const x = (P = N._client) == null ? void 0 : P.userID;
2311
+ return x ? Object.values(((W = N.state) == null ? void 0 : W.members) || {}).find((K) => {
2312
+ var G;
2313
+ return ((G = K.user) == null ? void 0 : G.id) === x;
2288
2314
  }) : void 0;
2289
- }, [(B = T._client) == null ? void 0 : B.userID, (G = T.state) == null ? void 0 : G.members]), L = ((H = S == null ? void 0 : S.user) == null ? void 0 : H.is_account) ?? (S == null ? void 0 : S.is_account), z = ((K = N == null ? void 0 : N.user) == null ? void 0 : K.is_account) ?? (N == null ? void 0 : N.is_account), M = R && L === !1 && z === !0, C = X(
2290
- (U) => {
2291
- const { message: v } = xe("ChannelView"), k = /* @__PURE__ */ n(
2315
+ }, [(H = N._client) == null ? void 0 : H.userID, (V = N.state) == null ? void 0 : V.members]), F = ((Y = S == null ? void 0 : S.user) == null ? void 0 : Y.is_account) ?? (S == null ? void 0 : S.is_account), T = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), E = M && F === !1 && T === !0, A = J(
2316
+ (x) => {
2317
+ const { message: k } = xe("ChannelView"), P = /* @__PURE__ */ n(
2292
2318
  Sa,
2293
2319
  {
2294
- ...U,
2320
+ ...x,
2295
2321
  chatbotVotingEnabled: p,
2296
2322
  viewerLanguage: D
2297
2323
  }
2298
2324
  );
2299
- return !E || !v ? k : E(k, v);
2325
+ return !y || !k ? P : y(P, k);
2300
2326
  },
2301
- [p, E, D]
2327
+ [p, y, D]
2302
2328
  );
2303
- return /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
2304
- os,
2329
+ return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
2330
+ ls,
2305
2331
  {
2306
2332
  overrides: {
2307
- Message: C,
2333
+ Message: A,
2308
2334
  MessageActions: Aa
2309
2335
  },
2310
- children: /* @__PURE__ */ h(ls, { children: [
2336
+ children: /* @__PURE__ */ h(cs, { children: [
2311
2337
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2312
2338
  Ja,
2313
2339
  {
2314
2340
  onBack: e,
2315
2341
  showBackButton: t,
2316
- showChannelInfo: O,
2317
- showStarButton: x,
2318
- dmAgentEnabled: M,
2342
+ showChannelInfo: $,
2343
+ showStarButton: w,
2344
+ dmAgentEnabled: E,
2319
2345
  onLeaveConversation: i,
2320
2346
  onBlockParticipant: o,
2321
2347
  showDeleteConversation: l,
@@ -2325,26 +2351,27 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2325
2351
  onBlockParticipantClick: m,
2326
2352
  onReportParticipantClick: g,
2327
2353
  customChannelActions: _,
2328
- renderChannelActions: I
2354
+ renderChannelActions: R,
2355
+ onParticipantNameClick: L
2329
2356
  }
2330
2357
  ) }, "lt-channel-header"),
2331
- w ? /* @__PURE__ */ n(j.Fragment, { children: w() }, "lt-channel-banner") : null,
2358
+ v ? /* @__PURE__ */ n(U.Fragment, { children: v() }, "lt-channel-banner") : null,
2332
2359
  /* @__PURE__ */ n(
2333
2360
  "div",
2334
2361
  {
2335
2362
  className: "flex-1 overflow-hidden relative",
2336
- children: /* @__PURE__ */ n(cs, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2363
+ children: /* @__PURE__ */ n(ds, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2337
2364
  },
2338
2365
  "lt-channel-message-list"
2339
2366
  ),
2340
- r ? /* @__PURE__ */ n(j.Fragment, { children: r(T) }, "lt-channel-conversation-footer") : null,
2367
+ r ? /* @__PURE__ */ n(U.Fragment, { children: r(N) }, "lt-channel-conversation-footer") : null,
2341
2368
  /* @__PURE__ */ n(
2342
- Oa,
2369
+ Pa,
2343
2370
  {
2344
2371
  ...s && {
2345
- renderActions: () => s == null ? void 0 : s(T)
2372
+ renderActions: () => s == null ? void 0 : s(N)
2346
2373
  },
2347
- renderFooter: () => a == null ? void 0 : a(T),
2374
+ renderFooter: () => a == null ? void 0 : a(N),
2348
2375
  disabled: c,
2349
2376
  disabledReason: b
2350
2377
  },
@@ -2353,7 +2380,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2353
2380
  ] })
2354
2381
  }
2355
2382
  ) });
2356
- }, dn = j.memo(
2383
+ }, un = U.memo(
2357
2384
  ({
2358
2385
  channel: e,
2359
2386
  onBack: t,
@@ -2370,65 +2397,66 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2370
2397
  onBlockParticipantClick: f,
2371
2398
  onReportParticipantClick: c,
2372
2399
  showBlockParticipant: b = !0,
2373
- showReportParticipant: x = !0,
2400
+ showReportParticipant: w = !0,
2374
2401
  composerDisabled: p = !1,
2375
- composerDisabledReason: w,
2402
+ composerDisabledReason: v,
2376
2403
  dmAgentEnabled: _,
2377
- messageMetadata: I,
2378
- onMessageSent: E,
2379
- showStarButton: R = !1,
2404
+ messageMetadata: R,
2405
+ onMessageSent: y,
2406
+ showStarButton: M = !1,
2380
2407
  chatbotVotingEnabled: D = !1,
2381
- renderChannelBanner: O,
2382
- customChannelActions: T,
2408
+ renderChannelBanner: $,
2409
+ customChannelActions: L,
2383
2410
  renderChannelActions: N,
2384
- renderMessage: S,
2385
- onMessageLinkClick: L,
2386
- sendButton: z,
2387
- attachmentPreviewList: M,
2388
- viewerLanguage: C,
2389
- showChannelInfo: A = !0
2411
+ renderMessage: I,
2412
+ onMessageLinkClick: S,
2413
+ sendButton: F,
2414
+ attachmentPreviewList: T,
2415
+ viewerLanguage: E,
2416
+ showChannelInfo: A = !0,
2417
+ onParticipantNameClick: O
2390
2418
  }) => {
2391
- const $ = X(
2392
- async (G, H, K) => {
2393
- var W;
2394
- const U = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, v = _ && !U, k = {
2395
- ...H,
2396
- ...v && { silent: !0 },
2397
- ...I && {
2419
+ const B = J(
2420
+ async (V, Y, q) => {
2421
+ var G;
2422
+ const x = ((G = e.data) == null ? void 0 : G.chatbot_paused) === !0, k = _ && !x, P = {
2423
+ ...Y,
2424
+ ...k && { silent: !0 },
2425
+ ...R && {
2398
2426
  metadata: {
2399
- ...H.metadata ?? {},
2400
- ...I
2427
+ ...Y.metadata ?? {},
2428
+ ...R
2401
2429
  }
2402
2430
  }
2403
- }, F = {
2404
- ...K,
2405
- ...v && { skip_push: !0 }
2406
- }, q = await e.sendMessage(k, F);
2407
- return E == null || E(q), q;
2431
+ }, W = {
2432
+ ...q,
2433
+ ...k && { skip_push: !0 }
2434
+ }, K = await e.sendMessage(P, W);
2435
+ return y == null || y(K), K;
2408
2436
  },
2409
- [e, _, I, E]
2410
- ), B = V(null);
2411
- return Y(() => {
2412
- if (!L) return;
2413
- const G = B.current;
2414
- if (!G) return;
2415
- const H = (K) => {
2416
- const U = K.target, v = U == null ? void 0 : U.closest("a[href]"), k = v == null ? void 0 : v.getAttribute("href");
2417
- if (!k) return;
2418
- const F = v == null ? void 0 : v.closest("[data-message-id]"), q = F == null ? void 0 : F.getAttribute("data-message-id"), W = q ? e.state.messages.find((J) => J.id === q) : void 0;
2419
- L(k, W);
2437
+ [e, _, R, y]
2438
+ ), H = j(null);
2439
+ return X(() => {
2440
+ if (!S) return;
2441
+ const V = H.current;
2442
+ if (!V) return;
2443
+ const Y = (q) => {
2444
+ const x = q.target, k = x == null ? void 0 : x.closest("a[href]"), P = k == null ? void 0 : k.getAttribute("href");
2445
+ if (!P) return;
2446
+ const W = k == null ? void 0 : k.closest("[data-message-id]"), K = W == null ? void 0 : W.getAttribute("data-message-id"), G = K ? e.state.messages.find((ee) => ee.id === K) : void 0;
2447
+ S(P, G);
2420
2448
  };
2421
- return G.addEventListener("click", H), () => G.removeEventListener("click", H);
2422
- }, [L, e]), /* @__PURE__ */ n(
2449
+ return V.addEventListener("click", Y), () => V.removeEventListener("click", Y);
2450
+ }, [S, e]), /* @__PURE__ */ n(
2423
2451
  "div",
2424
2452
  {
2425
- ref: B,
2426
- className: y(
2453
+ ref: H,
2454
+ className: C(
2427
2455
  "messaging-channel-view h-full flex flex-col",
2428
2456
  d
2429
2457
  ),
2430
- children: /* @__PURE__ */ n(cn.Provider, { value: _ ?? !1, children: /* @__PURE__ */ n(
2431
- is,
2458
+ children: /* @__PURE__ */ n(dn.Provider, { value: _ ?? !1, children: /* @__PURE__ */ n(
2459
+ os,
2432
2460
  {
2433
2461
  channel: e,
2434
2462
  MessageSystem: Ha,
@@ -2436,9 +2464,9 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2436
2464
  LoadingIndicator: Se,
2437
2465
  DateSeparator: Vs,
2438
2466
  TypingIndicator: qa,
2439
- doSendMessageRequest: $,
2440
- ...z ? { SendButton: z } : {},
2441
- ...M ? { AttachmentPreviewList: M } : {},
2467
+ doSendMessageRequest: B,
2468
+ ...F ? { SendButton: F } : {},
2469
+ ...T ? { AttachmentPreviewList: T } : {},
2442
2470
  children: /* @__PURE__ */ n(
2443
2471
  Za,
2444
2472
  {
@@ -2455,18 +2483,19 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2455
2483
  onBlockParticipantClick: f,
2456
2484
  onReportParticipantClick: c,
2457
2485
  showBlockParticipant: b,
2458
- showReportParticipant: x,
2486
+ showReportParticipant: w,
2459
2487
  composerDisabled: p,
2460
- composerDisabledReason: w,
2461
- showStarButton: R,
2488
+ composerDisabledReason: v,
2489
+ showStarButton: M,
2462
2490
  dmAgentEnabled: _,
2463
2491
  chatbotVotingEnabled: D,
2464
- renderChannelBanner: O,
2465
- customChannelActions: T,
2492
+ renderChannelBanner: $,
2493
+ customChannelActions: L,
2466
2494
  renderChannelActions: N,
2467
- renderMessage: S,
2468
- viewerLanguage: C,
2469
- showChannelInfo: A
2495
+ renderMessage: I,
2496
+ viewerLanguage: E,
2497
+ showChannelInfo: A,
2498
+ onParticipantNameClick: O
2470
2499
  }
2471
2500
  )
2472
2501
  }
@@ -2475,8 +2504,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2475
2504
  );
2476
2505
  }
2477
2506
  );
2478
- dn.displayName = "ChannelView";
2479
- const be = 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: [
2507
+ un.displayName = "ChannelView";
2508
+ const be = U.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: [
2480
2509
  /* @__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: "⚠️" }) }),
2481
2510
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2482
2511
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2507,107 +2536,107 @@ const ki = ({
2507
2536
  chatbotVotingEnabled: f = !1,
2508
2537
  viewerLanguage: c,
2509
2538
  renderChannelBanner: b,
2510
- customChannelActions: x,
2539
+ customChannelActions: w,
2511
2540
  renderChannelActions: p,
2512
- renderMessage: w,
2541
+ renderMessage: v,
2513
2542
  onMessageLinkClick: _,
2514
- showChannelInfo: I
2543
+ showChannelInfo: R
2515
2544
  }) => {
2516
2545
  const {
2517
- client: E,
2518
- isConnected: R,
2546
+ client: y,
2547
+ isConnected: M,
2519
2548
  isLoading: D,
2520
- error: O,
2521
- refreshConnection: T,
2549
+ error: $,
2550
+ refreshConnection: L,
2522
2551
  service: N,
2523
- debug: S
2524
- } = Os(), [L, z] = P(null), [M, C] = P(null), [A, $] = P(!1), { showDeleteConversation: B = !0 } = e, G = V(o);
2525
- G.current = o;
2526
- const H = V(a);
2527
- H.current = a;
2528
- const K = V(null), U = V(null);
2529
- Y(() => {
2530
- U.current = L;
2531
- }, [L]), Y(() => {
2532
- if (!E || !R) return;
2533
- const F = E.userID;
2534
- if (!F) return;
2535
- const q = `${F}::${i}`;
2536
- if (K.current === q) return;
2537
- K.current = q;
2538
- const W = () => {
2539
- K.current === q && (K.current = null);
2552
+ debug: I
2553
+ } = Ps(), [S, F] = z(null), [T, E] = z(null), [A, O] = z(!1), { showDeleteConversation: B = !0 } = e, H = j(o);
2554
+ H.current = o;
2555
+ const V = j(a);
2556
+ V.current = a;
2557
+ const Y = j(null), q = j(null);
2558
+ X(() => {
2559
+ q.current = S;
2560
+ }, [S]), X(() => {
2561
+ if (!y || !M) return;
2562
+ const P = y.userID;
2563
+ if (!P) return;
2564
+ const W = `${P}::${i}`;
2565
+ if (Y.current === W) return;
2566
+ Y.current = W;
2567
+ const K = () => {
2568
+ Y.current === W && (Y.current = null);
2540
2569
  };
2541
2570
  (async () => {
2542
- var ie, ue;
2571
+ var ee, ue;
2543
2572
  try {
2544
- S && console.log(
2573
+ I && console.log(
2545
2574
  "[MessagingShell] Loading initial conversation with:",
2546
2575
  i
2547
2576
  );
2548
- const Z = await E.queryChannels(
2577
+ const Z = await y.queryChannels(
2549
2578
  {
2550
2579
  type: "messaging",
2551
- members: { $eq: [F, i] }
2580
+ members: { $eq: [P, i] }
2552
2581
  },
2553
2582
  {},
2554
2583
  { limit: 1 }
2555
2584
  );
2556
2585
  if (Z.length > 0) {
2557
- z(Z[0]), C(null), (ie = H.current) == null || ie.call(H, Z[0]), S && console.log(
2586
+ F(Z[0]), E(null), (ee = V.current) == null || ee.call(V, Z[0]), I && console.log(
2558
2587
  "[MessagingShell] Initial conversation loaded:",
2559
2588
  Z[0].id
2560
2589
  );
2561
2590
  return;
2562
2591
  }
2563
- const ae = G.current;
2564
- if (!ae || !N) {
2565
- W(), C("No conversation found with this account"), S && console.log(
2592
+ const re = H.current;
2593
+ if (!re || !N) {
2594
+ K(), E("No conversation found with this account"), I && console.log(
2566
2595
  "[MessagingShell] No conversation found for:",
2567
2596
  i
2568
2597
  );
2569
2598
  return;
2570
2599
  }
2571
2600
  try {
2572
- const ee = await N.startChannelWithParticipant({
2573
- id: ae.id,
2574
- name: ae.name,
2575
- phone: ae.phone
2601
+ const te = await N.startChannelWithParticipant({
2602
+ id: re.id,
2603
+ name: re.name,
2604
+ phone: re.phone
2576
2605
  });
2577
- z(ee), C(null), (ue = H.current) == null || ue.call(H, ee), S && console.log(
2606
+ F(te), E(null), (ue = V.current) == null || ue.call(V, te), I && console.log(
2578
2607
  "[MessagingShell] Channel created and loaded:",
2579
- ee.id
2608
+ te.id
2580
2609
  );
2581
- } catch (ee) {
2610
+ } catch (te) {
2582
2611
  console.error(
2583
2612
  "[MessagingShell] Failed to create conversation:",
2584
- ee
2585
- ), W(), C("Failed to create conversation");
2613
+ te
2614
+ ), K(), E("Failed to create conversation");
2586
2615
  }
2587
2616
  } catch (Z) {
2588
2617
  console.error(
2589
2618
  "[MessagingShell] Failed to load initial conversation:",
2590
2619
  Z
2591
- ), W(), U.current || C("Failed to load conversation");
2620
+ ), K(), q.current || E("Failed to load conversation");
2592
2621
  }
2593
2622
  })();
2594
- }, [i, E, R, N, S]);
2595
- const v = V(r);
2596
- v.current = r;
2597
- const k = X(() => {
2598
- var F;
2599
- z(null), $(!0), (F = v.current) == null || F.call(v);
2623
+ }, [i, y, M, N, I]);
2624
+ const x = j(r);
2625
+ x.current = r;
2626
+ const k = J(() => {
2627
+ var P;
2628
+ F(null), O(!0), (P = x.current) == null || P.call(x);
2600
2629
  }, []);
2601
- return D ? /* @__PURE__ */ n(Se, {}) : O ? /* @__PURE__ */ n(be, { message: O, onBack: T }) : !R || !E ? /* @__PURE__ */ n(
2630
+ return D ? /* @__PURE__ */ n(Se, {}) : $ ? /* @__PURE__ */ n(be, { message: $, onBack: L }) : !M || !y ? /* @__PURE__ */ n(
2602
2631
  be,
2603
2632
  {
2604
2633
  message: "Not connected to messaging service",
2605
- onBack: T
2634
+ onBack: L
2606
2635
  }
2607
- ) : M ? /* @__PURE__ */ n(be, { message: M }) : A && !L ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : L ? /* @__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(
2608
- dn,
2636
+ ) : T ? /* @__PURE__ */ n(be, { message: T }) : A && !S ? /* @__PURE__ */ n(be, { 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(
2637
+ un,
2609
2638
  {
2610
- channel: L,
2639
+ channel: S,
2611
2640
  renderMessageInputActions: t,
2612
2641
  renderConversationFooter: s,
2613
2642
  renderChannelBanner: b,
@@ -2621,13 +2650,13 @@ const ki = ({
2621
2650
  onMessageSent: u,
2622
2651
  chatbotVotingEnabled: f,
2623
2652
  viewerLanguage: c,
2624
- customChannelActions: x,
2653
+ customChannelActions: w,
2625
2654
  renderChannelActions: p,
2626
- renderMessage: w,
2655
+ renderMessage: v,
2627
2656
  onMessageLinkClick: _,
2628
- showChannelInfo: I
2657
+ showChannelInfo: R
2629
2658
  },
2630
- L.id
2659
+ S.id
2631
2660
  ) }) }) : /* @__PURE__ */ n(Se, {});
2632
2661
  };
2633
2662
  function Qa(e) {
@@ -2636,14 +2665,14 @@ function Qa(e) {
2636
2665
  for (const s of t)
2637
2666
  e.state.addMessageSorted(s.message);
2638
2667
  }
2639
- const un = j.createContext({
2668
+ const mn = U.createContext({
2640
2669
  selectedChannel: void 0,
2641
2670
  onChannelSelect: () => {
2642
2671
  },
2643
2672
  debug: !1,
2644
2673
  renderMessagePreview: void 0,
2645
2674
  viewerLanguage: void 0
2646
- }), er = un.Provider, tr = () => j.useContext(un), nr = (e, t) => {
2675
+ }), er = mn.Provider, tr = () => U.useContext(mn), nr = (e, t) => {
2647
2676
  const s = new Date(
2648
2677
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2649
2678
  ), r = new Date(
@@ -2664,9 +2693,9 @@ const un = j.createContext({
2664
2693
  day: "numeric",
2665
2694
  year: "2-digit"
2666
2695
  });
2667
- }, mn = j.memo(
2696
+ }, hn = U.memo(
2668
2697
  ({ channel: e, unread: t }) => {
2669
- var D, O, T;
2698
+ var D, $, L;
2670
2699
  const {
2671
2700
  selectedChannel: s,
2672
2701
  onChannelSelect: a,
@@ -2676,39 +2705,39 @@ const un = j.createContext({
2676
2705
  } = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2677
2706
  e && a(e);
2678
2707
  }, m = (N) => {
2679
- const S = N.key === "Enter" || N.key === " ", L = N.repeat;
2680
- !S || L || (N.preventDefault(), d());
2708
+ const I = N.key === "Enter" || N.key === " ", S = N.repeat;
2709
+ !I || S || (N.preventDefault(), d());
2681
2710
  }, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
2682
2711
  (N) => {
2683
- var S, L;
2684
- return ((S = N.user) == null ? void 0 : S.id) && N.user.id !== ((L = e == null ? void 0 : e._client) == null ? void 0 : L.userID);
2712
+ var I, S;
2713
+ return ((I = N.user) == null ? void 0 : I.id) && N.user.id !== ((S = e == null ? void 0 : e._client) == null ? void 0 : S.userID);
2685
2714
  }
2686
- ), f = Wt(u == null ? void 0 : u.user), c = (O = u == null ? void 0 : u.user) == null ? void 0 : O.image, b = (() => {
2687
- var S;
2688
- const N = (S = e == null ? void 0 : e.state) == null ? void 0 : S.messages;
2715
+ ), f = Xt(u == null ? void 0 : u.user), c = ($ = u == null ? void 0 : u.user) == null ? void 0 : $.image, b = (() => {
2716
+ var I;
2717
+ const N = (I = e == null ? void 0 : e.state) == null ? void 0 : I.messages;
2689
2718
  if (N != null && N.length) {
2690
- for (let L = N.length - 1; L >= 0; L--)
2691
- if (N[L].type !== "system") return N[L];
2719
+ for (let S = N.length - 1; S >= 0; S--)
2720
+ if (N[S].type !== "system") return N[S];
2692
2721
  }
2693
2722
  })(), p = (() => {
2694
- var C, A, $, B;
2695
- const N = Xt({
2723
+ var E, A, O, B;
2724
+ const N = Kt({
2696
2725
  message: b,
2697
2726
  viewerLanguage: o
2698
2727
  });
2699
- if (((C = b == null ? void 0 : b.metadata) == null ? void 0 : C.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2728
+ if (((E = b == null ? void 0 : b.metadata) == null ? void 0 : E.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2700
2729
  if (((A = b == null ? void 0 : b.metadata) == null ? void 0 : A.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2701
- if ((($ = b == null ? void 0 : b.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2730
+ if (((O = b == null ? void 0 : b.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2702
2731
  if (N) return N;
2703
- const M = (B = b == null ? void 0 : b.attachments) == null ? void 0 : B[0];
2704
- 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";
2705
- })(), w = b != null && b.created_at ? sr(new Date(b.created_at)) : "", _ = b ? Ee(b) : !1, I = i ? i(b, p) : `${_ ? "✨ " : ""}${p}`, E = qt(e), R = t ?? 0;
2732
+ const T = (B = b == null ? void 0 : b.attachments) == null ? void 0 : B[0];
2733
+ return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2734
+ })(), v = b != null && b.created_at ? sr(new Date(b.created_at)) : "", _ = b ? Ee(b) : !1, R = i ? i(b, p) : `${_ ? "✨ " : ""}${p}`, y = Wt(e), M = t ?? 0;
2706
2735
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2707
2736
  channelId: e == null ? void 0 : e.id,
2708
2737
  isSelected: l,
2709
2738
  participantName: f,
2710
- unreadCount: R,
2711
- hasTimestamp: !!w
2739
+ unreadCount: M,
2740
+ hasTimestamp: !!v
2712
2741
  }), /* @__PURE__ */ n(
2713
2742
  "div",
2714
2743
  {
@@ -2716,7 +2745,7 @@ const un = j.createContext({
2716
2745
  tabIndex: 0,
2717
2746
  onClick: d,
2718
2747
  onKeyDown: m,
2719
- className: y(
2748
+ className: C(
2720
2749
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2721
2750
  {
2722
2751
  "bg-black/[0.04]": l,
@@ -2725,13 +2754,13 @@ const un = j.createContext({
2725
2754
  ),
2726
2755
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
2727
2756
  /* @__PURE__ */ n(
2728
- re,
2757
+ ie,
2729
2758
  {
2730
- id: ((T = u == null ? void 0 : u.user) == null ? void 0 : T.id) || e.id || "unknown",
2759
+ id: ((L = u == null ? void 0 : u.user) == null ? void 0 : L.id) || e.id || "unknown",
2731
2760
  name: f,
2732
2761
  image: c,
2733
2762
  size: 48,
2734
- starred: E
2763
+ starred: y
2735
2764
  }
2736
2765
  ),
2737
2766
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
@@ -2739,20 +2768,20 @@ const un = j.createContext({
2739
2768
  /* @__PURE__ */ h(
2740
2769
  "h3",
2741
2770
  {
2742
- className: y(
2771
+ className: C(
2743
2772
  "text-sm font-medium truncate text-[#191918]"
2744
2773
  ),
2745
2774
  children: [
2746
- E && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2775
+ y && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2747
2776
  f
2748
2777
  ]
2749
2778
  }
2750
2779
  ),
2751
- w && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: w })
2780
+ v && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: v })
2752
2781
  ] }),
2753
2782
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2754
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
2755
- 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 })
2783
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: R }),
2784
+ 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 })
2756
2785
  ] })
2757
2786
  ] })
2758
2787
  ] })
@@ -2760,8 +2789,8 @@ const un = j.createContext({
2760
2789
  );
2761
2790
  }
2762
2791
  );
2763
- mn.displayName = "CustomChannelPreview";
2764
- const ar = { last_message_at: -1 }, rr = j.memo(
2792
+ hn.displayName = "CustomChannelPreview";
2793
+ const ar = { last_message_at: -1 }, rr = U.memo(
2765
2794
  ({
2766
2795
  onChannelSelect: e,
2767
2796
  selectedChannel: t,
@@ -2774,12 +2803,12 @@ const ar = { last_message_at: -1 }, rr = j.memo(
2774
2803
  renderMessagePreview: d,
2775
2804
  viewerLanguage: m
2776
2805
  }) => {
2777
- const g = j.useRef(0);
2806
+ const g = U.useRef(0);
2778
2807
  g.current++;
2779
- const { debug: u = !1 } = We(), f = j.useCallback(
2808
+ const { debug: u = !1 } = Xe(), f = U.useCallback(
2780
2809
  (b) => {
2781
- for (const x of b)
2782
- Qa(x);
2810
+ for (const w of b)
2811
+ Qa(w);
2783
2812
  return r ? r(b) : b;
2784
2813
  },
2785
2814
  [r]
@@ -2789,7 +2818,7 @@ const ar = { last_message_at: -1 }, rr = j.memo(
2789
2818
  selectedChannelId: t == null ? void 0 : t.id,
2790
2819
  filters: s
2791
2820
  });
2792
- const c = j.useMemo(
2821
+ const c = U.useMemo(
2793
2822
  () => ({
2794
2823
  selectedChannel: t,
2795
2824
  onChannelSelect: e,
@@ -2808,20 +2837,20 @@ const ar = { last_message_at: -1 }, rr = j.memo(
2808
2837
  return /* @__PURE__ */ n(
2809
2838
  "div",
2810
2839
  {
2811
- className: y(
2840
+ className: C(
2812
2841
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2813
2842
  o
2814
2843
  ),
2815
2844
  children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: c, children: /* @__PURE__ */ n(
2816
- ds,
2845
+ us,
2817
2846
  {
2818
2847
  filters: s,
2819
2848
  sort: i,
2820
2849
  options: { limit: 30 },
2821
2850
  allowNewMessagesFromUnfilteredChannels: a,
2822
2851
  channelRenderFilterFn: f,
2823
- Paginator: us,
2824
- Preview: mn,
2852
+ Paginator: ms,
2853
+ Preview: hn,
2825
2854
  EmptyStateIndicator: l
2826
2855
  },
2827
2856
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
@@ -2832,7 +2861,7 @@ const ar = { last_message_at: -1 }, rr = j.memo(
2832
2861
  );
2833
2862
  rr.displayName = "ChannelList";
2834
2863
  const ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2835
- function et(e) {
2864
+ function tt(e) {
2836
2865
  if (typeof e != "string") return;
2837
2866
  const t = e.trim();
2838
2867
  if (t === "") return;
@@ -2847,10 +2876,10 @@ const lr = {
2847
2876
  dark: "bg-white text-[#121110] hover:bg-white/90",
2848
2877
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2849
2878
  }, cr = ({ variant: e, cta: t }) => {
2850
- const s = y(
2879
+ const s = C(
2851
2880
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2852
2881
  lr[e]
2853
- ), a = et(t.href);
2882
+ ), a = tt(t.href);
2854
2883
  return a ? /* @__PURE__ */ n(
2855
2884
  "a",
2856
2885
  {
@@ -2882,7 +2911,7 @@ const lr = {
2882
2911
  }, ur = "text-white/30", mr = {
2883
2912
  dark: "text-white/55",
2884
2913
  light: "text-black/55"
2885
- }, tt = ({
2914
+ }, nt = ({
2886
2915
  variant: e,
2887
2916
  title: t,
2888
2917
  placeholderTitle: s,
@@ -2894,10 +2923,10 @@ const lr = {
2894
2923
  }) => {
2895
2924
  const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
2896
2925
  if (!g && !u && !c && !b) return null;
2897
- const p = y(
2926
+ const p = C(
2898
2927
  "truncate text-base font-medium leading-6",
2899
2928
  d && !t ? ur : dr[e]
2900
- ), w = y(
2929
+ ), v = C(
2901
2930
  "truncate text-xs leading-4",
2902
2931
  mr[e]
2903
2932
  );
@@ -2907,17 +2936,17 @@ const lr = {
2907
2936
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2908
2937
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2909
2938
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2910
- /* @__PURE__ */ n("p", { className: y("min-w-0", p), children: m })
2939
+ /* @__PURE__ */ n("p", { className: C("min-w-0", p), children: m })
2911
2940
  ] }),
2912
- u && /* @__PURE__ */ n("p", { className: w, children: a })
2941
+ u && /* @__PURE__ */ n("p", { className: v, children: a })
2913
2942
  ] }),
2914
- !b && c && /* @__PURE__ */ n("p", { className: w, children: f })
2943
+ !b && c && /* @__PURE__ */ n("p", { className: v, children: f })
2915
2944
  ] }),
2916
2945
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2917
2946
  ] }),
2918
2947
  o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
2919
2948
  ] });
2920
- }, hr = y(
2949
+ }, hr = C(
2921
2950
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2922
2951
  // 1px hairline border that sits flush with the card chrome — matches
2923
2952
  // the messaging design system's "small border around link attachments"
@@ -2935,7 +2964,7 @@ const lr = {
2935
2964
  bgClassName: l,
2936
2965
  "data-testid": d
2937
2966
  }) => {
2938
- const m = s != null || a != null, g = y(
2967
+ const m = s != null || a != null, g = C(
2939
2968
  hr,
2940
2969
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2941
2970
  // `focus-ring` is a design-system utility from the component-library
@@ -2966,7 +2995,7 @@ const lr = {
2966
2995
  onClick: a,
2967
2996
  "aria-label": r,
2968
2997
  "data-testid": d,
2969
- className: y(g, "text-left"),
2998
+ className: C(g, "text-left"),
2970
2999
  children: [
2971
3000
  t,
2972
3001
  u
@@ -2990,11 +3019,11 @@ const lr = {
2990
3019
  }, gr = {
2991
3020
  dark: "size-16 text-white/25",
2992
3021
  light: "size-16 text-black/25"
2993
- }, Re = (e, t) => !!t && !!e && se(e) === "audio", hn = (e, t) => {
3022
+ }, Re = (e, t) => !!t && !!e && ae(e) === "audio", fn = (e, t) => {
2994
3023
  if (!t || !e) return !1;
2995
- const s = se(e);
3024
+ const s = ae(e);
2996
3025
  return s === "video" || s === "audio";
2997
- }, nt = "bg-[#F2F3F4]", Te = ({
3026
+ }, st = "bg-[#F2F3F4]", Te = ({
2998
3027
  variant: e,
2999
3028
  thumbnailUrl: t,
3000
3029
  sourceUrl: s,
@@ -3003,7 +3032,7 @@ const lr = {
3003
3032
  topLeft: i,
3004
3033
  topRight: o
3005
3034
  }) => {
3006
- const l = se(r), d = !!s && l === "video";
3035
+ const l = ae(r), d = !!s && l === "video";
3007
3036
  return Re(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3008
3037
  "audio",
3009
3038
  {
@@ -3016,7 +3045,7 @@ const lr = {
3016
3045
  ) }) : /* @__PURE__ */ h(
3017
3046
  "div",
3018
3047
  {
3019
- className: y(
3048
+ className: C(
3020
3049
  "relative h-[180px] w-full overflow-hidden",
3021
3050
  d && "bg-black"
3022
3051
  ),
@@ -3043,7 +3072,7 @@ const lr = {
3043
3072
  ) : /* @__PURE__ */ n(
3044
3073
  "div",
3045
3074
  {
3046
- className: y(
3075
+ className: C(
3047
3076
  "flex h-full w-full items-center justify-center",
3048
3077
  fr[e]
3049
3078
  ),
@@ -3081,17 +3110,17 @@ const lr = {
3081
3110
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3082
3111
  children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
3083
3112
  }
3084
- ) : void 0, x = u ? /* @__PURE__ */ n(
3113
+ ) : void 0, w = u ? /* @__PURE__ */ n(
3085
3114
  "button",
3086
3115
  {
3087
3116
  type: "button",
3088
3117
  onClick: u,
3089
3118
  "aria-label": "Edit attachment",
3090
3119
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3091
- children: /* @__PURE__ */ n(Rs, { className: "size-5", weight: "regular" })
3120
+ children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
3092
3121
  }
3093
3122
  ) : void 0;
3094
- return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: nt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3123
+ return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: st, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3095
3124
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3096
3125
  Te,
3097
3126
  {
@@ -3120,7 +3149,7 @@ const lr = {
3120
3149
  }
3121
3150
  ),
3122
3151
  /* @__PURE__ */ n(
3123
- tt,
3152
+ nt,
3124
3153
  {
3125
3154
  variant: "dark",
3126
3155
  title: e,
@@ -3129,7 +3158,7 @@ const lr = {
3129
3158
  url: a,
3130
3159
  appIcon: d,
3131
3160
  cta: m,
3132
- trailingAction: x
3161
+ trailingAction: w
3133
3162
  }
3134
3163
  )
3135
3164
  ]
@@ -3147,7 +3176,7 @@ const lr = {
3147
3176
  cta: d,
3148
3177
  onClick: m
3149
3178
  }) => {
3150
- const g = hn(a, i), u = et(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Re(a, i) ? nt : void 0, x = d && m ? {
3179
+ const g = fn(a, i), u = tt(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Re(a, i) ? st : void 0, w = d && m ? {
3151
3180
  ...d,
3152
3181
  onClick: () => {
3153
3182
  var p;
@@ -3175,14 +3204,14 @@ const lr = {
3175
3204
  }
3176
3205
  ),
3177
3206
  /* @__PURE__ */ n(
3178
- tt,
3207
+ nt,
3179
3208
  {
3180
3209
  variant: "light",
3181
3210
  title: e,
3182
3211
  description: t,
3183
3212
  url: s,
3184
3213
  appIcon: l,
3185
- cta: x
3214
+ cta: w
3186
3215
  }
3187
3216
  )
3188
3217
  ]
@@ -3201,14 +3230,14 @@ const lr = {
3201
3230
  cta: m,
3202
3231
  onClick: g
3203
3232
  }) => {
3204
- const u = hn(r, o), f = et(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3233
+ const u = fn(r, o), f = tt(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3205
3234
  return /* @__PURE__ */ h(
3206
3235
  Ie,
3207
3236
  {
3208
3237
  variant: "dark",
3209
3238
  href: c,
3210
3239
  onClick: b,
3211
- bgClassName: Re(r, o) ? nt : void 0,
3240
+ bgClassName: Re(r, o) ? st : void 0,
3212
3241
  children: [
3213
3242
  l === "featured" && /* @__PURE__ */ n(
3214
3243
  Te,
@@ -3221,7 +3250,7 @@ const lr = {
3221
3250
  }
3222
3251
  ),
3223
3252
  /* @__PURE__ */ n(
3224
- tt,
3253
+ nt,
3225
3254
  {
3226
3255
  variant: "dark",
3227
3256
  title: e,
@@ -3276,7 +3305,7 @@ const lr = {
3276
3305
  {
3277
3306
  "data-testid": o,
3278
3307
  "data-group-position": a,
3279
- className: y(
3308
+ className: C(
3280
3309
  // 280px-wide bubble — matches the mobile chat attachment width
3281
3310
  // and keeps the document / image / audio bubbles visually
3282
3311
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3296,7 +3325,7 @@ const lr = {
3296
3325
  l ? /* @__PURE__ */ n(
3297
3326
  "p",
3298
3327
  {
3299
- className: y(
3328
+ className: C(
3300
3329
  // No `text-*` / `font-*` overrides here — caption inherits
3301
3330
  // the same font family + size as `.str-chat__message-text`
3302
3331
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3325,7 +3354,7 @@ const lr = {
3325
3354
  a.stopPropagation(), e();
3326
3355
  },
3327
3356
  "aria-label": s,
3328
- className: y(
3357
+ className: C(
3329
3358
  "flex size-6 items-center justify-center rounded-full text-white",
3330
3359
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3331
3360
  ),
@@ -3352,7 +3381,7 @@ const lr = {
3352
3381
  }
3353
3382
  ),
3354
3383
  s ?? null
3355
- ] }), st = ({
3384
+ ] }), at = ({
3356
3385
  state: e,
3357
3386
  src: t,
3358
3387
  mimeType: s,
@@ -3389,7 +3418,7 @@ const lr = {
3389
3418
  )) })
3390
3419
  }
3391
3420
  );
3392
- }, Er = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Tr = {
3421
+ }, Er = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), Tr = {
3393
3422
  Composer: Er,
3394
3423
  Sent: Sr,
3395
3424
  Received: Ir
@@ -3416,8 +3445,8 @@ function Rr(e, t) {
3416
3445
  }
3417
3446
  }
3418
3447
  if (!e) return;
3419
- if (se(e) === "document") {
3420
- const r = Zt(e), i = Mr[r];
3448
+ if (ae(e) === "document") {
3449
+ const r = Qt(e), i = Mr[r];
3421
3450
  if (i) return i;
3422
3451
  if (e === "application/octet-stream") return;
3423
3452
  }
@@ -3440,13 +3469,13 @@ function Q(e) {
3440
3469
  const Dr = {
3441
3470
  dark: "text-white/55",
3442
3471
  light: "text-black/65"
3443
- }, Pr = {
3472
+ }, Or = {
3444
3473
  dark: "bg-white/10",
3445
3474
  light: "bg-black/5"
3446
- }, Or = {
3475
+ }, Pr = {
3447
3476
  dark: "text-white/85",
3448
3477
  light: "text-black/85"
3449
- }, fn = ({
3478
+ }, gn = ({
3450
3479
  variant: e,
3451
3480
  filename: t,
3452
3481
  title: s,
@@ -3459,13 +3488,13 @@ const Dr = {
3459
3488
  const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
3460
3489
  "div",
3461
3490
  {
3462
- className: y(
3491
+ className: C(
3463
3492
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3464
- Pr[e]
3493
+ Or[e]
3465
3494
  ),
3466
3495
  "aria-hidden": !0,
3467
3496
  children: ce(a, {
3468
- className: y("size-6", Or[e]),
3497
+ className: C("size-6", Pr[e]),
3469
3498
  weight: "regular"
3470
3499
  })
3471
3500
  }
@@ -3474,7 +3503,7 @@ const Dr = {
3474
3503
  m ? /* @__PURE__ */ n(
3475
3504
  "p",
3476
3505
  {
3477
- className: y(
3506
+ className: C(
3478
3507
  "truncate text-xs leading-4",
3479
3508
  Dr[e]
3480
3509
  ),
@@ -3487,7 +3516,7 @@ const Dr = {
3487
3516
  type: "button",
3488
3517
  onClick: i,
3489
3518
  "aria-label": o,
3490
- className: y(
3519
+ className: C(
3491
3520
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3492
3521
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3493
3522
  ),
@@ -3496,7 +3525,7 @@ const Dr = {
3496
3525
  u
3497
3526
  ]
3498
3527
  }
3499
- ) : /* @__PURE__ */ h(ne, { children: [
3528
+ ) : /* @__PURE__ */ h(se, { children: [
3500
3529
  g,
3501
3530
  u
3502
3531
  ] });
@@ -3505,7 +3534,7 @@ const Dr = {
3505
3534
  l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
3506
3535
  ] });
3507
3536
  };
3508
- async function gn(e, t) {
3537
+ async function bn(e, t) {
3509
3538
  const s = t ?? Q(e);
3510
3539
  try {
3511
3540
  const a = await fetch(e, { mode: "cors" });
@@ -3535,7 +3564,7 @@ const zr = ({
3535
3564
  }) => {
3536
3565
  const i = t.filename ?? Q(t.src);
3537
3566
  return /* @__PURE__ */ n(
3538
- fn,
3567
+ gn,
3539
3568
  {
3540
3569
  variant: e,
3541
3570
  filename: i,
@@ -3547,7 +3576,7 @@ const zr = ({
3547
3576
  trailingAction: r
3548
3577
  }
3549
3578
  );
3550
- }, at = ({
3579
+ }, rt = ({
3551
3580
  state: e,
3552
3581
  src: t,
3553
3582
  filename: s,
@@ -3569,17 +3598,17 @@ const zr = ({
3569
3598
  items: o
3570
3599
  }), b = (p) => {
3571
3600
  if ((m == null ? void 0 : m(p)) === !1) return;
3572
- const w = c[p];
3573
- if (!w) return;
3574
- const _ = w.filename ?? Q(w.src);
3575
- gn(w.src, _);
3601
+ const v = c[p];
3602
+ if (!v) return;
3603
+ const _ = v.filename ?? Q(v.src);
3604
+ bn(v.src, _);
3576
3605
  };
3577
3606
  if (c.length === 0)
3578
3607
  return null;
3579
- const x = /* @__PURE__ */ n(
3608
+ const w = /* @__PURE__ */ n(
3580
3609
  "span",
3581
3610
  {
3582
- className: y(
3611
+ className: C(
3583
3612
  "flex size-8 items-center justify-center rounded-full",
3584
3613
  u === "dark" ? "text-white/70" : "text-black/70"
3585
3614
  ),
@@ -3594,29 +3623,29 @@ const zr = ({
3594
3623
  text: l,
3595
3624
  groupPosition: d,
3596
3625
  "data-testid": "file-attachment",
3597
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((p, w) => /* @__PURE__ */ n(
3626
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((p, v) => /* @__PURE__ */ n(
3598
3627
  $r,
3599
3628
  {
3600
3629
  variant: u,
3601
3630
  item: p,
3602
- index: w,
3631
+ index: v,
3603
3632
  onActivate: b,
3604
- trailingAction: f && w === 0 ? /* @__PURE__ */ n(_e, { onClick: g, variant: "inline" }) : x
3633
+ trailingAction: f && v === 0 ? /* @__PURE__ */ n(_e, { onClick: g, variant: "inline" }) : w
3605
3634
  },
3606
- `${p.src}-${w}`
3635
+ `${p.src}-${v}`
3607
3636
  )) })
3608
3637
  }
3609
3638
  );
3610
- }, Fr = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), jr = {
3639
+ }, Fr = (e) => /* @__PURE__ */ n(rt, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(rt, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(rt, { ...e, state: "received" }), jr = {
3611
3640
  Composer: Fr,
3612
3641
  Sent: Br,
3613
3642
  Received: Ur
3614
- }, rt = ({
3643
+ }, it = ({
3615
3644
  onPrev: e,
3616
3645
  onNext: t,
3617
3646
  prevLabel: s = "Previous",
3618
3647
  nextLabel: a = "Next"
3619
- }) => /* @__PURE__ */ h(ne, { children: [
3648
+ }) => /* @__PURE__ */ h(se, { children: [
3620
3649
  /* @__PURE__ */ n(
3621
3650
  "button",
3622
3651
  {
@@ -3624,7 +3653,7 @@ const zr = ({
3624
3653
  onClick: e,
3625
3654
  "aria-label": s,
3626
3655
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3627
- children: /* @__PURE__ */ n(Ls, { size: 20, weight: "bold", "aria-hidden": !0 })
3656
+ children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
3628
3657
  }
3629
3658
  ),
3630
3659
  /* @__PURE__ */ n(
@@ -3634,10 +3663,10 @@ const zr = ({
3634
3663
  onClick: t,
3635
3664
  "aria-label": a,
3636
3665
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3637
- children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
3666
+ children: /* @__PURE__ */ n(Ve, { size: 20, weight: "bold", "aria-hidden": !0 })
3638
3667
  }
3639
3668
  )
3640
- ] }), bn = ({
3669
+ ] }), pn = ({
3641
3670
  url: e,
3642
3671
  filename: t,
3643
3672
  variant: s = "pill",
@@ -3646,15 +3675,15 @@ const zr = ({
3646
3675
  tone: i = "dark",
3647
3676
  onTriggered: o
3648
3677
  }) => {
3649
- const [l, d] = P(!1), m = X(
3678
+ const [l, d] = z(!1), m = J(
3650
3679
  (c) => {
3651
- c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
3680
+ c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
3652
3681
  }).finally(() => {
3653
3682
  d(!1), o == null || o();
3654
3683
  }));
3655
3684
  },
3656
3685
  [l, e, t, o]
3657
- ), g = r ?? s !== "pill", f = { className: y(
3686
+ ), g = r ?? s !== "pill", f = { className: C(
3658
3687
  s === "pill" ? "size-4" : "size-5",
3659
3688
  "shrink-0"
3660
3689
  ), weight: "bold" };
@@ -3665,7 +3694,7 @@ const zr = ({
3665
3694
  onClick: m,
3666
3695
  disabled: l,
3667
3696
  "aria-label": a,
3668
- className: y(
3697
+ className: C(
3669
3698
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3670
3699
  {
3671
3700
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3705,7 +3734,7 @@ const zr = ({
3705
3734
  onClick: m,
3706
3735
  disabled: l,
3707
3736
  "aria-label": g ? a : void 0,
3708
- className: y(
3737
+ className: C(
3709
3738
  "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",
3710
3739
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3711
3740
  ),
@@ -3722,23 +3751,23 @@ const zr = ({
3722
3751
  ]
3723
3752
  }
3724
3753
  );
3725
- }, Fe = (e, t, s) => Math.min(Math.max(e, t), s), it = ({
3754
+ }, Fe = (e, t, s) => Math.min(Math.max(e, t), s), ot = ({
3726
3755
  length: e,
3727
3756
  initialIndex: t,
3728
3757
  open: s
3729
3758
  }) => {
3730
- const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = P(a);
3731
- Y(() => {
3759
+ const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = z(a);
3760
+ X(() => {
3732
3761
  s && i(Fe(t, 0, Math.max(e - 1, 0)));
3733
- }, [s, t, e]), Y(() => {
3762
+ }, [s, t, e]), X(() => {
3734
3763
  i((d) => Fe(d, 0, Math.max(e - 1, 0)));
3735
3764
  }, [e]);
3736
- const o = X(() => {
3765
+ const o = J(() => {
3737
3766
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3738
- }, [e]), l = X(() => {
3767
+ }, [e]), l = J(() => {
3739
3768
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3740
3769
  }, [e]);
3741
- return Y(() => {
3770
+ return X(() => {
3742
3771
  if (!s || e <= 1) return;
3743
3772
  const d = (m) => {
3744
3773
  if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
@@ -3747,7 +3776,7 @@ const zr = ({
3747
3776
  };
3748
3777
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3749
3778
  }, [s, e, o, l]), { index: r, prev: o, next: l };
3750
- }, ot = ({
3779
+ }, lt = ({
3751
3780
  open: e,
3752
3781
  onClose: t,
3753
3782
  ariaLabel: s,
@@ -3756,8 +3785,8 @@ const zr = ({
3756
3785
  children: i,
3757
3786
  "data-testid": o
3758
3787
  }) => {
3759
- const l = V(null), d = V(null);
3760
- return Y(() => {
3788
+ const l = j(null), d = j(null);
3789
+ return X(() => {
3761
3790
  var f;
3762
3791
  const u = l.current;
3763
3792
  if (u) {
@@ -3837,29 +3866,29 @@ const zr = ({
3837
3866
  ]
3838
3867
  }
3839
3868
  );
3840
- }, pn = ({
3869
+ }, vn = ({
3841
3870
  open: e,
3842
3871
  items: t,
3843
3872
  initialIndex: s = 0,
3844
3873
  onClose: a
3845
3874
  }) => {
3846
- const { index: r, prev: i, next: o } = it({
3875
+ const { index: r, prev: i, next: o } = ot({
3847
3876
  length: t.length,
3848
3877
  initialIndex: s,
3849
3878
  open: e
3850
- }), l = t[r], d = te(
3879
+ }), l = t[r], d = ne(
3851
3880
  () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "image"),
3852
3881
  [l]
3853
3882
  );
3854
3883
  return l ? /* @__PURE__ */ h(
3855
- ot,
3884
+ lt,
3856
3885
  {
3857
3886
  open: e,
3858
3887
  onClose: a,
3859
3888
  ariaLabel: d,
3860
3889
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
3861
3890
  actions: /* @__PURE__ */ n(
3862
- bn,
3891
+ pn,
3863
3892
  {
3864
3893
  url: l.src,
3865
3894
  filename: d,
@@ -3882,7 +3911,7 @@ const zr = ({
3882
3911
  `${r}:${l.src}`
3883
3912
  ),
3884
3913
  t.length > 1 ? /* @__PURE__ */ n(
3885
- rt,
3914
+ it,
3886
3915
  {
3887
3916
  onPrev: i,
3888
3917
  onNext: o,
@@ -3893,7 +3922,7 @@ const zr = ({
3893
3922
  ]
3894
3923
  }
3895
3924
  ) : null;
3896
- }, Vr = "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 = ({
3925
+ }, Vr = "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", xn = ({
3897
3926
  tiles: e,
3898
3927
  onTileActivate: t,
3899
3928
  maxVisible: s = 4,
@@ -3902,14 +3931,14 @@ const zr = ({
3902
3931
  const r = e.length;
3903
3932
  if (r === 0) return null;
3904
3933
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
3905
- const u = y(Vr, "h-full w-full");
3934
+ const u = C(Vr, "h-full w-full");
3906
3935
  return t ? /* @__PURE__ */ h(
3907
3936
  "button",
3908
3937
  {
3909
3938
  type: "button",
3910
3939
  onClick: () => t(m),
3911
3940
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3912
- className: y(u, "cursor-zoom-in"),
3941
+ className: C(u, "cursor-zoom-in"),
3913
3942
  children: [
3914
3943
  d.content,
3915
3944
  g
@@ -3921,10 +3950,10 @@ const zr = ({
3921
3950
  g
3922
3951
  ] }, m);
3923
3952
  };
3924
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3953
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3925
3954
  "div",
3926
3955
  {
3927
- className: y(
3956
+ className: C(
3928
3957
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3929
3958
  a
3930
3959
  ),
@@ -3933,7 +3962,7 @@ const zr = ({
3933
3962
  ) : i.length === 3 ? /* @__PURE__ */ h(
3934
3963
  "div",
3935
3964
  {
3936
- className: y(
3965
+ className: C(
3937
3966
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3938
3967
  a
3939
3968
  ),
@@ -3946,7 +3975,7 @@ const zr = ({
3946
3975
  ) : /* @__PURE__ */ n(
3947
3976
  "div",
3948
3977
  {
3949
- className: y(
3978
+ className: C(
3950
3979
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3951
3980
  a
3952
3981
  ),
@@ -3964,12 +3993,12 @@ const zr = ({
3964
3993
  }
3965
3994
  );
3966
3995
  }, ye = (e) => {
3967
- const [t, s] = P(!1), [a, r] = P(0), i = X(
3996
+ const [t, s] = z(!1), [a, r] = z(0), i = J(
3968
3997
  (l) => {
3969
3998
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
3970
3999
  },
3971
4000
  [e]
3972
- ), o = X(() => s(!1), []);
4001
+ ), o = J(() => s(!1), []);
3973
4002
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
3974
4003
  }, Gr = (e, t, s, a) => ({
3975
4004
  ariaLabel: `Open image ${t + 1} of ${s}`,
@@ -3990,7 +4019,7 @@ const zr = ({
3990
4019
  src: e,
3991
4020
  alt: t,
3992
4021
  items: s
3993
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], xn = (e, t) => e.map((s, a) => ({
4022
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], wn = (e, t) => e.map((s, a) => ({
3994
4023
  src: s.src,
3995
4024
  alt: s.alt,
3996
4025
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
@@ -4021,16 +4050,16 @@ const zr = ({
4021
4050
  ),
4022
4051
  i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(_e, { onClick: i }) }) : null,
4023
4052
  /* @__PURE__ */ n(
4024
- pn,
4053
+ vn,
4025
4054
  {
4026
4055
  open: o,
4027
- items: xn([{ src: e, alt: t }], s),
4056
+ items: wn([{ src: e, alt: t }], s),
4028
4057
  initialIndex: l,
4029
4058
  onClose: m
4030
4059
  }
4031
4060
  )
4032
4061
  ] });
4033
- }, wn = ({
4062
+ }, _n = ({
4034
4063
  state: e,
4035
4064
  src: t,
4036
4065
  alt: s,
@@ -4046,8 +4075,8 @@ const zr = ({
4046
4075
  );
4047
4076
  if (m.length === 0)
4048
4077
  return null;
4049
- const x = m.map(
4050
- (p, w) => Gr(p, w, m.length, l)
4078
+ const w = m.map(
4079
+ (p, v) => Gr(p, v, m.length, l)
4051
4080
  );
4052
4081
  return /* @__PURE__ */ h(
4053
4082
  we,
@@ -4057,12 +4086,12 @@ const zr = ({
4057
4086
  groupPosition: o,
4058
4087
  "data-testid": "image-attachment",
4059
4088
  children: [
4060
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(vn, { tiles: x, onTileActivate: c }) }),
4089
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: w, onTileActivate: c }) }),
4061
4090
  /* @__PURE__ */ n(
4062
- pn,
4091
+ vn,
4063
4092
  {
4064
4093
  open: u,
4065
- items: xn(m, a),
4094
+ items: wn(m, a),
4066
4095
  initialIndex: f,
4067
4096
  onClose: b
4068
4097
  }
@@ -4070,7 +4099,7 @@ const zr = ({
4070
4099
  ]
4071
4100
  }
4072
4101
  );
4073
- }, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Kr = {
4102
+ }, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Kr = {
4074
4103
  Composer: qr,
4075
4104
  Sent: Wr,
4076
4105
  Received: Xr
@@ -4080,19 +4109,19 @@ const zr = ({
4080
4109
  initialIndex: s = 0,
4081
4110
  onClose: a
4082
4111
  }) => {
4083
- const { index: r, prev: i, next: o } = it({
4112
+ const { index: r, prev: i, next: o } = ot({
4084
4113
  length: t.length,
4085
4114
  initialIndex: s,
4086
4115
  open: e
4087
- }), l = t[r], d = te(
4116
+ }), l = t[r], d = ne(
4088
4117
  () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "document"),
4089
4118
  [l]
4090
- ), m = te(
4119
+ ), m = ne(
4091
4120
  () => l ? Zr(l.src) : void 0,
4092
4121
  [l]
4093
4122
  );
4094
4123
  return !l || !m ? null : /* @__PURE__ */ h(
4095
- ot,
4124
+ lt,
4096
4125
  {
4097
4126
  open: e,
4098
4127
  onClose: a,
@@ -4111,7 +4140,7 @@ const zr = ({
4111
4140
  `${r}:${l.src}`
4112
4141
  ),
4113
4142
  t.length > 1 ? /* @__PURE__ */ n(
4114
- rt,
4143
+ it,
4115
4144
  {
4116
4145
  onPrev: i,
4117
4146
  onNext: o,
@@ -4140,7 +4169,7 @@ const zr = ({
4140
4169
  }) => {
4141
4170
  const i = t.filename ?? Q(t.src);
4142
4171
  return /* @__PURE__ */ n(
4143
- fn,
4172
+ gn,
4144
4173
  {
4145
4174
  variant: e,
4146
4175
  filename: i,
@@ -4152,7 +4181,7 @@ const zr = ({
4152
4181
  trailingAction: r
4153
4182
  }
4154
4183
  );
4155
- }, lt = ({
4184
+ }, ct = ({
4156
4185
  state: e,
4157
4186
  src: t,
4158
4187
  filename: s,
@@ -4164,12 +4193,12 @@ const zr = ({
4164
4193
  onClick: d,
4165
4194
  onDismiss: m
4166
4195
  }) => {
4167
- const g = Ne(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: x } = ye(
4196
+ const g = Ne(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = ye(
4168
4197
  d
4169
4198
  ), p = e === "composer" && !!m;
4170
4199
  if (u.length === 0)
4171
4200
  return null;
4172
- const w = u.map((_) => ({
4201
+ const v = u.map((_) => ({
4173
4202
  src: _.src,
4174
4203
  filename: _.filename ?? Q(_.src)
4175
4204
  }));
@@ -4181,14 +4210,14 @@ const zr = ({
4181
4210
  groupPosition: l,
4182
4211
  "data-testid": "pdf-attachment",
4183
4212
  children: [
4184
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((_, I) => {
4185
- const E = _.filename ?? Q(_.src), R = p && I === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4186
- bn,
4213
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((_, R) => {
4214
+ const y = _.filename ?? Q(_.src), M = p && R === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4215
+ pn,
4187
4216
  {
4188
4217
  url: _.src,
4189
- filename: E,
4218
+ filename: y,
4190
4219
  variant: "inline",
4191
- label: `Download ${E}`,
4220
+ label: `Download ${y}`,
4192
4221
  tone: g
4193
4222
  }
4194
4223
  );
@@ -4197,45 +4226,45 @@ const zr = ({
4197
4226
  {
4198
4227
  variant: g,
4199
4228
  item: _,
4200
- index: I,
4229
+ index: R,
4201
4230
  onActivate: b,
4202
- trailingAction: R
4231
+ trailingAction: M
4203
4232
  },
4204
- `${_.src}-${I}`
4233
+ `${_.src}-${R}`
4205
4234
  );
4206
4235
  }) }),
4207
4236
  /* @__PURE__ */ n(
4208
4237
  Jr,
4209
4238
  {
4210
4239
  open: f,
4211
- items: w,
4240
+ items: v,
4212
4241
  initialIndex: c,
4213
- onClose: x
4242
+ onClose: w
4214
4243
  }
4215
4244
  )
4216
4245
  ]
4217
4246
  }
4218
4247
  );
4219
- }, ti = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), ai = {
4248
+ }, ti = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), ai = {
4220
4249
  Composer: ti,
4221
4250
  Sent: ni,
4222
4251
  Received: si
4223
- }, _n = ({
4252
+ }, Nn = ({
4224
4253
  open: e,
4225
4254
  items: t,
4226
4255
  initialIndex: s = 0,
4227
4256
  onClose: a
4228
4257
  }) => {
4229
- const { index: r, prev: i, next: o } = it({
4258
+ const { index: r, prev: i, next: o } = ot({
4230
4259
  length: t.length,
4231
4260
  initialIndex: s,
4232
4261
  open: e
4233
- }), l = t[r], d = te(
4262
+ }), l = t[r], d = ne(
4234
4263
  () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "video"),
4235
4264
  [l]
4236
4265
  );
4237
4266
  return l ? /* @__PURE__ */ h(
4238
- ot,
4267
+ lt,
4239
4268
  {
4240
4269
  open: e,
4241
4270
  onClose: a,
@@ -4259,7 +4288,7 @@ const zr = ({
4259
4288
  `${r}:${l.src}`
4260
4289
  ),
4261
4290
  t.length > 1 ? /* @__PURE__ */ n(
4262
- rt,
4291
+ it,
4263
4292
  {
4264
4293
  onPrev: i,
4265
4294
  onNext: o,
@@ -4270,7 +4299,7 @@ const zr = ({
4270
4299
  ]
4271
4300
  }
4272
4301
  ) : null;
4273
- }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Ue, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Nn = ({
4302
+ }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Ue, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), yn = ({
4274
4303
  item: e,
4275
4304
  index: t
4276
4305
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4285,7 +4314,7 @@ const zr = ({
4285
4314
  className: "absolute inset-0 size-full rounded-md object-cover"
4286
4315
  }
4287
4316
  ) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
4288
- Gt,
4317
+ Ht,
4289
4318
  {
4290
4319
  className: "size-16 rounded-md text-white/30",
4291
4320
  weight: "regular",
@@ -4295,14 +4324,14 @@ const zr = ({
4295
4324
  /* @__PURE__ */ n(ri, {})
4296
4325
  ] }), ii = (e, t, s) => ({
4297
4326
  ariaLabel: `Play video ${t + 1} of ${s}`,
4298
- content: /* @__PURE__ */ n(Nn, { item: e, index: t })
4327
+ content: /* @__PURE__ */ n(yn, { item: e, index: t })
4299
4328
  }), oi = ({
4300
4329
  src: e,
4301
4330
  poster: t,
4302
4331
  mimeType: s,
4303
4332
  preload: a,
4304
4333
  items: r
4305
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], yn = (e, t) => e.map((s, a) => ({
4334
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Cn = (e, t) => e.map((s, a) => ({
4306
4335
  src: s.src,
4307
4336
  poster: s.poster,
4308
4337
  mimeType: s.mimeType,
@@ -4320,15 +4349,15 @@ const zr = ({
4320
4349
  onClick: () => m(0),
4321
4350
  "aria-label": "Play video",
4322
4351
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
4323
- children: /* @__PURE__ */ n(Nn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4352
+ children: /* @__PURE__ */ n(yn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4324
4353
  }
4325
4354
  ),
4326
4355
  o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(_e, { onClick: o }) }) : null,
4327
4356
  /* @__PURE__ */ n(
4328
- _n,
4357
+ Nn,
4329
4358
  {
4330
4359
  open: l,
4331
- items: yn(
4360
+ items: Cn(
4332
4361
  [{ src: e, poster: t, mimeType: s, preload: r }],
4333
4362
  a
4334
4363
  ),
@@ -4337,7 +4366,7 @@ const zr = ({
4337
4366
  }
4338
4367
  )
4339
4368
  ] });
4340
- }, Cn = ({
4369
+ }, kn = ({
4341
4370
  state: e,
4342
4371
  src: t,
4343
4372
  poster: s,
@@ -4349,13 +4378,13 @@ const zr = ({
4349
4378
  preload: d,
4350
4379
  onClick: m
4351
4380
  }) => {
4352
- const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: x } = ye(
4381
+ const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = ye(
4353
4382
  m
4354
4383
  );
4355
4384
  if (g.length === 0)
4356
4385
  return null;
4357
4386
  const p = g.map(
4358
- (w, _) => ii(w, _, g.length)
4387
+ (v, _) => ii(v, _, g.length)
4359
4388
  );
4360
4389
  return /* @__PURE__ */ h(
4361
4390
  we,
@@ -4366,7 +4395,7 @@ const zr = ({
4366
4395
  "data-testid": "video-attachment",
4367
4396
  children: [
4368
4397
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4369
- vn,
4398
+ xn,
4370
4399
  {
4371
4400
  tiles: p,
4372
4401
  onTileActivate: b,
@@ -4374,18 +4403,18 @@ const zr = ({
4374
4403
  }
4375
4404
  ) }),
4376
4405
  /* @__PURE__ */ n(
4377
- _n,
4406
+ Nn,
4378
4407
  {
4379
4408
  open: f,
4380
- items: yn(g, r),
4409
+ items: Cn(g, r),
4381
4410
  initialIndex: c,
4382
- onClose: x
4411
+ onClose: w
4383
4412
  }
4384
4413
  )
4385
4414
  ]
4386
4415
  }
4387
4416
  );
4388
- }, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), mi = {
4417
+ }, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), mi = {
4389
4418
  Composer: ci,
4390
4419
  Sent: di,
4391
4420
  Received: ui
@@ -4407,7 +4436,7 @@ const zr = ({
4407
4436
  onClick: t,
4408
4437
  disabled: s,
4409
4438
  style: { backgroundColor: "#E6E5E3" },
4410
- className: y(
4439
+ className: C(
4411
4440
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4412
4441
  {
4413
4442
  "hover:brightness-95 active:brightness-90": !s,
@@ -4429,7 +4458,7 @@ const zr = ({
4429
4458
  const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4430
4459
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4431
4460
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4432
- re,
4461
+ ie,
4433
4462
  {
4434
4463
  id: o || "account",
4435
4464
  name: o || "Account",
@@ -4460,21 +4489,21 @@ const zr = ({
4460
4489
  ] }) });
4461
4490
  };
4462
4491
  export {
4463
- Qt as A,
4492
+ en as A,
4464
4493
  Hs as B,
4465
4494
  Xa as C,
4466
- Os as D,
4495
+ Ps as D,
4467
4496
  Ti as F,
4468
4497
  Ei as L,
4469
4498
  yi as M,
4470
4499
  ge as a,
4471
- re as b,
4500
+ ie as b,
4472
4501
  rr as c,
4473
- dn as d,
4502
+ un as d,
4474
4503
  Ci as e,
4475
4504
  hi as f,
4476
- se as g,
4477
- Ot as h,
4505
+ ae as g,
4506
+ zt as h,
4478
4507
  Ii as i,
4479
4508
  Ca as j,
4480
4509
  Ni as k,
@@ -4483,15 +4512,15 @@ export {
4483
4512
  Ar as n,
4484
4513
  sr as o,
4485
4514
  Rr as p,
4486
- Xt as q,
4515
+ Kt as q,
4487
4516
  ce as r,
4488
- nn as s,
4517
+ sn as s,
4489
4518
  $s as t,
4490
4519
  Si as u,
4491
4520
  Ys as v,
4492
- Ze as w,
4493
- Qe as x,
4494
- Wt as y,
4521
+ Qe as w,
4522
+ et as x,
4523
+ Xt as y,
4495
4524
  va as z
4496
4525
  };
4497
- //# sourceMappingURL=index-BHFdqj7Z.js.map
4526
+ //# sourceMappingURL=index-DKq7HA0h.js.map