@linktr.ee/messaging-react 4.4.1-rc-1787614546 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,30 +2,30 @@ import { a as e, i as t, n, o as r, r as i, s as a } from "./AttachmentCard-BqwW
2
2
  import o, { Suspense as s, createContext as c, useCallback as l, useContext as u, useEffect as d, useId as f, useMemo as p, useRef as m, useState as h } from "react";
3
3
  import { StreamChatService as g } from "@linktr.ee/messaging-core";
4
4
  import { LinkPreviewsManager as _, StreamChat as v } from "stream-chat";
5
- import { AIStates as y, Attachment as b, AttachmentPreviewList as x, Channel as S, ChannelList as C, Chat as w, DateSeparator as T, EditMessageModal as E, InfiniteScroll as D, MessageBlocked as O, MessageBounceModal as k, MessageBouncePrompt as A, MessageDeleted as j, MessageErrorIcon as M, MessageInput as N, MessageIsThreadReplyInChannelButtonIndicator as P, MessageList as F, MessageRepliesCountButton as I, MessageStatus as L, MessageText as R, MessageTimestamp as z, Poll as ee, QuotedMessagePreview as te, ReminderNotification as ne, StreamedMessageText as re, TextareaComposer as ie, Window as B, WithComponents as ae, areMessageUIPropsEqual as oe, isDateSeparatorMessage as se, isMessageBlocked as ce, isMessageBounced as le, messageHasAttachments as ue, messageHasReactions as de, useAIState as fe, useActiveAudioPlayer as pe, useChannelStateContext as me, useChatContext as he, useComponentContext as ge, useMessageComposer as _e, useMessageComposerHasSendableData as ve, useMessageContext as V, useMessageInputContext as ye, useMessageReminder as be, useStateStore as xe, useTypingContext as Se } from "stream-chat-react";
6
- import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
7
- import { MESSAGE_CUSTOM_TYPE as G, OFFICIAL_SENDER_USER_ID as K, isAgeSafetySystemType as Ce, isDmAgentSystemType as q, isOfficialChannel as we, resolveRichCardImagePresentation as Te, selectEnabledFaqs as Ee } from "@linktr.ee/messaging-taxonomy";
8
- import J from "classnames";
9
- import { ArrowLeftIcon as De, ArrowUpIcon as Oe, CaretLeftIcon as ke, CaretRightIcon as Ae, ChecksIcon as je, CircleNotchIcon as Me, CurrencyDollarIcon as Y, DotsThreeIcon as X, DownloadSimpleIcon as Ne, FlagIcon as Pe, GiftIcon as Fe, MegaphoneIcon as Ie, PencilSimpleIcon as Le, PlayIcon as Re, ProhibitIcon as ze, ProhibitInsetIcon as Be, SignOutIcon as Ve, SparkleIcon as He, SpinnerGapIcon as Ue, StarIcon as We, TrashSimpleIcon as Ge, VideoCameraIcon as Ke, WarningCircleIcon as qe, XIcon as Je } from "@phosphor-icons/react";
10
- import { DefaultDropdownActionButton as Ye, MessageActions as Xe } from "stream-chat-react/experimental";
5
+ import { AIStates as y, Attachment as b, AttachmentPreviewList as x, Channel as S, ChannelList as C, Chat as w, DateSeparator as T, EditMessageModal as E, InfiniteScroll as D, MessageBlocked as O, MessageBounceModal as k, MessageBouncePrompt as A, MessageDeleted as j, MessageErrorIcon as M, MessageInput as N, MessageIsThreadReplyInChannelButtonIndicator as P, MessageList as F, MessageRepliesCountButton as I, MessageStatus as L, MessageText as R, MessageTimestamp as z, Poll as ee, QuotedMessagePreview as te, ReminderNotification as ne, StreamedMessageText as re, TextareaComposer as ie, Window as B, WithComponents as ae, areMessageUIPropsEqual as oe, isDateSeparatorMessage as se, isMessageBlocked as ce, isMessageBounced as le, messageHasAttachments as ue, messageHasReactions as de, useAIState as fe, useActiveAudioPlayer as pe, useChannelStateContext as V, useChatContext as me, useComponentContext as he, useMessageComposer as ge, useMessageComposerHasSendableData as _e, useMessageContext as H, useMessageInputContext as ve, useMessageReminder as ye, useStateStore as be, useTypingContext as xe } from "stream-chat-react";
6
+ import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
7
+ import { MESSAGE_CUSTOM_TYPE as K, OFFICIAL_SENDER_USER_ID as q, isAgeSafetySystemType as Se, isDmAgentSystemType as Ce, isOfficialChannel as we, resolveRichCardImagePresentation as Te, selectEnabledFaqs as J } from "@linktr.ee/messaging-taxonomy";
8
+ import Y from "classnames";
9
+ import { ArrowLeftIcon as Ee, ArrowUpIcon as De, CaretLeftIcon as Oe, CaretRightIcon as ke, ChecksIcon as Ae, CircleNotchIcon as je, CurrencyDollarIcon as X, DotsThreeIcon as Z, DownloadSimpleIcon as Me, FlagIcon as Ne, GiftIcon as Pe, MegaphoneIcon as Fe, PencilSimpleIcon as Ie, PlayIcon as Le, ProhibitIcon as Re, ProhibitInsetIcon as ze, SignOutIcon as Be, SparkleIcon as Ve, SpinnerGapIcon as He, StarIcon as Ue, TrashSimpleIcon as We, VideoCameraIcon as Ge, WarningCircleIcon as Ke, XIcon as qe } from "@phosphor-icons/react";
10
+ import { DefaultDropdownActionButton as Je, MessageActions as Ye } from "stream-chat-react/experimental";
11
11
  //#region src/logging/index.tsx
