@linktr.ee/messaging-react 3.4.0-rc-1782387968 → 3.4.0-rc-1782392622

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 (37) hide show
  1. package/dist/{Card-BOD2Qo_b.js → Card-BKd0E-B9.js} +3 -3
  2. package/dist/{Card-BOD2Qo_b.js.map → Card-BKd0E-B9.js.map} +1 -1
  3. package/dist/{Card-utKbCGom.cjs → Card-CdaZxDEx.cjs} +2 -2
  4. package/dist/{Card-utKbCGom.cjs.map → Card-CdaZxDEx.cjs.map} +1 -1
  5. package/dist/{Card-DcEBssw0.js → Card-CrTBu2I6.js} +2 -2
  6. package/dist/{Card-DcEBssw0.js.map → Card-CrTBu2I6.js.map} +1 -1
  7. package/dist/{Card-DkNdLpVE.cjs → Card-DXWp0uwi.cjs} +2 -2
  8. package/dist/{Card-DkNdLpVE.cjs.map → Card-DXWp0uwi.cjs.map} +1 -1
  9. package/dist/{Card-UbPYWjnX.cjs → Card-DaalkoQW.cjs} +2 -2
  10. package/dist/{Card-UbPYWjnX.cjs.map → Card-DaalkoQW.cjs.map} +1 -1
  11. package/dist/{Card-beoX9cug.js → Card-XVTz8IYz.js} +2 -2
  12. package/dist/{Card-beoX9cug.js.map → Card-XVTz8IYz.js.map} +1 -1
  13. package/dist/{LockedThumbnail-Bjdf-fTw.cjs → LockedThumbnail-D3Xwdb5_.cjs} +2 -2
  14. package/dist/{LockedThumbnail-Bjdf-fTw.cjs.map → LockedThumbnail-D3Xwdb5_.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-bOjjYYyV.js → LockedThumbnail-D_44b-Uy.js} +2 -2
  16. package/dist/{LockedThumbnail-bOjjYYyV.js.map → LockedThumbnail-D_44b-Uy.js.map} +1 -1
  17. package/dist/index-Cds2w5zi.cjs +2 -0
  18. package/dist/index-Cds2w5zi.cjs.map +1 -0
  19. package/dist/{index-DG5LOHey.js → index-DPGZRLRM.js} +998 -973
  20. package/dist/index-DPGZRLRM.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +11 -19
  23. package/dist/index.js +19 -20
  24. package/package.json +2 -2
  25. package/src/components/ChannelList/CustomChannelPreview.test.tsx +0 -38
  26. package/src/components/ChannelList/CustomChannelPreview.tsx +6 -5
  27. package/src/components/ChannelView.stories.tsx +16 -0
  28. package/src/components/ChannelView.test.tsx +20 -35
  29. package/src/components/ChannelView.tsx +55 -17
  30. package/src/components/MessagingShell/index.tsx +2 -0
  31. package/src/index.ts +0 -2
  32. package/src/stream-custom-data.ts +0 -8
  33. package/src/types.ts +12 -0
  34. package/dist/index-B3oQq9zK.cjs +0 -2
  35. package/dist/index-B3oQq9zK.cjs.map +0 -1
  36. package/dist/index-DG5LOHey.js.map +0 -1
  37. package/src/components/VerifiedBadge/index.tsx +0 -25
@@ -1,11 +1,11 @@
1
- import { jsx as n, jsxs as h, Fragment as ne } from "react/jsx-runtime";
2
- import U, { createContext as Ye, useContext as Ae, useCallback as J, useState as z, useRef as G, useEffect as X, useId as Sn, useMemo as te, Suspense as qe } from "react";
1
+ import { jsx as n, jsxs as h, Fragment as ae } from "react/jsx-runtime";
2
+ import j, { createContext as Ye, useContext as Ae, useCallback as K, useState as $, useRef as G, useEffect as X, useId as Sn, useMemo as se, Suspense as qe } from "react";
3
3
  import { StreamChatService as In } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Tn, LinkPreviewsManager as At } from "stream-chat";
