@linktr.ee/messaging-react 1.25.0 โ†’ 1.26.0

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.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { jsx as e, jsxs as i, Fragment as me } from "react/jsx-runtime";
2
- import R from "classnames";
3
- import B, { createContext as lt, useContext as it, useCallback as P, useState as T, useRef as Q, useEffect as X, useMemo as _e } from "react";
4
- import { StreamChatService as ct } from "@linktr.ee/messaging-core";
5
- import { Chat as dt, ChannelList as ut, DateSeparator as mt, useChannelStateContext as Me, useChatContext as $e, areMessageUIPropsEqual as ht, useMessageReminder as ft, useComponentContext as gt, Attachment as xt, EditMessageModal as bt, MessageBlocked as Ct, MessageBouncePrompt as Nt, MessageDeleted as vt, MessageIsThreadReplyInChannelButtonIndicator as wt, MessageRepliesCountButton as pt, ReminderNotification as yt, StreamedMessageText as _t, messageHasAttachments as Et, messageHasReactions as St, isDateSeparatorMessage as It, isMessageBlocked as Mt, isMessageBounced as kt, MessageBounceModal as Tt, Poll as Dt, MessageText as Rt, MessageErrorIcon as Lt, useMessageContext as je, useMessageComposer as Pt, useStateStore as Ut, MessageInput as Ot, useMessageInputContext as Ft, useMessageComposerHasSendableData as At, SimpleAttachmentSelector as Bt, QuotedMessagePreview as $t, AttachmentPreviewList as jt, TextareaComposer as Gt, MessageTimestamp as Re, Channel as zt, WithComponents as Vt, Window as Ht, MessageList as Wt } from "stream-chat-react";
6
- import { StarIcon as Ee, GiftIcon as qt, XIcon as ke, SpinnerGapIcon as be, SignOutIcon as Yt, ProhibitInsetIcon as Le, FlagIcon as Zt, ArrowUpIcon as Jt, SparkleIcon as Qt, ArrowLeftIcon as Pe, DotsThreeIcon as Ue, MagnifyingGlassIcon as Xt, ChatCircleDotsIcon as Oe } from "@phosphor-icons/react";
7
- import { LinkPreviewsManager as Fe } from "stream-chat";
8
- const Ge = lt({
1
+ import { jsx as e, jsxs as i, Fragment as de } from "react/jsx-runtime";
2
+ import D from "classnames";
3
+ import G, { createContext as ct, useContext as dt, useCallback as A, useState as k, useRef as X, useEffect as K, useMemo as Se } from "react";
4
+ import { StreamChatService as mt } from "@linktr.ee/messaging-core";
5
+ import { Chat as ut, ChannelList as ht, DateSeparator as ft, useChannelStateContext as Te, useChatContext as je, areMessageUIPropsEqual as gt, useMessageReminder as xt, useComponentContext as bt, Attachment as Ct, EditMessageModal as Nt, MessageBlocked as vt, MessageBouncePrompt as pt, MessageDeleted as yt, MessageIsThreadReplyInChannelButtonIndicator as wt, MessageRepliesCountButton as _t, ReminderNotification as Et, StreamedMessageText as St, messageHasAttachments as It, messageHasReactions as Mt, isDateSeparatorMessage as kt, isMessageBlocked as Tt, isMessageBounced as Dt, MessageBounceModal as Rt, Poll as Lt, MessageText as At, MessageErrorIcon as Pt, useMessageContext as ze, useMessageComposer as Ft, useStateStore as Ot, MessageInput as Ut, useMessageInputContext as Bt, useMessageComposerHasSendableData as Gt, SimpleAttachmentSelector as $t, QuotedMessagePreview as jt, AttachmentPreviewList as zt, TextareaComposer as Ht, MessageTimestamp as we, Channel as Vt, WithComponents as Yt, Window as Wt, MessageList as qt } from "stream-chat-react";
6
+ import { StarIcon as Ie, GiftIcon as Zt, XIcon as De, SpinnerGapIcon as xe, SignOutIcon as Jt, ProhibitInsetIcon as Pe, FlagIcon as Xt, ArrowUpIcon as Kt, SparkleIcon as Qt, ProhibitIcon as es, ArrowLeftIcon as Fe, DotsThreeIcon as Oe, MagnifyingGlassIcon as ts, ChatCircleDotsIcon as Ue } from "@phosphor-icons/react";
7
+ import { LinkPreviewsManager as Be } from "stream-chat";
8
+ const He = ct({
9
9
  service: null,
10
10
  client: null,
11
11
  isConnected: !1,
@@ -15,34 +15,34 @@ const Ge = lt({
15
15
  refreshConnection: async () => {
16
16
  },
17
17
  debug: !1
18
- }), ve = () => it(Ge), Hs = ({
18
+ }), Ne = () => dt(He), Qs = ({
19
19
  children: t,
20
20
  user: s,
21
21
  serviceConfig: n,
22
22
  apiKey: o,
23
23
  capabilities: l = {},
24
- debug: m = !1
24
+ debug: d = !1
25
25
  }) => {
26
- const a = P(
27
- (u, ...N) => {
28
- m && console.log(`๐Ÿ”ฅ [MessagingProvider] ${u}`, ...N);
26
+ const r = A(
27
+ (u, ...C) => {
28
+ d && console.log(`๐Ÿ”ฅ [MessagingProvider] ${u}`, ...C);
29
29
  },
30
- [m]
30
+ [d]
31
31
  );
32
- a("๐Ÿ”„ RENDER START", {
32
+ r("๐Ÿ”„ RENDER START", {
33
33
  userId: s == null ? void 0 : s.id,
34
34
  apiKey: (o == null ? void 0 : o.substring(0, 8)) + "...",
35
35
  serviceConfig: !!n,
36
36
  capabilities: Object.keys(l)
37
37
  });
38
- const [c, g] = T(null), [h, b] = T(null), [x, w] = T(!1), [r, y] = T(!1), [_, C] = T(null), M = Q(!1), E = Q({
38
+ const [c, f] = k(null), [h, x] = k(null), [g, p] = k(!1), [a, w] = k(!1), [_, b] = k(null), M = X(!1), E = X({
39
39
  userId: s == null ? void 0 : s.id,
40
40
  apiKey: o,
41
41
  serviceConfig: n,
42
42
  capabilities: l
43
- }), p = Q(0);
44
- p.current++, a("๐Ÿ“Š RENDER INFO", {
45
- renderCount: p.current,
43
+ }), y = X(0);
44
+ y.current++, r("๐Ÿ“Š RENDER INFO", {
45
+ renderCount: y.current,
46
46
  currentProps: { userId: s == null ? void 0 : s.id, apiKey: (o == null ? void 0 : o.substring(0, 8)) + "..." },
47
47
  propChanges: {
48
48
  userChanged: E.current.userId !== (s == null ? void 0 : s.id),
@@ -55,9 +55,9 @@ const Ge = lt({
55
55
  apiKey: o,
56
56
  serviceConfig: n,
57
57
  capabilities: l
58
- }, X(() => {
59
- const u = p.current;
60
- if (a("๐Ÿ”ง SERVICE INIT EFFECT TRIGGERED", {
58
+ }, K(() => {
59
+ const u = y.current;
60
+ if (r("๐Ÿ”ง SERVICE INIT EFFECT TRIGGERED", {
61
61
  renderCount: u,
62
62
  apiKey: !!o,
63
63
  serviceConfig: !!n,
@@ -68,146 +68,146 @@ const Ge = lt({
68
68
  apiKeyStable: E.current.apiKey === o
69
69
  }
70
70
  }), !o || !n) {
71
- a("โš ๏ธ SERVICE INIT SKIPPED", {
71
+ r("โš ๏ธ SERVICE INIT SKIPPED", {
72
72
  renderCount: u,
73
73
  reason: "Missing apiKey or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
- a("๐Ÿš€ CREATING NEW SERVICE", {
77
+ r("๐Ÿš€ CREATING NEW SERVICE", {
78
78
  renderCount: u,
79
79
  apiKey: (o == null ? void 0 : o.substring(0, 8)) + "...",
80
80
  serviceConfigChanged: E.current.serviceConfig !== n
81
81
  });
82
- const N = new ct({
82
+ const C = new mt({
83
83
  ...n,
84
84
  apiKey: o,
85
- debug: m
85
+ debug: d
86
86
  });
87
- return g(N), a("โœ… SERVICE SET", {
87
+ return f(C), r("โœ… SERVICE SET", {
88
88
  renderCount: u,
89
- serviceInstance: !!N
89
+ serviceInstance: !!C
90
90
  }), () => {
91
- a("๐Ÿงน SERVICE CLEANUP", {
91
+ r("๐Ÿงน SERVICE CLEANUP", {
92
92
  renderCount: u,
93
93
  reason: "Effect cleanup"
94
- }), N.disconnectUser().catch(console.error);
94
+ }), C.disconnectUser().catch(console.error);
95
95
  };
96
- }, [o, n, m, a]);
97
- const S = Q(null);
98
- X(() => {
99
- var N, v;
100
- if (a("๐Ÿ”— USER CONNECTION EFFECT TRIGGERED", {
96
+ }, [o, n, d, r]);
97
+ const S = X(null);
98
+ K(() => {
99
+ var C, T;
100
+ if (r("๐Ÿ”— USER CONNECTION EFFECT TRIGGERED", {
101
101
  hasService: !!c,
102
102
  hasUser: !!s,
103
103
  userId: s == null ? void 0 : s.id,
104
104
  isConnecting: M.current,
105
- isConnected: x,
105
+ isConnected: g,
106
106
  dependencies: { service: !!c, userId: s == null ? void 0 : s.id }
107
107
  }), !c || !s) {
108
- a("โš ๏ธ USER CONNECTION SKIPPED", "Missing service or user");
108
+ r("โš ๏ธ USER CONNECTION SKIPPED", "Missing service or user");
109
109
  return;
110
110
  }
111
111
  if (M.current) {
112
- a("โš ๏ธ USER CONNECTION SKIPPED", "Already connecting");
112
+ r("โš ๏ธ USER CONNECTION SKIPPED", "Already connecting");
113
113
  return;
114
114
  }
115
- if (((N = S.current) == null ? void 0 : N.serviceId) === c && ((v = S.current) == null ? void 0 : v.userId) === s.id) {
116
- a(
115
+ if (((C = S.current) == null ? void 0 : C.serviceId) === c && ((T = S.current) == null ? void 0 : T.userId) === s.id) {
116
+ r(
117
117
  "โš ๏ธ USER CONNECTION SKIPPED",
118
118
  "Already connected this user with this service"
119
119
  );
120
120
  return;
121
121
  }
122
122
  (async () => {
123
- a("๐Ÿš€ STARTING USER CONNECTION", { userId: s.id }), M.current = !0, y(!0), C(null);
123
+ r("๐Ÿš€ STARTING USER CONNECTION", { userId: s.id }), M.current = !0, w(!0), b(null);
124
124
  try {
125
- a("๐Ÿ“ž CALLING SERVICE.CONNECTUSER", { userId: s.id });
126
- const f = await c.connectUser(s);
127
- b(f), w(!0), S.current = { serviceId: c, userId: s.id }, a("โœ… USER CONNECTION SUCCESS", {
125
+ r("๐Ÿ“ž CALLING SERVICE.CONNECTUSER", { userId: s.id });
126
+ const v = await c.connectUser(s);
127
+ x(v), p(!0), S.current = { serviceId: c, userId: s.id }, r("โœ… USER CONNECTION SUCCESS", {
128
128
  userId: s.id,
129
- clientId: f.userID
129
+ clientId: v.userID
130
130
  });
131
- } catch (f) {
132
- const k = f instanceof Error ? f.message : "Connection failed";
133
- C(k), a("โŒ USER CONNECTION ERROR", {
131
+ } catch (v) {
132
+ const N = v instanceof Error ? v.message : "Connection failed";
133
+ b(N), r("โŒ USER CONNECTION ERROR", {
134
134
  userId: s.id,
135
- error: k
135
+ error: N
136
136
  });
137
137
  } finally {
138
- y(!1), M.current = !1, a("๐Ÿ”„ USER CONNECTION FINISHED", {
138
+ w(!1), M.current = !1, r("๐Ÿ”„ USER CONNECTION FINISHED", {
139
139
  userId: s.id,
140
- isConnected: x
140
+ isConnected: g
141
141
  });
142
142
  }
143
143
  })();
144
- }, [c, s, a, x]), X(() => (a("๐Ÿ”Œ CLEANUP EFFECT REGISTERED", {
144
+ }, [c, s, r, g]), K(() => (r("๐Ÿ”Œ CLEANUP EFFECT REGISTERED", {
145
145
  hasService: !!c,
146
- isConnected: x
146
+ isConnected: g
147
147
  }), () => {
148
- c && x ? (a(
148
+ c && g ? (r(
149
149
  "๐Ÿงน CLEANUP EFFECT TRIGGERED",
150
150
  "Cleaning up connection on unmount"
151
- ), S.current = null, c.disconnectUser().catch(console.error)) : a("๐Ÿ”‡ CLEANUP EFFECT SKIPPED", {
151
+ ), S.current = null, c.disconnectUser().catch(console.error)) : r("๐Ÿ”‡ CLEANUP EFFECT SKIPPED", {
152
152
  hasService: !!c,
153
- isConnected: x
153
+ isConnected: g
154
154
  });
155
- }), [c, x, a]);
156
- const L = P(async () => {
157
- if (a("๐Ÿ”„ REFRESH CONNECTION CALLED", {
155
+ }), [c, g, r]);
156
+ const R = A(async () => {
157
+ if (r("๐Ÿ”„ REFRESH CONNECTION CALLED", {
158
158
  hasService: !!c,
159
159
  hasUser: !!s
160
160
  }), !c || !s) {
161
- a("โš ๏ธ REFRESH CONNECTION SKIPPED", "Missing service or user");
161
+ r("โš ๏ธ REFRESH CONNECTION SKIPPED", "Missing service or user");
162
162
  return;
163
163
  }
164
- a("๐Ÿš€ STARTING CONNECTION REFRESH", { userId: s.id }), y(!0);
164
+ r("๐Ÿš€ STARTING CONNECTION REFRESH", { userId: s.id }), w(!0);
165
165
  try {
166
- a("๐Ÿ”Œ DISCONNECTING FOR REFRESH"), await c.disconnectUser(), a("๐Ÿ“ž RECONNECTING FOR REFRESH");
166
+ r("๐Ÿ”Œ DISCONNECTING FOR REFRESH"), await c.disconnectUser(), r("๐Ÿ“ž RECONNECTING FOR REFRESH");
167
167
  const u = await c.connectUser(s);
168
- b(u), w(!0), C(null), a("โœ… CONNECTION REFRESH SUCCESS", { userId: s.id });
168
+ x(u), p(!0), b(null), r("โœ… CONNECTION REFRESH SUCCESS", { userId: s.id });
169
169
  } catch (u) {
170
- const N = u instanceof Error ? u.message : "Refresh failed";
171
- C(N), a("โŒ CONNECTION REFRESH ERROR", {
170
+ const C = u instanceof Error ? u.message : "Refresh failed";
171
+ b(C), r("โŒ CONNECTION REFRESH ERROR", {
172
172
  userId: s.id,
173
- error: N
173
+ error: C
174
174
  });
175
175
  } finally {
176
- y(!1), a("๐Ÿ”„ CONNECTION REFRESH FINISHED", { userId: s.id });
176
+ w(!1), r("๐Ÿ”„ CONNECTION REFRESH FINISHED", { userId: s.id });
177
177
  }
178
- }, [c, s, a]), d = B.useMemo(() => (a("๐Ÿ’ซ CONTEXT VALUE MEMOIZATION", {
178
+ }, [c, s, r]), m = G.useMemo(() => (r("๐Ÿ’ซ CONTEXT VALUE MEMOIZATION", {
179
179
  hasService: !!c,
180
180
  hasClient: !!h,
181
- isConnected: x,
182
- isLoading: r,
181
+ isConnected: g,
182
+ isLoading: a,
183
183
  hasError: !!_,
184
184
  capabilitiesKeys: Object.keys(l)
185
185
  }), {
186
186
  service: c,
187
187
  client: h,
188
- isConnected: x,
189
- isLoading: r,
188
+ isConnected: g,
189
+ isLoading: a,
190
190
  error: _,
191
191
  capabilities: l,
192
- refreshConnection: L,
193
- debug: m
192
+ refreshConnection: R,
193
+ debug: d
194
194
  }), [
195
195
  c,
196
196
  h,
197
- x,
198
- r,
197
+ g,
198
+ a,
199
199
  _,
200
200
  l,
201
- L,
202
- m,
203
- a
201
+ R,
202
+ d,
203
+ r
204
204
  ]);
205
- return a("๐Ÿ”„ RENDER END", {
206
- renderCount: p.current,
207
- willRenderChat: !!(h && x),
208
- contextValueReady: !!d
209
- }), /* @__PURE__ */ e(Ge.Provider, { value: d, children: h && x ? /* @__PURE__ */ e(
210
- dt,
205
+ return r("๐Ÿ”„ RENDER END", {
206
+ renderCount: y.current,
207
+ willRenderChat: !!(h && g),
208
+ contextValueReady: !!m
209
+ }), /* @__PURE__ */ e(He.Provider, { value: m, children: h && g ? /* @__PURE__ */ e(
210
+ ut,
211
211
  {
212
212
  client: h,
213
213
  customClasses: {
@@ -216,46 +216,46 @@ const Ge = lt({
216
216
  children: t
217
217
  }
218
218
  ) : t });
219
- }, Kt = () => ve(), ze = B.createContext({
219
+ }, ss = () => Ne(), Ve = G.createContext({
220
220
  selectedChannel: void 0,
221
221
  onChannelSelect: () => {
222
222
  },
223
223
  debug: !1,
224
224
  renderMessagePreview: void 0
225
- }), es = ze.Provider, ts = () => B.useContext(ze), Ve = (t) => {
225
+ }), ns = Ve.Provider, as = () => G.useContext(Ve), Ye = (t) => {
226
226
  var o, l;
227
- const [s, n] = T(
227
+ const [s, n] = k(
228
228
  !!((l = (o = t == null ? void 0 : t.state) == null ? void 0 : o.membership) != null && l.pinned_at)
229
229
  );
230
- return X(() => {
231
- var a;
230
+ return K(() => {
231
+ var r;
232
232
  if (!t) {
233
233
  n(!1);
234
234
  return;
235
235
  }
236
- n(!!((a = t.state.membership) != null && a.pinned_at));
237
- const m = (c) => {
238
- var g;
236
+ n(!!((r = t.state.membership) != null && r.pinned_at));
237
+ const d = (c) => {
238
+ var f;
239
239
  n(
240
- c != null && c.member ? !!c.member.pinned_at : !!((g = t.state.membership) != null && g.pinned_at)
240
+ c != null && c.member ? !!c.member.pinned_at : !!((f = t.state.membership) != null && f.pinned_at)
241
241
  );
242
242
  };
243
- return t.on("member.updated", m), () => {
244
- t.off("member.updated", m);
243
+ return t.on("member.updated", d), () => {
244
+ t.off("member.updated", d);
245
245
  };
246
246
  }, [t]), s;
247
- }, ss = (t, s) => {
247
+ }, rs = (t, s) => {
248
248
  const n = new Date(
249
249
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
250
250
  ), l = new Date(
251
251
  Date.UTC(s.getUTCFullYear(), s.getUTCMonth(), s.getUTCDate())
252
252
  ).getTime() - n.getTime();
253
253
  return Math.floor(l / (1e3 * 60 * 60 * 24));
254
- }, ns = (t) => {
254
+ }, os = (t) => {
255
255
  const s = /* @__PURE__ */ new Date();
256
256
  if (Math.floor((s.getTime() - t.getTime()) / 1e3) < 60)
257
257
  return "Just now";
258
- const o = ss(t, s);
258
+ const o = rs(t, s);
259
259
  return o === 0 ? t.toLocaleTimeString([], {
260
260
  hour: "numeric",
261
261
  minute: "2-digit",
@@ -265,7 +265,7 @@ const Ge = lt({
265
265
  day: "numeric",
266
266
  year: "2-digit"
267
267
  });
268
- }, Ae = [
268
+ }, Ge = [
269
269
  "๐ŸŽ",
270
270
  // Apple
271
271
  "๐ŸŒ",
@@ -293,7 +293,7 @@ const Ge = lt({
293
293
  "๐Ÿˆ"
294
294
  // Melon
295
295
  ];
296
- function as(t) {
296
+ function ls(t) {
297
297
  let s = 0;
298
298
  for (let n = 0; n < t.length; n++) {
299
299
  const o = t.charCodeAt(n);
@@ -301,26 +301,26 @@ function as(t) {
301
301
  }
302
302
  return Math.abs(s);
303
303
  }
304
- function rs(t) {
305
- const n = as(t) % Ae.length;
306
- return Ae[n];
304
+ function is(t) {
305
+ const n = ls(t) % Ge.length;
306
+ return Ge[n];
307
307
  }
308
- const se = ({
308
+ const ae = ({
309
309
  id: t,
310
310
  image: s,
311
311
  size: n = 40,
312
312
  className: o,
313
313
  starred: l = !1,
314
- shape: m = "squircle"
314
+ shape: d = "squircle"
315
315
  }) => {
316
- const a = rs(t), g = n < 32 ? "text-xs" : n < 56 ? "text-sm" : n < 120 ? "text-lg" : "text-4xl", h = m === "circle" ? { borderRadius: "50%" } : {
316
+ const r = is(t), f = n < 32 ? "text-xs" : n < 56 ? "text-sm" : n < 120 ? "text-lg" : "text-4xl", h = d === "circle" ? { borderRadius: "50%" } : {
317
317
  borderRadius: "33%",
318
318
  "corner-shape": "superellipse(1.3)"
319
319
  };
320
320
  return /* @__PURE__ */ i(
321
321
  "div",
322
322
  {
323
- className: R("relative flex-shrink-0", o),
323
+ className: D("relative flex-shrink-0", o),
324
324
  style: {
325
325
  width: `${n}px`,
326
326
  height: `${n}px`
@@ -331,7 +331,7 @@ const se = ({
331
331
  {
332
332
  "aria-hidden": "true",
333
333
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
334
- children: /* @__PURE__ */ e(Ee, { className: "size-3 text-yellow-600", weight: "duotone" })
334
+ children: /* @__PURE__ */ e(Ie, { className: "size-3 text-yellow-600", weight: "duotone" })
335
335
  }
336
336
  ),
337
337
  /* @__PURE__ */ e("div", { className: "h-full w-full overflow-hidden", style: h, children: s ? /* @__PURE__ */ e(
@@ -345,17 +345,17 @@ const se = ({
345
345
  "div",
346
346
  {
347
347
  "aria-hidden": "true",
348
- className: R(
348
+ className: D(
349
349
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
350
- g
350
+ f
351
351
  ),
352
- children: a
352
+ children: r
353
353
  }
354
354
  ) })
355
355
  ]
356
356
  }
357
357
  );
358
- }, os = ({ size: t = 15 }) => /* @__PURE__ */ e(
358
+ }, cs = ({ size: t = 15 }) => /* @__PURE__ */ e(
359
359
  "svg",
360
360
  {
361
361
  width: t,
@@ -372,105 +372,105 @@ const se = ({
372
372
  }
373
373
  )
374
374
  }
375
- ), ls = (t) => {
375
+ ), ds = (t) => {
376
376
  var s;
377
377
  return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_TIP";
378
- }, is = (t) => {
378
+ }, ms = (t) => {
379
379
  var s;
380
380
  return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_PAID";
381
- }, Te = (t) => {
381
+ }, Re = (t) => {
382
382
  var s;
383
383
  return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_CHATBOT";
384
- }, He = (t) => ls(t) || is(t), cs = (t) => {
384
+ }, We = (t) => ds(t) || ms(t), us = (t) => {
385
385
  var s;
386
- return He(t) && !((s = t.text) != null && s.trim());
387
- }, ye = ({
386
+ return We(t) && !((s = t.text) != null && s.trim());
387
+ }, _e = ({
388
388
  message: t,
389
389
  standalone: s = !1,
390
390
  isMyMessage: n = !1,
391
391
  hasAttachment: o = !1
392
392
  }) => {
393
- var x;
394
- const l = He(t), m = Te(t);
395
- if (!l && !m)
393
+ var g;
394
+ const l = We(t), d = Re(t);
395
+ if (!l && !d)
396
396
  return null;
397
397
  if (l) {
398
- const w = (x = t.metadata) == null ? void 0 : x.amount_text;
399
- if (!w) return null;
400
- const r = s ? "message-tip-standalone" : "message-tag message-tag--tip", y = s ? `${w} tip` : `Delivered with ${w} tip`;
401
- return /* @__PURE__ */ i("div", { className: r, children: [
402
- /* @__PURE__ */ e(qt, { size: s ? 14 : 12 }),
403
- /* @__PURE__ */ e("span", { children: y })
398
+ const p = (g = t.metadata) == null ? void 0 : g.amount_text;
399
+ if (!p) return null;
400
+ const a = s ? "message-tip-standalone" : "message-tag message-tag--tip", w = s ? `${p} tip` : `Delivered with ${p} tip`;
401
+ return /* @__PURE__ */ i("div", { className: a, children: [
402
+ /* @__PURE__ */ e(Zt, { size: s ? 14 : 12 }),
403
+ /* @__PURE__ */ e("span", { children: w })
404
404
  ] });
405
405
  }
406
- const a = n && o, c = a ? "Sent with AI" : "Sent with DM Agent", g = [
406
+ const r = n && o, c = r ? "Sent with AI" : "Sent with DM Agent", f = [
407
407
  "message-chatbot-indicator",
408
408
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
409
- a ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
410
- ].join(" "), h = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__label", children: c }), b = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ e(os, { size: a ? 12 : 15 }) });
411
- return /* @__PURE__ */ e("div", { className: g, "data-testid": "message-chatbot-indicator", children: n && !a ? /* @__PURE__ */ i(me, { children: [
409
+ r ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
410
+ ].join(" "), h = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__label", children: c }), x = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ e(cs, { size: r ? 12 : 15 }) });
411
+ return /* @__PURE__ */ e("div", { className: f, "data-testid": "message-chatbot-indicator", children: n && !r ? /* @__PURE__ */ i(de, { children: [
412
412
  h,
413
- b
414
- ] }) : /* @__PURE__ */ i(me, { children: [
415
- b,
413
+ x
414
+ ] }) : /* @__PURE__ */ i(de, { children: [
415
+ x,
416
416
  h
417
417
  ] }) });
418
- }, We = B.memo(
418
+ }, qe = G.memo(
419
419
  ({ channel: t, unread: s }) => {
420
- var L, d, u, N;
421
- const { selectedChannel: n, onChannelSelect: o, debug: l, renderMessagePreview: m } = ts(), a = (n == null ? void 0 : n.id) === (t == null ? void 0 : t.id), c = () => {
420
+ var R, m, u, C;
421
+ const { selectedChannel: n, onChannelSelect: o, debug: l, renderMessagePreview: d } = as(), r = (n == null ? void 0 : n.id) === (t == null ? void 0 : t.id), c = () => {
422
422
  t && o(t);
423
- }, g = (v) => {
424
- const f = v.key === "Enter" || v.key === " ", k = v.repeat;
425
- !f || k || (v.preventDefault(), c());
426
- }, b = Object.values(((L = t == null ? void 0 : t.state) == null ? void 0 : L.members) || {}).find(
427
- (v) => {
428
- var f, k;
429
- return ((f = v.user) == null ? void 0 : f.id) && v.user.id !== ((k = t == null ? void 0 : t._client) == null ? void 0 : k.userID);
423
+ }, f = (T) => {
424
+ const v = T.key === "Enter" || T.key === " ", N = T.repeat;
425
+ !v || N || (T.preventDefault(), c());
426
+ }, x = Object.values(((R = t == null ? void 0 : t.state) == null ? void 0 : R.members) || {}).find(
427
+ (T) => {
428
+ var v, N;
429
+ return ((v = T.user) == null ? void 0 : v.id) && T.user.id !== ((N = t == null ? void 0 : t._client) == null ? void 0 : N.userID);
430
430
  }
431
- ), x = ((d = b == null ? void 0 : b.user) == null ? void 0 : d.name) || "Conversation", w = (u = b == null ? void 0 : b.user) == null ? void 0 : u.image, r = (() => {
432
- var f;
433
- const v = (f = t == null ? void 0 : t.state) == null ? void 0 : f.messages;
434
- if (v != null && v.length) {
435
- for (let k = v.length - 1; k >= 0; k--)
436
- if (v[k].type !== "system") return v[k];
431
+ ), g = ((m = x == null ? void 0 : x.user) == null ? void 0 : m.name) || "Conversation", p = (u = x == null ? void 0 : x.user) == null ? void 0 : u.image, a = (() => {
432
+ var v;
433
+ const T = (v = t == null ? void 0 : t.state) == null ? void 0 : v.messages;
434
+ if (T != null && T.length) {
435
+ for (let N = T.length - 1; N >= 0; N--)
436
+ if (T[N].type !== "system") return T[N];
437
437
  }
438
438
  })(), _ = (() => {
439
- var k, H;
440
- if (r != null && r.text) return r.text;
441
- if (((k = r == null ? void 0 : r.metadata) == null ? void 0 : k.custom_type) === "MESSAGE_TIP") return "๐Ÿ’ต Sent a tip";
442
- const f = (H = r == null ? void 0 : r.attachments) == null ? void 0 : H[0];
443
- return f ? f.og_scrape_url ? f.og_scrape_url : f.type === "image" ? "๐Ÿ“ท Sent an image" : f.type === "video" ? "๐ŸŽฅ Sent a video" : f.type === "audio" ? "๐ŸŽต Sent audio" : f.type === "file" ? "๐Ÿ“Ž Sent a file" : "๐Ÿ“Ž Sent an attachment" : "No messages yet";
444
- })(), C = r != null && r.created_at ? ns(new Date(r.created_at)) : "", M = r ? Te(r) : !1, E = m ? m(r, _) : `${M ? "โœจ " : ""}${_}`, p = Ve(t), S = s ?? 0;
439
+ var N, F;
440
+ if (a != null && a.text) return a.text;
441
+ if (((N = a == null ? void 0 : a.metadata) == null ? void 0 : N.custom_type) === "MESSAGE_TIP") return "๐Ÿ’ต Sent a tip";
442
+ const v = (F = a == null ? void 0 : a.attachments) == null ? void 0 : F[0];
443
+ return v ? v.og_scrape_url ? v.og_scrape_url : v.type === "image" ? "๐Ÿ“ท Sent an image" : v.type === "video" ? "๐ŸŽฅ Sent a video" : v.type === "audio" ? "๐ŸŽต Sent audio" : v.type === "file" ? "๐Ÿ“Ž Sent a file" : "๐Ÿ“Ž Sent an attachment" : "No messages yet";
444
+ })(), b = a != null && a.created_at ? os(new Date(a.created_at)) : "", M = a ? Re(a) : !1, E = d ? d(a, _) : `${M ? "โœจ " : ""}${_}`, y = Ye(t), S = s ?? 0;
445
445
  return l && console.log("๐Ÿ“บ [ChannelList] ๐Ÿ“‹ CHANNEL PREVIEW RENDER", {
446
446
  channelId: t == null ? void 0 : t.id,
447
- isSelected: a,
448
- participantName: x,
447
+ isSelected: r,
448
+ participantName: g,
449
449
  unreadCount: S,
450
- hasTimestamp: !!C
450
+ hasTimestamp: !!b
451
451
  }), /* @__PURE__ */ e(
452
452
  "div",
453
453
  {
454
454
  role: "button",
455
455
  tabIndex: 0,
456
456
  onClick: c,
457
- onKeyDown: g,
458
- className: R(
457
+ onKeyDown: f,
458
+ className: D(
459
459
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring",
460
460
  {
461
- "bg-primary-alt/10 border-l-4 border-l-primary": a,
462
- "hover:bg-sand": !a
461
+ "bg-primary-alt/10 border-l-4 border-l-primary": r,
462
+ "hover:bg-sand": !r
463
463
  }
464
464
  ),
465
465
  children: /* @__PURE__ */ i("div", { className: "flex items-start gap-3", children: [
466
466
  /* @__PURE__ */ e(
467
- se,
467
+ ae,
468
468
  {
469
- id: ((N = b == null ? void 0 : b.user) == null ? void 0 : N.id) || t.id || "unknown",
470
- name: x,
471
- image: w,
469
+ id: ((C = x == null ? void 0 : x.user) == null ? void 0 : C.id) || t.id || "unknown",
470
+ name: g,
471
+ image: p,
472
472
  size: 44,
473
- starred: p,
473
+ starred: y,
474
474
  className: "[&_.avatar-fallback]:group-hover:bg-[#eeeeee]"
475
475
  }
476
476
  ),
@@ -479,17 +479,17 @@ const se = ({
479
479
  /* @__PURE__ */ i(
480
480
  "h3",
481
481
  {
482
- className: R(
482
+ className: D(
483
483
  "text-sm font-medium truncate",
484
- a ? "text-primary" : "text-charcoal"
484
+ r ? "text-primary" : "text-charcoal"
485
485
  ),
486
486
  children: [
487
- p && /* @__PURE__ */ e("span", { className: "sr-only", children: "Starred conversation. " }),
488
- x
487
+ y && /* @__PURE__ */ e("span", { className: "sr-only", children: "Starred conversation. " }),
488
+ g
489
489
  ]
490
490
  }
491
491
  ),
492
- C && /* @__PURE__ */ e("span", { className: "text-xs text-stone flex-shrink-0", children: C })
492
+ b && /* @__PURE__ */ e("span", { className: "text-xs text-stone flex-shrink-0", children: b })
493
493
  ] }),
494
494
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
495
495
  /* @__PURE__ */ e("p", { className: "text-xs text-stone flex-1 line-clamp-1", children: E }),
@@ -501,64 +501,66 @@ const se = ({
501
501
  );
502
502
  }
503
503
  );
504
- We.displayName = "CustomChannelPreview";
505
- const ds = { last_message_at: -1 }, qe = B.memo(
504
+ qe.displayName = "CustomChannelPreview";
505
+ const hs = { last_message_at: -1 }, Ze = G.memo(
506
506
  ({
507
507
  onChannelSelect: t,
508
508
  selectedChannel: s,
509
509
  filters: n,
510
510
  allowNewMessagesFromUnfilteredChannels: o = !1,
511
511
  onMessageNew: l,
512
- onAddedToChannel: m,
513
- sort: a = ds,
514
- className: c,
515
- customEmptyStateIndicator: g,
516
- renderMessagePreview: h
512
+ onAddedToChannel: d,
513
+ channelRenderFilterFn: r,
514
+ sort: c = hs,
515
+ className: f,
516
+ customEmptyStateIndicator: h,
517
+ renderMessagePreview: x
517
518
  }) => {
518
- const b = B.useRef(0);
519
- b.current++;
520
- const { debug: x = !1 } = ve();
521
- x && console.log("๐Ÿ“บ [ChannelList] ๐Ÿ”„ RENDER START", {
522
- renderCount: b.current,
519
+ const g = G.useRef(0);
520
+ g.current++;
521
+ const { debug: p = !1 } = Ne();
522
+ p && console.log("๐Ÿ“บ [ChannelList] ๐Ÿ”„ RENDER START", {
523
+ renderCount: g.current,
523
524
  selectedChannelId: s == null ? void 0 : s.id,
524
525
  filters: n
525
526
  });
526
- const w = B.useMemo(
527
+ const a = G.useMemo(
527
528
  () => ({
528
529
  selectedChannel: s,
529
530
  onChannelSelect: t,
530
- debug: x,
531
- renderMessagePreview: h
531
+ debug: p,
532
+ renderMessagePreview: x
532
533
  }),
533
- [s, t, x, h]
534
+ [s, t, p, x]
534
535
  );
535
536
  return /* @__PURE__ */ e(
536
537
  "div",
537
538
  {
538
- className: R(
539
+ className: D(
539
540
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
540
- c
541
+ f
541
542
  ),
542
- children: /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ e(es, { value: w, children: /* @__PURE__ */ e(
543
- ut,
543
+ children: /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ e(ns, { value: a, children: /* @__PURE__ */ e(
544
+ ht,
544
545
  {
545
546
  filters: n,
546
- sort: a,
547
+ sort: c,
547
548
  options: { limit: 30 },
548
549
  allowNewMessagesFromUnfilteredChannels: o,
549
550
  onMessageNew: l,
550
- onAddedToChannel: m,
551
- Preview: We,
552
- EmptyStateIndicator: g
551
+ onAddedToChannel: d,
552
+ channelRenderFilterFn: r,
553
+ Preview: qe,
554
+ EmptyStateIndicator: h
553
555
  },
554
- `${JSON.stringify(n)}:${JSON.stringify(a)}`
556
+ `${JSON.stringify(n)}:${JSON.stringify(c)}`
555
557
  ) }) })
556
558
  }
557
559
  );
558
560
  }
559
561
  );
560
- qe.displayName = "ChannelList";
561
- const xe = ({
562
+ Ze.displayName = "ChannelList";
563
+ const ge = ({
562
564
  variant: t = "default",
563
565
  className: s,
564
566
  children: n,
@@ -567,7 +569,7 @@ const xe = ({
567
569
  "button",
568
570
  {
569
571
  type: "button",
570
- className: R(
572
+ className: D(
571
573
  "flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
572
574
  t === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
573
575
  s
@@ -576,12 +578,12 @@ const xe = ({
576
578
  children: n
577
579
  }
578
580
  );
579
- function Ye({ label: t, className: s, children: n, ...o }) {
581
+ function Je({ label: t, className: s, children: n, ...o }) {
580
582
  return /* @__PURE__ */ i(
581
583
  "button",
582
584
  {
583
585
  type: "button",
584
- className: R(
586
+ className: D(
585
587
  "rounded-full p-2 transition-colors focus-ring",
586
588
  {
587
589
  "cursor-not-allowed opacity-50": o.disabled,
@@ -597,92 +599,92 @@ function Ye({ label: t, className: s, children: n, ...o }) {
597
599
  }
598
600
  );
599
601
  }
600
- function Ze({ onClick: t }) {
601
- return /* @__PURE__ */ e(Ye, { label: "Close", onClick: t, className: "p-1", children: /* @__PURE__ */ e(ke, { className: "h-5 w-5 text-stone", weight: "bold" }) });
602
+ function Xe({ onClick: t }) {
603
+ return /* @__PURE__ */ e(Je, { label: "Close", onClick: t, className: "p-1", children: /* @__PURE__ */ e(De, { className: "h-5 w-5 text-stone", weight: "bold" }) });
602
604
  }
603
- const us = ({
605
+ const fs = ({
604
606
  dialogRef: t,
605
607
  onClose: s,
606
608
  participant: n,
607
609
  channel: o,
608
610
  followerStatusLabel: l,
609
- onLeaveConversation: m,
610
- onBlockParticipant: a,
611
+ onLeaveConversation: d,
612
+ onBlockParticipant: r,
611
613
  showDeleteConversation: c = !0,
612
- onDeleteConversationClick: g,
614
+ onDeleteConversationClick: f,
613
615
  onBlockParticipantClick: h,
614
- onReportParticipantClick: b,
615
- customProfileContent: x,
616
- customChannelActions: w
616
+ onReportParticipantClick: x,
617
+ customProfileContent: g,
618
+ customChannelActions: p
617
619
  }) => {
618
- var W, j, ne, ae, G, K, re;
619
- const { service: r, debug: y } = ve(), [_, C] = T(!1), [M, E] = T(!1), [p, S] = T(!1), L = P(async () => {
620
- var U;
621
- if (!(!r || !((U = n == null ? void 0 : n.user) != null && U.id)))
620
+ var L, W, j, re, z, te, se;
621
+ const { service: a, debug: w } = Ne(), [_, b] = k(!1), [M, E] = k(!1), [y, S] = k(!1), R = A(async () => {
622
+ var O;
623
+ if (!(!a || !((O = n == null ? void 0 : n.user) != null && O.id)))
622
624
  try {
623
- const A = (await r.getBlockedUsers()).some(
624
- (z) => {
625
- var ce;
626
- return z.blocked_user_id === ((ce = n == null ? void 0 : n.user) == null ? void 0 : ce.id);
625
+ const B = (await a.getBlockedUsers()).some(
626
+ (H) => {
627
+ var oe;
628
+ return H.blocked_user_id === ((oe = n == null ? void 0 : n.user) == null ? void 0 : oe.id);
627
629
  }
628
630
  );
629
- C(A);
630
- } catch (O) {
631
+ b(B);
632
+ } catch (P) {
631
633
  console.error(
632
634
  "[ChannelInfoDialog] Failed to check blocked status:",
633
- O
635
+ P
634
636
  );
635
637
  }
636
- }, [r, (W = n == null ? void 0 : n.user) == null ? void 0 : W.id]);
637
- X(() => {
638
- L();
639
- }, [L]);
640
- const d = async () => {
641
- var U;
638
+ }, [a, (L = n == null ? void 0 : n.user) == null ? void 0 : L.id]);
639
+ K(() => {
640
+ R();
641
+ }, [R]);
642
+ const m = async () => {
643
+ var O;
642
644
  if (!M) {
643
- g == null || g(), y && console.log("[ChannelInfoDialog] Leave conversation", o.cid), E(!0);
645
+ f == null || f(), w && console.log("[ChannelInfoDialog] Leave conversation", o.cid), E(!0);
644
646
  try {
645
- const O = ((U = o._client) == null ? void 0 : U.userID) ?? null;
646
- await o.hide(O, !1), m && await m(o), s();
647
- } catch (O) {
648
- console.error("[ChannelInfoDialog] Failed to leave conversation", O);
647
+ const P = ((O = o._client) == null ? void 0 : O.userID) ?? null;
648
+ await o.hide(P, !1), d && await d(o), s();
649
+ } catch (P) {
650
+ console.error("[ChannelInfoDialog] Failed to leave conversation", P);
649
651
  } finally {
650
652
  E(!1);
651
653
  }
652
654
  }
653
655
  }, u = async () => {
654
- var U, O, A;
655
- if (!(p || !r)) {
656
- h == null || h(), y && console.log("[ChannelInfoDialog] Block member", (U = n == null ? void 0 : n.user) == null ? void 0 : U.id), S(!0);
656
+ var O, P, B;
657
+ if (!(y || !a)) {
658
+ h == null || h(), w && console.log("[ChannelInfoDialog] Block member", (O = n == null ? void 0 : n.user) == null ? void 0 : O.id), S(!0);
657
659
  try {
658
- await r.blockUser((O = n == null ? void 0 : n.user) == null ? void 0 : O.id), a && await a((A = n == null ? void 0 : n.user) == null ? void 0 : A.id), s();
659
- } catch (z) {
660
- console.error("[ChannelInfoDialog] Failed to block member", z);
660
+ await a.blockUser((P = n == null ? void 0 : n.user) == null ? void 0 : P.id), r && await r((B = n == null ? void 0 : n.user) == null ? void 0 : B.id), s();
661
+ } catch (H) {
662
+ console.error("[ChannelInfoDialog] Failed to block member", H);
661
663
  } finally {
662
664
  S(!1);
663
665
  }
664
666
  }
665
- }, N = async () => {
666
- var U, O, A;
667
- if (!(p || !r)) {
668
- h == null || h(), y && console.log("[ChannelInfoDialog] Unblock member", (U = n == null ? void 0 : n.user) == null ? void 0 : U.id), S(!0);
667
+ }, C = async () => {
668
+ var O, P, B;
669
+ if (!(y || !a)) {
670
+ h == null || h(), w && console.log("[ChannelInfoDialog] Unblock member", (O = n == null ? void 0 : n.user) == null ? void 0 : O.id), S(!0);
669
671
  try {
670
- await r.unBlockUser((O = n == null ? void 0 : n.user) == null ? void 0 : O.id), a && await a((A = n == null ? void 0 : n.user) == null ? void 0 : A.id), s();
671
- } catch (z) {
672
- console.error("[ChannelInfoDialog] Failed to unblock member", z);
672
+ await a.unBlockUser((P = n == null ? void 0 : n.user) == null ? void 0 : P.id), r && await r((B = n == null ? void 0 : n.user) == null ? void 0 : B.id), s();
673
+ } catch (H) {
674
+ console.error("[ChannelInfoDialog] Failed to unblock member", H);
673
675
  } finally {
674
676
  S(!1);
675
677
  }
676
678
  }
677
- }, v = () => {
678
- b == null || b(), s(), window.open(
679
+ }, T = () => {
680
+ x == null || x(), s(), window.open(
679
681
  "https://linktr.ee/s/about/trust-center/report",
680
682
  "_blank",
681
683
  "noopener,noreferrer"
682
684
  );
683
685
  };
684
686
  if (!n) return null;
685
- const f = ((j = n.user) == null ? void 0 : j.name) || ((ne = n.user) == null ? void 0 : ne.id) || "Unknown member", k = (ae = n.user) == null ? void 0 : ae.image, H = (G = n.user) == null ? void 0 : G.email, Z = (K = n.user) == null ? void 0 : K.username, Y = H || (Z ? `linktr.ee/${Z}` : void 0), D = ((re = n.user) == null ? void 0 : re.id) || "unknown";
687
+ const v = ((W = n.user) == null ? void 0 : W.name) || ((j = n.user) == null ? void 0 : j.id) || "Unknown member", N = (re = n.user) == null ? void 0 : re.image, F = (z = n.user) == null ? void 0 : z.email, Q = (te = n.user) == null ? void 0 : te.username, Y = F || (Q ? `linktr.ee/${Q}` : void 0), Z = ((se = n.user) == null ? void 0 : se.id) || "unknown";
686
688
  return (
687
689
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
688
690
  /* @__PURE__ */ e(
@@ -691,13 +693,13 @@ const us = ({
691
693
  ref: t,
692
694
  className: "mes-dialog group",
693
695
  onClose: s,
694
- onClick: (U) => {
695
- U.target === t.current && s();
696
+ onClick: (O) => {
697
+ O.target === t.current && s();
696
698
  },
697
699
  children: /* @__PURE__ */ i("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-none transition-shadow duration-200 group-open:shadow-max-elevation-light", children: [
698
700
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
699
701
  /* @__PURE__ */ e("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
700
- /* @__PURE__ */ e(Ze, { onClick: s })
702
+ /* @__PURE__ */ e(Xe, { onClick: s })
701
703
  ] }),
702
704
  /* @__PURE__ */ i("div", { className: "flex-1 px-2 overflow-y-auto w-full", children: [
703
705
  /* @__PURE__ */ e(
@@ -707,19 +709,19 @@ const us = ({
707
709
  style: { backgroundColor: "#FBFAF9" },
708
710
  children: /* @__PURE__ */ i("div", { className: "flex items-center gap-3 w-full", children: [
709
711
  /* @__PURE__ */ e(
710
- se,
712
+ ae,
711
713
  {
712
- id: D,
713
- name: f,
714
- image: k,
714
+ id: Z,
715
+ name: v,
716
+ image: N,
715
717
  size: 88,
716
718
  shape: "circle"
717
719
  }
718
720
  ),
719
721
  /* @__PURE__ */ i("div", { className: "flex flex-col min-w-0 flex-1", children: [
720
- /* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children: f }),
722
+ /* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children: v }),
721
723
  Y && /* @__PURE__ */ e("p", { className: "truncate text-sm text-[#00000055]", children: Y }),
722
- l && !x && /* @__PURE__ */ e(
724
+ l && !g && /* @__PURE__ */ e(
723
725
  "span",
724
726
  {
725
727
  className: "mt-1 rounded-full text-xs font-normal w-fit",
@@ -733,90 +735,90 @@ const us = ({
733
735
  children: l
734
736
  }
735
737
  ),
736
- x
738
+ g
737
739
  ] })
738
740
  ] })
739
741
  }
740
742
  ),
741
743
  /* @__PURE__ */ i("ul", { className: "flex flex-col gap-2 mt-2", children: [
742
744
  c && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
743
- xe,
745
+ ge,
744
746
  {
745
- onClick: d,
747
+ onClick: m,
746
748
  disabled: M,
747
749
  "aria-busy": M,
748
750
  children: [
749
- M ? /* @__PURE__ */ e(be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Yt, { className: "h-5 w-5" }),
751
+ M ? /* @__PURE__ */ e(xe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Jt, { className: "h-5 w-5" }),
750
752
  /* @__PURE__ */ e("span", { children: "Delete Conversation" })
751
753
  ]
752
754
  }
753
755
  ) }),
754
756
  /* @__PURE__ */ e("li", { children: _ ? /* @__PURE__ */ i(
755
- xe,
757
+ ge,
756
758
  {
757
- onClick: N,
758
- disabled: p,
759
- "aria-busy": p,
759
+ onClick: C,
760
+ disabled: y,
761
+ "aria-busy": y,
760
762
  children: [
761
- p ? /* @__PURE__ */ e(be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Le, { className: "h-5 w-5" }),
763
+ y ? /* @__PURE__ */ e(xe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Pe, { className: "h-5 w-5" }),
762
764
  /* @__PURE__ */ e("span", { children: "Unblock" })
763
765
  ]
764
766
  }
765
767
  ) : /* @__PURE__ */ i(
766
- xe,
768
+ ge,
767
769
  {
768
770
  onClick: u,
769
- disabled: p,
770
- "aria-busy": p,
771
+ disabled: y,
772
+ "aria-busy": y,
771
773
  children: [
772
- p ? /* @__PURE__ */ e(be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Le, { className: "h-5 w-5" }),
774
+ y ? /* @__PURE__ */ e(xe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Pe, { className: "h-5 w-5" }),
773
775
  /* @__PURE__ */ e("span", { children: "Block" })
774
776
  ]
775
777
  }
776
778
  ) }),
777
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(xe, { variant: "danger", onClick: v, children: [
778
- /* @__PURE__ */ e(Zt, { className: "h-5 w-5" }),
779
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(ge, { variant: "danger", onClick: T, children: [
780
+ /* @__PURE__ */ e(Xt, { className: "h-5 w-5" }),
779
781
  /* @__PURE__ */ e("span", { children: "Report" })
780
782
  ] }) }),
781
- w
783
+ p
782
784
  ] })
783
785
  ] })
784
786
  ] })
785
787
  }
786
788
  )
787
789
  );
788
- }, ms = (t) => /* @__PURE__ */ e(mt, { ...t, position: "center" }), Se = "vote_up", Ie = "vote_down";
789
- function hs(t) {
790
- return t != null && t.length ? t.some((s) => s.type === Ie) ? "down" : t.some((s) => s.type === Se) ? "up" : null : null;
790
+ }, gs = (t) => /* @__PURE__ */ e(ft, { ...t, position: "center" }), Me = "vote_up", ke = "vote_down";
791
+ function xs(t) {
792
+ return t != null && t.length ? t.some((s) => s.type === ke) ? "down" : t.some((s) => s.type === Me) ? "up" : null : null;
791
793
  }
792
- function fs(t) {
793
- const { channel: s } = Me(), { client: n } = $e("useMessageVote"), o = _e(
794
- () => hs(t.own_reactions),
794
+ function bs(t) {
795
+ const { channel: s } = Te(), { client: n } = je("useMessageVote"), o = Se(
796
+ () => xs(t.own_reactions),
795
797
  [t.own_reactions]
796
- ), l = P(async () => {
798
+ ), l = A(async () => {
797
799
  if (n != null && n.userID)
798
800
  try {
799
- o === "up" ? await s.deleteReaction(t.id, Se) : await s.sendReaction(
801
+ o === "up" ? await s.deleteReaction(t.id, Me) : await s.sendReaction(
800
802
  t.id,
801
- { type: Se },
803
+ { type: Me },
802
804
  { enforce_unique: !0, skip_push: !0 }
803
805
  );
804
806
  } catch {
805
807
  }
806
- }, [s, n == null ? void 0 : n.userID, t.id, o]), m = P(async () => {
808
+ }, [s, n == null ? void 0 : n.userID, t.id, o]), d = A(async () => {
807
809
  if (n != null && n.userID)
808
810
  try {
809
- o === "down" ? await s.deleteReaction(t.id, Ie) : await s.sendReaction(
811
+ o === "down" ? await s.deleteReaction(t.id, ke) : await s.sendReaction(
810
812
  t.id,
811
- { type: Ie },
813
+ { type: ke },
812
814
  { enforce_unique: !0, skip_push: !0 }
813
815
  );
814
816
  } catch {
815
817
  }
816
818
  }, [s, n == null ? void 0 : n.userID, t.id, o]);
817
- return { selected: o, voteUp: l, voteDown: m };
819
+ return { selected: o, voteUp: l, voteDown: d };
818
820
  }
819
- const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
821
+ const Cs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
820
822
  "path",
821
823
  {
822
824
  d: "M4.667 7.333l2.666-6A1.333 1.333 0 018.667 2v2.667a.667.667 0 00.666.666h3.764a1.334 1.334 0 011.192 1.93l-2.333 4.666a1.333 1.333 0 01-1.193.738H4.667m0-5.334v5.334m0-5.334H2.667a1.333 1.333 0 00-1.334 1.334v2.666a1.333 1.333 0 001.334 1.334h2",
@@ -826,7 +828,7 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
826
828
  strokeLinejoin: "round",
827
829
  fill: t ? "currentColor" : "none"
828
830
  }
829
- ) }), xs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
831
+ ) }), Ns = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
830
832
  "path",
831
833
  {
832
834
  d: "M11.333 8.667l-2.666 6A1.333 1.333 0 017.333 14v-2.667a.667.667 0 00-.666-.666H2.903a1.334 1.334 0 01-1.192-1.93l2.333-4.666a1.333 1.333 0 011.193-.738h6.096m0 5.334V3.333m0 5.334h2a1.333 1.333 0 001.334-1.334V4.667a1.333 1.333 0 00-1.334-1.334h-2",
@@ -836,7 +838,7 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
836
838
  strokeLinejoin: "round",
837
839
  fill: t ? "currentColor" : "none"
838
840
  }
839
- ) }), bs = ({
841
+ ) }), vs = ({
840
842
  selected: t,
841
843
  onVoteUp: s,
842
844
  onVoteDown: n
@@ -849,7 +851,7 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
849
851
  onClick: s,
850
852
  "aria-label": "Helpful",
851
853
  "aria-pressed": t === "up",
852
- children: /* @__PURE__ */ e(gs, { filled: t === "up" })
854
+ children: /* @__PURE__ */ e(Cs, { filled: t === "up" })
853
855
  }
854
856
  ),
855
857
  /* @__PURE__ */ e(
@@ -860,186 +862,186 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
860
862
  onClick: n,
861
863
  "aria-label": "Not helpful",
862
864
  "aria-pressed": t === "down",
863
- children: /* @__PURE__ */ e(xs, { filled: t === "down" })
865
+ children: /* @__PURE__ */ e(Ns, { filled: t === "down" })
864
866
  }
865
867
  )
866
- ] }), Cs = (t) => {
867
- var de, ue;
868
+ ] }), ps = (t) => {
869
+ var ne, me;
868
870
  const {
869
871
  additionalMessageInputProps: s,
870
872
  chatbotVotingEnabled: n,
871
873
  editing: o,
872
874
  endOfGroup: l,
873
- firstOfGroup: m,
874
- groupedByUser: a,
875
+ firstOfGroup: d,
876
+ groupedByUser: r,
875
877
  handleAction: c,
876
- handleOpenThread: g,
878
+ handleOpenThread: f,
877
879
  handleRetry: h,
878
- highlighted: b,
879
- isMessageAIGenerated: x,
880
- isMyMessage: w,
881
- message: r,
882
- renderText: y,
880
+ highlighted: x,
881
+ isMessageAIGenerated: g,
882
+ isMyMessage: p,
883
+ message: a,
884
+ renderText: w,
883
885
  threadList: _
884
- } = t, { client: C } = $e("CustomMessage"), [M, E] = T(!1), p = ft(r.id), { selected: S, voteUp: L, voteDown: d } = fs(r), {
885
- Attachment: u = xt,
886
- EditMessageModal: N = bt,
887
- MessageBlocked: v = Ct,
888
- MessageBouncePrompt: f = Nt,
889
- MessageDeleted: k = vt,
890
- MessageIsThreadReplyInChannelButtonIndicator: H = wt,
891
- MessageRepliesCountButton: Z = pt,
892
- ReminderNotification: Y = yt,
893
- StreamedMessageText: D = _t,
894
- PinIndicator: W
895
- } = gt("CustomMessage"), j = Et(r), ne = St(r), ae = _e(
896
- () => x == null ? void 0 : x(r),
897
- [x, r]
898
- ), G = _e(
899
- () => !r.shared_location && !r.attachments ? [] : r.shared_location ? [r.shared_location, ...r.attachments ?? []] : r.attachments,
900
- [r]
886
+ } = t, { client: b } = je("CustomMessage"), [M, E] = k(!1), y = xt(a.id), { selected: S, voteUp: R, voteDown: m } = bs(a), {
887
+ Attachment: u = Ct,
888
+ EditMessageModal: C = Nt,
889
+ MessageBlocked: T = vt,
890
+ MessageBouncePrompt: v = pt,
891
+ MessageDeleted: N = yt,
892
+ MessageIsThreadReplyInChannelButtonIndicator: F = wt,
893
+ MessageRepliesCountButton: Q = _t,
894
+ ReminderNotification: Y = Et,
895
+ StreamedMessageText: Z = St,
896
+ PinIndicator: L
897
+ } = bt("CustomMessage"), W = It(a), j = Mt(a), re = Se(
898
+ () => g == null ? void 0 : g(a),
899
+ [g, a]
900
+ ), z = Se(
901
+ () => !a.shared_location && !a.attachments ? [] : a.shared_location ? [a.shared_location, ...a.attachments ?? []] : a.attachments,
902
+ [a]
901
903
  );
902
- if (It(r))
904
+ if (kt(a))
903
905
  return null;
904
- if (r.deleted_at || r.type === "deleted")
905
- return /* @__PURE__ */ e(k, { message: r });
906
- if (Mt(r))
907
- return /* @__PURE__ */ e(v, {});
908
- const K = !_ && !!r.reply_count, re = !_ && r.show_in_channel && r.parent_id, U = r.status === "failed" && ((de = r.error) == null ? void 0 : de.status) !== 403, O = kt(r);
909
- let A;
910
- U ? A = () => h(r) : O && (A = () => E(!0));
911
- const z = w(), ce = R(
906
+ if (a.deleted_at || a.type === "deleted")
907
+ return /* @__PURE__ */ e(N, { message: a });
908
+ if (Tt(a))
909
+ return /* @__PURE__ */ e(T, {});
910
+ const te = !_ && !!a.reply_count, se = !_ && a.show_in_channel && a.parent_id, O = a.status === "failed" && ((ne = a.error) == null ? void 0 : ne.status) !== 403, P = Dt(a);
911
+ let B;
912
+ O ? B = () => h(a) : P && (B = () => E(!0));
913
+ const H = p(), oe = D(
912
914
  "str-chat__message str-chat__message-simple",
913
- `str-chat__message--${r.type}`,
914
- `str-chat__message--${r.status}`,
915
- z ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
916
- r.text ? "str-chat__message--has-text" : "has-no-text",
915
+ `str-chat__message--${a.type}`,
916
+ `str-chat__message--${a.status}`,
917
+ H ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
918
+ a.text ? "str-chat__message--has-text" : "has-no-text",
917
919
  {
918
- "str-chat__message--has-attachment": j,
919
- "str-chat__message--highlighted": b,
920
- "str-chat__message--pinned pinned-message": r.pinned,
921
- "str-chat__message--with-reactions": ne,
922
- "str-chat__message-send-can-be-retried": (r == null ? void 0 : r.status) === "failed" && ((ue = r == null ? void 0 : r.error) == null ? void 0 : ue.status) !== 403,
923
- "str-chat__message-with-thread-link": K || re,
920
+ "str-chat__message--has-attachment": W,
921
+ "str-chat__message--highlighted": x,
922
+ "str-chat__message--pinned pinned-message": a.pinned,
923
+ "str-chat__message--with-reactions": j,
924
+ "str-chat__message-send-can-be-retried": (a == null ? void 0 : a.status) === "failed" && ((me = a == null ? void 0 : a.error) == null ? void 0 : me.status) !== 403,
925
+ "str-chat__message-with-thread-link": te || se,
924
926
  "str-chat__virtual-message__wrapper--end": l,
925
- "str-chat__virtual-message__wrapper--first": m,
926
- "str-chat__virtual-message__wrapper--group": a
927
+ "str-chat__virtual-message__wrapper--first": d,
928
+ "str-chat__virtual-message__wrapper--group": r
927
929
  }
928
- ), q = r.poll_id && C.polls.fromState(r.poll_id), oe = cs(r), ee = Te(r), J = !!(G != null && G.length && !r.quoted_message), te = ee && z && J;
929
- return /* @__PURE__ */ i(me, { children: [
930
+ ), ve = a.poll_id && b.polls.fromState(a.poll_id), q = us(a), J = Re(a), le = !!(z != null && z.length && !a.quoted_message), ee = J && H && le;
931
+ return /* @__PURE__ */ i(de, { children: [
930
932
  o && /* @__PURE__ */ e(
931
- N,
933
+ C,
932
934
  {
933
935
  additionalMessageInputProps: s
934
936
  }
935
937
  ),
936
938
  M && /* @__PURE__ */ e(
937
- Tt,
939
+ Rt,
938
940
  {
939
- MessageBouncePrompt: f,
941
+ MessageBouncePrompt: v,
940
942
  onClose: () => E(!1),
941
943
  open: M
942
944
  }
943
945
  ),
944
- /* @__PURE__ */ i("div", { className: ce, children: [
945
- W && /* @__PURE__ */ e(W, {}),
946
- !!p && /* @__PURE__ */ e(Y, { reminder: p }),
947
- r.user && /* @__PURE__ */ e(
948
- se,
946
+ /* @__PURE__ */ i("div", { className: oe, children: [
947
+ L && /* @__PURE__ */ e(L, {}),
948
+ !!y && /* @__PURE__ */ e(Y, { reminder: y }),
949
+ a.user && /* @__PURE__ */ e(
950
+ ae,
949
951
  {
950
952
  className: "str-chat__avatar str-chat__message-sender-avatar",
951
- id: r.user.id,
952
- image: r.user.image,
953
- name: r.user.name || r.user.id
953
+ id: a.user.id,
954
+ image: a.user.image,
955
+ name: a.user.name || a.user.id
954
956
  }
955
957
  ),
956
958
  /* @__PURE__ */ e(
957
959
  "div",
958
960
  {
959
- className: R("str-chat__message-inner", {
960
- "str-chat__simple-message--error-failed": U || O
961
+ className: D("str-chat__message-inner", {
962
+ "str-chat__simple-message--error-failed": O || P
961
963
  }),
962
964
  "data-testid": "message-inner",
963
- onClick: A,
964
- onKeyDown: A,
965
- role: A ? "button" : void 0,
966
- tabIndex: A ? 0 : void 0,
965
+ onClick: B,
966
+ onKeyDown: B,
967
+ role: B ? "button" : void 0,
968
+ tabIndex: B ? 0 : void 0,
967
969
  style: {
968
970
  // Force margins to 0 to prevent hover layout shift
969
971
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
970
972
  marginInlineEnd: 0,
971
973
  marginInlineStart: 0
972
974
  },
973
- children: oe ? (
975
+ children: q ? (
974
976
  /* Tip-only messages render as a standalone bubble */
975
- /* @__PURE__ */ e(ye, { message: r, standalone: !0 })
977
+ /* @__PURE__ */ e(_e, { message: a, standalone: !0 })
976
978
  ) : /* @__PURE__ */ i("div", { className: "str-chat__message-bubble-wrapper", children: [
977
979
  /* @__PURE__ */ i("div", { className: "str-chat__message-bubble", children: [
978
- ee && !te && /* @__PURE__ */ e(
979
- ye,
980
+ J && !ee && /* @__PURE__ */ e(
981
+ _e,
980
982
  {
981
- message: r,
982
- hasAttachment: J,
983
- isMyMessage: z
983
+ message: a,
984
+ hasAttachment: le,
985
+ isMyMessage: H
984
986
  }
985
987
  ),
986
- q && /* @__PURE__ */ e(Dt, { poll: q }),
987
- G != null && G.length && !r.quoted_message ? /* @__PURE__ */ e(
988
+ ve && /* @__PURE__ */ e(Lt, { poll: ve }),
989
+ z != null && z.length && !a.quoted_message ? /* @__PURE__ */ e(
988
990
  u,
989
991
  {
990
992
  actionHandler: c,
991
- attachments: G
993
+ attachments: z
992
994
  }
993
995
  ) : null,
994
- ae ? /* @__PURE__ */ e(
995
- D,
996
+ re ? /* @__PURE__ */ e(
997
+ Z,
996
998
  {
997
- message: r,
998
- renderText: y
999
+ message: a,
1000
+ renderText: w
999
1001
  }
1000
- ) : /* @__PURE__ */ e(Rt, { message: r, renderText: y }),
1001
- /* @__PURE__ */ e(Lt, {})
1002
+ ) : /* @__PURE__ */ e(At, { message: a, renderText: w }),
1003
+ /* @__PURE__ */ e(Pt, {})
1002
1004
  ] }),
1003
- (!ee || te) && /* @__PURE__ */ e(
1004
- ye,
1005
+ (!J || ee) && /* @__PURE__ */ e(
1006
+ _e,
1005
1007
  {
1006
- message: r,
1007
- hasAttachment: J,
1008
- isMyMessage: z
1008
+ message: a,
1009
+ hasAttachment: le,
1010
+ isMyMessage: H
1009
1011
  }
1010
1012
  ),
1011
- n && ee && /* @__PURE__ */ e(
1012
- bs,
1013
+ n && J && /* @__PURE__ */ e(
1014
+ vs,
1013
1015
  {
1014
1016
  selected: S,
1015
- onVoteUp: L,
1016
- onVoteDown: d
1017
+ onVoteUp: R,
1018
+ onVoteDown: m
1017
1019
  }
1018
1020
  )
1019
1021
  ] })
1020
1022
  }
1021
1023
  ),
1022
- K && /* @__PURE__ */ e(
1023
- Z,
1024
+ te && /* @__PURE__ */ e(
1025
+ Q,
1024
1026
  {
1025
- onClick: g,
1026
- reply_count: r.reply_count
1027
+ onClick: f,
1028
+ reply_count: a.reply_count
1027
1029
  }
1028
1030
  ),
1029
- re && /* @__PURE__ */ e(H, {})
1030
- ] }, r.id)
1031
+ se && /* @__PURE__ */ e(F, {})
1032
+ ] }, a.id)
1031
1033
  ] });
1032
- }, Ns = B.memo(
1033
- Cs,
1034
- ht
1035
- ), vs = (t) => {
1036
- const s = je("CustomMessage");
1037
- return /* @__PURE__ */ e(Ns, { ...s, ...t });
1038
- }, ws = (t) => ({
1034
+ }, ys = G.memo(
1035
+ ps,
1036
+ gt
1037
+ ), ws = (t) => {
1038
+ const s = ze("CustomMessage");
1039
+ return /* @__PURE__ */ e(ys, { ...s, ...t });
1040
+ }, _s = (t) => ({
1039
1041
  linkPreviews: Array.from(t.previews.values()).filter(
1040
- (s) => Fe.previewIsLoaded(s) || Fe.previewIsLoading(s)
1042
+ (s) => Be.previewIsLoaded(s) || Be.previewIsLoading(s)
1041
1043
  )
1042
- }), ps = ({
1044
+ }), Es = ({
1043
1045
  link: t,
1044
1046
  onDismiss: s
1045
1047
  }) => {
@@ -1064,12 +1066,12 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
1064
1066
  "button",
1065
1067
  {
1066
1068
  type: "button",
1067
- onClick: (a) => {
1068
- a.preventDefault(), s(n);
1069
+ onClick: (r) => {
1070
+ r.preventDefault(), s(n);
1069
1071
  },
1070
1072
  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",
1071
1073
  "aria-label": "Close link preview",
1072
- children: /* @__PURE__ */ e(ke, { className: "size-4 text-black/90" })
1074
+ children: /* @__PURE__ */ e(De, { className: "size-4 text-black/90" })
1073
1075
  }
1074
1076
  ),
1075
1077
  /* @__PURE__ */ i("div", { className: "p-2", children: [
@@ -1079,32 +1081,32 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
1079
1081
  ]
1080
1082
  }
1081
1083
  );
1082
- }, ys = () => {
1083
- const { linkPreviewsManager: t } = Pt(), { linkPreviews: s } = Ut(
1084
+ }, Ss = () => {
1085
+ const { linkPreviewsManager: t } = Ft(), { linkPreviews: s } = Ot(
1084
1086
  t.state,
1085
- ws
1087
+ _s
1086
1088
  ), n = (l) => {
1087
1089
  t.dismissPreview(l);
1088
1090
  };
1089
1091
  return s.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: s.map((l) => /* @__PURE__ */ e(
1090
- ps,
1092
+ Es,
1091
1093
  {
1092
1094
  link: l,
1093
1095
  onDismiss: n
1094
1096
  },
1095
1097
  l.og_scrape_url
1096
1098
  )) }) : null;
1097
- }, _s = () => {
1098
- const { handleSubmit: t } = Ft(), s = At();
1099
- return /* @__PURE__ */ i(me, { children: [
1100
- /* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(Bt, {}) }),
1099
+ }, Is = () => {
1100
+ const { handleSubmit: t } = Bt(), s = Gt();
1101
+ return /* @__PURE__ */ i(de, { children: [
1102
+ /* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e($t, {}) }),
1101
1103
  /* @__PURE__ */ i("div", { className: "central-container min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
1102
- /* @__PURE__ */ e($t, {}),
1103
- /* @__PURE__ */ e(ys, {}),
1104
1104
  /* @__PURE__ */ e(jt, {}),
1105
+ /* @__PURE__ */ e(Ss, {}),
1106
+ /* @__PURE__ */ e(zt, {}),
1105
1107
  /* @__PURE__ */ i("div", { className: "flex", children: [
1106
1108
  /* @__PURE__ */ e("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ e(
1107
- Gt,
1109
+ Ht,
1108
1110
  {
1109
1111
  className: "w-full resize-none outline-none leading-6",
1110
1112
  autoFocus: !0,
@@ -1120,43 +1122,79 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
1120
1122
  disabled: !s,
1121
1123
  onClick: t,
1122
1124
  type: "button",
1123
- children: /* @__PURE__ */ e(Jt, { className: "size-4" })
1125
+ children: /* @__PURE__ */ e(Kt, { className: "size-4" })
1124
1126
  }
1125
1127
  )
1126
1128
  ] })
1127
1129
  ] })
1128
1130
  ] });
1129
- }, Es = ({
1131
+ }, Ms = ({
1130
1132
  renderActions: t
1131
1133
  }) => /* @__PURE__ */ i("div", { className: "message-input flex items-center gap-2 p-4", children: [
1132
1134
  t && (t == null ? void 0 : t()),
1133
- /* @__PURE__ */ e(Ot, { Input: _s })
1134
- ] }), Ss = [
1135
+ /* @__PURE__ */ e(Ut, { Input: Is })
1136
+ ] }), ks = [
1135
1137
  "SYSTEM_DM_AGENT_PAUSED",
1136
1138
  "SYSTEM_DM_AGENT_RESUMED"
1137
- ], Is = {
1139
+ ], Ts = {
1138
1140
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1139
1141
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1140
- }, Be = (t) => Ss.includes(t), Ms = (t) => {
1142
+ }, Ds = [
1143
+ "SYSTEM_AGE_SAFETY_BLOCKED"
1144
+ ], Rs = {
1145
+ SYSTEM_AGE_SAFETY_BLOCKED: "This user isnโ€™t able to reply because they donโ€™t meet our age safety guidelines."
1146
+ }, Ee = "age safety guidelines.", Ls = "https://linktr.ee/s/about/contact", $e = (t) => ks.includes(t), As = (t) => Ds.includes(t), Ps = (t) => {
1141
1147
  var o;
1142
1148
  const s = (o = t.metadata) == null ? void 0 : o.custom_type;
1143
- if (Be(s))
1144
- return s;
1149
+ if ($e(s))
1150
+ return {
1151
+ kind: "dm-agent",
1152
+ type: s
1153
+ };
1154
+ if (As(s))
1155
+ return {
1156
+ kind: "age-safety",
1157
+ type: s
1158
+ };
1145
1159
  const n = t.dm_agent_system_type;
1146
- if (Be(n))
1147
- return n;
1148
- }, ks = (t) => {
1149
- var o;
1150
- const s = t.message.hide_date === !0, n = Ms(t.message);
1151
- if (n) {
1152
- const l = ((o = t.message.text) == null ? void 0 : o.trim()) || Is[n];
1160
+ if ($e(n))
1161
+ return {
1162
+ kind: "dm-agent",
1163
+ type: n
1164
+ };
1165
+ }, Fs = (t) => {
1166
+ const s = t.indexOf(Ee);
1167
+ if (s === -1)
1168
+ return t;
1169
+ const n = s + Ee.length;
1170
+ return /* @__PURE__ */ i(de, { children: [
1171
+ t.slice(0, s),
1172
+ /* @__PURE__ */ e(
1173
+ "a",
1174
+ {
1175
+ href: Ls,
1176
+ target: "_blank",
1177
+ rel: "noopener noreferrer",
1178
+ className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
1179
+ children: Ee
1180
+ }
1181
+ ),
1182
+ t.slice(n)
1183
+ ] });
1184
+ }, Os = (t) => {
1185
+ var o, l;
1186
+ const s = t.message.hide_date === !0, n = Ps(
1187
+ t.message
1188
+ );
1189
+ if ((n == null ? void 0 : n.kind) === "dm-agent") {
1190
+ const d = ((o = t.message.text) == null ? void 0 : o.trim()) || Ts[n.type];
1153
1191
  return /* @__PURE__ */ i("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1154
1192
  /* @__PURE__ */ i(
1155
1193
  "div",
1156
1194
  {
1157
- className: "mes-dm-agent-system-message",
1195
+ className: "mes-dm-agent-system-message mx-auto mb-2 inline-flex w-fit max-w-[min(100%,480px)] items-center justify-center gap-[10px] rounded-[12px] border border-[rgba(0,0,0,0.08)] p-3 text-[rgba(0,0,0,0.55)]",
1158
1196
  "data-testid": "dm-agent-system-message",
1159
- "data-dm-agent-system-type": n,
1197
+ "data-dm-agent-system-type": n.type,
1160
1198
  children: [
1161
1199
  /* @__PURE__ */ e(
1162
1200
  Qt,
@@ -1164,14 +1202,41 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
1164
1202
  size: 16,
1165
1203
  weight: "regular",
1166
1204
  "aria-hidden": !0,
1167
- className: "mes-dm-agent-system-message__sparkle"
1205
+ className: "mes-dm-agent-system-message__sparkle shrink-0"
1168
1206
  }
1169
1207
  ),
1170
- /* @__PURE__ */ e("p", { className: "mes-dm-agent-system-message__text", children: l })
1208
+ /* @__PURE__ */ e("p", { className: "mes-dm-agent-system-message__text m-0 text-center text-[14px] font-normal leading-5 tracking-[0.21px]", children: d })
1171
1209
  ]
1172
1210
  }
1173
1211
  ),
1174
- !s && /* @__PURE__ */ e(Re, { message: t.message })
1212
+ !s && /* @__PURE__ */ e(we, { message: t.message })
1213
+ ] });
1214
+ }
1215
+ if ((n == null ? void 0 : n.kind) === "age-safety") {
1216
+ const d = ((l = t.message.text) == null ? void 0 : l.trim()) || Rs[n.type];
1217
+ return /* @__PURE__ */ i("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1218
+ /* @__PURE__ */ i(
1219
+ "div",
1220
+ {
1221
+ className: "mes-age-safety-system-message box-border mx-auto mb-2 flex w-full max-w-[329px] items-start justify-center gap-3 rounded-[12px] border border-[var(--border-secondary,rgba(0,0,0,0.08))] bg-[var(--bg-warning-subtle,#fef3c6)] px-2 py-4 pl-5 text-[color:var(--text-warning-on-warning,#894b00)]",
1222
+ "data-testid": "age-safety-system-message",
1223
+ "data-age-safety-system-type": n.type,
1224
+ children: [
1225
+ /* @__PURE__ */ e(
1226
+ es,
1227
+ {
1228
+ size: 24,
1229
+ weight: "duotone",
1230
+ "aria-hidden": !0,
1231
+ className: "mes-age-safety-system-message__icon shrink-0 text-[color:var(--text-warning-on-warning,#894b00)]",
1232
+ "data-testid": "age-safety-system-message-icon"
1233
+ }
1234
+ ),
1235
+ /* @__PURE__ */ e("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ e("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Fs(d) }) })
1236
+ ]
1237
+ }
1238
+ ),
1239
+ !s && /* @__PURE__ */ e(we, { message: t.message })
1175
1240
  ] });
1176
1241
  }
1177
1242
  return /* @__PURE__ */ i("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -1180,12 +1245,12 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
1180
1245
  /* @__PURE__ */ e("p", { children: t.message.text }),
1181
1246
  /* @__PURE__ */ e("div", { className: "str-chat__message--system__line" })
1182
1247
  ] }),
1183
- !s && /* @__PURE__ */ e(Re, { message: t.message })
1248
+ !s && /* @__PURE__ */ e(we, { message: t.message })
1184
1249
  ] });
1185
- }, Ts = () => null, Ds = ({ className: t, message: s }) => /* @__PURE__ */ i(
1250
+ }, Us = () => null, Bs = ({ className: t, message: s }) => /* @__PURE__ */ i(
1186
1251
  "div",
1187
1252
  {
1188
- className: R("flex items-center justify-center h-full", t),
1253
+ className: D("flex items-center justify-center h-full", t),
1189
1254
  children: [
1190
1255
  /* @__PURE__ */ i("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
1191
1256
  /* @__PURE__ */ e("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ e(
@@ -1225,31 +1290,31 @@ const gs = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
1225
1290
  s && /* @__PURE__ */ e("span", { className: "text-stone", children: s })
1226
1291
  ]
1227
1292
  }
1228
- ), Ne = B.memo(() => /* @__PURE__ */ e("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
1229
- /* @__PURE__ */ e(Ds, { className: "w-6 h-6" }),
1293
+ ), Ce = G.memo(() => /* @__PURE__ */ e("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
1294
+ /* @__PURE__ */ e(Bs, { className: "w-6 h-6" }),
1230
1295
  /* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading messages" })
1231
1296
  ] }) }));
1232
- Ne.displayName = "LoadingState";
1233
- const ie = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Rs = ({
1297
+ Ce.displayName = "LoadingState";
1298
+ const ce = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Gs = ({
1234
1299
  onBack: t,
1235
1300
  showBackButton: s,
1236
1301
  onShowInfo: n,
1237
1302
  canShowInfo: o,
1238
1303
  showStarButton: l = !1
1239
1304
  }) => {
1240
- var x, w, r, y, _;
1241
- const { channel: m } = Me(), a = B.useMemo(() => Object.values(m.state.members || {}).find(
1305
+ var g, p, a, w, _;
1306
+ const { channel: d } = Te(), r = G.useMemo(() => Object.values(d.state.members || {}).find(
1242
1307
  (M) => {
1243
1308
  var E;
1244
- return ((E = M.user) == null ? void 0 : E.id) && M.user.id !== m._client.userID;
1309
+ return ((E = M.user) == null ? void 0 : E.id) && M.user.id !== d._client.userID;
1245
1310
  }
1246
- ), [m._client.userID, m.state.members]), c = ((x = a == null ? void 0 : a.user) == null ? void 0 : x.name) || ((w = a == null ? void 0 : a.user) == null ? void 0 : w.id) || "Unknown member", g = (r = a == null ? void 0 : a.user) == null ? void 0 : r.image, h = Ve(m), b = async () => {
1311
+ ), [d._client.userID, d.state.members]), c = ((g = r == null ? void 0 : r.user) == null ? void 0 : g.name) || ((p = r == null ? void 0 : r.user) == null ? void 0 : p.id) || "Unknown member", f = (a = r == null ? void 0 : r.user) == null ? void 0 : a.image, h = Ye(d), x = async () => {
1247
1312
  try {
1248
- h ? await m.unpin() : await m.pin();
1249
- } catch (C) {
1313
+ h ? await d.unpin() : await d.pin();
1314
+ } catch (b) {
1250
1315
  console.error(
1251
1316
  "[CustomChannelHeader] Failed to update pinned status:",
1252
- C
1317
+ b
1253
1318
  );
1254
1319
  }
1255
1320
  };
@@ -1258,21 +1323,21 @@ const ie = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1258
1323
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: s && /* @__PURE__ */ e(
1259
1324
  "button",
1260
1325
  {
1261
- className: ie,
1326
+ className: ce,
1262
1327
  onClick: t || (() => {
1263
1328
  }),
1264
1329
  type: "button",
1265
1330
  "aria-label": "Back to conversations",
1266
- children: /* @__PURE__ */ e(Pe, { className: "size-5 text-black/90" })
1331
+ children: /* @__PURE__ */ e(Fe, { className: "size-5 text-black/90" })
1267
1332
  }
1268
1333
  ) }),
1269
1334
  /* @__PURE__ */ i("div", { className: "flex flex-col gap-1 items-center", children: [
1270
1335
  /* @__PURE__ */ e(
1271
- se,
1336
+ ae,
1272
1337
  {
1273
- id: ((y = a == null ? void 0 : a.user) == null ? void 0 : y.id) || m.id || "unknown",
1338
+ id: ((w = r == null ? void 0 : r.user) == null ? void 0 : w.id) || d.id || "unknown",
1274
1339
  name: c,
1275
- image: g,
1340
+ image: f,
1276
1341
  starred: h,
1277
1342
  size: 40
1278
1343
  }
@@ -1283,14 +1348,14 @@ const ie = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1283
1348
  l && /* @__PURE__ */ e(
1284
1349
  "button",
1285
1350
  {
1286
- className: ie,
1287
- onClick: b,
1351
+ className: ce,
1352
+ onClick: x,
1288
1353
  type: "button",
1289
1354
  "aria-label": h ? "Unstar conversation" : "Star conversation",
1290
1355
  children: /* @__PURE__ */ e(
1291
- Ee,
1356
+ Ie,
1292
1357
  {
1293
- className: R("size-5", {
1358
+ className: D("size-5", {
1294
1359
  "text-yellow-600": h,
1295
1360
  "text-black/90": !h
1296
1361
  }),
@@ -1302,11 +1367,11 @@ const ie = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1302
1367
  /* @__PURE__ */ e(
1303
1368
  "button",
1304
1369
  {
1305
- className: ie,
1370
+ className: ce,
1306
1371
  onClick: n,
1307
1372
  type: "button",
1308
1373
  "aria-label": "Show info",
1309
- children: /* @__PURE__ */ e(Ue, { className: "size-5 text-black/90" })
1374
+ children: /* @__PURE__ */ e(Oe, { className: "size-5 text-black/90" })
1310
1375
  }
1311
1376
  )
1312
1377
  ] })
@@ -1318,17 +1383,17 @@ const ie = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1318
1383
  {
1319
1384
  type: "button",
1320
1385
  onClick: t,
1321
- className: ie,
1386
+ className: ce,
1322
1387
  "aria-label": "Back to conversations",
1323
- children: /* @__PURE__ */ e(Pe, { className: "size-5 text-black/90" })
1388
+ children: /* @__PURE__ */ e(Fe, { className: "size-5 text-black/90" })
1324
1389
  }
1325
1390
  ),
1326
1391
  /* @__PURE__ */ e(
1327
- se,
1392
+ ae,
1328
1393
  {
1329
- id: ((_ = a == null ? void 0 : a.user) == null ? void 0 : _.id) || m.id || "unknown",
1394
+ id: ((_ = r == null ? void 0 : r.user) == null ? void 0 : _.id) || d.id || "unknown",
1330
1395
  name: c,
1331
- image: g,
1396
+ image: f,
1332
1397
  starred: h,
1333
1398
  size: 40
1334
1399
  }
@@ -1339,14 +1404,14 @@ const ie = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1339
1404
  l && /* @__PURE__ */ e(
1340
1405
  "button",
1341
1406
  {
1342
- className: ie,
1343
- onClick: b,
1407
+ className: ce,
1408
+ onClick: x,
1344
1409
  type: "button",
1345
1410
  "aria-label": h ? "Unstar conversation" : "Star conversation",
1346
1411
  children: /* @__PURE__ */ e(
1347
- Ee,
1412
+ Ie,
1348
1413
  {
1349
- className: R("size-5", {
1414
+ className: D("size-5", {
1350
1415
  "text-yellow-600": h,
1351
1416
  "text-black/90": !h
1352
1417
  }),
@@ -1358,198 +1423,198 @@ const ie = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1358
1423
  o && n && /* @__PURE__ */ e(
1359
1424
  "button",
1360
1425
  {
1361
- className: ie,
1426
+ className: ce,
1362
1427
  onClick: n,
1363
1428
  type: "button",
1364
1429
  "aria-label": "Show info",
1365
- children: /* @__PURE__ */ e(Ue, { className: "size-5 text-black/90" })
1430
+ children: /* @__PURE__ */ e(Oe, { className: "size-5 text-black/90" })
1366
1431
  }
1367
1432
  )
1368
1433
  ] })
1369
1434
  ] })
1370
1435
  ] });
1371
- }, Ls = ({
1436
+ }, $s = ({
1372
1437
  onBack: t,
1373
1438
  showBackButton: s,
1374
1439
  renderMessageInputActions: n,
1375
1440
  renderConversationFooter: o,
1376
1441
  onLeaveConversation: l,
1377
- onBlockParticipant: m,
1378
- showDeleteConversation: a = !0,
1442
+ onBlockParticipant: d,
1443
+ showDeleteConversation: r = !0,
1379
1444
  onDeleteConversationClick: c,
1380
- onBlockParticipantClick: g,
1445
+ onBlockParticipantClick: f,
1381
1446
  onReportParticipantClick: h,
1382
- showStarButton: b = !1,
1383
- chatbotVotingEnabled: x = !1,
1384
- renderChannelBanner: w,
1385
- customProfileContent: r,
1386
- customChannelActions: y,
1447
+ showStarButton: x = !1,
1448
+ chatbotVotingEnabled: g = !1,
1449
+ renderChannelBanner: p,
1450
+ customProfileContent: a,
1451
+ customChannelActions: w,
1387
1452
  renderMessage: _
1388
1453
  }) => {
1389
- const { channel: C } = Me(), M = Q(null), E = B.useMemo(() => Object.values(C.state.members || {}).find(
1454
+ const { channel: b } = Te(), M = X(null), E = G.useMemo(() => Object.values(b.state.members || {}).find(
1390
1455
  (u) => {
1391
- var N;
1392
- return ((N = u.user) == null ? void 0 : N.id) && u.user.id !== C._client.userID;
1456
+ var C;
1457
+ return ((C = u.user) == null ? void 0 : C.id) && u.user.id !== b._client.userID;
1393
1458
  }
1394
- ), [C._client.userID, C.state.members]), p = B.useMemo(() => {
1395
- const d = C.data ?? {};
1396
- if (d.followerStatus)
1397
- return String(d.followerStatus);
1398
- if (d.isFollower !== void 0)
1399
- return d.isFollower ? "Subscribed to you" : "Not subscribed";
1400
- }, [C.data]), S = P(() => {
1401
- var d;
1402
- (d = M.current) == null || d.showModal();
1403
- }, []), L = P(() => {
1404
- var d;
1405
- (d = M.current) == null || d.close();
1459
+ ), [b._client.userID, b.state.members]), y = G.useMemo(() => {
1460
+ const m = b.data ?? {};
1461
+ if (m.followerStatus)
1462
+ return String(m.followerStatus);
1463
+ if (m.isFollower !== void 0)
1464
+ return m.isFollower ? "Subscribed to you" : "Not subscribed";
1465
+ }, [b.data]), S = A(() => {
1466
+ var m;
1467
+ (m = M.current) == null || m.showModal();
1468
+ }, []), R = A(() => {
1469
+ var m;
1470
+ (m = M.current) == null || m.close();
1406
1471
  }, []);
1407
- return /* @__PURE__ */ i(me, { children: [
1472
+ return /* @__PURE__ */ i(de, { children: [
1408
1473
  /* @__PURE__ */ e(
1409
- Vt,
1474
+ Yt,
1410
1475
  {
1411
1476
  overrides: {
1412
- Message: (d) => {
1413
- const { message: u } = je("ChannelView"), N = /* @__PURE__ */ e(
1414
- vs,
1477
+ Message: (m) => {
1478
+ const { message: u } = ze("ChannelView"), C = /* @__PURE__ */ e(
1479
+ ws,
1415
1480
  {
1416
- ...d,
1417
- chatbotVotingEnabled: x
1481
+ ...m,
1482
+ chatbotVotingEnabled: g
1418
1483
  }
1419
1484
  );
1420
- return !_ || !u ? N : _(N, u);
1485
+ return !_ || !u ? C : _(C, u);
1421
1486
  }
1422
1487
  },
1423
- children: /* @__PURE__ */ i(Ht, { children: [
1488
+ children: /* @__PURE__ */ i(Wt, { children: [
1424
1489
  /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(
1425
- Rs,
1490
+ Gs,
1426
1491
  {
1427
1492
  onBack: t,
1428
1493
  showBackButton: s,
1429
1494
  onShowInfo: S,
1430
1495
  canShowInfo: !!E,
1431
- showStarButton: b
1496
+ showStarButton: x
1432
1497
  }
1433
1498
  ) }),
1434
- w == null ? void 0 : w(),
1499
+ p == null ? void 0 : p(),
1435
1500
  /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden relative", children: /* @__PURE__ */ e(
1436
- Wt,
1501
+ qt,
1437
1502
  {
1438
1503
  hideDeletedMessages: !0,
1439
1504
  hideNewMessageSeparator: !1,
1440
1505
  messageActions: void 0
1441
1506
  }
1442
1507
  ) }),
1443
- o == null ? void 0 : o(C),
1508
+ o == null ? void 0 : o(b),
1444
1509
  /* @__PURE__ */ e(
1445
- Es,
1510
+ Ms,
1446
1511
  {
1447
- renderActions: () => n == null ? void 0 : n(C)
1512
+ renderActions: () => n == null ? void 0 : n(b)
1448
1513
  }
1449
1514
  )
1450
1515
  ] })
1451
1516
  }
1452
1517
  ),
1453
1518
  /* @__PURE__ */ e(
1454
- us,
1519
+ fs,
1455
1520
  {
1456
1521
  dialogRef: M,
1457
- onClose: L,
1522
+ onClose: R,
1458
1523
  participant: E,
1459
- channel: C,
1460
- followerStatusLabel: p,
1524
+ channel: b,
1525
+ followerStatusLabel: y,
1461
1526
  onLeaveConversation: l,
1462
- onBlockParticipant: m,
1463
- showDeleteConversation: a,
1527
+ onBlockParticipant: d,
1528
+ showDeleteConversation: r,
1464
1529
  onDeleteConversationClick: c,
1465
- onBlockParticipantClick: g,
1530
+ onBlockParticipantClick: f,
1466
1531
  onReportParticipantClick: h,
1467
- customProfileContent: r,
1468
- customChannelActions: y
1532
+ customProfileContent: a,
1533
+ customChannelActions: w
1469
1534
  }
1470
1535
  )
1471
1536
  ] });
1472
- }, Je = B.memo(
1537
+ }, Ke = G.memo(
1473
1538
  ({
1474
1539
  channel: t,
1475
1540
  onBack: s,
1476
1541
  showBackButton: n = !1,
1477
1542
  renderMessageInputActions: o,
1478
1543
  renderConversationFooter: l,
1479
- onLeaveConversation: m,
1480
- onBlockParticipant: a,
1544
+ onLeaveConversation: d,
1545
+ onBlockParticipant: r,
1481
1546
  className: c,
1482
- CustomChannelEmptyState: g = Ts,
1547
+ CustomChannelEmptyState: f = Us,
1483
1548
  showDeleteConversation: h = !0,
1484
- onDeleteConversationClick: b,
1485
- onBlockParticipantClick: x,
1486
- onReportParticipantClick: w,
1487
- dmAgentEnabled: r,
1488
- messageMetadata: y,
1549
+ onDeleteConversationClick: x,
1550
+ onBlockParticipantClick: g,
1551
+ onReportParticipantClick: p,
1552
+ dmAgentEnabled: a,
1553
+ messageMetadata: w,
1489
1554
  onMessageSent: _,
1490
- showStarButton: C = !1,
1555
+ showStarButton: b = !1,
1491
1556
  chatbotVotingEnabled: M = !1,
1492
1557
  renderChannelBanner: E,
1493
- customProfileContent: p,
1558
+ customProfileContent: y,
1494
1559
  customChannelActions: S,
1495
- renderMessage: L
1560
+ renderMessage: R
1496
1561
  }) => {
1497
- const d = P(
1498
- async (u, N, v) => {
1499
- var D;
1500
- const f = ((D = t.data) == null ? void 0 : D.chatbot_paused) === !0, k = r && !f, H = {
1501
- ...N,
1502
- ...k && { silent: !0 },
1503
- ...y && {
1562
+ const m = A(
1563
+ async (u, C, T) => {
1564
+ var Z;
1565
+ const v = ((Z = t.data) == null ? void 0 : Z.chatbot_paused) === !0, N = a && !v, F = {
1566
+ ...C,
1567
+ ...N && { silent: !0 },
1568
+ ...w && {
1504
1569
  metadata: {
1505
- ...N.metadata ?? {},
1506
- ...y
1570
+ ...C.metadata ?? {},
1571
+ ...w
1507
1572
  }
1508
1573
  }
1509
- }, Z = {
1510
- ...v,
1511
- ...k && { skip_push: !0 }
1512
- }, Y = await t.sendMessage(H, Z);
1574
+ }, Q = {
1575
+ ...T,
1576
+ ...N && { skip_push: !0 }
1577
+ }, Y = await t.sendMessage(F, Q);
1513
1578
  return _ == null || _(Y), Y;
1514
1579
  },
1515
- [t, r, y, _]
1580
+ [t, a, w, _]
1516
1581
  );
1517
1582
  return /* @__PURE__ */ e(
1518
1583
  "div",
1519
1584
  {
1520
- className: R(
1585
+ className: D(
1521
1586
  "messaging-channel-view h-full flex flex-col",
1522
1587
  c
1523
1588
  ),
1524
1589
  children: /* @__PURE__ */ e(
1525
- zt,
1590
+ Vt,
1526
1591
  {
1527
1592
  channel: t,
1528
- MessageSystem: ks,
1529
- EmptyStateIndicator: g,
1530
- LoadingIndicator: Ne,
1531
- DateSeparator: ms,
1532
- doSendMessageRequest: d,
1593
+ MessageSystem: Os,
1594
+ EmptyStateIndicator: f,
1595
+ LoadingIndicator: Ce,
1596
+ DateSeparator: gs,
1597
+ doSendMessageRequest: m,
1533
1598
  children: /* @__PURE__ */ e(
1534
- Ls,
1599
+ $s,
1535
1600
  {
1536
1601
  onBack: s,
1537
1602
  showBackButton: n,
1538
1603
  renderMessageInputActions: o,
1539
1604
  renderConversationFooter: l,
1540
- onLeaveConversation: m,
1541
- onBlockParticipant: a,
1542
- CustomChannelEmptyState: g,
1605
+ onLeaveConversation: d,
1606
+ onBlockParticipant: r,
1607
+ CustomChannelEmptyState: f,
1543
1608
  showDeleteConversation: h,
1544
- onDeleteConversationClick: b,
1545
- onBlockParticipantClick: x,
1546
- onReportParticipantClick: w,
1547
- showStarButton: C,
1609
+ onDeleteConversationClick: x,
1610
+ onBlockParticipantClick: g,
1611
+ onReportParticipantClick: p,
1612
+ showStarButton: b,
1548
1613
  chatbotVotingEnabled: M,
1549
1614
  renderChannelBanner: E,
1550
- customProfileContent: p,
1615
+ customProfileContent: y,
1551
1616
  customChannelActions: S,
1552
- renderMessage: L
1617
+ renderMessage: R
1553
1618
  }
1554
1619
  )
1555
1620
  }
@@ -1558,16 +1623,16 @@ const ie = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1558
1623
  );
1559
1624
  }
1560
1625
  );
1561
- Je.displayName = "ChannelView";
1562
- function Ps({
1626
+ Ke.displayName = "ChannelView";
1627
+ function js({
1563
1628
  searchQuery: t,
1564
1629
  setSearchQuery: s,
1565
1630
  placeholder: n
1566
1631
  }) {
1567
- const o = Q(null);
1632
+ const o = X(null);
1568
1633
  return /* @__PURE__ */ i("div", { className: "relative", children: [
1569
1634
  /* @__PURE__ */ e(
1570
- Xt,
1635
+ ts,
1571
1636
  {
1572
1637
  className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-stone",
1573
1638
  weight: "bold"
@@ -1585,7 +1650,7 @@ function Ps({
1585
1650
  }
1586
1651
  ),
1587
1652
  t && /* @__PURE__ */ e(
1588
- Ye,
1653
+ Je,
1589
1654
  {
1590
1655
  label: "Clear search",
1591
1656
  onClick: () => {
@@ -1593,24 +1658,24 @@ function Ps({
1593
1658
  s(""), (l = o.current) == null || l.focus();
1594
1659
  },
1595
1660
  className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 text-stone hover:text-charcoal",
1596
- children: /* @__PURE__ */ e(ke, { className: "h-4 w-4", weight: "bold" })
1661
+ children: /* @__PURE__ */ e(De, { className: "h-4 w-4", weight: "bold" })
1597
1662
  }
1598
1663
  )
1599
1664
  ] });
1600
1665
  }
1601
- const Us = ({
1666
+ const zs = ({
1602
1667
  participantSource: t,
1603
1668
  onSelectParticipant: s,
1604
1669
  onClose: n,
1605
1670
  existingParticipantIds: o = /* @__PURE__ */ new Set(),
1606
1671
  participantLabel: l = "participants",
1607
- searchPlaceholder: m = "Search participants...",
1608
- className: a
1672
+ searchPlaceholder: d = "Search participants...",
1673
+ className: r
1609
1674
  }) => {
1610
- const { debug: c } = ve(), [g, h] = T(""), [b, x] = T([]), [w, r] = T(!1), [y, _] = T(null), [C, M] = T(
1675
+ const { debug: c } = Ne(), [f, h] = k(""), [x, g] = k([]), [p, a] = k(!1), [w, _] = k(null), [b, M] = k(
1611
1676
  null
1612
- ), E = Q(!1);
1613
- X(() => {
1677
+ ), E = X(!1);
1678
+ K(() => {
1614
1679
  if (t.loading) {
1615
1680
  c && console.log(
1616
1681
  "[ParticipantPicker] Waiting for participant source to finish loading..."
@@ -1619,123 +1684,123 @@ const Us = ({
1619
1684
  }
1620
1685
  if (E.current) return;
1621
1686
  (async () => {
1622
- c && console.log("[ParticipantPicker] Loading initial participants..."), r(!0), _(null);
1687
+ c && console.log("[ParticipantPicker] Loading initial participants..."), a(!0), _(null);
1623
1688
  try {
1624
1689
  const u = await t.loadParticipants({
1625
1690
  search: "",
1626
1691
  // Load all participants initially
1627
1692
  limit: 100
1628
1693
  });
1629
- x(u.participants), E.current = !0, c && console.log(
1694
+ g(u.participants), E.current = !0, c && console.log(
1630
1695
  "[ParticipantPicker] Participants loaded successfully:",
1631
1696
  u.participants.length
1632
1697
  );
1633
1698
  } catch (u) {
1634
- const N = u instanceof Error ? u.message : "Failed to load participants";
1635
- _(N), console.error("[ParticipantPicker] Failed to load participants:", u);
1699
+ const C = u instanceof Error ? u.message : "Failed to load participants";
1700
+ _(C), console.error("[ParticipantPicker] Failed to load participants:", u);
1636
1701
  } finally {
1637
- r(!1);
1702
+ a(!1);
1638
1703
  }
1639
1704
  })();
1640
1705
  }, [t.loading, c]);
1641
- const p = b.filter((d) => !o.has(d.id)).filter((d) => {
1642
- var N;
1643
- if (!g) return !0;
1644
- const u = g.toLowerCase();
1645
- return d.name.toLowerCase().includes(u) || ((N = d.email) == null ? void 0 : N.toLowerCase().includes(u)) || !1;
1646
- }), S = P(
1647
- async (d) => {
1648
- if (!C) {
1649
- M(d.id);
1706
+ const y = x.filter((m) => !o.has(m.id)).filter((m) => {
1707
+ var C;
1708
+ if (!f) return !0;
1709
+ const u = f.toLowerCase();
1710
+ return m.name.toLowerCase().includes(u) || ((C = m.email) == null ? void 0 : C.toLowerCase().includes(u)) || !1;
1711
+ }), S = A(
1712
+ async (m) => {
1713
+ if (!b) {
1714
+ M(m.id);
1650
1715
  try {
1651
- await s(d);
1716
+ await s(m);
1652
1717
  } catch (u) {
1653
1718
  console.error("[ParticipantPicker] Failed to start chat:", u), M(null);
1654
1719
  }
1655
1720
  }
1656
1721
  },
1657
- [s, C]
1658
- ), L = (d, u) => {
1659
- (d.key === "Enter" || d.key === " ") && (d.preventDefault(), S(u));
1722
+ [s, b]
1723
+ ), R = (m, u) => {
1724
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), S(u));
1660
1725
  };
1661
- return /* @__PURE__ */ i("div", { className: R("flex flex-col h-full", a), children: [
1726
+ return /* @__PURE__ */ i("div", { className: D("flex flex-col h-full", r), children: [
1662
1727
  /* @__PURE__ */ i("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: [
1663
1728
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
1664
1729
  /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-charcoal", children: "Start a new Conversation" }),
1665
- /* @__PURE__ */ e(Ze, { onClick: n })
1730
+ /* @__PURE__ */ e(Xe, { onClick: n })
1666
1731
  ] }),
1667
1732
  /* @__PURE__ */ i("p", { className: "text-xs text-stone mb-3", children: [
1668
1733
  "Select a ",
1669
1734
  l.slice(0, -1),
1670
1735
  " to start messaging (",
1671
- p.length,
1736
+ y.length,
1672
1737
  " available)",
1673
1738
  t.totalCount !== void 0 && ` โ€ข ${t.totalCount} ${l} total`
1674
1739
  ] }),
1675
1740
  /* @__PURE__ */ e(
1676
- Ps,
1741
+ js,
1677
1742
  {
1678
- searchQuery: g,
1743
+ searchQuery: f,
1679
1744
  setSearchQuery: h,
1680
- placeholder: m
1745
+ placeholder: d
1681
1746
  }
1682
1747
  )
1683
1748
  ] }),
1684
- y && /* @__PURE__ */ i("div", { className: "p-4 text-sm text-danger bg-danger-alt", children: [
1749
+ w && /* @__PURE__ */ i("div", { className: "p-4 text-sm text-danger bg-danger-alt", children: [
1685
1750
  "Error loading ",
1686
1751
  l,
1687
1752
  ": ",
1688
- y
1753
+ w
1689
1754
  ] }),
1690
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto", children: w && p.length === 0 ? /* @__PURE__ */ e("div", { className: "h-32 flex items-center justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
1755
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto", children: p && y.length === 0 ? /* @__PURE__ */ e("div", { className: "h-32 flex items-center justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
1691
1756
  /* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
1692
1757
  /* @__PURE__ */ i("span", { className: "text-sm text-stone", children: [
1693
1758
  "Loading ",
1694
1759
  l,
1695
1760
  "..."
1696
1761
  ] })
1697
- ] }) }) : p.length === 0 ? /* @__PURE__ */ i("div", { className: "p-6 text-center", children: [
1698
- /* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(Oe, { className: "h-8 w-8 text-charcoal" }) }),
1699
- /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: g ? `No ${l} found` : b.length > 0 ? `Already chatting with all ${l}` : `No ${l} yet` }),
1700
- /* @__PURE__ */ e("p", { className: "text-xs text-stone", children: g ? "Try a different search term" : b.length > 0 ? `You have existing conversations with all your ${l}` : `${l.charAt(0).toUpperCase() + l.slice(1)} will appear here` })
1762
+ ] }) }) : y.length === 0 ? /* @__PURE__ */ i("div", { className: "p-6 text-center", children: [
1763
+ /* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(Ue, { className: "h-8 w-8 text-charcoal" }) }),
1764
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: f ? `No ${l} found` : x.length > 0 ? `Already chatting with all ${l}` : `No ${l} yet` }),
1765
+ /* @__PURE__ */ e("p", { className: "text-xs text-stone", children: f ? "Try a different search term" : x.length > 0 ? `You have existing conversations with all your ${l}` : `${l.charAt(0).toUpperCase() + l.slice(1)} will appear here` })
1701
1766
  ] }) : /* @__PURE__ */ i("ul", { className: "space-y-0", children: [
1702
- p.map((d) => {
1703
- const u = d.name || d.email || d.id, N = d.email && d.name ? d.email : d.phone;
1767
+ y.map((m) => {
1768
+ const u = m.name || m.email || m.id, C = m.email && m.name ? m.email : m.phone;
1704
1769
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
1705
1770
  "button",
1706
1771
  {
1707
1772
  type: "button",
1708
- onClick: () => S(d),
1709
- onKeyDown: (v) => L(v, d),
1773
+ onClick: () => S(m),
1774
+ onKeyDown: (T) => R(T, m),
1710
1775
  className: "w-full px-4 py-3 hover:bg-sand transition-colors border-b border-sand text-left focus-ring",
1711
1776
  children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
1712
1777
  /* @__PURE__ */ i("div", { className: "flex items-center space-x-3 flex-1 min-w-0", children: [
1713
1778
  /* @__PURE__ */ e(
1714
- se,
1779
+ ae,
1715
1780
  {
1716
- id: d.id,
1781
+ id: m.id,
1717
1782
  name: u,
1718
- image: d.image,
1783
+ image: m.image,
1719
1784
  size: 40
1720
1785
  }
1721
1786
  ),
1722
1787
  /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
1723
1788
  /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-charcoal truncate", children: u }),
1724
- N && /* @__PURE__ */ e("p", { className: "text-xs text-stone truncate", children: N })
1789
+ C && /* @__PURE__ */ e("p", { className: "text-xs text-stone truncate", children: C })
1725
1790
  ] })
1726
1791
  ] }),
1727
- /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: C === d.id ? /* @__PURE__ */ e(be, { className: "h-5 w-5 text-primary animate-spin" }) : /* @__PURE__ */ e(Oe, { className: "h-5 w-5 text-stone" }) })
1792
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: b === m.id ? /* @__PURE__ */ e(xe, { className: "h-5 w-5 text-primary animate-spin" }) : /* @__PURE__ */ e(Ue, { className: "h-5 w-5 text-stone" }) })
1728
1793
  ] })
1729
1794
  }
1730
- ) }, d.id);
1795
+ ) }, m.id);
1731
1796
  }),
1732
- w && /* @__PURE__ */ e("li", { className: "p-4 flex justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
1797
+ p && /* @__PURE__ */ e("li", { className: "p-4 flex justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
1733
1798
  /* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
1734
1799
  /* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading more..." })
1735
1800
  ] }) })
1736
1801
  ] }) })
1737
1802
  ] });
1738
- }, Os = ({ className: t }) => /* @__PURE__ */ i(
1803
+ }, Hs = ({ className: t }) => /* @__PURE__ */ i(
1739
1804
  "svg",
1740
1805
  {
1741
1806
  width: "140",
@@ -1869,9 +1934,9 @@ const Us = ({
1869
1934
  ] })
1870
1935
  ]
1871
1936
  }
1872
- ), Qe = B.memo(
1937
+ ), Qe = G.memo(
1873
1938
  ({ hasChannels: t, channelsLoaded: s }) => /* @__PURE__ */ e("div", { className: "messaging-empty-state flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center max-w-sm text-center", children: [
1874
- /* @__PURE__ */ e(Os, {}),
1939
+ /* @__PURE__ */ e(Hs, {}),
1875
1940
  s && !t && /* @__PURE__ */ i("div", { className: "mt-8", children: [
1876
1941
  /* @__PURE__ */ e("h2", { className: "font-medium text-black text-[18px] mb-2", children: "Your inbox is empty" }),
1877
1942
  /* @__PURE__ */ e("p", { className: "text-[#676B5F] text-sm mb-6", children: "Share with your followers to start receiving messages" })
@@ -1879,7 +1944,7 @@ const Us = ({
1879
1944
  ] }) })
1880
1945
  );
1881
1946
  Qe.displayName = "EmptyState";
1882
- const Ce = B.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ i("div", { className: "text-center max-w-sm", children: [
1947
+ const be = G.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ i("div", { className: "text-center max-w-sm", children: [
1883
1948
  /* @__PURE__ */ e("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ e("span", { className: "text-4xl", children: "โš ๏ธ" }) }),
1884
1949
  /* @__PURE__ */ e("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
1885
1950
  /* @__PURE__ */ e("p", { className: "text-stone text-sm mb-6", children: t }),
@@ -1893,48 +1958,49 @@ const Ce = B.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { clas
1893
1958
  }
1894
1959
  )
1895
1960
  ] }) }));
1896
- Ce.displayName = "ErrorState";
1897
- const Ws = ({
1961
+ be.displayName = "ErrorState";
1962
+ const en = ({
1898
1963
  capabilities: t = {},
1899
1964
  className: s,
1900
1965
  renderMessageInputActions: n,
1901
1966
  renderConversationFooter: o,
1902
1967
  onChannelSelect: l,
1903
- onParticipantSelect: m,
1904
- initialParticipantFilter: a,
1968
+ onParticipantSelect: d,
1969
+ initialParticipantFilter: r,
1905
1970
  initialParticipantData: c,
1906
- CustomChannelEmptyState: g,
1971
+ CustomChannelEmptyState: f,
1907
1972
  showChannelList: h = !0,
1908
- filters: b,
1909
- channelListCustomEmptyStateIndicator: x,
1910
- onDeleteConversationClick: w,
1911
- onBlockParticipantClick: r,
1912
- onReportParticipantClick: y,
1913
- dmAgentEnabled: _,
1914
- messageMetadata: C,
1915
- onMessageSent: M,
1916
- showStarButton: E = !1,
1917
- chatbotVotingEnabled: p = !1,
1918
- renderMessagePreview: S,
1919
- renderChannelBanner: L,
1920
- customProfileContent: d,
1921
- customChannelActions: u,
1922
- renderMessage: N
1973
+ filters: x,
1974
+ channelRenderFilterFn: g,
1975
+ channelListCustomEmptyStateIndicator: p,
1976
+ onDeleteConversationClick: a,
1977
+ onBlockParticipantClick: w,
1978
+ onReportParticipantClick: _,
1979
+ dmAgentEnabled: b,
1980
+ messageMetadata: M,
1981
+ onMessageSent: E,
1982
+ showStarButton: y = !1,
1983
+ chatbotVotingEnabled: S = !1,
1984
+ renderMessagePreview: R,
1985
+ renderChannelBanner: m,
1986
+ customProfileContent: u,
1987
+ customChannelActions: C,
1988
+ renderMessage: T
1923
1989
  }) => {
1924
1990
  const {
1925
1991
  service: v,
1926
- client: f,
1927
- isConnected: k,
1928
- isLoading: H,
1929
- error: Z,
1930
- refreshConnection: Y,
1931
- debug: D
1932
- } = Kt(), [W, j] = T(null), [ne, ae] = T(!1), [G, K] = T(!1), [re, U] = T(!1), [O, A] = T(/* @__PURE__ */ new Set()), [z, ce] = T(0), [q, oe] = T(!1), [ee, J] = T(null), te = Q(null), {
1933
- participantSource: de,
1934
- participantLabel: ue = "participants",
1935
- showDeleteConversation: Xe = !0
1936
- } = t, Ke = B.useMemo(() => {
1937
- const I = f == null ? void 0 : f.userID;
1992
+ client: N,
1993
+ isConnected: F,
1994
+ isLoading: Q,
1995
+ error: Y,
1996
+ refreshConnection: Z,
1997
+ debug: L
1998
+ } = ss(), [W, j] = k(null), [re, z] = k(!1), [te, se] = k(!1), [O, P] = k(!1), [B, H] = k(/* @__PURE__ */ new Set()), [oe, ve] = k(0), [q, J] = k(!1), [le, ee] = k(null), ne = X(null), {
1999
+ participantSource: me,
2000
+ participantLabel: Le = "participants",
2001
+ showDeleteConversation: et = !0
2002
+ } = t, tt = G.useMemo(() => {
2003
+ const I = N == null ? void 0 : N.userID;
1938
2004
  return {
1939
2005
  ...{
1940
2006
  type: "messaging",
@@ -1944,66 +2010,66 @@ const Ws = ({
1944
2010
  hidden: !1
1945
2011
  }
1946
2012
  },
1947
- ...b
2013
+ ...x
1948
2014
  };
1949
- }, [b, f == null ? void 0 : f.userID]), he = Q(null), le = P(async () => {
1950
- if (!f || !k) return;
1951
- const I = f.userID;
2015
+ }, [x, N == null ? void 0 : N.userID]), ue = X(null), ie = A(async () => {
2016
+ if (!N || !F) return;
2017
+ const I = N.userID;
1952
2018
  if (I)
1953
2019
  try {
1954
- D && console.log("[MessagingShell] Syncing channels for user:", I);
1955
- const V = await f.queryChannels(
2020
+ L && console.log("[MessagingShell] Syncing channels for user:", I);
2021
+ const V = await N.queryChannels(
1956
2022
  {
1957
2023
  type: "messaging",
1958
2024
  members: { $in: [I] }
1959
2025
  },
1960
2026
  {},
1961
2027
  { limit: 100 }
1962
- ), F = /* @__PURE__ */ new Set();
2028
+ ), U = /* @__PURE__ */ new Set();
1963
2029
  V.forEach(($) => {
1964
- const we = $.state.members;
1965
- Object.values(we).forEach((ot) => {
1966
- var De;
1967
- const pe = (De = ot.user) == null ? void 0 : De.id;
1968
- pe && pe !== I && F.add(pe);
2030
+ const pe = $.state.members;
2031
+ Object.values(pe).forEach((it) => {
2032
+ var Ae;
2033
+ const ye = (Ae = it.user) == null ? void 0 : Ae.id;
2034
+ ye && ye !== I && U.add(ye);
1969
2035
  });
1970
- }), A(($) => $.size === F.size && [...$].every((we) => F.has(we)) ? $ : F), ae(V.length > 0), K(!0), he.current = I, D && console.log("[MessagingShell] Channels synced successfully:", {
2036
+ }), H(($) => $.size === U.size && [...$].every((pe) => U.has(pe)) ? $ : U), z(V.length > 0), se(!0), ue.current = I, L && console.log("[MessagingShell] Channels synced successfully:", {
1971
2037
  channelCount: V.length,
1972
- memberCount: F.size
2038
+ memberCount: U.size
1973
2039
  });
1974
2040
  } catch (V) {
1975
2041
  console.error("[MessagingShell] Failed to sync channels:", V);
1976
2042
  }
1977
- }, [f, k, D]);
1978
- X(() => {
1979
- if (!f || !k) return;
1980
- const I = f.userID;
1981
- I && he.current !== I && le();
1982
- }, [f, k, le]), X(() => {
1983
- if (!a || !f || !k) return;
2043
+ }, [N, F, L]);
2044
+ K(() => {
2045
+ if (!N || !F) return;
2046
+ const I = N.userID;
2047
+ I && ue.current !== I && ie();
2048
+ }, [N, F, ie]), K(() => {
2049
+ if (!r || !N || !F) return;
1984
2050
  (async () => {
1985
- const V = f.userID;
2051
+ const V = N.userID;
1986
2052
  if (V)
1987
2053
  try {
1988
- D && console.log(
2054
+ L && console.log(
1989
2055
  "[MessagingShell] Loading initial conversation with:",
1990
- a
2056
+ r
1991
2057
  );
1992
- const F = await f.queryChannels(
2058
+ const U = await N.queryChannels(
1993
2059
  {
1994
2060
  type: "messaging",
1995
- members: { $eq: [V, a] }
2061
+ members: { $eq: [V, r] }
1996
2062
  },
1997
2063
  {},
1998
2064
  { limit: 1 }
1999
2065
  );
2000
- if (F.length > 0)
2001
- j(F[0]), oe(!0), J(null), l && l(F[0]), D && console.log(
2066
+ if (U.length > 0)
2067
+ j(U[0]), J(!0), ee(null), l && l(U[0]), L && console.log(
2002
2068
  "[MessagingShell] Initial conversation loaded:",
2003
- F[0].id
2069
+ U[0].id
2004
2070
  );
2005
2071
  else if (c && v) {
2006
- D && console.log(
2072
+ L && console.log(
2007
2073
  "[MessagingShell] No conversation found, creating one for:",
2008
2074
  c
2009
2075
  );
@@ -2014,7 +2080,7 @@ const Ws = ({
2014
2080
  email: c.email,
2015
2081
  phone: c.phone
2016
2082
  });
2017
- j($), oe(!0), J(null), l && l($), D && console.log(
2083
+ j($), J(!0), ee(null), l && l($), L && console.log(
2018
2084
  "[MessagingShell] Channel created and loaded:",
2019
2085
  $.id
2020
2086
  );
@@ -2022,93 +2088,93 @@ const Ws = ({
2022
2088
  console.error(
2023
2089
  "[MessagingShell] Failed to create conversation:",
2024
2090
  $
2025
- ), J("Failed to create conversation");
2091
+ ), ee("Failed to create conversation");
2026
2092
  }
2027
2093
  } else
2028
- J(
2094
+ ee(
2029
2095
  "No conversation found with this account"
2030
- ), D && console.log(
2096
+ ), L && console.log(
2031
2097
  "[MessagingShell] No conversation found for:",
2032
- a
2098
+ r
2033
2099
  );
2034
- } catch (F) {
2100
+ } catch (U) {
2035
2101
  console.error(
2036
2102
  "[MessagingShell] Failed to load initial conversation:",
2037
- F
2038
- ), J("Failed to load conversation");
2103
+ U
2104
+ ), ee("Failed to load conversation");
2039
2105
  }
2040
2106
  })();
2041
2107
  }, [
2042
- a,
2108
+ r,
2043
2109
  c,
2044
- f,
2045
- k,
2110
+ N,
2111
+ F,
2046
2112
  v,
2047
- D,
2113
+ L,
2048
2114
  l
2049
2115
  ]);
2050
- const et = P(
2116
+ const st = A(
2051
2117
  (I) => {
2052
2118
  j(I), l == null || l(I);
2053
2119
  },
2054
2120
  [l]
2055
- ), tt = P(() => {
2121
+ ), nt = A(() => {
2056
2122
  q || j(null);
2057
- }, [q]), st = P(
2123
+ }, [q]), at = A(
2058
2124
  async (I) => {
2059
2125
  var V;
2060
2126
  if (v)
2061
2127
  try {
2062
- D && console.log(
2128
+ L && console.log(
2063
2129
  "[MessagingShell] Starting conversation with:",
2064
2130
  I.id
2065
2131
  );
2066
- const F = await v.startChannelWithParticipant({
2132
+ const U = await v.startChannelWithParticipant({
2067
2133
  id: I.id,
2068
2134
  name: I.name,
2069
2135
  email: I.email,
2070
2136
  phone: I.phone
2071
2137
  });
2072
2138
  try {
2073
- await F.show();
2139
+ await U.show();
2074
2140
  } catch ($) {
2075
2141
  console.warn("[MessagingShell] Failed to unhide channel:", $);
2076
2142
  }
2077
- j(F), U(!1), (V = te.current) == null || V.close(), m == null || m(I);
2078
- } catch (F) {
2079
- console.error("[MessagingShell] Failed to start conversation:", F);
2143
+ j(U), P(!1), (V = ne.current) == null || V.close(), d == null || d(I);
2144
+ } catch (U) {
2145
+ console.error("[MessagingShell] Failed to start conversation:", U);
2080
2146
  }
2081
2147
  },
2082
- [v, m, D]
2083
- ), fe = P(() => {
2148
+ [v, d, L]
2149
+ ), he = A(() => {
2084
2150
  var I;
2085
- U(!1), (I = te.current) == null || I.close();
2086
- }, []), nt = P(
2151
+ P(!1), (I = ne.current) == null || I.close();
2152
+ }, []), rt = A(
2087
2153
  (I) => {
2088
- I.target === te.current && fe();
2154
+ I.target === ne.current && he();
2089
2155
  },
2090
- [fe]
2091
- ), at = P(
2156
+ [he]
2157
+ ), ot = A(
2092
2158
  async (I) => {
2093
- D && console.log("[MessagingShell] Leaving conversation:", I.id), j(null), oe(!1), he.current = null, await le();
2159
+ L && console.log("[MessagingShell] Leaving conversation:", I.id), j(null), J(!1), ue.current = null, await ie();
2094
2160
  },
2095
- [le, D]
2096
- ), rt = P(
2161
+ [ie, L]
2162
+ ), lt = A(
2097
2163
  async (I) => {
2098
- D && console.log("[MessagingShell] Blocking participant:", I), j(null), oe(!1), he.current = null, await le();
2164
+ L && console.log("[MessagingShell] Blocking participant:", I), j(null), J(!1), ue.current = null, await ie();
2099
2165
  },
2100
- [le, D]
2101
- ), ge = !!W;
2102
- return H ? /* @__PURE__ */ e("div", { className: R("h-full", s), children: /* @__PURE__ */ e(Ne, {}) }) : Z ? /* @__PURE__ */ e("div", { className: R("h-full", s), children: /* @__PURE__ */ e(Ce, { message: Z, onBack: Y }) }) : !k || !f ? /* @__PURE__ */ e("div", { className: R("h-full", s), children: /* @__PURE__ */ e(
2103
- Ce,
2166
+ [ie, L]
2167
+ ), fe = !!W;
2168
+ return Q ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(Ce, {}) }) : Y ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(be, { message: Y, onBack: Z }) }) : !F || !N ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(
2169
+ be,
2104
2170
  {
2105
2171
  message: "Not connected to messaging service",
2106
- onBack: Y
2172
+ onBack: Z
2107
2173
  }
2108
- ) }) : ee ? /* @__PURE__ */ e("div", { className: R("h-full", s), children: /* @__PURE__ */ e(Ce, { message: ee }) }) : /* @__PURE__ */ i(
2174
+ ) }) : le ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(be, { message: le }) }) : /* @__PURE__ */ i(
2109
2175
  "div",
2110
2176
  {
2111
- className: R(
2177
+ className: D(
2112
2178
  "messaging-shell h-full bg-background-primary overflow-hidden",
2113
2179
  s
2114
2180
  ),
@@ -2117,24 +2183,25 @@ const Ws = ({
2117
2183
  /* @__PURE__ */ e(
2118
2184
  "div",
2119
2185
  {
2120
- className: R(
2186
+ className: D(
2121
2187
  "messaging-channel-list-sidebar min-h-0 min-w-0 lg:flex lg:flex-col",
2122
2188
  {
2123
2189
  "!hidden": h === !1 || q,
2124
2190
  // Hide on mobile when channel selected, show on desktop with consistent wide width
2125
- "hidden lg:flex lg:flex-1 lg:max-w-2xl": h !== !1 && !q && ge,
2191
+ "hidden lg:flex lg:flex-1 lg:max-w-2xl": h !== !1 && !q && fe,
2126
2192
  // Show on mobile when no channel selected, use same wide width on desktop
2127
- "flex flex-col w-full lg:flex-1 lg:max-w-2xl": h !== !1 && !q && !ge
2193
+ "flex flex-col w-full lg:flex-1 lg:max-w-2xl": h !== !1 && !q && !fe
2128
2194
  }
2129
2195
  ),
2130
2196
  children: /* @__PURE__ */ e(
2131
- qe,
2197
+ Ze,
2132
2198
  {
2133
- onChannelSelect: et,
2199
+ onChannelSelect: st,
2134
2200
  selectedChannel: W || void 0,
2135
- filters: Ke,
2136
- customEmptyStateIndicator: x,
2137
- renderMessagePreview: S
2201
+ filters: tt,
2202
+ channelRenderFilterFn: g,
2203
+ customEmptyStateIndicator: p,
2204
+ renderMessagePreview: R
2138
2205
  }
2139
2206
  )
2140
2207
  }
@@ -2142,80 +2209,80 @@ const Ws = ({
2142
2209
  /* @__PURE__ */ e(
2143
2210
  "div",
2144
2211
  {
2145
- className: R(
2212
+ className: D(
2146
2213
  "messaging-conversation-view flex-1 flex-col min-w-0 min-h-0",
2147
2214
  {
2148
2215
  // In direct conversation mode (or waiting for it), always show (full width)
2149
- flex: q || ge || a,
2216
+ flex: q || fe || r,
2150
2217
  // Normal mode: hide on mobile when no channel selected
2151
- "hidden lg:flex": !q && !ge && !a
2218
+ "hidden lg:flex": !q && !fe && !r
2152
2219
  }
2153
2220
  ),
2154
2221
  children: W ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ e(
2155
- Je,
2222
+ Ke,
2156
2223
  {
2157
2224
  channel: W,
2158
- onBack: tt,
2225
+ onBack: nt,
2159
2226
  showBackButton: !q,
2160
2227
  renderMessageInputActions: n,
2161
2228
  renderConversationFooter: o,
2162
- renderChannelBanner: L,
2163
- onLeaveConversation: at,
2164
- onBlockParticipant: rt,
2165
- CustomChannelEmptyState: g,
2166
- showDeleteConversation: Xe,
2167
- onDeleteConversationClick: w,
2168
- onBlockParticipantClick: r,
2169
- onReportParticipantClick: y,
2170
- dmAgentEnabled: _,
2171
- messageMetadata: C,
2172
- onMessageSent: M,
2173
- showStarButton: E,
2174
- chatbotVotingEnabled: p,
2175
- customProfileContent: d,
2176
- customChannelActions: u,
2177
- renderMessage: N
2229
+ renderChannelBanner: m,
2230
+ onLeaveConversation: ot,
2231
+ onBlockParticipant: lt,
2232
+ CustomChannelEmptyState: f,
2233
+ showDeleteConversation: et,
2234
+ onDeleteConversationClick: a,
2235
+ onBlockParticipantClick: w,
2236
+ onReportParticipantClick: _,
2237
+ dmAgentEnabled: b,
2238
+ messageMetadata: M,
2239
+ onMessageSent: E,
2240
+ showStarButton: y,
2241
+ chatbotVotingEnabled: S,
2242
+ customProfileContent: u,
2243
+ customChannelActions: C,
2244
+ renderMessage: T
2178
2245
  },
2179
2246
  W.id
2180
- ) }) : a ? (
2247
+ ) }) : r ? (
2181
2248
  // Show loading while creating/loading direct conversation channel
2182
- /* @__PURE__ */ e(Ne, {})
2249
+ /* @__PURE__ */ e(Ce, {})
2183
2250
  ) : /* @__PURE__ */ e(
2184
2251
  Qe,
2185
2252
  {
2186
- hasChannels: ne,
2187
- channelsLoaded: G
2253
+ hasChannels: re,
2254
+ channelsLoaded: te
2188
2255
  }
2189
2256
  )
2190
2257
  }
2191
2258
  )
2192
2259
  ] }),
2193
- de && // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
2260
+ me && // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
2194
2261
  /* @__PURE__ */ e(
2195
2262
  "dialog",
2196
2263
  {
2197
- ref: te,
2264
+ ref: ne,
2198
2265
  className: "mes-dialog",
2199
- onClick: nt,
2200
- onClose: fe,
2266
+ onClick: rt,
2267
+ onClose: he,
2201
2268
  children: /* @__PURE__ */ e("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ e(
2202
- Us,
2269
+ zs,
2203
2270
  {
2204
- participantSource: de,
2205
- onSelectParticipant: st,
2206
- onClose: fe,
2207
- existingParticipantIds: O,
2208
- participantLabel: ue,
2209
- searchPlaceholder: `Search ${ue}...`
2271
+ participantSource: me,
2272
+ onSelectParticipant: at,
2273
+ onClose: he,
2274
+ existingParticipantIds: B,
2275
+ participantLabel: Le,
2276
+ searchPlaceholder: `Search ${Le}...`
2210
2277
  },
2211
- z
2278
+ oe
2212
2279
  ) })
2213
2280
  }
2214
2281
  )
2215
2282
  ]
2216
2283
  }
2217
2284
  );
2218
- }, Fs = ({
2285
+ }, Vs = ({
2219
2286
  question: t,
2220
2287
  onClick: s,
2221
2288
  loading: n = !1,
@@ -2227,7 +2294,7 @@ const Ws = ({
2227
2294
  onClick: s,
2228
2295
  disabled: n,
2229
2296
  style: { backgroundColor: "#E6E5E3" },
2230
- className: R(
2297
+ className: D(
2231
2298
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
2232
2299
  {
2233
2300
  "hover:brightness-95 active:brightness-90": !n,
@@ -2237,23 +2304,23 @@ const Ws = ({
2237
2304
  ),
2238
2305
  children: t
2239
2306
  }
2240
- ), qs = ({
2307
+ ), tn = ({
2241
2308
  faqs: t,
2242
2309
  onFaqClick: s,
2243
2310
  loadingFaqId: n,
2244
2311
  headerText: o,
2245
2312
  className: l,
2246
- avatarImage: m,
2247
- avatarName: a
2313
+ avatarImage: d,
2314
+ avatarName: r
2248
2315
  }) => {
2249
- const c = t.filter((g) => g.enabled).sort((g, h) => (g.order ?? 0) - (h.order ?? 0));
2316
+ const c = t.filter((f) => f.enabled).sort((f, h) => (f.order ?? 0) - (h.order ?? 0));
2250
2317
  return c.length === 0 ? null : /* @__PURE__ */ e("div", { className: l, children: /* @__PURE__ */ i("div", { className: "flex gap-3 items-end", children: [
2251
- (m || a) && /* @__PURE__ */ e("div", { className: "flex-none", children: /* @__PURE__ */ e(
2252
- se,
2318
+ (d || r) && /* @__PURE__ */ e("div", { className: "flex-none", children: /* @__PURE__ */ e(
2319
+ ae,
2253
2320
  {
2254
- id: a || "account",
2255
- name: a || "Account",
2256
- image: m,
2321
+ id: r || "account",
2322
+ name: r || "Account",
2323
+ image: d,
2257
2324
  size: 24,
2258
2325
  shape: "circle"
2259
2326
  }
@@ -2265,75 +2332,75 @@ const Ws = ({
2265
2332
  style: { backgroundColor: "#F1F0EE" },
2266
2333
  children: [
2267
2334
  o && /* @__PURE__ */ e("p", { className: "text-md text-charcoal mb-4", children: o }),
2268
- c.map((g) => /* @__PURE__ */ e(
2269
- Fs,
2335
+ c.map((f) => /* @__PURE__ */ e(
2336
+ Vs,
2270
2337
  {
2271
- question: g.question,
2272
- onClick: () => s(g.id),
2273
- loading: n === g.id
2338
+ question: f.question,
2339
+ onClick: () => s(f.id),
2340
+ loading: n === f.id
2274
2341
  },
2275
- g.id
2342
+ f.id
2276
2343
  ))
2277
2344
  ]
2278
2345
  }
2279
2346
  )
2280
2347
  ] }) });
2281
- }, Ys = (t, s = {}) => {
2282
- const { initialSearch: n = "", pageSize: o = 20 } = s, [l, m] = T([]), [a, c] = T(!1), [g, h] = T(null), [b, x] = T(n), [w, r] = T(!0), [y, _] = T(), C = P(async (S = !1, L) => {
2283
- if (a) return;
2284
- const d = L !== void 0 ? L : b;
2348
+ }, sn = (t, s = {}) => {
2349
+ const { initialSearch: n = "", pageSize: o = 20 } = s, [l, d] = k([]), [r, c] = k(!1), [f, h] = k(null), [x, g] = k(n), [p, a] = k(!0), [w, _] = k(), b = A(async (S = !1, R) => {
2350
+ if (r) return;
2351
+ const m = R !== void 0 ? R : x;
2285
2352
  c(!0), h(null);
2286
2353
  try {
2287
2354
  const u = await t.loadParticipants({
2288
- search: d || void 0,
2355
+ search: m || void 0,
2289
2356
  limit: o,
2290
- cursor: S ? void 0 : y
2357
+ cursor: S ? void 0 : w
2291
2358
  });
2292
- m(
2293
- (N) => S ? u.participants : [...N, ...u.participants]
2294
- ), r(u.hasMore), _(u.nextCursor);
2359
+ d(
2360
+ (C) => S ? u.participants : [...C, ...u.participants]
2361
+ ), a(u.hasMore), _(u.nextCursor);
2295
2362
  } catch (u) {
2296
- const N = u instanceof Error ? u.message : "Failed to load participants";
2297
- h(N), console.error("[useParticipants] Load error:", u);
2363
+ const C = u instanceof Error ? u.message : "Failed to load participants";
2364
+ h(C), console.error("[useParticipants] Load error:", u);
2298
2365
  } finally {
2299
2366
  c(!1);
2300
2367
  }
2301
- }, [t, b, y, o, a]), M = P(() => {
2302
- w && !a && C(!1);
2303
- }, [w, a, C]), E = P((S) => {
2304
- x(S), _(void 0), C(!0, S);
2305
- }, [C]), p = P(() => {
2306
- _(void 0), C(!0);
2307
- }, [C]);
2308
- return X(() => {
2309
- C(!0);
2368
+ }, [t, x, w, o, r]), M = A(() => {
2369
+ p && !r && b(!1);
2370
+ }, [p, r, b]), E = A((S) => {
2371
+ g(S), _(void 0), b(!0, S);
2372
+ }, [b]), y = A(() => {
2373
+ _(void 0), b(!0);
2374
+ }, [b]);
2375
+ return K(() => {
2376
+ b(!0);
2310
2377
  }, [t.loadParticipants]), {
2311
2378
  participants: l,
2312
- loading: a,
2313
- error: g,
2314
- searchQuery: b,
2315
- hasMore: w,
2379
+ loading: r,
2380
+ error: f,
2381
+ searchQuery: x,
2382
+ hasMore: p,
2316
2383
  totalCount: t.totalCount,
2317
2384
  loadMore: M,
2318
2385
  search: E,
2319
- refresh: p
2386
+ refresh: y
2320
2387
  };
2321
2388
  };
2322
2389
  export {
2323
- xe as ActionButton,
2324
- se as Avatar,
2325
- Ts as ChannelEmptyState,
2326
- qe as ChannelList,
2327
- Je as ChannelView,
2328
- qs as FaqList,
2329
- Fs as FaqListItem,
2330
- bs as MessageVoteButtons,
2331
- Hs as MessagingProvider,
2332
- Ws as MessagingShell,
2333
- Us as ParticipantPicker,
2334
- ns as formatRelativeTime,
2335
- fs as useMessageVote,
2336
- Kt as useMessaging,
2337
- Ys as useParticipants
2390
+ ge as ActionButton,
2391
+ ae as Avatar,
2392
+ Us as ChannelEmptyState,
2393
+ Ze as ChannelList,
2394
+ Ke as ChannelView,
2395
+ tn as FaqList,
2396
+ Vs as FaqListItem,
2397
+ vs as MessageVoteButtons,
2398
+ Qs as MessagingProvider,
2399
+ en as MessagingShell,
2400
+ zs as ParticipantPicker,
2401
+ os as formatRelativeTime,
2402
+ bs as useMessageVote,
2403
+ ss as useMessaging,
2404
+ sn as useParticipants
2338
2405
  };
2339
2406
  //# sourceMappingURL=index.js.map