@linktr.ee/messaging-react 3.12.2-rc-1784020746 → 3.12.2

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.
@@ -4,7 +4,7 @@ import { StreamChatService as Vs } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Gs, LinkPreviewsManager as Ht } from "stream-chat";
5
5
  import { Chat as Hs, useChannelStateContext as oe, useChatContext as he, DateSeparator as Ys, MessageStatus as qs, useMessageContext as _e, MessageErrorIcon as st, MessageText as Oe, areMessageUIPropsEqual as Ws, useMessageReminder as Xs, useComponentContext as ns, Attachment as Ks, EditMessageModal as Zs, MessageBlocked as Js, MessageBouncePrompt as Qs, MessageDeleted as en, MessageIsThreadReplyInChannelButtonIndicator as tn, MessageRepliesCountButton as sn, ReminderNotification as nn, StreamedMessageText as an, messageHasAttachments as rn, messageHasReactions as ln, isDateSeparatorMessage as on, isMessageBlocked as cn, isMessageBounced as dn, MessageBounceModal as un, Poll as mn, useMessageComposer as hn, useStateStore as fn, MessageInput as gn, useMessageInputContext as pn, useMessageComposerHasSendableData as bn, AttachmentPreviewList as vn, QuotedMessagePreview as xn, TextareaComposer as wn, MessageTimestamp as We, AIStates as Xe, useTypingContext as _n, useAIState as Nn, Channel as yn, WithComponents as kn, Window as Cn, MessageList as Sn, ChannelList as En, InfiniteScroll as In } from "stream-chat-react";
6
6
  import { StarIcon as Ee, DotsThreeIcon as Tn, SpinnerGapIcon as ze, SignOutIcon as Mn, ProhibitInsetIcon as Yt, FlagIcon as as, ArrowLeftIcon as nt, CurrencyDollarIcon as An, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as rs, ImageIcon as Rn, SpeakerHighIcon as Dn, VideoCameraIcon as is, FileMdIcon as Ln, FileTextIcon as zn, FileZipIcon as Fn, FilePptIcon as Pn, FileCsvIcon as On, FileXlsIcon as $n, FileDocIcon as Bn, FilePdfIcon as Un, CircleNotchIcon as Ce, PlayIcon as at, PauseIcon as jn, LinkIcon as Vn, DownloadSimpleIcon as Se, XIcon as Ve, CaretLeftIcon as Gn, GiftIcon as Hn, ThumbsUpIcon as Yn, ThumbsDownIcon as qn, ChecksIcon as Wn, PencilSimpleIcon as Xn, TrashSimpleIcon as Kn, ArrowUpIcon as Zn, ProhibitIcon as Jn } from "@phosphor-icons/react";
7
- import k from "classnames";
7
+ import y from "classnames";
8
8
  import { MessageActions as Qn, DefaultDropdownActionButton as ls } from "stream-chat-react/experimental";