5
- import { Chat as An, DateSeparator as Mn, useChannelStateContext as ce, useChatContext as We, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as jt, Attachment as Dn, EditMessageModal as Pn, MessageBlocked as On, 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 Pe, 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, SealCheckIcon as Ls, ArrowLeftIcon as Lt, PencilSimpleIcon as Ds, CaretLeftIcon as Ps, CaretRightIcon as Os } from "@phosphor-icons/react";
7
- import k from "classnames";
8
- import { MessageActions as zs, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
5
+ import { Chat as An, DateSeparator as Mn, useChannelStateContext as ce, 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 N from "classnames";
8
+ import { MessageActions as Os, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
9
9
  const qt = Ye({
10
10
  service: null,
11
11
  client: null,
@@ -16,7 +16,7 @@ const qt = Ye({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), Xe = () => Ae(qt), Ci = ({
19
+ }), Xe = () => Ae(qt), Ni = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,10 +24,10 @@ const qt = Ye({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var A, S;
28
- const o = J(
29
- (I, ...E) => {
30
- i && console.log(`🔥 [MessagingProvider] ${I}`, ...E);
27
+ var D, C;
28
+ const o = K(
29
+ (I, ...T) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${I}`, ...T);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,18 +37,18 @@ const qt = Ye({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, w] = z(!1), [b, p] = z(null), v = G(!1), _ = G(null), L = G(s);
41
- L.current = s;
42
- const T = G(i);
43
- T.current = i;
40
+ const [l, d] = $(null), [m, g] = $(null), [u, f] = $(!1), [c, b] = $(!1), [_, v] = $(null), p = G(!1), x = G(null), A = G(s);
41
+ A.current = s;
42
+ const M = G(i);
43
+ M.current = i;
44
44
  const y = G({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), M = G(0);
50
- M.current++, o("📊 RENDER INFO", {
51
- renderCount: M.current,
49
+ }), R = G(0);
50
+ R.current++, o("📊 RENDER INFO", {
51
+ renderCount: R.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
54
54
  userChanged: y.current.userId !== (t == null ? void 0 : t.id),
@@ -62,12 +62,12 @@ const qt = Ye({
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const $ = G(null);
66
- a && ((A = $.current) == null ? void 0 : A.apiKey) !== a && ($.current = { apiKey: a, client: new Tn(a) });
67
- const P = a ? ((S = $.current) == null ? void 0 : S.client) ?? null : null;
65
+ const z = G(null);
66
+ a && ((D = z.current) == null ? void 0 : D.apiKey) !== a && (z.current = { apiKey: a, client: new Tn(a) });
67
+ const P = a ? ((C = z.current) == null ? void 0 : C.client) ?? null : null;
68
68
  X(() => {
69
- const I = M.current, E = L.current;
70
- if (!a || !P || !E) {
69
+ const I = R.current, T = A.current;
70
+ if (!a || !P || !T) {
71
71
  o("⚠️ SERVICE INIT SKIPPED", {
72
72
  renderCount: I,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
@@ -79,35 +79,35 @@ const qt = Ye({
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
81
  const O = new In({
82
- ...E,
82
+ ...T,
83
83
  apiKey: a,
84
- debug: T.current,
84
+ debug: M.current,
85
85
  client: P
86
86
  });
87
- _.current = O, d(O), o("✅ SERVICE SET", {
87
+ x.current = O, d(O), o("✅ SERVICE SET", {
88
88
  renderCount: I,
89
89
  serviceInstance: !!O
90
90
  });
91
91
  }, [a, P]);
92
- const D = G(null);
92
+ const S = G(null);
93
93
  X(() => {
94
- var E, O;
94
+ var T, 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: v.current,
99
+ isConnecting: p.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 (v.current) {
106
+ if (p.current) {
107
107
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((E = D.current) == null ? void 0 : E.serviceId) === l && ((O = D.current) == null ? void 0 : O.userId) === t.id) {
110
+ if (((T = S.current) == null ? void 0 : T.serviceId) === l && ((O = S.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,22 +115,22 @@ const qt = Ye({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- o("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, w(!0), p(null);
118
+ o("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), v(null);
119
119
  try {
120
120
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
121
  const F = await l.connectUser(t);
122
- g(F), f(!0), D.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
122
+ g(F), f(!0), S.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
124
  clientId: F.userID
125
125
  });
126
126
  } catch (F) {
127
- const j = F instanceof Error ? F.message : "Connection failed";
128
- p(j), o("❌ USER CONNECTION ERROR", {
127
+ const Y = F instanceof Error ? F.message : "Connection failed";
128
+ v(Y), o("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
- error: j
130
+ error: Y
131
131
  });
132
132
  } finally {
133
- w(!1), v.current = !1, o("🔄 USER CONNECTION FINISHED", {
133
+ b(!1), p.current = !1, o("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: u
136
136
  });
@@ -139,11 +139,11 @@ const qt = Ye({
139
139
  }, [l, t, o, u]), X(() => {
140
140
  const I = P;
141
141
  return () => {
142
- var E;
143
- I && (D.current = null, (E = _.current) == null || E.disconnectUser().catch(console.error));
142
+ var T;
143
+ I && (S.current = null, (T = x.current) == null || T.disconnectUser().catch(console.error));
144
144
  };
145
145
  }, [P]);
146
- const R = J(async () => {
146
+ const E = K(async () => {
147
147
  if (o("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!l,
149
149
  hasUser: !!t
@@ -151,52 +151,52 @@ const qt = Ye({
151
151
  o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), w(!0);
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
157
  const I = await l.connectUser(t);
158
- g(I), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
158
+ g(I), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
159
  } catch (I) {
160
- const E = I instanceof Error ? I.message : "Refresh failed";
161
- p(E), o("❌ CONNECTION REFRESH ERROR", {
160
+ const T = I instanceof Error ? I.message : "Refresh failed";
161
+ v(T), o("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: E
163
+ error: T
164
164
  });
165
165
  } finally {
166
- w(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [l, t, o]), N = U.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [l, t, o]), L = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!l,
170
170
  hasClient: !!m,
171
171
  isConnected: u,
172
172
  isLoading: c,
173
- hasError: !!b,
173
+ hasError: !!_,
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: b,
180
+ error: _,
181
181
  capabilities: r,
182
- refreshConnection: R,
182
+ refreshConnection: E,
183
183
  debug: i
184
184
  }), [
185
185
  l,
186
186
  m,
187
187
  u,
188
188
  c,
189
- b,
189
+ _,
190
190
  r,
191
- R,
191
+ E,
192
192
  i,
193
193
  o
194
194
  ]);
195
195
  return o("🔄 RENDER END", {
196
- renderCount: M.current,
196
+ renderCount: R.current,
197
197
  willRenderChat: !!P,
198
- contextValueReady: !!N
199
- }), /* @__PURE__ */ n(qt.Provider, { value: N, children: P ? /* @__PURE__ */ n(
198
+ contextValueReady: !!L
199
+ }), /* @__PURE__ */ n(qt.Provider, { value: L, children: P ? /* @__PURE__ */ n(
200
200
  An,
201
201
  {
202
202
  client: P,
@@ -206,9 +206,9 @@ const qt = Ye({
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, $s = () => Xe(), Wt = (e) => {
209
+ }, Ps = () => Xe(), Wt = (e) => {
210
210
  var a, r;
211
- const [t, s] = z(
211
+ const [t, s] = $(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
214
  return X(() => {
@@ -228,18 +228,18 @@ const qt = Ye({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, Fs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
232
- function Bs(e) {
233
- return Fs.test(e.trim());
231
+ }, zs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
232
+ function $s(e) {
233
+ return zs.test(e.trim());
234
234
  }
235
235
  function Dt(e, t) {
236
236
  const s = e == null ? void 0 : e.trim();
237
- return !s || t && s === t ? !1 : !Bs(s);
237
+ return !s || t && s === t ? !1 : !$s(s);
238
238
  }
239
239
  function Xt(e) {
240
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 Pt = [
242
+ const Ot = [
243
243
  "🍎",
244
244
  // Apple
245
245
  "🍌",
@@ -267,7 +267,7 @@ const Pt = [
267
267
  "🍈"
268
268
  // Melon
269
269
  ];
270
- function Us(e) {
270
+ function Fs(e) {
271
271
  let t = 0;
272
272
  for (let s = 0; s < e.length; s++) {
273
273
  const a = e.charCodeAt(s);
@@ -275,11 +275,11 @@ function Us(e) {
275
275
  }
276
276
  return Math.abs(t);
277
277
  }
278
- function js(e) {
279
- const s = Us(e) % Pt.length;
280
- return Pt[s];
278
+ function Bs(e) {
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,
@@ -288,7 +288,7 @@ const re = ({
288
288
  shape: i = "squircle",
289
289
  dmAgentEnabled: o = !1
290
290
  }) => {
291
- const l = js(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
291
+ const l = Bs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
292
292
  "img",
293
293
  {
294
294
  src: t,
@@ -299,7 +299,7 @@ const re = ({
299
299
  "div",
300
300
  {
301
301
  "aria-hidden": "true",
302
- className: k(
302
+ className: N(
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: k(
312
+ className: N(
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: k(
334
+ className: N(
335
335
  "h-full w-full",
336
336
  "bg-transparent"
337
337
  ),
@@ -350,7 +350,7 @@ const re = ({
350
350
  ]
351
351
  }
352
352
  );
353
- }, Vs = "https://linktr.ee/s/about/trust-center/report", Gs = ({
353
+ }, Us = "https://linktr.ee/s/about/trust-center/report", js = ({
354
354
  channel: e,
355
355
  participant: t,
356
356
  showBlockParticipant: s = !0,
@@ -363,78 +363,78 @@ const re = ({
363
363
  onActionComplete: m,
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
- var A;
367
- const { service: u, debug: f } = Xe(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, w = !!(a && s && u && c), [b, p] = z(!1), [v, _] = z(null), [L, T] = z(!1), [y, M] = z(!1), $ = w && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
366
+ var D;
367
+ const { service: u, debug: f } = Xe(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, b = !!(a && s && u && c), [_, v] = $(!1), [p, x] = $(null), [A, M] = $(!1), [y, R] = $(!1), z = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
368
368
  return X(() => {
369
- if (!w || !u || !c) {
370
- p(!1), _(null);
369
+ if (!b || !u || !c) {
370
+ v(!1), x(null);
371
371
  return;
372
372
  }
373
- let S = !1;
373
+ let C = !1;
374
374
  return (async () => {
375
375
  try {
376
376
  const I = await u.getBlockedUsers();
377
- if (S) return;
378
- p(
377
+ if (C) return;
378
+ v(
379
379
  I.some(
380
- (E) => E.blocked_user_id === c
380
+ (T) => T.blocked_user_id === c
381
381
  )
382
382
  );
383
383
  } catch (I) {
384
- S || console.error(`[${g}] Failed to check blocked status:`, I);
384
+ C || console.error(`[${g}] Failed to check blocked status:`, I);
385
385
  } finally {
386
- S || _({ participantId: c, service: u });
386
+ C || x({ participantId: c, service: u });
387
387
  }
388
388
  })(), () => {
389
- S = !0;
389
+ C = !0;
390
390
  };
391
- }, [w, u, c, g]), {
392
- isParticipantBlocked: b,
393
- isCheckingBlockedStatus: $,
394
- isLeaving: L,
391
+ }, [b, u, c, g]), {
392
+ isParticipantBlocked: _,
393
+ isCheckingBlockedStatus: z,
394
+ isLeaving: A,
395
395
  isUpdatingBlockStatus: y,
396
396
  handleLeaveConversation: async () => {
397
- var S;
398
- if (!L) {
399
- o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
397
+ var C;
398
+ if (!A) {
399
+ o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), M(!0);
400
400
  try {
401
- const I = ((S = e._client) == null ? void 0 : S.userID) ?? null;
401
+ const I = ((C = e._client) == null ? void 0 : C.userID) ?? null;
402
402
  await e.hide(I, !1), r && await r(e), m == null || m();
403
403
  } catch (I) {
404
404
  console.error(`[${g}] Failed to leave conversation`, I);
405
405
  } finally {
406
- T(!1);
406
+ M(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var S, I, E;
411
+ var C, I, T;
412
412
  if (!(y || !u)) {
413
- l == null || l(), f && console.log(`[${g}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
413
+ l == null || l(), f && console.log(`[${g}] Block member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), R(!0);
414
414
  try {
415
- await u.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
415
+ await u.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
416
416
  } catch (O) {
417
417
  console.error(`[${g}] Failed to block member`, O);
418
418
  } finally {
419
- M(!1);
419
+ R(!1);
420
420
  }
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var S, I, E;
424
+ var C, I, T;
425
425
  if (!(y || !u)) {
426
- l == null || l(), f && console.log(`[${g}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
426
+ l == null || l(), f && console.log(`[${g}] Unblock member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), R(!0);
427
427
  try {
428
- await u.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
428
+ await u.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
429
429
  } catch (O) {
430
430
  console.error(`[${g}] Failed to unblock member`, O);
431
431
  } finally {
432
- M(!1);
432
+ R(!1);
433
433
  }
434
434
  }
435
435
  },
436
436
  handleReportUser: () => {
437
- d == null || d(), m == null || m(), window.open(Vs, "_blank", "noopener,noreferrer");
437
+ d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
438
438
  }
439
439
  };
440
440
  }, ge = ({
@@ -446,7 +446,7 @@ const re = ({
446
446
  "button",
447
447
  {
448
448
  type: "button",
449
- className: k(
449
+ className: N(
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
@@ -454,7 +454,7 @@ const re = ({
454
454
  ...a,
455
455
  children: s
456
456
  }
457
- ), Ot = ({
457
+ ), Pt = ({
458
458
  channel: e,
459
459
  participant: t,
460
460
  showDeleteConversation: s = !0,
@@ -468,16 +468,16 @@ const re = ({
468
468
  customChannelActions: g,
469
469
  triggerClassName: u
470
470
  }) => {
471
- const [f, c] = z(!1), w = G(null), b = Sn(), p = J(() => c(!1), []), {
472
- isParticipantBlocked: v,
473
- isCheckingBlockedStatus: _,
474
- isLeaving: L,
475
- isUpdatingBlockStatus: T,
471
+ const [f, c] = $(!1), b = G(null), _ = Sn(), v = K(() => c(!1), []), {
472
+ isParticipantBlocked: p,
473
+ isCheckingBlockedStatus: x,
474
+ isLeaving: A,
475
+ isUpdatingBlockStatus: M,
476
476
  handleLeaveConversation: y,
477
- handleBlockUser: M,
478
- handleUnblockUser: $,
477
+ handleBlockUser: R,
478
+ handleUnblockUser: z,
479
479
  handleReportUser: P
480
- } = Gs({
480
+ } = js({
481
481
  channel: e,
482
482
  participant: t,
483
483
  showBlockParticipant: a,
@@ -487,20 +487,20 @@ const re = ({
487
487
  onDeleteConversationClick: l,
488
488
  onBlockParticipantClick: d,
489
489
  onReportParticipantClick: m,
490
- onActionComplete: p,
490
+ onActionComplete: v,
491
491
  logLabel: "ChannelActionsMenu"
492
492
  });
493
493
  return X(() => {
494
494
  if (!f) return;
495
- const R = (A) => {
496
- w.current && !w.current.contains(A.target) && c(!1);
497
- }, N = (A) => {
498
- A.key === "Escape" && c(!1);
495
+ const E = (D) => {
496
+ b.current && !b.current.contains(D.target) && c(!1);
497
+ }, L = (D) => {
498
+ D.key === "Escape" && c(!1);
499
499
  };
500
- return document.addEventListener("mousedown", R), document.addEventListener("keydown", N), () => {
501
- document.removeEventListener("mousedown", R), document.removeEventListener("keydown", N);
500
+ return document.addEventListener("mousedown", E), document.addEventListener("keydown", L), () => {
501
+ document.removeEventListener("mousedown", E), document.removeEventListener("keydown", L);
502
502
  };
503
- }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: w, className: "relative", children: [
503
+ }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
504
504
  /* @__PURE__ */ h(
505
505
  "button",
506
506
  {
@@ -508,8 +508,8 @@ const re = ({
508
508
  type: "button",
509
509
  "aria-haspopup": "true",
510
510
  "aria-expanded": f,
511
- "aria-controls": f ? b : void 0,
512
- onClick: () => c((R) => !R),
511
+ "aria-controls": f ? _ : void 0,
512
+ onClick: () => c((E) => !E),
513
513
  children: [
514
514
  /* @__PURE__ */ n(hs, { className: "size-5 text-black/90" }),
515
515
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
@@ -519,9 +519,9 @@ const re = ({
519
519
  f && /* @__PURE__ */ n(
520
520
  "div",
521
521
  {
522
- id: b,
522
+ id: _,
523
523
  "aria-label": "Conversation options",
524
- className: k(
524
+ className: N(
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
  ),
@@ -530,40 +530,40 @@ const re = ({
530
530
  ge,
531
531
  {
532
532
  onClick: y,
533
- disabled: L,
534
- "aria-busy": L,
533
+ disabled: A,
534
+ "aria-busy": A,
535
535
  children: [
536
- L ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
536
+ A ? /* @__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
  }
540
540
  ) }),
541
- a && /* @__PURE__ */ n("li", { children: _ ? (
541
+ a && /* @__PURE__ */ n("li", { children: x ? (
542
542
  // Block status not yet resolved — show a disabled placeholder
543
543
  // so a premature click can't act on a stale block state.
544
544
  /* @__PURE__ */ h(ge, { disabled: !0, "aria-busy": !0, children: [
545
545
  /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }),
546
546
  /* @__PURE__ */ n("span", { children: "Block" })
547
547
  ] })
548
- ) : v ? /* @__PURE__ */ h(
548
+ ) : p ? /* @__PURE__ */ h(
549
549
  ge,
550
550
  {
551
- onClick: $,
552
- disabled: T,
553
- "aria-busy": T,
551
+ onClick: z,
552
+ disabled: M,
553
+ "aria-busy": M,
554
554
  children: [
555
- T ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
555
+ M ? /* @__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
  }
559
559
  ) : /* @__PURE__ */ h(
560
560
  ge,
561
561
  {
562
- onClick: M,
563
- disabled: T,
564
- "aria-busy": T,
562
+ onClick: R,
563
+ disabled: M,
564
+ "aria-busy": M,
565
565
  children: [
566
- T ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
566
+ M ? /* @__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
  }
@@ -577,30 +577,30 @@ const re = ({
577
577
  }
578
578
  )
579
579
  ] });
580
- }, Hs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ve = "vote_up", Ge = "vote_down";
581
- function Ys(e) {
582
- return e != null && e.length ? e.some((t) => t.type === Ge) ? "down" : e.some((t) => t.type === Ve) ? "up" : null : null;
580
+ }, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ge = "vote_up", He = "vote_down";
581
+ function Gs(e) {
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
- function qs(e) {
585
- const { channel: t } = ce(), { client: s } = We("useMessageVote"), a = te(
586
- () => Ys(e.own_reactions),
584
+ function Hs(e) {
585
+ const { channel: t } = ce(), { client: s } = We("useMessageVote"), a = se(
586
+ () => Gs(e.own_reactions),
587
587
  [e.own_reactions]
588
- ), r = J(async () => {
588
+ ), r = K(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 = J(async () => {
598
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = K(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 {
@@ -608,7 +608,7 @@ function qs(e) {
608
608
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
609
609
  return { selected: a, voteUp: r, voteDown: i };
610
610
  }
611
- function Ws(e) {
611
+ function Ys(e) {
612
612
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
613
613
  }
614
614
  function Kt({
@@ -616,16 +616,16 @@ function Kt({
616
616
  viewerLanguage: t
617
617
  }) {
618
618
  var r;
619
- const s = e == null ? void 0 : e.text, a = Ws(t);
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 Xs = U.lazy(() => import("./Card-beoX9cug.js")), Ks = U.lazy(() => import("./Card-DcEBssw0.js")), Js = U.lazy(() => import("./Card-BOD2Qo_b.js")), Ke = () => /* @__PURE__ */ n(
622
+ const qs = j.lazy(() => import("./Card-XVTz8IYz.js")), Ws = j.lazy(() => import("./Card-CrTBu2I6.js")), Xs = j.lazy(() => import("./Card-BKd0E-B9.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
- ), Zs = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Ks, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Js, { ...e }) }), Qs = Jt, ea = Zt, zt = { Composer: Zs, Sent: Jt, Received: Zt, Creator: Qs, Visitor: ea }, ta = [
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,21 +635,21 @@ const Xs = U.lazy(() => import("./Card-beoX9cug.js")), Ks = U.lazy(() => import(
635
635
  [/plain|rtf/, "text"],
636
636
  [/markdown/, "markdown"]
637
637
  ];
638
- function se(e) {
638
+ function re(e) {
639
639
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
640
640
  }
641
641
  function Qt(e) {
642
- const t = ta.find(
642
+ const t = Qs.find(
643
643
  ([s]) => s.test(e)
644
644
  );
645
645
  return t ? t[1] : "generic";
646
646
  }
647
- const na = {
647
+ const ea = {
648
648
  video: Ht,
649
649
  audio: bs,
650
650
  image: gs,
651
651
  document: Gt
652
- }, sa = {
652
+ }, ta = {
653
653
  pdf: Cs,
654
654
  doc: ys,
655
655
  xls: Ns,
@@ -660,17 +660,17 @@ const na = {
660
660
  markdown: ps,
661
661
  generic: Gt
662
662
  };
663
- function aa(e) {
664
- const t = se(e);
665
- return t !== "document" ? na[t] : sa[Qt(e)];
663
+ function na(e) {
664
+ const t = re(e);
665
+ return t !== "document" ? ea[t] : ta[Qt(e)];
666
666
  }
667
667
  function le(e, t) {
668
- return U.createElement(aa(e), t);
668
+ return j.createElement(na(e), t);
669
669
  }
670
- const ra = (e) => {
670
+ const sa = (e) => {
671
671
  var t, s;
672
672
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
673
- }, ia = ({
673
+ }, aa = ({
674
674
  source: e,
675
675
  mimeType: t,
676
676
  poster: s,
@@ -682,78 +682,78 @@ const ra = (e) => {
682
682
  muted: d = !1,
683
683
  onContainerClick: m
684
684
  }) => {
685
- const g = se(t), u = G(null), f = G(null), c = G(null), w = G(r), [b, p] = z(a), [v, _] = z(0), [L, T] = z(!1), [y, M] = z(!1), [$, P] = z(!1), [D, R] = z(!1), [N, A] = z(!0), [S, I] = z(null), E = J(() => {
686
- P(!1), p(!0);
687
- }, []), O = J((x) => {
688
- const C = f.current;
689
- if (!C) return 0;
690
- const B = C.getBoundingClientRect();
685
+ const g = re(t), u = G(null), f = G(null), c = G(null), b = G(r), [_, v] = $(a), [p, x] = $(0), [A, M] = $(!1), [y, R] = $(!1), [z, P] = $(!1), [S, E] = $(!1), [L, D] = $(!0), [C, I] = $(null), T = K(() => {
686
+ P(!1), v(!0);
687
+ }, []), O = K((w) => {
688
+ const k = f.current;
689
+ if (!k) return 0;
690
+ const B = k.getBoundingClientRect();
691
691
  return Math.max(
692
692
  0,
693
- Math.min(1, (ra(x) - B.left) / B.width)
693
+ Math.min(1, (sa(w) - B.left) / B.width)
694
694
  );
695
- }, []), F = J((x) => {
696
- const C = u.current;
697
- C && C.duration && (C.currentTime = x * C.duration);
698
- }, []), j = (x) => {
699
- x.stopPropagation(), T(!0);
700
- const C = O(x);
701
- _(C), F(C);
695
+ }, []), F = K((w) => {
696
+ const k = u.current;
697
+ k && k.duration && (k.currentTime = w * k.duration);
698
+ }, []), Y = (w) => {
699
+ w.stopPropagation(), M(!0);
700
+ const k = O(w);
701
+ x(k), F(k);
702
702
  };
703
703
  X(() => {
704
- r !== void 0 && r !== w.current && (w.current = r, p(r));
704
+ r !== void 0 && r !== b.current && (b.current = r, v(r));
705
705
  }, [r]), X(() => {
706
- if (!b) {
706
+ if (!_) {
707
707
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
708
708
  return;
709
709
  }
710
- const x = () => {
711
- const C = u.current;
712
- C && C.duration && !L && _(C.currentTime / C.duration), c.current = requestAnimationFrame(x);
710
+ const w = () => {
711
+ const k = u.current;
712
+ k && k.duration && !A && x(k.currentTime / k.duration), c.current = requestAnimationFrame(w);
713
713
  };
714
- return c.current = requestAnimationFrame(x), () => {
714
+ return c.current = requestAnimationFrame(w), () => {
715
715
  c.current !== null && cancelAnimationFrame(c.current);
716
716
  };
717
- }, [b, L]), X(() => {
718
- const x = u.current;
719
- x && (b ? x.play().catch((C) => {
720
- p(!1), P(!0);
721
- }) : x.pause());
722
- }, [b]), X(() => {
723
- if (!L) return;
724
- const x = (B) => _(O(B)), C = (B) => {
725
- T(!1), F(O(B));
717
+ }, [_, A]), X(() => {
718
+ const w = u.current;
719
+ w && (_ ? w.play().catch((k) => {
720
+ v(!1), P(!0);
721
+ }) : w.pause());
722
+ }, [_]), X(() => {
723
+ if (!A) return;
724
+ const w = (B) => x(O(B)), k = (B) => {
725
+ M(!1), F(O(B));
726
726
  };
727
- return window.addEventListener("mousemove", x), window.addEventListener("mouseup", C), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", C), () => {
728
- window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", C);
727
+ return window.addEventListener("mousemove", w), window.addEventListener("mouseup", k), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", k), () => {
728
+ window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", k);
729
729
  };
730
- }, [L, O, F]);
731
- const H = S ? { aspectRatio: String(S) } : void 0, Y = S ? "" : " aspect-video", W = Math.round(v * 100);
730
+ }, [A, O, F]);
731
+ const Z = C ? { aspectRatio: String(C) } : void 0, J = C ? "" : " aspect-video", U = Math.round(p * 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 ${Y}`,
738
- style: H,
739
- onClick: (x) => {
737
+ className: `relative cursor-pointer overflow-hidden bg-black ${J}`,
738
+ style: Z,
739
+ onClick: (w) => {
740
740
  if (m) {
741
- m(x);
741
+ m(w);
742
742
  return;
743
743
  }
744
- $ || o && p((C) => !C);
744
+ z || o && v((k) => !k);
745
745
  },
746
- onKeyDown: (x) => {
747
- if (!(x.key !== "Enter" && x.key !== " ")) {
748
- if (x.preventDefault(), m) {
749
- m(x);
746
+ onKeyDown: (w) => {
747
+ if (!(w.key !== "Enter" && w.key !== " ")) {
748
+ if (w.preventDefault(), m) {
749
+ m(w);
750
750
  return;
751
751
  }
752
- $ || o && p((C) => !C);
752
+ z || o && v((k) => !k);
753
753
  }
754
754
  },
755
755
  children: [
756
- s && (g === "audio" || N) && /* @__PURE__ */ n(
756
+ s && (g === "audio" || L) && /* @__PURE__ */ n(
757
757
  "img",
758
758
  {
759
759
  src: s,
@@ -761,7 +761,7 @@ const ra = (e) => {
761
761
  className: "absolute inset-0 h-full w-full object-cover"
762
762
  }
763
763
  ),
764
- !s && (g === "audio" || N) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
764
+ !s && (g === "audio" || L) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
765
765
  className: "size-12 text-black/20",
766
766
  weight: "regular"
767
767
  }) }),
@@ -773,14 +773,14 @@ const ra = (e) => {
773
773
  loop: i,
774
774
  muted: d,
775
775
  style: { width: "100%", height: "100%" },
776
- onLoadStart: () => R(!0),
776
+ onLoadStart: () => E(!0),
777
777
  onCanPlay: () => {
778
- R(!1), A(!1);
778
+ E(!1), D(!1);
779
779
  },
780
- onWaiting: () => R(!0),
780
+ onWaiting: () => E(!0),
781
781
  onPlay: () => P(!1),
782
782
  onEnded: () => {
783
- i || (p(!1), _(0));
783
+ i || (v(!1), x(0));
784
784
  },
785
785
  children: /* @__PURE__ */ n("track", { kind: "captions" })
786
786
  }
@@ -793,41 +793,41 @@ const ra = (e) => {
793
793
  muted: d,
794
794
  playsInline: !0,
795
795
  style: { width: "100%", height: "100%" },
796
- onLoadStart: () => R(!0),
796
+ onLoadStart: () => E(!0),
797
797
  onCanPlay: () => {
798
- R(!1), A(!1);
798
+ E(!1), D(!1);
799
799
  },
800
- onWaiting: () => R(!0),
800
+ onWaiting: () => E(!0),
801
801
  onPlay: () => P(!1),
802
802
  onLoadedMetadata: () => {
803
- const x = u.current;
804
- x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && I(x.videoWidth / x.videoHeight);
803
+ const w = u.current;
804
+ w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && I(w.videoWidth / w.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
- i || (p(!1), _(0));
807
+ i || (v(!1), x(0));
808
808
  },
809
809
  children: /* @__PURE__ */ n("track", { kind: "captions" })
810
810
  }
811
811
  ) }),
812
- D && !$ && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
812
+ S && !z && /* @__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 && /* @__PURE__ */ n(
819
+ z && !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: (x) => {
827
- x.stopPropagation(), E();
826
+ onClick: (w) => {
827
+ w.stopPropagation(), T();
828
828
  },
829
- onKeyDown: (x) => {
830
- x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), E());
829
+ onKeyDown: (w) => {
830
+ w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), T());
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 ra = (e) => {
837
837
  {
838
838
  role: "slider",
839
839
  "aria-label": "Playback position",
840
- "aria-valuenow": W,
840
+ "aria-valuenow": U,
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: j,
847
- onTouchStart: j,
848
- onClick: (x) => x.stopPropagation(),
849
- onKeyDown: (x) => {
850
- x.key === "ArrowRight" && F(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && F(Math.max(0, v - 0.05));
846
+ onMouseDown: Y,
847
+ onTouchStart: Y,
848
+ onClick: (w) => w.stopPropagation(),
849
+ onKeyDown: (w) => {
850
+ w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 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: `${W}%` }
856
+ style: { width: `${U}%` }
857
857
  }
858
858
  ) })
859
859
  }
@@ -863,12 +863,12 @@ const ra = (e) => {
863
863
  "button",
864
864
  {
865
865
  type: "button",
866
- onClick: (x) => {
867
- x.stopPropagation(), p((C) => !C);
866
+ onClick: (w) => {
867
+ w.stopPropagation(), v((k) => !k);
868
868
  },
869
869
  className: "shrink-0 text-white",
870
- "aria-label": b ? "Pause" : "Play",
871
- children: b ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ue, { className: "size-5 translate-x-px", weight: "fill" })
870
+ "aria-label": _ ? "Pause" : "Play",
871
+ children: _ ? /* @__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 ra = (e) => {
876
876
  {
877
877
  role: "slider",
878
878
  "aria-label": "Playback position",
879
- "aria-valuenow": W,
879
+ "aria-valuenow": U,
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: j,
886
- onTouchStart: j,
887
- onClick: (x) => x.stopPropagation(),
888
- onMouseEnter: () => M(!0),
889
- onMouseLeave: () => M(!1),
890
- onKeyDown: (x) => {
891
- x.key === "ArrowRight" && F(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && F(Math.max(0, v - 0.05));
885
+ onMouseDown: Y,
886
+ onTouchStart: Y,
887
+ onClick: (w) => w.stopPropagation(),
888
+ onMouseEnter: () => R(!0),
889
+ onMouseLeave: () => R(!1),
890
+ onKeyDown: (w) => {
891
+ w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 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 ${y || L ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${y || A ? "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: `${W}%` }
902
+ style: { width: `${U}%` }
903
903
  }
904
904
  )
905
905
  }
@@ -907,8 +907,8 @@ const ra = (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 ${y || L ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
- style: { left: `${W}%` }
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${y || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
+ style: { left: `${U}%` }
912
912
  }
913
913
  )
914
914
  ]
@@ -918,7 +918,7 @@ const ra = (e) => {
918
918
  ]
919
919
  }
920
920
  );
921
- }, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", oa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
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,9 +927,9 @@ const ra = (e) => {
927
927
  mediaPlayerProps: i,
928
928
  containedImage: o = !1
929
929
  }) => {
930
- const l = se(e), [d, m] = z(!1);
930
+ const l = re(e), [d, m] = $(!1);
931
931
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
932
- ia,
932
+ aa,
933
933
  {
934
934
  source: t,
935
935
  mimeType: e,
@@ -980,7 +980,7 @@ const ra = (e) => {
980
980
  weight: "regular"
981
981
  })
982
982
  }
983
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${oa(r)}`, children: /* @__PURE__ */ n(
983
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${ra(r)}`, children: /* @__PURE__ */ n(
984
984
  "img",
985
985
  {
986
986
  src: s,
@@ -1012,13 +1012,13 @@ const ra = (e) => {
1012
1012
  rootRef: g,
1013
1013
  "data-testid": u
1014
1014
  }) => {
1015
- const f = e === "dark", c = f ? s ?? a : s ?? "", w = f && !s;
1015
+ const f = e === "dark", c = f ? s ?? a : s ?? "", b = f && !s;
1016
1016
  return /* @__PURE__ */ h(
1017
1017
  "div",
1018
1018
  {
1019
1019
  ref: g,
1020
1020
  "data-testid": u,
1021
- className: k(
1021
+ className: N(
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,17 +1030,17 @@ const ra = (e) => {
1030
1030
  c.trim() !== "" && /* @__PURE__ */ n(
1031
1031
  "p",
1032
1032
  {
1033
- className: k("mb-0.5 truncate text-base font-medium", {
1033
+ className: N("mb-0.5 truncate text-base font-medium", {
1034
1034
  "text-black": !f,
1035
- "text-white/30": f && w,
1036
- "text-white": f && !w
1035
+ "text-white/30": f && b,
1036
+ "text-white": f && !b
1037
1037
  }),
1038
1038
  children: c
1039
1039
  }
1040
1040
  ),
1041
1041
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1042
1042
  le(r, {
1043
- className: k(
1043
+ className: N(
1044
1044
  "size-5 shrink-0",
1045
1045
  f ? "text-white/55" : "text-black/55"
1046
1046
  ),
@@ -1049,7 +1049,7 @@ const ra = (e) => {
1049
1049
  i != null && i !== "" && /* @__PURE__ */ n(
1050
1050
  "span",
1051
1051
  {
1052
- className: k(
1052
+ className: N(
1053
1053
  "text-xs font-medium",
1054
1054
  f ? "text-white/55" : "text-black/55"
1055
1055
  ),
@@ -1070,23 +1070,23 @@ function nn(e) {
1070
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
- function la(e) {
1073
+ function ia(e) {
1074
1074
  return e ? "bg-white/10" : "bg-black/5";
1075
1075
  }
1076
- function ca(e) {
1076
+ function oa(e) {
1077
1077
  return e ? "text-white" : "text-black";
1078
1078
  }
1079
- function da(e) {
1079
+ function la(e) {
1080
1080
  return e ? "text-white/55" : "text-black/55";
1081
1081
  }
1082
- function ua(e) {
1082
+ function ca(e) {
1083
1083
  return e ? "text-white/40" : "text-black/40";
1084
1084
  }
1085
- function ma(e) {
1085
+ function da(e) {
1086
1086
  return e ? "text-white/20" : "text-black/20";
1087
1087
  }
1088
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: [
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: [
1090
1090
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1091
1091
  "img",
1092
1092
  {
@@ -1097,14 +1097,14 @@ const Ze = ({ attachment: e, isMyMessage: t }) => {
1097
1097
  ) : /* @__PURE__ */ n(
1098
1098
  "div",
1099
1099
  {
1100
- className: `aspect-video w-full rounded-[20px] ${la(t)} flex items-center justify-center`,
1101
- children: /* @__PURE__ */ n(Es, { className: `size-12 ${ma(t)}` })
1100
+ className: `aspect-video w-full rounded-[20px] ${ia(t)} flex items-center justify-center`,
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: [
1105
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ca(t)}`, children: s }),
1106
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${da(t)}`, children: a }),
1107
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ua(t)}`, children: d })
1105
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${oa(t)}`, children: s }),
1106
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${la(t)}`, children: a }),
1107
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
1108
1108
  ] })
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 });
@@ -1116,7 +1116,7 @@ function Qe(e) {
1116
1116
  var t;
1117
1117
  return (t = e.attachments) == null ? void 0 : t.find(sn);
1118
1118
  }
1119
- async function ha(e, t) {
1119
+ async function ua(e, t) {
1120
1120
  let s;
1121
1121
  try {
1122
1122
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1128,11 +1128,11 @@ async function ha(e, t) {
1128
1128
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1129
1129
  o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1130
1130
  }
1131
- const fa = ({
1131
+ const ma = ({
1132
1132
  url: e,
1133
1133
  filename: t
1134
1134
  }) => {
1135
- const [s, a] = z(!1);
1135
+ const [s, a] = $(!1);
1136
1136
  return /* @__PURE__ */ n(
1137
1137
  "button",
1138
1138
  {
@@ -1140,7 +1140,7 @@ const fa = ({
1140
1140
  onClick: (i) => {
1141
1141
  i.stopPropagation();
1142
1142
  const o = window.open("", "_blank", "noopener,noreferrer");
1143
- a(!0), ha(e, t).then(() => {
1143
+ a(!0), ua(e, t).then(() => {
1144
1144
  o == null || o.close();
1145
1145
  }).catch(() => {
1146
1146
  o && (o.location.href = e);
@@ -1148,7 +1148,7 @@ const fa = ({
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(U.Fragment, { children: [
1151
+ children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1152
1152
  /* @__PURE__ */ n(ve, { className: "size-4 text-white", weight: "bold" }),
1153
1153
  "Download"
1154
1154
  ] })
@@ -1156,15 +1156,15 @@ const fa = ({
1156
1156
  );
1157
1157
  };
1158
1158
  function et(e) {
1159
- var u, f, c, w;
1159
+ var u, f, c, b;
1160
1160
  const t = (u = e.attachments) == null ? void 0 : u.find(
1161
- (b) => b.type === "video" && b.asset_url
1161
+ (_) => _.type === "video" && _.asset_url
1162
1162
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1163
- (b) => b.type === "image" && b.image_url
1163
+ (_) => _.type === "image" && _.image_url
1164
1164
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1165
- (b) => b.type === "audio" && b.asset_url
1166
- ), r = (w = e.attachments) == null ? void 0 : w.find(
1167
- (b) => b.type === "file" && b.asset_url
1165
+ (_) => _.type === "audio" && _.asset_url
1166
+ ), r = (b = e.attachments) == null ? void 0 : b.find(
1167
+ (_) => _.type === "file" && _.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;
@@ -1211,7 +1211,7 @@ const an = ({
1211
1211
  fileSize: a,
1212
1212
  thumbnailUrl: r
1213
1213
  }) => {
1214
- const i = se(t), o = a !== void 0 ? nn(a) : void 0;
1214
+ const i = re(t), o = a !== void 0 ? nn(a) : void 0;
1215
1215
  return /* @__PURE__ */ n(
1216
1216
  tn,
1217
1217
  {
@@ -1230,17 +1230,17 @@ const an = ({
1230
1230
  containedImage: i === "image" || i === "document"
1231
1231
  }
1232
1232
  ),
1233
- action: /* @__PURE__ */ n(fa, { url: e, filename: s })
1233
+ action: /* @__PURE__ */ n(ma, { url: e, filename: s })
1234
1234
  }
1235
1235
  );
1236
- }, ga = ({
1236
+ }, ha = ({
1237
1237
  message: e,
1238
1238
  isMyMessage: t = !1
1239
1239
  }) => {
1240
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,
@@ -1264,7 +1264,7 @@ const an = ({
1264
1264
  }
1265
1265
  )
1266
1266
  ] });
1267
- }, ba = ({
1267
+ }, fa = ({
1268
1268
  message: e
1269
1269
  }) => {
1270
1270
  const t = Qe(e);
@@ -1272,7 +1272,7 @@ const an = ({
1272
1272
  return /* @__PURE__ */ n("div", { className: Je(!0), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !0 }) });
1273
1273
  const s = et(e);
1274
1274
  return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1275
- }, pa = ({
1275
+ }, ga = ({
1276
1276
  message: e
1277
1277
  }) => {
1278
1278
  const t = Qe(e);
@@ -1280,18 +1280,18 @@ const an = ({
1280
1280
  return /* @__PURE__ */ n("div", { className: Je(!1), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !1 }) });
1281
1281
  const s = et(e);
1282
1282
  return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
1283
- }, ki = Object.assign(ga, {
1284
- Creator: ba,
1285
- Visitor: pa
1286
- }), va = {
1283
+ }, yi = Object.assign(ha, {
1284
+ Creator: fa,
1285
+ Visitor: ga
1286
+ }), ba = {
1287
1287
  isUnlocking: () => !1
1288
- }, xa = {
1289
- LockedAttachment: va
1290
- }, on = Ye({}), Ei = on.Provider;
1291
- function wa(e) {
1292
- return Ae(on)[e] ?? xa[e];
1288
+ }, pa = {
1289
+ LockedAttachment: ba
1290
+ }, on = Ye({}), Ci = on.Provider;
1291
+ function va(e) {
1292
+ return Ae(on)[e] ?? pa[e];
1293
1293
  }
1294
- const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1294
+ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1295
1295
  "svg",
1296
1296
  {
1297
1297
  width: e,
@@ -1308,22 +1308,22 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1308
1308
  }
1309
1309
  )
1310
1310
  }
1311
- ), Na = (e) => {
1311
+ ), wa = (e) => {
1312
1312
  var t;
1313
1313
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1314
- }, ya = (e) => {
1314
+ }, _a = (e) => {
1315
1315
  var t;
1316
1316
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1317
1317
  }, Ee = (e) => {
1318
1318
  var t;
1319
1319
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1320
- }, Ca = (e) => {
1320
+ }, Na = (e) => {
1321
1321
  var t;
1322
1322
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1323
- }, ln = (e) => Na(e) || ya(e), ka = (e) => {
1323
+ }, ln = (e) => wa(e) || _a(e), ya = (e) => {
1324
1324
  var t;
1325
1325
  return ln(e) && !((t = e.text) != null && t.trim());
1326
- }, Oe = ({
1326
+ }, Pe = ({
1327
1327
  message: e,
1328
1328
  standalone: t = !1,
1329
1329
  isMyMessage: s = !1,
@@ -1336,25 +1336,25 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1336
1336
  if (r) {
1337
1337
  const f = (u = e.metadata) == null ? void 0 : u.amount_text;
1338
1338
  if (!f) return null;
1339
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", w = t ? `${f} tip` : `Delivered with ${f} tip`;
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
1341
  /* @__PURE__ */ n(Ss, { size: t ? 14 : 12 }),
1342
- /* @__PURE__ */ n("span", { children: w })
1342
+ /* @__PURE__ */ n("span", { children: b })
1343
1343
  ] });
1344
1344
  }
1345
1345
  const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
1346
1346
  "message-chatbot-indicator",
1347
1347
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1348
1348
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
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(_a, { size: o ? 12 : 15 }) });
1350
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(ne, { children: [
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(ae, { children: [
1351
1351
  m,
1352
1352
  g
1353
- ] }) : /* @__PURE__ */ h(ne, { children: [
1353
+ ] }) : /* @__PURE__ */ h(ae, { children: [
1354
1354
  g,
1355
1355
  m
1356
1356
  ] }) });
1357
- }, Ea = ({
1357
+ }, Ca = ({
1358
1358
  selected: e,
1359
1359
  onVoteUp: t,
1360
1360
  onVoteDown: s
@@ -1363,7 +1363,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1363
1363
  "button",
1364
1364
  {
1365
1365
  type: "button",
1366
- className: k("message-vote-button focus-ring", {
1366
+ className: N("message-vote-button focus-ring", {
1367
1367
  "message-vote-button--selected": e === "up"
1368
1368
  }),
1369
1369
  onClick: t,
@@ -1377,7 +1377,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1377
1377
  "button",
1378
1378
  {
1379
1379
  type: "button",
1380
- className: k("message-vote-button focus-ring", {
1380
+ className: N("message-vote-button focus-ring", {
1381
1381
  "message-vote-button--selected": e === "down"
1382
1382
  }),
1383
1383
  onClick: s,
@@ -1387,7 +1387,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1387
1387
  children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "down" ? "fill" : "regular" })
1388
1388
  }
1389
1389
  )
1390
- ] }), Sa = (e) => {
1390
+ ] }), ka = (e) => {
1391
1391
  var ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St;
1392
1392
  const {
1393
1393
  additionalMessageInputProps: t,
@@ -1403,47 +1403,47 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1403
1403
  isMessageAIGenerated: u,
1404
1404
  isMyMessage: f,
1405
1405
  message: c,
1406
- renderText: w,
1407
- threadList: b,
1408
- viewerLanguage: p
1409
- } = e, { client: v } = We("CustomMessage"), { channel: _ } = ce("CustomMessage"), { isUnlocking: L, onUnlockClick: T, onFetchSource: y, onDownloadClick: M } = wa("LockedAttachment"), [$, P] = z(!1), D = Ln(c.id), { selected: R, voteUp: N, voteDown: A } = qs(c), {
1410
- Attachment: S = Dn,
1411
- EditMessageModal: I = Pn,
1412
- MessageActions: E,
1413
- MessageBlocked: O = On,
1406
+ renderText: b,
1407
+ threadList: _,
1408
+ viewerLanguage: v
1409
+ } = e, { client: p } = We("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: A, onUnlockClick: M, onFetchSource: y, onDownloadClick: R } = va("LockedAttachment"), [z, P] = $(!1), S = Ln(c.id), { selected: E, voteUp: L, voteDown: D } = Hs(c), {
1410
+ Attachment: C = Dn,
1411
+ EditMessageModal: I = On,
1412
+ MessageActions: T,
1413
+ MessageBlocked: O = Pn,
1414
1414
  MessageBouncePrompt: F = zn,
1415
- MessageDeleted: j = $n,
1416
- MessageIsThreadReplyInChannelButtonIndicator: H = Fn,
1417
- MessageRepliesCountButton: Y = Bn,
1418
- ReminderNotification: W = Un,
1419
- StreamedMessageText: x = jn,
1420
- PinIndicator: C
1421
- } = jt("CustomMessage"), B = Vn(c), q = Gn(c), K = te(
1415
+ MessageDeleted: Y = $n,
1416
+ MessageIsThreadReplyInChannelButtonIndicator: Z = Fn,
1417
+ MessageRepliesCountButton: J = Bn,
1418
+ ReminderNotification: U = Un,
1419
+ StreamedMessageText: w = jn,
1420
+ PinIndicator: k
1421
+ } = jt("CustomMessage"), B = Vn(c), q = Gn(c), H = se(
1422
1422
  () => u == null ? void 0 : u(c),
1423
1423
  [u, c]
1424
- ), V = te(() => {
1424
+ ), V = se(() => {
1425
1425
  const fe = c.attachments ?? [], Ce = c.shared_location ? [c.shared_location, ...fe] : fe;
1426
1426
  if (!Ee(c)) return Ce;
1427
1427
  const It = Ce.filter((Tt) => !("type" in Tt) || !sn(Tt));
1428
1428
  return It.length === Ce.length ? Ce : It;
1429
- }, [c]), ie = te(() => {
1430
- const fe = Kt({ message: c, viewerLanguage: p });
1429
+ }, [c]), W = se(() => {
1430
+ const fe = Kt({ message: c, viewerLanguage: v });
1431
1431
  return fe === c.text ? c : { ...c, text: fe };
1432
- }, [c, p]);
1432
+ }, [c, v]);
1433
1433
  if (Hn(c))
1434
1434
  return null;
1435
1435
  if (c.deleted_at || c.type === "deleted")
1436
- return /* @__PURE__ */ n(j, { message: c });
1436
+ return /* @__PURE__ */ n(Y, { message: c });
1437
1437
  if (Yn(c))
1438
1438
  return /* @__PURE__ */ n(O, {});
1439
- const de = !b && !!c.reply_count, ue = !b && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ae = qn(c);
1440
- let Z;
1441
- Q ? Z = () => m(c) : ae && (Z = () => P(!0));
1442
- const me = f(), En = k(
1439
+ const de = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, te = qn(c);
1440
+ let Q;
1441
+ me ? Q = () => m(c) : te && (Q = () => P(!0));
1442
+ const ee = f(), En = N(
1443
1443
  "str-chat__message str-chat__message-simple",
1444
1444
  `str-chat__message--${c.type}`,
1445
1445
  `str-chat__message--${c.status}`,
1446
- me ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1446
+ ee ? "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
1449
  "str-chat__message--has-attachment": B,
@@ -1456,20 +1456,20 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1456
1456
  "str-chat__virtual-message__wrapper--first": i,
1457
1457
  "str-chat__virtual-message__wrapper--group": o
1458
1458
  }
1459
- ), dt = c.poll_id && v.polls.fromState(c.poll_id), ut = ka(c), he = Ee(c), mt = Ca(c), Le = !!(V != null && V.length && !c.quoted_message), ht = he && me && Le;
1460
- return /* @__PURE__ */ h(ne, { children: [
1459
+ ), dt = c.poll_id && p.polls.fromState(c.poll_id), ut = ya(c), he = Ee(c), mt = Na(c), Le = !!(V != null && V.length && !c.quoted_message), ht = he && ee && Le;
1460
+ return /* @__PURE__ */ h(ae, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
1462
  I,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
1466
1466
  ),
1467
- $ && /* @__PURE__ */ n(
1467
+ z && /* @__PURE__ */ n(
1468
1468
  Wn,
1469
1469
  {
1470
1470
  MessageBouncePrompt: F,
1471
1471
  onClose: () => P(!1),
1472
- open: $
1472
+ open: z
1473
1473
  }
1474
1474
  ),
1475
1475
  /* @__PURE__ */ h(
@@ -1478,10 +1478,10 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1478
1478
  className: En,
1479
1479
  "data-message-id": c.id,
1480
1480
  children: [
1481
- C && /* @__PURE__ */ n(C, {}),
1482
- !!D && /* @__PURE__ */ n(W, { reminder: D }),
1481
+ k && /* @__PURE__ */ n(k, {}),
1482
+ !!S && /* @__PURE__ */ n(U, { reminder: S }),
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,14 +1495,14 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1495
1495
  /* @__PURE__ */ n(
1496
1496
  "div",
1497
1497
  {
1498
- className: k("str-chat__message-inner", {
1499
- "str-chat__simple-message--error-failed": Q || ae
1498
+ className: N("str-chat__message-inner", {
1499
+ "str-chat__simple-message--error-failed": me || te
1500
1500
  }),
1501
1501
  "data-testid": "message-inner",
1502
- onClick: Z,
1503
- onKeyDown: Z,
1504
- role: Z ? "button" : void 0,
1505
- tabIndex: Z ? 0 : void 0,
1502
+ onClick: Q,
1503
+ onKeyDown: Q,
1504
+ role: Q ? "button" : void 0,
1505
+ tabIndex: Q ? 0 : void 0,
1506
1506
  style: {
1507
1507
  // Force margins to 0 to prevent hover layout shift
1508
1508
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
@@ -1510,8 +1510,8 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1510
1510
  marginInlineStart: 0
1511
1511
  },
1512
1512
  children: mt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
- me ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
- E && /* @__PURE__ */ n(E, {}),
1513
+ ee ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
+ T && /* @__PURE__ */ n(T, {}),
1515
1515
  /* @__PURE__ */ n(
1516
1516
  zt.Sent,
1517
1517
  {
@@ -1521,8 +1521,8 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1521
1521
  amountText: (xt = c.metadata) == null ? void 0 : xt.amount_text,
1522
1522
  detail: (wt = c.metadata) == null ? void 0 : wt.attachment_detail,
1523
1523
  paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
1524
- onPreviewClick: () => T == null ? void 0 : T(c, _),
1525
- onFetchSource: async () => await (y == null ? void 0 : y(c, _))
1524
+ onPreviewClick: () => M == null ? void 0 : M(c, x),
1525
+ onFetchSource: async () => await (y == null ? void 0 : y(c, x))
1526
1526
  }
1527
1527
  )
1528
1528
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1535,52 +1535,52 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1535
1535
  amountText: (kt = c.metadata) == null ? void 0 : kt.amount_text,
1536
1536
  detail: (Et = c.metadata) == null ? void 0 : Et.attachment_detail,
1537
1537
  paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
1538
- isUnlocking: L(c.id),
1539
- onUnlockClick: () => T == null ? void 0 : T(c, _),
1540
- onFetchSource: async () => await (y == null ? void 0 : y(c, _)),
1541
- onDownloadClick: () => M == null ? void 0 : M(c, _)
1538
+ isUnlocking: A(c.id),
1539
+ onUnlockClick: () => M == null ? void 0 : M(c, x),
1540
+ onFetchSource: async () => await (y == null ? void 0 : y(c, x)),
1541
+ onDownloadClick: () => R == null ? void 0 : R(c, x)
1542
1542
  }
1543
1543
  ),
1544
- E && /* @__PURE__ */ n(E, {})
1544
+ T && /* @__PURE__ */ n(T, {})
1545
1545
  ] }),
1546
1546
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1547
1547
  Mt,
1548
1548
  {
1549
- message: ie,
1550
- renderText: w
1549
+ message: W,
1550
+ renderText: b
1551
1551
  }
1552
1552
  ) })
1553
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
1557
  he && !ht && /* @__PURE__ */ n(
1558
- Oe,
1558
+ Pe,
1559
1559
  {
1560
1560
  message: c,
1561
1561
  hasAttachment: Le,
1562
- isMyMessage: me
1562
+ isMyMessage: ee
1563
1563
  }
1564
1564
  ),
1565
1565
  dt && /* @__PURE__ */ n(Xn, { poll: dt }),
1566
1566
  V != null && V.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
- S,
1567
+ C,
1568
1568
  {
1569
1569
  actionHandler: l,
1570
1570
  attachments: V
1571
1571
  }
1572
1572
  ) : null,
1573
- K ? /* @__PURE__ */ n(
1574
- x,
1573
+ H ? /* @__PURE__ */ n(
1574
+ w,
1575
1575
  {
1576
- message: ie,
1577
- renderText: w
1576
+ message: W,
1577
+ renderText: b
1578
1578
  }
1579
1579
  ) : /* @__PURE__ */ n(
1580
1580
  Mt,
1581
1581
  {
1582
- message: ie,
1583
- renderText: w
1582
+ message: W,
1583
+ renderText: b
1584
1584
  }
1585
1585
  ),
1586
1586
  /* @__PURE__ */ n(Kn, {})
@@ -1589,42 +1589,42 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1589
1589
  ),
1590
1590
  !mt && !ut && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
1591
  (!he || ht) && /* @__PURE__ */ n(
1592
- Oe,
1592
+ Pe,
1593
1593
  {
1594
1594
  message: c,
1595
1595
  hasAttachment: Le,
1596
- isMyMessage: me
1596
+ isMyMessage: ee
1597
1597
  }
1598
1598
  ),
1599
1599
  s && he && /* @__PURE__ */ n(
1600
- Ea,
1600
+ Ca,
1601
1601
  {
1602
- selected: R,
1603
- onVoteUp: N,
1604
- onVoteDown: A
1602
+ selected: E,
1603
+ onVoteUp: L,
1604
+ onVoteDown: D
1605
1605
  }
1606
1606
  )
1607
1607
  ] }),
1608
1608
  de && /* @__PURE__ */ n(
1609
- Y,
1609
+ J,
1610
1610
  {
1611
1611
  onClick: d,
1612
1612
  reply_count: c.reply_count
1613
1613
  }
1614
1614
  ),
1615
- ue && /* @__PURE__ */ n(H, {})
1615
+ ue && /* @__PURE__ */ n(Z, {})
1616
1616
  ]
1617
1617
  },
1618
1618
  c.id
1619
1619
  )
1620
1620
  ] });
1621
- }, Ia = U.memo(
1622
- Sa,
1621
+ }, Ea = j.memo(
1622
+ ka,
1623
1623
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
1624
- ), Ta = (e) => {
1624
+ ), Sa = (e) => {
1625
1625
  const t = xe("CustomMessage");
1626
- return /* @__PURE__ */ n(Ia, { ...t, ...e });
1627
- }, Aa = () => {
1626
+ return /* @__PURE__ */ n(Ea, { ...t, ...e });
1627
+ }, Ia = () => {
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(
@@ -1637,7 +1637,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1637
1637
  children: /* @__PURE__ */ n(As, { size: 16, weight: "light", "aria-hidden": !0 })
1638
1638
  }
1639
1639
  );
1640
- }, Ma = () => {
1640
+ }, Ta = () => {
1641
1641
  const { handleFlag: e } = xe("CustomMessageActions");
1642
1642
  return /* @__PURE__ */ n(
1643
1643
  Yt,
@@ -1649,19 +1649,19 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1649
1649
  children: /* @__PURE__ */ n(Vt, { size: 16, weight: "light", "aria-hidden": !0 })
1650
1650
  }
1651
1651
  );
1652
- }, Ra = () => {
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
- zs,
1656
+ Os,
1657
1657
  {
1658
1658
  messageActionSet: [
1659
- { Component: Aa, placement: "quick", type: "delete" },
1660
- { Component: Ma, placement: "quick", type: "flag" }
1659
+ { Component: Ia, placement: "quick", type: "delete" },
1660
+ { Component: Ta, placement: "quick", type: "flag" }
1661
1661
  ]
1662
1662
  }
1663
1663
  );
1664
- }, La = ({
1664
+ }, Ma = ({
1665
1665
  link: e,
1666
1666
  onDismiss: t
1667
1667
  }) => {
@@ -1701,26 +1701,26 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1701
1701
  ]
1702
1702
  }
1703
1703
  );
1704
- }, Da = (e) => ({
1704
+ }, Ra = (e) => ({
1705
1705
  linkPreviews: Array.from(e.previews.values()).filter(
1706
1706
  (t) => At.previewIsLoaded(t) || At.previewIsLoading(t)
1707
1707
  )
1708
- }), Pa = () => {
1708
+ }), La = () => {
1709
1709
  const { linkPreviewsManager: e } = Jn(), { linkPreviews: t } = Zn(
1710
1710
  e.state,
1711
- Da
1711
+ Ra
1712
1712
  ), s = (r) => {
1713
1713
  e.dismissPreview(r);
1714
1714
  };
1715
1715
  return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-stretch w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
1716
- La,
1716
+ Ma,
1717
1717
  {
1718
1718
  link: r,
1719
1719
  onDismiss: s
1720
1720
  },
1721
1721
  r.og_scrape_url
1722
1722
  )) }) : null;
1723
- }, cn = U.createContext(!1), Oa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1723
+ }, cn = j.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
1724
  "button",
1725
1725
  {
1726
1726
  ...s,
@@ -1730,14 +1730,14 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1730
1730
  onClick: e,
1731
1731
  children: /* @__PURE__ */ n(Ms, { weight: "bold", className: "size-4" })
1732
1732
  }
1733
- ), za = () => {
1733
+ ), Oa = () => {
1734
1734
  const e = Ae(cn), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
1735
- SendButton: r = Oa,
1735
+ SendButton: r = Da,
1736
1736
  AttachmentPreviewList: i = ns
1737
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
1739
  /* @__PURE__ */ n(ss, {}),
1740
- /* @__PURE__ */ n(Pa, {}),
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(
@@ -1764,7 +1764,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1764
1764
  )
1765
1765
  ] })
