@linktr.ee/messaging-react 3.4.2-rc-1782453771 → 3.4.2-rc-1782454787

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/{Card-ql9pImRa.js → Card-BQZcPeQn.js} +2 -2
  2. package/dist/{Card-ql9pImRa.js.map → Card-BQZcPeQn.js.map} +1 -1
  3. package/dist/{Card-BIa-47Ne.cjs → Card-CSqZXHCM.cjs} +2 -2
  4. package/dist/{Card-BIa-47Ne.cjs.map → Card-CSqZXHCM.cjs.map} +1 -1
  5. package/dist/{Card-BkVj6kGN.cjs → Card-Cp0Ioui8.cjs} +2 -2
  6. package/dist/{Card-BkVj6kGN.cjs.map → Card-Cp0Ioui8.cjs.map} +1 -1
  7. package/dist/{Card-52LnCirC.js → Card-DFaRAFV1.js} +3 -3
  8. package/dist/{Card-52LnCirC.js.map → Card-DFaRAFV1.js.map} +1 -1
  9. package/dist/{Card-CcTyYY9N.cjs → Card-DWmbH7oz.cjs} +2 -2
  10. package/dist/{Card-CcTyYY9N.cjs.map → Card-DWmbH7oz.cjs.map} +1 -1
  11. package/dist/{Card-BaXLsSK2.js → Card-U9LAeCEA.js} +2 -2
  12. package/dist/{Card-BaXLsSK2.js.map → Card-U9LAeCEA.js.map} +1 -1
  13. package/dist/{LockedThumbnail-C3YOnS-o.js → LockedThumbnail-JOZFwdjw.js} +2 -2
  14. package/dist/{LockedThumbnail-C3YOnS-o.js.map → LockedThumbnail-JOZFwdjw.js.map} +1 -1
  15. package/dist/{LockedThumbnail-D0ASm7LP.cjs → LockedThumbnail-nLWi4Kxt.cjs} +2 -2
  16. package/dist/{LockedThumbnail-D0ASm7LP.cjs.map → LockedThumbnail-nLWi4Kxt.cjs.map} +1 -1
  17. package/dist/index-BSQPos2Q.cjs +2 -0
  18. package/dist/index-BSQPos2Q.cjs.map +1 -0
  19. package/dist/{index-CbWEp3Zs.js → index-DyG_ZuPp.js} +386 -386
  20. package/dist/index-DyG_ZuPp.js.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/ChannelList/CustomChannelPreview.tsx +1 -3
  25. package/src/components/ChannelView.test.tsx +16 -13
  26. package/src/components/ChannelView.tsx +4 -4
  27. package/src/components/ParticipantBadges.tsx +6 -3
  28. package/dist/index-CbWEp3Zs.js.map +0 -1
  29. package/dist/index-DkqM2z_j.cjs +0 -2
  30. package/dist/index-DkqM2z_j.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, jsxs as h, Fragment as ae } from "react/jsx-runtime";
2
- import j, { createContext as qe, useContext as Re, useCallback as K, useState as $, useRef as G, useEffect as X, useId as In, useMemo as se, Suspense as We } from "react";
2
+ import j, { createContext as qe, useContext as Re, useCallback as K, useState as z, useRef as G, useEffect as X, useId as In, useMemo as se, Suspense as We } from "react";
3
3
  import { StreamChatService as Tn } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as An, LinkPreviewsManager as Mt } from "stream-chat";
5
5
  import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as ce, useChatContext as Xe, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as Vt, Attachment as Pn, EditMessageModal as On, MessageBlocked as zn, 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 Rt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as we, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Oe, AIStates as ze, 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";
