@linktr.ee/messaging-react 3.3.6 → 3.3.7-rc-1781176703
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-B9QrjooN.js → Card-BDWTAZYS.js} +3 -3
- package/dist/{Card-B9QrjooN.js.map → Card-BDWTAZYS.js.map} +1 -1
- package/dist/{Card-C-FCwjGa.cjs → Card-BlET8wE6.cjs} +2 -2
- package/dist/{Card-C-FCwjGa.cjs.map → Card-BlET8wE6.cjs.map} +1 -1
- package/dist/{Card-BRRlz4kq.cjs → Card-BnVoc-u7.cjs} +2 -2
- package/dist/{Card-BRRlz4kq.cjs.map → Card-BnVoc-u7.cjs.map} +1 -1
- package/dist/{Card-CVZzYmYW.js → Card-D-JLW3MJ.js} +2 -2
- package/dist/{Card-CVZzYmYW.js.map → Card-D-JLW3MJ.js.map} +1 -1
- package/dist/{Card-DzjYyrie.js → Card-D4cn0k04.js} +2 -2
- package/dist/{Card-DzjYyrie.js.map → Card-D4cn0k04.js.map} +1 -1
- package/dist/{Card-D_oLlfPw.cjs → Card-Dh2EXYNT.cjs} +2 -2
- package/dist/{Card-D_oLlfPw.cjs.map → Card-Dh2EXYNT.cjs.map} +1 -1
- package/dist/{LockedThumbnail-Cth1yWnH.cjs → LockedThumbnail-BYdGEl_B.cjs} +2 -2
- package/dist/{LockedThumbnail-Cth1yWnH.cjs.map → LockedThumbnail-BYdGEl_B.cjs.map} +1 -1
- package/dist/{LockedThumbnail-CJfXY_Ut.js → LockedThumbnail-ZEMzCDoV.js} +2 -2
- package/dist/{LockedThumbnail-CJfXY_Ut.js.map → LockedThumbnail-ZEMzCDoV.js.map} +1 -1
- package/dist/{index-D7eRkXoG.js → index-DmimisTH.js} +129 -126
- package/dist/index-DmimisTH.js.map +1 -0
- package/dist/index-TLVquOE0.cjs +2 -0
- package/dist/index-TLVquOE0.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/CustomTypingIndicator/index.tsx +29 -19
- package/dist/index-CBtOPvxW.cjs +0 -2
- package/dist/index-CBtOPvxW.cjs.map +0 -1
- package/dist/index-D7eRkXoG.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
|
|
|
2
2
|
import $, { createContext as Ge, useContext as Te, useCallback as W, useState as P, useRef as H, useEffect as Y, useId as En, useMemo as ee, Suspense as He } from "react";
|
|
3
3
|
import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { Chat as In, DateSeparator as Tn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Dn, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as $n, ReminderNotification as Fn, StreamedMessageText as Bn, messageHasAttachments as Un, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Tt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as pe, 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 Le, AIStates as De, 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 Fe, DotsThreeIcon as ds, SpinnerGapIcon as Ce, SignOutIcon as us, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as ms, SpeakerHighIcon as hs, VideoCameraIcon as Gt, FileMdIcon as fs, FileTextIcon as gs, FileZipIcon as bs, FilePptIcon as ps, FileCsvIcon as vs, FileXlsIcon as xs, FileDocIcon as ws, FilePdfIcon as
|
|
5
|
+
import { StarIcon as Fe, DotsThreeIcon as ds, SpinnerGapIcon as Ce, SignOutIcon as us, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as ms, SpeakerHighIcon as hs, VideoCameraIcon as Gt, FileMdIcon as fs, FileTextIcon as gs, FileZipIcon as bs, FilePptIcon as ps, FileCsvIcon as vs, FileXlsIcon as xs, FileDocIcon as ws, FilePdfIcon as _s, CircleNotchIcon as ge, PlayIcon as Be, PauseIcon as Ns, LinkIcon as ys, DownloadSimpleIcon as be, GiftIcon as Cs, ThumbsUpIcon as ks, ThumbsDownIcon as Es, TrashSimpleIcon as Ss, XIcon as Ae, ArrowUpIcon as Is, SparkleIcon as Ue, ProhibitIcon as Ts, ArrowLeftIcon as Mt, PencilSimpleIcon as As, CaretLeftIcon as Ms, CaretRightIcon as Rs } from "@phosphor-icons/react";
|
|
6
6
|
import y from "classnames";
|
|
7
7
|
import { MessageActions as Ls, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
|
|
8
8
|
import { LinkPreviewsManager as Rt } from "stream-chat";
|
|
@@ -36,7 +36,7 @@ const Yt = Ge({
|
|
|
36
36
|
serviceConfig: !!s,
|
|
37
37
|
capabilities: Object.keys(r)
|
|
38
38
|
});
|
|
39
|
-
const [l, d] = P(null), [m, b] = P(null), [u, f] = P(!1), [c, g] = P(!1), [p, v] = P(null),
|
|
39
|
+
const [l, d] = P(null), [m, b] = P(null), [u, f] = P(!1), [c, g] = P(!1), [p, v] = P(null), _ = H(!1), x = H({
|
|
40
40
|
userId: t == null ? void 0 : t.id,
|
|
41
41
|
apiKey: a,
|
|
42
42
|
serviceConfig: s,
|
|
@@ -97,23 +97,23 @@ const Yt = Ge({
|
|
|
97
97
|
}, [a, s, i, o]);
|
|
98
98
|
const E = H(null);
|
|
99
99
|
Y(() => {
|
|
100
|
-
var T,
|
|
100
|
+
var T, N;
|
|
101
101
|
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
102
102
|
hasService: !!l,
|
|
103
103
|
hasUser: !!t,
|
|
104
104
|
userId: t == null ? void 0 : t.id,
|
|
105
|
-
isConnecting:
|
|
105
|
+
isConnecting: _.current,
|
|
106
106
|
isConnected: u,
|
|
107
107
|
dependencies: { service: !!l, userId: t == null ? void 0 : t.id }
|
|
108
108
|
}), !l || !t) {
|
|
109
109
|
o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
if (
|
|
112
|
+
if (_.current) {
|
|
113
113
|
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
if (((T = E.current) == null ? void 0 : T.serviceId) === l && ((
|
|
116
|
+
if (((T = E.current) == null ? void 0 : T.serviceId) === l && ((N = E.current) == null ? void 0 : N.userId) === t.id) {
|
|
117
117
|
o(
|
|
118
118
|
"⚠️ USER CONNECTION SKIPPED",
|
|
119
119
|
"Already connected this user with this service"
|
|
@@ -121,7 +121,7 @@ const Yt = Ge({
|
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
(async () => {
|
|
124
|
-
o("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
124
|
+
o("🚀 STARTING USER CONNECTION", { userId: t.id }), _.current = !0, g(!0), v(null);
|
|
125
125
|
try {
|
|
126
126
|
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
127
127
|
const I = await l.connectUser(t);
|
|
@@ -136,7 +136,7 @@ const Yt = Ge({
|
|
|
136
136
|
error: R
|
|
137
137
|
});
|
|
138
138
|
} finally {
|
|
139
|
-
g(!1),
|
|
139
|
+
g(!1), _.current = !1, o("🔄 USER CONNECTION FINISHED", {
|
|
140
140
|
userId: t.id,
|
|
141
141
|
isConnected: u
|
|
142
142
|
});
|
|
@@ -375,7 +375,7 @@ const ae = ({
|
|
|
375
375
|
logLabel: b = "useChannelModerationActions"
|
|
376
376
|
}) => {
|
|
377
377
|
var F;
|
|
378
|
-
const { service: u, debug: f } = qe(), c = (F = t == null ? void 0 : t.user) == null ? void 0 : F.id, g = !!(a && s && u && c), [p, v] = P(!1), [
|
|
378
|
+
const { service: u, debug: f } = qe(), c = (F = t == null ? void 0 : t.user) == null ? void 0 : F.id, g = !!(a && s && u && c), [p, v] = P(!1), [_, x] = P(null), [S, E] = P(!1), [M, D] = P(!1), k = g && ((_ == null ? void 0 : _.participantId) !== c || (_ == null ? void 0 : _.service) !== u);
|
|
379
379
|
return Y(() => {
|
|
380
380
|
if (!g || !u || !c) {
|
|
381
381
|
v(!1), x(null);
|
|
@@ -480,7 +480,7 @@ const ae = ({
|
|
|
480
480
|
triggerClassName: u
|
|
481
481
|
}) => {
|
|
482
482
|
const [f, c] = P(!1), g = H(null), p = En(), v = W(() => c(!1), []), {
|
|
483
|
-
isParticipantBlocked:
|
|
483
|
+
isParticipantBlocked: _,
|
|
484
484
|
isCheckingBlockedStatus: x,
|
|
485
485
|
isLeaving: S,
|
|
486
486
|
isUpdatingBlockStatus: E,
|
|
@@ -556,7 +556,7 @@ const ae = ({
|
|
|
556
556
|
/* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }),
|
|
557
557
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
558
558
|
] })
|
|
559
|
-
) :
|
|
559
|
+
) : _ ? /* @__PURE__ */ h(
|
|
560
560
|
he,
|
|
561
561
|
{
|
|
562
562
|
onClick: k,
|
|
@@ -630,7 +630,7 @@ function Xt({
|
|
|
630
630
|
const s = e == null ? void 0 : e.text, a = Gs(t);
|
|
631
631
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
632
632
|
}
|
|
633
|
-
const Hs = $.lazy(() => import("./Card-
|
|
633
|
+
const Hs = $.lazy(() => import("./Card-D-JLW3MJ.js")), Ys = $.lazy(() => import("./Card-D4cn0k04.js")), qs = $.lazy(() => import("./Card-BDWTAZYS.js")), We = () => /* @__PURE__ */ n(
|
|
634
634
|
"div",
|
|
635
635
|
{
|
|
636
636
|
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)]",
|
|
@@ -661,7 +661,7 @@ const Zs = {
|
|
|
661
661
|
image: ms,
|
|
662
662
|
document: Vt
|
|
663
663
|
}, Qs = {
|
|
664
|
-
pdf:
|
|
664
|
+
pdf: _s,
|
|
665
665
|
doc: ws,
|
|
666
666
|
xls: xs,
|
|
667
667
|
csv: vs,
|
|
@@ -693,7 +693,7 @@ const ta = (e) => {
|
|
|
693
693
|
muted: d = !1,
|
|
694
694
|
onContainerClick: m
|
|
695
695
|
}) => {
|
|
696
|
-
const b = ne(t), u = H(null), f = H(null), c = H(null), g = H(r), [p, v] = P(a), [
|
|
696
|
+
const b = ne(t), u = H(null), f = H(null), c = H(null), g = H(r), [p, v] = P(a), [_, x] = P(0), [S, E] = P(!1), [M, D] = P(!1), [k, T] = P(!1), [N, I] = P(!1), [R, F] = P(!0), [A, L] = P(null), z = W(() => {
|
|
697
697
|
T(!1), v(!0);
|
|
698
698
|
}, []), V = W((w) => {
|
|
699
699
|
const C = f.current;
|
|
@@ -739,7 +739,7 @@ const ta = (e) => {
|
|
|
739
739
|
window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", C);
|
|
740
740
|
};
|
|
741
741
|
}, [S, V, B]);
|
|
742
|
-
const X = A ? { aspectRatio: String(A) } : void 0, G = A ? "" : " aspect-video", O = Math.round(
|
|
742
|
+
const X = A ? { aspectRatio: String(A) } : void 0, G = A ? "" : " aspect-video", O = Math.round(_ * 100);
|
|
743
743
|
return /* @__PURE__ */ h(
|
|
744
744
|
"div",
|
|
745
745
|
{
|
|
@@ -820,7 +820,7 @@ const ta = (e) => {
|
|
|
820
820
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
821
821
|
}
|
|
822
822
|
) }),
|
|
823
|
-
|
|
823
|
+
N && !k && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
824
824
|
ge,
|
|
825
825
|
{
|
|
826
826
|
className: "size-8 animate-spin text-white/80",
|
|
@@ -858,7 +858,7 @@ const ta = (e) => {
|
|
|
858
858
|
onTouchStart: U,
|
|
859
859
|
onClick: (w) => w.stopPropagation(),
|
|
860
860
|
onKeyDown: (w) => {
|
|
861
|
-
w.key === "ArrowRight" && B(Math.min(1,
|
|
861
|
+
w.key === "ArrowRight" && B(Math.min(1, _ + 0.05)), w.key === "ArrowLeft" && B(Math.max(0, _ - 0.05));
|
|
862
862
|
},
|
|
863
863
|
children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
|
|
864
864
|
"div",
|
|
@@ -879,7 +879,7 @@ const ta = (e) => {
|
|
|
879
879
|
},
|
|
880
880
|
className: "shrink-0 text-white",
|
|
881
881
|
"aria-label": p ? "Pause" : "Play",
|
|
882
|
-
children: p ? /* @__PURE__ */ n(
|
|
882
|
+
children: p ? /* @__PURE__ */ n(Ns, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
|
|
883
883
|
}
|
|
884
884
|
),
|
|
885
885
|
/* @__PURE__ */ h(
|
|
@@ -899,7 +899,7 @@ const ta = (e) => {
|
|
|
899
899
|
onMouseEnter: () => D(!0),
|
|
900
900
|
onMouseLeave: () => D(!1),
|
|
901
901
|
onKeyDown: (w) => {
|
|
902
|
-
w.key === "ArrowRight" && B(Math.min(1,
|
|
902
|
+
w.key === "ArrowRight" && B(Math.min(1, _ + 0.05)), w.key === "ArrowLeft" && B(Math.max(0, _ - 0.05));
|
|
903
903
|
},
|
|
904
904
|
children: [
|
|
905
905
|
/* @__PURE__ */ n(
|
|
@@ -1291,14 +1291,14 @@ const sn = ({
|
|
|
1291
1291
|
return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
|
|
1292
1292
|
const s = Ze(e);
|
|
1293
1293
|
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1294
|
-
},
|
|
1294
|
+
}, _i = Object.assign(ua, {
|
|
1295
1295
|
Creator: ma,
|
|
1296
1296
|
Visitor: ha
|
|
1297
1297
|
}), fa = {
|
|
1298
1298
|
isUnlocking: () => !1
|
|
1299
1299
|
}, ga = {
|
|
1300
1300
|
LockedAttachment: fa
|
|
1301
|
-
}, rn = Ge({}),
|
|
1301
|
+
}, rn = Ge({}), Ni = rn.Provider;
|
|
1302
1302
|
function ba(e) {
|
|
1303
1303
|
return Te(rn)[e] ?? ga[e];
|
|
1304
1304
|
}
|
|
@@ -1331,7 +1331,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1331
1331
|
}, wa = (e) => {
|
|
1332
1332
|
var t;
|
|
1333
1333
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
1334
|
-
}, on = (e) => va(e) || xa(e),
|
|
1334
|
+
}, on = (e) => va(e) || xa(e), _a = (e) => {
|
|
1335
1335
|
var t;
|
|
1336
1336
|
return on(e) && !((t = e.text) != null && t.trim());
|
|
1337
1337
|
}, Pe = ({
|
|
@@ -1365,7 +1365,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1365
1365
|
b,
|
|
1366
1366
|
m
|
|
1367
1367
|
] }) });
|
|
1368
|
-
},
|
|
1368
|
+
}, Na = ({
|
|
1369
1369
|
selected: e,
|
|
1370
1370
|
onVoteUp: t,
|
|
1371
1371
|
onVoteDown: s
|
|
@@ -1399,7 +1399,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1399
1399
|
}
|
|
1400
1400
|
)
|
|
1401
1401
|
] }), ya = (e) => {
|
|
1402
|
-
var ht, ft, gt, bt, pt, vt, xt, wt,
|
|
1402
|
+
var ht, ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et;
|
|
1403
1403
|
const {
|
|
1404
1404
|
additionalMessageInputProps: t,
|
|
1405
1405
|
chatbotVotingEnabled: s,
|
|
@@ -1417,7 +1417,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1417
1417
|
renderText: g,
|
|
1418
1418
|
threadList: p,
|
|
1419
1419
|
viewerLanguage: v
|
|
1420
|
-
} = e, { client:
|
|
1420
|
+
} = e, { client: _ } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: S, onUnlockClick: E, onFetchSource: M, onDownloadClick: D } = ba("LockedAttachment"), [k, T] = P(!1), N = Mn(c.id), { selected: I, voteUp: R, voteDown: F } = Vs(c), {
|
|
1421
1421
|
Attachment: A = Rn,
|
|
1422
1422
|
EditMessageModal: L = Ln,
|
|
1423
1423
|
MessageActions: z,
|
|
@@ -1429,7 +1429,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1429
1429
|
ReminderNotification: O = Fn,
|
|
1430
1430
|
StreamedMessageText: w = Bn,
|
|
1431
1431
|
PinIndicator: C
|
|
1432
|
-
} = Ut("CustomMessage"), j = Un(c), q = jn(c),
|
|
1432
|
+
} = Ut("CustomMessage"), j = Un(c), q = jn(c), Ne = ee(
|
|
1433
1433
|
() => u == null ? void 0 : u(c),
|
|
1434
1434
|
[u, c]
|
|
1435
1435
|
), K = ee(() => {
|
|
@@ -1467,7 +1467,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1467
1467
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1468
1468
|
"str-chat__virtual-message__wrapper--group": o
|
|
1469
1469
|
}
|
|
1470
|
-
), ct = c.poll_id &&
|
|
1470
|
+
), ct = c.poll_id && _.polls.fromState(c.poll_id), dt = _a(c), ue = ke(c), ut = wa(c), Re = !!(K != null && K.length && !c.quoted_message), mt = ue && de && Re;
|
|
1471
1471
|
return /* @__PURE__ */ h(te, { children: [
|
|
1472
1472
|
a && /* @__PURE__ */ n(
|
|
1473
1473
|
L,
|
|
@@ -1490,7 +1490,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1490
1490
|
"data-message-id": c.id,
|
|
1491
1491
|
children: [
|
|
1492
1492
|
C && /* @__PURE__ */ n(C, {}),
|
|
1493
|
-
!!
|
|
1493
|
+
!!N && /* @__PURE__ */ n(O, { reminder: N }),
|
|
1494
1494
|
c.user && /* @__PURE__ */ n(
|
|
1495
1495
|
ae,
|
|
1496
1496
|
{
|
|
@@ -1540,8 +1540,8 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1540
1540
|
/* @__PURE__ */ n(
|
|
1541
1541
|
Ot.Received,
|
|
1542
1542
|
{
|
|
1543
|
-
title: (
|
|
1544
|
-
mimeType: (
|
|
1543
|
+
title: (_t = c.metadata) == null ? void 0 : _t.attachment_title,
|
|
1544
|
+
mimeType: (Nt = c.metadata) == null ? void 0 : Nt.attachment_mime_type,
|
|
1545
1545
|
thumbnailUrl: (yt = c.metadata) == null ? void 0 : yt.attachment_thumbnail,
|
|
1546
1546
|
amountText: (Ct = c.metadata) == null ? void 0 : Ct.amount_text,
|
|
1547
1547
|
detail: (kt = c.metadata) == null ? void 0 : kt.attachment_detail,
|
|
@@ -1581,7 +1581,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1581
1581
|
attachments: K
|
|
1582
1582
|
}
|
|
1583
1583
|
) : null,
|
|
1584
|
-
|
|
1584
|
+
Ne ? /* @__PURE__ */ n(
|
|
1585
1585
|
w,
|
|
1586
1586
|
{
|
|
1587
1587
|
message: re,
|
|
@@ -1608,7 +1608,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1608
1608
|
}
|
|
1609
1609
|
),
|
|
1610
1610
|
s && ue && /* @__PURE__ */ n(
|
|
1611
|
-
|
|
1611
|
+
Na,
|
|
1612
1612
|
{
|
|
1613
1613
|
selected: I,
|
|
1614
1614
|
onVoteUp: R,
|
|
@@ -1915,7 +1915,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1915
1915
|
] }),
|
|
1916
1916
|
!t && /* @__PURE__ */ n(Le, { message: e.message })
|
|
1917
1917
|
] });
|
|
1918
|
-
}, cn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "
|
|
1918
|
+
}, cn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
1919
1919
|
"animateTransform",
|
|
1920
1920
|
{
|
|
1921
1921
|
attributeName: "transform",
|
|
@@ -1947,14 +1947,14 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1947
1947
|
if ((s == null ? void 0 : s.typing_events) === !1)
|
|
1948
1948
|
return null;
|
|
1949
1949
|
const m = e ? [] : Object.values(i).filter(
|
|
1950
|
-
({ parent_id: v, user:
|
|
1950
|
+
({ parent_id: v, user: _ }) => {
|
|
1951
1951
|
var x;
|
|
1952
|
-
return (
|
|
1952
|
+
return (_ == null ? void 0 : _.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
|
|
1953
1953
|
}
|
|
1954
1954
|
), b = e ? Object.values(i).filter(
|
|
1955
|
-
({ parent_id: v, user:
|
|
1955
|
+
({ parent_id: v, user: _ }) => {
|
|
1956
1956
|
var x;
|
|
1957
|
-
return (
|
|
1957
|
+
return (_ == null ? void 0 : _.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (a == null ? void 0 : a.id);
|
|
1958
1958
|
}
|
|
1959
1959
|
) : [], u = e ? b : m;
|
|
1960
1960
|
if (!u.length)
|
|
@@ -1974,31 +1974,34 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1974
1974
|
avatarName: t,
|
|
1975
1975
|
avatarImage: s,
|
|
1976
1976
|
testId: a
|
|
1977
|
-
}) => /* @__PURE__ */
|
|
1977
|
+
}) => /* @__PURE__ */ n(
|
|
1978
1978
|
"div",
|
|
1979
1979
|
{
|
|
1980
|
-
className: "str-chat__typing-indicator !
|
|
1980
|
+
className: "str-chat__li str-chat__li--single str-chat__typing-indicator !static",
|
|
1981
1981
|
"data-testid": a,
|
|
1982
|
-
style: {
|
|
1983
|
-
|
|
1984
|
-
|
|
1982
|
+
style: {
|
|
1983
|
+
marginBottom: "var(--messaging-channel-input-spacer-height, 80px)"
|
|
1984
|
+
},
|
|
1985
|
+
children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
|
|
1986
|
+
/* @__PURE__ */ n(
|
|
1985
1987
|
ae,
|
|
1986
1988
|
{
|
|
1989
|
+
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1987
1990
|
id: e,
|
|
1988
1991
|
name: t,
|
|
1989
1992
|
image: s ?? void 0,
|
|
1990
1993
|
size: 24,
|
|
1991
1994
|
shape: "circle"
|
|
1992
1995
|
}
|
|
1993
|
-
)
|
|
1994
|
-
/* @__PURE__ */ n("div", { className: "
|
|
1996
|
+
),
|
|
1997
|
+
/* @__PURE__ */ n("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ n("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ h(
|
|
1995
1998
|
"svg",
|
|
1996
1999
|
{
|
|
1997
2000
|
"aria-hidden": "true",
|
|
1998
|
-
className: "block overflow-visible
|
|
1999
|
-
viewBox: "0 0 32
|
|
2001
|
+
className: "block overflow-visible",
|
|
2002
|
+
viewBox: "0 0 32 12.3",
|
|
2000
2003
|
width: "32",
|
|
2001
|
-
height: "
|
|
2004
|
+
height: "13",
|
|
2002
2005
|
overflow: "visible",
|
|
2003
2006
|
children: [
|
|
2004
2007
|
/* @__PURE__ */ n(ze, { cx: "4", index: 0 }),
|
|
@@ -2006,8 +2009,8 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
2006
2009
|
/* @__PURE__ */ n(ze, { cx: "28", index: 2 })
|
|
2007
2010
|
]
|
|
2008
2011
|
}
|
|
2009
|
-
) })
|
|
2010
|
-
]
|
|
2012
|
+
) }) }) }) }) })
|
|
2013
|
+
] })
|
|
2011
2014
|
}
|
|
2012
2015
|
);
|
|
2013
2016
|
function Ya(e, t) {
|
|
@@ -2086,20 +2089,20 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2086
2089
|
var E, M, D, k, T;
|
|
2087
2090
|
const { channel: g } = ce(), p = $.useMemo(() => {
|
|
2088
2091
|
var R, F;
|
|
2089
|
-
const
|
|
2090
|
-
return
|
|
2092
|
+
const N = (R = g._client) == null ? void 0 : R.userID;
|
|
2093
|
+
return N ? Object.values(((F = g.state) == null ? void 0 : F.members) || {}).find(
|
|
2091
2094
|
(A) => {
|
|
2092
2095
|
var L;
|
|
2093
|
-
return ((L = A.user) == null ? void 0 : L.id) && A.user.id !==
|
|
2096
|
+
return ((L = A.user) == null ? void 0 : L.id) && A.user.id !== N;
|
|
2094
2097
|
}
|
|
2095
2098
|
) : void 0;
|
|
2096
|
-
}, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user),
|
|
2099
|
+
}, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), _ = (D = p == null ? void 0 : p.user) == null ? void 0 : D.image, x = qt(g), S = async () => {
|
|
2097
2100
|
try {
|
|
2098
2101
|
x ? await g.unpin() : await g.pin();
|
|
2099
|
-
} catch (
|
|
2102
|
+
} catch (N) {
|
|
2100
2103
|
console.error(
|
|
2101
2104
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
2102
|
-
|
|
2105
|
+
N
|
|
2103
2106
|
);
|
|
2104
2107
|
}
|
|
2105
2108
|
};
|
|
@@ -2125,7 +2128,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2125
2128
|
{
|
|
2126
2129
|
id: ((k = p == null ? void 0 : p.user) == null ? void 0 : k.id) || g.id || "unknown",
|
|
2127
2130
|
name: v,
|
|
2128
|
-
image:
|
|
2131
|
+
image: _,
|
|
2129
2132
|
starred: s && x,
|
|
2130
2133
|
dmAgentEnabled: a,
|
|
2131
2134
|
size: 48
|
|
@@ -2196,7 +2199,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2196
2199
|
{
|
|
2197
2200
|
id: ((T = p == null ? void 0 : p.user) == null ? void 0 : T.id) || g.id || "unknown",
|
|
2198
2201
|
name: v,
|
|
2199
|
-
image:
|
|
2202
|
+
image: _,
|
|
2200
2203
|
starred: s && x,
|
|
2201
2204
|
dmAgentEnabled: a,
|
|
2202
2205
|
size: 48
|
|
@@ -2268,7 +2271,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2268
2271
|
composerDisabledReason: g,
|
|
2269
2272
|
showStarButton: p = !1,
|
|
2270
2273
|
chatbotVotingEnabled: v = !1,
|
|
2271
|
-
renderChannelBanner:
|
|
2274
|
+
renderChannelBanner: _,
|
|
2272
2275
|
customChannelActions: x,
|
|
2273
2276
|
renderMessage: S,
|
|
2274
2277
|
dmAgentEnabled: E = !1,
|
|
@@ -2285,14 +2288,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2285
2288
|
return ((q = j.user) == null ? void 0 : q.id) && j.user.id !== G;
|
|
2286
2289
|
}
|
|
2287
2290
|
) : void 0;
|
|
2288
|
-
}, [(L = k._client) == null ? void 0 : L.userID, (z = k.state) == null ? void 0 : z.members]),
|
|
2291
|
+
}, [(L = k._client) == null ? void 0 : L.userID, (z = k.state) == null ? void 0 : z.members]), N = $.useMemo(() => {
|
|
2289
2292
|
var w, C;
|
|
2290
2293
|
const G = (w = k._client) == null ? void 0 : w.userID;
|
|
2291
2294
|
return G ? Object.values(((C = k.state) == null ? void 0 : C.members) || {}).find((j) => {
|
|
2292
2295
|
var q;
|
|
2293
2296
|
return ((q = j.user) == null ? void 0 : q.id) === G;
|
|
2294
2297
|
}) : void 0;
|
|
2295
|
-
}, [(V = k._client) == null ? void 0 : V.userID, (B = k.state) == null ? void 0 : B.members]), I = ((U =
|
|
2298
|
+
}, [(V = k._client) == null ? void 0 : V.userID, (B = k.state) == null ? void 0 : B.members]), I = ((U = N == null ? void 0 : N.user) == null ? void 0 : U.is_account) ?? (N == null ? void 0 : N.is_account), R = ((X = T == null ? void 0 : T.user) == null ? void 0 : X.is_account) ?? (T == null ? void 0 : T.is_account), F = E && I === !1 && R === !0, A = W(
|
|
2296
2299
|
(G) => {
|
|
2297
2300
|
const { message: O } = pe("ChannelView"), w = /* @__PURE__ */ n(
|
|
2298
2301
|
ka,
|
|
@@ -2333,7 +2336,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2333
2336
|
customChannelActions: x
|
|
2334
2337
|
}
|
|
2335
2338
|
) }, "lt-channel-header"),
|
|
2336
|
-
|
|
2339
|
+
_ ? /* @__PURE__ */ n($.Fragment, { children: _() }, "lt-channel-banner") : null,
|
|
2337
2340
|
/* @__PURE__ */ n(
|
|
2338
2341
|
"div",
|
|
2339
2342
|
{
|
|
@@ -2377,7 +2380,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2377
2380
|
showBlockParticipant: g = !0,
|
|
2378
2381
|
showReportParticipant: p = !0,
|
|
2379
2382
|
composerDisabled: v = !1,
|
|
2380
|
-
composerDisabledReason:
|
|
2383
|
+
composerDisabledReason: _,
|
|
2381
2384
|
dmAgentEnabled: x,
|
|
2382
2385
|
messageMetadata: S,
|
|
2383
2386
|
onMessageSent: E,
|
|
@@ -2385,7 +2388,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2385
2388
|
chatbotVotingEnabled: D = !1,
|
|
2386
2389
|
renderChannelBanner: k,
|
|
2387
2390
|
customChannelActions: T,
|
|
2388
|
-
renderMessage:
|
|
2391
|
+
renderMessage: N,
|
|
2389
2392
|
onMessageLinkClick: I,
|
|
2390
2393
|
sendButton: R,
|
|
2391
2394
|
attachmentPreviewList: F,
|
|
@@ -2419,7 +2422,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2419
2422
|
const U = (X) => {
|
|
2420
2423
|
const G = X.target, O = G == null ? void 0 : G.closest("a[href]"), w = O == null ? void 0 : O.getAttribute("href");
|
|
2421
2424
|
if (!w) return;
|
|
2422
|
-
const C = O == null ? void 0 : O.closest("[data-message-id]"), j = C == null ? void 0 : C.getAttribute("data-message-id"), q = j ? e.state.messages.find((
|
|
2425
|
+
const C = O == null ? void 0 : O.closest("[data-message-id]"), j = C == null ? void 0 : C.getAttribute("data-message-id"), q = j ? e.state.messages.find((Ne) => Ne.id === j) : void 0;
|
|
2423
2426
|
I(w, q);
|
|
2424
2427
|
};
|
|
2425
2428
|
return B.addEventListener("click", U), () => B.removeEventListener("click", U);
|
|
@@ -2461,13 +2464,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2461
2464
|
showBlockParticipant: g,
|
|
2462
2465
|
showReportParticipant: p,
|
|
2463
2466
|
composerDisabled: v,
|
|
2464
|
-
composerDisabledReason:
|
|
2467
|
+
composerDisabledReason: _,
|
|
2465
2468
|
showStarButton: M,
|
|
2466
2469
|
dmAgentEnabled: x,
|
|
2467
2470
|
chatbotVotingEnabled: D,
|
|
2468
2471
|
renderChannelBanner: k,
|
|
2469
2472
|
customChannelActions: T,
|
|
2470
|
-
renderMessage:
|
|
2473
|
+
renderMessage: N,
|
|
2471
2474
|
viewerLanguage: A,
|
|
2472
2475
|
showChannelInfo: L
|
|
2473
2476
|
}
|
|
@@ -2512,7 +2515,7 @@ const yi = ({
|
|
|
2512
2515
|
renderChannelBanner: g,
|
|
2513
2516
|
customChannelActions: p,
|
|
2514
2517
|
renderMessage: v,
|
|
2515
|
-
onMessageLinkClick:
|
|
2518
|
+
onMessageLinkClick: _,
|
|
2516
2519
|
showChannelInfo: x
|
|
2517
2520
|
}) => {
|
|
2518
2521
|
const {
|
|
@@ -2522,7 +2525,7 @@ const yi = ({
|
|
|
2522
2525
|
error: D,
|
|
2523
2526
|
refreshConnection: k,
|
|
2524
2527
|
service: T,
|
|
2525
|
-
debug:
|
|
2528
|
+
debug: N
|
|
2526
2529
|
} = Ds(), [I, R] = P(null), [F, A] = P(null), [L, z] = P(!1), { showDeleteConversation: V = !0 } = e, B = H(o);
|
|
2527
2530
|
B.current = o;
|
|
2528
2531
|
const U = H(a);
|
|
@@ -2543,7 +2546,7 @@ const yi = ({
|
|
|
2543
2546
|
(async () => {
|
|
2544
2547
|
var K, re;
|
|
2545
2548
|
try {
|
|
2546
|
-
|
|
2549
|
+
N && console.log(
|
|
2547
2550
|
"[MessagingShell] Loading initial conversation with:",
|
|
2548
2551
|
i
|
|
2549
2552
|
);
|
|
@@ -2556,7 +2559,7 @@ const yi = ({
|
|
|
2556
2559
|
{ limit: 1 }
|
|
2557
2560
|
);
|
|
2558
2561
|
if (J.length > 0) {
|
|
2559
|
-
R(J[0]), A(null), (K = U.current) == null || K.call(U, J[0]),
|
|
2562
|
+
R(J[0]), A(null), (K = U.current) == null || K.call(U, J[0]), N && console.log(
|
|
2560
2563
|
"[MessagingShell] Initial conversation loaded:",
|
|
2561
2564
|
J[0].id
|
|
2562
2565
|
);
|
|
@@ -2564,7 +2567,7 @@ const yi = ({
|
|
|
2564
2567
|
}
|
|
2565
2568
|
const se = B.current;
|
|
2566
2569
|
if (!se || !T) {
|
|
2567
|
-
q(), A("No conversation found with this account"),
|
|
2570
|
+
q(), A("No conversation found with this account"), N && console.log(
|
|
2568
2571
|
"[MessagingShell] No conversation found for:",
|
|
2569
2572
|
i
|
|
2570
2573
|
);
|
|
@@ -2576,7 +2579,7 @@ const yi = ({
|
|
|
2576
2579
|
name: se.name,
|
|
2577
2580
|
phone: se.phone
|
|
2578
2581
|
});
|
|
2579
|
-
R(Q), A(null), (re = U.current) == null || re.call(U, Q),
|
|
2582
|
+
R(Q), A(null), (re = U.current) == null || re.call(U, Q), N && console.log(
|
|
2580
2583
|
"[MessagingShell] Channel created and loaded:",
|
|
2581
2584
|
Q.id
|
|
2582
2585
|
);
|
|
@@ -2593,7 +2596,7 @@ const yi = ({
|
|
|
2593
2596
|
), q(), G.current || A("Failed to load conversation");
|
|
2594
2597
|
}
|
|
2595
2598
|
})();
|
|
2596
|
-
}, [i, S, E, T,
|
|
2599
|
+
}, [i, S, E, T, N]);
|
|
2597
2600
|
const O = H(r);
|
|
2598
2601
|
O.current = r;
|
|
2599
2602
|
const w = W(() => {
|
|
@@ -2625,7 +2628,7 @@ const yi = ({
|
|
|
2625
2628
|
viewerLanguage: c,
|
|
2626
2629
|
customChannelActions: p,
|
|
2627
2630
|
renderMessage: v,
|
|
2628
|
-
onMessageLinkClick:
|
|
2631
|
+
onMessageLinkClick: _,
|
|
2629
2632
|
showChannelInfo: x
|
|
2630
2633
|
},
|
|
2631
2634
|
I.id
|
|
@@ -2676,40 +2679,40 @@ const un = $.createContext({
|
|
|
2676
2679
|
viewerLanguage: o
|
|
2677
2680
|
} = Qa(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
|
|
2678
2681
|
e && a(e);
|
|
2679
|
-
}, m = (
|
|
2680
|
-
const I =
|
|
2681
|
-
!I || R || (
|
|
2682
|
+
}, m = (N) => {
|
|
2683
|
+
const I = N.key === "Enter" || N.key === " ", R = N.repeat;
|
|
2684
|
+
!I || R || (N.preventDefault(), d());
|
|
2682
2685
|
}, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
|
|
2683
|
-
(
|
|
2686
|
+
(N) => {
|
|
2684
2687
|
var I, R;
|
|
2685
|
-
return ((I =
|
|
2688
|
+
return ((I = N.user) == null ? void 0 : I.id) && N.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
|
|
2686
2689
|
}
|
|
2687
2690
|
), f = Wt(u == null ? void 0 : u.user), c = (k = u == null ? void 0 : u.user) == null ? void 0 : k.image, g = (() => {
|
|
2688
2691
|
var I;
|
|
2689
|
-
const
|
|
2690
|
-
if (
|
|
2691
|
-
for (let R =
|
|
2692
|
-
if (
|
|
2692
|
+
const N = (I = e == null ? void 0 : e.state) == null ? void 0 : I.messages;
|
|
2693
|
+
if (N != null && N.length) {
|
|
2694
|
+
for (let R = N.length - 1; R >= 0; R--)
|
|
2695
|
+
if (N[R].type !== "system") return N[R];
|
|
2693
2696
|
}
|
|
2694
2697
|
})(), v = (() => {
|
|
2695
2698
|
var L, z, V, B;
|
|
2696
|
-
const
|
|
2699
|
+
const N = Xt({
|
|
2697
2700
|
message: g,
|
|
2698
2701
|
viewerLanguage: o
|
|
2699
2702
|
});
|
|
2700
|
-
if (((L = g == null ? void 0 : g.metadata) == null ? void 0 : L.custom_type) === "MESSAGE_TIP") return
|
|
2701
|
-
if (((z = g == null ? void 0 : g.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_PAID") return
|
|
2702
|
-
if (((V = g == null ? void 0 : g.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT") return
|
|
2703
|
-
if (
|
|
2703
|
+
if (((L = g == null ? void 0 : g.metadata) == null ? void 0 : L.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
|
|
2704
|
+
if (((z = g == null ? void 0 : g.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
|
|
2705
|
+
if (((V = g == null ? void 0 : g.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
|
|
2706
|
+
if (N) return N;
|
|
2704
2707
|
const A = (B = g == null ? void 0 : g.attachments) == null ? void 0 : B[0];
|
|
2705
2708
|
return A ? A.og_scrape_url ? A.og_scrape_url : A.type === "image" ? "📷 Sent an image" : A.type === "video" ? "🎥 Sent a video" : A.type === "audio" ? "🎵 Sent audio" : A.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2706
|
-
})(),
|
|
2709
|
+
})(), _ = g != null && g.created_at ? tr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, S = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = qt(e), M = t ?? 0;
|
|
2707
2710
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2708
2711
|
channelId: e == null ? void 0 : e.id,
|
|
2709
2712
|
isSelected: l,
|
|
2710
2713
|
participantName: f,
|
|
2711
2714
|
unreadCount: M,
|
|
2712
|
-
hasTimestamp: !!
|
|
2715
|
+
hasTimestamp: !!_
|
|
2713
2716
|
}), /* @__PURE__ */ n(
|
|
2714
2717
|
"div",
|
|
2715
2718
|
{
|
|
@@ -2749,7 +2752,7 @@ const un = $.createContext({
|
|
|
2749
2752
|
]
|
|
2750
2753
|
}
|
|
2751
2754
|
),
|
|
2752
|
-
|
|
2755
|
+
_ && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: _ })
|
|
2753
2756
|
] }),
|
|
2754
2757
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2755
2758
|
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
|
|
@@ -2897,7 +2900,7 @@ const ir = {
|
|
|
2897
2900
|
const v = y(
|
|
2898
2901
|
"truncate text-base font-medium leading-6",
|
|
2899
2902
|
d && !t ? cr : lr[e]
|
|
2900
|
-
),
|
|
2903
|
+
), _ = y(
|
|
2901
2904
|
"truncate text-xs leading-4",
|
|
2902
2905
|
dr[e]
|
|
2903
2906
|
);
|
|
@@ -2909,9 +2912,9 @@ const ir = {
|
|
|
2909
2912
|
i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
|
|
2910
2913
|
/* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
|
|
2911
2914
|
] }),
|
|
2912
|
-
u && /* @__PURE__ */ n("p", { className:
|
|
2915
|
+
u && /* @__PURE__ */ n("p", { className: _, children: a })
|
|
2913
2916
|
] }),
|
|
2914
|
-
!g && c && /* @__PURE__ */ n("p", { className:
|
|
2917
|
+
!g && c && /* @__PURE__ */ n("p", { className: _, children: f })
|
|
2915
2918
|
] }),
|
|
2916
2919
|
l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
|
|
2917
2920
|
] }),
|
|
@@ -3248,7 +3251,7 @@ const ir = {
|
|
|
3248
3251
|
}, xr = {
|
|
3249
3252
|
dark: "border-white/[0.08]",
|
|
3250
3253
|
light: "border-black/[0.08]"
|
|
3251
|
-
}, wr = (e) => e === "dark" ? "sender" : "receiver",
|
|
3254
|
+
}, wr = (e) => e === "dark" ? "sender" : "receiver", _r = {
|
|
3252
3255
|
sender: {
|
|
3253
3256
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
3254
3257
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -3270,7 +3273,7 @@ const ir = {
|
|
|
3270
3273
|
children: i,
|
|
3271
3274
|
"data-testid": o
|
|
3272
3275
|
}) => {
|
|
3273
|
-
const l = t != null && t !== "", d =
|
|
3276
|
+
const l = t != null && t !== "", d = _r[wr(e)][a];
|
|
3274
3277
|
return /* @__PURE__ */ h(
|
|
3275
3278
|
"div",
|
|
3276
3279
|
{
|
|
@@ -3335,7 +3338,7 @@ const ir = {
|
|
|
3335
3338
|
firstOfGroup: e,
|
|
3336
3339
|
endOfGroup: t,
|
|
3337
3340
|
groupedByUser: s
|
|
3338
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
3341
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Nr = ({
|
|
3339
3342
|
src: e,
|
|
3340
3343
|
mimeType: t,
|
|
3341
3344
|
filename: s,
|
|
@@ -3363,7 +3366,7 @@ const ir = {
|
|
|
3363
3366
|
preload: l,
|
|
3364
3367
|
onDismiss: d
|
|
3365
3368
|
}) => {
|
|
3366
|
-
const m = we(e), b = e === "composer" && !!d, u =
|
|
3369
|
+
const m = we(e), b = e === "composer" && !!d, u = Nr({ src: t, mimeType: s, filename: a, items: r });
|
|
3367
3370
|
if (u.length === 0)
|
|
3368
3371
|
return null;
|
|
3369
3372
|
const f = l ?? (u.length > 1 ? "none" : "metadata");
|
|
@@ -3569,10 +3572,10 @@ const Pr = ({
|
|
|
3569
3572
|
items: o
|
|
3570
3573
|
}), g = (v) => {
|
|
3571
3574
|
if ((m == null ? void 0 : m(v)) === !1) return;
|
|
3572
|
-
const
|
|
3573
|
-
if (!
|
|
3574
|
-
const x =
|
|
3575
|
-
gn(
|
|
3575
|
+
const _ = c[v];
|
|
3576
|
+
if (!_) return;
|
|
3577
|
+
const x = _.filename ?? Z(_.src);
|
|
3578
|
+
gn(_.src, x);
|
|
3576
3579
|
};
|
|
3577
3580
|
if (c.length === 0)
|
|
3578
3581
|
return null;
|
|
@@ -3594,16 +3597,16 @@ const Pr = ({
|
|
|
3594
3597
|
text: l,
|
|
3595
3598
|
groupPosition: d,
|
|
3596
3599
|
"data-testid": "file-attachment",
|
|
3597
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v,
|
|
3600
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, _) => /* @__PURE__ */ n(
|
|
3598
3601
|
Or,
|
|
3599
3602
|
{
|
|
3600
3603
|
variant: u,
|
|
3601
3604
|
item: v,
|
|
3602
|
-
index:
|
|
3605
|
+
index: _,
|
|
3603
3606
|
onActivate: g,
|
|
3604
|
-
trailingAction: f &&
|
|
3607
|
+
trailingAction: f && _ === 0 ? /* @__PURE__ */ n(xe, { onClick: b, variant: "inline" }) : p
|
|
3605
3608
|
},
|
|
3606
|
-
`${v.src}-${
|
|
3609
|
+
`${v.src}-${_}`
|
|
3607
3610
|
)) })
|
|
3608
3611
|
}
|
|
3609
3612
|
);
|
|
@@ -3963,7 +3966,7 @@ const Pr = ({
|
|
|
3963
3966
|
})
|
|
3964
3967
|
}
|
|
3965
3968
|
);
|
|
3966
|
-
},
|
|
3969
|
+
}, _e = (e) => {
|
|
3967
3970
|
const [t, s] = P(!1), [a, r] = P(0), i = W(
|
|
3968
3971
|
(l) => {
|
|
3969
3972
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
|
|
@@ -3995,7 +3998,7 @@ const Pr = ({
|
|
|
3995
3998
|
alt: s.alt,
|
|
3996
3999
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3997
4000
|
})), Gr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
3998
|
-
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } =
|
|
4001
|
+
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = _e(
|
|
3999
4002
|
r
|
|
4000
4003
|
);
|
|
4001
4004
|
return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
|
|
@@ -4041,13 +4044,13 @@ const Pr = ({
|
|
|
4041
4044
|
loading: l = "lazy",
|
|
4042
4045
|
onClick: d
|
|
4043
4046
|
}) => {
|
|
4044
|
-
const m = Vr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } =
|
|
4047
|
+
const m = Vr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = _e(
|
|
4045
4048
|
d
|
|
4046
4049
|
);
|
|
4047
4050
|
if (m.length === 0)
|
|
4048
4051
|
return null;
|
|
4049
4052
|
const p = m.map(
|
|
4050
|
-
(v,
|
|
4053
|
+
(v, _) => jr(v, _, m.length, l)
|
|
4051
4054
|
);
|
|
4052
4055
|
return /* @__PURE__ */ h(
|
|
4053
4056
|
ve,
|
|
@@ -4164,12 +4167,12 @@ const Pr = ({
|
|
|
4164
4167
|
onClick: d,
|
|
4165
4168
|
onDismiss: m
|
|
4166
4169
|
}) => {
|
|
4167
|
-
const b = we(e), u = Jr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } =
|
|
4170
|
+
const b = we(e), u = Jr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
|
|
4168
4171
|
d
|
|
4169
4172
|
), v = e === "composer" && !!m;
|
|
4170
4173
|
if (u.length === 0)
|
|
4171
4174
|
return null;
|
|
4172
|
-
const
|
|
4175
|
+
const _ = u.map((x) => ({
|
|
4173
4176
|
src: x.src,
|
|
4174
4177
|
filename: x.filename ?? Z(x.src)
|
|
4175
4178
|
}));
|
|
@@ -4208,7 +4211,7 @@ const Pr = ({
|
|
|
4208
4211
|
Xr,
|
|
4209
4212
|
{
|
|
4210
4213
|
open: f,
|
|
4211
|
-
items:
|
|
4214
|
+
items: _,
|
|
4212
4215
|
initialIndex: c,
|
|
4213
4216
|
onClose: p
|
|
4214
4217
|
}
|
|
@@ -4220,7 +4223,7 @@ const Pr = ({
|
|
|
4220
4223
|
Composer: Qr,
|
|
4221
4224
|
Sent: ei,
|
|
4222
4225
|
Received: ti
|
|
4223
|
-
},
|
|
4226
|
+
}, _n = ({
|
|
4224
4227
|
open: e,
|
|
4225
4228
|
items: t,
|
|
4226
4229
|
initialIndex: s = 0,
|
|
@@ -4270,7 +4273,7 @@ const Pr = ({
|
|
|
4270
4273
|
]
|
|
4271
4274
|
}
|
|
4272
4275
|
) : null;
|
|
4273
|
-
}, si = () => /* @__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 }) }) }),
|
|
4276
|
+
}, si = () => /* @__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 }) }) }), Nn = ({
|
|
4274
4277
|
item: e,
|
|
4275
4278
|
index: t
|
|
4276
4279
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4295,7 +4298,7 @@ const Pr = ({
|
|
|
4295
4298
|
/* @__PURE__ */ n(si, {})
|
|
4296
4299
|
] }), ai = (e, t, s) => ({
|
|
4297
4300
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4298
|
-
content: /* @__PURE__ */ n(
|
|
4301
|
+
content: /* @__PURE__ */ n(Nn, { item: e, index: t })
|
|
4299
4302
|
}), ri = ({
|
|
4300
4303
|
src: e,
|
|
4301
4304
|
poster: t,
|
|
@@ -4309,7 +4312,7 @@ const Pr = ({
|
|
|
4309
4312
|
preload: s.preload,
|
|
4310
4313
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4311
4314
|
})), ii = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
4312
|
-
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } =
|
|
4315
|
+
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = _e(
|
|
4313
4316
|
i
|
|
4314
4317
|
);
|
|
4315
4318
|
return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
|
|
@@ -4320,12 +4323,12 @@ const Pr = ({
|
|
|
4320
4323
|
onClick: () => m(0),
|
|
4321
4324
|
"aria-label": "Play video",
|
|
4322
4325
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
4323
|
-
children: /* @__PURE__ */ n(
|
|
4326
|
+
children: /* @__PURE__ */ n(Nn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
4324
4327
|
}
|
|
4325
4328
|
),
|
|
4326
4329
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
|
|
4327
4330
|
/* @__PURE__ */ n(
|
|
4328
|
-
|
|
4331
|
+
_n,
|
|
4329
4332
|
{
|
|
4330
4333
|
open: l,
|
|
4331
4334
|
items: yn(
|
|
@@ -4349,13 +4352,13 @@ const Pr = ({
|
|
|
4349
4352
|
preload: d,
|
|
4350
4353
|
onClick: m
|
|
4351
4354
|
}) => {
|
|
4352
|
-
const b = ri({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } =
|
|
4355
|
+
const b = ri({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
|
|
4353
4356
|
m
|
|
4354
4357
|
);
|
|
4355
4358
|
if (b.length === 0)
|
|
4356
4359
|
return null;
|
|
4357
4360
|
const v = b.map(
|
|
4358
|
-
(
|
|
4361
|
+
(_, x) => ai(_, x, b.length)
|
|
4359
4362
|
);
|
|
4360
4363
|
return /* @__PURE__ */ h(
|
|
4361
4364
|
ve,
|
|
@@ -4374,7 +4377,7 @@ const Pr = ({
|
|
|
4374
4377
|
}
|
|
4375
4378
|
) }),
|
|
4376
4379
|
/* @__PURE__ */ n(
|
|
4377
|
-
|
|
4380
|
+
_n,
|
|
4378
4381
|
{
|
|
4379
4382
|
open: f,
|
|
4380
4383
|
items: yn(b, r),
|
|
@@ -4466,17 +4469,17 @@ export {
|
|
|
4466
4469
|
Ds as D,
|
|
4467
4470
|
Si as F,
|
|
4468
4471
|
Ci as L,
|
|
4469
|
-
|
|
4472
|
+
_i as M,
|
|
4470
4473
|
he as a,
|
|
4471
4474
|
ae as b,
|
|
4472
4475
|
sr as c,
|
|
4473
4476
|
dn as d,
|
|
4474
|
-
|
|
4477
|
+
Ni as e,
|
|
4475
4478
|
ui as f,
|
|
4476
4479
|
ne as g,
|
|
4477
4480
|
Ot as h,
|
|
4478
4481
|
Ei as i,
|
|
4479
|
-
|
|
4482
|
+
Na as j,
|
|
4480
4483
|
wi as k,
|
|
4481
4484
|
yi as l,
|
|
4482
4485
|
Mr as m,
|
|
@@ -4494,4 +4497,4 @@ export {
|
|
|
4494
4497
|
Wt as y,
|
|
4495
4498
|
ba as z
|
|
4496
4499
|
};
|
|
4497
|
-
//# sourceMappingURL=index-
|
|
4500
|
+
//# sourceMappingURL=index-DmimisTH.js.map
|