@linktr.ee/messaging-react 3.4.1-rc-1782392885 → 3.4.2-rc-1782395074

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