1766
1766
  ] });
1767
- }, $a = ({
1767
+ }, Pa = ({
1768
1768
  renderActions: e,
1769
1769
  renderFooter: t,
1770
1770
  disabled: s = !1,
@@ -1772,7 +1772,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1772
1772
  }) => {
1773
1773
  var o;
1774
1774
  const { channel: r } = ce(), 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(ae, { 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,23 +1784,23 @@ const _a = ({ 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(cn.Provider, { value: i, children: /* @__PURE__ */ n(Qn, { Input: za }) })
1787
+ /* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Qn, { Input: Oa }) })
1788
1788
  ]
1789
1789
  }
1790
1790
  ),
1791
1791
  t == null ? void 0 : t()
1792
1792
  ] });
1793
- }, Fa = [
1793
+ }, za = [
1794
1794
  "SYSTEM_DM_AGENT_PAUSED",
1795
1795
  "SYSTEM_DM_AGENT_RESUMED"
1796
- ], Ba = {
1796
+ ], $a = {
1797
1797
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1798
1798
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1799
- }, Ua = [
1799
+ }, Fa = [
1800
1800
  "SYSTEM_AGE_SAFETY_BLOCKED"
1801
- ], ja = {
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.", Va = "https://linktr.ee/s/about/contact", Ft = (e) => Fa.includes(e), Ga = (e) => Ua.includes(e), Ha = (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
1806
  if (Ft(t))
@@ -1808,7 +1808,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1808
1808
  kind: "dm-agent",
1809
1809
  type: t
1810
1810
  };
1811
- if (Ga(t))
1811
+ if (ja(t))
1812
1812
  return {
1813
1813
  kind: "age-safety",
1814
1814
  type: t
@@ -1819,17 +1819,17 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1819
1819
  kind: "dm-agent",
1820
1820
  type: s
1821
1821
  };
1822
- }, Ya = (e) => {
1822
+ }, Ga = (e) => {
1823
1823
  const t = e.indexOf(ze);
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(ae, { children: [
1828
1828
  e.slice(0, t),
1829
1829
  /* @__PURE__ */ n(
1830
1830
  "a",
1831
1831
  {
1832
- href: Va,
1832
+ href: Ua,
1833
1833
  target: "_blank",
1834
1834
  rel: "noopener noreferrer",
1835
1835
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -1838,13 +1838,13 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1838
1838
  ),
1839
1839
  e.slice(s)
1840
1840
  ] });
1841
- }, qa = (e) => {
1841
+ }, Ha = (e) => {
1842
1842
  var a, r;
1843
- const t = e.message.hide_date === !0, s = Ha(
1843
+ const t = e.message.hide_date === !0, s = Va(
1844
1844
  e.message
1845
1845
  );
1846
1846
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1847
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ba[s.type];
1847
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || $a[s.type];
1848
1848
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1849
1849
  /* @__PURE__ */ h(
1850
1850
  "div",
@@ -1870,7 +1870,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1870
1870
  ] });
1871
1871
  }
1872
1872
  if ((s == null ? void 0 : s.kind) === "age-safety") {
1873
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || ja[s.type];
1873
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ba[s.type];
1874
1874
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1875
1875
  /* @__PURE__ */ h(
1876
1876
  "div",
@@ -1889,7 +1889,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1889
1889
  "data-testid": "age-safety-system-message-icon"
1890
1890
  }
1891
1891
  ),
1892
- /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ya(i) }) })
1892
+ /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ga(i) }) })
1893
1893
  ]
