@linktr.ee/messaging-react 3.6.0 → 3.6.1-rc-1783229373
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/{Card-J8f28GLS.js → Card-B0lzpuYf.js} +3 -3
- package/dist/{Card-J8f28GLS.js.map → Card-B0lzpuYf.js.map} +1 -1
- package/dist/{Card-ra-g17Ur.js → Card-BrC7mKtr.js} +2 -2
- package/dist/{Card-ra-g17Ur.js.map → Card-BrC7mKtr.js.map} +1 -1
- package/dist/{Card-DzT94KFC.cjs → Card-BuR6mbUu.cjs} +2 -2
- package/dist/{Card-DzT94KFC.cjs.map → Card-BuR6mbUu.cjs.map} +1 -1
- package/dist/{Card-COTwOzVb.js → Card-CxS7GNqp.js} +2 -2
- package/dist/{Card-COTwOzVb.js.map → Card-CxS7GNqp.js.map} +1 -1
- package/dist/{Card-DmjLrV64.cjs → Card-DcUPqd79.cjs} +2 -2
- package/dist/{Card-DmjLrV64.cjs.map → Card-DcUPqd79.cjs.map} +1 -1
- package/dist/{Card-Cb4yfxFK.cjs → Card-d0_xEfdM.cjs} +2 -2
- package/dist/{Card-Cb4yfxFK.cjs.map → Card-d0_xEfdM.cjs.map} +1 -1
- package/dist/{LockedThumbnail-Ds_vBmYm.cjs → LockedThumbnail-BDtKMJjz.cjs} +2 -2
- package/dist/{LockedThumbnail-Ds_vBmYm.cjs.map → LockedThumbnail-BDtKMJjz.cjs.map} +1 -1
- package/dist/{LockedThumbnail-CVq5LPXE.js → LockedThumbnail-BaDgF8qJ.js} +2 -2
- package/dist/{LockedThumbnail-CVq5LPXE.js.map → LockedThumbnail-BaDgF8qJ.js.map} +1 -1
- package/dist/{index-D1XVCH1o.js → index-BPfehHDD.js} +192 -192
- package/dist/index-BPfehHDD.js.map +1 -0
- package/dist/{index-hvrSZScU.cjs → index-G4pnfm4m.cjs} +2 -2
- package/dist/{index-hvrSZScU.cjs.map → index-G4pnfm4m.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/CustomMessage/StreamAttachmentMessage.test.tsx +33 -0
- package/src/components/CustomMessage/StreamAttachmentMessage.tsx +9 -3
- package/src/components/CustomMessage/index.tsx +6 -4
- package/dist/index-D1XVCH1o.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
|
|
2
2
|
import j, { createContext as et, useContext as ke, useCallback as X, useState as B, useRef as Y, useEffect as W, useId as Vn, useMemo as se, Suspense as tt } from "react";
|
|
3
3
|
import { StreamChatService as Gn } from "@linktr.ee/messaging-core";
|
|
4
|
-
import { StreamChat as Hn, LinkPreviewsManager as
|
|
5
|
-
import { Chat as Yn, DateSeparator as qn, useChannelStateContext as
|
|
6
|
-
import { StarIcon as Ke, DotsThreeIcon as Is, SpinnerGapIcon as De, SignOutIcon as Ts, ProhibitInsetIcon as
|
|
4
|
+
import { StreamChat as Hn, LinkPreviewsManager as Bt } from "stream-chat";
|
|
5
|
+
import { Chat as Yn, DateSeparator as qn, useChannelStateContext as pe, useChatContext as be, areMessageUIPropsEqual as Wn, useMessageReminder as Xn, useComponentContext as nn, Attachment as Kn, EditMessageModal as Jn, MessageBlocked as Zn, MessageBouncePrompt as Qn, MessageDeleted as es, MessageIsThreadReplyInChannelButtonIndicator as ts, MessageRepliesCountButton as ns, ReminderNotification as ss, StreamedMessageText as as, messageHasAttachments as rs, messageHasReactions as is, isDateSeparatorMessage as os, isMessageBlocked as ls, isMessageBounced as cs, MessageBounceModal as ds, MessageText as jt, MessageErrorIcon as Ut, Poll as us, useMessageContext as Ee, useMessageComposer as ms, useStateStore as hs, MessageInput as fs, useMessageInputContext as gs, useMessageComposerHasSendableData as ps, AttachmentPreviewList as bs, QuotedMessagePreview as vs, TextareaComposer as xs, MessageTimestamp as Ge, AIStates as He, useTypingContext as ws, useAIState as _s, Channel as Ns, WithComponents as ys, Window as Cs, MessageList as ks, ChannelList as Es, InfiniteScroll as Ss } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ke, DotsThreeIcon as Is, SpinnerGapIcon as De, SignOutIcon as Ts, ProhibitInsetIcon as Vt, FlagIcon as sn, FileIcon as an, ImageIcon as As, SpeakerHighIcon as Ms, VideoCameraIcon as rn, FileMdIcon as Rs, FileTextIcon as Ls, FileZipIcon as Ds, FilePptIcon as Ps, FileCsvIcon as zs, FileXlsIcon as Os, FileDocIcon as Fs, FilePdfIcon as $s, CircleNotchIcon as ye, PlayIcon as Je, PauseIcon as Bs, LinkIcon as js, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Us, CaretRightIcon as we, GiftIcon as Vs, ThumbsUpIcon as Gs, ThumbsDownIcon as Hs, PencilSimpleIcon as Ys, TrashSimpleIcon as qs, ArrowUpIcon as Ws, SparkleIcon as _e, ProhibitIcon as Xs, ArrowLeftIcon as Gt } from "@phosphor-icons/react";
|
|
7
7
|
import C from "classnames";
|
|
8
|
-
import { MessageActions as Ks, DefaultDropdownActionButton as
|
|
9
|
-
const
|
|
8
|
+
import { MessageActions as Ks, DefaultDropdownActionButton as on } from "stream-chat-react/experimental";
|
|
9
|
+
const ln = et({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const on = et({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), nt = () => ke(
|
|
19
|
+
}), nt = () => ke(ln), Zi = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -196,7 +196,7 @@ const on = et({
|
|
|
196
196
|
renderCount: M.current,
|
|
197
197
|
willRenderChat: !!P,
|
|
198
198
|
contextValueReady: !!k
|
|
199
|
-
}), /* @__PURE__ */ n(
|
|
199
|
+
}), /* @__PURE__ */ n(ln.Provider, { value: k, children: P ? /* @__PURE__ */ n(
|
|
200
200
|
Yn,
|
|
201
201
|
{
|
|
202
202
|
client: P,
|
|
@@ -206,7 +206,7 @@ const on = et({
|
|
|
206
206
|
children: e
|
|
207
207
|
}
|
|
208
208
|
) : e });
|
|
209
|
-
}, Js = () => nt(),
|
|
209
|
+
}, Js = () => nt(), cn = (e) => {
|
|
210
210
|
var a, r;
|
|
211
211
|
const [t, s] = B(
|
|
212
212
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -251,14 +251,14 @@ const ea = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]
|
|
|
251
251
|
function ta(e) {
|
|
252
252
|
return ea.test(e.trim());
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Ht(e, t) {
|
|
255
255
|
const s = e == null ? void 0 : e.trim();
|
|
256
256
|
return !s || t && s === t ? !1 : !ta(s);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
return
|
|
258
|
+
function dn(e) {
|
|
259
|
+
return Ht(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Ht(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const Yt = [
|
|
262
262
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
263
263
|
// Apple
|
|
264
264
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -294,14 +294,14 @@ function na(e) {
|
|
|
294
294
|
}
|
|
295
295
|
return Math.abs(t);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
return
|
|
297
|
+
function un(e) {
|
|
298
|
+
return Yt[na(e) % Yt.length];
|
|
299
299
|
}
|
|
300
300
|
function sa(e) {
|
|
301
|
-
return
|
|
301
|
+
return un(e).emoji;
|
|
302
302
|
}
|
|
303
303
|
function aa(e) {
|
|
304
|
-
return
|
|
304
|
+
return un(e).bgColor;
|
|
305
305
|
}
|
|
306
306
|
const ae = ({
|
|
307
307
|
id: e,
|
|
@@ -480,7 +480,7 @@ const ae = ({
|
|
|
480
480
|
...a,
|
|
481
481
|
children: s
|
|
482
482
|
}
|
|
483
|
-
),
|
|
483
|
+
), qt = ({
|
|
484
484
|
channel: e,
|
|
485
485
|
participant: t,
|
|
486
486
|
showDeleteConversation: s = !0,
|
|
@@ -578,7 +578,7 @@ const ae = ({
|
|
|
578
578
|
disabled: T,
|
|
579
579
|
"aria-busy": T,
|
|
580
580
|
children: [
|
|
581
|
-
T ? /* @__PURE__ */ n(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
581
|
+
T ? /* @__PURE__ */ n(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
|
|
582
582
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
583
583
|
]
|
|
584
584
|
}
|
|
@@ -589,13 +589,13 @@ const ae = ({
|
|
|
589
589
|
disabled: T,
|
|
590
590
|
"aria-busy": T,
|
|
591
591
|
children: [
|
|
592
|
-
T ? /* @__PURE__ */ n(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
592
|
+
T ? /* @__PURE__ */ n(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
|
|
593
593
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
594
594
|
]
|
|
595
595
|
}
|
|
596
596
|
) }),
|
|
597
597
|
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ve, { variant: "danger", onClick: P, children: [
|
|
598
|
-
/* @__PURE__ */ n(
|
|
598
|
+
/* @__PURE__ */ n(sn, { className: "h-5 w-5" }),
|
|
599
599
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
600
600
|
] }) }),
|
|
601
601
|
g
|
|
@@ -608,7 +608,7 @@ function la(e) {
|
|
|
608
608
|
return e != null && e.length ? e.some((t) => t.type === Qe) ? "down" : e.some((t) => t.type === Ze) ? "up" : null : null;
|
|
609
609
|
}
|
|
610
610
|
function ca(e) {
|
|
611
|
-
const { channel: t } =
|
|
611
|
+
const { channel: t } = pe(), { client: s } = be("useMessageVote"), a = se(
|
|
612
612
|
() => la(e.own_reactions),
|
|
613
613
|
[e.own_reactions]
|
|
614
614
|
), r = X(async () => {
|
|
@@ -637,7 +637,7 @@ function ca(e) {
|
|
|
637
637
|
function da(e) {
|
|
638
638
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function mn({
|
|
641
641
|
message: e,
|
|
642
642
|
viewerLanguage: t
|
|
643
643
|
}) {
|
|
@@ -645,13 +645,13 @@ function un({
|
|
|
645
645
|
const s = e == null ? void 0 : e.text, a = da(t);
|
|
646
646
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
647
647
|
}
|
|
648
|
-
const ua = j.lazy(() => import("./Card-
|
|
648
|
+
const ua = j.lazy(() => import("./Card-CxS7GNqp.js")), ma = j.lazy(() => import("./Card-BrC7mKtr.js")), ha = j.lazy(() => import("./Card-B0lzpuYf.js")), at = () => /* @__PURE__ */ n(
|
|
649
649
|
"div",
|
|
650
650
|
{
|
|
651
651
|
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)]",
|
|
652
652
|
"aria-hidden": !0
|
|
653
653
|
}
|
|
654
|
-
), fa = (e) => /* @__PURE__ */ n(tt, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(ua, { ...e }) }),
|
|
654
|
+
), fa = (e) => /* @__PURE__ */ n(tt, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(ua, { ...e }) }), hn = (e) => /* @__PURE__ */ n(tt, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(ma, { ...e }) }), fn = (e) => /* @__PURE__ */ n(tt, { fallback: /* @__PURE__ */ n(at, {}), children: /* @__PURE__ */ n(ha, { ...e }) }), ga = hn, pa = fn, Wt = { Composer: fa, Sent: hn, Received: fn, Creator: ga, Visitor: pa }, ba = [
|
|
655
655
|
[/pdf/, "pdf"],
|
|
656
656
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
657
657
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -664,17 +664,17 @@ const ua = j.lazy(() => import("./Card-COTwOzVb.js")), ma = j.lazy(() => import(
|
|
|
664
664
|
function oe(e) {
|
|
665
665
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function gn(e) {
|
|
668
668
|
const t = ba.find(
|
|
669
669
|
([s]) => s.test(e)
|
|
670
670
|
);
|
|
671
671
|
return t ? t[1] : "generic";
|
|
672
672
|
}
|
|
673
673
|
const va = {
|
|
674
|
-
video:
|
|
674
|
+
video: rn,
|
|
675
675
|
audio: Ms,
|
|
676
676
|
image: As,
|
|
677
|
-
document:
|
|
677
|
+
document: an
|
|
678
678
|
}, xa = {
|
|
679
679
|
pdf: $s,
|
|
680
680
|
doc: Fs,
|
|
@@ -684,13 +684,13 @@ const va = {
|
|
|
684
684
|
zip: Ds,
|
|
685
685
|
text: Ls,
|
|
686
686
|
markdown: Rs,
|
|
687
|
-
generic:
|
|
687
|
+
generic: an
|
|
688
688
|
};
|
|
689
689
|
function wa(e) {
|
|
690
690
|
const t = oe(e);
|
|
691
|
-
return t !== "document" ? va[t] : xa[
|
|
691
|
+
return t !== "document" ? va[t] : xa[gn(e)];
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function ge(e, t) {
|
|
694
694
|
return j.createElement(wa(e), t);
|
|
695
695
|
}
|
|
696
696
|
const _a = (e) => {
|
|
@@ -787,7 +787,7 @@ const _a = (e) => {
|
|
|
787
787
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
788
788
|
}
|
|
789
789
|
),
|
|
790
|
-
!s && (g === "audio" || k) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
790
|
+
!s && (g === "audio" || k) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ge(t, {
|
|
791
791
|
className: "size-12 text-black/20",
|
|
792
792
|
weight: "regular"
|
|
793
793
|
}) }),
|
|
@@ -944,7 +944,7 @@ const _a = (e) => {
|
|
|
944
944
|
]
|
|
945
945
|
}
|
|
946
946
|
);
|
|
947
|
-
},
|
|
947
|
+
}, Xt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ya = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", pn = ({
|
|
948
948
|
mimeType: e,
|
|
949
949
|
sourceUrl: t,
|
|
950
950
|
thumbnailUrl: s,
|
|
@@ -1001,8 +1001,8 @@ const _a = (e) => {
|
|
|
1001
1001
|
"div",
|
|
1002
1002
|
{
|
|
1003
1003
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1004
|
-
children:
|
|
1005
|
-
className:
|
|
1004
|
+
children: ge(e, {
|
|
1005
|
+
className: Xt(r),
|
|
1006
1006
|
weight: "regular"
|
|
1007
1007
|
})
|
|
1008
1008
|
}
|
|
@@ -1018,13 +1018,13 @@ const _a = (e) => {
|
|
|
1018
1018
|
"div",
|
|
1019
1019
|
{
|
|
1020
1020
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1021
|
-
children:
|
|
1022
|
-
className:
|
|
1021
|
+
children: ge(e, {
|
|
1022
|
+
className: Xt(r),
|
|
1023
1023
|
weight: "regular"
|
|
1024
1024
|
})
|
|
1025
1025
|
}
|
|
1026
1026
|
);
|
|
1027
|
-
},
|
|
1027
|
+
}, bn = ({
|
|
1028
1028
|
variant: e,
|
|
1029
1029
|
thumbnail: t,
|
|
1030
1030
|
title: s,
|
|
@@ -1065,7 +1065,7 @@ const _a = (e) => {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
),
|
|
1067
1067
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1068
|
-
|
|
1068
|
+
ge(r, {
|
|
1069
1069
|
className: C(
|
|
1070
1070
|
"size-5 shrink-0",
|
|
1071
1071
|
f ? "text-white/55" : "text-black/55"
|
|
@@ -1090,7 +1090,7 @@ const _a = (e) => {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
);
|
|
1092
1092
|
};
|
|
1093
|
-
function
|
|
1093
|
+
function vn(e) {
|
|
1094
1094
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1095
1095
|
}
|
|
1096
1096
|
function rt(e) {
|
|
@@ -1135,12 +1135,12 @@ const it = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1135
1135
|
] });
|
|
1136
1136
|
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ n("div", { className: "block", children: u });
|
|
1137
1137
|
};
|
|
1138
|
-
function
|
|
1138
|
+
function xn(e) {
|
|
1139
1139
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1140
1140
|
}
|
|
1141
1141
|
function ot(e) {
|
|
1142
1142
|
var t;
|
|
1143
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1143
|
+
return (t = e.attachments) == null ? void 0 : t.find(xn);
|
|
1144
1144
|
}
|
|
1145
1145
|
async function Ta(e, t) {
|
|
1146
1146
|
let s;
|
|
@@ -1202,16 +1202,16 @@ function lt(e) {
|
|
|
1202
1202
|
thumbnailUrl: g
|
|
1203
1203
|
};
|
|
1204
1204
|
}
|
|
1205
|
-
const
|
|
1205
|
+
const wn = ({
|
|
1206
1206
|
resolvedUrl: e,
|
|
1207
1207
|
resolvedType: t,
|
|
1208
1208
|
title: s,
|
|
1209
1209
|
fileSize: a,
|
|
1210
1210
|
thumbnailUrl: r
|
|
1211
1211
|
}) => {
|
|
1212
|
-
const i = a !== void 0 ?
|
|
1212
|
+
const i = a !== void 0 ? vn(a) : void 0;
|
|
1213
1213
|
return /* @__PURE__ */ n(
|
|
1214
|
-
|
|
1214
|
+
bn,
|
|
1215
1215
|
{
|
|
1216
1216
|
variant: "dark",
|
|
1217
1217
|
title: s,
|
|
@@ -1219,7 +1219,7 @@ const xn = ({
|
|
|
1219
1219
|
mimeType: t,
|
|
1220
1220
|
detail: i,
|
|
1221
1221
|
thumbnail: /* @__PURE__ */ n(
|
|
1222
|
-
|
|
1222
|
+
pn,
|
|
1223
1223
|
{
|
|
1224
1224
|
mimeType: t,
|
|
1225
1225
|
sourceUrl: e,
|
|
@@ -1230,23 +1230,23 @@ const xn = ({
|
|
|
1230
1230
|
)
|
|
1231
1231
|
}
|
|
1232
1232
|
);
|
|
1233
|
-
},
|
|
1233
|
+
}, _n = ({
|
|
1234
1234
|
resolvedUrl: e,
|
|
1235
1235
|
resolvedType: t,
|
|
1236
1236
|
title: s,
|
|
1237
1237
|
fileSize: a,
|
|
1238
1238
|
thumbnailUrl: r
|
|
1239
1239
|
}) => {
|
|
1240
|
-
const i = oe(t), o = a !== void 0 ?
|
|
1240
|
+
const i = oe(t), o = a !== void 0 ? vn(a) : void 0;
|
|
1241
1241
|
return /* @__PURE__ */ n(
|
|
1242
|
-
|
|
1242
|
+
bn,
|
|
1243
1243
|
{
|
|
1244
1244
|
variant: "light",
|
|
1245
1245
|
title: s,
|
|
1246
1246
|
mimeType: t,
|
|
1247
1247
|
detail: o,
|
|
1248
1248
|
thumbnail: /* @__PURE__ */ n(
|
|
1249
|
-
|
|
1249
|
+
pn,
|
|
1250
1250
|
{
|
|
1251
1251
|
mimeType: t,
|
|
1252
1252
|
sourceUrl: e,
|
|
@@ -1284,7 +1284,7 @@ const xn = ({
|
|
|
1284
1284
|
{
|
|
1285
1285
|
className: "str-chat__message-bubble",
|
|
1286
1286
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1287
|
-
children: s ? /* @__PURE__ */ n("div", { className: rt(t), children: /* @__PURE__ */ n(it, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(
|
|
1287
|
+
children: s ? /* @__PURE__ */ n("div", { className: rt(t), children: /* @__PURE__ */ n(it, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(wn, { ...a }) : /* @__PURE__ */ n(_n, { ...a })
|
|
1288
1288
|
}
|
|
1289
1289
|
) })
|
|
1290
1290
|
}
|
|
@@ -1297,7 +1297,7 @@ const xn = ({
|
|
|
1297
1297
|
if (t)
|
|
1298
1298
|
return /* @__PURE__ */ n("div", { className: rt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(it, { attachment: t, isMyMessage: !0 }) });
|
|
1299
1299
|
const s = lt(e);
|
|
1300
|
-
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(
|
|
1300
|
+
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(wn, { ...s }) }) : null;
|
|
1301
1301
|
}, La = ({
|
|
1302
1302
|
message: e
|
|
1303
1303
|
}) => {
|
|
@@ -1305,7 +1305,7 @@ const xn = ({
|
|
|
1305
1305
|
if (t)
|
|
1306
1306
|
return /* @__PURE__ */ n("div", { className: rt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(it, { attachment: t, isMyMessage: !1 }) });
|
|
1307
1307
|
const s = lt(e);
|
|
1308
|
-
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(
|
|
1308
|
+
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(_n, { ...s }) }) : null;
|
|
1309
1309
|
}, Qi = Object.assign(Ma, {
|
|
1310
1310
|
Creator: Ra,
|
|
1311
1311
|
Visitor: La
|
|
@@ -1487,7 +1487,7 @@ function Wa(e, t) {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
if (!e) return;
|
|
1489
1489
|
if (oe(e) === "document") {
|
|
1490
|
-
const r =
|
|
1490
|
+
const r = gn(e), i = qa[r];
|
|
1491
1491
|
if (i) return i;
|
|
1492
1492
|
if (e === "application/octet-stream") return;
|
|
1493
1493
|
}
|
|
@@ -1516,7 +1516,7 @@ const Ka = {
|
|
|
1516
1516
|
}, Za = {
|
|
1517
1517
|
dark: "text-white/85",
|
|
1518
1518
|
light: "text-black/85"
|
|
1519
|
-
},
|
|
1519
|
+
}, Nn = ({
|
|
1520
1520
|
variant: e,
|
|
1521
1521
|
filename: t,
|
|
1522
1522
|
title: s,
|
|
@@ -1534,7 +1534,7 @@ const Ka = {
|
|
|
1534
1534
|
Ja[e]
|
|
1535
1535
|
),
|
|
1536
1536
|
"aria-hidden": !0,
|
|
1537
|
-
children:
|
|
1537
|
+
children: ge(a, {
|
|
1538
1538
|
className: C("size-6", Za[e]),
|
|
1539
1539
|
weight: "regular"
|
|
1540
1540
|
})
|
|
@@ -1575,7 +1575,7 @@ const Ka = {
|
|
|
1575
1575
|
l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
|
|
1576
1576
|
] });
|
|
1577
1577
|
};
|
|
1578
|
-
async function
|
|
1578
|
+
async function yn(e, t) {
|
|
1579
1579
|
const s = t ?? re(e);
|
|
1580
1580
|
try {
|
|
1581
1581
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -1605,7 +1605,7 @@ const Qa = ({
|
|
|
1605
1605
|
}) => {
|
|
1606
1606
|
const i = t.filename ?? re(t.src);
|
|
1607
1607
|
return /* @__PURE__ */ n(
|
|
1608
|
-
|
|
1608
|
+
Nn,
|
|
1609
1609
|
{
|
|
1610
1610
|
variant: e,
|
|
1611
1611
|
filename: i,
|
|
@@ -1642,7 +1642,7 @@ const Qa = ({
|
|
|
1642
1642
|
const p = c[b];
|
|
1643
1643
|
if (!p) return;
|
|
1644
1644
|
const _ = p.filename ?? re(p.src);
|
|
1645
|
-
|
|
1645
|
+
yn(p.src, _);
|
|
1646
1646
|
};
|
|
1647
1647
|
if (c.length === 0)
|
|
1648
1648
|
return null;
|
|
@@ -1707,7 +1707,7 @@ const Qa = ({
|
|
|
1707
1707
|
children: /* @__PURE__ */ n(we, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1708
1708
|
}
|
|
1709
1709
|
)
|
|
1710
|
-
] }),
|
|
1710
|
+
] }), Cn = ({
|
|
1711
1711
|
url: e,
|
|
1712
1712
|
filename: t,
|
|
1713
1713
|
variant: s = "pill",
|
|
@@ -1718,7 +1718,7 @@ const Qa = ({
|
|
|
1718
1718
|
}) => {
|
|
1719
1719
|
const [l, d] = B(!1), u = X(
|
|
1720
1720
|
(c) => {
|
|
1721
|
-
c.stopPropagation(), !l && (d(!0),
|
|
1721
|
+
c.stopPropagation(), !l && (d(!0), yn(e, t).catch(() => {
|
|
1722
1722
|
}).finally(() => {
|
|
1723
1723
|
d(!1), o == null || o();
|
|
1724
1724
|
}));
|
|
@@ -1907,7 +1907,7 @@ const Qa = ({
|
|
|
1907
1907
|
]
|
|
1908
1908
|
}
|
|
1909
1909
|
);
|
|
1910
|
-
},
|
|
1910
|
+
}, kn = ({
|
|
1911
1911
|
open: e,
|
|
1912
1912
|
items: t,
|
|
1913
1913
|
initialIndex: s = 0,
|
|
@@ -1929,7 +1929,7 @@ const Qa = ({
|
|
|
1929
1929
|
ariaLabel: d,
|
|
1930
1930
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
1931
1931
|
actions: /* @__PURE__ */ n(
|
|
1932
|
-
|
|
1932
|
+
Cn,
|
|
1933
1933
|
{
|
|
1934
1934
|
url: l.src,
|
|
1935
1935
|
filename: d,
|
|
@@ -1963,7 +1963,7 @@ const Qa = ({
|
|
|
1963
1963
|
]
|
|
1964
1964
|
}
|
|
1965
1965
|
) : null;
|
|
1966
|
-
}, rr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black",
|
|
1966
|
+
}, rr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", En = ({
|
|
1967
1967
|
tiles: e,
|
|
1968
1968
|
onTileActivate: t,
|
|
1969
1969
|
maxVisible: s = 4,
|
|
@@ -2060,7 +2060,7 @@ const Qa = ({
|
|
|
2060
2060
|
src: e,
|
|
2061
2061
|
alt: t,
|
|
2062
2062
|
items: s
|
|
2063
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
2063
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Sn = (e, t) => e.map((s, a) => ({
|
|
2064
2064
|
src: s.src,
|
|
2065
2065
|
alt: s.alt,
|
|
2066
2066
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
@@ -2091,16 +2091,16 @@ const Qa = ({
|
|
|
2091
2091
|
),
|
|
2092
2092
|
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ie, { onClick: i }) }) : null,
|
|
2093
2093
|
/* @__PURE__ */ n(
|
|
2094
|
-
|
|
2094
|
+
kn,
|
|
2095
2095
|
{
|
|
2096
2096
|
open: o,
|
|
2097
|
-
items:
|
|
2097
|
+
items: Sn([{ src: e, alt: t }], s),
|
|
2098
2098
|
initialIndex: l,
|
|
2099
2099
|
onClose: u
|
|
2100
2100
|
}
|
|
2101
2101
|
)
|
|
2102
2102
|
] });
|
|
2103
|
-
},
|
|
2103
|
+
}, In = ({
|
|
2104
2104
|
state: e,
|
|
2105
2105
|
src: t,
|
|
2106
2106
|
alt: s,
|
|
@@ -2127,12 +2127,12 @@ const Qa = ({
|
|
|
2127
2127
|
groupPosition: o,
|
|
2128
2128
|
"data-testid": "image-attachment",
|
|
2129
2129
|
children: [
|
|
2130
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
2130
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(En, { tiles: w, onTileActivate: c }) }),
|
|
2131
2131
|
/* @__PURE__ */ n(
|
|
2132
|
-
|
|
2132
|
+
kn,
|
|
2133
2133
|
{
|
|
2134
2134
|
open: m,
|
|
2135
|
-
items:
|
|
2135
|
+
items: Sn(u, a),
|
|
2136
2136
|
initialIndex: f,
|
|
2137
2137
|
onClose: v
|
|
2138
2138
|
}
|
|
@@ -2140,7 +2140,7 @@ const Qa = ({
|
|
|
2140
2140
|
]
|
|
2141
2141
|
}
|
|
2142
2142
|
);
|
|
2143
|
-
}, cr = (e) => /* @__PURE__ */ n(lr, { ...e }), dr = (e) => /* @__PURE__ */ n(
|
|
2143
|
+
}, cr = (e) => /* @__PURE__ */ n(lr, { ...e }), dr = (e) => /* @__PURE__ */ n(In, { ...e, state: "sent" }), ur = (e) => /* @__PURE__ */ n(In, { ...e, state: "received" }), mr = {
|
|
2144
2144
|
Composer: cr,
|
|
2145
2145
|
Sent: dr,
|
|
2146
2146
|
Received: ur
|
|
@@ -2210,7 +2210,7 @@ const Qa = ({
|
|
|
2210
2210
|
}) => {
|
|
2211
2211
|
const i = t.filename ?? re(t.src);
|
|
2212
2212
|
return /* @__PURE__ */ n(
|
|
2213
|
-
|
|
2213
|
+
Nn,
|
|
2214
2214
|
{
|
|
2215
2215
|
variant: e,
|
|
2216
2216
|
filename: i,
|
|
@@ -2253,7 +2253,7 @@ const Qa = ({
|
|
|
2253
2253
|
children: [
|
|
2254
2254
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((_, N) => {
|
|
2255
2255
|
const T = _.filename ?? re(_.src), R = b && N === 0 ? /* @__PURE__ */ n(Ie, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
2256
|
-
|
|
2256
|
+
Cn,
|
|
2257
2257
|
{
|
|
2258
2258
|
url: _.src,
|
|
2259
2259
|
filename: T,
|
|
@@ -2290,7 +2290,7 @@ const Qa = ({
|
|
|
2290
2290
|
Composer: br,
|
|
2291
2291
|
Sent: vr,
|
|
2292
2292
|
Received: xr
|
|
2293
|
-
},
|
|
2293
|
+
}, Tn = ({
|
|
2294
2294
|
open: e,
|
|
2295
2295
|
items: t,
|
|
2296
2296
|
initialIndex: s = 0,
|
|
@@ -2340,7 +2340,7 @@ const Qa = ({
|
|
|
2340
2340
|
]
|
|
2341
2341
|
}
|
|
2342
2342
|
) : null;
|
|
2343
|
-
}, _r = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Je, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }),
|
|
2343
|
+
}, _r = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Je, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), An = ({
|
|
2344
2344
|
item: e,
|
|
2345
2345
|
index: t
|
|
2346
2346
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2355,7 +2355,7 @@ const Qa = ({
|
|
|
2355
2355
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2356
2356
|
}
|
|
2357
2357
|
) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
2358
|
-
|
|
2358
|
+
rn,
|
|
2359
2359
|
{
|
|
2360
2360
|
className: "size-16 rounded-md text-white/30",
|
|
2361
2361
|
weight: "regular",
|
|
@@ -2365,14 +2365,14 @@ const Qa = ({
|
|
|
2365
2365
|
/* @__PURE__ */ n(_r, {})
|
|
2366
2366
|
] }), Nr = (e, t, s) => ({
|
|
2367
2367
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
2368
|
-
content: /* @__PURE__ */ n(
|
|
2368
|
+
content: /* @__PURE__ */ n(An, { item: e, index: t })
|
|
2369
2369
|
}), yr = ({
|
|
2370
2370
|
src: e,
|
|
2371
2371
|
poster: t,
|
|
2372
2372
|
mimeType: s,
|
|
2373
2373
|
preload: a,
|
|
2374
2374
|
items: r
|
|
2375
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
2375
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Mn = (e, t) => e.map((s, a) => ({
|
|
2376
2376
|
src: s.src,
|
|
2377
2377
|
poster: s.poster,
|
|
2378
2378
|
mimeType: s.mimeType,
|
|
@@ -2390,15 +2390,15 @@ const Qa = ({
|
|
|
2390
2390
|
onClick: () => u(0),
|
|
2391
2391
|
"aria-label": "Play video",
|
|
2392
2392
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
2393
|
-
children: /* @__PURE__ */ n(
|
|
2393
|
+
children: /* @__PURE__ */ n(An, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
2394
2394
|
}
|
|
2395
2395
|
),
|
|
2396
2396
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ie, { onClick: o }) }) : null,
|
|
2397
2397
|
/* @__PURE__ */ n(
|
|
2398
|
-
|
|
2398
|
+
Tn,
|
|
2399
2399
|
{
|
|
2400
2400
|
open: l,
|
|
2401
|
-
items:
|
|
2401
|
+
items: Mn(
|
|
2402
2402
|
[{ src: e, poster: t, mimeType: s, preload: r }],
|
|
2403
2403
|
a
|
|
2404
2404
|
),
|
|
@@ -2407,7 +2407,7 @@ const Qa = ({
|
|
|
2407
2407
|
}
|
|
2408
2408
|
)
|
|
2409
2409
|
] });
|
|
2410
|
-
},
|
|
2410
|
+
}, Rn = ({
|
|
2411
2411
|
state: e,
|
|
2412
2412
|
src: t,
|
|
2413
2413
|
poster: s,
|
|
@@ -2436,7 +2436,7 @@ const Qa = ({
|
|
|
2436
2436
|
"data-testid": "video-attachment",
|
|
2437
2437
|
children: [
|
|
2438
2438
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
2439
|
-
|
|
2439
|
+
En,
|
|
2440
2440
|
{
|
|
2441
2441
|
tiles: b,
|
|
2442
2442
|
onTileActivate: v,
|
|
@@ -2444,10 +2444,10 @@ const Qa = ({
|
|
|
2444
2444
|
}
|
|
2445
2445
|
) }),
|
|
2446
2446
|
/* @__PURE__ */ n(
|
|
2447
|
-
|
|
2447
|
+
Tn,
|
|
2448
2448
|
{
|
|
2449
2449
|
open: f,
|
|
2450
|
-
items:
|
|
2450
|
+
items: Mn(g, r),
|
|
2451
2451
|
initialIndex: c,
|
|
2452
2452
|
onClose: w
|
|
2453
2453
|
}
|
|
@@ -2455,7 +2455,7 @@ const Qa = ({
|
|
|
2455
2455
|
]
|
|
2456
2456
|
}
|
|
2457
2457
|
);
|
|
2458
|
-
}, kr = (e) => /* @__PURE__ */ n(Cr, { ...e }), Er = (e) => /* @__PURE__ */ n(
|
|
2458
|
+
}, kr = (e) => /* @__PURE__ */ n(Cr, { ...e }), Er = (e) => /* @__PURE__ */ n(Rn, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ n(Rn, { ...e, state: "received" }), Ir = {
|
|
2459
2459
|
Composer: kr,
|
|
2460
2460
|
Sent: Er,
|
|
2461
2461
|
Received: Sr
|
|
@@ -2469,9 +2469,9 @@ const Qa = ({
|
|
|
2469
2469
|
isUnlocking: () => !1
|
|
2470
2470
|
}, Ar = {
|
|
2471
2471
|
LockedAttachment: Tr
|
|
2472
|
-
},
|
|
2472
|
+
}, Ln = et({}), eo = Ln.Provider;
|
|
2473
2473
|
function Mr(e) {
|
|
2474
|
-
return ke(
|
|
2474
|
+
return ke(Ln)[e] ?? Ar[e];
|
|
2475
2475
|
}
|
|
2476
2476
|
const Rr = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
2477
2477
|
"svg",
|
|
@@ -2502,9 +2502,9 @@ const Rr = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
2502
2502
|
}, Pr = (e) => {
|
|
2503
2503
|
var t;
|
|
2504
2504
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
2505
|
-
},
|
|
2505
|
+
}, Dn = (e) => Lr(e) || Dr(e), zr = (e) => {
|
|
2506
2506
|
var t;
|
|
2507
|
-
return
|
|
2507
|
+
return Dn(e) && !((t = e.text) != null && t.trim());
|
|
2508
2508
|
}, qe = ({
|
|
2509
2509
|
message: e,
|
|
2510
2510
|
standalone: t = !1,
|
|
@@ -2512,7 +2512,7 @@ const Rr = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
2512
2512
|
hasAttachment: a = !1
|
|
2513
2513
|
}) => {
|
|
2514
2514
|
var m;
|
|
2515
|
-
const r =
|
|
2515
|
+
const r = Dn(e), i = ze(e);
|
|
2516
2516
|
if (!r && !i)
|
|
2517
2517
|
return null;
|
|
2518
2518
|
if (r) {
|
|
@@ -2728,11 +2728,11 @@ const Br = {
|
|
|
2728
2728
|
}, qr = {
|
|
2729
2729
|
dark: "size-16 text-white/25",
|
|
2730
2730
|
light: "size-16 text-black/25"
|
|
2731
|
-
}, je = (e, t) => !!t && !!e && oe(e) === "audio",
|
|
2731
|
+
}, je = (e, t) => !!t && !!e && oe(e) === "audio", bt = (e, t) => {
|
|
2732
2732
|
if (!t || !e) return !1;
|
|
2733
2733
|
const s = oe(e);
|
|
2734
2734
|
return s === "video" || s === "audio";
|
|
2735
|
-
},
|
|
2735
|
+
}, vt = "bg-[#F2F3F4]", Fe = ({
|
|
2736
2736
|
variant: e,
|
|
2737
2737
|
thumbnailUrl: t,
|
|
2738
2738
|
sourceUrl: s,
|
|
@@ -2785,7 +2785,7 @@ const Br = {
|
|
|
2785
2785
|
"flex h-full w-full items-center justify-center",
|
|
2786
2786
|
Yr[e]
|
|
2787
2787
|
),
|
|
2788
|
-
children:
|
|
2788
|
+
children: ge(r, {
|
|
2789
2789
|
className: qr[e],
|
|
2790
2790
|
weight: "regular"
|
|
2791
2791
|
})
|
|
@@ -2829,7 +2829,7 @@ const Br = {
|
|
|
2829
2829
|
children: /* @__PURE__ */ n(Ys, { className: "size-5", weight: "regular" })
|
|
2830
2830
|
}
|
|
2831
2831
|
) : void 0;
|
|
2832
|
-
return c ? /* @__PURE__ */ n(Oe, { variant: "dark", bgClassName:
|
|
2832
|
+
return c ? /* @__PURE__ */ n(Oe, { variant: "dark", bgClassName: vt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
2833
2833
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
|
|
2834
2834
|
Fe,
|
|
2835
2835
|
{
|
|
@@ -2885,7 +2885,7 @@ const Br = {
|
|
|
2885
2885
|
cta: d,
|
|
2886
2886
|
onClick: u
|
|
2887
2887
|
}) => {
|
|
2888
|
-
const g =
|
|
2888
|
+
const g = bt(a, i), m = gt(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, v = je(a, i) ? vt : void 0, w = d && u ? {
|
|
2889
2889
|
...d,
|
|
2890
2890
|
onClick: () => {
|
|
2891
2891
|
var b;
|
|
@@ -2939,14 +2939,14 @@ const Br = {
|
|
|
2939
2939
|
cta: u,
|
|
2940
2940
|
onClick: g
|
|
2941
2941
|
}) => {
|
|
2942
|
-
const m =
|
|
2942
|
+
const m = bt(r, o), f = gt(a), c = u == null && f != null && !m ? f : void 0, v = u == null && !m && c != null ? g : void 0;
|
|
2943
2943
|
return /* @__PURE__ */ h(
|
|
2944
2944
|
Oe,
|
|
2945
2945
|
{
|
|
2946
2946
|
variant: "dark",
|
|
2947
2947
|
href: c,
|
|
2948
2948
|
onClick: v,
|
|
2949
|
-
bgClassName: je(r, o) ?
|
|
2949
|
+
bgClassName: je(r, o) ? vt : void 0,
|
|
2950
2950
|
children: [
|
|
2951
2951
|
l === "featured" && /* @__PURE__ */ n(
|
|
2952
2952
|
Fe,
|
|
@@ -2973,7 +2973,7 @@ const Br = {
|
|
|
2973
2973
|
]
|
|
2974
2974
|
}
|
|
2975
2975
|
);
|
|
2976
|
-
},
|
|
2976
|
+
}, Kt = {
|
|
2977
2977
|
Composer: Wr,
|
|
2978
2978
|
Sent: Kr,
|
|
2979
2979
|
Received: Xr
|
|
@@ -2982,13 +2982,13 @@ function L(e) {
|
|
|
2982
2982
|
const t = e == null ? void 0 : e.trim();
|
|
2983
2983
|
return t || void 0;
|
|
2984
2984
|
}
|
|
2985
|
-
function
|
|
2985
|
+
function Jt(e) {
|
|
2986
2986
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
2987
2987
|
}
|
|
2988
2988
|
function Qr(e, t) {
|
|
2989
2989
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
2990
2990
|
return !1;
|
|
2991
|
-
const s =
|
|
2991
|
+
const s = Jt(e), a = Jt(t);
|
|
2992
2992
|
if (s === a)
|
|
2993
2993
|
return !0;
|
|
2994
2994
|
if (!s.includes(a))
|
|
@@ -2996,8 +2996,8 @@ function Qr(e, t) {
|
|
|
2996
2996
|
const r = s.split(a).join("");
|
|
2997
2997
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
2998
2998
|
}
|
|
2999
|
-
function
|
|
3000
|
-
const t = L(e.og_scrape_url) ?? L(e.title_link), s = L(e.image_url) ?? L(e.thumb_url);
|
|
2999
|
+
function Zt(e) {
|
|
3000
|
+
const t = L(e.og_scrape_url) ?? L(e.title_link), s = L(e.image_url) ?? L(e.thumb_url), a = L(e.asset_url), r = L(e.mime_type);
|
|
3001
3001
|
return {
|
|
3002
3002
|
title: L(e.title),
|
|
3003
3003
|
description: L(e.text),
|
|
@@ -3005,9 +3005,9 @@ function Jt(e) {
|
|
|
3005
3005
|
thumbnailUrl: s,
|
|
3006
3006
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3007
3007
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3008
|
-
sourceUrl:
|
|
3009
|
-
layout: s ? "featured" : "classic",
|
|
3010
|
-
mimeType:
|
|
3008
|
+
sourceUrl: a,
|
|
3009
|
+
layout: s || bt(r, a) ? "featured" : "classic",
|
|
3010
|
+
mimeType: r
|
|
3011
3011
|
};
|
|
3012
3012
|
}
|
|
3013
3013
|
function ei(e) {
|
|
@@ -3057,7 +3057,7 @@ function ni(e) {
|
|
|
3057
3057
|
function si(e, t, s) {
|
|
3058
3058
|
return t <= 1 ? s : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3059
3059
|
}
|
|
3060
|
-
function
|
|
3060
|
+
function Qt(e) {
|
|
3061
3061
|
return L(e.image_url) ?? L(e.asset_url) ?? "";
|
|
3062
3062
|
}
|
|
3063
3063
|
function ai(e) {
|
|
@@ -3080,7 +3080,7 @@ function ri(e, t) {
|
|
|
3080
3080
|
case "image":
|
|
3081
3081
|
return {
|
|
3082
3082
|
items: t.map((a) => ({
|
|
3083
|
-
src:
|
|
3083
|
+
src: Qt(a),
|
|
3084
3084
|
alt: L(a.title)
|
|
3085
3085
|
}))
|
|
3086
3086
|
};
|
|
@@ -3131,7 +3131,7 @@ function ri(e, t) {
|
|
|
3131
3131
|
switch (e) {
|
|
3132
3132
|
case "image":
|
|
3133
3133
|
return {
|
|
3134
|
-
src:
|
|
3134
|
+
src: Qt(s),
|
|
3135
3135
|
alt: L(s.title)
|
|
3136
3136
|
};
|
|
3137
3137
|
case "video":
|
|
@@ -3182,15 +3182,15 @@ const oi = ({
|
|
|
3182
3182
|
var w;
|
|
3183
3183
|
const a = zn(s.attachments);
|
|
3184
3184
|
if (a.length === 0) return null;
|
|
3185
|
-
const r = ti(a), i = ni(a), o = (w = s.text) == null ? void 0 : w.trim(), l = a.find((b) => b.type === "link"), d = (l == null ? void 0 : l.type) === "link" ?
|
|
3185
|
+
const r = ti(a), i = ni(a), o = (w = s.text) == null ? void 0 : w.trim(), l = a.find((b) => b.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? Zt(l.attachments[0] ?? {}).url : void 0, u = o && Qr(o, d) ? void 0 : o;
|
|
3186
3186
|
let g = 0, m = 0;
|
|
3187
3187
|
const f = [], c = (b, p) => {
|
|
3188
3188
|
const _ = g === r - 1;
|
|
3189
3189
|
g += 1;
|
|
3190
|
-
const N = t ?
|
|
3190
|
+
const N = t ? Kt.Sent : Kt.Received;
|
|
3191
3191
|
f.push(
|
|
3192
3192
|
/* @__PURE__ */ h(j.Fragment, { children: [
|
|
3193
|
-
/* @__PURE__ */ n(N, { ...
|
|
3193
|
+
/* @__PURE__ */ n(N, { ...Zt(b) }),
|
|
3194
3194
|
_ && u ? /* @__PURE__ */ n("div", { className: t ? Jr : Zr, children: u }) : null
|
|
3195
3195
|
] }, p)
|
|
3196
3196
|
);
|
|
@@ -3223,7 +3223,7 @@ const oi = ({
|
|
|
3223
3223
|
v(b, `media-${p}`);
|
|
3224
3224
|
}), /* @__PURE__ */ n(te, { children: f });
|
|
3225
3225
|
}, li = (e) => {
|
|
3226
|
-
var
|
|
3226
|
+
var Ct, kt, Et, St, It, Tt, At, Mt, Rt, Lt, Dt, Pt, zt, Ot;
|
|
3227
3227
|
const {
|
|
3228
3228
|
additionalMessageInputProps: t,
|
|
3229
3229
|
chatbotVotingEnabled: s,
|
|
@@ -3241,7 +3241,7 @@ const oi = ({
|
|
|
3241
3241
|
renderText: v,
|
|
3242
3242
|
threadList: w,
|
|
3243
3243
|
viewerLanguage: b
|
|
3244
|
-
} = e, { client: p } =
|
|
3244
|
+
} = e, { client: p } = be("CustomMessage"), { channel: _ } = pe("CustomMessage"), { isUnlocking: N, onUnlockClick: T, onFetchSource: R, onDownloadClick: M } = Mr("LockedAttachment"), [D, P] = B(!1), U = Xn(c.id), { selected: z, voteUp: k, voteDown: A } = ca(c), {
|
|
3245
3245
|
Attachment: E = Kn,
|
|
3246
3246
|
EditMessageModal: y = Jn,
|
|
3247
3247
|
MessageActions: S,
|
|
@@ -3253,22 +3253,22 @@ const oi = ({
|
|
|
3253
3253
|
ReminderNotification: q = ss,
|
|
3254
3254
|
StreamedMessageText: x = as,
|
|
3255
3255
|
PinIndicator: I
|
|
3256
|
-
} =
|
|
3256
|
+
} = nn("CustomMessage"), H = rs(c), G = is(c), Z = se(
|
|
3257
3257
|
() => m == null ? void 0 : m(c),
|
|
3258
3258
|
[m, c]
|
|
3259
3259
|
), $ = se(() => {
|
|
3260
|
-
const ce = c.attachments ?? [],
|
|
3261
|
-
if (!ze(c)) return
|
|
3262
|
-
const
|
|
3263
|
-
return
|
|
3260
|
+
const ce = c.attachments ?? [], he = c.shared_location ? [c.shared_location, ...ce] : ce;
|
|
3261
|
+
if (!ze(c)) return he;
|
|
3262
|
+
const Ft = he.filter(($t) => !("type" in $t) || !xn($t));
|
|
3263
|
+
return Ft.length === he.length ? he : Ft;
|
|
3264
3264
|
}, [c]), Q = se(
|
|
3265
3265
|
() => zn($),
|
|
3266
3266
|
[$]
|
|
3267
3267
|
), J = se(() => {
|
|
3268
|
-
const ce =
|
|
3268
|
+
const ce = mn({ message: c, viewerLanguage: b });
|
|
3269
3269
|
return ce === c.text ? c : { ...c, text: ce };
|
|
3270
3270
|
}, [c, b]), Me = Q.length > 0, Re = Q.reduce(
|
|
3271
|
-
(ce,
|
|
3271
|
+
(ce, he) => ce + he.attachments.length,
|
|
3272
3272
|
0
|
|
3273
3273
|
) === (($ == null ? void 0 : $.length) ?? 0), Le = $a(
|
|
3274
3274
|
{
|
|
@@ -3283,9 +3283,9 @@ const oi = ({
|
|
|
3283
3283
|
return /* @__PURE__ */ n(V, { message: c });
|
|
3284
3284
|
if (ls(c))
|
|
3285
3285
|
return /* @__PURE__ */ n(F, {});
|
|
3286
|
-
const ne = !w && !!c.reply_count, le = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((
|
|
3286
|
+
const ne = !w && !!c.reply_count, le = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Ct = c.error) == null ? void 0 : Ct.status) !== 403, wt = cs(c);
|
|
3287
3287
|
let de;
|
|
3288
|
-
ie ? de = () => u(c) :
|
|
3288
|
+
ie ? de = () => u(c) : wt && (de = () => P(!0));
|
|
3289
3289
|
const ue = f(), jn = C(
|
|
3290
3290
|
"str-chat__message str-chat__message-simple",
|
|
3291
3291
|
`str-chat__message--${c.type}`,
|
|
@@ -3297,13 +3297,13 @@ const oi = ({
|
|
|
3297
3297
|
"str-chat__message--highlighted": g,
|
|
3298
3298
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3299
3299
|
"str-chat__message--with-reactions": G,
|
|
3300
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
3300
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((kt = c == null ? void 0 : c.error) == null ? void 0 : kt.status) !== 403,
|
|
3301
3301
|
"str-chat__message-with-thread-link": ne || le,
|
|
3302
3302
|
"str-chat__virtual-message__wrapper--end": r,
|
|
3303
3303
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3304
3304
|
"str-chat__virtual-message__wrapper--group": o
|
|
3305
3305
|
}
|
|
3306
|
-
), Ue = c.poll_id && p.polls.fromState(c.poll_id),
|
|
3306
|
+
), Ue = c.poll_id && p.polls.fromState(c.poll_id), _t = zr(c), me = ze(c), Nt = Pr(c), Ve = !!($ != null && $.length && !c.quoted_message), yt = me && ue && Ve, Un = Me && Re && !c.quoted_message && !Ue && !Z && !me;
|
|
3307
3307
|
return /* @__PURE__ */ h(te, { children: [
|
|
3308
3308
|
a && /* @__PURE__ */ n(
|
|
3309
3309
|
y,
|
|
@@ -3337,14 +3337,14 @@ const oi = ({
|
|
|
3337
3337
|
name: c.user.name || c.user.id,
|
|
3338
3338
|
size: 24,
|
|
3339
3339
|
shape: "circle",
|
|
3340
|
-
dmAgentEnabled:
|
|
3340
|
+
dmAgentEnabled: me
|
|
3341
3341
|
}
|
|
3342
3342
|
),
|
|
3343
3343
|
/* @__PURE__ */ n(
|
|
3344
3344
|
"div",
|
|
3345
3345
|
{
|
|
3346
3346
|
className: C("str-chat__message-inner", {
|
|
3347
|
-
"str-chat__simple-message--error-failed": ie ||
|
|
3347
|
+
"str-chat__simple-message--error-failed": ie || wt
|
|
3348
3348
|
}),
|
|
3349
3349
|
"data-testid": "message-inner",
|
|
3350
3350
|
onClick: de,
|
|
@@ -3357,32 +3357,32 @@ const oi = ({
|
|
|
3357
3357
|
marginInlineEnd: 0,
|
|
3358
3358
|
marginInlineStart: 0
|
|
3359
3359
|
},
|
|
3360
|
-
children:
|
|
3360
|
+
children: Nt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3361
3361
|
ue ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3362
3362
|
S && /* @__PURE__ */ n(S, {}),
|
|
3363
3363
|
/* @__PURE__ */ n(
|
|
3364
|
-
|
|
3364
|
+
Wt.Sent,
|
|
3365
3365
|
{
|
|
3366
|
-
title: (
|
|
3367
|
-
mimeType: (
|
|
3368
|
-
thumbnailUrl: (
|
|
3369
|
-
amountText: (
|
|
3370
|
-
detail: (
|
|
3371
|
-
paymentStatus: (
|
|
3366
|
+
title: (Et = c.metadata) == null ? void 0 : Et.attachment_title,
|
|
3367
|
+
mimeType: (St = c.metadata) == null ? void 0 : St.attachment_mime_type,
|
|
3368
|
+
thumbnailUrl: (It = c.metadata) == null ? void 0 : It.attachment_thumbnail,
|
|
3369
|
+
amountText: (Tt = c.metadata) == null ? void 0 : Tt.amount_text,
|
|
3370
|
+
detail: (At = c.metadata) == null ? void 0 : At.attachment_detail,
|
|
3371
|
+
paymentStatus: (Mt = c.metadata) == null ? void 0 : Mt.payment_status,
|
|
3372
3372
|
onPreviewClick: () => T == null ? void 0 : T(c, _),
|
|
3373
3373
|
onFetchSource: async () => await (R == null ? void 0 : R(c, _))
|
|
3374
3374
|
}
|
|
3375
3375
|
)
|
|
3376
3376
|
] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3377
3377
|
/* @__PURE__ */ n(
|
|
3378
|
-
|
|
3378
|
+
Wt.Received,
|
|
3379
3379
|
{
|
|
3380
|
-
title: (
|
|
3381
|
-
mimeType: (
|
|
3382
|
-
thumbnailUrl: (
|
|
3383
|
-
amountText: (
|
|
3384
|
-
detail: (
|
|
3385
|
-
paymentStatus: (
|
|
3380
|
+
title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
|
|
3381
|
+
mimeType: (Lt = c.metadata) == null ? void 0 : Lt.attachment_mime_type,
|
|
3382
|
+
thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
|
|
3383
|
+
amountText: (Pt = c.metadata) == null ? void 0 : Pt.amount_text,
|
|
3384
|
+
detail: (zt = c.metadata) == null ? void 0 : zt.attachment_detail,
|
|
3385
|
+
paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
|
|
3386
3386
|
isUnlocking: N(c.id),
|
|
3387
3387
|
onUnlockClick: () => T == null ? void 0 : T(c, _),
|
|
3388
3388
|
onFetchSource: async () => await (R == null ? void 0 : R(c, _)),
|
|
@@ -3392,13 +3392,13 @@ const oi = ({
|
|
|
3392
3392
|
S && /* @__PURE__ */ n(S, {})
|
|
3393
3393
|
] }),
|
|
3394
3394
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
3395
|
-
|
|
3395
|
+
jt,
|
|
3396
3396
|
{
|
|
3397
3397
|
message: J,
|
|
3398
3398
|
renderText: v
|
|
3399
3399
|
}
|
|
3400
3400
|
) })
|
|
3401
|
-
] }) :
|
|
3401
|
+
] }) : _t ? (
|
|
3402
3402
|
/* Tip-only messages render as a standalone bubble */
|
|
3403
3403
|
/* @__PURE__ */ n(qe, { message: c, standalone: !0 })
|
|
3404
3404
|
) : Un ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h(
|
|
@@ -3423,11 +3423,11 @@ const oi = ({
|
|
|
3423
3423
|
}
|
|
3424
3424
|
}
|
|
3425
3425
|
),
|
|
3426
|
-
/* @__PURE__ */ n(
|
|
3426
|
+
/* @__PURE__ */ n(Ut, {})
|
|
3427
3427
|
]
|
|
3428
3428
|
}
|
|
3429
3429
|
) }) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
3430
|
-
|
|
3430
|
+
me && !yt && /* @__PURE__ */ n(
|
|
3431
3431
|
qe,
|
|
3432
3432
|
{
|
|
3433
3433
|
message: c,
|
|
@@ -3450,18 +3450,18 @@ const oi = ({
|
|
|
3450
3450
|
renderText: v
|
|
3451
3451
|
}
|
|
3452
3452
|
) : /* @__PURE__ */ n(
|
|
3453
|
-
|
|
3453
|
+
jt,
|
|
3454
3454
|
{
|
|
3455
3455
|
message: J,
|
|
3456
3456
|
renderText: v
|
|
3457
3457
|
}
|
|
3458
3458
|
),
|
|
3459
|
-
/* @__PURE__ */ n(
|
|
3459
|
+
/* @__PURE__ */ n(Ut, {})
|
|
3460
3460
|
] }) })
|
|
3461
3461
|
}
|
|
3462
3462
|
),
|
|
3463
|
-
!
|
|
3464
|
-
(!
|
|
3463
|
+
!Nt && !_t && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
3464
|
+
(!me || yt) && /* @__PURE__ */ n(
|
|
3465
3465
|
qe,
|
|
3466
3466
|
{
|
|
3467
3467
|
message: c,
|
|
@@ -3469,7 +3469,7 @@ const oi = ({
|
|
|
3469
3469
|
isMyMessage: ue
|
|
3470
3470
|
}
|
|
3471
3471
|
),
|
|
3472
|
-
s &&
|
|
3472
|
+
s && me && /* @__PURE__ */ n(
|
|
3473
3473
|
Or,
|
|
3474
3474
|
{
|
|
3475
3475
|
selected: z,
|
|
@@ -3501,7 +3501,7 @@ const oi = ({
|
|
|
3501
3501
|
var s;
|
|
3502
3502
|
const { handleDelete: e, message: t } = Ee("CustomMessageActions");
|
|
3503
3503
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
3504
|
-
|
|
3504
|
+
on,
|
|
3505
3505
|
{
|
|
3506
3506
|
onClick: e,
|
|
3507
3507
|
"aria-label": "Delete",
|
|
@@ -3513,13 +3513,13 @@ const oi = ({
|
|
|
3513
3513
|
}, mi = () => {
|
|
3514
3514
|
const { handleFlag: e } = Ee("CustomMessageActions");
|
|
3515
3515
|
return /* @__PURE__ */ n(
|
|
3516
|
-
|
|
3516
|
+
on,
|
|
3517
3517
|
{
|
|
3518
3518
|
onClick: e,
|
|
3519
3519
|
"aria-label": "Report",
|
|
3520
3520
|
title: "Report",
|
|
3521
3521
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3522
|
-
children: /* @__PURE__ */ n(
|
|
3522
|
+
children: /* @__PURE__ */ n(sn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3523
3523
|
}
|
|
3524
3524
|
);
|
|
3525
3525
|
}, hi = () => {
|
|
@@ -3576,7 +3576,7 @@ const oi = ({
|
|
|
3576
3576
|
);
|
|
3577
3577
|
}, gi = (e) => ({
|
|
3578
3578
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
3579
|
-
(t) =>
|
|
3579
|
+
(t) => Bt.previewIsLoaded(t) || Bt.previewIsLoading(t)
|
|
3580
3580
|
)
|
|
3581
3581
|
}), pi = () => {
|
|
3582
3582
|
const { linkPreviewsManager: e } = ms(), { linkPreviews: t } = hs(
|
|
@@ -3596,7 +3596,7 @@ const oi = ({
|
|
|
3596
3596
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3597
3597
|
/* @__PURE__ */ n("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ n("div", { className: "w-full shrink-0", children: /* @__PURE__ */ n(fi, { link: r, onDismiss: s }) }, r.og_scrape_url)) })
|
|
3598
3598
|
) : null;
|
|
3599
|
-
},
|
|
3599
|
+
}, xt = j.createContext(!1), to = () => ke(xt), bi = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
3600
3600
|
"button",
|
|
3601
3601
|
{
|
|
3602
3602
|
...s,
|
|
@@ -3607,10 +3607,10 @@ const oi = ({
|
|
|
3607
3607
|
children: /* @__PURE__ */ n(Ws, { weight: "bold", className: "size-4" })
|
|
3608
3608
|
}
|
|
3609
3609
|
), vi = () => {
|
|
3610
|
-
const e = ke(
|
|
3610
|
+
const e = ke(xt), { handleSubmit: t } = gs(), s = ps(), a = e || !s, {
|
|
3611
3611
|
SendButton: r = bi,
|
|
3612
3612
|
AttachmentPreviewList: i = bs
|
|
3613
|
-
} =
|
|
3613
|
+
} = nn("CustomMessageInput");
|
|
3614
3614
|
return (
|
|
3615
3615
|
// min-h-0 lets the composer shrink under keyboard squeeze (the link
|
|
3616
3616
|
// preview list inside is the scrollable region); the textarea + send row
|
|
@@ -3665,7 +3665,7 @@ const oi = ({
|
|
|
3665
3665
|
composerInput: r
|
|
3666
3666
|
}) => {
|
|
3667
3667
|
var l;
|
|
3668
|
-
const { channel: i } =
|
|
3668
|
+
const { channel: i } = pe(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
|
|
3669
3669
|
return s ? /* @__PURE__ */ h(te, { children: [
|
|
3670
3670
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
3671
3671
|
t == null ? void 0 : t()
|
|
@@ -3678,7 +3678,7 @@ const oi = ({
|
|
|
3678
3678
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
3679
3679
|
children: [
|
|
3680
3680
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
3681
|
-
/* @__PURE__ */ n(
|
|
3681
|
+
/* @__PURE__ */ n(xt.Provider, { value: o, children: /* @__PURE__ */ n(fs, { Input: r ?? vi }) })
|
|
3682
3682
|
]
|
|
3683
3683
|
}
|
|
3684
3684
|
),
|
|
@@ -3694,10 +3694,10 @@ const oi = ({
|
|
|
3694
3694
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
3695
3695
|
], yi = {
|
|
3696
3696
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
3697
|
-
}, We = "age safety guidelines.", Ci = "https://linktr.ee/s/about/contact",
|
|
3697
|
+
}, We = "age safety guidelines.", Ci = "https://linktr.ee/s/about/contact", en = (e) => wi.includes(e), ki = (e) => Ni.includes(e), Ei = (e) => {
|
|
3698
3698
|
var a;
|
|
3699
3699
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
3700
|
-
if (
|
|
3700
|
+
if (en(t))
|
|
3701
3701
|
return {
|
|
3702
3702
|
kind: "dm-agent",
|
|
3703
3703
|
type: t
|
|
@@ -3708,7 +3708,7 @@ const oi = ({
|
|
|
3708
3708
|
type: t
|
|
3709
3709
|
};
|
|
3710
3710
|
const s = e.dm_agent_system_type;
|
|
3711
|
-
if (
|
|
3711
|
+
if (en(s))
|
|
3712
3712
|
return {
|
|
3713
3713
|
kind: "dm-agent",
|
|
3714
3714
|
type: s
|
|
@@ -3814,11 +3814,11 @@ const oi = ({
|
|
|
3814
3814
|
He.ExternalSources
|
|
3815
3815
|
]), Ai = ({ threadList: e }) => {
|
|
3816
3816
|
var v, w;
|
|
3817
|
-
const { channel: t, channelConfig: s, thread: a } =
|
|
3817
|
+
const { channel: t, channelConfig: s, thread: a } = pe(), { client: r } = be(), { typing: i = {} } = ws(), { aiState: o } = _s(t), l = ke(On);
|
|
3818
3818
|
if (!e && l && Ti.has(o)) {
|
|
3819
3819
|
const b = Mi(t, (v = r.user) == null ? void 0 : v.id);
|
|
3820
3820
|
return /* @__PURE__ */ n(
|
|
3821
|
-
|
|
3821
|
+
tn,
|
|
3822
3822
|
{
|
|
3823
3823
|
avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
|
|
3824
3824
|
avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
|
|
@@ -3844,7 +3844,7 @@ const oi = ({
|
|
|
3844
3844
|
return null;
|
|
3845
3845
|
const f = (w = m[0]) == null ? void 0 : w.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
3846
3846
|
return /* @__PURE__ */ n(
|
|
3847
|
-
|
|
3847
|
+
tn,
|
|
3848
3848
|
{
|
|
3849
3849
|
avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
3850
3850
|
avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
|
|
@@ -3852,7 +3852,7 @@ const oi = ({
|
|
|
3852
3852
|
testId: "typing-indicator"
|
|
3853
3853
|
}
|
|
3854
3854
|
);
|
|
3855
|
-
},
|
|
3855
|
+
}, tn = ({
|
|
3856
3856
|
avatarId: e,
|
|
3857
3857
|
avatarName: t,
|
|
3858
3858
|
avatarImage: s,
|
|
@@ -3953,7 +3953,7 @@ const Ri = () => null, Li = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
3953
3953
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
3954
3954
|
] }) }));
|
|
3955
3955
|
$e.displayName = "LoadingState";
|
|
3956
|
-
const
|
|
3956
|
+
const fe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Di = ({
|
|
3957
3957
|
onBack: e,
|
|
3958
3958
|
showBackButton: t,
|
|
3959
3959
|
showStarButton: s = !1,
|
|
@@ -3973,7 +3973,7 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
3973
3973
|
renderHeaderTitleBadges: b
|
|
3974
3974
|
}) => {
|
|
3975
3975
|
var A, E, y, S, F, O;
|
|
3976
|
-
const { channel: p } =
|
|
3976
|
+
const { channel: p } = pe(), { client: _ } = be(), N = j.useMemo(
|
|
3977
3977
|
() => {
|
|
3978
3978
|
var V;
|
|
3979
3979
|
return st(
|
|
@@ -3983,7 +3983,7 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
3983
3983
|
);
|
|
3984
3984
|
},
|
|
3985
3985
|
[(A = p.state) == null ? void 0 : A.members, _ == null ? void 0 : _.userID, p.type]
|
|
3986
|
-
), T =
|
|
3986
|
+
), T = dn(N == null ? void 0 : N.user), R = (E = N == null ? void 0 : N.user) == null ? void 0 : E.image, M = cn(p), D = b == null ? void 0 : b({
|
|
3987
3987
|
channel: p,
|
|
3988
3988
|
participant: N
|
|
3989
3989
|
}), P = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", U = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ h(te, { children: [
|
|
@@ -4005,14 +4005,14 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4005
4005
|
"button",
|
|
4006
4006
|
{
|
|
4007
4007
|
className: C(
|
|
4008
|
-
|
|
4008
|
+
fe,
|
|
4009
4009
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
4010
4010
|
),
|
|
4011
4011
|
onClick: e || (() => {
|
|
4012
4012
|
}),
|
|
4013
4013
|
type: "button",
|
|
4014
4014
|
"aria-label": "Back to conversations",
|
|
4015
|
-
children: /* @__PURE__ */ n(
|
|
4015
|
+
children: /* @__PURE__ */ n(Gt, { className: "size-5 text-black/90" })
|
|
4016
4016
|
}
|
|
4017
4017
|
) }),
|
|
4018
4018
|
/* @__PURE__ */ n(
|
|
@@ -4085,7 +4085,7 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4085
4085
|
s && /* @__PURE__ */ n(
|
|
4086
4086
|
"button",
|
|
4087
4087
|
{
|
|
4088
|
-
className:
|
|
4088
|
+
className: fe,
|
|
4089
4089
|
onClick: k,
|
|
4090
4090
|
type: "button",
|
|
4091
4091
|
"aria-label": M ? "Unstar conversation" : "Star conversation",
|
|
@@ -4102,7 +4102,7 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4102
4102
|
}
|
|
4103
4103
|
),
|
|
4104
4104
|
v && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
4105
|
-
|
|
4105
|
+
qt,
|
|
4106
4106
|
{
|
|
4107
4107
|
channel: p,
|
|
4108
4108
|
participant: N,
|
|
@@ -4115,7 +4115,7 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4115
4115
|
onBlockParticipantClick: g,
|
|
4116
4116
|
onReportParticipantClick: m,
|
|
4117
4117
|
customChannelActions: f,
|
|
4118
|
-
triggerClassName: C(
|
|
4118
|
+
triggerClassName: C(fe, "bg-[#F1F0EE]")
|
|
4119
4119
|
}
|
|
4120
4120
|
))
|
|
4121
4121
|
] })
|
|
@@ -4126,13 +4126,13 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4126
4126
|
"button",
|
|
4127
4127
|
{
|
|
4128
4128
|
className: C(
|
|
4129
|
-
|
|
4129
|
+
fe,
|
|
4130
4130
|
"messaging-channel-view-back-button-desktop"
|
|
4131
4131
|
),
|
|
4132
4132
|
type: "button",
|
|
4133
4133
|
onClick: e,
|
|
4134
4134
|
"aria-label": "Back to conversations",
|
|
4135
|
-
children: /* @__PURE__ */ n(
|
|
4135
|
+
children: /* @__PURE__ */ n(Gt, { className: "size-5 text-black/90" })
|
|
4136
4136
|
}
|
|
4137
4137
|
),
|
|
4138
4138
|
w ? /* @__PURE__ */ h(
|
|
@@ -4203,7 +4203,7 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4203
4203
|
s && /* @__PURE__ */ n(
|
|
4204
4204
|
"button",
|
|
4205
4205
|
{
|
|
4206
|
-
className:
|
|
4206
|
+
className: fe,
|
|
4207
4207
|
onClick: k,
|
|
4208
4208
|
type: "button",
|
|
4209
4209
|
"aria-label": M ? "Unstar conversation" : "Star conversation",
|
|
@@ -4220,7 +4220,7 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4220
4220
|
}
|
|
4221
4221
|
),
|
|
4222
4222
|
v && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
4223
|
-
|
|
4223
|
+
qt,
|
|
4224
4224
|
{
|
|
4225
4225
|
channel: p,
|
|
4226
4226
|
participant: N,
|
|
@@ -4233,7 +4233,7 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4233
4233
|
onBlockParticipantClick: g,
|
|
4234
4234
|
onReportParticipantClick: m,
|
|
4235
4235
|
customChannelActions: f,
|
|
4236
|
-
triggerClassName:
|
|
4236
|
+
triggerClassName: fe
|
|
4237
4237
|
}
|
|
4238
4238
|
))
|
|
4239
4239
|
] })
|
|
@@ -4269,7 +4269,7 @@ const he = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4269
4269
|
composerInput: z
|
|
4270
4270
|
}) => {
|
|
4271
4271
|
var K, ee, q, x;
|
|
4272
|
-
const { channel: k } =
|
|
4272
|
+
const { channel: k } = pe(), { client: A } = be(), E = j.useMemo(
|
|
4273
4273
|
() => {
|
|
4274
4274
|
var I;
|
|
4275
4275
|
return st(
|
|
@@ -4690,7 +4690,7 @@ const $n = j.createContext({
|
|
|
4690
4690
|
channelPreview: o,
|
|
4691
4691
|
renderMessagePreview: l,
|
|
4692
4692
|
viewerLanguage: d
|
|
4693
|
-
} = Fi(), { client: u } =
|
|
4693
|
+
} = Fi(), { client: u } = be(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = cn(t);
|
|
4694
4694
|
if (o)
|
|
4695
4695
|
return /* @__PURE__ */ n(
|
|
4696
4696
|
o,
|
|
@@ -4711,7 +4711,7 @@ const $n = j.createContext({
|
|
|
4711
4711
|
(P = t == null ? void 0 : t.state) == null ? void 0 : P.members,
|
|
4712
4712
|
u == null ? void 0 : u.userID,
|
|
4713
4713
|
t == null ? void 0 : t.type
|
|
4714
|
-
), w =
|
|
4714
|
+
), w = dn(v == null ? void 0 : v.user), b = (U = v == null ? void 0 : v.user) == null ? void 0 : U.image, p = (() => {
|
|
4715
4715
|
var A;
|
|
4716
4716
|
const k = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
|
|
4717
4717
|
if (k != null && k.length) {
|
|
@@ -4720,7 +4720,7 @@ const $n = j.createContext({
|
|
|
4720
4720
|
}
|
|
4721
4721
|
})(), N = (() => {
|
|
4722
4722
|
var F, O, V, K;
|
|
4723
|
-
const k =
|
|
4723
|
+
const k = mn({
|
|
4724
4724
|
message: p,
|
|
4725
4725
|
viewerLanguage: d
|
|
4726
4726
|
});
|
|
@@ -4930,14 +4930,14 @@ const Vi = ({
|
|
|
4930
4930
|
] }) });
|
|
4931
4931
|
};
|
|
4932
4932
|
export {
|
|
4933
|
-
|
|
4933
|
+
pn as A,
|
|
4934
4934
|
to as B,
|
|
4935
4935
|
Ri as C,
|
|
4936
4936
|
Mr as D,
|
|
4937
4937
|
ca as E,
|
|
4938
4938
|
so as F,
|
|
4939
4939
|
Js as G,
|
|
4940
|
-
|
|
4940
|
+
Kt as L,
|
|
4941
4941
|
Qi as M,
|
|
4942
4942
|
ve as a,
|
|
4943
4943
|
ae as b,
|
|
@@ -4946,7 +4946,7 @@ export {
|
|
|
4946
4946
|
eo as e,
|
|
4947
4947
|
Vi as f,
|
|
4948
4948
|
oe as g,
|
|
4949
|
-
|
|
4949
|
+
Wt as h,
|
|
4950
4950
|
xe as i,
|
|
4951
4951
|
Or as j,
|
|
4952
4952
|
Zi as k,
|
|
@@ -4955,15 +4955,15 @@ export {
|
|
|
4955
4955
|
Ya as n,
|
|
4956
4956
|
Bi as o,
|
|
4957
4957
|
Wa as p,
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4958
|
+
mn as q,
|
|
4959
|
+
ge as r,
|
|
4960
|
+
xn as s,
|
|
4961
4961
|
ta as t,
|
|
4962
4962
|
$a as u,
|
|
4963
4963
|
da as v,
|
|
4964
4964
|
st as w,
|
|
4965
4965
|
ot as x,
|
|
4966
4966
|
lt as y,
|
|
4967
|
-
|
|
4967
|
+
dn as z
|
|
4968
4968
|
};
|
|
4969
|
-
//# sourceMappingURL=index-
|
|
4969
|
+
//# sourceMappingURL=index-BPfehHDD.js.map
|