12
- var Ze = {
12
+ var Xe = {
13
13
  debug: (e, ...t) => console.log(e, ...t),
14
14
  info: (e, ...t) => console.log(e, ...t),
15
15
  warn: (e, ...t) => console.warn(e, ...t),
16
16
  error: (e, ...t) => console.error(e, ...t)
17
- }, Qe = (e) => ({
18
- debug: e?.debug ?? Ze.debug,
19
- info: e?.info ?? Ze.info,
20
- warn: e?.warn ?? Ze.warn,
21
- error: e?.error ?? Ze.error
22
- }), $e = c(Ze), et = ({ logger: e, children: t }) => {
23
- let n = p(() => Qe(e), [e]);
24
- return /* @__PURE__ */ U($e.Provider, {
17
+ }, Ze = (e) => ({
18
+ debug: e?.debug ?? Xe.debug,
19
+ info: e?.info ?? Xe.info,
20
+ warn: e?.warn ?? Xe.warn,
21
+ error: e?.error ?? Xe.error
22
+ }), Qe = c(Xe), $e = ({ logger: e, children: t }) => {
23
+ let n = p(() => Ze(e), [e]);
24
+ return /* @__PURE__ */ W(Qe.Provider, {
25
25
  value: n,
26
26
  children: t
27
27
  });
28
- }, tt = () => u($e), nt = c({
28
+ }, et = () => u(Qe), tt = c({
29
29
  service: null,
30
30
  client: null,
31
31
  isConnected: !1,
@@ -34,7 +34,7 @@ var Ze = {
34
34
  capabilities: {},
35
35
  refreshConnection: async () => {},
36
36
  debug: !1
37
- }), rt = () => u(nt), it = ({ children: e, user: t, serviceConfig: n, apiKey: r, capabilities: i = {}, debug: a = !1, client: s, logger: c }) => {
37
+ }), nt = () => u(tt), rt = ({ children: e, user: t, serviceConfig: n, apiKey: r, capabilities: i = {}, debug: a = !1, client: s, logger: c }) => {
38
38
  let u = l((e, ...t) => {
39
39
  a && console.log(`🔥 [MessagingProvider] ${e}`, ...t);
40
40
  }, [a]);
@@ -102,7 +102,7 @@ var Ze = {
102
102
  apiKey: r,
103
103
  debug: A.current,
104
104
  client: F,
105
- ...t.logger || !j.current ? {} : { logger: Qe(j.current) }
105
+ ...t.logger || !j.current ? {} : { logger: Ze(j.current) }
106
106
  });
107
107
  O.current = n, p(n), u("✅ SERVICE SET", {
108
108
  renderCount: e,
@@ -237,18 +237,18 @@ var Ze = {
237
237
  renderCount: N.current,
238
238
  willRenderChat: !!F,
239
239
  contextValueReady: !!R
240
- }), /* @__PURE__ */ U(et, {
240
+ }), /* @__PURE__ */ W($e, {
241
241
  logger: c,
242
- children: /* @__PURE__ */ U(nt.Provider, {
242
+ children: /* @__PURE__ */ W(tt.Provider, {
243
243
  value: R,
244
- children: F ? /* @__PURE__ */ U(w, {
244
+ children: F ? /* @__PURE__ */ W(w, {
245
245
  client: F,
246
246
  customClasses: { channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]" },
247
247
  children: e
248
248
  }) : e
249
249
  })
250
250
  });
251
- }, at = () => rt(), ot = (e) => {
251
+ }, it = () => nt(), at = (e) => {
252
252
  let [t, n] = h(!!e?.state?.membership?.pinned_at);
253
253
  return d(() => {
254
254
  if (!e) {
@@ -266,30 +266,30 @@ var Ze = {
266
266
  };
267
267
  //#endregion
268
268
  //#region src/utils/resolveConversationParticipant.ts
269
- function st(e, t, n) {
269
+ function ot(e, t, n) {
270
270
  let r = Object.values(e || {});
271
271
  if (we(n)) {
272
- let e = r.find((e) => e.user?.id === K);
272
+ let e = r.find((e) => e.user?.id === q);
273
273
  if (e) return e;
274
274
  }
275
275
  return r.find((e) => e.user?.id && e.user.id !== t);
276
276
  }
277
277
  //#endregion
278
278
  //#region src/utils/resolveParticipantDisplayName.ts
279
- var ct = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
280
- function lt(e) {
281
- return ct.test(e.trim());
279
+ var st = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
280
+ function ct(e) {
281
+ return st.test(e.trim());
282
282
  }
283
- function ut(e, t) {
283
+ function lt(e, t) {
284
284
  let n = e?.trim();
285
- return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !lt(n);
285
+ return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !ct(n);
286
286
  }
287
- function dt(e) {
288
- return ut(e?.name, e?.id) ? e.name.trim() : ut(e?.username, e?.id) ? e.username.trim() : "Unknown member";
287
+ function ut(e) {
288
+ return lt(e?.name, e?.id) ? e.name.trim() : lt(e?.username, e?.id) ? e.username.trim() : "Unknown member";
289
289
  }
290
290
  //#endregion
291
291
  //#region src/components/Avatar/getAvatarEmoji.ts
292
- var ft = [
292
+ var dt = [
293
293
  {
294
294
  emoji: "🍎",
295
295
  bgColor: "#FFD1DD"
@@ -343,7 +343,7 @@ var ft = [
343
343
  bgColor: "#D9F7E1"
344
344
  }
345
345
  ];
346
- function pt(e) {
346
+ function ft(e) {
347
347
  let t = 0;
348
348
  for (let n = 0; n < e.length; n++) {
349
349
  let r = e.charCodeAt(n);
@@ -351,28 +351,28 @@ function pt(e) {
351
351
  }
352
352
  return Math.abs(t);
353
353
  }
354
+ function pt(e) {
355
+ return dt[ft(e) % dt.length];
356
+ }
354
357
  function mt(e) {
355
- return ft[pt(e) % ft.length];
358
+ return pt(e).emoji;
356
359
  }
357
360
  function ht(e) {
358
- return mt(e).emoji;
359
- }
360
- function gt(e) {
361
- return mt(e).bgColor;
361
+ return pt(e).bgColor;
362
362
  }
363
363
  //#endregion
364
364
  //#region src/components/Avatar/index.tsx
365
- var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape: a = "squircle", dmAgentEnabled: o = !1 }) => {
366
- let s = ht(e), c = gt(e), l = n < 32 ? Math.round(n * .45) : n < 56 ? 14 : n < 120 ? 18 : 36, u = n >= 40 ? 2 : 1, d = a === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ U("div", {
365
+ var gt = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape: a = "squircle", dmAgentEnabled: o = !1 }) => {
366
+ let s = mt(e), c = ht(e), l = n < 32 ? Math.round(n * .45) : n < 56 ? 14 : n < 120 ? 18 : 36, u = n >= 40 ? 2 : 1, d = a === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ W("div", {
367
367
  className: "h-full w-full overflow-hidden",
368
368
  style: d,
369
- children: t ? /* @__PURE__ */ U("img", {
369
+ children: t ? /* @__PURE__ */ W("img", {
370
370
  src: t,
371
371
  alt: "",
372
372
  className: "h-full w-full object-cover"
373
- }) : /* @__PURE__ */ U("div", {
373
+ }) : /* @__PURE__ */ W("div", {
374
374
  "aria-hidden": "true",
375
- className: J("avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"),
375
+ className: Y("avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"),
376
376
  style: {
377
377
  fontSize: l,
378
378
  lineHeight: 1
@@ -380,8 +380,8 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
380
380
  children: s
381
381
  })
382
382
  });
383
- return /* @__PURE__ */ W("div", {
384
- className: J("relative flex-shrink-0", r),
383
+ return /* @__PURE__ */ G("div", {
384
+ className: Y("relative flex-shrink-0", r),
385
385
  style: {
386
386
  "--str-chat__avatar-size": `${n}px`,
387
387
  width: `${n}px`,
@@ -389,16 +389,16 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
389
389
  backgroundColor: t ? void 0 : c,
390
390
  ...d
391
391
  },
392
- children: [i && /* @__PURE__ */ U("div", {
392
+ children: [i && /* @__PURE__ */ W("div", {
393
393
  "aria-hidden": "true",
394
394
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
395
- children: /* @__PURE__ */ U(We, {
395
+ children: /* @__PURE__ */ W(Ue, {
396
396
  className: "size-3 text-yellow-600",
397
397
  weight: "duotone"
398
398
  })
399
- }), /* @__PURE__ */ U("div", {
399
+ }), /* @__PURE__ */ W("div", {
400
400
  "data-testid": "avatar-ring",
401
- className: J("h-full w-full", "bg-transparent"),
401
+ className: Y("h-full w-full", "bg-transparent"),
402
402
  style: {
403
403
  ...d,
404
404
  ...o && {
@@ -411,8 +411,8 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
411
411
  children: f
412
412
  })]
413
413
  });
414
- }, vt = "https://linktr.ee/s/about/trust-center/report", yt = ({ channel: e, participant: t, showBlockParticipant: n = !0, enabled: r = !0, onLeaveConversation: i, onBlockParticipant: a, onDeleteConversationClick: o, onBlockParticipantClick: s, onReportParticipantClick: c, onActionComplete: l, logLabel: u = "useChannelModerationActions" }) => {
415
- let { service: f, debug: p } = rt(), m = t?.user?.id, g = !!(r && n && f && m), [_, v] = h(!1), [y, b] = h(null), [x, S] = h(!1), [C, w] = h(!1), T = g && (y?.participantId !== m || y?.service !== f);
414
+ }, _t = "https://linktr.ee/s/about/trust-center/report", vt = ({ channel: e, participant: t, showBlockParticipant: n = !0, enabled: r = !0, onLeaveConversation: i, onBlockParticipant: a, onDeleteConversationClick: o, onBlockParticipantClick: s, onReportParticipantClick: c, onActionComplete: l, logLabel: u = "useChannelModerationActions" }) => {
415
+ let { service: f, debug: p } = nt(), m = t?.user?.id, g = !!(r && n && f && m), [_, v] = h(!1), [y, b] = h(null), [x, S] = h(!1), [C, w] = h(!1), T = g && (y?.participantId !== m || y?.service !== f);
416
416
  return d(() => {
417
417
  if (!g || !f || !m) {
418
418
  v(!1), b(null);
@@ -483,16 +483,16 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
483
483
  }
484
484
  },
485
485
  handleReportUser: () => {
486
- c?.(), l?.(), window.open(vt, "_blank", "noopener,noreferrer");
486
+ c?.(), l?.(), window.open(_t, "_blank", "noopener,noreferrer");
487
487
  }
488
488
  };
489
- }, bt = ({ variant: e = "default", className: t, children: n, ...r }) => /* @__PURE__ */ U("button", {
489
+ }, yt = ({ variant: e = "default", className: t, children: n, ...r }) => /* @__PURE__ */ W("button", {
490
490
  type: "button",
491
- className: J("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", e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand", t),
491
+ className: Y("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", e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand", t),
492
492
  ...r,
493
493
  children: n
494
- }), xt = ({ channel: e, participant: t, showDeleteConversation: n = !0, showBlockParticipant: r = !0, showReportParticipant: i = !0, onLeaveConversation: a, onBlockParticipant: o, onDeleteConversationClick: s, onBlockParticipantClick: c, onReportParticipantClick: u, customChannelActions: p, triggerClassName: g }) => {
495
- let [_, v] = h(!1), y = m(null), b = f(), { isParticipantBlocked: x, isCheckingBlockedStatus: S, isLeaving: C, isUpdatingBlockStatus: w, handleLeaveConversation: T, handleBlockUser: E, handleUnblockUser: D, handleReportUser: O } = yt({
494
+ }), bt = ({ channel: e, participant: t, showDeleteConversation: n = !0, showBlockParticipant: r = !0, showReportParticipant: i = !0, onLeaveConversation: a, onBlockParticipant: o, onDeleteConversationClick: s, onBlockParticipantClick: c, onReportParticipantClick: u, customChannelActions: p, triggerClassName: g }) => {
495
+ let [_, v] = h(!1), y = m(null), b = f(), { isParticipantBlocked: x, isCheckingBlockedStatus: S, isLeaving: C, isUpdatingBlockStatus: w, handleLeaveConversation: T, handleBlockUser: E, handleUnblockUser: D, handleReportUser: O } = vt({
496
496
  channel: e,
497
497
  participant: t,
498
498
  showBlockParticipant: r,
@@ -515,106 +515,106 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
515
515
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
516
516
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
517
517
  };
518
- }, [_]), !t || !(n || r || i || p) ? null : /* @__PURE__ */ W("div", {
518
+ }, [_]), !t || !(n || r || i || p) ? null : /* @__PURE__ */ G("div", {
519
519
  ref: y,
520
520
  className: "relative",
521
- children: [/* @__PURE__ */ W("button", {
521
+ children: [/* @__PURE__ */ G("button", {
522
522
  className: g,
523
523
  type: "button",
524
524
  "aria-haspopup": "true",
525
525
  "aria-expanded": _,
526
526
  "aria-controls": _ ? b : void 0,
527
527
  onClick: () => v((e) => !e),
528
- children: [/* @__PURE__ */ U(X, { className: "size-5 text-black/90" }), /* @__PURE__ */ U("span", {
528
+ children: [/* @__PURE__ */ W(Z, { className: "size-5 text-black/90" }), /* @__PURE__ */ W("span", {
529
529
  className: "sr-only",
530
530
  children: "More options"
531
531
  })]
532
- }), _ && /* @__PURE__ */ U("div", {
532
+ }), _ && /* @__PURE__ */ W("div", {
533
533
  id: b,
534
534
  "aria-label": "Conversation options",
535
- className: J("absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden", "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"),
536
- children: /* @__PURE__ */ W("ul", {
535
+ className: Y("absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden", "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"),
536
+ children: /* @__PURE__ */ G("ul", {
537
537
  className: "flex flex-col gap-1",
538
538
  children: [
539
- n && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ W(bt, {
539
+ n && /* @__PURE__ */ W("li", { children: /* @__PURE__ */ G(yt, {
540
540
  onClick: T,
541
541
  disabled: C,
542
542
  "aria-busy": C,
543
- children: [C ? /* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Ve, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Delete Conversation" })]
543
+ children: [C ? /* @__PURE__ */ W(He, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ W(Be, { className: "h-5 w-5" }), /* @__PURE__ */ W("span", { children: "Delete Conversation" })]
544
544
  }) }),
545
- r && /* @__PURE__ */ U("li", { children: S ? /* @__PURE__ */ W(bt, {
545
+ r && /* @__PURE__ */ W("li", { children: S ? /* @__PURE__ */ G(yt, {
546
546
  disabled: !0,
547
547
  "aria-busy": !0,
548
- children: [/* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ U("span", { children: "Block" })]
549
- }) : x ? /* @__PURE__ */ W(bt, {
548
+ children: [/* @__PURE__ */ W(He, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ W("span", { children: "Block" })]
549
+ }) : x ? /* @__PURE__ */ G(yt, {
550
550
  onClick: D,
551
551
  disabled: w,
552
552
  "aria-busy": w,
553
- children: [w ? /* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Be, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Unblock" })]
554
- }) : /* @__PURE__ */ W(bt, {
553
+ children: [w ? /* @__PURE__ */ W(He, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ W(ze, { className: "h-5 w-5" }), /* @__PURE__ */ W("span", { children: "Unblock" })]
554
+ }) : /* @__PURE__ */ G(yt, {
555
555
  onClick: E,
556
556
  disabled: w,
557
557
  "aria-busy": w,
558
- children: [w ? /* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Be, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Block" })]
558
+ children: [w ? /* @__PURE__ */ W(He, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ W(ze, { className: "h-5 w-5" }), /* @__PURE__ */ W("span", { children: "Block" })]
559
559
  }) }),
560
- i && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ W(bt, {
560
+ i && /* @__PURE__ */ W("li", { children: /* @__PURE__ */ G(yt, {
561
561
  variant: "danger",
562
562
  onClick: O,
563
- children: [/* @__PURE__ */ U(Pe, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Report" })]
563
+ children: [/* @__PURE__ */ W(Ne, { className: "h-5 w-5" }), /* @__PURE__ */ W("span", { children: "Report" })]
564
564
  }) }),
565
565
  p
566
566
  ]
567
567
  })
568
568
  })]
569
569
  });
570
- }, St = "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", Ct = "CUSTOMER_PAID", wt = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ct, Tt = ({ className: e, onBack: t, showBackButton: n, showStarButton: r = !1, onLeaveConversation: i, onBlockParticipant: a, showDeleteConversation: s = !0, showBlockParticipant: c = !0, showReportParticipant: l = !0, onDeleteConversationClick: u, onBlockParticipantClick: d, onReportParticipantClick: f, customChannelActions: p, renderChannelActions: m, showChannelInfo: h = !0, onParticipantNameClick: g }) => {
571
- let { channel: _ } = me(), { client: v } = he(), y = o.useMemo(() => st(_.state?.members, v?.userID, _.type), [
570
+ }, xt = "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", St = "CUSTOMER_PAID", Ct = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === St, wt = ({ className: e, onBack: t, showBackButton: n, showStarButton: r = !1, onLeaveConversation: i, onBlockParticipant: a, showDeleteConversation: s = !0, showBlockParticipant: c = !0, showReportParticipant: l = !0, onDeleteConversationClick: u, onBlockParticipantClick: d, onReportParticipantClick: f, customChannelActions: p, renderChannelActions: m, showChannelInfo: h = !0, onParticipantNameClick: g }) => {
571
+ let { channel: _ } = V(), { client: v } = me(), y = o.useMemo(() => ot(_.state?.members, v?.userID, _.type), [
572
572
  _.state?.members,
573
573
  v?.userID,
574
574
  _.type
575
- ]), b = dt(y?.user), x = y?.user?.image, S = ot(_), C = wt(_.data?.customer_tag) && y?.is_follower === !0, w = r && S, T = C || w || !!g, E = async () => {
575
+ ]), b = ut(y?.user), x = y?.user?.image, S = at(_), C = Ct(_.data?.customer_tag) && y?.is_follower === !0, w = r && S, T = C || w || !!g, E = async () => {
576
576
  try {
577
577
  S ? await _.unpin() : await _.pin();
578
578
  } catch (e) {
579
579
  console.error("[ChannelHeaderRedesign] Failed to update pinned status:", e);
580
580
  }
581
- }, D = /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(_t, {
581
+ }, D = /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(gt, {
582
582
  id: y?.user?.id || _.id || "unknown",
583
583
  name: b,
584
584
  image: x,
585
585
  shape: "circle",
586
586
  size: 48,
587
587
  className: "-mb-2"
588
- }), /* @__PURE__ */ U("span", {
589
- className: J("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 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", T ? "pl-3 pr-2" : "px-3"),
590
- children: /* @__PURE__ */ W("span", {
588
+ }), /* @__PURE__ */ W("span", {
589
+ className: Y("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 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", T ? "pl-3 pr-2" : "px-3"),
590
+ children: /* @__PURE__ */ G("span", {
591
591
  className: "flex max-w-full items-center justify-center",
592
- children: [/* @__PURE__ */ U("span", {
592
+ children: [/* @__PURE__ */ W("span", {
593
593
  className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90",
594
594
  children: b
595
- }), T && /* @__PURE__ */ W("span", {
595
+ }), T && /* @__PURE__ */ G("span", {
596
596
  className: "ml-2 flex gap-1",
597
597
  children: [
598
- C && /* @__PURE__ */ U("span", {
598
+ C && /* @__PURE__ */ W("span", {
599
599
  "aria-label": "Paid customer",
600
600
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
601
- children: /* @__PURE__ */ U(Y, {
601
+ children: /* @__PURE__ */ W(X, {
602
602
  className: "size-2.5",
603
603
  weight: "bold"
604
604
  })
605
605
  }),
606
- w && /* @__PURE__ */ U("span", {
606
+ w && /* @__PURE__ */ W("span", {
607
607
  className: "messaging-header-star-badge flex overflow-hidden",
608
- children: /* @__PURE__ */ U("span", {
608
+ children: /* @__PURE__ */ W("span", {
609
609
  "aria-label": "Starred conversation",
610
610
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
611
- children: /* @__PURE__ */ U(We, {
611
+ children: /* @__PURE__ */ W(Ue, {
612
612
  className: "size-2.5",
613
613
  weight: "fill"
614
614
  })
615
615
  })
616
616
  }),
617
- g && /* @__PURE__ */ U(Ae, {
617
+ g && /* @__PURE__ */ W(ke, {
618
618
  "aria-hidden": "true",
619
619
  className: "size-4 shrink-0 text-black/65",
620
620
  weight: "bold"
@@ -623,51 +623,51 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
623
623
  })]
624
624
  })
625
625
  })] });
626
- return /* @__PURE__ */ U("div", {
627
- className: J("@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]", e),
628
- children: /* @__PURE__ */ W("div", {
626
+ return /* @__PURE__ */ W("div", {
627
+ className: Y("@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]", e),
628
+ children: /* @__PURE__ */ G("div", {
629
629
  className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6",
630
630
  children: [
631
- /* @__PURE__ */ U("div", {
631
+ /* @__PURE__ */ W("div", {
632
632
  className: "flex items-start",
633
- children: n && /* @__PURE__ */ U("button", {
634
- className: J(St, "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"),
633
+ children: n && /* @__PURE__ */ W("button", {
634
+ className: Y(xt, "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"),
635
635
  onClick: t || (() => {}),
636
636
  type: "button",
637
637
  "aria-label": "Back to conversations",
638
- children: /* @__PURE__ */ U(De, { className: "size-5 text-black/90" })
638
+ children: /* @__PURE__ */ W(Ee, { className: "size-5 text-black/90" })
639
639
  })
640
640
  }),
641
- /* @__PURE__ */ U("div", {
641
+ /* @__PURE__ */ W("div", {
642
642
  className: "flex min-w-0 justify-center",
643
643
  "data-dd-privacy": "mask",
644
- children: g ? /* @__PURE__ */ U("button", {
644
+ children: g ? /* @__PURE__ */ W("button", {
645
645
  type: "button",
646
646
  onClick: g,
647
647
  "aria-label": `View details for ${b}`,
648
648
  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",
649
649
  children: D
650
- }) : /* @__PURE__ */ U("div", {
650
+ }) : /* @__PURE__ */ W("div", {
651
651
  className: "flex min-w-0 max-w-full flex-col items-center px-2",
652
652
  children: D
653
653
  })
654
654
  }),
655
- /* @__PURE__ */ W("div", {
655
+ /* @__PURE__ */ G("div", {
656
656
  className: "flex items-start justify-end gap-2",
657
- children: [r && /* @__PURE__ */ U("button", {
658
- className: St,
657
+ children: [r && /* @__PURE__ */ W("button", {
658
+ className: xt,
659
659
  onClick: E,
660
660
  type: "button",
661
661
  "aria-pressed": S,
662
662
  "aria-label": S ? "Unstar conversation" : "Star conversation",
663
- children: /* @__PURE__ */ U(We, {
664
- className: J("size-5", {
663
+ children: /* @__PURE__ */ W(Ue, {
664
+ className: Y("size-5", {
665
665
  "text-[#FFD60A]": S,
666
666
  "text-black/90": !S
667
667
  }),
668
668
  weight: S ? "fill" : "regular"
669
669
  })
670
- }), h && (m === void 0 ? /* @__PURE__ */ U(xt, {
670
+ }), h && (m === void 0 ? /* @__PURE__ */ W(bt, {
671
671
  channel: _,
672
672
  participant: y,
673
673
  showDeleteConversation: s,
@@ -679,85 +679,85 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
679
679
  onBlockParticipantClick: d,
680
680
  onReportParticipantClick: f,
681
681
  customChannelActions: p,
682
- triggerClassName: St
682
+ triggerClassName: xt
683
683
  }) : m)]
684
684
  })
685
685
  ]
686
686
  })
687
687
  });
688
- }, Et = (e) => /* @__PURE__ */ U(T, {
688
+ }, Tt = (e) => /* @__PURE__ */ W(T, {
689
689
  ...e,
690
690
  position: "center"
691
691
  });
692
692
  //#endregion
693
693
  //#region src/utils/getMessageDisplayText.ts
694
- function Dt(e) {
694
+ function Et(e) {
695
695
  return e?.trim().toLowerCase().split(/[-_]/)[0] || void 0;
696
696
  }
697
- function Ot({ message: e, viewerLanguage: t }) {
698
- let n = e?.text, r = Dt(t);
697
+ function Dt({ message: e, viewerLanguage: t }) {
698
+ let n = e?.text, r = Et(t);
699
699
  return r ? e?.i18n?.[`${r}_text`] ?? n : n;
700
700
  }
701
701
  //#endregion
702
702
  //#region src/components/MediaMessage/index.tsx
703
- function kt(e) {
703
+ function Ot(e) {
704
704
  return e.type === "link" || !!e.og_scrape_url?.trim() && !e.asset_url;
705
705
  }
706
706
  //#endregion
707
707
  //#region src/components/CustomMessage/context.tsx
708
- var At = { LockedAttachment: { isUnlocking: () => !1 } }, jt = c({}), Mt = jt.Provider;
709
- function Nt(e) {
710
- return u(jt)[e] ?? At[e];
708
+ var kt = { LockedAttachment: { isUnlocking: () => !1 } }, At = c({}), jt = At.Provider;
709
+ function Mt(e) {
710
+ return u(At)[e] ?? kt[e];
711
711
  }
712
712
  //#endregion
713
713
  //#region src/components/CustomMessage/LockedAttachment/index.tsx
714
- var Pt = o.lazy(() => import("./Card-C7uLQbYz.js")), Ft = o.lazy(() => import("./Card-f51K6V7Y.js")), It = () => /* @__PURE__ */ U("div", {
714
+ var Nt = o.lazy(() => import("./Card-C7uLQbYz.js")), Pt = o.lazy(() => import("./Card-f51K6V7Y.js")), Ft = () => /* @__PURE__ */ W("div", {
715
715
  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)]",
716
716
  "aria-hidden": !0
717
- }), Lt = (e) => /* @__PURE__ */ U(s, {
718
- fallback: /* @__PURE__ */ U(It, {}),
719
- children: e.contentType === "text" ? /* @__PURE__ */ U(Pt, { ...e }) : /* @__PURE__ */ U(Ft, { ...e })
720
- }), Rt = ({ size: e = 15 }) => /* @__PURE__ */ U("svg", {
717
+ }), It = (e) => /* @__PURE__ */ W(s, {
718
+ fallback: /* @__PURE__ */ W(Ft, {}),
719
+ children: e.contentType === "text" ? /* @__PURE__ */ W(Nt, { ...e }) : /* @__PURE__ */ W(Pt, { ...e })
720
+ }), Lt = ({ size: e = 15 }) => /* @__PURE__ */ W("svg", {
721
721
  width: e,
722
722
  height: e,
723
723
  viewBox: "0 0 15 15",
724
724
  fill: "none",
725
725
  "aria-hidden": "true",
726
- children: /* @__PURE__ */ U("path", {
726
+ children: /* @__PURE__ */ W("path", {
727
727
  d: "M12.003 9a.985.985 0 0 1-.652.934l-3.223 1.191-1.188 3.226a.995.995 0 0 1-1.867 0l-1.195-3.226L.65 9.937a.995.995 0 0 1 0-1.867l3.227-1.195 1.187-3.226a.995.995 0 0 1 1.868 0l1.195 3.226 3.226 1.187a.99.99 0 0 1 .649.938m3-5.83a.52.52 0 0 1-.344.492l-1.702.63-.627 1.703a.525.525 0 0 1-.986 0l-.63-1.704-1.704-.627a.525.525 0 0 1 0-.986l1.703-.63.627-1.704a.526.526 0 0 1 .986 0l.631 1.703 1.704.627a.52.52 0 0 1 .342.495",
728
728
  fill: "currentColor",
729
729
  fillOpacity: .55
730
730
  })
731
- }), zt = (e) => e.metadata?.custom_type === G.PAID, Bt = (e) => e.metadata?.custom_type === G.CHATBOT, Vt = (e) => e.metadata?.custom_type === G.ATTACHMENT, Ht = (e) => Vt(e) && e.metadata?.attachment_content_type === "text", Ut = (e) => Vt(e) && e.metadata?.attachment_content_type !== "text", Wt = (e) => zt(e) && !!e.metadata?.amount_text, Gt = ({ message: e, isMyMessage: t = !1, hasAttachment: n = !1 }) => {
732
- let r = zt(e), i = Bt(e);
731
+ }), Rt = (e) => e.metadata?.custom_type === K.PAID, zt = (e) => e.metadata?.custom_type === K.CHATBOT, Bt = (e) => e.metadata?.custom_type === K.ATTACHMENT, Vt = (e) => Bt(e) && e.metadata?.attachment_content_type === "text", Ht = (e) => Bt(e) && e.metadata?.attachment_content_type !== "text", Ut = (e) => Rt(e) && !!e.metadata?.amount_text, Wt = ({ message: e, isMyMessage: t = !1, hasAttachment: n = !1 }) => {
732
+ let r = Rt(e), i = zt(e);
733
733
  if (!r && !i) return null;
734
734
  if (r) {
735
735
  let t = e.metadata?.amount_text;
736
- return t ? /* @__PURE__ */ W("div", {
736
+ return t ? /* @__PURE__ */ G("div", {
737
737
  className: "message-tag--paid inline-flex items-center gap-1 text-[12px] font-medium leading-[2] text-[#016630]",
738
- children: [/* @__PURE__ */ U(Fe, { size: 12 }), /* @__PURE__ */ W("span", { children: [
738
+ children: [/* @__PURE__ */ W(Pe, { size: 12 }), /* @__PURE__ */ G("span", { children: [
739
739
  "Delivered with ",
740
740
  t,
741
741
  " message"
742
742
  ] })]
743
743
  }) : null;
744
744
  }
745
- let a = t && n, o = a ? "Sent with AI" : "Sent by AI Assistant", s = a ? "justify-end gap-2 text-black/30" : t ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", c = /* @__PURE__ */ U("span", {
745
+ let a = t && n, o = a ? "Sent with AI" : "Sent by AI Assistant", s = a ? "justify-end gap-2 text-black/30" : t ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", c = /* @__PURE__ */ W("span", {
746
746
  className: "text-left",
747
747
  children: o
748
- }), l = /* @__PURE__ */ U("span", {
748
+ }), l = /* @__PURE__ */ W("span", {
749
749
  className: "inline-flex items-center leading-none",
750
- children: /* @__PURE__ */ U(Rt, { size: a ? 12 : 15 })
750
+ children: /* @__PURE__ */ W(Lt, { size: a ? 12 : 15 })
751
751
  });
752
- return /* @__PURE__ */ U("div", {
752
+ return /* @__PURE__ */ W("div", {
753
753
  className: `inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px] ${s}`,
754
754
  "data-testid": "message-chatbot-indicator",
755
- children: t && !a ? /* @__PURE__ */ W(H, { children: [c, l] }) : /* @__PURE__ */ W(H, { children: [l, c] })
755
+ children: t && !a ? /* @__PURE__ */ G(U, { children: [c, l] }) : /* @__PURE__ */ G(U, { children: [l, c] })
756
756
  });
757
- }, Kt = "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%", qt = {
757
+ }, Gt = "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%", Kt = {
758
758
  me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
759
759
  other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
760
- }, Jt = ({ side: e }) => /* @__PURE__ */ U("span", {
760
+ }, qt = ({ side: e }) => /* @__PURE__ */ W("span", {
761
761
  "aria-hidden": "true",
762
762
  className: "pointer-events-none absolute bottom-0 z-[-1] h-[1.4375rem] w-5",
763
763
  style: {
@@ -765,18 +765,18 @@ var Pt = o.lazy(() => import("./Card-C7uLQbYz.js")), Ft = o.lazy(() => import(".
765
765
  insetInlineStart: e === "other" ? "calc(-1 * 0.3125rem)" : void 0,
766
766
  transform: e === "other" ? "scaleX(-1)" : void 0,
767
767
  transformOrigin: "center",
768
- backgroundColor: qt[e],
769
- WebkitMask: Kt,
770
- mask: Kt
768
+ backgroundColor: Kt[e],
769
+ WebkitMask: Gt,
770
+ mask: Gt
771
771
  }
772
- }), Yt = c(void 0), Xt = (e) => {
772
+ }), Jt = c(void 0), Yt = (e) => {
773
773
  let t = e.metadata?.outbound_id;
774
774
  return typeof t == "string" ? t : void 0;
775
- }, Zt = (e, t) => {
775
+ }, Xt = (e, t) => {
776
776
  if (!t || !e?.length) return;
777
777
  let n = /* @__PURE__ */ new Set(), r;
778
778
  for (let i of e) {
779
- let e = Xt(i);
779
+ let e = Yt(i);
780
780
  if (!e || n.has(e)) continue;
781
781
  n.add(e);
782
782
  let a = t(e);
@@ -786,93 +786,93 @@ var Pt = o.lazy(() => import("./Card-C7uLQbYz.js")), Ft = o.lazy(() => import(".
786
786
  });
787
787
  }
788
788
  return r;
789
- }, Qt = (e, t) => {
789
+ }, Zt = (e, t) => {
790
790
  if (e === t) return !0;
791
791
  if (!e || !t) return !1;
792
792
  let n = Object.keys(e), r = Object.keys(t);
793
793
  return n.length === r.length && n.every((n) => e[n].id === t[n]?.id && e[n].name === t[n]?.name);
794
- }, $t = (e, t) => {
795
- let n = Zt(e, t), [r, i] = h(n);
796
- return Qt(r, n) ? r : (i(n), n);
797
- }, en = (e) => e.metadata?.custom_type === G.TIP, tn = ({ message: e }) => {
794
+ }, Qt = (e, t) => {
795
+ let n = Xt(e, t), [r, i] = h(n);
796
+ return Zt(r, n) ? r : (i(n), n);
797
+ }, $t = (e) => e.metadata?.custom_type === K.TIP, en = ({ message: e }) => {
798
798
  let t = e.metadata?.amount_text;
799
- return t ? /* @__PURE__ */ W("div", {
799
+ return t ? /* @__PURE__ */ G("div", {
800
800
  className: "message-tip-pill inline-flex items-end gap-0.5 max-w-[520px] rounded-[1.5rem] bg-[#43e660] px-4 py-3 text-white",
801
- children: [/* @__PURE__ */ U("span", {
801
+ children: [/* @__PURE__ */ W("span", {
802
802
  className: "flex h-5 items-center text-[20px] leading-none",
803
803
  "aria-hidden": "true",
804
804
  children: "🎁"
805
- }), /* @__PURE__ */ W("span", {
805
+ }), /* @__PURE__ */ G("span", {
806
806
  className: "text-[14px] font-bold leading-[1.43] tracking-[0.28px] text-[rgba(4,4,3,0.9)]",
807
807
  children: [t, " tip!"]
808
808
  })]
809
809
  }) : null;
810
- }, nn = () => {
811
- let { message: e } = V("SentMessageDeliveryStatus"), { messages: t } = me("SentMessageDeliveryStatus"), n = (() => {
810
+ }, tn = () => {
811
+ let { message: e } = H("SentMessageDeliveryStatus"), { messages: t } = V("SentMessageDeliveryStatus"), n = (() => {
812
812
  if (t) for (let e = t.length - 1; e >= 0; --e) {
813
813
  let n = t[e];
814
814
  if (n.type !== "system" && n.type !== "ephemeral" && n.type !== "deleted") return n.id;
815
815
  }
816
816
  })();
817
817
  return e.id === n;
818
- }, rn = () => nn() ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(je, {
818
+ }, nn = () => tn() ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(Ae, {
819
819
  weight: "bold",
820
820
  "aria-hidden": "true"
821
- }), /* @__PURE__ */ U("span", {
821
+ }), /* @__PURE__ */ W("span", {
822
822
  "data-testid": "sent-message-delivery-status",
823
823
  children: "Delivered"
824
- })] }) : null, an = () => nn() ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Me, {
824
+ })] }) : null, rn = () => tn() ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(je, {
825
825
  className: "sent-message-status__spinner animate-spin",
826
826
  weight: "bold",
827
827
  "aria-hidden": "true"
828
- }), /* @__PURE__ */ U("span", {
828
+ }), /* @__PURE__ */ W("span", {
829
829
  "data-testid": "sent-message-sending-status",
830
830
  children: "Sending"
831
- })] }) : null, on = ({ outbound: e, onOutboundClick: t }) => {
832
- let n = e.name || "Broadcast", r = /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("span", {
831
+ })] }) : null, an = ({ outbound: e, onOutboundClick: t }) => {
832
+ let n = e.name || "Broadcast", r = /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", {
833
833
  className: "sent-message-outbound-badge",
834
834
  "aria-hidden": "true",
835
- children: /* @__PURE__ */ U(Ie, { weight: "fill" })
836
- }), /* @__PURE__ */ U("span", {
837
- className: J("sent-message-outbound-name", { "underline [text-decoration-skip-ink:auto]": !!t }),
835
+ children: /* @__PURE__ */ W(Fe, { weight: "fill" })
836
+ }), /* @__PURE__ */ W("span", {
837
+ className: Y("sent-message-outbound-name", { "underline [text-decoration-skip-ink:auto]": !!t }),
838
838
  "data-testid": "sent-message-outbound-status",
839
839
  children: n
840
840
  })] });
841
- return t ? /* @__PURE__ */ U("button", {
841
+ return t ? /* @__PURE__ */ W("button", {
842
842
  type: "button",
843
843
  className: "inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-inherit [font:inherit]",
844
844
  "aria-label": `View broadcast ${n}`,
845
845
  onClick: () => t(e),
846
846
  children: r
847
847
  }) : r;
848
- }, sn = () => /* @__PURE__ */ W("span", {
848
+ }, on = () => /* @__PURE__ */ G("span", {
849
849
  className: "str-chat__message-status sent-message-status--failed",
850
- children: [/* @__PURE__ */ U(qe, {
850
+ children: [/* @__PURE__ */ W(Ke, {
851
851
  weight: "bold",
852
852
  "aria-hidden": "true"
853
- }), /* @__PURE__ */ U("span", {
853
+ }), /* @__PURE__ */ W("span", {
854
854
  "data-testid": "sent-message-failed-status",
855
855
  children: "Failed to send"
856
856
  })]
857
- }), cn = ({ onOutboundClick: e, resolvedOutbound: t }) => {
858
- let { isMyMessage: n, message: r, threadList: i } = V("SentMessageDeliveryStatus"), a = n(), o = nn();
857
+ }), sn = ({ onOutboundClick: e, resolvedOutbound: t }) => {
858
+ let { isMyMessage: n, message: r, threadList: i } = H("SentMessageDeliveryStatus"), a = n(), o = tn();
859
859
  if (i) return null;
860
- if (r.status === "failed" && a && r.type !== "error") return /* @__PURE__ */ U(sn, {});
860
+ if (r.status === "failed" && a && r.type !== "error") return /* @__PURE__ */ W(on, {});
861
861
  if (!a) return null;
862
- let s = r.metadata?.outbound_id, c = r.status !== "sending" && r.status !== "failed" && s && t ? /* @__PURE__ */ U(on, {
862
+ let s = r.metadata?.outbound_id, c = r.status !== "sending" && r.status !== "failed" && s && t ? /* @__PURE__ */ W(an, {
863
863
  outbound: t,
864
864
  onOutboundClick: e
865
- }) : null, l = Wt(r) ? null : /* @__PURE__ */ U(L, {
866
- MessageSentStatus: rn,
867
- MessageDeliveredStatus: rn,
868
- MessageReadStatus: rn,
869
- MessageSendingStatus: en(r) ? rn : an
865
+ }) : null, l = Ut(r) ? null : /* @__PURE__ */ W(L, {
866
+ MessageSentStatus: nn,
867
+ MessageDeliveredStatus: nn,
868
+ MessageReadStatus: nn,
869
+ MessageSendingStatus: $t(r) ? nn : rn
870
870
  });
871
- return c ? /* @__PURE__ */ W("span", {
871
+ return c ? /* @__PURE__ */ G("span", {
872
872
  className: "sent-message-status-row",
873
873
  children: [
874
874
  l,
875
- l && o && /* @__PURE__ */ U("span", {
875
+ l && o && /* @__PURE__ */ W("span", {
876
876
  className: "sent-message-outbound-separator",
877
877
  "aria-hidden": "true",
878
878
  children: "•"
@@ -880,27 +880,27 @@ var Pt = o.lazy(() => import("./Card-C7uLQbYz.js")), Ft = o.lazy(() => import(".
880
880
  c
881
881
  ]
882
882
  }) : l;
883
- }, ln = /^([a-z][a-z0-9+.-]*):/i, un = /* @__PURE__ */ new Set([
883
+ }, cn = /^([a-z][a-z0-9+.-]*):/i, ln = /* @__PURE__ */ new Set([
884
884
  "http",
885
885
  "https",
886
886
  "mailto",
887
887
  "tel",
888
888
  "sms"
889
889
  ]);
890
- function dn(e) {
890
+ function un(e) {
891
891
  if (typeof e != "string") return;
892
892
  let t = e.trim();
893
893
  if (t === "") return;
894
- let n = ln.exec(t);
894
+ let n = cn.exec(t);
895
895
  if (n) {
896
896
  let e = n[1].toLowerCase();
897
- return un.has(e) ? t : void 0;
897
+ return ln.has(e) ? t : void 0;
898
898
  }
899
899
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
900
900
  }
901
901
  //#endregion
902
902
  //#region src/components/LinkAttachment/components/_shared/CardCta.tsx
903
- var fn = {
903
+ var dn = {
904
904
  dark: {
905
905
  primary: "bg-white text-[#121110] hover:bg-white/90",
906
906
  secondary: "bg-white/15 text-white hover:bg-white/25"
@@ -909,12 +909,12 @@ var fn = {
909
909
  primary: "bg-[#121110] text-white hover:bg-[#2a2928]",
910
910
  secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
911
911
  }
912
- }, pn = ({ variant: e, cta: t, fullWidth: n = !0, standalone: r = !1 }) => {
913
- let i = t.variant ?? "primary", a = J("inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors", n ? "w-full" : "min-w-0", !r && "mt-2", fn[e][i]), o = n ? t.label : /* @__PURE__ */ U("span", {
912
+ }, fn = ({ variant: e, cta: t, fullWidth: n = !0, standalone: r = !1 }) => {
913
+ let i = t.variant ?? "primary", a = Y("inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors", n ? "w-full" : "min-w-0", !r && "mt-2", dn[e][i]), o = n ? t.label : /* @__PURE__ */ W("span", {
914
914
  className: "min-w-0 truncate",
915
915
  children: t.label
916
- }), s = dn(t.href);
917
- return s ? /* @__PURE__ */ U("a", {
916
+ }), s = un(t.href);
917
+ return s ? /* @__PURE__ */ W("a", {
918
918
  href: s,
919
919
  target: "_blank",
920
920
  rel: "noopener noreferrer",
@@ -923,7 +923,7 @@ var fn = {
923
923
  },
924
924
  className: `${a} no-underline`,
925
925
  children: o
926
- }) : /* @__PURE__ */ U("button", {
926
+ }) : /* @__PURE__ */ W("button", {
927
927
  type: "button",
928
928
  onClick: (e) => {
929
929
  e.stopPropagation(), t.onClick?.();
@@ -931,30 +931,30 @@ var fn = {
931
931
  className: a,
932
932
  children: o
933
933
  });
934
- }, mn = {
934
+ }, pn = {
935
935
  dark: "text-white",
936
936
  light: "text-black/90"
937
- }, hn = "text-white/30", gn = {
937
+ }, mn = "text-white/30", hn = {
938
938
  dark: "text-white/55",
939
939
  light: "text-black/55"
940
- }, _n = {
940
+ }, gn = {
941
941
  dark: "bg-white/25",
942
942
  light: "bg-black/15"
943
- }, vn = ({ variant: e, ctaSurface: t, chinTextColor: n, title: r, placeholderTitle: i, description: a, descriptionLines: o = 1, url: s, appIcon: c, cta: l, trailingAction: u, isLoading: d = !1 }) => {
943
+ }, _n = ({ variant: e, ctaSurface: t, chinTextColor: n, title: r, placeholderTitle: i, description: a, descriptionLines: o = 1, url: s, appIcon: c, cta: l, trailingAction: u, isLoading: d = !1 }) => {
944
944
  let f = e === "dark", p = r ?? (f ? i : void 0) ?? "", m = p.trim() !== "", h = a != null && a.trim() !== "", g = typeof s == "string" ? s.trim() : "", _ = g !== "", v = l != null;
945
945
  if (!d && !m && !h && !_ && !v) return null;
946
- let y = J("line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", n == null && (f && !r ? hn : mn[e])), b = J("truncate text-[12px] leading-4 tracking-[0.24px]", n == null && gn[e]), x = J("text-[12px] leading-4 tracking-[0.24px]", o <= 1 && "truncate", n == null && gn[e]);
946
+ let y = Y("line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", n == null && (f && !r ? mn : pn[e])), b = Y("truncate text-[12px] leading-4 tracking-[0.24px]", n == null && hn[e]), x = Y("text-[12px] leading-4 tracking-[0.24px]", o <= 1 && "truncate", n == null && hn[e]);
947
947
  if (d) {
948
- let t = J("animate-pulse rounded", _n[e]);
949
- return /* @__PURE__ */ U("div", {
948
+ let t = Y("animate-pulse rounded", gn[e]);
949
+ return /* @__PURE__ */ W("div", {
950
950
  className: "shrink-0 px-4 py-3",
951
- children: /* @__PURE__ */ W("div", {
951
+ children: /* @__PURE__ */ G("div", {
952
952
  className: "flex min-w-0 flex-col gap-[2px]",
953
- children: [/* @__PURE__ */ U("div", {
954
- className: J("h-5 w-3/4", t),
953
+ children: [/* @__PURE__ */ W("div", {
954
+ className: Y("h-5 w-3/4", t),
955
955
  "aria-hidden": !0
956
- }), /* @__PURE__ */ U("div", {
957
- className: J("h-4 w-1/2", t),
956
+ }), /* @__PURE__ */ W("div", {
957
+ className: Y("h-4 w-1/2", t),
958
958
  "aria-hidden": !0
959
959
  })]
960
960
  })
@@ -967,55 +967,55 @@ var fn = {
967
967
  WebkitLineClamp: o,
968
968
  overflow: "hidden"
969
969
  } : S;
970
- return /* @__PURE__ */ W("div", {
970
+ return /* @__PURE__ */ G("div", {
971
971
  className: "shrink-0 px-4 py-3",
972
- children: [/* @__PURE__ */ W("div", {
972
+ children: [/* @__PURE__ */ G("div", {
973
973
  className: "flex items-end gap-3",
974
- children: [/* @__PURE__ */ W("div", {
974
+ children: [/* @__PURE__ */ G("div", {
975
975
  className: "flex min-w-0 flex-1 flex-col gap-[2px]",
976
976
  children: [
977
- m && /* @__PURE__ */ W("div", {
977
+ m && /* @__PURE__ */ G("div", {
978
978
  className: "flex min-w-0 items-center gap-2",
979
- children: [c ? /* @__PURE__ */ U("span", {
979
+ children: [c ? /* @__PURE__ */ W("span", {
980
980
  className: "shrink-0",
981
981
  children: c
982
- }) : null, /* @__PURE__ */ U("p", {
983
- className: J("min-w-0", y),
982
+ }) : null, /* @__PURE__ */ W("p", {
983
+ className: Y("min-w-0", y),
984
984
  style: S,
985
985
  children: p
986
986
  })]
987
987
  }),
988
- h && /* @__PURE__ */ U("p", {
988
+ h && /* @__PURE__ */ W("p", {
989
989
  className: x,
990
990
  style: C,
991
991
  children: a
992
992
  }),
993
- !v && _ && /* @__PURE__ */ U("p", {
993
+ !v && _ && /* @__PURE__ */ W("p", {
994
994
  className: b,
995
995
  style: S,
996
996
  "data-testid": "link-attachment-url",
997
997
  children: g
998
998
  })
999
999
  ]
1000
- }), u && /* @__PURE__ */ U("div", {
1000
+ }), u && /* @__PURE__ */ W("div", {
1001
1001
  className: "shrink-0",
1002
1002
  children: u
1003
1003
  })]
1004
- }), l && /* @__PURE__ */ U(pn, {
1004
+ }), l && /* @__PURE__ */ W(fn, {
1005
1005
  variant: t ?? e,
1006
1006
  cta: l
1007
1007
  })]
1008
1008
  });
1009
- }, yn = "Loading link preview", bn = J("relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden", "rounded-[20px]"), xn = "flex h-[250px] flex-col", Sn = ({ variant: e, children: t, href: n, onClick: r, ariaLabel: i, rootRef: a, topRight: o, bgClassName: s, accentHex: c, fixedHeight: l = !1, busy: u = !1, "data-testid": d }) => {
1010
- let f = J("messaging-link-card", bn, l ? xn : "block", s ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"), n != null || r != null ? "cursor-pointer no-underline focus-ring" : null), p = u ? {
1009
+ }, vn = "Loading link preview", yn = Y("relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden", "rounded-[20px]"), bn = "flex h-[250px] flex-col", xn = ({ variant: e, children: t, href: n, onClick: r, ariaLabel: i, rootRef: a, topRight: o, bgClassName: s, accentHex: c, fixedHeight: l = !1, busy: u = !1, "data-testid": d }) => {
1010
+ let f = Y("messaging-link-card", yn, l ? bn : "block", s ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"), n != null || r != null ? "cursor-pointer no-underline focus-ring" : null), p = u ? {
1011
1011
  role: "status",
1012
1012
  "aria-busy": !0,
1013
- "aria-label": yn
1014
- } : void 0, m = c ? { "--accent": c } : void 0, h = o ? /* @__PURE__ */ U("div", {
1013
+ "aria-label": vn
1014
+ } : void 0, m = c ? { "--accent": c } : void 0, h = o ? /* @__PURE__ */ W("div", {
1015
1015
  className: "pointer-events-auto absolute right-3 top-3 z-10",
1016
1016
  children: o
1017
1017
  }) : null;
1018
- return n ? /* @__PURE__ */ W("a", {
1018
+ return n ? /* @__PURE__ */ G("a", {
1019
1019
  ref: a,
1020
1020
  href: n,
1021
1021
  target: "_blank",
@@ -1027,18 +1027,18 @@ var fn = {
1027
1027
  style: m,
1028
1028
  ...p,
1029
1029
  children: [t, h]
1030
- }) : r ? /* @__PURE__ */ W("button", {
1030
+ }) : r ? /* @__PURE__ */ G("button", {
1031
1031
  ref: a,
1032
1032
  type: "button",
1033
1033
  onClick: r,
1034
1034
  "aria-label": i,
1035
1035
  "data-testid": d,
1036
1036
  "data-variant": e,
1037
- className: J(f, "text-left"),
1037
+ className: Y(f, "text-left"),
1038
1038
  style: m,
1039
1039
  ...p,
1040
1040
  children: [t, h]
1041
- }) : /* @__PURE__ */ W("div", {
1041
+ }) : /* @__PURE__ */ G("div", {
1042
1042
  ref: a,
1043
1043
  "data-testid": d,
1044
1044
  "data-variant": e,
@@ -1047,49 +1047,49 @@ var fn = {
1047
1047
  ...p,
1048
1048
  children: [t, h]
1049
1049
  });
1050
- }, Cn = {
1050
+ }, Sn = {
1051
1051
  dark: "bg-white/10",
1052
1052
  light: "bg-black/5"
1053
- }, wn = {
1053
+ }, Cn = {
1054
1054
  dark: "size-16 text-white/25",
1055
1055
  light: "size-16 text-black/25"
1056
- }, Tn = (e, n) => !!n && !!e && t(e) === "audio", En = (e, n) => {
1056
+ }, wn = (e, n) => !!n && !!e && t(e) === "audio", Tn = (e, n) => {
1057
1057
  if (!n || !e) return !1;
1058
1058
  let r = t(e);
1059
1059
  return r === "video" || r === "audio";
1060
- }, Dn = "bg-[#F2F3F4]", On = ({ variant: r, thumbnailUrl: i, sourceUrl: o, title: s, mimeType: c = "image/*", topLeft: l, topRight: u, isLoading: d = !1, onImageError: f }) => {
1060
+ }, En = "bg-[#F2F3F4]", Dn = ({ variant: r, thumbnailUrl: i, sourceUrl: o, title: s, mimeType: c = "image/*", topLeft: l, topRight: u, isLoading: d = !1, onImageError: f }) => {
1061
1061
  let p = t(c), m = !!o && p === "video", h = a(i);
1062
- return !d && Tn(c, o) ? /* @__PURE__ */ U("div", {
1062
+ return !d && wn(c, o) ? /* @__PURE__ */ W("div", {
1063
1063
  className: "p-3",
1064
- children: /* @__PURE__ */ U("audio", {
1064
+ children: /* @__PURE__ */ W("audio", {
1065
1065
  ...e,
1066
1066
  src: o,
1067
1067
  controls: !0,
1068
1068
  preload: "metadata",
1069
1069
  className: "block w-full",
1070
- children: /* @__PURE__ */ U("track", { kind: "captions" })
1070
+ children: /* @__PURE__ */ W("track", { kind: "captions" })
1071
1071
  })
1072
- }) : /* @__PURE__ */ W("div", {
1073
- className: J("relative min-h-0 w-full flex-1 overflow-hidden", m && "bg-black"),
1072
+ }) : /* @__PURE__ */ G("div", {
1073
+ className: Y("relative min-h-0 w-full flex-1 overflow-hidden", m && "bg-black"),
1074
1074
  children: [
1075
- d ? /* @__PURE__ */ U("div", {
1076
- className: J("h-full w-full animate-pulse", Cn[r]),
1075
+ d ? /* @__PURE__ */ W("div", {
1076
+ className: Y("h-full w-full animate-pulse", Sn[r]),
1077
1077
  "aria-hidden": !0
1078
- }) : m ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("video", {
1078
+ }) : m ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("video", {
1079
1079
  src: o,
1080
1080
  poster: h,
1081
1081
  controls: !0,
1082
1082
  playsInline: !0,
1083
1083
  preload: "metadata",
1084
1084
  className: "absolute inset-0 h-full w-full object-contain",
1085
- children: /* @__PURE__ */ U("track", { kind: "captions" })
1086
- }), h && f ? /* @__PURE__ */ U("img", {
1085
+ children: /* @__PURE__ */ W("track", { kind: "captions" })
1086
+ }), h && f ? /* @__PURE__ */ W("img", {
1087
1087
  src: h,
1088
1088
  alt: "",
1089
1089
  "aria-hidden": !0,
1090
1090
  onError: f,
1091
1091
  className: "hidden"
1092
- }) : null] }) : i ? /* @__PURE__ */ U("img", {
1092
+ }) : null] }) : i ? /* @__PURE__ */ W("img", {
1093
1093
  src: h ?? i,
1094
1094
  alt: s ?? "",
1095
1095
  draggable: !1,
@@ -1097,42 +1097,42 @@ var fn = {
1097
1097
  decoding: "async",
1098
1098
  onError: f,
1099
1099
  className: "absolute inset-0 h-full w-full object-cover"
1100
- }) : /* @__PURE__ */ U("div", {
1101
- className: J("flex h-full w-full items-center justify-center", Cn[r]),
1100
+ }) : /* @__PURE__ */ W("div", {
1101
+ className: Y("flex h-full w-full items-center justify-center", Sn[r]),
1102
1102
  children: n(c, {
1103
- className: wn[r],
1103
+ className: Cn[r],
1104
1104
  weight: "regular"
1105
1105
  })
1106
1106
  }),
1107
- l ? /* @__PURE__ */ U("div", {
1107
+ l ? /* @__PURE__ */ W("div", {
1108
1108
  className: "pointer-events-auto absolute left-3 top-3 z-10",
1109
1109
  children: l
1110
1110
  }) : null,
1111
- u ? /* @__PURE__ */ U("div", {
1111
+ u ? /* @__PURE__ */ W("div", {
1112
1112
  className: "pointer-events-auto absolute right-3 top-3 z-10",
1113
1113
  children: u
1114
1114
  }) : null
1115
1115
  ]
1116
1116
  });
1117
- }, kn = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
1118
- function An(e) {
1117
+ }, On = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
1118
+ function kn(e) {
1119
1119
  let t = e.trim();
1120
1120
  return t.startsWith("#") ? t : `#${t}`;
1121
1121
  }
1122
1122
  //#endregion
1123
1123
  //#region src/components/LinkAttachment/components/_shared/useChinPalette.ts
1124
- var jn = "#FFFFFF", Mn = "#040403", Nn = {
1125
- dark: jn,
1126
- light: Mn
1124
+ var An = "#FFFFFF", jn = "#040403", Mn = {
1125
+ dark: An,
1126
+ light: jn
1127
1127
  };
1128
- function Pn({ variant: e, accentColor: t, status: n = "ready", layout: r = "featured", thumbnailUrl: i, mimeType: a, sourceUrl: s }) {
1128
+ function Nn({ variant: e, accentColor: t, status: n = "ready", layout: r = "featured", thumbnailUrl: i, mimeType: a, sourceUrl: s }) {
1129
1129
  let [c, l] = o.useState(!1);
1130
1130
  o.useEffect(() => {
1131
1131
  l(!1);
1132
1132
  }, [i]);
1133
1133
  let u = o.useCallback(() => {
1134
1134
  l(!0);
1135
- }, []), d = Tn(a, s), f = r === "featured" && i && !d && !c && n === "ready" && t != null && kn.test(t.trim()) ? An(t) : void 0, p = d ? Mn : Nn[e];
1135
+ }, []), d = wn(a, s), f = r === "featured" && i && !d && !c && n === "ready" && t != null && On.test(t.trim()) ? kn(t) : void 0, p = d ? jn : Mn[e];
1136
1136
  return {
1137
1137
  thumbnailUrl: c ? void 0 : i,
1138
1138
  accentHex: f,
@@ -1144,8 +1144,8 @@ function Pn({ variant: e, accentColor: t, status: n = "ready", layout: r = "feat
1144
1144
  }
1145
1145
  //#endregion
1146
1146
  //#region src/components/LinkAttachment/components/Composer/Card.tsx
1147
- var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", In = "relative before:absolute before:-inset-[10px] before:content-['']", Ln = ({ title: e, placeholderTitle: t, description: n, descriptionLines: r, url: i, mimeType: a, thumbnailUrl: o, sourceUrl: s, layout: c = "featured", appIcon: l, cta: u, accentColor: d, status: f = "ready", onDismiss: p, onEditClick: m, dismissLabel: h = "Dismiss attachment" }) => {
1148
- let g = c === "classic", _ = Tn(a, s), v = Pn({
1147
+ var Pn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Fn = "relative before:absolute before:-inset-[10px] before:content-['']", In = ({ title: e, placeholderTitle: t, description: n, descriptionLines: r, url: i, mimeType: a, thumbnailUrl: o, sourceUrl: s, layout: c = "featured", appIcon: l, cta: u, accentColor: d, status: f = "ready", onDismiss: p, onEditClick: m, dismissLabel: h = "Dismiss attachment" }) => {
1148
+ let g = c === "classic", _ = wn(a, s), v = Nn({
1149
1149
  variant: "dark",
1150
1150
  accentColor: d,
1151
1151
  status: f,
@@ -1153,50 +1153,50 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1153
1153
  thumbnailUrl: o,
1154
1154
  mimeType: a,
1155
1155
  sourceUrl: s
1156
- }), y = p ? /* @__PURE__ */ U("button", {
1156
+ }), y = p ? /* @__PURE__ */ W("button", {
1157
1157
  type: "button",
1158
1158
  onClick: p,
1159
1159
  "aria-label": h,
1160
- className: J(Fn, !_ && In),
1161
- children: /* @__PURE__ */ U(Je, {
1160
+ className: Y(Pn, !_ && Fn),
1161
+ children: /* @__PURE__ */ W(qe, {
1162
1162
  className: "size-3",
1163
1163
  weight: "bold"
1164
1164
  })
1165
- }) : void 0, b = m ? /* @__PURE__ */ U("button", {
1165
+ }) : void 0, b = m ? /* @__PURE__ */ W("button", {
1166
1166
  type: "button",
1167
1167
  onClick: m,
1168
1168
  "aria-label": "Edit attachment",
1169
1169
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
1170
- children: /* @__PURE__ */ U(Le, {
1170
+ children: /* @__PURE__ */ W(Ie, {
1171
1171
  className: "size-5",
1172
1172
  weight: "regular"
1173
1173
  })
1174
1174
  }) : void 0;
1175
- return _ && !v.isLoading ? /* @__PURE__ */ U(Sn, {
1175
+ return _ && !v.isLoading ? /* @__PURE__ */ W(xn, {
1176
1176
  variant: "dark",
1177
- bgClassName: Dn,
1178
- children: /* @__PURE__ */ W("div", {
1177
+ bgClassName: En,
1178
+ children: /* @__PURE__ */ G("div", {
1179
1179
  className: "flex items-center gap-2 pr-3",
1180
- children: [/* @__PURE__ */ U("div", {
1180
+ children: [/* @__PURE__ */ W("div", {
1181
1181
  className: "min-w-0 flex-1",
1182
- children: /* @__PURE__ */ U(On, {
1182
+ children: /* @__PURE__ */ W(Dn, {
1183
1183
  variant: "dark",
1184
1184
  sourceUrl: s,
1185
1185
  title: e,
1186
1186
  mimeType: a
1187
1187
  })
1188
- }), y && /* @__PURE__ */ U("div", {
1188
+ }), y && /* @__PURE__ */ W("div", {
1189
1189
  className: "shrink-0",
1190
1190
  children: y
1191
1191
  })]
1192
1192
  })
1193
- }) : /* @__PURE__ */ W(Sn, {
1193
+ }) : /* @__PURE__ */ G(xn, {
1194
1194
  variant: "dark",
1195
1195
  fixedHeight: !g,
1196
1196
  accentHex: v.accentHex,
1197
1197
  busy: v.isLoading,
1198
1198
  topRight: g ? y : void 0,
1199
- children: [!g && /* @__PURE__ */ U(On, {
1199
+ children: [!g && /* @__PURE__ */ W(Dn, {
1200
1200
  variant: "dark",
1201
1201
  thumbnailUrl: v.thumbnailUrl,
1202
1202
  sourceUrl: s,
@@ -1205,7 +1205,7 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1205
1205
  topRight: y,
1206
1206
  isLoading: v.isLoading,
1207
1207
  onImageError: v.onImageError
1208
- }), /* @__PURE__ */ U(vn, {
1208
+ }), /* @__PURE__ */ W(_n, {
1209
1209
  chinTextColor: v.chinTextColor,
1210
1210
  variant: "dark",
1211
1211
  ctaSurface: v.surface,
@@ -1220,19 +1220,19 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1220
1220
  isLoading: v.isLoading
1221
1221
  })]
1222
1222
  });
1223
- }, Rn = ({ accentHex: e, side: t, visible: n, children: r }) => n ? /* @__PURE__ */ W("div", {
1223
+ }, Ln = ({ accentHex: e, side: t, visible: n, children: r }) => n ? /* @__PURE__ */ G("div", {
1224
1224
  className: "relative isolate w-fit",
1225
- children: [r, /* @__PURE__ */ U("span", {
1225
+ children: [r, /* @__PURE__ */ W("span", {
1226
1226
  "aria-hidden": !0,
1227
1227
  "data-testid": "link-card-tail",
1228
1228
  "data-variant": t === "sender" ? "dark" : "light",
1229
1229
  style: e ? { "--accent": e } : void 0,
1230
- className: J("messaging-link-card-tail", t === "receiver" && "messaging-link-card-tail--received")
1230
+ className: Y("messaging-link-card-tail", t === "receiver" && "messaging-link-card-tail--received")
1231
1231
  })]
1232
- }) : /* @__PURE__ */ U(H, { children: r }), zn = {
1233
- Composer: Ln,
1232
+ }) : /* @__PURE__ */ W(U, { children: r }), Rn = {
1233
+ Composer: In,
1234
1234
  Sent: ({ title: e, placeholderTitle: t, description: n, descriptionLines: r, url: i, mimeType: a, thumbnailUrl: o, sourceUrl: s, layout: c = "featured", appIcon: l, cta: u, accentColor: d, status: f = "ready", onClick: p, groupPosition: m = "single" }) => {
1235
- let h = En(a, s), g = dn(i), _ = u == null && g != null && !h ? g : void 0, v = u == null && !h && _ != null ? p : void 0, y = f !== "loading" && Tn(a, s), b = Pn({
1235
+ let h = Tn(a, s), g = un(i), _ = u == null && g != null && !h ? g : void 0, v = u == null && !h && _ != null ? p : void 0, y = f !== "loading" && wn(a, s), b = Nn({
1236
1236
  variant: "dark",
1237
1237
  accentColor: d,
1238
1238
  status: f,
@@ -1241,19 +1241,19 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1241
1241
  mimeType: a,
1242
1242
  sourceUrl: s
1243
1243
  });
1244
- return /* @__PURE__ */ U(Rn, {
1244
+ return /* @__PURE__ */ W(Ln, {
1245
1245
  accentHex: b.accentHex,
1246
1246
  side: "sender",
1247
1247
  visible: !y && (m === "single" || m === "end"),
1248
- children: /* @__PURE__ */ W(Sn, {
1248
+ children: /* @__PURE__ */ G(xn, {
1249
1249
  variant: "dark",
1250
1250
  href: _,
1251
1251
  onClick: v,
1252
1252
  fixedHeight: c === "featured" && !y,
1253
1253
  accentHex: b.accentHex,
1254
1254
  busy: b.isLoading,
1255
- bgClassName: y ? Dn : void 0,
1256
- children: [c === "featured" && /* @__PURE__ */ U(On, {
1255
+ bgClassName: y ? En : void 0,
1256
+ children: [c === "featured" && /* @__PURE__ */ W(Dn, {
1257
1257
  variant: "dark",
1258
1258
  thumbnailUrl: b.thumbnailUrl,
1259
1259
  sourceUrl: s,
@@ -1261,7 +1261,7 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1261
1261
  mimeType: a,
1262
1262
  isLoading: b.isLoading,
1263
1263
  onImageError: b.onImageError
1264
- }), /* @__PURE__ */ U(vn, {
1264
+ }), /* @__PURE__ */ W(_n, {
1265
1265
  chinTextColor: b.chinTextColor,
1266
1266
  variant: "dark",
1267
1267
  ctaSurface: b.surface,
@@ -1278,12 +1278,12 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1278
1278
  });
1279
1279
  },
1280
1280
  Received: ({ title: e, description: t, descriptionLines: n, url: r, mimeType: i, thumbnailUrl: a, sourceUrl: o, layout: s = "featured", appIcon: c, cta: l, accentColor: u, status: d = "ready", onClick: f, groupPosition: p = "single" }) => {
1281
- let m = En(i, o), h = dn(r), g = l == null && h != null && !m ? h : void 0, _ = l == null && !m ? f : void 0, v = d !== "loading" && Tn(i, o) ? Dn : void 0, y = l && f ? {
1281
+ let m = Tn(i, o), h = un(r), g = l == null && h != null && !m ? h : void 0, _ = l == null && !m ? f : void 0, v = d !== "loading" && wn(i, o) ? En : void 0, y = l && f ? {
1282
1282
  ...l,
1283
1283
  onClick: () => {
1284
1284
  f(), l.onClick?.();
1285
1285
  }
1286
- } : l, b = Pn({
1286
+ } : l, b = Nn({
1287
1287
  variant: "light",
1288
1288
  accentColor: u,
1289
1289
  status: d,
@@ -1292,11 +1292,11 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1292
1292
  mimeType: i,
1293
1293
  sourceUrl: o
1294
1294
  });
1295
- return /* @__PURE__ */ U(Rn, {
1295
+ return /* @__PURE__ */ W(Ln, {
1296
1296
  accentHex: b.accentHex,
1297
1297
  side: "receiver",
1298
1298
  visible: v == null && (p === "single" || p === "end"),
1299
- children: /* @__PURE__ */ W(Sn, {
1299
+ children: /* @__PURE__ */ G(xn, {
1300
1300
  variant: "light",
1301
1301
  href: g,
1302
1302
  onClick: _,
@@ -1306,7 +1306,7 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1306
1306
  busy: b.isLoading,
1307
1307
  bgClassName: v,
1308
1308
  "data-testid": "link-attachment",
1309
- children: [s === "featured" && /* @__PURE__ */ U(On, {
1309
+ children: [s === "featured" && /* @__PURE__ */ W(Dn, {
1310
1310
  variant: "light",
1311
1311
  thumbnailUrl: b.thumbnailUrl,
1312
1312
  sourceUrl: o,
@@ -1314,7 +1314,7 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1314
1314
  mimeType: i,
1315
1315
  isLoading: b.isLoading,
1316
1316
  onImageError: b.onImageError
1317
- }), /* @__PURE__ */ U(vn, {
1317
+ }), /* @__PURE__ */ W(_n, {
1318
1318
  chinTextColor: b.chinTextColor,
1319
1319
  variant: "light",
1320
1320
  ctaSurface: b.surface,
@@ -1329,16 +1329,16 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1329
1329
  })
1330
1330
  });
1331
1331
  }
1332
- }, Bn = {
1332
+ }, zn = {
1333
1333
  dark: "bg-[#1e2330]",
1334
1334
  light: "bg-[#f2f1ef]"
1335
- }, Vn = {
1335
+ }, Bn = {
1336
1336
  dark: "text-white",
1337
1337
  light: "text-[#000000]"
1338
- }, Hn = {
1338
+ }, Vn = {
1339
1339
  dark: "border-white/[0.08]",
1340
1340
  light: "border-black/[0.08]"
1341
- }, Un = (e) => e === "dark" ? "sender" : "receiver", Wn = {
1341
+ }, Hn = (e) => e === "dark" ? "sender" : "receiver", Un = {
1342
1342
  sender: {
1343
1343
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1344
1344
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1351,47 +1351,47 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1351
1351
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
1352
1352
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
1353
1353
  }
1354
- }, Gn = ({ variant: e, text: t, bordered: n = !0, groupPosition: r = "single", widthClassName: i = "w-[280px]", paddingClassName: a = "px-2 py-2", radiusClassName: o, className: s, children: c, "data-testid": l }) => {
1355
- let u = t != null && t !== "", d = o ?? Wn[Un(e)][r];
1356
- return /* @__PURE__ */ W("div", {
1354
+ }, Wn = ({ variant: e, text: t, bordered: n = !0, groupPosition: r = "single", widthClassName: i = "w-[280px]", paddingClassName: a = "px-2 py-2", radiusClassName: o, className: s, children: c, "data-testid": l }) => {
1355
+ let u = t != null && t !== "", d = o ?? Un[Hn(e)][r];
1356
+ return /* @__PURE__ */ G("div", {
1357
1357
  "data-testid": l,
1358
1358
  "data-group-position": r,
1359
- className: J("relative", i, "overflow-hidden", a, u && "pb-0", d, Bn[e], Vn[e], n && "border", n && Hn[e], s),
1360
- children: [c, u ? /* @__PURE__ */ U("p", {
1361
- className: J("whitespace-pre-wrap break-words leading-snug hyphens-manual", "pb-2 pt-2", "px-2"),
1359
+ className: Y("relative", i, "overflow-hidden", a, u && "pb-0", d, zn[e], Bn[e], n && "border", n && Vn[e], s),
1360
+ children: [c, u ? /* @__PURE__ */ W("p", {
1361
+ className: Y("whitespace-pre-wrap break-words leading-snug hyphens-manual", "pb-2 pt-2", "px-2"),
1362
1362
  children: t
1363
1363
  }) : null]
1364
1364
  });
1365
- }, Kn = ({ onClick: e, variant: t = "overlay", ariaLabel: n = "Dismiss attachment" }) => /* @__PURE__ */ U("button", {
1365
+ }, Gn = ({ onClick: e, variant: t = "overlay", ariaLabel: n = "Dismiss attachment" }) => /* @__PURE__ */ W("button", {
1366
1366
  type: "button",
1367
1367
  onClick: (t) => {
1368
1368
  t.stopPropagation(), e();
1369
1369
  },
1370
1370
  "aria-label": n,
1371
- className: J("flex size-6 items-center justify-center rounded-full text-white", t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"),
1372
- children: /* @__PURE__ */ U(Je, {
1371
+ className: Y("flex size-6 items-center justify-center rounded-full text-white", t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"),
1372
+ children: /* @__PURE__ */ W(qe, {
1373
1373
  className: "size-3",
1374
1374
  weight: "bold"
1375
1375
  })
1376
- }), qn = (e) => e === "received" ? "light" : "dark", Jn = ({ firstOfGroup: e, endOfGroup: t, groupedByUser: n }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Yn = ({ src: e, mimeType: t, filename: n, items: r }) => r && r.length > 0 ? r : e ? [{
1376
+ }), Kn = (e) => e === "received" ? "light" : "dark", qn = ({ firstOfGroup: e, endOfGroup: t, groupedByUser: n }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Jn = ({ src: e, mimeType: t, filename: n, items: r }) => r && r.length > 0 ? r : e ? [{
1377
1377
  src: e,
1378
1378
  mimeType: t,
1379
1379
  filename: n
1380
- }] : [], Xn = ({ item: t, preload: n, trailingAction: r }) => /* @__PURE__ */ W("div", {
1380
+ }] : [], Yn = ({ item: t, preload: n, trailingAction: r }) => /* @__PURE__ */ G("div", {
1381
1381
  className: "flex items-center gap-2",
1382
- children: [/* @__PURE__ */ U("audio", {
1382
+ children: [/* @__PURE__ */ W("audio", {
1383
1383
  ...e,
1384
1384
  src: t.src,
1385
1385
  controls: !0,
1386
1386
  preload: t.preload ?? n,
1387
1387
  className: "block min-w-0 flex-1",
1388
- children: t.mimeType ? /* @__PURE__ */ U("source", {
1388
+ children: t.mimeType ? /* @__PURE__ */ W("source", {
1389
1389
  src: t.src,
1390
1390
  type: t.mimeType
1391
1391
  }) : null
1392
1392
  }), r ?? null]
1393
- }), Zn = ({ state: e, src: t, mimeType: n, filename: r, items: i, text: a, groupPosition: o, preload: s, onDismiss: c }) => {
1394
- let l = qn(e), u = e === "composer" && !!c, d = Yn({
1393
+ }), Xn = ({ state: e, src: t, mimeType: n, filename: r, items: i, text: a, groupPosition: o, preload: s, onDismiss: c }) => {
1394
+ let l = Kn(e), u = e === "composer" && !!c, d = Jn({
1395
1395
  src: t,
1396
1396
  mimeType: n,
1397
1397
  filename: r,
@@ -1399,43 +1399,43 @@ var Fn = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1399
1399
  });
1400
1400
  if (d.length === 0) return null;
1401
1401
  let f = s ?? (d.length > 1 ? "none" : "metadata");
1402
- return /* @__PURE__ */ U(Gn, {
1402
+ return /* @__PURE__ */ W(Wn, {
1403
1403
  variant: l,
1404
1404
  text: a,
1405
1405
  groupPosition: o,
1406
1406
  "data-testid": "audio-attachment",
1407
- children: /* @__PURE__ */ U("div", {
1407
+ children: /* @__PURE__ */ W("div", {
1408
1408
  className: "flex flex-col gap-2",
1409
- children: d.map((e, t) => /* @__PURE__ */ U(Xn, {
1409
+ children: d.map((e, t) => /* @__PURE__ */ W(Yn, {
1410
1410
  item: e,
1411
1411
  preload: f,
1412
- trailingAction: u && t === 0 ? /* @__PURE__ */ U(Kn, {
1412
+ trailingAction: u && t === 0 ? /* @__PURE__ */ W(Gn, {
1413
1413
  onClick: c,
1414
1414
  variant: "inline"
1415
1415
  }) : void 0
1416
1416
  }, `${e.src}-${t}`))
1417
1417
  })
1418
1418
  });
1419
- }, Qn = {
1420
- Composer: (e) => /* @__PURE__ */ U(Zn, {
1419
+ }, Zn = {
1420
+ Composer: (e) => /* @__PURE__ */ W(Xn, {
1421
1421
  ...e,
1422
1422
  state: "composer"
1423
1423
  }),
1424
- Sent: (e) => /* @__PURE__ */ U(Zn, {
1424
+ Sent: (e) => /* @__PURE__ */ W(Xn, {
1425
1425
  ...e,
1426
1426
  state: "sent"
1427
1427
  }),
1428
- Received: (e) => /* @__PURE__ */ U(Zn, {
1428
+ Received: (e) => /* @__PURE__ */ W(Xn, {
1429
1429
  ...e,
1430
1430
  state: "received"
1431
1431
  })
1432
1432
  };
1433
1433
  //#endregion
1434
1434
  //#region src/components/MessageAttachment/_shared/fileMeta.ts
1435
- function $n(e) {
1435
+ function Qn(e) {
1436
1436
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : e < 1073741824 ? `${(e / 1048576).toFixed(2)} MB` : `${(e / 1073741824).toFixed(2)} GB`;
1437
1437
  }
1438
- var er = {
1438
+ var $n = {
1439
1439
  pdf: "PDF",
1440
1440
  doc: "DOC",
1441
1441
  xls: "XLS",
@@ -1445,7 +1445,7 @@ var er = {
1445
1445
  text: "TXT",
1446
1446
  markdown: "MD"
1447
1447
  };
1448
- function tr(e, n) {
1448
+ function er(e, n) {
1449
1449
  if (n) {
1450
1450
  let e = n.lastIndexOf(".");
1451
1451
  if (e > 0 && e < n.length - 1) {
@@ -1455,17 +1455,17 @@ function tr(e, n) {
1455
1455
  }
1456
1456
  if (!e) return;
1457
1457
  if (t(e) === "document") {
1458
- let t = er[i(e)];
1458
+ let t = $n[i(e)];
1459
1459
  if (t) return t;
1460
1460
  if (e === "application/octet-stream") return;
1461
1461
  }
1462
1462
  let r = e.split("/")[1];
1463
1463
  if (!(!r || r === "*")) return r.toUpperCase();
1464
1464
  }
1465
- function nr(e, t, n) {
1466
- return [tr(e, t), typeof n == "number" && n > 0 ? $n(n) : void 0].filter(Boolean).join(" · ") || void 0;
1465
+ function tr(e, t, n) {
1466
+ return [er(e, t), typeof n == "number" && n > 0 ? Qn(n) : void 0].filter(Boolean).join(" · ") || void 0;
1467
1467
  }
1468
- function Z(e) {
1468
+ function Q(e) {
1469
1469
  try {
1470
1470
  let t = new URL(e).pathname.split("/").pop();
1471
1471
  return t && t.length > 0 ? decodeURIComponent(t) : "download";
@@ -1475,42 +1475,42 @@ function Z(e) {
1475
1475
  }
1476
1476
  //#endregion
1477
1477
  //#region src/components/MessageAttachment/_shared/CompactDocumentRow.tsx
1478
- var rr = {
1478
+ var nr = {
1479
1479
  dark: "text-white/55",
1480
1480
  light: "text-black/65"
1481
- }, ir = {
1481
+ }, rr = {
1482
1482
  dark: "bg-white/10",
1483
1483
  light: "bg-black/5"
1484
- }, ar = {
1484
+ }, ir = {
1485
1485
  dark: "text-white/85",
1486
1486
  light: "text-black/85"
1487
- }, or = ({ variant: e, filename: t, title: r, mimeType: i = "application/octet-stream", fileSize: a, onActivate: o, activateLabel: s, trailingAction: c }) => {
1488
- let l = r ?? t ?? "File", u = nr(i, t, a), d = /* @__PURE__ */ U("div", {
1489
- className: J("flex size-10 shrink-0 items-center justify-center rounded-sm", ir[e]),
1487
+ }, ar = ({ variant: e, filename: t, title: r, mimeType: i = "application/octet-stream", fileSize: a, onActivate: o, activateLabel: s, trailingAction: c }) => {
1488
+ let l = r ?? t ?? "File", u = tr(i, t, a), d = /* @__PURE__ */ W("div", {
1489
+ className: Y("flex size-10 shrink-0 items-center justify-center rounded-sm", rr[e]),
1490
1490
  "aria-hidden": !0,
1491
1491
  children: n(i, {
1492
- className: J("size-6", ar[e]),
1492
+ className: Y("size-6", ir[e]),
1493
1493
  weight: "regular"
1494
1494
  })
1495
- }), f = /* @__PURE__ */ W("div", {
1495
+ }), f = /* @__PURE__ */ G("div", {
1496
1496
  className: "flex min-w-0 flex-1 flex-col text-left",
1497
- children: [/* @__PURE__ */ U("p", {
1497
+ children: [/* @__PURE__ */ W("p", {
1498
1498
  className: "truncate font-medium leading-snug",
1499
1499
  children: l
1500
- }), u ? /* @__PURE__ */ U("p", {
1501
- className: J("truncate text-xs leading-4", rr[e]),
1500
+ }), u ? /* @__PURE__ */ W("p", {
1501
+ className: Y("truncate text-xs leading-4", nr[e]),
1502
1502
  children: u
1503
1503
  }) : null]
1504
- }), p = o ? /* @__PURE__ */ W("button", {
1504
+ }), p = o ? /* @__PURE__ */ G("button", {
1505
1505
  type: "button",
1506
1506
  onClick: o,
1507
1507
  "aria-label": s,
1508
- className: J("flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors", e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"),
1508
+ className: Y("flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors", e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"),
1509
1509
  children: [d, f]
1510
- }) : /* @__PURE__ */ W(H, { children: [d, f] });
1511
- return /* @__PURE__ */ W("div", {
1510
+ }) : /* @__PURE__ */ G(U, { children: [d, f] });
1511
+ return /* @__PURE__ */ G("div", {
1512
1512
  className: "flex items-center gap-3 px-3 py-2",
1513
- children: [p, c ? /* @__PURE__ */ U("div", {
1513
+ children: [p, c ? /* @__PURE__ */ W("div", {
1514
1514
  className: "shrink-0",
1515
1515
  children: c
1516
1516
  }) : null]
@@ -1518,8 +1518,8 @@ var rr = {
1518
1518
  };
1519
1519
  //#endregion
1520
1520
  //#region src/components/MessageAttachment/_shared/triggerDownload.ts
1521
- async function sr(e, t) {
1522
- let n = t ?? Z(e);
1521
+ async function or(e, t) {
1522
+ let n = t ?? Q(e);
1523
1523
  try {
1524
1524
  let t = await fetch(e, { mode: "cors" });
1525
1525
  if (!t.ok) throw Error(`HTTP ${t.status}`);
@@ -1534,15 +1534,15 @@ async function sr(e, t) {
1534
1534
  }
1535
1535
  //#endregion
1536
1536
  //#region src/components/MessageAttachment/File/index.tsx
1537
- var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a }) => a && a.length > 0 ? a : e ? [{
1537
+ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a }) => a && a.length > 0 ? a : e ? [{
1538
1538
  src: e,
1539
1539
  filename: t,
1540
1540
  fileSize: n,
1541
1541
  mimeType: r,
1542
1542
  title: i
1543
- }] : [], lr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
1544
- let a = t.filename ?? Z(t.src);
1545
- return /* @__PURE__ */ U(or, {
1543
+ }] : [], cr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
1544
+ let a = t.filename ?? Q(t.src);
1545
+ return /* @__PURE__ */ W(ar, {
1546
1546
  variant: e,
1547
1547
  filename: a,
1548
1548
  title: t.title,
@@ -1552,8 +1552,8 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1552
1552
  activateLabel: `Download ${a}`,
1553
1553
  trailingAction: i
1554
1554
  });
1555
- }, ur = ({ state: e, src: t, filename: n, fileSize: r, mimeType: i, title: a, items: o, text: s, groupPosition: c, onClick: l, onDismiss: u }) => {
1556
- let d = qn(e), f = e === "composer" && !!u, p = cr({
1555
+ }, lr = ({ state: e, src: t, filename: n, fileSize: r, mimeType: i, title: a, items: o, text: s, groupPosition: c, onClick: l, onDismiss: u }) => {
1556
+ let d = Kn(e), f = e === "composer" && !!u, p = sr({
1557
1557
  src: t,
1558
1558
  filename: n,
1559
1559
  fileSize: r,
@@ -1564,73 +1564,73 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1564
1564
  if (l?.(e) === !1) return;
1565
1565
  let t = p[e];
1566
1566
  if (!t) return;
1567
- let n = t.filename ?? Z(t.src);
1568
- sr(t.src, n);
1567
+ let n = t.filename ?? Q(t.src);
1568
+ or(t.src, n);
1569
1569
  };
1570
1570
  if (p.length === 0) return null;
1571
- let h = /* @__PURE__ */ U("span", {
1572
- className: J("flex size-8 items-center justify-center rounded-full", d === "dark" ? "text-white/70" : "text-black/70"),
1571
+ let h = /* @__PURE__ */ W("span", {
1572
+ className: Y("flex size-8 items-center justify-center rounded-full", d === "dark" ? "text-white/70" : "text-black/70"),
1573
1573
  "aria-hidden": !0,
1574
- children: /* @__PURE__ */ U(Ne, {
1574
+ children: /* @__PURE__ */ W(Me, {
1575
1575
  className: "size-5",
1576
1576
  weight: "bold"
1577
1577
  })
1578
1578
  });
1579
- return /* @__PURE__ */ U(Gn, {
1579
+ return /* @__PURE__ */ W(Wn, {
1580
1580
  variant: d,
1581
1581
  text: s,
1582
1582
  groupPosition: c,
1583
1583
  "data-testid": "file-attachment",
1584
- children: /* @__PURE__ */ U("div", {
1584
+ children: /* @__PURE__ */ W("div", {
1585
1585
  className: "flex flex-col gap-2",
1586
- children: p.map((e, t) => /* @__PURE__ */ U(lr, {
1586
+ children: p.map((e, t) => /* @__PURE__ */ W(cr, {
1587
1587
  variant: d,
1588
1588
  item: e,
1589
1589
  index: t,
1590
1590
  onActivate: m,
1591
- trailingAction: f && t === 0 ? /* @__PURE__ */ U(Kn, {
1591
+ trailingAction: f && t === 0 ? /* @__PURE__ */ W(Gn, {
1592
1592
  onClick: u,
1593
1593
  variant: "inline"
1594
1594
  }) : h
1595
1595
  }, `${e.src}-${t}`))
1596
1596
  })
1597
1597
  });
1598
- }, dr = {
1599
- Composer: (e) => /* @__PURE__ */ U(ur, {
1598
+ }, ur = {
1599
+ Composer: (e) => /* @__PURE__ */ W(lr, {
1600
1600
  ...e,
1601
1601
  state: "composer"
1602
1602
  }),
1603
- Sent: (e) => /* @__PURE__ */ U(ur, {
1603
+ Sent: (e) => /* @__PURE__ */ W(lr, {
1604
1604
  ...e,
1605
1605
  state: "sent"
1606
1606
  }),
1607
- Received: (e) => /* @__PURE__ */ U(ur, {
1607
+ Received: (e) => /* @__PURE__ */ W(lr, {
1608
1608
  ...e,
1609
1609
  state: "received"
1610
1610
  })
1611
- }, fr = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", pr = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", mr = ({ onPrev: e, onNext: t, prevLabel: n = "Previous", nextLabel: r = "Next" }) => /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("button", {
1611
+ }, dr = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", fr = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", pr = ({ onPrev: e, onNext: t, prevLabel: n = "Previous", nextLabel: r = "Next" }) => /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("button", {
1612
1612
  type: "button",
1613
1613
  onClick: e,
1614
1614
  "aria-label": n,
1615
- className: `${pr} left-4`,
1616
- children: /* @__PURE__ */ U(ke, {
1615
+ className: `${fr} left-4`,
1616
+ children: /* @__PURE__ */ W(Oe, {
1617
1617
  size: 20,
1618
1618
  weight: "bold",
1619
1619
  "aria-hidden": !0
1620
1620
  })
1621
- }), /* @__PURE__ */ U("button", {
1621
+ }), /* @__PURE__ */ W("button", {
1622
1622
  type: "button",
1623
1623
  onClick: t,
1624
1624
  "aria-label": r,
1625
- className: `${pr} right-4`,
1626
- children: /* @__PURE__ */ U(Ae, {
1625
+ className: `${fr} right-4`,
1626
+ children: /* @__PURE__ */ W(ke, {
1627
1627
  size: 20,
1628
1628
  weight: "bold",
1629
1629
  "aria-hidden": !0
1630
1630
  })
1631
- })] }), hr = ({ url: e, filename: t, variant: n = "pill", label: r = "Download", iconOnly: i, tone: a = "dark", onTriggered: o }) => {
1631
+ })] }), mr = ({ url: e, filename: t, variant: n = "pill", label: r = "Download", iconOnly: i, tone: a = "dark", onTriggered: o }) => {
1632
1632
  let [s, c] = h(!1), u = l((n) => {
1633
- n.stopPropagation(), !s && (c(!0), sr(e, t).catch(() => {}).finally(() => {
1633
+ n.stopPropagation(), !s && (c(!0), or(e, t).catch(() => {}).finally(() => {
1634
1634
  c(!1), o?.();
1635
1635
  }));
1636
1636
  }, [
@@ -1639,63 +1639,63 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1639
1639
  t,
1640
1640
  o
1641
1641
  ]), d = i ?? n !== "pill", f = {
1642
- className: J(n === "pill" ? "size-4" : "size-5", "shrink-0"),
1642
+ className: Y(n === "pill" ? "size-4" : "size-5", "shrink-0"),
1643
1643
  weight: "bold"
1644
1644
  };
1645
- return n === "inline" ? /* @__PURE__ */ U("button", {
1645
+ return n === "inline" ? /* @__PURE__ */ W("button", {
1646
1646
  type: "button",
1647
1647
  onClick: u,
1648
1648
  disabled: s,
1649
1649
  "aria-label": r,
1650
- className: J("flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70", {
1650
+ className: Y("flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70", {
1651
1651
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
1652
1652
  light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
1653
1653
  }[a]),
1654
- children: s ? /* @__PURE__ */ U(Me, {
1654
+ children: s ? /* @__PURE__ */ W(je, {
1655
1655
  className: "size-4 animate-spin",
1656
1656
  weight: "bold",
1657
1657
  "aria-hidden": !0
1658
- }) : /* @__PURE__ */ U(Ne, {
1658
+ }) : /* @__PURE__ */ W(Me, {
1659
1659
  className: "size-5 shrink-0",
1660
1660
  weight: "bold",
1661
1661
  "aria-hidden": !0
1662
1662
  })
1663
- }) : n === "viewer" ? /* @__PURE__ */ U("button", {
1663
+ }) : n === "viewer" ? /* @__PURE__ */ W("button", {
1664
1664
  type: "button",
1665
1665
  onClick: u,
1666
1666
  disabled: s,
1667
1667
  "aria-label": r,
1668
- className: fr,
1669
- children: U(s ? Me : Ne, {
1668
+ className: dr,
1669
+ children: W(s ? je : Me, {
1670
1670
  size: 20,
1671
1671
  weight: "bold",
1672
1672
  "aria-hidden": !0
1673
1673
  })
1674
- }) : /* @__PURE__ */ W("button", {
1674
+ }) : /* @__PURE__ */ G("button", {
1675
1675
  type: "button",
1676
1676
  onClick: u,
1677
1677
  disabled: s,
1678
1678
  "aria-label": d ? r : void 0,
1679
- className: J("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", a === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"),
1680
- children: [s ? /* @__PURE__ */ U(Me, {
1679
+ className: Y("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", a === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"),
1680
+ children: [s ? /* @__PURE__ */ W(je, {
1681
1681
  className: "size-4 animate-spin",
1682
1682
  weight: "bold",
1683
1683
  "aria-hidden": !0
1684
- }) : /* @__PURE__ */ U(Ne, {
1684
+ }) : /* @__PURE__ */ W(Me, {
1685
1685
  ...f,
1686
1686
  "aria-hidden": !0
1687
1687
  }), d ? null : r]
1688
1688
  });
1689
- }, gr = (e, t, n) => Math.min(Math.max(e, t), n), _r = ({ length: e, initialIndex: t, open: n }) => {
1690
- let r = gr(t, 0, Math.max(e - 1, 0)), [i, a] = h(r);
1689
+ }, hr = (e, t, n) => Math.min(Math.max(e, t), n), gr = ({ length: e, initialIndex: t, open: n }) => {
1690
+ let r = hr(t, 0, Math.max(e - 1, 0)), [i, a] = h(r);
1691
1691
  d(() => {
1692
- n && a(gr(t, 0, Math.max(e - 1, 0)));
1692
+ n && a(hr(t, 0, Math.max(e - 1, 0)));
1693
1693
  }, [
1694
1694
  n,
1695
1695
  t,
1696
1696
  e
1697
1697
  ]), d(() => {
1698
- a((t) => gr(t, 0, Math.max(e - 1, 0)));
1698
+ a((t) => hr(t, 0, Math.max(e - 1, 0)));
1699
1699
  }, [e]);
1700
1700
  let o = l(() => {
1701
1701
  e <= 1 || a((t) => t <= 0 ? e - 1 : t - 1);
@@ -1720,7 +1720,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1720
1720
  prev: o,
1721
1721
  next: s
1722
1722
  };
1723
- }, vr = ({ open: e, onClose: t, ariaLabel: n, counter: r, actions: i, children: a, "data-testid": o }) => {
1723
+ }, _r = ({ open: e, onClose: t, ariaLabel: n, counter: r, actions: i, children: a, "data-testid": o }) => {
1724
1724
  let s = m(null), c = m(null);
1725
1725
  return d(() => {
1726
1726
  let t = s.current;
@@ -1756,7 +1756,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1756
1756
  else t.removeAttribute("open");
1757
1757
  }
1758
1758
  }
1759
- }, [e]), /* @__PURE__ */ W("dialog", {
1759
+ }, [e]), /* @__PURE__ */ G("dialog", {
1760
1760
  ref: s,
1761
1761
  className: "mes-media-viewer",
1762
1762
  "aria-label": n ?? "Attachment viewer",
@@ -1767,63 +1767,63 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1767
1767
  onClick: (e) => {
1768
1768
  e.target === s.current && t();
1769
1769
  },
1770
- children: [/* @__PURE__ */ W("div", {
1770
+ children: [/* @__PURE__ */ G("div", {
1771
1771
  className: "pointer-events-none absolute inset-x-3 top-3 z-[1] flex items-center justify-between gap-3",
1772
- children: [r ? /* @__PURE__ */ U("span", {
1772
+ children: [r ? /* @__PURE__ */ W("span", {
1773
1773
  className: "pointer-events-auto inline-flex items-center rounded-full bg-white/[0.12] px-3 py-1.5 text-[13px] font-medium leading-none tabular-nums text-white",
1774
1774
  children: r
1775
- }) : null, /* @__PURE__ */ W("div", {
1775
+ }) : null, /* @__PURE__ */ G("div", {
1776
1776
  className: "pointer-events-auto ml-auto inline-flex items-center gap-2",
1777
- children: [i, /* @__PURE__ */ U("button", {
1777
+ children: [i, /* @__PURE__ */ W("button", {
1778
1778
  ref: c,
1779
1779
  type: "button",
1780
1780
  onClick: t,
1781
1781
  "aria-label": "Close viewer",
1782
- className: fr,
1783
- children: /* @__PURE__ */ U(Je, {
1782
+ className: dr,
1783
+ children: /* @__PURE__ */ W(qe, {
1784
1784
  size: 20,
1785
1785
  weight: "bold",
1786
1786
  "aria-hidden": !0
1787
1787
  })
1788
1788
  })]
1789
1789
  })]
1790
- }), /* @__PURE__ */ U("div", {
1790
+ }), /* @__PURE__ */ W("div", {
1791
1791
  className: "box-border flex h-full w-full items-center justify-center px-6 py-16",
1792
1792
  children: a
1793
1793
  })]
1794
1794
  });
1795
- }, yr = ({ open: e, items: t, initialIndex: n = 0, onClose: r }) => {
1796
- let { index: i, prev: a, next: o } = _r({
1795
+ }, vr = ({ open: e, items: t, initialIndex: n = 0, onClose: r }) => {
1796
+ let { index: i, prev: a, next: o } = gr({
1797
1797
  length: t.length,
1798
1798
  initialIndex: n,
1799
1799
  open: e
1800
- }), s = t[i], c = p(() => s?.filename ?? (s ? Z(s.src) : "image"), [s]);
1801
- return s ? /* @__PURE__ */ W(vr, {
1800
+ }), s = t[i], c = p(() => s?.filename ?? (s ? Q(s.src) : "image"), [s]);
1801
+ return s ? /* @__PURE__ */ G(_r, {
1802
1802
  open: e,
1803
1803
  onClose: r,
1804
1804
  ariaLabel: c,
1805
1805
  counter: t.length > 1 ? `${i + 1} / ${t.length}` : void 0,
1806
- actions: /* @__PURE__ */ U(hr, {
1806
+ actions: /* @__PURE__ */ W(mr, {
1807
1807
  url: s.src,
1808
1808
  filename: c,
1809
1809
  variant: "viewer",
1810
1810
  label: `Download ${c}`
1811
1811
  }),
1812
1812
  "data-testid": "image-viewer",
1813
- children: [e ? /* @__PURE__ */ U("img", {
1813
+ children: [e ? /* @__PURE__ */ W("img", {
1814
1814
  src: s.src,
1815
1815
  alt: s.alt ?? c,
1816
1816
  draggable: !1,
1817
1817
  decoding: "async",
1818
1818
  className: "block h-auto max-h-[calc(100dvh-128px)] w-auto max-w-[min(96vw,1400px)] select-none object-contain"
1819
- }, `${i}:${s.src}`) : null, t.length > 1 ? /* @__PURE__ */ U(mr, {
1819
+ }, `${i}:${s.src}`) : null, t.length > 1 ? /* @__PURE__ */ W(pr, {
1820
1820
  onPrev: a,
1821
1821
  onNext: o,
1822
1822
  prevLabel: "Previous image",
1823
1823
  nextLabel: "Next image"
1824
1824
  }) : null]
1825
1825
  }) : null;
1826
- }, br = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", xr = {
1826
+ }, yr = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", br = {
1827
1827
  1: ["rounded-[18px]"],
1828
1828
  2: ["rounded-l-[18px]", "rounded-r-[18px]"],
1829
1829
  3: [
@@ -1837,55 +1837,55 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1837
1837
  "rounded-bl-[18px]",
1838
1838
  "rounded-br-[18px]"
1839
1839
  ]
1840
- }, Sr = "--mes-single-width-cap", Cr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", wr = 436, Tr = ({ tiles: e, onTileActivate: t, maxVisible: n = 4, singleAspectRatio: r, className: i }) => {
1840
+ }, xr = "--mes-single-width-cap", Sr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Cr = 436, wr = ({ tiles: e, onTileActivate: t, maxVisible: n = 4, singleAspectRatio: r, className: i }) => {
1841
1841
  let a = e.length;
1842
1842
  if (a === 0) return null;
1843
- let o = e.slice(0, Math.min(a, n)), s = a - o.length, c = s > 0 ? /* @__PURE__ */ W("div", {
1843
+ let o = e.slice(0, Math.min(a, n)), s = a - o.length, c = s > 0 ? /* @__PURE__ */ G("div", {
1844
1844
  "aria-hidden": !0,
1845
1845
  className: "absolute inset-0 flex items-center justify-center bg-[#040403]/50 text-2xl font-bold leading-[28px] tracking-[-0.24px] text-white",
1846
1846
  children: ["+", s]
1847
1847
  }) : null, l = (e, n, r) => {
1848
- let i = J(br, "h-full w-full", xr[o.length]?.[n]);
1849
- return t ? /* @__PURE__ */ W("button", {
1848
+ let i = Y(yr, "h-full w-full", br[o.length]?.[n]);
1849
+ return t ? /* @__PURE__ */ G("button", {
1850
1850
  type: "button",
1851
1851
  onClick: () => t(n),
1852
1852
  "aria-label": e.ariaLabel ?? `Open media ${n + 1}`,
1853
- className: J(i, e.cursorClassName ?? "cursor-zoom-in"),
1853
+ className: Y(i, e.cursorClassName ?? "cursor-zoom-in"),
1854
1854
  children: [e.content, r]
1855
- }, n) : /* @__PURE__ */ W("div", {
1855
+ }, n) : /* @__PURE__ */ G("div", {
1856
1856
  className: i,
1857
1857
  children: [e.content, r]
1858
1858
  }, n);
1859
1859
  }, u;
1860
1860
  return r && (u = {
1861
1861
  aspectRatio: r,
1862
- width: `min(var(${Sr}), ${Math.round(wr * r * 100) / 100}px)`,
1862
+ width: `min(var(${xr}), ${Math.round(Cr * r * 100) / 100}px)`,
1863
1863
  maxWidth: "100%"
1864
- }), o.length === 1 ? /* @__PURE__ */ U("div", {
1865
- className: J(r ? Cr : "aspect-square w-full", i),
1864
+ }), o.length === 1 ? /* @__PURE__ */ W("div", {
1865
+ className: Y(r ? Sr : "aspect-square w-full", i),
1866
1866
  style: u,
1867
1867
  children: l(o[0], 0, c)
1868
- }) : o.length === 2 ? /* @__PURE__ */ U("div", {
1869
- className: J("grid aspect-[16/9] w-full grid-cols-2 gap-0.5", i),
1868
+ }) : o.length === 2 ? /* @__PURE__ */ W("div", {
1869
+ className: Y("grid aspect-[16/9] w-full grid-cols-2 gap-0.5", i),
1870
1870
  children: o.map((e, t) => l(e, t, t === o.length - 1 ? c : null))
1871
- }) : o.length === 3 ? /* @__PURE__ */ W("div", {
1872
- className: J("grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5", i),
1871
+ }) : o.length === 3 ? /* @__PURE__ */ G("div", {
1872
+ className: Y("grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5", i),
1873
1873
  children: [
1874
- /* @__PURE__ */ U("div", {
1874
+ /* @__PURE__ */ W("div", {
1875
1875
  className: "row-span-2",
1876
1876
  children: l(o[0], 0)
1877
1877
  }),
1878
1878
  l(o[1], 1),
1879
1879
  l(o[2], 2, c)
1880
1880
  ]
1881
- }) : /* @__PURE__ */ U("div", {
1882
- className: J("grid aspect-[379/286] w-full grid-cols-2 grid-rows-2 gap-0.5", i),
1881
+ }) : /* @__PURE__ */ W("div", {
1882
+ className: Y("grid aspect-[379/286] w-full grid-cols-2 grid-rows-2 gap-0.5", i),
1883
1883
  children: o.map((e, t) => {
1884
1884
  let n = s > 0 && t === o.length - 1;
1885
1885
  return l(e, t, n ? c : null);
1886
1886
  })
1887
1887
  });
1888
- }, Er = ({ src: e, suppliedRatio: t, fallbackRatio: n }) => {
1888
+ }, Tr = ({ src: e, suppliedRatio: t, fallbackRatio: n }) => {
1889
1889
  let [r, i] = o.useState(), a = o.useCallback((t) => {
1890
1890
  if (!t || t.naturalWidth <= 0 || t.naturalHeight <= 0 || e === void 0) return;
1891
1891
  let n = t.naturalWidth / t.naturalHeight;
@@ -1899,7 +1899,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1899
1899
  imgRef: a,
1900
1900
  onLoad: s
1901
1901
  };
1902
- }, Dr = (e) => {
1902
+ }, Er = (e) => {
1903
1903
  let [t, n] = h(!1), [r, i] = h(0);
1904
1904
  return {
1905
1905
  viewerOpen: t,
@@ -1909,9 +1909,9 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1909
1909
  }, [e]),
1910
1910
  closeViewer: l(() => n(!1), [])
1911
1911
  };
1912
- }, Or = ({ item: e, index: t, totalCount: n, fallbackLoading: r, imgRef: i, onLoad: o }) => ({
1912
+ }, Dr = ({ item: e, index: t, totalCount: n, fallbackLoading: r, imgRef: i, onLoad: o }) => ({
1913
1913
  ariaLabel: `Open image ${t + 1} of ${n}`,
1914
- content: /* @__PURE__ */ U("img", {
1914
+ content: /* @__PURE__ */ W("img", {
1915
1915
  ref: i,
1916
1916
  src: a(e.src) ?? e.src,
1917
1917
  alt: e.alt ?? "",
@@ -1923,24 +1923,24 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1923
1923
  onLoad: o,
1924
1924
  className: "absolute inset-0 size-full object-cover"
1925
1925
  })
1926
- }), kr = ({ src: e, alt: t, items: n }) => n && n.length > 0 ? n : e ? [{
1926
+ }), Or = ({ src: e, alt: t, items: n }) => n && n.length > 0 ? n : e ? [{
1927
1927
  src: e,
1928
1928
  alt: t
1929
- }] : [], Ar = (e, t) => e.map((n, r) => ({
1929
+ }] : [], kr = (e, t) => e.map((n, r) => ({
1930
1930
  src: n.src,
1931
1931
  alt: n.alt,
1932
1932
  filename: t && e.length === 1 ? t : t ? `${t} (${r + 1})` : void 0
1933
- })), jr = ({ src: e, alt: t, filename: n, loading: r = "lazy", onClick: i, onDismiss: o }) => {
1934
- let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Dr(i);
1935
- return /* @__PURE__ */ W("div", {
1933
+ })), Ar = ({ src: e, alt: t, filename: n, loading: r = "lazy", onClick: i, onDismiss: o }) => {
1934
+ let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Er(i);
1935
+ return /* @__PURE__ */ G("div", {
1936
1936
  className: "relative w-fit",
1937
1937
  children: [
1938
- /* @__PURE__ */ U("button", {
1938
+ /* @__PURE__ */ W("button", {
1939
1939
  type: "button",
1940
1940
  onClick: () => l(0),
1941
1941
  "aria-label": "Open image",
1942
1942
  className: "block size-[280px] cursor-zoom-in overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
1943
- children: /* @__PURE__ */ U("img", {
1943
+ children: /* @__PURE__ */ W("img", {
1944
1944
  src: a(e) ?? e,
1945
1945
  alt: t ?? "",
1946
1946
  draggable: !1,
@@ -1949,13 +1949,13 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1949
1949
  className: "size-full object-cover"
1950
1950
  })
1951
1951
  }),
1952
- o ? /* @__PURE__ */ U("div", {
1952
+ o ? /* @__PURE__ */ W("div", {
1953
1953
  className: "absolute right-2 top-2 z-10",
1954
- children: /* @__PURE__ */ U(Kn, { onClick: o })
1954
+ children: /* @__PURE__ */ W(Gn, { onClick: o })
1955
1955
  }) : null,
1956
- /* @__PURE__ */ U(yr, {
1956
+ /* @__PURE__ */ W(vr, {
1957
1957
  open: s,
1958
- items: Ar([{
1958
+ items: kr([{
1959
1959
  src: e,
1960
1960
  alt: t
1961
1961
  }], n),
@@ -1964,18 +1964,18 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1964
1964
  })
1965
1965
  ]
1966
1966
  });
1967
- }, Mr = 326 / 246, Nr = ({ state: e, src: t, alt: n, filename: r, items: i, text: a, groupPosition: o, loading: s = "lazy", onClick: c }) => {
1968
- let l = kr({
1967
+ }, jr = 326 / 246, Mr = ({ state: e, src: t, alt: n, filename: r, items: i, text: a, groupPosition: o, loading: s = "lazy", onClick: c }) => {
1968
+ let l = Or({
1969
1969
  src: t,
1970
1970
  alt: n,
1971
1971
  items: i
1972
- }), u = qn(e), { viewerOpen: d, viewerIndex: f, handleActivate: p, closeViewer: m } = Dr(c), h = l.length === 1, g = h ? l[0] : void 0, _ = Er({
1972
+ }), u = Kn(e), { viewerOpen: d, viewerIndex: f, handleActivate: p, closeViewer: m } = Er(c), h = l.length === 1, g = h ? l[0] : void 0, _ = Tr({
1973
1973
  src: g?.src,
1974
1974
  suppliedRatio: g?.width && g?.height ? g.width / g.height : void 0,
1975
- fallbackRatio: Mr
1975
+ fallbackRatio: jr
1976
1976
  });
1977
1977
  if (l.length === 0) return null;
1978
- let v = l.map((e, t) => Or({
1978
+ let v = l.map((e, t) => Dr({
1979
1979
  item: e,
1980
1980
  index: t,
1981
1981
  totalCount: l.length,
@@ -1983,7 +1983,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1983
1983
  imgRef: h ? _.imgRef : void 0,
1984
1984
  onLoad: h ? _.onLoad : void 0
1985
1985
  }));
1986
- return /* @__PURE__ */ W(Gn, {
1986
+ return /* @__PURE__ */ G(Wn, {
1987
1987
  variant: u,
1988
1988
  text: a,
1989
1989
  groupPosition: o,
@@ -1992,65 +1992,65 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1992
1992
  paddingClassName: "p-0.5",
1993
1993
  radiusClassName: "rounded-[20px]",
1994
1994
  "data-testid": "image-attachment",
1995
- children: [/* @__PURE__ */ U("div", {
1995
+ children: [/* @__PURE__ */ W("div", {
1996
1996
  className: "relative",
1997
- children: /* @__PURE__ */ U(Tr, {
1997
+ children: /* @__PURE__ */ W(wr, {
1998
1998
  tiles: v,
1999
1999
  onTileActivate: p,
2000
2000
  singleAspectRatio: h ? _.ratio : void 0
2001
2001
  })
2002
- }), /* @__PURE__ */ U(yr, {
2002
+ }), /* @__PURE__ */ W(vr, {
2003
2003
  open: d,
2004
- items: Ar(l, r),
2004
+ items: kr(l, r),
2005
2005
  initialIndex: f,
2006
2006
  onClose: m
2007
2007
  })]
2008
2008
  });
2009
- }, Pr = {
2010
- Composer: (e) => /* @__PURE__ */ U(jr, { ...e }),
2011
- Sent: (e) => /* @__PURE__ */ U(Nr, {
2009
+ }, Nr = {
2010
+ Composer: (e) => /* @__PURE__ */ W(Ar, { ...e }),
2011
+ Sent: (e) => /* @__PURE__ */ W(Mr, {
2012
2012
  ...e,
2013
2013
  state: "sent"
2014
2014
  }),
2015
- Received: (e) => /* @__PURE__ */ U(Nr, {
2015
+ Received: (e) => /* @__PURE__ */ W(Mr, {
2016
2016
  ...e,
2017
2017
  state: "received"
2018
2018
  })
2019
- }, Fr = ({ open: e, items: t, initialIndex: n = 0, onClose: r }) => {
2020
- let { index: i, prev: a, next: o } = _r({
2019
+ }, Pr = ({ open: e, items: t, initialIndex: n = 0, onClose: r }) => {
2020
+ let { index: i, prev: a, next: o } = gr({
2021
2021
  length: t.length,
2022
2022
  initialIndex: n,
2023
2023
  open: e
2024
- }), s = t[i], c = p(() => s?.filename ?? (s ? Z(s.src) : "document"), [s]), l = p(() => s ? Ir(s.src) : void 0, [s]);
2025
- return !s || !l ? null : /* @__PURE__ */ W(vr, {
2024
+ }), s = t[i], c = p(() => s?.filename ?? (s ? Q(s.src) : "document"), [s]), l = p(() => s ? Fr(s.src) : void 0, [s]);
2025
+ return !s || !l ? null : /* @__PURE__ */ G(_r, {
2026
2026
  open: e,
2027
2027
  onClose: r,
2028
2028
  ariaLabel: c,
2029
2029
  counter: t.length > 1 ? `${i + 1} / ${t.length}` : void 0,
2030
2030
  "data-testid": "pdf-viewer",
2031
- children: [/* @__PURE__ */ U("iframe", {
2031
+ children: [/* @__PURE__ */ W("iframe", {
2032
2032
  src: l,
2033
2033
  title: c,
2034
2034
  className: "block h-[calc(100dvh-128px)] w-[min(96vw,1400px)] border-0 bg-white",
2035
2035
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
2036
- }, `${i}:${s.src}`), t.length > 1 ? /* @__PURE__ */ U(mr, {
2036
+ }, `${i}:${s.src}`), t.length > 1 ? /* @__PURE__ */ W(pr, {
2037
2037
  onPrev: a,
2038
2038
  onNext: o,
2039
2039
  prevLabel: "Previous document",
2040
2040
  nextLabel: "Next document"
2041
2041
  }) : null]
2042
2042
  });
2043
- }, Ir = (e) => {
2043
+ }, Fr = (e) => {
2044
2044
  let t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), r = t === -1 ? "" : e.slice(t + 1), i = new URLSearchParams(r);
2045
2045
  return i.has("toolbar") || i.set("toolbar", "0"), i.has("navpanes") || i.set("navpanes", "0"), `${n}#${i.toString()}`;
2046
- }, Lr = ({ src: e, filename: t, fileSize: n, title: r, items: i }) => i && i.length > 0 ? i : e ? [{
2046
+ }, Ir = ({ src: e, filename: t, fileSize: n, title: r, items: i }) => i && i.length > 0 ? i : e ? [{
2047
2047
  src: e,
2048
2048
  filename: t,
2049
2049
  fileSize: n,
2050
2050
  title: r
2051
- }] : [], Rr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
2052
- let a = t.filename ?? Z(t.src);
2053
- return /* @__PURE__ */ U(or, {
2051
+ }] : [], Lr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
2052
+ let a = t.filename ?? Q(t.src);
2053
+ return /* @__PURE__ */ W(ar, {
2054
2054
  variant: e,
2055
2055
  filename: a,
2056
2056
  title: t.title,
@@ -2060,38 +2060,38 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2060
2060
  activateLabel: `Open ${a}`,
2061
2061
  trailingAction: i
2062
2062
  });
2063
- }, zr = ({ state: e, src: t, filename: n, fileSize: r, title: i, items: a, text: o, groupPosition: s, onClick: c, onDismiss: l }) => {
2064
- let u = qn(e), d = Lr({
2063
+ }, Rr = ({ state: e, src: t, filename: n, fileSize: r, title: i, items: a, text: o, groupPosition: s, onClick: c, onDismiss: l }) => {
2064
+ let u = Kn(e), d = Ir({
2065
2065
  src: t,
2066
2066
  filename: n,
2067
2067
  fileSize: r,
2068
2068
  title: i,
2069
2069
  items: a
2070
- }), { viewerOpen: f, viewerIndex: p, handleActivate: m, closeViewer: h } = Dr(c), g = e === "composer" && !!l;
2070
+ }), { viewerOpen: f, viewerIndex: p, handleActivate: m, closeViewer: h } = Er(c), g = e === "composer" && !!l;
2071
2071
  if (d.length === 0) return null;
2072
2072
  let _ = d.map((e) => ({
2073
2073
  src: e.src,
2074
- filename: e.filename ?? Z(e.src)
2074
+ filename: e.filename ?? Q(e.src)
2075
2075
  }));
2076
- return /* @__PURE__ */ W(Gn, {
2076
+ return /* @__PURE__ */ G(Wn, {
2077
2077
  variant: u,
2078
2078
  text: o,
2079
2079
  groupPosition: s,
2080
2080
  "data-testid": "pdf-attachment",
2081
- children: [/* @__PURE__ */ U("div", {
2081
+ children: [/* @__PURE__ */ W("div", {
2082
2082
  className: "flex flex-col gap-2",
2083
2083
  children: d.map((t, n) => {
2084
- let r = t.filename ?? Z(t.src), i = g && n === 0 ? /* @__PURE__ */ U(Kn, {
2084
+ let r = t.filename ?? Q(t.src), i = g && n === 0 ? /* @__PURE__ */ W(Gn, {
2085
2085
  onClick: l,
2086
2086
  variant: "inline"
2087
- }) : e === "composer" ? void 0 : /* @__PURE__ */ U(hr, {
2087
+ }) : e === "composer" ? void 0 : /* @__PURE__ */ W(mr, {
2088
2088
  url: t.src,
2089
2089
  filename: r,
2090
2090
  variant: "inline",
2091
2091
  label: `Download ${r}`,
2092
2092
  tone: u
2093
2093
  });
2094
- return /* @__PURE__ */ U(Rr, {
2094
+ return /* @__PURE__ */ W(Lr, {
2095
2095
  variant: u,
2096
2096
  item: t,
2097
2097
  index: n,
@@ -2099,28 +2099,28 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2099
2099
  trailingAction: i
2100
2100
  }, `${t.src}-${n}`);
2101
2101
  })
2102
- }), /* @__PURE__ */ U(Fr, {
2102
+ }), /* @__PURE__ */ W(Pr, {
2103
2103
  open: f,
2104
2104
  items: _,
2105
2105
  initialIndex: p,
2106
2106
  onClose: h
2107
2107
  })]
2108
2108
  });
2109
- }, Br = {
2110
- Composer: (e) => /* @__PURE__ */ U(zr, {
2109
+ }, zr = {
2110
+ Composer: (e) => /* @__PURE__ */ W(Rr, {
2111
2111
  ...e,
2112
2112
  state: "composer"
2113
2113
  }),
2114
- Sent: (e) => /* @__PURE__ */ U(zr, {
2114
+ Sent: (e) => /* @__PURE__ */ W(Rr, {
2115
2115
  ...e,
2116
2116
  state: "sent"
2117
2117
  }),
2118
- Received: (e) => /* @__PURE__ */ U(zr, {
2118
+ Received: (e) => /* @__PURE__ */ W(Rr, {
2119
2119
  ...e,
2120
2120
  state: "received"
2121
2121
  })
2122
- }, Vr = 150, Hr = ({ open: e, items: t, initialIndex: n = 0, onClose: i }) => {
2123
- let { index: a, prev: o, next: s } = _r({
2122
+ }, Br = 150, Vr = ({ open: e, items: t, initialIndex: n = 0, onClose: i }) => {
2123
+ let { index: a, prev: o, next: s } = gr({
2124
2124
  length: t.length,
2125
2125
  initialIndex: n,
2126
2126
  open: e
@@ -2132,17 +2132,17 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2132
2132
  e && !u && f(!0), d(() => {
2133
2133
  if (e || !u) return;
2134
2134
  c.current?.pause();
2135
- let t = window.setTimeout(() => f(!1), Vr);
2135
+ let t = window.setTimeout(() => f(!1), Br);
2136
2136
  return () => window.clearTimeout(t);
2137
2137
  }, [e, u]);
2138
- let g = t[a], _ = p(() => g?.filename ?? (g ? Z(g.src) : "video"), [g]);
2139
- return g ? /* @__PURE__ */ W(vr, {
2138
+ let g = t[a], _ = p(() => g?.filename ?? (g ? Q(g.src) : "video"), [g]);
2139
+ return g ? /* @__PURE__ */ G(_r, {
2140
2140
  open: e,
2141
2141
  onClose: i,
2142
2142
  ariaLabel: _,
2143
2143
  counter: t.length > 1 ? `${a + 1} / ${t.length}` : void 0,
2144
2144
  "data-testid": "video-viewer",
2145
- children: [u ? /* @__PURE__ */ U("video", {
2145
+ children: [u ? /* @__PURE__ */ W("video", {
2146
2146
  ref: c,
2147
2147
  src: g.src,
2148
2148
  poster: g.poster,
@@ -2152,30 +2152,30 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2152
2152
  playsInline: !0,
2153
2153
  preload: g.preload ?? "metadata",
2154
2154
  className: "block h-auto max-h-[calc(100dvh-128px)] w-auto max-w-[min(96vw,1400px)] bg-black",
2155
- children: g.mimeType ? /* @__PURE__ */ U("source", {
2155
+ children: g.mimeType ? /* @__PURE__ */ W("source", {
2156
2156
  src: g.src,
2157
2157
  type: g.mimeType
2158
2158
  }) : null
2159
- }, `${a}:${g.src}`) : null, t.length > 1 ? /* @__PURE__ */ U(mr, {
2159
+ }, `${a}:${g.src}`) : null, t.length > 1 ? /* @__PURE__ */ W(pr, {
2160
2160
  onPrev: o,
2161
2161
  onNext: s,
2162
2162
  prevLabel: "Previous video",
2163
2163
  nextLabel: "Next video"
2164
2164
  }) : null]
2165
2165
  }) : null;
2166
- }, Ur = 1, Wr = 4 / 5, Gr = 16 / 9, Kr = () => /* @__PURE__ */ U("div", {
2166
+ }, Hr = 1, Ur = 4 / 5, Wr = 16 / 9, Gr = () => /* @__PURE__ */ W("div", {
2167
2167
  className: "pointer-events-none absolute inset-0 flex items-center justify-center",
2168
- children: /* @__PURE__ */ U("span", {
2168
+ children: /* @__PURE__ */ W("span", {
2169
2169
  className: "flex size-12 items-center justify-center rounded-full bg-black/25 text-white backdrop-blur-[20px]",
2170
- children: /* @__PURE__ */ U(Re, {
2170
+ children: /* @__PURE__ */ W(Le, {
2171
2171
  className: "size-6",
2172
2172
  weight: "fill",
2173
2173
  "aria-hidden": !0
2174
2174
  })
2175
2175
  })
2176
- }), qr = ({ item: e, index: t, showPlayBadge: n = !0, imgRef: r, onLoad: i }) => /* @__PURE__ */ W("div", {
2176
+ }), Kr = ({ item: e, index: t, showPlayBadge: n = !0, imgRef: r, onLoad: i }) => /* @__PURE__ */ G("div", {
2177
2177
  className: "absolute inset-0 size-full bg-[#0d0d0d]",
2178
- children: [e.poster ? /* @__PURE__ */ U("img", {
2178
+ children: [e.poster ? /* @__PURE__ */ W("img", {
2179
2179
  ref: r,
2180
2180
  src: e.poster,
2181
2181
  alt: `Video ${t + 1} thumbnail`,
@@ -2184,25 +2184,25 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2184
2184
  decoding: "async",
2185
2185
  onLoad: i,
2186
2186
  className: "absolute inset-0 size-full object-cover"
2187
- }) : /* @__PURE__ */ U("div", {
2187
+ }) : /* @__PURE__ */ W("div", {
2188
2188
  className: "absolute inset-0 flex items-center justify-center",
2189
- children: /* @__PURE__ */ U(Ke, {
2189
+ children: /* @__PURE__ */ W(Ge, {
2190
2190
  className: "size-16 text-white/30",
2191
2191
  weight: "regular",
2192
2192
  "aria-hidden": !0
2193
2193
  })
2194
- }), n ? /* @__PURE__ */ U(Kr, {}) : null]
2195
- }), Jr = ({ item: e, index: t, totalCount: n, isOverflowTile: r, imgRef: i, onLoad: a }) => ({
2194
+ }), n ? /* @__PURE__ */ W(Gr, {}) : null]
2195
+ }), qr = ({ item: e, index: t, totalCount: n, isOverflowTile: r, imgRef: i, onLoad: a }) => ({
2196
2196
  ariaLabel: `Play video ${t + 1} of ${n}`,
2197
2197
  cursorClassName: "cursor-pointer",
2198
- content: /* @__PURE__ */ U(qr, {
2198
+ content: /* @__PURE__ */ W(Kr, {
2199
2199
  item: e,
2200
2200
  index: t,
2201
2201
  showPlayBadge: !r,
2202
2202
  imgRef: i,
2203
2203
  onLoad: a
2204
2204
  })
2205
- }), Yr = ({ src: e, poster: t, mimeType: n, preload: r, naturalAspectRatio: i, items: a }) => a && a.length > 0 ? r ? a.map((e) => ({
2205
+ }), Jr = ({ src: e, poster: t, mimeType: n, preload: r, naturalAspectRatio: i, items: a }) => a && a.length > 0 ? r ? a.map((e) => ({
2206
2206
  ...e,
2207
2207
  preload: e.preload ?? r
2208
2208
  })) : a : e ? [{
@@ -2211,23 +2211,23 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2211
2211
  mimeType: n,
2212
2212
  preload: r,
2213
2213
  naturalAspectRatio: i
2214
- }] : [], Xr = (e, t) => e.map((n, r) => ({
2214
+ }] : [], Yr = (e, t) => e.map((n, r) => ({
2215
2215
  src: n.src,
2216
2216
  poster: n.poster,
2217
2217
  mimeType: n.mimeType,
2218
2218
  preload: n.preload,
2219
2219
  filename: t && e.length === 1 ? t : t ? `${t} (${r + 1})` : void 0
2220
- })), Zr = ({ src: e, poster: t, mimeType: n, filename: r, preload: i, onClick: a, onDismiss: o }) => {
2221
- let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Dr(a);
2222
- return /* @__PURE__ */ W("div", {
2220
+ })), Xr = ({ src: e, poster: t, mimeType: n, filename: r, preload: i, onClick: a, onDismiss: o }) => {
2221
+ let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Er(a);
2222
+ return /* @__PURE__ */ G("div", {
2223
2223
  className: "relative w-fit",
2224
2224
  children: [
2225
- /* @__PURE__ */ U("button", {
2225
+ /* @__PURE__ */ W("button", {
2226
2226
  type: "button",
2227
2227
  onClick: () => l(0),
2228
2228
  "aria-label": "Play video",
2229
2229
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2230
- children: /* @__PURE__ */ U(qr, {
2230
+ children: /* @__PURE__ */ W(Kr, {
2231
2231
  item: {
2232
2232
  src: e,
2233
2233
  poster: t,
@@ -2236,13 +2236,13 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2236
2236
  index: 0
2237
2237
  })
2238
2238
  }),
2239
- o ? /* @__PURE__ */ U("div", {
2239
+ o ? /* @__PURE__ */ W("div", {
2240
2240
  className: "absolute right-2 top-2 z-10",
2241
- children: /* @__PURE__ */ U(Kn, { onClick: o })
2241
+ children: /* @__PURE__ */ W(Gn, { onClick: o })
2242
2242
  }) : null,
2243
- /* @__PURE__ */ U(Hr, {
2243
+ /* @__PURE__ */ W(Vr, {
2244
2244
  open: s,
2245
- items: Xr([{
2245
+ items: Yr([{
2246
2246
  src: e,
2247
2247
  poster: t,
2248
2248
  mimeType: n,
@@ -2253,29 +2253,29 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2253
2253
  })
2254
2254
  ]
2255
2255
  });
2256
- }, Qr = ({ state: e, src: t, poster: n, mimeType: r, filename: i, items: a, text: o, groupPosition: s, preload: c, naturalAspectRatio: l, onClick: u }) => {
2257
- let d = Yr({
2256
+ }, Zr = ({ state: e, src: t, poster: n, mimeType: r, filename: i, items: a, text: o, groupPosition: s, preload: c, naturalAspectRatio: l, onClick: u }) => {
2257
+ let d = Jr({
2258
2258
  src: t,
2259
2259
  poster: n,
2260
2260
  mimeType: r,
2261
2261
  preload: c,
2262
2262
  naturalAspectRatio: l,
2263
2263
  items: a
2264
- }), f = qn(e), { viewerOpen: p, viewerIndex: m, handleActivate: h, closeViewer: g } = Dr(u), _ = d.length === 1, v = _ ? d[0] : void 0, y = Er({
2264
+ }), f = Kn(e), { viewerOpen: p, viewerIndex: m, handleActivate: h, closeViewer: g } = Er(u), _ = d.length === 1, v = _ ? d[0] : void 0, y = Tr({
2265
2265
  src: v?.poster,
2266
2266
  suppliedRatio: v?.naturalAspectRatio,
2267
- fallbackRatio: Ur
2267
+ fallbackRatio: Hr
2268
2268
  });
2269
2269
  if (d.length === 0) return null;
2270
- let b = d.length > 4 ? 3 : -1, x = d.map((e, t) => Jr({
2270
+ let b = d.length > 4 ? 3 : -1, x = d.map((e, t) => qr({
2271
2271
  item: e,
2272
2272
  index: t,
2273
2273
  totalCount: d.length,
2274
2274
  isOverflowTile: t === b,
2275
2275
  imgRef: _ ? y.imgRef : void 0,
2276
2276
  onLoad: _ ? y.onLoad : void 0
2277
- })), S = Math.min(Math.max(y.ratio, Wr), Gr);
2278
- return /* @__PURE__ */ W(Gn, {
2277
+ })), S = Math.min(Math.max(y.ratio, Ur), Wr);
2278
+ return /* @__PURE__ */ G(Wn, {
2279
2279
  variant: f,
2280
2280
  text: o,
2281
2281
  groupPosition: s,
@@ -2284,36 +2284,36 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2284
2284
  paddingClassName: "p-0.5",
2285
2285
  radiusClassName: s && s !== "single" ? void 0 : "rounded-[20px]",
2286
2286
  "data-testid": "video-attachment",
2287
- children: [/* @__PURE__ */ U("div", {
2287
+ children: [/* @__PURE__ */ W("div", {
2288
2288
  className: "relative",
2289
- children: /* @__PURE__ */ U(Tr, {
2289
+ children: /* @__PURE__ */ W(wr, {
2290
2290
  tiles: x,
2291
2291
  onTileActivate: h,
2292
2292
  singleAspectRatio: _ ? S : void 0
2293
2293
  })
2294
- }), /* @__PURE__ */ U(Hr, {
2294
+ }), /* @__PURE__ */ W(Vr, {
2295
2295
  open: p,
2296
- items: Xr(d, i),
2296
+ items: Yr(d, i),
2297
2297
  initialIndex: m,
2298
2298
  onClose: g
2299
2299
  })]
2300
2300
  });
2301
- }, Q = {
2302
- Image: Pr,
2301
+ }, Qr = {
2302
+ Image: Nr,
2303
2303
  Video: {
2304
- Composer: (e) => /* @__PURE__ */ U(Zr, { ...e }),
2305
- Sent: (e) => /* @__PURE__ */ U(Qr, {
2304
+ Composer: (e) => /* @__PURE__ */ W(Xr, { ...e }),
2305
+ Sent: (e) => /* @__PURE__ */ W(Zr, {
2306
2306
  ...e,
2307
2307
  state: "sent"
2308
2308
  }),
2309
- Received: (e) => /* @__PURE__ */ U(Qr, {
2309
+ Received: (e) => /* @__PURE__ */ W(Zr, {
2310
2310
  ...e,
2311
2311
  state: "received"
2312
2312
  })
2313
2313
  },
2314
- Audio: Qn,
2315
- Pdf: Br,
2316
- File: dr
2314
+ Audio: Zn,
2315
+ Pdf: zr,
2316
+ File: ur
2317
2317
  };
2318
2318
  //#endregion
2319
2319
  //#region src/components/CustomMessage/StreamAttachmentMessage.tsx
@@ -2343,14 +2343,14 @@ function ni(e) {
2343
2343
  url: t,
2344
2344
  thumbnailUrl: a(n),
2345
2345
  sourceUrl: r,
2346
- layout: n || En(i, r) ? "featured" : "classic",
2346
+ layout: n || Tn(i, r) ? "featured" : "classic",
2347
2347
  mimeType: i,
2348
2348
  accentColor: $(e.accent_color),
2349
2349
  status: "ready"
2350
2350
  };
2351
2351
  }
2352
2352
  function ri(e) {
2353
- return kt(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" : e.mime_type?.startsWith("audio/") ? "audio" : "file" : null;
2353
+ return Ot(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" : e.mime_type?.startsWith("audio/") ? "audio" : "file" : null;
2354
2354
  }
2355
2355
  function ii(e) {
2356
2356
  if (!e?.length) return [];
@@ -2377,7 +2377,7 @@ function ii(e) {
2377
2377
  });
2378
2378
  };
2379
2379
  for (let t of e) {
2380
- if (kt(t)) {
2380
+ if (Ot(t)) {
2381
2381
  r(t);
2382
2382
  continue;
2383
2383
  }
@@ -2397,11 +2397,11 @@ function si(e) {
2397
2397
  }
2398
2398
  function ci(e) {
2399
2399
  switch (e) {
2400
- case "image": return Q.Image;
2401
- case "video": return Q.Video;
2402
- case "audio": return Q.Audio;
2403
- case "pdf": return Q.Pdf;
2404
- default: return Q.File;
2400
+ case "image": return Qr.Image;
2401
+ case "video": return Qr.Video;
2402
+ case "audio": return Qr.Audio;
2403
+ case "pdf": return Qr.Pdf;
2404
+ default: return Qr.File;
2405
2405
  }
2406
2406
  }
2407
2407
  function li(e, t) {
@@ -2444,20 +2444,20 @@ function di({ groupPosition: e, isMyMessage: t, segment: n }) {
2444
2444
  ...ui(n.kind, n.attachments),
2445
2445
  groupPosition: e
2446
2446
  };
2447
- return U(t ? r.Sent : r.Received, { ...i });
2447
+ return W(t ? r.Sent : r.Received, { ...i });
2448
2448
  }
2449
2449
  var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2450
2450
  let i = ii(n.attachments);
2451
2451
  if (i.length === 0) return null;
2452
2452
  let a = ai(i), o = n.text?.trim(), s = i.find((e) => e.type === "link"), c = s?.type === "link" ? ni(s.attachments[0] ?? {}).url : void 0, l = o && ti(o, c) ? void 0 : o, u = 0, d = [], f = l ? "middle" : e, p = e === "single" || e === "end", m = (e, n, r) => {
2453
- let i = t ? zn.Sent : zn.Received;
2454
- d.push(/* @__PURE__ */ U(i, {
2453
+ let i = t ? Rn.Sent : Rn.Received;
2454
+ d.push(/* @__PURE__ */ W(i, {
2455
2455
  ...ni(e),
2456
2456
  groupPosition: r ? f : "middle"
2457
2457
  }, n));
2458
2458
  }, h = (n, r) => {
2459
2459
  let i = oi(u, a, e);
2460
- u += 1, d.push(/* @__PURE__ */ U(di, {
2460
+ u += 1, d.push(/* @__PURE__ */ W(di, {
2461
2461
  groupPosition: i,
2462
2462
  isMyMessage: t,
2463
2463
  segment: n
@@ -2472,9 +2472,9 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2472
2472
  return;
2473
2473
  }
2474
2474
  h(e, `media-${t}`);
2475
- }), /* @__PURE__ */ W("div", {
2475
+ }), /* @__PURE__ */ G("div", {
2476
2476
  className: "str-chat__message-bubble-wrapper",
2477
- children: [/* @__PURE__ */ W("div", {
2477
+ children: [/* @__PURE__ */ G("div", {
2478
2478
  className: "str-chat__message-bubble",
2479
2479
  "data-attachment-bubble": "true",
2480
2480
  style: {
@@ -2483,27 +2483,27 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2483
2483
  overflow: "visible",
2484
2484
  padding: 0
2485
2485
  },
2486
- children: [d, !l && /* @__PURE__ */ U(M, {})]
2487
- }), l ? /* @__PURE__ */ W("div", {
2488
- className: J("str-chat__message-bubble", { "relative isolate": p }),
2486
+ children: [d, !l && /* @__PURE__ */ W(M, {})]
2487
+ }), l ? /* @__PURE__ */ G("div", {
2488
+ className: Y("str-chat__message-bubble", { "relative isolate": p }),
2489
2489
  children: [
2490
- /* @__PURE__ */ U(R, {
2490
+ /* @__PURE__ */ W(R, {
2491
2491
  message: n,
2492
2492
  renderText: r
2493
2493
  }),
2494
- /* @__PURE__ */ U(M, {}),
2495
- p && /* @__PURE__ */ U(Jt, { side: t ? "me" : "other" })
2494
+ /* @__PURE__ */ W(M, {}),
2495
+ p && /* @__PURE__ */ W(qt, { side: t ? "me" : "other" })
2496
2496
  ]
2497
2497
  }) : null]
2498
2498
  });
2499
2499
  }, pi = o.memo((e) => {
2500
- let { additionalMessageInputProps: t, editing: n, endOfGroup: r, firstOfGroup: i, groupStyles: a, groupedByUser: o, handleAction: s, handleOpenThread: c, handleRetry: l, highlighted: u, isMessageAIGenerated: d, isMyMessage: f, message: m, renderText: g, threadList: _, viewerLanguage: v, onOutboundClick: y, resolvedOutbound: x } = e, { client: S } = he("CustomMessage"), { channel: C } = me("CustomMessage"), { isUnlocking: w, onUnlockClick: T, onFetchSource: D, onDownloadClick: N } = Nt("LockedAttachment"), [F, L] = h(!1), z = be(m.id), { Attachment: te = b, EditMessageModal: ie = E, MessageActions: B, MessageBlocked: ae = O, MessageBouncePrompt: oe = A, MessageDeleted: fe = j, MessageIsThreadReplyInChannelButtonIndicator: pe = P, MessageRepliesCountButton: _e = I, ReminderNotification: ve = ne, StreamedMessageText: V = re, PinIndicator: ye } = ge("CustomMessage"), xe = ue(m), Se = de(m), G = p(() => d?.(m), [d, m]), K = p(() => {
2500
+ let { additionalMessageInputProps: t, editing: n, endOfGroup: r, firstOfGroup: i, groupStyles: a, groupedByUser: o, handleAction: s, handleOpenThread: c, handleRetry: l, highlighted: u, isMessageAIGenerated: d, isMyMessage: f, message: m, renderText: g, threadList: _, viewerLanguage: v, onOutboundClick: y, resolvedOutbound: x } = e, { client: S } = me("CustomMessage"), { channel: C } = V("CustomMessage"), { isUnlocking: w, onUnlockClick: T, onFetchSource: D, onDownloadClick: N } = Mt("LockedAttachment"), [F, L] = h(!1), z = ye(m.id), { Attachment: te = b, EditMessageModal: ie = E, MessageActions: B, MessageBlocked: ae = O, MessageBouncePrompt: oe = A, MessageDeleted: fe = j, MessageIsThreadReplyInChannelButtonIndicator: pe = P, MessageRepliesCountButton: ge = I, ReminderNotification: _e = ne, StreamedMessageText: H = re, PinIndicator: ve } = he("CustomMessage"), be = ue(m), xe = de(m), K = p(() => d?.(m), [d, m]), q = p(() => {
2501
2501
  let e = m.attachments ?? [], t = m.shared_location ? [m.shared_location, ...e] : e;
2502
- if (!Bt(m)) return t;
2503
- let n = t.filter((e) => !("type" in e) || !kt(e));
2502
+ if (!zt(m)) return t;
2503
+ let n = t.filter((e) => !("type" in e) || !Ot(e));
2504
2504
  return n.length === t.length ? t : n;
2505
- }, [m]), Ce = p(() => ii(K), [K]), q = p(() => {
2506
- let e = Ot({
2505
+ }, [m]), Se = p(() => ii(q), [q]), Ce = p(() => {
2506
+ let e = Dt({
2507
2507
  message: m,
2508
2508
  viewerLanguage: v
2509
2509
  });
@@ -2511,31 +2511,31 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2511
2511
  ...m,
2512
2512
  text: e
2513
2513
  };
2514
- }, [m, v]), we = Ce.length > 0, Te = Ce.reduce((e, t) => e + t.attachments.length, 0) === (K?.length ?? 0), Ee = a?.[0] ?? "", De = Ee === "top" ? "first" : Ee === "middle" ? "middle" : Ee === "bottom" ? "end" : "single", Oe = Ee === "single" || Ee === "bottom";
2514
+ }, [m, v]), we = Se.length > 0, Te = Se.reduce((e, t) => e + t.attachments.length, 0) === (q?.length ?? 0), J = a?.[0] ?? "", Ee = J === "top" ? "first" : J === "middle" ? "middle" : J === "bottom" ? "end" : "single", De = J === "single" || J === "bottom";
2515
2515
  if (se(m)) return null;
2516
- if (m.deleted_at || m.type === "deleted") return /* @__PURE__ */ U(fe, { message: m });
2517
- if (ce(m)) return /* @__PURE__ */ U(ae, {});
2518
- let ke = !_ && !!m.reply_count, Ae = !_ && m.show_in_channel && m.parent_id, je = m.status === "failed" && m.error?.status !== 403, Me = le(m), Y;
2519
- je ? Y = () => l(m) : Me && (Y = () => L(!0));
2520
- let X = f(), Ne = J("str-chat__message str-chat__message-simple", `str-chat__message--${m.type}`, `str-chat__message--${m.status}`, X ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other", m.text ? "str-chat__message--has-text" : "has-no-text", {
2521
- "str-chat__message--has-attachment": xe,
2516
+ if (m.deleted_at || m.type === "deleted") return /* @__PURE__ */ W(fe, { message: m });
2517
+ if (ce(m)) return /* @__PURE__ */ W(ae, {});
2518
+ let Oe = !_ && !!m.reply_count, ke = !_ && m.show_in_channel && m.parent_id, Ae = m.status === "failed" && m.error?.status !== 403, je = le(m), X;
2519
+ Ae ? X = () => l(m) : je && (X = () => L(!0));
2520
+ let Z = f(), Me = Y("str-chat__message str-chat__message-simple", `str-chat__message--${m.type}`, `str-chat__message--${m.status}`, Z ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other", m.text ? "str-chat__message--has-text" : "has-no-text", {
2521
+ "str-chat__message--has-attachment": be,
2522
2522
  "str-chat__message--highlighted": u,
2523
2523
  "str-chat__message--pinned pinned-message": m.pinned,
2524
- "str-chat__message--with-reactions": Se,
2524
+ "str-chat__message--with-reactions": xe,
2525
2525
  "str-chat__message-send-can-be-retried": m?.status === "failed" && m?.error?.status !== 403,
2526
- "str-chat__message-with-thread-link": ke || Ae,
2526
+ "str-chat__message-with-thread-link": Oe || ke,
2527
2527
  "str-chat__virtual-message__wrapper--end": r,
2528
2528
  "str-chat__virtual-message__wrapper--first": i,
2529
2529
  "str-chat__virtual-message__wrapper--group": o
2530
- }), Pe = m.poll_id && S.polls.fromState(m.poll_id), Fe = en(m), Ie = Bt(m), Le = Vt(m), Re = !!(K?.length && !m.quoted_message), ze = Ie && X && Re, Be = we && Te && !m.quoted_message && !Pe && !G && !Ie, Ve = {
2530
+ }), Ne = m.poll_id && S.polls.fromState(m.poll_id), Pe = $t(m), Fe = zt(m), Ie = Bt(m), Le = !!(q?.length && !m.quoted_message), Re = Fe && Z && Le, ze = we && Te && !m.quoted_message && !Ne && !K && !Fe, Be = {
2531
2531
  contentType: "text",
2532
2532
  amountText: m.metadata?.amount_text,
2533
2533
  paymentStatus: m.metadata?.payment_status,
2534
- renderedText: m.text && /* @__PURE__ */ U(R, {
2535
- message: q,
2534
+ renderedText: m.text && /* @__PURE__ */ W(R, {
2535
+ message: Ce,
2536
2536
  renderText: g
2537
2537
  })
2538
- }, He = {
2538
+ }, Ve = {
2539
2539
  contentType: "media",
2540
2540
  title: m.metadata?.attachment_title,
2541
2541
  mimeType: m.metadata?.attachment_mime_type,
@@ -2544,178 +2544,178 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2544
2544
  detail: m.metadata?.attachment_detail,
2545
2545
  paymentStatus: m.metadata?.payment_status,
2546
2546
  onFetchSource: D ? () => D(m, C) : void 0
2547
- }, Ue = /* @__PURE__ */ W("div", {
2548
- className: J("str-chat__message-bubble", { "relative isolate": Oe }),
2549
- children: [/* @__PURE__ */ U(R, {
2550
- message: q,
2547
+ }, He = /* @__PURE__ */ G("div", {
2548
+ className: Y("str-chat__message-bubble", { "relative isolate": De }),
2549
+ children: [/* @__PURE__ */ W(R, {
2550
+ message: Ce,
2551
2551
  renderText: g
2552
- }), Oe && /* @__PURE__ */ U(Jt, { side: X ? "me" : "other" })]
2552
+ }), De && /* @__PURE__ */ W(qt, { side: Z ? "me" : "other" })]
2553
2553
  });
2554
- return /* @__PURE__ */ W(H, { children: [
2555
- n && /* @__PURE__ */ U(ie, { additionalMessageInputProps: t }),
2556
- F && /* @__PURE__ */ U(k, {
2554
+ return /* @__PURE__ */ G(U, { children: [
2555
+ n && /* @__PURE__ */ W(ie, { additionalMessageInputProps: t }),
2556
+ F && /* @__PURE__ */ W(k, {
2557
2557
  MessageBouncePrompt: oe,
2558
2558
  onClose: () => L(!1),
2559
2559
  open: F
2560
2560
  }),
2561
- /* @__PURE__ */ W("div", {
2562
- className: Ne,
2561
+ /* @__PURE__ */ G("div", {
2562
+ className: Me,
2563
2563
  "data-message-id": m.id,
2564
2564
  "data-dd-privacy": "mask",
2565
2565
  children: [
2566
- ye && /* @__PURE__ */ U(ye, {}),
2567
- !!z && /* @__PURE__ */ U(ve, { reminder: z }),
2568
- m.user && /* @__PURE__ */ U(_t, {
2566
+ ve && /* @__PURE__ */ W(ve, {}),
2567
+ !!z && /* @__PURE__ */ W(_e, { reminder: z }),
2568
+ m.user && /* @__PURE__ */ W(gt, {
2569
2569
  className: "str-chat__avatar str-chat__message-sender-avatar",
2570
2570
  id: m.user.id,
2571
2571
  image: m.user.image,
2572
2572
  name: m.user.name || m.user.id,
2573
2573
  size: 24,
2574
2574
  shape: "circle",
2575
- dmAgentEnabled: Ie
2575
+ dmAgentEnabled: Fe
2576
2576
  }),
2577
- /* @__PURE__ */ U("div", {
2578
- className: J("str-chat__message-inner", { "str-chat__simple-message--error-failed": je || Me }),
2577
+ /* @__PURE__ */ W("div", {
2578
+ className: Y("str-chat__message-inner", { "str-chat__simple-message--error-failed": Ae || je }),
2579
2579
  "data-testid": "message-inner",
2580
- onClick: Y,
2581
- onKeyDown: Y,
2582
- role: Y ? "button" : void 0,
2583
- tabIndex: Y ? 0 : void 0,
2580
+ onClick: X,
2581
+ onKeyDown: X,
2582
+ role: X ? "button" : void 0,
2583
+ tabIndex: X ? 0 : void 0,
2584
2584
  style: {
2585
2585
  marginInlineEnd: 0,
2586
2586
  marginInlineStart: 0
2587
2587
  },
2588
- children: Fe ? /* @__PURE__ */ W("div", {
2588
+ children: Pe ? /* @__PURE__ */ G("div", {
2589
2589
  className: "str-chat__message-bubble-wrapper message-tip-wrapper",
2590
- children: [/* @__PURE__ */ U(tn, { message: m }), m.text?.trim() && Ue]
2591
- }) : Ht(m) ? /* @__PURE__ */ U("div", {
2590
+ children: [/* @__PURE__ */ W(en, { message: m }), m.text?.trim() && He]
2591
+ }) : Vt(m) ? /* @__PURE__ */ W("div", {
2592
2592
  className: "str-chat__message-bubble-wrapper",
2593
- children: /* @__PURE__ */ W("div", {
2593
+ children: /* @__PURE__ */ G("div", {
2594
2594
  className: "flex items-center gap-2",
2595
2595
  children: [
2596
- X && B && /* @__PURE__ */ U(B, {}),
2597
- X ? /* @__PURE__ */ U(Lt, {
2598
- ...Ve,
2596
+ Z && B && /* @__PURE__ */ W(B, {}),
2597
+ Z ? /* @__PURE__ */ W(It, {
2598
+ ...Be,
2599
2599
  isMine: !0
2600
- }) : /* @__PURE__ */ U(Lt, {
2601
- ...Ve,
2600
+ }) : /* @__PURE__ */ W(It, {
2601
+ ...Be,
2602
2602
  isMine: !1,
2603
2603
  isUnlocking: w(m.id),
2604
2604
  onUnlockClick: () => T?.(m, C)
2605
2605
  }),
2606
- !X && B && /* @__PURE__ */ U(B, {})
2606
+ !Z && B && /* @__PURE__ */ W(B, {})
2607
2607
  ]
2608
2608
  })
2609
- }) : Ut(m) ? /* @__PURE__ */ W("div", {
2609
+ }) : Ht(m) ? /* @__PURE__ */ G("div", {
2610
2610
  className: "str-chat__message-bubble-wrapper message-locked-attachment-wrapper",
2611
- children: [/* @__PURE__ */ W("div", {
2611
+ children: [/* @__PURE__ */ G("div", {
2612
2612
  className: "flex items-center gap-2",
2613
2613
  children: [
2614
- X && B && /* @__PURE__ */ U(B, {}),
2615
- X ? /* @__PURE__ */ U(Lt, {
2616
- ...He,
2614
+ Z && B && /* @__PURE__ */ W(B, {}),
2615
+ Z ? /* @__PURE__ */ W(It, {
2616
+ ...Ve,
2617
2617
  isMine: !0,
2618
2618
  onPreviewClick: () => T ? T(m, C) : void 0
2619
- }) : /* @__PURE__ */ U(Lt, {
2620
- ...He,
2619
+ }) : /* @__PURE__ */ W(It, {
2620
+ ...Ve,
2621
2621
  isMine: !1,
2622
2622
  isUnlocking: w(m.id),
2623
2623
  onUnlockClick: () => T ? T(m, C) : void 0,
2624
2624
  onDownloadClick: () => N ? N(m, C) : void 0
2625
2625
  }),
2626
- !X && B && /* @__PURE__ */ U(B, {})
2626
+ !Z && B && /* @__PURE__ */ W(B, {})
2627
2627
  ]
2628
- }), m.text && Ue]
2629
- }) : Be ? /* @__PURE__ */ U(fi, {
2630
- groupPosition: De,
2631
- isMyMessage: X,
2628
+ }), m.text && He]
2629
+ }) : ze ? /* @__PURE__ */ W(fi, {
2630
+ groupPosition: Ee,
2631
+ isMyMessage: Z,
2632
2632
  message: {
2633
- ...q,
2634
- attachments: K,
2633
+ ...Ce,
2634
+ attachments: q,
2635
2635
  i18n: void 0
2636
2636
  },
2637
2637
  renderText: g
2638
- }) : /* @__PURE__ */ U("div", {
2638
+ }) : /* @__PURE__ */ W("div", {
2639
2639
  className: "str-chat__message-bubble-wrapper",
2640
- children: /* @__PURE__ */ W("div", {
2641
- className: J("str-chat__message-bubble", { "relative isolate": Oe }),
2640
+ children: /* @__PURE__ */ G("div", {
2641
+ className: Y("str-chat__message-bubble", { "relative isolate": De }),
2642
2642
  children: [
2643
- Ie && !ze && /* @__PURE__ */ U(Gt, {
2643
+ Fe && !Re && /* @__PURE__ */ W(Wt, {
2644
2644
  message: m,
2645
- hasAttachment: Re,
2646
- isMyMessage: X
2645
+ hasAttachment: Le,
2646
+ isMyMessage: Z
2647
2647
  }),
2648
- Pe && /* @__PURE__ */ U(ee, { poll: Pe }),
2649
- K?.length && !m.quoted_message ? /* @__PURE__ */ U(te, {
2648
+ Ne && /* @__PURE__ */ W(ee, { poll: Ne }),
2649
+ q?.length && !m.quoted_message ? /* @__PURE__ */ W(te, {
2650
2650
  actionHandler: s,
2651
- attachments: K
2651
+ attachments: q
2652
2652
  }) : null,
2653
- U(G ? V : R, {
2654
- message: q,
2653
+ W(K ? H : R, {
2654
+ message: Ce,
2655
2655
  renderText: g
2656
2656
  }),
2657
- /* @__PURE__ */ U(M, {}),
2658
- Oe && /* @__PURE__ */ U(Jt, { side: X ? "me" : "other" })
2657
+ /* @__PURE__ */ W(M, {}),
2658
+ De && /* @__PURE__ */ W(qt, { side: Z ? "me" : "other" })
2659
2659
  ]
2660
2660
  })
2661
2661
  })
2662
2662
  }),
2663
- !Le && !Fe && /* @__PURE__ */ U("div", {
2663
+ !Ie && !Pe && /* @__PURE__ */ W("div", {
2664
2664
  className: "str-chat__message-footer",
2665
- children: (!Ie || ze) && /* @__PURE__ */ U(Gt, {
2665
+ children: (!Fe || Re) && /* @__PURE__ */ W(Wt, {
2666
2666
  message: m,
2667
- hasAttachment: Re,
2668
- isMyMessage: X
2667
+ hasAttachment: Le,
2668
+ isMyMessage: Z
2669
2669
  })
2670
2670
  }),
2671
- /* @__PURE__ */ U(cn, {
2671
+ /* @__PURE__ */ W(sn, {
2672
2672
  onOutboundClick: y,
2673
2673
  resolvedOutbound: x
2674
2674
  }),
2675
- ke && /* @__PURE__ */ U(_e, {
2675
+ Oe && /* @__PURE__ */ W(ge, {
2676
2676
  onClick: c,
2677
2677
  reply_count: m.reply_count
2678
2678
  }),
2679
- Ae && /* @__PURE__ */ U(pe, {})
2679
+ ke && /* @__PURE__ */ W(pe, {})
2680
2680
  ]
2681
2681
  }, m.id)
2682
2682
  ] });
2683
2683
  }, (e, t) => e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || e.resolvedOutbound?.id !== t.resolvedOutbound?.id || e.resolvedOutbound?.name !== t.resolvedOutbound?.name ? !1 : oe(e, t)), mi = (e) => {
2684
- let t = V("CustomMessage"), n = u(Yt), r = t.message.metadata?.outbound_id, i = typeof r == "string" ? n?.[r] : void 0;
2685
- return /* @__PURE__ */ U(pi, {
2684
+ let t = H("CustomMessage"), n = u(Jt), r = t.message.metadata?.outbound_id, i = typeof r == "string" ? n?.[r] : void 0;
2685
+ return /* @__PURE__ */ W(pi, {
2686
2686
  ...t,
2687
2687
  ...e,
2688
2688
  resolvedOutbound: i
2689
2689
  });
2690
2690
  }, hi = () => {
2691
- let { handleDelete: e, message: t } = V("CustomMessageActions");
2692
- return t.metadata?.payment_status === "paid" ? null : /* @__PURE__ */ U(Ye, {
2691
+ let { handleDelete: e, message: t } = H("CustomMessageActions");
2692
+ return t.metadata?.payment_status === "paid" ? null : /* @__PURE__ */ W(Je, {
2693
2693
  onClick: e,
2694
2694
  "aria-label": "Delete",
2695
2695
  title: "Delete",
2696
2696
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
2697
- children: /* @__PURE__ */ U(Ge, {
2697
+ children: /* @__PURE__ */ W(We, {
2698
2698
  size: 16,
2699
2699
  weight: "light",
2700
2700
  "aria-hidden": !0
2701
2701
  })
2702
2702
  });
2703
2703
  }, gi = () => {
2704
- let { handleFlag: e } = V("CustomMessageActions");
2705
- return /* @__PURE__ */ U(Ye, {
2704
+ let { handleFlag: e } = H("CustomMessageActions");
2705
+ return /* @__PURE__ */ W(Je, {
2706
2706
  onClick: e,
2707
2707
  "aria-label": "Report",
2708
2708
  title: "Report",
2709
2709
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
2710
- children: /* @__PURE__ */ U(Pe, {
2710
+ children: /* @__PURE__ */ W(Ne, {
2711
2711
  size: 16,
2712
2712
  weight: "light",
2713
2713
  "aria-hidden": !0
2714
2714
  })
2715
2715
  });
2716
2716
  }, _i = () => {
2717
- let { message: e } = V("CustomMessageActions");
2718
- return e.metadata?.custom_type === G.ATTACHMENT ? /* @__PURE__ */ U(Xe, { messageActionSet: [{
2717
+ let { message: e } = H("CustomMessageActions");
2718
+ return e.metadata?.custom_type === K.ATTACHMENT ? /* @__PURE__ */ W(Ye, { messageActionSet: [{
2719
2719
  Component: hi,
2720
2720
  placement: "quick",
2721
2721
  type: "delete"
@@ -2725,14 +2725,14 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2725
2725
  type: "flag"
2726
2726
  }] }) : null;
2727
2727
  }, vi = (e) => ({ linkPreviews: Array.from(e.previews.values()).filter((e) => _.previewIsLoaded(e) || _.previewIsLoading(e)) }), yi = () => {
2728
- let { linkPreviewsManager: e } = _e(), { linkPreviews: t } = xe(e.state, vi), n = (t) => {
2728
+ let { linkPreviewsManager: e } = ge(), { linkPreviews: t } = be(e.state, vi), n = (t) => {
2729
2729
  e.dismissPreview(t);
2730
2730
  };
2731
- return t.length > 0 ? /* @__PURE__ */ U("div", {
2731
+ return t.length > 0 ? /* @__PURE__ */ W("div", {
2732
2732
  className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2",
2733
2733
  children: t.map((e) => {
2734
2734
  let t = _.previewIsLoading(e);
2735
- return /* @__PURE__ */ U(zn.Composer, {
2735
+ return /* @__PURE__ */ W(Rn.Composer, {
2736
2736
  title: e.title,
2737
2737
  url: e.og_scrape_url,
2738
2738
  thumbnailUrl: e.image_url,
@@ -2742,19 +2742,19 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2742
2742
  }, e.og_scrape_url);
2743
2743
  })
2744
2744
  }) : null;
2745
- }, bi = o.createContext(!1), xi = 200, Si = () => u(bi), Ci = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ U("button", {
2745
+ }, bi = o.createContext(!1), xi = 200, Si = () => u(bi), Ci = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ W("button", {
2746
2746
  ...n,
2747
2747
  type: "button",
2748
2748
  "aria-label": "Send",
2749
2749
  disabled: t,
2750
2750
  onPointerDown: (e) => e.preventDefault(),
2751
2751
  onClick: e,
2752
- children: /* @__PURE__ */ U(Oe, {
2752
+ children: /* @__PURE__ */ W(De, {
2753
2753
  weight: "bold",
2754
2754
  className: "size-4"
2755
2755
  })
2756
2756
  }), wi = () => {
2757
- let e = u(bi), { handleSubmit: t } = ye(), n = ve(), r = e || !n, { SendButton: i = Ci, AttachmentPreviewList: a = x } = ge("CustomMessageInput"), s = o.useRef(null);
2757
+ let e = u(bi), { handleSubmit: t } = ve(), n = _e(), r = e || !n, { SendButton: i = Ci, AttachmentPreviewList: a = x } = he("CustomMessageInput"), s = o.useRef(null);
2758
2758
  return o.useEffect(() => {
2759
2759
  let e = s.current;
2760
2760
  if (!e || typeof ResizeObserver > "u") return;
@@ -2769,20 +2769,20 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2769
2769
  Array.from(e.clipboardData?.items ?? []).some((e) => e.kind === "file") || e.stopPropagation();
2770
2770
  };
2771
2771
  return e.addEventListener("paste", t), () => e.removeEventListener("paste", t);
2772
- }, []), /* @__PURE__ */ W("div", {
2772
+ }, []), /* @__PURE__ */ G("div", {
2773
2773
  ref: s,
2774
2774
  className: "central-container flex flex-col min-w-0 w-full max-h-[calc(var(--messaging-surface-height,100dvh)*0.5)] overflow-y-auto overscroll-contain bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)] [&>:not(.messaging-composer-previews):not(.messaging-composer-row)]:p-2",
2775
2775
  "data-dd-privacy": "mask",
2776
- children: [/* @__PURE__ */ W("div", {
2776
+ children: [/* @__PURE__ */ G("div", {
2777
2777
  className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2",
2778
2778
  children: [
2779
- /* @__PURE__ */ U(te, {}),
2780
- /* @__PURE__ */ U(yi, {}),
2781
- /* @__PURE__ */ U(a, {})
2779
+ /* @__PURE__ */ W(te, {}),
2780
+ /* @__PURE__ */ W(yi, {}),
2781
+ /* @__PURE__ */ W(a, {})
2782
2782
  ]
2783
- }), /* @__PURE__ */ W("div", {
2783
+ }), /* @__PURE__ */ G("div", {
2784
2784
  className: "messaging-composer-row flex items-start",
2785
- children: [/* @__PURE__ */ U(ie, {
2785
+ children: [/* @__PURE__ */ W(ie, {
2786
2786
  "aria-disabled": e || void 0,
2787
2787
  containerClassName: "min-w-0 flex-1 leading-[0]",
2788
2788
  className: "w-full resize-none overflow-hidden bg-transparent py-3.5 pl-4 pr-4 outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -2791,9 +2791,9 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2791
2791
  maxRows: Infinity,
2792
2792
  readOnly: e,
2793
2793
  tabIndex: e ? -1 : void 0
2794
- }), /* @__PURE__ */ U("div", {
2794
+ }), /* @__PURE__ */ W("div", {
2795
2795
  className: "sticky bottom-2 mt-auto mb-2 mr-2 shrink-0 pt-2",
2796
- children: /* @__PURE__ */ U(i, {
2796
+ children: /* @__PURE__ */ W(i, {
2797
2797
  sendMessage: t,
2798
2798
  "aria-label": "Send",
2799
2799
  className: "str-chat__send-button relative flex justify-center items-center rounded-full size-8 bg-[#121110] disabled:bg-[#F1F0EE] disabled:text-black/20 text-white focus-ring before:absolute before:-inset-2 before:content-['']",
@@ -2804,19 +2804,19 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2804
2804
  })]
2805
2805
  })]
2806
2806
  });
2807
- }, Ti = () => /* @__PURE__ */ W("div", {
2807
+ }, Ti = () => /* @__PURE__ */ G("div", {
2808
2808
  className: "messaging-composer-backdrop",
2809
2809
  "aria-hidden": "true",
2810
2810
  children: [
2811
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2812
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2813
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2814
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2815
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2816
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-gradient" })
2811
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2812
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2813
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2814
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2815
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2816
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-gradient" })
2817
2817
  ]
2818
2818
  }), Ei = ({ renderActions: e, renderHeader: t, renderFooter: n, disabled: r = !1, disabledReason: i, composerInput: a }) => {
2819
- let { channel: s } = me(), c = s?.data?.frozen === !0, l = !!a, u = o.useRef(null);
2819
+ let { channel: s } = V(), c = s?.data?.frozen === !0, l = !!a, u = o.useRef(null);
2820
2820
  return o.useEffect(() => {
2821
2821
  if (!l) return;
2822
2822
  let e = u.current, t = e?.parentElement;
@@ -2832,16 +2832,16 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2832
2832
  return i.observe(e), () => {
2833
2833
  i.disconnect(), t.style.removeProperty("--messaging-composer-height");
2834
2834
  };
2835
- }, [l]), r ? l ? /* @__PURE__ */ W("div", {
2835
+ }, [l]), r ? l ? /* @__PURE__ */ G("div", {
2836
2836
  ref: u,
2837
2837
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
2838
- children: [/* @__PURE__ */ U(Ti, {}), /* @__PURE__ */ W("div", {
2838
+ children: [/* @__PURE__ */ W(Ti, {}), /* @__PURE__ */ G("div", {
2839
2839
  className: "relative z-10 flex flex-col",
2840
2840
  children: [
2841
2841
  t?.(),
2842
- /* @__PURE__ */ U("div", {
2842
+ /* @__PURE__ */ W("div", {
2843
2843
  className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4",
2844
- children: i ? /* @__PURE__ */ U("p", {
2844
+ children: i ? /* @__PURE__ */ W("p", {
2845
2845
  className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40",
2846
2846
  children: i
2847
2847
  }) : null
@@ -2849,51 +2849,51 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2849
2849
  n?.()
2850
2850
  ]
2851
2851
  })]
2852
- }) : /* @__PURE__ */ W(H, { children: [
2852
+ }) : /* @__PURE__ */ G(U, { children: [
2853
2853
  t?.(),
2854
- /* @__PURE__ */ U("div", {
2854
+ /* @__PURE__ */ W("div", {
2855
2855
  className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4",
2856
- children: i ? /* @__PURE__ */ U("p", {
2856
+ children: i ? /* @__PURE__ */ W("p", {
2857
2857
  className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40",
2858
2858
  children: i
2859
2859
  }) : null
2860
2860
  }),
2861
2861
  n?.()
2862
- ] }) : l ? /* @__PURE__ */ W("div", {
2862
+ ] }) : l ? /* @__PURE__ */ G("div", {
2863
2863
  ref: u,
2864
2864
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
2865
- children: [/* @__PURE__ */ U(Ti, {}), /* @__PURE__ */ W("div", {
2865
+ children: [/* @__PURE__ */ W(Ti, {}), /* @__PURE__ */ G("div", {
2866
2866
  className: "relative z-10 flex min-h-0 flex-col",
2867
- children: [t?.(), /* @__PURE__ */ W("div", {
2867
+ children: [t?.(), /* @__PURE__ */ G("div", {
2868
2868
  className: "flex min-h-0 flex-col gap-4 p-3 pb-5 md:p-5",
2869
- children: [/* @__PURE__ */ W("div", {
2869
+ children: [/* @__PURE__ */ G("div", {
2870
2870
  inert: c ? "" : void 0,
2871
2871
  "aria-disabled": c || void 0,
2872
2872
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
2873
- children: [e && /* @__PURE__ */ U("div", {
2873
+ children: [e && /* @__PURE__ */ W("div", {
2874
2874
  className: "flex h-12 shrink-0 items-center justify-center",
2875
2875
  children: e()
2876
- }), /* @__PURE__ */ U(bi.Provider, {
2876
+ }), /* @__PURE__ */ W(bi.Provider, {
2877
2877
  value: c,
2878
- children: /* @__PURE__ */ U(N, { Input: a ?? wi })
2878
+ children: /* @__PURE__ */ W(N, { Input: a ?? wi })
2879
2879
  })]
2880
2880
  }), n?.()]
2881
2881
  })]
2882
2882
  })]
2883
- }) : /* @__PURE__ */ W("div", {
2883
+ }) : /* @__PURE__ */ G("div", {
2884
2884
  className: "flex min-h-0 flex-col gap-4 p-4",
2885
2885
  children: [
2886
2886
  t?.(),
2887
- /* @__PURE__ */ W("div", {
2887
+ /* @__PURE__ */ G("div", {
2888
2888
  inert: c ? "" : void 0,
2889
2889
  "aria-disabled": c || void 0,
2890
2890
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
2891
- children: [e && /* @__PURE__ */ U("div", {
2891
+ children: [e && /* @__PURE__ */ W("div", {
2892
2892
  className: "flex h-12 shrink-0 items-center justify-center",
2893
2893
  children: e()
2894
- }), /* @__PURE__ */ U(bi.Provider, {
2894
+ }), /* @__PURE__ */ W(bi.Provider, {
2895
2895
  value: c,
2896
- children: /* @__PURE__ */ U(N, { Input: wi })
2896
+ children: /* @__PURE__ */ W(N, { Input: wi })
2897
2897
  })]
2898
2898
  }),
2899
2899
  n?.()
@@ -2904,16 +2904,16 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2904
2904
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
2905
2905
  }, Oi = ["SYSTEM_AGE_SAFETY_BLOCKED"], ki = { SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines." }, Ai = "age safety guidelines.", ji = "https://linktr.ee/s/about/contact", Mi = (e) => Oi.includes(e), Ni = (e) => Mi(e.metadata?.custom_type), Pi = (e) => {
2906
2906
  let t = e.metadata?.custom_type;
2907
- if (q(t)) return {
2907
+ if (Ce(t)) return {
2908
2908
  kind: "dm-agent",
2909
2909
  type: t
2910
2910
  };
2911
- if (Ce(t)) return {
2911
+ if (Se(t)) return {
2912
2912
  kind: "age-safety",
2913
2913
  type: t
2914
2914
  };
2915
2915
  let n = e.dm_agent_system_type;
2916
- if (q(n)) return {
2916
+ if (Ce(n)) return {
2917
2917
  kind: "dm-agent",
2918
2918
  type: n
2919
2919
  };
@@ -2921,9 +2921,9 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2921
2921
  let t = e.indexOf(Ai);
2922
2922
  if (t === -1) return e;
2923
2923
  let n = t + 22;
2924
- return /* @__PURE__ */ W(H, { children: [
2924
+ return /* @__PURE__ */ G(U, { children: [
2925
2925
  e.slice(0, t),
2926
- /* @__PURE__ */ U("a", {
2926
+ /* @__PURE__ */ W("a", {
2927
2927
  href: ji,
2928
2928
  target: "_blank",
2929
2929
  rel: "noopener noreferrer",
@@ -2936,68 +2936,68 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2936
2936
  let t = !Ni(e.message), n = Pi(e.message);
2937
2937
  if (n?.kind === "dm-agent") {
2938
2938
  let r = e.message.text?.trim() || Di[n.type];
2939
- return /* @__PURE__ */ W("div", {
2939
+ return /* @__PURE__ */ G("div", {
2940
2940
  className: "str-chat__message--system",
2941
2941
  "data-testid": "message-system",
2942
- children: [/* @__PURE__ */ W("div", {
2942
+ children: [/* @__PURE__ */ G("div", {
2943
2943
  className: "mes-dm-agent-system-message mx-auto mb-2 inline-flex w-fit max-w-[min(100%,480px)] items-center justify-center gap-[10px] rounded-[12px] border border-[rgba(0,0,0,0.08)] p-3 text-[rgba(0,0,0,0.55)]",
2944
2944
  "data-testid": "dm-agent-system-message",
2945
2945
  "data-dm-agent-system-type": n.type,
2946
- children: [/* @__PURE__ */ U(He, {
2946
+ children: [/* @__PURE__ */ W(Ve, {
2947
2947
  size: 16,
2948
2948
  weight: "regular",
2949
2949
  "aria-hidden": !0,
2950
2950
  className: "mes-dm-agent-system-message__sparkle shrink-0"
2951
- }), /* @__PURE__ */ U("p", {
2951
+ }), /* @__PURE__ */ W("p", {
2952
2952
  className: "mes-dm-agent-system-message__text m-0 text-center text-[14px] font-normal leading-5 tracking-[0.21px]",
2953
2953
  children: r
2954
2954
  })]
2955
- }), !t && /* @__PURE__ */ U(z, { message: e.message })]
2955
+ }), !t && /* @__PURE__ */ W(z, { message: e.message })]
2956
2956
  });
2957
2957
  }
2958
2958
  if (n?.kind === "age-safety") {
2959
2959
  let r = e.message.text?.trim() || ki[n.type];
2960
- return /* @__PURE__ */ W("div", {
2960
+ return /* @__PURE__ */ G("div", {
2961
2961
  className: "str-chat__message--system",
2962
2962
  "data-testid": "message-system",
2963
- children: [/* @__PURE__ */ W("div", {
2963
+ children: [/* @__PURE__ */ G("div", {
2964
2964
  className: "mes-age-safety-system-message box-border mx-auto mb-2 flex w-full max-w-[329px] items-start justify-center gap-3 rounded-[12px] border border-[var(--border-secondary,rgba(0,0,0,0.08))] bg-[var(--bg-warning-subtle,#fef3c6)] px-2 py-4 pl-5 text-[color:var(--text-warning-on-warning,#894b00)]",
2965
2965
  "data-testid": "age-safety-system-message",
2966
2966
  "data-age-safety-system-type": n.type,
2967
- children: [/* @__PURE__ */ U(ze, {
2967
+ children: [/* @__PURE__ */ W(Re, {
2968
2968
  size: 24,
2969
2969
  weight: "duotone",
2970
2970
  "aria-hidden": !0,
2971
2971
  className: "mes-age-safety-system-message__icon shrink-0 text-[color:var(--text-warning-on-warning,#894b00)]",
2972
2972
  "data-testid": "age-safety-system-message-icon"
2973
- }), /* @__PURE__ */ U("div", {
2973
+ }), /* @__PURE__ */ W("div", {
2974
2974
  className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]",
2975
- children: /* @__PURE__ */ U("p", {
2975
+ children: /* @__PURE__ */ W("p", {
2976
2976
  className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]",
2977
2977
  children: Fi(r)
2978
2978
  })
2979
2979
  })]
2980
- }), !t && /* @__PURE__ */ U(z, { message: e.message })]
2980
+ }), !t && /* @__PURE__ */ W(z, { message: e.message })]
2981
2981
  });
2982
2982
  }
2983
- return /* @__PURE__ */ W("div", {
2983
+ return /* @__PURE__ */ G("div", {
2984
2984
  className: "str-chat__message--system",
2985
2985
  "data-testid": "message-system",
2986
- children: [/* @__PURE__ */ W("div", {
2986
+ children: [/* @__PURE__ */ G("div", {
2987
2987
  className: "str-chat__message--system__text",
2988
2988
  children: [
2989
- /* @__PURE__ */ U("div", { className: "str-chat__message--system__line" }),
2990
- /* @__PURE__ */ U("p", { children: e.message.text }),
2991
- /* @__PURE__ */ U("div", { className: "str-chat__message--system__line" })
2989
+ /* @__PURE__ */ W("div", { className: "str-chat__message--system__line" }),
2990
+ /* @__PURE__ */ W("p", { children: e.message.text }),
2991
+ /* @__PURE__ */ W("div", { className: "str-chat__message--system__line" })
2992
2992
  ]
2993
- }), !t && /* @__PURE__ */ U(z, { message: e.message })]
2993
+ }), !t && /* @__PURE__ */ W(z, { message: e.message })]
2994
2994
  });
2995
- }, Li = c(!1), Ri = ({ cx: e, index: t }) => /* @__PURE__ */ U("circle", {
2995
+ }, Li = c(!1), Ri = ({ cx: e, index: t }) => /* @__PURE__ */ W("circle", {
2996
2996
  cx: e,
2997
2997
  cy: "6.15",
2998
2998
  r: "3.9",
2999
2999
  fill: "#A0A0A0",
3000
- children: /* @__PURE__ */ U("animateTransform", {
3000
+ children: /* @__PURE__ */ W("animateTransform", {
3001
3001
  attributeName: "transform",
3002
3002
  type: "translate",
3003
3003
  values: "0 0; 0 -2.25; 0 0;",
@@ -3010,10 +3010,10 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3010
3010
  y.Generating,
3011
3011
  y.ExternalSources
3012
3012
  ]), Bi = ({ threadList: e }) => {
3013
- let { channel: t, channelConfig: n, thread: r } = me(), { client: i } = he(), { typing: a = {} } = Se(), { aiState: o } = fe(t), s = u(Li);
3013
+ let { channel: t, channelConfig: n, thread: r } = V(), { client: i } = me(), { typing: a = {} } = xe(), { aiState: o } = fe(t), s = u(Li);
3014
3014
  if (!e && s && zi.has(o)) {
3015
3015
  let e = Hi(t, i.user?.id);
3016
- return /* @__PURE__ */ U(Vi, {
3016
+ return /* @__PURE__ */ W(Vi, {
3017
3017
  avatarId: e?.id ?? "ai-agent",
3018
3018
  avatarName: e?.name ?? e?.id ?? "Agent",
3019
3019
  avatarImage: e?.image,
@@ -3024,36 +3024,36 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3024
3024
  let c = e ? [] : Object.values(a).filter(({ parent_id: e, user: t }) => t?.id !== i.user?.id && !e), l = e ? Object.values(a).filter(({ parent_id: e, user: t }) => t?.id !== i.user?.id && e === r?.id) : [], d = e ? l : c;
3025
3025
  if (!d.length) return null;
3026
3026
  let f = d[0]?.user, p = f?.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
3027
- return /* @__PURE__ */ U(Vi, {
3027
+ return /* @__PURE__ */ W(Vi, {
3028
3028
  avatarId: f?.id ?? p?.id ?? "typing-user",
3029
3029
  avatarName: f?.name ?? p?.name ?? f?.id ?? "Typing user",
3030
3030
  avatarImage: f?.image ?? p?.image,
3031
3031
  testId: "typing-indicator"
3032
3032
  });
3033
- }, Vi = ({ avatarId: e, avatarName: t, avatarImage: n, testId: r }) => /* @__PURE__ */ U("div", {
3033
+ }, Vi = ({ avatarId: e, avatarName: t, avatarImage: n, testId: r }) => /* @__PURE__ */ W("div", {
3034
3034
  className: "str-chat__li str-chat__li--single str-chat__typing-indicator !static",
3035
3035
  "data-testid": r,
3036
3036
  style: { marginBottom: "var(--messaging-channel-input-spacer-height, 80px)" },
3037
- children: /* @__PURE__ */ W("div", {
3037
+ children: /* @__PURE__ */ G("div", {
3038
3038
  className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text",
3039
- children: [/* @__PURE__ */ U(_t, {
3039
+ children: [/* @__PURE__ */ W(gt, {
3040
3040
  className: "str-chat__avatar str-chat__message-sender-avatar",
3041
3041
  id: e,
3042
3042
  name: t,
3043
3043
  image: n ?? void 0,
3044
3044
  size: 24,
3045
3045
  shape: "circle"
3046
- }), /* @__PURE__ */ U("div", {
3046
+ }), /* @__PURE__ */ W("div", {
3047
3047
  className: "str-chat__message-inner mx-0",
3048
- children: /* @__PURE__ */ U("div", {
3048
+ children: /* @__PURE__ */ W("div", {
3049
3049
  className: "str-chat__message-bubble-wrapper",
3050
- children: /* @__PURE__ */ W("div", {
3050
+ children: /* @__PURE__ */ G("div", {
3051
3051
  className: "str-chat__message-bubble relative isolate",
3052
- children: [/* @__PURE__ */ U("div", {
3052
+ children: [/* @__PURE__ */ W("div", {
3053
3053
  className: "str-chat__message-text min-h-11 flex items-center",
3054
- children: /* @__PURE__ */ U("div", {
3054
+ children: /* @__PURE__ */ W("div", {
3055
3055
  className: "str-chat__message-text-inner str-chat__message-simple-text-inner",
3056
- children: /* @__PURE__ */ W("svg", {
3056
+ children: /* @__PURE__ */ G("svg", {
3057
3057
  "aria-hidden": "true",
3058
3058
  className: "block overflow-visible",
3059
3059
  viewBox: "0 0 32 12.3",
@@ -3061,22 +3061,22 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3061
3061
  height: "13",
3062
3062
  overflow: "visible",
3063
3063
  children: [
3064
- /* @__PURE__ */ U(Ri, {
3064
+ /* @__PURE__ */ W(Ri, {
3065
3065
  cx: "4",
3066
3066
  index: 0
3067
3067
  }),
3068
- /* @__PURE__ */ U(Ri, {
3068
+ /* @__PURE__ */ W(Ri, {
3069
3069
  cx: "16",
3070
3070
  index: 1
3071
3071
  }),
3072
- /* @__PURE__ */ U(Ri, {
3072
+ /* @__PURE__ */ W(Ri, {
3073
3073
  cx: "28",
3074
3074
  index: 2
3075
3075
  })
3076
3076
  ]
3077
3077
  })
3078
3078
  })
3079
- }), /* @__PURE__ */ U(Jt, { side: "other" })]
3079
+ }), /* @__PURE__ */ W(qt, { side: "other" })]
3080
3080
  })
3081
3081
  })
3082
3082
  })]
@@ -3091,18 +3091,18 @@ function Hi(e, t) {
3091
3091
  }
3092
3092
  //#endregion
3093
3093
  //#region src/components/MessagingShell/ChannelEmptyState.tsx
3094
- var Ui = () => null, Wi = ({ className: e, message: t }) => /* @__PURE__ */ W("div", {
3095
- className: J("flex items-center justify-center h-full", e),
3096
- children: [/* @__PURE__ */ W("svg", {
3094
+ var Ui = () => null, Wi = ({ className: e, message: t }) => /* @__PURE__ */ G("div", {
3095
+ className: Y("flex items-center justify-center h-full", e),
3096
+ children: [/* @__PURE__ */ G("svg", {
3097
3097
  viewBox: "0 0 100 100",
3098
3098
  className: "size-8 fill-pebble",
3099
3099
  stroke: "none",
3100
3100
  children: [
3101
- /* @__PURE__ */ U("circle", {
3101
+ /* @__PURE__ */ W("circle", {
3102
3102
  cx: "6",
3103
3103
  cy: "50",
3104
3104
  r: "6",
3105
- children: /* @__PURE__ */ U("animateTransform", {
3105
+ children: /* @__PURE__ */ W("animateTransform", {
3106
3106
  attributeName: "transform",
3107
3107
  dur: "1s",
3108
3108
  type: "translate",
@@ -3111,11 +3111,11 @@ var Ui = () => null, Wi = ({ className: e, message: t }) => /* @__PURE__ */ W("d
3111
3111
  begin: "0.1"
3112
3112
  })
3113
3113
  }),
3114
- /* @__PURE__ */ U("circle", {
3114
+ /* @__PURE__ */ W("circle", {
3115
3115
  cx: "30",
3116
3116
  cy: "50",
3117
3117
  r: "6",
3118
- children: /* @__PURE__ */ U("animateTransform", {
3118
+ children: /* @__PURE__ */ W("animateTransform", {
3119
3119
  attributeName: "transform",
3120
3120
  dur: "1s",
3121
3121
  type: "translate",
@@ -3124,11 +3124,11 @@ var Ui = () => null, Wi = ({ className: e, message: t }) => /* @__PURE__ */ W("d
3124
3124
  begin: "0.2"
3125
3125
  })
3126
3126
  }),
3127
- /* @__PURE__ */ U("circle", {
3127
+ /* @__PURE__ */ W("circle", {
3128
3128
  cx: "54",
3129
3129
  cy: "50",
3130
3130
  r: "6",
3131
- children: /* @__PURE__ */ U("animateTransform", {
3131
+ children: /* @__PURE__ */ W("animateTransform", {
3132
3132
  attributeName: "transform",
3133
3133
  dur: "1s",
3134
3134
  type: "translate",
@@ -3138,15 +3138,15 @@ var Ui = () => null, Wi = ({ className: e, message: t }) => /* @__PURE__ */ W("d
3138
3138
  })
3139
3139
  })
3140
3140
  ]
3141
- }), t && /* @__PURE__ */ U("span", {
3141
+ }), t && /* @__PURE__ */ W("span", {
3142
3142
  className: "text-stone",
3143
3143
  children: t
3144
3144
  })]
3145
- }), Gi = o.memo(() => /* @__PURE__ */ U("div", {
3145
+ }), Gi = o.memo(() => /* @__PURE__ */ W("div", {
3146
3146
  className: "messaging-loading-state flex items-center justify-center h-full",
3147
- children: /* @__PURE__ */ W("div", {
3147
+ children: /* @__PURE__ */ G("div", {
3148
3148
  className: "flex items-center",
3149
- children: [/* @__PURE__ */ U(Wi, { className: "w-6 h-6" }), /* @__PURE__ */ U("span", {
3149
+ children: [/* @__PURE__ */ W(Wi, { className: "w-6 h-6" }), /* @__PURE__ */ W("span", {
3150
3150
  className: "text-sm text-stone",
3151
3151
  children: "Loading messages"
3152
3152
  })]
@@ -3156,13 +3156,13 @@ Gi.displayName = "LoadingState";
3156
3156
  //#endregion
3157
3157
  //#region src/components/ChannelView.tsx
3158
3158
  var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMessageInputFooter: r, renderConversationFooter: i, onLeaveConversation: a, onBlockParticipant: s, showDeleteConversation: c = !0, onDeleteConversationClick: u, onBlockParticipantClick: f, onReportParticipantClick: p, showBlockParticipant: h = !0, showReportParticipant: g = !0, composerDisabled: _ = !1, composerDisabledReason: v, showStarButton: y = !1, renderChannelBanner: b, customChannelActions: x, renderChannelActions: S, renderMessage: C, viewerLanguage: w, showChannelInfo: T = !0, onParticipantNameClick: E, onOutboundClick: D, resolveOutbound: O, composerInput: k }) => {
3159
- let { channel: A, messages: j } = me(), M = m(D);
3159
+ let { channel: A, messages: j } = V(), M = m(D);
3160
3160
  d(() => {
3161
3161
  M.current = D;
3162
3162
  }, [D]);
3163
3163
  let N = l((e) => {
3164
3164
  M.current?.(e);
3165
- }, []), P = D ? N : void 0, I = $t(j, O), L = A.state.messages.some((e) => e.type !== "deleted"), R = b ? /* @__PURE__ */ U(o.Fragment, { children: b() }, "lt-channel-banner") : null, z = /* @__PURE__ */ U(Tt, {
3165
+ }, []), P = D ? N : void 0, I = Qt(j, O), L = A.state.messages.some((e) => e.type !== "deleted"), R = b ? /* @__PURE__ */ W(o.Fragment, { children: b() }, "lt-channel-banner") : null, z = /* @__PURE__ */ W(wt, {
3166
3166
  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%)]",
3167
3167
  onBack: e,
3168
3168
  showBackButton: t,
@@ -3180,7 +3180,7 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3180
3180
  renderChannelActions: S,
3181
3181
  onParticipantNameClick: E
3182
3182
  }), ee = l((e) => {
3183
- let { message: t } = V("ChannelView"), n = /* @__PURE__ */ U(mi, {
3183
+ let { message: t } = H("ChannelView"), n = /* @__PURE__ */ W(mi, {
3184
3184
  ...e,
3185
3185
  viewerLanguage: w,
3186
3186
  onOutboundClick: P
@@ -3191,34 +3191,34 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3191
3191
  C,
3192
3192
  w
3193
3193
  ]);
3194
- return /* @__PURE__ */ U(Yt.Provider, {
3194
+ return /* @__PURE__ */ W(Jt.Provider, {
3195
3195
  value: I,
3196
- children: /* @__PURE__ */ U(ae, {
3196
+ children: /* @__PURE__ */ W(ae, {
3197
3197
  overrides: {
3198
3198
  Message: ee,
3199
3199
  MessageActions: _i,
3200
3200
  UnreadMessagesNotification: () => null,
3201
3201
  UnreadMessagesSeparator: () => null
3202
3202
  },
3203
- children: /* @__PURE__ */ U(B, { children: k ? /* @__PURE__ */ W("div", {
3203
+ children: /* @__PURE__ */ W(B, { children: k ? /* @__PURE__ */ G("div", {
3204
3204
  className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col",
3205
- children: [/* @__PURE__ */ W("div", {
3205
+ children: [/* @__PURE__ */ G("div", {
3206
3206
  className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
3207
- children: [!L && /* @__PURE__ */ U("div", {
3207
+ children: [!L && /* @__PURE__ */ W("div", {
3208
3208
  className: "str-chat__list",
3209
- children: /* @__PURE__ */ W("div", {
3209
+ children: /* @__PURE__ */ G("div", {
3210
3210
  className: "str-chat__message-list-scroll",
3211
3211
  children: [z, R]
3212
3212
  })
3213
- }), /* @__PURE__ */ U(F, {
3214
- head: L ? /* @__PURE__ */ W("div", {
3213
+ }), /* @__PURE__ */ W(F, {
3214
+ head: L ? /* @__PURE__ */ G("div", {
3215
3215
  className: "sticky top-0 z-10",
3216
3216
  children: [z, R]
3217
3217
  }) : void 0,
3218
3218
  hideDeletedMessages: !0,
3219
3219
  hideNewMessageSeparator: !1
3220
3220
  })]
3221
- }, "lt-channel-message-list"), /* @__PURE__ */ U(Ei, {
3221
+ }, "lt-channel-message-list"), /* @__PURE__ */ W(Ei, {
3222
3222
  ...n && { renderActions: () => n?.(A) },
3223
3223
  ...i && { renderHeader: () => i(A) },
3224
3224
  renderFooter: () => r?.(A),
@@ -3226,17 +3226,17 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3226
3226
  disabledReason: v,
3227
3227
  composerInput: k
3228
3228
  }, "lt-channel-message-input")]
3229
- }) : /* @__PURE__ */ W(H, { children: [
3230
- /* @__PURE__ */ W("div", {
3229
+ }) : /* @__PURE__ */ G(U, { children: [
3230
+ /* @__PURE__ */ G("div", {
3231
3231
  className: "flex-1 overflow-hidden relative",
3232
- children: [!L && /* @__PURE__ */ U("div", {
3232
+ children: [!L && /* @__PURE__ */ W("div", {
3233
3233
  className: "str-chat__list",
3234
- children: /* @__PURE__ */ W("div", {
3234
+ children: /* @__PURE__ */ G("div", {
3235
3235
  className: "str-chat__message-list-scroll",
3236
3236
  children: [z, R]
3237
3237
  })
3238
- }), /* @__PURE__ */ U(F, {
3239
- head: L ? /* @__PURE__ */ W("div", {
3238
+ }), /* @__PURE__ */ W(F, {
3239
+ head: L ? /* @__PURE__ */ G("div", {
3240
3240
  className: "sticky top-0 z-10",
3241
3241
  children: [z, R]
3242
3242
  }) : void 0,
@@ -3244,8 +3244,8 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3244
3244
  hideNewMessageSeparator: !1
3245
3245
  })]
3246
3246
  }, "lt-channel-message-list"),
3247
- i ? /* @__PURE__ */ U(o.Fragment, { children: i(A) }, "lt-channel-conversation-footer") : null,
3248
- /* @__PURE__ */ U(Ei, {
3247
+ i ? /* @__PURE__ */ W(o.Fragment, { children: i(A) }, "lt-channel-conversation-footer") : null,
3248
+ /* @__PURE__ */ W(Ei, {
3249
3249
  ...n && { renderActions: () => n?.(A) },
3250
3250
  renderFooter: () => r?.(A),
3251
3251
  disabled: _,
@@ -3288,23 +3288,23 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3288
3288
  return t.addEventListener("click", n), () => t.removeEventListener("click", n);
3289
3289
  }, [A, e]);
3290
3290
  let te = we(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
3291
- return /* @__PURE__ */ U("div", {
3291
+ return /* @__PURE__ */ W("div", {
3292
3292
  ref: ee,
3293
- className: J("messaging-channel-view h-full flex flex-col", c),
3293
+ className: Y("messaging-channel-view h-full flex flex-col", c),
3294
3294
  style: te,
3295
- children: /* @__PURE__ */ U(Li.Provider, {
3295
+ children: /* @__PURE__ */ W(Li.Provider, {
3296
3296
  value: x ?? !1,
3297
- children: /* @__PURE__ */ U(S, {
3297
+ children: /* @__PURE__ */ W(S, {
3298
3298
  channel: e,
3299
3299
  MessageSystem: Ii,
3300
3300
  EmptyStateIndicator: u,
3301
3301
  LoadingIndicator: Gi,
3302
- DateSeparator: Et,
3302
+ DateSeparator: Tt,
3303
3303
  TypingIndicator: Bi,
3304
3304
  doSendMessageRequest: z,
3305
3305
  ...j ? { SendButton: j } : {},
3306
3306
  ...M ? { AttachmentPreviewList: M } : {},
3307
- children: /* @__PURE__ */ U(Ki, {
3307
+ children: /* @__PURE__ */ W(Ki, {
3308
3308
  onBack: t,
3309
3309
  showBackButton: n,
3310
3310
  renderMessageInputActions: r,
@@ -3340,27 +3340,27 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3340
3340
  qi.displayName = "ChannelView";
3341
3341
  //#endregion
3342
3342
  //#region src/components/MessagingShell/ErrorState.tsx
3343
- var Ji = o.memo(({ message: e, onBack: t }) => /* @__PURE__ */ U("div", {
3343
+ var Ji = o.memo(({ message: e, onBack: t }) => /* @__PURE__ */ W("div", {
3344
3344
  className: "messaging-error-state flex items-center justify-center h-full p-8",
3345
- children: /* @__PURE__ */ W("div", {
3345
+ children: /* @__PURE__ */ G("div", {
3346
3346
  className: "text-center max-w-sm",
3347
3347
  children: [
3348
- /* @__PURE__ */ U("div", {
3348
+ /* @__PURE__ */ W("div", {
3349
3349
  className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6",
3350
- children: /* @__PURE__ */ U("span", {
3350
+ children: /* @__PURE__ */ W("span", {
3351
3351
  className: "text-4xl",
3352
3352
  children: "⚠️"
3353
3353
  })
3354
3354
  }),
3355
- /* @__PURE__ */ U("h2", {
3355
+ /* @__PURE__ */ W("h2", {
3356
3356
  className: "font-semibold text-charcoal mb-2",
3357
3357
  children: "Oops!"
3358
3358
  }),
3359
- /* @__PURE__ */ U("p", {
3359
+ /* @__PURE__ */ W("p", {
3360
3360
  className: "text-stone text-sm mb-6",
3361
3361
  children: e
3362
3362
  }),
3363
- t && /* @__PURE__ */ U("button", {
3363
+ t && /* @__PURE__ */ W("button", {
3364
3364
  type: "button",
3365
3365
  onClick: t,
3366
3366
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-[#7f22fe] hover:bg-primary-alt rounded-lg transition-colors focus-ring",
@@ -3373,7 +3373,7 @@ Ji.displayName = "ErrorState";
3373
3373
  //#endregion
3374
3374
  //#region src/components/MessagingShell/index.tsx
3375
3375
  var Yi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversationFooter: n, onChannelSelect: r, onExitConversation: i, initialParticipantFilter: a, initialParticipantData: o, CustomChannelEmptyState: s, onBlockParticipantClick: c, onReportParticipantClick: u, dmAgentEnabled: f, onMessageSent: p, viewerLanguage: g, renderChannelBanner: _, customChannelActions: v, renderChannelActions: y, onParticipantNameClick: b, onOutboundClick: x, resolveOutbound: S, renderMessage: C, onMessageLinkClick: w, showChannelInfo: T, composerInput: E, attachmentPreviewList: D }) => {
3376
- let { client: O, isConnected: k, isLoading: A, error: j, refreshConnection: M, service: N, debug: P } = at(), [F, I] = h(null), [L, R] = h(null), [z, ee] = h(!1), { showDeleteConversation: te = !0 } = e, ne = m(o);
3376
+ let { client: O, isConnected: k, isLoading: A, error: j, refreshConnection: M, service: N, debug: P } = it(), [F, I] = h(null), [L, R] = h(null), [z, ee] = h(!1), { showDeleteConversation: te = !0 } = e, ne = m(o);
3377
3377
  ne.current = o;
3378
3378
  let re = m(r);
3379
3379
  re.current = r;
@@ -3432,17 +3432,17 @@ var Yi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversati
3432
3432
  let oe = l(() => {
3433
3433
  I(null), ee(!0), ae.current?.();
3434
3434
  }, []);
3435
- return A ? /* @__PURE__ */ U(Gi, {}) : j ? /* @__PURE__ */ U(Ji, {
3435
+ return A ? /* @__PURE__ */ W(Gi, {}) : j ? /* @__PURE__ */ W(Ji, {
3436
3436
  message: j,
3437
3437
  onBack: M
3438
- }) : !k || !O ? /* @__PURE__ */ U(Ji, {
3438
+ }) : !k || !O ? /* @__PURE__ */ W(Ji, {
3439
3439
  message: "Not connected to messaging service",
3440
3440
  onBack: M
3441
- }) : L ? /* @__PURE__ */ U(Ji, { message: L }) : z && !F ? /* @__PURE__ */ U(Ji, { message: "Conversation ended" }) : F ? /* @__PURE__ */ U("div", {
3441
+ }) : L ? /* @__PURE__ */ W(Ji, { message: L }) : z && !F ? /* @__PURE__ */ W(Ji, { message: "Conversation ended" }) : F ? /* @__PURE__ */ W("div", {
3442
3442
  className: "messaging-shell h-full bg-background-primary overflow-hidden",
3443
- children: /* @__PURE__ */ U("div", {
3443
+ children: /* @__PURE__ */ W("div", {
3444
3444
  className: "flex h-full min-h-0 flex-col",
3445
- children: /* @__PURE__ */ U(qi, {
3445
+ children: /* @__PURE__ */ W(qi, {
3446
3446
  channel: F,
3447
3447
  renderMessageInputActions: t,
3448
3448
  renderConversationFooter: n,
@@ -3468,7 +3468,7 @@ var Yi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversati
3468
3468
  attachmentPreviewList: D
3469
3469
  }, F.id)
3470
3470
  })
3471
- }) : /* @__PURE__ */ U(Gi, {});
3471
+ }) : /* @__PURE__ */ W(Gi, {});
3472
3472
  };
3473
3473
  //#endregion
3474
3474
  //#region src/hooks/useRestorePendingMessages.ts
@@ -3505,8 +3505,8 @@ var Zi = o.createContext({
3505
3505
  year: "numeric"
3506
3506
  });
3507
3507
  }, na = o.memo((e) => {
3508
- let { channel: t, unread: n } = e, { selectedChannel: r, onChannelSelect: i, debug: a, channelPreview: o, renderMessagePreview: s, viewerLanguage: c } = $i(), { client: l } = he(), u = r?.id === t?.id, d = ot(t);
3509
- if (o) return /* @__PURE__ */ U(o, {
3508
+ let { channel: t, unread: n } = e, { selectedChannel: r, onChannelSelect: i, debug: a, channelPreview: o, renderMessagePreview: s, viewerLanguage: c } = $i(), { client: l } = me(), u = r?.id === t?.id, d = at(t);
3509
+ if (o) return /* @__PURE__ */ W(o, {
3510
3510
  ...e,
3511
3511
  active: u,
3512
3512
  selectedChannel: r,
@@ -3518,70 +3518,70 @@ var Zi = o.createContext({
3518
3518
  }, p = (e) => {
3519
3519
  let t = e.key === "Enter" || e.key === " ", n = e.repeat;
3520
3520
  !t || n || (e.preventDefault(), f());
3521
- }, m = st(t?.state?.members, l?.userID, t?.type), h = dt(m?.user), g = m?.user?.image, _ = (() => {
3521
+ }, m = ot(t?.state?.members, l?.userID, t?.type), h = ut(m?.user), g = m?.user?.image, _ = (() => {
3522
3522
  let e = t?.state?.messages;
3523
3523
  if (e?.length) {
3524
3524
  for (let t = e.length - 1; t >= 0; t--) if (e[t].type !== "system") return e[t];
3525
3525
  }
3526
3526
  })(), v = (() => {
3527
- let e = Ot({
3527
+ let e = Dt({
3528
3528
  message: _,
3529
3529
  viewerLanguage: c
3530
3530
  }), { custom_type: t, attachment_content_type: n } = _?.metadata || {};
3531
- if (t === G.TIP) return e || "Sent a tip";
3532
- if (t === G.PAID) return e || "Sent a message";
3533
- if (t === G.ATTACHMENT) {
3531
+ if (t === K.TIP) return e || "Sent a tip";
3532
+ if (t === K.PAID) return e || "Sent a message";
3533
+ if (t === K.ATTACHMENT) {
3534
3534
  if (n === "text") return "🔒 Sent a locked message";
3535
3535
  if (n === "media") return "🔒 Sent a locked attachment";
3536
3536
  }
3537
3537
  if (e) return e;
3538
3538
  let r = _?.attachments?.[0];
3539
3539
  return r ? r.og_scrape_url ? r.og_scrape_url : r.type === "image" ? "📷 Sent an image" : r.type === "video" ? "🎥 Sent a video" : r.type === "audio" ? "🎵 Sent audio" : r.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
3540
- })(), y = _?.created_at ? ta(new Date(_.created_at)) : "", b = _ ? Bt(_) : !1, x = s ? s(_, v) : `${b ? "✨ " : ""}${v}`, S = n ?? 0;
3540
+ })(), y = _?.created_at ? ta(new Date(_.created_at)) : "", b = _ ? zt(_) : !1, x = s ? s(_, v) : `${b ? "✨ " : ""}${v}`, S = n ?? 0;
3541
3541
  return a && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
3542
3542
  channelId: t?.id,
3543
3543
  isSelected: u,
3544
3544
  participantName: h,
3545
3545
  unreadCount: S,
3546
3546
  hasTimestamp: !!y
3547
- }), /* @__PURE__ */ U("div", {
3547
+ }), /* @__PURE__ */ W("div", {
3548
3548
  role: "button",
3549
3549
  tabIndex: 0,
3550
3550
  onClick: f,
3551
3551
  onKeyDown: p,
3552
- className: J("group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2", {
3552
+ className: Y("group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2", {
3553
3553
  "bg-black/[0.04]": u,
3554
3554
  "hover:bg-black/[0.02]": !u
3555
3555
  }),
3556
3556
  "data-dd-privacy": "mask",
3557
- children: /* @__PURE__ */ W("div", {
3557
+ children: /* @__PURE__ */ G("div", {
3558
3558
  className: "flex items-start gap-4",
3559
- children: [/* @__PURE__ */ U(_t, {
3559
+ children: [/* @__PURE__ */ W(gt, {
3560
3560
  id: m?.user?.id || t.id || "unknown",
3561
3561
  name: h,
3562
3562
  image: g,
3563
3563
  size: 48,
3564
3564
  starred: d
3565
- }), /* @__PURE__ */ W("div", {
3565
+ }), /* @__PURE__ */ G("div", {
3566
3566
  className: "flex-1 min-w-0 flex flex-col gap-1",
3567
- children: [/* @__PURE__ */ W("div", {
3567
+ children: [/* @__PURE__ */ G("div", {
3568
3568
  className: "flex items-center justify-between gap-2",
3569
- children: [/* @__PURE__ */ W("h3", {
3570
- className: J("text-sm font-medium truncate text-[#191918]"),
3571
- children: [d && /* @__PURE__ */ U("span", {
3569
+ children: [/* @__PURE__ */ G("h3", {
3570
+ className: Y("text-sm font-medium truncate text-[#191918]"),
3571
+ children: [d && /* @__PURE__ */ W("span", {
3572
3572
  className: "sr-only",
3573
3573
  children: "Starred conversation. "
3574
3574
  }), h]
3575
- }), y && /* @__PURE__ */ U("span", {
3575
+ }), y && /* @__PURE__ */ W("span", {
3576
3576
  className: "text-xs text-[#717070] flex-shrink-0",
3577
3577
  children: y
3578
3578
  })]
3579
- }), /* @__PURE__ */ W("div", {
3579
+ }), /* @__PURE__ */ G("div", {
3580
3580
  className: "flex items-center justify-between gap-2 min-w-0",
3581
- children: [/* @__PURE__ */ U("p", {
3581
+ children: [/* @__PURE__ */ W("p", {
3582
3582
  className: "text-sm text-[#717070] flex-1 line-clamp-1",
3583
3583
  children: x
3584
- }), S > 0 && /* @__PURE__ */ U("span", {
3584
+ }), S > 0 && /* @__PURE__ */ W("span", {
3585
3585
  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",
3586
3586
  children: S > 99 ? "99+" : S
3587
3587
  })]
@@ -3596,7 +3596,7 @@ na.displayName = "CustomChannelPreview";
3596
3596
  var ra = { last_message_at: -1 }, ia = o.memo(({ onChannelSelect: e, selectedChannel: t, filters: n, allowNewMessagesFromUnfilteredChannels: r = !1, channelRenderFilterFn: i, sort: a = ra, className: s, customEmptyStateIndicator: c, channelListPaginator: l = D, channelPreview: u, renderMessagePreview: d, viewerLanguage: f, lockChannelOrder: p, onMessageNewHandler: m, onMessageNew: h, onChannelVisible: g, onAddedToChannel: _, onChannelUpdated: v }) => {
3597
3597
  let y = o.useRef(0);
3598
3598
  y.current++;
3599
- let { debug: b = !1 } = rt(), x = o.useCallback((e) => {
3599
+ let { debug: b = !1 } = nt(), x = o.useCallback((e) => {
3600
3600
  for (let t of e) Xi(t);
3601
3601
  return i ? i(e) : e;
3602
3602
  }, [i]);
@@ -3620,13 +3620,13 @@ var ra = { last_message_at: -1 }, ia = o.memo(({ onChannelSelect: e, selectedCha
3620
3620
  d,
3621
3621
  f
3622
3622
  ]);
3623
- return /* @__PURE__ */ U("div", {
3624
- className: J("messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden", s),
3625
- children: /* @__PURE__ */ U("div", {
3623
+ return /* @__PURE__ */ W("div", {
3624
+ className: Y("messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden", s),
3625
+ children: /* @__PURE__ */ W("div", {
3626
3626
  className: "flex-1 overflow-hidden min-w-0",
3627
- children: /* @__PURE__ */ U(Qi, {
3627
+ children: /* @__PURE__ */ W(Qi, {
3628
3628
  value: S,
3629
- children: /* @__PURE__ */ U(C, {
3629
+ children: /* @__PURE__ */ W(C, {
3630
3630
  filters: n,
3631
3631
  sort: a,
3632
3632
  options: { limit: 30 },
@@ -3649,22 +3649,19 @@ var ra = { last_message_at: -1 }, ia = o.memo(({ onChannelSelect: e, selectedCha
3649
3649
  ia.displayName = "ChannelList";
3650
3650
  //#endregion
3651
3651
  //#region src/components/RichCard/RichCardBody.tsx
3652
- var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa = "text-[14px] leading-5 tracking-[0.02em]", sa = () => /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("br", {}), /* @__PURE__ */ U("span", {
3653
- "aria-hidden": !0,
3654
- className: "block h-1.5"
3655
- })] }), ca = (e) => e.split(/\r?\n/).map((e, t, n) => /* @__PURE__ */ W(o.Fragment, { children: [e, t < n.length - 1 ? /* @__PURE__ */ U(sa, {}) : null] }, t)), la = ({ surface: e, actions: t, layout: n }) => {
3652
+ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", oa = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", sa = ({ surface: e, actions: t, layout: n }) => {
3656
3653
  if (t == null || t.length === 0) return null;
3657
3654
  let r = n === "stacked";
3658
- return /* @__PURE__ */ U("div", {
3659
- className: J("flex gap-2", r ? "mt-4 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"),
3660
- children: t.map((t, n) => /* @__PURE__ */ U(pn, {
3655
+ return /* @__PURE__ */ W("div", {
3656
+ className: Y("flex gap-2", r ? "mt-3 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"),
3657
+ children: t.map((t, n) => /* @__PURE__ */ W(fn, {
3661
3658
  variant: e,
3662
3659
  cta: t,
3663
3660
  fullWidth: r,
3664
3661
  standalone: !0
3665
3662
  }, `${t.label}-${n}`))
3666
3663
  });
3667
- }, ua = ({ ctaSurface: e, chinTextColor: t, title: n, subtitle: r, subtitleLines: i = 3, appIcon: a, actions: o }) => {
3664
+ }, ca = ({ ctaSurface: e, chinTextColor: t, title: n, subtitle: r, subtitleLines: i = 3, appIcon: a, actions: o }) => {
3668
3665
  let s = n != null && n.trim() !== "", c = r != null && r.trim() !== "", l = o != null && o.length > 0;
3669
3666
  if (!s && !c && !l) return null;
3670
3667
  let u = { color: t }, d = i > 1 ? {
@@ -3673,43 +3670,43 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3673
3670
  WebkitBoxOrient: "vertical",
3674
3671
  WebkitLineClamp: i,
3675
3672
  overflow: "hidden"
3676
- } : u, f = l && (o?.[0]?.variant ?? "primary") === "secondary", p = /* @__PURE__ */ W("div", {
3677
- className: "flex min-w-0 flex-1 flex-col gap-4",
3678
- children: [s && /* @__PURE__ */ W("div", {
3673
+ } : u, f = l && (o?.[0]?.variant ?? "primary") === "secondary", p = /* @__PURE__ */ G("div", {
3674
+ className: "flex min-w-0 flex-1 flex-col gap-[2px]",
3675
+ children: [s && /* @__PURE__ */ G("div", {
3679
3676
  className: "flex min-w-0 items-center gap-2",
3680
- children: [a ? /* @__PURE__ */ U("span", {
3677
+ children: [a ? /* @__PURE__ */ W("span", {
3681
3678
  className: "shrink-0",
3682
3679
  children: a
3683
- }) : null, /* @__PURE__ */ U("p", {
3684
- className: J("min-w-0", aa),
3680
+ }) : null, /* @__PURE__ */ W("p", {
3681
+ className: Y("min-w-0", aa),
3685
3682
  style: u,
3686
3683
  children: n
3687
3684
  })]
3688
- }), c && /* @__PURE__ */ U("p", {
3689
- className: J(oa, i <= 1 && "truncate"),
3685
+ }), c && /* @__PURE__ */ W("p", {
3686
+ className: Y(oa, i > 1 && "whitespace-pre-line", i <= 1 && "truncate"),
3690
3687
  style: d,
3691
- children: i > 1 ? ca(r ?? "") : r
3688
+ children: r
3692
3689
  })]
3693
3690
  });
3694
- return /* @__PURE__ */ U("div", {
3691
+ return /* @__PURE__ */ W("div", {
3695
3692
  className: "shrink-0 px-4 py-3",
3696
- children: f ? /* @__PURE__ */ W("div", {
3693
+ children: f ? /* @__PURE__ */ G("div", {
3697
3694
  className: "flex items-center justify-between gap-3",
3698
- children: [p, /* @__PURE__ */ U(la, {
3695
+ children: [p, /* @__PURE__ */ W(sa, {
3699
3696
  surface: e,
3700
3697
  actions: o,
3701
3698
  layout: "row"
3702
3699
  })]
3703
- }) : /* @__PURE__ */ W(H, { children: [p, /* @__PURE__ */ U(la, {
3700
+ }) : /* @__PURE__ */ G(U, { children: [p, /* @__PURE__ */ W(sa, {
3704
3701
  surface: e,
3705
3702
  actions: o,
3706
3703
  layout: "stacked"
3707
3704
  })] })
3708
3705
  });
3709
- }, da = {
3706
+ }, la = {
3710
3707
  dark: "bg-white/[0.06]",
3711
3708
  light: "bg-black/[0.04]"
3712
- }, fa = {
3709
+ }, ua = {
3713
3710
  1: [0],
3714
3711
  2: [-10, 10],
3715
3712
  3: [
@@ -3717,7 +3714,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3717
3714
  0,
3718
3715
  13
3719
3716
  ]
3720
- }, pa = {
3717
+ }, da = {
3721
3718
  1: [0],
3722
3719
  2: [-26, 26],
3723
3720
  3: [
@@ -3725,7 +3722,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3725
3722
  0,
3726
3723
  40
3727
3724
  ]
3728
- }, ma = {
3725
+ }, fa = {
3729
3726
  1: [0],
3730
3727
  2: [0, 1],
3731
3728
  3: [
@@ -3733,7 +3730,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3733
3730
  3,
3734
3731
  2
3735
3732
  ]
3736
- }, ha = {
3733
+ }, pa = {
3737
3734
  1: [1],
3738
3735
  2: [1, 1],
3739
3736
  3: [
@@ -3741,16 +3738,16 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3741
3738
  1.08,
3742
3739
  1
3743
3740
  ]
3744
- }, ga = ({ variant: e, images: t }) => {
3741
+ }, ma = ({ variant: e, images: t }) => {
3745
3742
  let [n, r] = o.useState({}), i = t.join("\n"), [s, c] = o.useState(i);
3746
3743
  i !== s && (c(i), r({}));
3747
3744
  let l = t.slice(0, 3).map((e, t) => ({
3748
3745
  src: e,
3749
3746
  index: t
3750
- })).filter(({ index: e }) => !n[e]), u = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, d = fa[u], f = pa[u], p = ma[u], m = ha[u];
3751
- return /* @__PURE__ */ U("div", {
3752
- className: J("relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden", da[e]),
3753
- children: l.map(({ src: e, index: t }, n) => /* @__PURE__ */ U("img", {
3747
+ })).filter(({ index: e }) => !n[e]), u = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, d = ua[u], f = da[u], p = fa[u], m = pa[u];
3748
+ return /* @__PURE__ */ W("div", {
3749
+ className: Y("relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden", la[e]),
3750
+ children: l.map(({ src: e, index: t }, n) => /* @__PURE__ */ W("img", {
3754
3751
  src: a(e) ?? e,
3755
3752
  alt: "",
3756
3753
  draggable: !1,
@@ -3767,44 +3764,44 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3767
3764
  }
3768
3765
  }, `${e}-${t}`))
3769
3766
  });
3770
- }, _a = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", va = ({ variant: e, presentation: t, images: n, title: r, heroUrl: i, onHeroError: a }) => /* @__PURE__ */ U("div", {
3771
- className: _a,
3772
- children: t === "fan" ? /* @__PURE__ */ U(ga, {
3767
+ }, ha = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", ga = ({ variant: e, presentation: t, images: n, title: r, heroUrl: i, onHeroError: a }) => /* @__PURE__ */ W("div", {
3768
+ className: ha,
3769
+ children: t === "fan" ? /* @__PURE__ */ W(ma, {
3773
3770
  variant: e,
3774
3771
  images: n
3775
- }) : /* @__PURE__ */ U(On, {
3772
+ }) : /* @__PURE__ */ W(Dn, {
3776
3773
  variant: e,
3777
3774
  thumbnailUrl: i,
3778
3775
  title: r,
3779
3776
  mimeType: "image/*",
3780
3777
  onImageError: a
3781
3778
  })
3782
- }), ya = ({ variant: e, title: t, subtitle: n, subtitleLines: r, images: i = [], imagePresentation: a, actions: o, appIcon: s, accentColor: c, groupPosition: l = "single" }) => {
3779
+ }), _a = ({ variant: e, title: t, subtitle: n, subtitleLines: r, images: i = [], imagePresentation: a, actions: o, appIcon: s, accentColor: c, groupPosition: l = "single" }) => {
3783
3780
  let u = Te({
3784
3781
  imagePresentation: a,
3785
3782
  images: i
3786
- }), d = i.length > 0, f = d && u === "hero", p = Pn({
3783
+ }), d = i.length > 0, f = d && u === "hero", p = Nn({
3787
3784
  variant: e,
3788
3785
  accentColor: c,
3789
3786
  layout: "featured",
3790
3787
  thumbnailUrl: f ? i[0] : void 0
3791
3788
  }), m = l === "single" || l === "end";
3792
- return /* @__PURE__ */ U(Rn, {
3789
+ return /* @__PURE__ */ W(Ln, {
3793
3790
  accentHex: p.accentHex,
3794
3791
  side: e === "dark" ? "sender" : "receiver",
3795
3792
  visible: m,
3796
- children: /* @__PURE__ */ W(Sn, {
3793
+ children: /* @__PURE__ */ G(xn, {
3797
3794
  variant: e,
3798
3795
  accentHex: p.accentHex,
3799
3796
  "data-testid": "rich-card",
3800
- children: [d && /* @__PURE__ */ U(va, {
3797
+ children: [d && /* @__PURE__ */ W(ga, {
3801
3798
  variant: e,
3802
3799
  presentation: u,
3803
3800
  images: i,
3804
3801
  title: t,
3805
3802
  heroUrl: f ? p.thumbnailUrl : void 0,
3806
3803
  onHeroError: p.onImageError
3807
- }), /* @__PURE__ */ U(ua, {
3804
+ }), /* @__PURE__ */ W(ca, {
3808
3805
  ctaSurface: p.surface,
3809
3806
  chinTextColor: p.chinTextColor,
3810
3807
  title: t,
@@ -3815,31 +3812,31 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3815
3812
  })]
3816
3813
  })
3817
3814
  });
3818
- }, ba = {
3819
- Sent: (e) => /* @__PURE__ */ U(ya, {
3815
+ }, va = {
3816
+ Sent: (e) => /* @__PURE__ */ W(_a, {
3820
3817
  ...e,
3821
3818
  variant: "dark"
3822
3819
  }),
3823
- Received: (e) => /* @__PURE__ */ U(ya, {
3820
+ Received: (e) => /* @__PURE__ */ W(_a, {
3824
3821
  ...e,
3825
3822
  variant: "light"
3826
3823
  })
3827
- }, xa = "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%", Sa = {
3824
+ }, ya = "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%", ba = {
3828
3825
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
3829
3826
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
3830
- }, Ca = ({ variant: e }) => /* @__PURE__ */ U("span", {
3827
+ }, xa = ({ variant: e }) => /* @__PURE__ */ W("span", {
3831
3828
  "aria-hidden": "true",
3832
3829
  className: "pointer-events-none absolute bottom-0 z-[-1] h-[1.4375rem] w-5",
3833
3830
  style: {
3834
- insetInlineEnd: e === "sent" ? "calc(-1 * 0.3125rem)" : void 0,
3835
- insetInlineStart: e === "received" ? "calc(-1 * 0.3125rem)" : void 0,
3831
+ insetInlineEnd: e === "sent" ? "calc(-1 * 0.25rem)" : void 0,
3832
+ insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
3836
3833
  transform: e === "received" ? "scaleX(-1)" : void 0,
3837
3834
  transformOrigin: "center",
3838
- backgroundColor: Sa[e],
3839
- WebkitMask: xa,
3840
- mask: xa
3835
+ backgroundColor: ba[e],
3836
+ WebkitMask: ya,
3837
+ mask: ya
3841
3838
  }
3842
- }), wa = {
3839
+ }), Sa = {
3843
3840
  sent: {
3844
3841
  backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
3845
3842
  color: "var(--str-chat__own-message-bubble-color, #fff)"
@@ -3848,75 +3845,72 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3848
3845
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
3849
3846
  color: "var(--str-chat__message-bubble-color, #000000)"
3850
3847
  }
3851
- }, Ta = ({ variant: e, text: t, tail: n = !0, header: r, className: i }) => /* @__PURE__ */ U("div", {
3848
+ }, Ca = ({ variant: e, text: t, tail: n = !0, header: r, className: i }) => /* @__PURE__ */ G("div", {
3852
3849
  "data-dd-privacy": "mask",
3853
- className: J("str-chat__message-bubble", "relative", "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]", i),
3850
+ className: Y("relative px-4 py-3", "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]", i),
3854
3851
  style: {
3855
- ...wa[e],
3852
+ ...Sa[e],
3856
3853
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
3857
3854
  isolation: "isolate"
3858
3855
  },
3859
- children: /* @__PURE__ */ W("div", {
3860
- className: "str-chat__message-text",
3861
- children: [
3862
- r != null && /* @__PURE__ */ U("div", {
3863
- className: "mb-1 font-medium",
3864
- "data-testid": "message-bubble-header",
3865
- children: r
3866
- }),
3867
- /* @__PURE__ */ U("p", {
3868
- className: "m-0 whitespace-pre-wrap break-words hyphens-manual",
3869
- children: t
3870
- }),
3871
- n && /* @__PURE__ */ U(Ca, { variant: e })
3872
- ]
3873
- })
3874
- }), Ea = {
3875
- Sent: ({ text: e, tail: t, className: n }) => /* @__PURE__ */ U(Ta, {
3856
+ children: [
3857
+ r != null && /* @__PURE__ */ W("div", {
3858
+ className: "mb-1 font-medium",
3859
+ "data-testid": "message-bubble-header",
3860
+ children: r
3861
+ }),
3862
+ /* @__PURE__ */ W("p", {
3863
+ className: "m-0 whitespace-pre-wrap break-words hyphens-manual",
3864
+ children: t
3865
+ }),
3866
+ n && /* @__PURE__ */ W(xa, { variant: e })
3867
+ ]
3868
+ }), wa = {
3869
+ Sent: ({ text: e, tail: t, className: n }) => /* @__PURE__ */ W(Ca, {
3876
3870
  variant: "sent",
3877
3871
  text: e,
3878
3872
  tail: t,
3879
3873
  className: n
3880
3874
  }),
3881
- Received: ({ text: e, tail: t, header: n, className: r }) => /* @__PURE__ */ U(Ta, {
3875
+ Received: ({ text: e, tail: t, header: n, className: r }) => /* @__PURE__ */ W(Ca, {
3882
3876
  variant: "received",
3883
3877
  text: e,
3884
3878
  tail: t,
3885
3879
  header: n,
3886
3880
  className: r
3887
3881
  })
3888
- }, Da = ({ question: e, onClick: t, loading: n = !1, className: r }) => /* @__PURE__ */ U("button", {
3882
+ }, Ta = ({ question: e, onClick: t, loading: n = !1, className: r }) => /* @__PURE__ */ W("button", {
3889
3883
  type: "button",
3890
3884
  onClick: t,
3891
3885
  disabled: n,
3892
3886
  style: { backgroundColor: "#E6E5E3" },
3893
- className: J("w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring", {
3887
+ className: Y("w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring", {
3894
3888
  "hover:brightness-95 active:brightness-90": !n,
3895
3889
  "opacity-50 cursor-not-allowed": n
3896
3890
  }, r),
3897
3891
  children: e
3898
- }), Oa = ({ faqs: e, onFaqClick: t, loadingFaqId: n, headerText: r, className: i, avatarImage: a, avatarName: o }) => {
3899
- let s = Ee(e);
3900
- return s.length === 0 ? null : /* @__PURE__ */ U("div", {
3892
+ }), Ea = ({ faqs: e, onFaqClick: t, loadingFaqId: n, headerText: r, className: i, avatarImage: a, avatarName: o }) => {
3893
+ let s = J(e);
3894
+ return s.length === 0 ? null : /* @__PURE__ */ W("div", {
3901
3895
  className: i,
3902
- children: /* @__PURE__ */ W("div", {
3896
+ children: /* @__PURE__ */ G("div", {
3903
3897
  className: "flex gap-3 items-end",
3904
- children: [(a || o) && /* @__PURE__ */ U("div", {
3898
+ children: [(a || o) && /* @__PURE__ */ W("div", {
3905
3899
  className: "flex-none",
3906
- children: /* @__PURE__ */ U(_t, {
3900
+ children: /* @__PURE__ */ W(gt, {
3907
3901
  id: o || "account",
3908
3902
  name: o || "Account",
3909
3903
  image: a,
3910
3904
  size: 24,
3911
3905
  shape: "circle"
3912
3906
  })
3913
- }), /* @__PURE__ */ W("div", {
3907
+ }), /* @__PURE__ */ G("div", {
3914
3908
  className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
3915
3909
  style: { backgroundColor: "#F1F0EE" },
3916
- children: [r && /* @__PURE__ */ U("p", {
3910
+ children: [r && /* @__PURE__ */ W("p", {
3917
3911
  className: "text-md text-charcoal mb-4",
3918
3912
  children: r
3919
- }), s.map((e) => /* @__PURE__ */ U(Da, {
3913
+ }), s.map((e) => /* @__PURE__ */ W(Ta, {
3920
3914
  question: e.question,
3921
3915
  onClick: () => t(e.id),
3922
3916
  loading: n === e.id
@@ -3926,6 +3920,6 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
3926
3920
  });
3927
3921
  };
3928
3922
  //#endregion
3929
- export { bt as ActionButton, _t as Avatar, Ui as ChannelEmptyState, ia as ChannelList, qi as ChannelView, Mt as CustomMessageProvider, Oa as FaqList, Da as FaqListItem, zn as LinkAttachment, Lt as LockedAttachment, Q as MessageAttachment, Ea as MessageBubble, et as MessagingLoggerProvider, it as MessagingProvider, Yi as MessagingShell, ba as RichCard, tn as TipMessage, nr as buildCompactMetaLabel, $n as formatFileSize, ta as formatRelativeTime, tr as getFileExtensionLabel, Ot as getMessageDisplayText, kt as isLinkAttachment, en as isTipMessage, lt as isUuidLike, Jn as messageAttachmentGroupPositionFromStream, Dt as normalizeLanguageCode, a as optimizeMessagingAttachmentUrl, st as resolveConversationParticipant, dt as resolveParticipantDisplayName, Si as useComposerLocked, Nt as useCustomMessage, at as useMessaging, tt as useMessagingLogger };
3923
+ export { yt as ActionButton, gt as Avatar, Ui as ChannelEmptyState, ia as ChannelList, qi as ChannelView, jt as CustomMessageProvider, Ea as FaqList, Ta as FaqListItem, Rn as LinkAttachment, It as LockedAttachment, Qr as MessageAttachment, wa as MessageBubble, $e as MessagingLoggerProvider, rt as MessagingProvider, Yi as MessagingShell, va as RichCard, en as TipMessage, tr as buildCompactMetaLabel, Qn as formatFileSize, ta as formatRelativeTime, er as getFileExtensionLabel, Dt as getMessageDisplayText, Ot as isLinkAttachment, $t as isTipMessage, ct as isUuidLike, qn as messageAttachmentGroupPositionFromStream, Et as normalizeLanguageCode, a as optimizeMessagingAttachmentUrl, ot as resolveConversationParticipant, ut as resolveParticipantDisplayName, Si as useComposerLocked, Mt as useCustomMessage, it as useMessaging, et as useMessagingLogger };
3930
3924
 
3931
3925
  //# sourceMappingURL=index.js.map