1894
1894
  }
1895
1895
  ),
@@ -1914,21 +1914,21 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1914
1914
  begin: `${120 * t}ms`,
1915
1915
  repeatCount: "indefinite"
1916
1916
  }
1917
- ) }), Wa = /* @__PURE__ */ new Set([
1918
- Pe.Thinking,
1919
- Pe.Generating,
1920
- Pe.ExternalSources
1921
- ]), Xa = ({ threadList: e }) => {
1922
- var w, b;
1917
+ ) }), Ya = /* @__PURE__ */ new Set([
1918
+ Oe.Thinking,
1919
+ Oe.Generating,
1920
+ Oe.ExternalSources
1921
+ ]), qa = ({ threadList: e }) => {
1922
+ var b, _;
1923
1923
  const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = We(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = Ae(dn);
1924
- if (!e && l && Wa.has(o)) {
1925
- const p = Ka(t, (w = r.user) == null ? void 0 : w.id);
1924
+ if (!e && l && Ya.has(o)) {
1925
+ const v = Wa(t, (b = r.user) == null ? void 0 : b.id);
1926
1926
  return /* @__PURE__ */ n(
1927
1927
  Bt,
1928
1928
  {
1929
- avatarId: (p == null ? void 0 : p.id) ?? "ai-agent",
1930
- avatarName: (p == null ? void 0 : p.name) ?? (p == null ? void 0 : p.id) ?? "Agent",
1931
- avatarImage: p == null ? void 0 : p.image,
1929
+ avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
1930
+ avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
1931
+ avatarImage: v == null ? void 0 : v.image,
1932
1932
  testId: "typing-indicator-ai"
1933
1933
  }
1934
1934
  );
@@ -1936,19 +1936,19 @@ const _a = ({ 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: v }) => {
1940
- var _;
1941
- return (v == null ? void 0 : v.id) !== ((_ = r.user) == null ? void 0 : _.id) && !p;
1939
+ ({ parent_id: v, user: p }) => {
1940
+ var x;
1941
+ return (p == null ? void 0 : p.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
1942
1942
  }
1943
1943
  ), g = e ? Object.values(i).filter(
1944
- ({ parent_id: p, user: v }) => {
1945
- var _;
1946
- return (v == null ? void 0 : v.id) !== ((_ = r.user) == null ? void 0 : _.id) && p === (a == null ? void 0 : a.id);
1944
+ ({ parent_id: v, user: p }) => {
1945
+ var x;
1946
+ return (p == null ? void 0 : p.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (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 = (b = u[0]) == null ? void 0 : b.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1951
+ const f = (_ = u[0]) == null ? void 0 : _.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
1953
  Bt,
1954
1954
  {
@@ -1973,7 +1973,7 @@ const _a = ({ 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,
@@ -2002,7 +2002,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
2002
2002
  ] })
2003
2003
  }
2004
2004
  );
2005
- function Ka(e, t) {
2005
+ function Wa(e, t) {
2006
2006
  var a;
2007
2007
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2008
2008
  for (const r of Object.values(s)) {
@@ -2011,10 +2011,10 @@ function Ka(e, t) {
2011
2011
  return i;
2012
2012
  }
2013
2013
  }
2014
- const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2014
+ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2015
2015
  "div",
2016
2016
  {
2017
- className: k("flex items-center justify-center h-full", e),
2017
+ className: N("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,24 +2054,12 @@ const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2054
2054
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2055
2055
  ]
2056
2056
  }
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
- /* @__PURE__ */ n(Za, { className: "w-6 h-6" }),
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: [
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 He = ({
2063
- className: e,
2064
- size: t = 16
2065
- }) => /* @__PURE__ */ n(
2066
- Ls,
2067
- {
2068
- weight: "fill",
2069
- size: t,
2070
- className: k("shrink-0 text-[#1D9BF0]", e),
2071
- "aria-label": "Verified",
2072
- role: "img"
2073
- }
2074
- ), oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Qa = ({
2062
+ const oe = "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 = ({
2075
2063
  onBack: e,
2076
2064
  showBackButton: t,
2077
2065
  showStarButton: s = !1,
@@ -2086,29 +2074,30 @@ const He = ({
2086
2074
  onReportParticipantClick: u,
2087
2075
  customChannelActions: f,
2088
2076
  renderChannelActions: c,
2089
- showChannelInfo: w = !0,
2090
- renderHeaderTitleBadges: b
2077
+ showChannelInfo: b = !0,
2078
+ onParticipantNameClick: _,
2079
+ renderHeaderTitleBadges: v
2091
2080
  }) => {
2092
- var P, D, R, N, A, S;
2093
- const { channel: p } = ce(), v = U.useMemo(() => {
2094
- var O, F;
2095
- const I = (O = p._client) == null ? void 0 : O.userID;
2096
- return I ? Object.values(((F = p.state) == null ? void 0 : F.members) || {}).find(
2097
- (j) => {
2098
- var H;
2099
- return ((H = j.user) == null ? void 0 : H.id) && j.user.id !== I;
2081
+ var P, S, E, L, D;
2082
+ const { channel: p } = ce(), x = j.useMemo(() => {
2083
+ var T, O;
2084
+ const C = (T = p._client) == null ? void 0 : T.userID;
2085
+ return C ? Object.values(((O = p.state) == null ? void 0 : O.members) || {}).find(
2086
+ (F) => {
2087
+ var Y;
2088
+ return ((Y = F.user) == null ? void 0 : Y.id) && F.user.id !== C;
2100
2089
  }
2101
2090
  ) : void 0;
2102
- }, [(P = p._client) == null ? void 0 : P.userID, (D = p.state) == null ? void 0 : D.members]), _ = Xt(v == null ? void 0 : v.user), L = (R = v == null ? void 0 : v.user) == null ? void 0 : R.image, T = ((N = v == null ? void 0 : v.user) == null ? void 0 : N.is_verified) === !0, y = Wt(p), M = b == null ? void 0 : b({
2091
+ }, [(P = p._client) == null ? void 0 : P.userID, (S = p.state) == null ? void 0 : S.members]), A = Xt(x == null ? void 0 : x.user), M = (E = x == null ? void 0 : x.user) == null ? void 0 : E.image, y = Wt(p), R = v == null ? void 0 : v({
2103
2092
  channel: p,
2104
- participant: v
2105
- }), $ = async () => {
2093
+ participant: x
2094
+ }), z = async () => {
2106
2095
  try {
2107
2096
  y ? await p.unpin() : await p.pin();
2108
- } catch (I) {
2097
+ } catch (C) {
2109
2098
  console.error(
2110
2099
  "[CustomChannelHeader] Failed to update pinned status:",
2111
- I
2100
+ C
2112
2101
  );
2113
2102
  }
2114
2103
  };
@@ -2117,7 +2106,7 @@ const He = ({
2117
2106
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2118
2107
  "button",
2119
2108
  {
2120
- className: k(
2109
+ className: N(
2121
2110
  oe,
2122
2111
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2123
2112
  ),
@@ -2130,20 +2119,32 @@ const He = ({
2130
2119
  ) }),
2131
2120
  /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2132
2121
  /* @__PURE__ */ n(
2133
- re,
2122
+ ie,
2134
2123
  {
2135
- id: ((A = v == null ? void 0 : v.user) == null ? void 0 : A.id) || p.id || "unknown",
2136
- name: _,
2137
- image: L,
2124
+ id: ((L = x == null ? void 0 : x.user) == null ? void 0 : L.id) || p.id || "unknown",
2125
+ name: A,
2126
+ image: M,
2138
2127
  starred: s && y,
2139
2128
  dmAgentEnabled: a,
2140
2129
  size: 48
2141
2130
  }
2142
2131
  ),
2143
- /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
2144
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: _ }),
2145
- T && /* @__PURE__ */ n(He, {}),
2146
- M && /* @__PURE__ */ n("span", { className: "shrink-0", children: M })
2132
+ _ ? /* @__PURE__ */ h(
2133
+ "button",
2134
+ {
2135
+ type: "button",
2136
+ onClick: _,
2137
+ "aria-label": `View details for ${A}`,
2138
+ 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",
2139
+ children: [
2140
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2141
+ R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
2142
+ /* @__PURE__ */ n(Ve, { className: "size-3 shrink-0", weight: "bold" })
2143
+ ]
2144
+ }
2145
+ ) : /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
2146
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2147
+ R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
2147
2148
  ] }),
2148
2149
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2149
2150
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
@@ -2155,13 +2156,13 @@ const He = ({
2155
2156
  "button",
2156
2157
  {
2157
2158
  className: oe,
2158
- onClick: $,
2159
+ onClick: z,
2159
2160
  type: "button",
2160
2161
  "aria-label": y ? "Unstar conversation" : "Star conversation",
2161
2162
  children: /* @__PURE__ */ n(
2162
2163
  Be,
2163
2164
  {
2164
- className: k("size-5", {
2165
+ className: N("size-5", {
2165
2166
  "text-yellow-600": y,
2166
2167
  "text-black/90": !y
2167
2168
  }),
@@ -2170,11 +2171,11 @@ const He = ({
2170
2171
  )
2171
2172
  }
2172
2173
  ),
2173
- w && (c !== void 0 ? c : /* @__PURE__ */ n(
2174
- Ot,
2174
+ b && (c !== void 0 ? c : /* @__PURE__ */ n(
2175
+ Pt,
2175
2176
  {
2176
2177
  channel: p,
2177
- participant: v,
2178
+ participant: x,
2178
2179
  showDeleteConversation: o,
2179
2180
  showBlockParticipant: l,
2180
2181
  showReportParticipant: d,
@@ -2184,7 +2185,7 @@ const He = ({
2184
2185
  onBlockParticipantClick: g,
2185
2186
  onReportParticipantClick: u,
2186
2187
  customChannelActions: f,
2187
- triggerClassName: k(oe, "bg-[#F1F0EE]")
2188
+ triggerClassName: N(oe, "bg-[#F1F0EE]")
2188
2189
  }
2189
2190
  ))
2190
2191
  ] })
@@ -2194,7 +2195,7 @@ const He = ({
2194
2195
  t && e && /* @__PURE__ */ n(
2195
2196
  "button",
2196
2197
  {
2197
- className: k(
2198
+ className: N(
2198
2199
  oe,
2199
2200
  "messaging-channel-view-back-button-desktop"
2200
2201
  ),
@@ -2205,21 +2206,33 @@ const He = ({
2205
2206
  }
2206
2207
  ),
2207
2208
  /* @__PURE__ */ n(
2208
- re,
2209
+ ie,
2209
2210
  {
2210
- id: ((S = v == null ? void 0 : v.user) == null ? void 0 : S.id) || p.id || "unknown",
2211
- name: _,
2212
- image: L,
2211
+ id: ((D = x == null ? void 0 : x.user) == null ? void 0 : D.id) || p.id || "unknown",
2212
+ name: A,
2213
+ image: M,
2213
2214
  starred: s && y,
2214
2215
  dmAgentEnabled: a,
2215
2216
  size: 48
2216
2217
  }
2217
2218
  ),
2218
2219
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2219
- /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2220
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: _ }),
2221
- T && /* @__PURE__ */ n(He, {}),
2222
- M && /* @__PURE__ */ n("span", { className: "shrink-0", children: M })
2220
+ _ ? /* @__PURE__ */ h(
2221
+ "button",
2222
+ {
2223
+ type: "button",
2224
+ onClick: _,
2225
+ "aria-label": `View details for ${A}`,
2226
+ className: "flex min-w-0 max-w-full items-center gap-1 rounded font-medium text-black/90 transition-opacity hover:opacity-70",
2227
+ children: [
2228
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2229
+ R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
2230
+ /* @__PURE__ */ n(Ve, { className: "size-4 shrink-0", weight: "bold" })
2231
+ ]
2232
+ }
2233
+ ) : /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2234
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2235
+ R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
2223
2236
  ] }),
2224
2237
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2225
2238
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
@@ -2232,13 +2245,13 @@ const He = ({
2232
2245
  "button",
2233
2246
  {
2234
2247
  className: oe,
2235
- onClick: $,
2248
+ onClick: z,
2236
2249
  type: "button",
2237
2250
  "aria-label": y ? "Unstar conversation" : "Star conversation",
2238
2251
  children: /* @__PURE__ */ n(
2239
2252
  Be,
2240
2253
  {
2241
- className: k("size-6", {
2254
+ className: N("size-6", {
2242
2255
  "text-yellow-600": y,
2243
2256
  "text-black/90": !y
2244
2257
  }),
@@ -2247,11 +2260,11 @@ const He = ({
2247
2260
  )
2248
2261
  }
2249
2262
  ),
2250
- w && (c !== void 0 ? c : /* @__PURE__ */ n(
2251
- Ot,
2263
+ b && (c !== void 0 ? c : /* @__PURE__ */ n(
2264
+ Pt,
2252
2265
  {
2253
2266
  channel: p,
2254
- participant: v,
2267
+ participant: x,
2255
2268
  showDeleteConversation: o,
2256
2269
  showBlockParticipant: l,
2257
2270
  showReportParticipant: d,
@@ -2267,7 +2280,7 @@ const He = ({
2267
2280
  ] })
2268
2281
  ] })
2269
2282
  ] });
2270
- }, er = ({
2283
+ }, Za = ({
2271
2284
  onBack: e,
2272
2285
  showBackButton: t,
2273
2286
  renderMessageInputActions: s,
@@ -2282,65 +2295,66 @@ const He = ({
2282
2295
  showBlockParticipant: u = !0,
2283
2296
  showReportParticipant: f = !0,
2284
2297
  composerDisabled: c = !1,
2285
- composerDisabledReason: w,
2286
- showStarButton: b = !1,
2287
- chatbotVotingEnabled: p = !1,
2288
- renderChannelBanner: v,
2289
- renderHeaderTitleBadges: _,
2290
- customChannelActions: L,
2291
- renderChannelActions: T,
2298
+ composerDisabledReason: b,
2299
+ showStarButton: _ = !1,
2300
+ chatbotVotingEnabled: v = !1,
2301
+ renderChannelBanner: p,
2302
+ renderHeaderTitleBadges: x,
2303
+ customChannelActions: A,
2304
+ renderChannelActions: M,
2292
2305
  renderMessage: y,
2293
- dmAgentEnabled: M = !1,
2294
- viewerLanguage: $,
2295
- showChannelInfo: P = !0
2306
+ dmAgentEnabled: R = !1,
2307
+ viewerLanguage: z,
2308
+ showChannelInfo: P = !0,
2309
+ onParticipantNameClick: S
2296
2310
  }) => {
2297
- var O, F, j, H, Y, W;
2298
- const { channel: D } = ce(), R = U.useMemo(() => {
2299
- var B, q;
2300
- const x = (B = D._client) == null ? void 0 : B.userID;
2301
- return x ? Object.values(((q = D.state) == null ? void 0 : q.members) || {}).find(
2302
- (K) => {
2303
- var V;
2304
- return ((V = K.user) == null ? void 0 : V.id) && K.user.id !== x;
2311
+ var F, Y, Z, J, U, w;
2312
+ const { channel: E } = ce(), L = j.useMemo(() => {
2313
+ var q, H;
2314
+ const k = (q = E._client) == null ? void 0 : q.userID;
2315
+ return k ? Object.values(((H = E.state) == null ? void 0 : H.members) || {}).find(
2316
+ (V) => {
2317
+ var W;
2318
+ return ((W = V.user) == null ? void 0 : W.id) && V.user.id !== k;
2305
2319
  }
2306
2320
  ) : void 0;
2307
- }, [(O = D._client) == null ? void 0 : O.userID, (F = D.state) == null ? void 0 : F.members]), N = U.useMemo(() => {
2308
- var B, q;
2309
- const x = (B = D._client) == null ? void 0 : B.userID;
2310
- return x ? Object.values(((q = D.state) == null ? void 0 : q.members) || {}).find((K) => {
2311
- var V;
2312
- return ((V = K.user) == null ? void 0 : V.id) === x;
2321
+ }, [(F = E._client) == null ? void 0 : F.userID, (Y = E.state) == null ? void 0 : Y.members]), D = j.useMemo(() => {
2322
+ var q, H;
2323
+ const k = (q = E._client) == null ? void 0 : q.userID;
2324
+ return k ? Object.values(((H = E.state) == null ? void 0 : H.members) || {}).find((V) => {
2325
+ var W;
2326
+ return ((W = V.user) == null ? void 0 : W.id) === k;
2313
2327
  }) : void 0;
2314
- }, [(j = D._client) == null ? void 0 : j.userID, (H = D.state) == null ? void 0 : H.members]), A = ((Y = N == null ? void 0 : N.user) == null ? void 0 : Y.is_account) ?? (N == null ? void 0 : N.is_account), S = ((W = R == null ? void 0 : R.user) == null ? void 0 : W.is_account) ?? (R == null ? void 0 : R.is_account), I = M && A === !1 && S === !0, E = J(
2315
- (x) => {
2316
- const { message: C } = xe("ChannelView"), B = /* @__PURE__ */ n(
2317
- Ta,
2328
+ }, [(Z = E._client) == null ? void 0 : Z.userID, (J = E.state) == null ? void 0 : J.members]), C = ((U = D == null ? void 0 : D.user) == null ? void 0 : U.is_account) ?? (D == null ? void 0 : D.is_account), I = ((w = L == null ? void 0 : L.user) == null ? void 0 : w.is_account) ?? (L == null ? void 0 : L.is_account), T = R && C === !1 && I === !0, O = K(
2329
+ (k) => {
2330
+ const { message: B } = xe("ChannelView"), q = /* @__PURE__ */ n(
2331
+ Sa,
2318
2332
  {
2319
- ...x,
2320
- chatbotVotingEnabled: p,
2321
- viewerLanguage: $
2333
+ ...k,
2334
+ chatbotVotingEnabled: v,
2335
+ viewerLanguage: z
2322
2336
  }
2323
2337
  );
2324
- return !y || !C ? B : y(B, C);
2338
+ return !y || !B ? q : y(q, B);
2325
2339
  },
2326
- [p, y, $]
2340
+ [v, y, z]
2327
2341
  );
2328
- return /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
2342
+ return /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(
2329
2343
  ls,
2330
2344
  {
2331
2345
  overrides: {
2332
- Message: E,
2333
- MessageActions: Ra
2346
+ Message: O,
2347
+ MessageActions: Aa
2334
2348
  },
2335
2349
  children: /* @__PURE__ */ h(cs, { children: [
2336
2350
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2337
- Qa,
2351
+ Ja,
2338
2352
  {
2339
2353
  onBack: e,
2340
2354
  showBackButton: t,
2341
2355
  showChannelInfo: P,
2342
- showStarButton: b,
2343
- dmAgentEnabled: I,
2356
+ showStarButton: _,
2357
+ dmAgentEnabled: T,
2344
2358
  onLeaveConversation: i,
2345
2359
  onBlockParticipant: o,
2346
2360
  showDeleteConversation: l,
@@ -2349,12 +2363,13 @@ const He = ({
2349
2363
  onDeleteConversationClick: d,
2350
2364
  onBlockParticipantClick: m,
2351
2365
  onReportParticipantClick: g,
2352
- customChannelActions: L,
2353
- renderChannelActions: T,
2354
- renderHeaderTitleBadges: _
2366
+ customChannelActions: A,
2367
+ renderChannelActions: M,
2368
+ onParticipantNameClick: S,
2369
+ renderHeaderTitleBadges: x
2355
2370
  }
2356
2371
  ) }, "lt-channel-header"),
2357
- v ? /* @__PURE__ */ n(U.Fragment, { children: v() }, "lt-channel-banner") : null,
2372
+ p ? /* @__PURE__ */ n(j.Fragment, { children: p() }, "lt-channel-banner") : null,
2358
2373
  /* @__PURE__ */ n(
2359
2374
  "div",
2360
2375
  {
@@ -2363,23 +2378,23 @@ const He = ({
2363
2378
  },
2364
2379
  "lt-channel-message-list"
2365
2380
  ),
2366
- r ? /* @__PURE__ */ n(U.Fragment, { children: r(D) }, "lt-channel-conversation-footer") : null,
2381
+ r ? /* @__PURE__ */ n(j.Fragment, { children: r(E) }, "lt-channel-conversation-footer") : null,
2367
2382
  /* @__PURE__ */ n(
2368
- $a,
2383
+ Pa,
2369
2384
  {
2370
2385
  ...s && {
2371
- renderActions: () => s == null ? void 0 : s(D)
2386
+ renderActions: () => s == null ? void 0 : s(E)
2372
2387
  },
2373
- renderFooter: () => a == null ? void 0 : a(D),
2388
+ renderFooter: () => a == null ? void 0 : a(E),
2374
2389
  disabled: c,
2375
- disabledReason: w
2390
+ disabledReason: b
2376
2391
  },
2377
2392
  "lt-channel-message-input"
2378
2393
  )
2379
2394
  ] })
2380
2395
  }
2381
2396
  ) });
2382
- }, un = U.memo(
2397
+ }, un = j.memo(
2383
2398
  ({
2384
2399
  channel: e,
2385
2400
  onBack: t,
@@ -2390,84 +2405,85 @@ const He = ({
2390
2405
  onLeaveConversation: o,
2391
2406
  onBlockParticipant: l,
2392
2407
  className: d,
2393
- CustomChannelEmptyState: m = Ja,
2408
+ CustomChannelEmptyState: m = Xa,
2394
2409
  showDeleteConversation: g = !0,
2395
2410
  onDeleteConversationClick: u,
2396
2411
  onBlockParticipantClick: f,
2397
2412
  onReportParticipantClick: c,
2398
- showBlockParticipant: w = !0,
2399
- showReportParticipant: b = !0,
2400
- composerDisabled: p = !1,
2401
- composerDisabledReason: v,
2402
- dmAgentEnabled: _,
2403
- messageMetadata: L,
2404
- onMessageSent: T,
2413
+ showBlockParticipant: b = !0,
2414
+ showReportParticipant: _ = !0,
2415
+ composerDisabled: v = !1,
2416
+ composerDisabledReason: p,
2417
+ dmAgentEnabled: x,
2418
+ messageMetadata: A,
2419
+ onMessageSent: M,
2405
2420
  showStarButton: y = !1,
2406
- chatbotVotingEnabled: M = !1,
2407
- renderChannelBanner: $,
2421
+ chatbotVotingEnabled: R = !1,
2422
+ renderChannelBanner: z,
2408
2423
  renderHeaderTitleBadges: P,
2409
- customChannelActions: D,
2410
- renderChannelActions: R,
2411
- renderMessage: N,
2412
- onMessageLinkClick: A,
2413
- sendButton: S,
2424
+ customChannelActions: S,
2425
+ renderChannelActions: E,
2426
+ renderMessage: L,
2427
+ onMessageLinkClick: D,
2428
+ sendButton: C,
2414
2429
  attachmentPreviewList: I,
2415
- viewerLanguage: E,
2416
- showChannelInfo: O = !0
2430
+ viewerLanguage: T,
2431
+ showChannelInfo: O = !0,
2432
+ onParticipantNameClick: F
2417
2433
  }) => {
2418
- const F = J(
2419
- async (H, Y, W) => {
2420
- var V;
2421
- const x = ((V = e.data) == null ? void 0 : V.chatbot_paused) === !0, C = _ && !x, B = {
2422
- ...Y,
2423
- ...C && { silent: !0 },
2424
- ...L && {
2434
+ const Y = K(
2435
+ async (J, U, w) => {
2436
+ var W;
2437
+ const k = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, B = x && !k, q = {
2438
+ ...U,
2439
+ ...B && { silent: !0 },
2440
+ ...A && {
2425
2441
  metadata: {
2426
- ...Y.metadata ?? {},
2427
- ...L
2442
+ ...U.metadata ?? {},
2443
+ ...A
2428
2444
  }
2429
2445
  }
2430
- }, q = {
2431
- ...W,
2432
- ...C && { skip_push: !0 }
2433
- }, K = await e.sendMessage(B, q);
2434
- return T == null || T(K), K;
2446
+ }, H = {
2447
+ ...w,
2448
+ ...B && { skip_push: !0 }
2449
+ }, V = await e.sendMessage(q, H);
2450
+ return M == null || M(V), V;
2435
2451
  },
2436
- [e, _, L, T]
2437
- ), j = G(null);
2452
+ [e, x, A, M]
2453
+ ), Z = G(null);
2438
2454
  return X(() => {
2439
- if (!A) return;
2440
- const H = j.current;
2441
- if (!H) return;
2442
- const Y = (W) => {
2443
- const x = W.target, C = x == null ? void 0 : x.closest("a[href]"), B = C == null ? void 0 : C.getAttribute("href");
2444
- if (!B) return;
2445
- const q = C == null ? void 0 : C.closest("[data-message-id]"), K = q == null ? void 0 : q.getAttribute("data-message-id"), V = K ? e.state.messages.find((ie) => ie.id === K) : void 0;
2446
- A(B, V);
2455
+ if (!D) return;
2456
+ const J = Z.current;
2457
+ if (!J) return;
2458
+ const U = (w) => {
2459
+ const k = w.target, B = k == null ? void 0 : k.closest("a[href]"), q = B == null ? void 0 : B.getAttribute("href");
2460
+ if (!q) return;
2461
+ const H = B == null ? void 0 : B.closest("[data-message-id]"), V = H == null ? void 0 : H.getAttribute("data-message-id"), W = V ? e.state.messages.find((de) => de.id === V) : void 0;
2462
+ D(q, W);
2447
2463
  };
2448
- return H.addEventListener("click", Y), () => H.removeEventListener("click", Y);
2449
- }, [A, e]), /* @__PURE__ */ n(
2464
+ return J.addEventListener("click", U), () => J.removeEventListener("click", U);
2465
+ }, [D, e]), /* @__PURE__ */ n(
2450
2466
  "div",
2451
2467
  {
2452
- ref: j,
2453
- className: k(
2468
+ ref: Z,
2469
+ className: N(
2454
2470
  "messaging-channel-view h-full flex flex-col",
2455
2471
  d
2456
2472
  ),
2457
- children: /* @__PURE__ */ n(dn.Provider, { value: _ ?? !1, children: /* @__PURE__ */ n(
2473
+ children: /* @__PURE__ */ n(dn.Provider, { value: x ?? !1, children: /* @__PURE__ */ n(
2458
2474
  os,
2459
2475
  {
2460
2476
  channel: e,
2461
- MessageSystem: qa,
2477
+ MessageSystem: Ha,
2462
2478
  EmptyStateIndicator: m,
2463
2479
  LoadingIndicator: Se,
2464
- DateSeparator: Hs,
2465
- TypingIndicator: Xa,
2466
- doSendMessageRequest: F,
2467
- ...S ? { SendButton: S } : {},
2480
+ DateSeparator: Vs,
2481
+ TypingIndicator: qa,
2482
+ doSendMessageRequest: Y,
2483
+ ...C ? { SendButton: C } : {},
2468
2484
  ...I ? { AttachmentPreviewList: I } : {},
2469
2485
  children: /* @__PURE__ */ n(
2470
- er,
2486
+ Za,
2471
2487
  {
2472
2488
  onBack: t,
2473
2489
  showBackButton: s,
@@ -2481,20 +2497,21 @@ const He = ({
2481
2497
  onDeleteConversationClick: u,
2482
2498
  onBlockParticipantClick: f,
2483
2499
  onReportParticipantClick: c,
2484
- showBlockParticipant: w,
2485
- showReportParticipant: b,
2486
- composerDisabled: p,
2487
- composerDisabledReason: v,
2500
+ showBlockParticipant: b,
2501
+ showReportParticipant: _,
2502
+ composerDisabled: v,
2503
+ composerDisabledReason: p,
2488
2504
  showStarButton: y,
2489
- dmAgentEnabled: _,
2490
- chatbotVotingEnabled: M,
2491
- renderChannelBanner: $,
2505
+ dmAgentEnabled: x,
2506
+ chatbotVotingEnabled: R,
2507
+ renderChannelBanner: z,
2492
2508
  renderHeaderTitleBadges: P,
2493
- customChannelActions: D,
2494
- renderChannelActions: R,
2495
- renderMessage: N,
2496
- viewerLanguage: E,
2497
- showChannelInfo: O
2509
+ customChannelActions: S,
2510
+ renderChannelActions: E,
2511
+ renderMessage: L,
2512
+ viewerLanguage: T,
2513
+ showChannelInfo: O,
2514
+ onParticipantNameClick: F
2498
2515
  }
2499
2516
  )
2500
2517
  }
@@ -2504,7 +2521,7 @@ const He = ({
2504
2521
  }
2505
2522
  );
2506
2523
  un.displayName = "ChannelView";
2507
- 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: [
2524
+ 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: [
2508
2525
  /* @__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: "⚠️" }) }),
2509
2526
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2510
2527
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2519,7 +2536,7 @@ const be = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2519
2536
  )
2520
2537
  ] }) }));
2521
2538
  be.displayName = "ErrorState";
2522
- const Si = ({
2539
+ const ki = ({
2523
2540
  capabilities: e = {},
2524
2541
  renderMessageInputActions: t,
2525
2542
  renderConversationFooter: s,
@@ -2534,157 +2551,159 @@ const Si = ({
2534
2551
  onMessageSent: u,
2535
2552
  chatbotVotingEnabled: f = !1,
2536
2553
  viewerLanguage: c,
2537
- renderHeaderTitleBadges: w,
2538
- renderChannelBanner: b,
2539
- customChannelActions: p,
2540
- renderChannelActions: v,
2541
- renderMessage: _,
2542
- onMessageLinkClick: L,
2543
- showChannelInfo: T
2554
+ renderHeaderTitleBadges: b,
2555
+ renderChannelBanner: _,
2556
+ customChannelActions: v,
2557
+ renderChannelActions: p,
2558
+ onParticipantNameClick: x,
2559
+ renderMessage: A,
2560
+ onMessageLinkClick: M,
2561
+ showChannelInfo: y
2544
2562
  }) => {
2545
2563
  const {
2546
- client: y,
2547
- isConnected: M,
2548
- isLoading: $,
2549
- error: P,
2550
- refreshConnection: D,
2551
- service: R,
2552
- debug: N
2553
- } = $s(), [A, S] = z(null), [I, E] = z(null), [O, F] = z(!1), { showDeleteConversation: j = !0 } = e, H = G(o);
2554
- H.current = o;
2555
- const Y = G(a);
2556
- Y.current = a;
2557
- const W = G(null), x = G(null);
2564
+ client: R,
2565
+ isConnected: z,
2566
+ isLoading: P,
2567
+ error: S,
2568
+ refreshConnection: E,
2569
+ service: L,
2570
+ debug: D
2571
+ } = Ps(), [C, I] = $(null), [T, O] = $(null), [F, Y] = $(!1), { showDeleteConversation: Z = !0 } = e, J = G(o);
2572
+ J.current = o;
2573
+ const U = G(a);
2574
+ U.current = a;
2575
+ const w = G(null), k = G(null);
2558
2576
  X(() => {
2559
- x.current = A;
2560
- }, [A]), X(() => {
2561
- if (!y || !M) return;
2562
- const q = y.userID;
2563
- if (!q) return;
2564
- const K = `${q}::${i}`;
2565
- if (W.current === K) return;
2566
- W.current = K;
2567
- const V = () => {
2568
- W.current === K && (W.current = null);
2577
+ k.current = C;
2578
+ }, [C]), X(() => {
2579
+ if (!R || !z) return;
2580
+ const H = R.userID;
2581
+ if (!H) return;
2582
+ const V = `${H}::${i}`;
2583
+ if (w.current === V) return;
2584
+ w.current = V;
2585
+ const W = () => {
2586
+ w.current === V && (w.current = null);
2569
2587
  };
2570
2588
  (async () => {
2571
- var de, ue;
2589
+ var ue, me;
2572
2590
  try {
2573
- N && console.log(
2591
+ D && console.log(
2574
2592
  "[MessagingShell] Loading initial conversation with:",
2575
2593
  i
2576
2594
  );
2577
- const Q = await y.queryChannels(
2595
+ const te = await R.queryChannels(
2578
2596
  {
2579
2597
  type: "messaging",
2580
- members: { $eq: [q, i] }
2598
+ members: { $eq: [H, i] }
2581
2599
  },
2582
2600
  {},
2583
2601
  { limit: 1 }
2584
2602
  );
2585
- if (Q.length > 0) {
2586
- S(Q[0]), E(null), (de = Y.current) == null || de.call(Y, Q[0]), N && console.log(
2603
+ if (te.length > 0) {
2604
+ I(te[0]), O(null), (ue = U.current) == null || ue.call(U, te[0]), D && console.log(
2587
2605
  "[MessagingShell] Initial conversation loaded:",
2588
- Q[0].id
2606
+ te[0].id
2589
2607
  );
2590
2608
  return;
2591
2609
  }
2592
- const ae = H.current;
2593
- if (!ae || !R) {
2594
- V(), E("No conversation found with this account"), N && console.log(
2610
+ const Q = J.current;
2611
+ if (!Q || !L) {
2612
+ W(), O("No conversation found with this account"), D && console.log(
2595
2613
  "[MessagingShell] No conversation found for:",
2596
2614
  i
2597
2615
  );
2598
2616
  return;
2599
2617
  }
2600
2618
  try {
2601
- const Z = await R.startChannelWithParticipant({
2602
- id: ae.id,
2603
- name: ae.name,
2604
- phone: ae.phone
2619
+ const ee = await L.startChannelWithParticipant({
2620
+ id: Q.id,
2621
+ name: Q.name,
2622
+ phone: Q.phone
2605
2623
  });
2606
- S(Z), E(null), (ue = Y.current) == null || ue.call(Y, Z), N && console.log(
2624
+ I(ee), O(null), (me = U.current) == null || me.call(U, ee), D && console.log(
2607
2625
  "[MessagingShell] Channel created and loaded:",
2608
- Z.id
2626
+ ee.id
2609
2627
  );
2610
- } catch (Z) {
2628
+ } catch (ee) {
2611
2629
  console.error(
2612
2630
  "[MessagingShell] Failed to create conversation:",
2613
- Z
2614
- ), V(), E("Failed to create conversation");
2631
+ ee
2632
+ ), W(), O("Failed to create conversation");
2615
2633
  }
2616
- } catch (Q) {
2634
+ } catch (te) {
2617
2635
  console.error(
2618
2636
  "[MessagingShell] Failed to load initial conversation:",
2619
- Q
2620
- ), V(), x.current || E("Failed to load conversation");
2637
+ te
2638
+ ), W(), k.current || O("Failed to load conversation");
2621
2639
  }
2622
2640
  })();
2623
- }, [i, y, M, R, N]);
2624
- const C = G(r);
2625
- C.current = r;
2626
- const B = J(() => {
2627
- var q;
2628
- S(null), F(!0), (q = C.current) == null || q.call(C);
2641
+ }, [i, R, z, L, D]);
2642
+ const B = G(r);
2643
+ B.current = r;
2644
+ const q = K(() => {
2645
+ var H;
2646
+ I(null), Y(!0), (H = B.current) == null || H.call(B);
2629
2647
  }, []);
2630
- return $ ? /* @__PURE__ */ n(Se, {}) : P ? /* @__PURE__ */ n(be, { message: P, onBack: D }) : !M || !y ? /* @__PURE__ */ n(
2648
+ return P ? /* @__PURE__ */ n(Se, {}) : S ? /* @__PURE__ */ n(be, { message: S, onBack: E }) : !z || !R ? /* @__PURE__ */ n(
2631
2649
  be,
2632
2650
  {
2633
2651
  message: "Not connected to messaging service",
2634
- onBack: D
2652
+ onBack: E
2635
2653
  }
2636
- ) : I ? /* @__PURE__ */ n(be, { message: I }) : O && !A ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : A ? /* @__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(
2654
+ ) : T ? /* @__PURE__ */ n(be, { message: T }) : F && !C ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : C ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2637
2655
  un,
2638
2656
  {
2639
- channel: A,
2657
+ channel: C,
2640
2658
  renderMessageInputActions: t,
2641
2659
  renderConversationFooter: s,
2642
- renderChannelBanner: b,
2643
- onLeaveConversation: B,
2644
- onBlockParticipant: B,
2660
+ renderChannelBanner: _,
2661
+ onLeaveConversation: q,
2662
+ onBlockParticipant: q,
2645
2663
  CustomChannelEmptyState: l,
2646
- showDeleteConversation: j,
2664
+ showDeleteConversation: Z,
2647
2665
  onBlockParticipantClick: d,
2648
2666
  onReportParticipantClick: m,
2649
2667
  dmAgentEnabled: g,
2650
2668
  onMessageSent: u,
2651
2669
  chatbotVotingEnabled: f,
2652
2670
  viewerLanguage: c,
2653
- renderHeaderTitleBadges: w,
2654
- customChannelActions: p,
2655
- renderChannelActions: v,
2656
- renderMessage: _,
2657
- onMessageLinkClick: L,
2658
- showChannelInfo: T
2671
+ renderHeaderTitleBadges: b,
2672
+ customChannelActions: v,
2673
+ renderChannelActions: p,
2674
+ onParticipantNameClick: x,
2675
+ renderMessage: A,
2676
+ onMessageLinkClick: M,
2677
+ showChannelInfo: y
2659
2678
  },
2660
- A.id
2679
+ C.id
2661
2680
  ) }) }) : /* @__PURE__ */ n(Se, {});
2662
2681
  };
2663
- function tr(e) {
2682
+ function Qa(e) {
2664
2683
  const t = e.state.pending_messages;
2665
2684
  if (t != null && t.length)
2666
2685
  for (const s of t)
2667
2686
  e.state.addMessageSorted(s.message);
2668
2687
  }
2669
- const mn = U.createContext({
2688
+ const mn = j.createContext({
2670
2689
  selectedChannel: void 0,
2671
2690
  onChannelSelect: () => {
2672
2691
  },
2673
2692
  debug: !1,
2674
2693
  renderMessagePreview: void 0,
2675
2694
  viewerLanguage: void 0
2676
- }), nr = mn.Provider, sr = () => U.useContext(mn), ar = (e, t) => {
2695
+ }), er = mn.Provider, tr = () => j.useContext(mn), nr = (e, t) => {
2677
2696
  const s = new Date(
2678
2697
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2679
2698
  ), r = new Date(
2680
2699
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2681
2700
  ).getTime() - s.getTime();
2682
2701
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2683
- }, rr = (e) => {
2702
+ }, sr = (e) => {
2684
2703
  const t = /* @__PURE__ */ new Date();
2685
2704
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2686
2705
  return "Just now";
2687
- const a = ar(e, t);
2706
+ const a = nr(e, t);
2688
2707
  return a === 0 ? e.toLocaleTimeString([], {
2689
2708
  hour: "numeric",
2690
2709
  minute: "2-digit",
@@ -2694,51 +2713,51 @@ const mn = U.createContext({
2694
2713
  day: "numeric",
2695
2714
  year: "2-digit"
2696
2715
  });
2697
- }, hn = U.memo(
2716
+ }, hn = j.memo(
2698
2717
  ({ channel: e, unread: t }) => {
2699
- var $, P, D, R;
2718
+ var R, z, P;
2700
2719
  const {
2701
2720
  selectedChannel: s,
2702
2721
  onChannelSelect: a,
2703
2722
  debug: r,
2704
2723
  renderMessagePreview: i,
2705
2724
  viewerLanguage: o
2706
- } = sr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2725
+ } = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2707
2726
  e && a(e);
2708
- }, m = (N) => {
2709
- const A = N.key === "Enter" || N.key === " ", S = N.repeat;
2710
- !A || S || (N.preventDefault(), d());
2711
- }, u = Object.values((($ = e == null ? void 0 : e.state) == null ? void 0 : $.members) || {}).find(
2712
- (N) => {
2713
- var A, S;
2714
- return ((A = N.user) == null ? void 0 : A.id) && N.user.id !== ((S = e == null ? void 0 : e._client) == null ? void 0 : S.userID);
2727
+ }, m = (S) => {
2728
+ const E = S.key === "Enter" || S.key === " ", L = S.repeat;
2729
+ !E || L || (S.preventDefault(), d());
2730
+ }, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
2731
+ (S) => {
2732
+ var E, L;
2733
+ return ((E = S.user) == null ? void 0 : E.id) && S.user.id !== ((L = e == null ? void 0 : e._client) == null ? void 0 : L.userID);
2715
2734
  }
2716
- ), f = Xt(u == null ? void 0 : u.user), c = (P = u == null ? void 0 : u.user) == null ? void 0 : P.image, w = ((D = u == null ? void 0 : u.user) == null ? void 0 : D.is_verified) === !0, b = (() => {
2717
- var A;
2718
- const N = (A = e == null ? void 0 : e.state) == null ? void 0 : A.messages;
2719
- if (N != null && N.length) {
2720
- for (let S = N.length - 1; S >= 0; S--)
2721
- if (N[S].type !== "system") return N[S];
2735
+ ), f = Xt(u == null ? void 0 : u.user), c = (z = u == null ? void 0 : u.user) == null ? void 0 : z.image, b = (() => {
2736
+ var E;
2737
+ const S = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
2738
+ if (S != null && S.length) {
2739
+ for (let L = S.length - 1; L >= 0; L--)
2740
+ if (S[L].type !== "system") return S[L];
2722
2741
  }
2723
2742
  })(), v = (() => {
2724
- var O, F, j, H;
2725
- const N = Kt({
2743
+ var I, T, O, F;
2744
+ const S = Kt({
2726
2745
  message: b,
2727
2746
  viewerLanguage: o
2728
2747
  });
2729
- if (((O = b == null ? void 0 : b.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2730
- if (((F = b == null ? void 0 : b.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2731
- if (((j = b == null ? void 0 : b.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2732
- if (N) return N;
2733
- const E = (H = b == null ? void 0 : b.attachments) == null ? void 0 : H[0];
2734
- return E ? E.og_scrape_url ? E.og_scrape_url : E.type === "image" ? "📷 Sent an image" : E.type === "video" ? "🎥 Sent a video" : E.type === "audio" ? "🎵 Sent audio" : E.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2735
- })(), _ = b != null && b.created_at ? rr(new Date(b.created_at)) : "", L = b ? Ee(b) : !1, T = i ? i(b, v) : `${L ? "✨ " : ""}${v}`, y = Wt(e), M = t ?? 0;
2748
+ if (((I = b == null ? void 0 : b.metadata) == null ? void 0 : I.custom_type) === "MESSAGE_TIP") return S ? `💵 ${S}` : "💵 Sent a tip";
2749
+ if (((T = b == null ? void 0 : b.metadata) == null ? void 0 : T.custom_type) === "MESSAGE_PAID") return S ? `💰 ${S}` : "💰 Sent a message";
2750
+ if (((O = b == null ? void 0 : b.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_ATTACHMENT") return S ? `📎 ${S}` : "📎 Sent an attachment";
2751
+ if (S) return S;
2752
+ const C = (F = b == null ? void 0 : b.attachments) == null ? void 0 : F[0];
2753
+ return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2754
+ })(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "", x = b ? Ee(b) : !1, A = i ? i(b, v) : `${x ? "✨ " : ""}${v}`, M = Wt(e), y = t ?? 0;
2736
2755
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2737
2756
  channelId: e == null ? void 0 : e.id,
2738
2757
  isSelected: l,
2739
2758
  participantName: f,
2740
- unreadCount: M,
2741
- hasTimestamp: !!_
2759
+ unreadCount: y,
2760
+ hasTimestamp: !!p
2742
2761
  }), /* @__PURE__ */ n(
2743
2762
  "div",
2744
2763
  {
@@ -2746,7 +2765,7 @@ const mn = U.createContext({
2746
2765
  tabIndex: 0,
2747
2766
  onClick: d,
2748
2767
  onKeyDown: m,
2749
- className: k(
2768
+ className: N(
2750
2769
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2751
2770
  {
2752
2771
  "bg-black/[0.04]": l,
@@ -2755,27 +2774,34 @@ const mn = U.createContext({
2755
2774
  ),
2756
2775
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
2757
2776
  /* @__PURE__ */ n(
2758
- re,
2777
+ ie,
2759
2778
  {
2760
- id: ((R = u == null ? void 0 : u.user) == null ? void 0 : R.id) || e.id || "unknown",
2779
+ id: ((P = u == null ? void 0 : u.user) == null ? void 0 : P.id) || e.id || "unknown",
2761
2780
  name: f,
2762
2781
  image: c,
2763
2782
  size: 48,
2764
- starred: y
2783
+ starred: M
2765
2784
  }
2766
2785
  ),
2767
2786
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
2768
2787
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2", children: [
2769
- /* @__PURE__ */ h("h3", { className: "flex min-w-0 items-center gap-1 text-sm font-medium text-[#191918]", children: [
2770
- y && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2771
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: f }),
2772
- w && /* @__PURE__ */ n(He, {})
2773
- ] }),
2774
- _ && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: _ })
2788
+ /* @__PURE__ */ h(
2789
+ "h3",
2790
+ {
2791
+ className: N(
2792
+ "text-sm font-medium truncate text-[#191918]"
2793
+ ),
2794
+ children: [
2795
+ M && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2796
+ f
2797
+ ]
2798
+ }
2799
+ ),
2800
+ p && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: p })
2775
2801
  ] }),
2776
2802
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2777
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: T }),
2778
- 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 })
2803
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
2804
+ y > 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: y > 99 ? "99+" : y })
2779
2805
  ] })
2780
2806
  ] })
2781
2807
  ] })
@@ -2784,26 +2810,26 @@ const mn = U.createContext({
2784
2810
  }
2785
2811
  );
2786
2812
  hn.displayName = "CustomChannelPreview";
2787
- const ir = { last_message_at: -1 }, or = U.memo(
2813
+ const ar = { last_message_at: -1 }, rr = j.memo(
2788
2814
  ({
2789
2815
  onChannelSelect: e,
2790
2816
  selectedChannel: t,
2791
2817
  filters: s,
2792
2818
  allowNewMessagesFromUnfilteredChannels: a = !1,
2793
2819
  channelRenderFilterFn: r,
2794
- sort: i = ir,
2820
+ sort: i = ar,
2795
2821
  className: o,
2796
2822
  customEmptyStateIndicator: l,
2797
2823
  renderMessagePreview: d,
2798
2824
  viewerLanguage: m
2799
2825
  }) => {
2800
- const g = U.useRef(0);
2826
+ const g = j.useRef(0);
2801
2827
  g.current++;
2802
- const { debug: u = !1 } = Xe(), f = U.useCallback(
2803
- (w) => {
2804
- for (const b of w)
2805
- tr(b);
2806
- return r ? r(w) : w;
2828
+ const { debug: u = !1 } = Xe(), f = j.useCallback(
2829
+ (b) => {
2830
+ for (const _ of b)
2831
+ Qa(_);
2832
+ return r ? r(b) : b;
2807
2833
  },
2808
2834
  [r]
2809
2835
  );
@@ -2812,7 +2838,7 @@ const ir = { last_message_at: -1 }, or = U.memo(
2812
2838
  selectedChannelId: t == null ? void 0 : t.id,
2813
2839
  filters: s
2814
2840
  });
2815
- const c = U.useMemo(
2841
+ const c = j.useMemo(
2816
2842
  () => ({
2817
2843
  selectedChannel: t,
2818
2844
  onChannelSelect: e,
@@ -2831,11 +2857,11 @@ const ir = { last_message_at: -1 }, or = U.memo(
2831
2857
  return /* @__PURE__ */ n(
2832
2858
  "div",
2833
2859
  {
2834
- className: k(
2860
+ className: N(
2835
2861
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2836
2862
  o
2837
2863
  ),
2838
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(nr, { value: c, children: /* @__PURE__ */ n(
2864
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: c, children: /* @__PURE__ */ n(
2839
2865
  us,
2840
2866
  {
2841
2867
  filters: s,
@@ -2853,26 +2879,26 @@ const ir = { last_message_at: -1 }, or = U.memo(
2853
2879
  );
2854
2880
  }
2855
2881
  );
2856
- or.displayName = "ChannelList";
2857
- const lr = /^([a-z][a-z0-9+.-]*):/i, cr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2882
+ rr.displayName = "ChannelList";
2883
+ const ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2858
2884
  function tt(e) {
2859
2885
  if (typeof e != "string") return;
2860
2886
  const t = e.trim();
2861
2887
  if (t === "") return;
2862
- const s = lr.exec(t);
2888
+ const s = ir.exec(t);
2863
2889
  if (s) {
2864
2890
  const a = s[1].toLowerCase();
2865
- return cr.has(a) ? t : void 0;
2891
+ return or.has(a) ? t : void 0;
2866
2892
  }
2867
2893
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2868
2894
  }
2869
- const dr = {
2895
+ const lr = {
2870
2896
  dark: "bg-white text-[#121110] hover:bg-white/90",
2871
2897
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2872
- }, ur = ({ variant: e, cta: t }) => {
2873
- const s = k(
2898
+ }, cr = ({ variant: e, cta: t }) => {
2899
+ const s = N(
2874
2900
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2875
- dr[e]
2901
+ lr[e]
2876
2902
  ), a = tt(t.href);
2877
2903
  return a ? /* @__PURE__ */ n(
2878
2904
  "a",
@@ -2899,10 +2925,10 @@ const dr = {
2899
2925
  children: t.label
2900
2926
  }
2901
2927
  );
2902
- }, mr = {
2928
+ }, dr = {
2903
2929
  dark: "text-white",
2904
2930
  light: "text-black/90"
2905
- }, hr = "text-white/30", fr = {
2931
+ }, ur = "text-white/30", mr = {
2906
2932
  dark: "text-white/55",
2907
2933
  light: "text-black/55"
2908
2934
  }, nt = ({
@@ -2915,14 +2941,14 @@ const dr = {
2915
2941
  cta: o,
2916
2942
  trailingAction: l
2917
2943
  }) => {
2918
- 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 !== "", w = o != null;
2919
- if (!g && !u && !c && !w) return null;
2920
- const p = k(
2944
+ 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;
2945
+ if (!g && !u && !c && !b) return null;
2946
+ const v = N(
2921
2947
  "truncate text-base font-medium leading-6",
2922
- d && !t ? hr : mr[e]
2923
- ), v = k(
2948
+ d && !t ? ur : dr[e]
2949
+ ), p = N(
2924
2950
  "truncate text-xs leading-4",
2925
- fr[e]
2951
+ mr[e]
2926
2952
  );
2927
2953
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
2928
2954
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -2930,17 +2956,17 @@ const dr = {
2930
2956
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2931
2957
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2932
2958
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2933
- /* @__PURE__ */ n("p", { className: k("min-w-0", p), children: m })
2959
+ /* @__PURE__ */ n("p", { className: N("min-w-0", v), children: m })
2934
2960
  ] }),
2935
- u && /* @__PURE__ */ n("p", { className: v, children: a })
2961
+ u && /* @__PURE__ */ n("p", { className: p, children: a })
2936
2962
  ] }),
2937
- !w && c && /* @__PURE__ */ n("p", { className: v, children: f })
2963
+ !b && c && /* @__PURE__ */ n("p", { className: p, children: f })
2938
2964
  ] }),
2939
2965
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2940
2966
  ] }),
2941
- o && /* @__PURE__ */ n(ur, { variant: e, cta: o })
2967
+ o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
2942
2968
  ] });
2943
- }, gr = k(
2969
+ }, hr = N(
2944
2970
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2945
2971
  // 1px hairline border that sits flush with the card chrome — matches
2946
2972
  // the messaging design system's "small border around link attachments"
@@ -2958,8 +2984,8 @@ const dr = {
2958
2984
  bgClassName: l,
2959
2985
  "data-testid": d
2960
2986
  }) => {
2961
- const m = s != null || a != null, g = k(
2962
- gr,
2987
+ const m = s != null || a != null, g = N(
2988
+ hr,
2963
2989
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2964
2990
  // `focus-ring` is a design-system utility from the component-library
2965
2991
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2989,7 +3015,7 @@ const dr = {
2989
3015
  onClick: a,
2990
3016
  "aria-label": r,
2991
3017
  "data-testid": d,
2992
- className: k(g, "text-left"),
3018
+ className: N(g, "text-left"),
2993
3019
  children: [
2994
3020
  t,
2995
3021
  u
@@ -3007,15 +3033,15 @@ const dr = {
3007
3033
  ]
3008
3034
  }
3009
3035
  );
3010
- }, br = {
3036
+ }, fr = {
3011
3037
  dark: "bg-white/10",
3012
3038
  light: "bg-black/5"
3013
- }, pr = {
3039
+ }, gr = {
3014
3040
  dark: "size-16 text-white/25",
3015
3041
  light: "size-16 text-black/25"
3016
- }, Re = (e, t) => !!t && !!e && se(e) === "audio", fn = (e, t) => {
3042
+ }, Re = (e, t) => !!t && !!e && re(e) === "audio", fn = (e, t) => {
3017
3043
  if (!t || !e) return !1;
3018
- const s = se(e);
3044
+ const s = re(e);
3019
3045
  return s === "video" || s === "audio";
3020
3046
  }, st = "bg-[#F2F3F4]", Te = ({
3021
3047
  variant: e,
@@ -3026,7 +3052,7 @@ const dr = {
3026
3052
  topLeft: i,
3027
3053
  topRight: o
3028
3054
  }) => {
3029
- const l = se(r), d = !!s && l === "video";
3055
+ const l = re(r), d = !!s && l === "video";
3030
3056
  return Re(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3031
3057
  "audio",
3032
3058
  {
@@ -3039,7 +3065,7 @@ const dr = {
3039
3065
  ) }) : /* @__PURE__ */ h(
3040
3066
  "div",
3041
3067
  {
3042
- className: k(
3068
+ className: N(
3043
3069
  "relative h-[180px] w-full overflow-hidden",
3044
3070
  d && "bg-black"
3045
3071
  ),
@@ -3066,12 +3092,12 @@ const dr = {
3066
3092
  ) : /* @__PURE__ */ n(
3067
3093
  "div",
3068
3094
  {
3069
- className: k(
3095
+ className: N(
3070
3096
  "flex h-full w-full items-center justify-center",
3071
- br[e]
3097
+ fr[e]
3072
3098
  ),
3073
3099
  children: le(r, {
3074
- className: pr[e],
3100
+ className: gr[e],
3075
3101
  weight: "regular"
3076
3102
  })
3077
3103
  }
@@ -3081,7 +3107,7 @@ const dr = {
3081
3107
  ]
3082
3108
  }
3083
3109
  );
3084
- }, vr = ({
3110
+ }, br = ({
3085
3111
  title: e,
3086
3112
  placeholderTitle: t,
3087
3113
  description: s,
@@ -3095,7 +3121,7 @@ const dr = {
3095
3121
  onDismiss: g,
3096
3122
  onEditClick: u
3097
3123
  }) => {
3098
- const f = l === "classic", c = Re(r, o), w = g ? /* @__PURE__ */ n(
3124
+ const f = l === "classic", c = Re(r, o), b = g ? /* @__PURE__ */ n(
3099
3125
  "button",
3100
3126
  {
3101
3127
  type: "button",
@@ -3104,14 +3130,14 @@ const dr = {
3104
3130
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3105
3131
  children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
3106
3132
  }
3107
- ) : void 0, b = u ? /* @__PURE__ */ n(
3133
+ ) : void 0, _ = u ? /* @__PURE__ */ n(
3108
3134
  "button",
3109
3135
  {
3110
3136
  type: "button",
3111
3137
  onClick: u,
3112
3138
  "aria-label": "Edit attachment",
3113
3139
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3114
- children: /* @__PURE__ */ n(Ds, { className: "size-5", weight: "regular" })
3140
+ children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
3115
3141
  }
3116
3142
  ) : void 0;
3117
3143
  return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: st, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
@@ -3124,12 +3150,12 @@ const dr = {
3124
3150
  mimeType: r
3125
3151
  }
3126
3152
  ) }),
3127
- w && /* @__PURE__ */ n("div", { className: "shrink-0", children: w })
3153
+ b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3128
3154
  ] }) }) : /* @__PURE__ */ h(
3129
3155
  Ie,
3130
3156
  {
3131
3157
  variant: "dark",
3132
- topRight: f ? w : void 0,
3158
+ topRight: f ? b : void 0,
3133
3159
  children: [
3134
3160
  !f && /* @__PURE__ */ n(
3135
3161
  Te,
@@ -3139,7 +3165,7 @@ const dr = {
3139
3165
  sourceUrl: o,
3140
3166
  title: e,
3141
3167
  mimeType: r,
3142
- topRight: w
3168
+ topRight: b
3143
3169
  }
3144
3170
  ),
3145
3171
  /* @__PURE__ */ n(
@@ -3152,13 +3178,13 @@ const dr = {
3152
3178
  url: a,
3153
3179
  appIcon: d,
3154
3180
  cta: m,
3155
- trailingAction: b
3181
+ trailingAction: _
3156
3182
  }
3157
3183
  )
3158
3184
  ]
3159
3185
  }
3160
3186
  );
3161
- }, xr = ({
3187
+ }, pr = ({
3162
3188
  title: e,
3163
3189
  description: t,
3164
3190
  url: s,
@@ -3170,11 +3196,11 @@ const dr = {
3170
3196
  cta: d,
3171
3197
  onClick: m
3172
3198
  }) => {
3173
- const g = fn(a, i), u = tt(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, w = Re(a, i) ? st : void 0, b = d && m ? {
3199
+ 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, _ = d && m ? {
3174
3200
  ...d,
3175
3201
  onClick: () => {
3176
- var p;
3177
- m(), (p = d.onClick) == null || p.call(d);
3202
+ var v;
3203
+ m(), (v = d.onClick) == null || v.call(d);
3178
3204
  }
3179
3205
  } : d;
3180
3206
  return /* @__PURE__ */ h(
@@ -3184,7 +3210,7 @@ const dr = {
3184
3210
  href: f,
3185
3211
  onClick: c,
3186
3212
  ariaLabel: e ?? "Open attachment preview",
3187
- bgClassName: w,
3213
+ bgClassName: b,
3188
3214
  "data-testid": "link-attachment",
3189
3215
  children: [
3190
3216
  o === "featured" && /* @__PURE__ */ n(
@@ -3205,13 +3231,13 @@ const dr = {
3205
3231
  description: t,
3206
3232
  url: s,
3207
3233
  appIcon: l,
3208
- cta: b
3234
+ cta: _
3209
3235
  }
3210
3236
  )
3211
3237
  ]
3212
3238
  }
3213
3239
  );
3214
- }, wr = ({
3240
+ }, vr = ({
3215
3241
  title: e,
3216
3242
  placeholderTitle: t,
3217
3243
  description: s,
@@ -3224,13 +3250,13 @@ const dr = {
3224
3250
  cta: m,
3225
3251
  onClick: g
3226
3252
  }) => {
3227
- const u = fn(r, o), f = tt(a), c = m == null && f != null && !u ? f : void 0, w = m == null && !u && c != null ? g : void 0;
3253
+ 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;
3228
3254
  return /* @__PURE__ */ h(
3229
3255
  Ie,
3230
3256
  {
3231
3257
  variant: "dark",
3232
3258
  href: c,
3233
- onClick: w,
3259
+ onClick: b,
3234
3260
  bgClassName: Re(r, o) ? st : void 0,
3235
3261
  children: [
3236
3262
  l === "featured" && /* @__PURE__ */ n(
@@ -3258,20 +3284,20 @@ const dr = {
3258
3284
  ]
3259
3285
  }
3260
3286
  );
3261
- }, Ii = {
3262
- Composer: vr,
3263
- Sent: wr,
3264
- Received: xr
3265
- }, _r = {
3287
+ }, Ei = {
3288
+ Composer: br,
3289
+ Sent: vr,
3290
+ Received: pr
3291
+ }, xr = {
3266
3292
  dark: "bg-[#121110]",
3267
3293
  light: "bg-[#e9eaed]"
3268
- }, Nr = {
3294
+ }, wr = {
3269
3295
  dark: "text-white",
3270
3296
  light: "text-[#080707]"
3271
- }, yr = {
3297
+ }, _r = {
3272
3298
  dark: "border-white/[0.08]",
3273
3299
  light: "border-black/[0.08]"
3274
- }, Cr = (e) => e === "dark" ? "sender" : "receiver", kr = {
3300
+ }, Nr = (e) => e === "dark" ? "sender" : "receiver", yr = {
3275
3301
  sender: {
3276
3302
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3277
3303
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3293,13 +3319,13 @@ const dr = {
3293
3319
  children: i,
3294
3320
  "data-testid": o
3295
3321
  }) => {
3296
- const l = t != null && t !== "", d = kr[Cr(e)][a];
3322
+ const l = t != null && t !== "", d = yr[Nr(e)][a];
3297
3323
  return /* @__PURE__ */ h(
3298
3324
  "div",
3299
3325
  {
3300
3326
  "data-testid": o,
3301
3327
  "data-group-position": a,
3302
- className: k(
3328
+ className: N(
3303
3329
  // 280px-wide bubble — matches the mobile chat attachment width
3304
3330
  // and keeps the document / image / audio bubbles visually
3305
3331
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3308,10 +3334,10 @@ const dr = {
3308
3334
  // as the surrounding `CustomMessage` text bubbles.
3309
3335
  "relative w-[280px] overflow-hidden px-2 py-2",
3310
3336
  d,
3311
- _r[e],
3312
- Nr[e],
3337
+ xr[e],
3338
+ wr[e],
3313
3339
  s && "border",
3314
- s && yr[e],
3340
+ s && _r[e],
3315
3341
  r
3316
3342
  ),
3317
3343
  children: [
@@ -3319,7 +3345,7 @@ const dr = {
3319
3345
  l ? /* @__PURE__ */ n(
3320
3346
  "p",
3321
3347
  {
3322
- className: k(
3348
+ className: N(
3323
3349
  // No `text-*` / `font-*` overrides here — caption inherits
3324
3350
  // the same font family + size as `.str-chat__message-text`
3325
3351
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3348,22 +3374,22 @@ const dr = {
3348
3374
  a.stopPropagation(), e();
3349
3375
  },
3350
3376
  "aria-label": s,
3351
- className: k(
3377
+ className: N(
3352
3378
  "flex size-6 items-center justify-center rounded-full text-white",
3353
3379
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3354
3380
  ),
3355
3381
  children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
3356
3382
  }
3357
- ), Ne = (e) => e === "received" ? "light" : "dark", Ti = ({
3383
+ ), Ne = (e) => e === "received" ? "light" : "dark", Si = ({
3358
3384
  firstOfGroup: e,
3359
3385
  endOfGroup: t,
3360
3386
  groupedByUser: s
3361
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Er = ({
3387
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Cr = ({
3362
3388
  src: e,
3363
3389
  mimeType: t,
3364
3390
  filename: s,
3365
3391
  items: a
3366
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Sr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3392
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], kr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3367
3393
  /* @__PURE__ */ n(
3368
3394
  "audio",
3369
3395
  {
@@ -3386,7 +3412,7 @@ const dr = {
3386
3412
  preload: l,
3387
3413
  onDismiss: d
3388
3414
  }) => {
3389
- const m = Ne(e), g = e === "composer" && !!d, u = Er({ src: t, mimeType: s, filename: a, items: r });
3415
+ const m = Ne(e), g = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
3390
3416
  if (u.length === 0)
3391
3417
  return null;
3392
3418
  const f = l ?? (u.length > 1 ? "none" : "metadata");
@@ -3397,30 +3423,30 @@ const dr = {
3397
3423
  text: i,
3398
3424
  groupPosition: o,
3399
3425
  "data-testid": "audio-attachment",
3400
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, w) => /* @__PURE__ */ n(
3401
- Sr,
3426
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, b) => /* @__PURE__ */ n(
3427
+ kr,
3402
3428
  {
3403
3429
  item: c,
3404
3430
  preload: f,
3405
3431
  trailingAction: (
3406
3432
  // Composer only supports a single attachment, so the
3407
3433
  // dismiss control sits on the only player.
3408
- g && w === 0 ? /* @__PURE__ */ n(_e, { onClick: d, variant: "inline" }) : void 0
3434
+ g && b === 0 ? /* @__PURE__ */ n(_e, { onClick: d, variant: "inline" }) : void 0
3409
3435
  )
3410
3436
  },
3411
- `${c.src}-${w}`
3437
+ `${c.src}-${b}`
3412
3438
  )) })
3413
3439
  }
3414
3440
  );
3415
- }, Ir = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), Tr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Ar = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), Mr = {
3416
- Composer: Ir,
3417
- Sent: Tr,
3418
- Received: Ar
3441
+ }, 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 = {
3442
+ Composer: Er,
3443
+ Sent: Sr,
3444
+ Received: Ir
3419
3445
  };
3420
- function Rr(e) {
3446
+ function Ar(e) {
3421
3447
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
3422
3448
  }
3423
- const Lr = {
3449
+ const Mr = {
3424
3450
  pdf: "PDF",
3425
3451
  doc: "DOC",
3426
3452
  xls: "XLS",
@@ -3430,7 +3456,7 @@ const Lr = {
3430
3456
  text: "TXT",
3431
3457
  markdown: "MD"
3432
3458
  };
3433
- function Dr(e, t) {
3459
+ function Rr(e, t) {
3434
3460
  if (t) {
3435
3461
  const r = t.lastIndexOf(".");
3436
3462
  if (r > 0 && r < t.length - 1) {
@@ -3439,8 +3465,8 @@ function Dr(e, t) {
3439
3465
  }
3440
3466
  }
3441
3467
  if (!e) return;
3442
- if (se(e) === "document") {
3443
- const r = Qt(e), i = Lr[r];
3468
+ if (re(e) === "document") {
3469
+ const r = Qt(e), i = Mr[r];
3444
3470
  if (i) return i;
3445
3471
  if (e === "application/octet-stream") return;
3446
3472
  }
@@ -3448,11 +3474,11 @@ function Dr(e, t) {
3448
3474
  if (!(!a || a === "*"))
3449
3475
  return a.toUpperCase();
3450
3476
  }
3451
- function Pr(e, t, s) {
3452
- const a = Dr(e, t), r = typeof s == "number" && s > 0 ? Rr(s) : void 0;
3477
+ function Lr(e, t, s) {
3478
+ const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
3453
3479
  return [a, r].filter(Boolean).join(" · ") || void 0;
3454
3480
  }
3455
- function ee(e) {
3481
+ function ne(e) {
3456
3482
  try {
3457
3483
  const s = new URL(e).pathname.split("/").pop();
3458
3484
  return s && s.length > 0 ? decodeURIComponent(s) : "download";
@@ -3460,13 +3486,13 @@ function ee(e) {
3460
3486
  return "download";
3461
3487
  }
3462
3488
  }
3463
- const Or = {
3489
+ const Dr = {
3464
3490
  dark: "text-white/55",
3465
3491
  light: "text-black/65"
3466
- }, zr = {
3492
+ }, Or = {
3467
3493
  dark: "bg-white/10",
3468
3494
  light: "bg-black/5"
3469
- }, $r = {
3495
+ }, Pr = {
3470
3496
  dark: "text-white/85",
3471
3497
  light: "text-black/85"
3472
3498
  }, gn = ({
@@ -3479,16 +3505,16 @@ const Or = {
3479
3505
  activateLabel: o,
3480
3506
  trailingAction: l
3481
3507
  }) => {
3482
- const d = s ?? t ?? "File", m = Pr(a, t, r), g = /* @__PURE__ */ n(
3508
+ const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
3483
3509
  "div",
3484
3510
  {
3485
- className: k(
3511
+ className: N(
3486
3512
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3487
- zr[e]
3513
+ Or[e]
3488
3514
  ),
3489
3515
  "aria-hidden": !0,
3490
3516
  children: le(a, {
3491
- className: k("size-6", $r[e]),
3517
+ className: N("size-6", Pr[e]),
3492
3518
  weight: "regular"
3493
3519
  })
3494
3520
  }
@@ -3497,9 +3523,9 @@ const Or = {
3497
3523
  m ? /* @__PURE__ */ n(
3498
3524
  "p",
3499
3525
  {
3500
- className: k(
3526
+ className: N(
3501
3527
  "truncate text-xs leading-4",
3502
- Or[e]
3528
+ Dr[e]
3503
3529
  ),
3504
3530
  children: m
3505
3531
  }
@@ -3510,7 +3536,7 @@ const Or = {
3510
3536
  type: "button",
3511
3537
  onClick: i,
3512
3538
  "aria-label": o,
3513
- className: k(
3539
+ className: N(
3514
3540
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3515
3541
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3516
3542
  ),
@@ -3519,7 +3545,7 @@ const Or = {
3519
3545
  u
3520
3546
  ]
3521
3547
  }
3522
- ) : /* @__PURE__ */ h(ne, { children: [
3548
+ ) : /* @__PURE__ */ h(ae, { children: [
3523
3549
  g,
3524
3550
  u
3525
3551
  ] });
@@ -3529,7 +3555,7 @@ const Or = {
3529
3555
  ] });
3530
3556
  };
3531
3557
  async function bn(e, t) {
3532
- const s = t ?? ee(e);
3558
+ const s = t ?? ne(e);
3533
3559
  try {
3534
3560
  const a = await fetch(e, { mode: "cors" });
3535
3561
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -3542,21 +3568,21 @@ async function bn(e, t) {
3542
3568
  }
3543
3569
  }
3544
3570
  }
3545
- const Fr = ({
3571
+ const zr = ({
3546
3572
  src: e,
3547
3573
  filename: t,
3548
3574
  fileSize: s,
3549
3575
  mimeType: a,
3550
3576
  title: r,
3551
3577
  items: i
3552
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Br = ({
3578
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], $r = ({
3553
3579
  variant: e,
3554
3580
  item: t,
3555
3581
  index: s,
3556
3582
  onActivate: a,
3557
3583
  trailingAction: r
3558
3584
  }) => {
3559
- const i = t.filename ?? ee(t.src);
3585
+ const i = t.filename ?? ne(t.src);
3560
3586
  return /* @__PURE__ */ n(
3561
3587
  gn,
3562
3588
  {
@@ -3583,26 +3609,26 @@ const Fr = ({
3583
3609
  onClick: m,
3584
3610
  onDismiss: g
3585
3611
  }) => {
3586
- const u = Ne(e), f = e === "composer" && !!g, c = Fr({
3612
+ const u = Ne(e), f = e === "composer" && !!g, c = zr({
3587
3613
  src: t,
3588
3614
  filename: s,
3589
3615
  fileSize: a,
3590
3616
  mimeType: r,
3591
3617
  title: i,
3592
3618
  items: o
3593
- }), w = (p) => {
3594
- if ((m == null ? void 0 : m(p)) === !1) return;
3595
- const v = c[p];
3596
- if (!v) return;
3597
- const _ = v.filename ?? ee(v.src);
3598
- bn(v.src, _);
3619
+ }), b = (v) => {
3620
+ if ((m == null ? void 0 : m(v)) === !1) return;
3621
+ const p = c[v];
3622
+ if (!p) return;
3623
+ const x = p.filename ?? ne(p.src);
3624
+ bn(p.src, x);
3599
3625
  };
3600
3626
  if (c.length === 0)
3601
3627
  return null;
3602
- const b = /* @__PURE__ */ n(
3628
+ const _ = /* @__PURE__ */ n(
3603
3629
  "span",
3604
3630
  {
3605
- className: k(
3631
+ className: N(
3606
3632
  "flex size-8 items-center justify-center rounded-full",
3607
3633
  u === "dark" ? "text-white/70" : "text-black/70"
3608
3634
  ),
@@ -3617,29 +3643,29 @@ const Fr = ({
3617
3643
  text: l,
3618
3644
  groupPosition: d,
3619
3645
  "data-testid": "file-attachment",
3620
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((p, v) => /* @__PURE__ */ n(
3621
- Br,
3646
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, p) => /* @__PURE__ */ n(
3647
+ $r,
3622
3648
  {
3623
3649
  variant: u,
3624
- item: p,
3625
- index: v,
3626
- onActivate: w,
3627
- trailingAction: f && v === 0 ? /* @__PURE__ */ n(_e, { onClick: g, variant: "inline" }) : b
3650
+ item: v,
3651
+ index: p,
3652
+ onActivate: b,
3653
+ trailingAction: f && p === 0 ? /* @__PURE__ */ n(_e, { onClick: g, variant: "inline" }) : _
3628
3654
  },
3629
- `${p.src}-${v}`
3655
+ `${v.src}-${p}`
3630
3656
  )) })
3631
3657
  }
3632
3658
  );
3633
- }, Ur = (e) => /* @__PURE__ */ n(rt, { ...e, state: "composer" }), jr = (e) => /* @__PURE__ */ n(rt, { ...e, state: "sent" }), Vr = (e) => /* @__PURE__ */ n(rt, { ...e, state: "received" }), Gr = {
3634
- Composer: Ur,
3635
- Sent: jr,
3636
- Received: Vr
3659
+ }, 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 = {
3660
+ Composer: Fr,
3661
+ Sent: Br,
3662
+ Received: Ur
3637
3663
  }, it = ({
3638
3664
  onPrev: e,
3639
3665
  onNext: t,
3640
3666
  prevLabel: s = "Previous",
3641
3667
  nextLabel: a = "Next"
3642
- }) => /* @__PURE__ */ h(ne, { children: [
3668
+ }) => /* @__PURE__ */ h(ae, { children: [
3643
3669
  /* @__PURE__ */ n(
3644
3670
  "button",
3645
3671
  {
@@ -3647,7 +3673,7 @@ const Fr = ({
3647
3673
  onClick: e,
3648
3674
  "aria-label": s,
3649
3675
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3650
- children: /* @__PURE__ */ n(Ps, { size: 20, weight: "bold", "aria-hidden": !0 })
3676
+ children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
3651
3677
  }
3652
3678
  ),
3653
3679
  /* @__PURE__ */ n(
@@ -3657,7 +3683,7 @@ const Fr = ({
3657
3683
  onClick: t,
3658
3684
  "aria-label": a,
3659
3685
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3660
- children: /* @__PURE__ */ n(Os, { size: 20, weight: "bold", "aria-hidden": !0 })
3686
+ children: /* @__PURE__ */ n(Ve, { size: 20, weight: "bold", "aria-hidden": !0 })
3661
3687
  }
3662
3688
  )
3663
3689
  ] }), pn = ({
@@ -3669,7 +3695,7 @@ const Fr = ({
3669
3695
  tone: i = "dark",
3670
3696
  onTriggered: o
3671
3697
  }) => {
3672
- const [l, d] = z(!1), m = J(
3698
+ const [l, d] = $(!1), m = K(
3673
3699
  (c) => {
3674
3700
  c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
3675
3701
  }).finally(() => {
@@ -3677,7 +3703,7 @@ const Fr = ({
3677
3703
  }));
3678
3704
  },
3679
3705
  [l, e, t, o]
3680
- ), g = r ?? s !== "pill", f = { className: k(
3706
+ ), g = r ?? s !== "pill", f = { className: N(
3681
3707
  s === "pill" ? "size-4" : "size-5",
3682
3708
  "shrink-0"
3683
3709
  ), weight: "bold" };
@@ -3688,7 +3714,7 @@ const Fr = ({
3688
3714
  onClick: m,
3689
3715
  disabled: l,
3690
3716
  "aria-label": a,
3691
- className: k(
3717
+ className: N(
3692
3718
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3693
3719
  {
3694
3720
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3728,7 +3754,7 @@ const Fr = ({
3728
3754
  onClick: m,
3729
3755
  disabled: l,
3730
3756
  "aria-label": g ? a : void 0,
3731
- className: k(
3757
+ className: N(
3732
3758
  "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",
3733
3759
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3734
3760
  ),
@@ -3750,15 +3776,15 @@ const Fr = ({
3750
3776
  initialIndex: t,
3751
3777
  open: s
3752
3778
  }) => {
3753
- const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = z(a);
3779
+ const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
3754
3780
  X(() => {
3755
3781
  s && i(Fe(t, 0, Math.max(e - 1, 0)));
3756
3782
  }, [s, t, e]), X(() => {
3757
3783
  i((d) => Fe(d, 0, Math.max(e - 1, 0)));
3758
3784
  }, [e]);
3759
- const o = J(() => {
3785
+ const o = K(() => {
3760
3786
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3761
- }, [e]), l = J(() => {
3787
+ }, [e]), l = K(() => {
3762
3788
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3763
3789
  }, [e]);
3764
3790
  return X(() => {
@@ -3870,8 +3896,8 @@ const Fr = ({
3870
3896
  length: t.length,
3871
3897
  initialIndex: s,
3872
3898
  open: e
3873
- }), l = t[r], d = te(
3874
- () => (l == null ? void 0 : l.filename) ?? (l ? ee(l.src) : "image"),
3899
+ }), l = t[r], d = se(
3900
+ () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "image"),
3875
3901
  [l]
3876
3902
  );
3877
3903
  return l ? /* @__PURE__ */ h(
@@ -3916,7 +3942,7 @@ const Fr = ({
3916
3942
  ]
3917
3943
  }
3918
3944
  ) : null;
3919
- }, Hr = "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 = ({
3945
+ }, 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 = ({
3920
3946
  tiles: e,
3921
3947
  onTileActivate: t,
3922
3948
  maxVisible: s = 4,
@@ -3925,14 +3951,14 @@ const Fr = ({
3925
3951
  const r = e.length;
3926
3952
  if (r === 0) return null;
3927
3953
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
3928
- const u = k(Hr, "h-full w-full");
3954
+ const u = N(Vr, "h-full w-full");
3929
3955
  return t ? /* @__PURE__ */ h(
3930
3956
  "button",
3931
3957
  {
3932
3958
  type: "button",
3933
3959
  onClick: () => t(m),
3934
3960
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3935
- className: k(u, "cursor-zoom-in"),
3961
+ className: N(u, "cursor-zoom-in"),
3936
3962
  children: [
3937
3963
  d.content,
3938
3964
  g
@@ -3944,10 +3970,10 @@ const Fr = ({
3944
3970
  g
3945
3971
  ] }, m);
3946
3972
  };
3947
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3973
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: N("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3948
3974
  "div",
3949
3975
  {
3950
- className: k(
3976
+ className: N(
3951
3977
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3952
3978
  a
3953
3979
  ),
@@ -3956,7 +3982,7 @@ const Fr = ({
3956
3982
  ) : i.length === 3 ? /* @__PURE__ */ h(
3957
3983
  "div",
3958
3984
  {
3959
- className: k(
3985
+ className: N(
3960
3986
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3961
3987
  a
3962
3988
  ),
@@ -3969,7 +3995,7 @@ const Fr = ({
3969
3995
  ) : /* @__PURE__ */ n(
3970
3996
  "div",
3971
3997
  {
3972
- className: k(
3998
+ className: N(
3973
3999
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3974
4000
  a
3975
4001
  ),
@@ -3987,14 +4013,14 @@ const Fr = ({
3987
4013
  }
3988
4014
  );
3989
4015
  }, ye = (e) => {
3990
- const [t, s] = z(!1), [a, r] = z(0), i = J(
4016
+ const [t, s] = $(!1), [a, r] = $(0), i = K(
3991
4017
  (l) => {
3992
4018
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
3993
4019
  },
3994
4020
  [e]
3995
- ), o = J(() => s(!1), []);
4021
+ ), o = K(() => s(!1), []);
3996
4022
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
3997
- }, Yr = (e, t, s, a) => ({
4023
+ }, Gr = (e, t, s, a) => ({
3998
4024
  ariaLabel: `Open image ${t + 1} of ${s}`,
3999
4025
  content: /* @__PURE__ */ n(
4000
4026
  "img",
@@ -4009,7 +4035,7 @@ const Fr = ({
4009
4035
  className: "absolute inset-0 size-full rounded-md object-cover"
4010
4036
  }
4011
4037
  )
4012
- }), qr = ({
4038
+ }), Hr = ({
4013
4039
  src: e,
4014
4040
  alt: t,
4015
4041
  items: s
@@ -4017,7 +4043,7 @@ const Fr = ({
4017
4043
  src: s.src,
4018
4044
  alt: s.alt,
4019
4045
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4020
- })), Wr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4046
+ })), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4021
4047
  const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = ye(
4022
4048
  r
4023
4049
  );
@@ -4064,13 +4090,13 @@ const Fr = ({
4064
4090
  loading: l = "lazy",
4065
4091
  onClick: d
4066
4092
  }) => {
4067
- const m = qr({ src: t, alt: s, items: r }), g = Ne(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: w } = ye(
4093
+ const m = Hr({ src: t, alt: s, items: r }), g = Ne(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = ye(
4068
4094
  d
4069
4095
  );
4070
4096
  if (m.length === 0)
4071
4097
  return null;
4072
- const b = m.map(
4073
- (p, v) => Yr(p, v, m.length, l)
4098
+ const _ = m.map(
4099
+ (v, p) => Gr(v, p, m.length, l)
4074
4100
  );
4075
4101
  return /* @__PURE__ */ h(
4076
4102
  we,
@@ -4080,24 +4106,24 @@ const Fr = ({
4080
4106
  groupPosition: o,
4081
4107
  "data-testid": "image-attachment",
4082
4108
  children: [
4083
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: b, onTileActivate: c }) }),
4109
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: _, onTileActivate: c }) }),
4084
4110
  /* @__PURE__ */ n(
4085
4111
  vn,
4086
4112
  {
4087
4113
  open: u,
4088
4114
  items: wn(m, a),
4089
4115
  initialIndex: f,
4090
- onClose: w
4116
+ onClose: b
4091
4117
  }
4092
4118
  )
4093
4119
  ]
4094
4120
  }
4095
4121
  );
4096
- }, Xr = (e) => /* @__PURE__ */ n(Wr, { ...e }), Kr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Jr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Zr = {
4097
- Composer: Xr,
4098
- Sent: Kr,
4099
- Received: Jr
4100
- }, Qr = ({
4122
+ }, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Kr = {
4123
+ Composer: qr,
4124
+ Sent: Wr,
4125
+ Received: Xr
4126
+ }, Jr = ({
4101
4127
  open: e,
4102
4128
  items: t,
4103
4129
  initialIndex: s = 0,
@@ -4107,11 +4133,11 @@ const Fr = ({
4107
4133
  length: t.length,
4108
4134
  initialIndex: s,
4109
4135
  open: e
4110
- }), l = t[r], d = te(
4111
- () => (l == null ? void 0 : l.filename) ?? (l ? ee(l.src) : "document"),
4136
+ }), l = t[r], d = se(
4137
+ () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "document"),
4112
4138
  [l]
4113
- ), m = te(
4114
- () => l ? ei(l.src) : void 0,
4139
+ ), m = se(
4140
+ () => l ? Zr(l.src) : void 0,
4115
4141
  [l]
4116
4142
  );
4117
4143
  return !l || !m ? null : /* @__PURE__ */ h(
@@ -4145,23 +4171,23 @@ const Fr = ({
4145
4171
  ]
4146
4172
  }
4147
4173
  );
4148
- }, ei = (e) => {
4174
+ }, Zr = (e) => {
4149
4175
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4150
4176
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4151
- }, ti = ({
4177
+ }, Qr = ({
4152
4178
  src: e,
4153
4179
  filename: t,
4154
4180
  fileSize: s,
4155
4181
  title: a,
4156
4182
  items: r
4157
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ni = ({
4183
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ei = ({
4158
4184
  variant: e,
4159
4185
  item: t,
4160
4186
  index: s,
4161
4187
  onActivate: a,
4162
4188
  trailingAction: r
4163
4189
  }) => {
4164
- const i = t.filename ?? ee(t.src);
4190
+ const i = t.filename ?? ne(t.src);
4165
4191
  return /* @__PURE__ */ n(
4166
4192
  gn,
4167
4193
  {
@@ -4187,14 +4213,14 @@ const Fr = ({
4187
4213
  onClick: d,
4188
4214
  onDismiss: m
4189
4215
  }) => {
4190
- const g = Ne(e), u = ti({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: w, closeViewer: b } = ye(
4216
+ const g = Ne(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ye(
4191
4217
  d
4192
- ), p = e === "composer" && !!m;
4218
+ ), v = e === "composer" && !!m;
4193
4219
  if (u.length === 0)
4194
4220
  return null;
4195
- const v = u.map((_) => ({
4196
- src: _.src,
4197
- filename: _.filename ?? ee(_.src)
4221
+ const p = u.map((x) => ({
4222
+ src: x.src,
4223
+ filename: x.filename ?? ne(x.src)
4198
4224
  }));
4199
4225
  return /* @__PURE__ */ h(
4200
4226
  we,
@@ -4204,45 +4230,45 @@ const Fr = ({
4204
4230
  groupPosition: l,
4205
4231
  "data-testid": "pdf-attachment",
4206
4232
  children: [
4207
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((_, L) => {
4208
- const T = _.filename ?? ee(_.src), y = p && L === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4233
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, A) => {
4234
+ const M = x.filename ?? ne(x.src), y = v && A === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4209
4235
  pn,
4210
4236
  {
4211
- url: _.src,
4212
- filename: T,
4237
+ url: x.src,
4238
+ filename: M,
4213
4239
  variant: "inline",
4214
- label: `Download ${T}`,
4240
+ label: `Download ${M}`,
4215
4241
  tone: g
4216
4242
  }
4217
4243
  );
4218
4244
  return /* @__PURE__ */ n(
4219
- ni,
4245
+ ei,
4220
4246
  {
4221
4247
  variant: g,
4222
- item: _,
4223
- index: L,
4224
- onActivate: w,
4248
+ item: x,
4249
+ index: A,
4250
+ onActivate: b,
4225
4251
  trailingAction: y
4226
4252
  },
4227
- `${_.src}-${L}`
4253
+ `${x.src}-${A}`
4228
4254
  );
4229
4255
  }) }),
4230
4256
  /* @__PURE__ */ n(
4231
- Qr,
4257
+ Jr,
4232
4258
  {
4233
4259
  open: f,
4234
- items: v,
4260
+ items: p,
4235
4261
  initialIndex: c,
4236
- onClose: b
4262
+ onClose: _
4237
4263
  }
4238
4264
  )
4239
4265
  ]
4240
4266
  }
4241
4267
  );
4242
- }, si = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), ai = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), ri = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), ii = {
4243
- Composer: si,
4244
- Sent: ai,
4245
- Received: ri
4268
+ }, 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 = {
4269
+ Composer: ti,
4270
+ Sent: ni,
4271
+ Received: si
4246
4272
  }, Nn = ({
4247
4273
  open: e,
4248
4274
  items: t,
@@ -4253,8 +4279,8 @@ const Fr = ({
4253
4279
  length: t.length,
4254
4280
  initialIndex: s,
4255
4281
  open: e
4256
- }), l = t[r], d = te(
4257
- () => (l == null ? void 0 : l.filename) ?? (l ? ee(l.src) : "video"),
4282
+ }), l = t[r], d = se(
4283
+ () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "video"),
4258
4284
  [l]
4259
4285
  );
4260
4286
  return l ? /* @__PURE__ */ h(
@@ -4293,7 +4319,7 @@ const Fr = ({
4293
4319
  ]
4294
4320
  }
4295
4321
  ) : null;
4296
- }, oi = () => /* @__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 = ({
4322
+ }, 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 = ({
4297
4323
  item: e,
4298
4324
  index: t
4299
4325
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4315,11 +4341,11 @@ const Fr = ({
4315
4341
  "aria-hidden": !0
4316
4342
  }
4317
4343
  ) }),
4318
- /* @__PURE__ */ n(oi, {})
4319
- ] }), li = (e, t, s) => ({
4344
+ /* @__PURE__ */ n(ri, {})
4345
+ ] }), ii = (e, t, s) => ({
4320
4346
  ariaLabel: `Play video ${t + 1} of ${s}`,
4321
4347
  content: /* @__PURE__ */ n(yn, { item: e, index: t })
4322
- }), ci = ({
4348
+ }), oi = ({
4323
4349
  src: e,
4324
4350
  poster: t,
4325
4351
  mimeType: s,
@@ -4331,7 +4357,7 @@ const Fr = ({
4331
4357
  mimeType: s.mimeType,
4332
4358
  preload: s.preload,
4333
4359
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4334
- })), di = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4360
+ })), li = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4335
4361
  const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = ye(
4336
4362
  i
4337
4363
  );
@@ -4372,13 +4398,13 @@ const Fr = ({
4372
4398
  preload: d,
4373
4399
  onClick: m
4374
4400
  }) => {
4375
- const g = ci({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: w, closeViewer: b } = ye(
4401
+ const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ye(
4376
4402
  m
4377
4403
  );
4378
4404
  if (g.length === 0)
4379
4405
  return null;
4380
- const p = g.map(
4381
- (v, _) => li(v, _, g.length)
4406
+ const v = g.map(
4407
+ (p, x) => ii(p, x, g.length)
4382
4408
  );
4383
4409
  return /* @__PURE__ */ h(
4384
4410
  we,
@@ -4391,8 +4417,8 @@ const Fr = ({
4391
4417
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4392
4418
  xn,
4393
4419
  {
4394
- tiles: p,
4395
- onTileActivate: w,
4420
+ tiles: v,
4421
+ onTileActivate: b,
4396
4422
  className: "overflow-hidden rounded-md"
4397
4423
  }
4398
4424
  ) }),
@@ -4402,23 +4428,23 @@ const Fr = ({
4402
4428
  open: f,
4403
4429
  items: Cn(g, r),
4404
4430
  initialIndex: c,
4405
- onClose: b
4431
+ onClose: _
4406
4432
  }
4407
4433
  )
4408
4434
  ]
4409
4435
  }
4410
4436
  );
4411
- }, ui = (e) => /* @__PURE__ */ n(di, { ...e }), mi = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), hi = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), fi = {
4412
- Composer: ui,
4413
- Sent: mi,
4414
- Received: hi
4415
- }, Ai = {
4416
- Image: Zr,
4417
- Video: fi,
4418
- Audio: Mr,
4419
- Pdf: ii,
4420
- File: Gr
4421
- }, gi = ({
4437
+ }, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), mi = {
4438
+ Composer: ci,
4439
+ Sent: di,
4440
+ Received: ui
4441
+ }, Ii = {
4442
+ Image: Kr,
4443
+ Video: mi,
4444
+ Audio: Tr,
4445
+ Pdf: ai,
4446
+ File: jr
4447
+ }, hi = ({
4422
4448
  question: e,
4423
4449
  onClick: t,
4424
4450
  loading: s = !1,
@@ -4430,7 +4456,7 @@ const Fr = ({
4430
4456
  onClick: t,
4431
4457
  disabled: s,
4432
4458
  style: { backgroundColor: "#E6E5E3" },
4433
- className: k(
4459
+ className: N(
4434
4460
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4435
4461
  {
4436
4462
  "hover:brightness-95 active:brightness-90": !s,
@@ -4440,7 +4466,7 @@ const Fr = ({
4440
4466
  ),
4441
4467
  children: e
4442
4468
  }
4443
- ), Mi = ({
4469
+ ), Ti = ({
4444
4470
  faqs: e,
4445
4471
  onFaqClick: t,
4446
4472
  loadingFaqId: s,
@@ -4452,7 +4478,7 @@ const Fr = ({
4452
4478
  const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4453
4479
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4454
4480
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4455
- re,
4481
+ ie,
4456
4482
  {
4457
4483
  id: o || "account",
4458
4484
  name: o || "Account",
@@ -4469,7 +4495,7 @@ const Fr = ({
4469
4495
  children: [
4470
4496
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4471
4497
  l.map((d) => /* @__PURE__ */ n(
4472
- gi,
4498
+ hi,
4473
4499
  {
4474
4500
  question: d.question,
4475
4501
  onClick: () => t(d.id),
@@ -4484,38 +4510,37 @@ const Fr = ({
4484
4510
  };
4485
4511
  export {
4486
4512
  en as A,
4487
- qs as B,
4488
- Ja as C,
4489
- $s as D,
4490
- Mi as F,
4491
- Ii as L,
4492
- ki as M,
4493
- He as V,
4513
+ Hs as B,
4514
+ Xa as C,
4515
+ Ps as D,
4516
+ Ti as F,
4517
+ Ei as L,
4518
+ yi as M,
4494
4519
  ge as a,
4495
- re as b,
4496
- or as c,
4520
+ ie as b,
4521
+ rr as c,
4497
4522
  un as d,
4498
- Ei as e,
4499
- gi as f,
4500
- se as g,
4523
+ Ci as e,
4524
+ hi as f,
4525
+ re as g,
4501
4526
  zt as h,
4502
- Ai as i,
4503
- Ea as j,
4504
- Ci as k,
4505
- Si as l,
4506
- Pr as m,
4507
- Rr as n,
4508
- rr as o,
4509
- Dr as p,
4527
+ Ii as i,
4528
+ Ca as j,
4529
+ Ni as k,
4530
+ ki as l,
4531
+ Lr as m,
4532
+ Ar as n,
4533
+ sr as o,
4534
+ Rr as p,
4510
4535
  Kt as q,
4511
4536
  le as r,
4512
4537
  sn as s,
4513
- Bs as t,
4514
- Ti as u,
4515
- Ws as v,
4538
+ $s as t,
4539
+ Si as u,
4540
+ Ys as v,
4516
4541
  Qe as w,
4517
4542
  et as x,
4518
4543
  Xt as y,
4519
- wa as z
4544
+ va as z
4520
4545
  };
4521
- //# sourceMappingURL=index-DG5LOHey.js.map
4546
+ //# sourceMappingURL=index-DPGZRLRM.js.map