@linktr.ee/messaging-react 3.5.2 → 3.5.3-rc-1782916568

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 (28) hide show
  1. package/dist/{Card-BvfoMxwz.cjs → Card-BGlzLvjX.cjs} +2 -2
  2. package/dist/{Card-BvfoMxwz.cjs.map → Card-BGlzLvjX.cjs.map} +1 -1
  3. package/dist/{Card-lFj_CszL.cjs → Card-BaMPX4IJ.cjs} +2 -2
  4. package/dist/{Card-lFj_CszL.cjs.map → Card-BaMPX4IJ.cjs.map} +1 -1
  5. package/dist/{Card-BnMjliau.js → Card-CylbFbg9.js} +3 -3
  6. package/dist/{Card-BnMjliau.js.map → Card-CylbFbg9.js.map} +1 -1
  7. package/dist/{Card-CSEdL1ew.js → Card-DjQ0O0ve.js} +2 -2
  8. package/dist/{Card-CSEdL1ew.js.map → Card-DjQ0O0ve.js.map} +1 -1
  9. package/dist/{Card-CVk576_V.js → Card-R_TPCRto.js} +2 -2
  10. package/dist/{Card-CVk576_V.js.map → Card-R_TPCRto.js.map} +1 -1
  11. package/dist/{Card-DLG18fjt.cjs → Card-dRbnFA_A.cjs} +2 -2
  12. package/dist/{Card-DLG18fjt.cjs.map → Card-dRbnFA_A.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-C1KdYxd0.cjs → LockedThumbnail-C5ahPvA3.cjs} +2 -2
  14. package/dist/{LockedThumbnail-C1KdYxd0.cjs.map → LockedThumbnail-C5ahPvA3.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-0k5MyzJ7.js → LockedThumbnail-CCQ4wzdn.js} +2 -2
  16. package/dist/{LockedThumbnail-0k5MyzJ7.js.map → LockedThumbnail-CCQ4wzdn.js.map} +1 -1
  17. package/dist/{index-DxuG__WG.js → index-BOzklqIY.js} +310 -310
  18. package/dist/index-BOzklqIY.js.map +1 -0
  19. package/dist/index-BYS-61iP.cjs +2 -0
  20. package/dist/index-BYS-61iP.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/Avatar/Avatar.test.tsx +26 -0
  25. package/src/components/Avatar/index.tsx +9 -8
  26. package/dist/index-DxuG__WG.js.map +0 -1
  27. package/dist/index-Suw7bhfA.cjs +0 -2
  28. package/dist/index-Suw7bhfA.cjs.map +0 -1
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
2
  import F, { createContext as Xe, useContext as ye, useCallback as W, useState as $, useRef as H, useEffect as q, useId as Sn, useMemo as re, Suspense as Ke } from "react";
3
3
  import { StreamChatService as Tn } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as An, LinkPreviewsManager as Dt } from "stream-chat";
5
- import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as de, useChatContext as ue, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as Ht, Attachment as Pn, EditMessageModal as zn, MessageBlocked as On, MessageBouncePrompt as $n, MessageDeleted as Fn, MessageIsThreadReplyInChannelButtonIndicator as Bn, MessageRepliesCountButton as Un, ReminderNotification as jn, StreamedMessageText as Vn, messageHasAttachments as Gn, messageHasReactions as Hn, isDateSeparatorMessage as Yn, isMessageBlocked as qn, isMessageBounced as Wn, MessageBounceModal as Xn, MessageText as Pt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as ke, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Fe, AIStates as Be, useTypingContext as is, useAIState as ls, Channel as os, WithComponents as cs, Window as ds, MessageList as us, ChannelList as ms, InfiniteScroll as hs } from "stream-chat-react";
5
+ import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as de, useChatContext as ue, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as Ht, Attachment as Pn, EditMessageModal as zn, MessageBlocked as On, MessageBouncePrompt as $n, MessageDeleted as Fn, MessageIsThreadReplyInChannelButtonIndicator as Bn, MessageRepliesCountButton as Un, ReminderNotification as jn, StreamedMessageText as Vn, messageHasAttachments as Gn, messageHasReactions as Hn, isDateSeparatorMessage as Yn, isMessageBlocked as qn, isMessageBounced as Wn, MessageBounceModal as Xn, MessageText as Pt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as ke, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Fe, AIStates as Be, useTypingContext as is, useAIState as os, Channel as ls, WithComponents as cs, Window as ds, MessageList as us, ChannelList as ms, InfiniteScroll as hs } from "stream-chat-react";
6
6
  import { StarIcon as He, DotsThreeIcon as fs, SpinnerGapIcon as Ae, SignOutIcon as gs, ProhibitInsetIcon as zt, FlagIcon as Yt, FileIcon as qt, ImageIcon as ps, SpeakerHighIcon as bs, VideoCameraIcon as Wt, FileMdIcon as vs, FileTextIcon as xs, FileZipIcon as ws, FilePptIcon as Ns, FileCsvIcon as _s, FileXlsIcon as ys, FileDocIcon as ks, FilePdfIcon as Cs, CircleNotchIcon as Ne, PlayIcon as Ye, PauseIcon as Es, LinkIcon as Is, DownloadSimpleIcon as _e, GiftIcon as Ss, ThumbsUpIcon as Ts, ThumbsDownIcon as As, TrashSimpleIcon as Ms, XIcon as ze, ArrowUpIcon as Rs, SparkleIcon as ve, ProhibitIcon as Ls, ArrowLeftIcon as Ot, CaretRightIcon as xe, PencilSimpleIcon as Ds, CaretLeftIcon as Ps } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
8
  import { MessageActions as zs, DefaultDropdownActionButton as Xt } from "stream-chat-react/experimental";
