@linktr.ee/messaging-react 3.5.0-rc-1782408966 → 3.5.0-rc-1782480113

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 (33) hide show
  1. package/dist/{Card-CUHEDe8O.js → Card-D34G7gvm.js} +2 -2
  2. package/dist/{Card-CUHEDe8O.js.map → Card-D34G7gvm.js.map} +1 -1
  3. package/dist/{Card-DuMr5KMP.cjs → Card-DIFgYVKx.cjs} +2 -2
  4. package/dist/{Card-DuMr5KMP.cjs.map → Card-DIFgYVKx.cjs.map} +1 -1
  5. package/dist/{Card-BNzC_bp8.js → Card-DVDoFfkP.js} +3 -3
  6. package/dist/{Card-BNzC_bp8.js.map → Card-DVDoFfkP.js.map} +1 -1
  7. package/dist/{Card-DJtDI03Y.cjs → Card-DhAhEetQ.cjs} +2 -2
  8. package/dist/{Card-DJtDI03Y.cjs.map → Card-DhAhEetQ.cjs.map} +1 -1
  9. package/dist/{Card-iekRe643.js → Card-Dy1Qj3MR.js} +2 -2
  10. package/dist/{Card-iekRe643.js.map → Card-Dy1Qj3MR.js.map} +1 -1
  11. package/dist/{Card-DEa50m9p.cjs → Card-yHlBBfOt.cjs} +2 -2
  12. package/dist/{Card-DEa50m9p.cjs.map → Card-yHlBBfOt.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-CvpRZFi-.js → LockedThumbnail-1S_Rjelj.js} +2 -2
  14. package/dist/{LockedThumbnail-CvpRZFi-.js.map → LockedThumbnail-1S_Rjelj.js.map} +1 -1
  15. package/dist/{LockedThumbnail-aME0f_ZF.cjs → LockedThumbnail-P2BVsLli.cjs} +2 -2
  16. package/dist/{LockedThumbnail-aME0f_ZF.cjs.map → LockedThumbnail-P2BVsLli.cjs.map} +1 -1
  17. package/dist/index-BZjaMDgI.cjs +2 -0
  18. package/dist/index-BZjaMDgI.cjs.map +1 -0
  19. package/dist/{index-BlpDX5fl.js → index-CgczmQkU.js} +1179 -1171
  20. package/dist/index-CgczmQkU.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +25 -1
  23. package/dist/index.js +12 -11
  24. package/package.json +2 -2
  25. package/src/components/ChannelView.tsx +5 -0
  26. package/src/components/CustomMessageInput/CustomMessageInput.test.tsx +34 -0
  27. package/src/components/CustomMessageInput/index.tsx +23 -1
  28. package/src/components/MessagingShell/index.tsx +2 -0
  29. package/src/index.ts +1 -0
  30. package/src/types.ts +18 -0
  31. package/dist/index-BIWS3Inh.cjs +0 -2
  32. package/dist/index-BIWS3Inh.cjs.map +0 -1
  33. package/dist/index-BlpDX5fl.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as n, jsxs as h, Fragment as ae } from "react/jsx-runtime";
2
- import U, { createContext as qe, useContext as Me, useCallback as Z, useState as z, useRef as H, useEffect as J, useId as In, useMemo as se, Suspense as We } from "react";
2
+ import V, { createContext as We, useContext as _e, useCallback as Z, useState as z, useRef as H, useEffect as K, useId as In, useMemo as se, Suspense as Xe } from "react";
3
3
  import { StreamChatService as Tn } from "@linktr.ee/messaging-core";
