@linktr.ee/messaging-react 3.12.1 → 3.12.2-rc-1784002380

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