@linktr.ee/messaging-react 3.4.3-rc-1782553322 → 3.4.3-rc-1782553325
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-1oglowd2.cjs → Card-9BtSxGC1.cjs} +2 -2
- package/dist/{Card-1oglowd2.cjs.map → Card-9BtSxGC1.cjs.map} +1 -1
- package/dist/{Card-DwaOIthl.cjs → Card-BTPEZadJ.cjs} +2 -2
- package/dist/{Card-DwaOIthl.cjs.map → Card-BTPEZadJ.cjs.map} +1 -1
- package/dist/{Card-CKn-iPjf.js → Card-B_tMXmN_.js} +2 -2
- package/dist/{Card-CKn-iPjf.js.map → Card-B_tMXmN_.js.map} +1 -1
- package/dist/{Card-BmVutVEt.js → Card-CGjd8b1K.js} +2 -2
- package/dist/{Card-BmVutVEt.js.map → Card-CGjd8b1K.js.map} +1 -1
- package/dist/{Card-DoBWURRU.js → Card-CeiUwix2.js} +3 -3
- package/dist/{Card-DoBWURRU.js.map → Card-CeiUwix2.js.map} +1 -1
- package/dist/{Card-DEEK3wsC.cjs → Card-Rg9QOS9o.cjs} +2 -2
- package/dist/{Card-DEEK3wsC.cjs.map → Card-Rg9QOS9o.cjs.map} +1 -1
- package/dist/{LockedThumbnail-DI-aReA7.js → LockedThumbnail-4_S1w5SO.js} +2 -2
- package/dist/{LockedThumbnail-DI-aReA7.js.map → LockedThumbnail-4_S1w5SO.js.map} +1 -1
- package/dist/{LockedThumbnail-B59cJFsF.cjs → LockedThumbnail-BIcI8zTC.cjs} +2 -2
- package/dist/{LockedThumbnail-B59cJFsF.cjs.map → LockedThumbnail-BIcI8zTC.cjs.map} +1 -1
- package/dist/{index-Dv13-2iu.js → index-D9JJLtJg.js} +150 -150
- package/dist/index-D9JJLtJg.js.map +1 -0
- package/dist/{index-12HxQ_GM.cjs → index-DOw3VaHR.cjs} +2 -2
- package/dist/index-DOw3VaHR.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/ChannelView.test.tsx +3 -1
- package/src/components/ChannelView.tsx +2 -2
- package/dist/index-12HxQ_GM.cjs.map +0 -1
- package/dist/index-Dv13-2iu.js.map +0 -1
|
@@ -3,7 +3,7 @@ import j, { createContext as We, useContext as _e, useCallback as J, useState as
|
|
|
3
3
|
import { StreamChatService as In } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as Tn, LinkPreviewsManager as Lt } from "stream-chat";
|
|
5
5
|
import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as Ke, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as Gt, Attachment as Dn, EditMessageModal as On, MessageBlocked as Pn, MessageBouncePrompt as zn, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Dt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as Ne, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as ze, AIStates as $e, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
|
|
6
|
-
import { StarIcon as Ve, DotsThreeIcon as hs, SpinnerGapIcon as Ie, SignOutIcon as fs, ProhibitInsetIcon as Ot, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as
|
|
6
|
+
import { StarIcon as Ve, DotsThreeIcon as hs, SpinnerGapIcon as Ie, SignOutIcon as fs, ProhibitInsetIcon as Ot, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as ps, VideoCameraIcon as qt, FileMdIcon as bs, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as xe, PlayIcon as Ge, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as we, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as De, ArrowUpIcon as Ms, SparkleIcon as be, ProhibitIcon as Rs, ArrowLeftIcon as Pt, CaretRightIcon as He, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
|
|
7
7
|
import y from "classnames";
|
|
8
8
|
import { MessageActions as Os, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
|
|
9
9
|
const Xt = We({
|
|
@@ -37,7 +37,7 @@ const Xt = We({
|
|
|
37
37
|
serviceConfig: !!s,
|
|
38
38
|
capabilities: Object.keys(r)
|
|
39
39
|
});
|
|
40
|
-
const [o, d] = F(null), [m, g] = F(null), [u, f] = F(!1), [c,
|
|
40
|
+
const [o, d] = F(null), [m, g] = F(null), [u, f] = F(!1), [c, p] = F(!1), [_, x] = F(null), b = H(!1), v = H(null), M = H(s);
|
|
41
41
|
M.current = s;
|
|
42
42
|
const I = H(i);
|
|
43
43
|
I.current = i;
|
|
@@ -96,14 +96,14 @@ const Xt = We({
|
|
|
96
96
|
hasService: !!o,
|
|
97
97
|
hasUser: !!t,
|
|
98
98
|
userId: t == null ? void 0 : t.id,
|
|
99
|
-
isConnecting:
|
|
99
|
+
isConnecting: b.current,
|
|
100
100
|
isConnected: u,
|
|
101
101
|
dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
|
|
102
102
|
}), !o || !t) {
|
|
103
103
|
l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
106
|
+
if (b.current) {
|
|
107
107
|
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
@@ -115,7 +115,7 @@ const Xt = We({
|
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
(async () => {
|
|
118
|
-
l("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
118
|
+
l("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, p(!0), x(null);
|
|
119
119
|
try {
|
|
120
120
|
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
121
121
|
const $ = await o.connectUser(t);
|
|
@@ -130,7 +130,7 @@ const Xt = We({
|
|
|
130
130
|
error: Y
|
|
131
131
|
});
|
|
132
132
|
} finally {
|
|
133
|
-
|
|
133
|
+
p(!1), b.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
134
134
|
userId: t.id,
|
|
135
135
|
isConnected: u
|
|
136
136
|
});
|
|
@@ -151,7 +151,7 @@ const Xt = We({
|
|
|
151
151
|
l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }),
|
|
154
|
+
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), p(!0);
|
|
155
155
|
try {
|
|
156
156
|
l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
|
|
157
157
|
const k = await o.connectUser(t);
|
|
@@ -163,7 +163,7 @@ const Xt = We({
|
|
|
163
163
|
error: S
|
|
164
164
|
});
|
|
165
165
|
} finally {
|
|
166
|
-
|
|
166
|
+
p(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
167
167
|
}
|
|
168
168
|
}, [o, t, l]), T = j.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
|
|
169
169
|
hasService: !!o,
|
|
@@ -364,9 +364,9 @@ const se = ({
|
|
|
364
364
|
logLabel: g = "useChannelModerationActions"
|
|
365
365
|
}) => {
|
|
366
366
|
var O;
|
|
367
|
-
const { service: u, debug: f } = Je(), c = (O = t == null ? void 0 : t.user) == null ? void 0 : O.id,
|
|
367
|
+
const { service: u, debug: f } = Je(), c = (O = t == null ? void 0 : t.user) == null ? void 0 : O.id, p = !!(a && s && u && c), [_, x] = F(!1), [b, v] = F(null), [M, I] = F(!1), [N, z] = F(!1), L = p && ((b == null ? void 0 : b.participantId) !== c || (b == null ? void 0 : b.service) !== u);
|
|
368
368
|
return K(() => {
|
|
369
|
-
if (!
|
|
369
|
+
if (!p || !u || !c) {
|
|
370
370
|
x(!1), v(null);
|
|
371
371
|
return;
|
|
372
372
|
}
|
|
@@ -388,7 +388,7 @@ const se = ({
|
|
|
388
388
|
})(), () => {
|
|
389
389
|
C = !0;
|
|
390
390
|
};
|
|
391
|
-
}, [
|
|
391
|
+
}, [p, u, c, g]), {
|
|
392
392
|
isParticipantBlocked: _,
|
|
393
393
|
isCheckingBlockedStatus: L,
|
|
394
394
|
isLeaving: M,
|
|
@@ -437,7 +437,7 @@ const se = ({
|
|
|
437
437
|
d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
|
|
438
438
|
}
|
|
439
439
|
};
|
|
440
|
-
},
|
|
440
|
+
}, pe = ({
|
|
441
441
|
variant: e = "default",
|
|
442
442
|
className: t,
|
|
443
443
|
children: s,
|
|
@@ -468,8 +468,8 @@ const se = ({
|
|
|
468
468
|
customChannelActions: g,
|
|
469
469
|
triggerClassName: u
|
|
470
470
|
}) => {
|
|
471
|
-
const [f, c] = F(!1),
|
|
472
|
-
isParticipantBlocked:
|
|
471
|
+
const [f, c] = F(!1), p = H(null), _ = Sn(), x = J(() => c(!1), []), {
|
|
472
|
+
isParticipantBlocked: b,
|
|
473
473
|
isCheckingBlockedStatus: v,
|
|
474
474
|
isLeaving: M,
|
|
475
475
|
isUpdatingBlockStatus: I,
|
|
@@ -493,14 +493,14 @@ const se = ({
|
|
|
493
493
|
return K(() => {
|
|
494
494
|
if (!f) return;
|
|
495
495
|
const R = (O) => {
|
|
496
|
-
|
|
496
|
+
p.current && !p.current.contains(O.target) && c(!1);
|
|
497
497
|
}, T = (O) => {
|
|
498
498
|
O.key === "Escape" && c(!1);
|
|
499
499
|
};
|
|
500
500
|
return document.addEventListener("mousedown", R), document.addEventListener("keydown", T), () => {
|
|
501
501
|
document.removeEventListener("mousedown", R), document.removeEventListener("keydown", T);
|
|
502
502
|
};
|
|
503
|
-
}, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref:
|
|
503
|
+
}, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: p, className: "relative", children: [
|
|
504
504
|
/* @__PURE__ */ h(
|
|
505
505
|
"button",
|
|
506
506
|
{
|
|
@@ -527,7 +527,7 @@ const se = ({
|
|
|
527
527
|
),
|
|
528
528
|
children: /* @__PURE__ */ h("ul", { className: "flex flex-col gap-1", children: [
|
|
529
529
|
s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
|
|
530
|
-
|
|
530
|
+
pe,
|
|
531
531
|
{
|
|
532
532
|
onClick: N,
|
|
533
533
|
disabled: M,
|
|
@@ -541,12 +541,12 @@ const se = ({
|
|
|
541
541
|
a && /* @__PURE__ */ n("li", { children: v ? (
|
|
542
542
|
// Block status not yet resolved — show a disabled placeholder
|
|
543
543
|
// so a premature click can't act on a stale block state.
|
|
544
|
-
/* @__PURE__ */ h(
|
|
544
|
+
/* @__PURE__ */ h(pe, { disabled: !0, "aria-busy": !0, children: [
|
|
545
545
|
/* @__PURE__ */ n(Ie, { className: "h-5 w-5 animate-spin" }),
|
|
546
546
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
547
547
|
] })
|
|
548
|
-
) :
|
|
549
|
-
|
|
548
|
+
) : b ? /* @__PURE__ */ h(
|
|
549
|
+
pe,
|
|
550
550
|
{
|
|
551
551
|
onClick: L,
|
|
552
552
|
disabled: I,
|
|
@@ -557,7 +557,7 @@ const se = ({
|
|
|
557
557
|
]
|
|
558
558
|
}
|
|
559
559
|
) : /* @__PURE__ */ h(
|
|
560
|
-
|
|
560
|
+
pe,
|
|
561
561
|
{
|
|
562
562
|
onClick: z,
|
|
563
563
|
disabled: I,
|
|
@@ -568,7 +568,7 @@ const se = ({
|
|
|
568
568
|
]
|
|
569
569
|
}
|
|
570
570
|
) }),
|
|
571
|
-
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
|
|
571
|
+
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(pe, { variant: "danger", onClick: D, children: [
|
|
572
572
|
/* @__PURE__ */ n(Ht, { className: "h-5 w-5" }),
|
|
573
573
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
574
574
|
] }) }),
|
|
@@ -619,7 +619,7 @@ function Zt({
|
|
|
619
619
|
const s = e == null ? void 0 : e.text, a = Ys(t);
|
|
620
620
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
621
621
|
}
|
|
622
|
-
const qs = j.lazy(() => import("./Card-
|
|
622
|
+
const qs = j.lazy(() => import("./Card-CGjd8b1K.js")), Ws = j.lazy(() => import("./Card-B_tMXmN_.js")), Xs = j.lazy(() => import("./Card-CeiUwix2.js")), Ze = () => /* @__PURE__ */ n(
|
|
623
623
|
"div",
|
|
624
624
|
{
|
|
625
625
|
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)]",
|
|
@@ -646,7 +646,7 @@ function tn(e) {
|
|
|
646
646
|
}
|
|
647
647
|
const ea = {
|
|
648
648
|
video: qt,
|
|
649
|
-
audio:
|
|
649
|
+
audio: ps,
|
|
650
650
|
image: gs,
|
|
651
651
|
document: Yt
|
|
652
652
|
}, ta = {
|
|
@@ -657,7 +657,7 @@ const ea = {
|
|
|
657
657
|
ppt: ws,
|
|
658
658
|
zip: xs,
|
|
659
659
|
text: vs,
|
|
660
|
-
markdown:
|
|
660
|
+
markdown: bs,
|
|
661
661
|
generic: Yt
|
|
662
662
|
};
|
|
663
663
|
function na(e) {
|
|
@@ -682,7 +682,7 @@ const sa = (e) => {
|
|
|
682
682
|
muted: d = !1,
|
|
683
683
|
onContainerClick: m
|
|
684
684
|
}) => {
|
|
685
|
-
const g = ie(t), u = H(null), f = H(null), c = H(null),
|
|
685
|
+
const g = ie(t), u = H(null), f = H(null), c = H(null), p = H(r), [_, x] = F(a), [b, v] = F(0), [M, I] = F(!1), [N, z] = F(!1), [L, D] = F(!1), [E, R] = F(!1), [T, O] = F(!0), [C, k] = F(null), S = J(() => {
|
|
686
686
|
D(!1), x(!0);
|
|
687
687
|
}, []), P = J((w) => {
|
|
688
688
|
const A = f.current;
|
|
@@ -701,7 +701,7 @@ const sa = (e) => {
|
|
|
701
701
|
v(A), $(A);
|
|
702
702
|
};
|
|
703
703
|
K(() => {
|
|
704
|
-
r !== void 0 && r !==
|
|
704
|
+
r !== void 0 && r !== p.current && (p.current = r, x(r));
|
|
705
705
|
}, [r]), K(() => {
|
|
706
706
|
if (!_) {
|
|
707
707
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
@@ -728,7 +728,7 @@ const sa = (e) => {
|
|
|
728
728
|
window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", A);
|
|
729
729
|
};
|
|
730
730
|
}, [M, P, $]);
|
|
731
|
-
const Q = C ? { aspectRatio: String(C) } : void 0, Z = C ? "" : " aspect-video", V = Math.round(
|
|
731
|
+
const Q = C ? { aspectRatio: String(C) } : void 0, Z = C ? "" : " aspect-video", V = Math.round(b * 100);
|
|
732
732
|
return /* @__PURE__ */ h(
|
|
733
733
|
"div",
|
|
734
734
|
{
|
|
@@ -847,7 +847,7 @@ const sa = (e) => {
|
|
|
847
847
|
onTouchStart: Y,
|
|
848
848
|
onClick: (w) => w.stopPropagation(),
|
|
849
849
|
onKeyDown: (w) => {
|
|
850
|
-
w.key === "ArrowRight" && $(Math.min(1,
|
|
850
|
+
w.key === "ArrowRight" && $(Math.min(1, b + 0.05)), w.key === "ArrowLeft" && $(Math.max(0, b - 0.05));
|
|
851
851
|
},
|
|
852
852
|
children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
|
|
853
853
|
"div",
|
|
@@ -888,7 +888,7 @@ const sa = (e) => {
|
|
|
888
888
|
onMouseEnter: () => z(!0),
|
|
889
889
|
onMouseLeave: () => z(!1),
|
|
890
890
|
onKeyDown: (w) => {
|
|
891
|
-
w.key === "ArrowRight" && $(Math.min(1,
|
|
891
|
+
w.key === "ArrowRight" && $(Math.min(1, b + 0.05)), w.key === "ArrowLeft" && $(Math.max(0, b - 0.05));
|
|
892
892
|
},
|
|
893
893
|
children: [
|
|
894
894
|
/* @__PURE__ */ n(
|
|
@@ -1012,7 +1012,7 @@ const sa = (e) => {
|
|
|
1012
1012
|
rootRef: g,
|
|
1013
1013
|
"data-testid": u
|
|
1014
1014
|
}) => {
|
|
1015
|
-
const f = e === "dark", c = f ? s ?? a : s ?? "",
|
|
1015
|
+
const f = e === "dark", c = f ? s ?? a : s ?? "", p = f && !s;
|
|
1016
1016
|
return /* @__PURE__ */ h(
|
|
1017
1017
|
"div",
|
|
1018
1018
|
{
|
|
@@ -1032,8 +1032,8 @@ const sa = (e) => {
|
|
|
1032
1032
|
{
|
|
1033
1033
|
className: y("mb-0.5 truncate text-base font-medium", {
|
|
1034
1034
|
"text-black": !f,
|
|
1035
|
-
"text-white/30": f &&
|
|
1036
|
-
"text-white": f && !
|
|
1035
|
+
"text-white/30": f && p,
|
|
1036
|
+
"text-white": f && !p
|
|
1037
1037
|
}),
|
|
1038
1038
|
children: c
|
|
1039
1039
|
}
|
|
@@ -1156,14 +1156,14 @@ const ma = ({
|
|
|
1156
1156
|
);
|
|
1157
1157
|
};
|
|
1158
1158
|
function nt(e) {
|
|
1159
|
-
var u, f, c,
|
|
1159
|
+
var u, f, c, p;
|
|
1160
1160
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1161
1161
|
(_) => _.type === "video" && _.asset_url
|
|
1162
1162
|
), s = (f = e.attachments) == null ? void 0 : f.find(
|
|
1163
1163
|
(_) => _.type === "image" && _.image_url
|
|
1164
1164
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1165
1165
|
(_) => _.type === "audio" && _.asset_url
|
|
1166
|
-
), r = (
|
|
1166
|
+
), r = (p = e.attachments) == null ? void 0 : p.find(
|
|
1167
1167
|
(_) => _.type === "file" && _.asset_url
|
|
1168
1168
|
), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1169
1169
|
if (!l) return null;
|
|
@@ -1283,13 +1283,13 @@ const on = ({
|
|
|
1283
1283
|
}, yi = Object.assign(ha, {
|
|
1284
1284
|
Creator: fa,
|
|
1285
1285
|
Visitor: ga
|
|
1286
|
-
}),
|
|
1286
|
+
}), pa = {
|
|
1287
1287
|
isUnlocking: () => !1
|
|
1288
|
-
},
|
|
1289
|
-
LockedAttachment:
|
|
1288
|
+
}, ba = {
|
|
1289
|
+
LockedAttachment: pa
|
|
1290
1290
|
}, cn = We({}), Ci = cn.Provider;
|
|
1291
1291
|
function va(e) {
|
|
1292
|
-
return _e(cn)[e] ??
|
|
1292
|
+
return _e(cn)[e] ?? ba[e];
|
|
1293
1293
|
}
|
|
1294
1294
|
const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1295
1295
|
"svg",
|
|
@@ -1336,10 +1336,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1336
1336
|
if (r) {
|
|
1337
1337
|
const f = (u = e.metadata) == null ? void 0 : u.amount_text;
|
|
1338
1338
|
if (!f) return null;
|
|
1339
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip",
|
|
1339
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", p = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
1340
1340
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
1341
1341
|
/* @__PURE__ */ n(Ss, { size: t ? 14 : 12 }),
|
|
1342
|
-
/* @__PURE__ */ n("span", { children:
|
|
1342
|
+
/* @__PURE__ */ n("span", { children: p })
|
|
1343
1343
|
] });
|
|
1344
1344
|
}
|
|
1345
1345
|
const l = s && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
|
|
@@ -1388,7 +1388,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1388
1388
|
}
|
|
1389
1389
|
)
|
|
1390
1390
|
] }), ka = (e) => {
|
|
1391
|
-
var
|
|
1391
|
+
var bt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St, It, Tt, At;
|
|
1392
1392
|
const {
|
|
1393
1393
|
additionalMessageInputProps: t,
|
|
1394
1394
|
chatbotVotingEnabled: s,
|
|
@@ -1403,10 +1403,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1403
1403
|
isMessageAIGenerated: u,
|
|
1404
1404
|
isMyMessage: f,
|
|
1405
1405
|
message: c,
|
|
1406
|
-
renderText:
|
|
1406
|
+
renderText: p,
|
|
1407
1407
|
threadList: _,
|
|
1408
1408
|
viewerLanguage: x
|
|
1409
|
-
} = e, { client:
|
|
1409
|
+
} = e, { client: b } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: M, onUnlockClick: I, onFetchSource: N, onDownloadClick: z } = va("LockedAttachment"), [L, D] = F(!1), E = Ln(c.id), { selected: R, voteUp: T, voteDown: O } = Hs(c), {
|
|
1410
1410
|
Attachment: C = Dn,
|
|
1411
1411
|
EditMessageModal: k = On,
|
|
1412
1412
|
MessageActions: S,
|
|
@@ -1436,7 +1436,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1436
1436
|
return /* @__PURE__ */ n(Y, { message: c });
|
|
1437
1437
|
if (Yn(c))
|
|
1438
1438
|
return /* @__PURE__ */ n(P, {});
|
|
1439
|
-
const X = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((
|
|
1439
|
+
const X = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, he = qn(c);
|
|
1440
1440
|
let ee;
|
|
1441
1441
|
me ? ee = () => m(c) : he && (ee = () => D(!0));
|
|
1442
1442
|
const ne = f(), oe = y(
|
|
@@ -1456,7 +1456,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1456
1456
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1457
1457
|
"str-chat__virtual-message__wrapper--group": l
|
|
1458
1458
|
}
|
|
1459
|
-
), ht = c.poll_id &&
|
|
1459
|
+
), ht = c.poll_id && b.polls.fromState(c.poll_id), ft = ya(c), fe = Ae(c), gt = Na(c), Pe = !!(B != null && B.length && !c.quoted_message), pt = fe && ne && Pe;
|
|
1460
1460
|
return /* @__PURE__ */ h(te, { children: [
|
|
1461
1461
|
a && /* @__PURE__ */ n(
|
|
1462
1462
|
k,
|
|
@@ -1547,14 +1547,14 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1547
1547
|
Dt,
|
|
1548
1548
|
{
|
|
1549
1549
|
message: W,
|
|
1550
|
-
renderText:
|
|
1550
|
+
renderText: p
|
|
1551
1551
|
}
|
|
1552
1552
|
) })
|
|
1553
1553
|
] }) : ft ? (
|
|
1554
1554
|
/* Tip-only messages render as a standalone bubble */
|
|
1555
1555
|
/* @__PURE__ */ n(Fe, { message: c, standalone: !0 })
|
|
1556
1556
|
) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
1557
|
-
fe && !
|
|
1557
|
+
fe && !pt && /* @__PURE__ */ n(
|
|
1558
1558
|
Fe,
|
|
1559
1559
|
{
|
|
1560
1560
|
message: c,
|
|
@@ -1574,13 +1574,13 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1574
1574
|
w,
|
|
1575
1575
|
{
|
|
1576
1576
|
message: W,
|
|
1577
|
-
renderText:
|
|
1577
|
+
renderText: p
|
|
1578
1578
|
}
|
|
1579
1579
|
) : /* @__PURE__ */ n(
|
|
1580
1580
|
Dt,
|
|
1581
1581
|
{
|
|
1582
1582
|
message: W,
|
|
1583
|
-
renderText:
|
|
1583
|
+
renderText: p
|
|
1584
1584
|
}
|
|
1585
1585
|
),
|
|
1586
1586
|
/* @__PURE__ */ n(Kn, {})
|
|
@@ -1588,7 +1588,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1588
1588
|
}
|
|
1589
1589
|
),
|
|
1590
1590
|
!gt && !ft && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
1591
|
-
(!fe ||
|
|
1591
|
+
(!fe || pt) && /* @__PURE__ */ n(
|
|
1592
1592
|
Fe,
|
|
1593
1593
|
{
|
|
1594
1594
|
message: c,
|
|
@@ -1855,7 +1855,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1855
1855
|
"data-dm-agent-system-type": s.type,
|
|
1856
1856
|
children: [
|
|
1857
1857
|
/* @__PURE__ */ n(
|
|
1858
|
-
|
|
1858
|
+
be,
|
|
1859
1859
|
{
|
|
1860
1860
|
size: 16,
|
|
1861
1861
|
weight: "regular",
|
|
@@ -1920,10 +1920,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1920
1920
|
$e.Generating,
|
|
1921
1921
|
$e.ExternalSources
|
|
1922
1922
|
]), qa = ({ threadList: e }) => {
|
|
1923
|
-
var
|
|
1923
|
+
var p, _;
|
|
1924
1924
|
const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = rs(), { aiState: l } = is(t), o = _e(un);
|
|
1925
1925
|
if (!e && o && Ya.has(l)) {
|
|
1926
|
-
const x = Wa(t, (
|
|
1926
|
+
const x = Wa(t, (p = r.user) == null ? void 0 : p.id);
|
|
1927
1927
|
return /* @__PURE__ */ n(
|
|
1928
1928
|
Vt,
|
|
1929
1929
|
{
|
|
@@ -1937,14 +1937,14 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1937
1937
|
if ((s == null ? void 0 : s.typing_events) === !1)
|
|
1938
1938
|
return null;
|
|
1939
1939
|
const m = e ? [] : Object.values(i).filter(
|
|
1940
|
-
({ parent_id: x, user:
|
|
1940
|
+
({ parent_id: x, user: b }) => {
|
|
1941
1941
|
var v;
|
|
1942
|
-
return (
|
|
1942
|
+
return (b == null ? void 0 : b.id) !== ((v = r.user) == null ? void 0 : v.id) && !x;
|
|
1943
1943
|
}
|
|
1944
1944
|
), g = e ? Object.values(i).filter(
|
|
1945
|
-
({ parent_id: x, user:
|
|
1945
|
+
({ parent_id: x, user: b }) => {
|
|
1946
1946
|
var v;
|
|
1947
|
-
return (
|
|
1947
|
+
return (b == null ? void 0 : b.id) !== ((v = r.user) == null ? void 0 : v.id) && x === (a == null ? void 0 : a.id);
|
|
1948
1948
|
}
|
|
1949
1949
|
) : [], u = e ? g : m;
|
|
1950
1950
|
if (!u.length)
|
|
@@ -2075,29 +2075,29 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2075
2075
|
onReportParticipantClick: u,
|
|
2076
2076
|
customChannelActions: f,
|
|
2077
2077
|
renderChannelActions: c,
|
|
2078
|
-
showChannelInfo:
|
|
2078
|
+
showChannelInfo: p = !0,
|
|
2079
2079
|
onParticipantNameClick: _,
|
|
2080
2080
|
renderHeaderTitleBadges: x
|
|
2081
2081
|
}) => {
|
|
2082
2082
|
var E, R, T, O, C, k, S;
|
|
2083
|
-
const { channel:
|
|
2083
|
+
const { channel: b } = de(), v = j.useMemo(() => {
|
|
2084
2084
|
var Y, Q;
|
|
2085
|
-
const P = (Y =
|
|
2086
|
-
return P ? Object.values(((Q =
|
|
2085
|
+
const P = (Y = b._client) == null ? void 0 : Y.userID;
|
|
2086
|
+
return P ? Object.values(((Q = b.state) == null ? void 0 : Q.members) || {}).find(
|
|
2087
2087
|
(Z) => {
|
|
2088
2088
|
var V;
|
|
2089
2089
|
return ((V = Z.user) == null ? void 0 : V.id) && Z.user.id !== P;
|
|
2090
2090
|
}
|
|
2091
2091
|
) : void 0;
|
|
2092
|
-
}, [(E =
|
|
2093
|
-
channel:
|
|
2092
|
+
}, [(E = b._client) == null ? void 0 : E.userID, (R = b.state) == null ? void 0 : R.members]), M = Jt(v == null ? void 0 : v.user), I = (T = v == null ? void 0 : v.user) == null ? void 0 : T.image, N = Kt(b), z = x == null ? void 0 : x({
|
|
2093
|
+
channel: b,
|
|
2094
2094
|
participant: v
|
|
2095
2095
|
}), L = /* @__PURE__ */ h(te, { children: [
|
|
2096
2096
|
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: M }),
|
|
2097
2097
|
z && /* @__PURE__ */ n("span", { className: "shrink-0", children: z })
|
|
2098
2098
|
] }), D = async () => {
|
|
2099
2099
|
try {
|
|
2100
|
-
N ? await
|
|
2100
|
+
N ? await b.unpin() : await b.pin();
|
|
2101
2101
|
} catch (P) {
|
|
2102
2102
|
console.error(
|
|
2103
2103
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
@@ -2127,12 +2127,12 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2127
2127
|
type: "button",
|
|
2128
2128
|
onClick: _,
|
|
2129
2129
|
"aria-label": `View details for ${M}`,
|
|
2130
|
-
className: "flex max-w-full flex-col items-center gap-1 appearance-none rounded border-0 bg-transparent
|
|
2130
|
+
className: "flex max-w-full flex-col items-center gap-1 appearance-none rounded-[12px] border-0 bg-transparent px-1 py-0.5 text-center text-xs font-medium text-black/90 transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none",
|
|
2131
2131
|
children: [
|
|
2132
2132
|
/* @__PURE__ */ n(
|
|
2133
2133
|
se,
|
|
2134
2134
|
{
|
|
2135
|
-
id: ((O = v == null ? void 0 : v.user) == null ? void 0 : O.id) ||
|
|
2135
|
+
id: ((O = v == null ? void 0 : v.user) == null ? void 0 : O.id) || b.id || "unknown",
|
|
2136
2136
|
name: M,
|
|
2137
2137
|
image: I,
|
|
2138
2138
|
starred: s && N,
|
|
@@ -2145,7 +2145,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2145
2145
|
/* @__PURE__ */ n(He, { className: "size-3 shrink-0", weight: "bold" })
|
|
2146
2146
|
] }),
|
|
2147
2147
|
a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2148
|
-
/* @__PURE__ */ n(
|
|
2148
|
+
/* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
|
|
2149
2149
|
/* @__PURE__ */ n("span", { children: Te })
|
|
2150
2150
|
] })
|
|
2151
2151
|
]
|
|
@@ -2154,7 +2154,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2154
2154
|
/* @__PURE__ */ n(
|
|
2155
2155
|
se,
|
|
2156
2156
|
{
|
|
2157
|
-
id: ((C = v == null ? void 0 : v.user) == null ? void 0 : C.id) ||
|
|
2157
|
+
id: ((C = v == null ? void 0 : v.user) == null ? void 0 : C.id) || b.id || "unknown",
|
|
2158
2158
|
name: M,
|
|
2159
2159
|
image: I,
|
|
2160
2160
|
starred: s && N,
|
|
@@ -2164,7 +2164,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2164
2164
|
),
|
|
2165
2165
|
/* @__PURE__ */ n("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: L }),
|
|
2166
2166
|
a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2167
|
-
/* @__PURE__ */ n(
|
|
2167
|
+
/* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
|
|
2168
2168
|
/* @__PURE__ */ n("span", { children: Te })
|
|
2169
2169
|
] })
|
|
2170
2170
|
] }) }),
|
|
@@ -2188,10 +2188,10 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2188
2188
|
)
|
|
2189
2189
|
}
|
|
2190
2190
|
),
|
|
2191
|
-
|
|
2191
|
+
p && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2192
2192
|
Ft,
|
|
2193
2193
|
{
|
|
2194
|
-
channel:
|
|
2194
|
+
channel: b,
|
|
2195
2195
|
participant: v,
|
|
2196
2196
|
showDeleteConversation: l,
|
|
2197
2197
|
showBlockParticipant: o,
|
|
@@ -2228,12 +2228,12 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2228
2228
|
type: "button",
|
|
2229
2229
|
onClick: _,
|
|
2230
2230
|
"aria-label": `View details for ${M}`,
|
|
2231
|
-
className: "flex min-w-0 max-w-full items-center gap-4 appearance-none rounded border-0 bg-transparent
|
|
2231
|
+
className: "flex min-w-0 max-w-full items-center gap-4 appearance-none rounded-[12px] border-0 bg-transparent px-1 py-0.5 text-left text-black/90 transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none",
|
|
2232
2232
|
children: [
|
|
2233
2233
|
/* @__PURE__ */ n(
|
|
2234
2234
|
se,
|
|
2235
2235
|
{
|
|
2236
|
-
id: ((k = v == null ? void 0 : v.user) == null ? void 0 : k.id) ||
|
|
2236
|
+
id: ((k = v == null ? void 0 : v.user) == null ? void 0 : k.id) || b.id || "unknown",
|
|
2237
2237
|
name: M,
|
|
2238
2238
|
image: I,
|
|
2239
2239
|
starred: s && N,
|
|
@@ -2247,7 +2247,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2247
2247
|
/* @__PURE__ */ n(He, { className: "size-4 shrink-0", weight: "bold" })
|
|
2248
2248
|
] }),
|
|
2249
2249
|
a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2250
|
-
/* @__PURE__ */ n(
|
|
2250
|
+
/* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
|
|
2251
2251
|
/* @__PURE__ */ n("span", { className: "truncate", children: Te })
|
|
2252
2252
|
] })
|
|
2253
2253
|
] })
|
|
@@ -2257,7 +2257,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2257
2257
|
/* @__PURE__ */ n(
|
|
2258
2258
|
se,
|
|
2259
2259
|
{
|
|
2260
|
-
id: ((S = v == null ? void 0 : v.user) == null ? void 0 : S.id) ||
|
|
2260
|
+
id: ((S = v == null ? void 0 : v.user) == null ? void 0 : S.id) || b.id || "unknown",
|
|
2261
2261
|
name: M,
|
|
2262
2262
|
image: I,
|
|
2263
2263
|
starred: s && N,
|
|
@@ -2268,7 +2268,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2268
2268
|
/* @__PURE__ */ h("div", { className: "min-w-0", children: [
|
|
2269
2269
|
/* @__PURE__ */ n("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: L }),
|
|
2270
2270
|
a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2271
|
-
/* @__PURE__ */ n(
|
|
2271
|
+
/* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
|
|
2272
2272
|
/* @__PURE__ */ n("span", { className: "truncate", children: Te })
|
|
2273
2273
|
] })
|
|
2274
2274
|
] })
|
|
@@ -2294,10 +2294,10 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2294
2294
|
)
|
|
2295
2295
|
}
|
|
2296
2296
|
),
|
|
2297
|
-
|
|
2297
|
+
p && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2298
2298
|
Ft,
|
|
2299
2299
|
{
|
|
2300
|
-
channel:
|
|
2300
|
+
channel: b,
|
|
2301
2301
|
participant: v,
|
|
2302
2302
|
showDeleteConversation: l,
|
|
2303
2303
|
showBlockParticipant: o,
|
|
@@ -2329,10 +2329,10 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2329
2329
|
showBlockParticipant: u = !0,
|
|
2330
2330
|
showReportParticipant: f = !0,
|
|
2331
2331
|
composerDisabled: c = !1,
|
|
2332
|
-
composerDisabledReason:
|
|
2332
|
+
composerDisabledReason: p,
|
|
2333
2333
|
showStarButton: _ = !1,
|
|
2334
2334
|
chatbotVotingEnabled: x = !1,
|
|
2335
|
-
renderChannelBanner:
|
|
2335
|
+
renderChannelBanner: b,
|
|
2336
2336
|
renderHeaderTitleBadges: v,
|
|
2337
2337
|
customChannelActions: M,
|
|
2338
2338
|
renderChannelActions: I,
|
|
@@ -2404,7 +2404,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2404
2404
|
renderHeaderTitleBadges: v
|
|
2405
2405
|
}
|
|
2406
2406
|
) }, "lt-channel-header"),
|
|
2407
|
-
|
|
2407
|
+
b ? /* @__PURE__ */ n(j.Fragment, { children: b() }, "lt-channel-banner") : null,
|
|
2408
2408
|
/* @__PURE__ */ n(
|
|
2409
2409
|
"div",
|
|
2410
2410
|
{
|
|
@@ -2422,7 +2422,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2422
2422
|
},
|
|
2423
2423
|
renderFooter: () => a == null ? void 0 : a(T),
|
|
2424
2424
|
disabled: c,
|
|
2425
|
-
disabledReason:
|
|
2425
|
+
disabledReason: p,
|
|
2426
2426
|
composerInput: R
|
|
2427
2427
|
},
|
|
2428
2428
|
"lt-channel-message-input"
|
|
@@ -2446,10 +2446,10 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2446
2446
|
onDeleteConversationClick: u,
|
|
2447
2447
|
onBlockParticipantClick: f,
|
|
2448
2448
|
onReportParticipantClick: c,
|
|
2449
|
-
showBlockParticipant:
|
|
2449
|
+
showBlockParticipant: p = !0,
|
|
2450
2450
|
showReportParticipant: _ = !0,
|
|
2451
2451
|
composerDisabled: x = !1,
|
|
2452
|
-
composerDisabledReason:
|
|
2452
|
+
composerDisabledReason: b,
|
|
2453
2453
|
dmAgentEnabled: v,
|
|
2454
2454
|
messageMetadata: M,
|
|
2455
2455
|
onMessageSent: I,
|
|
@@ -2534,10 +2534,10 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2534
2534
|
onDeleteConversationClick: u,
|
|
2535
2535
|
onBlockParticipantClick: f,
|
|
2536
2536
|
onReportParticipantClick: c,
|
|
2537
|
-
showBlockParticipant:
|
|
2537
|
+
showBlockParticipant: p,
|
|
2538
2538
|
showReportParticipant: _,
|
|
2539
2539
|
composerDisabled: x,
|
|
2540
|
-
composerDisabledReason:
|
|
2540
|
+
composerDisabledReason: b,
|
|
2541
2541
|
showStarButton: N,
|
|
2542
2542
|
dmAgentEnabled: v,
|
|
2543
2543
|
chatbotVotingEnabled: z,
|
|
@@ -2589,10 +2589,10 @@ const Ei = ({
|
|
|
2589
2589
|
onMessageSent: u,
|
|
2590
2590
|
chatbotVotingEnabled: f = !1,
|
|
2591
2591
|
viewerLanguage: c,
|
|
2592
|
-
renderHeaderTitleBadges:
|
|
2592
|
+
renderHeaderTitleBadges: p,
|
|
2593
2593
|
renderChannelBanner: _,
|
|
2594
2594
|
customChannelActions: x,
|
|
2595
|
-
renderChannelActions:
|
|
2595
|
+
renderChannelActions: b,
|
|
2596
2596
|
onParticipantNameClick: v,
|
|
2597
2597
|
renderMessage: M,
|
|
2598
2598
|
onMessageLinkClick: I,
|
|
@@ -2707,9 +2707,9 @@ const Ei = ({
|
|
|
2707
2707
|
onMessageSent: u,
|
|
2708
2708
|
chatbotVotingEnabled: f,
|
|
2709
2709
|
viewerLanguage: c,
|
|
2710
|
-
renderHeaderTitleBadges:
|
|
2710
|
+
renderHeaderTitleBadges: p,
|
|
2711
2711
|
customChannelActions: x,
|
|
2712
|
-
renderChannelActions:
|
|
2712
|
+
renderChannelActions: b,
|
|
2713
2713
|
onParticipantNameClick: v,
|
|
2714
2714
|
renderMessage: M,
|
|
2715
2715
|
onMessageLinkClick: I,
|
|
@@ -2772,7 +2772,7 @@ const hn = j.createContext({
|
|
|
2772
2772
|
var R, T;
|
|
2773
2773
|
return ((R = E.user) == null ? void 0 : R.id) && E.user.id !== ((T = e == null ? void 0 : e._client) == null ? void 0 : T.userID);
|
|
2774
2774
|
}
|
|
2775
|
-
), f = Jt(u == null ? void 0 : u.user), c = (L = u == null ? void 0 : u.user) == null ? void 0 : L.image,
|
|
2775
|
+
), f = Jt(u == null ? void 0 : u.user), c = (L = u == null ? void 0 : u.user) == null ? void 0 : L.image, p = (() => {
|
|
2776
2776
|
var R;
|
|
2777
2777
|
const E = (R = e == null ? void 0 : e.state) == null ? void 0 : R.messages;
|
|
2778
2778
|
if (E != null && E.length) {
|
|
@@ -2782,22 +2782,22 @@ const hn = j.createContext({
|
|
|
2782
2782
|
})(), x = (() => {
|
|
2783
2783
|
var k, S, P, $;
|
|
2784
2784
|
const E = Zt({
|
|
2785
|
-
message:
|
|
2785
|
+
message: p,
|
|
2786
2786
|
viewerLanguage: l
|
|
2787
2787
|
});
|
|
2788
|
-
if (((k =
|
|
2789
|
-
if (((S =
|
|
2790
|
-
if (((P =
|
|
2788
|
+
if (((k = p == null ? void 0 : p.metadata) == null ? void 0 : k.custom_type) === "MESSAGE_TIP") return E ? `💵 ${E}` : "💵 Sent a tip";
|
|
2789
|
+
if (((S = p == null ? void 0 : p.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return E ? `💰 ${E}` : "💰 Sent a message";
|
|
2790
|
+
if (((P = p == null ? void 0 : p.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_ATTACHMENT") return E ? `📎 ${E}` : "📎 Sent an attachment";
|
|
2791
2791
|
if (E) return E;
|
|
2792
|
-
const C = ($ =
|
|
2792
|
+
const C = ($ = p == null ? void 0 : p.attachments) == null ? void 0 : $[0];
|
|
2793
2793
|
return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2794
|
-
})(),
|
|
2794
|
+
})(), b = p != null && p.created_at ? sr(new Date(p.created_at)) : "", v = p ? Ae(p) : !1, M = i ? i(p, x) : `${v ? "✨ " : ""}${x}`, I = Kt(e), N = t ?? 0;
|
|
2795
2795
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2796
2796
|
channelId: e == null ? void 0 : e.id,
|
|
2797
2797
|
isSelected: o,
|
|
2798
2798
|
participantName: f,
|
|
2799
2799
|
unreadCount: N,
|
|
2800
|
-
hasTimestamp: !!
|
|
2800
|
+
hasTimestamp: !!b
|
|
2801
2801
|
}), /* @__PURE__ */ n(
|
|
2802
2802
|
"div",
|
|
2803
2803
|
{
|
|
@@ -2837,7 +2837,7 @@ const hn = j.createContext({
|
|
|
2837
2837
|
]
|
|
2838
2838
|
}
|
|
2839
2839
|
),
|
|
2840
|
-
|
|
2840
|
+
b && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: b })
|
|
2841
2841
|
] }),
|
|
2842
2842
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2843
2843
|
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
|
|
@@ -2866,10 +2866,10 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2866
2866
|
const g = j.useRef(0);
|
|
2867
2867
|
g.current++;
|
|
2868
2868
|
const { debug: u = !1 } = Je(), f = j.useCallback(
|
|
2869
|
-
(
|
|
2870
|
-
for (const _ of
|
|
2869
|
+
(p) => {
|
|
2870
|
+
for (const _ of p)
|
|
2871
2871
|
Qa(_);
|
|
2872
|
-
return r ? r(
|
|
2872
|
+
return r ? r(p) : p;
|
|
2873
2873
|
},
|
|
2874
2874
|
[r]
|
|
2875
2875
|
);
|
|
@@ -2981,12 +2981,12 @@ const lr = {
|
|
|
2981
2981
|
cta: l,
|
|
2982
2982
|
trailingAction: o
|
|
2983
2983
|
}) => {
|
|
2984
|
-
const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "",
|
|
2985
|
-
if (!g && !u && !c && !
|
|
2984
|
+
const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", p = l != null;
|
|
2985
|
+
if (!g && !u && !c && !p) return null;
|
|
2986
2986
|
const x = y(
|
|
2987
2987
|
"truncate text-base font-medium leading-6",
|
|
2988
2988
|
d && !t ? ur : dr[e]
|
|
2989
|
-
),
|
|
2989
|
+
), b = y(
|
|
2990
2990
|
"truncate text-xs leading-4",
|
|
2991
2991
|
mr[e]
|
|
2992
2992
|
);
|
|
@@ -2998,9 +2998,9 @@ const lr = {
|
|
|
2998
2998
|
i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
|
|
2999
2999
|
/* @__PURE__ */ n("p", { className: y("min-w-0", x), children: m })
|
|
3000
3000
|
] }),
|
|
3001
|
-
u && /* @__PURE__ */ n("p", { className:
|
|
3001
|
+
u && /* @__PURE__ */ n("p", { className: b, children: a })
|
|
3002
3002
|
] }),
|
|
3003
|
-
!
|
|
3003
|
+
!p && c && /* @__PURE__ */ n("p", { className: b, children: f })
|
|
3004
3004
|
] }),
|
|
3005
3005
|
o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
|
|
3006
3006
|
] }),
|
|
@@ -3147,7 +3147,7 @@ const lr = {
|
|
|
3147
3147
|
]
|
|
3148
3148
|
}
|
|
3149
3149
|
);
|
|
3150
|
-
},
|
|
3150
|
+
}, pr = ({
|
|
3151
3151
|
title: e,
|
|
3152
3152
|
placeholderTitle: t,
|
|
3153
3153
|
description: s,
|
|
@@ -3161,7 +3161,7 @@ const lr = {
|
|
|
3161
3161
|
onDismiss: g,
|
|
3162
3162
|
onEditClick: u
|
|
3163
3163
|
}) => {
|
|
3164
|
-
const f = o === "classic", c = Oe(r, l),
|
|
3164
|
+
const f = o === "classic", c = Oe(r, l), p = g ? /* @__PURE__ */ n(
|
|
3165
3165
|
"button",
|
|
3166
3166
|
{
|
|
3167
3167
|
type: "button",
|
|
@@ -3190,12 +3190,12 @@ const lr = {
|
|
|
3190
3190
|
mimeType: r
|
|
3191
3191
|
}
|
|
3192
3192
|
) }),
|
|
3193
|
-
|
|
3193
|
+
p && /* @__PURE__ */ n("div", { className: "shrink-0", children: p })
|
|
3194
3194
|
] }) }) : /* @__PURE__ */ h(
|
|
3195
3195
|
Re,
|
|
3196
3196
|
{
|
|
3197
3197
|
variant: "dark",
|
|
3198
|
-
topRight: f ?
|
|
3198
|
+
topRight: f ? p : void 0,
|
|
3199
3199
|
children: [
|
|
3200
3200
|
!f && /* @__PURE__ */ n(
|
|
3201
3201
|
Le,
|
|
@@ -3205,7 +3205,7 @@ const lr = {
|
|
|
3205
3205
|
sourceUrl: l,
|
|
3206
3206
|
title: e,
|
|
3207
3207
|
mimeType: r,
|
|
3208
|
-
topRight:
|
|
3208
|
+
topRight: p
|
|
3209
3209
|
}
|
|
3210
3210
|
),
|
|
3211
3211
|
/* @__PURE__ */ n(
|
|
@@ -3224,7 +3224,7 @@ const lr = {
|
|
|
3224
3224
|
]
|
|
3225
3225
|
}
|
|
3226
3226
|
);
|
|
3227
|
-
},
|
|
3227
|
+
}, br = ({
|
|
3228
3228
|
title: e,
|
|
3229
3229
|
description: t,
|
|
3230
3230
|
url: s,
|
|
@@ -3236,7 +3236,7 @@ const lr = {
|
|
|
3236
3236
|
cta: d,
|
|
3237
3237
|
onClick: m
|
|
3238
3238
|
}) => {
|
|
3239
|
-
const g = gn(a, i), u = at(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0,
|
|
3239
|
+
const g = gn(a, i), u = at(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, p = Oe(a, i) ? it : void 0, _ = d && m ? {
|
|
3240
3240
|
...d,
|
|
3241
3241
|
onClick: () => {
|
|
3242
3242
|
var x;
|
|
@@ -3250,7 +3250,7 @@ const lr = {
|
|
|
3250
3250
|
href: f,
|
|
3251
3251
|
onClick: c,
|
|
3252
3252
|
ariaLabel: e ?? "Open attachment preview",
|
|
3253
|
-
bgClassName:
|
|
3253
|
+
bgClassName: p,
|
|
3254
3254
|
"data-testid": "link-attachment",
|
|
3255
3255
|
children: [
|
|
3256
3256
|
l === "featured" && /* @__PURE__ */ n(
|
|
@@ -3290,13 +3290,13 @@ const lr = {
|
|
|
3290
3290
|
cta: m,
|
|
3291
3291
|
onClick: g
|
|
3292
3292
|
}) => {
|
|
3293
|
-
const u = gn(r, l), f = at(a), c = m == null && f != null && !u ? f : void 0,
|
|
3293
|
+
const u = gn(r, l), f = at(a), c = m == null && f != null && !u ? f : void 0, p = m == null && !u && c != null ? g : void 0;
|
|
3294
3294
|
return /* @__PURE__ */ h(
|
|
3295
3295
|
Re,
|
|
3296
3296
|
{
|
|
3297
3297
|
variant: "dark",
|
|
3298
3298
|
href: c,
|
|
3299
|
-
onClick:
|
|
3299
|
+
onClick: p,
|
|
3300
3300
|
bgClassName: Oe(r, l) ? it : void 0,
|
|
3301
3301
|
children: [
|
|
3302
3302
|
o === "featured" && /* @__PURE__ */ n(
|
|
@@ -3325,9 +3325,9 @@ const lr = {
|
|
|
3325
3325
|
}
|
|
3326
3326
|
);
|
|
3327
3327
|
}, Si = {
|
|
3328
|
-
Composer:
|
|
3328
|
+
Composer: pr,
|
|
3329
3329
|
Sent: vr,
|
|
3330
|
-
Received:
|
|
3330
|
+
Received: br
|
|
3331
3331
|
}, xr = {
|
|
3332
3332
|
dark: "bg-[#121110]",
|
|
3333
3333
|
light: "bg-[#e9eaed]"
|
|
@@ -3463,7 +3463,7 @@ const lr = {
|
|
|
3463
3463
|
text: i,
|
|
3464
3464
|
groupPosition: l,
|
|
3465
3465
|
"data-testid": "audio-attachment",
|
|
3466
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c,
|
|
3466
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, p) => /* @__PURE__ */ n(
|
|
3467
3467
|
kr,
|
|
3468
3468
|
{
|
|
3469
3469
|
item: c,
|
|
@@ -3471,10 +3471,10 @@ const lr = {
|
|
|
3471
3471
|
trailingAction: (
|
|
3472
3472
|
// Composer only supports a single attachment, so the
|
|
3473
3473
|
// dismiss control sits on the only player.
|
|
3474
|
-
g &&
|
|
3474
|
+
g && p === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
|
|
3475
3475
|
)
|
|
3476
3476
|
},
|
|
3477
|
-
`${c.src}-${
|
|
3477
|
+
`${c.src}-${p}`
|
|
3478
3478
|
)) })
|
|
3479
3479
|
}
|
|
3480
3480
|
);
|
|
@@ -3535,7 +3535,7 @@ const Dr = {
|
|
|
3535
3535
|
}, Pr = {
|
|
3536
3536
|
dark: "text-white/85",
|
|
3537
3537
|
light: "text-black/85"
|
|
3538
|
-
},
|
|
3538
|
+
}, pn = ({
|
|
3539
3539
|
variant: e,
|
|
3540
3540
|
filename: t,
|
|
3541
3541
|
title: s,
|
|
@@ -3594,7 +3594,7 @@ const Dr = {
|
|
|
3594
3594
|
o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
|
|
3595
3595
|
] });
|
|
3596
3596
|
};
|
|
3597
|
-
async function
|
|
3597
|
+
async function bn(e, t) {
|
|
3598
3598
|
const s = t ?? ae(e);
|
|
3599
3599
|
try {
|
|
3600
3600
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -3624,7 +3624,7 @@ const zr = ({
|
|
|
3624
3624
|
}) => {
|
|
3625
3625
|
const i = t.filename ?? ae(t.src);
|
|
3626
3626
|
return /* @__PURE__ */ n(
|
|
3627
|
-
|
|
3627
|
+
pn,
|
|
3628
3628
|
{
|
|
3629
3629
|
variant: e,
|
|
3630
3630
|
filename: i,
|
|
@@ -3656,12 +3656,12 @@ const zr = ({
|
|
|
3656
3656
|
mimeType: r,
|
|
3657
3657
|
title: i,
|
|
3658
3658
|
items: l
|
|
3659
|
-
}),
|
|
3659
|
+
}), p = (x) => {
|
|
3660
3660
|
if ((m == null ? void 0 : m(x)) === !1) return;
|
|
3661
|
-
const
|
|
3662
|
-
if (!
|
|
3663
|
-
const v =
|
|
3664
|
-
|
|
3661
|
+
const b = c[x];
|
|
3662
|
+
if (!b) return;
|
|
3663
|
+
const v = b.filename ?? ae(b.src);
|
|
3664
|
+
bn(b.src, v);
|
|
3665
3665
|
};
|
|
3666
3666
|
if (c.length === 0)
|
|
3667
3667
|
return null;
|
|
@@ -3683,16 +3683,16 @@ const zr = ({
|
|
|
3683
3683
|
text: o,
|
|
3684
3684
|
groupPosition: d,
|
|
3685
3685
|
"data-testid": "file-attachment",
|
|
3686
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((x,
|
|
3686
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((x, b) => /* @__PURE__ */ n(
|
|
3687
3687
|
$r,
|
|
3688
3688
|
{
|
|
3689
3689
|
variant: u,
|
|
3690
3690
|
item: x,
|
|
3691
|
-
index:
|
|
3692
|
-
onActivate:
|
|
3693
|
-
trailingAction: f &&
|
|
3691
|
+
index: b,
|
|
3692
|
+
onActivate: p,
|
|
3693
|
+
trailingAction: f && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : _
|
|
3694
3694
|
},
|
|
3695
|
-
`${x.src}-${
|
|
3695
|
+
`${x.src}-${b}`
|
|
3696
3696
|
)) })
|
|
3697
3697
|
}
|
|
3698
3698
|
);
|
|
@@ -3737,7 +3737,7 @@ const zr = ({
|
|
|
3737
3737
|
}) => {
|
|
3738
3738
|
const [o, d] = F(!1), m = J(
|
|
3739
3739
|
(c) => {
|
|
3740
|
-
c.stopPropagation(), !o && (d(!0),
|
|
3740
|
+
c.stopPropagation(), !o && (d(!0), bn(e, t).catch(() => {
|
|
3741
3741
|
}).finally(() => {
|
|
3742
3742
|
d(!1), l == null || l();
|
|
3743
3743
|
}));
|
|
@@ -4130,13 +4130,13 @@ const zr = ({
|
|
|
4130
4130
|
loading: o = "lazy",
|
|
4131
4131
|
onClick: d
|
|
4132
4132
|
}) => {
|
|
4133
|
-
const m = Hr({ src: t, alt: s, items: r }), g = ke(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer:
|
|
4133
|
+
const m = Hr({ src: t, alt: s, items: r }), g = ke(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: p } = Ee(
|
|
4134
4134
|
d
|
|
4135
4135
|
);
|
|
4136
4136
|
if (m.length === 0)
|
|
4137
4137
|
return null;
|
|
4138
4138
|
const _ = m.map(
|
|
4139
|
-
(x,
|
|
4139
|
+
(x, b) => Gr(x, b, m.length, o)
|
|
4140
4140
|
);
|
|
4141
4141
|
return /* @__PURE__ */ h(
|
|
4142
4142
|
ye,
|
|
@@ -4153,7 +4153,7 @@ const zr = ({
|
|
|
4153
4153
|
open: u,
|
|
4154
4154
|
items: _n(m, a),
|
|
4155
4155
|
initialIndex: f,
|
|
4156
|
-
onClose:
|
|
4156
|
+
onClose: p
|
|
4157
4157
|
}
|
|
4158
4158
|
)
|
|
4159
4159
|
]
|
|
@@ -4229,7 +4229,7 @@ const zr = ({
|
|
|
4229
4229
|
}) => {
|
|
4230
4230
|
const i = t.filename ?? ae(t.src);
|
|
4231
4231
|
return /* @__PURE__ */ n(
|
|
4232
|
-
|
|
4232
|
+
pn,
|
|
4233
4233
|
{
|
|
4234
4234
|
variant: e,
|
|
4235
4235
|
filename: i,
|
|
@@ -4253,12 +4253,12 @@ const zr = ({
|
|
|
4253
4253
|
onClick: d,
|
|
4254
4254
|
onDismiss: m
|
|
4255
4255
|
}) => {
|
|
4256
|
-
const g = ke(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate:
|
|
4256
|
+
const g = ke(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: _ } = Ee(
|
|
4257
4257
|
d
|
|
4258
4258
|
), x = e === "composer" && !!m;
|
|
4259
4259
|
if (u.length === 0)
|
|
4260
4260
|
return null;
|
|
4261
|
-
const
|
|
4261
|
+
const b = u.map((v) => ({
|
|
4262
4262
|
src: v.src,
|
|
4263
4263
|
filename: v.filename ?? ae(v.src)
|
|
4264
4264
|
}));
|
|
@@ -4287,7 +4287,7 @@ const zr = ({
|
|
|
4287
4287
|
variant: g,
|
|
4288
4288
|
item: v,
|
|
4289
4289
|
index: M,
|
|
4290
|
-
onActivate:
|
|
4290
|
+
onActivate: p,
|
|
4291
4291
|
trailingAction: N
|
|
4292
4292
|
},
|
|
4293
4293
|
`${v.src}-${M}`
|
|
@@ -4297,7 +4297,7 @@ const zr = ({
|
|
|
4297
4297
|
Jr,
|
|
4298
4298
|
{
|
|
4299
4299
|
open: f,
|
|
4300
|
-
items:
|
|
4300
|
+
items: b,
|
|
4301
4301
|
initialIndex: c,
|
|
4302
4302
|
onClose: _
|
|
4303
4303
|
}
|
|
@@ -4438,13 +4438,13 @@ const zr = ({
|
|
|
4438
4438
|
preload: d,
|
|
4439
4439
|
onClick: m
|
|
4440
4440
|
}) => {
|
|
4441
|
-
const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = ke(e), { viewerOpen: f, viewerIndex: c, handleActivate:
|
|
4441
|
+
const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = ke(e), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: _ } = Ee(
|
|
4442
4442
|
m
|
|
4443
4443
|
);
|
|
4444
4444
|
if (g.length === 0)
|
|
4445
4445
|
return null;
|
|
4446
4446
|
const x = g.map(
|
|
4447
|
-
(
|
|
4447
|
+
(b, v) => ii(b, v, g.length)
|
|
4448
4448
|
);
|
|
4449
4449
|
return /* @__PURE__ */ h(
|
|
4450
4450
|
ye,
|
|
@@ -4458,7 +4458,7 @@ const zr = ({
|
|
|
4458
4458
|
wn,
|
|
4459
4459
|
{
|
|
4460
4460
|
tiles: x,
|
|
4461
|
-
onTileActivate:
|
|
4461
|
+
onTileActivate: p,
|
|
4462
4462
|
className: "overflow-hidden rounded-md"
|
|
4463
4463
|
}
|
|
4464
4464
|
) }),
|
|
@@ -4557,7 +4557,7 @@ export {
|
|
|
4557
4557
|
Ai as F,
|
|
4558
4558
|
Si as L,
|
|
4559
4559
|
yi as M,
|
|
4560
|
-
|
|
4560
|
+
pe as a,
|
|
4561
4561
|
se as b,
|
|
4562
4562
|
rr as c,
|
|
4563
4563
|
mn as d,
|
|
@@ -4584,4 +4584,4 @@ export {
|
|
|
4584
4584
|
Jt as y,
|
|
4585
4585
|
ki as z
|
|
4586
4586
|
};
|
|
4587
|
-
//# sourceMappingURL=index-
|
|
4587
|
+
//# sourceMappingURL=index-D9JJLtJg.js.map
|