4
- import { StreamChat as An, LinkPreviewsManager as Mt } from "stream-chat";
5
- import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as ce, useChatContext as Xe, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as jt, Attachment as Pn, EditMessageModal as On, MessageBlocked as zn, MessageBouncePrompt as $n, MessageDeleted as Fn, MessageIsThreadReplyInChannelButtonIndicator as Bn, MessageRepliesCountButton as Vn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Gn, messageHasReactions as Hn, isDateSeparatorMessage as Yn, isMessageBlocked as qn, isMessageBounced as Wn, MessageBounceModal as Xn, MessageText as Rt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as we, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Pe, AIStates as Oe, useTypingContext as is, useAIState as os, Channel as ls, WithComponents as cs, Window as ds, MessageList as us, ChannelList as ms, InfiniteScroll as hs } from "stream-chat-react";
6
- import { StarIcon as Ve, DotsThreeIcon as fs, SpinnerGapIcon as Ee, SignOutIcon as gs, ProhibitInsetIcon as Lt, FlagIcon as Gt, FileIcon as Ht, ImageIcon as bs, SpeakerHighIcon as ps, VideoCameraIcon as Yt, FileMdIcon as vs, FileTextIcon as xs, FileZipIcon as ws, FilePptIcon as _s, FileCsvIcon as Ns, FileXlsIcon as ys, FileDocIcon as Cs, FilePdfIcon as ks, CircleNotchIcon as ve, PlayIcon as Ue, PauseIcon as Es, LinkIcon as Ss, DownloadSimpleIcon as xe, GiftIcon as Is, ThumbsUpIcon as Ts, ThumbsDownIcon as As, TrashSimpleIcon as Ms, XIcon as Re, ArrowUpIcon as Rs, SparkleIcon as je, ProhibitIcon as Ls, SealCheckIcon as Ds, ArrowLeftIcon as Dt, CaretRightIcon as Ge, PencilSimpleIcon as Ps, CaretLeftIcon as Os } from "@phosphor-icons/react";
7
- import y from "classnames";
8
- import { MessageActions as zs, DefaultDropdownActionButton as qt } from "stream-chat-react/experimental";
9
- const Wt = qe({
4
+ import { StreamChat as An, LinkPreviewsManager as Lt } from "stream-chat";
5
+ import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as de, useChatContext as Ke, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as Ht, Attachment as Pn, EditMessageModal as On, MessageBlocked as zn, MessageBouncePrompt as $n, MessageDeleted as Fn, MessageIsThreadReplyInChannelButtonIndicator as Bn, MessageRepliesCountButton as Vn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Gn, messageHasReactions as Hn, isDateSeparatorMessage as Yn, isMessageBlocked as qn, isMessageBounced as Wn, MessageBounceModal as Xn, MessageText as Dt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as Ne, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Oe, AIStates as ze, useTypingContext as is, useAIState as os, Channel as ls, WithComponents as cs, Window as ds, MessageList as us, ChannelList as ms, InfiniteScroll as hs } from "stream-chat-react";
6
+ import { StarIcon as Ue, DotsThreeIcon as fs, SpinnerGapIcon as Ie, SignOutIcon as gs, ProhibitInsetIcon as Pt, FlagIcon as Yt, FileIcon as qt, ImageIcon as bs, SpeakerHighIcon as ps, VideoCameraIcon as Wt, FileMdIcon as vs, FileTextIcon as xs, FileZipIcon as ws, FilePptIcon as _s, FileCsvIcon as Ns, FileXlsIcon as ys, FileDocIcon as Cs, FilePdfIcon as ks, CircleNotchIcon as xe, PlayIcon as je, PauseIcon as Es, LinkIcon as Ss, DownloadSimpleIcon as we, GiftIcon as Is, ThumbsUpIcon as Ts, ThumbsDownIcon as As, TrashSimpleIcon as Ms, XIcon as Le, ArrowUpIcon as Rs, SparkleIcon as Ge, ProhibitIcon as Ls, SealCheckIcon as Ds, ArrowLeftIcon as Ot, CaretRightIcon as He, PencilSimpleIcon as Ps, CaretLeftIcon as Os } from "@phosphor-icons/react";
7
+ import k from "classnames";
8
+ import { MessageActions as zs, DefaultDropdownActionButton as Xt } from "stream-chat-react/experimental";
9
+ const Kt = We({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const Wt = qe({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), Ke = () => Me(Wt), Ci = ({
19
+ }), Je = () => _e(Kt), Ci = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,204 +24,204 @@ const Wt = qe({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var T, k;
28
- const o = Z(
29
- (I, ...C) => {
30
- i && console.log(`🔥 [MessagingProvider] ${I}`, ...C);
27
+ var A, y;
28
+ const l = Z(
29
+ (E, ...C) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${E}`, ...C);
31
31
  },
32
32
  [i]
33
33
  );
34
- o("🔄 RENDER START", {
34
+ l("🔄 RENDER START", {
35
35
  userId: t == null ? void 0 : t.id,
36
36
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
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, x] = z(!1), [b, w] = z(null), v = H(!1), p = H(null), A = H(s);
41
- A.current = s;
42
- const R = H(i);
43
- R.current = i;
44
- const L = H({
40
+ const [o, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, w] = z(!1), [b, _] = z(null), v = H(!1), p = H(null), I = H(s);
41
+ I.current = s;
42
+ const M = H(i);
43
+ M.current = i;
44
+ const R = H({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), S = H(0);
50
- S.current++, o("📊 RENDER INFO", {
51
- renderCount: S.current,
49
+ }), T = H(0);
50
+ T.current++, l("📊 RENDER INFO", {
51
+ renderCount: T.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
54
- userChanged: L.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: L.current.apiKey !== a,
56
- serviceConfigChanged: L.current.serviceConfig !== s,
57
- capabilitiesChanged: L.current.capabilities !== r
54
+ userChanged: R.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: R.current.apiKey !== a,
56
+ serviceConfigChanged: R.current.serviceConfig !== s,
57
+ capabilitiesChanged: R.current.capabilities !== r
58
58
  }
59
- }), L.current = {
59
+ }), R.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const D = H(null);
66
- a && ((T = D.current) == null ? void 0 : T.apiKey) !== a && (D.current = { apiKey: a, client: new An(a) });
67
- const P = a ? ((k = D.current) == null ? void 0 : k.client) ?? null : null;
68
- J(() => {
69
- const I = S.current, C = A.current;
70
- if (!a || !P || !C) {
71
- o("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: I,
65
+ const L = H(null);
66
+ a && ((A = L.current) == null ? void 0 : A.apiKey) !== a && (L.current = { apiKey: a, client: new An(a) });
67
+ const D = a ? ((y = L.current) == null ? void 0 : y.client) ?? null : null;
68
+ K(() => {
69
+ const E = T.current, C = I.current;
70
+ if (!a || !D || !C) {
71
+ l("⚠️ SERVICE INIT SKIPPED", {
72
+ renderCount: E,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
- o("🚀 CREATING SERVICE", {
78
- renderCount: I,
77
+ l("🚀 CREATING SERVICE", {
78
+ renderCount: E,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const O = new Tn({
81
+ const $ = new Tn({
82
82
  ...C,
83
83
  apiKey: a,
84
- debug: R.current,
85
- client: P
84
+ debug: M.current,
85
+ client: D
86
86
  });
87
- p.current = O, d(O), o("✅ SERVICE SET", {
88
- renderCount: I,
89
- serviceInstance: !!O
87
+ p.current = $, d($), l("✅ SERVICE SET", {
88
+ renderCount: E,
89
+ serviceInstance: !!$
90
90
  });
91
- }, [a, P]);
92
- const B = H(null);
93
- J(() => {
94
- var C, O;
95
- if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
- hasService: !!l,
91
+ }, [a, D]);
92
+ const U = H(null);
93
+ K(() => {
94
+ var C, $;
95
+ if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
+ hasService: !!o,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
99
  isConnecting: v.current,
100
100
  isConnected: u,
101
- dependencies: { service: !!l, userId: t == null ? void 0 : t.id }
102
- }), !l || !t) {
103
- o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
101
+ dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
102
+ }), !o || !t) {
103
+ l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
106
  if (v.current) {
107
- o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
107
+ l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((C = B.current) == null ? void 0 : C.serviceId) === l && ((O = B.current) == null ? void 0 : O.userId) === t.id) {
111
- o(
110
+ if (((C = U.current) == null ? void 0 : C.serviceId) === o && (($ = U.current) == null ? void 0 : $.userId) === t.id) {
111
+ l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
114
114
  );
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- o("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, x(!0), w(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, w(!0), _(null);
119
119
  try {
120
- o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const $ = await l.connectUser(t);
122
- g($), f(!0), B.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
120
+ l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
+ const P = await o.connectUser(t);
122
+ g(P), f(!0), U.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: $.userID
124
+ clientId: P.userID
125
125
  });
126
- } catch ($) {
127
- const j = $ instanceof Error ? $.message : "Connection failed";
128
- w(j), o("❌ USER CONNECTION ERROR", {
126
+ } catch (P) {
127
+ const j = P instanceof Error ? P.message : "Connection failed";
128
+ _(j), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: j
131
131
  });
132
132
  } finally {
133
- x(!1), v.current = !1, o("🔄 USER CONNECTION FINISHED", {
133
+ w(!1), v.current = !1, l("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: u
136
136
  });
137
137
  }
138
138
  })();
139
- }, [l, t, o, u]), J(() => {
140
- const I = P;
139
+ }, [o, t, l, u]), K(() => {
140
+ const E = D;
141
141
  return () => {
142
142
  var C;
143
- I && (B.current = null, (C = p.current) == null || C.disconnectUser().catch(console.error));
143
+ E && (U.current = null, (C = p.current) == null || C.disconnectUser().catch(console.error));
144
144
  };
145
- }, [P]);
146
- const M = Z(async () => {
147
- if (o("🔄 REFRESH CONNECTION CALLED", {
148
- hasService: !!l,
145
+ }, [D]);
146
+ const O = Z(async () => {
147
+ if (l("🔄 REFRESH CONNECTION CALLED", {
148
+ hasService: !!o,
149
149
  hasUser: !!t
150
- }), !l || !t) {
151
- o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
150
+ }), !o || !t) {
151
+ l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), x(!0);
154
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), w(!0);
155
155
  try {
156
- o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
157
- const I = await l.connectUser(t);
158
- g(I), f(!0), w(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (I) {
160
- const C = I instanceof Error ? I.message : "Refresh failed";
161
- w(C), o("❌ CONNECTION REFRESH ERROR", {
156
+ l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
+ const E = await o.connectUser(t);
158
+ g(E), f(!0), _(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (E) {
160
+ const C = E instanceof Error ? E.message : "Refresh failed";
161
+ _(C), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
163
  error: C
164
164
  });
165
165
  } finally {
166
- x(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ w(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [l, t, o]), N = U.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
- hasService: !!l,
168
+ }, [o, t, l]), N = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
+ hasService: !!o,
170
170
  hasClient: !!m,
171
171
  isConnected: u,
172
172
  isLoading: c,
173
173
  hasError: !!b,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
- service: l,
176
+ service: o,
177
177
  client: m,
178
178
  isConnected: u,
179
179
  isLoading: c,
180
180
  error: b,
181
181
  capabilities: r,
182
- refreshConnection: M,
182
+ refreshConnection: O,
183
183
  debug: i
184
184
  }), [
185
- l,
185
+ o,
186
186
  m,
187
187
  u,
188
188
  c,
189
189
  b,
190
190
  r,
191
- M,
191
+ O,
192
192
  i,
193
- o
193
+ l
194
194
  ]);
195
- return o("🔄 RENDER END", {
196
- renderCount: S.current,
197
- willRenderChat: !!P,
195
+ return l("🔄 RENDER END", {
196
+ renderCount: T.current,
197
+ willRenderChat: !!D,
198
198
  contextValueReady: !!N
199
- }), /* @__PURE__ */ n(Wt.Provider, { value: N, children: P ? /* @__PURE__ */ n(
199
+ }), /* @__PURE__ */ n(Kt.Provider, { value: N, children: D ? /* @__PURE__ */ n(
200
200
  Mn,
201
201
  {
202
- client: P,
202
+ client: D,
203
203
  customClasses: {
204
204
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
205
205
  },
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, $s = () => Ke(), Xt = (e) => {
209
+ }, $s = () => Je(), Jt = (e) => {
210
210
  var a, r;
211
211
  const [t, s] = z(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
- return J(() => {
215
- var o;
214
+ return K(() => {
215
+ var l;
216
216
  if (!e) {
217
217
  s(!1);
218
218
  return;
219
219
  }
220
- s(!!((o = e.state.membership) != null && o.pinned_at));
221
- const i = (l) => {
220
+ s(!!((l = e.state.membership) != null && l.pinned_at));
221
+ const i = (o) => {
222
222
  var d;
223
223
  s(
224
- l != null && l.member ? !!l.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
224
+ o != null && o.member ? !!o.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
225
225
  );
226
226
  };
227
227
  return e.on("member.updated", i), () => {
@@ -232,14 +232,14 @@ const Wt = qe({
232
232
  function Bs(e) {
233
233
  return Fs.test(e.trim());
234
234
  }
235
- function Pt(e, t) {
235
+ function zt(e, t) {
236
236
  const s = e == null ? void 0 : e.trim();
237
237
  return !s || t && s === t ? !1 : !Bs(s);
238
238
  }
239
- function Kt(e) {
240
- return Pt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Pt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
239
+ function Zt(e) {
240
+ return zt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : zt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
241
241
  }
242
- const Ot = [
242
+ const $t = [
243
243
  "🍎",
244
244
  // Apple
245
245
  "🍌",
@@ -276,19 +276,19 @@ function Vs(e) {
276
276
  return Math.abs(t);
277
277
  }
278
278
  function Us(e) {
279
- const s = Vs(e) % Ot.length;
280
- return Ot[s];
279
+ const s = Vs(e) % $t.length;
280
+ return $t[s];
281
281
  }
282
- const ie = ({
282
+ const oe = ({
283
283
  id: e,
284
284
  image: t,
285
285
  size: s = 40,
286
286
  className: a,
287
287
  starred: r = !1,
288
288
  shape: i = "squircle",
289
- dmAgentEnabled: o = !1
289
+ dmAgentEnabled: l = !1
290
290
  }) => {
291
- const l = Us(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 o = Us(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,17 +299,17 @@ const ie = ({
299
299
  "div",
300
300
  {
301
301
  "aria-hidden": "true",
302
- className: y(
302
+ className: k(
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
  ),
306
- children: l
306
+ children: o
307
307
  }
308
308
  ) });
309
309
  return /* @__PURE__ */ h(
310
310
  "div",
311
311
  {
312
- className: y(
312
+ className: k(
313
313
  "relative flex-shrink-0 !bg-transparent",
314
314
  a
315
315
  ),
@@ -324,20 +324,20 @@ const ie = ({
324
324
  {
325
325
  "aria-hidden": "true",
326
326
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
327
- children: /* @__PURE__ */ n(Ve, { className: "size-3 text-yellow-600", weight: "duotone" })
327
+ children: /* @__PURE__ */ n(Ue, { className: "size-3 text-yellow-600", weight: "duotone" })
328
328
  }
329
329
  ),
330
330
  /* @__PURE__ */ n(
331
331
  "div",
332
332
  {
333
333
  "data-testid": "avatar-ring",
334
- className: y(
334
+ className: k(
335
335
  "h-full w-full",
336
336
  "bg-transparent"
337
337
  ),
338
338
  style: {
339
339
  ...u,
340
- ...o && {
340
+ ...l && {
341
341
  borderWidth: `${g}px`,
342
342
  borderStyle: "solid",
343
343
  borderColor: "var(--AI-Gradient, #7F22FE)",
@@ -357,79 +357,79 @@ const ie = ({
357
357
  enabled: a = !0,
358
358
  onLeaveConversation: r,
359
359
  onBlockParticipant: i,
360
- onDeleteConversationClick: o,
361
- onBlockParticipantClick: l,
360
+ onDeleteConversationClick: l,
361
+ onBlockParticipantClick: o,
362
362
  onReportParticipantClick: d,
363
363
  onActionComplete: m,
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
- var T;
367
- const { service: u, debug: f } = Ke(), c = (T = t == null ? void 0 : t.user) == null ? void 0 : T.id, x = !!(a && s && u && c), [b, w] = z(!1), [v, p] = z(null), [A, R] = z(!1), [L, S] = z(!1), D = x && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
368
- return J(() => {
369
- if (!x || !u || !c) {
370
- w(!1), p(null);
366
+ var A;
367
+ const { service: u, debug: f } = Je(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, w = !!(a && s && u && c), [b, _] = z(!1), [v, p] = z(null), [I, M] = z(!1), [R, T] = z(!1), L = w && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
368
+ return K(() => {
369
+ if (!w || !u || !c) {
370
+ _(!1), p(null);
371
371
  return;
372
372
  }
373
- let k = !1;
373
+ let y = !1;
374
374
  return (async () => {
375
375
  try {
376
- const I = await u.getBlockedUsers();
377
- if (k) return;
378
- w(
379
- I.some(
376
+ const E = await u.getBlockedUsers();
377
+ if (y) return;
378
+ _(
379
+ E.some(
380
380
  (C) => C.blocked_user_id === c
381
381
  )
382
382
  );
383
- } catch (I) {
384
- k || console.error(`[${g}] Failed to check blocked status:`, I);
383
+ } catch (E) {
384
+ y || console.error(`[${g}] Failed to check blocked status:`, E);
385
385
  } finally {
386
- k || p({ participantId: c, service: u });
386
+ y || p({ participantId: c, service: u });
387
387
  }
388
388
  })(), () => {
389
- k = !0;
389
+ y = !0;
390
390
  };
391
- }, [x, u, c, g]), {
391
+ }, [w, u, c, g]), {
392
392
  isParticipantBlocked: b,
393
- isCheckingBlockedStatus: D,
394
- isLeaving: A,
395
- isUpdatingBlockStatus: L,
393
+ isCheckingBlockedStatus: L,
394
+ isLeaving: I,
395
+ isUpdatingBlockStatus: R,
396
396
  handleLeaveConversation: async () => {
397
- var k;
398
- if (!A) {
399
- o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), R(!0);
397
+ var y;
398
+ if (!I) {
399
+ l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), M(!0);
400
400
  try {
401
- const I = ((k = e._client) == null ? void 0 : k.userID) ?? null;
402
- await e.hide(I, !1), r && await r(e), m == null || m();
403
- } catch (I) {
404
- console.error(`[${g}] Failed to leave conversation`, I);
401
+ const E = ((y = e._client) == null ? void 0 : y.userID) ?? null;
402
+ await e.hide(E, !1), r && await r(e), m == null || m();
403
+ } catch (E) {
404
+ console.error(`[${g}] Failed to leave conversation`, E);
405
405
  } finally {
406
- R(!1);
406
+ M(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var k, I, C;
412
- if (!(L || !u)) {
413
- l == null || l(), f && console.log(`[${g}] Block member`, (k = t == null ? void 0 : t.user) == null ? void 0 : k.id), S(!0);
411
+ var y, E, C;
412
+ if (!(R || !u)) {
413
+ o == null || o(), f && console.log(`[${g}] Block member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), T(!0);
414
414
  try {
415
- await u.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), m == null || m();
416
- } catch (O) {
417
- console.error(`[${g}] Failed to block member`, O);
415
+ await u.blockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), m == null || m();
416
+ } catch ($) {
417
+ console.error(`[${g}] Failed to block member`, $);
418
418
  } finally {
419
- S(!1);
419
+ T(!1);
420
420
  }
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var k, I, C;
425
- if (!(L || !u)) {
426
- l == null || l(), f && console.log(`[${g}] Unblock member`, (k = t == null ? void 0 : t.user) == null ? void 0 : k.id), S(!0);
424
+ var y, E, C;
425
+ if (!(R || !u)) {
426
+ o == null || o(), f && console.log(`[${g}] Unblock member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), T(!0);
427
427
  try {
428
- await u.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), m == null || m();
429
- } catch (O) {
430
- console.error(`[${g}] Failed to unblock member`, O);
428
+ await u.unBlockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), m == null || m();
429
+ } catch ($) {
430
+ console.error(`[${g}] Failed to unblock member`, $);
431
431
  } finally {
432
- S(!1);
432
+ T(!1);
433
433
  }
434
434
  }
435
435
  },
@@ -437,7 +437,7 @@ const ie = ({
437
437
  d == null || d(), m == null || m(), window.open(js, "_blank", "noopener,noreferrer");
438
438
  }
439
439
  };
440
- }, ge = ({
440
+ }, be = ({
441
441
  variant: e = "default",
442
442
  className: t,
443
443
  children: s,
@@ -446,7 +446,7 @@ const ie = ({
446
446
  "button",
447
447
  {
448
448
  type: "button",
449
- className: y(
449
+ className: k(
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,53 +454,53 @@ const ie = ({
454
454
  ...a,
455
455
  children: s
456
456
  }
457
- ), zt = ({
457
+ ), Ft = ({
458
458
  channel: e,
459
459
  participant: t,
460
460
  showDeleteConversation: s = !0,
461
461
  showBlockParticipant: a = !0,
462
462
  showReportParticipant: r = !0,
463
463
  onLeaveConversation: i,
464
- onBlockParticipant: o,
465
- onDeleteConversationClick: l,
464
+ onBlockParticipant: l,
465
+ onDeleteConversationClick: o,
466
466
  onBlockParticipantClick: d,
467
467
  onReportParticipantClick: m,
468
468
  customChannelActions: g,
469
469
  triggerClassName: u
470
470
  }) => {
471
- const [f, c] = z(!1), x = H(null), b = In(), w = Z(() => c(!1), []), {
471
+ const [f, c] = z(!1), w = H(null), b = In(), _ = Z(() => c(!1), []), {
472
472
  isParticipantBlocked: v,
473
473
  isCheckingBlockedStatus: p,
474
- isLeaving: A,
475
- isUpdatingBlockStatus: R,
476
- handleLeaveConversation: L,
477
- handleBlockUser: S,
478
- handleUnblockUser: D,
479
- handleReportUser: P
474
+ isLeaving: I,
475
+ isUpdatingBlockStatus: M,
476
+ handleLeaveConversation: R,
477
+ handleBlockUser: T,
478
+ handleUnblockUser: L,
479
+ handleReportUser: D
480
480
  } = Gs({
481
481
  channel: e,
482
482
  participant: t,
483
483
  showBlockParticipant: a,
484
484
  enabled: f,
485
485
  onLeaveConversation: i,
486
- onBlockParticipant: o,
487
- onDeleteConversationClick: l,
486
+ onBlockParticipant: l,
487
+ onDeleteConversationClick: o,
488
488
  onBlockParticipantClick: d,
489
489
  onReportParticipantClick: m,
490
- onActionComplete: w,
490
+ onActionComplete: _,
491
491
  logLabel: "ChannelActionsMenu"
492
492
  });
493
- return J(() => {
493
+ return K(() => {
494
494
  if (!f) return;
495
- const M = (T) => {
496
- x.current && !x.current.contains(T.target) && c(!1);
497
- }, N = (T) => {
498
- T.key === "Escape" && c(!1);
495
+ const O = (A) => {
496
+ w.current && !w.current.contains(A.target) && c(!1);
497
+ }, N = (A) => {
498
+ A.key === "Escape" && c(!1);
499
499
  };
500
- return document.addEventListener("mousedown", M), document.addEventListener("keydown", N), () => {
501
- document.removeEventListener("mousedown", M), document.removeEventListener("keydown", N);
500
+ return document.addEventListener("mousedown", O), document.addEventListener("keydown", N), () => {
501
+ document.removeEventListener("mousedown", O), document.removeEventListener("keydown", N);
502
502
  };
503
- }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: x, className: "relative", children: [
503
+ }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: w, className: "relative", children: [
504
504
  /* @__PURE__ */ h(
505
505
  "button",
506
506
  {
@@ -509,7 +509,7 @@ const ie = ({
509
509
  "aria-haspopup": "true",
510
510
  "aria-expanded": f,
511
511
  "aria-controls": f ? b : void 0,
512
- onClick: () => c((M) => !M),
512
+ onClick: () => c((O) => !O),
513
513
  children: [
514
514
  /* @__PURE__ */ n(fs, { className: "size-5 text-black/90" }),
515
515
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
@@ -521,19 +521,19 @@ const ie = ({
521
521
  {
522
522
  id: b,
523
523
  "aria-label": "Conversation options",
524
- className: y(
524
+ className: k(
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
  ),
528
528
  children: /* @__PURE__ */ h("ul", { className: "flex flex-col gap-1", children: [
529
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
- ge,
530
+ be,
531
531
  {
532
- onClick: L,
533
- disabled: A,
534
- "aria-busy": A,
532
+ onClick: R,
533
+ disabled: I,
534
+ "aria-busy": I,
535
535
  children: [
536
- A ? /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(gs, { className: "h-5 w-5" }),
536
+ I ? /* @__PURE__ */ n(Ie, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(gs, { className: "h-5 w-5" }),
537
537
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
538
538
  ]
539
539
  }
@@ -541,35 +541,35 @@ const ie = ({
541
541
  a && /* @__PURE__ */ n("li", { children: p ? (
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
- /* @__PURE__ */ h(ge, { disabled: !0, "aria-busy": !0, children: [
545
- /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }),
544
+ /* @__PURE__ */ h(be, { disabled: !0, "aria-busy": !0, children: [
545
+ /* @__PURE__ */ n(Ie, { className: "h-5 w-5 animate-spin" }),
546
546
  /* @__PURE__ */ n("span", { children: "Block" })
547
547
  ] })
548
548
  ) : v ? /* @__PURE__ */ h(
549
- ge,
549
+ be,
550
550
  {
551
- onClick: D,
552
- disabled: R,
553
- "aria-busy": R,
551
+ onClick: L,
552
+ disabled: M,
553
+ "aria-busy": M,
554
554
  children: [
555
- R ? /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Lt, { className: "h-5 w-5" }),
555
+ M ? /* @__PURE__ */ n(Ie, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Pt, { className: "h-5 w-5" }),
556
556
  /* @__PURE__ */ n("span", { children: "Unblock" })
557
557
  ]
558
558
  }
559
559
  ) : /* @__PURE__ */ h(
560
- ge,
560
+ be,
561
561
  {
562
- onClick: S,
563
- disabled: R,
564
- "aria-busy": R,
562
+ onClick: T,
563
+ disabled: M,
564
+ "aria-busy": M,
565
565
  children: [
566
- R ? /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Lt, { className: "h-5 w-5" }),
566
+ M ? /* @__PURE__ */ n(Ie, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Pt, { className: "h-5 w-5" }),
567
567
  /* @__PURE__ */ n("span", { children: "Block" })
568
568
  ]
569
569
  }
570
570
  ) }),
571
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: P, children: [
572
- /* @__PURE__ */ n(Gt, { className: "h-5 w-5" }),
571
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(be, { variant: "danger", onClick: D, children: [
572
+ /* @__PURE__ */ n(Yt, { className: "h-5 w-5" }),
573
573
  /* @__PURE__ */ n("span", { children: "Report" })
574
574
  ] }) }),
575
575
  g
@@ -577,20 +577,20 @@ const ie = ({
577
577
  }
578
578
  )
579
579
  ] });
580
- }, Hs = (e) => /* @__PURE__ */ n(Rn, { ...e, position: "center" }), He = "vote_up", Ye = "vote_down";
580
+ }, Hs = (e) => /* @__PURE__ */ n(Rn, { ...e, position: "center" }), Ye = "vote_up", qe = "vote_down";
581
581
  function Ys(e) {
582
- return e != null && e.length ? e.some((t) => t.type === Ye) ? "down" : e.some((t) => t.type === He) ? "up" : null : null;
582
+ return e != null && e.length ? e.some((t) => t.type === qe) ? "down" : e.some((t) => t.type === Ye) ? "up" : null : null;
583
583
  }
584
584
  function qs(e) {
585
- const { channel: t } = ce(), { client: s } = Xe("useMessageVote"), a = se(
585
+ const { channel: t } = de(), { client: s } = Ke("useMessageVote"), a = se(
586
586
  () => Ys(e.own_reactions),
587
587
  [e.own_reactions]
588
588
  ), r = Z(async () => {
589
589
  if (s != null && s.userID)
590
590
  try {
591
- a === "up" ? await t.deleteReaction(e.id, He) : await t.sendReaction(
591
+ a === "up" ? await t.deleteReaction(e.id, Ye) : await t.sendReaction(
592
592
  e.id,
593
- { type: He },
593
+ { type: Ye },
594
594
  { enforce_unique: !0, skip_push: !0 }
595
595
  );
596
596
  } catch {
@@ -598,9 +598,9 @@ function qs(e) {
598
598
  }, [t, s == null ? void 0 : s.userID, e.id, a]), i = Z(async () => {
599
599
  if (s != null && s.userID)
600
600
  try {
601
- a === "down" ? await t.deleteReaction(e.id, Ye) : await t.sendReaction(
601
+ a === "down" ? await t.deleteReaction(e.id, qe) : await t.sendReaction(
602
602
  e.id,
603
- { type: Ye },
603
+ { type: qe },
604
604
  { enforce_unique: !0, skip_push: !0 }
605
605
  );
606
606
  } catch {
@@ -611,7 +611,7 @@ function qs(e) {
611
611
  function Ws(e) {
612
612
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
613
613
  }
614
- function Jt({
614
+ function Qt({
615
615
  message: e,
616
616
  viewerLanguage: t
617
617
  }) {
@@ -619,13 +619,13 @@ function Jt({
619
619
  const s = e == null ? void 0 : e.text, a = Ws(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-iekRe643.js")), Ks = U.lazy(() => import("./Card-CUHEDe8O.js")), Js = U.lazy(() => import("./Card-BNzC_bp8.js")), Je = () => /* @__PURE__ */ n(
622
+ const Xs = V.lazy(() => import("./Card-Dy1Qj3MR.js")), Ks = V.lazy(() => import("./Card-D34G7gvm.js")), Js = V.lazy(() => import("./Card-DVDoFfkP.js")), Ze = () => /* @__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(We, { fallback: /* @__PURE__ */ n(Je, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(We, { fallback: /* @__PURE__ */ n(Je, {}), children: /* @__PURE__ */ n(Ks, { ...e }) }), Qt = (e) => /* @__PURE__ */ n(We, { fallback: /* @__PURE__ */ n(Je, {}), children: /* @__PURE__ */ n(Js, { ...e }) }), Qs = Zt, ea = Qt, $t = { Composer: Zs, Sent: Zt, Received: Qt, Creator: Qs, Visitor: ea }, ta = [
628
+ ), Zs = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), en = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Ks, { ...e }) }), tn = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Js, { ...e }) }), Qs = en, ea = tn, Bt = { Composer: Zs, Sent: en, Received: tn, Creator: Qs, Visitor: ea }, ta = [
629
629
  [/pdf/, "pdf"],
630
630
  [/wordprocessingml|msword|\.doc/, "doc"],
631
631
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -638,17 +638,17 @@ const Xs = U.lazy(() => import("./Card-iekRe643.js")), Ks = U.lazy(() => import(
638
638
  function re(e) {
639
639
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
640
640
  }
641
- function en(e) {
641
+ function nn(e) {
642
642
  const t = ta.find(
643
643
  ([s]) => s.test(e)
644
644
  );
645
645
  return t ? t[1] : "generic";
646
646
  }
647
647
  const na = {
648
- video: Yt,
648
+ video: Wt,
649
649
  audio: ps,
650
650
  image: bs,
651
- document: Ht
651
+ document: qt
652
652
  }, sa = {
653
653
  pdf: ks,
654
654
  doc: Cs,
@@ -658,14 +658,14 @@ const na = {
658
658
  zip: ws,
659
659
  text: xs,
660
660
  markdown: vs,
661
- generic: Ht
661
+ generic: qt
662
662
  };
663
663
  function aa(e) {
664
664
  const t = re(e);
665
- return t !== "document" ? na[t] : sa[en(e)];
665
+ return t !== "document" ? na[t] : sa[nn(e)];
666
666
  }
667
- function le(e, t) {
668
- return U.createElement(aa(e), t);
667
+ function ce(e, t) {
668
+ return V.createElement(aa(e), t);
669
669
  }
670
670
  const ra = (e) => {
671
671
  var t, s;
@@ -677,79 +677,79 @@ const ra = (e) => {
677
677
  autoPlay: a = !1,
678
678
  playing: r,
679
679
  loop: i = !1,
680
- controls: o = !0,
681
- showProgress: l = !1,
680
+ controls: l = !0,
681
+ showProgress: o = !1,
682
682
  muted: d = !1,
683
683
  onContainerClick: m
684
684
  }) => {
685
- const g = re(t), u = H(null), f = H(null), c = H(null), x = H(r), [b, w] = z(a), [v, p] = z(0), [A, R] = z(!1), [L, S] = z(!1), [D, P] = z(!1), [B, M] = z(!1), [N, T] = z(!0), [k, I] = z(null), C = Z(() => {
686
- P(!1), w(!0);
687
- }, []), O = Z((_) => {
688
- const E = f.current;
689
- if (!E) return 0;
690
- const F = E.getBoundingClientRect();
685
+ const g = re(t), u = H(null), f = H(null), c = H(null), w = H(r), [b, _] = z(a), [v, p] = z(0), [I, M] = z(!1), [R, T] = z(!1), [L, D] = z(!1), [U, O] = z(!1), [N, A] = z(!0), [y, E] = z(null), C = Z(() => {
686
+ D(!1), _(!0);
687
+ }, []), $ = Z((x) => {
688
+ const S = f.current;
689
+ if (!S) return 0;
690
+ const B = S.getBoundingClientRect();
691
691
  return Math.max(
692
692
  0,
693
- Math.min(1, (ra(_) - F.left) / F.width)
693
+ Math.min(1, (ra(x) - B.left) / B.width)
694
694
  );
695
- }, []), $ = Z((_) => {
696
- const E = u.current;
697
- E && E.duration && (E.currentTime = _ * E.duration);
698
- }, []), j = (_) => {
699
- _.stopPropagation(), R(!0);
700
- const E = O(_);
701
- p(E), $(E);
695
+ }, []), P = Z((x) => {
696
+ const S = u.current;
697
+ S && S.duration && (S.currentTime = x * S.duration);
698
+ }, []), j = (x) => {
699
+ x.stopPropagation(), M(!0);
700
+ const S = $(x);
701
+ p(S), P(S);
702
702
  };
703
- J(() => {
704
- r !== void 0 && r !== x.current && (x.current = r, w(r));
705
- }, [r]), J(() => {
703
+ K(() => {
704
+ r !== void 0 && r !== w.current && (w.current = r, _(r));
705
+ }, [r]), K(() => {
706
706
  if (!b) {
707
707
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
708
708
  return;
709
709
  }
710
- const _ = () => {
711
- const E = u.current;
712
- E && E.duration && !A && p(E.currentTime / E.duration), c.current = requestAnimationFrame(_);
710
+ const x = () => {
711
+ const S = u.current;
712
+ S && S.duration && !I && p(S.currentTime / S.duration), c.current = requestAnimationFrame(x);
713
713
  };
714
- return c.current = requestAnimationFrame(_), () => {
714
+ return c.current = requestAnimationFrame(x), () => {
715
715
  c.current !== null && cancelAnimationFrame(c.current);
716
716
  };
717
- }, [b, A]), J(() => {
718
- const _ = u.current;
719
- _ && (b ? _.play().catch((E) => {
720
- w(!1), P(!0);
721
- }) : _.pause());
722
- }, [b]), J(() => {
723
- if (!A) return;
724
- const _ = (F) => p(O(F)), E = (F) => {
725
- R(!1), $(O(F));
717
+ }, [b, I]), K(() => {
718
+ const x = u.current;
719
+ x && (b ? x.play().catch((S) => {
720
+ _(!1), D(!0);
721
+ }) : x.pause());
722
+ }, [b]), K(() => {
723
+ if (!I) return;
724
+ const x = (B) => p($(B)), S = (B) => {
725
+ M(!1), P($(B));
726
726
  };
727
- return window.addEventListener("mousemove", _), window.addEventListener("mouseup", E), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", E), () => {
728
- window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", E), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", E);
727
+ return window.addEventListener("mousemove", x), window.addEventListener("mouseup", S), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", S), () => {
728
+ window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", S), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", S);
729
729
  };
730
- }, [A, O, $]);
731
- const X = k ? { aspectRatio: String(k) } : void 0, K = k ? "" : " aspect-video", V = Math.round(v * 100);
730
+ }, [I, $, P]);
731
+ const J = y ? { aspectRatio: String(y) } : void 0, Q = y ? "" : " aspect-video", Y = Math.round(v * 100);
732
732
  return /* @__PURE__ */ h(
733
733
  "div",
734
734
  {
735
735
  role: "button",
736
736
  tabIndex: 0,
737
- className: `relative cursor-pointer overflow-hidden bg-black ${K}`,
738
- style: X,
739
- onClick: (_) => {
737
+ className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
738
+ style: J,
739
+ onClick: (x) => {
740
740
  if (m) {
741
- m(_);
741
+ m(x);
742
742
  return;
743
743
  }
744
- D || o && w((E) => !E);
744
+ L || l && _((S) => !S);
745
745
  },
746
- onKeyDown: (_) => {
747
- if (!(_.key !== "Enter" && _.key !== " ")) {
748
- if (_.preventDefault(), m) {
749
- m(_);
746
+ onKeyDown: (x) => {
747
+ if (!(x.key !== "Enter" && x.key !== " ")) {
748
+ if (x.preventDefault(), m) {
749
+ m(x);
750
750
  return;
751
751
  }
752
- D || o && w((E) => !E);
752
+ L || l && _((S) => !S);
753
753
  }
754
754
  },
755
755
  children: [
@@ -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" || N) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
765
765
  className: "size-12 text-black/20",
766
766
  weight: "regular"
767
767
  }) }),
@@ -773,14 +773,14 @@ const ra = (e) => {
773
773
  loop: i,
774
774
  muted: d,
775
775
  style: { width: "100%", height: "100%" },
776
- onLoadStart: () => M(!0),
776
+ onLoadStart: () => O(!0),
777
777
  onCanPlay: () => {
778
- M(!1), T(!1);
778
+ O(!1), A(!1);
779
779
  },
780
- onWaiting: () => M(!0),
781
- onPlay: () => P(!1),
780
+ onWaiting: () => O(!0),
781
+ onPlay: () => D(!1),
782
782
  onEnded: () => {
783
- i || (w(!1), p(0));
783
+ i || (_(!1), p(0));
784
784
  },
785
785
  children: /* @__PURE__ */ n("track", { kind: "captions" })
786
786
  }
@@ -793,51 +793,51 @@ const ra = (e) => {
793
793
  muted: d,
794
794
  playsInline: !0,
795
795
  style: { width: "100%", height: "100%" },
796
- onLoadStart: () => M(!0),
796
+ onLoadStart: () => O(!0),
797
797
  onCanPlay: () => {
798
- M(!1), T(!1);
798
+ O(!1), A(!1);
799
799
  },
800
- onWaiting: () => M(!0),
801
- onPlay: () => P(!1),
800
+ onWaiting: () => O(!0),
801
+ onPlay: () => D(!1),
802
802
  onLoadedMetadata: () => {
803
- const _ = u.current;
804
- _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && I(_.videoWidth / _.videoHeight);
803
+ const x = u.current;
804
+ x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && E(x.videoWidth / x.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
- i || (w(!1), p(0));
807
+ i || (_(!1), p(0));
808
808
  },
809
809
  children: /* @__PURE__ */ n("track", { kind: "captions" })
810
810
  }
811
811
  ) }),
812
- B && !D && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
- ve,
812
+ U && !L && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
+ xe,
814
814
  {
815
815
  className: "size-8 animate-spin text-white/80",
816
816
  weight: "bold"
817
817
  }
818
818
  ) }),
819
- D && !o && /* @__PURE__ */ n(
819
+ L && !l && /* @__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: (_) => {
827
- _.stopPropagation(), C();
826
+ onClick: (x) => {
827
+ x.stopPropagation(), C();
828
828
  },
829
- onKeyDown: (_) => {
830
- _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), C());
829
+ onKeyDown: (x) => {
830
+ x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), C());
831
831
  },
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" }) })
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(je, { className: "size-9 translate-x-0.5", weight: "fill" }) })
833
833
  }
834
834
  ),
835
- l && !o && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
835
+ o && !l && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
836
836
  "div",
837
837
  {
838
838
  role: "slider",
839
839
  "aria-label": "Playback position",
840
- "aria-valuenow": V,
840
+ "aria-valuenow": Y,
841
841
  "aria-valuemin": 0,
842
842
  "aria-valuemax": 100,
843
843
  tabIndex: 0,
@@ -845,30 +845,30 @@ const ra = (e) => {
845
845
  className: "relative flex h-4 w-full cursor-pointer items-center",
846
846
  onMouseDown: j,
847
847
  onTouchStart: j,
848
- onClick: (_) => _.stopPropagation(),
849
- onKeyDown: (_) => {
850
- _.key === "ArrowRight" && $(Math.min(1, v + 0.05)), _.key === "ArrowLeft" && $(Math.max(0, v - 0.05));
848
+ onClick: (x) => x.stopPropagation(),
849
+ onKeyDown: (x) => {
850
+ x.key === "ArrowRight" && P(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && P(Math.max(0, v - 0.05));
851
851
  },
852
852
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
853
853
  "div",
854
854
  {
855
855
  className: "h-full rounded-full bg-white",
856
- style: { width: `${V}%` }
856
+ style: { width: `${Y}%` }
857
857
  }
858
858
  ) })
859
859
  }
860
860
  ) }),
861
- o && /* @__PURE__ */ h("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
861
+ l && /* @__PURE__ */ h("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
862
862
  /* @__PURE__ */ n(
863
863
  "button",
864
864
  {
865
865
  type: "button",
866
- onClick: (_) => {
867
- _.stopPropagation(), w((E) => !E);
866
+ onClick: (x) => {
867
+ x.stopPropagation(), _((S) => !S);
868
868
  },
869
869
  className: "shrink-0 text-white",
870
870
  "aria-label": b ? "Pause" : "Play",
871
- children: b ? /* @__PURE__ */ n(Es, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ue, { className: "size-5 translate-x-px", weight: "fill" })
871
+ children: b ? /* @__PURE__ */ n(Es, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(je, { className: "size-5 translate-x-px", weight: "fill" })
872
872
  }
873
873
  ),
874
874
  /* @__PURE__ */ h(
@@ -876,7 +876,7 @@ const ra = (e) => {
876
876
  {
877
877
  role: "slider",
878
878
  "aria-label": "Playback position",
879
- "aria-valuenow": V,
879
+ "aria-valuenow": Y,
880
880
  "aria-valuemin": 0,
881
881
  "aria-valuemax": 100,
882
882
  tabIndex: 0,
@@ -884,22 +884,22 @@ const ra = (e) => {
884
884
  className: "relative flex h-4 w-full cursor-pointer items-center",
885
885
  onMouseDown: j,
886
886
  onTouchStart: j,
887
- onClick: (_) => _.stopPropagation(),
888
- onMouseEnter: () => S(!0),
889
- onMouseLeave: () => S(!1),
890
- onKeyDown: (_) => {
891
- _.key === "ArrowRight" && $(Math.min(1, v + 0.05)), _.key === "ArrowLeft" && $(Math.max(0, v - 0.05));
887
+ onClick: (x) => x.stopPropagation(),
888
+ onMouseEnter: () => T(!0),
889
+ onMouseLeave: () => T(!1),
890
+ onKeyDown: (x) => {
891
+ x.key === "ArrowRight" && P(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && P(Math.max(0, v - 0.05));
892
892
  },
893
893
  children: [
894
894
  /* @__PURE__ */ n(
895
895
  "div",
896
896
  {
897
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${L || A ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || I ? "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: `${V}%` }
902
+ style: { width: `${Y}%` }
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 ${L || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
- style: { left: `${V}%` }
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || I ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
+ style: { left: `${Y}%` }
912
912
  }
913
913
  )
914
914
  ]
@@ -918,17 +918,17 @@ const ra = (e) => {
918
918
  ]
919
919
  }
920
920
  );
921
- }, Ft = (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", tn = ({
921
+ }, Vt = (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", sn = ({
922
922
  mimeType: e,
923
923
  sourceUrl: t,
924
924
  thumbnailUrl: s,
925
925
  title: a,
926
926
  variant: r,
927
927
  mediaPlayerProps: i,
928
- containedImage: o = !1
928
+ containedImage: l = !1
929
929
  }) => {
930
- const l = re(e), [d, m] = z(!1);
931
- return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
930
+ const o = re(e), [d, m] = z(!1);
931
+ return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
932
932
  ia,
933
933
  {
934
934
  source: t,
@@ -937,7 +937,7 @@ const ra = (e) => {
937
937
  controls: !0,
938
938
  ...i
939
939
  }
940
- ) : t && l === "image" ? o ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
940
+ ) : t && o === "image" ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
941
941
  "img",
942
942
  {
943
943
  src: t,
@@ -954,7 +954,7 @@ const ra = (e) => {
954
954
  className: "block w-full",
955
955
  draggable: !1
956
956
  }
957
- ) : t && l === "document" ? s ? o ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
957
+ ) : t && o === "document" ? s ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
958
958
  "img",
959
959
  {
960
960
  src: s,
@@ -975,8 +975,8 @@ const ra = (e) => {
975
975
  "div",
976
976
  {
977
977
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
978
- children: le(e, {
979
- className: Ft(r),
978
+ children: ce(e, {
979
+ className: Vt(r),
980
980
  weight: "regular"
981
981
  })
982
982
  }
@@ -992,33 +992,33 @@ const ra = (e) => {
992
992
  "div",
993
993
  {
994
994
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
995
- children: le(e, {
996
- className: Ft(r),
995
+ children: ce(e, {
996
+ className: Vt(r),
997
997
  weight: "regular"
998
998
  })
999
999
  }
1000
1000
  );
1001
- }, nn = ({
1001
+ }, an = ({
1002
1002
  variant: e,
1003
1003
  thumbnail: t,
1004
1004
  title: s,
1005
1005
  placeholderTitle: a = "Attachment title",
1006
1006
  mimeType: r,
1007
1007
  detail: i,
1008
- statusBadge: o,
1009
- action: l,
1008
+ statusBadge: l,
1009
+ action: o,
1010
1010
  topLeft: d,
1011
1011
  topRight: m,
1012
1012
  rootRef: g,
1013
1013
  "data-testid": u
1014
1014
  }) => {
1015
- const f = e === "dark", c = f ? s ?? a : s ?? "", x = f && !s;
1015
+ const f = e === "dark", c = f ? s ?? a : s ?? "", w = f && !s;
1016
1016
  return /* @__PURE__ */ h(
1017
1017
  "div",
1018
1018
  {
1019
1019
  ref: g,
1020
1020
  "data-testid": u,
1021
- className: y(
1021
+ className: k(
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: y("mb-0.5 truncate text-base font-medium", {
1033
+ className: k("mb-0.5 truncate text-base font-medium", {
1034
1034
  "text-black": !f,
1035
- "text-white/30": f && x,
1036
- "text-white": f && !x
1035
+ "text-white/30": f && w,
1036
+ "text-white": f && !w
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
- le(r, {
1043
- className: y(
1042
+ ce(r, {
1043
+ className: k(
1044
1044
  "size-5 shrink-0",
1045
1045
  f ? "text-white/55" : "text-black/55"
1046
1046
  ),
@@ -1049,25 +1049,25 @@ const ra = (e) => {
1049
1049
  i != null && i !== "" && /* @__PURE__ */ n(
1050
1050
  "span",
1051
1051
  {
1052
- className: y(
1052
+ className: k(
1053
1053
  "text-xs font-medium",
1054
1054
  f ? "text-white/55" : "text-black/55"
1055
1055
  ),
1056
1056
  children: i
1057
1057
  }
1058
1058
  ),
1059
- o
1059
+ l
1060
1060
  ] }),
1061
- l
1061
+ o
1062
1062
  ] })
1063
1063
  ]
1064
1064
  }
1065
1065
  );
1066
1066
  };
1067
- function sn(e) {
1067
+ function rn(e) {
1068
1068
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1069
1069
  }
1070
- function Ze(e) {
1070
+ function Qe(e) {
1071
1071
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1072
1072
  }
1073
1073
  function la(e) {
@@ -1085,8 +1085,8 @@ function ua(e) {
1085
1085
  function ma(e) {
1086
1086
  return e ? "text-white/20" : "text-black/20";
1087
1087
  }
1088
- const Qe = ({ 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: [
1088
+ const et = ({ attachment: e, isMyMessage: t }) => {
1089
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, m = /* @__PURE__ */ h(V.Fragment, { children: [
1090
1090
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1091
1091
  "img",
1092
1092
  {
@@ -1109,12 +1109,12 @@ const Qe = ({ attachment: e, isMyMessage: t }) => {
1109
1109
  ] });
1110
1110
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
1111
1111
  };
1112
- function an(e) {
1112
+ function on(e) {
1113
1113
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1114
1114
  }
1115
- function et(e) {
1115
+ function tt(e) {
1116
1116
  var t;
1117
- return (t = e.attachments) == null ? void 0 : t.find(an);
1117
+ return (t = e.attachments) == null ? void 0 : t.find(on);
1118
1118
  }
1119
1119
  async function ha(e, t) {
1120
1120
  let s;
@@ -1125,8 +1125,8 @@ async function ha(e, t) {
1125
1125
  }
1126
1126
  const a = await fetch(e, { mode: "cors" });
1127
1127
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
1128
- const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1129
- o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1128
+ const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1129
+ l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1130
1130
  }
1131
1131
  const fa = ({
1132
1132
  url: e,
@@ -1139,53 +1139,53 @@ const fa = ({
1139
1139
  type: "button",
1140
1140
  onClick: (i) => {
1141
1141
  i.stopPropagation();
1142
- const o = window.open("", "_blank", "noopener,noreferrer");
1142
+ const l = window.open("", "_blank", "noopener,noreferrer");
1143
1143
  a(!0), ha(e, t).then(() => {
1144
- o == null || o.close();
1144
+ l == null || l.close();
1145
1145
  }).catch(() => {
1146
- o && (o.location.href = e);
1146
+ l && (l.location.href = e);
1147
1147
  }).finally(() => a(!1));
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(ve, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(U.Fragment, { children: [
1152
- /* @__PURE__ */ n(xe, { className: "size-4 text-white", weight: "bold" }),
1151
+ children: s ? /* @__PURE__ */ n(xe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(V.Fragment, { children: [
1152
+ /* @__PURE__ */ n(we, { className: "size-4 text-white", weight: "bold" }),
1153
1153
  "Download"
1154
1154
  ] })
1155
1155
  }
1156
1156
  );
1157
1157
  };
1158
- function tt(e) {
1159
- var u, f, c, x;
1158
+ function nt(e) {
1159
+ var u, f, c, w;
1160
1160
  const t = (u = e.attachments) == null ? void 0 : u.find(
1161
1161
  (b) => b.type === "video" && b.asset_url
1162
1162
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1163
1163
  (b) => b.type === "image" && b.image_url
1164
1164
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1165
1165
  (b) => b.type === "audio" && b.asset_url
1166
- ), r = (x = e.attachments) == null ? void 0 : x.find(
1166
+ ), r = (w = e.attachments) == null ? void 0 : w.find(
1167
1167
  (b) => b.type === "file" && b.asset_url
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
- if (!o) return null;
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;
1168
+ ), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1169
+ if (!l) return null;
1170
+ const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
1171
1171
  return {
1172
- resolvedUrl: o,
1173
- resolvedType: l,
1172
+ resolvedUrl: l,
1173
+ resolvedType: o,
1174
1174
  title: d,
1175
1175
  fileSize: m,
1176
1176
  thumbnailUrl: g
1177
1177
  };
1178
1178
  }
1179
- const rn = ({
1179
+ const ln = ({
1180
1180
  resolvedUrl: e,
1181
1181
  resolvedType: t,
1182
1182
  title: s,
1183
1183
  fileSize: a,
1184
1184
  thumbnailUrl: r
1185
1185
  }) => {
1186
- const i = a !== void 0 ? sn(a) : void 0;
1186
+ const i = a !== void 0 ? rn(a) : void 0;
1187
1187
  return /* @__PURE__ */ n(
1188
- nn,
1188
+ an,
1189
1189
  {
1190
1190
  variant: "dark",
1191
1191
  title: s,
@@ -1193,7 +1193,7 @@ const rn = ({
1193
1193
  mimeType: t,
1194
1194
  detail: i,
1195
1195
  thumbnail: /* @__PURE__ */ n(
1196
- tn,
1196
+ sn,
1197
1197
  {
1198
1198
  mimeType: t,
1199
1199
  sourceUrl: e,
@@ -1204,23 +1204,23 @@ const rn = ({
1204
1204
  )
1205
1205
  }
1206
1206
  );
1207
- }, on = ({
1207
+ }, cn = ({
1208
1208
  resolvedUrl: e,
1209
1209
  resolvedType: t,
1210
1210
  title: s,
1211
1211
  fileSize: a,
1212
1212
  thumbnailUrl: r
1213
1213
  }) => {
1214
- const i = re(t), o = a !== void 0 ? sn(a) : void 0;
1214
+ const i = re(t), l = a !== void 0 ? rn(a) : void 0;
1215
1215
  return /* @__PURE__ */ n(
1216
- nn,
1216
+ an,
1217
1217
  {
1218
1218
  variant: "light",
1219
1219
  title: s,
1220
1220
  mimeType: t,
1221
- detail: o,
1221
+ detail: l,
1222
1222
  thumbnail: /* @__PURE__ */ n(
1223
- tn,
1223
+ sn,
1224
1224
  {
1225
1225
  mimeType: t,
1226
1226
  sourceUrl: e,
@@ -1237,10 +1237,10 @@ const rn = ({
1237
1237
  message: e,
1238
1238
  isMyMessage: t = !1
1239
1239
  }) => {
1240
- const s = et(e), a = tt(e);
1240
+ const s = tt(e), a = nt(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
- ie,
1243
+ oe,
1244
1244
  {
1245
1245
  className: "str-chat__avatar str-chat__message-sender-avatar",
1246
1246
  id: e.user.id,
@@ -1258,7 +1258,7 @@ const rn = ({
1258
1258
  {
1259
1259
  className: "str-chat__message-bubble",
1260
1260
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1261
- children: s ? /* @__PURE__ */ n("div", { className: Ze(t), children: /* @__PURE__ */ n(Qe, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(rn, { ...a }) : /* @__PURE__ */ n(on, { ...a })
1261
+ children: s ? /* @__PURE__ */ n("div", { className: Qe(t), children: /* @__PURE__ */ n(et, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(ln, { ...a }) : /* @__PURE__ */ n(cn, { ...a })
1262
1262
  }
1263
1263
  ) })
1264
1264
  }
@@ -1267,19 +1267,19 @@ const rn = ({
1267
1267
  }, ba = ({
1268
1268
  message: e
1269
1269
  }) => {
1270
- const t = et(e);
1270
+ const t = tt(e);
1271
1271
  if (t)
1272
- return /* @__PURE__ */ n("div", { className: Ze(!0), children: /* @__PURE__ */ n(Qe, { attachment: t, isMyMessage: !0 }) });
1273
- const s = tt(e);
1274
- return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
1272
+ return /* @__PURE__ */ n("div", { className: Qe(!0), children: /* @__PURE__ */ n(et, { attachment: t, isMyMessage: !0 }) });
1273
+ const s = nt(e);
1274
+ return s ? /* @__PURE__ */ n(ln, { ...s }) : null;
1275
1275
  }, pa = ({
1276
1276
  message: e
1277
1277
  }) => {
1278
- const t = et(e);
1278
+ const t = tt(e);
1279
1279
  if (t)
1280
- return /* @__PURE__ */ n("div", { className: Ze(!1), children: /* @__PURE__ */ n(Qe, { attachment: t, isMyMessage: !1 }) });
1281
- const s = tt(e);
1282
- return s ? /* @__PURE__ */ n(on, { ...s }) : null;
1280
+ return /* @__PURE__ */ n("div", { className: Qe(!1), children: /* @__PURE__ */ n(et, { attachment: t, isMyMessage: !1 }) });
1281
+ const s = nt(e);
1282
+ return s ? /* @__PURE__ */ n(cn, { ...s }) : null;
1283
1283
  }, ki = Object.assign(ga, {
1284
1284
  Creator: ba,
1285
1285
  Visitor: pa
@@ -1287,9 +1287,9 @@ const rn = ({
1287
1287
  isUnlocking: () => !1
1288
1288
  }, xa = {
1289
1289
  LockedAttachment: va
1290
- }, ln = qe({}), Ei = ln.Provider;
1290
+ }, dn = We({}), Ei = dn.Provider;
1291
1291
  function wa(e) {
1292
- return Me(ln)[e] ?? xa[e];
1292
+ return _e(dn)[e] ?? xa[e];
1293
1293
  }
1294
1294
  const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1295
1295
  "svg",
@@ -1314,40 +1314,40 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1314
1314
  }, ya = (e) => {
1315
1315
  var t;
1316
1316
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1317
- }, Se = (e) => {
1317
+ }, Te = (e) => {
1318
1318
  var t;
1319
1319
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1320
1320
  }, Ca = (e) => {
1321
1321
  var t;
1322
1322
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1323
- }, cn = (e) => Na(e) || ya(e), ka = (e) => {
1323
+ }, un = (e) => Na(e) || ya(e), ka = (e) => {
1324
1324
  var t;
1325
- return cn(e) && !((t = e.text) != null && t.trim());
1326
- }, ze = ({
1325
+ return un(e) && !((t = e.text) != null && t.trim());
1326
+ }, $e = ({
1327
1327
  message: e,
1328
1328
  standalone: t = !1,
1329
1329
  isMyMessage: s = !1,
1330
1330
  hasAttachment: a = !1
1331
1331
  }) => {
1332
1332
  var u;
1333
- const r = cn(e), i = Se(e);
1333
+ const r = un(e), i = Te(e);
1334
1334
  if (!r && !i)
1335
1335
  return null;
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", x = t ? `${f} tip` : `Delivered with ${f} tip`;
1339
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", w = t ? `${f} tip` : `Delivered with ${f} tip`;
1340
1340
  return /* @__PURE__ */ h("div", { className: c, children: [
1341
1341
  /* @__PURE__ */ n(Is, { size: t ? 14 : 12 }),
1342
- /* @__PURE__ */ n("span", { children: x })
1342
+ /* @__PURE__ */ n("span", { children: w })
1343
1343
  ] });
1344
1344
  }
1345
- const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
1345
+ const l = s && a, o = l ? "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
- 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(ae, { children: [
1348
+ l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1349
+ ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(_a, { size: l ? 12 : 15 }) });
1350
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ h(ae, { children: [
1351
1351
  m,
1352
1352
  g
1353
1353
  ] }) : /* @__PURE__ */ h(ae, { children: [
@@ -1363,7 +1363,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1363
1363
  "button",
1364
1364
  {
1365
1365
  type: "button",
1366
- className: y("message-vote-button focus-ring", {
1366
+ className: k("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: y("message-vote-button focus-ring", {
1380
+ className: k("message-vote-button focus-ring", {
1381
1381
  "message-vote-button--selected": e === "down"
1382
1382
  }),
1383
1383
  onClick: s,
@@ -1388,100 +1388,100 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1388
1388
  }
1389
1389
  )
1390
1390
  ] }), Sa = (e) => {
1391
- var gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St, It;
1391
+ var pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St, It, Tt, At;
1392
1392
  const {
1393
1393
  additionalMessageInputProps: t,
1394
1394
  chatbotVotingEnabled: s,
1395
1395
  editing: a,
1396
1396
  endOfGroup: r,
1397
1397
  firstOfGroup: i,
1398
- groupedByUser: o,
1399
- handleAction: l,
1398
+ groupedByUser: l,
1399
+ handleAction: o,
1400
1400
  handleOpenThread: d,
1401
1401
  handleRetry: m,
1402
1402
  highlighted: g,
1403
1403
  isMessageAIGenerated: u,
1404
1404
  isMyMessage: f,
1405
1405
  message: c,
1406
- renderText: x,
1406
+ renderText: w,
1407
1407
  threadList: b,
1408
- viewerLanguage: w
1409
- } = e, { client: v } = Xe("CustomMessage"), { channel: p } = ce("CustomMessage"), { isUnlocking: A, onUnlockClick: R, onFetchSource: L, onDownloadClick: S } = wa("LockedAttachment"), [D, P] = z(!1), B = Dn(c.id), { selected: M, voteUp: N, voteDown: T } = qs(c), {
1410
- Attachment: k = Pn,
1411
- EditMessageModal: I = On,
1408
+ viewerLanguage: _
1409
+ } = e, { client: v } = Ke("CustomMessage"), { channel: p } = de("CustomMessage"), { isUnlocking: I, onUnlockClick: M, onFetchSource: R, onDownloadClick: T } = wa("LockedAttachment"), [L, D] = z(!1), U = Dn(c.id), { selected: O, voteUp: N, voteDown: A } = qs(c), {
1410
+ Attachment: y = Pn,
1411
+ EditMessageModal: E = On,
1412
1412
  MessageActions: C,
1413
- MessageBlocked: O = zn,
1414
- MessageBouncePrompt: $ = $n,
1413
+ MessageBlocked: $ = zn,
1414
+ MessageBouncePrompt: P = $n,
1415
1415
  MessageDeleted: j = Fn,
1416
- MessageIsThreadReplyInChannelButtonIndicator: X = Bn,
1417
- MessageRepliesCountButton: K = Vn,
1418
- ReminderNotification: V = Un,
1419
- StreamedMessageText: _ = jn,
1420
- PinIndicator: E
1421
- } = jt("CustomMessage"), F = Gn(c), q = Hn(c), Y = se(
1416
+ MessageIsThreadReplyInChannelButtonIndicator: J = Bn,
1417
+ MessageRepliesCountButton: Q = Vn,
1418
+ ReminderNotification: Y = Un,
1419
+ StreamedMessageText: x = jn,
1420
+ PinIndicator: S
1421
+ } = Ht("CustomMessage"), B = Gn(c), G = Hn(c), q = se(
1422
1422
  () => u == null ? void 0 : u(c),
1423
1423
  [u, c]
1424
- ), G = se(() => {
1425
- const fe = c.attachments ?? [], ke = c.shared_location ? [c.shared_location, ...fe] : fe;
1426
- if (!Se(c)) return ke;
1427
- const Tt = ke.filter((At) => !("type" in At) || !an(At));
1428
- return Tt.length === ke.length ? ke : Tt;
1424
+ ), F = se(() => {
1425
+ const ge = c.attachments ?? [], Se = c.shared_location ? [c.shared_location, ...ge] : ge;
1426
+ if (!Te(c)) return Se;
1427
+ const Mt = Se.filter((Rt) => !("type" in Rt) || !on(Rt));
1428
+ return Mt.length === Se.length ? Se : Mt;
1429
1429
  }, [c]), W = se(() => {
1430
- const fe = Jt({ message: c, viewerLanguage: w });
1431
- return fe === c.text ? c : { ...c, text: fe };
1432
- }, [c, w]);
1430
+ const ge = Qt({ message: c, viewerLanguage: _ });
1431
+ return ge === c.text ? c : { ...c, text: ge };
1432
+ }, [c, _]);
1433
1433
  if (Yn(c))
1434
1434
  return null;
1435
1435
  if (c.deleted_at || c.type === "deleted")
1436
1436
  return /* @__PURE__ */ n(j, { message: c });
1437
1437
  if (qn(c))
1438
- return /* @__PURE__ */ n(O, {});
1439
- const de = !b && !!c.reply_count, ue = !b && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((gt = c.error) == null ? void 0 : gt.status) !== 403, te = Wn(c);
1440
- let Q;
1441
- me ? Q = () => m(c) : te && (Q = () => P(!0));
1442
- const ee = f(), Sn = y(
1438
+ return /* @__PURE__ */ n($, {});
1439
+ const X = !b && !!c.reply_count, ue = !b && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((pt = c.error) == null ? void 0 : pt.status) !== 403, he = Wn(c);
1440
+ let ee;
1441
+ me ? ee = () => m(c) : he && (ee = () => D(!0));
1442
+ const te = f(), ie = k(
1443
1443
  "str-chat__message str-chat__message-simple",
1444
1444
  `str-chat__message--${c.type}`,
1445
1445
  `str-chat__message--${c.status}`,
1446
- ee ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1446
+ te ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1447
1447
  c.text ? "str-chat__message--has-text" : "has-no-text",
1448
1448
  {
1449
- "str-chat__message--has-attachment": F,
1449
+ "str-chat__message--has-attachment": B,
1450
1450
  "str-chat__message--highlighted": g,
1451
1451
  "str-chat__message--pinned pinned-message": c.pinned,
1452
- "str-chat__message--with-reactions": q,
1453
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((bt = c == null ? void 0 : c.error) == null ? void 0 : bt.status) !== 403,
1454
- "str-chat__message-with-thread-link": de || ue,
1452
+ "str-chat__message--with-reactions": G,
1453
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((vt = c == null ? void 0 : c.error) == null ? void 0 : vt.status) !== 403,
1454
+ "str-chat__message-with-thread-link": X || ue,
1455
1455
  "str-chat__virtual-message__wrapper--end": r,
1456
1456
  "str-chat__virtual-message__wrapper--first": i,
1457
- "str-chat__virtual-message__wrapper--group": o
1457
+ "str-chat__virtual-message__wrapper--group": l
1458
1458
  }
1459
- ), ut = c.poll_id && v.polls.fromState(c.poll_id), mt = ka(c), he = Se(c), ht = Ca(c), De = !!(G != null && G.length && !c.quoted_message), ft = he && ee && De;
1459
+ ), ht = c.poll_id && v.polls.fromState(c.poll_id), ft = ka(c), fe = Te(c), gt = Ca(c), Pe = !!(F != null && F.length && !c.quoted_message), bt = fe && te && Pe;
1460
1460
  return /* @__PURE__ */ h(ae, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
- I,
1462
+ E,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
1466
1466
  ),
1467
- D && /* @__PURE__ */ n(
1467
+ L && /* @__PURE__ */ n(
1468
1468
  Xn,
1469
1469
  {
1470
- MessageBouncePrompt: $,
1471
- onClose: () => P(!1),
1472
- open: D
1470
+ MessageBouncePrompt: P,
1471
+ onClose: () => D(!1),
1472
+ open: L
1473
1473
  }
1474
1474
  ),
1475
1475
  /* @__PURE__ */ h(
1476
1476
  "div",
1477
1477
  {
1478
- className: Sn,
1478
+ className: ie,
1479
1479
  "data-message-id": c.id,
1480
1480
  children: [
1481
- E && /* @__PURE__ */ n(E, {}),
1482
- !!B && /* @__PURE__ */ n(V, { reminder: B }),
1481
+ S && /* @__PURE__ */ n(S, {}),
1482
+ !!U && /* @__PURE__ */ n(Y, { reminder: U }),
1483
1483
  c.user && /* @__PURE__ */ n(
1484
- ie,
1484
+ oe,
1485
1485
  {
1486
1486
  className: "str-chat__avatar str-chat__message-sender-avatar",
1487
1487
  id: c.user.id,
@@ -1489,146 +1489,146 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1489
1489
  name: c.user.name || c.user.id,
1490
1490
  size: 24,
1491
1491
  shape: "circle",
1492
- dmAgentEnabled: he
1492
+ dmAgentEnabled: fe
1493
1493
  }
1494
1494
  ),
1495
1495
  /* @__PURE__ */ n(
1496
1496
  "div",
1497
1497
  {
1498
- className: y("str-chat__message-inner", {
1499
- "str-chat__simple-message--error-failed": me || te
1498
+ className: k("str-chat__message-inner", {
1499
+ "str-chat__simple-message--error-failed": me || he
1500
1500
  }),
1501
1501
  "data-testid": "message-inner",
1502
- onClick: Q,
1503
- onKeyDown: Q,
1504
- role: Q ? "button" : void 0,
1505
- tabIndex: Q ? 0 : void 0,
1502
+ onClick: ee,
1503
+ onKeyDown: ee,
1504
+ role: ee ? "button" : void 0,
1505
+ tabIndex: ee ? 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
1509
1509
  marginInlineEnd: 0,
1510
1510
  marginInlineStart: 0
1511
1511
  },
1512
- children: ht ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
- ee ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1512
+ children: gt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
+ te ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
1514
  C && /* @__PURE__ */ n(C, {}),
1515
1515
  /* @__PURE__ */ n(
1516
- $t.Sent,
1516
+ Bt.Sent,
1517
1517
  {
1518
- title: (pt = c.metadata) == null ? void 0 : pt.attachment_title,
1519
- mimeType: (vt = c.metadata) == null ? void 0 : vt.attachment_mime_type,
1520
- thumbnailUrl: (xt = c.metadata) == null ? void 0 : xt.attachment_thumbnail,
1521
- amountText: (wt = c.metadata) == null ? void 0 : wt.amount_text,
1522
- detail: (_t = c.metadata) == null ? void 0 : _t.attachment_detail,
1523
- paymentStatus: (Nt = c.metadata) == null ? void 0 : Nt.payment_status,
1524
- onPreviewClick: () => R == null ? void 0 : R(c, p),
1525
- onFetchSource: async () => await (L == null ? void 0 : L(c, p))
1518
+ title: (xt = c.metadata) == null ? void 0 : xt.attachment_title,
1519
+ mimeType: (wt = c.metadata) == null ? void 0 : wt.attachment_mime_type,
1520
+ thumbnailUrl: (_t = c.metadata) == null ? void 0 : _t.attachment_thumbnail,
1521
+ amountText: (Nt = c.metadata) == null ? void 0 : Nt.amount_text,
1522
+ detail: (yt = c.metadata) == null ? void 0 : yt.attachment_detail,
1523
+ paymentStatus: (Ct = c.metadata) == null ? void 0 : Ct.payment_status,
1524
+ onPreviewClick: () => M == null ? void 0 : M(c, p),
1525
+ onFetchSource: async () => await (R == null ? void 0 : R(c, p))
1526
1526
  }
1527
1527
  )
1528
1528
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1529
1529
  /* @__PURE__ */ n(
1530
- $t.Received,
1530
+ Bt.Received,
1531
1531
  {
1532
- title: (yt = c.metadata) == null ? void 0 : yt.attachment_title,
1533
- mimeType: (Ct = c.metadata) == null ? void 0 : Ct.attachment_mime_type,
1534
- thumbnailUrl: (kt = c.metadata) == null ? void 0 : kt.attachment_thumbnail,
1535
- amountText: (Et = c.metadata) == null ? void 0 : Et.amount_text,
1536
- detail: (St = c.metadata) == null ? void 0 : St.attachment_detail,
1537
- paymentStatus: (It = c.metadata) == null ? void 0 : It.payment_status,
1538
- isUnlocking: A(c.id),
1539
- onUnlockClick: () => R == null ? void 0 : R(c, p),
1540
- onFetchSource: async () => await (L == null ? void 0 : L(c, p)),
1541
- onDownloadClick: () => S == null ? void 0 : S(c, p)
1532
+ title: (kt = c.metadata) == null ? void 0 : kt.attachment_title,
1533
+ mimeType: (Et = c.metadata) == null ? void 0 : Et.attachment_mime_type,
1534
+ thumbnailUrl: (St = c.metadata) == null ? void 0 : St.attachment_thumbnail,
1535
+ amountText: (It = c.metadata) == null ? void 0 : It.amount_text,
1536
+ detail: (Tt = c.metadata) == null ? void 0 : Tt.attachment_detail,
1537
+ paymentStatus: (At = c.metadata) == null ? void 0 : At.payment_status,
1538
+ isUnlocking: I(c.id),
1539
+ onUnlockClick: () => M == null ? void 0 : M(c, p),
1540
+ onFetchSource: async () => await (R == null ? void 0 : R(c, p)),
1541
+ onDownloadClick: () => T == null ? void 0 : T(c, p)
1542
1542
  }
1543
1543
  ),
1544
1544
  C && /* @__PURE__ */ n(C, {})
1545
1545
  ] }),
1546
1546
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1547
- Rt,
1547
+ Dt,
1548
1548
  {
1549
1549
  message: W,
1550
- renderText: x
1550
+ renderText: w
1551
1551
  }
1552
1552
  ) })
1553
- ] }) : mt ? (
1553
+ ] }) : ft ? (
1554
1554
  /* Tip-only messages render as a standalone bubble */
1555
- /* @__PURE__ */ n(ze, { message: c, standalone: !0 })
1555
+ /* @__PURE__ */ n($e, { message: c, standalone: !0 })
1556
1556
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1557
- he && !ft && /* @__PURE__ */ n(
1558
- ze,
1557
+ fe && !bt && /* @__PURE__ */ n(
1558
+ $e,
1559
1559
  {
1560
1560
  message: c,
1561
- hasAttachment: De,
1562
- isMyMessage: ee
1561
+ hasAttachment: Pe,
1562
+ isMyMessage: te
1563
1563
  }
1564
1564
  ),
1565
- ut && /* @__PURE__ */ n(Kn, { poll: ut }),
1566
- G != null && G.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
- k,
1565
+ ht && /* @__PURE__ */ n(Kn, { poll: ht }),
1566
+ F != null && F.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
+ y,
1568
1568
  {
1569
- actionHandler: l,
1570
- attachments: G
1569
+ actionHandler: o,
1570
+ attachments: F
1571
1571
  }
1572
1572
  ) : null,
1573
- Y ? /* @__PURE__ */ n(
1574
- _,
1573
+ q ? /* @__PURE__ */ n(
1574
+ x,
1575
1575
  {
1576
1576
  message: W,
1577
- renderText: x
1577
+ renderText: w
1578
1578
  }
1579
1579
  ) : /* @__PURE__ */ n(
1580
- Rt,
1580
+ Dt,
1581
1581
  {
1582
1582
  message: W,
1583
- renderText: x
1583
+ renderText: w
1584
1584
  }
1585
1585
  ),
1586
1586
  /* @__PURE__ */ n(Jn, {})
1587
1587
  ] }) })
1588
1588
  }
1589
1589
  ),
1590
- !ht && !mt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
- (!he || ft) && /* @__PURE__ */ n(
1592
- ze,
1590
+ !gt && !ft && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
+ (!fe || bt) && /* @__PURE__ */ n(
1592
+ $e,
1593
1593
  {
1594
1594
  message: c,
1595
- hasAttachment: De,
1596
- isMyMessage: ee
1595
+ hasAttachment: Pe,
1596
+ isMyMessage: te
1597
1597
  }
1598
1598
  ),
1599
- s && he && /* @__PURE__ */ n(
1599
+ s && fe && /* @__PURE__ */ n(
1600
1600
  Ea,
1601
1601
  {
1602
- selected: M,
1602
+ selected: O,
1603
1603
  onVoteUp: N,
1604
- onVoteDown: T
1604
+ onVoteDown: A
1605
1605
  }
1606
1606
  )
1607
1607
  ] }),
1608
- de && /* @__PURE__ */ n(
1609
- K,
1608
+ X && /* @__PURE__ */ n(
1609
+ Q,
1610
1610
  {
1611
1611
  onClick: d,
1612
1612
  reply_count: c.reply_count
1613
1613
  }
1614
1614
  ),
1615
- ue && /* @__PURE__ */ n(X, {})
1615
+ ue && /* @__PURE__ */ n(J, {})
1616
1616
  ]
1617
1617
  },
1618
1618
  c.id
1619
1619
  )
1620
1620
  ] });
1621
- }, Ia = U.memo(
1621
+ }, Ia = V.memo(
1622
1622
  Sa,
1623
1623
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ln(e, t)
1624
1624
  ), Ta = (e) => {
1625
- const t = we("CustomMessage");
1625
+ const t = Ne("CustomMessage");
1626
1626
  return /* @__PURE__ */ n(Ia, { ...t, ...e });
1627
1627
  }, Aa = () => {
1628
1628
  var s;
1629
- const { handleDelete: e, message: t } = we("CustomMessageActions");
1629
+ const { handleDelete: e, message: t } = Ne("CustomMessageActions");
1630
1630
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1631
- qt,
1631
+ Xt,
1632
1632
  {
1633
1633
  onClick: e,
1634
1634
  "aria-label": "Delete",
@@ -1638,20 +1638,20 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1638
1638
  }
1639
1639
  );
1640
1640
  }, Ma = () => {
1641
- const { handleFlag: e } = we("CustomMessageActions");
1641
+ const { handleFlag: e } = Ne("CustomMessageActions");
1642
1642
  return /* @__PURE__ */ n(
1643
- qt,
1643
+ Xt,
1644
1644
  {
1645
1645
  onClick: e,
1646
1646
  "aria-label": "Report",
1647
1647
  title: "Report",
1648
1648
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1649
- children: /* @__PURE__ */ n(Gt, { size: 16, weight: "light", "aria-hidden": !0 })
1649
+ children: /* @__PURE__ */ n(Yt, { size: 16, weight: "light", "aria-hidden": !0 })
1650
1650
  }
1651
1651
  );
1652
1652
  }, Ra = () => {
1653
1653
  var t;
1654
- const { message: e } = we("CustomMessageActions");
1654
+ const { message: e } = Ne("CustomMessageActions");
1655
1655
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1656
1656
  zs,
1657
1657
  {
@@ -1686,12 +1686,12 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1686
1686
  "button",
1687
1687
  {
1688
1688
  type: "button",
1689
- onClick: (o) => {
1690
- o.preventDefault(), t(s);
1689
+ onClick: (l) => {
1690
+ l.preventDefault(), t(s);
1691
1691
  },
1692
1692
  className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
1693
1693
  "aria-label": "Close link preview",
1694
- children: /* @__PURE__ */ n(Re, { className: "size-4 text-black/90" })
1694
+ children: /* @__PURE__ */ n(Le, { className: "size-4 text-black/90" })
1695
1695
  }
1696
1696
  ),
1697
1697
  /* @__PURE__ */ h("div", { className: "p-2", children: [
@@ -1703,7 +1703,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1703
1703
  );
1704
1704
  }, Da = (e) => ({
1705
1705
  linkPreviews: Array.from(e.previews.values()).filter(
1706
- (t) => Mt.previewIsLoaded(t) || Mt.previewIsLoading(t)
1706
+ (t) => Lt.previewIsLoaded(t) || Lt.previewIsLoading(t)
1707
1707
  )
1708
1708
  }), Pa = () => {
1709
1709
  const { linkPreviewsManager: e } = Zn(), { linkPreviews: t } = Qn(
@@ -1720,7 +1720,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1720
1720
  },
1721
1721
  r.og_scrape_url
1722
1722
  )) }) : null;
1723
- }, dn = U.createContext(!1), Oa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1723
+ }, st = V.createContext(!1), Si = () => _e(st), Oa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
1724
  "button",
1725
1725
  {
1726
1726
  ...s,
@@ -1731,10 +1731,10 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1731
1731
  children: /* @__PURE__ */ n(Rs, { weight: "bold", className: "size-4" })
1732
1732
  }
1733
1733
  ), za = () => {
1734
- const e = Me(dn), { handleSubmit: t } = ts(), s = ns(), a = e || !s, {
1734
+ const e = _e(st), { handleSubmit: t } = ts(), s = ns(), a = e || !s, {
1735
1735
  SendButton: r = Oa,
1736
1736
  AttachmentPreviewList: i = ss
1737
- } = jt("CustomMessageInput");
1737
+ } = Ht("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(as, {}),
1740
1740
  /* @__PURE__ */ n(Pa, {}),
@@ -1768,10 +1768,11 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1768
1768
  renderActions: e,
1769
1769
  renderFooter: t,
1770
1770
  disabled: s = !1,
1771
- disabledReason: a
1771
+ disabledReason: a,
1772
+ composerInput: r
1772
1773
  }) => {
1773
1774
  var o;
1774
- const { channel: r } = ce(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1775
+ const { channel: i } = de(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
1775
1776
  return s ? /* @__PURE__ */ h(ae, { children: [
1776
1777
  /* @__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
1778
  t == null ? void 0 : t()
@@ -1779,12 +1780,12 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1779
1780
  /* @__PURE__ */ h(
1780
1781
  "div",
1781
1782
  {
1782
- inert: i ? "" : void 0,
1783
- "aria-disabled": i || void 0,
1783
+ inert: l ? "" : void 0,
1784
+ "aria-disabled": l || void 0,
1784
1785
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1785
1786
  children: [
1786
1787
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1787
- /* @__PURE__ */ n(dn.Provider, { value: i, children: /* @__PURE__ */ n(es, { Input: za }) })
1788
+ /* @__PURE__ */ n(st.Provider, { value: l, children: /* @__PURE__ */ n(es, { Input: r ?? za }) })
1788
1789
  ]
1789
1790
  }
1790
1791
  ),
@@ -1800,10 +1801,10 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1800
1801
  "SYSTEM_AGE_SAFETY_BLOCKED"
1801
1802
  ], Ua = {
1802
1803
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1803
- }, $e = "age safety guidelines.", ja = "https://linktr.ee/s/about/contact", Bt = (e) => Fa.includes(e), Ga = (e) => Va.includes(e), Ha = (e) => {
1804
+ }, Fe = "age safety guidelines.", ja = "https://linktr.ee/s/about/contact", Ut = (e) => Fa.includes(e), Ga = (e) => Va.includes(e), Ha = (e) => {
1804
1805
  var a;
1805
1806
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1806
- if (Bt(t))
1807
+ if (Ut(t))
1807
1808
  return {
1808
1809
  kind: "dm-agent",
1809
1810
  type: t
@@ -1814,16 +1815,16 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1814
1815
  type: t
1815
1816
  };
1816
1817
  const s = e.dm_agent_system_type;
1817
- if (Bt(s))
1818
+ if (Ut(s))
1818
1819
  return {
1819
1820
  kind: "dm-agent",
1820
1821
  type: s
1821
1822
  };
1822
1823
  }, Ya = (e) => {
1823
- const t = e.indexOf($e);
1824
+ const t = e.indexOf(Fe);
1824
1825
  if (t === -1)
1825
1826
  return e;
1826
- const s = t + $e.length;
1827
+ const s = t + Fe.length;
1827
1828
  return /* @__PURE__ */ h(ae, { children: [
1828
1829
  e.slice(0, t),
1829
1830
  /* @__PURE__ */ n(
@@ -1833,7 +1834,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1833
1834
  target: "_blank",
1834
1835
  rel: "noopener noreferrer",
1835
1836
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
1836
- children: $e
1837
+ children: Fe
1837
1838
  }
1838
1839
  ),
1839
1840
  e.slice(s)
@@ -1854,7 +1855,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1854
1855
  "data-dm-agent-system-type": s.type,
1855
1856
  children: [
1856
1857
  /* @__PURE__ */ n(
1857
- je,
1858
+ Ge,
1858
1859
  {
1859
1860
  size: 16,
1860
1861
  weight: "regular",
@@ -1866,7 +1867,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1866
1867
  ]
1867
1868
  }
1868
1869
  ),
1869
- !t && /* @__PURE__ */ n(Pe, { message: e.message })
1870
+ !t && /* @__PURE__ */ n(Oe, { message: e.message })
1870
1871
  ] });
1871
1872
  }
1872
1873
  if ((s == null ? void 0 : s.kind) === "age-safety") {
@@ -1893,7 +1894,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1893
1894
  ]
1894
1895
  }
1895
1896
  ),
1896
- !t && /* @__PURE__ */ n(Pe, { message: e.message })
1897
+ !t && /* @__PURE__ */ n(Oe, { message: e.message })
1897
1898
  ] });
1898
1899
  }
1899
1900
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -1902,9 +1903,9 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1902
1903
  /* @__PURE__ */ n("p", { children: e.message.text }),
1903
1904
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
1904
1905
  ] }),
1905
- !t && /* @__PURE__ */ n(Pe, { message: e.message })
1906
+ !t && /* @__PURE__ */ n(Oe, { message: e.message })
1906
1907
  ] });
1907
- }, un = qe(!1), Fe = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1908
+ }, mn = We(!1), Be = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1908
1909
  "animateTransform",
1909
1910
  {
1910
1911
  attributeName: "transform",
@@ -1915,20 +1916,20 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1915
1916
  repeatCount: "indefinite"
1916
1917
  }
1917
1918
  ) }), Wa = /* @__PURE__ */ new Set([
1918
- Oe.Thinking,
1919
- Oe.Generating,
1920
- Oe.ExternalSources
1919
+ ze.Thinking,
1920
+ ze.Generating,
1921
+ ze.ExternalSources
1921
1922
  ]), Xa = ({ threadList: e }) => {
1922
- var x, b;
1923
- const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Xe(), { typing: i = {} } = is(), { aiState: o } = os(t), l = Me(un);
1924
- if (!e && l && Wa.has(o)) {
1925
- const w = Ka(t, (x = r.user) == null ? void 0 : x.id);
1923
+ var w, b;
1924
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = is(), { aiState: l } = os(t), o = _e(mn);
1925
+ if (!e && o && Wa.has(l)) {
1926
+ const _ = Ka(t, (w = r.user) == null ? void 0 : w.id);
1926
1927
  return /* @__PURE__ */ n(
1927
- Vt,
1928
+ jt,
1928
1929
  {
1929
- avatarId: (w == null ? void 0 : w.id) ?? "ai-agent",
1930
- avatarName: (w == null ? void 0 : w.name) ?? (w == null ? void 0 : w.id) ?? "Agent",
1931
- avatarImage: w == null ? void 0 : w.image,
1930
+ avatarId: (_ == null ? void 0 : _.id) ?? "ai-agent",
1931
+ avatarName: (_ == null ? void 0 : _.name) ?? (_ == null ? void 0 : _.id) ?? "Agent",
1932
+ avatarImage: _ == null ? void 0 : _.image,
1932
1933
  testId: "typing-indicator-ai"
1933
1934
  }
1934
1935
  );
@@ -1936,21 +1937,21 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1936
1937
  if ((s == null ? void 0 : s.typing_events) === !1)
1937
1938
  return null;
1938
1939
  const m = e ? [] : Object.values(i).filter(
1939
- ({ parent_id: w, user: v }) => {
1940
+ ({ parent_id: _, user: v }) => {
1940
1941
  var p;
1941
- return (v == null ? void 0 : v.id) !== ((p = r.user) == null ? void 0 : p.id) && !w;
1942
+ return (v == null ? void 0 : v.id) !== ((p = r.user) == null ? void 0 : p.id) && !_;
1942
1943
  }
1943
1944
  ), g = e ? Object.values(i).filter(
1944
- ({ parent_id: w, user: v }) => {
1945
+ ({ parent_id: _, user: v }) => {
1945
1946
  var p;
1946
- return (v == null ? void 0 : v.id) !== ((p = r.user) == null ? void 0 : p.id) && w === (a == null ? void 0 : a.id);
1947
+ return (v == null ? void 0 : v.id) !== ((p = r.user) == null ? void 0 : p.id) && _ === (a == null ? void 0 : a.id);
1947
1948
  }
1948
1949
  ) : [], u = e ? g : m;
1949
1950
  if (!u.length)
1950
1951
  return null;
1951
1952
  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;
1952
1953
  return /* @__PURE__ */ n(
1953
- Vt,
1954
+ jt,
1954
1955
  {
1955
1956
  avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
1956
1957
  avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
@@ -1958,7 +1959,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1958
1959
  testId: "typing-indicator"
1959
1960
  }
1960
1961
  );
1961
- }, Vt = ({
1962
+ }, jt = ({
1962
1963
  avatarId: e,
1963
1964
  avatarName: t,
1964
1965
  avatarImage: s,
@@ -1973,7 +1974,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1973
1974
  },
1974
1975
  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
1976
  /* @__PURE__ */ n(
1976
- ie,
1977
+ oe,
1977
1978
  {
1978
1979
  className: "str-chat__avatar str-chat__message-sender-avatar",
1979
1980
  id: e,
@@ -1993,9 +1994,9 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1993
1994
  height: "13",
1994
1995
  overflow: "visible",
1995
1996
  children: [
1996
- /* @__PURE__ */ n(Fe, { cx: "4", index: 0 }),
1997
- /* @__PURE__ */ n(Fe, { cx: "16", index: 1 }),
1998
- /* @__PURE__ */ n(Fe, { cx: "28", index: 2 })
1997
+ /* @__PURE__ */ n(Be, { cx: "4", index: 0 }),
1998
+ /* @__PURE__ */ n(Be, { cx: "16", index: 1 }),
1999
+ /* @__PURE__ */ n(Be, { cx: "28", index: 2 })
1999
2000
  ]
2000
2001
  }
2001
2002
  ) }) }) }) }) })
@@ -2014,7 +2015,7 @@ function Ka(e, t) {
2014
2015
  const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2015
2016
  "div",
2016
2017
  {
2017
- className: y("flex items-center justify-center h-full", e),
2018
+ className: k("flex items-center justify-center h-full", e),
2018
2019
  children: [
2019
2020
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2020
2021
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2054,12 +2055,12 @@ const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2054
2055
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2055
2056
  ]
2056
2057
  }
2057
- ), Ie = 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
+ ), Ae = V.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
2059
  /* @__PURE__ */ n(Za, { className: "w-6 h-6" }),
2059
2060
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2060
2061
  ] }) }));
2061
- Ie.displayName = "LoadingState";
2062
- const be = ({
2062
+ Ae.displayName = "LoadingState";
2063
+ const pe = ({
2063
2064
  className: e,
2064
2065
  size: t = 16
2065
2066
  }) => /* @__PURE__ */ n(
@@ -2067,45 +2068,45 @@ const be = ({
2067
2068
  {
2068
2069
  weight: "fill",
2069
2070
  size: t,
2070
- className: y("shrink-0 text-[#1D9BF0]", e),
2071
+ className: k("shrink-0 text-[#1D9BF0]", e),
2071
2072
  "aria-label": "Verified",
2072
2073
  role: "img"
2073
2074
  }
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 = ({
2075
+ ), le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Gt = "Replies instantly with AI assistant", Qa = ({
2075
2076
  onBack: e,
2076
2077
  showBackButton: t,
2077
2078
  showStarButton: s = !1,
2078
2079
  dmAgentEnabled: a = !1,
2079
2080
  onLeaveConversation: r,
2080
2081
  onBlockParticipant: i,
2081
- showDeleteConversation: o = !0,
2082
- showBlockParticipant: l = !0,
2082
+ showDeleteConversation: l = !0,
2083
+ showBlockParticipant: o = !0,
2083
2084
  showReportParticipant: d = !0,
2084
2085
  onDeleteConversationClick: m,
2085
2086
  onBlockParticipantClick: g,
2086
2087
  onReportParticipantClick: u,
2087
2088
  customChannelActions: f,
2088
2089
  renderChannelActions: c,
2089
- showChannelInfo: x = !0,
2090
+ showChannelInfo: w = !0,
2090
2091
  onParticipantNameClick: b,
2091
- renderHeaderTitleBadges: w
2092
+ renderHeaderTitleBadges: _
2092
2093
  }) => {
2093
- var B, M, N, T, k, I;
2094
- const { channel: v } = ce(), p = U.useMemo(() => {
2095
- var $, j;
2096
- const C = ($ = v._client) == null ? void 0 : $.userID;
2094
+ var U, O, N, A, y, E;
2095
+ const { channel: v } = de(), p = V.useMemo(() => {
2096
+ var P, j;
2097
+ const C = (P = v._client) == null ? void 0 : P.userID;
2097
2098
  return C ? Object.values(((j = v.state) == null ? void 0 : j.members) || {}).find(
2098
- (X) => {
2099
- var K;
2100
- return ((K = X.user) == null ? void 0 : K.id) && X.user.id !== C;
2099
+ (J) => {
2100
+ var Q;
2101
+ return ((Q = J.user) == null ? void 0 : Q.id) && J.user.id !== C;
2101
2102
  }
2102
2103
  ) : void 0;
2103
- }, [(B = v._client) == null ? void 0 : B.userID, (M = v.state) == null ? void 0 : M.members]), A = Kt(p == null ? void 0 : p.user), R = (N = p == null ? void 0 : p.user) == null ? void 0 : N.image, L = ((T = p == null ? void 0 : p.user) == null ? void 0 : T.is_verified) === !0, S = Xt(v), D = w == null ? void 0 : w({
2104
+ }, [(U = v._client) == null ? void 0 : U.userID, (O = v.state) == null ? void 0 : O.members]), I = Zt(p == null ? void 0 : p.user), M = (N = p == null ? void 0 : p.user) == null ? void 0 : N.image, R = ((A = p == null ? void 0 : p.user) == null ? void 0 : A.is_verified) === !0, T = Jt(v), L = _ == null ? void 0 : _({
2104
2105
  channel: v,
2105
2106
  participant: p
2106
- }), P = async () => {
2107
+ }), D = async () => {
2107
2108
  try {
2108
- S ? await v.unpin() : await v.pin();
2109
+ T ? await v.unpin() : await v.pin();
2109
2110
  } catch (C) {
2110
2111
  console.error(
2111
2112
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -2118,25 +2119,25 @@ const be = ({
2118
2119
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2119
2120
  "button",
2120
2121
  {
2121
- className: y(
2122
- oe,
2122
+ className: k(
2123
+ le,
2123
2124
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2124
2125
  ),
2125
2126
  onClick: e || (() => {
2126
2127
  }),
2127
2128
  type: "button",
2128
2129
  "aria-label": "Back to conversations",
2129
- children: /* @__PURE__ */ n(Dt, { className: "size-5 text-black/90" })
2130
+ children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
2130
2131
  }
2131
2132
  ) }),
2132
2133
  /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2133
2134
  /* @__PURE__ */ n(
2134
- ie,
2135
+ oe,
2135
2136
  {
2136
- id: ((k = p == null ? void 0 : p.user) == null ? void 0 : k.id) || v.id || "unknown",
2137
- name: A,
2138
- image: R,
2139
- starred: s && S,
2137
+ id: ((y = p == null ? void 0 : p.user) == null ? void 0 : y.id) || v.id || "unknown",
2138
+ name: I,
2139
+ image: M,
2140
+ starred: s && T,
2140
2141
  dmAgentEnabled: a,
2141
2142
  size: 48
2142
2143
  }
@@ -2146,52 +2147,52 @@ const be = ({
2146
2147
  {
2147
2148
  type: "button",
2148
2149
  onClick: b,
2149
- "aria-label": `View details for ${A}`,
2150
+ "aria-label": `View details for ${I}`,
2150
2151
  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",
2151
2152
  children: [
2152
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2153
- L && /* @__PURE__ */ n(be, {}),
2154
- D && /* @__PURE__ */ n("span", { className: "shrink-0", children: D }),
2155
- /* @__PURE__ */ n(Ge, { className: "size-3 shrink-0", weight: "bold" })
2153
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: I }),
2154
+ R && /* @__PURE__ */ n(pe, {}),
2155
+ L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
2156
+ /* @__PURE__ */ n(He, { className: "size-3 shrink-0", weight: "bold" })
2156
2157
  ]
2157
2158
  }
2158
2159
  ) : /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
2159
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2160
- L && /* @__PURE__ */ n(be, {}),
2161
- D && /* @__PURE__ */ n("span", { className: "shrink-0", children: D })
2160
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: I }),
2161
+ R && /* @__PURE__ */ n(pe, {}),
2162
+ L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
2162
2163
  ] }),
2163
2164
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2164
- /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2165
- /* @__PURE__ */ n("span", { children: Ut })
2165
+ /* @__PURE__ */ n(Ge, { className: "size-3 shrink-0 text-black/55" }),
2166
+ /* @__PURE__ */ n("span", { children: Gt })
2166
2167
  ] })
2167
2168
  ] }),
2168
2169
  /* @__PURE__ */ h("div", { className: "flex justify-end items-center gap-2", children: [
2169
2170
  s && /* @__PURE__ */ n(
2170
2171
  "button",
2171
2172
  {
2172
- className: oe,
2173
- onClick: P,
2173
+ className: le,
2174
+ onClick: D,
2174
2175
  type: "button",
2175
- "aria-label": S ? "Unstar conversation" : "Star conversation",
2176
+ "aria-label": T ? "Unstar conversation" : "Star conversation",
2176
2177
  children: /* @__PURE__ */ n(
2177
- Ve,
2178
+ Ue,
2178
2179
  {
2179
- className: y("size-5", {
2180
- "text-yellow-600": S,
2181
- "text-black/90": !S
2180
+ className: k("size-5", {
2181
+ "text-yellow-600": T,
2182
+ "text-black/90": !T
2182
2183
  }),
2183
- weight: S ? "duotone" : "regular"
2184
+ weight: T ? "duotone" : "regular"
2184
2185
  }
2185
2186
  )
2186
2187
  }
2187
2188
  ),
2188
- x && (c !== void 0 ? c : /* @__PURE__ */ n(
2189
- zt,
2189
+ w && (c !== void 0 ? c : /* @__PURE__ */ n(
2190
+ Ft,
2190
2191
  {
2191
2192
  channel: v,
2192
2193
  participant: p,
2193
- showDeleteConversation: o,
2194
- showBlockParticipant: l,
2194
+ showDeleteConversation: l,
2195
+ showBlockParticipant: o,
2195
2196
  showReportParticipant: d,
2196
2197
  onLeaveConversation: r,
2197
2198
  onBlockParticipant: i,
@@ -2199,7 +2200,7 @@ const be = ({
2199
2200
  onBlockParticipantClick: g,
2200
2201
  onReportParticipantClick: u,
2201
2202
  customChannelActions: f,
2202
- triggerClassName: y(oe, "bg-[#F1F0EE]")
2203
+ triggerClassName: k(le, "bg-[#F1F0EE]")
2203
2204
  }
2204
2205
  ))
2205
2206
  ] })
@@ -2209,23 +2210,23 @@ const be = ({
2209
2210
  t && e && /* @__PURE__ */ n(
2210
2211
  "button",
2211
2212
  {
2212
- className: y(
2213
- oe,
2213
+ className: k(
2214
+ le,
2214
2215
  "messaging-channel-view-back-button-desktop"
2215
2216
  ),
2216
2217
  type: "button",
2217
2218
  onClick: e,
2218
2219
  "aria-label": "Back to conversations",
2219
- children: /* @__PURE__ */ n(Dt, { className: "size-5 text-black/90" })
2220
+ children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
2220
2221
  }
2221
2222
  ),
2222
2223
  /* @__PURE__ */ n(
2223
- ie,
2224
+ oe,
2224
2225
  {
2225
- id: ((I = p == null ? void 0 : p.user) == null ? void 0 : I.id) || v.id || "unknown",
2226
- name: A,
2227
- image: R,
2228
- starred: s && S,
2226
+ id: ((E = p == null ? void 0 : p.user) == null ? void 0 : E.id) || v.id || "unknown",
2227
+ name: I,
2228
+ image: M,
2229
+ starred: s && T,
2229
2230
  dmAgentEnabled: a,
2230
2231
  size: 48
2231
2232
  }
@@ -2236,23 +2237,23 @@ const be = ({
2236
2237
  {
2237
2238
  type: "button",
2238
2239
  onClick: b,
2239
- "aria-label": `View details for ${A}`,
2240
+ "aria-label": `View details for ${I}`,
2240
2241
  className: "flex min-w-0 max-w-full items-center gap-1 rounded font-medium text-black/90 transition-opacity hover:opacity-70",
2241
2242
  children: [
2242
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2243
- L && /* @__PURE__ */ n(be, {}),
2244
- D && /* @__PURE__ */ n("span", { className: "shrink-0", children: D }),
2245
- /* @__PURE__ */ n(Ge, { className: "size-4 shrink-0", weight: "bold" })
2243
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: I }),
2244
+ R && /* @__PURE__ */ n(pe, {}),
2245
+ L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
2246
+ /* @__PURE__ */ n(He, { className: "size-4 shrink-0", weight: "bold" })
2246
2247
  ]
2247
2248
  }
2248
2249
  ) : /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2249
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2250
- L && /* @__PURE__ */ n(be, {}),
2251
- D && /* @__PURE__ */ n("span", { className: "shrink-0", children: D })
2250
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: I }),
2251
+ R && /* @__PURE__ */ n(pe, {}),
2252
+ L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
2252
2253
  ] }),
2253
2254
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2254
- /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2255
- /* @__PURE__ */ n("span", { className: "truncate", children: Ut })
2255
+ /* @__PURE__ */ n(Ge, { className: "size-3 shrink-0 text-black/55" }),
2256
+ /* @__PURE__ */ n("span", { className: "truncate", children: Gt })
2256
2257
  ] })
2257
2258
  ] })
2258
2259
  ] }),
@@ -2260,29 +2261,29 @@ const be = ({
2260
2261
  s && /* @__PURE__ */ n(
2261
2262
  "button",
2262
2263
  {
2263
- className: oe,
2264
- onClick: P,
2264
+ className: le,
2265
+ onClick: D,
2265
2266
  type: "button",
2266
- "aria-label": S ? "Unstar conversation" : "Star conversation",
2267
+ "aria-label": T ? "Unstar conversation" : "Star conversation",
2267
2268
  children: /* @__PURE__ */ n(
2268
- Ve,
2269
+ Ue,
2269
2270
  {
2270
- className: y("size-6", {
2271
- "text-yellow-600": S,
2272
- "text-black/90": !S
2271
+ className: k("size-6", {
2272
+ "text-yellow-600": T,
2273
+ "text-black/90": !T
2273
2274
  }),
2274
- weight: S ? "duotone" : "regular"
2275
+ weight: T ? "duotone" : "regular"
2275
2276
  }
2276
2277
  )
2277
2278
  }
2278
2279
  ),
2279
- x && (c !== void 0 ? c : /* @__PURE__ */ n(
2280
- zt,
2280
+ w && (c !== void 0 ? c : /* @__PURE__ */ n(
2281
+ Ft,
2281
2282
  {
2282
2283
  channel: v,
2283
2284
  participant: p,
2284
- showDeleteConversation: o,
2285
- showBlockParticipant: l,
2285
+ showDeleteConversation: l,
2286
+ showBlockParticipant: o,
2286
2287
  showReportParticipant: d,
2287
2288
  onLeaveConversation: r,
2288
2289
  onBlockParticipant: i,
@@ -2290,7 +2291,7 @@ const be = ({
2290
2291
  onBlockParticipantClick: g,
2291
2292
  onReportParticipantClick: u,
2292
2293
  customChannelActions: f,
2293
- triggerClassName: oe
2294
+ triggerClassName: le
2294
2295
  }
2295
2296
  ))
2296
2297
  ] })
@@ -2303,63 +2304,64 @@ const be = ({
2303
2304
  renderMessageInputFooter: a,
2304
2305
  renderConversationFooter: r,
2305
2306
  onLeaveConversation: i,
2306
- onBlockParticipant: o,
2307
- showDeleteConversation: l = !0,
2307
+ onBlockParticipant: l,
2308
+ showDeleteConversation: o = !0,
2308
2309
  onDeleteConversationClick: d,
2309
2310
  onBlockParticipantClick: m,
2310
2311
  onReportParticipantClick: g,
2311
2312
  showBlockParticipant: u = !0,
2312
2313
  showReportParticipant: f = !0,
2313
2314
  composerDisabled: c = !1,
2314
- composerDisabledReason: x,
2315
+ composerDisabledReason: w,
2315
2316
  showStarButton: b = !1,
2316
- chatbotVotingEnabled: w = !1,
2317
+ chatbotVotingEnabled: _ = !1,
2317
2318
  renderChannelBanner: v,
2318
2319
  renderHeaderTitleBadges: p,
2319
- customChannelActions: A,
2320
- renderChannelActions: R,
2321
- renderMessage: L,
2322
- dmAgentEnabled: S = !1,
2323
- viewerLanguage: D,
2324
- showChannelInfo: P = !0,
2325
- onParticipantNameClick: B
2320
+ customChannelActions: I,
2321
+ renderChannelActions: M,
2322
+ renderMessage: R,
2323
+ dmAgentEnabled: T = !1,
2324
+ viewerLanguage: L,
2325
+ showChannelInfo: D = !0,
2326
+ onParticipantNameClick: U,
2327
+ composerInput: O
2326
2328
  }) => {
2327
- var $, j, X, K, V, _;
2328
- const { channel: M } = ce(), N = U.useMemo(() => {
2329
- var q, Y;
2330
- const E = (q = M._client) == null ? void 0 : q.userID;
2331
- return E ? Object.values(((Y = M.state) == null ? void 0 : Y.members) || {}).find(
2332
- (G) => {
2333
- var W;
2334
- return ((W = G.user) == null ? void 0 : W.id) && G.user.id !== E;
2329
+ var j, J, Q, Y, x, S;
2330
+ const { channel: N } = de(), A = V.useMemo(() => {
2331
+ var q, F;
2332
+ const B = (q = N._client) == null ? void 0 : q.userID;
2333
+ return B ? Object.values(((F = N.state) == null ? void 0 : F.members) || {}).find(
2334
+ (W) => {
2335
+ var X;
2336
+ return ((X = W.user) == null ? void 0 : X.id) && W.user.id !== B;
2335
2337
  }
2336
2338
  ) : void 0;
2337
- }, [($ = M._client) == null ? void 0 : $.userID, (j = M.state) == null ? void 0 : j.members]), T = U.useMemo(() => {
2338
- var q, Y;
2339
- const E = (q = M._client) == null ? void 0 : q.userID;
2340
- return E ? Object.values(((Y = M.state) == null ? void 0 : Y.members) || {}).find((G) => {
2341
- var W;
2342
- return ((W = G.user) == null ? void 0 : W.id) === E;
2339
+ }, [(j = N._client) == null ? void 0 : j.userID, (J = N.state) == null ? void 0 : J.members]), y = V.useMemo(() => {
2340
+ var q, F;
2341
+ const B = (q = N._client) == null ? void 0 : q.userID;
2342
+ return B ? Object.values(((F = N.state) == null ? void 0 : F.members) || {}).find((W) => {
2343
+ var X;
2344
+ return ((X = W.user) == null ? void 0 : X.id) === B;
2343
2345
  }) : void 0;
2344
- }, [(X = M._client) == null ? void 0 : X.userID, (K = M.state) == null ? void 0 : K.members]), k = ((V = T == null ? void 0 : T.user) == null ? void 0 : V.is_account) ?? (T == null ? void 0 : T.is_account), I = ((_ = N == null ? void 0 : N.user) == null ? void 0 : _.is_account) ?? (N == null ? void 0 : N.is_account), C = S && k === !1 && I === !0, O = Z(
2345
- (E) => {
2346
- const { message: F } = we("ChannelView"), q = /* @__PURE__ */ n(
2346
+ }, [(Q = N._client) == null ? void 0 : Q.userID, (Y = N.state) == null ? void 0 : Y.members]), E = ((x = y == null ? void 0 : y.user) == null ? void 0 : x.is_account) ?? (y == null ? void 0 : y.is_account), C = ((S = A == null ? void 0 : A.user) == null ? void 0 : S.is_account) ?? (A == null ? void 0 : A.is_account), $ = T && E === !1 && C === !0, P = Z(
2347
+ (B) => {
2348
+ const { message: G } = Ne("ChannelView"), q = /* @__PURE__ */ n(
2347
2349
  Ta,
2348
2350
  {
2349
- ...E,
2350
- chatbotVotingEnabled: w,
2351
- viewerLanguage: D
2351
+ ...B,
2352
+ chatbotVotingEnabled: _,
2353
+ viewerLanguage: L
2352
2354
  }
2353
2355
  );
2354
- return !L || !F ? q : L(q, F);
2356
+ return !R || !G ? q : R(q, G);
2355
2357
  },
2356
- [w, L, D]
2358
+ [_, R, L]
2357
2359
  );
2358
2360
  return /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(
2359
2361
  cs,
2360
2362
  {
2361
2363
  overrides: {
2362
- Message: O,
2364
+ Message: P,
2363
2365
  MessageActions: Ra
2364
2366
  },
2365
2367
  children: /* @__PURE__ */ h(ds, { children: [
@@ -2368,24 +2370,24 @@ const be = ({
2368
2370
  {
2369
2371
  onBack: e,
2370
2372
  showBackButton: t,
2371
- showChannelInfo: P,
2373
+ showChannelInfo: D,
2372
2374
  showStarButton: b,
2373
- dmAgentEnabled: C,
2375
+ dmAgentEnabled: $,
2374
2376
  onLeaveConversation: i,
2375
- onBlockParticipant: o,
2376
- showDeleteConversation: l,
2377
+ onBlockParticipant: l,
2378
+ showDeleteConversation: o,
2377
2379
  showBlockParticipant: u,
2378
2380
  showReportParticipant: f,
2379
2381
  onDeleteConversationClick: d,
2380
2382
  onBlockParticipantClick: m,
2381
2383
  onReportParticipantClick: g,
2382
- customChannelActions: A,
2383
- renderChannelActions: R,
2384
- onParticipantNameClick: B,
2384
+ customChannelActions: I,
2385
+ renderChannelActions: M,
2386
+ onParticipantNameClick: U,
2385
2387
  renderHeaderTitleBadges: p
2386
2388
  }
2387
2389
  ) }, "lt-channel-header"),
2388
- v ? /* @__PURE__ */ n(U.Fragment, { children: v() }, "lt-channel-banner") : null,
2390
+ v ? /* @__PURE__ */ n(V.Fragment, { children: v() }, "lt-channel-banner") : null,
2389
2391
  /* @__PURE__ */ n(
2390
2392
  "div",
2391
2393
  {
@@ -2394,23 +2396,24 @@ const be = ({
2394
2396
  },
2395
2397
  "lt-channel-message-list"
2396
2398
  ),
2397
- r ? /* @__PURE__ */ n(U.Fragment, { children: r(M) }, "lt-channel-conversation-footer") : null,
2399
+ r ? /* @__PURE__ */ n(V.Fragment, { children: r(N) }, "lt-channel-conversation-footer") : null,
2398
2400
  /* @__PURE__ */ n(
2399
2401
  $a,
2400
2402
  {
2401
2403
  ...s && {
2402
- renderActions: () => s == null ? void 0 : s(M)
2404
+ renderActions: () => s == null ? void 0 : s(N)
2403
2405
  },
2404
- renderFooter: () => a == null ? void 0 : a(M),
2406
+ renderFooter: () => a == null ? void 0 : a(N),
2405
2407
  disabled: c,
2406
- disabledReason: x
2408
+ disabledReason: w,
2409
+ composerInput: O
2407
2410
  },
2408
2411
  "lt-channel-message-input"
2409
2412
  )
2410
2413
  ] })
2411
2414
  }
2412
2415
  ) });
2413
- }, mn = U.memo(
2416
+ }, hn = V.memo(
2414
2417
  ({
2415
2418
  channel: e,
2416
2419
  onBack: t,
@@ -2418,86 +2421,87 @@ const be = ({
2418
2421
  renderMessageInputActions: a,
2419
2422
  renderMessageInputFooter: r,
2420
2423
  renderConversationFooter: i,
2421
- onLeaveConversation: o,
2422
- onBlockParticipant: l,
2424
+ onLeaveConversation: l,
2425
+ onBlockParticipant: o,
2423
2426
  className: d,
2424
2427
  CustomChannelEmptyState: m = Ja,
2425
2428
  showDeleteConversation: g = !0,
2426
2429
  onDeleteConversationClick: u,
2427
2430
  onBlockParticipantClick: f,
2428
2431
  onReportParticipantClick: c,
2429
- showBlockParticipant: x = !0,
2432
+ showBlockParticipant: w = !0,
2430
2433
  showReportParticipant: b = !0,
2431
- composerDisabled: w = !1,
2434
+ composerDisabled: _ = !1,
2432
2435
  composerDisabledReason: v,
2433
2436
  dmAgentEnabled: p,
2434
- messageMetadata: A,
2435
- onMessageSent: R,
2436
- showStarButton: L = !1,
2437
- chatbotVotingEnabled: S = !1,
2438
- renderChannelBanner: D,
2439
- renderHeaderTitleBadges: P,
2440
- customChannelActions: B,
2441
- renderChannelActions: M,
2437
+ messageMetadata: I,
2438
+ onMessageSent: M,
2439
+ showStarButton: R = !1,
2440
+ chatbotVotingEnabled: T = !1,
2441
+ renderChannelBanner: L,
2442
+ renderHeaderTitleBadges: D,
2443
+ customChannelActions: U,
2444
+ renderChannelActions: O,
2442
2445
  renderMessage: N,
2443
- onMessageLinkClick: T,
2444
- sendButton: k,
2445
- attachmentPreviewList: I,
2446
+ onMessageLinkClick: A,
2447
+ sendButton: y,
2448
+ attachmentPreviewList: E,
2446
2449
  viewerLanguage: C,
2447
- showChannelInfo: O = !0,
2448
- onParticipantNameClick: $
2450
+ showChannelInfo: $ = !0,
2451
+ onParticipantNameClick: P,
2452
+ composerInput: j
2449
2453
  }) => {
2450
- const j = Z(
2451
- async (K, V, _) => {
2452
- var W;
2453
- const E = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, F = p && !E, q = {
2454
- ...V,
2455
- ...F && { silent: !0 },
2456
- ...A && {
2454
+ const J = Z(
2455
+ async (Y, x, S) => {
2456
+ var X;
2457
+ const B = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, G = p && !B, q = {
2458
+ ...x,
2459
+ ...G && { silent: !0 },
2460
+ ...I && {
2457
2461
  metadata: {
2458
- ...V.metadata ?? {},
2459
- ...A
2462
+ ...x.metadata ?? {},
2463
+ ...I
2460
2464
  }
2461
2465
  }
2462
- }, Y = {
2463
- ..._,
2464
- ...F && { skip_push: !0 }
2465
- }, G = await e.sendMessage(q, Y);
2466
- return R == null || R(G), G;
2466
+ }, F = {
2467
+ ...S,
2468
+ ...G && { skip_push: !0 }
2469
+ }, W = await e.sendMessage(q, F);
2470
+ return M == null || M(W), W;
2467
2471
  },
2468
- [e, p, A, R]
2469
- ), X = H(null);
2470
- return J(() => {
2471
- if (!T) return;
2472
- const K = X.current;
2473
- if (!K) return;
2474
- const V = (_) => {
2475
- const E = _.target, F = E == null ? void 0 : E.closest("a[href]"), q = F == null ? void 0 : F.getAttribute("href");
2472
+ [e, p, I, M]
2473
+ ), Q = H(null);
2474
+ return K(() => {
2475
+ if (!A) return;
2476
+ const Y = Q.current;
2477
+ if (!Y) return;
2478
+ const x = (S) => {
2479
+ const B = S.target, G = B == null ? void 0 : B.closest("a[href]"), q = G == null ? void 0 : G.getAttribute("href");
2476
2480
  if (!q) return;
2477
- const Y = F == null ? void 0 : F.closest("[data-message-id]"), G = Y == null ? void 0 : Y.getAttribute("data-message-id"), W = G ? e.state.messages.find((de) => de.id === G) : void 0;
2478
- T(q, W);
2481
+ const F = G == null ? void 0 : G.closest("[data-message-id]"), W = F == null ? void 0 : F.getAttribute("data-message-id"), X = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
2482
+ A(q, X);
2479
2483
  };
2480
- return K.addEventListener("click", V), () => K.removeEventListener("click", V);
2481
- }, [T, e]), /* @__PURE__ */ n(
2484
+ return Y.addEventListener("click", x), () => Y.removeEventListener("click", x);
2485
+ }, [A, e]), /* @__PURE__ */ n(
2482
2486
  "div",
2483
2487
  {
2484
- ref: X,
2485
- className: y(
2488
+ ref: Q,
2489
+ className: k(
2486
2490
  "messaging-channel-view h-full flex flex-col",
2487
2491
  d
2488
2492
  ),
2489
- children: /* @__PURE__ */ n(un.Provider, { value: p ?? !1, children: /* @__PURE__ */ n(
2493
+ children: /* @__PURE__ */ n(mn.Provider, { value: p ?? !1, children: /* @__PURE__ */ n(
2490
2494
  ls,
2491
2495
  {
2492
2496
  channel: e,
2493
2497
  MessageSystem: qa,
2494
2498
  EmptyStateIndicator: m,
2495
- LoadingIndicator: Ie,
2499
+ LoadingIndicator: Ae,
2496
2500
  DateSeparator: Hs,
2497
2501
  TypingIndicator: Xa,
2498
- doSendMessageRequest: j,
2499
- ...k ? { SendButton: k } : {},
2500
- ...I ? { AttachmentPreviewList: I } : {},
2502
+ doSendMessageRequest: J,
2503
+ ...y ? { SendButton: y } : {},
2504
+ ...E ? { AttachmentPreviewList: E } : {},
2501
2505
  children: /* @__PURE__ */ n(
2502
2506
  er,
2503
2507
  {
@@ -2506,28 +2510,29 @@ const be = ({
2506
2510
  renderMessageInputActions: a,
2507
2511
  renderMessageInputFooter: r,
2508
2512
  renderConversationFooter: i,
2509
- onLeaveConversation: o,
2510
- onBlockParticipant: l,
2513
+ onLeaveConversation: l,
2514
+ onBlockParticipant: o,
2511
2515
  CustomChannelEmptyState: m,
2512
2516
  showDeleteConversation: g,
2513
2517
  onDeleteConversationClick: u,
2514
2518
  onBlockParticipantClick: f,
2515
2519
  onReportParticipantClick: c,
2516
- showBlockParticipant: x,
2520
+ showBlockParticipant: w,
2517
2521
  showReportParticipant: b,
2518
- composerDisabled: w,
2522
+ composerDisabled: _,
2519
2523
  composerDisabledReason: v,
2520
- showStarButton: L,
2524
+ showStarButton: R,
2521
2525
  dmAgentEnabled: p,
2522
- chatbotVotingEnabled: S,
2523
- renderChannelBanner: D,
2524
- renderHeaderTitleBadges: P,
2525
- customChannelActions: B,
2526
- renderChannelActions: M,
2526
+ chatbotVotingEnabled: T,
2527
+ renderChannelBanner: L,
2528
+ renderHeaderTitleBadges: D,
2529
+ customChannelActions: U,
2530
+ renderChannelActions: O,
2527
2531
  renderMessage: N,
2528
2532
  viewerLanguage: C,
2529
- showChannelInfo: O,
2530
- onParticipantNameClick: $
2533
+ showChannelInfo: $,
2534
+ onParticipantNameClick: P,
2535
+ composerInput: j
2531
2536
  }
2532
2537
  )
2533
2538
  }
@@ -2536,8 +2541,8 @@ const be = ({
2536
2541
  );
2537
2542
  }
2538
2543
  );
2539
- mn.displayName = "ChannelView";
2540
- const pe = 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: [
2544
+ hn.displayName = "ChannelView";
2545
+ const ve = V.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: [
2541
2546
  /* @__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: "⚠️" }) }),
2542
2547
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2543
2548
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2551,149 +2556,151 @@ const pe = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2551
2556
  }
2552
2557
  )
2553
2558
  ] }) }));
2554
- pe.displayName = "ErrorState";
2555
- const Si = ({
2559
+ ve.displayName = "ErrorState";
2560
+ const Ii = ({
2556
2561
  capabilities: e = {},
2557
2562
  renderMessageInputActions: t,
2558
2563
  renderConversationFooter: s,
2559
2564
  onChannelSelect: a,
2560
2565
  onExitConversation: r,
2561
2566
  initialParticipantFilter: i,
2562
- initialParticipantData: o,
2563
- CustomChannelEmptyState: l,
2567
+ initialParticipantData: l,
2568
+ CustomChannelEmptyState: o,
2564
2569
  onBlockParticipantClick: d,
2565
2570
  onReportParticipantClick: m,
2566
2571
  dmAgentEnabled: g,
2567
2572
  onMessageSent: u,
2568
2573
  chatbotVotingEnabled: f = !1,
2569
2574
  viewerLanguage: c,
2570
- renderHeaderTitleBadges: x,
2575
+ renderHeaderTitleBadges: w,
2571
2576
  renderChannelBanner: b,
2572
- customChannelActions: w,
2577
+ customChannelActions: _,
2573
2578
  renderChannelActions: v,
2574
2579
  onParticipantNameClick: p,
2575
- renderMessage: A,
2576
- onMessageLinkClick: R,
2577
- showChannelInfo: L
2580
+ renderMessage: I,
2581
+ onMessageLinkClick: M,
2582
+ showChannelInfo: R,
2583
+ composerInput: T
2578
2584
  }) => {
2579
2585
  const {
2580
- client: S,
2586
+ client: L,
2581
2587
  isConnected: D,
2582
- isLoading: P,
2583
- error: B,
2584
- refreshConnection: M,
2585
- service: N,
2586
- debug: T
2587
- } = $s(), [k, I] = z(null), [C, O] = z(null), [$, j] = z(!1), { showDeleteConversation: X = !0 } = e, K = H(o);
2588
- K.current = o;
2589
- const V = H(a);
2590
- V.current = a;
2591
- const _ = H(null), E = H(null);
2592
- J(() => {
2593
- E.current = k;
2594
- }, [k]), J(() => {
2595
- if (!S || !D) return;
2596
- const Y = S.userID;
2597
- if (!Y) return;
2598
- const G = `${Y}::${i}`;
2599
- if (_.current === G) return;
2600
- _.current = G;
2601
- const W = () => {
2602
- _.current === G && (_.current = null);
2588
+ isLoading: U,
2589
+ error: O,
2590
+ refreshConnection: N,
2591
+ service: A,
2592
+ debug: y
2593
+ } = $s(), [E, C] = z(null), [$, P] = z(null), [j, J] = z(!1), { showDeleteConversation: Q = !0 } = e, Y = H(l);
2594
+ Y.current = l;
2595
+ const x = H(a);
2596
+ x.current = a;
2597
+ const S = H(null), B = H(null);
2598
+ K(() => {
2599
+ B.current = E;
2600
+ }, [E]), K(() => {
2601
+ if (!L || !D) return;
2602
+ const F = L.userID;
2603
+ if (!F) return;
2604
+ const W = `${F}::${i}`;
2605
+ if (S.current === W) return;
2606
+ S.current = W;
2607
+ const X = () => {
2608
+ S.current === W && (S.current = null);
2603
2609
  };
2604
2610
  (async () => {
2605
- var ue, me;
2611
+ var me, he;
2606
2612
  try {
2607
- T && console.log(
2613
+ y && console.log(
2608
2614
  "[MessagingShell] Loading initial conversation with:",
2609
2615
  i
2610
2616
  );
2611
- const te = await S.queryChannels(
2617
+ const ee = await L.queryChannels(
2612
2618
  {
2613
2619
  type: "messaging",
2614
- members: { $eq: [Y, i] }
2620
+ members: { $eq: [F, i] }
2615
2621
  },
2616
2622
  {},
2617
2623
  { limit: 1 }
2618
2624
  );
2619
- if (te.length > 0) {
2620
- I(te[0]), O(null), (ue = V.current) == null || ue.call(V, te[0]), T && console.log(
2625
+ if (ee.length > 0) {
2626
+ C(ee[0]), P(null), (me = x.current) == null || me.call(x, ee[0]), y && console.log(
2621
2627
  "[MessagingShell] Initial conversation loaded:",
2622
- te[0].id
2628
+ ee[0].id
2623
2629
  );
2624
2630
  return;
2625
2631
  }
2626
- const Q = K.current;
2627
- if (!Q || !N) {
2628
- W(), O("No conversation found with this account"), T && console.log(
2632
+ const te = Y.current;
2633
+ if (!te || !A) {
2634
+ X(), P("No conversation found with this account"), y && console.log(
2629
2635
  "[MessagingShell] No conversation found for:",
2630
2636
  i
2631
2637
  );
2632
2638
  return;
2633
2639
  }
2634
2640
  try {
2635
- const ee = await N.startChannelWithParticipant({
2636
- id: Q.id,
2637
- name: Q.name,
2638
- phone: Q.phone
2641
+ const ie = await A.startChannelWithParticipant({
2642
+ id: te.id,
2643
+ name: te.name,
2644
+ phone: te.phone
2639
2645
  });
2640
- I(ee), O(null), (me = V.current) == null || me.call(V, ee), T && console.log(
2646
+ C(ie), P(null), (he = x.current) == null || he.call(x, ie), y && console.log(
2641
2647
  "[MessagingShell] Channel created and loaded:",
2642
- ee.id
2648
+ ie.id
2643
2649
  );
2644
- } catch (ee) {
2650
+ } catch (ie) {
2645
2651
  console.error(
2646
2652
  "[MessagingShell] Failed to create conversation:",
2647
- ee
2648
- ), W(), O("Failed to create conversation");
2653
+ ie
2654
+ ), X(), P("Failed to create conversation");
2649
2655
  }
2650
- } catch (te) {
2656
+ } catch (ee) {
2651
2657
  console.error(
2652
2658
  "[MessagingShell] Failed to load initial conversation:",
2653
- te
2654
- ), W(), E.current || O("Failed to load conversation");
2659
+ ee
2660
+ ), X(), B.current || P("Failed to load conversation");
2655
2661
  }
2656
2662
  })();
2657
- }, [i, S, D, N, T]);
2658
- const F = H(r);
2659
- F.current = r;
2663
+ }, [i, L, D, A, y]);
2664
+ const G = H(r);
2665
+ G.current = r;
2660
2666
  const q = Z(() => {
2661
- var Y;
2662
- I(null), j(!0), (Y = F.current) == null || Y.call(F);
2667
+ var F;
2668
+ C(null), J(!0), (F = G.current) == null || F.call(G);
2663
2669
  }, []);
2664
- return P ? /* @__PURE__ */ n(Ie, {}) : B ? /* @__PURE__ */ n(pe, { message: B, onBack: M }) : !D || !S ? /* @__PURE__ */ n(
2665
- pe,
2670
+ return U ? /* @__PURE__ */ n(Ae, {}) : O ? /* @__PURE__ */ n(ve, { message: O, onBack: N }) : !D || !L ? /* @__PURE__ */ n(
2671
+ ve,
2666
2672
  {
2667
2673
  message: "Not connected to messaging service",
2668
- onBack: M
2674
+ onBack: N
2669
2675
  }
2670
- ) : C ? /* @__PURE__ */ n(pe, { message: C }) : $ && !k ? /* @__PURE__ */ n(pe, { message: "Conversation ended" }) : k ? /* @__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(
2671
- mn,
2676
+ ) : $ ? /* @__PURE__ */ n(ve, { message: $ }) : j && !E ? /* @__PURE__ */ n(ve, { message: "Conversation ended" }) : E ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2677
+ hn,
2672
2678
  {
2673
- channel: k,
2679
+ channel: E,
2674
2680
  renderMessageInputActions: t,
2675
2681
  renderConversationFooter: s,
2676
2682
  renderChannelBanner: b,
2677
2683
  onLeaveConversation: q,
2678
2684
  onBlockParticipant: q,
2679
- CustomChannelEmptyState: l,
2680
- showDeleteConversation: X,
2685
+ CustomChannelEmptyState: o,
2686
+ showDeleteConversation: Q,
2681
2687
  onBlockParticipantClick: d,
2682
2688
  onReportParticipantClick: m,
2683
2689
  dmAgentEnabled: g,
2684
2690
  onMessageSent: u,
2685
2691
  chatbotVotingEnabled: f,
2686
2692
  viewerLanguage: c,
2687
- renderHeaderTitleBadges: x,
2688
- customChannelActions: w,
2693
+ renderHeaderTitleBadges: w,
2694
+ customChannelActions: _,
2689
2695
  renderChannelActions: v,
2690
2696
  onParticipantNameClick: p,
2691
- renderMessage: A,
2692
- onMessageLinkClick: R,
2693
- showChannelInfo: L
2697
+ renderMessage: I,
2698
+ onMessageLinkClick: M,
2699
+ showChannelInfo: R,
2700
+ composerInput: T
2694
2701
  },
2695
- k.id
2696
- ) }) }) : /* @__PURE__ */ n(Ie, {});
2702
+ E.id
2703
+ ) }) }) : /* @__PURE__ */ n(Ae, {});
2697
2704
  };
2698
2705
  function tr(e) {
2699
2706
  const t = e.state.pending_messages;
@@ -2701,14 +2708,14 @@ function tr(e) {
2701
2708
  for (const s of t)
2702
2709
  e.state.addMessageSorted(s.message);
2703
2710
  }
2704
- const hn = U.createContext({
2711
+ const fn = V.createContext({
2705
2712
  selectedChannel: void 0,
2706
2713
  onChannelSelect: () => {
2707
2714
  },
2708
2715
  debug: !1,
2709
2716
  renderMessagePreview: void 0,
2710
2717
  viewerLanguage: void 0
2711
- }), nr = hn.Provider, sr = () => U.useContext(hn), ar = (e, t) => {
2718
+ }), nr = fn.Provider, sr = () => V.useContext(fn), ar = (e, t) => {
2712
2719
  const s = new Date(
2713
2720
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2714
2721
  ), r = new Date(
@@ -2729,50 +2736,50 @@ const hn = U.createContext({
2729
2736
  day: "numeric",
2730
2737
  year: "2-digit"
2731
2738
  });
2732
- }, fn = U.memo(
2739
+ }, gn = V.memo(
2733
2740
  ({ channel: e, unread: t }) => {
2734
- var D, P, B, M;
2741
+ var L, D, U, O;
2735
2742
  const {
2736
2743
  selectedChannel: s,
2737
2744
  onChannelSelect: a,
2738
2745
  debug: r,
2739
2746
  renderMessagePreview: i,
2740
- viewerLanguage: o
2741
- } = sr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2747
+ viewerLanguage: l
2748
+ } = sr(), o = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2742
2749
  e && a(e);
2743
2750
  }, m = (N) => {
2744
- const T = N.key === "Enter" || N.key === " ", k = N.repeat;
2745
- !T || k || (N.preventDefault(), d());
2746
- }, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
2751
+ const A = N.key === "Enter" || N.key === " ", y = N.repeat;
2752
+ !A || y || (N.preventDefault(), d());
2753
+ }, u = Object.values(((L = e == null ? void 0 : e.state) == null ? void 0 : L.members) || {}).find(
2747
2754
  (N) => {
2748
- var T, k;
2749
- return ((T = N.user) == null ? void 0 : T.id) && N.user.id !== ((k = e == null ? void 0 : e._client) == null ? void 0 : k.userID);
2755
+ var A, y;
2756
+ return ((A = N.user) == null ? void 0 : A.id) && N.user.id !== ((y = e == null ? void 0 : e._client) == null ? void 0 : y.userID);
2750
2757
  }
2751
- ), f = Kt(u == null ? void 0 : u.user), c = (P = u == null ? void 0 : u.user) == null ? void 0 : P.image, x = ((B = u == null ? void 0 : u.user) == null ? void 0 : B.is_verified) === !0, b = (() => {
2752
- var T;
2753
- const N = (T = e == null ? void 0 : e.state) == null ? void 0 : T.messages;
2758
+ ), f = Zt(u == null ? void 0 : u.user), c = (D = u == null ? void 0 : u.user) == null ? void 0 : D.image, w = ((U = u == null ? void 0 : u.user) == null ? void 0 : U.is_verified) === !0, b = (() => {
2759
+ var A;
2760
+ const N = (A = e == null ? void 0 : e.state) == null ? void 0 : A.messages;
2754
2761
  if (N != null && N.length) {
2755
- for (let k = N.length - 1; k >= 0; k--)
2756
- if (N[k].type !== "system") return N[k];
2762
+ for (let y = N.length - 1; y >= 0; y--)
2763
+ if (N[y].type !== "system") return N[y];
2757
2764
  }
2758
2765
  })(), v = (() => {
2759
- var O, $, j, X;
2760
- const N = Jt({
2766
+ var $, P, j, J;
2767
+ const N = Qt({
2761
2768
  message: b,
2762
- viewerLanguage: o
2769
+ viewerLanguage: l
2763
2770
  });
2764
- if (((O = b == null ? void 0 : b.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2765
- if ((($ = b == null ? void 0 : b.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2771
+ if ((($ = b == null ? void 0 : b.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2772
+ if (((P = b == null ? void 0 : b.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2766
2773
  if (((j = b == null ? void 0 : b.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2767
2774
  if (N) return N;
2768
- const C = (X = b == null ? void 0 : b.attachments) == null ? void 0 : X[0];
2775
+ const C = (J = b == null ? void 0 : b.attachments) == null ? void 0 : J[0];
2769
2776
  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";
2770
- })(), p = b != null && b.created_at ? rr(new Date(b.created_at)) : "", A = b ? Se(b) : !1, R = i ? i(b, v) : `${A ? "✨ " : ""}${v}`, L = Xt(e), S = t ?? 0;
2777
+ })(), p = b != null && b.created_at ? rr(new Date(b.created_at)) : "", I = b ? Te(b) : !1, M = i ? i(b, v) : `${I ? "✨ " : ""}${v}`, R = Jt(e), T = t ?? 0;
2771
2778
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2772
2779
  channelId: e == null ? void 0 : e.id,
2773
- isSelected: l,
2780
+ isSelected: o,
2774
2781
  participantName: f,
2775
- unreadCount: S,
2782
+ unreadCount: T,
2776
2783
  hasTimestamp: !!p
2777
2784
  }), /* @__PURE__ */ n(
2778
2785
  "div",
@@ -2781,36 +2788,36 @@ const hn = U.createContext({
2781
2788
  tabIndex: 0,
2782
2789
  onClick: d,
2783
2790
  onKeyDown: m,
2784
- className: y(
2791
+ className: k(
2785
2792
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2786
2793
  {
2787
- "bg-black/[0.04]": l,
2788
- "hover:bg-black/[0.02]": !l
2794
+ "bg-black/[0.04]": o,
2795
+ "hover:bg-black/[0.02]": !o
2789
2796
  }
2790
2797
  ),
2791
2798
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
2792
2799
  /* @__PURE__ */ n(
2793
- ie,
2800
+ oe,
2794
2801
  {
2795
- id: ((M = u == null ? void 0 : u.user) == null ? void 0 : M.id) || e.id || "unknown",
2802
+ id: ((O = u == null ? void 0 : u.user) == null ? void 0 : O.id) || e.id || "unknown",
2796
2803
  name: f,
2797
2804
  image: c,
2798
2805
  size: 48,
2799
- starred: L
2806
+ starred: R
2800
2807
  }
2801
2808
  ),
2802
2809
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
2803
2810
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2", children: [
2804
2811
  /* @__PURE__ */ h("h3", { className: "flex min-w-0 items-center gap-1 text-sm font-medium text-[#191918]", children: [
2805
- L && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2812
+ R && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2806
2813
  /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: f }),
2807
- x && /* @__PURE__ */ n(be, {})
2814
+ w && /* @__PURE__ */ n(pe, {})
2808
2815
  ] }),
2809
2816
  p && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: p })
2810
2817
  ] }),
2811
2818
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2812
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: R }),
2813
- S > 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: S > 99 ? "99+" : S })
2819
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
2820
+ T > 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: T > 99 ? "99+" : T })
2814
2821
  ] })
2815
2822
  ] })
2816
2823
  ] })
@@ -2818,8 +2825,8 @@ const hn = U.createContext({
2818
2825
  );
2819
2826
  }
2820
2827
  );
2821
- fn.displayName = "CustomChannelPreview";
2822
- const ir = { last_message_at: -1 }, or = U.memo(
2828
+ gn.displayName = "CustomChannelPreview";
2829
+ const ir = { last_message_at: -1 }, or = V.memo(
2823
2830
  ({
2824
2831
  onChannelSelect: e,
2825
2832
  selectedChannel: t,
@@ -2827,18 +2834,18 @@ const ir = { last_message_at: -1 }, or = U.memo(
2827
2834
  allowNewMessagesFromUnfilteredChannels: a = !1,
2828
2835
  channelRenderFilterFn: r,
2829
2836
  sort: i = ir,
2830
- className: o,
2831
- customEmptyStateIndicator: l,
2837
+ className: l,
2838
+ customEmptyStateIndicator: o,
2832
2839
  renderMessagePreview: d,
2833
2840
  viewerLanguage: m
2834
2841
  }) => {
2835
- const g = U.useRef(0);
2842
+ const g = V.useRef(0);
2836
2843
  g.current++;
2837
- const { debug: u = !1 } = Ke(), f = U.useCallback(
2838
- (x) => {
2839
- for (const b of x)
2844
+ const { debug: u = !1 } = Je(), f = V.useCallback(
2845
+ (w) => {
2846
+ for (const b of w)
2840
2847
  tr(b);
2841
- return r ? r(x) : x;
2848
+ return r ? r(w) : w;
2842
2849
  },
2843
2850
  [r]
2844
2851
  );
@@ -2847,7 +2854,7 @@ const ir = { last_message_at: -1 }, or = U.memo(
2847
2854
  selectedChannelId: t == null ? void 0 : t.id,
2848
2855
  filters: s
2849
2856
  });
2850
- const c = U.useMemo(
2857
+ const c = V.useMemo(
2851
2858
  () => ({
2852
2859
  selectedChannel: t,
2853
2860
  onChannelSelect: e,
@@ -2866,9 +2873,9 @@ const ir = { last_message_at: -1 }, or = U.memo(
2866
2873
  return /* @__PURE__ */ n(
2867
2874
  "div",
2868
2875
  {
2869
- className: y(
2876
+ className: k(
2870
2877
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2871
- o
2878
+ l
2872
2879
  ),
2873
2880
  children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(nr, { value: c, children: /* @__PURE__ */ n(
2874
2881
  ms,
@@ -2879,8 +2886,8 @@ const ir = { last_message_at: -1 }, or = U.memo(
2879
2886
  allowNewMessagesFromUnfilteredChannels: a,
2880
2887
  channelRenderFilterFn: f,
2881
2888
  Paginator: hs,
2882
- Preview: fn,
2883
- EmptyStateIndicator: l
2889
+ Preview: gn,
2890
+ EmptyStateIndicator: o
2884
2891
  },
2885
2892
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
2886
2893
  ) }) })
@@ -2890,7 +2897,7 @@ const ir = { last_message_at: -1 }, or = U.memo(
2890
2897
  );
2891
2898
  or.displayName = "ChannelList";
2892
2899
  const lr = /^([a-z][a-z0-9+.-]*):/i, cr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2893
- function nt(e) {
2900
+ function at(e) {
2894
2901
  if (typeof e != "string") return;
2895
2902
  const t = e.trim();
2896
2903
  if (t === "") return;
@@ -2905,10 +2912,10 @@ const dr = {
2905
2912
  dark: "bg-white text-[#121110] hover:bg-white/90",
2906
2913
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2907
2914
  }, ur = ({ variant: e, cta: t }) => {
2908
- const s = y(
2915
+ const s = k(
2909
2916
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2910
2917
  dr[e]
2911
- ), a = nt(t.href);
2918
+ ), a = at(t.href);
2912
2919
  return a ? /* @__PURE__ */ n(
2913
2920
  "a",
2914
2921
  {
@@ -2940,22 +2947,22 @@ const dr = {
2940
2947
  }, hr = "text-white/30", fr = {
2941
2948
  dark: "text-white/55",
2942
2949
  light: "text-black/55"
2943
- }, st = ({
2950
+ }, rt = ({
2944
2951
  variant: e,
2945
2952
  title: t,
2946
2953
  placeholderTitle: s,
2947
2954
  description: a,
2948
2955
  url: r,
2949
2956
  appIcon: i,
2950
- cta: o,
2951
- trailingAction: l
2957
+ cta: l,
2958
+ trailingAction: o
2952
2959
  }) => {
2953
- 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 !== "", x = o != null;
2954
- if (!g && !u && !c && !x) return null;
2955
- const w = y(
2960
+ 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 = l != null;
2961
+ if (!g && !u && !c && !w) return null;
2962
+ const _ = k(
2956
2963
  "truncate text-base font-medium leading-6",
2957
2964
  d && !t ? hr : mr[e]
2958
- ), v = y(
2965
+ ), v = k(
2959
2966
  "truncate text-xs leading-4",
2960
2967
  fr[e]
2961
2968
  );
@@ -2965,42 +2972,42 @@ const dr = {
2965
2972
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2966
2973
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2967
2974
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2968
- /* @__PURE__ */ n("p", { className: y("min-w-0", w), children: m })
2975
+ /* @__PURE__ */ n("p", { className: k("min-w-0", _), children: m })
2969
2976
  ] }),
2970
2977
  u && /* @__PURE__ */ n("p", { className: v, children: a })
2971
2978
  ] }),
2972
- !x && c && /* @__PURE__ */ n("p", { className: v, children: f })
2979
+ !w && c && /* @__PURE__ */ n("p", { className: v, children: f })
2973
2980
  ] }),
2974
- l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2981
+ o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
2975
2982
  ] }),
2976
- o && /* @__PURE__ */ n(ur, { variant: e, cta: o })
2983
+ l && /* @__PURE__ */ n(ur, { variant: e, cta: l })
2977
2984
  ] });
2978
- }, gr = y(
2985
+ }, gr = k(
2979
2986
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2980
2987
  // 1px hairline border that sits flush with the card chrome — matches
2981
2988
  // the messaging design system's "small border around link attachments"
2982
2989
  // treatment from the mobile spec. The drop shadow remains for depth.
2983
2990
  "border border-black/[0.08]",
2984
2991
  "shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
2985
- ), Te = ({
2992
+ ), Me = ({
2986
2993
  variant: e,
2987
2994
  children: t,
2988
2995
  href: s,
2989
2996
  onClick: a,
2990
2997
  ariaLabel: r,
2991
2998
  rootRef: i,
2992
- topRight: o,
2993
- bgClassName: l,
2999
+ topRight: l,
3000
+ bgClassName: o,
2994
3001
  "data-testid": d
2995
3002
  }) => {
2996
- const m = s != null || a != null, g = y(
3003
+ const m = s != null || a != null, g = k(
2997
3004
  gr,
2998
- l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3005
+ o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2999
3006
  // `focus-ring` is a design-system utility from the component-library
3000
3007
  // tailwind preset — outline-none + a black 2px focus-visible ring
3001
3008
  // with offset, so keyboard users can see the focused card.
3002
3009
  m ? "cursor-pointer no-underline focus-ring" : null
3003
- ), u = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
3010
+ ), u = l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3004
3011
  return s ? /* @__PURE__ */ h(
3005
3012
  "a",
3006
3013
  {
@@ -3024,7 +3031,7 @@ const dr = {
3024
3031
  onClick: a,
3025
3032
  "aria-label": r,
3026
3033
  "data-testid": d,
3027
- className: y(g, "text-left"),
3034
+ className: k(g, "text-left"),
3028
3035
  children: [
3029
3036
  t,
3030
3037
  u
@@ -3048,21 +3055,21 @@ const dr = {
3048
3055
  }, pr = {
3049
3056
  dark: "size-16 text-white/25",
3050
3057
  light: "size-16 text-black/25"
3051
- }, Le = (e, t) => !!t && !!e && re(e) === "audio", gn = (e, t) => {
3058
+ }, De = (e, t) => !!t && !!e && re(e) === "audio", bn = (e, t) => {
3052
3059
  if (!t || !e) return !1;
3053
3060
  const s = re(e);
3054
3061
  return s === "video" || s === "audio";
3055
- }, at = "bg-[#F2F3F4]", Ae = ({
3062
+ }, it = "bg-[#F2F3F4]", Re = ({
3056
3063
  variant: e,
3057
3064
  thumbnailUrl: t,
3058
3065
  sourceUrl: s,
3059
3066
  title: a,
3060
3067
  mimeType: r = "image/*",
3061
3068
  topLeft: i,
3062
- topRight: o
3069
+ topRight: l
3063
3070
  }) => {
3064
- const l = re(r), d = !!s && l === "video";
3065
- return Le(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3071
+ const o = re(r), d = !!s && o === "video";
3072
+ return De(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3066
3073
  "audio",
3067
3074
  {
3068
3075
  src: s,
@@ -3074,7 +3081,7 @@ const dr = {
3074
3081
  ) }) : /* @__PURE__ */ h(
3075
3082
  "div",
3076
3083
  {
3077
- className: y(
3084
+ className: k(
3078
3085
  "relative h-[180px] w-full overflow-hidden",
3079
3086
  d && "bg-black"
3080
3087
  ),
@@ -3101,18 +3108,18 @@ const dr = {
3101
3108
  ) : /* @__PURE__ */ n(
3102
3109
  "div",
3103
3110
  {
3104
- className: y(
3111
+ className: k(
3105
3112
  "flex h-full w-full items-center justify-center",
3106
3113
  br[e]
3107
3114
  ),
3108
- children: le(r, {
3115
+ children: ce(r, {
3109
3116
  className: pr[e],
3110
3117
  weight: "regular"
3111
3118
  })
3112
3119
  }
3113
3120
  ),
3114
3121
  i ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-10", children: i }) : null,
3115
- o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null
3122
+ l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null
3116
3123
  ]
3117
3124
  }
3118
3125
  );
@@ -3123,21 +3130,21 @@ const dr = {
3123
3130
  url: a,
3124
3131
  mimeType: r,
3125
3132
  thumbnailUrl: i,
3126
- sourceUrl: o,
3127
- layout: l = "featured",
3133
+ sourceUrl: l,
3134
+ layout: o = "featured",
3128
3135
  appIcon: d,
3129
3136
  cta: m,
3130
3137
  onDismiss: g,
3131
3138
  onEditClick: u
3132
3139
  }) => {
3133
- const f = l === "classic", c = Le(r, o), x = g ? /* @__PURE__ */ n(
3140
+ const f = o === "classic", c = De(r, l), w = g ? /* @__PURE__ */ n(
3134
3141
  "button",
3135
3142
  {
3136
3143
  type: "button",
3137
3144
  onClick: g,
3138
3145
  "aria-label": "Dismiss attachment",
3139
3146
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3140
- children: /* @__PURE__ */ n(Re, { className: "size-3", weight: "bold" })
3147
+ children: /* @__PURE__ */ n(Le, { className: "size-3", weight: "bold" })
3141
3148
  }
3142
3149
  ) : void 0, b = u ? /* @__PURE__ */ n(
3143
3150
  "button",
@@ -3149,36 +3156,36 @@ const dr = {
3149
3156
  children: /* @__PURE__ */ n(Ps, { className: "size-5", weight: "regular" })
3150
3157
  }
3151
3158
  ) : void 0;
3152
- return c ? /* @__PURE__ */ n(Te, { variant: "dark", bgClassName: at, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3159
+ return c ? /* @__PURE__ */ n(Me, { variant: "dark", bgClassName: it, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3153
3160
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3154
- Ae,
3161
+ Re,
3155
3162
  {
3156
3163
  variant: "dark",
3157
- sourceUrl: o,
3164
+ sourceUrl: l,
3158
3165
  title: e,
3159
3166
  mimeType: r
3160
3167
  }
3161
3168
  ) }),
3162
- x && /* @__PURE__ */ n("div", { className: "shrink-0", children: x })
3169
+ w && /* @__PURE__ */ n("div", { className: "shrink-0", children: w })
3163
3170
  ] }) }) : /* @__PURE__ */ h(
3164
- Te,
3171
+ Me,
3165
3172
  {
3166
3173
  variant: "dark",
3167
- topRight: f ? x : void 0,
3174
+ topRight: f ? w : void 0,
3168
3175
  children: [
3169
3176
  !f && /* @__PURE__ */ n(
3170
- Ae,
3177
+ Re,
3171
3178
  {
3172
3179
  variant: "dark",
3173
3180
  thumbnailUrl: i,
3174
- sourceUrl: o,
3181
+ sourceUrl: l,
3175
3182
  title: e,
3176
3183
  mimeType: r,
3177
- topRight: x
3184
+ topRight: w
3178
3185
  }
3179
3186
  ),
3180
3187
  /* @__PURE__ */ n(
3181
- st,
3188
+ rt,
3182
3189
  {
3183
3190
  variant: "dark",
3184
3191
  title: e,
@@ -3200,30 +3207,30 @@ const dr = {
3200
3207
  mimeType: a,
3201
3208
  thumbnailUrl: r,
3202
3209
  sourceUrl: i,
3203
- layout: o = "featured",
3204
- appIcon: l,
3210
+ layout: l = "featured",
3211
+ appIcon: o,
3205
3212
  cta: d,
3206
3213
  onClick: m
3207
3214
  }) => {
3208
- const g = gn(a, i), u = nt(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, x = Le(a, i) ? at : void 0, b = d && m ? {
3215
+ const g = bn(a, i), u = at(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, w = De(a, i) ? it : void 0, b = d && m ? {
3209
3216
  ...d,
3210
3217
  onClick: () => {
3211
- var w;
3212
- m(), (w = d.onClick) == null || w.call(d);
3218
+ var _;
3219
+ m(), (_ = d.onClick) == null || _.call(d);
3213
3220
  }
3214
3221
  } : d;
3215
3222
  return /* @__PURE__ */ h(
3216
- Te,
3223
+ Me,
3217
3224
  {
3218
3225
  variant: "light",
3219
3226
  href: f,
3220
3227
  onClick: c,
3221
3228
  ariaLabel: e ?? "Open attachment preview",
3222
- bgClassName: x,
3229
+ bgClassName: w,
3223
3230
  "data-testid": "link-attachment",
3224
3231
  children: [
3225
- o === "featured" && /* @__PURE__ */ n(
3226
- Ae,
3232
+ l === "featured" && /* @__PURE__ */ n(
3233
+ Re,
3227
3234
  {
3228
3235
  variant: "light",
3229
3236
  thumbnailUrl: r,
@@ -3233,13 +3240,13 @@ const dr = {
3233
3240
  }
3234
3241
  ),
3235
3242
  /* @__PURE__ */ n(
3236
- st,
3243
+ rt,
3237
3244
  {
3238
3245
  variant: "light",
3239
3246
  title: e,
3240
3247
  description: t,
3241
3248
  url: s,
3242
- appIcon: l,
3249
+ appIcon: o,
3243
3250
  cta: b
3244
3251
  }
3245
3252
  )
@@ -3253,33 +3260,33 @@ const dr = {
3253
3260
  url: a,
3254
3261
  mimeType: r,
3255
3262
  thumbnailUrl: i,
3256
- sourceUrl: o,
3257
- layout: l = "featured",
3263
+ sourceUrl: l,
3264
+ layout: o = "featured",
3258
3265
  appIcon: d,
3259
3266
  cta: m,
3260
3267
  onClick: g
3261
3268
  }) => {
3262
- const u = gn(r, o), f = nt(a), c = m == null && f != null && !u ? f : void 0, x = m == null && !u && c != null ? g : void 0;
3269
+ const u = bn(r, l), f = at(a), c = m == null && f != null && !u ? f : void 0, w = m == null && !u && c != null ? g : void 0;
3263
3270
  return /* @__PURE__ */ h(
3264
- Te,
3271
+ Me,
3265
3272
  {
3266
3273
  variant: "dark",
3267
3274
  href: c,
3268
- onClick: x,
3269
- bgClassName: Le(r, o) ? at : void 0,
3275
+ onClick: w,
3276
+ bgClassName: De(r, l) ? it : void 0,
3270
3277
  children: [
3271
- l === "featured" && /* @__PURE__ */ n(
3272
- Ae,
3278
+ o === "featured" && /* @__PURE__ */ n(
3279
+ Re,
3273
3280
  {
3274
3281
  variant: "dark",
3275
3282
  thumbnailUrl: i,
3276
- sourceUrl: o,
3283
+ sourceUrl: l,
3277
3284
  title: e,
3278
3285
  mimeType: r
3279
3286
  }
3280
3287
  ),
3281
3288
  /* @__PURE__ */ n(
3282
- st,
3289
+ rt,
3283
3290
  {
3284
3291
  variant: "dark",
3285
3292
  title: e,
@@ -3293,7 +3300,7 @@ const dr = {
3293
3300
  ]
3294
3301
  }
3295
3302
  );
3296
- }, Ii = {
3303
+ }, Ti = {
3297
3304
  Composer: vr,
3298
3305
  Sent: wr,
3299
3306
  Received: xr
@@ -3319,22 +3326,22 @@ const dr = {
3319
3326
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
3320
3327
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
3321
3328
  }
3322
- }, _e = ({
3329
+ }, ye = ({
3323
3330
  variant: e,
3324
3331
  text: t,
3325
3332
  bordered: s = !0,
3326
3333
  groupPosition: a = "single",
3327
3334
  className: r,
3328
3335
  children: i,
3329
- "data-testid": o
3336
+ "data-testid": l
3330
3337
  }) => {
3331
- const l = t != null && t !== "", d = kr[Cr(e)][a];
3338
+ const o = t != null && t !== "", d = kr[Cr(e)][a];
3332
3339
  return /* @__PURE__ */ h(
3333
3340
  "div",
3334
3341
  {
3335
- "data-testid": o,
3342
+ "data-testid": l,
3336
3343
  "data-group-position": a,
3337
- className: y(
3344
+ className: k(
3338
3345
  // 280px-wide bubble — matches the mobile chat attachment width
3339
3346
  // and keeps the document / image / audio bubbles visually
3340
3347
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3351,10 +3358,10 @@ const dr = {
3351
3358
  ),
3352
3359
  children: [
3353
3360
  i,
3354
- l ? /* @__PURE__ */ n(
3361
+ o ? /* @__PURE__ */ n(
3355
3362
  "p",
3356
3363
  {
3357
- className: y(
3364
+ className: k(
3358
3365
  // No `text-*` / `font-*` overrides here — caption inherits
3359
3366
  // the same font family + size as `.str-chat__message-text`
3360
3367
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3371,7 +3378,7 @@ const dr = {
3371
3378
  ]
3372
3379
  }
3373
3380
  );
3374
- }, Ne = ({
3381
+ }, Ce = ({
3375
3382
  onClick: e,
3376
3383
  variant: t = "overlay",
3377
3384
  ariaLabel: s = "Dismiss attachment"
@@ -3383,13 +3390,13 @@ const dr = {
3383
3390
  a.stopPropagation(), e();
3384
3391
  },
3385
3392
  "aria-label": s,
3386
- className: y(
3393
+ className: k(
3387
3394
  "flex size-6 items-center justify-center rounded-full text-white",
3388
3395
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3389
3396
  ),
3390
- children: /* @__PURE__ */ n(Re, { className: "size-3", weight: "bold" })
3397
+ children: /* @__PURE__ */ n(Le, { className: "size-3", weight: "bold" })
3391
3398
  }
3392
- ), ye = (e) => e === "received" ? "light" : "dark", Ti = ({
3399
+ ), ke = (e) => e === "received" ? "light" : "dark", Ai = ({
3393
3400
  firstOfGroup: e,
3394
3401
  endOfGroup: t,
3395
3402
  groupedByUser: s
@@ -3410,29 +3417,29 @@ const dr = {
3410
3417
  }
3411
3418
  ),
3412
3419
  s ?? null
3413
- ] }), rt = ({
3420
+ ] }), ot = ({
3414
3421
  state: e,
3415
3422
  src: t,
3416
3423
  mimeType: s,
3417
3424
  filename: a,
3418
3425
  items: r,
3419
3426
  text: i,
3420
- groupPosition: o,
3421
- preload: l,
3427
+ groupPosition: l,
3428
+ preload: o,
3422
3429
  onDismiss: d
3423
3430
  }) => {
3424
- const m = ye(e), g = e === "composer" && !!d, u = Er({ src: t, mimeType: s, filename: a, items: r });
3431
+ const m = ke(e), g = e === "composer" && !!d, u = Er({ src: t, mimeType: s, filename: a, items: r });
3425
3432
  if (u.length === 0)
3426
3433
  return null;
3427
- const f = l ?? (u.length > 1 ? "none" : "metadata");
3434
+ const f = o ?? (u.length > 1 ? "none" : "metadata");
3428
3435
  return /* @__PURE__ */ n(
3429
- _e,
3436
+ ye,
3430
3437
  {
3431
3438
  variant: m,
3432
3439
  text: i,
3433
- groupPosition: o,
3440
+ groupPosition: l,
3434
3441
  "data-testid": "audio-attachment",
3435
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, x) => /* @__PURE__ */ n(
3442
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, w) => /* @__PURE__ */ n(
3436
3443
  Sr,
3437
3444
  {
3438
3445
  item: c,
@@ -3440,14 +3447,14 @@ const dr = {
3440
3447
  trailingAction: (
3441
3448
  // Composer only supports a single attachment, so the
3442
3449
  // dismiss control sits on the only player.
3443
- g && x === 0 ? /* @__PURE__ */ n(Ne, { onClick: d, variant: "inline" }) : void 0
3450
+ g && w === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
3444
3451
  )
3445
3452
  },
3446
- `${c.src}-${x}`
3453
+ `${c.src}-${w}`
3447
3454
  )) })
3448
3455
  }
3449
3456
  );
3450
- }, Ir = (e) => /* @__PURE__ */ n(rt, { ...e, state: "composer" }), Tr = (e) => /* @__PURE__ */ n(rt, { ...e, state: "sent" }), Ar = (e) => /* @__PURE__ */ n(rt, { ...e, state: "received" }), Mr = {
3457
+ }, Ir = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Tr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), Ar = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), Mr = {
3451
3458
  Composer: Ir,
3452
3459
  Sent: Tr,
3453
3460
  Received: Ar
@@ -3475,7 +3482,7 @@ function Dr(e, t) {
3475
3482
  }
3476
3483
  if (!e) return;
3477
3484
  if (re(e) === "document") {
3478
- const r = en(e), i = Lr[r];
3485
+ const r = nn(e), i = Lr[r];
3479
3486
  if (i) return i;
3480
3487
  if (e === "application/octet-stream") return;
3481
3488
  }
@@ -3504,26 +3511,26 @@ const Or = {
3504
3511
  }, $r = {
3505
3512
  dark: "text-white/85",
3506
3513
  light: "text-black/85"
3507
- }, bn = ({
3514
+ }, pn = ({
3508
3515
  variant: e,
3509
3516
  filename: t,
3510
3517
  title: s,
3511
3518
  mimeType: a = "application/octet-stream",
3512
3519
  fileSize: r,
3513
3520
  onActivate: i,
3514
- activateLabel: o,
3515
- trailingAction: l
3521
+ activateLabel: l,
3522
+ trailingAction: o
3516
3523
  }) => {
3517
3524
  const d = s ?? t ?? "File", m = Pr(a, t, r), g = /* @__PURE__ */ n(
3518
3525
  "div",
3519
3526
  {
3520
- className: y(
3527
+ className: k(
3521
3528
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3522
3529
  zr[e]
3523
3530
  ),
3524
3531
  "aria-hidden": !0,
3525
- children: le(a, {
3526
- className: y("size-6", $r[e]),
3532
+ children: ce(a, {
3533
+ className: k("size-6", $r[e]),
3527
3534
  weight: "regular"
3528
3535
  })
3529
3536
  }
@@ -3532,7 +3539,7 @@ const Or = {
3532
3539
  m ? /* @__PURE__ */ n(
3533
3540
  "p",
3534
3541
  {
3535
- className: y(
3542
+ className: k(
3536
3543
  "truncate text-xs leading-4",
3537
3544
  Or[e]
3538
3545
  ),
@@ -3544,8 +3551,8 @@ const Or = {
3544
3551
  {
3545
3552
  type: "button",
3546
3553
  onClick: i,
3547
- "aria-label": o,
3548
- className: y(
3554
+ "aria-label": l,
3555
+ className: k(
3549
3556
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3550
3557
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3551
3558
  ),
@@ -3560,16 +3567,16 @@ const Or = {
3560
3567
  ] });
3561
3568
  return /* @__PURE__ */ h("div", { className: "flex items-center gap-3 px-3 py-2", children: [
3562
3569
  f,
3563
- l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
3570
+ o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
3564
3571
  ] });
3565
3572
  };
3566
- async function pn(e, t) {
3573
+ async function vn(e, t) {
3567
3574
  const s = t ?? ne(e);
3568
3575
  try {
3569
3576
  const a = await fetch(e, { mode: "cors" });
3570
3577
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
3571
- const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
3572
- o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
3578
+ const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
3579
+ l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
3573
3580
  } catch {
3574
3581
  if (!window.open(e, "_blank", "noopener,noreferrer")) {
3575
3582
  const r = document.createElement("a");
@@ -3593,7 +3600,7 @@ const Fr = ({
3593
3600
  }) => {
3594
3601
  const i = t.filename ?? ne(t.src);
3595
3602
  return /* @__PURE__ */ n(
3596
- bn,
3603
+ pn,
3597
3604
  {
3598
3605
  variant: e,
3599
3606
  filename: i,
@@ -3605,71 +3612,71 @@ const Fr = ({
3605
3612
  trailingAction: r
3606
3613
  }
3607
3614
  );
3608
- }, it = ({
3615
+ }, lt = ({
3609
3616
  state: e,
3610
3617
  src: t,
3611
3618
  filename: s,
3612
3619
  fileSize: a,
3613
3620
  mimeType: r,
3614
3621
  title: i,
3615
- items: o,
3616
- text: l,
3622
+ items: l,
3623
+ text: o,
3617
3624
  groupPosition: d,
3618
3625
  onClick: m,
3619
3626
  onDismiss: g
3620
3627
  }) => {
3621
- const u = ye(e), f = e === "composer" && !!g, c = Fr({
3628
+ const u = ke(e), f = e === "composer" && !!g, c = Fr({
3622
3629
  src: t,
3623
3630
  filename: s,
3624
3631
  fileSize: a,
3625
3632
  mimeType: r,
3626
3633
  title: i,
3627
- items: o
3628
- }), x = (w) => {
3629
- if ((m == null ? void 0 : m(w)) === !1) return;
3630
- const v = c[w];
3634
+ items: l
3635
+ }), w = (_) => {
3636
+ if ((m == null ? void 0 : m(_)) === !1) return;
3637
+ const v = c[_];
3631
3638
  if (!v) return;
3632
3639
  const p = v.filename ?? ne(v.src);
3633
- pn(v.src, p);
3640
+ vn(v.src, p);
3634
3641
  };
3635
3642
  if (c.length === 0)
3636
3643
  return null;
3637
3644
  const b = /* @__PURE__ */ n(
3638
3645
  "span",
3639
3646
  {
3640
- className: y(
3647
+ className: k(
3641
3648
  "flex size-8 items-center justify-center rounded-full",
3642
3649
  u === "dark" ? "text-white/70" : "text-black/70"
3643
3650
  ),
3644
3651
  "aria-hidden": !0,
3645
- children: /* @__PURE__ */ n(xe, { className: "size-5", weight: "bold" })
3652
+ children: /* @__PURE__ */ n(we, { className: "size-5", weight: "bold" })
3646
3653
  }
3647
3654
  );
3648
3655
  return /* @__PURE__ */ n(
3649
- _e,
3656
+ ye,
3650
3657
  {
3651
3658
  variant: u,
3652
- text: l,
3659
+ text: o,
3653
3660
  groupPosition: d,
3654
3661
  "data-testid": "file-attachment",
3655
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((w, v) => /* @__PURE__ */ n(
3662
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((_, v) => /* @__PURE__ */ n(
3656
3663
  Br,
3657
3664
  {
3658
3665
  variant: u,
3659
- item: w,
3666
+ item: _,
3660
3667
  index: v,
3661
- onActivate: x,
3662
- trailingAction: f && v === 0 ? /* @__PURE__ */ n(Ne, { onClick: g, variant: "inline" }) : b
3668
+ onActivate: w,
3669
+ trailingAction: f && v === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : b
3663
3670
  },
3664
- `${w.src}-${v}`
3671
+ `${_.src}-${v}`
3665
3672
  )) })
3666
3673
  }
3667
3674
  );
3668
- }, Vr = (e) => /* @__PURE__ */ n(it, { ...e, state: "composer" }), Ur = (e) => /* @__PURE__ */ n(it, { ...e, state: "sent" }), jr = (e) => /* @__PURE__ */ n(it, { ...e, state: "received" }), Gr = {
3675
+ }, Vr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Ur = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), jr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), Gr = {
3669
3676
  Composer: Vr,
3670
3677
  Sent: Ur,
3671
3678
  Received: jr
3672
- }, ot = ({
3679
+ }, ct = ({
3673
3680
  onPrev: e,
3674
3681
  onNext: t,
3675
3682
  prevLabel: s = "Previous",
@@ -3692,27 +3699,27 @@ const Fr = ({
3692
3699
  onClick: t,
3693
3700
  "aria-label": a,
3694
3701
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3695
- children: /* @__PURE__ */ n(Ge, { size: 20, weight: "bold", "aria-hidden": !0 })
3702
+ children: /* @__PURE__ */ n(He, { size: 20, weight: "bold", "aria-hidden": !0 })
3696
3703
  }
3697
3704
  )
3698
- ] }), vn = ({
3705
+ ] }), xn = ({
3699
3706
  url: e,
3700
3707
  filename: t,
3701
3708
  variant: s = "pill",
3702
3709
  label: a = "Download",
3703
3710
  iconOnly: r,
3704
3711
  tone: i = "dark",
3705
- onTriggered: o
3712
+ onTriggered: l
3706
3713
  }) => {
3707
- const [l, d] = z(!1), m = Z(
3714
+ const [o, d] = z(!1), m = Z(
3708
3715
  (c) => {
3709
- c.stopPropagation(), !l && (d(!0), pn(e, t).catch(() => {
3716
+ c.stopPropagation(), !o && (d(!0), vn(e, t).catch(() => {
3710
3717
  }).finally(() => {
3711
- d(!1), o == null || o();
3718
+ d(!1), l == null || l();
3712
3719
  }));
3713
3720
  },
3714
- [l, e, t, o]
3715
- ), g = r ?? s !== "pill", f = { className: y(
3721
+ [o, e, t, l]
3722
+ ), g = r ?? s !== "pill", f = { className: k(
3716
3723
  s === "pill" ? "size-4" : "size-5",
3717
3724
  "shrink-0"
3718
3725
  ), weight: "bold" };
@@ -3721,24 +3728,24 @@ const Fr = ({
3721
3728
  {
3722
3729
  type: "button",
3723
3730
  onClick: m,
3724
- disabled: l,
3731
+ disabled: o,
3725
3732
  "aria-label": a,
3726
- className: y(
3733
+ className: k(
3727
3734
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3728
3735
  {
3729
3736
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
3730
3737
  light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
3731
3738
  }[i]
3732
3739
  ),
3733
- children: l ? /* @__PURE__ */ n(
3734
- ve,
3740
+ children: o ? /* @__PURE__ */ n(
3741
+ xe,
3735
3742
  {
3736
3743
  className: "size-4 animate-spin",
3737
3744
  weight: "bold",
3738
3745
  "aria-hidden": !0
3739
3746
  }
3740
3747
  ) : /* @__PURE__ */ n(
3741
- xe,
3748
+ we,
3742
3749
  {
3743
3750
  className: "size-5 shrink-0",
3744
3751
  weight: "bold",
@@ -3751,73 +3758,73 @@ const Fr = ({
3751
3758
  {
3752
3759
  type: "button",
3753
3760
  onClick: m,
3754
- disabled: l,
3761
+ disabled: o,
3755
3762
  "aria-label": a,
3756
3763
  className: "mes-media-viewer__action",
3757
- children: l ? /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(xe, { size: 20, weight: "bold", "aria-hidden": !0 })
3764
+ children: o ? /* @__PURE__ */ n(xe, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(we, { size: 20, weight: "bold", "aria-hidden": !0 })
3758
3765
  }
3759
3766
  ) : /* @__PURE__ */ h(
3760
3767
  "button",
3761
3768
  {
3762
3769
  type: "button",
3763
3770
  onClick: m,
3764
- disabled: l,
3771
+ disabled: o,
3765
3772
  "aria-label": g ? a : void 0,
3766
- className: y(
3773
+ className: k(
3767
3774
  "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",
3768
3775
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3769
3776
  ),
3770
3777
  children: [
3771
- l ? /* @__PURE__ */ n(
3772
- ve,
3778
+ o ? /* @__PURE__ */ n(
3779
+ xe,
3773
3780
  {
3774
3781
  className: "size-4 animate-spin",
3775
3782
  weight: "bold",
3776
3783
  "aria-hidden": !0
3777
3784
  }
3778
- ) : /* @__PURE__ */ n(xe, { ...f, "aria-hidden": !0 }),
3785
+ ) : /* @__PURE__ */ n(we, { ...f, "aria-hidden": !0 }),
3779
3786
  g ? null : a
3780
3787
  ]
3781
3788
  }
3782
3789
  );
3783
- }, Be = (e, t, s) => Math.min(Math.max(e, t), s), lt = ({
3790
+ }, Ve = (e, t, s) => Math.min(Math.max(e, t), s), dt = ({
3784
3791
  length: e,
3785
3792
  initialIndex: t,
3786
3793
  open: s
3787
3794
  }) => {
3788
- const a = Be(t, 0, Math.max(e - 1, 0)), [r, i] = z(a);
3789
- J(() => {
3790
- s && i(Be(t, 0, Math.max(e - 1, 0)));
3791
- }, [s, t, e]), J(() => {
3792
- i((d) => Be(d, 0, Math.max(e - 1, 0)));
3795
+ const a = Ve(t, 0, Math.max(e - 1, 0)), [r, i] = z(a);
3796
+ K(() => {
3797
+ s && i(Ve(t, 0, Math.max(e - 1, 0)));
3798
+ }, [s, t, e]), K(() => {
3799
+ i((d) => Ve(d, 0, Math.max(e - 1, 0)));
3793
3800
  }, [e]);
3794
- const o = Z(() => {
3801
+ const l = Z(() => {
3795
3802
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3796
- }, [e]), l = Z(() => {
3803
+ }, [e]), o = Z(() => {
3797
3804
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3798
3805
  }, [e]);
3799
- return J(() => {
3806
+ return K(() => {
3800
3807
  if (!s || e <= 1) return;
3801
3808
  const d = (m) => {
3802
3809
  if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
3803
3810
  const g = document.activeElement;
3804
- g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
3811
+ g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? l() : o());
3805
3812
  };
3806
3813
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3807
- }, [s, e, o, l]), { index: r, prev: o, next: l };
3808
- }, ct = ({
3814
+ }, [s, e, l, o]), { index: r, prev: l, next: o };
3815
+ }, ut = ({
3809
3816
  open: e,
3810
3817
  onClose: t,
3811
3818
  ariaLabel: s,
3812
3819
  counter: a,
3813
3820
  actions: r,
3814
3821
  children: i,
3815
- "data-testid": o
3822
+ "data-testid": l
3816
3823
  }) => {
3817
- const l = H(null), d = H(null);
3818
- return J(() => {
3824
+ const o = H(null), d = H(null);
3825
+ return K(() => {
3819
3826
  var f;
3820
- const u = l.current;
3827
+ const u = o.current;
3821
3828
  if (u) {
3822
3829
  if (e) {
3823
3830
  if (!u.open)
@@ -3863,15 +3870,15 @@ const Fr = ({
3863
3870
  /* @__PURE__ */ h(
3864
3871
  "dialog",
3865
3872
  {
3866
- ref: l,
3873
+ ref: o,
3867
3874
  className: "mes-media-viewer",
3868
3875
  "aria-label": s ?? "Attachment viewer",
3869
- "data-testid": o,
3876
+ "data-testid": l,
3870
3877
  onClose: () => {
3871
3878
  t();
3872
3879
  },
3873
3880
  onClick: (u) => {
3874
- u.target === l.current && t();
3881
+ u.target === o.current && t();
3875
3882
  },
3876
3883
  children: [
3877
3884
  /* @__PURE__ */ h("div", { className: "mes-media-viewer__chrome", children: [
@@ -3886,7 +3893,7 @@ const Fr = ({
3886
3893
  onClick: t,
3887
3894
  "aria-label": "Close viewer",
3888
3895
  className: "mes-media-viewer__action",
3889
- children: /* @__PURE__ */ n(Re, { size: 20, weight: "bold", "aria-hidden": !0 })
3896
+ children: /* @__PURE__ */ n(Le, { size: 20, weight: "bold", "aria-hidden": !0 })
3890
3897
  }
3891
3898
  )
3892
3899
  ] })
@@ -3895,31 +3902,31 @@ const Fr = ({
3895
3902
  ]
3896
3903
  }
3897
3904
  );
3898
- }, xn = ({
3905
+ }, wn = ({
3899
3906
  open: e,
3900
3907
  items: t,
3901
3908
  initialIndex: s = 0,
3902
3909
  onClose: a
3903
3910
  }) => {
3904
- const { index: r, prev: i, next: o } = lt({
3911
+ const { index: r, prev: i, next: l } = dt({
3905
3912
  length: t.length,
3906
3913
  initialIndex: s,
3907
3914
  open: e
3908
- }), l = t[r], d = se(
3909
- () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "image"),
3910
- [l]
3915
+ }), o = t[r], d = se(
3916
+ () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "image"),
3917
+ [o]
3911
3918
  );
3912
- return l ? /* @__PURE__ */ h(
3913
- ct,
3919
+ return o ? /* @__PURE__ */ h(
3920
+ ut,
3914
3921
  {
3915
3922
  open: e,
3916
3923
  onClose: a,
3917
3924
  ariaLabel: d,
3918
3925
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
3919
3926
  actions: /* @__PURE__ */ n(
3920
- vn,
3927
+ xn,
3921
3928
  {
3922
- url: l.src,
3929
+ url: o.src,
3923
3930
  filename: d,
3924
3931
  variant: "viewer",
3925
3932
  label: `Download ${d}`
@@ -3930,20 +3937,20 @@ const Fr = ({
3930
3937
  /* @__PURE__ */ n(
3931
3938
  "img",
3932
3939
  {
3933
- src: l.src,
3934
- alt: l.alt ?? d,
3940
+ src: o.src,
3941
+ alt: o.alt ?? d,
3935
3942
  draggable: !1,
3936
3943
  loading: "eager",
3937
3944
  decoding: "async",
3938
3945
  className: "mes-media-viewer__image"
3939
3946
  },
3940
- `${r}:${l.src}`
3947
+ `${r}:${o.src}`
3941
3948
  ),
3942
3949
  t.length > 1 ? /* @__PURE__ */ n(
3943
- ot,
3950
+ ct,
3944
3951
  {
3945
3952
  onPrev: i,
3946
- onNext: o,
3953
+ onNext: l,
3947
3954
  prevLabel: "Previous image",
3948
3955
  nextLabel: "Next image"
3949
3956
  }
@@ -3951,7 +3958,7 @@ const Fr = ({
3951
3958
  ]
3952
3959
  }
3953
3960
  ) : null;
3954
- }, 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", wn = ({
3961
+ }, 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", _n = ({
3955
3962
  tiles: e,
3956
3963
  onTileActivate: t,
3957
3964
  maxVisible: s = 4,
@@ -3959,15 +3966,15 @@ const Fr = ({
3959
3966
  }) => {
3960
3967
  const r = e.length;
3961
3968
  if (r === 0) return null;
3962
- const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
3963
- const u = y(Hr, "h-full w-full");
3969
+ const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, m, g) => {
3970
+ const u = k(Hr, "h-full w-full");
3964
3971
  return t ? /* @__PURE__ */ h(
3965
3972
  "button",
3966
3973
  {
3967
3974
  type: "button",
3968
3975
  onClick: () => t(m),
3969
3976
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3970
- className: y(u, "cursor-zoom-in"),
3977
+ className: k(u, "cursor-zoom-in"),
3971
3978
  children: [
3972
3979
  d.content,
3973
3980
  g
@@ -3979,56 +3986,56 @@ const Fr = ({
3979
3986
  g
3980
3987
  ] }, m);
3981
3988
  };
3982
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3989
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: o(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3983
3990
  "div",
3984
3991
  {
3985
- className: y(
3992
+ className: k(
3986
3993
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3987
3994
  a
3988
3995
  ),
3989
- children: i.map((d, m) => l(d, m))
3996
+ children: i.map((d, m) => o(d, m))
3990
3997
  }
3991
3998
  ) : i.length === 3 ? /* @__PURE__ */ h(
3992
3999
  "div",
3993
4000
  {
3994
- className: y(
4001
+ className: k(
3995
4002
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3996
4003
  a
3997
4004
  ),
3998
4005
  children: [
3999
- /* @__PURE__ */ n("div", { className: "row-span-2", children: l(i[0], 0) }),
4000
- l(i[1], 1),
4001
- l(i[2], 2)
4006
+ /* @__PURE__ */ n("div", { className: "row-span-2", children: o(i[0], 0) }),
4007
+ o(i[1], 1),
4008
+ o(i[2], 2)
4002
4009
  ]
4003
4010
  }
4004
4011
  ) : /* @__PURE__ */ n(
4005
4012
  "div",
4006
4013
  {
4007
- className: y(
4014
+ className: k(
4008
4015
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4009
4016
  a
4010
4017
  ),
4011
4018
  children: i.map((d, m) => {
4012
- const g = o > 0 && m === i.length - 1;
4013
- return l(
4019
+ const g = l > 0 && m === i.length - 1;
4020
+ return o(
4014
4021
  d,
4015
4022
  m,
4016
4023
  g ? /* @__PURE__ */ h("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
4017
4024
  "+",
4018
- o
4025
+ l
4019
4026
  ] }) : null
4020
4027
  );
4021
4028
  })
4022
4029
  }
4023
4030
  );
4024
- }, Ce = (e) => {
4031
+ }, Ee = (e) => {
4025
4032
  const [t, s] = z(!1), [a, r] = z(0), i = Z(
4026
- (l) => {
4027
- (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
4033
+ (o) => {
4034
+ (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
4028
4035
  },
4029
4036
  [e]
4030
- ), o = Z(() => s(!1), []);
4031
- return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
4037
+ ), l = Z(() => s(!1), []);
4038
+ return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
4032
4039
  }, Yr = (e, t, s, a) => ({
4033
4040
  ariaLabel: `Open image ${t + 1} of ${s}`,
4034
4041
  content: /* @__PURE__ */ n(
@@ -4048,12 +4055,12 @@ const Fr = ({
4048
4055
  src: e,
4049
4056
  alt: t,
4050
4057
  items: s
4051
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], _n = (e, t) => e.map((s, a) => ({
4058
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Nn = (e, t) => e.map((s, a) => ({
4052
4059
  src: s.src,
4053
4060
  alt: s.alt,
4054
4061
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4055
4062
  })), Wr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4056
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ce(
4063
+ const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = Ee(
4057
4064
  r
4058
4065
  );
4059
4066
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4077,58 +4084,58 @@ const Fr = ({
4077
4084
  )
4078
4085
  }
4079
4086
  ),
4080
- i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ne, { onClick: i }) }) : null,
4087
+ i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: i }) }) : null,
4081
4088
  /* @__PURE__ */ n(
4082
- xn,
4089
+ wn,
4083
4090
  {
4084
- open: o,
4085
- items: _n([{ src: e, alt: t }], s),
4086
- initialIndex: l,
4091
+ open: l,
4092
+ items: Nn([{ src: e, alt: t }], s),
4093
+ initialIndex: o,
4087
4094
  onClose: m
4088
4095
  }
4089
4096
  )
4090
4097
  ] });
4091
- }, Nn = ({
4098
+ }, yn = ({
4092
4099
  state: e,
4093
4100
  src: t,
4094
4101
  alt: s,
4095
4102
  filename: a,
4096
4103
  items: r,
4097
4104
  text: i,
4098
- groupPosition: o,
4099
- loading: l = "lazy",
4105
+ groupPosition: l,
4106
+ loading: o = "lazy",
4100
4107
  onClick: d
4101
4108
  }) => {
4102
- const m = qr({ src: t, alt: s, items: r }), g = ye(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: x } = Ce(
4109
+ const m = qr({ src: t, alt: s, items: r }), g = ke(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: w } = Ee(
4103
4110
  d
4104
4111
  );
4105
4112
  if (m.length === 0)
4106
4113
  return null;
4107
4114
  const b = m.map(
4108
- (w, v) => Yr(w, v, m.length, l)
4115
+ (_, v) => Yr(_, v, m.length, o)
4109
4116
  );
4110
4117
  return /* @__PURE__ */ h(
4111
- _e,
4118
+ ye,
4112
4119
  {
4113
4120
  variant: g,
4114
4121
  text: i,
4115
- groupPosition: o,
4122
+ groupPosition: l,
4116
4123
  "data-testid": "image-attachment",
4117
4124
  children: [
4118
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(wn, { tiles: b, onTileActivate: c }) }),
4125
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(_n, { tiles: b, onTileActivate: c }) }),
4119
4126
  /* @__PURE__ */ n(
4120
- xn,
4127
+ wn,
4121
4128
  {
4122
4129
  open: u,
4123
- items: _n(m, a),
4130
+ items: Nn(m, a),
4124
4131
  initialIndex: f,
4125
- onClose: x
4132
+ onClose: w
4126
4133
  }
4127
4134
  )
4128
4135
  ]
4129
4136
  }
4130
4137
  );
4131
- }, Xr = (e) => /* @__PURE__ */ n(Wr, { ...e }), Kr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "sent" }), Jr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "received" }), Zr = {
4138
+ }, Xr = (e) => /* @__PURE__ */ n(Wr, { ...e }), Kr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "sent" }), Jr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "received" }), Zr = {
4132
4139
  Composer: Xr,
4133
4140
  Sent: Kr,
4134
4141
  Received: Jr
@@ -4138,19 +4145,19 @@ const Fr = ({
4138
4145
  initialIndex: s = 0,
4139
4146
  onClose: a
4140
4147
  }) => {
4141
- const { index: r, prev: i, next: o } = lt({
4148
+ const { index: r, prev: i, next: l } = dt({
4142
4149
  length: t.length,
4143
4150
  initialIndex: s,
4144
4151
  open: e
4145
- }), l = t[r], d = se(
4146
- () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "document"),
4147
- [l]
4152
+ }), o = t[r], d = se(
4153
+ () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "document"),
4154
+ [o]
4148
4155
  ), m = se(
4149
- () => l ? ei(l.src) : void 0,
4150
- [l]
4156
+ () => o ? ei(o.src) : void 0,
4157
+ [o]
4151
4158
  );
4152
- return !l || !m ? null : /* @__PURE__ */ h(
4153
- ct,
4159
+ return !o || !m ? null : /* @__PURE__ */ h(
4160
+ ut,
4154
4161
  {
4155
4162
  open: e,
4156
4163
  onClose: a,
@@ -4166,13 +4173,13 @@ const Fr = ({
4166
4173
  className: "mes-media-viewer__iframe",
4167
4174
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
4168
4175
  },
4169
- `${r}:${l.src}`
4176
+ `${r}:${o.src}`
4170
4177
  ),
4171
4178
  t.length > 1 ? /* @__PURE__ */ n(
4172
- ot,
4179
+ ct,
4173
4180
  {
4174
4181
  onPrev: i,
4175
- onNext: o,
4182
+ onNext: l,
4176
4183
  prevLabel: "Previous document",
4177
4184
  nextLabel: "Next document"
4178
4185
  }
@@ -4198,7 +4205,7 @@ const Fr = ({
4198
4205
  }) => {
4199
4206
  const i = t.filename ?? ne(t.src);
4200
4207
  return /* @__PURE__ */ n(
4201
- bn,
4208
+ pn,
4202
4209
  {
4203
4210
  variant: e,
4204
4211
  filename: i,
@@ -4210,21 +4217,21 @@ const Fr = ({
4210
4217
  trailingAction: r
4211
4218
  }
4212
4219
  );
4213
- }, dt = ({
4220
+ }, mt = ({
4214
4221
  state: e,
4215
4222
  src: t,
4216
4223
  filename: s,
4217
4224
  fileSize: a,
4218
4225
  title: r,
4219
4226
  items: i,
4220
- text: o,
4221
- groupPosition: l,
4227
+ text: l,
4228
+ groupPosition: o,
4222
4229
  onClick: d,
4223
4230
  onDismiss: m
4224
4231
  }) => {
4225
- const g = ye(e), u = ti({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: x, closeViewer: b } = Ce(
4232
+ const g = ke(e), u = ti({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: w, closeViewer: b } = Ee(
4226
4233
  d
4227
- ), w = e === "composer" && !!m;
4234
+ ), _ = e === "composer" && !!m;
4228
4235
  if (u.length === 0)
4229
4236
  return null;
4230
4237
  const v = u.map((p) => ({
@@ -4232,21 +4239,21 @@ const Fr = ({
4232
4239
  filename: p.filename ?? ne(p.src)
4233
4240
  }));
4234
4241
  return /* @__PURE__ */ h(
4235
- _e,
4242
+ ye,
4236
4243
  {
4237
4244
  variant: g,
4238
- text: o,
4239
- groupPosition: l,
4245
+ text: l,
4246
+ groupPosition: o,
4240
4247
  "data-testid": "pdf-attachment",
4241
4248
  children: [
4242
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((p, A) => {
4243
- const R = p.filename ?? ne(p.src), L = w && A === 0 ? /* @__PURE__ */ n(Ne, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4244
- vn,
4249
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((p, I) => {
4250
+ const M = p.filename ?? ne(p.src), R = _ && I === 0 ? /* @__PURE__ */ n(Ce, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4251
+ xn,
4245
4252
  {
4246
4253
  url: p.src,
4247
- filename: R,
4254
+ filename: M,
4248
4255
  variant: "inline",
4249
- label: `Download ${R}`,
4256
+ label: `Download ${M}`,
4250
4257
  tone: g
4251
4258
  }
4252
4259
  );
@@ -4255,11 +4262,11 @@ const Fr = ({
4255
4262
  {
4256
4263
  variant: g,
4257
4264
  item: p,
4258
- index: A,
4259
- onActivate: x,
4260
- trailingAction: L
4265
+ index: I,
4266
+ onActivate: w,
4267
+ trailingAction: R
4261
4268
  },
4262
- `${p.src}-${A}`
4269
+ `${p.src}-${I}`
4263
4270
  );
4264
4271
  }) }),
4265
4272
  /* @__PURE__ */ n(
@@ -4274,26 +4281,26 @@ const Fr = ({
4274
4281
  ]
4275
4282
  }
4276
4283
  );
4277
- }, si = (e) => /* @__PURE__ */ n(dt, { ...e, state: "composer" }), ai = (e) => /* @__PURE__ */ n(dt, { ...e, state: "sent" }), ri = (e) => /* @__PURE__ */ n(dt, { ...e, state: "received" }), ii = {
4284
+ }, si = (e) => /* @__PURE__ */ n(mt, { ...e, state: "composer" }), ai = (e) => /* @__PURE__ */ n(mt, { ...e, state: "sent" }), ri = (e) => /* @__PURE__ */ n(mt, { ...e, state: "received" }), ii = {
4278
4285
  Composer: si,
4279
4286
  Sent: ai,
4280
4287
  Received: ri
4281
- }, yn = ({
4288
+ }, Cn = ({
4282
4289
  open: e,
4283
4290
  items: t,
4284
4291
  initialIndex: s = 0,
4285
4292
  onClose: a
4286
4293
  }) => {
4287
- const { index: r, prev: i, next: o } = lt({
4294
+ const { index: r, prev: i, next: l } = dt({
4288
4295
  length: t.length,
4289
4296
  initialIndex: s,
4290
4297
  open: e
4291
- }), l = t[r], d = se(
4292
- () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "video"),
4293
- [l]
4298
+ }), o = t[r], d = se(
4299
+ () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "video"),
4300
+ [o]
4294
4301
  );
4295
- return l ? /* @__PURE__ */ h(
4296
- ct,
4302
+ return o ? /* @__PURE__ */ h(
4303
+ ut,
4297
4304
  {
4298
4305
  open: e,
4299
4306
  onClose: a,
@@ -4304,23 +4311,23 @@ const Fr = ({
4304
4311
  /* @__PURE__ */ n(
4305
4312
  "video",
4306
4313
  {
4307
- src: l.src,
4308
- poster: l.poster,
4314
+ src: o.src,
4315
+ poster: o.poster,
4309
4316
  controls: !0,
4310
4317
  autoPlay: !0,
4311
4318
  muted: !0,
4312
4319
  playsInline: !0,
4313
- preload: l.preload ?? "metadata",
4320
+ preload: o.preload ?? "metadata",
4314
4321
  className: "mes-media-viewer__video",
4315
- children: l.mimeType ? /* @__PURE__ */ n("source", { src: l.src, type: l.mimeType }) : null
4322
+ children: o.mimeType ? /* @__PURE__ */ n("source", { src: o.src, type: o.mimeType }) : null
4316
4323
  },
4317
- `${r}:${l.src}`
4324
+ `${r}:${o.src}`
4318
4325
  ),
4319
4326
  t.length > 1 ? /* @__PURE__ */ n(
4320
- ot,
4327
+ ct,
4321
4328
  {
4322
4329
  onPrev: i,
4323
- onNext: o,
4330
+ onNext: l,
4324
4331
  prevLabel: "Previous video",
4325
4332
  nextLabel: "Next video"
4326
4333
  }
@@ -4328,7 +4335,7 @@ const Fr = ({
4328
4335
  ]
4329
4336
  }
4330
4337
  ) : null;
4331
- }, 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 }) }) }), Cn = ({
4338
+ }, 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(je, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), kn = ({
4332
4339
  item: e,
4333
4340
  index: t
4334
4341
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4343,7 +4350,7 @@ const Fr = ({
4343
4350
  className: "absolute inset-0 size-full rounded-md object-cover"
4344
4351
  }
4345
4352
  ) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
4346
- Yt,
4353
+ Wt,
4347
4354
  {
4348
4355
  className: "size-16 rounded-md text-white/30",
4349
4356
  weight: "regular",
@@ -4353,21 +4360,21 @@ const Fr = ({
4353
4360
  /* @__PURE__ */ n(oi, {})
4354
4361
  ] }), li = (e, t, s) => ({
4355
4362
  ariaLabel: `Play video ${t + 1} of ${s}`,
4356
- content: /* @__PURE__ */ n(Cn, { item: e, index: t })
4363
+ content: /* @__PURE__ */ n(kn, { item: e, index: t })
4357
4364
  }), ci = ({
4358
4365
  src: e,
4359
4366
  poster: t,
4360
4367
  mimeType: s,
4361
4368
  preload: a,
4362
4369
  items: r
4363
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], kn = (e, t) => e.map((s, a) => ({
4370
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], En = (e, t) => e.map((s, a) => ({
4364
4371
  src: s.src,
4365
4372
  poster: s.poster,
4366
4373
  mimeType: s.mimeType,
4367
4374
  preload: s.preload,
4368
4375
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4369
- })), di = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4370
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = Ce(
4376
+ })), di = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
4377
+ const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: g } = Ee(
4371
4378
  i
4372
4379
  );
4373
4380
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4378,15 +4385,15 @@ const Fr = ({
4378
4385
  onClick: () => m(0),
4379
4386
  "aria-label": "Play video",
4380
4387
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
4381
- children: /* @__PURE__ */ n(Cn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4388
+ children: /* @__PURE__ */ n(kn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4382
4389
  }
4383
4390
  ),
4384
- o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ne, { onClick: o }) }) : null,
4391
+ l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: l }) }) : null,
4385
4392
  /* @__PURE__ */ n(
4386
- yn,
4393
+ Cn,
4387
4394
  {
4388
- open: l,
4389
- items: kn(
4395
+ open: o,
4396
+ items: En(
4390
4397
  [{ src: e, poster: t, mimeType: s, preload: r }],
4391
4398
  a
4392
4399
  ),
@@ -4395,47 +4402,47 @@ const Fr = ({
4395
4402
  }
4396
4403
  )
4397
4404
  ] });
4398
- }, En = ({
4405
+ }, Sn = ({
4399
4406
  state: e,
4400
4407
  src: t,
4401
4408
  poster: s,
4402
4409
  mimeType: a,
4403
4410
  filename: r,
4404
4411
  items: i,
4405
- text: o,
4406
- groupPosition: l,
4412
+ text: l,
4413
+ groupPosition: o,
4407
4414
  preload: d,
4408
4415
  onClick: m
4409
4416
  }) => {
4410
- const g = ci({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = ye(e), { viewerOpen: f, viewerIndex: c, handleActivate: x, closeViewer: b } = Ce(
4417
+ const g = ci({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = ke(e), { viewerOpen: f, viewerIndex: c, handleActivate: w, closeViewer: b } = Ee(
4411
4418
  m
4412
4419
  );
4413
4420
  if (g.length === 0)
4414
4421
  return null;
4415
- const w = g.map(
4422
+ const _ = g.map(
4416
4423
  (v, p) => li(v, p, g.length)
4417
4424
  );
4418
4425
  return /* @__PURE__ */ h(
4419
- _e,
4426
+ ye,
4420
4427
  {
4421
4428
  variant: u,
4422
- text: o,
4423
- groupPosition: l,
4429
+ text: l,
4430
+ groupPosition: o,
4424
4431
  "data-testid": "video-attachment",
4425
4432
  children: [
4426
4433
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4427
- wn,
4434
+ _n,
4428
4435
  {
4429
- tiles: w,
4430
- onTileActivate: x,
4436
+ tiles: _,
4437
+ onTileActivate: w,
4431
4438
  className: "overflow-hidden rounded-md"
4432
4439
  }
4433
4440
  ) }),
4434
4441
  /* @__PURE__ */ n(
4435
- yn,
4442
+ Cn,
4436
4443
  {
4437
4444
  open: f,
4438
- items: kn(g, r),
4445
+ items: En(g, r),
4439
4446
  initialIndex: c,
4440
4447
  onClose: b
4441
4448
  }
@@ -4443,11 +4450,11 @@ const Fr = ({
4443
4450
  ]
4444
4451
  }
4445
4452
  );
4446
- }, ui = (e) => /* @__PURE__ */ n(di, { ...e }), mi = (e) => /* @__PURE__ */ n(En, { ...e, state: "sent" }), hi = (e) => /* @__PURE__ */ n(En, { ...e, state: "received" }), fi = {
4453
+ }, ui = (e) => /* @__PURE__ */ n(di, { ...e }), mi = (e) => /* @__PURE__ */ n(Sn, { ...e, state: "sent" }), hi = (e) => /* @__PURE__ */ n(Sn, { ...e, state: "received" }), fi = {
4447
4454
  Composer: ui,
4448
4455
  Sent: mi,
4449
4456
  Received: hi
4450
- }, Ai = {
4457
+ }, Mi = {
4451
4458
  Image: Zr,
4452
4459
  Video: fi,
4453
4460
  Audio: Mr,
@@ -4465,7 +4472,7 @@ const Fr = ({
4465
4472
  onClick: t,
4466
4473
  disabled: s,
4467
4474
  style: { backgroundColor: "#E6E5E3" },
4468
- className: y(
4475
+ className: k(
4469
4476
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4470
4477
  {
4471
4478
  "hover:brightness-95 active:brightness-90": !s,
@@ -4475,22 +4482,22 @@ const Fr = ({
4475
4482
  ),
4476
4483
  children: e
4477
4484
  }
4478
- ), Mi = ({
4485
+ ), Ri = ({
4479
4486
  faqs: e,
4480
4487
  onFaqClick: t,
4481
4488
  loadingFaqId: s,
4482
4489
  headerText: a,
4483
4490
  className: r,
4484
4491
  avatarImage: i,
4485
- avatarName: o
4492
+ avatarName: l
4486
4493
  }) => {
4487
- const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4488
- return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4489
- (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4490
- ie,
4494
+ const o = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4495
+ return o.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4496
+ (i || l) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4497
+ oe,
4491
4498
  {
4492
- id: o || "account",
4493
- name: o || "Account",
4499
+ id: l || "account",
4500
+ name: l || "Account",
4494
4501
  image: i,
4495
4502
  size: 24,
4496
4503
  shape: "circle"
@@ -4503,7 +4510,7 @@ const Fr = ({
4503
4510
  style: { backgroundColor: "#F1F0EE" },
4504
4511
  children: [
4505
4512
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4506
- l.map((d) => /* @__PURE__ */ n(
4513
+ o.map((d) => /* @__PURE__ */ n(
4507
4514
  gi,
4508
4515
  {
4509
4516
  question: d.question,
@@ -4518,39 +4525,40 @@ const Fr = ({
4518
4525
  ] }) });
4519
4526
  };
4520
4527
  export {
4521
- tn as A,
4522
- qs as B,
4528
+ sn as A,
4529
+ wa as B,
4523
4530
  Ja as C,
4524
- $s as D,
4525
- Mi as F,
4526
- Ii as L,
4531
+ qs as D,
4532
+ $s as E,
4533
+ Ri as F,
4534
+ Ti as L,
4527
4535
  ki as M,
4528
- be as V,
4529
- ge as a,
4530
- ie as b,
4536
+ pe as V,
4537
+ be as a,
4538
+ oe as b,
4531
4539
  or as c,
4532
- mn as d,
4540
+ hn as d,
4533
4541
  Ei as e,
4534
4542
  gi as f,
4535
4543
  re as g,
4536
- $t as h,
4537
- Ai as i,
4544
+ Bt as h,
4545
+ Mi as i,
4538
4546
  Ea as j,
4539
4547
  Ci as k,
4540
- Si as l,
4548
+ Ii as l,
4541
4549
  Pr as m,
4542
4550
  Rr as n,
4543
4551
  rr as o,
4544
4552
  Dr as p,
4545
- Jt as q,
4546
- le as r,
4547
- an as s,
4553
+ Qt as q,
4554
+ ce as r,
4555
+ on as s,
4548
4556
  Bs as t,
4549
- Ti as u,
4557
+ Ai as u,
4550
4558
  Ws as v,
4551
- et as w,
4552
- tt as x,
4553
- Kt as y,
4554
- wa as z
4559
+ tt as w,
4560
+ nt as x,
4561
+ Zt as y,
4562
+ Si as z
4555
4563
  };
4556
- //# sourceMappingURL=index-BlpDX5fl.js.map
4564
+ //# sourceMappingURL=index-CgczmQkU.js.map