9
9
  const os = ot({
10
10
  service: null,
@@ -16,7 +16,7 @@ const os = ot({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), ct = () => Ie(os), ll = ({
19
+ }), ct = () => Ie(os), ol = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -25,7 +25,7 @@ const os = ot({
25
25
  debug: i = !1,
26
26
  client: o
27
27
  }) => {
28
- var y, T;
28
+ var I, T;
29
29
  const l = J(
30
30
  (M, ...P) => {
31
31
  i && console.log(`🔥 [MessagingProvider] ${M}`, ...P);
@@ -38,11 +38,11 @@ const os = ot({
38
38
  serviceConfig: !!n,
39
39
  capabilities: Object.keys(r)
40
40
  });
41
- const [d, m] = U(null), [p, h] = U(null), [f, c] = U(!1), [b, v] = U(!1), [x, g] = U(null), _ = G(!1), w = G(null), C = G(n);
42
- C.current = n;
41
+ const [d, m] = U(null), [g, h] = U(null), [f, c] = U(!1), [b, v] = U(!1), [x, p] = U(null), _ = G(!1), w = G(null), k = G(n);
42
+ k.current = n;
43
43
  const L = G(i);
44
44
  L.current = i;
45
- const E = G({
45
+ const S = G({
46
46
  userId: t == null ? void 0 : t.id,
47
47
  apiKey: a,
48
48
  serviceConfig: n,
@@ -52,24 +52,24 @@ const os = ot({
52
52
  renderCount: R.current,
53
53
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
54
54
  propChanges: {
55
- userChanged: E.current.userId !== (t == null ? void 0 : t.id),
56
- apiKeyChanged: E.current.apiKey !== a,
57
- serviceConfigChanged: E.current.serviceConfig !== n,
58
- capabilitiesChanged: E.current.capabilities !== r
55
+ userChanged: S.current.userId !== (t == null ? void 0 : t.id),
56
+ apiKeyChanged: S.current.apiKey !== a,
57
+ serviceConfigChanged: S.current.serviceConfig !== n,
58
+ capabilitiesChanged: S.current.capabilities !== r
59
59
  }
60
- }), E.current = {
60
+ }), S.current = {
61
61
  userId: t == null ? void 0 : t.id,
62
62
  apiKey: a,
63
63
  serviceConfig: n,
64
64
  capabilities: r
65
65
  };
66
66
  const O = G(null);
67
- !o && a && ((y = O.current) == null ? void 0 : y.apiKey) !== a && (O.current = { apiKey: a, client: new Gs(a) });
67
+ !o && a && ((I = O.current) == null ? void 0 : I.apiKey) !== a && (O.current = { apiKey: a, client: new Gs(a) });
68
68
  const F = o || (a ? ((T = O.current) == null ? void 0 : T.client) ?? null : null);
69
69
  K(() => {
70
- const M = R.current, P = C.current;
70
+ const M = R.current, P = k.current;
71
71
  if (o) {
72
- w.current = null, m(null), h(null), c(!1), g(null), v(!1);
72
+ w.current = null, m(null), h(null), c(!1), p(null), v(!1);
73
73
  return;
74
74
  }
75
75
  if (!a || !F || !P) {
@@ -122,7 +122,7 @@ const os = ot({
122
122
  return;
123
123
  }
124
124
  (async () => {
125
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), _.current = !0, v(!0), g(null);
125
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), _.current = !0, v(!0), p(null);
126
126
  try {
127
127
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
128
128
  const j = await d.connectUser(t);
@@ -132,7 +132,7 @@ const os = ot({
132
132
  });
133
133
  } catch (j) {
134
134
  const Q = j instanceof Error ? j.message : "Connection failed";
135
- g(Q), l("❌ USER CONNECTION ERROR", {
135
+ p(Q), l("❌ USER CONNECTION ERROR", {
136
136
  userId: t.id,
137
137
  error: Q
138
138
  });
@@ -150,7 +150,7 @@ const os = ot({
150
150
  M && (D.current = null, (P = w.current) == null || P.disconnectUser().catch(console.error));
151
151
  };
152
152
  }, [F]);
153
- const S = J(async () => {
153
+ const C = J(async () => {
154
154
  if (l("🔄 REFRESH CONNECTION CALLED", {
155
155
  hasService: !!d,
156
156
  hasUser: !!t
@@ -163,10 +163,10 @@ const os = ot({
163
163
  try {
164
164
  l("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
165
165
  const M = await d.connectUser(t);
166
- h(M), c(!0), g(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
166
+ h(M), c(!0), p(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
167
167
  } catch (M) {
168
168
  const P = M instanceof Error ? M.message : "Refresh failed";
169
- g(P), l("❌ CONNECTION REFRESH ERROR", {
169
+ p(P), l("❌ CONNECTION REFRESH ERROR", {
170
170
  userId: t.id,
171
171
  error: P
172
172
  });
@@ -174,9 +174,9 @@ const os = ot({
174
174
  v(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
175
175
  }
176
176
  }
177
- }, [d, t, l, o]), I = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
177
+ }, [d, t, l, o]), E = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
178
178
  hasService: !!d,
179
- hasClient: !!p,
179
+ hasClient: !!g,
180
180
  isConnected: f,
181
181
  isLoading: b,
182
182
  hasError: !!x,
@@ -191,30 +191,30 @@ const os = ot({
191
191
  // surface it directly and report a clean connected state — the apiKey
192
192
  // path's `client`/`isLoading`/`error` (from connectUser) must not leak
193
193
  // through if the same provider previously attempted an apiKey connect.
194
- client: o ?? p,
194
+ client: o ?? g,
195
195
  isConnected: o ? !0 : f,
196
196
  isLoading: o ? !1 : b,
197
197
  error: o ? null : x,
198
198
  capabilities: r,
199
- refreshConnection: S,
199
+ refreshConnection: C,
200
200
  debug: i
201
201
  }), [
202
202
  d,
203
- p,
203
+ g,
204
204
  o,
205
205
  f,
206
206
  b,
207
207
  x,
208
208
  r,
209
- S,
209
+ C,
210
210
  i,
211
211
  l
212
212
  ]);
213
213
  return l("🔄 RENDER END", {
214
214
  renderCount: R.current,
215
215
  willRenderChat: !!F,
216
- contextValueReady: !!I
217
- }), /* @__PURE__ */ s(os.Provider, { value: I, children: F ? /* @__PURE__ */ s(
216
+ contextValueReady: !!E
217
+ }), /* @__PURE__ */ s(os.Provider, { value: E, children: F ? /* @__PURE__ */ s(
218
218
  Hs,
219
219
  {
220
220
  client: F,
@@ -341,7 +341,7 @@ const ne = ({
341
341
  "div",
342
342
  {
343
343
  "aria-hidden": "true",
344
- className: k(
344
+ className: y(
345
345
  "avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
346
346
  ),
347
347
  style: { fontSize: h, lineHeight: 1 },
@@ -351,7 +351,7 @@ const ne = ({
351
351
  return /* @__PURE__ */ u(
352
352
  "div",
353
353
  {
354
- className: k(
354
+ className: y(
355
355
  "relative flex-shrink-0",
356
356
  a
357
357
  ),
@@ -375,7 +375,7 @@ const ne = ({
375
375
  "div",
376
376
  {
377
377
  "data-testid": "avatar-ring",
378
- className: k(
378
+ className: y(
379
379
  "h-full w-full",
380
380
  "bg-transparent"
381
381
  ),
@@ -405,75 +405,75 @@ const ne = ({
405
405
  onBlockParticipantClick: l,
406
406
  onReportParticipantClick: d,
407
407
  onActionComplete: m,
408
- logLabel: p = "useChannelModerationActions"
408
+ logLabel: g = "useChannelModerationActions"
409
409
  }) => {
410
- var I;
411
- const { service: h, debug: f } = ct(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, b = !!(a && n && h && c), [v, x] = U(!1), [g, _] = U(null), [w, C] = U(!1), [L, E] = U(!1), R = b && ((g == null ? void 0 : g.participantId) !== c || (g == null ? void 0 : g.service) !== h);
410
+ var E;
411
+ const { service: h, debug: f } = ct(), c = (E = t == null ? void 0 : t.user) == null ? void 0 : E.id, b = !!(a && n && h && c), [v, x] = U(!1), [p, _] = U(null), [w, k] = U(!1), [L, S] = U(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
412
412
  return K(() => {
413
413
  if (!b || !h || !c) {
414
414
  x(!1), _(null);
415
415
  return;
416
416
  }
417
- let y = !1;
417
+ let I = !1;
418
418
  return (async () => {
419
419
  try {
420
420
  const T = await h.getBlockedUsers();
421
- if (y) return;
421
+ if (I) return;
422
422
  x(
423
423
  T.some(
424
424
  (M) => M.blocked_user_id === c
425
425
  )
426
426
  );
427
427
  } catch (T) {
428
- y || console.error(`[${p}] Failed to check blocked status:`, T);
428
+ I || console.error(`[${g}] Failed to check blocked status:`, T);
429
429
  } finally {
430
- y || _({ participantId: c, service: h });
430
+ I || _({ participantId: c, service: h });
431
431
  }
432
432
  })(), () => {
433
- y = !0;
433
+ I = !0;
434
434
  };
435
- }, [b, h, c, p]), {
435
+ }, [b, h, c, g]), {
436
436
  isParticipantBlocked: v,
437
437
  isCheckingBlockedStatus: R,
438
438
  isLeaving: w,
439
439
  isUpdatingBlockStatus: L,
440
440
  handleLeaveConversation: async () => {
441
- var y;
441
+ var I;
442
442
  if (!w) {
443
- o == null || o(), f && console.log(`[${p}] Leave conversation`, e.cid), C(!0);
443
+ o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), k(!0);
444
444
  try {
445
- const T = ((y = e._client) == null ? void 0 : y.userID) ?? null;
445
+ const T = ((I = e._client) == null ? void 0 : I.userID) ?? null;
446
446
  await e.hide(T, !1), r && await r(e), m == null || m();
447
447
  } catch (T) {
448
- console.error(`[${p}] Failed to leave conversation`, T);
448
+ console.error(`[${g}] Failed to leave conversation`, T);
449
449
  } finally {
450
- C(!1);
450
+ k(!1);
451
451
  }
452
452
  }
453
453
  },
454
454
  handleBlockUser: async () => {
455
- var y, T, M;
455
+ var I, T, M;
456
456
  if (!(L || !h)) {
457
- l == null || l(), f && console.log(`[${p}] Block member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), E(!0);
457
+ l == null || l(), f && console.log(`[${g}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
458
458
  try {
459
459
  await h.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
460
460
  } catch (P) {
461
- console.error(`[${p}] Failed to block member`, P);
461
+ console.error(`[${g}] Failed to block member`, P);
462
462
  } finally {
463
- E(!1);
463
+ S(!1);
464
464
  }
465
465
  }
466
466
  },
467
467
  handleUnblockUser: async () => {
468
- var y, T, M;
468
+ var I, T, M;
469
469
  if (!(L || !h)) {
470
- l == null || l(), f && console.log(`[${p}] Unblock member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), E(!0);
470
+ l == null || l(), f && console.log(`[${g}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
471
471
  try {
472
472
  await h.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
473
473
  } catch (P) {
474
- console.error(`[${p}] Failed to unblock member`, P);
474
+ console.error(`[${g}] Failed to unblock member`, P);
475
475
  } finally {
476
- E(!1);
476
+ S(!1);
477
477
  }
478
478
  }
479
479
  },
@@ -490,7 +490,7 @@ const ne = ({
490
490
  "button",
491
491
  {
492
492
  type: "button",
493
- className: k(
493
+ className: y(
494
494
  "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",
495
495
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
496
496
  t
@@ -509,16 +509,16 @@ const ne = ({
509
509
  onDeleteConversationClick: l,
510
510
  onBlockParticipantClick: d,
511
511
  onReportParticipantClick: m,
512
- customChannelActions: p,
512
+ customChannelActions: g,
513
513
  triggerClassName: h
514
514
  }) => {
515
515
  const [f, c] = U(!1), b = G(null), v = Us(), x = J(() => c(!1), []), {
516
- isParticipantBlocked: g,
516
+ isParticipantBlocked: p,
517
517
  isCheckingBlockedStatus: _,
518
518
  isLeaving: w,
519
- isUpdatingBlockStatus: C,
519
+ isUpdatingBlockStatus: k,
520
520
  handleLeaveConversation: L,
521
- handleBlockUser: E,
521
+ handleBlockUser: S,
522
522
  handleUnblockUser: R,
523
523
  handleReportUser: O
524
524
  } = ca({
@@ -536,15 +536,15 @@ const ne = ({
536
536
  });
537
537
  return K(() => {
538
538
  if (!f) return;
539
- const D = (I) => {
540
- b.current && !b.current.contains(I.target) && c(!1);
541
- }, S = (I) => {
542
- I.key === "Escape" && c(!1);
539
+ const D = (E) => {
540
+ b.current && !b.current.contains(E.target) && c(!1);
541
+ }, C = (E) => {
542
+ E.key === "Escape" && c(!1);
543
543
  };
544
- return document.addEventListener("mousedown", D), document.addEventListener("keydown", S), () => {
545
- document.removeEventListener("mousedown", D), document.removeEventListener("keydown", S);
544
+ return document.addEventListener("mousedown", D), document.addEventListener("keydown", C), () => {
545
+ document.removeEventListener("mousedown", D), document.removeEventListener("keydown", C);
546
546
  };
547
- }, [f]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
547
+ }, [f]), !t || !(n || a || r || !!g) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
548
548
  /* @__PURE__ */ u(
549
549
  "button",
550
550
  {
@@ -565,7 +565,7 @@ const ne = ({
565
565
  {
566
566
  id: v,
567
567
  "aria-label": "Conversation options",
568
- className: k(
568
+ className: y(
569
569
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
570
570
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
571
571
  ),
@@ -589,25 +589,25 @@ const ne = ({
589
589
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
590
590
  /* @__PURE__ */ s("span", { children: "Block" })
591
591
  ] })
592
- ) : g ? /* @__PURE__ */ u(
592
+ ) : p ? /* @__PURE__ */ u(
593
593
  Ne,
594
594
  {
595
595
  onClick: R,
596
- disabled: C,
597
- "aria-busy": C,
596
+ disabled: k,
597
+ "aria-busy": k,
598
598
  children: [
599
- C ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
599
+ k ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
600
600
  /* @__PURE__ */ s("span", { children: "Unblock" })
601
601
  ]
602
602
  }
603
603
  ) : /* @__PURE__ */ u(
604
604
  Ne,
605
605
  {
606
- onClick: E,
607
- disabled: C,
608
- "aria-busy": C,
606
+ onClick: S,
607
+ disabled: k,
608
+ "aria-busy": k,
609
609
  children: [
610
- C ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
610
+ k ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
611
611
  /* @__PURE__ */ s("span", { children: "Block" })
612
612
  ]
613
613
  }
@@ -616,12 +616,15 @@ const ne = ({
616
616
  /* @__PURE__ */ s(as, { className: "h-5 w-5" }),
617
617
  /* @__PURE__ */ s("span", { children: "Report" })
618
618
  ] }) }),
619
- p
619
+ g
620
620
  ] })
621
621
  }
622
622
  )
623
623
  ] });
624
- }, Ke = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", da = "CUSTOMER_PAID", ua = "Replies instantly with AI assistant", ma = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === da, ha = ({
624
+ }, Ke = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", da = "CUSTOMER_PAID", ua = "Replies instantly with AI assistant", ma = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === da, ha = (e) => {
625
+ const t = e;
626
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ma);
627
+ }, fa = ({
625
628
  className: e,
626
629
  onBack: t,
627
630
  showBackButton: n,
@@ -632,7 +635,7 @@ const ne = ({
632
635
  showDeleteConversation: l = !0,
633
636
  showBlockParticipant: d = !0,
634
637
  showReportParticipant: m = !0,
635
- onDeleteConversationClick: p,
638
+ onDeleteConversationClick: g,
636
639
  onBlockParticipantClick: h,
637
640
  onReportParticipantClick: f,
638
641
  customChannelActions: c,
@@ -640,31 +643,31 @@ const ne = ({
640
643
  showChannelInfo: v = !0,
641
644
  onParticipantNameClick: x
642
645
  }) => {
643
- var F, D, S, I;
644
- const { channel: g } = oe(), { client: _ } = he(), w = V.useMemo(
646
+ var F, D, C;
647
+ const { channel: p } = oe(), { client: _ } = he(), w = V.useMemo(
645
648
  () => {
646
- var y;
649
+ var E;
647
650
  return Ge(
648
- (y = g.state) == null ? void 0 : y.members,
651
+ (E = p.state) == null ? void 0 : E.members,
649
652
  _ == null ? void 0 : _.userID,
650
- g.type
653
+ p.type
651
654
  );
652
655
  },
653
- [(F = g.state) == null ? void 0 : F.members, _ == null ? void 0 : _.userID, g.type]
654
- ), C = ut(w == null ? void 0 : w.user), L = (D = w == null ? void 0 : w.user) == null ? void 0 : D.image, E = dt(g), R = ma((S = g.data) == null ? void 0 : S.customer_tag) && (w == null ? void 0 : w.is_follower) === !0, O = async () => {
656
+ [(F = p.state) == null ? void 0 : F.members, _ == null ? void 0 : _.userID, p.type]
657
+ ), k = ut(w == null ? void 0 : w.user), L = (D = w == null ? void 0 : w.user) == null ? void 0 : D.image, S = dt(p), R = ha(w), O = async () => {
655
658
  try {
656
- E ? await g.unpin() : await g.pin();
657
- } catch (y) {
659
+ S ? await p.unpin() : await p.pin();
660
+ } catch (E) {
658
661
  console.error(
659
662
  "[ChannelHeaderRedesign] Failed to update pinned status:",
660
- y
663
+ E
661
664
  );
662
665
  }
663
666
  };
664
667
  return /* @__PURE__ */ s(
665
668
  "div",
666
669
  {
667
- className: k(
670
+ className: y(
668
671
  "@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
669
672
  e
670
673
  ),
@@ -672,7 +675,7 @@ const ne = ({
672
675
  /* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
673
676
  "button",
674
677
  {
675
- className: k(
678
+ className: y(
676
679
  Ke,
677
680
  "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
678
681
  ),
@@ -688,14 +691,14 @@ const ne = ({
688
691
  {
689
692
  type: "button",
690
693
  onClick: x,
691
- "aria-label": `View details for ${C}`,
694
+ "aria-label": `View details for ${k}`,
692
695
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
693
696
  children: [
694
697
  /* @__PURE__ */ s(
695
698
  ne,
696
699
  {
697
- id: ((I = w == null ? void 0 : w.user) == null ? void 0 : I.id) || g.id || "unknown",
698
- name: C,
700
+ id: ((C = w == null ? void 0 : w.user) == null ? void 0 : C.id) || p.id || "unknown",
701
+ name: k,
699
702
  image: L,
700
703
  dmAgentEnabled: r,
701
704
  shape: "circle",
@@ -705,7 +708,7 @@ const ne = ({
705
708
  ),
706
709
  /* @__PURE__ */ u("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
707
710
  /* @__PURE__ */ u("span", { className: "flex max-w-full items-center justify-center", children: [
708
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: C }),
711
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: k }),
709
712
  /* @__PURE__ */ u("span", { className: "ml-2 flex gap-1", children: [
710
713
  R && /* @__PURE__ */ s(
711
714
  "span",
@@ -715,7 +718,7 @@ const ne = ({
715
718
  children: /* @__PURE__ */ s(An, { className: "size-2.5", weight: "bold" })
716
719
  }
717
720
  ),
718
- a && E && /* @__PURE__ */ s(
721
+ a && S && /* @__PURE__ */ s(
719
722
  "span",
720
723
  {
721
724
  "aria-label": "Starred conversation",
@@ -748,16 +751,16 @@ const ne = ({
748
751
  className: Ke,
749
752
  onClick: O,
750
753
  type: "button",
751
- "aria-pressed": E,
752
- "aria-label": E ? "Unstar conversation" : "Star conversation",
754
+ "aria-pressed": S,
755
+ "aria-label": S ? "Unstar conversation" : "Star conversation",
753
756
  children: /* @__PURE__ */ s(
754
757
  Ee,
755
758
  {
756
- className: k("size-5", {
757
- "text-[#FFD60A]": E,
758
- "text-black/90": !E
759
+ className: y("size-5", {
760
+ "text-[#FFD60A]": S,
761
+ "text-black/90": !S
759
762
  }),
760
- weight: E ? "fill" : "regular"
763
+ weight: S ? "fill" : "regular"
761
764
  }
762
765
  )
763
766
  }
@@ -765,14 +768,14 @@ const ne = ({
765
768
  v && (b !== void 0 ? b : /* @__PURE__ */ s(
766
769
  rt,
767
770
  {
768
- channel: g,
771
+ channel: p,
769
772
  participant: w,
770
773
  showDeleteConversation: l,
771
774
  showBlockParticipant: d,
772
775
  showReportParticipant: m,
773
776
  onLeaveConversation: i,
774
777
  onBlockParticipant: o,
775
- onDeleteConversationClick: p,
778
+ onDeleteConversationClick: g,
776
779
  onBlockParticipantClick: h,
777
780
  onReportParticipantClick: f,
778
781
  customChannelActions: c,
@@ -783,13 +786,13 @@ const ne = ({
783
786
  ] })
784
787
  }
785
788
  );
786
- }, fa = (e) => /* @__PURE__ */ s(Ys, { ...e, position: "center" }), it = "vote_up", lt = "vote_down";
787
- function ga(e) {
789
+ }, ga = (e) => /* @__PURE__ */ s(Ys, { ...e, position: "center" }), it = "vote_up", lt = "vote_down";
790
+ function pa(e) {
788
791
  return e != null && e.length ? e.some((t) => t.type === lt) ? "down" : e.some((t) => t.type === it) ? "up" : null : null;
789
792
  }
790
- function pa(e) {
793
+ function ba(e) {
791
794
  const { channel: t } = oe(), { client: n } = he("useMessageVote"), a = re(
792
- () => ga(e.own_reactions),
795
+ () => pa(e.own_reactions),
793
796
  [e.own_reactions]
794
797
  ), r = J(async () => {
795
798
  if (n != null && n.userID)
@@ -814,7 +817,7 @@ function pa(e) {
814
817
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
815
818
  return { selected: a, voteUp: r, voteDown: i };
816
819
  }
817
- function ba(e) {
820
+ function va(e) {
818
821
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
819
822
  }
820
823
  function ds({
@@ -822,10 +825,10 @@ function ds({
822
825
  viewerLanguage: t
823
826
  }) {
824
827
  var r;
825
- const n = e == null ? void 0 : e.text, a = ba(t);
828
+ const n = e == null ? void 0 : e.text, a = va(t);
826
829
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
827
830
  }
828
- const va = [
831
+ const xa = [
829
832
  [/pdf/, "pdf"],
830
833
  [/wordprocessingml|msword|\.doc/, "doc"],
831
834
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -839,17 +842,17 @@ function ce(e) {
839
842
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
840
843
  }
841
844
  function us(e) {
842
- const t = va.find(
845
+ const t = xa.find(
843
846
  ([n]) => n.test(e)
844
847
  );
845
848
  return t ? t[1] : "generic";
846
849
  }
847
- const xa = {
850
+ const wa = {
848
851
  video: is,
849
852
  audio: Dn,
850
853
  image: Rn,
851
854
  document: rs
852
- }, wa = {
855
+ }, _a = {
853
856
  pdf: Un,
854
857
  doc: Bn,
855
858
  xls: $n,
@@ -860,17 +863,17 @@ const xa = {
860
863
  markdown: Ln,
861
864
  generic: rs
862
865
  };
863
- function _a(e) {
866
+ function Na(e) {
864
867
  const t = ce(e);
865
- return t !== "document" ? xa[t] : wa[us(e)];
868
+ return t !== "document" ? wa[t] : _a[us(e)];
866
869
  }
867
870
  function we(e, t) {
868
- return V.createElement(_a(e), t);
871
+ return V.createElement(Na(e), t);
869
872
  }
870
- const Na = (e) => {
873
+ const ya = (e) => {
871
874
  var t, n;
872
875
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
873
- }, ya = ({
876
+ }, ka = ({
874
877
  source: e,
875
878
  mimeType: t,
876
879
  poster: n,
@@ -882,7 +885,7 @@ const Na = (e) => {
882
885
  muted: d = !1,
883
886
  onContainerClick: m
884
887
  }) => {
885
- const p = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [v, x] = U(a), [g, _] = U(0), [w, C] = U(!1), [L, E] = U(!1), [R, O] = U(!1), [F, D] = U(!1), [S, I] = U(!0), [y, T] = U(null), M = J(() => {
888
+ const g = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [v, x] = U(a), [p, _] = U(0), [w, k] = U(!1), [L, S] = U(!1), [R, O] = U(!1), [F, D] = U(!1), [C, E] = U(!0), [I, T] = U(null), M = J(() => {
886
889
  O(!1), x(!0);
887
890
  }, []), P = J((N) => {
888
891
  const A = f.current;
@@ -890,13 +893,13 @@ const Na = (e) => {
890
893
  const H = A.getBoundingClientRect();
891
894
  return Math.max(
892
895
  0,
893
- Math.min(1, (Na(N) - H.left) / H.width)
896
+ Math.min(1, (ya(N) - H.left) / H.width)
894
897
  );
895
898
  }, []), $ = J((N) => {
896
899
  const A = h.current;
897
900
  A && A.duration && (A.currentTime = N * A.duration);
898
901
  }, []), j = (N) => {
899
- N.stopPropagation(), C(!0);
902
+ N.stopPropagation(), k(!0);
900
903
  const A = P(N);
901
904
  _(A), $(A);
902
905
  };
@@ -922,13 +925,13 @@ const Na = (e) => {
922
925
  }, [v]), K(() => {
923
926
  if (!w) return;
924
927
  const N = (H) => _(P(H)), A = (H) => {
925
- C(!1), $(P(H));
928
+ k(!1), $(P(H));
926
929
  };
927
930
  return window.addEventListener("mousemove", N), window.addEventListener("mouseup", A), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", A), () => {
928
931
  window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", A);
929
932
  };
930
933
  }, [w, P, $]);
931
- const Q = y ? { aspectRatio: String(y) } : void 0, ee = y ? "" : " aspect-video", X = Math.round(g * 100);
934
+ const Q = I ? { aspectRatio: String(I) } : void 0, ee = I ? "" : " aspect-video", X = Math.round(p * 100);
932
935
  return /* @__PURE__ */ u(
933
936
  "div",
934
937
  {
@@ -953,7 +956,7 @@ const Na = (e) => {
953
956
  }
954
957
  },
955
958
  children: [
956
- n && (p === "audio" || S) && /* @__PURE__ */ s(
959
+ n && (g === "audio" || C) && /* @__PURE__ */ s(
957
960
  "img",
958
961
  {
959
962
  src: n,
@@ -961,11 +964,11 @@ const Na = (e) => {
961
964
  className: "absolute inset-0 h-full w-full object-cover"
962
965
  }
963
966
  ),
964
- !n && (p === "audio" || S) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: we(t, {
967
+ !n && (g === "audio" || C) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: we(t, {
965
968
  className: "size-12 text-black/20",
966
969
  weight: "regular"
967
970
  }) }),
968
- /* @__PURE__ */ s("div", { className: "absolute inset-0", children: p === "audio" ? /* @__PURE__ */ s(
971
+ /* @__PURE__ */ s("div", { className: "absolute inset-0", children: g === "audio" ? /* @__PURE__ */ s(
969
972
  "audio",
970
973
  {
971
974
  ref: h,
@@ -975,7 +978,7 @@ const Na = (e) => {
975
978
  style: { width: "100%", height: "100%" },
976
979
  onLoadStart: () => D(!0),
977
980
  onCanPlay: () => {
978
- D(!1), I(!1);
981
+ D(!1), E(!1);
979
982
  },
980
983
  onWaiting: () => D(!0),
981
984
  onPlay: () => O(!1),
@@ -995,7 +998,7 @@ const Na = (e) => {
995
998
  style: { width: "100%", height: "100%" },
996
999
  onLoadStart: () => D(!0),
997
1000
  onCanPlay: () => {
998
- D(!1), I(!1);
1001
+ D(!1), E(!1);
999
1002
  },
1000
1003
  onWaiting: () => D(!0),
1001
1004
  onPlay: () => O(!1),
@@ -1047,7 +1050,7 @@ const Na = (e) => {
1047
1050
  onTouchStart: j,
1048
1051
  onClick: (N) => N.stopPropagation(),
1049
1052
  onKeyDown: (N) => {
1050
- N.key === "ArrowRight" && $(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && $(Math.max(0, g - 0.05));
1053
+ N.key === "ArrowRight" && $(Math.min(1, p + 0.05)), N.key === "ArrowLeft" && $(Math.max(0, p - 0.05));
1051
1054
  },
1052
1055
  children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
1053
1056
  "div",
@@ -1085,10 +1088,10 @@ const Na = (e) => {
1085
1088
  onMouseDown: j,
1086
1089
  onTouchStart: j,
1087
1090
  onClick: (N) => N.stopPropagation(),
1088
- onMouseEnter: () => E(!0),
1089
- onMouseLeave: () => E(!1),
1091
+ onMouseEnter: () => S(!0),
1092
+ onMouseLeave: () => S(!1),
1090
1093
  onKeyDown: (N) => {
1091
- N.key === "ArrowRight" && $(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && $(Math.max(0, g - 0.05));
1094
+ N.key === "ArrowRight" && $(Math.min(1, p + 0.05)), N.key === "ArrowLeft" && $(Math.max(0, p - 0.05));
1092
1095
  },
1093
1096
  children: [
1094
1097
  /* @__PURE__ */ s(
@@ -1118,7 +1121,7 @@ const Na = (e) => {
1118
1121
  ]
1119
1122
  }
1120
1123
  );
1121
- }, Xt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ka = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ms = ({
1124
+ }, Xt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ca = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ms = ({
1122
1125
  mimeType: e,
1123
1126
  sourceUrl: t,
1124
1127
  thumbnailUrl: n,
@@ -1129,7 +1132,7 @@ const Na = (e) => {
1129
1132
  }) => {
1130
1133
  const l = ce(e), [d, m] = U(!1);
1131
1134
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
1132
- ya,
1135
+ ka,
1133
1136
  {
1134
1137
  source: t,
1135
1138
  mimeType: e,
@@ -1180,7 +1183,7 @@ const Na = (e) => {
1180
1183
  weight: "regular"
1181
1184
  })
1182
1185
  }
1183
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${ka(r)}`, children: /* @__PURE__ */ s(
1186
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ca(r)}`, children: /* @__PURE__ */ s(
1184
1187
  "img",
1185
1188
  {
1186
1189
  src: n,
@@ -1209,16 +1212,16 @@ const Na = (e) => {
1209
1212
  action: l,
1210
1213
  topLeft: d,
1211
1214
  topRight: m,
1212
- rootRef: p,
1215
+ rootRef: g,
1213
1216
  "data-testid": h
1214
1217
  }) => {
1215
1218
  const f = e === "dark", c = f ? n ?? a : n ?? "", b = f && !n;
1216
1219
  return /* @__PURE__ */ u(
1217
1220
  "div",
1218
1221
  {
1219
- ref: p,
1222
+ ref: g,
1220
1223
  "data-testid": h,
1221
- className: k(
1224
+ className: y(
1222
1225
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1223
1226
  f ? "bg-[#1e2330]" : "bg-white"
1224
1227
  ),
@@ -1230,7 +1233,7 @@ const Na = (e) => {
1230
1233
  c.trim() !== "" && /* @__PURE__ */ s(
1231
1234
  "p",
1232
1235
  {
1233
- className: k("mb-0.5 truncate text-base font-medium", {
1236
+ className: y("mb-0.5 truncate text-base font-medium", {
1234
1237
  "text-black": !f,
1235
1238
  "text-white/30": f && b,
1236
1239
  "text-white": f && !b
@@ -1240,7 +1243,7 @@ const Na = (e) => {
1240
1243
  ),
1241
1244
  /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
1242
1245
  we(r, {
1243
- className: k(
1246
+ className: y(
1244
1247
  "size-5 shrink-0",
1245
1248
  f ? "text-white/55" : "text-black/55"
1246
1249
  ),
@@ -1249,7 +1252,7 @@ const Na = (e) => {
1249
1252
  i != null && i !== "" && /* @__PURE__ */ s(
1250
1253
  "span",
1251
1254
  {
1252
- className: k(
1255
+ className: y(
1253
1256
  "text-xs font-medium",
1254
1257
  f ? "text-white/55" : "text-black/55"
1255
1258
  ),
@@ -1270,19 +1273,19 @@ function fs(e) {
1270
1273
  function mt(e) {
1271
1274
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1272
1275
  }
1273
- function Ca(e) {
1276
+ function Sa(e) {
1274
1277
  return e ? "bg-white/10" : "bg-black/5";
1275
1278
  }
1276
- function Sa(e) {
1279
+ function Ea(e) {
1277
1280
  return e ? "text-white" : "text-black";
1278
1281
  }
1279
- function Ea(e) {
1282
+ function Ia(e) {
1280
1283
  return e ? "text-white/55" : "text-black/55";
1281
1284
  }
1282
- function Ia(e) {
1285
+ function Ta(e) {
1283
1286
  return e ? "text-white/40" : "text-black/40";
1284
1287
  }
1285
- function Ta(e) {
1288
+ function Ma(e) {
1286
1289
  return e ? "text-white/20" : "text-black/20";
1287
1290
  }
1288
1291
  const ht = ({ attachment: e, isMyMessage: t }) => {
@@ -1297,14 +1300,14 @@ const ht = ({ attachment: e, isMyMessage: t }) => {
1297
1300
  ) : /* @__PURE__ */ s(
1298
1301
  "div",
1299
1302
  {
1300
- className: `aspect-video w-full rounded-[20px] ${Ca(t)} flex items-center justify-center`,
1301
- children: /* @__PURE__ */ s(Vn, { className: `size-12 ${Ta(t)}` })
1303
+ className: `aspect-video w-full rounded-[20px] ${Sa(t)} flex items-center justify-center`,
1304
+ children: /* @__PURE__ */ s(Vn, { className: `size-12 ${Ma(t)}` })
1302
1305
  }
1303
1306
  ) }),
1304
1307
  /* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
1305
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Sa(t)}`, children: n }),
1306
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Ea(t)}`, children: a }),
1307
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Ia(t)}`, children: d })
1308
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Ea(t)}`, children: n }),
1309
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Ia(t)}`, children: a }),
1310
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Ta(t)}`, children: d })
1308
1311
  ] })
1309
1312
  ] });
1310
1313
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
@@ -1316,7 +1319,7 @@ function ft(e) {
1316
1319
  var t;
1317
1320
  return (t = e.attachments) == null ? void 0 : t.find(gs);
1318
1321
  }
1319
- async function Ma(e, t) {
1322
+ async function Aa(e, t) {
1320
1323
  let n;
1321
1324
  try {
1322
1325
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1328,7 +1331,7 @@ async function Ma(e, t) {
1328
1331
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1329
1332
  o.href = i, o.download = n, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1330
1333
  }
1331
- const Aa = ({
1334
+ const Ra = ({
1332
1335
  url: e,
1333
1336
  filename: t
1334
1337
  }) => {
@@ -1340,7 +1343,7 @@ const Aa = ({
1340
1343
  onClick: (i) => {
1341
1344
  i.stopPropagation();
1342
1345
  const o = window.open("", "_blank", "noopener,noreferrer");
1343
- a(!0), Ma(e, t).then(() => {
1346
+ a(!0), Aa(e, t).then(() => {
1344
1347
  o == null || o.close();
1345
1348
  }).catch(() => {
1346
1349
  o && (o.location.href = e);
@@ -1367,13 +1370,13 @@ function gt(e) {
1367
1370
  (v) => v.type === "file" && v.asset_url
1368
1371
  ), i = t ?? n ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1369
1372
  if (!o) return null;
1370
- const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, p = t == null ? void 0 : t.thumb_url;
1373
+ const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
1371
1374
  return {
1372
1375
  resolvedUrl: o,
1373
1376
  resolvedType: l,
1374
1377
  title: d,
1375
1378
  fileSize: m,
1376
- thumbnailUrl: p
1379
+ thumbnailUrl: g
1377
1380
  };
1378
1381
  }
1379
1382
  const ps = ({
@@ -1430,10 +1433,10 @@ const ps = ({
1430
1433
  containedImage: i === "image" || i === "document"
1431
1434
  }
1432
1435
  ),
1433
- action: /* @__PURE__ */ s(Aa, { url: e, filename: n })
1436
+ action: /* @__PURE__ */ s(Ra, { url: e, filename: n })
1434
1437
  }
1435
1438
  );
1436
- }, Ra = ({
1439
+ }, Da = ({
1437
1440
  message: e,
1438
1441
  isMyMessage: t = !1
1439
1442
  }) => {
@@ -1465,7 +1468,7 @@ const ps = ({
1465
1468
  }
1466
1469
  )
1467
1470
  ] });
1468
- }, Da = ({
1471
+ }, La = ({
1469
1472
  message: e
1470
1473
  }) => {
1471
1474
  const t = ft(e);
@@ -1473,7 +1476,7 @@ const ps = ({
1473
1476
  return /* @__PURE__ */ s("div", { className: mt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ht, { attachment: t, isMyMessage: !0 }) });
1474
1477
  const n = gt(e);
1475
1478
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ps, { ...n }) }) : null;
1476
- }, La = ({
1479
+ }, za = ({
1477
1480
  message: e
1478
1481
  }) => {
1479
1482
  const t = ft(e);
@@ -1481,19 +1484,19 @@ const ps = ({
1481
1484
  return /* @__PURE__ */ s("div", { className: mt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ht, { attachment: t, isMyMessage: !1 }) });
1482
1485
  const n = gt(e);
1483
1486
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(bs, { ...n }) }) : null;
1484
- }, ol = Object.assign(Ra, {
1485
- Creator: Da,
1486
- Visitor: La
1487
- }), za = {
1487
+ }, cl = Object.assign(Da, {
1488
+ Creator: La,
1489
+ Visitor: za
1490
+ }), Fa = {
1488
1491
  dark: "bg-[#1e2330]",
1489
1492
  light: "bg-[#f2f1ef]"
1490
- }, Fa = {
1493
+ }, Pa = {
1491
1494
  dark: "text-white",
1492
1495
  light: "text-[#000000]"
1493
- }, Pa = {
1496
+ }, Oa = {
1494
1497
  dark: "border-white/[0.08]",
1495
1498
  light: "border-black/[0.08]"
1496
- }, Oa = (e) => e === "dark" ? "sender" : "receiver", $a = {
1499
+ }, $a = (e) => e === "dark" ? "sender" : "receiver", Ba = {
1497
1500
  sender: {
1498
1501
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1499
1502
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1515,13 +1518,13 @@ const ps = ({
1515
1518
  children: i,
1516
1519
  "data-testid": o
1517
1520
  }) => {
1518
- const l = t != null && t !== "", d = $a[Oa(e)][a];
1521
+ const l = t != null && t !== "", d = Ba[$a(e)][a];
1519
1522
  return /* @__PURE__ */ u(
1520
1523
  "div",
1521
1524
  {
1522
1525
  "data-testid": o,
1523
1526
  "data-group-position": a,
1524
- className: k(
1527
+ className: y(
1525
1528
  // 280px-wide bubble — matches the mobile chat attachment width
1526
1529
  // and keeps the document / image / audio bubbles visually
1527
1530
  // consistent inside the conversation timeline. The 8px / 16px
@@ -1530,10 +1533,10 @@ const ps = ({
1530
1533
  // as the surrounding `CustomMessage` text bubbles.
1531
1534
  "relative w-[280px] overflow-hidden px-2 py-2",
1532
1535
  d,
1533
- za[e],
1534
1536
  Fa[e],
1537
+ Pa[e],
1535
1538
  n && "border",
1536
- n && Pa[e],
1539
+ n && Oa[e],
1537
1540
  r
1538
1541
  ),
1539
1542
  children: [
@@ -1541,7 +1544,7 @@ const ps = ({
1541
1544
  l ? /* @__PURE__ */ s(
1542
1545
  "p",
1543
1546
  {
1544
- className: k(
1547
+ className: y(
1545
1548
  // No `text-*` / `font-*` overrides here — caption inherits
1546
1549
  // the same font family + size as `.str-chat__message-text`
1547
1550
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -1570,22 +1573,22 @@ const ps = ({
1570
1573
  a.stopPropagation(), e();
1571
1574
  },
1572
1575
  "aria-label": n,
1573
- className: k(
1576
+ className: y(
1574
1577
  "flex size-6 items-center justify-center rounded-full text-white",
1575
1578
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
1576
1579
  ),
1577
1580
  children: /* @__PURE__ */ s(Ve, { className: "size-3", weight: "bold" })
1578
1581
  }
1579
- ), Ae = (e) => e === "received" ? "light" : "dark", Ba = ({
1582
+ ), Ae = (e) => e === "received" ? "light" : "dark", Ua = ({
1580
1583
  firstOfGroup: e,
1581
1584
  endOfGroup: t,
1582
1585
  groupedByUser: n
1583
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ua = ({
1586
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", ja = ({
1584
1587
  src: e,
1585
1588
  mimeType: t,
1586
1589
  filename: n,
1587
1590
  items: a
1588
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1591
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Va = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1589
1592
  /* @__PURE__ */ s(
1590
1593
  "audio",
1591
1594
  {
@@ -1608,7 +1611,7 @@ const ps = ({
1608
1611
  preload: l,
1609
1612
  onDismiss: d
1610
1613
  }) => {
1611
- const m = Ae(e), p = e === "composer" && !!d, h = Ua({ src: t, mimeType: n, filename: a, items: r });
1614
+ const m = Ae(e), g = e === "composer" && !!d, h = ja({ src: t, mimeType: n, filename: a, items: r });
1612
1615
  if (h.length === 0)
1613
1616
  return null;
1614
1617
  const f = l ?? (h.length > 1 ? "none" : "metadata");
@@ -1620,29 +1623,29 @@ const ps = ({
1620
1623
  groupPosition: o,
1621
1624
  "data-testid": "audio-attachment",
1622
1625
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, b) => /* @__PURE__ */ s(
1623
- ja,
1626
+ Va,
1624
1627
  {
1625
1628
  item: c,
1626
1629
  preload: f,
1627
1630
  trailingAction: (
1628
1631
  // Composer only supports a single attachment, so the
1629
1632
  // dismiss control sits on the only player.
1630
- p && b === 0 ? /* @__PURE__ */ s(Me, { onClick: d, variant: "inline" }) : void 0
1633
+ g && b === 0 ? /* @__PURE__ */ s(Me, { onClick: d, variant: "inline" }) : void 0
1631
1634
  )
1632
1635
  },
1633
1636
  `${c.src}-${b}`
1634
1637
  )) })
1635
1638
  }
1636
1639
  );
1637
- }, Va = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), Ga = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), Ha = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), Ya = {
1638
- Composer: Va,
1639
- Sent: Ga,
1640
- Received: Ha
1640
+ }, Ga = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), Ha = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), Ya = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), qa = {
1641
+ Composer: Ga,
1642
+ Sent: Ha,
1643
+ Received: Ya
1641
1644
  };
1642
- function qa(e) {
1645
+ function Wa(e) {
1643
1646
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
1644
1647
  }
1645
- const Wa = {
1648
+ const Xa = {
1646
1649
  pdf: "PDF",
1647
1650
  doc: "DOC",
1648
1651
  xls: "XLS",
@@ -1652,7 +1655,7 @@ const Wa = {
1652
1655
  text: "TXT",
1653
1656
  markdown: "MD"
1654
1657
  };
1655
- function Xa(e, t) {
1658
+ function Ka(e, t) {
1656
1659
  if (t) {
1657
1660
  const r = t.lastIndexOf(".");
1658
1661
  if (r > 0 && r < t.length - 1) {
@@ -1662,7 +1665,7 @@ function Xa(e, t) {
1662
1665
  }
1663
1666
  if (!e) return;
1664
1667
  if (ce(e) === "document") {
1665
- const r = us(e), i = Wa[r];
1668
+ const r = us(e), i = Xa[r];
1666
1669
  if (i) return i;
1667
1670
  if (e === "application/octet-stream") return;
1668
1671
  }
@@ -1670,8 +1673,8 @@ function Xa(e, t) {
1670
1673
  if (!(!a || a === "*"))
1671
1674
  return a.toUpperCase();
1672
1675
  }
1673
- function Ka(e, t, n) {
1674
- const a = Xa(e, t), r = typeof n == "number" && n > 0 ? qa(n) : void 0;
1676
+ function Za(e, t, n) {
1677
+ const a = Ka(e, t), r = typeof n == "number" && n > 0 ? Wa(n) : void 0;
1675
1678
  return [a, r].filter(Boolean).join(" · ") || void 0;
1676
1679
  }
1677
1680
  function ie(e) {
@@ -1682,13 +1685,13 @@ function ie(e) {
1682
1685
  return "download";
1683
1686
  }
1684
1687
  }
1685
- const Za = {
1688
+ const Ja = {
1686
1689
  dark: "text-white/55",
1687
1690
  light: "text-black/65"
1688
- }, Ja = {
1691
+ }, Qa = {
1689
1692
  dark: "bg-white/10",
1690
1693
  light: "bg-black/5"
1691
- }, Qa = {
1694
+ }, er = {
1692
1695
  dark: "text-white/85",
1693
1696
  light: "text-black/85"
1694
1697
  }, vs = ({
@@ -1701,16 +1704,16 @@ const Za = {
1701
1704
  activateLabel: o,
1702
1705
  trailingAction: l
1703
1706
  }) => {
1704
- const d = n ?? t ?? "File", m = Ka(a, t, r), p = /* @__PURE__ */ s(
1707
+ const d = n ?? t ?? "File", m = Za(a, t, r), g = /* @__PURE__ */ s(
1705
1708
  "div",
1706
1709
  {
1707
- className: k(
1710
+ className: y(
1708
1711
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1709
- Ja[e]
1712
+ Qa[e]
1710
1713
  ),
1711
1714
  "aria-hidden": !0,
1712
1715
  children: we(a, {
1713
- className: k("size-6", Qa[e]),
1716
+ className: y("size-6", er[e]),
1714
1717
  weight: "regular"
1715
1718
  })
1716
1719
  }
@@ -1719,9 +1722,9 @@ const Za = {
1719
1722
  m ? /* @__PURE__ */ s(
1720
1723
  "p",
1721
1724
  {
1722
- className: k(
1725
+ className: y(
1723
1726
  "truncate text-xs leading-4",
1724
- Za[e]
1727
+ Ja[e]
1725
1728
  ),
1726
1729
  children: m
1727
1730
  }
@@ -1732,17 +1735,17 @@ const Za = {
1732
1735
  type: "button",
1733
1736
  onClick: i,
1734
1737
  "aria-label": o,
1735
- className: k(
1738
+ className: y(
1736
1739
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
1737
1740
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
1738
1741
  ),
1739
1742
  children: [
1740
- p,
1743
+ g,
1741
1744
  h
1742
1745
  ]
1743
1746
  }
1744
1747
  ) : /* @__PURE__ */ u(se, { children: [
1745
- p,
1748
+ g,
1746
1749
  h
1747
1750
  ] });
1748
1751
  return /* @__PURE__ */ u("div", { className: "flex items-center gap-3 px-3 py-2", children: [
@@ -1764,14 +1767,14 @@ async function xs(e, t) {
1764
1767
  }
1765
1768
  }
1766
1769
  }
1767
- const er = ({
1770
+ const tr = ({
1768
1771
  src: e,
1769
1772
  filename: t,
1770
1773
  fileSize: n,
1771
1774
  mimeType: a,
1772
1775
  title: r,
1773
1776
  items: i
1774
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], tr = ({
1777
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], sr = ({
1775
1778
  variant: e,
1776
1779
  item: t,
1777
1780
  index: n,
@@ -1803,9 +1806,9 @@ const er = ({
1803
1806
  text: l,
1804
1807
  groupPosition: d,
1805
1808
  onClick: m,
1806
- onDismiss: p
1809
+ onDismiss: g
1807
1810
  }) => {
1808
- const h = Ae(e), f = e === "composer" && !!p, c = er({
1811
+ const h = Ae(e), f = e === "composer" && !!g, c = tr({
1809
1812
  src: t,
1810
1813
  filename: n,
1811
1814
  fileSize: a,
@@ -1814,17 +1817,17 @@ const er = ({
1814
1817
  items: o
1815
1818
  }), b = (x) => {
1816
1819
  if ((m == null ? void 0 : m(x)) === !1) return;
1817
- const g = c[x];
1818
- if (!g) return;
1819
- const _ = g.filename ?? ie(g.src);
1820
- xs(g.src, _);
1820
+ const p = c[x];
1821
+ if (!p) return;
1822
+ const _ = p.filename ?? ie(p.src);
1823
+ xs(p.src, _);
1821
1824
  };
1822
1825
  if (c.length === 0)
1823
1826
  return null;
1824
1827
  const v = /* @__PURE__ */ s(
1825
1828
  "span",
1826
1829
  {
1827
- className: k(
1830
+ className: y(
1828
1831
  "flex size-8 items-center justify-center rounded-full",
1829
1832
  h === "dark" ? "text-white/70" : "text-black/70"
1830
1833
  ),
@@ -1839,23 +1842,23 @@ const er = ({
1839
1842
  text: l,
1840
1843
  groupPosition: d,
1841
1844
  "data-testid": "file-attachment",
1842
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((x, g) => /* @__PURE__ */ s(
1843
- tr,
1845
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((x, p) => /* @__PURE__ */ s(
1846
+ sr,
1844
1847
  {
1845
1848
  variant: h,
1846
1849
  item: x,
1847
- index: g,
1850
+ index: p,
1848
1851
  onActivate: b,
1849
- trailingAction: f && g === 0 ? /* @__PURE__ */ s(Me, { onClick: p, variant: "inline" }) : v
1852
+ trailingAction: f && p === 0 ? /* @__PURE__ */ s(Me, { onClick: g, variant: "inline" }) : v
1850
1853
  },
1851
- `${x.src}-${g}`
1854
+ `${x.src}-${p}`
1852
1855
  )) })
1853
1856
  }
1854
1857
  );
1855
- }, sr = (e) => /* @__PURE__ */ s(bt, { ...e, state: "composer" }), nr = (e) => /* @__PURE__ */ s(bt, { ...e, state: "sent" }), ar = (e) => /* @__PURE__ */ s(bt, { ...e, state: "received" }), rr = {
1856
- Composer: sr,
1857
- Sent: nr,
1858
- Received: ar
1858
+ }, nr = (e) => /* @__PURE__ */ s(bt, { ...e, state: "composer" }), ar = (e) => /* @__PURE__ */ s(bt, { ...e, state: "sent" }), rr = (e) => /* @__PURE__ */ s(bt, { ...e, state: "received" }), ir = {
1859
+ Composer: nr,
1860
+ Sent: ar,
1861
+ Received: rr
1859
1862
  }, vt = ({
1860
1863
  onPrev: e,
1861
1864
  onNext: t,
@@ -1899,7 +1902,7 @@ const er = ({
1899
1902
  }));
1900
1903
  },
1901
1904
  [l, e, t, o]
1902
- ), p = r ?? n !== "pill", f = { className: k(
1905
+ ), g = r ?? n !== "pill", f = { className: y(
1903
1906
  n === "pill" ? "size-4" : "size-5",
1904
1907
  "shrink-0"
1905
1908
  ), weight: "bold" };
@@ -1910,7 +1913,7 @@ const er = ({
1910
1913
  onClick: m,
1911
1914
  disabled: l,
1912
1915
  "aria-label": a,
1913
- className: k(
1916
+ className: y(
1914
1917
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
1915
1918
  {
1916
1919
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -1949,8 +1952,8 @@ const er = ({
1949
1952
  type: "button",
1950
1953
  onClick: m,
1951
1954
  disabled: l,
1952
- "aria-label": p ? a : void 0,
1953
- className: k(
1955
+ "aria-label": g ? a : void 0,
1956
+ className: y(
1954
1957
  "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
1955
1958
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
1956
1959
  ),
@@ -1963,7 +1966,7 @@ const er = ({
1963
1966
  "aria-hidden": !0
1964
1967
  }
1965
1968
  ) : /* @__PURE__ */ s(Se, { ...f, "aria-hidden": !0 }),
1966
- p ? null : a
1969
+ g ? null : a
1967
1970
  ]
1968
1971
  }
1969
1972
  );
@@ -1987,8 +1990,8 @@ const er = ({
1987
1990
  if (!n || e <= 1) return;
1988
1991
  const d = (m) => {
1989
1992
  if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
1990
- const p = document.activeElement;
1991
- p && (p.tagName === "VIDEO" || p.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
1993
+ const g = document.activeElement;
1994
+ g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
1992
1995
  };
1993
1996
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
1994
1997
  }, [n, e, o, l]), { index: r, prev: o, next: l };
@@ -2138,7 +2141,7 @@ const er = ({
2138
2141
  ]
2139
2142
  }
2140
2143
  ) : null;
2141
- }, ir = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Ns = ({
2144
+ }, lr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Ns = ({
2142
2145
  tiles: e,
2143
2146
  onTileActivate: t,
2144
2147
  maxVisible: n = 4,
@@ -2146,30 +2149,30 @@ const er = ({
2146
2149
  }) => {
2147
2150
  const r = e.length;
2148
2151
  if (r === 0) return null;
2149
- const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, p) => {
2150
- const h = k(ir, "h-full w-full");
2152
+ const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, g) => {
2153
+ const h = y(lr, "h-full w-full");
2151
2154
  return t ? /* @__PURE__ */ u(
2152
2155
  "button",
2153
2156
  {
2154
2157
  type: "button",
2155
2158
  onClick: () => t(m),
2156
2159
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
2157
- className: k(h, "cursor-zoom-in"),
2160
+ className: y(h, "cursor-zoom-in"),
2158
2161
  children: [
2159
2162
  d.content,
2160
- p
2163
+ g
2161
2164
  ]
2162
2165
  },
2163
2166
  m
2164
2167
  ) : /* @__PURE__ */ u("div", { className: h, children: [
2165
2168
  d.content,
2166
- p
2169
+ g
2167
2170
  ] }, m);
2168
2171
  };
2169
- return i.length === 1 ? /* @__PURE__ */ s("div", { className: k("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ s(
2172
+ return i.length === 1 ? /* @__PURE__ */ s("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ s(
2170
2173
  "div",
2171
2174
  {
2172
- className: k(
2175
+ className: y(
2173
2176
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
2174
2177
  a
2175
2178
  ),
@@ -2178,7 +2181,7 @@ const er = ({
2178
2181
  ) : i.length === 3 ? /* @__PURE__ */ u(
2179
2182
  "div",
2180
2183
  {
2181
- className: k(
2184
+ className: y(
2182
2185
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
2183
2186
  a
2184
2187
  ),
@@ -2191,16 +2194,16 @@ const er = ({
2191
2194
  ) : /* @__PURE__ */ s(
2192
2195
  "div",
2193
2196
  {
2194
- className: k(
2197
+ className: y(
2195
2198
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
2196
2199
  a
2197
2200
  ),
2198
2201
  children: i.map((d, m) => {
2199
- const p = o > 0 && m === i.length - 1;
2202
+ const g = o > 0 && m === i.length - 1;
2200
2203
  return l(
2201
2204
  d,
2202
2205
  m,
2203
- p ? /* @__PURE__ */ u("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2206
+ g ? /* @__PURE__ */ u("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2204
2207
  "+",
2205
2208
  o
2206
2209
  ] }) : null
@@ -2216,7 +2219,7 @@ const er = ({
2216
2219
  [e]
2217
2220
  ), o = J(() => n(!1), []);
2218
2221
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
2219
- }, lr = (e, t, n, a) => ({
2222
+ }, or = (e, t, n, a) => ({
2220
2223
  ariaLabel: `Open image ${t + 1} of ${n}`,
2221
2224
  content: /* @__PURE__ */ s(
2222
2225
  "img",
@@ -2231,7 +2234,7 @@ const er = ({
2231
2234
  className: "absolute inset-0 size-full rounded-md object-cover"
2232
2235
  }
2233
2236
  )
2234
- }), or = ({
2237
+ }), cr = ({
2235
2238
  src: e,
2236
2239
  alt: t,
2237
2240
  items: n
@@ -2239,7 +2242,7 @@ const er = ({
2239
2242
  src: n.src,
2240
2243
  alt: n.alt,
2241
2244
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2242
- })), cr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2245
+ })), dr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2243
2246
  const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Re(
2244
2247
  r
2245
2248
  );
@@ -2286,18 +2289,18 @@ const er = ({
2286
2289
  loading: l = "lazy",
2287
2290
  onClick: d
2288
2291
  }) => {
2289
- const m = or({ src: t, alt: n, items: r }), p = Ae(e), { viewerOpen: h, viewerIndex: f, handleActivate: c, closeViewer: b } = Re(
2292
+ const m = cr({ src: t, alt: n, items: r }), g = Ae(e), { viewerOpen: h, viewerIndex: f, handleActivate: c, closeViewer: b } = Re(
2290
2293
  d
2291
2294
  );
2292
2295
  if (m.length === 0)
2293
2296
  return null;
2294
2297
  const v = m.map(
2295
- (x, g) => lr(x, g, m.length, l)
2298
+ (x, p) => or(x, p, m.length, l)
2296
2299
  );
2297
2300
  return /* @__PURE__ */ u(
2298
2301
  Te,
2299
2302
  {
2300
- variant: p,
2303
+ variant: g,
2301
2304
  text: i,
2302
2305
  groupPosition: o,
2303
2306
  "data-testid": "image-attachment",
@@ -2315,11 +2318,11 @@ const er = ({
2315
2318
  ]
2316
2319
  }
2317
2320
  );
2318
- }, dr = (e) => /* @__PURE__ */ s(cr, { ...e }), ur = (e) => /* @__PURE__ */ s(ks, { ...e, state: "sent" }), mr = (e) => /* @__PURE__ */ s(ks, { ...e, state: "received" }), hr = {
2319
- Composer: dr,
2320
- Sent: ur,
2321
- Received: mr
2322
- }, fr = ({
2321
+ }, ur = (e) => /* @__PURE__ */ s(dr, { ...e }), mr = (e) => /* @__PURE__ */ s(ks, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(ks, { ...e, state: "received" }), fr = {
2322
+ Composer: ur,
2323
+ Sent: mr,
2324
+ Received: hr
2325
+ }, gr = ({
2323
2326
  open: e,
2324
2327
  items: t,
2325
2328
  initialIndex: n = 0,
@@ -2333,7 +2336,7 @@ const er = ({
2333
2336
  () => (l == null ? void 0 : l.filename) ?? (l ? ie(l.src) : "document"),
2334
2337
  [l]
2335
2338
  ), m = re(
2336
- () => l ? gr(l.src) : void 0,
2339
+ () => l ? pr(l.src) : void 0,
2337
2340
  [l]
2338
2341
  );
2339
2342
  return !l || !m ? null : /* @__PURE__ */ u(
@@ -2367,16 +2370,16 @@ const er = ({
2367
2370
  ]
2368
2371
  }
2369
2372
  );
2370
- }, gr = (e) => {
2373
+ }, pr = (e) => {
2371
2374
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2372
2375
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2373
- }, pr = ({
2376
+ }, br = ({
2374
2377
  src: e,
2375
2378
  filename: t,
2376
2379
  fileSize: n,
2377
2380
  title: a,
2378
2381
  items: r
2379
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], br = ({
2382
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], vr = ({
2380
2383
  variant: e,
2381
2384
  item: t,
2382
2385
  index: n,
@@ -2409,38 +2412,38 @@ const er = ({
2409
2412
  onClick: d,
2410
2413
  onDismiss: m
2411
2414
  }) => {
2412
- const p = Ae(e), h = pr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: v } = Re(
2415
+ const g = Ae(e), h = br({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: v } = Re(
2413
2416
  d
2414
2417
  ), x = e === "composer" && !!m;
2415
2418
  if (h.length === 0)
2416
2419
  return null;
2417
- const g = h.map((_) => ({
2420
+ const p = h.map((_) => ({
2418
2421
  src: _.src,
2419
2422
  filename: _.filename ?? ie(_.src)
2420
2423
  }));
2421
2424
  return /* @__PURE__ */ u(
2422
2425
  Te,
2423
2426
  {
2424
- variant: p,
2427
+ variant: g,
2425
2428
  text: o,
2426
2429
  groupPosition: l,
2427
2430
  "data-testid": "pdf-attachment",
2428
2431
  children: [
2429
2432
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((_, w) => {
2430
- const C = _.filename ?? ie(_.src), L = x && w === 0 ? /* @__PURE__ */ s(Me, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2433
+ const k = _.filename ?? ie(_.src), L = x && w === 0 ? /* @__PURE__ */ s(Me, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2431
2434
  ws,
2432
2435
  {
2433
2436
  url: _.src,
2434
- filename: C,
2437
+ filename: k,
2435
2438
  variant: "inline",
2436
- label: `Download ${C}`,
2437
- tone: p
2439
+ label: `Download ${k}`,
2440
+ tone: g
2438
2441
  }
2439
2442
  );
2440
2443
  return /* @__PURE__ */ s(
2441
- br,
2444
+ vr,
2442
2445
  {
2443
- variant: p,
2446
+ variant: g,
2444
2447
  item: _,
2445
2448
  index: w,
2446
2449
  onActivate: b,
@@ -2450,10 +2453,10 @@ const er = ({
2450
2453
  );
2451
2454
  }) }),
2452
2455
  /* @__PURE__ */ s(
2453
- fr,
2456
+ gr,
2454
2457
  {
2455
2458
  open: f,
2456
- items: g,
2459
+ items: p,
2457
2460
  initialIndex: c,
2458
2461
  onClose: v
2459
2462
  }
@@ -2461,10 +2464,10 @@ const er = ({
2461
2464
  ]
2462
2465
  }
2463
2466
  );
2464
- }, vr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "composer" }), xr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "sent" }), wr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "received" }), _r = {
2465
- Composer: vr,
2466
- Sent: xr,
2467
- Received: wr
2467
+ }, xr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "composer" }), wr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "sent" }), _r = (e) => /* @__PURE__ */ s(_t, { ...e, state: "received" }), Nr = {
2468
+ Composer: xr,
2469
+ Sent: wr,
2470
+ Received: _r
2468
2471
  }, Cs = ({
2469
2472
  open: e,
2470
2473
  items: t,
@@ -2515,7 +2518,7 @@ const er = ({
2515
2518
  ]
2516
2519
  }
2517
2520
  ) : null;
2518
- }, Nr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(at, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ss = ({
2521
+ }, yr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(at, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ss = ({
2519
2522
  item: e,
2520
2523
  index: t
2521
2524
  }) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2537,11 +2540,11 @@ const er = ({
2537
2540
  "aria-hidden": !0
2538
2541
  }
2539
2542
  ) }),
2540
- /* @__PURE__ */ s(Nr, {})
2541
- ] }), yr = (e, t, n) => ({
2543
+ /* @__PURE__ */ s(yr, {})
2544
+ ] }), kr = (e, t, n) => ({
2542
2545
  ariaLabel: `Play video ${t + 1} of ${n}`,
2543
2546
  content: /* @__PURE__ */ s(Ss, { item: e, index: t })
2544
- }), kr = ({
2547
+ }), Cr = ({
2545
2548
  src: e,
2546
2549
  poster: t,
2547
2550
  mimeType: n,
@@ -2553,8 +2556,8 @@ const er = ({
2553
2556
  mimeType: n.mimeType,
2554
2557
  preload: n.preload,
2555
2558
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2556
- })), Cr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2557
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: p } = Re(
2559
+ })), Sr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2560
+ const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = Re(
2558
2561
  i
2559
2562
  );
2560
2563
  return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
@@ -2578,7 +2581,7 @@ const er = ({
2578
2581
  a
2579
2582
  ),
2580
2583
  initialIndex: d,
2581
- onClose: p
2584
+ onClose: g
2582
2585
  }
2583
2586
  )
2584
2587
  ] });
@@ -2594,13 +2597,13 @@ const er = ({
2594
2597
  preload: d,
2595
2598
  onClick: m
2596
2599
  }) => {
2597
- const p = kr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Ae(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: v } = Re(
2600
+ const g = Cr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Ae(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: v } = Re(
2598
2601
  m
2599
2602
  );
2600
- if (p.length === 0)
2603
+ if (g.length === 0)
2601
2604
  return null;
2602
- const x = p.map(
2603
- (g, _) => yr(g, _, p.length)
2605
+ const x = g.map(
2606
+ (p, _) => kr(p, _, g.length)
2604
2607
  );
2605
2608
  return /* @__PURE__ */ u(
2606
2609
  Te,
@@ -2622,7 +2625,7 @@ const er = ({
2622
2625
  Cs,
2623
2626
  {
2624
2627
  open: f,
2625
- items: Es(p, r),
2628
+ items: Es(g, r),
2626
2629
  initialIndex: c,
2627
2630
  onClose: v
2628
2631
  }
@@ -2630,31 +2633,31 @@ const er = ({
2630
2633
  ]
2631
2634
  }
2632
2635
  );
2633
- }, Sr = (e) => /* @__PURE__ */ s(Cr, { ...e }), Er = (e) => /* @__PURE__ */ s(Is, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ s(Is, { ...e, state: "received" }), Tr = {
2634
- Composer: Sr,
2635
- Sent: Er,
2636
- Received: Ir
2636
+ }, Er = (e) => /* @__PURE__ */ s(Sr, { ...e }), Ir = (e) => /* @__PURE__ */ s(Is, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "received" }), Mr = {
2637
+ Composer: Er,
2638
+ Sent: Ir,
2639
+ Received: Tr
2637
2640
  }, ye = {
2638
- Image: hr,
2639
- Video: Tr,
2640
- Audio: Ya,
2641
- Pdf: _r,
2642
- File: rr
2643
- }, Mr = {
2644
- isUnlocking: () => !1
2641
+ Image: fr,
2642
+ Video: Mr,
2643
+ Audio: qa,
2644
+ Pdf: Nr,
2645
+ File: ir
2645
2646
  }, Ar = {
2646
- LockedAttachment: Mr
2647
- }, Ts = ot({}), cl = Ts.Provider;
2648
- function Rr(e) {
2649
- return Ie(Ts)[e] ?? Ar[e];
2647
+ isUnlocking: () => !1
2648
+ }, Rr = {
2649
+ LockedAttachment: Ar
2650
+ }, Ts = ot({}), dl = Ts.Provider;
2651
+ function Dr(e) {
2652
+ return Ie(Ts)[e] ?? Rr[e];
2650
2653
  }
2651
- const Dr = V.lazy(() => import("./Card-qS17qnN0.js")), Lr = V.lazy(() => import("./Card-Bk9bLpuH.js")), zr = () => /* @__PURE__ */ s(
2654
+ const Lr = V.lazy(() => import("./Card-qS17qnN0.js")), zr = V.lazy(() => import("./Card-Za6WfwFP.js")), Fr = () => /* @__PURE__ */ s(
2652
2655
  "div",
2653
2656
  {
2654
2657
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
2655
2658
  "aria-hidden": !0
2656
2659
  }
2657
- ), Fe = (e) => /* @__PURE__ */ s(js, { fallback: /* @__PURE__ */ s(zr, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(Dr, { ...e }) : /* @__PURE__ */ s(Lr, { ...e }) }), Fr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2660
+ ), Fe = (e) => /* @__PURE__ */ s(js, { fallback: /* @__PURE__ */ s(Fr, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(Lr, { ...e }) : /* @__PURE__ */ s(zr, { ...e }) }), Pr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2658
2661
  "svg",
2659
2662
  {
2660
2663
  width: e,
@@ -2671,10 +2674,10 @@ const Dr = V.lazy(() => import("./Card-qS17qnN0.js")), Lr = V.lazy(() => import(
2671
2674
  }
2672
2675
  )
2673
2676
  }
2674
- ), Pr = (e) => {
2677
+ ), Or = (e) => {
2675
2678
  var t;
2676
2679
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2677
- }, Or = (e) => {
2680
+ }, $r = (e) => {
2678
2681
  var t;
2679
2682
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2680
2683
  }, $e = (e) => {
@@ -2683,13 +2686,13 @@ const Dr = V.lazy(() => import("./Card-qS17qnN0.js")), Lr = V.lazy(() => import(
2683
2686
  }, Nt = (e) => {
2684
2687
  var t;
2685
2688
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2686
- }, $r = (e) => {
2689
+ }, Br = (e) => {
2687
2690
  var t;
2688
2691
  return Nt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
2689
- }, Br = (e) => {
2692
+ }, Ur = (e) => {
2690
2693
  var t;
2691
2694
  return Nt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2692
- }, Ms = (e) => Pr(e) || Or(e), Ur = (e) => {
2695
+ }, Ms = (e) => Or(e) || $r(e), jr = (e) => {
2693
2696
  var t;
2694
2697
  return Ms(e) && !((t = e.text) != null && t.trim());
2695
2698
  }, Je = ({
@@ -2715,15 +2718,15 @@ const Dr = V.lazy(() => import("./Card-qS17qnN0.js")), Lr = V.lazy(() => import(
2715
2718
  "message-chatbot-indicator",
2716
2719
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2717
2720
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2718
- ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Fr, { size: o ? 12 : 15 }) });
2721
+ ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Pr, { size: o ? 12 : 15 }) });
2719
2722
  return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ u(se, { children: [
2720
2723
  m,
2721
- p
2724
+ g
2722
2725
  ] }) : /* @__PURE__ */ u(se, { children: [
2723
- p,
2726
+ g,
2724
2727
  m
2725
2728
  ] }) });
2726
- }, jr = ({
2729
+ }, Vr = ({
2727
2730
  selected: e,
2728
2731
  onVoteUp: t,
2729
2732
  onVoteDown: n
@@ -2732,7 +2735,7 @@ const Dr = V.lazy(() => import("./Card-qS17qnN0.js")), Lr = V.lazy(() => import(
2732
2735
  "button",
2733
2736
  {
2734
2737
  type: "button",
2735
- className: k("message-vote-button focus-ring", {
2738
+ className: y("message-vote-button focus-ring", {
2736
2739
  "message-vote-button--selected": e === "up"
2737
2740
  }),
2738
2741
  onClick: t,
@@ -2746,7 +2749,7 @@ const Dr = V.lazy(() => import("./Card-qS17qnN0.js")), Lr = V.lazy(() => import(
2746
2749
  "button",
2747
2750
  {
2748
2751
  type: "button",
2749
- className: k("message-vote-button focus-ring", {
2752
+ className: y("message-vote-button focus-ring", {
2750
2753
  "message-vote-button--selected": e === "down"
2751
2754
  }),
2752
2755
  onClick: n,
@@ -2769,33 +2772,33 @@ const Dr = V.lazy(() => import("./Card-qS17qnN0.js")), Lr = V.lazy(() => import(
2769
2772
  /* @__PURE__ */ s(Wn, { weight: "bold", "aria-hidden": "true" }),
2770
2773
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2771
2774
  ] });
2772
- }, Vr = () => null, Gr = () => /* @__PURE__ */ s(
2775
+ }, Gr = () => null, Hr = () => /* @__PURE__ */ s(
2773
2776
  qs,
2774
2777
  {
2775
2778
  MessageSentStatus: Qe,
2776
2779
  MessageDeliveredStatus: Qe,
2777
2780
  MessageReadStatus: Qe,
2778
- MessageSendingStatus: Vr
2781
+ MessageSendingStatus: Gr
2779
2782
  }
2780
- ), Hr = /^([a-z][a-z0-9+.-]*):/i, Yr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2783
+ ), Yr = /^([a-z][a-z0-9+.-]*):/i, qr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2781
2784
  function yt(e) {
2782
2785
  if (typeof e != "string") return;
2783
2786
  const t = e.trim();
2784
2787
  if (t === "") return;
2785
- const n = Hr.exec(t);
2788
+ const n = Yr.exec(t);
2786
2789
  if (n) {
2787
2790
  const a = n[1].toLowerCase();
2788
- return Yr.has(a) ? t : void 0;
2791
+ return qr.has(a) ? t : void 0;
2789
2792
  }
2790
2793
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2791
2794
  }
2792
- const qr = {
2795
+ const Wr = {
2793
2796
  dark: "bg-white text-[#121110] hover:bg-white/90",
2794
2797
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2795
- }, Wr = ({ variant: e, cta: t }) => {
2796
- const n = k(
2798
+ }, Xr = ({ variant: e, cta: t }) => {
2799
+ const n = y(
2797
2800
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2798
- qr[e]
2801
+ Wr[e]
2799
2802
  ), a = yt(t.href);
2800
2803
  return a ? /* @__PURE__ */ s(
2801
2804
  "a",
@@ -2822,10 +2825,10 @@ const qr = {
2822
2825
  children: t.label
2823
2826
  }
2824
2827
  );
2825
- }, Xr = {
2828
+ }, Kr = {
2826
2829
  dark: "text-white",
2827
2830
  light: "text-black/90"
2828
- }, Kr = "text-white/30", Zr = {
2831
+ }, Zr = "text-white/30", Jr = {
2829
2832
  dark: "text-white/55",
2830
2833
  light: "text-black/55"
2831
2834
  }, kt = ({
@@ -2838,32 +2841,32 @@ const qr = {
2838
2841
  cta: o,
2839
2842
  trailingAction: l
2840
2843
  }) => {
2841
- const d = e === "dark", m = t ?? (d ? n : void 0) ?? "", p = m.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
2842
- if (!p && !h && !c && !b) return null;
2843
- const x = k(
2844
+ const d = e === "dark", m = t ?? (d ? n : void 0) ?? "", g = m.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
2845
+ if (!g && !h && !c && !b) return null;
2846
+ const x = y(
2844
2847
  "truncate text-base font-medium leading-6",
2845
- d && !t ? Kr : Xr[e]
2846
- ), g = k(
2848
+ d && !t ? Zr : Kr[e]
2849
+ ), p = y(
2847
2850
  "truncate text-xs leading-4",
2848
- Zr[e]
2851
+ Jr[e]
2849
2852
  );
2850
2853
  return /* @__PURE__ */ u("div", { className: "px-4 py-3", children: [
2851
2854
  /* @__PURE__ */ u("div", { className: "flex items-end gap-3", children: [
2852
2855
  /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2853
2856
  /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1", children: [
2854
- p && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
2857
+ g && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
2855
2858
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
2856
- /* @__PURE__ */ s("p", { className: k("min-w-0", x), children: m })
2859
+ /* @__PURE__ */ s("p", { className: y("min-w-0", x), children: m })
2857
2860
  ] }),
2858
- h && /* @__PURE__ */ s("p", { className: g, children: a })
2861
+ h && /* @__PURE__ */ s("p", { className: p, children: a })
2859
2862
  ] }),
2860
- !b && c && /* @__PURE__ */ s("p", { className: g, children: f })
2863
+ !b && c && /* @__PURE__ */ s("p", { className: p, children: f })
2861
2864
  ] }),
2862
2865
  l && /* @__PURE__ */ s("div", { className: "shrink-0", children: l })
2863
2866
  ] }),
2864
- o && /* @__PURE__ */ s(Wr, { variant: e, cta: o })
2867
+ o && /* @__PURE__ */ s(Xr, { variant: e, cta: o })
2865
2868
  ] });
2866
- }, Jr = k(
2869
+ }, Qr = y(
2867
2870
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2868
2871
  // 1px hairline border that sits flush with the card chrome — matches
2869
2872
  // the messaging design system's "small border around link attachments"
@@ -2881,8 +2884,8 @@ const qr = {
2881
2884
  bgClassName: l,
2882
2885
  "data-testid": d
2883
2886
  }) => {
2884
- const m = n != null || a != null, p = k(
2885
- Jr,
2887
+ const m = n != null || a != null, g = y(
2888
+ Qr,
2886
2889
  l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
2887
2890
  // `focus-ring` is a design-system utility from the component-library
2888
2891
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2898,7 +2901,7 @@ const qr = {
2898
2901
  rel: "noopener noreferrer",
2899
2902
  onClick: a,
2900
2903
  "data-testid": d,
2901
- className: p,
2904
+ className: g,
2902
2905
  children: [
2903
2906
  t,
2904
2907
  h
@@ -2912,7 +2915,7 @@ const qr = {
2912
2915
  onClick: a,
2913
2916
  "aria-label": r,
2914
2917
  "data-testid": d,
2915
- className: k(p, "text-left"),
2918
+ className: y(g, "text-left"),
2916
2919
  children: [
2917
2920
  t,
2918
2921
  h
@@ -2923,17 +2926,17 @@ const qr = {
2923
2926
  {
2924
2927
  ref: i,
2925
2928
  "data-testid": d,
2926
- className: p,
2929
+ className: g,
2927
2930
  children: [
2928
2931
  t,
2929
2932
  h
2930
2933
  ]
2931
2934
  }
2932
2935
  );
2933
- }, Qr = {
2936
+ }, ei = {
2934
2937
  dark: "bg-white/10",
2935
2938
  light: "bg-black/5"
2936
- }, ei = {
2939
+ }, ti = {
2937
2940
  dark: "size-16 text-white/25",
2938
2941
  light: "size-16 text-black/25"
2939
2942
  }, He = (e, t) => !!t && !!e && ce(e) === "audio", Ct = (e, t) => {
@@ -2962,7 +2965,7 @@ const qr = {
2962
2965
  ) }) : /* @__PURE__ */ u(
2963
2966
  "div",
2964
2967
  {
2965
- className: k(
2968
+ className: y(
2966
2969
  "relative h-[180px] w-full overflow-hidden",
2967
2970
  d && "bg-black"
2968
2971
  ),
@@ -2989,12 +2992,12 @@ const qr = {
2989
2992
  ) : /* @__PURE__ */ s(
2990
2993
  "div",
2991
2994
  {
2992
- className: k(
2995
+ className: y(
2993
2996
  "flex h-full w-full items-center justify-center",
2994
- Qr[e]
2997
+ ei[e]
2995
2998
  ),
2996
2999
  children: we(r, {
2997
- className: ei[e],
3000
+ className: ti[e],
2998
3001
  weight: "regular"
2999
3002
  })
3000
3003
  }
@@ -3004,7 +3007,7 @@ const qr = {
3004
3007
  ]
3005
3008
  }
3006
3009
  );
3007
- }, ti = ({
3010
+ }, si = ({
3008
3011
  title: e,
3009
3012
  placeholderTitle: t,
3010
3013
  description: n,
@@ -3015,14 +3018,14 @@ const qr = {
3015
3018
  layout: l = "featured",
3016
3019
  appIcon: d,
3017
3020
  cta: m,
3018
- onDismiss: p,
3021
+ onDismiss: g,
3019
3022
  onEditClick: h
3020
3023
  }) => {
3021
- const f = l === "classic", c = He(r, o), b = p ? /* @__PURE__ */ s(
3024
+ const f = l === "classic", c = He(r, o), b = g ? /* @__PURE__ */ s(
3022
3025
  "button",
3023
3026
  {
3024
3027
  type: "button",
3025
- onClick: p,
3028
+ onClick: g,
3026
3029
  "aria-label": "Dismiss attachment",
3027
3030
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3028
3031
  children: /* @__PURE__ */ s(Ve, { className: "size-3", weight: "bold" })
@@ -3081,7 +3084,7 @@ const qr = {
3081
3084
  ]
3082
3085
  }
3083
3086
  );
3084
- }, si = ({
3087
+ }, ni = ({
3085
3088
  title: e,
3086
3089
  description: t,
3087
3090
  url: n,
@@ -3093,7 +3096,7 @@ const qr = {
3093
3096
  cta: d,
3094
3097
  onClick: m
3095
3098
  }) => {
3096
- const p = Ct(a, i), h = yt(n), f = d == null && h != null && !p ? h : void 0, c = d == null && !p ? m : void 0, b = He(a, i) ? St : void 0, v = d && m ? {
3099
+ const g = Ct(a, i), h = yt(n), f = d == null && h != null && !g ? h : void 0, c = d == null && !g ? m : void 0, b = He(a, i) ? St : void 0, v = d && m ? {
3097
3100
  ...d,
3098
3101
  onClick: () => {
3099
3102
  var x;
@@ -3134,7 +3137,7 @@ const qr = {
3134
3137
  ]
3135
3138
  }
3136
3139
  );
3137
- }, ni = ({
3140
+ }, ai = ({
3138
3141
  title: e,
3139
3142
  placeholderTitle: t,
3140
3143
  description: n,
@@ -3145,9 +3148,9 @@ const qr = {
3145
3148
  layout: l = "featured",
3146
3149
  appIcon: d,
3147
3150
  cta: m,
3148
- onClick: p
3151
+ onClick: g
3149
3152
  }) => {
3150
- const h = Ct(r, o), f = yt(a), c = m == null && f != null && !h ? f : void 0, b = m == null && !h && c != null ? p : void 0;
3153
+ const h = Ct(r, o), f = yt(a), c = m == null && f != null && !h ? f : void 0, b = m == null && !h && c != null ? g : void 0;
3151
3154
  return /* @__PURE__ */ u(
3152
3155
  Be,
3153
3156
  {
@@ -3182,9 +3185,9 @@ const qr = {
3182
3185
  }
3183
3186
  );
3184
3187
  }, Kt = {
3185
- Composer: ti,
3186
- Sent: ni,
3187
- Received: si
3188
+ Composer: si,
3189
+ Sent: ai,
3190
+ Received: ni
3188
3191
  };
3189
3192
  function z(e) {
3190
3193
  const t = e == null ? void 0 : e.trim();
@@ -3193,7 +3196,7 @@ function z(e) {
3193
3196
  function Zt(e) {
3194
3197
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3195
3198
  }
3196
- function ai(e, t) {
3199
+ function ri(e, t) {
3197
3200
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3198
3201
  return !1;
3199
3202
  const n = Zt(e), a = Zt(t);
@@ -3218,7 +3221,7 @@ function Jt(e) {
3218
3221
  mimeType: r
3219
3222
  };
3220
3223
  }
3221
- function ri(e) {
3224
+ function ii(e) {
3222
3225
  var t;
3223
3226
  return As(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3224
3227
  }
@@ -3248,21 +3251,21 @@ function Rs(e) {
3248
3251
  a(r);
3249
3252
  continue;
3250
3253
  }
3251
- const i = ri(r);
3254
+ const i = ii(r);
3252
3255
  i && n(i, r);
3253
3256
  }
3254
3257
  return t;
3255
3258
  }
3256
- function ii(e) {
3259
+ function li(e) {
3257
3260
  return e.filter((t) => t.type === "media").length;
3258
3261
  }
3259
- function li(e, t, n) {
3262
+ function oi(e, t, n) {
3260
3263
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3261
3264
  }
3262
3265
  function Qt(e) {
3263
3266
  return z(e.image_url) ?? z(e.asset_url) ?? "";
3264
3267
  }
3265
- function oi(e) {
3268
+ function ci(e) {
3266
3269
  switch (e) {
3267
3270
  case "image":
3268
3271
  return ye.Image;
@@ -3276,7 +3279,7 @@ function oi(e) {
3276
3279
  return ye.File;
3277
3280
  }
3278
3281
  }
3279
- function ci(e, t) {
3282
+ function di(e, t) {
3280
3283
  if (t.length > 1)
3281
3284
  switch (e) {
3282
3285
  case "image":
@@ -3363,18 +3366,18 @@ function ci(e, t) {
3363
3366
  };
3364
3367
  }
3365
3368
  }
3366
- function di({
3369
+ function ui({
3367
3370
  groupPosition: e,
3368
3371
  isMyMessage: t,
3369
3372
  segment: n
3370
3373
  }) {
3371
- const a = oi(n.kind), r = {
3372
- ...ci(n.kind, n.attachments),
3374
+ const a = ci(n.kind), r = {
3375
+ ...di(n.kind, n.attachments),
3373
3376
  groupPosition: e
3374
3377
  };
3375
3378
  return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
3376
3379
  }
3377
- const ui = ({
3380
+ const mi = ({
3378
3381
  groupPosition: e,
3379
3382
  isMyMessage: t,
3380
3383
  message: n,
@@ -3383,24 +3386,24 @@ const ui = ({
3383
3386
  var b;
3384
3387
  const r = Rs(n.attachments);
3385
3388
  if (r.length === 0) return null;
3386
- const i = ii(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? Jt(l.attachments[0] ?? {}).url : void 0, m = o && ai(o, d) ? void 0 : o;
3387
- let p = 0;
3389
+ const i = li(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? Jt(l.attachments[0] ?? {}).url : void 0, m = o && ri(o, d) ? void 0 : o;
3390
+ let g = 0;
3388
3391
  const h = [], f = (v, x) => {
3389
- const g = t ? Kt.Sent : Kt.Received;
3392
+ const p = t ? Kt.Sent : Kt.Received;
3390
3393
  h.push(
3391
- /* @__PURE__ */ s(g, { ...Jt(v) }, x)
3394
+ /* @__PURE__ */ s(p, { ...Jt(v) }, x)
3392
3395
  );
3393
3396
  }, c = (v, x) => {
3394
- const g = li(
3395
- p,
3397
+ const p = oi(
3398
+ g,
3396
3399
  i,
3397
3400
  e
3398
3401
  );
3399
- p += 1, h.push(
3402
+ g += 1, h.push(
3400
3403
  /* @__PURE__ */ s(
3401
- di,
3404
+ ui,
3402
3405
  {
3403
- groupPosition: g,
3406
+ groupPosition: p,
3404
3407
  isMyMessage: t,
3405
3408
  segment: v
3406
3409
  },
@@ -3410,8 +3413,8 @@ const ui = ({
3410
3413
  };
3411
3414
  return r.forEach((v, x) => {
3412
3415
  if (v.type === "link") {
3413
- v.attachments.forEach((g, _) => {
3414
- f(g, `link-${x}-${_}`);
3416
+ v.attachments.forEach((p, _) => {
3417
+ f(p, `link-${x}-${_}`);
3415
3418
  });
3416
3419
  return;
3417
3420
  }
@@ -3445,7 +3448,7 @@ const ui = ({
3445
3448
  /* @__PURE__ */ s(st, {})
3446
3449
  ] }) : null
3447
3450
  ] });
3448
- }, mi = (e) => {
3451
+ }, hi = (e) => {
3449
3452
  var Dt, Lt, zt, Ft, Pt, Ot, $t, Bt, Ut, jt;
3450
3453
  const {
3451
3454
  additionalMessageInputProps: t,
@@ -3457,15 +3460,15 @@ const ui = ({
3457
3460
  handleAction: l,
3458
3461
  handleOpenThread: d,
3459
3462
  handleRetry: m,
3460
- highlighted: p,
3463
+ highlighted: g,
3461
3464
  isMessageAIGenerated: h,
3462
3465
  isMyMessage: f,
3463
3466
  message: c,
3464
3467
  renderText: b,
3465
3468
  threadList: v,
3466
3469
  viewerLanguage: x
3467
- } = e, { client: g } = he("CustomMessage"), { channel: _ } = oe("CustomMessage"), { isUnlocking: w, onUnlockClick: C, onFetchSource: L, onDownloadClick: E } = Rr("LockedAttachment"), [R, O] = U(!1), F = Xs(c.id), { selected: D, voteUp: S, voteDown: I } = pa(c), {
3468
- Attachment: y = Ks,
3470
+ } = e, { client: p } = he("CustomMessage"), { channel: _ } = oe("CustomMessage"), { isUnlocking: w, onUnlockClick: k, onFetchSource: L, onDownloadClick: S } = Dr("LockedAttachment"), [R, O] = U(!1), F = Xs(c.id), { selected: D, voteUp: C, voteDown: E } = ba(c), {
3471
+ Attachment: I = Ks,
3469
3472
  EditMessageModal: T = Zs,
3470
3473
  MessageActions: M,
3471
3474
  MessageBlocked: P = Js,
@@ -3493,7 +3496,7 @@ const ui = ({
3493
3496
  }, [c, x]), de = W.length > 0, De = W.reduce(
3494
3497
  (me, pe) => me + pe.attachments.length,
3495
3498
  0
3496
- ) === ((B == null ? void 0 : B.length) ?? 0), Le = Ba({
3499
+ ) === ((B == null ? void 0 : B.length) ?? 0), Le = Ua({
3497
3500
  endOfGroup: r,
3498
3501
  firstOfGroup: i,
3499
3502
  groupedByUser: o
@@ -3507,7 +3510,7 @@ const ui = ({
3507
3510
  const ae = !v && !!c.reply_count, ue = !v && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((Dt = c.error) == null ? void 0 : Dt.status) !== 403, It = dn(c);
3508
3511
  let fe;
3509
3512
  le ? fe = () => m(c) : It && (fe = () => O(!0));
3510
- const te = f(), Os = k(
3513
+ const te = f(), Os = y(
3511
3514
  "str-chat__message str-chat__message-simple",
3512
3515
  `str-chat__message--${c.type}`,
3513
3516
  `str-chat__message--${c.status}`,
@@ -3515,7 +3518,7 @@ const ui = ({
3515
3518
  c.text ? "str-chat__message--has-text" : "has-no-text",
3516
3519
  {
3517
3520
  "str-chat__message--has-attachment": H,
3518
- "str-chat__message--highlighted": p,
3521
+ "str-chat__message--highlighted": g,
3519
3522
  "str-chat__message--pinned pinned-message": c.pinned,
3520
3523
  "str-chat__message--with-reactions": q,
3521
3524
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Lt = c == null ? void 0 : c.error) == null ? void 0 : Lt.status) !== 403,
@@ -3524,7 +3527,7 @@ const ui = ({
3524
3527
  "str-chat__virtual-message__wrapper--first": i,
3525
3528
  "str-chat__virtual-message__wrapper--group": o
3526
3529
  }
3527
- ), Ye = c.poll_id && g.polls.fromState(c.poll_id), Tt = Ur(c), ge = $e(c), $s = Nt(c), qe = !!(B != null && B.length && !c.quoted_message), Mt = ge && te && qe, Bs = de && De && !c.quoted_message && !Ye && !Y && !ge, At = {
3530
+ ), Ye = c.poll_id && p.polls.fromState(c.poll_id), Tt = jr(c), ge = $e(c), $s = Nt(c), qe = !!(B != null && B.length && !c.quoted_message), Mt = ge && te && qe, Bs = de && De && !c.quoted_message && !Ye && !Y && !ge, At = {
3528
3531
  contentType: "text",
3529
3532
  amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3530
3533
  paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
@@ -3578,7 +3581,7 @@ const ui = ({
3578
3581
  /* @__PURE__ */ s(
3579
3582
  "div",
3580
3583
  {
3581
- className: k("str-chat__message-inner", {
3584
+ className: y("str-chat__message-inner", {
3582
3585
  "str-chat__simple-message--error-failed": le || It
3583
3586
  }),
3584
3587
  "data-testid": "message-inner",
@@ -3592,7 +3595,7 @@ const ui = ({
3592
3595
  marginInlineEnd: 0,
3593
3596
  marginInlineStart: 0
3594
3597
  },
3595
- children: Tt ? /* @__PURE__ */ s(Je, { message: c, standalone: !0 }) : $r(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3598
+ children: Tt ? /* @__PURE__ */ s(Je, { message: c, standalone: !0 }) : Br(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3596
3599
  te && M && /* @__PURE__ */ s(M, {}),
3597
3600
  te ? /* @__PURE__ */ s(
3598
3601
  Fe,
@@ -3606,11 +3609,11 @@ const ui = ({
3606
3609
  ...At,
3607
3610
  isMine: !1,
3608
3611
  isUnlocking: w(c.id),
3609
- onUnlockClick: () => C == null ? void 0 : C(c, _)
3612
+ onUnlockClick: () => k == null ? void 0 : k(c, _)
3610
3613
  }
3611
3614
  ),
3612
3615
  !te && M && /* @__PURE__ */ s(M, {})
3613
- ] }) }) : Br(c) ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3616
+ ] }) }) : Ur(c) ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3614
3617
  /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3615
3618
  te && M && /* @__PURE__ */ s(M, {}),
3616
3619
  te ? /* @__PURE__ */ s(
@@ -3618,7 +3621,7 @@ const ui = ({
3618
3621
  {
3619
3622
  ...Rt,
3620
3623
  isMine: !0,
3621
- onPreviewClick: () => C ? C(c, _) : void 0
3624
+ onPreviewClick: () => k ? k(c, _) : void 0
3622
3625
  }
3623
3626
  ) : /* @__PURE__ */ s(
3624
3627
  Fe,
@@ -3626,8 +3629,8 @@ const ui = ({
3626
3629
  ...Rt,
3627
3630
  isMine: !1,
3628
3631
  isUnlocking: w(c.id),
3629
- onUnlockClick: () => C ? C(c, _) : void 0,
3630
- onDownloadClick: () => E ? E(c, _) : void 0
3632
+ onUnlockClick: () => k ? k(c, _) : void 0,
3633
+ onDownloadClick: () => S ? S(c, _) : void 0
3631
3634
  }
3632
3635
  ),
3633
3636
  !te && M && /* @__PURE__ */ s(M, {})
@@ -3640,7 +3643,7 @@ const ui = ({
3640
3643
  }
3641
3644
  ) })
3642
3645
  ] }) : Bs ? /* @__PURE__ */ s(
3643
- ui,
3646
+ mi,
3644
3647
  {
3645
3648
  groupPosition: Le,
3646
3649
  isMyMessage: te,
@@ -3665,7 +3668,7 @@ const ui = ({
3665
3668
  ),
3666
3669
  Ye && /* @__PURE__ */ s(mn, { poll: Ye }),
3667
3670
  B != null && B.length && !c.quoted_message ? /* @__PURE__ */ s(
3668
- y,
3671
+ I,
3669
3672
  {
3670
3673
  actionHandler: l,
3671
3674
  attachments: B
@@ -3698,15 +3701,15 @@ const ui = ({
3698
3701
  }
3699
3702
  ),
3700
3703
  n && ge && /* @__PURE__ */ s(
3701
- jr,
3704
+ Vr,
3702
3705
  {
3703
3706
  selected: D,
3704
- onVoteUp: S,
3705
- onVoteDown: I
3707
+ onVoteUp: C,
3708
+ onVoteDown: E
3706
3709
  }
3707
3710
  )
3708
3711
  ] }),
3709
- /* @__PURE__ */ s(Gr, {}),
3712
+ /* @__PURE__ */ s(Hr, {}),
3710
3713
  ae && /* @__PURE__ */ s(
3711
3714
  ee,
3712
3715
  {
@@ -3720,13 +3723,13 @@ const ui = ({
3720
3723
  c.id
3721
3724
  )
3722
3725
  ] });
3723
- }, hi = V.memo(
3724
- mi,
3726
+ }, fi = V.memo(
3727
+ hi,
3725
3728
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ws(e, t)
3726
- ), fi = (e) => {
3729
+ ), gi = (e) => {
3727
3730
  const t = _e("CustomMessage");
3728
- return /* @__PURE__ */ s(hi, { ...t, ...e });
3729
- }, gi = () => {
3731
+ return /* @__PURE__ */ s(fi, { ...t, ...e });
3732
+ }, pi = () => {
3730
3733
  var n;
3731
3734
  const { handleDelete: e, message: t } = _e("CustomMessageActions");
3732
3735
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
@@ -3739,7 +3742,7 @@ const ui = ({
3739
3742
  children: /* @__PURE__ */ s(Kn, { size: 16, weight: "light", "aria-hidden": !0 })
3740
3743
  }
3741
3744
  );
3742
- }, pi = () => {
3745
+ }, bi = () => {
3743
3746
  const { handleFlag: e } = _e("CustomMessageActions");
3744
3747
  return /* @__PURE__ */ s(
3745
3748
  ls,
@@ -3751,19 +3754,19 @@ const ui = ({
3751
3754
  children: /* @__PURE__ */ s(as, { size: 16, weight: "light", "aria-hidden": !0 })
3752
3755
  }
3753
3756
  );
3754
- }, bi = () => {
3757
+ }, vi = () => {
3755
3758
  var t;
3756
3759
  const { message: e } = _e("CustomMessageActions");
3757
3760
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3758
3761
  Qn,
3759
3762
  {
3760
3763
  messageActionSet: [
3761
- { Component: gi, placement: "quick", type: "delete" },
3762
- { Component: pi, placement: "quick", type: "flag" }
3764
+ { Component: pi, placement: "quick", type: "delete" },
3765
+ { Component: bi, placement: "quick", type: "flag" }
3763
3766
  ]
3764
3767
  }
3765
3768
  );
3766
- }, vi = ({
3769
+ }, xi = ({
3767
3770
  link: e,
3768
3771
  onDismiss: t
3769
3772
  }) => {
@@ -3803,14 +3806,14 @@ const ui = ({
3803
3806
  ]
3804
3807
  }
3805
3808
  );
3806
- }, xi = (e) => ({
3809
+ }, wi = (e) => ({
3807
3810
  linkPreviews: Array.from(e.previews.values()).filter(
3808
3811
  (t) => Ht.previewIsLoaded(t) || Ht.previewIsLoading(t)
3809
3812
  )
3810
- }), wi = () => {
3813
+ }), _i = () => {
3811
3814
  const { linkPreviewsManager: e } = hn(), { linkPreviews: t } = fn(
3812
3815
  e.state,
3813
- xi
3816
+ wi
3814
3817
  ), n = (r) => {
3815
3818
  e.dismissPreview(r);
3816
3819
  };
@@ -3823,9 +3826,9 @@ const ui = ({
3823
3826
  // block so it keeps its intrinsic height and the container scrolls — a
3824
3827
  // bare flex-column child would be shrunk on the column axis and its
3825
3828
  // fixed-height hero would spill out of the collapsed card box.
3826
- /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(vi, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3829
+ /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(xi, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3827
3830
  ) : null;
3828
- }, Et = V.createContext(!1), dl = () => Ie(Et), _i = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3831
+ }, Et = V.createContext(!1), ul = () => Ie(Et), Ni = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3829
3832
  "button",
3830
3833
  {
3831
3834
  ...n,
@@ -3835,9 +3838,9 @@ const ui = ({
3835
3838
  onClick: e,
3836
3839
  children: /* @__PURE__ */ s(Zn, { weight: "bold", className: "size-4" })
3837
3840
  }
3838
- ), Ni = () => {
3841
+ ), yi = () => {
3839
3842
  const e = Ie(Et), { handleSubmit: t } = pn(), n = bn(), a = e || !n, {
3840
- SendButton: r = _i,
3843
+ SendButton: r = Ni,
3841
3844
  AttachmentPreviewList: i = vn
3842
3845
  } = ns("CustomMessageInput");
3843
3846
  return (
@@ -3856,7 +3859,7 @@ const ui = ({
3856
3859
  "data-dd-privacy": "mask",
3857
3860
  children: [
3858
3861
  /* @__PURE__ */ s(xn, {}),
3859
- /* @__PURE__ */ s(wi, {}),
3862
+ /* @__PURE__ */ s(_i, {}),
3860
3863
  /* @__PURE__ */ s(i, {}),
3861
3864
  /* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
3862
3865
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
@@ -3887,7 +3890,7 @@ const ui = ({
3887
3890
  }
3888
3891
  )
3889
3892
  );
3890
- }, yi = ({
3893
+ }, ki = ({
3891
3894
  renderActions: e,
3892
3895
  renderFooter: t,
3893
3896
  disabled: n = !1,
@@ -3908,23 +3911,23 @@ const ui = ({
3908
3911
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3909
3912
  children: [
3910
3913
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3911
- /* @__PURE__ */ s(Et.Provider, { value: o, children: /* @__PURE__ */ s(gn, { Input: r ?? Ni }) })
3914
+ /* @__PURE__ */ s(Et.Provider, { value: o, children: /* @__PURE__ */ s(gn, { Input: r ?? yi }) })
3912
3915
  ]
3913
3916
  }
3914
3917
  ),
3915
3918
  t == null ? void 0 : t()
3916
3919
  ] });
3917
- }, ki = [
3920
+ }, Ci = [
3918
3921
  "SYSTEM_DM_AGENT_PAUSED",
3919
3922
  "SYSTEM_DM_AGENT_RESUMED"
3920
- ], Ci = {
3923
+ ], Si = {
3921
3924
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3922
3925
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3923
- }, Si = [
3926
+ }, Ei = [
3924
3927
  "SYSTEM_AGE_SAFETY_BLOCKED"
3925
- ], Ei = {
3928
+ ], Ii = {
3926
3929
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3927
- }, et = "age safety guidelines.", Ii = "https://linktr.ee/s/about/contact", es = (e) => ki.includes(e), Ti = (e) => Si.includes(e), Mi = (e) => {
3930
+ }, et = "age safety guidelines.", Ti = "https://linktr.ee/s/about/contact", es = (e) => Ci.includes(e), Mi = (e) => Ei.includes(e), Ai = (e) => {
3928
3931
  var a;
3929
3932
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3930
3933
  if (es(t))
@@ -3932,7 +3935,7 @@ const ui = ({
3932
3935
  kind: "dm-agent",
3933
3936
  type: t
3934
3937
  };
3935
- if (Ti(t))
3938
+ if (Mi(t))
3936
3939
  return {
3937
3940
  kind: "age-safety",
3938
3941
  type: t
@@ -3943,7 +3946,7 @@ const ui = ({
3943
3946
  kind: "dm-agent",
3944
3947
  type: n
3945
3948
  };
3946
- }, Ai = (e) => {
3949
+ }, Ri = (e) => {
3947
3950
  const t = e.indexOf(et);
3948
3951
  if (t === -1)
3949
3952
  return e;
@@ -3953,7 +3956,7 @@ const ui = ({
3953
3956
  /* @__PURE__ */ s(
3954
3957
  "a",
3955
3958
  {
3956
- href: Ii,
3959
+ href: Ti,
3957
3960
  target: "_blank",
3958
3961
  rel: "noopener noreferrer",
3959
3962
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -3962,13 +3965,13 @@ const ui = ({
3962
3965
  ),
3963
3966
  e.slice(n)
3964
3967
  ] });
3965
- }, Ri = (e) => {
3968
+ }, Di = (e) => {
3966
3969
  var a, r;
3967
- const t = e.message.hide_date === !0, n = Mi(
3970
+ const t = e.message.hide_date === !0, n = Ai(
3968
3971
  e.message
3969
3972
  );
3970
3973
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3971
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ci[n.type];
3974
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Si[n.type];
3972
3975
  return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3973
3976
  /* @__PURE__ */ u(
3974
3977
  "div",
@@ -3994,7 +3997,7 @@ const ui = ({
3994
3997
  ] });
3995
3998
  }
3996
3999
  if ((n == null ? void 0 : n.kind) === "age-safety") {
3997
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ei[n.type];
4000
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ii[n.type];
3998
4001
  return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3999
4002
  /* @__PURE__ */ u(
4000
4003
  "div",
@@ -4013,7 +4016,7 @@ const ui = ({
4013
4016
  "data-testid": "age-safety-system-message-icon"
4014
4017
  }
4015
4018
  ),
4016
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("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: Ai(i) }) })
4019
+ /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("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: Ri(i) }) })
4017
4020
  ]
4018
4021
  }
4019
4022
  ),
@@ -4038,15 +4041,15 @@ const ui = ({
4038
4041
  begin: `${120 * t}ms`,
4039
4042
  repeatCount: "indefinite"
4040
4043
  }
4041
- ) }), Di = /* @__PURE__ */ new Set([
4044
+ ) }), Li = /* @__PURE__ */ new Set([
4042
4045
  Xe.Thinking,
4043
4046
  Xe.Generating,
4044
4047
  Xe.ExternalSources
4045
- ]), Li = ({ threadList: e }) => {
4048
+ ]), zi = ({ threadList: e }) => {
4046
4049
  var b, v;
4047
4050
  const { channel: t, channelConfig: n, thread: a } = oe(), { client: r } = he(), { typing: i = {} } = _n(), { aiState: o } = Nn(t), l = Ie(Ds);
4048
- if (!e && l && Di.has(o)) {
4049
- const x = zi(t, (b = r.user) == null ? void 0 : b.id);
4051
+ if (!e && l && Li.has(o)) {
4052
+ const x = Fi(t, (b = r.user) == null ? void 0 : b.id);
4050
4053
  return /* @__PURE__ */ s(
4051
4054
  ts,
4052
4055
  {
@@ -4060,16 +4063,16 @@ const ui = ({
4060
4063
  if ((n == null ? void 0 : n.typing_events) === !1)
4061
4064
  return null;
4062
4065
  const m = e ? [] : Object.values(i).filter(
4063
- ({ parent_id: x, user: g }) => {
4066
+ ({ parent_id: x, user: p }) => {
4064
4067
  var _;
4065
- return (g == null ? void 0 : g.id) !== ((_ = r.user) == null ? void 0 : _.id) && !x;
4068
+ return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && !x;
4066
4069
  }
4067
- ), p = e ? Object.values(i).filter(
4068
- ({ parent_id: x, user: g }) => {
4070
+ ), g = e ? Object.values(i).filter(
4071
+ ({ parent_id: x, user: p }) => {
4069
4072
  var _;
4070
- return (g == null ? void 0 : g.id) !== ((_ = r.user) == null ? void 0 : _.id) && x === (a == null ? void 0 : a.id);
4073
+ return (p == null ? void 0 : p.id) !== ((_ = r.user) == null ? void 0 : _.id) && x === (a == null ? void 0 : a.id);
4071
4074
  }
4072
- ) : [], h = e ? p : m;
4075
+ ) : [], h = e ? g : m;
4073
4076
  if (!h.length)
4074
4077
  return null;
4075
4078
  const f = (v = h[0]) == null ? void 0 : v.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
@@ -4126,7 +4129,7 @@ const ui = ({
4126
4129
  ] })
4127
4130
  }
4128
4131
  );
4129
- function zi(e, t) {
4132
+ function Fi(e, t) {
4130
4133
  var a;
4131
4134
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4132
4135
  for (const r of Object.values(n)) {
@@ -4135,10 +4138,10 @@ function zi(e, t) {
4135
4138
  return i;
4136
4139
  }
4137
4140
  }
4138
- const Fi = () => null, Pi = ({ className: e, message: t }) => /* @__PURE__ */ u(
4141
+ const Pi = () => null, Oi = ({ className: e, message: t }) => /* @__PURE__ */ u(
4139
4142
  "div",
4140
4143
  {
4141
- className: k("flex items-center justify-center h-full", e),
4144
+ className: y("flex items-center justify-center h-full", e),
4142
4145
  children: [
4143
4146
  /* @__PURE__ */ u("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4144
4147
  /* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
@@ -4179,11 +4182,11 @@ const Fi = () => null, Pi = ({ className: e, message: t }) => /* @__PURE__ */ u(
4179
4182
  ]
4180
4183
  }
4181
4184
  ), je = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center", children: [
4182
- /* @__PURE__ */ s(Pi, { className: "w-6 h-6" }),
4185
+ /* @__PURE__ */ s(Oi, { className: "w-6 h-6" }),
4183
4186
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4184
4187
  ] }) }));
4185
4188
  je.displayName = "LoadingState";
4186
- const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Oi = ({
4189
+ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", $i = ({
4187
4190
  onBack: e,
4188
4191
  showBackButton: t,
4189
4192
  showStarButton: n = !1,
@@ -4194,7 +4197,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4194
4197
  showBlockParticipant: l = !0,
4195
4198
  showReportParticipant: d = !0,
4196
4199
  onDeleteConversationClick: m,
4197
- onBlockParticipantClick: p,
4200
+ onBlockParticipantClick: g,
4198
4201
  onReportParticipantClick: h,
4199
4202
  customChannelActions: f,
4200
4203
  renderChannelActions: c,
@@ -4202,26 +4205,26 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4202
4205
  onParticipantNameClick: v,
4203
4206
  renderHeaderTitleBadges: x
4204
4207
  }) => {
4205
- var I, y, T, M, P, $;
4206
- const { channel: g } = oe(), { client: _ } = he(), w = V.useMemo(
4208
+ var E, I, T, M, P, $;
4209
+ const { channel: p } = oe(), { client: _ } = he(), w = V.useMemo(
4207
4210
  () => {
4208
4211
  var j;
4209
4212
  return Ge(
4210
- (j = g.state) == null ? void 0 : j.members,
4213
+ (j = p.state) == null ? void 0 : j.members,
4211
4214
  _ == null ? void 0 : _.userID,
4212
- g.type
4215
+ p.type
4213
4216
  );
4214
4217
  },
4215
- [(I = g.state) == null ? void 0 : I.members, _ == null ? void 0 : _.userID, g.type]
4216
- ), C = ut(w == null ? void 0 : w.user), L = (y = w == null ? void 0 : w.user) == null ? void 0 : y.image, E = dt(g), R = x == null ? void 0 : x({
4217
- channel: g,
4218
+ [(E = p.state) == null ? void 0 : E.members, _ == null ? void 0 : _.userID, p.type]
4219
+ ), k = ut(w == null ? void 0 : w.user), L = (I = w == null ? void 0 : w.user) == null ? void 0 : I.image, S = dt(p), R = x == null ? void 0 : x({
4220
+ channel: p,
4218
4221
  participant: w
4219
4222
  }), O = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", D = /* @__PURE__ */ u(se, { children: [
4220
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: C }),
4223
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: k }),
4221
4224
  R && /* @__PURE__ */ s("span", { className: "shrink-0", children: R })
4222
- ] }), S = async () => {
4225
+ ] }), C = async () => {
4223
4226
  try {
4224
- E ? await g.unpin() : await g.pin();
4227
+ S ? await p.unpin() : await p.pin();
4225
4228
  } catch (j) {
4226
4229
  console.error(
4227
4230
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -4234,7 +4237,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4234
4237
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ s(
4235
4238
  "button",
4236
4239
  {
4237
- className: k(
4240
+ className: y(
4238
4241
  be,
4239
4242
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
4240
4243
  ),
@@ -4255,8 +4258,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4255
4258
  {
4256
4259
  type: "button",
4257
4260
  onClick: v,
4258
- "aria-label": `View details for ${C}`,
4259
- className: k(
4261
+ "aria-label": `View details for ${k}`,
4262
+ className: y(
4260
4263
  O,
4261
4264
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4262
4265
  ),
@@ -4264,10 +4267,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4264
4267
  /* @__PURE__ */ s(
4265
4268
  ne,
4266
4269
  {
4267
- id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || g.id || "unknown",
4268
- name: C,
4270
+ id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || p.id || "unknown",
4271
+ name: k,
4269
4272
  image: L,
4270
- starred: n && E,
4273
+ starred: n && S,
4271
4274
  dmAgentEnabled: a,
4272
4275
  size: 48
4273
4276
  }
@@ -4286,10 +4289,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4286
4289
  /* @__PURE__ */ s(
4287
4290
  ne,
4288
4291
  {
4289
- id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || g.id || "unknown",
4290
- name: C,
4292
+ id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || p.id || "unknown",
4293
+ name: k,
4291
4294
  image: L,
4292
- starred: n && E,
4295
+ starred: n && S,
4293
4296
  dmAgentEnabled: a,
4294
4297
  size: 48
4295
4298
  }
@@ -4316,17 +4319,17 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4316
4319
  "button",
4317
4320
  {
4318
4321
  className: be,
4319
- onClick: S,
4322
+ onClick: C,
4320
4323
  type: "button",
4321
- "aria-label": E ? "Unstar conversation" : "Star conversation",
4324
+ "aria-label": S ? "Unstar conversation" : "Star conversation",
4322
4325
  children: /* @__PURE__ */ s(
4323
4326
  Ee,
4324
4327
  {
4325
- className: k("size-5", {
4326
- "text-yellow-600": E,
4327
- "text-black/90": !E
4328
+ className: y("size-5", {
4329
+ "text-yellow-600": S,
4330
+ "text-black/90": !S
4328
4331
  }),
4329
- weight: E ? "duotone" : "regular"
4332
+ weight: S ? "duotone" : "regular"
4330
4333
  }
4331
4334
  )
4332
4335
  }
@@ -4334,7 +4337,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4334
4337
  b && (c !== void 0 ? c : /* @__PURE__ */ s(
4335
4338
  rt,
4336
4339
  {
4337
- channel: g,
4340
+ channel: p,
4338
4341
  participant: w,
4339
4342
  showDeleteConversation: o,
4340
4343
  showBlockParticipant: l,
@@ -4342,10 +4345,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4342
4345
  onLeaveConversation: r,
4343
4346
  onBlockParticipant: i,
4344
4347
  onDeleteConversationClick: m,
4345
- onBlockParticipantClick: p,
4348
+ onBlockParticipantClick: g,
4346
4349
  onReportParticipantClick: h,
4347
4350
  customChannelActions: f,
4348
- triggerClassName: k(be, "bg-[#F1F0EE]")
4351
+ triggerClassName: y(be, "bg-[#F1F0EE]")
4349
4352
  }
4350
4353
  ))
4351
4354
  ] })
@@ -4355,7 +4358,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4355
4358
  t && e && /* @__PURE__ */ s(
4356
4359
  "button",
4357
4360
  {
4358
- className: k(
4361
+ className: y(
4359
4362
  be,
4360
4363
  "messaging-channel-view-back-button-desktop"
4361
4364
  ),
@@ -4370,8 +4373,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4370
4373
  {
4371
4374
  type: "button",
4372
4375
  onClick: v,
4373
- "aria-label": `View details for ${C}`,
4374
- className: k(
4376
+ "aria-label": `View details for ${k}`,
4377
+ className: y(
4375
4378
  F,
4376
4379
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4377
4380
  ),
@@ -4379,10 +4382,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4379
4382
  /* @__PURE__ */ s(
4380
4383
  ne,
4381
4384
  {
4382
- id: ((P = w == null ? void 0 : w.user) == null ? void 0 : P.id) || g.id || "unknown",
4383
- name: C,
4385
+ id: ((P = w == null ? void 0 : w.user) == null ? void 0 : P.id) || p.id || "unknown",
4386
+ name: k,
4384
4387
  image: L,
4385
- starred: n && E,
4388
+ starred: n && S,
4386
4389
  dmAgentEnabled: a,
4387
4390
  size: 48
4388
4391
  }
@@ -4403,10 +4406,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4403
4406
  /* @__PURE__ */ s(
4404
4407
  ne,
4405
4408
  {
4406
- id: (($ = w == null ? void 0 : w.user) == null ? void 0 : $.id) || g.id || "unknown",
4407
- name: C,
4409
+ id: (($ = w == null ? void 0 : w.user) == null ? void 0 : $.id) || p.id || "unknown",
4410
+ name: k,
4408
4411
  image: L,
4409
- starred: n && E,
4412
+ starred: n && S,
4410
4413
  dmAgentEnabled: a,
4411
4414
  size: 48
4412
4415
  }
@@ -4434,17 +4437,17 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4434
4437
  "button",
4435
4438
  {
4436
4439
  className: be,
4437
- onClick: S,
4440
+ onClick: C,
4438
4441
  type: "button",
4439
- "aria-label": E ? "Unstar conversation" : "Star conversation",
4442
+ "aria-label": S ? "Unstar conversation" : "Star conversation",
4440
4443
  children: /* @__PURE__ */ s(
4441
4444
  Ee,
4442
4445
  {
4443
- className: k("size-6", {
4444
- "text-yellow-600": E,
4445
- "text-black/90": !E
4446
+ className: y("size-6", {
4447
+ "text-yellow-600": S,
4448
+ "text-black/90": !S
4446
4449
  }),
4447
- weight: E ? "duotone" : "regular"
4450
+ weight: S ? "duotone" : "regular"
4448
4451
  }
4449
4452
  )
4450
4453
  }
@@ -4452,7 +4455,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4452
4455
  b && (c !== void 0 ? c : /* @__PURE__ */ s(
4453
4456
  rt,
4454
4457
  {
4455
- channel: g,
4458
+ channel: p,
4456
4459
  participant: w,
4457
4460
  showDeleteConversation: o,
4458
4461
  showBlockParticipant: l,
@@ -4460,7 +4463,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4460
4463
  onLeaveConversation: r,
4461
4464
  onBlockParticipant: i,
4462
4465
  onDeleteConversationClick: m,
4463
- onBlockParticipantClick: p,
4466
+ onBlockParticipantClick: g,
4464
4467
  onReportParticipantClick: h,
4465
4468
  customChannelActions: f,
4466
4469
  triggerClassName: be
@@ -4469,7 +4472,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4469
4472
  ] })
4470
4473
  ] })
4471
4474
  ] });
4472
- }, $i = ({
4475
+ }, Bi = ({
4473
4476
  onBack: e,
4474
4477
  showBackButton: t,
4475
4478
  renderMessageInputActions: n,
@@ -4480,46 +4483,46 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4480
4483
  showDeleteConversation: l = !0,
4481
4484
  onDeleteConversationClick: d,
4482
4485
  onBlockParticipantClick: m,
4483
- onReportParticipantClick: p,
4486
+ onReportParticipantClick: g,
4484
4487
  showBlockParticipant: h = !0,
4485
4488
  showReportParticipant: f = !0,
4486
4489
  composerDisabled: c = !1,
4487
4490
  composerDisabledReason: b,
4488
4491
  showStarButton: v = !1,
4489
4492
  chatbotVotingEnabled: x = !1,
4490
- renderChannelBanner: g,
4493
+ renderChannelBanner: p,
4491
4494
  renderHeaderTitleBadges: _,
4492
4495
  customChannelActions: w,
4493
- renderChannelActions: C,
4496
+ renderChannelActions: k,
4494
4497
  renderMessage: L,
4495
- dmAgentEnabled: E = !1,
4498
+ dmAgentEnabled: S = !1,
4496
4499
  viewerLanguage: R,
4497
4500
  showChannelInfo: O = !0,
4498
4501
  onParticipantNameClick: F,
4499
4502
  composerInput: D
4500
4503
  }) => {
4501
4504
  var N, A, H, q;
4502
- const { channel: S } = oe(), { client: I } = he(), y = V.useMemo(
4505
+ const { channel: C } = oe(), { client: E } = he(), I = V.useMemo(
4503
4506
  () => {
4504
4507
  var Y;
4505
4508
  return Ge(
4506
- (Y = S.state) == null ? void 0 : Y.members,
4507
- I == null ? void 0 : I.userID,
4508
- S.type
4509
+ (Y = C.state) == null ? void 0 : Y.members,
4510
+ E == null ? void 0 : E.userID,
4511
+ C.type
4509
4512
  );
4510
4513
  },
4511
- [(N = S.state) == null ? void 0 : N.members, I == null ? void 0 : I.userID, S.type]
4514
+ [(N = C.state) == null ? void 0 : N.members, E == null ? void 0 : E.userID, C.type]
4512
4515
  ), T = V.useMemo(() => {
4513
4516
  var W;
4514
- const Y = I == null ? void 0 : I.userID;
4515
- return Y ? Object.values(((W = S.state) == null ? void 0 : W.members) || {}).find((Z) => {
4517
+ const Y = E == null ? void 0 : E.userID;
4518
+ return Y ? Object.values(((W = C.state) == null ? void 0 : W.members) || {}).find((Z) => {
4516
4519
  var de;
4517
4520
  return ((de = Z.user) == null ? void 0 : de.id) === Y;
4518
4521
  }) : void 0;
4519
- }, [I == null ? void 0 : I.userID, (A = S.state) == null ? void 0 : A.members]), M = ((H = T == null ? void 0 : T.user) == null ? void 0 : H.is_account) ?? (T == null ? void 0 : T.is_account), P = ((q = y == null ? void 0 : y.user) == null ? void 0 : q.is_account) ?? (y == null ? void 0 : y.is_account), $ = E && M === !1 && P === !0, j = S.state.messages.some(
4522
+ }, [E == null ? void 0 : E.userID, (A = C.state) == null ? void 0 : A.members]), M = ((H = T == null ? void 0 : T.user) == null ? void 0 : H.is_account) ?? (T == null ? void 0 : T.is_account), P = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), $ = S && M === !1 && P === !0, j = C.state.messages.some(
4520
4523
  (Y) => Y.type !== "deleted"
4521
- ), Q = g ? /* @__PURE__ */ s(V.Fragment, { children: g() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
4522
- ha,
4524
+ ), Q = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
4525
+ fa,
4523
4526
  {
4524
4527
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
4525
4528
  onBack: e,
@@ -4534,15 +4537,15 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4534
4537
  showReportParticipant: f,
4535
4538
  onDeleteConversationClick: d,
4536
4539
  onBlockParticipantClick: m,
4537
- onReportParticipantClick: p,
4540
+ onReportParticipantClick: g,
4538
4541
  customChannelActions: w,
4539
- renderChannelActions: C,
4542
+ renderChannelActions: k,
4540
4543
  onParticipantNameClick: F
4541
4544
  }
4542
4545
  ) : null, X = J(
4543
4546
  (Y) => {
4544
4547
  const { message: B } = _e("ChannelView"), W = /* @__PURE__ */ s(
4545
- fi,
4548
+ gi,
4546
4549
  {
4547
4550
  ...Y,
4548
4551
  chatbotVotingEnabled: x,
@@ -4558,14 +4561,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4558
4561
  {
4559
4562
  overrides: {
4560
4563
  Message: X,
4561
- MessageActions: bi,
4564
+ MessageActions: vi,
4562
4565
  UnreadMessagesNotification: () => null,
4563
4566
  UnreadMessagesSeparator: () => null
4564
4567
  },
4565
4568
  children: /* @__PURE__ */ u(Cn, { children: [
4566
4569
  !F && /* @__PURE__ */ u(se, { children: [
4567
4570
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4568
- Oi,
4571
+ $i,
4569
4572
  {
4570
4573
  onBack: e,
4571
4574
  showBackButton: t,
@@ -4579,9 +4582,9 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4579
4582
  showReportParticipant: f,
4580
4583
  onDeleteConversationClick: d,
4581
4584
  onBlockParticipantClick: m,
4582
- onReportParticipantClick: p,
4585
+ onReportParticipantClick: g,
4583
4586
  customChannelActions: w,
4584
- renderChannelActions: C,
4587
+ renderChannelActions: k,
4585
4588
  renderHeaderTitleBadges: _
4586
4589
  }
4587
4590
  ) }, "lt-channel-header"),
@@ -4611,14 +4614,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4611
4614
  },
4612
4615
  "lt-channel-message-list"
4613
4616
  ),
4614
- r ? /* @__PURE__ */ s(V.Fragment, { children: r(S) }, "lt-channel-conversation-footer") : null,
4617
+ r ? /* @__PURE__ */ s(V.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
4615
4618
  /* @__PURE__ */ s(
4616
- yi,
4619
+ ki,
4617
4620
  {
4618
4621
  ...n && {
4619
- renderActions: () => n == null ? void 0 : n(S)
4622
+ renderActions: () => n == null ? void 0 : n(C)
4620
4623
  },
4621
- renderFooter: () => a == null ? void 0 : a(S),
4624
+ renderFooter: () => a == null ? void 0 : a(C),
4622
4625
  disabled: c,
4623
4626
  disabledReason: b,
4624
4627
  composerInput: D
@@ -4639,27 +4642,27 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4639
4642
  onLeaveConversation: o,
4640
4643
  onBlockParticipant: l,
4641
4644
  className: d,
4642
- CustomChannelEmptyState: m = Fi,
4643
- showDeleteConversation: p = !0,
4645
+ CustomChannelEmptyState: m = Pi,
4646
+ showDeleteConversation: g = !0,
4644
4647
  onDeleteConversationClick: h,
4645
4648
  onBlockParticipantClick: f,
4646
4649
  onReportParticipantClick: c,
4647
4650
  showBlockParticipant: b = !0,
4648
4651
  showReportParticipant: v = !0,
4649
4652
  composerDisabled: x = !1,
4650
- composerDisabledReason: g,
4653
+ composerDisabledReason: p,
4651
4654
  dmAgentEnabled: _,
4652
4655
  messageMetadata: w,
4653
- onMessageSent: C,
4656
+ onMessageSent: k,
4654
4657
  showStarButton: L = !1,
4655
- chatbotVotingEnabled: E = !1,
4658
+ chatbotVotingEnabled: S = !1,
4656
4659
  renderChannelBanner: R,
4657
4660
  renderHeaderTitleBadges: O,
4658
4661
  customChannelActions: F,
4659
4662
  renderChannelActions: D,
4660
- renderMessage: S,
4661
- onMessageLinkClick: I,
4662
- sendButton: y,
4663
+ renderMessage: C,
4664
+ onMessageLinkClick: E,
4665
+ sendButton: I,
4663
4666
  attachmentPreviewList: T,
4664
4667
  viewerLanguage: M,
4665
4668
  showChannelInfo: P = !0,
@@ -4682,26 +4685,26 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4682
4685
  ...A,
4683
4686
  ...q && { skip_push: !0 }
4684
4687
  }, W = await e.sendMessage(Y, B);
4685
- return C == null || C(W), W;
4688
+ return k == null || k(W), W;
4686
4689
  },
4687
- [e, _, w, C]
4690
+ [e, _, w, k]
4688
4691
  ), ee = G(null);
4689
4692
  return K(() => {
4690
- if (!I) return;
4693
+ if (!E) return;
4691
4694
  const X = ee.current;
4692
4695
  if (!X) return;
4693
4696
  const N = (A) => {
4694
4697
  const H = A.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4695
4698
  if (!Y) return;
4696
4699
  const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), Z = W ? e.state.messages.find((de) => de.id === W) : void 0;
4697
- I(Y, Z);
4700
+ E(Y, Z);
4698
4701
  };
4699
4702
  return X.addEventListener("click", N), () => X.removeEventListener("click", N);
4700
- }, [I, e]), /* @__PURE__ */ s(
4703
+ }, [E, e]), /* @__PURE__ */ s(
4701
4704
  "div",
4702
4705
  {
4703
4706
  ref: ee,
4704
- className: k(
4707
+ className: y(
4705
4708
  "messaging-channel-view h-full flex flex-col",
4706
4709
  d
4707
4710
  ),
@@ -4709,16 +4712,16 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4709
4712
  yn,
4710
4713
  {
4711
4714
  channel: e,
4712
- MessageSystem: Ri,
4715
+ MessageSystem: Di,
4713
4716
  EmptyStateIndicator: m,
4714
4717
  LoadingIndicator: je,
4715
- DateSeparator: fa,
4716
- TypingIndicator: Li,
4718
+ DateSeparator: ga,
4719
+ TypingIndicator: zi,
4717
4720
  doSendMessageRequest: Q,
4718
- ...y ? { SendButton: y } : {},
4721
+ ...I ? { SendButton: I } : {},
4719
4722
  ...T ? { AttachmentPreviewList: T } : {},
4720
4723
  children: /* @__PURE__ */ s(
4721
- $i,
4724
+ Bi,
4722
4725
  {
4723
4726
  onBack: t,
4724
4727
  showBackButton: n,
@@ -4728,22 +4731,22 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4728
4731
  onLeaveConversation: o,
4729
4732
  onBlockParticipant: l,
4730
4733
  CustomChannelEmptyState: m,
4731
- showDeleteConversation: p,
4734
+ showDeleteConversation: g,
4732
4735
  onDeleteConversationClick: h,
4733
4736
  onBlockParticipantClick: f,
4734
4737
  onReportParticipantClick: c,
4735
4738
  showBlockParticipant: b,
4736
4739
  showReportParticipant: v,
4737
4740
  composerDisabled: x,
4738
- composerDisabledReason: g,
4741
+ composerDisabledReason: p,
4739
4742
  showStarButton: L,
4740
4743
  dmAgentEnabled: _,
4741
- chatbotVotingEnabled: E,
4744
+ chatbotVotingEnabled: S,
4742
4745
  renderChannelBanner: R,
4743
4746
  renderHeaderTitleBadges: O,
4744
4747
  customChannelActions: F,
4745
4748
  renderChannelActions: D,
4746
- renderMessage: S,
4749
+ renderMessage: C,
4747
4750
  viewerLanguage: M,
4748
4751
  showChannelInfo: P,
4749
4752
  onParticipantNameClick: $,
@@ -4772,7 +4775,7 @@ const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4772
4775
  )
4773
4776
  ] }) }));
4774
4777
  ke.displayName = "ErrorState";
4775
- const ul = ({
4778
+ const ml = ({
4776
4779
  capabilities: e = {},
4777
4780
  renderMessageInputActions: t,
4778
4781
  renderConversationFooter: n,
@@ -4783,28 +4786,28 @@ const ul = ({
4783
4786
  CustomChannelEmptyState: l,
4784
4787
  onBlockParticipantClick: d,
4785
4788
  onReportParticipantClick: m,
4786
- dmAgentEnabled: p,
4789
+ dmAgentEnabled: g,
4787
4790
  onMessageSent: h,
4788
4791
  chatbotVotingEnabled: f = !1,
4789
4792
  viewerLanguage: c,
4790
4793
  renderHeaderTitleBadges: b,
4791
4794
  renderChannelBanner: v,
4792
4795
  customChannelActions: x,
4793
- renderChannelActions: g,
4796
+ renderChannelActions: p,
4794
4797
  onParticipantNameClick: _,
4795
4798
  renderMessage: w,
4796
- onMessageLinkClick: C,
4799
+ onMessageLinkClick: k,
4797
4800
  showChannelInfo: L,
4798
- composerInput: E
4801
+ composerInput: S
4799
4802
  }) => {
4800
4803
  const {
4801
4804
  client: R,
4802
4805
  isConnected: O,
4803
4806
  isLoading: F,
4804
4807
  error: D,
4805
- refreshConnection: S,
4806
- service: I,
4807
- debug: y
4808
+ refreshConnection: C,
4809
+ service: E,
4810
+ debug: I
4808
4811
  } = ea(), [T, M] = U(null), [P, $] = U(null), [j, Q] = U(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
4809
4812
  X.current = o;
4810
4813
  const N = G(a);
@@ -4825,7 +4828,7 @@ const ul = ({
4825
4828
  (async () => {
4826
4829
  var De, Le;
4827
4830
  try {
4828
- y && console.log(
4831
+ I && console.log(
4829
4832
  "[MessagingShell] Loading initial conversation with:",
4830
4833
  i
4831
4834
  );
@@ -4838,27 +4841,27 @@ const ul = ({
4838
4841
  { limit: 1 }
4839
4842
  );
4840
4843
  if (ae.length > 0) {
4841
- M(ae[0]), $(null), (De = N.current) == null || De.call(N, ae[0]), y && console.log(
4844
+ M(ae[0]), $(null), (De = N.current) == null || De.call(N, ae[0]), I && console.log(
4842
4845
  "[MessagingShell] Initial conversation loaded:",
4843
4846
  ae[0].id
4844
4847
  );
4845
4848
  return;
4846
4849
  }
4847
4850
  const ue = X.current;
4848
- if (!ue || !I) {
4849
- Z(), $("No conversation found with this account"), y && console.log(
4851
+ if (!ue || !E) {
4852
+ Z(), $("No conversation found with this account"), I && console.log(
4850
4853
  "[MessagingShell] No conversation found for:",
4851
4854
  i
4852
4855
  );
4853
4856
  return;
4854
4857
  }
4855
4858
  try {
4856
- const le = await I.startChannelWithParticipant({
4859
+ const le = await E.startChannelWithParticipant({
4857
4860
  id: ue.id,
4858
4861
  name: ue.name,
4859
4862
  phone: ue.phone
4860
4863
  });
4861
- M(le), $(null), (Le = N.current) == null || Le.call(N, le), y && console.log(
4864
+ M(le), $(null), (Le = N.current) == null || Le.call(N, le), I && console.log(
4862
4865
  "[MessagingShell] Channel created and loaded:",
4863
4866
  le.id
4864
4867
  );
@@ -4875,18 +4878,18 @@ const ul = ({
4875
4878
  ), Z(), H.current || $("Failed to load conversation");
4876
4879
  }
4877
4880
  })();
4878
- }, [i, R, O, I, y]);
4881
+ }, [i, R, O, E, I]);
4879
4882
  const q = G(r);
4880
4883
  q.current = r;
4881
4884
  const Y = J(() => {
4882
4885
  var B;
4883
4886
  M(null), Q(!0), (B = q.current) == null || B.call(q);
4884
4887
  }, []);
4885
- return F ? /* @__PURE__ */ s(je, {}) : D ? /* @__PURE__ */ s(ke, { message: D, onBack: S }) : !O || !R ? /* @__PURE__ */ s(
4888
+ return F ? /* @__PURE__ */ s(je, {}) : D ? /* @__PURE__ */ s(ke, { message: D, onBack: C }) : !O || !R ? /* @__PURE__ */ s(
4886
4889
  ke,
4887
4890
  {
4888
4891
  message: "Not connected to messaging service",
4889
- onBack: S
4892
+ onBack: C
4890
4893
  }
4891
4894
  ) : P ? /* @__PURE__ */ s(ke, { message: P }) : j && !T ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : T ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4892
4895
  Ls,
@@ -4901,23 +4904,23 @@ const ul = ({
4901
4904
  showDeleteConversation: ee,
4902
4905
  onBlockParticipantClick: d,
4903
4906
  onReportParticipantClick: m,
4904
- dmAgentEnabled: p,
4907
+ dmAgentEnabled: g,
4905
4908
  onMessageSent: h,
4906
4909
  chatbotVotingEnabled: f,
4907
4910
  viewerLanguage: c,
4908
4911
  renderHeaderTitleBadges: b,
4909
4912
  customChannelActions: x,
4910
- renderChannelActions: g,
4913
+ renderChannelActions: p,
4911
4914
  onParticipantNameClick: _,
4912
4915
  renderMessage: w,
4913
- onMessageLinkClick: C,
4916
+ onMessageLinkClick: k,
4914
4917
  showChannelInfo: L,
4915
- composerInput: E
4918
+ composerInput: S
4916
4919
  },
4917
4920
  T.id
4918
4921
  ) }) }) : /* @__PURE__ */ s(je, {});
4919
4922
  };
4920
- function Bi(e) {
4923
+ function Ui(e) {
4921
4924
  const t = e.state.pending_messages;
4922
4925
  if (t != null && t.length)
4923
4926
  for (const n of t)
@@ -4931,18 +4934,18 @@ const zs = V.createContext({
4931
4934
  renderMessagePreview: void 0,
4932
4935
  channelPreview: void 0,
4933
4936
  viewerLanguage: void 0
4934
- }), Ui = zs.Provider, ji = () => V.useContext(zs), Vi = (e, t) => {
4937
+ }), ji = zs.Provider, Vi = () => V.useContext(zs), Gi = (e, t) => {
4935
4938
  const n = new Date(
4936
4939
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4937
4940
  ), r = new Date(
4938
4941
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
4939
4942
  ).getTime() - n.getTime();
4940
4943
  return Math.floor(r / (1e3 * 60 * 60 * 24));
4941
- }, Gi = (e) => {
4944
+ }, Hi = (e) => {
4942
4945
  const t = /* @__PURE__ */ new Date();
4943
4946
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
4944
4947
  return "Just now";
4945
- const a = Vi(e, t);
4948
+ const a = Gi(e, t);
4946
4949
  return a === 0 ? e.toLocaleTimeString([], {
4947
4950
  hour: "numeric",
4948
4951
  minute: "2-digit",
@@ -4962,13 +4965,13 @@ const zs = V.createContext({
4962
4965
  channelPreview: o,
4963
4966
  renderMessagePreview: l,
4964
4967
  viewerLanguage: d
4965
- } = ji(), { client: m } = he(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = dt(t);
4968
+ } = Vi(), { client: m } = he(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = dt(t);
4966
4969
  if (o)
4967
4970
  return /* @__PURE__ */ s(
4968
4971
  o,
4969
4972
  {
4970
4973
  ...e,
4971
- active: p,
4974
+ active: g,
4972
4975
  selectedChannel: a,
4973
4976
  onChannelSelect: r,
4974
4977
  viewerLanguage: d
@@ -4976,46 +4979,46 @@ const zs = V.createContext({
4976
4979
  );
4977
4980
  const f = () => {
4978
4981
  t && r(t);
4979
- }, c = (S) => {
4980
- const I = S.key === "Enter" || S.key === " ", y = S.repeat;
4981
- !I || y || (S.preventDefault(), f());
4982
+ }, c = (C) => {
4983
+ const E = C.key === "Enter" || C.key === " ", I = C.repeat;
4984
+ !E || I || (C.preventDefault(), f());
4982
4985
  }, b = Ge(
4983
4986
  (O = t == null ? void 0 : t.state) == null ? void 0 : O.members,
4984
4987
  m == null ? void 0 : m.userID,
4985
4988
  t == null ? void 0 : t.type
4986
- ), v = ut(b == null ? void 0 : b.user), x = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, g = (() => {
4987
- var I;
4988
- const S = (I = t == null ? void 0 : t.state) == null ? void 0 : I.messages;
4989
- if (S != null && S.length) {
4990
- for (let y = S.length - 1; y >= 0; y--)
4991
- if (S[y].type !== "system") return S[y];
4989
+ ), v = ut(b == null ? void 0 : b.user), x = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, p = (() => {
4990
+ var E;
4991
+ const C = (E = t == null ? void 0 : t.state) == null ? void 0 : E.messages;
4992
+ if (C != null && C.length) {
4993
+ for (let I = C.length - 1; I >= 0; I--)
4994
+ if (C[I].type !== "system") return C[I];
4992
4995
  }
4993
4996
  })(), w = (() => {
4994
4997
  var M;
4995
- const S = ds({
4996
- message: g,
4998
+ const C = ds({
4999
+ message: p,
4997
5000
  viewerLanguage: d
4998
- }), { custom_type: I, attachment_content_type: y } = (g == null ? void 0 : g.metadata) || {};
4999
- if (I === "MESSAGE_TIP")
5000
- return S || "Sent a tip";
5001
- if (I === "MESSAGE_PAID")
5002
- return S || "Sent a message";
5003
- if (I === "MESSAGE_ATTACHMENT") {
5004
- if (y === "text")
5001
+ }), { custom_type: E, attachment_content_type: I } = (p == null ? void 0 : p.metadata) || {};
5002
+ if (E === "MESSAGE_TIP")
5003
+ return C || "Sent a tip";
5004
+ if (E === "MESSAGE_PAID")
5005
+ return C || "Sent a message";
5006
+ if (E === "MESSAGE_ATTACHMENT") {
5007
+ if (I === "text")
5005
5008
  return "🔒 Sent a locked message";
5006
- if (y === "media")
5009
+ if (I === "media")
5007
5010
  return "🔒 Sent a locked attachment";
5008
5011
  }
5009
- if (S) return S;
5010
- const T = (M = g == null ? void 0 : g.attachments) == null ? void 0 : M[0];
5012
+ if (C) return C;
5013
+ const T = (M = p == null ? void 0 : p.attachments) == null ? void 0 : M[0];
5011
5014
  return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5012
- })(), C = g != null && g.created_at ? Gi(new Date(g.created_at)) : "", L = g ? $e(g) : !1, E = l ? l(g, w) : `${L ? "✨ " : ""}${w}`, R = n ?? 0;
5015
+ })(), k = p != null && p.created_at ? Hi(new Date(p.created_at)) : "", L = p ? $e(p) : !1, S = l ? l(p, w) : `${L ? "✨ " : ""}${w}`, R = n ?? 0;
5013
5016
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5014
5017
  channelId: t == null ? void 0 : t.id,
5015
- isSelected: p,
5018
+ isSelected: g,
5016
5019
  participantName: v,
5017
5020
  unreadCount: R,
5018
- hasTimestamp: !!C
5021
+ hasTimestamp: !!k
5019
5022
  }), /* @__PURE__ */ s(
5020
5023
  "div",
5021
5024
  {
@@ -5023,11 +5026,11 @@ const zs = V.createContext({
5023
5026
  tabIndex: 0,
5024
5027
  onClick: f,
5025
5028
  onKeyDown: c,
5026
- className: k(
5029
+ className: y(
5027
5030
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
5028
5031
  {
5029
- "bg-black/[0.04]": p,
5030
- "hover:bg-black/[0.02]": !p
5032
+ "bg-black/[0.04]": g,
5033
+ "hover:bg-black/[0.02]": !g
5031
5034
  }
5032
5035
  ),
5033
5036
  "data-dd-privacy": "mask",
@@ -5047,7 +5050,7 @@ const zs = V.createContext({
5047
5050
  /* @__PURE__ */ u(
5048
5051
  "h3",
5049
5052
  {
5050
- className: k(
5053
+ className: y(
5051
5054
  "text-sm font-medium truncate text-[#191918]"
5052
5055
  ),
5053
5056
  children: [
@@ -5056,10 +5059,10 @@ const zs = V.createContext({
5056
5059
  ]
5057
5060
  }
5058
5061
  ),
5059
- C && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: C })
5062
+ k && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: k })
5060
5063
  ] }),
5061
5064
  /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5062
- /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: E }),
5065
+ /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
5063
5066
  R > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: R > 99 ? "99+" : R })
5064
5067
  ] })
5065
5068
  ] })
@@ -5069,34 +5072,34 @@ const zs = V.createContext({
5069
5072
  }
5070
5073
  );
5071
5074
  Fs.displayName = "CustomChannelPreview";
5072
- const Hi = { last_message_at: -1 }, Yi = V.memo(
5075
+ const Yi = { last_message_at: -1 }, qi = V.memo(
5073
5076
  ({
5074
5077
  onChannelSelect: e,
5075
5078
  selectedChannel: t,
5076
5079
  filters: n,
5077
5080
  allowNewMessagesFromUnfilteredChannels: a = !1,
5078
5081
  channelRenderFilterFn: r,
5079
- sort: i = Hi,
5082
+ sort: i = Yi,
5080
5083
  className: o,
5081
5084
  customEmptyStateIndicator: l,
5082
5085
  channelListPaginator: d = In,
5083
5086
  channelPreview: m,
5084
- renderMessagePreview: p,
5087
+ renderMessagePreview: g,
5085
5088
  viewerLanguage: h,
5086
5089
  lockChannelOrder: f,
5087
5090
  onMessageNewHandler: c,
5088
5091
  onMessageNew: b,
5089
5092
  onChannelVisible: v,
5090
5093
  onAddedToChannel: x,
5091
- onChannelUpdated: g
5094
+ onChannelUpdated: p
5092
5095
  }) => {
5093
5096
  const _ = V.useRef(0);
5094
5097
  _.current++;
5095
- const { debug: w = !1 } = ct(), C = V.useCallback(
5096
- (E) => {
5097
- for (const R of E)
5098
- Bi(R);
5099
- return r ? r(E) : E;
5098
+ const { debug: w = !1 } = ct(), k = V.useCallback(
5099
+ (S) => {
5100
+ for (const R of S)
5101
+ Ui(R);
5102
+ return r ? r(S) : S;
5100
5103
  },
5101
5104
  [r]
5102
5105
  );
@@ -5111,7 +5114,7 @@ const Hi = { last_message_at: -1 }, Yi = V.memo(
5111
5114
  onChannelSelect: e,
5112
5115
  debug: w,
5113
5116
  channelPreview: m,
5114
- renderMessagePreview: p,
5117
+ renderMessagePreview: g,
5115
5118
  viewerLanguage: h
5116
5119
  }),
5117
5120
  [
@@ -5119,31 +5122,31 @@ const Hi = { last_message_at: -1 }, Yi = V.memo(
5119
5122
  e,
5120
5123
  w,
5121
5124
  m,
5122
- p,
5125
+ g,
5123
5126
  h
5124
5127
  ]
5125
5128
  );
5126
5129
  return /* @__PURE__ */ s(
5127
5130
  "div",
5128
5131
  {
5129
- className: k(
5132
+ className: y(
5130
5133
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5131
5134
  o
5132
5135
  ),
5133
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Ui, { value: L, children: /* @__PURE__ */ s(
5136
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(ji, { value: L, children: /* @__PURE__ */ s(
5134
5137
  En,
5135
5138
  {
5136
5139
  filters: n,
5137
5140
  sort: i,
5138
5141
  options: { limit: 30 },
5139
5142
  allowNewMessagesFromUnfilteredChannels: a,
5140
- channelRenderFilterFn: C,
5143
+ channelRenderFilterFn: k,
5141
5144
  lockChannelOrder: f,
5142
5145
  onMessageNewHandler: c,
5143
5146
  onMessageNew: b,
5144
5147
  onChannelVisible: v,
5145
5148
  onAddedToChannel: x,
5146
- onChannelUpdated: g,
5149
+ onChannelUpdated: p,
5147
5150
  Paginator: d,
5148
5151
  Preview: Fs,
5149
5152
  EmptyStateIndicator: l
@@ -5154,11 +5157,11 @@ const Hi = { last_message_at: -1 }, Yi = V.memo(
5154
5157
  );
5155
5158
  }
5156
5159
  );
5157
- Yi.displayName = "ChannelList";
5158
- const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, qi = {
5160
+ qi.displayName = "ChannelList";
5161
+ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Wi = {
5159
5162
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5160
5163
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
5161
- }, Wi = ({ variant: e }) => /* @__PURE__ */ s(
5164
+ }, Xi = ({ variant: e }) => /* @__PURE__ */ s(
5162
5165
  "span",
5163
5166
  {
5164
5167
  "aria-hidden": "true",
@@ -5168,12 +5171,12 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5168
5171
  insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
5169
5172
  transform: e === "received" ? "scaleX(-1)" : void 0,
5170
5173
  transformOrigin: "center",
5171
- backgroundColor: qi[e],
5174
+ backgroundColor: Wi[e],
5172
5175
  WebkitMask: ss,
5173
5176
  mask: ss
5174
5177
  }
5175
5178
  }
5176
- ), Xi = {
5179
+ ), Ki = {
5177
5180
  sent: {
5178
5181
  backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5179
5182
  color: "var(--str-chat__own-message-bubble-color, #fff)"
@@ -5192,23 +5195,23 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5192
5195
  "div",
5193
5196
  {
5194
5197
  "data-dd-privacy": "mask",
5195
- className: k(
5198
+ className: y(
5196
5199
  "relative px-4 py-3",
5197
5200
  "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]",
5198
5201
  r
5199
5202
  ),
5200
5203
  style: {
5201
- ...Xi[e],
5204
+ ...Ki[e],
5202
5205
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
5203
5206
  isolation: "isolate"
5204
5207
  },
5205
5208
  children: [
5206
5209
  a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
5207
5210
  /* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
5208
- n && /* @__PURE__ */ s(Wi, { variant: e })
5211
+ n && /* @__PURE__ */ s(Xi, { variant: e })
5209
5212
  ]
5210
5213
  }
5211
- ), Ki = ({
5214
+ ), Zi = ({
5212
5215
  text: e,
5213
5216
  tail: t,
5214
5217
  header: n,
@@ -5222,10 +5225,10 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5222
5225
  header: n,
5223
5226
  className: a
5224
5227
  }
5225
- ), Zi = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Ps, { variant: "sent", text: e, tail: t, className: n }), ml = {
5226
- Sent: Zi,
5227
- Received: Ki
5228
- }, Ji = ({
5228
+ ), Ji = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Ps, { variant: "sent", text: e, tail: t, className: n }), hl = {
5229
+ Sent: Ji,
5230
+ Received: Zi
5231
+ }, Qi = ({
5229
5232
  question: e,
5230
5233
  onClick: t,
5231
5234
  loading: n = !1,
@@ -5237,7 +5240,7 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5237
5240
  onClick: t,
5238
5241
  disabled: n,
5239
5242
  style: { backgroundColor: "#E6E5E3" },
5240
- className: k(
5243
+ className: y(
5241
5244
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
5242
5245
  {
5243
5246
  "hover:brightness-95 active:brightness-90": !n,
@@ -5247,7 +5250,7 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5247
5250
  ),
5248
5251
  children: e
5249
5252
  }
5250
- ), hl = ({
5253
+ ), fl = ({
5251
5254
  faqs: e,
5252
5255
  onFaqClick: t,
5253
5256
  loadingFaqId: n,
@@ -5276,7 +5279,7 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5276
5279
  children: [
5277
5280
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5278
5281
  l.map((d) => /* @__PURE__ */ s(
5279
- Ji,
5282
+ Qi,
5280
5283
  {
5281
5284
  question: d.question,
5282
5285
  onClick: () => t(d.id),
@@ -5292,39 +5295,39 @@ const ss = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5292
5295
  export {
5293
5296
  ms as A,
5294
5297
  ut as B,
5295
- Fi as C,
5296
- dl as D,
5297
- Rr as E,
5298
- hl as F,
5299
- pa as G,
5298
+ Pi as C,
5299
+ ul as D,
5300
+ Dr as E,
5301
+ fl as F,
5302
+ ba as G,
5300
5303
  ea as H,
5301
5304
  Kt as L,
5302
- ol as M,
5305
+ cl as M,
5303
5306
  Ne as a,
5304
5307
  ne as b,
5305
- Yi as c,
5308
+ qi as c,
5306
5309
  Ls as d,
5307
- cl as e,
5308
- Ji as f,
5310
+ dl as e,
5311
+ Qi as f,
5309
5312
  ce as g,
5310
5313
  Fe as h,
5311
5314
  ye as i,
5312
- ml as j,
5313
- jr as k,
5314
- ll as l,
5315
- ul as m,
5316
- Ka as n,
5317
- qa as o,
5318
- Gi as p,
5319
- Xa as q,
5315
+ hl as j,
5316
+ Vr as k,
5317
+ ol as l,
5318
+ ml as m,
5319
+ Za as n,
5320
+ Wa as o,
5321
+ Hi as p,
5322
+ Ka as q,
5320
5323
  we as r,
5321
5324
  ds as s,
5322
5325
  gs as t,
5323
5326
  aa as u,
5324
- Ba as v,
5325
- ba as w,
5327
+ Ua as v,
5328
+ va as w,
5326
5329
  Ge as x,
5327
5330
  ft as y,
5328
5331
  gt as z
5329
5332
  };
5330
- //# sourceMappingURL=index-ZjkTaCN6.js.map
5333
+ //# sourceMappingURL=index-KfZ2Wx3D.js.map