@linktr.ee/messaging-react 3.1.2-rc-1780566352 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Card-EqHFqs6U.cjs → Card-2Vcm5_-_.cjs} +2 -2
- package/dist/{Card-EqHFqs6U.cjs.map → Card-2Vcm5_-_.cjs.map} +1 -1
- package/dist/{Card-0J3_7gmN.cjs → Card-BUsHZ7Og.cjs} +2 -2
- package/dist/{Card-0J3_7gmN.cjs.map → Card-BUsHZ7Og.cjs.map} +1 -1
- package/dist/{Card-DOcs__XO.js → Card-CScx0yAg.js} +2 -2
- package/dist/{Card-DOcs__XO.js.map → Card-CScx0yAg.js.map} +1 -1
- package/dist/{Card-CserQom-.js → Card-CbR6yi8j.js} +2 -2
- package/dist/{Card-CserQom-.js.map → Card-CbR6yi8j.js.map} +1 -1
- package/dist/{Card-MDGTBRIk.js → Card-DWc7s-Ty.js} +3 -3
- package/dist/{Card-MDGTBRIk.js.map → Card-DWc7s-Ty.js.map} +1 -1
- package/dist/{Card-DI2viIxR.cjs → Card-Dbz87-zR.cjs} +2 -2
- package/dist/{Card-DI2viIxR.cjs.map → Card-Dbz87-zR.cjs.map} +1 -1
- package/dist/{LockedThumbnail-CJTQSHKu.cjs → LockedThumbnail-C-rn_o2_.cjs} +2 -2
- package/dist/{LockedThumbnail-CJTQSHKu.cjs.map → LockedThumbnail-C-rn_o2_.cjs.map} +1 -1
- package/dist/{LockedThumbnail-Cw7R8xmf.js → LockedThumbnail-_OY_3HpX.js} +2 -2
- package/dist/{LockedThumbnail-Cw7R8xmf.js.map → LockedThumbnail-_OY_3HpX.js.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/index-Bgbm6F_U.cjs +2 -0
- package/dist/index-Bgbm6F_U.cjs.map +1 -0
- package/dist/{index-UtNoTrrb.js → index-Dca2QSVv.js} +259 -262
- package/dist/index-Dca2QSVv.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/index.tsx +4 -1
- package/src/components/ChannelList/CustomChannelPreview.tsx +11 -9
- package/src/components/ChannelView.tsx +15 -20
- package/src/components/CustomMessage/index.tsx +1 -1
- package/src/components/CustomMessageInput/index.tsx +1 -1
- package/src/providers/MessagingProvider.tsx +1 -1
- package/src/styles.css +10 -53
- package/dist/index-Dy7wBqvi.cjs +0 -2
- package/dist/index-Dy7wBqvi.cjs.map +0 -1
- package/dist/index-UtNoTrrb.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
|
|
2
2
|
import z, { createContext as Ge, useContext as Se, useCallback as q, useState as O, useRef as X, useEffect as J, useMemo as ne, Suspense as He } from "react";
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { Chat as
|
|
5
|
-
import { StarIcon as $e, XIcon as pe, SpinnerGapIcon as Le, SignOutIcon as
|
|
3
|
+
import { StreamChatService as In } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { Chat as Sn, DateSeparator as Tn, useChannelStateContext as de, useChatContext as Ye, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Dn, EditMessageModal as Rn, MessageBlocked as Ln, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as Fn, ReminderNotification as $n, StreamedMessageText as Bn, messageHasAttachments as jn, messageHasReactions as Un, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as At, Poll as qn, MessageErrorIcon as Wn, useMessageContext as be, useMessageComposer as Xn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Zn, useMessageComposerHasSendableData as Qn, AttachmentPreviewList as es, QuotedMessagePreview as ts, TextareaComposer as ns, MessageTimestamp as De, AIStates as Re, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, ChannelList as cs } from "stream-chat-react";
|
|
5
|
+
import { StarIcon as $e, XIcon as pe, SpinnerGapIcon as Le, SignOutIcon as ds, ProhibitInsetIcon as Mt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as us, SpeakerHighIcon as ms, VideoCameraIcon as Ht, FileMdIcon as hs, FileTextIcon as fs, FileZipIcon as gs, FilePptIcon as bs, FileCsvIcon as ps, FileXlsIcon as vs, FileDocIcon as xs, FilePdfIcon as ws, CircleNotchIcon as fe, PlayIcon as Be, PauseIcon as Ns, LinkIcon as _s, DownloadSimpleIcon as ge, GiftIcon as ys, ThumbsUpIcon as Cs, ThumbsDownIcon as ks, TrashSimpleIcon as Es, ArrowUpIcon as Is, SparkleIcon as je, ProhibitIcon as Ss, ArrowLeftIcon as Dt, DotsThreeIcon as Rt, CaretRightIcon as Yt, PencilSimpleIcon as Ts, CaretLeftIcon as As } from "@phosphor-icons/react";
|
|
6
6
|
import y from "classnames";
|
|
7
|
-
import { MessageActions as Ms, DefaultDropdownActionButton as
|
|
7
|
+
import { MessageActions as Ms, DefaultDropdownActionButton as qt } from "stream-chat-react/experimental";
|
|
8
8
|
import { LinkPreviewsManager as Lt } from "stream-chat";
|
|
9
|
-
const
|
|
9
|
+
const Wt = Ge({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const qt = Ge({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), qe = () => Se(
|
|
19
|
+
}), qe = () => Se(Wt), xi = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -80,7 +80,7 @@ const qt = Ge({
|
|
|
80
80
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
81
81
|
serviceConfigChanged: w.current.serviceConfig !== s
|
|
82
82
|
});
|
|
83
|
-
const C = new
|
|
83
|
+
const C = new In({
|
|
84
84
|
...s,
|
|
85
85
|
apiKey: a,
|
|
86
86
|
debug: i
|
|
@@ -207,17 +207,17 @@ const qt = Ge({
|
|
|
207
207
|
renderCount: A.current,
|
|
208
208
|
willRenderChat: !!(m && u),
|
|
209
209
|
contextValueReady: !!R
|
|
210
|
-
}), /* @__PURE__ */ n(
|
|
211
|
-
|
|
210
|
+
}), /* @__PURE__ */ n(Wt.Provider, { value: R, children: m && u ? /* @__PURE__ */ n(
|
|
211
|
+
Sn,
|
|
212
212
|
{
|
|
213
213
|
client: m,
|
|
214
214
|
customClasses: {
|
|
215
|
-
channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]
|
|
215
|
+
channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
|
|
216
216
|
},
|
|
217
217
|
children: e
|
|
218
218
|
}
|
|
219
219
|
) : e });
|
|
220
|
-
}, Ds = () => qe(),
|
|
220
|
+
}, Ds = () => qe(), Xt = (e) => {
|
|
221
221
|
var a, r;
|
|
222
222
|
const [t, s] = O(
|
|
223
223
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -299,7 +299,10 @@ const ae = ({
|
|
|
299
299
|
shape: i = "squircle",
|
|
300
300
|
dmAgentEnabled: o = !1
|
|
301
301
|
}) => {
|
|
302
|
-
const l = Os(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : {
|
|
302
|
+
const l = Os(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : {
|
|
303
|
+
borderRadius: "33%",
|
|
304
|
+
cornerShape: "superellipse(1.3)"
|
|
305
|
+
}, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
|
|
303
306
|
"img",
|
|
304
307
|
{
|
|
305
308
|
src: t,
|
|
@@ -480,7 +483,7 @@ const $s = ({
|
|
|
480
483
|
I(!1);
|
|
481
484
|
}
|
|
482
485
|
}
|
|
483
|
-
},
|
|
486
|
+
}, U = () => {
|
|
484
487
|
c == null || c(), t(), window.open(
|
|
485
488
|
"https://linktr.ee/s/about/trust-center/report",
|
|
486
489
|
"_blank",
|
|
@@ -488,7 +491,7 @@ const $s = ({
|
|
|
488
491
|
);
|
|
489
492
|
};
|
|
490
493
|
if (!s) return null;
|
|
491
|
-
const F = a ?? Te(s.user), Z = (H = s.user) == null ? void 0 : H.image,
|
|
494
|
+
const F = a ?? Te(s.user), Z = (H = s.user) == null ? void 0 : H.image, V = (Y = s.user) == null ? void 0 : Y.username, G = V ? `linktr.ee/${V}` : void 0, P = (($ = s.user) == null ? void 0 : $.id) || "unknown";
|
|
492
495
|
return (
|
|
493
496
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
494
497
|
/* @__PURE__ */ n(
|
|
@@ -554,7 +557,7 @@ const $s = ({
|
|
|
554
557
|
disabled: T,
|
|
555
558
|
"aria-busy": T,
|
|
556
559
|
children: [
|
|
557
|
-
T ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
560
|
+
T ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ds, { className: "h-5 w-5" }),
|
|
558
561
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
559
562
|
]
|
|
560
563
|
}
|
|
@@ -582,8 +585,8 @@ const $s = ({
|
|
|
582
585
|
]
|
|
583
586
|
}
|
|
584
587
|
) }),
|
|
585
|
-
g && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ye, { variant: "danger", onClick:
|
|
586
|
-
/* @__PURE__ */ n(
|
|
588
|
+
g && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ye, { variant: "danger", onClick: U, children: [
|
|
589
|
+
/* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
|
|
587
590
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
588
591
|
] }) }),
|
|
589
592
|
N
|
|
@@ -593,20 +596,20 @@ const $s = ({
|
|
|
593
596
|
}
|
|
594
597
|
)
|
|
595
598
|
);
|
|
596
|
-
}, Bs = (e) => /* @__PURE__ */ n(
|
|
599
|
+
}, Bs = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), Ue = "vote_up", Ve = "vote_down";
|
|
597
600
|
function js(e) {
|
|
598
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
601
|
+
return e != null && e.length ? e.some((t) => t.type === Ve) ? "down" : e.some((t) => t.type === Ue) ? "up" : null : null;
|
|
599
602
|
}
|
|
600
|
-
function
|
|
601
|
-
const { channel: t } =
|
|
603
|
+
function Us(e) {
|
|
604
|
+
const { channel: t } = de(), { client: s } = Ye("useMessageVote"), a = ne(
|
|
602
605
|
() => js(e.own_reactions),
|
|
603
606
|
[e.own_reactions]
|
|
604
607
|
), r = q(async () => {
|
|
605
608
|
if (s != null && s.userID)
|
|
606
609
|
try {
|
|
607
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
610
|
+
a === "up" ? await t.deleteReaction(e.id, Ue) : await t.sendReaction(
|
|
608
611
|
e.id,
|
|
609
|
-
{ type:
|
|
612
|
+
{ type: Ue },
|
|
610
613
|
{ enforce_unique: !0, skip_push: !0 }
|
|
611
614
|
);
|
|
612
615
|
} catch {
|
|
@@ -614,9 +617,9 @@ function Vs(e) {
|
|
|
614
617
|
}, [t, s == null ? void 0 : s.userID, e.id, a]), i = q(async () => {
|
|
615
618
|
if (s != null && s.userID)
|
|
616
619
|
try {
|
|
617
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
620
|
+
a === "down" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
|
|
618
621
|
e.id,
|
|
619
|
-
{ type:
|
|
622
|
+
{ type: Ve },
|
|
620
623
|
{ enforce_unique: !0, skip_push: !0 }
|
|
621
624
|
);
|
|
622
625
|
} catch {
|
|
@@ -624,24 +627,24 @@ function Vs(e) {
|
|
|
624
627
|
}, [t, s == null ? void 0 : s.userID, e.id, a]);
|
|
625
628
|
return { selected: a, voteUp: r, voteDown: i };
|
|
626
629
|
}
|
|
627
|
-
function
|
|
630
|
+
function Vs(e) {
|
|
628
631
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
629
632
|
}
|
|
630
|
-
function
|
|
633
|
+
function Kt({
|
|
631
634
|
message: e,
|
|
632
635
|
viewerLanguage: t
|
|
633
636
|
}) {
|
|
634
637
|
var r;
|
|
635
|
-
const s = e == null ? void 0 : e.text, a =
|
|
638
|
+
const s = e == null ? void 0 : e.text, a = Vs(t);
|
|
636
639
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
637
640
|
}
|
|
638
|
-
const Gs = z.lazy(() => import("./Card-
|
|
641
|
+
const Gs = z.lazy(() => import("./Card-CScx0yAg.js")), Hs = z.lazy(() => import("./Card-CbR6yi8j.js")), Ys = z.lazy(() => import("./Card-DWc7s-Ty.js")), We = () => /* @__PURE__ */ n(
|
|
639
642
|
"div",
|
|
640
643
|
{
|
|
641
644
|
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)]",
|
|
642
645
|
"aria-hidden": !0
|
|
643
646
|
}
|
|
644
|
-
), qs = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Gs, { ...e }) }),
|
|
647
|
+
), qs = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Gs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Ws = Jt, Xs = Zt, zt = { Composer: qs, Sent: Jt, Received: Zt, Creator: Ws, Visitor: Xs }, Ks = [
|
|
645
648
|
[/pdf/, "pdf"],
|
|
646
649
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
647
650
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -654,7 +657,7 @@ const Gs = z.lazy(() => import("./Card-DOcs__XO.js")), Hs = z.lazy(() => import(
|
|
|
654
657
|
function re(e) {
|
|
655
658
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
656
659
|
}
|
|
657
|
-
function
|
|
660
|
+
function Qt(e) {
|
|
658
661
|
const t = Ks.find(
|
|
659
662
|
([s]) => s.test(e)
|
|
660
663
|
);
|
|
@@ -662,25 +665,25 @@ function Zt(e) {
|
|
|
662
665
|
}
|
|
663
666
|
const Js = {
|
|
664
667
|
video: Ht,
|
|
665
|
-
audio:
|
|
666
|
-
image:
|
|
668
|
+
audio: ms,
|
|
669
|
+
image: us,
|
|
667
670
|
document: Gt
|
|
668
671
|
}, Zs = {
|
|
669
|
-
pdf:
|
|
670
|
-
doc:
|
|
671
|
-
xls:
|
|
672
|
-
csv:
|
|
673
|
-
ppt:
|
|
674
|
-
zip:
|
|
675
|
-
text:
|
|
676
|
-
markdown:
|
|
672
|
+
pdf: ws,
|
|
673
|
+
doc: xs,
|
|
674
|
+
xls: vs,
|
|
675
|
+
csv: ps,
|
|
676
|
+
ppt: bs,
|
|
677
|
+
zip: gs,
|
|
678
|
+
text: fs,
|
|
679
|
+
markdown: hs,
|
|
677
680
|
generic: Gt
|
|
678
681
|
};
|
|
679
682
|
function Qs(e) {
|
|
680
683
|
const t = re(e);
|
|
681
|
-
return t !== "document" ? Js[t] : Zs[
|
|
684
|
+
return t !== "document" ? Js[t] : Zs[Qt(e)];
|
|
682
685
|
}
|
|
683
|
-
function
|
|
686
|
+
function ce(e, t) {
|
|
684
687
|
return z.createElement(Qs(e), t);
|
|
685
688
|
}
|
|
686
689
|
const ea = (e) => {
|
|
@@ -698,7 +701,7 @@ const ea = (e) => {
|
|
|
698
701
|
muted: d = !1,
|
|
699
702
|
onContainerClick: m
|
|
700
703
|
}) => {
|
|
701
|
-
const g = re(t), u = X(null), f = X(null), c = X(null), p = X(r), [N, v] = O(a), [x, w] = O(0), [A, T] = O(!1), [S, R] = O(!1), [I, C] = O(!1), [k, E] = O(!1), [D,
|
|
704
|
+
const g = re(t), u = X(null), f = X(null), c = X(null), p = X(r), [N, v] = O(a), [x, w] = O(0), [A, T] = O(!1), [S, R] = O(!1), [I, C] = O(!1), [k, E] = O(!1), [D, U] = O(!0), [F, Z] = O(null), V = q(() => {
|
|
702
705
|
C(!1), v(!0);
|
|
703
706
|
}, []), G = q((b) => {
|
|
704
707
|
const _ = f.current;
|
|
@@ -777,7 +780,7 @@ const ea = (e) => {
|
|
|
777
780
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
778
781
|
}
|
|
779
782
|
),
|
|
780
|
-
!s && (g === "audio" || D) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
783
|
+
!s && (g === "audio" || D) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
|
|
781
784
|
className: "size-12 text-black/20",
|
|
782
785
|
weight: "regular"
|
|
783
786
|
}) }),
|
|
@@ -791,7 +794,7 @@ const ea = (e) => {
|
|
|
791
794
|
style: { width: "100%", height: "100%" },
|
|
792
795
|
onLoadStart: () => E(!0),
|
|
793
796
|
onCanPlay: () => {
|
|
794
|
-
E(!1),
|
|
797
|
+
E(!1), U(!1);
|
|
795
798
|
},
|
|
796
799
|
onWaiting: () => E(!0),
|
|
797
800
|
onPlay: () => C(!1),
|
|
@@ -811,7 +814,7 @@ const ea = (e) => {
|
|
|
811
814
|
style: { width: "100%", height: "100%" },
|
|
812
815
|
onLoadStart: () => E(!0),
|
|
813
816
|
onCanPlay: () => {
|
|
814
|
-
E(!1),
|
|
817
|
+
E(!1), U(!1);
|
|
815
818
|
},
|
|
816
819
|
onWaiting: () => E(!0),
|
|
817
820
|
onPlay: () => C(!1),
|
|
@@ -840,10 +843,10 @@ const ea = (e) => {
|
|
|
840
843
|
tabIndex: 0,
|
|
841
844
|
"aria-label": "Play preview",
|
|
842
845
|
onClick: (b) => {
|
|
843
|
-
b.stopPropagation(),
|
|
846
|
+
b.stopPropagation(), V();
|
|
844
847
|
},
|
|
845
848
|
onKeyDown: (b) => {
|
|
846
|
-
b.key !== "Enter" && b.key !== " " || (b.preventDefault(), b.stopPropagation(),
|
|
849
|
+
b.key !== "Enter" && b.key !== " " || (b.preventDefault(), b.stopPropagation(), V());
|
|
847
850
|
},
|
|
848
851
|
children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(Be, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
849
852
|
}
|
|
@@ -884,7 +887,7 @@ const ea = (e) => {
|
|
|
884
887
|
},
|
|
885
888
|
className: "shrink-0 text-white",
|
|
886
889
|
"aria-label": N ? "Pause" : "Play",
|
|
887
|
-
children: N ? /* @__PURE__ */ n(
|
|
890
|
+
children: N ? /* @__PURE__ */ n(Ns, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
|
|
888
891
|
}
|
|
889
892
|
),
|
|
890
893
|
/* @__PURE__ */ h(
|
|
@@ -934,7 +937,7 @@ const ea = (e) => {
|
|
|
934
937
|
]
|
|
935
938
|
}
|
|
936
939
|
);
|
|
937
|
-
}, Ft = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", na = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5",
|
|
940
|
+
}, Ft = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", na = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
|
|
938
941
|
mimeType: e,
|
|
939
942
|
sourceUrl: t,
|
|
940
943
|
thumbnailUrl: s,
|
|
@@ -991,7 +994,7 @@ const ea = (e) => {
|
|
|
991
994
|
"div",
|
|
992
995
|
{
|
|
993
996
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
994
|
-
children:
|
|
997
|
+
children: ce(e, {
|
|
995
998
|
className: Ft(r),
|
|
996
999
|
weight: "regular"
|
|
997
1000
|
})
|
|
@@ -1008,13 +1011,13 @@ const ea = (e) => {
|
|
|
1008
1011
|
"div",
|
|
1009
1012
|
{
|
|
1010
1013
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1011
|
-
children:
|
|
1014
|
+
children: ce(e, {
|
|
1012
1015
|
className: Ft(r),
|
|
1013
1016
|
weight: "regular"
|
|
1014
1017
|
})
|
|
1015
1018
|
}
|
|
1016
1019
|
);
|
|
1017
|
-
},
|
|
1020
|
+
}, tn = ({
|
|
1018
1021
|
variant: e,
|
|
1019
1022
|
thumbnail: t,
|
|
1020
1023
|
title: s,
|
|
@@ -1055,7 +1058,7 @@ const ea = (e) => {
|
|
|
1055
1058
|
}
|
|
1056
1059
|
),
|
|
1057
1060
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1058
|
-
|
|
1061
|
+
ce(r, {
|
|
1059
1062
|
className: y(
|
|
1060
1063
|
"size-5 shrink-0",
|
|
1061
1064
|
f ? "text-white/55" : "text-black/55"
|
|
@@ -1080,7 +1083,7 @@ const ea = (e) => {
|
|
|
1080
1083
|
}
|
|
1081
1084
|
);
|
|
1082
1085
|
};
|
|
1083
|
-
function
|
|
1086
|
+
function nn(e) {
|
|
1084
1087
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1085
1088
|
}
|
|
1086
1089
|
function Xe(e) {
|
|
@@ -1114,7 +1117,7 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1114
1117
|
"div",
|
|
1115
1118
|
{
|
|
1116
1119
|
className: `aspect-video w-full rounded-[20px] ${sa(t)} flex items-center justify-center`,
|
|
1117
|
-
children: /* @__PURE__ */ n(
|
|
1120
|
+
children: /* @__PURE__ */ n(_s, { className: `size-12 ${oa(t)}` })
|
|
1118
1121
|
}
|
|
1119
1122
|
) }),
|
|
1120
1123
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
@@ -1125,12 +1128,12 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1125
1128
|
] });
|
|
1126
1129
|
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
|
|
1127
1130
|
};
|
|
1128
|
-
function
|
|
1131
|
+
function sn(e) {
|
|
1129
1132
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1130
1133
|
}
|
|
1131
1134
|
function Je(e) {
|
|
1132
1135
|
var t;
|
|
1133
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1136
|
+
return (t = e.attachments) == null ? void 0 : t.find(sn);
|
|
1134
1137
|
}
|
|
1135
1138
|
async function la(e, t) {
|
|
1136
1139
|
let s;
|
|
@@ -1192,16 +1195,16 @@ function Ze(e) {
|
|
|
1192
1195
|
thumbnailUrl: g
|
|
1193
1196
|
};
|
|
1194
1197
|
}
|
|
1195
|
-
const
|
|
1198
|
+
const an = ({
|
|
1196
1199
|
resolvedUrl: e,
|
|
1197
1200
|
resolvedType: t,
|
|
1198
1201
|
title: s,
|
|
1199
1202
|
fileSize: a,
|
|
1200
1203
|
thumbnailUrl: r
|
|
1201
1204
|
}) => {
|
|
1202
|
-
const i = a !== void 0 ?
|
|
1205
|
+
const i = a !== void 0 ? nn(a) : void 0;
|
|
1203
1206
|
return /* @__PURE__ */ n(
|
|
1204
|
-
|
|
1207
|
+
tn,
|
|
1205
1208
|
{
|
|
1206
1209
|
variant: "dark",
|
|
1207
1210
|
title: s,
|
|
@@ -1209,7 +1212,7 @@ const sn = ({
|
|
|
1209
1212
|
mimeType: t,
|
|
1210
1213
|
detail: i,
|
|
1211
1214
|
thumbnail: /* @__PURE__ */ n(
|
|
1212
|
-
|
|
1215
|
+
en,
|
|
1213
1216
|
{
|
|
1214
1217
|
mimeType: t,
|
|
1215
1218
|
sourceUrl: e,
|
|
@@ -1220,23 +1223,23 @@ const sn = ({
|
|
|
1220
1223
|
)
|
|
1221
1224
|
}
|
|
1222
1225
|
);
|
|
1223
|
-
},
|
|
1226
|
+
}, rn = ({
|
|
1224
1227
|
resolvedUrl: e,
|
|
1225
1228
|
resolvedType: t,
|
|
1226
1229
|
title: s,
|
|
1227
1230
|
fileSize: a,
|
|
1228
1231
|
thumbnailUrl: r
|
|
1229
1232
|
}) => {
|
|
1230
|
-
const i = re(t), o = a !== void 0 ?
|
|
1233
|
+
const i = re(t), o = a !== void 0 ? nn(a) : void 0;
|
|
1231
1234
|
return /* @__PURE__ */ n(
|
|
1232
|
-
|
|
1235
|
+
tn,
|
|
1233
1236
|
{
|
|
1234
1237
|
variant: "light",
|
|
1235
1238
|
title: s,
|
|
1236
1239
|
mimeType: t,
|
|
1237
1240
|
detail: o,
|
|
1238
1241
|
thumbnail: /* @__PURE__ */ n(
|
|
1239
|
-
|
|
1242
|
+
en,
|
|
1240
1243
|
{
|
|
1241
1244
|
mimeType: t,
|
|
1242
1245
|
sourceUrl: e,
|
|
@@ -1274,7 +1277,7 @@ const sn = ({
|
|
|
1274
1277
|
{
|
|
1275
1278
|
className: "str-chat__message-bubble",
|
|
1276
1279
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1277
|
-
children: s ? /* @__PURE__ */ n("div", { className: Xe(t), children: /* @__PURE__ */ n(Ke, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(
|
|
1280
|
+
children: s ? /* @__PURE__ */ n("div", { className: Xe(t), children: /* @__PURE__ */ n(Ke, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(an, { ...a }) : /* @__PURE__ */ n(rn, { ...a })
|
|
1278
1281
|
}
|
|
1279
1282
|
) })
|
|
1280
1283
|
}
|
|
@@ -1287,7 +1290,7 @@ const sn = ({
|
|
|
1287
1290
|
if (t)
|
|
1288
1291
|
return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
|
|
1289
1292
|
const s = Ze(e);
|
|
1290
|
-
return s ? /* @__PURE__ */ n(
|
|
1293
|
+
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1291
1294
|
}, ma = ({
|
|
1292
1295
|
message: e
|
|
1293
1296
|
}) => {
|
|
@@ -1295,7 +1298,7 @@ const sn = ({
|
|
|
1295
1298
|
if (t)
|
|
1296
1299
|
return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
|
|
1297
1300
|
const s = Ze(e);
|
|
1298
|
-
return s ? /* @__PURE__ */ n(
|
|
1301
|
+
return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
|
|
1299
1302
|
}, wi = Object.assign(da, {
|
|
1300
1303
|
Creator: ua,
|
|
1301
1304
|
Visitor: ma
|
|
@@ -1303,9 +1306,9 @@ const sn = ({
|
|
|
1303
1306
|
isUnlocking: () => !1
|
|
1304
1307
|
}, fa = {
|
|
1305
1308
|
LockedAttachment: ha
|
|
1306
|
-
},
|
|
1309
|
+
}, on = Ge({}), Ni = on.Provider;
|
|
1307
1310
|
function ga(e) {
|
|
1308
|
-
return Se(
|
|
1311
|
+
return Se(on)[e] ?? fa[e];
|
|
1309
1312
|
}
|
|
1310
1313
|
const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1311
1314
|
"svg",
|
|
@@ -1336,9 +1339,9 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1336
1339
|
}, xa = (e) => {
|
|
1337
1340
|
var t;
|
|
1338
1341
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
1339
|
-
},
|
|
1342
|
+
}, ln = (e) => pa(e) || va(e), wa = (e) => {
|
|
1340
1343
|
var t;
|
|
1341
|
-
return
|
|
1344
|
+
return ln(e) && !((t = e.text) != null && t.trim());
|
|
1342
1345
|
}, Pe = ({
|
|
1343
1346
|
message: e,
|
|
1344
1347
|
standalone: t = !1,
|
|
@@ -1346,7 +1349,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1346
1349
|
hasAttachment: a = !1
|
|
1347
1350
|
}) => {
|
|
1348
1351
|
var u;
|
|
1349
|
-
const r =
|
|
1352
|
+
const r = ln(e), i = Ce(e);
|
|
1350
1353
|
if (!r && !i)
|
|
1351
1354
|
return null;
|
|
1352
1355
|
if (r) {
|
|
@@ -1354,7 +1357,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1354
1357
|
if (!f) return null;
|
|
1355
1358
|
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", p = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
1356
1359
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
1357
|
-
/* @__PURE__ */ n(
|
|
1360
|
+
/* @__PURE__ */ n(ys, { size: t ? 14 : 12 }),
|
|
1358
1361
|
/* @__PURE__ */ n("span", { children: p })
|
|
1359
1362
|
] });
|
|
1360
1363
|
}
|
|
@@ -1386,7 +1389,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1386
1389
|
"aria-label": "Good response",
|
|
1387
1390
|
"aria-pressed": e === "up",
|
|
1388
1391
|
"data-tooltip": "Good response",
|
|
1389
|
-
children: /* @__PURE__ */ n(
|
|
1392
|
+
children: /* @__PURE__ */ n(Cs, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
1390
1393
|
}
|
|
1391
1394
|
),
|
|
1392
1395
|
/* @__PURE__ */ n(
|
|
@@ -1400,7 +1403,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1400
1403
|
"aria-label": "Bad response",
|
|
1401
1404
|
"aria-pressed": e === "down",
|
|
1402
1405
|
"data-tooltip": "Bad response",
|
|
1403
|
-
children: /* @__PURE__ */ n(
|
|
1406
|
+
children: /* @__PURE__ */ n(ks, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
1404
1407
|
}
|
|
1405
1408
|
)
|
|
1406
1409
|
] }), _a = (e) => {
|
|
@@ -1422,44 +1425,44 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1422
1425
|
renderText: p,
|
|
1423
1426
|
threadList: N,
|
|
1424
1427
|
viewerLanguage: v
|
|
1425
|
-
} = e, { client: x } = Ye("CustomMessage"), { channel: w } =
|
|
1426
|
-
Attachment: F =
|
|
1427
|
-
EditMessageModal: Z =
|
|
1428
|
-
MessageActions:
|
|
1429
|
-
MessageBlocked: G =
|
|
1430
|
-
MessageBouncePrompt: P =
|
|
1431
|
-
MessageDeleted: B =
|
|
1432
|
-
MessageIsThreadReplyInChannelButtonIndicator: H =
|
|
1433
|
-
MessageRepliesCountButton: Y =
|
|
1434
|
-
ReminderNotification: $ =
|
|
1435
|
-
StreamedMessageText: b =
|
|
1428
|
+
} = e, { client: x } = Ye("CustomMessage"), { channel: w } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: T, onFetchSource: S, onDownloadClick: R } = ga("LockedAttachment"), [I, C] = O(!1), k = Mn(c.id), { selected: E, voteUp: D, voteDown: U } = Us(c), {
|
|
1429
|
+
Attachment: F = Dn,
|
|
1430
|
+
EditMessageModal: Z = Rn,
|
|
1431
|
+
MessageActions: V,
|
|
1432
|
+
MessageBlocked: G = Ln,
|
|
1433
|
+
MessageBouncePrompt: P = Pn,
|
|
1434
|
+
MessageDeleted: B = On,
|
|
1435
|
+
MessageIsThreadReplyInChannelButtonIndicator: H = zn,
|
|
1436
|
+
MessageRepliesCountButton: Y = Fn,
|
|
1437
|
+
ReminderNotification: $ = $n,
|
|
1438
|
+
StreamedMessageText: b = Bn,
|
|
1436
1439
|
PinIndicator: _
|
|
1437
|
-
} =
|
|
1440
|
+
} = Ut("CustomMessage"), L = jn(c), M = Un(c), W = ne(
|
|
1438
1441
|
() => u == null ? void 0 : u(c),
|
|
1439
1442
|
[u, c]
|
|
1440
1443
|
), j = ne(() => {
|
|
1441
1444
|
const me = c.attachments ?? [], _e = c.shared_location ? [c.shared_location, ...me] : me;
|
|
1442
1445
|
if (!Ce(c)) return _e;
|
|
1443
|
-
const St = _e.filter((Tt) => !("type" in Tt) || !
|
|
1446
|
+
const St = _e.filter((Tt) => !("type" in Tt) || !sn(Tt));
|
|
1444
1447
|
return St.length === _e.length ? _e : St;
|
|
1445
1448
|
}, [c]), K = ne(() => {
|
|
1446
|
-
const me =
|
|
1449
|
+
const me = Kt({ message: c, viewerLanguage: v });
|
|
1447
1450
|
return me === c.text ? c : { ...c, text: me };
|
|
1448
1451
|
}, [c, v]);
|
|
1449
1452
|
if (Vn(c))
|
|
1450
1453
|
return null;
|
|
1451
1454
|
if (c.deleted_at || c.type === "deleted")
|
|
1452
1455
|
return /* @__PURE__ */ n(B, { message: c });
|
|
1453
|
-
if (
|
|
1456
|
+
if (Gn(c))
|
|
1454
1457
|
return /* @__PURE__ */ n(G, {});
|
|
1455
|
-
const ee = !N && !!c.reply_count, Q = !N && c.show_in_channel && c.parent_id, lt = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ct =
|
|
1458
|
+
const ee = !N && !!c.reply_count, Q = !N && c.show_in_channel && c.parent_id, lt = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ct = Hn(c);
|
|
1456
1459
|
let ie;
|
|
1457
1460
|
lt ? ie = () => m(c) : ct && (ie = () => C(!0));
|
|
1458
|
-
const
|
|
1461
|
+
const ue = f(), En = y(
|
|
1459
1462
|
"str-chat__message str-chat__message-simple",
|
|
1460
1463
|
`str-chat__message--${c.type}`,
|
|
1461
1464
|
`str-chat__message--${c.status}`,
|
|
1462
|
-
|
|
1465
|
+
ue ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
1463
1466
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
1464
1467
|
{
|
|
1465
1468
|
"str-chat__message--has-attachment": L,
|
|
@@ -1472,7 +1475,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1472
1475
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1473
1476
|
"str-chat__virtual-message__wrapper--group": o
|
|
1474
1477
|
}
|
|
1475
|
-
), dt = c.poll_id && x.polls.fromState(c.poll_id), ut = wa(c),
|
|
1478
|
+
), dt = c.poll_id && x.polls.fromState(c.poll_id), ut = wa(c), oe = Ce(c), mt = xa(c), Me = !!(j != null && j.length && !c.quoted_message), ht = oe && ue && Me;
|
|
1476
1479
|
return /* @__PURE__ */ h(se, { children: [
|
|
1477
1480
|
a && /* @__PURE__ */ n(
|
|
1478
1481
|
Z,
|
|
@@ -1481,7 +1484,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1481
1484
|
}
|
|
1482
1485
|
),
|
|
1483
1486
|
I && /* @__PURE__ */ n(
|
|
1484
|
-
|
|
1487
|
+
Yn,
|
|
1485
1488
|
{
|
|
1486
1489
|
MessageBouncePrompt: P,
|
|
1487
1490
|
onClose: () => C(!1),
|
|
@@ -1491,7 +1494,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1491
1494
|
/* @__PURE__ */ h(
|
|
1492
1495
|
"div",
|
|
1493
1496
|
{
|
|
1494
|
-
className:
|
|
1497
|
+
className: En,
|
|
1495
1498
|
"data-message-id": c.id,
|
|
1496
1499
|
children: [
|
|
1497
1500
|
_ && /* @__PURE__ */ n(_, {}),
|
|
@@ -1503,9 +1506,9 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1503
1506
|
id: c.user.id,
|
|
1504
1507
|
image: c.user.image,
|
|
1505
1508
|
name: c.user.name || c.user.id,
|
|
1506
|
-
size: 24,
|
|
1509
|
+
size: oe ? 24 : 28,
|
|
1507
1510
|
shape: "circle",
|
|
1508
|
-
dmAgentEnabled:
|
|
1511
|
+
dmAgentEnabled: oe
|
|
1509
1512
|
}
|
|
1510
1513
|
),
|
|
1511
1514
|
/* @__PURE__ */ n(
|
|
@@ -1526,8 +1529,8 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1526
1529
|
marginInlineStart: 0
|
|
1527
1530
|
},
|
|
1528
1531
|
children: mt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1529
|
-
|
|
1530
|
-
|
|
1532
|
+
ue ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1533
|
+
V && /* @__PURE__ */ n(V, {}),
|
|
1531
1534
|
/* @__PURE__ */ n(
|
|
1532
1535
|
zt.Sent,
|
|
1533
1536
|
{
|
|
@@ -1557,7 +1560,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1557
1560
|
onDownloadClick: () => R == null ? void 0 : R(c, w)
|
|
1558
1561
|
}
|
|
1559
1562
|
),
|
|
1560
|
-
|
|
1563
|
+
V && /* @__PURE__ */ n(V, {})
|
|
1561
1564
|
] }),
|
|
1562
1565
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1563
1566
|
At,
|
|
@@ -1570,15 +1573,15 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1570
1573
|
/* Tip-only messages render as a standalone bubble */
|
|
1571
1574
|
/* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
|
|
1572
1575
|
) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
1573
|
-
|
|
1576
|
+
oe && !ht && /* @__PURE__ */ n(
|
|
1574
1577
|
Pe,
|
|
1575
1578
|
{
|
|
1576
1579
|
message: c,
|
|
1577
1580
|
hasAttachment: Me,
|
|
1578
|
-
isMyMessage:
|
|
1581
|
+
isMyMessage: ue
|
|
1579
1582
|
}
|
|
1580
1583
|
),
|
|
1581
|
-
dt && /* @__PURE__ */ n(
|
|
1584
|
+
dt && /* @__PURE__ */ n(qn, { poll: dt }),
|
|
1582
1585
|
j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
1583
1586
|
F,
|
|
1584
1587
|
{
|
|
@@ -1599,25 +1602,25 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1599
1602
|
renderText: p
|
|
1600
1603
|
}
|
|
1601
1604
|
),
|
|
1602
|
-
/* @__PURE__ */ n(
|
|
1605
|
+
/* @__PURE__ */ n(Wn, {})
|
|
1603
1606
|
] }) })
|
|
1604
1607
|
}
|
|
1605
1608
|
),
|
|
1606
1609
|
!mt && !ut && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
1607
|
-
(!
|
|
1610
|
+
(!oe || ht) && /* @__PURE__ */ n(
|
|
1608
1611
|
Pe,
|
|
1609
1612
|
{
|
|
1610
1613
|
message: c,
|
|
1611
1614
|
hasAttachment: Me,
|
|
1612
|
-
isMyMessage:
|
|
1615
|
+
isMyMessage: ue
|
|
1613
1616
|
}
|
|
1614
1617
|
),
|
|
1615
|
-
s &&
|
|
1618
|
+
s && oe && /* @__PURE__ */ n(
|
|
1616
1619
|
Na,
|
|
1617
1620
|
{
|
|
1618
1621
|
selected: E,
|
|
1619
1622
|
onVoteUp: D,
|
|
1620
|
-
onVoteDown:
|
|
1623
|
+
onVoteDown: U
|
|
1621
1624
|
}
|
|
1622
1625
|
)
|
|
1623
1626
|
] }),
|
|
@@ -1636,7 +1639,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1636
1639
|
] });
|
|
1637
1640
|
}, ya = z.memo(
|
|
1638
1641
|
_a,
|
|
1639
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
1642
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
|
|
1640
1643
|
), Ca = (e) => {
|
|
1641
1644
|
const t = be("CustomMessage");
|
|
1642
1645
|
return /* @__PURE__ */ n(ya, { ...t, ...e });
|
|
@@ -1644,25 +1647,25 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1644
1647
|
var s;
|
|
1645
1648
|
const { handleDelete: e, message: t } = be("CustomMessageActions");
|
|
1646
1649
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
1647
|
-
|
|
1650
|
+
qt,
|
|
1648
1651
|
{
|
|
1649
1652
|
onClick: e,
|
|
1650
1653
|
"aria-label": "Delete",
|
|
1651
1654
|
title: "Delete",
|
|
1652
1655
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1653
|
-
children: /* @__PURE__ */ n(
|
|
1656
|
+
children: /* @__PURE__ */ n(Es, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1654
1657
|
}
|
|
1655
1658
|
);
|
|
1656
1659
|
}, Ea = () => {
|
|
1657
1660
|
const { handleFlag: e } = be("CustomMessageActions");
|
|
1658
1661
|
return /* @__PURE__ */ n(
|
|
1659
|
-
|
|
1662
|
+
qt,
|
|
1660
1663
|
{
|
|
1661
1664
|
onClick: e,
|
|
1662
1665
|
"aria-label": "Report",
|
|
1663
1666
|
title: "Report",
|
|
1664
1667
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1665
|
-
children: /* @__PURE__ */ n(
|
|
1668
|
+
children: /* @__PURE__ */ n(Vt, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1666
1669
|
}
|
|
1667
1670
|
);
|
|
1668
1671
|
}, Ia = () => {
|
|
@@ -1722,7 +1725,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1722
1725
|
}
|
|
1723
1726
|
);
|
|
1724
1727
|
}, Aa = () => {
|
|
1725
|
-
const { linkPreviewsManager: e } =
|
|
1728
|
+
const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
|
|
1726
1729
|
e.state,
|
|
1727
1730
|
Sa
|
|
1728
1731
|
), s = (r) => {
|
|
@@ -1736,7 +1739,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1736
1739
|
},
|
|
1737
1740
|
r.og_scrape_url
|
|
1738
1741
|
)) }) : null;
|
|
1739
|
-
},
|
|
1742
|
+
}, cn = z.createContext(!1), Ma = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1740
1743
|
"button",
|
|
1741
1744
|
{
|
|
1742
1745
|
...s,
|
|
@@ -1744,23 +1747,23 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1744
1747
|
"aria-label": "Send",
|
|
1745
1748
|
disabled: t,
|
|
1746
1749
|
onClick: e,
|
|
1747
|
-
children: /* @__PURE__ */ n(
|
|
1750
|
+
children: /* @__PURE__ */ n(Is, { weight: "bold", className: "size-4" })
|
|
1748
1751
|
}
|
|
1749
1752
|
), Da = () => {
|
|
1750
|
-
const e = Se(
|
|
1753
|
+
const e = Se(cn), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
|
|
1751
1754
|
SendButton: r = Ma,
|
|
1752
|
-
AttachmentPreviewList: i =
|
|
1753
|
-
} =
|
|
1755
|
+
AttachmentPreviewList: i = es
|
|
1756
|
+
} = Ut("CustomMessageInput");
|
|
1754
1757
|
return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
|
|
1755
|
-
/* @__PURE__ */ n(
|
|
1758
|
+
/* @__PURE__ */ n(ts, {}),
|
|
1756
1759
|
/* @__PURE__ */ n(Aa, {}),
|
|
1757
1760
|
/* @__PURE__ */ n(i, {}),
|
|
1758
1761
|
/* @__PURE__ */ h("div", { className: "flex", children: [
|
|
1759
1762
|
/* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
|
|
1760
|
-
|
|
1763
|
+
ns,
|
|
1761
1764
|
{
|
|
1762
1765
|
"aria-disabled": e || void 0,
|
|
1763
|
-
className: "w-full resize-none outline-none leading-
|
|
1766
|
+
className: "w-full resize-none outline-none leading-6",
|
|
1764
1767
|
autoFocus: !e,
|
|
1765
1768
|
maxRows: 4,
|
|
1766
1769
|
readOnly: e,
|
|
@@ -1787,7 +1790,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1787
1790
|
disabledReason: a
|
|
1788
1791
|
}) => {
|
|
1789
1792
|
var o;
|
|
1790
|
-
const { channel: r } =
|
|
1793
|
+
const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
|
|
1791
1794
|
return s ? /* @__PURE__ */ h(se, { children: [
|
|
1792
1795
|
/* @__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 }),
|
|
1793
1796
|
t == null ? void 0 : t()
|
|
@@ -1800,7 +1803,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1800
1803
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1801
1804
|
children: [
|
|
1802
1805
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
1803
|
-
/* @__PURE__ */ n(
|
|
1806
|
+
/* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Jn, { Input: Da }) })
|
|
1804
1807
|
]
|
|
1805
1808
|
}
|
|
1806
1809
|
),
|
|
@@ -1854,7 +1857,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1854
1857
|
),
|
|
1855
1858
|
e.slice(s)
|
|
1856
1859
|
] });
|
|
1857
|
-
},
|
|
1860
|
+
}, Ua = (e) => {
|
|
1858
1861
|
var a, r;
|
|
1859
1862
|
const t = e.message.hide_date === !0, s = Ba(
|
|
1860
1863
|
e.message
|
|
@@ -1896,7 +1899,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1896
1899
|
"data-age-safety-system-type": s.type,
|
|
1897
1900
|
children: [
|
|
1898
1901
|
/* @__PURE__ */ n(
|
|
1899
|
-
|
|
1902
|
+
Ss,
|
|
1900
1903
|
{
|
|
1901
1904
|
size: 24,
|
|
1902
1905
|
weight: "duotone",
|
|
@@ -1920,7 +1923,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1920
1923
|
] }),
|
|
1921
1924
|
!t && /* @__PURE__ */ n(De, { message: e.message })
|
|
1922
1925
|
] });
|
|
1923
|
-
},
|
|
1926
|
+
}, dn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
1924
1927
|
"animateTransform",
|
|
1925
1928
|
{
|
|
1926
1929
|
attributeName: "transform",
|
|
@@ -1930,14 +1933,14 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1930
1933
|
begin: `${120 * t}ms`,
|
|
1931
1934
|
repeatCount: "indefinite"
|
|
1932
1935
|
}
|
|
1933
|
-
) }),
|
|
1936
|
+
) }), Va = /* @__PURE__ */ new Set([
|
|
1934
1937
|
Re.Thinking,
|
|
1935
1938
|
Re.Generating,
|
|
1936
1939
|
Re.ExternalSources
|
|
1937
1940
|
]), Ga = ({ threadList: e }) => {
|
|
1938
1941
|
var p, N;
|
|
1939
|
-
const { channel: t, channelConfig: s, thread: a } =
|
|
1940
|
-
if (!e && l &&
|
|
1942
|
+
const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ye(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Se(dn);
|
|
1943
|
+
if (!e && l && Va.has(o)) {
|
|
1941
1944
|
const v = Ha(t, (p = r.user) == null ? void 0 : p.id);
|
|
1942
1945
|
return /* @__PURE__ */ n(
|
|
1943
1946
|
Bt,
|
|
@@ -2072,7 +2075,7 @@ const Ya = () => null, qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2072
2075
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2073
2076
|
] }) }));
|
|
2074
2077
|
ke.displayName = "LoadingState";
|
|
2075
|
-
const
|
|
2078
|
+
const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", jt = "Replies instantly with AI assistant", Wa = ({
|
|
2076
2079
|
onBack: e,
|
|
2077
2080
|
showBackButton: t,
|
|
2078
2081
|
onShowInfo: s,
|
|
@@ -2081,7 +2084,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2081
2084
|
dmAgentEnabled: i = !1
|
|
2082
2085
|
}) => {
|
|
2083
2086
|
var f, c, p, N, v;
|
|
2084
|
-
const { channel: o } =
|
|
2087
|
+
const { channel: o } = de(), l = z.useMemo(() => {
|
|
2085
2088
|
var A, T;
|
|
2086
2089
|
const x = (A = o._client) == null ? void 0 : A.userID;
|
|
2087
2090
|
return x ? Object.values(((T = o.state) == null ? void 0 : T.members) || {}).find(
|
|
@@ -2090,7 +2093,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2090
2093
|
return ((R = S.user) == null ? void 0 : R.id) && S.user.id !== x;
|
|
2091
2094
|
}
|
|
2092
2095
|
) : void 0;
|
|
2093
|
-
}, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Te(l == null ? void 0 : l.user), m = (p = l == null ? void 0 : l.user) == null ? void 0 : p.image, g =
|
|
2096
|
+
}, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Te(l == null ? void 0 : l.user), m = (p = l == null ? void 0 : l.user) == null ? void 0 : p.image, g = Xt(o), u = async () => {
|
|
2094
2097
|
try {
|
|
2095
2098
|
g ? await o.unpin() : await o.pin();
|
|
2096
2099
|
} catch (x) {
|
|
@@ -2101,13 +2104,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2101
2104
|
}
|
|
2102
2105
|
};
|
|
2103
2106
|
return /* @__PURE__ */ h("div", { className: "@container", children: [
|
|
2104
|
-
/* @__PURE__ */ h("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden
|
|
2107
|
+
/* @__PURE__ */ h("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden", children: [
|
|
2105
2108
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
|
|
2106
2109
|
"button",
|
|
2107
2110
|
{
|
|
2108
2111
|
className: y(
|
|
2109
|
-
|
|
2110
|
-
"messaging-channel-view-back-button-mobile
|
|
2112
|
+
le,
|
|
2113
|
+
"messaging-channel-view-back-button-mobile"
|
|
2111
2114
|
),
|
|
2112
2115
|
onClick: e || (() => {
|
|
2113
2116
|
}),
|
|
@@ -2125,19 +2128,10 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2125
2128
|
image: m,
|
|
2126
2129
|
starred: r && g,
|
|
2127
2130
|
dmAgentEnabled: i,
|
|
2128
|
-
size:
|
|
2129
|
-
}
|
|
2130
|
-
),
|
|
2131
|
-
/* @__PURE__ */ n(
|
|
2132
|
-
"button",
|
|
2133
|
-
{
|
|
2134
|
-
type: "button",
|
|
2135
|
-
onClick: s,
|
|
2136
|
-
className: "flex items-center gap-0.5 rounded-full px-3 py-1 text-xs font-medium text-black/90 hover:bg-black/[0.08] transition-colors",
|
|
2137
|
-
"aria-label": `View info for ${d}`,
|
|
2138
|
-
children: d
|
|
2131
|
+
size: 40
|
|
2139
2132
|
}
|
|
2140
2133
|
),
|
|
2134
|
+
/* @__PURE__ */ n("p", { className: "text-center text-xs font-medium text-black/90", children: d }),
|
|
2141
2135
|
i && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2142
2136
|
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
2143
2137
|
/* @__PURE__ */ n("span", { children: jt })
|
|
@@ -2147,7 +2141,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2147
2141
|
r && /* @__PURE__ */ n(
|
|
2148
2142
|
"button",
|
|
2149
2143
|
{
|
|
2150
|
-
className:
|
|
2144
|
+
className: le,
|
|
2151
2145
|
onClick: u,
|
|
2152
2146
|
type: "button",
|
|
2153
2147
|
"aria-label": g ? "Unstar conversation" : "Star conversation",
|
|
@@ -2166,7 +2160,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2166
2160
|
/* @__PURE__ */ n(
|
|
2167
2161
|
"button",
|
|
2168
2162
|
{
|
|
2169
|
-
className:
|
|
2163
|
+
className: le,
|
|
2170
2164
|
onClick: s,
|
|
2171
2165
|
type: "button",
|
|
2172
2166
|
"aria-label": "Show info",
|
|
@@ -2175,13 +2169,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2175
2169
|
)
|
|
2176
2170
|
] })
|
|
2177
2171
|
] }),
|
|
2178
|
-
/* @__PURE__ */ h("div", { className: "
|
|
2172
|
+
/* @__PURE__ */ h("div", { className: "hidden @lg:flex items-center justify-between gap-3 min-h-12", children: [
|
|
2179
2173
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-4 min-w-0", children: [
|
|
2180
2174
|
t && e && /* @__PURE__ */ n(
|
|
2181
2175
|
"button",
|
|
2182
2176
|
{
|
|
2183
2177
|
className: y(
|
|
2184
|
-
|
|
2178
|
+
le,
|
|
2185
2179
|
"messaging-channel-view-back-button-desktop"
|
|
2186
2180
|
),
|
|
2187
2181
|
type: "button",
|
|
@@ -2198,18 +2192,21 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2198
2192
|
image: m,
|
|
2199
2193
|
starred: r && g,
|
|
2200
2194
|
dmAgentEnabled: i,
|
|
2201
|
-
size:
|
|
2195
|
+
size: 40
|
|
2202
2196
|
}
|
|
2203
2197
|
),
|
|
2204
2198
|
/* @__PURE__ */ h("div", { className: "min-w-0", children: [
|
|
2205
|
-
a ? /* @__PURE__ */
|
|
2199
|
+
a ? /* @__PURE__ */ h(
|
|
2206
2200
|
"button",
|
|
2207
2201
|
{
|
|
2208
2202
|
type: "button",
|
|
2209
2203
|
onClick: s,
|
|
2210
2204
|
className: "flex items-center gap-1 font-medium text-black/90 truncate hover:text-black/70 transition-colors",
|
|
2211
2205
|
"aria-label": `View info for ${d}`,
|
|
2212
|
-
children:
|
|
2206
|
+
children: [
|
|
2207
|
+
/* @__PURE__ */ n("span", { className: "truncate", children: d }),
|
|
2208
|
+
/* @__PURE__ */ n(Yt, { className: "size-4 shrink-0" })
|
|
2209
|
+
]
|
|
2213
2210
|
}
|
|
2214
2211
|
) : /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: d }),
|
|
2215
2212
|
i && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
@@ -2222,14 +2219,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2222
2219
|
r && /* @__PURE__ */ n(
|
|
2223
2220
|
"button",
|
|
2224
2221
|
{
|
|
2225
|
-
className:
|
|
2222
|
+
className: le,
|
|
2226
2223
|
onClick: u,
|
|
2227
2224
|
type: "button",
|
|
2228
2225
|
"aria-label": g ? "Unstar conversation" : "Star conversation",
|
|
2229
2226
|
children: /* @__PURE__ */ n(
|
|
2230
2227
|
$e,
|
|
2231
2228
|
{
|
|
2232
|
-
className: y("size-
|
|
2229
|
+
className: y("size-5", {
|
|
2233
2230
|
"text-yellow-600": g,
|
|
2234
2231
|
"text-black/90": !g
|
|
2235
2232
|
}),
|
|
@@ -2241,11 +2238,11 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2241
2238
|
a && s && /* @__PURE__ */ n(
|
|
2242
2239
|
"button",
|
|
2243
2240
|
{
|
|
2244
|
-
className:
|
|
2241
|
+
className: le,
|
|
2245
2242
|
onClick: s,
|
|
2246
2243
|
type: "button",
|
|
2247
2244
|
"aria-label": "Show info",
|
|
2248
|
-
children: /* @__PURE__ */ n(Rt, { className: "size-
|
|
2245
|
+
children: /* @__PURE__ */ n(Rt, { className: "size-5 text-black/90" })
|
|
2249
2246
|
}
|
|
2250
2247
|
)
|
|
2251
2248
|
] })
|
|
@@ -2278,7 +2275,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2278
2275
|
viewerLanguage: I
|
|
2279
2276
|
}) => {
|
|
2280
2277
|
var H, Y, $, b, _, L;
|
|
2281
|
-
const { channel: C } =
|
|
2278
|
+
const { channel: C } = de(), k = X(null), E = z.useMemo(() => {
|
|
2282
2279
|
var j, K;
|
|
2283
2280
|
const M = (j = C._client) == null ? void 0 : j.userID;
|
|
2284
2281
|
return M ? Object.values(((K = C.state) == null ? void 0 : K.members) || {}).find(
|
|
@@ -2294,7 +2291,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2294
2291
|
var Q;
|
|
2295
2292
|
return ((Q = ee.user) == null ? void 0 : Q.id) === M;
|
|
2296
2293
|
}) : void 0;
|
|
2297
|
-
}, [($ = C._client) == null ? void 0 : $.userID, (b = C.state) == null ? void 0 : b.members]),
|
|
2294
|
+
}, [($ = C._client) == null ? void 0 : $.userID, (b = C.state) == null ? void 0 : b.members]), U = ((_ = D == null ? void 0 : D.user) == null ? void 0 : _.is_account) ?? (D == null ? void 0 : D.is_account), F = ((L = E == null ? void 0 : E.user) == null ? void 0 : L.is_account) ?? (E == null ? void 0 : E.is_account), Z = R && U === !1 && F === !0, V = z.useMemo(() => {
|
|
2298
2295
|
if (!c) return;
|
|
2299
2296
|
const M = C.data ?? {};
|
|
2300
2297
|
if (M.followerStatus)
|
|
@@ -2323,14 +2320,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2323
2320
|
);
|
|
2324
2321
|
return /* @__PURE__ */ h(se, { children: [
|
|
2325
2322
|
/* @__PURE__ */ n(
|
|
2326
|
-
|
|
2323
|
+
is,
|
|
2327
2324
|
{
|
|
2328
2325
|
overrides: {
|
|
2329
2326
|
Message: B,
|
|
2330
2327
|
MessageActions: Ia
|
|
2331
2328
|
},
|
|
2332
|
-
children: /* @__PURE__ */ h(
|
|
2333
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
2329
|
+
children: /* @__PURE__ */ h(os, { children: [
|
|
2330
|
+
/* @__PURE__ */ n("div", { className: "p-4", children: /* @__PURE__ */ n(
|
|
2334
2331
|
Wa,
|
|
2335
2332
|
{
|
|
2336
2333
|
onBack: e,
|
|
@@ -2347,7 +2344,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2347
2344
|
{
|
|
2348
2345
|
className: "flex-1 overflow-hidden relative",
|
|
2349
2346
|
children: /* @__PURE__ */ n(
|
|
2350
|
-
|
|
2347
|
+
ls,
|
|
2351
2348
|
{
|
|
2352
2349
|
hideDeletedMessages: !0,
|
|
2353
2350
|
hideNewMessageSeparator: !1
|
|
@@ -2360,9 +2357,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2360
2357
|
/* @__PURE__ */ n(
|
|
2361
2358
|
Ra,
|
|
2362
2359
|
{
|
|
2363
|
-
|
|
2364
|
-
renderActions: () => s == null ? void 0 : s(C)
|
|
2365
|
-
},
|
|
2360
|
+
renderActions: () => s == null ? void 0 : s(C),
|
|
2366
2361
|
renderFooter: () => a == null ? void 0 : a(C),
|
|
2367
2362
|
disabled: p,
|
|
2368
2363
|
disabledReason: N
|
|
@@ -2380,7 +2375,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2380
2375
|
participant: E,
|
|
2381
2376
|
participantDisplayName: Te(E == null ? void 0 : E.user),
|
|
2382
2377
|
channel: C,
|
|
2383
|
-
followerStatusLabel:
|
|
2378
|
+
followerStatusLabel: V,
|
|
2384
2379
|
onLeaveConversation: i,
|
|
2385
2380
|
onBlockParticipant: o,
|
|
2386
2381
|
showDeleteConversation: l,
|
|
@@ -2394,7 +2389,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2394
2389
|
}
|
|
2395
2390
|
)
|
|
2396
2391
|
] });
|
|
2397
|
-
},
|
|
2392
|
+
}, un = z.memo(
|
|
2398
2393
|
({
|
|
2399
2394
|
channel: e,
|
|
2400
2395
|
onBack: t,
|
|
@@ -2424,10 +2419,10 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2424
2419
|
customProfileContent: k,
|
|
2425
2420
|
customChannelActions: E,
|
|
2426
2421
|
renderMessage: D,
|
|
2427
|
-
onMessageLinkClick:
|
|
2422
|
+
onMessageLinkClick: U,
|
|
2428
2423
|
sendButton: F,
|
|
2429
2424
|
attachmentPreviewList: Z,
|
|
2430
|
-
viewerLanguage:
|
|
2425
|
+
viewerLanguage: V
|
|
2431
2426
|
}) => {
|
|
2432
2427
|
const G = q(
|
|
2433
2428
|
async (B, H, Y) => {
|
|
@@ -2450,17 +2445,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2450
2445
|
[e, A, T, S]
|
|
2451
2446
|
), P = X(null);
|
|
2452
2447
|
return J(() => {
|
|
2453
|
-
if (!
|
|
2448
|
+
if (!U) return;
|
|
2454
2449
|
const B = P.current;
|
|
2455
2450
|
if (!B) return;
|
|
2456
2451
|
const H = (Y) => {
|
|
2457
2452
|
const $ = Y.target, b = $ == null ? void 0 : $.closest("a[href]"), _ = b == null ? void 0 : b.getAttribute("href");
|
|
2458
2453
|
if (!_) return;
|
|
2459
2454
|
const L = b == null ? void 0 : b.closest("[data-message-id]"), M = L == null ? void 0 : L.getAttribute("data-message-id"), W = M ? e.state.messages.find((j) => j.id === M) : void 0;
|
|
2460
|
-
|
|
2455
|
+
U(_, W);
|
|
2461
2456
|
};
|
|
2462
2457
|
return B.addEventListener("click", H), () => B.removeEventListener("click", H);
|
|
2463
|
-
}, [
|
|
2458
|
+
}, [U, e]), /* @__PURE__ */ n(
|
|
2464
2459
|
"div",
|
|
2465
2460
|
{
|
|
2466
2461
|
ref: P,
|
|
@@ -2468,11 +2463,11 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2468
2463
|
"messaging-channel-view h-full flex flex-col",
|
|
2469
2464
|
d
|
|
2470
2465
|
),
|
|
2471
|
-
children: /* @__PURE__ */ n(
|
|
2472
|
-
|
|
2466
|
+
children: /* @__PURE__ */ n(dn.Provider, { value: A ?? !1, children: /* @__PURE__ */ n(
|
|
2467
|
+
rs,
|
|
2473
2468
|
{
|
|
2474
2469
|
channel: e,
|
|
2475
|
-
MessageSystem:
|
|
2470
|
+
MessageSystem: Ua,
|
|
2476
2471
|
EmptyStateIndicator: m,
|
|
2477
2472
|
LoadingIndicator: ke,
|
|
2478
2473
|
DateSeparator: Bs,
|
|
@@ -2507,7 +2502,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2507
2502
|
customProfileContent: k,
|
|
2508
2503
|
customChannelActions: E,
|
|
2509
2504
|
renderMessage: D,
|
|
2510
|
-
viewerLanguage:
|
|
2505
|
+
viewerLanguage: V
|
|
2511
2506
|
}
|
|
2512
2507
|
)
|
|
2513
2508
|
}
|
|
@@ -2516,7 +2511,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2516
2511
|
);
|
|
2517
2512
|
}
|
|
2518
2513
|
);
|
|
2519
|
-
|
|
2514
|
+
un.displayName = "ChannelView";
|
|
2520
2515
|
const he = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
2521
2516
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
2522
2517
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -2560,7 +2555,7 @@ const _i = ({
|
|
|
2560
2555
|
refreshConnection: R,
|
|
2561
2556
|
service: I,
|
|
2562
2557
|
debug: C
|
|
2563
|
-
} = Ds(), [k, E] = O(null), [D,
|
|
2558
|
+
} = Ds(), [k, E] = O(null), [D, U] = O(null), [F, Z] = O(!1), { showDeleteConversation: V = !0 } = e, G = X(o);
|
|
2564
2559
|
G.current = o;
|
|
2565
2560
|
const P = X(a);
|
|
2566
2561
|
P.current = a;
|
|
@@ -2593,7 +2588,7 @@ const _i = ({
|
|
|
2593
2588
|
{ limit: 1 }
|
|
2594
2589
|
);
|
|
2595
2590
|
if (K.length > 0) {
|
|
2596
|
-
E(K[0]),
|
|
2591
|
+
E(K[0]), U(null), (W = P.current) == null || W.call(P, K[0]), C && console.log(
|
|
2597
2592
|
"[MessagingShell] Initial conversation loaded:",
|
|
2598
2593
|
K[0].id
|
|
2599
2594
|
);
|
|
@@ -2601,7 +2596,7 @@ const _i = ({
|
|
|
2601
2596
|
}
|
|
2602
2597
|
const ee = G.current;
|
|
2603
2598
|
if (!ee || !I) {
|
|
2604
|
-
L(),
|
|
2599
|
+
L(), U("No conversation found with this account"), C && console.log(
|
|
2605
2600
|
"[MessagingShell] No conversation found for:",
|
|
2606
2601
|
i
|
|
2607
2602
|
);
|
|
@@ -2613,7 +2608,7 @@ const _i = ({
|
|
|
2613
2608
|
name: ee.name,
|
|
2614
2609
|
phone: ee.phone
|
|
2615
2610
|
});
|
|
2616
|
-
E(Q),
|
|
2611
|
+
E(Q), U(null), (j = P.current) == null || j.call(P, Q), C && console.log(
|
|
2617
2612
|
"[MessagingShell] Channel created and loaded:",
|
|
2618
2613
|
Q.id
|
|
2619
2614
|
);
|
|
@@ -2621,13 +2616,13 @@ const _i = ({
|
|
|
2621
2616
|
console.error(
|
|
2622
2617
|
"[MessagingShell] Failed to create conversation:",
|
|
2623
2618
|
Q
|
|
2624
|
-
), L(),
|
|
2619
|
+
), L(), U("Failed to create conversation");
|
|
2625
2620
|
}
|
|
2626
2621
|
} catch (K) {
|
|
2627
2622
|
console.error(
|
|
2628
2623
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2629
2624
|
K
|
|
2630
|
-
), L(), H.current ||
|
|
2625
|
+
), L(), H.current || U("Failed to load conversation");
|
|
2631
2626
|
}
|
|
2632
2627
|
})();
|
|
2633
2628
|
}, [i, w, A, I, C]);
|
|
@@ -2644,7 +2639,7 @@ const _i = ({
|
|
|
2644
2639
|
onBack: R
|
|
2645
2640
|
}
|
|
2646
2641
|
) : D ? /* @__PURE__ */ n(he, { message: D }) : F && !k ? /* @__PURE__ */ n(he, { message: "Conversation ended" }) : k ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
|
|
2647
|
-
|
|
2642
|
+
un,
|
|
2648
2643
|
{
|
|
2649
2644
|
channel: k,
|
|
2650
2645
|
renderMessageInputActions: t,
|
|
@@ -2653,7 +2648,7 @@ const _i = ({
|
|
|
2653
2648
|
onLeaveConversation: $,
|
|
2654
2649
|
onBlockParticipant: $,
|
|
2655
2650
|
CustomChannelEmptyState: l,
|
|
2656
|
-
showDeleteConversation:
|
|
2651
|
+
showDeleteConversation: V,
|
|
2657
2652
|
onBlockParticipantClick: d,
|
|
2658
2653
|
onReportParticipantClick: m,
|
|
2659
2654
|
dmAgentEnabled: g,
|
|
@@ -2673,14 +2668,14 @@ function Ka(e) {
|
|
|
2673
2668
|
for (const s of t)
|
|
2674
2669
|
e.state.addMessageSorted(s.message);
|
|
2675
2670
|
}
|
|
2676
|
-
const
|
|
2671
|
+
const mn = z.createContext({
|
|
2677
2672
|
selectedChannel: void 0,
|
|
2678
2673
|
onChannelSelect: () => {
|
|
2679
2674
|
},
|
|
2680
2675
|
debug: !1,
|
|
2681
2676
|
renderMessagePreview: void 0,
|
|
2682
2677
|
viewerLanguage: void 0
|
|
2683
|
-
}), Ja =
|
|
2678
|
+
}), Ja = mn.Provider, Za = () => z.useContext(mn), Qa = (e, t) => {
|
|
2684
2679
|
const s = new Date(
|
|
2685
2680
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2686
2681
|
), r = new Date(
|
|
@@ -2701,7 +2696,7 @@ const un = z.createContext({
|
|
|
2701
2696
|
day: "numeric",
|
|
2702
2697
|
year: "2-digit"
|
|
2703
2698
|
});
|
|
2704
|
-
},
|
|
2699
|
+
}, hn = z.memo(
|
|
2705
2700
|
({ channel: e, unread: t }) => {
|
|
2706
2701
|
var R, I, C;
|
|
2707
2702
|
const {
|
|
@@ -2728,18 +2723,18 @@ const un = z.createContext({
|
|
|
2728
2723
|
if (k[D].type !== "system") return k[D];
|
|
2729
2724
|
}
|
|
2730
2725
|
})(), v = (() => {
|
|
2731
|
-
var Z,
|
|
2732
|
-
const k =
|
|
2726
|
+
var Z, V, G, P;
|
|
2727
|
+
const k = Kt({
|
|
2733
2728
|
message: p,
|
|
2734
2729
|
viewerLanguage: o
|
|
2735
2730
|
});
|
|
2736
2731
|
if (((Z = p == null ? void 0 : p.metadata) == null ? void 0 : Z.custom_type) === "MESSAGE_TIP") return k ? `💵 ${k}` : "💵 Sent a tip";
|
|
2737
|
-
if (((
|
|
2732
|
+
if (((V = p == null ? void 0 : p.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_PAID") return k ? `💰 ${k}` : "💰 Sent a message";
|
|
2738
2733
|
if (((G = p == null ? void 0 : p.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_ATTACHMENT") return k ? `📎 ${k}` : "📎 Sent an attachment";
|
|
2739
2734
|
if (k) return k;
|
|
2740
2735
|
const F = (P = p == null ? void 0 : p.attachments) == null ? void 0 : P[0];
|
|
2741
2736
|
return F ? F.og_scrape_url ? F.og_scrape_url : F.type === "image" ? "📷 Sent an image" : F.type === "video" ? "🎥 Sent a video" : F.type === "audio" ? "🎵 Sent audio" : F.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2742
|
-
})(), x = p != null && p.created_at ? er(new Date(p.created_at)) : "", w = p ? Ce(p) : !1, A = i ? i(p, v) : `${w ? "✨ " : ""}${v}`, T =
|
|
2737
|
+
})(), x = p != null && p.created_at ? er(new Date(p.created_at)) : "", w = p ? Ce(p) : !1, A = i ? i(p, v) : `${w ? "✨ " : ""}${v}`, T = Xt(e), S = t ?? 0;
|
|
2743
2738
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2744
2739
|
channelId: e == null ? void 0 : e.id,
|
|
2745
2740
|
isSelected: l,
|
|
@@ -2754,21 +2749,22 @@ const un = z.createContext({
|
|
|
2754
2749
|
onClick: d,
|
|
2755
2750
|
onKeyDown: m,
|
|
2756
2751
|
className: y(
|
|
2757
|
-
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring
|
|
2752
|
+
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring",
|
|
2758
2753
|
{
|
|
2759
|
-
"bg-
|
|
2760
|
-
"hover:bg-
|
|
2754
|
+
"bg-primary-alt/10 border-l-4 border-l-primary": l,
|
|
2755
|
+
"hover:bg-sand": !l
|
|
2761
2756
|
}
|
|
2762
2757
|
),
|
|
2763
|
-
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-
|
|
2758
|
+
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-3", children: [
|
|
2764
2759
|
/* @__PURE__ */ n(
|
|
2765
2760
|
ae,
|
|
2766
2761
|
{
|
|
2767
2762
|
id: ((C = u == null ? void 0 : u.user) == null ? void 0 : C.id) || e.id || "unknown",
|
|
2768
2763
|
name: f,
|
|
2769
2764
|
image: c,
|
|
2770
|
-
size:
|
|
2771
|
-
starred: T
|
|
2765
|
+
size: 44,
|
|
2766
|
+
starred: T,
|
|
2767
|
+
className: "[&_.avatar-fallback]:group-hover:bg-[#eeeeee]"
|
|
2772
2768
|
}
|
|
2773
2769
|
),
|
|
2774
2770
|
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
|
|
@@ -2777,7 +2773,8 @@ const un = z.createContext({
|
|
|
2777
2773
|
"h3",
|
|
2778
2774
|
{
|
|
2779
2775
|
className: y(
|
|
2780
|
-
"text-sm font-medium truncate
|
|
2776
|
+
"text-sm font-medium truncate",
|
|
2777
|
+
l ? "text-primary" : "text-charcoal"
|
|
2781
2778
|
),
|
|
2782
2779
|
children: [
|
|
2783
2780
|
T && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
@@ -2785,11 +2782,11 @@ const un = z.createContext({
|
|
|
2785
2782
|
]
|
|
2786
2783
|
}
|
|
2787
2784
|
),
|
|
2788
|
-
x && /* @__PURE__ */ n("span", { className: "text-xs text-
|
|
2785
|
+
x && /* @__PURE__ */ n("span", { className: "text-xs text-stone flex-shrink-0", children: x })
|
|
2789
2786
|
] }),
|
|
2790
2787
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2791
|
-
/* @__PURE__ */ n("p", { className: "text-
|
|
2792
|
-
S > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-
|
|
2788
|
+
/* @__PURE__ */ n("p", { className: "text-xs text-stone flex-1 line-clamp-1", children: A }),
|
|
2789
|
+
S > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-xs px-2 py-0.5 rounded-full min-w-[20px] text-center flex-shrink-0", children: S > 99 ? "99+" : S })
|
|
2793
2790
|
] })
|
|
2794
2791
|
] })
|
|
2795
2792
|
] })
|
|
@@ -2797,7 +2794,7 @@ const un = z.createContext({
|
|
|
2797
2794
|
);
|
|
2798
2795
|
}
|
|
2799
2796
|
);
|
|
2800
|
-
|
|
2797
|
+
hn.displayName = "CustomChannelPreview";
|
|
2801
2798
|
const tr = { last_message_at: -1 }, nr = z.memo(
|
|
2802
2799
|
({
|
|
2803
2800
|
onChannelSelect: e,
|
|
@@ -2850,14 +2847,14 @@ const tr = { last_message_at: -1 }, nr = z.memo(
|
|
|
2850
2847
|
o
|
|
2851
2848
|
),
|
|
2852
2849
|
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Ja, { value: c, children: /* @__PURE__ */ n(
|
|
2853
|
-
|
|
2850
|
+
cs,
|
|
2854
2851
|
{
|
|
2855
2852
|
filters: s,
|
|
2856
2853
|
sort: i,
|
|
2857
2854
|
options: { limit: 30 },
|
|
2858
2855
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
2859
2856
|
channelRenderFilterFn: f,
|
|
2860
|
-
Preview:
|
|
2857
|
+
Preview: hn,
|
|
2861
2858
|
EmptyStateIndicator: l
|
|
2862
2859
|
},
|
|
2863
2860
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
@@ -3026,7 +3023,7 @@ const rr = {
|
|
|
3026
3023
|
}, mr = {
|
|
3027
3024
|
dark: "size-16 text-white/25",
|
|
3028
3025
|
light: "size-16 text-black/25"
|
|
3029
|
-
}, Ae = (e, t) => !!t && !!e && re(e) === "audio",
|
|
3026
|
+
}, Ae = (e, t) => !!t && !!e && re(e) === "audio", fn = (e, t) => {
|
|
3030
3027
|
if (!t || !e) return !1;
|
|
3031
3028
|
const s = re(e);
|
|
3032
3029
|
return s === "video" || s === "audio";
|
|
@@ -3083,7 +3080,7 @@ const rr = {
|
|
|
3083
3080
|
"flex h-full w-full items-center justify-center",
|
|
3084
3081
|
ur[e]
|
|
3085
3082
|
),
|
|
3086
|
-
children:
|
|
3083
|
+
children: ce(r, {
|
|
3087
3084
|
className: mr[e],
|
|
3088
3085
|
weight: "regular"
|
|
3089
3086
|
})
|
|
@@ -3124,7 +3121,7 @@ const rr = {
|
|
|
3124
3121
|
onClick: u,
|
|
3125
3122
|
"aria-label": "Edit attachment",
|
|
3126
3123
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3127
|
-
children: /* @__PURE__ */ n(
|
|
3124
|
+
children: /* @__PURE__ */ n(Ts, { className: "size-5", weight: "regular" })
|
|
3128
3125
|
}
|
|
3129
3126
|
) : void 0;
|
|
3130
3127
|
return c ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -3183,7 +3180,7 @@ const rr = {
|
|
|
3183
3180
|
cta: d,
|
|
3184
3181
|
onClick: m
|
|
3185
3182
|
}) => {
|
|
3186
|
-
const g =
|
|
3183
|
+
const g = fn(a, i), u = Qe(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, p = Ae(a, i) ? tt : void 0, N = d && m ? {
|
|
3187
3184
|
...d,
|
|
3188
3185
|
onClick: () => {
|
|
3189
3186
|
var v;
|
|
@@ -3237,7 +3234,7 @@ const rr = {
|
|
|
3237
3234
|
cta: m,
|
|
3238
3235
|
onClick: g
|
|
3239
3236
|
}) => {
|
|
3240
|
-
const u =
|
|
3237
|
+
const u = fn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, p = m == null && !u && c != null ? g : void 0;
|
|
3241
3238
|
return /* @__PURE__ */ h(
|
|
3242
3239
|
Ee,
|
|
3243
3240
|
{
|
|
@@ -3453,7 +3450,7 @@ function Tr(e, t) {
|
|
|
3453
3450
|
}
|
|
3454
3451
|
if (!e) return;
|
|
3455
3452
|
if (re(e) === "document") {
|
|
3456
|
-
const r =
|
|
3453
|
+
const r = Qt(e), i = Sr[r];
|
|
3457
3454
|
if (i) return i;
|
|
3458
3455
|
if (e === "application/octet-stream") return;
|
|
3459
3456
|
}
|
|
@@ -3482,7 +3479,7 @@ const Mr = {
|
|
|
3482
3479
|
}, Rr = {
|
|
3483
3480
|
dark: "text-white/85",
|
|
3484
3481
|
light: "text-black/85"
|
|
3485
|
-
},
|
|
3482
|
+
}, gn = ({
|
|
3486
3483
|
variant: e,
|
|
3487
3484
|
filename: t,
|
|
3488
3485
|
title: s,
|
|
@@ -3500,7 +3497,7 @@ const Mr = {
|
|
|
3500
3497
|
Dr[e]
|
|
3501
3498
|
),
|
|
3502
3499
|
"aria-hidden": !0,
|
|
3503
|
-
children:
|
|
3500
|
+
children: ce(a, {
|
|
3504
3501
|
className: y("size-6", Rr[e]),
|
|
3505
3502
|
weight: "regular"
|
|
3506
3503
|
})
|
|
@@ -3541,7 +3538,7 @@ const Mr = {
|
|
|
3541
3538
|
l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
|
|
3542
3539
|
] });
|
|
3543
3540
|
};
|
|
3544
|
-
async function
|
|
3541
|
+
async function bn(e, t) {
|
|
3545
3542
|
const s = t ?? te(e);
|
|
3546
3543
|
try {
|
|
3547
3544
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -3571,7 +3568,7 @@ const Lr = ({
|
|
|
3571
3568
|
}) => {
|
|
3572
3569
|
const i = t.filename ?? te(t.src);
|
|
3573
3570
|
return /* @__PURE__ */ n(
|
|
3574
|
-
|
|
3571
|
+
gn,
|
|
3575
3572
|
{
|
|
3576
3573
|
variant: e,
|
|
3577
3574
|
filename: i,
|
|
@@ -3608,7 +3605,7 @@ const Lr = ({
|
|
|
3608
3605
|
const x = c[v];
|
|
3609
3606
|
if (!x) return;
|
|
3610
3607
|
const w = x.filename ?? te(x.src);
|
|
3611
|
-
|
|
3608
|
+
bn(x.src, w);
|
|
3612
3609
|
};
|
|
3613
3610
|
if (c.length === 0)
|
|
3614
3611
|
return null;
|
|
@@ -3660,7 +3657,7 @@ const Lr = ({
|
|
|
3660
3657
|
onClick: e,
|
|
3661
3658
|
"aria-label": s,
|
|
3662
3659
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
3663
|
-
children: /* @__PURE__ */ n(
|
|
3660
|
+
children: /* @__PURE__ */ n(As, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3664
3661
|
}
|
|
3665
3662
|
),
|
|
3666
3663
|
/* @__PURE__ */ n(
|
|
@@ -3670,10 +3667,10 @@ const Lr = ({
|
|
|
3670
3667
|
onClick: t,
|
|
3671
3668
|
"aria-label": a,
|
|
3672
3669
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3673
|
-
children: /* @__PURE__ */ n(
|
|
3670
|
+
children: /* @__PURE__ */ n(Yt, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3674
3671
|
}
|
|
3675
3672
|
)
|
|
3676
|
-
] }),
|
|
3673
|
+
] }), pn = ({
|
|
3677
3674
|
url: e,
|
|
3678
3675
|
filename: t,
|
|
3679
3676
|
variant: s = "pill",
|
|
@@ -3684,7 +3681,7 @@ const Lr = ({
|
|
|
3684
3681
|
}) => {
|
|
3685
3682
|
const [l, d] = O(!1), m = q(
|
|
3686
3683
|
(c) => {
|
|
3687
|
-
c.stopPropagation(), !l && (d(!0),
|
|
3684
|
+
c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
|
|
3688
3685
|
}).finally(() => {
|
|
3689
3686
|
d(!1), o == null || o();
|
|
3690
3687
|
}));
|
|
@@ -3873,7 +3870,7 @@ const Lr = ({
|
|
|
3873
3870
|
]
|
|
3874
3871
|
}
|
|
3875
3872
|
);
|
|
3876
|
-
},
|
|
3873
|
+
}, vn = ({
|
|
3877
3874
|
open: e,
|
|
3878
3875
|
items: t,
|
|
3879
3876
|
initialIndex: s = 0,
|
|
@@ -3895,7 +3892,7 @@ const Lr = ({
|
|
|
3895
3892
|
ariaLabel: d,
|
|
3896
3893
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
3897
3894
|
actions: /* @__PURE__ */ n(
|
|
3898
|
-
|
|
3895
|
+
pn,
|
|
3899
3896
|
{
|
|
3900
3897
|
url: l.src,
|
|
3901
3898
|
filename: d,
|
|
@@ -3929,7 +3926,7 @@ const Lr = ({
|
|
|
3929
3926
|
]
|
|
3930
3927
|
}
|
|
3931
3928
|
) : null;
|
|
3932
|
-
}, Br = "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",
|
|
3929
|
+
}, Br = "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", xn = ({
|
|
3933
3930
|
tiles: e,
|
|
3934
3931
|
onTileActivate: t,
|
|
3935
3932
|
maxVisible: s = 4,
|
|
@@ -4022,15 +4019,15 @@ const Lr = ({
|
|
|
4022
4019
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
4023
4020
|
}
|
|
4024
4021
|
)
|
|
4025
|
-
}),
|
|
4022
|
+
}), Ur = ({
|
|
4026
4023
|
src: e,
|
|
4027
4024
|
alt: t,
|
|
4028
4025
|
items: s
|
|
4029
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
4026
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], wn = (e, t) => e.map((s, a) => ({
|
|
4030
4027
|
src: s.src,
|
|
4031
4028
|
alt: s.alt,
|
|
4032
4029
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4033
|
-
})),
|
|
4030
|
+
})), Vr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
4034
4031
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
|
|
4035
4032
|
r
|
|
4036
4033
|
);
|
|
@@ -4057,16 +4054,16 @@ const Lr = ({
|
|
|
4057
4054
|
),
|
|
4058
4055
|
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
|
|
4059
4056
|
/* @__PURE__ */ n(
|
|
4060
|
-
|
|
4057
|
+
vn,
|
|
4061
4058
|
{
|
|
4062
4059
|
open: o,
|
|
4063
|
-
items:
|
|
4060
|
+
items: wn([{ src: e, alt: t }], s),
|
|
4064
4061
|
initialIndex: l,
|
|
4065
4062
|
onClose: m
|
|
4066
4063
|
}
|
|
4067
4064
|
)
|
|
4068
4065
|
] });
|
|
4069
|
-
},
|
|
4066
|
+
}, Nn = ({
|
|
4070
4067
|
state: e,
|
|
4071
4068
|
src: t,
|
|
4072
4069
|
alt: s,
|
|
@@ -4077,7 +4074,7 @@ const Lr = ({
|
|
|
4077
4074
|
loading: l = "lazy",
|
|
4078
4075
|
onClick: d
|
|
4079
4076
|
}) => {
|
|
4080
|
-
const m =
|
|
4077
|
+
const m = Ur({ src: t, alt: s, items: r }), g = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: p } = Ne(
|
|
4081
4078
|
d
|
|
4082
4079
|
);
|
|
4083
4080
|
if (m.length === 0)
|
|
@@ -4093,12 +4090,12 @@ const Lr = ({
|
|
|
4093
4090
|
groupPosition: o,
|
|
4094
4091
|
"data-testid": "image-attachment",
|
|
4095
4092
|
children: [
|
|
4096
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4093
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: N, onTileActivate: c }) }),
|
|
4097
4094
|
/* @__PURE__ */ n(
|
|
4098
|
-
|
|
4095
|
+
vn,
|
|
4099
4096
|
{
|
|
4100
4097
|
open: u,
|
|
4101
|
-
items:
|
|
4098
|
+
items: wn(m, a),
|
|
4102
4099
|
initialIndex: f,
|
|
4103
4100
|
onClose: p
|
|
4104
4101
|
}
|
|
@@ -4106,7 +4103,7 @@ const Lr = ({
|
|
|
4106
4103
|
]
|
|
4107
4104
|
}
|
|
4108
4105
|
);
|
|
4109
|
-
}, Gr = (e) => /* @__PURE__ */ n(
|
|
4106
|
+
}, Gr = (e) => /* @__PURE__ */ n(Vr, { ...e }), Hr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "sent" }), Yr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "received" }), qr = {
|
|
4110
4107
|
Composer: Gr,
|
|
4111
4108
|
Sent: Hr,
|
|
4112
4109
|
Received: Yr
|
|
@@ -4176,7 +4173,7 @@ const Lr = ({
|
|
|
4176
4173
|
}) => {
|
|
4177
4174
|
const i = t.filename ?? te(t.src);
|
|
4178
4175
|
return /* @__PURE__ */ n(
|
|
4179
|
-
|
|
4176
|
+
gn,
|
|
4180
4177
|
{
|
|
4181
4178
|
variant: e,
|
|
4182
4179
|
filename: i,
|
|
@@ -4219,7 +4216,7 @@ const Lr = ({
|
|
|
4219
4216
|
children: [
|
|
4220
4217
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, A) => {
|
|
4221
4218
|
const T = w.filename ?? te(w.src), S = v && A === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4222
|
-
|
|
4219
|
+
pn,
|
|
4223
4220
|
{
|
|
4224
4221
|
url: w.src,
|
|
4225
4222
|
filename: T,
|
|
@@ -4256,7 +4253,7 @@ const Lr = ({
|
|
|
4256
4253
|
Composer: Zr,
|
|
4257
4254
|
Sent: Qr,
|
|
4258
4255
|
Received: ei
|
|
4259
|
-
},
|
|
4256
|
+
}, _n = ({
|
|
4260
4257
|
open: e,
|
|
4261
4258
|
items: t,
|
|
4262
4259
|
initialIndex: s = 0,
|
|
@@ -4306,7 +4303,7 @@ const Lr = ({
|
|
|
4306
4303
|
]
|
|
4307
4304
|
}
|
|
4308
4305
|
) : null;
|
|
4309
|
-
}, ni = () => /* @__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(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }),
|
|
4306
|
+
}, ni = () => /* @__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(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), yn = ({
|
|
4310
4307
|
item: e,
|
|
4311
4308
|
index: t
|
|
4312
4309
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4331,14 +4328,14 @@ const Lr = ({
|
|
|
4331
4328
|
/* @__PURE__ */ n(ni, {})
|
|
4332
4329
|
] }), si = (e, t, s) => ({
|
|
4333
4330
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4334
|
-
content: /* @__PURE__ */ n(
|
|
4331
|
+
content: /* @__PURE__ */ n(yn, { item: e, index: t })
|
|
4335
4332
|
}), ai = ({
|
|
4336
4333
|
src: e,
|
|
4337
4334
|
poster: t,
|
|
4338
4335
|
mimeType: s,
|
|
4339
4336
|
preload: a,
|
|
4340
4337
|
items: r
|
|
4341
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
4338
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Cn = (e, t) => e.map((s, a) => ({
|
|
4342
4339
|
src: s.src,
|
|
4343
4340
|
poster: s.poster,
|
|
4344
4341
|
mimeType: s.mimeType,
|
|
@@ -4356,15 +4353,15 @@ const Lr = ({
|
|
|
4356
4353
|
onClick: () => m(0),
|
|
4357
4354
|
"aria-label": "Play video",
|
|
4358
4355
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
4359
|
-
children: /* @__PURE__ */ n(
|
|
4356
|
+
children: /* @__PURE__ */ n(yn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
4360
4357
|
}
|
|
4361
4358
|
),
|
|
4362
4359
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
|
|
4363
4360
|
/* @__PURE__ */ n(
|
|
4364
|
-
|
|
4361
|
+
_n,
|
|
4365
4362
|
{
|
|
4366
4363
|
open: l,
|
|
4367
|
-
items:
|
|
4364
|
+
items: Cn(
|
|
4368
4365
|
[{ src: e, poster: t, mimeType: s, preload: r }],
|
|
4369
4366
|
a
|
|
4370
4367
|
),
|
|
@@ -4373,7 +4370,7 @@ const Lr = ({
|
|
|
4373
4370
|
}
|
|
4374
4371
|
)
|
|
4375
4372
|
] });
|
|
4376
|
-
},
|
|
4373
|
+
}, kn = ({
|
|
4377
4374
|
state: e,
|
|
4378
4375
|
src: t,
|
|
4379
4376
|
poster: s,
|
|
@@ -4402,7 +4399,7 @@ const Lr = ({
|
|
|
4402
4399
|
"data-testid": "video-attachment",
|
|
4403
4400
|
children: [
|
|
4404
4401
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4405
|
-
|
|
4402
|
+
xn,
|
|
4406
4403
|
{
|
|
4407
4404
|
tiles: v,
|
|
4408
4405
|
onTileActivate: p,
|
|
@@ -4410,10 +4407,10 @@ const Lr = ({
|
|
|
4410
4407
|
}
|
|
4411
4408
|
) }),
|
|
4412
4409
|
/* @__PURE__ */ n(
|
|
4413
|
-
|
|
4410
|
+
_n,
|
|
4414
4411
|
{
|
|
4415
4412
|
open: f,
|
|
4416
|
-
items:
|
|
4413
|
+
items: Cn(g, r),
|
|
4417
4414
|
initialIndex: c,
|
|
4418
4415
|
onClose: N
|
|
4419
4416
|
}
|
|
@@ -4421,7 +4418,7 @@ const Lr = ({
|
|
|
4421
4418
|
]
|
|
4422
4419
|
}
|
|
4423
4420
|
);
|
|
4424
|
-
}, ii = (e) => /* @__PURE__ */ n(ri, { ...e }), oi = (e) => /* @__PURE__ */ n(
|
|
4421
|
+
}, ii = (e) => /* @__PURE__ */ n(ri, { ...e }), oi = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), ci = {
|
|
4425
4422
|
Composer: ii,
|
|
4426
4423
|
Sent: oi,
|
|
4427
4424
|
Received: li
|
|
@@ -4496,8 +4493,8 @@ const Lr = ({
|
|
|
4496
4493
|
] }) });
|
|
4497
4494
|
};
|
|
4498
4495
|
export {
|
|
4499
|
-
|
|
4500
|
-
|
|
4496
|
+
en as A,
|
|
4497
|
+
Us as B,
|
|
4501
4498
|
Ya as C,
|
|
4502
4499
|
Ds as D,
|
|
4503
4500
|
Ei as F,
|
|
@@ -4506,7 +4503,7 @@ export {
|
|
|
4506
4503
|
ye as a,
|
|
4507
4504
|
ae as b,
|
|
4508
4505
|
nr as c,
|
|
4509
|
-
|
|
4506
|
+
un as d,
|
|
4510
4507
|
Ni as e,
|
|
4511
4508
|
di as f,
|
|
4512
4509
|
re as g,
|
|
@@ -4519,15 +4516,15 @@ export {
|
|
|
4519
4516
|
Ir as n,
|
|
4520
4517
|
er as o,
|
|
4521
4518
|
Tr as p,
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4519
|
+
Kt as q,
|
|
4520
|
+
ce as r,
|
|
4521
|
+
sn as s,
|
|
4525
4522
|
Ls as t,
|
|
4526
4523
|
Ci as u,
|
|
4527
|
-
|
|
4524
|
+
Vs as v,
|
|
4528
4525
|
Je as w,
|
|
4529
4526
|
Ze as x,
|
|
4530
4527
|
Te as y,
|
|
4531
4528
|
ga as z
|
|
4532
4529
|
};
|
|
4533
|
-
//# sourceMappingURL=index-
|
|
4530
|
+
//# sourceMappingURL=index-Dca2QSVv.js.map
|