@@ -24,10 +24,10 @@ const Wt = qe({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var D, C;
27
+ var T, A;
28
28
  const l = K(
29
- (I, ...T) => {
30
- i && console.log(`🔥 [MessagingProvider] ${I}`, ...T);
29
+ (S, ...M) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${S}`, ...M);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,61 +37,61 @@ const Wt = qe({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [o, d] = $(null), [m, g] = $(null), [u, f] = $(!1), [c, b] = $(!1), [N, x] = $(null), p = G(!1), v = G(null), A = G(s);
41
- A.current = s;
42
- const R = G(i);
43
- R.current = i;
44
- const _ = G({
40
+ const [o, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, b] = z(!1), [N, x] = z(null), p = G(!1), v = G(null), R = G(s);
41
+ R.current = s;
42
+ const I = G(i);
43
+ I.current = i;
44
+ const E = G({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), M = G(0);
50
- M.current++, l("📊 RENDER INFO", {
51
- renderCount: M.current,
49
+ }), L = G(0);
50
+ L.current++, l("📊 RENDER INFO", {
51
+ renderCount: L.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: _.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: _.current.apiKey !== a,
56
- serviceConfigChanged: _.current.serviceConfig !== s,
57
- capabilitiesChanged: _.current.capabilities !== r
54
+ userChanged: E.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: E.current.apiKey !== a,
56
+ serviceConfigChanged: E.current.serviceConfig !== s,
57
+ capabilitiesChanged: E.current.capabilities !== r
58
58
  }
59
- }), _.current = {
59
+ }), E.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 An(a) });
67
- const O = a ? ((C = z.current) == null ? void 0 : C.client) ?? null : null;
65
+ const P = G(null);
66
+ a && ((T = P.current) == null ? void 0 : T.apiKey) !== a && (P.current = { apiKey: a, client: new An(a) });
67
+ const _ = a ? ((A = P.current) == null ? void 0 : A.client) ?? null : null;
68
68
  X(() => {
69
- const I = M.current, T = A.current;
70
- if (!a || !O || !T) {
69
+ const S = L.current, M = R.current;
70
+ if (!a || !_ || !M) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: I,
72
+ renderCount: S,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
77
  l("🚀 CREATING SERVICE", {
78
- renderCount: I,
78
+ renderCount: S,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const P = new Tn({
82
- ...T,
81
+ const D = new Tn({
82
+ ...M,
83
83
  apiKey: a,
84
- debug: R.current,
85
- client: O
84
+ debug: I.current,
85
+ client: _
86
86
  });
87
- v.current = P, d(P), l("✅ SERVICE SET", {
88
- renderCount: I,
89
- serviceInstance: !!P
87
+ v.current = D, d(D), l("✅ SERVICE SET", {
88
+ renderCount: S,
89
+ serviceInstance: !!D
90
90
  });
91
- }, [a, O]);
92
- const S = G(null);
91
+ }, [a, _]);
92
+ const O = G(null);
93
93
  X(() => {
94
- var T, P;
94
+ var M, D;
95
95
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!o,
97
97
  hasUser: !!t,
@@ -107,7 +107,7 @@ const Wt = qe({
107
107
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((T = S.current) == null ? void 0 : T.serviceId) === o && ((P = S.current) == null ? void 0 : P.userId) === t.id) {
110
+ if (((M = O.current) == null ? void 0 : M.serviceId) === o && ((D = O.current) == null ? void 0 : D.userId) === t.id) {
111
111
  l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -118,13 +118,13 @@ const Wt = qe({
118
118
  l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), x(null);
119
119
  try {
120
120
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const F = await o.connectUser(t);
122
- g(F), f(!0), S.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
121
+ const B = await o.connectUser(t);
122
+ g(B), f(!0), O.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: F.userID
124
+ clientId: B.userID
125
125
  });
126
- } catch (F) {
127
- const Y = F instanceof Error ? F.message : "Connection failed";
126
+ } catch (B) {
127
+ const Y = B instanceof Error ? B.message : "Connection failed";
128
128
  x(Y), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: Y
@@ -137,13 +137,13 @@ const Wt = qe({
137
137
  }
138
138
  })();
139
139
  }, [o, t, l, u]), X(() => {
140
- const I = O;
140
+ const S = _;
141
141
  return () => {
142
- var T;
143
- I && (S.current = null, (T = v.current) == null || T.disconnectUser().catch(console.error));
142
+ var M;
143
+ S && (O.current = null, (M = v.current) == null || M.disconnectUser().catch(console.error));
144
144
  };
145
- }, [O]);
146
- const E = K(async () => {
145
+ }, [_]);
146
+ const C = K(async () => {
147
147
  if (l("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!o,
149
149
  hasUser: !!t
@@ -154,18 +154,18 @@ const Wt = qe({
154
154
  l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
155
155
  try {
156
156
  l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
- const I = await o.connectUser(t);
158
- g(I), f(!0), x(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (I) {
160
- const T = I instanceof Error ? I.message : "Refresh failed";
161
- x(T), l("❌ CONNECTION REFRESH ERROR", {
157
+ const S = await o.connectUser(t);
158
+ g(S), f(!0), x(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (S) {
160
+ const M = S instanceof Error ? S.message : "Refresh failed";
161
+ x(M), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: T
163
+ error: M
164
164
  });
165
165
  } finally {
166
166
  b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [o, t, l]), L = j.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [o, t, l]), $ = j.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!o,
170
170
  hasClient: !!m,
171
171
  isConnected: u,
@@ -179,7 +179,7 @@ const Wt = qe({
179
179
  isLoading: c,
180
180
  error: N,
181
181
  capabilities: r,
182
- refreshConnection: E,
182
+ refreshConnection: C,
183
183
  debug: i
184
184
  }), [
185
185
  o,
@@ -188,18 +188,18 @@ const Wt = qe({
188
188
  c,
189
189
  N,
190
190
  r,
191
- E,
191
+ C,
192
192
  i,
193
193
  l
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
- renderCount: M.current,
197
- willRenderChat: !!O,
198
- contextValueReady: !!L
199
- }), /* @__PURE__ */ n(Wt.Provider, { value: L, children: O ? /* @__PURE__ */ n(
196
+ renderCount: L.current,
197
+ willRenderChat: !!_,
198
+ contextValueReady: !!$
199
+ }), /* @__PURE__ */ n(Wt.Provider, { value: $, children: _ ? /* @__PURE__ */ n(
200
200
  Mn,
201
201
  {
202
- client: O,
202
+ client: _,
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
  },
@@ -208,7 +208,7 @@ const Wt = qe({
208
208
  ) : e });
209
209
  }, $s = () => Ke(), Xt = (e) => {
210
210
  var a, r;
211
- const [t, s] = $(
211
+ const [t, s] = z(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
214
  return X(() => {
@@ -362,73 +362,73 @@ const ie = ({
362
362
  onActionComplete: m,
363
363
  logLabel: g = "useChannelModerationActions"
364
364
  }) => {
365
- var D;
366
- const { service: u, debug: f } = Ke(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, b = !!(a && s && u && c), [N, x] = $(!1), [p, v] = $(null), [A, R] = $(!1), [_, M] = $(!1), z = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
365
+ var T;
366
+ const { service: u, debug: f } = Ke(), c = (T = t == null ? void 0 : t.user) == null ? void 0 : T.id, b = !!(a && s && u && c), [N, x] = z(!1), [p, v] = z(null), [R, I] = z(!1), [E, L] = z(!1), P = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
367
367
  return X(() => {
368
368
  if (!b || !u || !c) {
369
369
  x(!1), v(null);
370
370
  return;
371
371
  }
372
- let C = !1;
372
+ let A = !1;
373
373
  return (async () => {
374
374
  try {
375
- const I = await u.getBlockedUsers();
376
- if (C) return;
375
+ const S = await u.getBlockedUsers();
376
+ if (A) return;
377
377
  x(
378
- I.some(
379
- (T) => T.blocked_user_id === c
378
+ S.some(
379
+ (M) => M.blocked_user_id === c
380
380
  )
381
381
  );
382
- } catch (I) {
383
- C || console.error(`[${g}] Failed to check blocked status:`, I);
382
+ } catch (S) {
383
+ A || console.error(`[${g}] Failed to check blocked status:`, S);
384
384
  } finally {
385
- C || v({ participantId: c, service: u });
385
+ A || v({ participantId: c, service: u });
386
386
  }
387
387
  })(), () => {
388
- C = !0;
388
+ A = !0;
389
389
  };
390
390
  }, [b, u, c, g]), {
391
391
  isParticipantBlocked: N,
392
- isCheckingBlockedStatus: z,
393
- isLeaving: A,
394
- isUpdatingBlockStatus: _,
392
+ isCheckingBlockedStatus: P,
393
+ isLeaving: R,
394
+ isUpdatingBlockStatus: E,
395
395
  handleLeaveConversation: async () => {
396
- var C;
397
- if (!A) {
398
- l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), R(!0);
396
+ var A;
397
+ if (!R) {
398
+ l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), I(!0);
399
399
  try {
400
- const I = ((C = e._client) == null ? void 0 : C.userID) ?? null;
401
- await e.hide(I, !1), r && await r(e), m == null || m();
402
- } catch (I) {
403
- console.error(`[${g}] Failed to leave conversation`, I);
400
+ const S = ((A = e._client) == null ? void 0 : A.userID) ?? null;
401
+ await e.hide(S, !1), r && await r(e), m == null || m();
402
+ } catch (S) {
403
+ console.error(`[${g}] Failed to leave conversation`, S);
404
404
  } finally {
405
- R(!1);
405
+ I(!1);
406
406
  }
407
407
  }
408
408
  },
409
409
  handleBlockUser: async () => {
410
- var C, I, T;
411
- if (!(_ || !u)) {
412
- o == null || o(), f && console.log(`[${g}] Block member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), M(!0);
410
+ var A, S, M;
411
+ if (!(E || !u)) {
412
+ o == null || o(), f && console.log(`[${g}] Block member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), L(!0);
413
413
  try {
414
- 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();
415
- } catch (P) {
416
- console.error(`[${g}] Failed to block member`, P);
414
+ await u.blockUser((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
415
+ } catch (D) {
416
+ console.error(`[${g}] Failed to block member`, D);
417
417
  } finally {
418
- M(!1);
418
+ L(!1);
419
419
  }
420
420
  }
421
421
  },
422
422
  handleUnblockUser: async () => {
423
- var C, I, T;
424
- if (!(_ || !u)) {
425
- o == null || o(), f && console.log(`[${g}] Unblock member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), M(!0);
423
+ var A, S, M;
424
+ if (!(E || !u)) {
425
+ o == null || o(), f && console.log(`[${g}] Unblock member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), L(!0);
426
426
  try {
427
- 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();
428
- } catch (P) {
429
- console.error(`[${g}] Failed to unblock member`, P);
427
+ await u.unBlockUser((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
428
+ } catch (D) {
429
+ console.error(`[${g}] Failed to unblock member`, D);
430
430
  } finally {
431
- M(!1);
431
+ L(!1);
432
432
  }
433
433
  }
434
434
  },
@@ -467,15 +467,15 @@ const ie = ({
467
467
  customChannelActions: g,
468
468
  triggerClassName: u
469
469
  }) => {
470
- const [f, c] = $(!1), b = G(null), N = In(), x = K(() => c(!1), []), {
470
+ const [f, c] = z(!1), b = G(null), N = In(), x = K(() => c(!1), []), {
471
471
  isParticipantBlocked: p,
472
472
  isCheckingBlockedStatus: v,
473
- isLeaving: A,
474
- isUpdatingBlockStatus: R,
475
- handleLeaveConversation: _,
476
- handleBlockUser: M,
477
- handleUnblockUser: z,
478
- handleReportUser: O
473
+ isLeaving: R,
474
+ isUpdatingBlockStatus: I,
475
+ handleLeaveConversation: E,
476
+ handleBlockUser: L,
477
+ handleUnblockUser: P,
478
+ handleReportUser: _
479
479
  } = Gs({
480
480
  channel: e,
481
481
  participant: t,
@@ -491,13 +491,13 @@ const ie = ({
491
491
  });
492
492
  return X(() => {
493
493
  if (!f) return;
494
- const E = (D) => {
495
- b.current && !b.current.contains(D.target) && c(!1);
496
- }, L = (D) => {
497
- D.key === "Escape" && c(!1);
494
+ const C = (T) => {
495
+ b.current && !b.current.contains(T.target) && c(!1);
496
+ }, $ = (T) => {
497
+ T.key === "Escape" && c(!1);
498
498
  };
499
- return document.addEventListener("mousedown", E), document.addEventListener("keydown", L), () => {
500
- document.removeEventListener("mousedown", E), document.removeEventListener("keydown", L);
499
+ return document.addEventListener("mousedown", C), document.addEventListener("keydown", $), () => {
500
+ document.removeEventListener("mousedown", C), document.removeEventListener("keydown", $);
501
501
  };
502
502
  }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
503
503
  /* @__PURE__ */ h(
@@ -508,7 +508,7 @@ const ie = ({
508
508
  "aria-haspopup": "true",
509
509
  "aria-expanded": f,
510
510
  "aria-controls": f ? N : void 0,
511
- onClick: () => c((E) => !E),
511
+ onClick: () => c((C) => !C),
512
512
  children: [
513
513
  /* @__PURE__ */ n(fs, { className: "size-5 text-black/90" }),
514
514
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
@@ -528,11 +528,11 @@ const ie = ({
528
528
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
529
529
  ge,
530
530
  {
531
- onClick: _,
532
- disabled: A,
533
- "aria-busy": A,
531
+ onClick: E,
532
+ disabled: R,
533
+ "aria-busy": R,
534
534
  children: [
535
- A ? /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(gs, { className: "h-5 w-5" }),
535
+ R ? /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(gs, { className: "h-5 w-5" }),
536
536
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
537
537
  ]
538
538
  }
@@ -547,27 +547,27 @@ const ie = ({
547
547
  ) : p ? /* @__PURE__ */ h(
548
548
  ge,
549
549
  {
550
- onClick: z,
551
- disabled: R,
552
- "aria-busy": R,
550
+ onClick: P,
551
+ disabled: I,
552
+ "aria-busy": I,
553
553
  children: [
554
- R ? /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Lt, { className: "h-5 w-5" }),
554
+ I ? /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Lt, { className: "h-5 w-5" }),
555
555
  /* @__PURE__ */ n("span", { children: "Unblock" })
556
556
  ]
557
557
  }
558
558
  ) : /* @__PURE__ */ h(
559
559
  ge,
560
560
  {
561
- onClick: M,
562
- disabled: R,
563
- "aria-busy": R,
561
+ onClick: L,
562
+ disabled: I,
563
+ "aria-busy": I,
564
564
  children: [
565
- R ? /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Lt, { className: "h-5 w-5" }),
565
+ I ? /* @__PURE__ */ n(Ee, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Lt, { className: "h-5 w-5" }),
566
566
  /* @__PURE__ */ n("span", { children: "Block" })
567
567
  ]
568
568
  }
569
569
  ) }),
570
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: O, children: [
570
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: _, children: [
571
571
  /* @__PURE__ */ n(Gt, { className: "h-5 w-5" }),
572
572
  /* @__PURE__ */ n("span", { children: "Report" })
573
573
  ] }) }),
@@ -618,7 +618,7 @@ function Jt({
618
618
  const s = e == null ? void 0 : e.text, a = Ws(t);
619
619
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
620
620
  }
621
- const Xs = j.lazy(() => import("./Card-BaXLsSK2.js")), Ks = j.lazy(() => import("./Card-ql9pImRa.js")), Js = j.lazy(() => import("./Card-52LnCirC.js")), Je = () => /* @__PURE__ */ n(
621
+ const Xs = j.lazy(() => import("./Card-U9LAeCEA.js")), Ks = j.lazy(() => import("./Card-BQZcPeQn.js")), Js = j.lazy(() => import("./Card-DFaRAFV1.js")), Je = () => /* @__PURE__ */ n(
622
622
  "div",
623
623
  {
624
624
  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)]",
@@ -681,23 +681,23 @@ const ra = (e) => {
681
681
  muted: d = !1,
682
682
  onContainerClick: m
683
683
  }) => {
684
- const g = re(t), u = G(null), f = G(null), c = G(null), b = G(r), [N, x] = $(a), [p, v] = $(0), [A, R] = $(!1), [_, M] = $(!1), [z, O] = $(!1), [S, E] = $(!1), [L, D] = $(!0), [C, I] = $(null), T = K(() => {
685
- O(!1), x(!0);
686
- }, []), P = K((w) => {
684
+ const g = re(t), u = G(null), f = G(null), c = G(null), b = G(r), [N, x] = z(a), [p, v] = z(0), [R, I] = z(!1), [E, L] = z(!1), [P, _] = z(!1), [O, C] = z(!1), [$, T] = z(!0), [A, S] = z(null), M = K(() => {
685
+ _(!1), x(!0);
686
+ }, []), D = K((w) => {
687
687
  const k = f.current;
688
688
  if (!k) return 0;
689
- const B = k.getBoundingClientRect();
689
+ const F = k.getBoundingClientRect();
690
690
  return Math.max(
691
691
  0,
692
- Math.min(1, (ra(w) - B.left) / B.width)
692
+ Math.min(1, (ra(w) - F.left) / F.width)
693
693
  );
694
- }, []), F = K((w) => {
694
+ }, []), B = K((w) => {
695
695
  const k = u.current;
696
696
  k && k.duration && (k.currentTime = w * k.duration);
697
697
  }, []), Y = (w) => {
698
- w.stopPropagation(), R(!0);
699
- const k = P(w);
700
- v(k), F(k);
698
+ w.stopPropagation(), I(!0);
699
+ const k = D(w);
700
+ v(k), B(k);
701
701
  };
702
702
  X(() => {
703
703
  r !== void 0 && r !== b.current && (b.current = r, x(r));
@@ -708,26 +708,26 @@ const ra = (e) => {
708
708
  }
709
709
  const w = () => {
710
710
  const k = u.current;
711
- k && k.duration && !A && v(k.currentTime / k.duration), c.current = requestAnimationFrame(w);
711
+ k && k.duration && !R && v(k.currentTime / k.duration), c.current = requestAnimationFrame(w);
712
712
  };
713
713
  return c.current = requestAnimationFrame(w), () => {
714
714
  c.current !== null && cancelAnimationFrame(c.current);
715
715
  };
716
- }, [N, A]), X(() => {
716
+ }, [N, R]), X(() => {
717
717
  const w = u.current;
718
718
  w && (N ? w.play().catch((k) => {
719
- x(!1), O(!0);
719
+ x(!1), _(!0);
720
720
  }) : w.pause());
721
721
  }, [N]), X(() => {
722
- if (!A) return;
723
- const w = (B) => v(P(B)), k = (B) => {
724
- R(!1), F(P(B));
722
+ if (!R) return;
723
+ const w = (F) => v(D(F)), k = (F) => {
724
+ I(!1), B(D(F));
725
725
  };
726
726
  return window.addEventListener("mousemove", w), window.addEventListener("mouseup", k), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", k), () => {
727
727
  window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", k);
728
728
  };
729
- }, [A, P, F]);
730
- const Z = C ? { aspectRatio: String(C) } : void 0, J = C ? "" : " aspect-video", U = Math.round(p * 100);
729
+ }, [R, D, B]);
730
+ const Z = A ? { aspectRatio: String(A) } : void 0, J = A ? "" : " aspect-video", U = Math.round(p * 100);
731
731
  return /* @__PURE__ */ h(
732
732
  "div",
733
733
  {
@@ -740,7 +740,7 @@ const ra = (e) => {
740
740
  m(w);
741
741
  return;
742
742
  }
743
- z || l && x((k) => !k);
743
+ P || l && x((k) => !k);
744
744
  },
745
745
  onKeyDown: (w) => {
746
746
  if (!(w.key !== "Enter" && w.key !== " ")) {
@@ -748,11 +748,11 @@ const ra = (e) => {
748
748
  m(w);
749
749
  return;
750
750
  }
751
- z || l && x((k) => !k);
751
+ P || l && x((k) => !k);
752
752
  }
753
753
  },
754
754
  children: [
755
- s && (g === "audio" || L) && /* @__PURE__ */ n(
755
+ s && (g === "audio" || $) && /* @__PURE__ */ n(
756
756
  "img",
757
757
  {
758
758
  src: s,
@@ -760,7 +760,7 @@ const ra = (e) => {
760
760
  className: "absolute inset-0 h-full w-full object-cover"
761
761
  }
762
762
  ),
763
- !s && (g === "audio" || L) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: oe(t, {
763
+ !s && (g === "audio" || $) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: oe(t, {
764
764
  className: "size-12 text-black/20",
765
765
  weight: "regular"
766
766
  }) }),
@@ -772,12 +772,12 @@ const ra = (e) => {
772
772
  loop: i,
773
773
  muted: d,
774
774
  style: { width: "100%", height: "100%" },
775
- onLoadStart: () => E(!0),
775
+ onLoadStart: () => C(!0),
776
776
  onCanPlay: () => {
777
- E(!1), D(!1);
777
+ C(!1), T(!1);
778
778
  },
779
- onWaiting: () => E(!0),
780
- onPlay: () => O(!1),
779
+ onWaiting: () => C(!0),
780
+ onPlay: () => _(!1),
781
781
  onEnded: () => {
782
782
  i || (x(!1), v(0));
783
783
  },
@@ -792,15 +792,15 @@ const ra = (e) => {
792
792
  muted: d,
793
793
  playsInline: !0,
794
794
  style: { width: "100%", height: "100%" },
795
- onLoadStart: () => E(!0),
795
+ onLoadStart: () => C(!0),
796
796
  onCanPlay: () => {
797
- E(!1), D(!1);
797
+ C(!1), T(!1);
798
798
  },
799
- onWaiting: () => E(!0),
800
- onPlay: () => O(!1),
799
+ onWaiting: () => C(!0),
800
+ onPlay: () => _(!1),
801
801
  onLoadedMetadata: () => {
802
802
  const w = u.current;
803
- w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && I(w.videoWidth / w.videoHeight);
803
+ w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && S(w.videoWidth / w.videoHeight);
804
804
  },
805
805
  onEnded: () => {
806
806
  i || (x(!1), v(0));
@@ -808,14 +808,14 @@ const ra = (e) => {
808
808
  children: /* @__PURE__ */ n("track", { kind: "captions" })
809
809
  }
810
810
  ) }),
811
- S && !z && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
811
+ O && !P && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
812
812
  ve,
813
813
  {
814
814
  className: "size-8 animate-spin text-white/80",
815
815
  weight: "bold"
816
816
  }
817
817
  ) }),
818
- z && !l && /* @__PURE__ */ n(
818
+ P && !l && /* @__PURE__ */ n(
819
819
  "div",
820
820
  {
821
821
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -823,10 +823,10 @@ const ra = (e) => {
823
823
  tabIndex: 0,
824
824
  "aria-label": "Play preview",
825
825
  onClick: (w) => {
826
- w.stopPropagation(), T();
826
+ w.stopPropagation(), M();
827
827
  },
828
828
  onKeyDown: (w) => {
829
- w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), T());
829
+ w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), M());
830
830
  },
831
831
  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" }) })
832
832
  }
@@ -846,7 +846,7 @@ const ra = (e) => {
846
846
  onTouchStart: Y,
847
847
  onClick: (w) => w.stopPropagation(),
848
848
  onKeyDown: (w) => {
849
- w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
849
+ w.key === "ArrowRight" && B(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && B(Math.max(0, p - 0.05));
850
850
  },
851
851
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
852
852
  "div",
@@ -884,16 +884,16 @@ const ra = (e) => {
884
884
  onMouseDown: Y,
885
885
  onTouchStart: Y,
886
886
  onClick: (w) => w.stopPropagation(),
887
- onMouseEnter: () => M(!0),
888
- onMouseLeave: () => M(!1),
887
+ onMouseEnter: () => L(!0),
888
+ onMouseLeave: () => L(!1),
889
889
  onKeyDown: (w) => {
890
- w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
890
+ w.key === "ArrowRight" && B(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && B(Math.max(0, p - 0.05));
891
891
  },
892
892
  children: [
893
893
  /* @__PURE__ */ n(
894
894
  "div",
895
895
  {
896
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${_ || A ? "h-1.5" : "h-1"}`,
896
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${E || R ? "h-1.5" : "h-1"}`,
897
897
  children: /* @__PURE__ */ n(
898
898
  "div",
899
899
  {
@@ -906,7 +906,7 @@ const ra = (e) => {
906
906
  /* @__PURE__ */ n(
907
907
  "div",
908
908
  {
909
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${_ || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
909
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${E || R ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
910
910
  style: { left: `${U}%` }
911
911
  }
912
912
  )
@@ -926,7 +926,7 @@ const ra = (e) => {
926
926
  mediaPlayerProps: i,
927
927
  containedImage: l = !1
928
928
  }) => {
929
- const o = re(e), [d, m] = $(!1);
929
+ const o = re(e), [d, m] = z(!1);
930
930
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
931
931
  ia,
932
932
  {
@@ -1131,7 +1131,7 @@ const fa = ({
1131
1131
  url: e,
1132
1132
  filename: t
1133
1133
  }) => {
1134
- const [s, a] = $(!1);
1134
+ const [s, a] = z(!1);
1135
1135
  return /* @__PURE__ */ n(
1136
1136
  "button",
1137
1137
  {
@@ -1405,19 +1405,19 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1405
1405
  renderText: b,
1406
1406
  threadList: N,
1407
1407
  viewerLanguage: x
1408
- } = e, { client: p } = Xe("CustomMessage"), { channel: v } = ce("CustomMessage"), { isUnlocking: A, onUnlockClick: R, onFetchSource: _, onDownloadClick: M } = wa("LockedAttachment"), [z, O] = $(!1), S = Dn(c.id), { selected: E, voteUp: L, voteDown: D } = qs(c), {
1409
- Attachment: C = Pn,
1410
- EditMessageModal: I = On,
1411
- MessageActions: T,
1412
- MessageBlocked: P = zn,
1413
- MessageBouncePrompt: F = $n,
1408
+ } = e, { client: p } = Xe("CustomMessage"), { channel: v } = ce("CustomMessage"), { isUnlocking: R, onUnlockClick: I, onFetchSource: E, onDownloadClick: L } = wa("LockedAttachment"), [P, _] = z(!1), O = Dn(c.id), { selected: C, voteUp: $, voteDown: T } = qs(c), {
1409
+ Attachment: A = Pn,
1410
+ EditMessageModal: S = On,
1411
+ MessageActions: M,
1412
+ MessageBlocked: D = zn,
1413
+ MessageBouncePrompt: B = $n,
1414
1414
  MessageDeleted: Y = Fn,
1415
1415
  MessageIsThreadReplyInChannelButtonIndicator: Z = Bn,
1416
1416
  MessageRepliesCountButton: J = Un,
1417
1417
  ReminderNotification: U = jn,
1418
1418
  StreamedMessageText: w = Vn,
1419
1419
  PinIndicator: k
1420
- } = Vt("CustomMessage"), B = Gn(c), q = Hn(c), H = se(
1420
+ } = Vt("CustomMessage"), F = Gn(c), q = Hn(c), H = se(
1421
1421
  () => u == null ? void 0 : u(c),
1422
1422
  [u, c]
1423
1423
  ), V = se(() => {
@@ -1434,10 +1434,10 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1434
1434
  if (c.deleted_at || c.type === "deleted")
1435
1435
  return /* @__PURE__ */ n(Y, { message: c });
1436
1436
  if (qn(c))
1437
- return /* @__PURE__ */ n(P, {});
1437
+ return /* @__PURE__ */ n(D, {});
1438
1438
  const de = !N && !!c.reply_count, ue = !N && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((gt = c.error) == null ? void 0 : gt.status) !== 403, te = Wn(c);
1439
1439
  let Q;
1440
- me ? Q = () => m(c) : te && (Q = () => O(!0));
1440
+ me ? Q = () => m(c) : te && (Q = () => _(!0));
1441
1441
  const ee = f(), Sn = y(
1442
1442
  "str-chat__message str-chat__message-simple",
1443
1443
  `str-chat__message--${c.type}`,
@@ -1445,7 +1445,7 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1445
1445
  ee ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1446
1446
  c.text ? "str-chat__message--has-text" : "has-no-text",
1447
1447
  {
1448
- "str-chat__message--has-attachment": B,
1448
+ "str-chat__message--has-attachment": F,
1449
1449
  "str-chat__message--highlighted": g,
1450
1450
  "str-chat__message--pinned pinned-message": c.pinned,
1451
1451
  "str-chat__message--with-reactions": q,
@@ -1458,17 +1458,17 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1458
1458
  ), ut = c.poll_id && p.polls.fromState(c.poll_id), mt = ka(c), he = Ie(c), ht = Ca(c), Pe = !!(V != null && V.length && !c.quoted_message), ft = he && ee && Pe;
1459
1459
  return /* @__PURE__ */ h(ae, { children: [
1460
1460
  a && /* @__PURE__ */ n(
1461
- I,
1461
+ S,
1462
1462
  {
1463
1463
  additionalMessageInputProps: t
1464
1464
  }
1465
1465
  ),
1466
- z && /* @__PURE__ */ n(
1466
+ P && /* @__PURE__ */ n(
1467
1467
  Xn,
1468
1468
  {
1469
- MessageBouncePrompt: F,
1470
- onClose: () => O(!1),
1471
- open: z
1469
+ MessageBouncePrompt: B,
1470
+ onClose: () => _(!1),
1471
+ open: P
1472
1472
  }
1473
1473
  ),
1474
1474
  /* @__PURE__ */ h(
@@ -1478,7 +1478,7 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1478
1478
  "data-message-id": c.id,
1479
1479
  children: [
1480
1480
  k && /* @__PURE__ */ n(k, {}),
1481
- !!S && /* @__PURE__ */ n(U, { reminder: S }),
1481
+ !!O && /* @__PURE__ */ n(U, { reminder: O }),
1482
1482
  c.user && /* @__PURE__ */ n(
1483
1483
  ie,
1484
1484
  {
@@ -1510,7 +1510,7 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1510
1510
  },
1511
1511
  children: ht ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1512
1512
  ee ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1513
- T && /* @__PURE__ */ n(T, {}),
1513
+ M && /* @__PURE__ */ n(M, {}),
1514
1514
  /* @__PURE__ */ n(
1515
1515
  $t.Sent,
1516
1516
  {
@@ -1520,8 +1520,8 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1520
1520
  amountText: (wt = c.metadata) == null ? void 0 : wt.amount_text,
1521
1521
  detail: (Nt = c.metadata) == null ? void 0 : Nt.attachment_detail,
1522
1522
  paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
1523
- onPreviewClick: () => R == null ? void 0 : R(c, v),
1524
- onFetchSource: async () => await (_ == null ? void 0 : _(c, v))
1523
+ onPreviewClick: () => I == null ? void 0 : I(c, v),
1524
+ onFetchSource: async () => await (E == null ? void 0 : E(c, v))
1525
1525
  }
1526
1526
  )
1527
1527
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1534,13 +1534,13 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1534
1534
  amountText: (Et = c.metadata) == null ? void 0 : Et.amount_text,
1535
1535
  detail: (St = c.metadata) == null ? void 0 : St.attachment_detail,
1536
1536
  paymentStatus: (It = c.metadata) == null ? void 0 : It.payment_status,
1537
- isUnlocking: A(c.id),
1538
- onUnlockClick: () => R == null ? void 0 : R(c, v),
1539
- onFetchSource: async () => await (_ == null ? void 0 : _(c, v)),
1540
- onDownloadClick: () => M == null ? void 0 : M(c, v)
1537
+ isUnlocking: R(c.id),
1538
+ onUnlockClick: () => I == null ? void 0 : I(c, v),
1539
+ onFetchSource: async () => await (E == null ? void 0 : E(c, v)),
1540
+ onDownloadClick: () => L == null ? void 0 : L(c, v)
1541
1541
  }
1542
1542
  ),
1543
- T && /* @__PURE__ */ n(T, {})
1543
+ M && /* @__PURE__ */ n(M, {})
1544
1544
  ] }),
1545
1545
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1546
1546
  Rt,
@@ -1563,7 +1563,7 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1563
1563
  ),
1564
1564
  ut && /* @__PURE__ */ n(Kn, { poll: ut }),
1565
1565
  V != null && V.length && !c.quoted_message ? /* @__PURE__ */ n(
1566
- C,
1566
+ A,
1567
1567
  {
1568
1568
  actionHandler: o,
1569
1569
  attachments: V
@@ -1598,9 +1598,9 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1598
1598
  s && he && /* @__PURE__ */ n(
1599
1599
  Ea,
1600
1600
  {
1601
- selected: E,
1602
- onVoteUp: L,
1603
- onVoteDown: D
1601
+ selected: C,
1602
+ onVoteUp: $,
1603
+ onVoteDown: T
1604
1604
  }
1605
1605
  )
1606
1606
  ] }),
@@ -2058,9 +2058,9 @@ const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2058
2058
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2059
2059
  ] }) }));
2060
2060
  Te.displayName = "LoadingState";
2061
- const be = ({ participant: e, isStarred: t = !1 }) => {
2062
- const s = (e == null ? void 0 : e.customer) === !0;
2063
- return !s && !t ? null : /* @__PURE__ */ h("span", { className: "inline-flex shrink-0 items-center gap-1", children: [
2061
+ const be = ({ channel: e, participant: t }) => {
2062
+ const s = (t == null ? void 0 : t.customer) === !0, a = Xt(e);
2063
+ return !s && !a ? null : /* @__PURE__ */ h("span", { className: "inline-flex shrink-0 items-center gap-1", children: [
2064
2064
  s && /* @__PURE__ */ n(
2065
2065
  "span",
2066
2066
  {
@@ -2077,7 +2077,7 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2077
2077
  )
2078
2078
  }
2079
2079
  ),
2080
- t && /* @__PURE__ */ n(
2080
+ a && /* @__PURE__ */ n(
2081
2081
  "span",
2082
2082
  {
2083
2083
  role: "img",
@@ -2106,26 +2106,26 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2106
2106
  onParticipantNameClick: N,
2107
2107
  renderHeaderTitleBadges: x
2108
2108
  }) => {
2109
- var O, S, E, L, D;
2109
+ var _, O, C, $, T;
2110
2110
  const { channel: p } = ce(), v = j.useMemo(() => {
2111
- var T, P;
2112
- const C = (T = p._client) == null ? void 0 : T.userID;
2113
- return C ? Object.values(((P = p.state) == null ? void 0 : P.members) || {}).find(
2114
- (F) => {
2111
+ var M, D;
2112
+ const A = (M = p._client) == null ? void 0 : M.userID;
2113
+ return A ? Object.values(((D = p.state) == null ? void 0 : D.members) || {}).find(
2114
+ (B) => {
2115
2115
  var Y;
2116
- return ((Y = F.user) == null ? void 0 : Y.id) && F.user.id !== C;
2116
+ return ((Y = B.user) == null ? void 0 : Y.id) && B.user.id !== A;
2117
2117
  }
2118
2118
  ) : void 0;
2119
- }, [(O = p._client) == null ? void 0 : O.userID, (S = p.state) == null ? void 0 : S.members]), A = Kt(v == null ? void 0 : v.user), R = (E = v == null ? void 0 : v.user) == null ? void 0 : E.image, _ = Xt(p), M = x == null ? void 0 : x({
2119
+ }, [(_ = p._client) == null ? void 0 : _.userID, (O = p.state) == null ? void 0 : O.members]), R = Kt(v == null ? void 0 : v.user), I = (C = v == null ? void 0 : v.user) == null ? void 0 : C.image, E = Xt(p), L = x == null ? void 0 : x({
2120
2120
  channel: p,
2121
2121
  participant: v
2122
- }), z = async () => {
2122
+ }), P = async () => {
2123
2123
  try {
2124
- _ ? await p.unpin() : await p.pin();
2125
- } catch (C) {
2124
+ E ? await p.unpin() : await p.pin();
2125
+ } catch (A) {
2126
2126
  console.error(
2127
2127
  "[CustomChannelHeader] Failed to update pinned status:",
2128
- C
2128
+ A
2129
2129
  );
2130
2130
  }
2131
2131
  };
@@ -2149,9 +2149,9 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2149
2149
  /* @__PURE__ */ n(
2150
2150
  ie,
2151
2151
  {
2152
- id: ((L = v == null ? void 0 : v.user) == null ? void 0 : L.id) || p.id || "unknown",
2153
- name: A,
2154
- image: R,
2152
+ id: (($ = v == null ? void 0 : v.user) == null ? void 0 : $.id) || p.id || "unknown",
2153
+ name: R,
2154
+ image: I,
2155
2155
  dmAgentEnabled: a,
2156
2156
  size: 48
2157
2157
  }
@@ -2161,31 +2161,31 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2161
2161
  {
2162
2162
  type: "button",
2163
2163
  onClick: N,
2164
- "aria-label": `View details for ${A}`,
2164
+ "aria-label": `View details for ${R}`,
2165
2165
  className: "flex max-w-full items-center gap-0.5 rounded text-center text-xs font-medium text-black/90 transition-opacity hover:opacity-70",
2166
2166
  children: [
2167
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2167
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: R }),
2168
2168
  /* @__PURE__ */ n(
2169
2169
  be,
2170
2170
  {
2171
- participant: v,
2172
- isStarred: _
2171
+ channel: p,
2172
+ participant: v
2173
2173
  }
2174
2174
  ),
2175
- M && /* @__PURE__ */ n("span", { className: "shrink-0", children: M }),
2175
+ L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
2176
2176
  /* @__PURE__ */ n(Ge, { className: "size-3 shrink-0", weight: "bold" })
2177
2177
  ]
2178
2178
  }
2179
2179
  ) : /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
2180
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2180
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: R }),
2181
2181
  /* @__PURE__ */ n(
2182
2182
  be,
2183
2183
  {
2184
- participant: v,
2185
- isStarred: _
2184
+ channel: p,
2185
+ participant: v
2186
2186
  }
2187
2187
  ),
2188
- M && /* @__PURE__ */ n("span", { className: "shrink-0", children: M })
2188
+ L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
2189
2189
  ] }),
2190
2190
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2191
2191
  /* @__PURE__ */ n(Ve, { className: "size-3 shrink-0 text-black/55" }),
@@ -2197,17 +2197,17 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2197
2197
  "button",
2198
2198
  {
2199
2199
  className: le,
2200
- onClick: z,
2200
+ onClick: P,
2201
2201
  type: "button",
2202
- "aria-label": _ ? "Unstar conversation" : "Star conversation",
2202
+ "aria-label": E ? "Unstar conversation" : "Star conversation",
2203
2203
  children: /* @__PURE__ */ n(
2204
2204
  Se,
2205
2205
  {
2206
2206
  className: y("size-5", {
2207
- "text-yellow-600": _,
2208
- "text-black/90": !_
2207
+ "text-yellow-600": E,
2208
+ "text-black/90": !E
2209
2209
  }),
2210
- weight: _ ? "duotone" : "regular"
2210
+ weight: E ? "duotone" : "regular"
2211
2211
  }
2212
2212
  )
2213
2213
  }
@@ -2249,9 +2249,9 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2249
2249
  /* @__PURE__ */ n(
2250
2250
  ie,
2251
2251
  {
2252
- id: ((D = v == null ? void 0 : v.user) == null ? void 0 : D.id) || p.id || "unknown",
2253
- name: A,
2254
- image: R,
2252
+ id: ((T = v == null ? void 0 : v.user) == null ? void 0 : T.id) || p.id || "unknown",
2253
+ name: R,
2254
+ image: I,
2255
2255
  dmAgentEnabled: a,
2256
2256
  size: 48
2257
2257
  }
@@ -2262,31 +2262,31 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2262
2262
  {
2263
2263
  type: "button",
2264
2264
  onClick: N,
2265
- "aria-label": `View details for ${A}`,
2265
+ "aria-label": `View details for ${R}`,
2266
2266
  className: "flex min-w-0 max-w-full items-center gap-1 rounded font-medium text-black/90 transition-opacity hover:opacity-70",
2267
2267
  children: [
2268
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2268
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: R }),
2269
2269
  /* @__PURE__ */ n(
2270
2270
  be,
2271
2271
  {
2272
- participant: v,
2273
- isStarred: _
2272
+ channel: p,
2273
+ participant: v
2274
2274
  }
2275
2275
  ),
2276
- M && /* @__PURE__ */ n("span", { className: "shrink-0", children: M }),
2276
+ L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
2277
2277
  /* @__PURE__ */ n(Ge, { className: "size-4 shrink-0", weight: "bold" })
2278
2278
  ]
2279
2279
  }
2280
2280
  ) : /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2281
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2281
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: R }),
2282
2282
  /* @__PURE__ */ n(
2283
2283
  be,
2284
2284
  {
2285
- participant: v,
2286
- isStarred: _
2285
+ channel: p,
2286
+ participant: v
2287
2287
  }
2288
2288
  ),
2289
- M && /* @__PURE__ */ n("span", { className: "shrink-0", children: M })
2289
+ L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
2290
2290
  ] }),
2291
2291
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2292
2292
  /* @__PURE__ */ n(Ve, { className: "size-3 shrink-0 text-black/55" }),
@@ -2299,17 +2299,17 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2299
2299
  "button",
2300
2300
  {
2301
2301
  className: le,
2302
- onClick: z,
2302
+ onClick: P,
2303
2303
  type: "button",
2304
- "aria-label": _ ? "Unstar conversation" : "Star conversation",
2304
+ "aria-label": E ? "Unstar conversation" : "Star conversation",
2305
2305
  children: /* @__PURE__ */ n(
2306
2306
  Se,
2307
2307
  {
2308
2308
  className: y("size-6", {
2309
- "text-yellow-600": _,
2310
- "text-black/90": !_
2309
+ "text-yellow-600": E,
2310
+ "text-black/90": !E
2311
2311
  }),
2312
- weight: _ ? "duotone" : "regular"
2312
+ weight: E ? "duotone" : "regular"
2313
2313
  }
2314
2314
  )
2315
2315
  }
@@ -2354,50 +2354,50 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2354
2354
  chatbotVotingEnabled: x = !1,
2355
2355
  renderChannelBanner: p,
2356
2356
  renderHeaderTitleBadges: v,
2357
- customChannelActions: A,
2358
- renderChannelActions: R,
2359
- renderMessage: _,
2360
- dmAgentEnabled: M = !1,
2361
- viewerLanguage: z,
2362
- showChannelInfo: O = !0,
2363
- onParticipantNameClick: S
2357
+ customChannelActions: R,
2358
+ renderChannelActions: I,
2359
+ renderMessage: E,
2360
+ dmAgentEnabled: L = !1,
2361
+ viewerLanguage: P,
2362
+ showChannelInfo: _ = !0,
2363
+ onParticipantNameClick: O
2364
2364
  }) => {
2365
- var F, Y, Z, J, U, w;
2366
- const { channel: E } = ce(), L = j.useMemo(() => {
2365
+ var B, Y, Z, J, U, w;
2366
+ const { channel: C } = ce(), $ = j.useMemo(() => {
2367
2367
  var q, H;
2368
- const k = (q = E._client) == null ? void 0 : q.userID;
2369
- return k ? Object.values(((H = E.state) == null ? void 0 : H.members) || {}).find(
2368
+ const k = (q = C._client) == null ? void 0 : q.userID;
2369
+ return k ? Object.values(((H = C.state) == null ? void 0 : H.members) || {}).find(
2370
2370
  (V) => {
2371
2371
  var W;
2372
2372
  return ((W = V.user) == null ? void 0 : W.id) && V.user.id !== k;
2373
2373
  }
2374
2374
  ) : void 0;
2375
- }, [(F = E._client) == null ? void 0 : F.userID, (Y = E.state) == null ? void 0 : Y.members]), D = j.useMemo(() => {
2375
+ }, [(B = C._client) == null ? void 0 : B.userID, (Y = C.state) == null ? void 0 : Y.members]), T = j.useMemo(() => {
2376
2376
  var q, H;
2377
- const k = (q = E._client) == null ? void 0 : q.userID;
2378
- return k ? Object.values(((H = E.state) == null ? void 0 : H.members) || {}).find((V) => {
2377
+ const k = (q = C._client) == null ? void 0 : q.userID;
2378
+ return k ? Object.values(((H = C.state) == null ? void 0 : H.members) || {}).find((V) => {
2379
2379
  var W;
2380
2380
  return ((W = V.user) == null ? void 0 : W.id) === k;
2381
2381
  }) : void 0;
2382
- }, [(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 = M && C === !1 && I === !0, P = K(
2382
+ }, [(Z = C._client) == null ? void 0 : Z.userID, (J = C.state) == null ? void 0 : J.members]), A = ((U = T == null ? void 0 : T.user) == null ? void 0 : U.is_account) ?? (T == null ? void 0 : T.is_account), S = ((w = $ == null ? void 0 : $.user) == null ? void 0 : w.is_account) ?? ($ == null ? void 0 : $.is_account), M = L && A === !1 && S === !0, D = K(
2383
2383
  (k) => {
2384
- const { message: B } = we("ChannelView"), q = /* @__PURE__ */ n(
2384
+ const { message: F } = we("ChannelView"), q = /* @__PURE__ */ n(
2385
2385
  Ta,
2386
2386
  {
2387
2387
  ...k,
2388
2388
  chatbotVotingEnabled: x,
2389
- viewerLanguage: z
2389
+ viewerLanguage: P
2390
2390
  }
2391
2391
  );
2392
- return !_ || !B ? q : _(q, B);
2392
+ return !E || !F ? q : E(q, F);
2393
2393
  },
2394
- [x, _, z]
2394
+ [x, E, P]
2395
2395
  );
2396
2396
  return /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(
2397
2397
  cs,
2398
2398
  {
2399
2399
  overrides: {
2400
- Message: P,
2400
+ Message: D,
2401
2401
  MessageActions: Ra
2402
2402
  },
2403
2403
  children: /* @__PURE__ */ h(ds, { children: [
@@ -2406,9 +2406,9 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2406
2406
  {
2407
2407
  onBack: e,
2408
2408
  showBackButton: t,
2409
- showChannelInfo: O,
2409
+ showChannelInfo: _,
2410
2410
  showStarButton: N,
2411
- dmAgentEnabled: T,
2411
+ dmAgentEnabled: M,
2412
2412
  onLeaveConversation: i,
2413
2413
  onBlockParticipant: l,
2414
2414
  showDeleteConversation: o,
@@ -2417,9 +2417,9 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2417
2417
  onDeleteConversationClick: d,
2418
2418
  onBlockParticipantClick: m,
2419
2419
  onReportParticipantClick: g,
2420
- customChannelActions: A,
2421
- renderChannelActions: R,
2422
- onParticipantNameClick: S,
2420
+ customChannelActions: R,
2421
+ renderChannelActions: I,
2422
+ onParticipantNameClick: O,
2423
2423
  renderHeaderTitleBadges: v
2424
2424
  }
2425
2425
  ) }, "lt-channel-header"),
@@ -2432,14 +2432,14 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2432
2432
  },
2433
2433
  "lt-channel-message-list"
2434
2434
  ),
2435
- r ? /* @__PURE__ */ n(j.Fragment, { children: r(E) }, "lt-channel-conversation-footer") : null,
2435
+ r ? /* @__PURE__ */ n(j.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
2436
2436
  /* @__PURE__ */ n(
2437
2437
  $a,
2438
2438
  {
2439
2439
  ...s && {
2440
- renderActions: () => s == null ? void 0 : s(E)
2440
+ renderActions: () => s == null ? void 0 : s(C)
2441
2441
  },
2442
- renderFooter: () => a == null ? void 0 : a(E),
2442
+ renderFooter: () => a == null ? void 0 : a(C),
2443
2443
  disabled: c,
2444
2444
  disabledReason: b
2445
2445
  },
@@ -2469,54 +2469,54 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2469
2469
  composerDisabled: x = !1,
2470
2470
  composerDisabledReason: p,
2471
2471
  dmAgentEnabled: v,
2472
- messageMetadata: A,
2473
- onMessageSent: R,
2474
- showStarButton: _ = !1,
2475
- chatbotVotingEnabled: M = !1,
2476
- renderChannelBanner: z,
2477
- renderHeaderTitleBadges: O,
2478
- customChannelActions: S,
2479
- renderChannelActions: E,
2480
- renderMessage: L,
2481
- onMessageLinkClick: D,
2482
- sendButton: C,
2483
- attachmentPreviewList: I,
2484
- viewerLanguage: T,
2485
- showChannelInfo: P = !0,
2486
- onParticipantNameClick: F
2472
+ messageMetadata: R,
2473
+ onMessageSent: I,
2474
+ showStarButton: E = !1,
2475
+ chatbotVotingEnabled: L = !1,
2476
+ renderChannelBanner: P,
2477
+ renderHeaderTitleBadges: _,
2478
+ customChannelActions: O,
2479
+ renderChannelActions: C,
2480
+ renderMessage: $,
2481
+ onMessageLinkClick: T,
2482
+ sendButton: A,
2483
+ attachmentPreviewList: S,
2484
+ viewerLanguage: M,
2485
+ showChannelInfo: D = !0,
2486
+ onParticipantNameClick: B
2487
2487
  }) => {
2488
2488
  const Y = K(
2489
2489
  async (J, U, w) => {
2490
2490
  var W;
2491
- const k = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, B = v && !k, q = {
2491
+ const k = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, F = v && !k, q = {
2492
2492
  ...U,
2493
- ...B && { silent: !0 },
2494
- ...A && {
2493
+ ...F && { silent: !0 },
2494
+ ...R && {
2495
2495
  metadata: {
2496
2496
  ...U.metadata ?? {},
2497
- ...A
2497
+ ...R
2498
2498
  }
2499
2499
  }
2500
2500
  }, H = {
2501
2501
  ...w,
2502
- ...B && { skip_push: !0 }
2502
+ ...F && { skip_push: !0 }
2503
2503
  }, V = await e.sendMessage(q, H);
2504
- return R == null || R(V), V;
2504
+ return I == null || I(V), V;
2505
2505
  },
2506
- [e, v, A, R]
2506
+ [e, v, R, I]
2507
2507
  ), Z = G(null);
2508
2508
  return X(() => {
2509
- if (!D) return;
2509
+ if (!T) return;
2510
2510
  const J = Z.current;
2511
2511
  if (!J) return;
2512
2512
  const U = (w) => {
2513
- const k = w.target, B = k == null ? void 0 : k.closest("a[href]"), q = B == null ? void 0 : B.getAttribute("href");
2513
+ const k = w.target, F = k == null ? void 0 : k.closest("a[href]"), q = F == null ? void 0 : F.getAttribute("href");
2514
2514
  if (!q) return;
2515
- 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;
2516
- D(q, W);
2515
+ const H = F == null ? void 0 : F.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;
2516
+ T(q, W);
2517
2517
  };
2518
2518
  return J.addEventListener("click", U), () => J.removeEventListener("click", U);
2519
- }, [D, e]), /* @__PURE__ */ n(
2519
+ }, [T, e]), /* @__PURE__ */ n(
2520
2520
  "div",
2521
2521
  {
2522
2522
  ref: Z,
@@ -2534,8 +2534,8 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2534
2534
  DateSeparator: Hs,
2535
2535
  TypingIndicator: Xa,
2536
2536
  doSendMessageRequest: Y,
2537
- ...C ? { SendButton: C } : {},
2538
- ...I ? { AttachmentPreviewList: I } : {},
2537
+ ...A ? { SendButton: A } : {},
2538
+ ...S ? { AttachmentPreviewList: S } : {},
2539
2539
  children: /* @__PURE__ */ n(
2540
2540
  er,
2541
2541
  {
@@ -2555,17 +2555,17 @@ const be = ({ participant: e, isStarred: t = !1 }) => {
2555
2555
  showReportParticipant: N,
2556
2556
  composerDisabled: x,
2557
2557
  composerDisabledReason: p,
2558
- showStarButton: _,
2558
+ showStarButton: E,
2559
2559
  dmAgentEnabled: v,
2560
- chatbotVotingEnabled: M,
2561
- renderChannelBanner: z,
2562
- renderHeaderTitleBadges: O,
2563
- customChannelActions: S,
2564
- renderChannelActions: E,
2565
- renderMessage: L,
2566
- viewerLanguage: T,
2567
- showChannelInfo: P,
2568
- onParticipantNameClick: F
2560
+ chatbotVotingEnabled: L,
2561
+ renderChannelBanner: P,
2562
+ renderHeaderTitleBadges: _,
2563
+ customChannelActions: O,
2564
+ renderChannelActions: C,
2565
+ renderMessage: $,
2566
+ viewerLanguage: M,
2567
+ showChannelInfo: D,
2568
+ onParticipantNameClick: B
2569
2569
  }
2570
2570
  )
2571
2571
  }
@@ -2610,28 +2610,28 @@ const Si = ({
2610
2610
  customChannelActions: x,
2611
2611
  renderChannelActions: p,
2612
2612
  onParticipantNameClick: v,
2613
- renderMessage: A,
2614
- onMessageLinkClick: R,
2615
- showChannelInfo: _
2613
+ renderMessage: R,
2614
+ onMessageLinkClick: I,
2615
+ showChannelInfo: E
2616
2616
  }) => {
2617
2617
  const {
2618
- client: M,
2619
- isConnected: z,
2620
- isLoading: O,
2621
- error: S,
2622
- refreshConnection: E,
2623
- service: L,
2624
- debug: D
2625
- } = $s(), [C, I] = $(null), [T, P] = $(null), [F, Y] = $(!1), { showDeleteConversation: Z = !0 } = e, J = G(l);
2618
+ client: L,
2619
+ isConnected: P,
2620
+ isLoading: _,
2621
+ error: O,
2622
+ refreshConnection: C,
2623
+ service: $,
2624
+ debug: T
2625
+ } = $s(), [A, S] = z(null), [M, D] = z(null), [B, Y] = z(!1), { showDeleteConversation: Z = !0 } = e, J = G(l);
2626
2626
  J.current = l;
2627
2627
  const U = G(a);
2628
2628
  U.current = a;
2629
2629
  const w = G(null), k = G(null);
2630
2630
  X(() => {
2631
- k.current = C;
2632
- }, [C]), X(() => {
2633
- if (!M || !z) return;
2634
- const H = M.userID;
2631
+ k.current = A;
2632
+ }, [A]), X(() => {
2633
+ if (!L || !P) return;
2634
+ const H = L.userID;
2635
2635
  if (!H) return;
2636
2636
  const V = `${H}::${i}`;
2637
2637
  if (w.current === V) return;
@@ -2642,11 +2642,11 @@ const Si = ({
2642
2642
  (async () => {
2643
2643
  var ue, me;
2644
2644
  try {
2645
- D && console.log(
2645
+ T && console.log(
2646
2646
  "[MessagingShell] Loading initial conversation with:",
2647
2647
  i
2648
2648
  );
2649
- const te = await M.queryChannels(
2649
+ const te = await L.queryChannels(
2650
2650
  {
2651
2651
  type: "messaging",
2652
2652
  members: { $eq: [H, i] }
@@ -2655,27 +2655,27 @@ const Si = ({
2655
2655
  { limit: 1 }
2656
2656
  );
2657
2657
  if (te.length > 0) {
2658
- I(te[0]), P(null), (ue = U.current) == null || ue.call(U, te[0]), D && console.log(
2658
+ S(te[0]), D(null), (ue = U.current) == null || ue.call(U, te[0]), T && console.log(
2659
2659
  "[MessagingShell] Initial conversation loaded:",
2660
2660
  te[0].id
2661
2661
  );
2662
2662
  return;
2663
2663
  }
2664
2664
  const Q = J.current;
2665
- if (!Q || !L) {
2666
- W(), P("No conversation found with this account"), D && console.log(
2665
+ if (!Q || !$) {
2666
+ W(), D("No conversation found with this account"), T && console.log(
2667
2667
  "[MessagingShell] No conversation found for:",
2668
2668
  i
2669
2669
  );
2670
2670
  return;
2671
2671
  }
2672
2672
  try {
2673
- const ee = await L.startChannelWithParticipant({
2673
+ const ee = await $.startChannelWithParticipant({
2674
2674
  id: Q.id,
2675
2675
  name: Q.name,
2676
2676
  phone: Q.phone
2677
2677
  });
2678
- I(ee), P(null), (me = U.current) == null || me.call(U, ee), D && console.log(
2678
+ S(ee), D(null), (me = U.current) == null || me.call(U, ee), T && console.log(
2679
2679
  "[MessagingShell] Channel created and loaded:",
2680
2680
  ee.id
2681
2681
  );
@@ -2683,32 +2683,32 @@ const Si = ({
2683
2683
  console.error(
2684
2684
  "[MessagingShell] Failed to create conversation:",
2685
2685
  ee
2686
- ), W(), P("Failed to create conversation");
2686
+ ), W(), D("Failed to create conversation");
2687
2687
  }
2688
2688
  } catch (te) {
2689
2689
  console.error(
2690
2690
  "[MessagingShell] Failed to load initial conversation:",
2691
2691
  te
2692
- ), W(), k.current || P("Failed to load conversation");
2692
+ ), W(), k.current || D("Failed to load conversation");
2693
2693
  }
2694
2694
  })();
2695
- }, [i, M, z, L, D]);
2696
- const B = G(r);
2697
- B.current = r;
2695
+ }, [i, L, P, $, T]);
2696
+ const F = G(r);
2697
+ F.current = r;
2698
2698
  const q = K(() => {
2699
2699
  var H;
2700
- I(null), Y(!0), (H = B.current) == null || H.call(B);
2700
+ S(null), Y(!0), (H = F.current) == null || H.call(F);
2701
2701
  }, []);
2702
- return O ? /* @__PURE__ */ n(Te, {}) : S ? /* @__PURE__ */ n(pe, { message: S, onBack: E }) : !z || !M ? /* @__PURE__ */ n(
2702
+ return _ ? /* @__PURE__ */ n(Te, {}) : O ? /* @__PURE__ */ n(pe, { message: O, onBack: C }) : !P || !L ? /* @__PURE__ */ n(
2703
2703
  pe,
2704
2704
  {
2705
2705
  message: "Not connected to messaging service",
2706
- onBack: E
2706
+ onBack: C
2707
2707
  }
2708
- ) : T ? /* @__PURE__ */ n(pe, { message: T }) : F && !C ? /* @__PURE__ */ n(pe, { 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(
2708
+ ) : M ? /* @__PURE__ */ n(pe, { message: M }) : B && !A ? /* @__PURE__ */ n(pe, { message: "Conversation ended" }) : A ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2709
2709
  mn,
2710
2710
  {
2711
- channel: C,
2711
+ channel: A,
2712
2712
  renderMessageInputActions: t,
2713
2713
  renderConversationFooter: s,
2714
2714
  renderChannelBanner: N,
@@ -2726,11 +2726,11 @@ const Si = ({
2726
2726
  customChannelActions: x,
2727
2727
  renderChannelActions: p,
2728
2728
  onParticipantNameClick: v,
2729
- renderMessage: A,
2730
- onMessageLinkClick: R,
2731
- showChannelInfo: _
2729
+ renderMessage: R,
2730
+ onMessageLinkClick: I,
2731
+ showChannelInfo: E
2732
2732
  },
2733
- C.id
2733
+ A.id
2734
2734
  ) }) }) : /* @__PURE__ */ n(Te, {});
2735
2735
  };
2736
2736
  function tr(e) {
@@ -2769,7 +2769,7 @@ const hn = j.createContext({
2769
2769
  });
2770
2770
  }, fn = j.memo(
2771
2771
  ({ channel: e, unread: t }) => {
2772
- var M, z, O;
2772
+ var E, L, P;
2773
2773
  const {
2774
2774
  selectedChannel: s,
2775
2775
  onChannelSelect: a,
@@ -2778,39 +2778,39 @@ const hn = j.createContext({
2778
2778
  viewerLanguage: l
2779
2779
  } = sr(), o = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2780
2780
  e && a(e);
2781
- }, m = (S) => {
2782
- const E = S.key === "Enter" || S.key === " ", L = S.repeat;
2783
- !E || L || (S.preventDefault(), d());
2784
- }, u = Object.values(((M = e == null ? void 0 : e.state) == null ? void 0 : M.members) || {}).find(
2785
- (S) => {
2786
- var E, L;
2787
- return ((E = S.user) == null ? void 0 : E.id) && S.user.id !== ((L = e == null ? void 0 : e._client) == null ? void 0 : L.userID);
2781
+ }, m = (_) => {
2782
+ const O = _.key === "Enter" || _.key === " ", C = _.repeat;
2783
+ !O || C || (_.preventDefault(), d());
2784
+ }, u = Object.values(((E = e == null ? void 0 : e.state) == null ? void 0 : E.members) || {}).find(
2785
+ (_) => {
2786
+ var O, C;
2787
+ return ((O = _.user) == null ? void 0 : O.id) && _.user.id !== ((C = e == null ? void 0 : e._client) == null ? void 0 : C.userID);
2788
2788
  }
2789
- ), f = Kt(u == null ? void 0 : u.user), c = (z = u == null ? void 0 : u.user) == null ? void 0 : z.image, b = (() => {
2790
- var E;
2791
- const S = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
2792
- if (S != null && S.length) {
2793
- for (let L = S.length - 1; L >= 0; L--)
2794
- if (S[L].type !== "system") return S[L];
2789
+ ), f = Kt(u == null ? void 0 : u.user), c = (L = u == null ? void 0 : u.user) == null ? void 0 : L.image, b = (() => {
2790
+ var O;
2791
+ const _ = (O = e == null ? void 0 : e.state) == null ? void 0 : O.messages;
2792
+ if (_ != null && _.length) {
2793
+ for (let C = _.length - 1; C >= 0; C--)
2794
+ if (_[C].type !== "system") return _[C];
2795
2795
  }
2796
2796
  })(), x = (() => {
2797
- var I, T, P, F;
2798
- const S = Jt({
2797
+ var A, S, M, D;
2798
+ const _ = Jt({
2799
2799
  message: b,
2800
2800
  viewerLanguage: l
2801
2801
  });
2802
- if (((I = b == null ? void 0 : b.metadata) == null ? void 0 : I.custom_type) === "MESSAGE_TIP") return S ? `💵 ${S}` : "💵 Sent a tip";
2803
- if (((T = b == null ? void 0 : b.metadata) == null ? void 0 : T.custom_type) === "MESSAGE_PAID") return S ? `💰 ${S}` : "💰 Sent a message";
2804
- if (((P = b == null ? void 0 : b.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_ATTACHMENT") return S ? `📎 ${S}` : "📎 Sent an attachment";
2805
- if (S) return S;
2806
- const C = (F = b == null ? void 0 : b.attachments) == null ? void 0 : F[0];
2807
- 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";
2808
- })(), p = b != null && b.created_at ? rr(new Date(b.created_at)) : "", v = b ? Ie(b) : !1, A = i ? i(b, x) : `${v ? "✨ " : ""}${x}`, R = Xt(e), _ = t ?? 0;
2802
+ if (((A = b == null ? void 0 : b.metadata) == null ? void 0 : A.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
2803
+ if (((S = b == null ? void 0 : b.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return _ ? `💰 ${_}` : "💰 Sent a message";
2804
+ if (((M = b == null ? void 0 : b.metadata) == null ? void 0 : M.custom_type) === "MESSAGE_ATTACHMENT") return _ ? `📎 ${_}` : "📎 Sent an attachment";
2805
+ if (_) return _;
2806
+ const T = (D = b == null ? void 0 : b.attachments) == null ? void 0 : D[0];
2807
+ return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2808
+ })(), p = b != null && b.created_at ? rr(new Date(b.created_at)) : "", v = b ? Ie(b) : !1, R = i ? i(b, x) : `${v ? "✨ " : ""}${x}`, I = t ?? 0;
2809
2809
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2810
2810
  channelId: e == null ? void 0 : e.id,
2811
2811
  isSelected: o,
2812
2812
  participantName: f,
2813
- unreadCount: _,
2813
+ unreadCount: I,
2814
2814
  hasTimestamp: !!p
2815
2815
  }), /* @__PURE__ */ n(
2816
2816
  "div",
@@ -2830,7 +2830,7 @@ const hn = j.createContext({
2830
2830
  /* @__PURE__ */ n(
2831
2831
  ie,
2832
2832
  {
2833
- id: ((O = u == null ? void 0 : u.user) == null ? void 0 : O.id) || e.id || "unknown",
2833
+ id: ((P = u == null ? void 0 : u.user) == null ? void 0 : P.id) || e.id || "unknown",
2834
2834
  name: f,
2835
2835
  image: c,
2836
2836
  size: 48
@@ -2843,16 +2843,16 @@ const hn = j.createContext({
2843
2843
  /* @__PURE__ */ n(
2844
2844
  be,
2845
2845
  {
2846
- participant: u,
2847
- isStarred: R
2846
+ channel: e,
2847
+ participant: u
2848
2848
  }
2849
2849
  )
2850
2850
  ] }),
2851
2851
  p && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: p })
2852
2852
  ] }),
2853
2853
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2854
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
2855
- _ > 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: _ > 99 ? "99+" : _ })
2854
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: R }),
2855
+ I > 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: I > 99 ? "99+" : I })
2856
2856
  ] })
2857
2857
  ] })
2858
2858
  ] })
@@ -3746,7 +3746,7 @@ const Fr = ({
3746
3746
  tone: i = "dark",
3747
3747
  onTriggered: l
3748
3748
  }) => {
3749
- const [o, d] = $(!1), m = K(
3749
+ const [o, d] = z(!1), m = K(
3750
3750
  (c) => {
3751
3751
  c.stopPropagation(), !o && (d(!0), pn(e, t).catch(() => {
3752
3752
  }).finally(() => {
@@ -3827,7 +3827,7 @@ const Fr = ({
3827
3827
  initialIndex: t,
3828
3828
  open: s
3829
3829
  }) => {
3830
- const a = Ue(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
3830
+ const a = Ue(t, 0, Math.max(e - 1, 0)), [r, i] = z(a);
3831
3831
  X(() => {
3832
3832
  s && i(Ue(t, 0, Math.max(e - 1, 0)));
3833
3833
  }, [s, t, e]), X(() => {
@@ -4064,7 +4064,7 @@ const Fr = ({
4064
4064
  }
4065
4065
  );
4066
4066
  }, Ce = (e) => {
4067
- const [t, s] = $(!1), [a, r] = $(0), i = K(
4067
+ const [t, s] = z(!1), [a, r] = z(0), i = K(
4068
4068
  (o) => {
4069
4069
  (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
4070
4070
  },
@@ -4281,14 +4281,14 @@ const Fr = ({
4281
4281
  groupPosition: o,
4282
4282
  "data-testid": "pdf-attachment",
4283
4283
  children: [
4284
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((v, A) => {
4285
- const R = v.filename ?? ne(v.src), _ = x && A === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4284
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((v, R) => {
4285
+ const I = v.filename ?? ne(v.src), E = x && R === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4286
4286
  vn,
4287
4287
  {
4288
4288
  url: v.src,
4289
- filename: R,
4289
+ filename: I,
4290
4290
  variant: "inline",
4291
- label: `Download ${R}`,
4291
+ label: `Download ${I}`,
4292
4292
  tone: g
4293
4293
  }
4294
4294
  );
@@ -4297,11 +4297,11 @@ const Fr = ({
4297
4297
  {
4298
4298
  variant: g,
4299
4299
  item: v,
4300
- index: A,
4300
+ index: R,
4301
4301
  onActivate: b,
4302
- trailingAction: _
4302
+ trailingAction: E
4303
4303
  },
4304
- `${v.src}-${A}`
4304
+ `${v.src}-${R}`
4305
4305
  );
4306
4306
  }) }),
4307
4307
  /* @__PURE__ */ n(
@@ -4594,4 +4594,4 @@ export {
4594
4594
  Kt as y,
4595
4595
  wa as z
4596
4596
  };
4597
- //# sourceMappingURL=index-CbWEp3Zs.js.map
4597
+ //# sourceMappingURL=index-DyG_ZuPp.js.map