@@ -25,19 +25,19 @@ const Kt = Xe({
25
25
  debug: i = !1
26
26
  }) => {
27
27
  var A, E;
28
- const l = W(
28
+ const o = W(
29
29
  (y, ...I) => {
30
30
  i && console.log(`🔥 [MessagingProvider] ${y}`, ...I);
31
31
  },
32
32
  [i]
33
33
  );
34
- l("🔄 RENDER START", {
34
+ o("🔄 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 [o, d] = $(null), [u, g] = $(null), [m, f] = $(!1), [c, b] = $(!1), [w, v] = $(null), p = H(!1), N = H(null), _ = H(s);
40
+ const [l, d] = $(null), [u, g] = $(null), [m, f] = $(!1), [c, b] = $(!1), [w, v] = $(null), p = H(!1), N = H(null), _ = H(s);
41
41
  _.current = s;
42
42
  const T = H(i);
43
43
  T.current = i;
@@ -47,7 +47,7 @@ const Kt = Xe({
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
49
  }), M = H(0);
50
- M.current++, l("📊 RENDER INFO", {
50
+ M.current++, o("📊 RENDER INFO", {
51
51
  renderCount: M.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
@@ -68,13 +68,13 @@ const Kt = Xe({
68
68
  q(() => {
69
69
  const y = M.current, I = _.current;
70
70
  if (!a || !D || !I) {
71
- l("⚠️ SERVICE INIT SKIPPED", {
71
+ o("⚠️ SERVICE INIT SKIPPED", {
72
72
  renderCount: y,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
- l("🚀 CREATING SERVICE", {
77
+ o("🚀 CREATING SERVICE", {
78
78
  renderCount: y,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
@@ -84,7 +84,7 @@ const Kt = Xe({
84
84
  debug: T.current,
85
85
  client: D
86
86
  });
87
- N.current = O, d(O), l("✅ SERVICE SET", {
87
+ N.current = O, d(O), o("✅ SERVICE SET", {
88
88
  renderCount: y,
89
89
  serviceInstance: !!O
90
90
  });
@@ -92,51 +92,51 @@ const Kt = Xe({
92
92
  const B = H(null);
93
93
  q(() => {
94
94
  var I, O;
95
- if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
- hasService: !!o,
95
+ if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
+ hasService: !!l,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
99
  isConnecting: p.current,
100
100
  isConnected: m,
101
- dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
102
- }), !o || !t) {
103
- l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
101
+ dependencies: { service: !!l, userId: t == null ? void 0 : t.id }
102
+ }), !l || !t) {
103
+ o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
106
  if (p.current) {
107
- l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
107
+ o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((I = B.current) == null ? void 0 : I.serviceId) === o && ((O = B.current) == null ? void 0 : O.userId) === t.id) {
111
- l(
110
+ if (((I = B.current) == null ? void 0 : I.serviceId) === l && ((O = B.current) == null ? void 0 : O.userId) === t.id) {
111
+ o(
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
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), v(null);
118
+ o("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), v(null);
119
119
  try {
120
- l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const z = await o.connectUser(t);
122
- g(z), f(!0), B.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
120
+ o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
+ const z = await l.connectUser(t);
122
+ g(z), f(!0), B.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
124
  clientId: z.userID
125
125
  });
126
126
  } catch (z) {
127
127
  const U = z instanceof Error ? z.message : "Connection failed";
128
- v(U), l("❌ USER CONNECTION ERROR", {
128
+ v(U), o("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: U
131
131
  });
132
132
  } finally {
133
- b(!1), p.current = !1, l("🔄 USER CONNECTION FINISHED", {
133
+ b(!1), p.current = !1, o("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: m
136
136
  });
137
137
  }
138
138
  })();
139
- }, [o, t, l, m]), q(() => {
139
+ }, [l, t, o, m]), q(() => {
140
140
  const y = D;
141
141
  return () => {
142
142
  var I;
@@ -144,36 +144,36 @@ const Kt = Xe({
144
144
  };
145
145
  }, [D]);
146
146
  const P = W(async () => {
147
- if (l("🔄 REFRESH CONNECTION CALLED", {
148
- hasService: !!o,
147
+ if (o("🔄 REFRESH CONNECTION CALLED", {
148
+ hasService: !!l,
149
149
  hasUser: !!t
150
- }), !o || !t) {
151
- l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
150
+ }), !l || !t) {
151
+ o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
154
+ o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
155
155
  try {
156
- l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
- const y = await o.connectUser(t);
158
- g(y), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
156
+ o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
157
+ const y = await l.connectUser(t);
158
+ g(y), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
159
  } catch (y) {
160
160
  const I = y instanceof Error ? y.message : "Refresh failed";
161
- v(I), l("❌ CONNECTION REFRESH ERROR", {
161
+ v(I), o("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
163
  error: I
164
164
  });
165
165
  } finally {
166
- b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [o, t, l]), C = F.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
- hasService: !!o,
168
+ }, [l, t, o]), C = F.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
+ hasService: !!l,
170
170
  hasClient: !!u,
171
171
  isConnected: m,
172
172
  isLoading: c,
173
173
  hasError: !!w,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
- service: o,
176
+ service: l,
177
177
  client: u,
178
178
  isConnected: m,
179
179
  isLoading: c,
@@ -182,7 +182,7 @@ const Kt = Xe({
182
182
  refreshConnection: P,
183
183
  debug: i
184
184
  }), [
185
- o,
185
+ l,
186
186
  u,
187
187
  m,
188
188
  c,
@@ -190,9 +190,9 @@ const Kt = Xe({
190
190
  r,
191
191
  P,
192
192
  i,
193
- l
193
+ o
194
194
  ]);
195
- return l("🔄 RENDER END", {
195
+ return o("🔄 RENDER END", {
196
196
  renderCount: M.current,
197
197
  willRenderChat: !!D,
198
198
  contextValueReady: !!C
@@ -212,16 +212,16 @@ const Kt = Xe({
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
214
  return q(() => {
215
- var l;
215
+ var o;
216
216
  if (!e) {
217
217
  s(!1);
218
218
  return;
219
219
  }
220
- s(!!((l = e.state.membership) != null && l.pinned_at));
221
- const i = (o) => {
220
+ s(!!((o = e.state.membership) != null && o.pinned_at));
221
+ const i = (l) => {
222
222
  var d;
223
223
  s(
224
- o != null && o.member ? !!o.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
224
+ l != null && l.member ? !!l.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
225
225
  );
226
226
  };
227
227
  return e.on("member.updated", i), () => {
@@ -234,8 +234,8 @@ function Ze(e, t, s) {
234
234
  if (s === $s) {
235
235
  const r = a.find(
236
236
  (i) => {
237
- var l;
238
- return ((l = i.user) == null ? void 0 : l.id) === Fs;
237
+ var o;
238
+ return ((o = i.user) == null ? void 0 : o.id) === Fs;
239
239
  }
240
240
  );
241
241
  if (r) return r;
@@ -305,9 +305,9 @@ const ne = ({
305
305
  className: a,
306
306
  starred: r = !1,
307
307
  shape: i = "squircle",
308
- dmAgentEnabled: l = !1
308
+ dmAgentEnabled: o = !1
309
309
  }) => {
310
- const o = Vs(e), u = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, m = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: m, children: t ? /* @__PURE__ */ n(
310
+ const l = Vs(e), u = s < 20 ? 10 : s < 32 ? 12 : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, m = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: m, children: t ? /* @__PURE__ */ n(
311
311
  "img",
312
312
  {
313
313
  src: t,
@@ -319,10 +319,10 @@ const ne = ({
319
319
  {
320
320
  "aria-hidden": "true",
321
321
  className: k(
322
- "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
323
- u
322
+ "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors"
324
323
  ),
325
- children: o
324
+ style: { fontSize: `${u}px`, lineHeight: 1 },
325
+ children: l
326
326
  }
327
327
  ) });
328
328
  return /* @__PURE__ */ h(
@@ -356,7 +356,7 @@ const ne = ({
356
356
  ),
357
357
  style: {
358
358
  ...m,
359
- ...l && {
359
+ ...o && {
360
360
  borderWidth: `${g}px`,
361
361
  borderStyle: "solid",
362
362
  borderColor: "var(--AI-Gradient, #7F22FE)",
@@ -376,8 +376,8 @@ const ne = ({
376
376
  enabled: a = !0,
377
377
  onLeaveConversation: r,
378
378
  onBlockParticipant: i,
379
- onDeleteConversationClick: l,
380
- onBlockParticipantClick: o,
379
+ onDeleteConversationClick: o,
380
+ onBlockParticipantClick: l,
381
381
  onReportParticipantClick: d,
382
382
  onActionComplete: u,
383
383
  logLabel: g = "useChannelModerationActions"
@@ -415,7 +415,7 @@ const ne = ({
415
415
  handleLeaveConversation: async () => {
416
416
  var E;
417
417
  if (!_) {
418
- l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
418
+ o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
419
419
  try {
420
420
  const y = ((E = e._client) == null ? void 0 : E.userID) ?? null;
421
421
  await e.hide(y, !1), r && await r(e), u == null || u();
@@ -429,7 +429,7 @@ const ne = ({
429
429
  handleBlockUser: async () => {
430
430
  var E, y, I;
431
431
  if (!(R || !m)) {
432
- o == null || o(), f && console.log(`[${g}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
432
+ l == null || l(), f && console.log(`[${g}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
433
433
  try {
434
434
  await m.blockUser((y = t == null ? void 0 : t.user) == null ? void 0 : y.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
435
435
  } catch (O) {
@@ -442,7 +442,7 @@ const ne = ({
442
442
  handleUnblockUser: async () => {
443
443
  var E, y, I;
444
444
  if (!(R || !m)) {
445
- o == null || o(), f && console.log(`[${g}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
445
+ l == null || l(), f && console.log(`[${g}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
446
446
  try {
447
447
  await m.unBlockUser((y = t == null ? void 0 : t.user) == null ? void 0 : y.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
448
448
  } catch (O) {
@@ -480,8 +480,8 @@ const ne = ({
480
480
  showBlockParticipant: a = !0,
481
481
  showReportParticipant: r = !0,
482
482
  onLeaveConversation: i,
483
- onBlockParticipant: l,
484
- onDeleteConversationClick: o,
483
+ onBlockParticipant: o,
484
+ onDeleteConversationClick: l,
485
485
  onBlockParticipantClick: d,
486
486
  onReportParticipantClick: u,
487
487
  customChannelActions: g,
@@ -502,8 +502,8 @@ const ne = ({
502
502
  showBlockParticipant: a,
503
503
  enabled: f,
504
504
  onLeaveConversation: i,
505
- onBlockParticipant: l,
506
- onDeleteConversationClick: o,
505
+ onBlockParticipant: o,
506
+ onDeleteConversationClick: l,
507
507
  onBlockParticipantClick: d,
508
508
  onReportParticipantClick: u,
509
509
  onActionComplete: v,
@@ -638,7 +638,7 @@ function Qt({
638
638
  const s = e == null ? void 0 : e.text, a = Xs(t);
639
639
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
640
640
  }
641
- const Ks = F.lazy(() => import("./Card-CSEdL1ew.js")), Js = F.lazy(() => import("./Card-CVk576_V.js")), Zs = F.lazy(() => import("./Card-BnMjliau.js")), Qe = () => /* @__PURE__ */ n(
641
+ const Ks = F.lazy(() => import("./Card-DjQ0O0ve.js")), Js = F.lazy(() => import("./Card-R_TPCRto.js")), Zs = F.lazy(() => import("./Card-CylbFbg9.js")), Qe = () => /* @__PURE__ */ n(
642
642
  "div",
643
643
  {
644
644
  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)]",
@@ -689,15 +689,15 @@ function ce(e, t) {
689
689
  const ia = (e) => {
690
690
  var t, s;
691
691
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
692
- }, la = ({
692
+ }, oa = ({
693
693
  source: e,
694
694
  mimeType: t,
695
695
  poster: s,
696
696
  autoPlay: a = !1,
697
697
  playing: r,
698
698
  loop: i = !1,
699
- controls: l = !0,
700
- showProgress: o = !1,
699
+ controls: o = !0,
700
+ showProgress: l = !1,
701
701
  muted: d = !1,
702
702
  onContainerClick: u
703
703
  }) => {
@@ -760,7 +760,7 @@ const ia = (e) => {
760
760
  u(x);
761
761
  return;
762
762
  }
763
- L || l && v((S) => !S);
763
+ L || o && v((S) => !S);
764
764
  },
765
765
  onKeyDown: (x) => {
766
766
  if (!(x.key !== "Enter" && x.key !== " ")) {
@@ -768,7 +768,7 @@ const ia = (e) => {
768
768
  u(x);
769
769
  return;
770
770
  }
771
- L || l && v((S) => !S);
771
+ L || o && v((S) => !S);
772
772
  }
773
773
  },
774
774
  children: [
@@ -835,7 +835,7 @@ const ia = (e) => {
835
835
  weight: "bold"
836
836
  }
837
837
  ) }),
838
- L && !l && /* @__PURE__ */ n(
838
+ L && !o && /* @__PURE__ */ n(
839
839
  "div",
840
840
  {
841
841
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -851,7 +851,7 @@ const ia = (e) => {
851
851
  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(Ye, { className: "size-9 translate-x-0.5", weight: "fill" }) })
852
852
  }
853
853
  ),
854
- 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(
854
+ 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(
855
855
  "div",
856
856
  {
857
857
  role: "slider",
@@ -877,7 +877,7 @@ const ia = (e) => {
877
877
  ) })
878
878
  }
879
879
  ) }),
880
- 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: [
880
+ 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: [
881
881
  /* @__PURE__ */ n(
882
882
  "button",
883
883
  {
@@ -937,18 +937,18 @@ const ia = (e) => {
937
937
  ]
938
938
  }
939
939
  );
940
- }, jt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", oa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", sn = ({
940
+ }, jt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", la = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", sn = ({
941
941
  mimeType: e,
942
942
  sourceUrl: t,
943
943
  thumbnailUrl: s,
944
944
  title: a,
945
945
  variant: r,
946
946
  mediaPlayerProps: i,
947
- containedImage: l = !1
947
+ containedImage: o = !1
948
948
  }) => {
949
- const o = ie(e), [d, u] = $(!1);
950
- return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
951
- la,
949
+ const l = ie(e), [d, u] = $(!1);
950
+ return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
951
+ oa,
952
952
  {
953
953
  source: t,
954
954
  mimeType: e,
@@ -956,7 +956,7 @@ const ia = (e) => {
956
956
  controls: !0,
957
957
  ...i
958
958
  }
959
- ) : t && o === "image" ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
959
+ ) : t && l === "image" ? o ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
960
960
  "img",
961
961
  {
962
962
  src: t,
@@ -973,7 +973,7 @@ const ia = (e) => {
973
973
  className: "block w-full",
974
974
  draggable: !1
975
975
  }
976
- ) : t && o === "document" ? s ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
976
+ ) : t && l === "document" ? s ? o ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
977
977
  "img",
978
978
  {
979
979
  src: s,
@@ -999,7 +999,7 @@ const ia = (e) => {
999
999
  weight: "regular"
1000
1000
  })
1001
1001
  }
1002
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${oa(r)}`, children: /* @__PURE__ */ n(
1002
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${la(r)}`, children: /* @__PURE__ */ n(
1003
1003
  "img",
1004
1004
  {
1005
1005
  src: s,
@@ -1024,8 +1024,8 @@ const ia = (e) => {
1024
1024
  placeholderTitle: a = "Attachment title",
1025
1025
  mimeType: r,
1026
1026
  detail: i,
1027
- statusBadge: l,
1028
- action: o,
1027
+ statusBadge: o,
1028
+ action: l,
1029
1029
  topLeft: d,
1030
1030
  topRight: u,
1031
1031
  rootRef: g,
@@ -1075,9 +1075,9 @@ const ia = (e) => {
1075
1075
  children: i
1076
1076
  }
1077
1077
  ),
1078
- l
1078
+ o
1079
1079
  ] }),
1080
- o
1080
+ l
1081
1081
  ] })
1082
1082
  ]
1083
1083
  }
@@ -1105,7 +1105,7 @@ function ha(e) {
1105
1105
  return e ? "text-white/20" : "text-black/20";
1106
1106
  }
1107
1107
  const tt = ({ attachment: e, isMyMessage: t }) => {
1108
- 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, u = /* @__PURE__ */ h(F.Fragment, { children: [
1108
+ 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, u = /* @__PURE__ */ h(F.Fragment, { children: [
1109
1109
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1110
1110
  "img",
1111
1111
  {
@@ -1128,12 +1128,12 @@ const tt = ({ attachment: e, isMyMessage: t }) => {
1128
1128
  ] });
1129
1129
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ n("div", { className: "block", children: u });
1130
1130
  };
1131
- function ln(e) {
1131
+ function on(e) {
1132
1132
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1133
1133
  }
1134
1134
  function nt(e) {
1135
1135
  var t;
1136
- return (t = e.attachments) == null ? void 0 : t.find(ln);
1136
+ return (t = e.attachments) == null ? void 0 : t.find(on);
1137
1137
  }
1138
1138
  async function fa(e, t) {
1139
1139
  let s;
@@ -1144,8 +1144,8 @@ async function fa(e, t) {
1144
1144
  }
1145
1145
  const a = await fetch(e, { mode: "cors" });
1146
1146
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
1147
- const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1148
- l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1147
+ const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1148
+ o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1149
1149
  }
1150
1150
  const ga = ({
1151
1151
  url: e,
@@ -1158,11 +1158,11 @@ const ga = ({
1158
1158
  type: "button",
1159
1159
  onClick: (i) => {
1160
1160
  i.stopPropagation();
1161
- const l = window.open("", "_blank", "noopener,noreferrer");
1161
+ const o = window.open("", "_blank", "noopener,noreferrer");
1162
1162
  a(!0), fa(e, t).then(() => {
1163
- l == null || l.close();
1163
+ o == null || o.close();
1164
1164
  }).catch(() => {
1165
- l && (l.location.href = e);
1165
+ o && (o.location.href = e);
1166
1166
  }).finally(() => a(!1));
1167
1167
  },
1168
1168
  disabled: s,
@@ -1184,18 +1184,18 @@ function st(e) {
1184
1184
  (w) => w.type === "audio" && w.asset_url
1185
1185
  ), r = (b = e.attachments) == null ? void 0 : b.find(
1186
1186
  (w) => w.type === "file" && w.asset_url
1187
- ), 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);
1188
- if (!l) return null;
1189
- 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, u = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
1187
+ ), 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);
1188
+ if (!o) return null;
1189
+ 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, u = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
1190
1190
  return {
1191
- resolvedUrl: l,
1192
- resolvedType: o,
1191
+ resolvedUrl: o,
1192
+ resolvedType: l,
1193
1193
  title: d,
1194
1194
  fileSize: u,
1195
1195
  thumbnailUrl: g
1196
1196
  };
1197
1197
  }
1198
- const on = ({
1198
+ const ln = ({
1199
1199
  resolvedUrl: e,
1200
1200
  resolvedType: t,
1201
1201
  title: s,
@@ -1230,14 +1230,14 @@ const on = ({
1230
1230
  fileSize: a,
1231
1231
  thumbnailUrl: r
1232
1232
  }) => {
1233
- const i = ie(t), l = a !== void 0 ? rn(a) : void 0;
1233
+ const i = ie(t), o = a !== void 0 ? rn(a) : void 0;
1234
1234
  return /* @__PURE__ */ n(
1235
1235
  an,
1236
1236
  {
1237
1237
  variant: "light",
1238
1238
  title: s,
1239
1239
  mimeType: t,
1240
- detail: l,
1240
+ detail: o,
1241
1241
  thumbnail: /* @__PURE__ */ n(
1242
1242
  sn,
1243
1243
  {
@@ -1277,7 +1277,7 @@ const on = ({
1277
1277
  {
1278
1278
  className: "str-chat__message-bubble",
1279
1279
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1280
- children: s ? /* @__PURE__ */ n("div", { className: et(t), children: /* @__PURE__ */ n(tt, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(on, { ...a }) : /* @__PURE__ */ n(cn, { ...a })
1280
+ children: s ? /* @__PURE__ */ n("div", { className: et(t), children: /* @__PURE__ */ n(tt, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(ln, { ...a }) : /* @__PURE__ */ n(cn, { ...a })
1281
1281
  }
1282
1282
  ) })
1283
1283
  }
@@ -1290,7 +1290,7 @@ const on = ({
1290
1290
  if (t)
1291
1291
  return /* @__PURE__ */ n("div", { className: et(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(tt, { attachment: t, isMyMessage: !0 }) });
1292
1292
  const s = st(e);
1293
- return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(on, { ...s }) }) : null;
1293
+ return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ln, { ...s }) }) : null;
1294
1294
  }, va = ({
1295
1295
  message: e
1296
1296
  }) => {
@@ -1361,12 +1361,12 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1361
1361
  /* @__PURE__ */ n("span", { children: b })
1362
1362
  ] });
1363
1363
  }
1364
- const l = s && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
1364
+ const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
1365
1365
  "message-chatbot-indicator",
1366
1366
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1367
- l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1368
- ].join(" "), u = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(_a, { size: l ? 12 : 15 }) });
1369
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ h(se, { children: [
1367
+ o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1368
+ ].join(" "), u = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(_a, { size: o ? 12 : 15 }) });
1369
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
1370
1370
  u,
1371
1371
  g
1372
1372
  ] }) : /* @__PURE__ */ h(se, { children: [
@@ -1414,8 +1414,8 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1414
1414
  editing: a,
1415
1415
  endOfGroup: r,
1416
1416
  firstOfGroup: i,
1417
- groupedByUser: l,
1418
- handleAction: o,
1417
+ groupedByUser: o,
1418
+ handleAction: l,
1419
1419
  handleOpenThread: d,
1420
1420
  handleRetry: u,
1421
1421
  highlighted: g,
@@ -1443,7 +1443,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1443
1443
  ), j = re(() => {
1444
1444
  const pe = c.attachments ?? [], Te = c.shared_location ? [c.shared_location, ...pe] : pe;
1445
1445
  if (!Re(c)) return Te;
1446
- const Rt = Te.filter((Lt) => !("type" in Lt) || !ln(Lt));
1446
+ const Rt = Te.filter((Lt) => !("type" in Lt) || !on(Lt));
1447
1447
  return Rt.length === Te.length ? Te : Rt;
1448
1448
  }, [c]), K = re(() => {
1449
1449
  const pe = Qt({ message: c, viewerLanguage: v });
@@ -1458,7 +1458,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1458
1458
  const ee = !w && !!c.reply_count, me = !w && c.show_in_channel && c.parent_id, he = c.status === "failed" && ((vt = c.error) == null ? void 0 : vt.status) !== 403, fe = Wn(c);
1459
1459
  let J;
1460
1460
  he ? J = () => u(c) : fe && (J = () => D(!0));
1461
- const te = f(), le = k(
1461
+ const te = f(), oe = k(
1462
1462
  "str-chat__message str-chat__message-simple",
1463
1463
  `str-chat__message--${c.type}`,
1464
1464
  `str-chat__message--${c.status}`,
@@ -1473,7 +1473,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1473
1473
  "str-chat__message-with-thread-link": ee || me,
1474
1474
  "str-chat__virtual-message__wrapper--end": r,
1475
1475
  "str-chat__virtual-message__wrapper--first": i,
1476
- "str-chat__virtual-message__wrapper--group": l
1476
+ "str-chat__virtual-message__wrapper--group": o
1477
1477
  }
1478
1478
  ), ft = c.poll_id && p.polls.fromState(c.poll_id), gt = Ea(c), ge = Re(c), pt = Ca(c), $e = !!(j != null && j.length && !c.quoted_message), bt = ge && te && $e;
1479
1479
  return /* @__PURE__ */ h(se, { children: [
@@ -1494,7 +1494,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1494
1494
  /* @__PURE__ */ h(
1495
1495
  "div",
1496
1496
  {
1497
- className: le,
1497
+ className: oe,
1498
1498
  "data-message-id": c.id,
1499
1499
  "data-dd-privacy": "mask",
1500
1500
  children: [
@@ -1586,7 +1586,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1586
1586
  j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
1587
1587
  E,
1588
1588
  {
1589
- actionHandler: o,
1589
+ actionHandler: l,
1590
1590
  attachments: j
1591
1591
  }
1592
1592
  ) : null,
@@ -1706,8 +1706,8 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1706
1706
  "button",
1707
1707
  {
1708
1708
  type: "button",
1709
- onClick: (l) => {
1710
- l.preventDefault(), t(s);
1709
+ onClick: (o) => {
1710
+ o.preventDefault(), t(s);
1711
1711
  },
1712
1712
  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",
1713
1713
  "aria-label": "Close link preview",
@@ -1798,8 +1798,8 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1798
1798
  disabledReason: a,
1799
1799
  composerInput: r
1800
1800
  }) => {
1801
- var o;
1802
- const { channel: i } = de(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
1801
+ var l;
1802
+ const { channel: i } = de(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
1803
1803
  return s ? /* @__PURE__ */ h(se, { children: [
1804
1804
  /* @__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 }),
1805
1805
  t == null ? void 0 : t()
@@ -1807,12 +1807,12 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1807
1807
  /* @__PURE__ */ h(
1808
1808
  "div",
1809
1809
  {
1810
- inert: l ? "" : void 0,
1811
- "aria-disabled": l || void 0,
1810
+ inert: o ? "" : void 0,
1811
+ "aria-disabled": o || void 0,
1812
1812
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1813
1813
  children: [
1814
1814
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1815
- /* @__PURE__ */ n(at.Provider, { value: l, children: /* @__PURE__ */ n(es, { Input: r ?? $a }) })
1815
+ /* @__PURE__ */ n(at.Provider, { value: o, children: /* @__PURE__ */ n(es, { Input: r ?? $a }) })
1816
1816
  ]
1817
1817
  }
1818
1818
  ),
@@ -1948,8 +1948,8 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1948
1948
  Be.ExternalSources
1949
1949
  ]), Ka = ({ threadList: e }) => {
1950
1950
  var b, w;
1951
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = ue(), { typing: i = {} } = is(), { aiState: l } = ls(t), o = ye(mn);
1952
- if (!e && o && Xa.has(l)) {
1951
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = ue(), { typing: i = {} } = is(), { aiState: o } = os(t), l = ye(mn);
1952
+ if (!e && l && Xa.has(o)) {
1953
1953
  const v = Ja(t, (b = r.user) == null ? void 0 : b.id);
1954
1954
  return /* @__PURE__ */ n(
1955
1955
  Gt,
@@ -2087,15 +2087,15 @@ const Za = () => null, Qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2087
2087
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2088
2088
  ] }) }));
2089
2089
  Le.displayName = "LoadingState";
2090
- const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Me = "Replies instantly with AI assistant", er = ({
2090
+ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Me = "Replies instantly with AI assistant", er = ({
2091
2091
  onBack: e,
2092
2092
  showBackButton: t,
2093
2093
  showStarButton: s = !1,
2094
2094
  dmAgentEnabled: a = !1,
2095
2095
  onLeaveConversation: r,
2096
2096
  onBlockParticipant: i,
2097
- showDeleteConversation: l = !0,
2098
- showBlockParticipant: o = !0,
2097
+ showDeleteConversation: o = !0,
2098
+ showBlockParticipant: l = !0,
2099
2099
  showReportParticipant: d = !0,
2100
2100
  onDeleteConversationClick: u,
2101
2101
  onBlockParticipantClick: g,
@@ -2139,7 +2139,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2139
2139
  "button",
2140
2140
  {
2141
2141
  className: k(
2142
- oe,
2142
+ le,
2143
2143
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2144
2144
  ),
2145
2145
  onClick: e || (() => {
@@ -2219,7 +2219,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2219
2219
  s && /* @__PURE__ */ n(
2220
2220
  "button",
2221
2221
  {
2222
- className: oe,
2222
+ className: le,
2223
2223
  onClick: C,
2224
2224
  type: "button",
2225
2225
  "aria-label": M ? "Unstar conversation" : "Star conversation",
@@ -2240,8 +2240,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2240
2240
  {
2241
2241
  channel: p,
2242
2242
  participant: _,
2243
- showDeleteConversation: l,
2244
- showBlockParticipant: o,
2243
+ showDeleteConversation: o,
2244
+ showBlockParticipant: l,
2245
2245
  showReportParticipant: d,
2246
2246
  onLeaveConversation: r,
2247
2247
  onBlockParticipant: i,
@@ -2249,7 +2249,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2249
2249
  onBlockParticipantClick: g,
2250
2250
  onReportParticipantClick: m,
2251
2251
  customChannelActions: f,
2252
- triggerClassName: k(oe, "bg-[#F1F0EE]")
2252
+ triggerClassName: k(le, "bg-[#F1F0EE]")
2253
2253
  }
2254
2254
  ))
2255
2255
  ] })
@@ -2260,7 +2260,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2260
2260
  "button",
2261
2261
  {
2262
2262
  className: k(
2263
- oe,
2263
+ le,
2264
2264
  "messaging-channel-view-back-button-desktop"
2265
2265
  ),
2266
2266
  type: "button",
@@ -2337,7 +2337,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2337
2337
  s && /* @__PURE__ */ n(
2338
2338
  "button",
2339
2339
  {
2340
- className: oe,
2340
+ className: le,
2341
2341
  onClick: C,
2342
2342
  type: "button",
2343
2343
  "aria-label": M ? "Unstar conversation" : "Star conversation",
@@ -2358,8 +2358,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2358
2358
  {
2359
2359
  channel: p,
2360
2360
  participant: _,
2361
- showDeleteConversation: l,
2362
- showBlockParticipant: o,
2361
+ showDeleteConversation: o,
2362
+ showBlockParticipant: l,
2363
2363
  showReportParticipant: d,
2364
2364
  onLeaveConversation: r,
2365
2365
  onBlockParticipant: i,
@@ -2367,7 +2367,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2367
2367
  onBlockParticipantClick: g,
2368
2368
  onReportParticipantClick: m,
2369
2369
  customChannelActions: f,
2370
- triggerClassName: oe
2370
+ triggerClassName: le
2371
2371
  }
2372
2372
  ))
2373
2373
  ] })
@@ -2380,8 +2380,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2380
2380
  renderMessageInputFooter: a,
2381
2381
  renderConversationFooter: r,
2382
2382
  onLeaveConversation: i,
2383
- onBlockParticipant: l,
2384
- showDeleteConversation: o = !0,
2383
+ onBlockParticipant: o,
2384
+ showDeleteConversation: l = !0,
2385
2385
  onDeleteConversationClick: d,
2386
2386
  onBlockParticipantClick: u,
2387
2387
  onReportParticipantClick: g,
@@ -2451,8 +2451,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2451
2451
  showStarButton: w,
2452
2452
  dmAgentEnabled: z,
2453
2453
  onLeaveConversation: i,
2454
- onBlockParticipant: l,
2455
- showDeleteConversation: o,
2454
+ onBlockParticipant: o,
2455
+ showDeleteConversation: l,
2456
2456
  showBlockParticipant: m,
2457
2457
  showReportParticipant: f,
2458
2458
  onDeleteConversationClick: d,
@@ -2498,8 +2498,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2498
2498
  renderMessageInputActions: a,
2499
2499
  renderMessageInputFooter: r,
2500
2500
  renderConversationFooter: i,
2501
- onLeaveConversation: l,
2502
- onBlockParticipant: o,
2501
+ onLeaveConversation: o,
2502
+ onBlockParticipant: l,
2503
2503
  className: d,
2504
2504
  CustomChannelEmptyState: u = Za,
2505
2505
  showDeleteConversation: g = !0,
@@ -2568,7 +2568,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2568
2568
  d
2569
2569
  ),
2570
2570
  children: /* @__PURE__ */ n(mn.Provider, { value: N ?? !1, children: /* @__PURE__ */ n(
2571
- os,
2571
+ ls,
2572
2572
  {
2573
2573
  channel: e,
2574
2574
  MessageSystem: Wa,
@@ -2587,8 +2587,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2587
2587
  renderMessageInputActions: a,
2588
2588
  renderMessageInputFooter: r,
2589
2589
  renderConversationFooter: i,
2590
- onLeaveConversation: l,
2591
- onBlockParticipant: o,
2590
+ onLeaveConversation: o,
2591
+ onBlockParticipant: l,
2592
2592
  CustomChannelEmptyState: u,
2593
2593
  showDeleteConversation: g,
2594
2594
  onDeleteConversationClick: m,
@@ -2641,8 +2641,8 @@ const Ti = ({
2641
2641
  onChannelSelect: a,
2642
2642
  onExitConversation: r,
2643
2643
  initialParticipantFilter: i,
2644
- initialParticipantData: l,
2645
- CustomChannelEmptyState: o,
2644
+ initialParticipantData: o,
2645
+ CustomChannelEmptyState: l,
2646
2646
  onBlockParticipantClick: d,
2647
2647
  onReportParticipantClick: u,
2648
2648
  dmAgentEnabled: g,
@@ -2667,8 +2667,8 @@ const Ti = ({
2667
2667
  refreshConnection: C,
2668
2668
  service: A,
2669
2669
  debug: E
2670
- } = Os(), [y, I] = $(null), [O, z] = $(null), [U, X] = $(!1), { showDeleteConversation: Z = !0 } = e, Y = H(l);
2671
- Y.current = l;
2670
+ } = Os(), [y, I] = $(null), [O, z] = $(null), [U, X] = $(!1), { showDeleteConversation: Z = !0 } = e, Y = H(o);
2671
+ Y.current = o;
2672
2672
  const x = H(a);
2673
2673
  x.current = a;
2674
2674
  const S = H(null), G = H(null);
@@ -2715,19 +2715,19 @@ const Ti = ({
2715
2715
  return;
2716
2716
  }
2717
2717
  try {
2718
- const le = await A.startChannelWithParticipant({
2718
+ const oe = await A.startChannelWithParticipant({
2719
2719
  id: te.id,
2720
2720
  name: te.name,
2721
2721
  phone: te.phone
2722
2722
  });
2723
- I(le), z(null), (fe = x.current) == null || fe.call(x, le), E && console.log(
2723
+ I(oe), z(null), (fe = x.current) == null || fe.call(x, oe), E && console.log(
2724
2724
  "[MessagingShell] Channel created and loaded:",
2725
- le.id
2725
+ oe.id
2726
2726
  );
2727
- } catch (le) {
2727
+ } catch (oe) {
2728
2728
  console.error(
2729
2729
  "[MessagingShell] Failed to create conversation:",
2730
- le
2730
+ oe
2731
2731
  ), ee(), z("Failed to create conversation");
2732
2732
  }
2733
2733
  } catch (J) {
@@ -2759,7 +2759,7 @@ const Ti = ({
2759
2759
  renderChannelBanner: w,
2760
2760
  onLeaveConversation: Q,
2761
2761
  onBlockParticipant: Q,
2762
- CustomChannelEmptyState: o,
2762
+ CustomChannelEmptyState: l,
2763
2763
  showDeleteConversation: Z,
2764
2764
  onBlockParticipantClick: d,
2765
2765
  onReportParticipantClick: u,
@@ -2821,13 +2821,13 @@ const fn = F.createContext({
2821
2821
  selectedChannel: a,
2822
2822
  onChannelSelect: r,
2823
2823
  debug: i,
2824
- channelPreview: l,
2825
- renderMessagePreview: o,
2824
+ channelPreview: o,
2825
+ renderMessagePreview: l,
2826
2826
  viewerLanguage: d
2827
2827
  } = ar(), { client: u } = ue(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = Jt(t);
2828
- if (l)
2828
+ if (o)
2829
2829
  return /* @__PURE__ */ n(
2830
- l,
2830
+ o,
2831
2831
  {
2832
2832
  ...e,
2833
2833
  active: g,
@@ -2865,7 +2865,7 @@ const fn = F.createContext({
2865
2865
  if (C) return C;
2866
2866
  const I = (X = p == null ? void 0 : p.attachments) == null ? void 0 : X[0];
2867
2867
  return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2868
- })(), T = p != null && p.created_at ? ir(new Date(p.created_at)) : "", R = p ? Re(p) : !1, M = o ? o(p, _) : `${R ? "✨ " : ""}${_}`, L = s ?? 0;
2868
+ })(), T = p != null && p.created_at ? ir(new Date(p.created_at)) : "", R = p ? Re(p) : !1, M = l ? l(p, _) : `${R ? "✨ " : ""}${_}`, L = s ?? 0;
2869
2869
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2870
2870
  channelId: t == null ? void 0 : t.id,
2871
2871
  isSelected: g,
@@ -2925,16 +2925,16 @@ const fn = F.createContext({
2925
2925
  }
2926
2926
  );
2927
2927
  gn.displayName = "CustomChannelPreview";
2928
- const lr = { last_message_at: -1 }, or = F.memo(
2928
+ const or = { last_message_at: -1 }, lr = F.memo(
2929
2929
  ({
2930
2930
  onChannelSelect: e,
2931
2931
  selectedChannel: t,
2932
2932
  filters: s,
2933
2933
  allowNewMessagesFromUnfilteredChannels: a = !1,
2934
2934
  channelRenderFilterFn: r,
2935
- sort: i = lr,
2936
- className: l,
2937
- customEmptyStateIndicator: o,
2935
+ sort: i = or,
2936
+ className: o,
2937
+ customEmptyStateIndicator: l,
2938
2938
  channelListPaginator: d = hs,
2939
2939
  channelPreview: u,
2940
2940
  renderMessagePreview: g,
@@ -2978,7 +2978,7 @@ const lr = { last_message_at: -1 }, or = F.memo(
2978
2978
  {
2979
2979
  className: k(
2980
2980
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2981
- l
2981
+ o
2982
2982
  ),
2983
2983
  children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(sr, { value: w, children: /* @__PURE__ */ n(
2984
2984
  ms,
@@ -2990,7 +2990,7 @@ const lr = { last_message_at: -1 }, or = F.memo(
2990
2990
  channelRenderFilterFn: b,
2991
2991
  Paginator: d,
2992
2992
  Preview: gn,
2993
- EmptyStateIndicator: o
2993
+ EmptyStateIndicator: l
2994
2994
  },
2995
2995
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
2996
2996
  ) }) })
@@ -2998,7 +2998,7 @@ const lr = { last_message_at: -1 }, or = F.memo(
2998
2998
  );
2999
2999
  }
3000
3000
  );
3001
- or.displayName = "ChannelList";
3001
+ lr.displayName = "ChannelList";
3002
3002
  const cr = /^([a-z][a-z0-9+.-]*):/i, dr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3003
3003
  function rt(e) {
3004
3004
  if (typeof e != "string") return;
@@ -3057,10 +3057,10 @@ const ur = {
3057
3057
  description: a,
3058
3058
  url: r,
3059
3059
  appIcon: i,
3060
- cta: l,
3061
- trailingAction: o
3060
+ cta: o,
3061
+ trailingAction: l
3062
3062
  }) => {
3063
- const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", g = u.trim() !== "", m = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = l != null;
3063
+ const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", g = u.trim() !== "", m = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
3064
3064
  if (!g && !m && !c && !b) return null;
3065
3065
  const v = k(
3066
3066
  "truncate text-base font-medium leading-6",
@@ -3081,9 +3081,9 @@ const ur = {
3081
3081
  ] }),
3082
3082
  !b && c && /* @__PURE__ */ n("p", { className: p, children: f })
3083
3083
  ] }),
3084
- o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
3084
+ l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
3085
3085
  ] }),
3086
- l && /* @__PURE__ */ n(mr, { variant: e, cta: l })
3086
+ o && /* @__PURE__ */ n(mr, { variant: e, cta: o })
3087
3087
  ] });
3088
3088
  }, pr = k(
3089
3089
  "relative block w-[280px] select-none overflow-hidden rounded-md",
@@ -3099,18 +3099,18 @@ const ur = {
3099
3099
  onClick: a,
3100
3100
  ariaLabel: r,
3101
3101
  rootRef: i,
3102
- topRight: l,
3103
- bgClassName: o,
3102
+ topRight: o,
3103
+ bgClassName: l,
3104
3104
  "data-testid": d
3105
3105
  }) => {
3106
3106
  const u = s != null || a != null, g = k(
3107
3107
  pr,
3108
- o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3108
+ l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3109
3109
  // `focus-ring` is a design-system utility from the component-library
3110
3110
  // tailwind preset — outline-none + a black 2px focus-visible ring
3111
3111
  // with offset, so keyboard users can see the focused card.
3112
3112
  u ? "cursor-pointer no-underline focus-ring" : null
3113
- ), m = l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3113
+ ), m = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
3114
3114
  return s ? /* @__PURE__ */ h(
3115
3115
  "a",
3116
3116
  {
@@ -3162,16 +3162,16 @@ const ur = {
3162
3162
  if (!t || !e) return !1;
3163
3163
  const s = ie(e);
3164
3164
  return s === "video" || s === "audio";
3165
- }, lt = "bg-[#F2F3F4]", Pe = ({
3165
+ }, ot = "bg-[#F2F3F4]", Pe = ({
3166
3166
  variant: e,
3167
3167
  thumbnailUrl: t,
3168
3168
  sourceUrl: s,
3169
3169
  title: a,
3170
3170
  mimeType: r = "image/*",
3171
3171
  topLeft: i,
3172
- topRight: l
3172
+ topRight: o
3173
3173
  }) => {
3174
- const o = ie(r), d = !!s && o === "video";
3174
+ const l = ie(r), d = !!s && l === "video";
3175
3175
  return Oe(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3176
3176
  "audio",
3177
3177
  {
@@ -3222,7 +3222,7 @@ const ur = {
3222
3222
  }
3223
3223
  ),
3224
3224
  i ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-10", children: i }) : null,
3225
- l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null
3225
+ o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null
3226
3226
  ]
3227
3227
  }
3228
3228
  );
@@ -3233,14 +3233,14 @@ const ur = {
3233
3233
  url: a,
3234
3234
  mimeType: r,
3235
3235
  thumbnailUrl: i,
3236
- sourceUrl: l,
3237
- layout: o = "featured",
3236
+ sourceUrl: o,
3237
+ layout: l = "featured",
3238
3238
  appIcon: d,
3239
3239
  cta: u,
3240
3240
  onDismiss: g,
3241
3241
  onEditClick: m
3242
3242
  }) => {
3243
- const f = o === "classic", c = Oe(r, l), b = g ? /* @__PURE__ */ n(
3243
+ const f = l === "classic", c = Oe(r, o), b = g ? /* @__PURE__ */ n(
3244
3244
  "button",
3245
3245
  {
3246
3246
  type: "button",
@@ -3259,12 +3259,12 @@ const ur = {
3259
3259
  children: /* @__PURE__ */ n(Ds, { className: "size-5", weight: "regular" })
3260
3260
  }
3261
3261
  ) : void 0;
3262
- return c ? /* @__PURE__ */ n(De, { variant: "dark", bgClassName: lt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3262
+ return c ? /* @__PURE__ */ n(De, { variant: "dark", bgClassName: ot, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3263
3263
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3264
3264
  Pe,
3265
3265
  {
3266
3266
  variant: "dark",
3267
- sourceUrl: l,
3267
+ sourceUrl: o,
3268
3268
  title: e,
3269
3269
  mimeType: r
3270
3270
  }
@@ -3281,7 +3281,7 @@ const ur = {
3281
3281
  {
3282
3282
  variant: "dark",
3283
3283
  thumbnailUrl: i,
3284
- sourceUrl: l,
3284
+ sourceUrl: o,
3285
3285
  title: e,
3286
3286
  mimeType: r,
3287
3287
  topRight: b
@@ -3310,12 +3310,12 @@ const ur = {
3310
3310
  mimeType: a,
3311
3311
  thumbnailUrl: r,
3312
3312
  sourceUrl: i,
3313
- layout: l = "featured",
3314
- appIcon: o,
3313
+ layout: o = "featured",
3314
+ appIcon: l,
3315
3315
  cta: d,
3316
3316
  onClick: u
3317
3317
  }) => {
3318
- const g = pn(a, i), m = rt(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = Oe(a, i) ? lt : void 0, w = d && u ? {
3318
+ const g = pn(a, i), m = rt(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = Oe(a, i) ? ot : void 0, w = d && u ? {
3319
3319
  ...d,
3320
3320
  onClick: () => {
3321
3321
  var v;
@@ -3332,7 +3332,7 @@ const ur = {
3332
3332
  bgClassName: b,
3333
3333
  "data-testid": "link-attachment",
3334
3334
  children: [
3335
- l === "featured" && /* @__PURE__ */ n(
3335
+ o === "featured" && /* @__PURE__ */ n(
3336
3336
  Pe,
3337
3337
  {
3338
3338
  variant: "light",
@@ -3349,7 +3349,7 @@ const ur = {
3349
3349
  title: e,
3350
3350
  description: t,
3351
3351
  url: s,
3352
- appIcon: o,
3352
+ appIcon: l,
3353
3353
  cta: w
3354
3354
  }
3355
3355
  )
@@ -3363,27 +3363,27 @@ const ur = {
3363
3363
  url: a,
3364
3364
  mimeType: r,
3365
3365
  thumbnailUrl: i,
3366
- sourceUrl: l,
3367
- layout: o = "featured",
3366
+ sourceUrl: o,
3367
+ layout: l = "featured",
3368
3368
  appIcon: d,
3369
3369
  cta: u,
3370
3370
  onClick: g
3371
3371
  }) => {
3372
- const m = pn(r, l), f = rt(a), c = u == null && f != null && !m ? f : void 0, b = u == null && !m && c != null ? g : void 0;
3372
+ const m = pn(r, o), f = rt(a), c = u == null && f != null && !m ? f : void 0, b = u == null && !m && c != null ? g : void 0;
3373
3373
  return /* @__PURE__ */ h(
3374
3374
  De,
3375
3375
  {
3376
3376
  variant: "dark",
3377
3377
  href: c,
3378
3378
  onClick: b,
3379
- bgClassName: Oe(r, l) ? lt : void 0,
3379
+ bgClassName: Oe(r, o) ? ot : void 0,
3380
3380
  children: [
3381
- o === "featured" && /* @__PURE__ */ n(
3381
+ l === "featured" && /* @__PURE__ */ n(
3382
3382
  Pe,
3383
3383
  {
3384
3384
  variant: "dark",
3385
3385
  thumbnailUrl: i,
3386
- sourceUrl: l,
3386
+ sourceUrl: o,
3387
3387
  title: e,
3388
3388
  mimeType: r
3389
3389
  }
@@ -3436,13 +3436,13 @@ const ur = {
3436
3436
  groupPosition: a = "single",
3437
3437
  className: r,
3438
3438
  children: i,
3439
- "data-testid": l
3439
+ "data-testid": o
3440
3440
  }) => {
3441
- const o = t != null && t !== "", d = Er[Cr(e)][a];
3441
+ const l = t != null && t !== "", d = Er[Cr(e)][a];
3442
3442
  return /* @__PURE__ */ h(
3443
3443
  "div",
3444
3444
  {
3445
- "data-testid": l,
3445
+ "data-testid": o,
3446
3446
  "data-group-position": a,
3447
3447
  className: k(
3448
3448
  // 280px-wide bubble — matches the mobile chat attachment width
@@ -3461,7 +3461,7 @@ const ur = {
3461
3461
  ),
3462
3462
  children: [
3463
3463
  i,
3464
- o ? /* @__PURE__ */ n(
3464
+ l ? /* @__PURE__ */ n(
3465
3465
  "p",
3466
3466
  {
3467
3467
  className: k(
@@ -3520,27 +3520,27 @@ const ur = {
3520
3520
  }
3521
3521
  ),
3522
3522
  s ?? null
3523
- ] }), ot = ({
3523
+ ] }), lt = ({
3524
3524
  state: e,
3525
3525
  src: t,
3526
3526
  mimeType: s,
3527
3527
  filename: a,
3528
3528
  items: r,
3529
3529
  text: i,
3530
- groupPosition: l,
3531
- preload: o,
3530
+ groupPosition: o,
3531
+ preload: l,
3532
3532
  onDismiss: d
3533
3533
  }) => {
3534
3534
  const u = Ie(e), g = e === "composer" && !!d, m = Ir({ src: t, mimeType: s, filename: a, items: r });
3535
3535
  if (m.length === 0)
3536
3536
  return null;
3537
- const f = o ?? (m.length > 1 ? "none" : "metadata");
3537
+ const f = l ?? (m.length > 1 ? "none" : "metadata");
3538
3538
  return /* @__PURE__ */ n(
3539
3539
  Ce,
3540
3540
  {
3541
3541
  variant: u,
3542
3542
  text: i,
3543
- groupPosition: l,
3543
+ groupPosition: o,
3544
3544
  "data-testid": "audio-attachment",
3545
3545
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, b) => /* @__PURE__ */ n(
3546
3546
  Sr,
@@ -3557,7 +3557,7 @@ const ur = {
3557
3557
  )) })
3558
3558
  }
3559
3559
  );
3560
- }, Tr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Ar = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), Mr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), Rr = {
3560
+ }, Tr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Ar = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), Mr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), Rr = {
3561
3561
  Composer: Tr,
3562
3562
  Sent: Ar,
3563
3563
  Received: Mr
@@ -3621,8 +3621,8 @@ const Or = {
3621
3621
  mimeType: a = "application/octet-stream",
3622
3622
  fileSize: r,
3623
3623
  onActivate: i,
3624
- activateLabel: l,
3625
- trailingAction: o
3624
+ activateLabel: o,
3625
+ trailingAction: l
3626
3626
  }) => {
3627
3627
  const d = s ?? t ?? "File", u = zr(a, t, r), g = /* @__PURE__ */ n(
3628
3628
  "div",
@@ -3654,7 +3654,7 @@ const Or = {
3654
3654
  {
3655
3655
  type: "button",
3656
3656
  onClick: i,
3657
- "aria-label": l,
3657
+ "aria-label": o,
3658
3658
  className: k(
3659
3659
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3660
3660
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
@@ -3670,7 +3670,7 @@ const Or = {
3670
3670
  ] });
3671
3671
  return /* @__PURE__ */ h("div", { className: "flex items-center gap-3 px-3 py-2", children: [
3672
3672
  f,
3673
- o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
3673
+ l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
3674
3674
  ] });
3675
3675
  };
3676
3676
  async function vn(e, t) {
@@ -3678,8 +3678,8 @@ async function vn(e, t) {
3678
3678
  try {
3679
3679
  const a = await fetch(e, { mode: "cors" });
3680
3680
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
3681
- const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
3682
- l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
3681
+ const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
3682
+ o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
3683
3683
  } catch {
3684
3684
  if (!window.open(e, "_blank", "noopener,noreferrer")) {
3685
3685
  const r = document.createElement("a");
@@ -3722,8 +3722,8 @@ const Br = ({
3722
3722
  fileSize: a,
3723
3723
  mimeType: r,
3724
3724
  title: i,
3725
- items: l,
3726
- text: o,
3725
+ items: o,
3726
+ text: l,
3727
3727
  groupPosition: d,
3728
3728
  onClick: u,
3729
3729
  onDismiss: g
@@ -3734,7 +3734,7 @@ const Br = ({
3734
3734
  fileSize: a,
3735
3735
  mimeType: r,
3736
3736
  title: i,
3737
- items: l
3737
+ items: o
3738
3738
  }), b = (v) => {
3739
3739
  if ((u == null ? void 0 : u(v)) === !1) return;
3740
3740
  const p = c[v];
@@ -3759,7 +3759,7 @@ const Br = ({
3759
3759
  Ce,
3760
3760
  {
3761
3761
  variant: m,
3762
- text: o,
3762
+ text: l,
3763
3763
  groupPosition: d,
3764
3764
  "data-testid": "file-attachment",
3765
3765
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, p) => /* @__PURE__ */ n(
@@ -3812,16 +3812,16 @@ const Br = ({
3812
3812
  label: a = "Download",
3813
3813
  iconOnly: r,
3814
3814
  tone: i = "dark",
3815
- onTriggered: l
3815
+ onTriggered: o
3816
3816
  }) => {
3817
- const [o, d] = $(!1), u = W(
3817
+ const [l, d] = $(!1), u = W(
3818
3818
  (c) => {
3819
- c.stopPropagation(), !o && (d(!0), vn(e, t).catch(() => {
3819
+ c.stopPropagation(), !l && (d(!0), vn(e, t).catch(() => {
3820
3820
  }).finally(() => {
3821
- d(!1), l == null || l();
3821
+ d(!1), o == null || o();
3822
3822
  }));
3823
3823
  },
3824
- [o, e, t, l]
3824
+ [l, e, t, o]
3825
3825
  ), g = r ?? s !== "pill", f = { className: k(
3826
3826
  s === "pill" ? "size-4" : "size-5",
3827
3827
  "shrink-0"
@@ -3831,7 +3831,7 @@ const Br = ({
3831
3831
  {
3832
3832
  type: "button",
3833
3833
  onClick: u,
3834
- disabled: o,
3834
+ disabled: l,
3835
3835
  "aria-label": a,
3836
3836
  className: k(
3837
3837
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
@@ -3840,7 +3840,7 @@ const Br = ({
3840
3840
  light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
3841
3841
  }[i]
3842
3842
  ),
3843
- children: o ? /* @__PURE__ */ n(
3843
+ children: l ? /* @__PURE__ */ n(
3844
3844
  Ne,
3845
3845
  {
3846
3846
  className: "size-4 animate-spin",
@@ -3861,24 +3861,24 @@ const Br = ({
3861
3861
  {
3862
3862
  type: "button",
3863
3863
  onClick: u,
3864
- disabled: o,
3864
+ disabled: l,
3865
3865
  "aria-label": a,
3866
3866
  className: "mes-media-viewer__action",
3867
- children: o ? /* @__PURE__ */ n(Ne, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(_e, { size: 20, weight: "bold", "aria-hidden": !0 })
3867
+ children: l ? /* @__PURE__ */ n(Ne, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(_e, { size: 20, weight: "bold", "aria-hidden": !0 })
3868
3868
  }
3869
3869
  ) : /* @__PURE__ */ h(
3870
3870
  "button",
3871
3871
  {
3872
3872
  type: "button",
3873
3873
  onClick: u,
3874
- disabled: o,
3874
+ disabled: l,
3875
3875
  "aria-label": g ? a : void 0,
3876
3876
  className: k(
3877
3877
  "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",
3878
3878
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3879
3879
  ),
3880
3880
  children: [
3881
- o ? /* @__PURE__ */ n(
3881
+ l ? /* @__PURE__ */ n(
3882
3882
  Ne,
3883
3883
  {
3884
3884
  className: "size-4 animate-spin",
@@ -3901,9 +3901,9 @@ const Br = ({
3901
3901
  }, [s, t, e]), q(() => {
3902
3902
  i((d) => Ge(d, 0, Math.max(e - 1, 0)));
3903
3903
  }, [e]);
3904
- const l = W(() => {
3904
+ const o = W(() => {
3905
3905
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3906
- }, [e]), o = W(() => {
3906
+ }, [e]), l = W(() => {
3907
3907
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3908
3908
  }, [e]);
3909
3909
  return q(() => {
@@ -3911,10 +3911,10 @@ const Br = ({
3911
3911
  const d = (u) => {
3912
3912
  if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
3913
3913
  const g = document.activeElement;
3914
- g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? l() : o());
3914
+ g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? o() : l());
3915
3915
  };
3916
3916
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3917
- }, [s, e, l, o]), { index: r, prev: l, next: o };
3917
+ }, [s, e, o, l]), { index: r, prev: o, next: l };
3918
3918
  }, mt = ({
3919
3919
  open: e,
3920
3920
  onClose: t,
@@ -3922,12 +3922,12 @@ const Br = ({
3922
3922
  counter: a,
3923
3923
  actions: r,
3924
3924
  children: i,
3925
- "data-testid": l
3925
+ "data-testid": o
3926
3926
  }) => {
3927
- const o = H(null), d = H(null);
3927
+ const l = H(null), d = H(null);
3928
3928
  return q(() => {
3929
3929
  var f;
3930
- const m = o.current;
3930
+ const m = l.current;
3931
3931
  if (m) {
3932
3932
  if (e) {
3933
3933
  if (!m.open)
@@ -3973,15 +3973,15 @@ const Br = ({
3973
3973
  /* @__PURE__ */ h(
3974
3974
  "dialog",
3975
3975
  {
3976
- ref: o,
3976
+ ref: l,
3977
3977
  className: "mes-media-viewer",
3978
3978
  "aria-label": s ?? "Attachment viewer",
3979
- "data-testid": l,
3979
+ "data-testid": o,
3980
3980
  onClose: () => {
3981
3981
  t();
3982
3982
  },
3983
3983
  onClick: (m) => {
3984
- m.target === o.current && t();
3984
+ m.target === l.current && t();
3985
3985
  },
3986
3986
  children: [
3987
3987
  /* @__PURE__ */ h("div", { className: "mes-media-viewer__chrome", children: [
@@ -4011,15 +4011,15 @@ const Br = ({
4011
4011
  initialIndex: s = 0,
4012
4012
  onClose: a
4013
4013
  }) => {
4014
- const { index: r, prev: i, next: l } = ut({
4014
+ const { index: r, prev: i, next: o } = ut({
4015
4015
  length: t.length,
4016
4016
  initialIndex: s,
4017
4017
  open: e
4018
- }), o = t[r], d = re(
4019
- () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "image"),
4020
- [o]
4018
+ }), l = t[r], d = re(
4019
+ () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "image"),
4020
+ [l]
4021
4021
  );
4022
- return o ? /* @__PURE__ */ h(
4022
+ return l ? /* @__PURE__ */ h(
4023
4023
  mt,
4024
4024
  {
4025
4025
  open: e,
@@ -4029,7 +4029,7 @@ const Br = ({
4029
4029
  actions: /* @__PURE__ */ n(
4030
4030
  xn,
4031
4031
  {
4032
- url: o.src,
4032
+ url: l.src,
4033
4033
  filename: d,
4034
4034
  variant: "viewer",
4035
4035
  label: `Download ${d}`
@@ -4040,20 +4040,20 @@ const Br = ({
4040
4040
  /* @__PURE__ */ n(
4041
4041
  "img",
4042
4042
  {
4043
- src: o.src,
4044
- alt: o.alt ?? d,
4043
+ src: l.src,
4044
+ alt: l.alt ?? d,
4045
4045
  draggable: !1,
4046
4046
  loading: "eager",
4047
4047
  decoding: "async",
4048
4048
  className: "mes-media-viewer__image"
4049
4049
  },
4050
- `${r}:${o.src}`
4050
+ `${r}:${l.src}`
4051
4051
  ),
4052
4052
  t.length > 1 ? /* @__PURE__ */ n(
4053
4053
  dt,
4054
4054
  {
4055
4055
  onPrev: i,
4056
- onNext: l,
4056
+ onNext: o,
4057
4057
  prevLabel: "Previous image",
4058
4058
  nextLabel: "Next image"
4059
4059
  }
@@ -4069,7 +4069,7 @@ const Br = ({
4069
4069
  }) => {
4070
4070
  const r = e.length;
4071
4071
  if (r === 0) return null;
4072
- const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, u, g) => {
4072
+ const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, u, g) => {
4073
4073
  const m = k(Yr, "h-full w-full");
4074
4074
  return t ? /* @__PURE__ */ h(
4075
4075
  "button",
@@ -4089,14 +4089,14 @@ const Br = ({
4089
4089
  g
4090
4090
  ] }, u);
4091
4091
  };
4092
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: o(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4092
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4093
4093
  "div",
4094
4094
  {
4095
4095
  className: k(
4096
4096
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
4097
4097
  a
4098
4098
  ),
4099
- children: i.map((d, u) => o(d, u))
4099
+ children: i.map((d, u) => l(d, u))
4100
4100
  }
4101
4101
  ) : i.length === 3 ? /* @__PURE__ */ h(
4102
4102
  "div",
@@ -4106,9 +4106,9 @@ const Br = ({
4106
4106
  a
4107
4107
  ),
4108
4108
  children: [
4109
- /* @__PURE__ */ n("div", { className: "row-span-2", children: o(i[0], 0) }),
4110
- o(i[1], 1),
4111
- o(i[2], 2)
4109
+ /* @__PURE__ */ n("div", { className: "row-span-2", children: l(i[0], 0) }),
4110
+ l(i[1], 1),
4111
+ l(i[2], 2)
4112
4112
  ]
4113
4113
  }
4114
4114
  ) : /* @__PURE__ */ n(
@@ -4119,13 +4119,13 @@ const Br = ({
4119
4119
  a
4120
4120
  ),
4121
4121
  children: i.map((d, u) => {
4122
- const g = l > 0 && u === i.length - 1;
4123
- return o(
4122
+ const g = o > 0 && u === i.length - 1;
4123
+ return l(
4124
4124
  d,
4125
4125
  u,
4126
4126
  g ? /* @__PURE__ */ h("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
4127
4127
  "+",
4128
- l
4128
+ o
4129
4129
  ] }) : null
4130
4130
  );
4131
4131
  })
@@ -4133,12 +4133,12 @@ const Br = ({
4133
4133
  );
4134
4134
  }, Se = (e) => {
4135
4135
  const [t, s] = $(!1), [a, r] = $(0), i = W(
4136
- (o) => {
4137
- (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
4136
+ (l) => {
4137
+ (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
4138
4138
  },
4139
4139
  [e]
4140
- ), l = W(() => s(!1), []);
4141
- return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
4140
+ ), o = W(() => s(!1), []);
4141
+ return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
4142
4142
  }, qr = (e, t, s, a) => ({
4143
4143
  ariaLabel: `Open image ${t + 1} of ${s}`,
4144
4144
  content: /* @__PURE__ */ n(
@@ -4163,7 +4163,7 @@ const Br = ({
4163
4163
  alt: s.alt,
4164
4164
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4165
4165
  })), Xr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4166
- const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Se(
4166
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Se(
4167
4167
  r
4168
4168
  );
4169
4169
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4191,9 +4191,9 @@ const Br = ({
4191
4191
  /* @__PURE__ */ n(
4192
4192
  wn,
4193
4193
  {
4194
- open: l,
4194
+ open: o,
4195
4195
  items: _n([{ src: e, alt: t }], s),
4196
- initialIndex: o,
4196
+ initialIndex: l,
4197
4197
  onClose: u
4198
4198
  }
4199
4199
  )
@@ -4205,8 +4205,8 @@ const Br = ({
4205
4205
  filename: a,
4206
4206
  items: r,
4207
4207
  text: i,
4208
- groupPosition: l,
4209
- loading: o = "lazy",
4208
+ groupPosition: o,
4209
+ loading: l = "lazy",
4210
4210
  onClick: d
4211
4211
  }) => {
4212
4212
  const u = Wr({ src: t, alt: s, items: r }), g = Ie(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: b } = Se(
@@ -4215,14 +4215,14 @@ const Br = ({
4215
4215
  if (u.length === 0)
4216
4216
  return null;
4217
4217
  const w = u.map(
4218
- (v, p) => qr(v, p, u.length, o)
4218
+ (v, p) => qr(v, p, u.length, l)
4219
4219
  );
4220
4220
  return /* @__PURE__ */ h(
4221
4221
  Ce,
4222
4222
  {
4223
4223
  variant: g,
4224
4224
  text: i,
4225
- groupPosition: l,
4225
+ groupPosition: o,
4226
4226
  "data-testid": "image-attachment",
4227
4227
  children: [
4228
4228
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Nn, { tiles: w, onTileActivate: c }) }),
@@ -4248,18 +4248,18 @@ const Br = ({
4248
4248
  initialIndex: s = 0,
4249
4249
  onClose: a
4250
4250
  }) => {
4251
- const { index: r, prev: i, next: l } = ut({
4251
+ const { index: r, prev: i, next: o } = ut({
4252
4252
  length: t.length,
4253
4253
  initialIndex: s,
4254
4254
  open: e
4255
- }), o = t[r], d = re(
4256
- () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
4257
- [o]
4255
+ }), l = t[r], d = re(
4256
+ () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "document"),
4257
+ [l]
4258
4258
  ), u = re(
4259
- () => o ? ti(o.src) : void 0,
4260
- [o]
4259
+ () => l ? ti(l.src) : void 0,
4260
+ [l]
4261
4261
  );
4262
- return !o || !u ? null : /* @__PURE__ */ h(
4262
+ return !l || !u ? null : /* @__PURE__ */ h(
4263
4263
  mt,
4264
4264
  {
4265
4265
  open: e,
@@ -4276,13 +4276,13 @@ const Br = ({
4276
4276
  className: "mes-media-viewer__iframe",
4277
4277
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
4278
4278
  },
4279
- `${r}:${o.src}`
4279
+ `${r}:${l.src}`
4280
4280
  ),
4281
4281
  t.length > 1 ? /* @__PURE__ */ n(
4282
4282
  dt,
4283
4283
  {
4284
4284
  onPrev: i,
4285
- onNext: l,
4285
+ onNext: o,
4286
4286
  prevLabel: "Previous document",
4287
4287
  nextLabel: "Next document"
4288
4288
  }
@@ -4327,8 +4327,8 @@ const Br = ({
4327
4327
  fileSize: a,
4328
4328
  title: r,
4329
4329
  items: i,
4330
- text: l,
4331
- groupPosition: o,
4330
+ text: o,
4331
+ groupPosition: l,
4332
4332
  onClick: d,
4333
4333
  onDismiss: u
4334
4334
  }) => {
@@ -4345,8 +4345,8 @@ const Br = ({
4345
4345
  Ce,
4346
4346
  {
4347
4347
  variant: g,
4348
- text: l,
4349
- groupPosition: o,
4348
+ text: o,
4349
+ groupPosition: l,
4350
4350
  "data-testid": "pdf-attachment",
4351
4351
  children: [
4352
4352
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((N, _) => {
@@ -4384,7 +4384,7 @@ const Br = ({
4384
4384
  ]
4385
4385
  }
4386
4386
  );
4387
- }, ai = (e) => /* @__PURE__ */ n(ht, { ...e, state: "composer" }), ri = (e) => /* @__PURE__ */ n(ht, { ...e, state: "sent" }), ii = (e) => /* @__PURE__ */ n(ht, { ...e, state: "received" }), li = {
4387
+ }, ai = (e) => /* @__PURE__ */ n(ht, { ...e, state: "composer" }), ri = (e) => /* @__PURE__ */ n(ht, { ...e, state: "sent" }), ii = (e) => /* @__PURE__ */ n(ht, { ...e, state: "received" }), oi = {
4388
4388
  Composer: ai,
4389
4389
  Sent: ri,
4390
4390
  Received: ii
@@ -4394,15 +4394,15 @@ const Br = ({
4394
4394
  initialIndex: s = 0,
4395
4395
  onClose: a
4396
4396
  }) => {
4397
- const { index: r, prev: i, next: l } = ut({
4397
+ const { index: r, prev: i, next: o } = ut({
4398
4398
  length: t.length,
4399
4399
  initialIndex: s,
4400
4400
  open: e
4401
- }), o = t[r], d = re(
4402
- () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "video"),
4403
- [o]
4401
+ }), l = t[r], d = re(
4402
+ () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "video"),
4403
+ [l]
4404
4404
  );
4405
- return o ? /* @__PURE__ */ h(
4405
+ return l ? /* @__PURE__ */ h(
4406
4406
  mt,
4407
4407
  {
4408
4408
  open: e,
@@ -4414,23 +4414,23 @@ const Br = ({
4414
4414
  /* @__PURE__ */ n(
4415
4415
  "video",
4416
4416
  {
4417
- src: o.src,
4418
- poster: o.poster,
4417
+ src: l.src,
4418
+ poster: l.poster,
4419
4419
  controls: !0,
4420
4420
  autoPlay: !0,
4421
4421
  muted: !0,
4422
4422
  playsInline: !0,
4423
- preload: o.preload ?? "metadata",
4423
+ preload: l.preload ?? "metadata",
4424
4424
  className: "mes-media-viewer__video",
4425
- children: o.mimeType ? /* @__PURE__ */ n("source", { src: o.src, type: o.mimeType }) : null
4425
+ children: l.mimeType ? /* @__PURE__ */ n("source", { src: l.src, type: l.mimeType }) : null
4426
4426
  },
4427
- `${r}:${o.src}`
4427
+ `${r}:${l.src}`
4428
4428
  ),
4429
4429
  t.length > 1 ? /* @__PURE__ */ n(
4430
4430
  dt,
4431
4431
  {
4432
4432
  onPrev: i,
4433
- onNext: l,
4433
+ onNext: o,
4434
4434
  prevLabel: "Previous video",
4435
4435
  nextLabel: "Next video"
4436
4436
  }
@@ -4438,7 +4438,7 @@ const Br = ({
4438
4438
  ]
4439
4439
  }
4440
4440
  ) : null;
4441
- }, oi = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Ye, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Cn = ({
4441
+ }, li = () => /* @__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(Ye, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Cn = ({
4442
4442
  item: e,
4443
4443
  index: t
4444
4444
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4460,7 +4460,7 @@ const Br = ({
4460
4460
  "aria-hidden": !0
4461
4461
  }
4462
4462
  ) }),
4463
- /* @__PURE__ */ n(oi, {})
4463
+ /* @__PURE__ */ n(li, {})
4464
4464
  ] }), ci = (e, t, s) => ({
4465
4465
  ariaLabel: `Play video ${t + 1} of ${s}`,
4466
4466
  content: /* @__PURE__ */ n(Cn, { item: e, index: t })
@@ -4476,8 +4476,8 @@ const Br = ({
4476
4476
  mimeType: s.mimeType,
4477
4477
  preload: s.preload,
4478
4478
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4479
- })), ui = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
4480
- const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: g } = Se(
4479
+ })), ui = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4480
+ const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: g } = Se(
4481
4481
  i
4482
4482
  );
4483
4483
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4491,11 +4491,11 @@ const Br = ({
4491
4491
  children: /* @__PURE__ */ n(Cn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4492
4492
  }
4493
4493
  ),
4494
- l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ee, { onClick: l }) }) : null,
4494
+ o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ee, { onClick: o }) }) : null,
4495
4495
  /* @__PURE__ */ n(
4496
4496
  kn,
4497
4497
  {
4498
- open: o,
4498
+ open: l,
4499
4499
  items: En(
4500
4500
  [{ src: e, poster: t, mimeType: s, preload: r }],
4501
4501
  a
@@ -4512,8 +4512,8 @@ const Br = ({
4512
4512
  mimeType: a,
4513
4513
  filename: r,
4514
4514
  items: i,
4515
- text: l,
4516
- groupPosition: o,
4515
+ text: o,
4516
+ groupPosition: l,
4517
4517
  preload: d,
4518
4518
  onClick: u
4519
4519
  }) => {
@@ -4529,8 +4529,8 @@ const Br = ({
4529
4529
  Ce,
4530
4530
  {
4531
4531
  variant: m,
4532
- text: l,
4533
- groupPosition: o,
4532
+ text: o,
4533
+ groupPosition: l,
4534
4534
  "data-testid": "video-attachment",
4535
4535
  children: [
4536
4536
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
@@ -4561,7 +4561,7 @@ const Br = ({
4561
4561
  Image: Qr,
4562
4562
  Video: gi,
4563
4563
  Audio: Rr,
4564
- Pdf: li,
4564
+ Pdf: oi,
4565
4565
  File: Hr
4566
4566
  }, pi = ({
4567
4567
  question: e,
@@ -4592,15 +4592,15 @@ const Br = ({
4592
4592
  headerText: a,
4593
4593
  className: r,
4594
4594
  avatarImage: i,
4595
- avatarName: l
4595
+ avatarName: o
4596
4596
  }) => {
4597
- const o = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
4598
- return o.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4599
- (i || l) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4597
+ const l = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
4598
+ return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4599
+ (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4600
4600
  ne,
4601
4601
  {
4602
- id: l || "account",
4603
- name: l || "Account",
4602
+ id: o || "account",
4603
+ name: o || "Account",
4604
4604
  image: i,
4605
4605
  size: 24,
4606
4606
  shape: "circle"
@@ -4613,7 +4613,7 @@ const Br = ({
4613
4613
  style: { backgroundColor: "#F1F0EE" },
4614
4614
  children: [
4615
4615
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4616
- o.map((d) => /* @__PURE__ */ n(
4616
+ l.map((d) => /* @__PURE__ */ n(
4617
4617
  pi,
4618
4618
  {
4619
4619
  question: d.question,
@@ -4639,7 +4639,7 @@ export {
4639
4639
  Ei as M,
4640
4640
  be as a,
4641
4641
  ne as b,
4642
- or as c,
4642
+ lr as c,
4643
4643
  hn as d,
4644
4644
  Ii as e,
4645
4645
  pi as f,
@@ -4655,7 +4655,7 @@ export {
4655
4655
  Pr as p,
4656
4656
  Qt as q,
4657
4657
  ce as r,
4658
- ln as s,
4658
+ on as s,
4659
4659
  Us as t,
4660
4660
  Mi as u,
4661
4661
  Xs as v,
@@ -4664,4 +4664,4 @@ export {
4664
4664
  st as y,
4665
4665
  Zt as z
4666
4666
  };
4667
- //# sourceMappingURL=index-DxuG__WG.js.map
4667
+ //# sourceMappingURL=index-BOzklqIY.js.map