@linktr.ee/messaging-react 3.1.0 → 3.1.2-rc-1780563075
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-Cq-cN9n1.cjs → Card-0J3_7gmN.cjs} +2 -2
- package/dist/{Card-Cq-cN9n1.cjs.map → Card-0J3_7gmN.cjs.map} +1 -1
- package/dist/{Card-BhO5jeP9.js → Card-CserQom-.js} +2 -2
- package/dist/{Card-BhO5jeP9.js.map → Card-CserQom-.js.map} +1 -1
- package/dist/{Card-NPXVehHb.cjs → Card-DI2viIxR.cjs} +2 -2
- package/dist/{Card-NPXVehHb.cjs.map → Card-DI2viIxR.cjs.map} +1 -1
- package/dist/{Card-BGOWR4lW.js → Card-DOcs__XO.js} +2 -2
- package/dist/{Card-BGOWR4lW.js.map → Card-DOcs__XO.js.map} +1 -1
- package/dist/{Card-CRJ4l5KM.cjs → Card-EqHFqs6U.cjs} +2 -2
- package/dist/{Card-CRJ4l5KM.cjs.map → Card-EqHFqs6U.cjs.map} +1 -1
- package/dist/{Card-BfvsO78k.js → Card-MDGTBRIk.js} +3 -3
- package/dist/{Card-BfvsO78k.js.map → Card-MDGTBRIk.js.map} +1 -1
- package/dist/{LockedThumbnail-B8MKBVXz.cjs → LockedThumbnail-CJTQSHKu.cjs} +2 -2
- package/dist/{LockedThumbnail-B8MKBVXz.cjs.map → LockedThumbnail-CJTQSHKu.cjs.map} +1 -1
- package/dist/{LockedThumbnail-Bu9jNPUi.js → LockedThumbnail-Cw7R8xmf.js} +2 -2
- package/dist/{LockedThumbnail-Bu9jNPUi.js.map → LockedThumbnail-Cw7R8xmf.js.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/index-Dy7wBqvi.cjs +2 -0
- package/dist/index-Dy7wBqvi.cjs.map +1 -0
- package/dist/{index-CJEl_fID.js → index-UtNoTrrb.js} +666 -665
- package/dist/index-UtNoTrrb.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -1
- package/src/components/Avatar/index.tsx +1 -4
- package/src/components/ChannelList/CustomChannelPreview.tsx +9 -11
- package/src/components/ChannelView.tsx +14 -15
- package/src/components/CustomMessage/index.tsx +1 -1
- package/src/components/CustomMessageInput/index.tsx +1 -1
- package/src/components/MessagingShell/MessagingShell.test.tsx +93 -0
- package/src/components/MessagingShell/index.tsx +46 -4
- package/src/providers/MessagingProvider.tsx +1 -1
- package/src/styles.css +53 -10
- package/dist/index-CJEl_fID.js.map +0 -1
- package/dist/index-D-5Igybf.cjs +0 -2
- package/dist/index-D-5Igybf.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as n, jsxs as h, Fragment as
|
|
2
|
-
import z, { createContext as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { Chat as
|
|
5
|
-
import { StarIcon as $e, XIcon as pe, SpinnerGapIcon as Le, SignOutIcon as
|
|
1
|
+
import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
|
|
2
|
+
import z, { createContext as Ge, useContext as Se, useCallback as q, useState as O, useRef as X, useEffect as J, useMemo as ne, Suspense as He } from "react";
|
|
3
|
+
import { StreamChatService as En } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { Chat as In, DateSeparator as Sn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as Tn, useMessageReminder as An, useComponentContext as Vt, Attachment as Mn, EditMessageModal as Dn, MessageBlocked as Rn, MessageBouncePrompt as Ln, MessageDeleted as Pn, MessageIsThreadReplyInChannelButtonIndicator as On, MessageRepliesCountButton as zn, ReminderNotification as Fn, StreamedMessageText as $n, messageHasAttachments as Bn, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Un, isMessageBounced as Gn, MessageBounceModal as Hn, MessageText as At, Poll as Yn, MessageErrorIcon as qn, useMessageContext as be, useMessageComposer as Wn, useStateStore as Xn, MessageInput as Kn, useMessageInputContext as Jn, useMessageComposerHasSendableData as Zn, AttachmentPreviewList as Qn, QuotedMessagePreview as es, TextareaComposer as ts, MessageTimestamp as De, AIStates as Re, useTypingContext as ns, useAIState as ss, Channel as as, WithComponents as rs, Window as is, MessageList as os, ChannelList as ls } from "stream-chat-react";
|
|
5
|
+
import { StarIcon as $e, XIcon as pe, SpinnerGapIcon as Le, SignOutIcon as cs, ProhibitInsetIcon as Mt, FlagIcon as Ut, FileIcon as Gt, ImageIcon as ds, SpeakerHighIcon as us, VideoCameraIcon as Ht, FileMdIcon as ms, FileTextIcon as hs, FileZipIcon as fs, FilePptIcon as gs, FileCsvIcon as bs, FileXlsIcon as ps, FileDocIcon as vs, FilePdfIcon as xs, CircleNotchIcon as fe, PlayIcon as Be, PauseIcon as ws, LinkIcon as Ns, DownloadSimpleIcon as ge, GiftIcon as _s, ThumbsUpIcon as ys, ThumbsDownIcon as Cs, TrashSimpleIcon as ks, ArrowUpIcon as Es, SparkleIcon as je, ProhibitIcon as Is, ArrowLeftIcon as Dt, DotsThreeIcon as Rt, PencilSimpleIcon as Ss, CaretLeftIcon as Ts, CaretRightIcon as As } from "@phosphor-icons/react";
|
|
6
6
|
import y from "classnames";
|
|
7
|
-
import { MessageActions as Ms, DefaultDropdownActionButton as
|
|
8
|
-
import { LinkPreviewsManager as
|
|
9
|
-
const
|
|
7
|
+
import { MessageActions as Ms, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
|
|
8
|
+
import { LinkPreviewsManager as Lt } from "stream-chat";
|
|
9
|
+
const qt = Ge({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const Wt = He({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}),
|
|
19
|
+
}), qe = () => Se(qt), xi = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -36,14 +36,14 @@ const Wt = He({
|
|
|
36
36
|
serviceConfig: !!s,
|
|
37
37
|
capabilities: Object.keys(r)
|
|
38
38
|
});
|
|
39
|
-
const [l, d] = O(null), [m, g] = O(null), [u, f] = O(!1), [c,
|
|
39
|
+
const [l, d] = O(null), [m, g] = O(null), [u, f] = O(!1), [c, p] = O(!1), [N, v] = O(null), x = X(!1), w = X({
|
|
40
40
|
userId: t == null ? void 0 : t.id,
|
|
41
41
|
apiKey: a,
|
|
42
42
|
serviceConfig: s,
|
|
43
43
|
capabilities: r
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
renderCount:
|
|
44
|
+
}), A = X(0);
|
|
45
|
+
A.current++, o("📊 RENDER INFO", {
|
|
46
|
+
renderCount: A.current,
|
|
47
47
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
48
48
|
propChanges: {
|
|
49
49
|
userChanged: w.current.userId !== (t == null ? void 0 : t.id),
|
|
@@ -57,7 +57,7 @@ const Wt = He({
|
|
|
57
57
|
serviceConfig: s,
|
|
58
58
|
capabilities: r
|
|
59
59
|
}, J(() => {
|
|
60
|
-
const I =
|
|
60
|
+
const I = A.current;
|
|
61
61
|
if (o("🔧 SERVICE INIT EFFECT TRIGGERED", {
|
|
62
62
|
renderCount: I,
|
|
63
63
|
apiKey: !!a,
|
|
@@ -80,7 +80,7 @@ const Wt = He({
|
|
|
80
80
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
81
81
|
serviceConfigChanged: w.current.serviceConfig !== s
|
|
82
82
|
});
|
|
83
|
-
const C = new
|
|
83
|
+
const C = new En({
|
|
84
84
|
...s,
|
|
85
85
|
apiKey: a,
|
|
86
86
|
debug: i
|
|
@@ -95,7 +95,7 @@ const Wt = He({
|
|
|
95
95
|
}), C.disconnectUser().catch(console.error);
|
|
96
96
|
};
|
|
97
97
|
}, [a, s, i, o]);
|
|
98
|
-
const
|
|
98
|
+
const T = X(null);
|
|
99
99
|
J(() => {
|
|
100
100
|
var C, k;
|
|
101
101
|
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
@@ -113,7 +113,7 @@ const Wt = He({
|
|
|
113
113
|
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
if (((C =
|
|
116
|
+
if (((C = T.current) == null ? void 0 : C.serviceId) === l && ((k = T.current) == null ? void 0 : k.userId) === t.id) {
|
|
117
117
|
o(
|
|
118
118
|
"⚠️ USER CONNECTION SKIPPED",
|
|
119
119
|
"Already connected this user with this service"
|
|
@@ -121,11 +121,11 @@ const Wt = He({
|
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
(async () => {
|
|
124
|
-
o("🚀 STARTING USER CONNECTION", { userId: t.id }), x.current = !0,
|
|
124
|
+
o("🚀 STARTING USER CONNECTION", { userId: t.id }), x.current = !0, p(!0), v(null);
|
|
125
125
|
try {
|
|
126
126
|
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
127
127
|
const E = await l.connectUser(t);
|
|
128
|
-
g(E), f(!0),
|
|
128
|
+
g(E), f(!0), T.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
129
129
|
userId: t.id,
|
|
130
130
|
clientId: E.userID
|
|
131
131
|
});
|
|
@@ -136,7 +136,7 @@ const Wt = He({
|
|
|
136
136
|
error: D
|
|
137
137
|
});
|
|
138
138
|
} finally {
|
|
139
|
-
|
|
139
|
+
p(!1), x.current = !1, o("🔄 USER CONNECTION FINISHED", {
|
|
140
140
|
userId: t.id,
|
|
141
141
|
isConnected: u
|
|
142
142
|
});
|
|
@@ -149,7 +149,7 @@ const Wt = He({
|
|
|
149
149
|
l && u ? (o(
|
|
150
150
|
"🧹 CLEANUP EFFECT TRIGGERED",
|
|
151
151
|
"Cleaning up connection on unmount"
|
|
152
|
-
),
|
|
152
|
+
), T.current = null, l.disconnectUser().catch(console.error)) : o("🔇 CLEANUP EFFECT SKIPPED", {
|
|
153
153
|
hasService: !!l,
|
|
154
154
|
isConnected: u
|
|
155
155
|
});
|
|
@@ -162,7 +162,7 @@ const Wt = He({
|
|
|
162
162
|
o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }),
|
|
165
|
+
o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), p(!0);
|
|
166
166
|
try {
|
|
167
167
|
o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
|
|
168
168
|
const I = await l.connectUser(t);
|
|
@@ -174,9 +174,9 @@ const Wt = He({
|
|
|
174
174
|
error: C
|
|
175
175
|
});
|
|
176
176
|
} finally {
|
|
177
|
-
|
|
177
|
+
p(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
178
178
|
}
|
|
179
|
-
}, [l, t, o]),
|
|
179
|
+
}, [l, t, o]), R = z.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
180
180
|
hasService: !!l,
|
|
181
181
|
hasClient: !!m,
|
|
182
182
|
isConnected: u,
|
|
@@ -204,20 +204,20 @@ const Wt = He({
|
|
|
204
204
|
o
|
|
205
205
|
]);
|
|
206
206
|
return o("🔄 RENDER END", {
|
|
207
|
-
renderCount:
|
|
207
|
+
renderCount: A.current,
|
|
208
208
|
willRenderChat: !!(m && u),
|
|
209
|
-
contextValueReady: !!
|
|
210
|
-
}), /* @__PURE__ */ n(
|
|
211
|
-
|
|
209
|
+
contextValueReady: !!R
|
|
210
|
+
}), /* @__PURE__ */ n(qt.Provider, { value: R, children: m && u ? /* @__PURE__ */ n(
|
|
211
|
+
In,
|
|
212
212
|
{
|
|
213
213
|
client: m,
|
|
214
214
|
customClasses: {
|
|
215
|
-
channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
|
|
215
|
+
channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A] p-4"
|
|
216
216
|
},
|
|
217
217
|
children: e
|
|
218
218
|
}
|
|
219
219
|
) : e });
|
|
220
|
-
}, Ds = () =>
|
|
220
|
+
}, Ds = () => qe(), Wt = (e) => {
|
|
221
221
|
var a, r;
|
|
222
222
|
const [t, s] = O(
|
|
223
223
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -243,14 +243,14 @@ const Wt = He({
|
|
|
243
243
|
function Ls(e) {
|
|
244
244
|
return Rs.test(e.trim());
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Pt(e, t) {
|
|
247
247
|
const s = e == null ? void 0 : e.trim();
|
|
248
248
|
return !s || t && s === t ? !1 : !Ls(s);
|
|
249
249
|
}
|
|
250
250
|
function Te(e) {
|
|
251
|
-
return
|
|
251
|
+
return Pt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Pt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
252
252
|
}
|
|
253
|
-
const
|
|
253
|
+
const Ot = [
|
|
254
254
|
"🍎",
|
|
255
255
|
// Apple
|
|
256
256
|
"🍌",
|
|
@@ -287,10 +287,10 @@ function Ps(e) {
|
|
|
287
287
|
return Math.abs(t);
|
|
288
288
|
}
|
|
289
289
|
function Os(e) {
|
|
290
|
-
const s = Ps(e) %
|
|
291
|
-
return
|
|
290
|
+
const s = Ps(e) % Ot.length;
|
|
291
|
+
return Ot[s];
|
|
292
292
|
}
|
|
293
|
-
const
|
|
293
|
+
const ae = ({
|
|
294
294
|
id: e,
|
|
295
295
|
image: t,
|
|
296
296
|
size: s = 40,
|
|
@@ -299,10 +299,7 @@ const se = ({
|
|
|
299
299
|
shape: i = "squircle",
|
|
300
300
|
dmAgentEnabled: o = !1
|
|
301
301
|
}) => {
|
|
302
|
-
const l = Os(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : {
|
|
303
|
-
borderRadius: "33%",
|
|
304
|
-
cornerShape: "superellipse(1.3)"
|
|
305
|
-
}, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
|
|
302
|
+
const l = Os(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
|
|
306
303
|
"img",
|
|
307
304
|
{
|
|
308
305
|
src: t,
|
|
@@ -421,21 +418,21 @@ const $s = ({
|
|
|
421
418
|
onDeleteConversationClick: u,
|
|
422
419
|
onBlockParticipantClick: f,
|
|
423
420
|
onReportParticipantClick: c,
|
|
424
|
-
customProfileContent:
|
|
421
|
+
customProfileContent: p,
|
|
425
422
|
customChannelActions: N
|
|
426
423
|
}) => {
|
|
427
|
-
var B, H,
|
|
428
|
-
const { service: v, debug: x } =
|
|
429
|
-
var
|
|
430
|
-
if (!(!m || !v || !((
|
|
424
|
+
var B, H, Y, $;
|
|
425
|
+
const { service: v, debug: x } = qe(), [w, A] = O(!1), [T, S] = O(!1), [R, I] = O(!1), C = q(async () => {
|
|
426
|
+
var b;
|
|
427
|
+
if (!(!m || !v || !((b = s == null ? void 0 : s.user) != null && b.id)))
|
|
431
428
|
try {
|
|
432
|
-
const
|
|
433
|
-
(
|
|
434
|
-
var
|
|
435
|
-
return
|
|
429
|
+
const L = (await v.getBlockedUsers()).some(
|
|
430
|
+
(M) => {
|
|
431
|
+
var W;
|
|
432
|
+
return M.blocked_user_id === ((W = s == null ? void 0 : s.user) == null ? void 0 : W.id);
|
|
436
433
|
}
|
|
437
434
|
);
|
|
438
|
-
|
|
435
|
+
A(L);
|
|
439
436
|
} catch (_) {
|
|
440
437
|
console.error(
|
|
441
438
|
"[ChannelInfoDialog] Failed to check blocked status:",
|
|
@@ -447,11 +444,11 @@ const $s = ({
|
|
|
447
444
|
C();
|
|
448
445
|
}, [C]);
|
|
449
446
|
const k = async () => {
|
|
450
|
-
var
|
|
451
|
-
if (!
|
|
447
|
+
var b;
|
|
448
|
+
if (!T) {
|
|
452
449
|
u == null || u(), x && console.log("[ChannelInfoDialog] Leave conversation", r.cid), S(!0);
|
|
453
450
|
try {
|
|
454
|
-
const _ = ((
|
|
451
|
+
const _ = ((b = r._client) == null ? void 0 : b.userID) ?? null;
|
|
455
452
|
await r.hide(_, !1), o && await o(r), t();
|
|
456
453
|
} catch (_) {
|
|
457
454
|
console.error("[ChannelInfoDialog] Failed to leave conversation", _);
|
|
@@ -460,25 +457,25 @@ const $s = ({
|
|
|
460
457
|
}
|
|
461
458
|
}
|
|
462
459
|
}, E = async () => {
|
|
463
|
-
var
|
|
464
|
-
if (!(
|
|
465
|
-
f == null || f(), x && console.log("[ChannelInfoDialog] Block member", (
|
|
460
|
+
var b, _, L;
|
|
461
|
+
if (!(R || !v)) {
|
|
462
|
+
f == null || f(), x && console.log("[ChannelInfoDialog] Block member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id), I(!0);
|
|
466
463
|
try {
|
|
467
|
-
await v.blockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((
|
|
468
|
-
} catch (
|
|
469
|
-
console.error("[ChannelInfoDialog] Failed to block member",
|
|
464
|
+
await v.blockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((L = s == null ? void 0 : s.user) == null ? void 0 : L.id), t();
|
|
465
|
+
} catch (M) {
|
|
466
|
+
console.error("[ChannelInfoDialog] Failed to block member", M);
|
|
470
467
|
} finally {
|
|
471
468
|
I(!1);
|
|
472
469
|
}
|
|
473
470
|
}
|
|
474
471
|
}, D = async () => {
|
|
475
|
-
var
|
|
476
|
-
if (!(
|
|
477
|
-
f == null || f(), x && console.log("[ChannelInfoDialog] Unblock member", (
|
|
472
|
+
var b, _, L;
|
|
473
|
+
if (!(R || !v)) {
|
|
474
|
+
f == null || f(), x && console.log("[ChannelInfoDialog] Unblock member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id), I(!0);
|
|
478
475
|
try {
|
|
479
|
-
await v.unBlockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((
|
|
480
|
-
} catch (
|
|
481
|
-
console.error("[ChannelInfoDialog] Failed to unblock member",
|
|
476
|
+
await v.unBlockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((L = s == null ? void 0 : s.user) == null ? void 0 : L.id), t();
|
|
477
|
+
} catch (M) {
|
|
478
|
+
console.error("[ChannelInfoDialog] Failed to unblock member", M);
|
|
482
479
|
} finally {
|
|
483
480
|
I(!1);
|
|
484
481
|
}
|
|
@@ -491,7 +488,7 @@ const $s = ({
|
|
|
491
488
|
);
|
|
492
489
|
};
|
|
493
490
|
if (!s) return null;
|
|
494
|
-
const F = a ?? Te(s.user),
|
|
491
|
+
const F = a ?? Te(s.user), Z = (H = s.user) == null ? void 0 : H.image, U = (Y = s.user) == null ? void 0 : Y.username, G = U ? `linktr.ee/${U}` : void 0, P = (($ = s.user) == null ? void 0 : $.id) || "unknown";
|
|
495
492
|
return (
|
|
496
493
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
497
494
|
/* @__PURE__ */ n(
|
|
@@ -500,8 +497,8 @@ const $s = ({
|
|
|
500
497
|
ref: e,
|
|
501
498
|
className: "mes-dialog group",
|
|
502
499
|
onClose: t,
|
|
503
|
-
onClick: (
|
|
504
|
-
|
|
500
|
+
onClick: (b) => {
|
|
501
|
+
b.target === e.current && t();
|
|
505
502
|
},
|
|
506
503
|
children: /* @__PURE__ */ h("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-none transition-shadow duration-200 group-open:shadow-max-elevation-light", children: [
|
|
507
504
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
|
|
@@ -517,11 +514,11 @@ const $s = ({
|
|
|
517
514
|
children: [
|
|
518
515
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-3 w-full", children: [
|
|
519
516
|
/* @__PURE__ */ n(
|
|
520
|
-
|
|
517
|
+
ae,
|
|
521
518
|
{
|
|
522
519
|
id: P,
|
|
523
520
|
name: F,
|
|
524
|
-
image:
|
|
521
|
+
image: Z,
|
|
525
522
|
size: 88,
|
|
526
523
|
shape: "circle"
|
|
527
524
|
}
|
|
@@ -529,7 +526,7 @@ const $s = ({
|
|
|
529
526
|
/* @__PURE__ */ h("div", { className: "flex flex-col min-w-0 flex-1", children: [
|
|
530
527
|
/* @__PURE__ */ n("p", { className: "truncate text-base font-semibold text-charcoal", children: F }),
|
|
531
528
|
G && /* @__PURE__ */ n("p", { className: "truncate text-sm text-[#00000055]", children: G }),
|
|
532
|
-
i && !
|
|
529
|
+
i && !p && /* @__PURE__ */ n(
|
|
533
530
|
"span",
|
|
534
531
|
{
|
|
535
532
|
className: "mt-1 rounded-full text-xs font-normal w-fit",
|
|
@@ -545,7 +542,7 @@ const $s = ({
|
|
|
545
542
|
)
|
|
546
543
|
] })
|
|
547
544
|
] }),
|
|
548
|
-
|
|
545
|
+
p && /* @__PURE__ */ n("div", { className: "w-full", children: p })
|
|
549
546
|
]
|
|
550
547
|
}
|
|
551
548
|
),
|
|
@@ -554,10 +551,10 @@ const $s = ({
|
|
|
554
551
|
ye,
|
|
555
552
|
{
|
|
556
553
|
onClick: k,
|
|
557
|
-
disabled:
|
|
558
|
-
"aria-busy":
|
|
554
|
+
disabled: T,
|
|
555
|
+
"aria-busy": T,
|
|
559
556
|
children: [
|
|
560
|
-
|
|
557
|
+
T ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(cs, { className: "h-5 w-5" }),
|
|
561
558
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
562
559
|
]
|
|
563
560
|
}
|
|
@@ -566,10 +563,10 @@ const $s = ({
|
|
|
566
563
|
ye,
|
|
567
564
|
{
|
|
568
565
|
onClick: D,
|
|
569
|
-
disabled:
|
|
570
|
-
"aria-busy":
|
|
566
|
+
disabled: R,
|
|
567
|
+
"aria-busy": R,
|
|
571
568
|
children: [
|
|
572
|
-
|
|
569
|
+
R ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
|
|
573
570
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
574
571
|
]
|
|
575
572
|
}
|
|
@@ -577,16 +574,16 @@ const $s = ({
|
|
|
577
574
|
ye,
|
|
578
575
|
{
|
|
579
576
|
onClick: E,
|
|
580
|
-
disabled:
|
|
581
|
-
"aria-busy":
|
|
577
|
+
disabled: R,
|
|
578
|
+
"aria-busy": R,
|
|
582
579
|
children: [
|
|
583
|
-
|
|
580
|
+
R ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
|
|
584
581
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
585
582
|
]
|
|
586
583
|
}
|
|
587
584
|
) }),
|
|
588
585
|
g && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ye, { variant: "danger", onClick: V, children: [
|
|
589
|
-
/* @__PURE__ */ n(
|
|
586
|
+
/* @__PURE__ */ n(Ut, { className: "h-5 w-5" }),
|
|
590
587
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
591
588
|
] }) }),
|
|
592
589
|
N
|
|
@@ -596,20 +593,20 @@ const $s = ({
|
|
|
596
593
|
}
|
|
597
594
|
)
|
|
598
595
|
);
|
|
599
|
-
}, Bs = (e) => /* @__PURE__ */ n(
|
|
596
|
+
}, Bs = (e) => /* @__PURE__ */ n(Sn, { ...e, position: "center" }), Ve = "vote_up", Ue = "vote_down";
|
|
600
597
|
function js(e) {
|
|
601
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
598
|
+
return e != null && e.length ? e.some((t) => t.type === Ue) ? "down" : e.some((t) => t.type === Ve) ? "up" : null : null;
|
|
602
599
|
}
|
|
603
600
|
function Vs(e) {
|
|
604
|
-
const { channel: t } =
|
|
601
|
+
const { channel: t } = ce(), { client: s } = Ye("useMessageVote"), a = ne(
|
|
605
602
|
() => js(e.own_reactions),
|
|
606
603
|
[e.own_reactions]
|
|
607
604
|
), r = q(async () => {
|
|
608
605
|
if (s != null && s.userID)
|
|
609
606
|
try {
|
|
610
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
607
|
+
a === "up" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
|
|
611
608
|
e.id,
|
|
612
|
-
{ type:
|
|
609
|
+
{ type: Ve },
|
|
613
610
|
{ enforce_unique: !0, skip_push: !0 }
|
|
614
611
|
);
|
|
615
612
|
} catch {
|
|
@@ -617,9 +614,9 @@ function Vs(e) {
|
|
|
617
614
|
}, [t, s == null ? void 0 : s.userID, e.id, a]), i = q(async () => {
|
|
618
615
|
if (s != null && s.userID)
|
|
619
616
|
try {
|
|
620
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
617
|
+
a === "down" ? await t.deleteReaction(e.id, Ue) : await t.sendReaction(
|
|
621
618
|
e.id,
|
|
622
|
-
{ type:
|
|
619
|
+
{ type: Ue },
|
|
623
620
|
{ enforce_unique: !0, skip_push: !0 }
|
|
624
621
|
);
|
|
625
622
|
} catch {
|
|
@@ -630,7 +627,7 @@ function Vs(e) {
|
|
|
630
627
|
function Us(e) {
|
|
631
628
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
632
629
|
}
|
|
633
|
-
function
|
|
630
|
+
function Xt({
|
|
634
631
|
message: e,
|
|
635
632
|
viewerLanguage: t
|
|
636
633
|
}) {
|
|
@@ -638,13 +635,13 @@ function Kt({
|
|
|
638
635
|
const s = e == null ? void 0 : e.text, a = Us(t);
|
|
639
636
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
640
637
|
}
|
|
641
|
-
const Gs = z.lazy(() => import("./Card-
|
|
638
|
+
const Gs = z.lazy(() => import("./Card-DOcs__XO.js")), Hs = z.lazy(() => import("./Card-CserQom-.js")), Ys = z.lazy(() => import("./Card-MDGTBRIk.js")), We = () => /* @__PURE__ */ n(
|
|
642
639
|
"div",
|
|
643
640
|
{
|
|
644
641
|
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)]",
|
|
645
642
|
"aria-hidden": !0
|
|
646
643
|
}
|
|
647
|
-
), qs = (e) => /* @__PURE__ */ n(
|
|
644
|
+
), qs = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Gs, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Ws = Kt, Xs = Jt, zt = { Composer: qs, Sent: Kt, Received: Jt, Creator: Ws, Visitor: Xs }, Ks = [
|
|
648
645
|
[/pdf/, "pdf"],
|
|
649
646
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
650
647
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -654,36 +651,36 @@ const Gs = z.lazy(() => import("./Card-BGOWR4lW.js")), Hs = z.lazy(() => import(
|
|
|
654
651
|
[/plain|rtf/, "text"],
|
|
655
652
|
[/markdown/, "markdown"]
|
|
656
653
|
];
|
|
657
|
-
function
|
|
654
|
+
function re(e) {
|
|
658
655
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
659
656
|
}
|
|
660
|
-
function
|
|
657
|
+
function Zt(e) {
|
|
661
658
|
const t = Ks.find(
|
|
662
659
|
([s]) => s.test(e)
|
|
663
660
|
);
|
|
664
661
|
return t ? t[1] : "generic";
|
|
665
662
|
}
|
|
666
663
|
const Js = {
|
|
667
|
-
video:
|
|
668
|
-
audio:
|
|
669
|
-
image:
|
|
670
|
-
document:
|
|
664
|
+
video: Ht,
|
|
665
|
+
audio: us,
|
|
666
|
+
image: ds,
|
|
667
|
+
document: Gt
|
|
671
668
|
}, Zs = {
|
|
672
|
-
pdf:
|
|
673
|
-
doc:
|
|
674
|
-
xls:
|
|
675
|
-
csv:
|
|
676
|
-
ppt:
|
|
677
|
-
zip:
|
|
678
|
-
text:
|
|
679
|
-
markdown:
|
|
680
|
-
generic:
|
|
669
|
+
pdf: xs,
|
|
670
|
+
doc: vs,
|
|
671
|
+
xls: ps,
|
|
672
|
+
csv: bs,
|
|
673
|
+
ppt: gs,
|
|
674
|
+
zip: fs,
|
|
675
|
+
text: hs,
|
|
676
|
+
markdown: ms,
|
|
677
|
+
generic: Gt
|
|
681
678
|
};
|
|
682
679
|
function Qs(e) {
|
|
683
|
-
const t =
|
|
684
|
-
return t !== "document" ? Js[t] : Zs[
|
|
680
|
+
const t = re(e);
|
|
681
|
+
return t !== "document" ? Js[t] : Zs[Zt(e)];
|
|
685
682
|
}
|
|
686
|
-
function
|
|
683
|
+
function le(e, t) {
|
|
687
684
|
return z.createElement(Qs(e), t);
|
|
688
685
|
}
|
|
689
686
|
const ea = (e) => {
|
|
@@ -701,71 +698,71 @@ const ea = (e) => {
|
|
|
701
698
|
muted: d = !1,
|
|
702
699
|
onContainerClick: m
|
|
703
700
|
}) => {
|
|
704
|
-
const g =
|
|
701
|
+
const g = re(t), u = X(null), f = X(null), c = X(null), p = X(r), [N, v] = O(a), [x, w] = O(0), [A, T] = O(!1), [S, R] = O(!1), [I, C] = O(!1), [k, E] = O(!1), [D, V] = O(!0), [F, Z] = O(null), U = q(() => {
|
|
705
702
|
C(!1), v(!0);
|
|
706
|
-
}, []), G = q((
|
|
703
|
+
}, []), G = q((b) => {
|
|
707
704
|
const _ = f.current;
|
|
708
705
|
if (!_) return 0;
|
|
709
|
-
const
|
|
706
|
+
const L = _.getBoundingClientRect();
|
|
710
707
|
return Math.max(
|
|
711
708
|
0,
|
|
712
|
-
Math.min(1, (ea(
|
|
709
|
+
Math.min(1, (ea(b) - L.left) / L.width)
|
|
713
710
|
);
|
|
714
|
-
}, []), P = q((
|
|
711
|
+
}, []), P = q((b) => {
|
|
715
712
|
const _ = u.current;
|
|
716
|
-
_ && _.duration && (_.currentTime =
|
|
717
|
-
}, []), B = (
|
|
718
|
-
|
|
719
|
-
const _ = G(
|
|
713
|
+
_ && _.duration && (_.currentTime = b * _.duration);
|
|
714
|
+
}, []), B = (b) => {
|
|
715
|
+
b.stopPropagation(), T(!0);
|
|
716
|
+
const _ = G(b);
|
|
720
717
|
w(_), P(_);
|
|
721
718
|
};
|
|
722
719
|
J(() => {
|
|
723
|
-
r !== void 0 && r !==
|
|
720
|
+
r !== void 0 && r !== p.current && (p.current = r, v(r));
|
|
724
721
|
}, [r]), J(() => {
|
|
725
722
|
if (!N) {
|
|
726
723
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
727
724
|
return;
|
|
728
725
|
}
|
|
729
|
-
const
|
|
726
|
+
const b = () => {
|
|
730
727
|
const _ = u.current;
|
|
731
|
-
_ && _.duration && !
|
|
728
|
+
_ && _.duration && !A && w(_.currentTime / _.duration), c.current = requestAnimationFrame(b);
|
|
732
729
|
};
|
|
733
|
-
return c.current = requestAnimationFrame(
|
|
730
|
+
return c.current = requestAnimationFrame(b), () => {
|
|
734
731
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
735
732
|
};
|
|
736
|
-
}, [N,
|
|
737
|
-
const
|
|
738
|
-
|
|
733
|
+
}, [N, A]), J(() => {
|
|
734
|
+
const b = u.current;
|
|
735
|
+
b && (N ? b.play().catch((_) => {
|
|
739
736
|
v(!1), C(!0);
|
|
740
|
-
}) :
|
|
737
|
+
}) : b.pause());
|
|
741
738
|
}, [N]), J(() => {
|
|
742
|
-
if (!
|
|
743
|
-
const
|
|
744
|
-
|
|
739
|
+
if (!A) return;
|
|
740
|
+
const b = (L) => w(G(L)), _ = (L) => {
|
|
741
|
+
T(!1), P(G(L));
|
|
745
742
|
};
|
|
746
|
-
return window.addEventListener("mousemove",
|
|
747
|
-
window.removeEventListener("mousemove",
|
|
743
|
+
return window.addEventListener("mousemove", b), window.addEventListener("mouseup", _), window.addEventListener("touchmove", b, { passive: !0 }), window.addEventListener("touchend", _), () => {
|
|
744
|
+
window.removeEventListener("mousemove", b), window.removeEventListener("mouseup", _), window.removeEventListener("touchmove", b), window.removeEventListener("touchend", _);
|
|
748
745
|
};
|
|
749
|
-
}, [
|
|
750
|
-
const H = F ? { aspectRatio: String(F) } : void 0,
|
|
746
|
+
}, [A, G, P]);
|
|
747
|
+
const H = F ? { aspectRatio: String(F) } : void 0, Y = F ? "" : " aspect-video", $ = Math.round(x * 100);
|
|
751
748
|
return /* @__PURE__ */ h(
|
|
752
749
|
"div",
|
|
753
750
|
{
|
|
754
751
|
role: "button",
|
|
755
752
|
tabIndex: 0,
|
|
756
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
753
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${Y}`,
|
|
757
754
|
style: H,
|
|
758
|
-
onClick: (
|
|
755
|
+
onClick: (b) => {
|
|
759
756
|
if (m) {
|
|
760
|
-
m(
|
|
757
|
+
m(b);
|
|
761
758
|
return;
|
|
762
759
|
}
|
|
763
760
|
I || o && v((_) => !_);
|
|
764
761
|
},
|
|
765
|
-
onKeyDown: (
|
|
766
|
-
if (!(
|
|
767
|
-
if (
|
|
768
|
-
m(
|
|
762
|
+
onKeyDown: (b) => {
|
|
763
|
+
if (!(b.key !== "Enter" && b.key !== " ")) {
|
|
764
|
+
if (b.preventDefault(), m) {
|
|
765
|
+
m(b);
|
|
769
766
|
return;
|
|
770
767
|
}
|
|
771
768
|
I || o && v((_) => !_);
|
|
@@ -780,7 +777,7 @@ const ea = (e) => {
|
|
|
780
777
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
781
778
|
}
|
|
782
779
|
),
|
|
783
|
-
!s && (g === "audio" || D) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
780
|
+
!s && (g === "audio" || D) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
|
|
784
781
|
className: "size-12 text-black/20",
|
|
785
782
|
weight: "regular"
|
|
786
783
|
}) }),
|
|
@@ -819,8 +816,8 @@ const ea = (e) => {
|
|
|
819
816
|
onWaiting: () => E(!0),
|
|
820
817
|
onPlay: () => C(!1),
|
|
821
818
|
onLoadedMetadata: () => {
|
|
822
|
-
const
|
|
823
|
-
|
|
819
|
+
const b = u.current;
|
|
820
|
+
b instanceof HTMLVideoElement && b.videoWidth && b.videoHeight && Z(b.videoWidth / b.videoHeight);
|
|
824
821
|
},
|
|
825
822
|
onEnded: () => {
|
|
826
823
|
i || (v(!1), w(0));
|
|
@@ -842,11 +839,11 @@ const ea = (e) => {
|
|
|
842
839
|
role: "button",
|
|
843
840
|
tabIndex: 0,
|
|
844
841
|
"aria-label": "Play preview",
|
|
845
|
-
onClick: (
|
|
846
|
-
|
|
842
|
+
onClick: (b) => {
|
|
843
|
+
b.stopPropagation(), U();
|
|
847
844
|
},
|
|
848
|
-
onKeyDown: (
|
|
849
|
-
|
|
845
|
+
onKeyDown: (b) => {
|
|
846
|
+
b.key !== "Enter" && b.key !== " " || (b.preventDefault(), b.stopPropagation(), U());
|
|
850
847
|
},
|
|
851
848
|
children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(Be, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
852
849
|
}
|
|
@@ -864,9 +861,9 @@ const ea = (e) => {
|
|
|
864
861
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
865
862
|
onMouseDown: B,
|
|
866
863
|
onTouchStart: B,
|
|
867
|
-
onClick: (
|
|
868
|
-
onKeyDown: (
|
|
869
|
-
|
|
864
|
+
onClick: (b) => b.stopPropagation(),
|
|
865
|
+
onKeyDown: (b) => {
|
|
866
|
+
b.key === "ArrowRight" && P(Math.min(1, x + 0.05)), b.key === "ArrowLeft" && P(Math.max(0, x - 0.05));
|
|
870
867
|
},
|
|
871
868
|
children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
|
|
872
869
|
"div",
|
|
@@ -882,12 +879,12 @@ const ea = (e) => {
|
|
|
882
879
|
"button",
|
|
883
880
|
{
|
|
884
881
|
type: "button",
|
|
885
|
-
onClick: (
|
|
886
|
-
|
|
882
|
+
onClick: (b) => {
|
|
883
|
+
b.stopPropagation(), v((_) => !_);
|
|
887
884
|
},
|
|
888
885
|
className: "shrink-0 text-white",
|
|
889
886
|
"aria-label": N ? "Pause" : "Play",
|
|
890
|
-
children: N ? /* @__PURE__ */ n(
|
|
887
|
+
children: N ? /* @__PURE__ */ n(ws, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
|
|
891
888
|
}
|
|
892
889
|
),
|
|
893
890
|
/* @__PURE__ */ h(
|
|
@@ -903,17 +900,17 @@ const ea = (e) => {
|
|
|
903
900
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
904
901
|
onMouseDown: B,
|
|
905
902
|
onTouchStart: B,
|
|
906
|
-
onClick: (
|
|
907
|
-
onMouseEnter: () =>
|
|
908
|
-
onMouseLeave: () =>
|
|
909
|
-
onKeyDown: (
|
|
910
|
-
|
|
903
|
+
onClick: (b) => b.stopPropagation(),
|
|
904
|
+
onMouseEnter: () => R(!0),
|
|
905
|
+
onMouseLeave: () => R(!1),
|
|
906
|
+
onKeyDown: (b) => {
|
|
907
|
+
b.key === "ArrowRight" && P(Math.min(1, x + 0.05)), b.key === "ArrowLeft" && P(Math.max(0, x - 0.05));
|
|
911
908
|
},
|
|
912
909
|
children: [
|
|
913
910
|
/* @__PURE__ */ n(
|
|
914
911
|
"div",
|
|
915
912
|
{
|
|
916
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S ||
|
|
913
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S || A ? "h-1.5" : "h-1"}`,
|
|
917
914
|
children: /* @__PURE__ */ n(
|
|
918
915
|
"div",
|
|
919
916
|
{
|
|
@@ -926,7 +923,7 @@ const ea = (e) => {
|
|
|
926
923
|
/* @__PURE__ */ n(
|
|
927
924
|
"div",
|
|
928
925
|
{
|
|
929
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S ||
|
|
926
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
930
927
|
style: { left: `${$}%` }
|
|
931
928
|
}
|
|
932
929
|
)
|
|
@@ -937,7 +934,7 @@ const ea = (e) => {
|
|
|
937
934
|
]
|
|
938
935
|
}
|
|
939
936
|
);
|
|
940
|
-
},
|
|
937
|
+
}, Ft = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", na = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Qt = ({
|
|
941
938
|
mimeType: e,
|
|
942
939
|
sourceUrl: t,
|
|
943
940
|
thumbnailUrl: s,
|
|
@@ -946,7 +943,7 @@ const ea = (e) => {
|
|
|
946
943
|
mediaPlayerProps: i,
|
|
947
944
|
containedImage: o = !1
|
|
948
945
|
}) => {
|
|
949
|
-
const l =
|
|
946
|
+
const l = re(e), [d, m] = O(!1);
|
|
950
947
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
951
948
|
ta,
|
|
952
949
|
{
|
|
@@ -994,8 +991,8 @@ const ea = (e) => {
|
|
|
994
991
|
"div",
|
|
995
992
|
{
|
|
996
993
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
997
|
-
children:
|
|
998
|
-
className:
|
|
994
|
+
children: le(e, {
|
|
995
|
+
className: Ft(r),
|
|
999
996
|
weight: "regular"
|
|
1000
997
|
})
|
|
1001
998
|
}
|
|
@@ -1011,13 +1008,13 @@ const ea = (e) => {
|
|
|
1011
1008
|
"div",
|
|
1012
1009
|
{
|
|
1013
1010
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1014
|
-
children:
|
|
1015
|
-
className:
|
|
1011
|
+
children: le(e, {
|
|
1012
|
+
className: Ft(r),
|
|
1016
1013
|
weight: "regular"
|
|
1017
1014
|
})
|
|
1018
1015
|
}
|
|
1019
1016
|
);
|
|
1020
|
-
},
|
|
1017
|
+
}, en = ({
|
|
1021
1018
|
variant: e,
|
|
1022
1019
|
thumbnail: t,
|
|
1023
1020
|
title: s,
|
|
@@ -1031,7 +1028,7 @@ const ea = (e) => {
|
|
|
1031
1028
|
rootRef: g,
|
|
1032
1029
|
"data-testid": u
|
|
1033
1030
|
}) => {
|
|
1034
|
-
const f = e === "dark", c = f ? s ?? a : s ?? "",
|
|
1031
|
+
const f = e === "dark", c = f ? s ?? a : s ?? "", p = f && !s;
|
|
1035
1032
|
return /* @__PURE__ */ h(
|
|
1036
1033
|
"div",
|
|
1037
1034
|
{
|
|
@@ -1051,14 +1048,14 @@ const ea = (e) => {
|
|
|
1051
1048
|
{
|
|
1052
1049
|
className: y("mb-0.5 truncate text-base font-medium", {
|
|
1053
1050
|
"text-black": !f,
|
|
1054
|
-
"text-white/30": f &&
|
|
1055
|
-
"text-white": f && !
|
|
1051
|
+
"text-white/30": f && p,
|
|
1052
|
+
"text-white": f && !p
|
|
1056
1053
|
}),
|
|
1057
1054
|
children: c
|
|
1058
1055
|
}
|
|
1059
1056
|
),
|
|
1060
1057
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1061
|
-
|
|
1058
|
+
le(r, {
|
|
1062
1059
|
className: y(
|
|
1063
1060
|
"size-5 shrink-0",
|
|
1064
1061
|
f ? "text-white/55" : "text-black/55"
|
|
@@ -1083,10 +1080,10 @@ const ea = (e) => {
|
|
|
1083
1080
|
}
|
|
1084
1081
|
);
|
|
1085
1082
|
};
|
|
1086
|
-
function
|
|
1083
|
+
function tn(e) {
|
|
1087
1084
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1088
1085
|
}
|
|
1089
|
-
function
|
|
1086
|
+
function Xe(e) {
|
|
1090
1087
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1091
1088
|
}
|
|
1092
1089
|
function sa(e) {
|
|
@@ -1104,7 +1101,7 @@ function ia(e) {
|
|
|
1104
1101
|
function oa(e) {
|
|
1105
1102
|
return e ? "text-white/20" : "text-black/20";
|
|
1106
1103
|
}
|
|
1107
|
-
const
|
|
1104
|
+
const Ke = ({ attachment: e, isMyMessage: t }) => {
|
|
1108
1105
|
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(z.Fragment, { children: [
|
|
1109
1106
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1110
1107
|
"img",
|
|
@@ -1117,7 +1114,7 @@ const Je = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1117
1114
|
"div",
|
|
1118
1115
|
{
|
|
1119
1116
|
className: `aspect-video w-full rounded-[20px] ${sa(t)} flex items-center justify-center`,
|
|
1120
|
-
children: /* @__PURE__ */ n(
|
|
1117
|
+
children: /* @__PURE__ */ n(Ns, { className: `size-12 ${oa(t)}` })
|
|
1121
1118
|
}
|
|
1122
1119
|
) }),
|
|
1123
1120
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
@@ -1128,12 +1125,12 @@ const Je = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1128
1125
|
] });
|
|
1129
1126
|
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
|
|
1130
1127
|
};
|
|
1131
|
-
function
|
|
1128
|
+
function nn(e) {
|
|
1132
1129
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1133
1130
|
}
|
|
1134
|
-
function
|
|
1131
|
+
function Je(e) {
|
|
1135
1132
|
var t;
|
|
1136
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1133
|
+
return (t = e.attachments) == null ? void 0 : t.find(nn);
|
|
1137
1134
|
}
|
|
1138
1135
|
async function la(e, t) {
|
|
1139
1136
|
let s;
|
|
@@ -1174,15 +1171,15 @@ const ca = ({
|
|
|
1174
1171
|
}
|
|
1175
1172
|
);
|
|
1176
1173
|
};
|
|
1177
|
-
function
|
|
1178
|
-
var u, f, c,
|
|
1174
|
+
function Ze(e) {
|
|
1175
|
+
var u, f, c, p;
|
|
1179
1176
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1180
1177
|
(N) => N.type === "video" && N.asset_url
|
|
1181
1178
|
), s = (f = e.attachments) == null ? void 0 : f.find(
|
|
1182
1179
|
(N) => N.type === "image" && N.image_url
|
|
1183
1180
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1184
1181
|
(N) => N.type === "audio" && N.asset_url
|
|
1185
|
-
), r = (
|
|
1182
|
+
), r = (p = e.attachments) == null ? void 0 : p.find(
|
|
1186
1183
|
(N) => N.type === "file" && N.asset_url
|
|
1187
1184
|
), i = t ?? s ?? a ?? r, o = (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);
|
|
1188
1185
|
if (!o) return null;
|
|
@@ -1195,16 +1192,16 @@ function Qe(e) {
|
|
|
1195
1192
|
thumbnailUrl: g
|
|
1196
1193
|
};
|
|
1197
1194
|
}
|
|
1198
|
-
const
|
|
1195
|
+
const sn = ({
|
|
1199
1196
|
resolvedUrl: e,
|
|
1200
1197
|
resolvedType: t,
|
|
1201
1198
|
title: s,
|
|
1202
1199
|
fileSize: a,
|
|
1203
1200
|
thumbnailUrl: r
|
|
1204
1201
|
}) => {
|
|
1205
|
-
const i = a !== void 0 ?
|
|
1202
|
+
const i = a !== void 0 ? tn(a) : void 0;
|
|
1206
1203
|
return /* @__PURE__ */ n(
|
|
1207
|
-
|
|
1204
|
+
en,
|
|
1208
1205
|
{
|
|
1209
1206
|
variant: "dark",
|
|
1210
1207
|
title: s,
|
|
@@ -1212,7 +1209,7 @@ const an = ({
|
|
|
1212
1209
|
mimeType: t,
|
|
1213
1210
|
detail: i,
|
|
1214
1211
|
thumbnail: /* @__PURE__ */ n(
|
|
1215
|
-
|
|
1212
|
+
Qt,
|
|
1216
1213
|
{
|
|
1217
1214
|
mimeType: t,
|
|
1218
1215
|
sourceUrl: e,
|
|
@@ -1223,23 +1220,23 @@ const an = ({
|
|
|
1223
1220
|
)
|
|
1224
1221
|
}
|
|
1225
1222
|
);
|
|
1226
|
-
},
|
|
1223
|
+
}, an = ({
|
|
1227
1224
|
resolvedUrl: e,
|
|
1228
1225
|
resolvedType: t,
|
|
1229
1226
|
title: s,
|
|
1230
1227
|
fileSize: a,
|
|
1231
1228
|
thumbnailUrl: r
|
|
1232
1229
|
}) => {
|
|
1233
|
-
const i =
|
|
1230
|
+
const i = re(t), o = a !== void 0 ? tn(a) : void 0;
|
|
1234
1231
|
return /* @__PURE__ */ n(
|
|
1235
|
-
|
|
1232
|
+
en,
|
|
1236
1233
|
{
|
|
1237
1234
|
variant: "light",
|
|
1238
1235
|
title: s,
|
|
1239
1236
|
mimeType: t,
|
|
1240
1237
|
detail: o,
|
|
1241
1238
|
thumbnail: /* @__PURE__ */ n(
|
|
1242
|
-
|
|
1239
|
+
Qt,
|
|
1243
1240
|
{
|
|
1244
1241
|
mimeType: t,
|
|
1245
1242
|
sourceUrl: e,
|
|
@@ -1256,10 +1253,10 @@ const an = ({
|
|
|
1256
1253
|
message: e,
|
|
1257
1254
|
isMyMessage: t = !1
|
|
1258
1255
|
}) => {
|
|
1259
|
-
const s =
|
|
1256
|
+
const s = Je(e), a = Ze(e);
|
|
1260
1257
|
return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
|
|
1261
1258
|
!t && e.user && /* @__PURE__ */ n(
|
|
1262
|
-
|
|
1259
|
+
ae,
|
|
1263
1260
|
{
|
|
1264
1261
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1265
1262
|
id: e.user.id,
|
|
@@ -1277,7 +1274,7 @@ const an = ({
|
|
|
1277
1274
|
{
|
|
1278
1275
|
className: "str-chat__message-bubble",
|
|
1279
1276
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1280
|
-
children: s ? /* @__PURE__ */ n("div", { className:
|
|
1277
|
+
children: s ? /* @__PURE__ */ n("div", { className: Xe(t), children: /* @__PURE__ */ n(Ke, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(sn, { ...a }) : /* @__PURE__ */ n(an, { ...a })
|
|
1281
1278
|
}
|
|
1282
1279
|
) })
|
|
1283
1280
|
}
|
|
@@ -1286,19 +1283,19 @@ const an = ({
|
|
|
1286
1283
|
}, ua = ({
|
|
1287
1284
|
message: e
|
|
1288
1285
|
}) => {
|
|
1289
|
-
const t =
|
|
1286
|
+
const t = Je(e);
|
|
1290
1287
|
if (t)
|
|
1291
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1292
|
-
const s =
|
|
1293
|
-
return s ? /* @__PURE__ */ n(
|
|
1288
|
+
return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
|
|
1289
|
+
const s = Ze(e);
|
|
1290
|
+
return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
|
|
1294
1291
|
}, ma = ({
|
|
1295
1292
|
message: e
|
|
1296
1293
|
}) => {
|
|
1297
|
-
const t =
|
|
1294
|
+
const t = Je(e);
|
|
1298
1295
|
if (t)
|
|
1299
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1300
|
-
const s =
|
|
1301
|
-
return s ? /* @__PURE__ */ n(
|
|
1296
|
+
return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
|
|
1297
|
+
const s = Ze(e);
|
|
1298
|
+
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1302
1299
|
}, wi = Object.assign(da, {
|
|
1303
1300
|
Creator: ua,
|
|
1304
1301
|
Visitor: ma
|
|
@@ -1306,9 +1303,9 @@ const an = ({
|
|
|
1306
1303
|
isUnlocking: () => !1
|
|
1307
1304
|
}, fa = {
|
|
1308
1305
|
LockedAttachment: ha
|
|
1309
|
-
},
|
|
1306
|
+
}, rn = Ge({}), Ni = rn.Provider;
|
|
1310
1307
|
function ga(e) {
|
|
1311
|
-
return Se(
|
|
1308
|
+
return Se(rn)[e] ?? fa[e];
|
|
1312
1309
|
}
|
|
1313
1310
|
const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1314
1311
|
"svg",
|
|
@@ -1339,9 +1336,9 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1339
1336
|
}, xa = (e) => {
|
|
1340
1337
|
var t;
|
|
1341
1338
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
1342
|
-
},
|
|
1339
|
+
}, on = (e) => pa(e) || va(e), wa = (e) => {
|
|
1343
1340
|
var t;
|
|
1344
|
-
return
|
|
1341
|
+
return on(e) && !((t = e.text) != null && t.trim());
|
|
1345
1342
|
}, Pe = ({
|
|
1346
1343
|
message: e,
|
|
1347
1344
|
standalone: t = !1,
|
|
@@ -1349,16 +1346,16 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1349
1346
|
hasAttachment: a = !1
|
|
1350
1347
|
}) => {
|
|
1351
1348
|
var u;
|
|
1352
|
-
const r =
|
|
1349
|
+
const r = on(e), i = Ce(e);
|
|
1353
1350
|
if (!r && !i)
|
|
1354
1351
|
return null;
|
|
1355
1352
|
if (r) {
|
|
1356
1353
|
const f = (u = e.metadata) == null ? void 0 : u.amount_text;
|
|
1357
1354
|
if (!f) return null;
|
|
1358
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip",
|
|
1355
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", p = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
1359
1356
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
1360
|
-
/* @__PURE__ */ n(
|
|
1361
|
-
/* @__PURE__ */ n("span", { children:
|
|
1357
|
+
/* @__PURE__ */ n(_s, { size: t ? 14 : 12 }),
|
|
1358
|
+
/* @__PURE__ */ n("span", { children: p })
|
|
1362
1359
|
] });
|
|
1363
1360
|
}
|
|
1364
1361
|
const o = s && a, l = o ? "Sent with AI" : "Sent with DM Agent", d = [
|
|
@@ -1366,10 +1363,10 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1366
1363
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1367
1364
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1368
1365
|
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(ba, { size: o ? 12 : 15 }) });
|
|
1369
|
-
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(
|
|
1366
|
+
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
|
|
1370
1367
|
m,
|
|
1371
1368
|
g
|
|
1372
|
-
] }) : /* @__PURE__ */ h(
|
|
1369
|
+
] }) : /* @__PURE__ */ h(se, { children: [
|
|
1373
1370
|
g,
|
|
1374
1371
|
m
|
|
1375
1372
|
] }) });
|
|
@@ -1389,7 +1386,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1389
1386
|
"aria-label": "Good response",
|
|
1390
1387
|
"aria-pressed": e === "up",
|
|
1391
1388
|
"data-tooltip": "Good response",
|
|
1392
|
-
children: /* @__PURE__ */ n(
|
|
1389
|
+
children: /* @__PURE__ */ n(ys, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
1393
1390
|
}
|
|
1394
1391
|
),
|
|
1395
1392
|
/* @__PURE__ */ n(
|
|
@@ -1403,11 +1400,11 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1403
1400
|
"aria-label": "Bad response",
|
|
1404
1401
|
"aria-pressed": e === "down",
|
|
1405
1402
|
"data-tooltip": "Bad response",
|
|
1406
|
-
children: /* @__PURE__ */ n(
|
|
1403
|
+
children: /* @__PURE__ */ n(Cs, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
1407
1404
|
}
|
|
1408
1405
|
)
|
|
1409
1406
|
] }), _a = (e) => {
|
|
1410
|
-
var gt, bt, pt, vt, xt, wt, Nt, _t, yt, Ct, kt, Et, It
|
|
1407
|
+
var ft, gt, bt, pt, vt, xt, wt, Nt, _t, yt, Ct, kt, Et, It;
|
|
1411
1408
|
const {
|
|
1412
1409
|
additionalMessageInputProps: t,
|
|
1413
1410
|
chatbotVotingEnabled: s,
|
|
@@ -1422,69 +1419,69 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1422
1419
|
isMessageAIGenerated: u,
|
|
1423
1420
|
isMyMessage: f,
|
|
1424
1421
|
message: c,
|
|
1425
|
-
renderText:
|
|
1422
|
+
renderText: p,
|
|
1426
1423
|
threadList: N,
|
|
1427
1424
|
viewerLanguage: v
|
|
1428
|
-
} = e, { client: x } =
|
|
1429
|
-
Attachment: F =
|
|
1430
|
-
EditMessageModal:
|
|
1425
|
+
} = e, { client: x } = Ye("CustomMessage"), { channel: w } = ce("CustomMessage"), { isUnlocking: A, onUnlockClick: T, onFetchSource: S, onDownloadClick: R } = ga("LockedAttachment"), [I, C] = O(!1), k = An(c.id), { selected: E, voteUp: D, voteDown: V } = Vs(c), {
|
|
1426
|
+
Attachment: F = Mn,
|
|
1427
|
+
EditMessageModal: Z = Dn,
|
|
1431
1428
|
MessageActions: U,
|
|
1432
|
-
MessageBlocked: G =
|
|
1433
|
-
MessageBouncePrompt: P =
|
|
1434
|
-
MessageDeleted: B =
|
|
1435
|
-
MessageIsThreadReplyInChannelButtonIndicator: H =
|
|
1436
|
-
MessageRepliesCountButton:
|
|
1437
|
-
ReminderNotification: $ =
|
|
1438
|
-
StreamedMessageText:
|
|
1429
|
+
MessageBlocked: G = Rn,
|
|
1430
|
+
MessageBouncePrompt: P = Ln,
|
|
1431
|
+
MessageDeleted: B = Pn,
|
|
1432
|
+
MessageIsThreadReplyInChannelButtonIndicator: H = On,
|
|
1433
|
+
MessageRepliesCountButton: Y = zn,
|
|
1434
|
+
ReminderNotification: $ = Fn,
|
|
1435
|
+
StreamedMessageText: b = $n,
|
|
1439
1436
|
PinIndicator: _
|
|
1440
|
-
} =
|
|
1437
|
+
} = Vt("CustomMessage"), L = Bn(c), M = jn(c), W = ne(
|
|
1441
1438
|
() => u == null ? void 0 : u(c),
|
|
1442
1439
|
[u, c]
|
|
1443
|
-
),
|
|
1440
|
+
), j = ne(() => {
|
|
1444
1441
|
const me = c.attachments ?? [], _e = c.shared_location ? [c.shared_location, ...me] : me;
|
|
1445
1442
|
if (!Ce(c)) return _e;
|
|
1446
|
-
const
|
|
1447
|
-
return
|
|
1448
|
-
}, [c]),
|
|
1449
|
-
const me =
|
|
1443
|
+
const St = _e.filter((Tt) => !("type" in Tt) || !nn(Tt));
|
|
1444
|
+
return St.length === _e.length ? _e : St;
|
|
1445
|
+
}, [c]), K = ne(() => {
|
|
1446
|
+
const me = Xt({ message: c, viewerLanguage: v });
|
|
1450
1447
|
return me === c.text ? c : { ...c, text: me };
|
|
1451
1448
|
}, [c, v]);
|
|
1452
|
-
if (
|
|
1449
|
+
if (Vn(c))
|
|
1453
1450
|
return null;
|
|
1454
1451
|
if (c.deleted_at || c.type === "deleted")
|
|
1455
1452
|
return /* @__PURE__ */ n(B, { message: c });
|
|
1456
|
-
if (
|
|
1453
|
+
if (Un(c))
|
|
1457
1454
|
return /* @__PURE__ */ n(G, {});
|
|
1458
|
-
const
|
|
1455
|
+
const ee = !N && !!c.reply_count, Q = !N && c.show_in_channel && c.parent_id, lt = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ct = Gn(c);
|
|
1459
1456
|
let ie;
|
|
1460
|
-
|
|
1461
|
-
const
|
|
1457
|
+
lt ? ie = () => m(c) : ct && (ie = () => C(!0));
|
|
1458
|
+
const de = f(), kn = y(
|
|
1462
1459
|
"str-chat__message str-chat__message-simple",
|
|
1463
1460
|
`str-chat__message--${c.type}`,
|
|
1464
1461
|
`str-chat__message--${c.status}`,
|
|
1465
|
-
|
|
1462
|
+
de ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
1466
1463
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
1467
1464
|
{
|
|
1468
|
-
"str-chat__message--has-attachment":
|
|
1465
|
+
"str-chat__message--has-attachment": L,
|
|
1469
1466
|
"str-chat__message--highlighted": g,
|
|
1470
1467
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
1471
|
-
"str-chat__message--with-reactions":
|
|
1472
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
1473
|
-
"str-chat__message-with-thread-link":
|
|
1468
|
+
"str-chat__message--with-reactions": M,
|
|
1469
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((gt = c == null ? void 0 : c.error) == null ? void 0 : gt.status) !== 403,
|
|
1470
|
+
"str-chat__message-with-thread-link": ee || Q,
|
|
1474
1471
|
"str-chat__virtual-message__wrapper--end": r,
|
|
1475
1472
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1476
1473
|
"str-chat__virtual-message__wrapper--group": o
|
|
1477
1474
|
}
|
|
1478
|
-
),
|
|
1479
|
-
return /* @__PURE__ */ h(
|
|
1475
|
+
), dt = c.poll_id && x.polls.fromState(c.poll_id), ut = wa(c), ue = Ce(c), mt = xa(c), Me = !!(j != null && j.length && !c.quoted_message), ht = ue && de && Me;
|
|
1476
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
1480
1477
|
a && /* @__PURE__ */ n(
|
|
1481
|
-
|
|
1478
|
+
Z,
|
|
1482
1479
|
{
|
|
1483
1480
|
additionalMessageInputProps: t
|
|
1484
1481
|
}
|
|
1485
1482
|
),
|
|
1486
1483
|
I && /* @__PURE__ */ n(
|
|
1487
|
-
|
|
1484
|
+
Hn,
|
|
1488
1485
|
{
|
|
1489
1486
|
MessageBouncePrompt: P,
|
|
1490
1487
|
onClose: () => C(!1),
|
|
@@ -1494,28 +1491,28 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1494
1491
|
/* @__PURE__ */ h(
|
|
1495
1492
|
"div",
|
|
1496
1493
|
{
|
|
1497
|
-
className:
|
|
1494
|
+
className: kn,
|
|
1498
1495
|
"data-message-id": c.id,
|
|
1499
1496
|
children: [
|
|
1500
1497
|
_ && /* @__PURE__ */ n(_, {}),
|
|
1501
1498
|
!!k && /* @__PURE__ */ n($, { reminder: k }),
|
|
1502
1499
|
c.user && /* @__PURE__ */ n(
|
|
1503
|
-
|
|
1500
|
+
ae,
|
|
1504
1501
|
{
|
|
1505
1502
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1506
1503
|
id: c.user.id,
|
|
1507
1504
|
image: c.user.image,
|
|
1508
1505
|
name: c.user.name || c.user.id,
|
|
1509
|
-
size:
|
|
1506
|
+
size: 24,
|
|
1510
1507
|
shape: "circle",
|
|
1511
|
-
dmAgentEnabled:
|
|
1508
|
+
dmAgentEnabled: ue
|
|
1512
1509
|
}
|
|
1513
1510
|
),
|
|
1514
1511
|
/* @__PURE__ */ n(
|
|
1515
1512
|
"div",
|
|
1516
1513
|
{
|
|
1517
1514
|
className: y("str-chat__message-inner", {
|
|
1518
|
-
"str-chat__simple-message--error-failed":
|
|
1515
|
+
"str-chat__simple-message--error-failed": lt || ct
|
|
1519
1516
|
}),
|
|
1520
1517
|
"data-testid": "message-inner",
|
|
1521
1518
|
onClick: ie,
|
|
@@ -1528,94 +1525,94 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1528
1525
|
marginInlineEnd: 0,
|
|
1529
1526
|
marginInlineStart: 0
|
|
1530
1527
|
},
|
|
1531
|
-
children:
|
|
1532
|
-
|
|
1528
|
+
children: mt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1529
|
+
de ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1533
1530
|
U && /* @__PURE__ */ n(U, {}),
|
|
1534
1531
|
/* @__PURE__ */ n(
|
|
1535
|
-
|
|
1532
|
+
zt.Sent,
|
|
1536
1533
|
{
|
|
1537
|
-
title: (
|
|
1538
|
-
mimeType: (
|
|
1539
|
-
thumbnailUrl: (
|
|
1540
|
-
amountText: (
|
|
1541
|
-
detail: (
|
|
1542
|
-
paymentStatus: (
|
|
1543
|
-
onPreviewClick: () =>
|
|
1534
|
+
title: (bt = c.metadata) == null ? void 0 : bt.attachment_title,
|
|
1535
|
+
mimeType: (pt = c.metadata) == null ? void 0 : pt.attachment_mime_type,
|
|
1536
|
+
thumbnailUrl: (vt = c.metadata) == null ? void 0 : vt.attachment_thumbnail,
|
|
1537
|
+
amountText: (xt = c.metadata) == null ? void 0 : xt.amount_text,
|
|
1538
|
+
detail: (wt = c.metadata) == null ? void 0 : wt.attachment_detail,
|
|
1539
|
+
paymentStatus: (Nt = c.metadata) == null ? void 0 : Nt.payment_status,
|
|
1540
|
+
onPreviewClick: () => T == null ? void 0 : T(c, w),
|
|
1544
1541
|
onFetchSource: async () => await (S == null ? void 0 : S(c, w))
|
|
1545
1542
|
}
|
|
1546
1543
|
)
|
|
1547
1544
|
] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1548
1545
|
/* @__PURE__ */ n(
|
|
1549
|
-
|
|
1546
|
+
zt.Received,
|
|
1550
1547
|
{
|
|
1551
|
-
title: (
|
|
1552
|
-
mimeType: (
|
|
1553
|
-
thumbnailUrl: (
|
|
1554
|
-
amountText: (
|
|
1555
|
-
detail: (
|
|
1556
|
-
paymentStatus: (
|
|
1557
|
-
isUnlocking:
|
|
1558
|
-
onUnlockClick: () =>
|
|
1548
|
+
title: (_t = c.metadata) == null ? void 0 : _t.attachment_title,
|
|
1549
|
+
mimeType: (yt = c.metadata) == null ? void 0 : yt.attachment_mime_type,
|
|
1550
|
+
thumbnailUrl: (Ct = c.metadata) == null ? void 0 : Ct.attachment_thumbnail,
|
|
1551
|
+
amountText: (kt = c.metadata) == null ? void 0 : kt.amount_text,
|
|
1552
|
+
detail: (Et = c.metadata) == null ? void 0 : Et.attachment_detail,
|
|
1553
|
+
paymentStatus: (It = c.metadata) == null ? void 0 : It.payment_status,
|
|
1554
|
+
isUnlocking: A(c.id),
|
|
1555
|
+
onUnlockClick: () => T == null ? void 0 : T(c, w),
|
|
1559
1556
|
onFetchSource: async () => await (S == null ? void 0 : S(c, w)),
|
|
1560
|
-
onDownloadClick: () =>
|
|
1557
|
+
onDownloadClick: () => R == null ? void 0 : R(c, w)
|
|
1561
1558
|
}
|
|
1562
1559
|
),
|
|
1563
1560
|
U && /* @__PURE__ */ n(U, {})
|
|
1564
1561
|
] }),
|
|
1565
1562
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1566
|
-
|
|
1563
|
+
At,
|
|
1567
1564
|
{
|
|
1568
|
-
message:
|
|
1569
|
-
renderText:
|
|
1565
|
+
message: K,
|
|
1566
|
+
renderText: p
|
|
1570
1567
|
}
|
|
1571
1568
|
) })
|
|
1572
|
-
] }) :
|
|
1569
|
+
] }) : ut ? (
|
|
1573
1570
|
/* Tip-only messages render as a standalone bubble */
|
|
1574
1571
|
/* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
|
|
1575
1572
|
) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
1576
|
-
|
|
1573
|
+
ue && !ht && /* @__PURE__ */ n(
|
|
1577
1574
|
Pe,
|
|
1578
1575
|
{
|
|
1579
1576
|
message: c,
|
|
1580
1577
|
hasAttachment: Me,
|
|
1581
|
-
isMyMessage:
|
|
1578
|
+
isMyMessage: de
|
|
1582
1579
|
}
|
|
1583
1580
|
),
|
|
1584
|
-
|
|
1585
|
-
|
|
1581
|
+
dt && /* @__PURE__ */ n(Yn, { poll: dt }),
|
|
1582
|
+
j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
1586
1583
|
F,
|
|
1587
1584
|
{
|
|
1588
1585
|
actionHandler: l,
|
|
1589
|
-
attachments:
|
|
1586
|
+
attachments: j
|
|
1590
1587
|
}
|
|
1591
1588
|
) : null,
|
|
1592
|
-
|
|
1593
|
-
|
|
1589
|
+
W ? /* @__PURE__ */ n(
|
|
1590
|
+
b,
|
|
1594
1591
|
{
|
|
1595
|
-
message:
|
|
1596
|
-
renderText:
|
|
1592
|
+
message: K,
|
|
1593
|
+
renderText: p
|
|
1597
1594
|
}
|
|
1598
1595
|
) : /* @__PURE__ */ n(
|
|
1599
|
-
|
|
1596
|
+
At,
|
|
1600
1597
|
{
|
|
1601
|
-
message:
|
|
1602
|
-
renderText:
|
|
1598
|
+
message: K,
|
|
1599
|
+
renderText: p
|
|
1603
1600
|
}
|
|
1604
1601
|
),
|
|
1605
|
-
/* @__PURE__ */ n(
|
|
1602
|
+
/* @__PURE__ */ n(qn, {})
|
|
1606
1603
|
] }) })
|
|
1607
1604
|
}
|
|
1608
1605
|
),
|
|
1609
|
-
!
|
|
1610
|
-
(!
|
|
1606
|
+
!mt && !ut && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
1607
|
+
(!ue || ht) && /* @__PURE__ */ n(
|
|
1611
1608
|
Pe,
|
|
1612
1609
|
{
|
|
1613
1610
|
message: c,
|
|
1614
1611
|
hasAttachment: Me,
|
|
1615
|
-
isMyMessage:
|
|
1612
|
+
isMyMessage: de
|
|
1616
1613
|
}
|
|
1617
1614
|
),
|
|
1618
|
-
s &&
|
|
1615
|
+
s && ue && /* @__PURE__ */ n(
|
|
1619
1616
|
Na,
|
|
1620
1617
|
{
|
|
1621
1618
|
selected: E,
|
|
@@ -1624,14 +1621,14 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1624
1621
|
}
|
|
1625
1622
|
)
|
|
1626
1623
|
] }),
|
|
1627
|
-
|
|
1628
|
-
|
|
1624
|
+
ee && /* @__PURE__ */ n(
|
|
1625
|
+
Y,
|
|
1629
1626
|
{
|
|
1630
1627
|
onClick: d,
|
|
1631
1628
|
reply_count: c.reply_count
|
|
1632
1629
|
}
|
|
1633
1630
|
),
|
|
1634
|
-
|
|
1631
|
+
Q && /* @__PURE__ */ n(H, {})
|
|
1635
1632
|
]
|
|
1636
1633
|
},
|
|
1637
1634
|
c.id
|
|
@@ -1639,7 +1636,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1639
1636
|
] });
|
|
1640
1637
|
}, ya = z.memo(
|
|
1641
1638
|
_a,
|
|
1642
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
1639
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Tn(e, t)
|
|
1643
1640
|
), Ca = (e) => {
|
|
1644
1641
|
const t = be("CustomMessage");
|
|
1645
1642
|
return /* @__PURE__ */ n(ya, { ...t, ...e });
|
|
@@ -1647,25 +1644,25 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1647
1644
|
var s;
|
|
1648
1645
|
const { handleDelete: e, message: t } = be("CustomMessageActions");
|
|
1649
1646
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
1650
|
-
|
|
1647
|
+
Yt,
|
|
1651
1648
|
{
|
|
1652
1649
|
onClick: e,
|
|
1653
1650
|
"aria-label": "Delete",
|
|
1654
1651
|
title: "Delete",
|
|
1655
1652
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1656
|
-
children: /* @__PURE__ */ n(
|
|
1653
|
+
children: /* @__PURE__ */ n(ks, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1657
1654
|
}
|
|
1658
1655
|
);
|
|
1659
1656
|
}, Ea = () => {
|
|
1660
1657
|
const { handleFlag: e } = be("CustomMessageActions");
|
|
1661
1658
|
return /* @__PURE__ */ n(
|
|
1662
|
-
|
|
1659
|
+
Yt,
|
|
1663
1660
|
{
|
|
1664
1661
|
onClick: e,
|
|
1665
1662
|
"aria-label": "Report",
|
|
1666
1663
|
title: "Report",
|
|
1667
1664
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1668
|
-
children: /* @__PURE__ */ n(
|
|
1665
|
+
children: /* @__PURE__ */ n(Ut, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1669
1666
|
}
|
|
1670
1667
|
);
|
|
1671
1668
|
}, Ia = () => {
|
|
@@ -1682,7 +1679,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1682
1679
|
);
|
|
1683
1680
|
}, Sa = (e) => ({
|
|
1684
1681
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
1685
|
-
(t) =>
|
|
1682
|
+
(t) => Lt.previewIsLoaded(t) || Lt.previewIsLoading(t)
|
|
1686
1683
|
)
|
|
1687
1684
|
}), Ta = ({
|
|
1688
1685
|
link: e,
|
|
@@ -1725,7 +1722,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1725
1722
|
}
|
|
1726
1723
|
);
|
|
1727
1724
|
}, Aa = () => {
|
|
1728
|
-
const { linkPreviewsManager: e } =
|
|
1725
|
+
const { linkPreviewsManager: e } = Wn(), { linkPreviews: t } = Xn(
|
|
1729
1726
|
e.state,
|
|
1730
1727
|
Sa
|
|
1731
1728
|
), s = (r) => {
|
|
@@ -1739,7 +1736,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1739
1736
|
},
|
|
1740
1737
|
r.og_scrape_url
|
|
1741
1738
|
)) }) : null;
|
|
1742
|
-
},
|
|
1739
|
+
}, ln = z.createContext(!1), Ma = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1743
1740
|
"button",
|
|
1744
1741
|
{
|
|
1745
1742
|
...s,
|
|
@@ -1747,23 +1744,23 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1747
1744
|
"aria-label": "Send",
|
|
1748
1745
|
disabled: t,
|
|
1749
1746
|
onClick: e,
|
|
1750
|
-
children: /* @__PURE__ */ n(
|
|
1747
|
+
children: /* @__PURE__ */ n(Es, { weight: "bold", className: "size-4" })
|
|
1751
1748
|
}
|
|
1752
1749
|
), Da = () => {
|
|
1753
|
-
const e = Se(
|
|
1750
|
+
const e = Se(ln), { handleSubmit: t } = Jn(), s = Zn(), a = e || !s, {
|
|
1754
1751
|
SendButton: r = Ma,
|
|
1755
|
-
AttachmentPreviewList: i =
|
|
1756
|
-
} =
|
|
1752
|
+
AttachmentPreviewList: i = Qn
|
|
1753
|
+
} = Vt("CustomMessageInput");
|
|
1757
1754
|
return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
|
|
1758
|
-
/* @__PURE__ */ n(
|
|
1755
|
+
/* @__PURE__ */ n(es, {}),
|
|
1759
1756
|
/* @__PURE__ */ n(Aa, {}),
|
|
1760
1757
|
/* @__PURE__ */ n(i, {}),
|
|
1761
1758
|
/* @__PURE__ */ h("div", { className: "flex", children: [
|
|
1762
1759
|
/* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
|
|
1763
|
-
|
|
1760
|
+
ts,
|
|
1764
1761
|
{
|
|
1765
1762
|
"aria-disabled": e || void 0,
|
|
1766
|
-
className: "w-full resize-none outline-none leading-
|
|
1763
|
+
className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
|
|
1767
1764
|
autoFocus: !e,
|
|
1768
1765
|
maxRows: 4,
|
|
1769
1766
|
readOnly: e,
|
|
@@ -1790,8 +1787,8 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1790
1787
|
disabledReason: a
|
|
1791
1788
|
}) => {
|
|
1792
1789
|
var o;
|
|
1793
|
-
const { channel: r } =
|
|
1794
|
-
return s ? /* @__PURE__ */ h(
|
|
1790
|
+
const { channel: r } = ce(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
|
|
1791
|
+
return s ? /* @__PURE__ */ h(se, { children: [
|
|
1795
1792
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
1796
1793
|
t == null ? void 0 : t()
|
|
1797
1794
|
] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
|
|
@@ -1803,7 +1800,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1803
1800
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1804
1801
|
children: [
|
|
1805
1802
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
1806
|
-
/* @__PURE__ */ n(
|
|
1803
|
+
/* @__PURE__ */ n(ln.Provider, { value: i, children: /* @__PURE__ */ n(Kn, { Input: Da }) })
|
|
1807
1804
|
]
|
|
1808
1805
|
}
|
|
1809
1806
|
),
|
|
@@ -1819,10 +1816,10 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1819
1816
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1820
1817
|
], za = {
|
|
1821
1818
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1822
|
-
}, Oe = "age safety guidelines.", Fa = "https://linktr.ee/s/about/contact",
|
|
1819
|
+
}, Oe = "age safety guidelines.", Fa = "https://linktr.ee/s/about/contact", $t = (e) => La.includes(e), $a = (e) => Oa.includes(e), Ba = (e) => {
|
|
1823
1820
|
var a;
|
|
1824
1821
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
1825
|
-
if (
|
|
1822
|
+
if ($t(t))
|
|
1826
1823
|
return {
|
|
1827
1824
|
kind: "dm-agent",
|
|
1828
1825
|
type: t
|
|
@@ -1833,7 +1830,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1833
1830
|
type: t
|
|
1834
1831
|
};
|
|
1835
1832
|
const s = e.dm_agent_system_type;
|
|
1836
|
-
if (
|
|
1833
|
+
if ($t(s))
|
|
1837
1834
|
return {
|
|
1838
1835
|
kind: "dm-agent",
|
|
1839
1836
|
type: s
|
|
@@ -1843,7 +1840,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1843
1840
|
if (t === -1)
|
|
1844
1841
|
return e;
|
|
1845
1842
|
const s = t + Oe.length;
|
|
1846
|
-
return /* @__PURE__ */ h(
|
|
1843
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
1847
1844
|
e.slice(0, t),
|
|
1848
1845
|
/* @__PURE__ */ n(
|
|
1849
1846
|
"a",
|
|
@@ -1899,7 +1896,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1899
1896
|
"data-age-safety-system-type": s.type,
|
|
1900
1897
|
children: [
|
|
1901
1898
|
/* @__PURE__ */ n(
|
|
1902
|
-
|
|
1899
|
+
Is,
|
|
1903
1900
|
{
|
|
1904
1901
|
size: 24,
|
|
1905
1902
|
weight: "duotone",
|
|
@@ -1923,7 +1920,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1923
1920
|
] }),
|
|
1924
1921
|
!t && /* @__PURE__ */ n(De, { message: e.message })
|
|
1925
1922
|
] });
|
|
1926
|
-
},
|
|
1923
|
+
}, cn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
1927
1924
|
"animateTransform",
|
|
1928
1925
|
{
|
|
1929
1926
|
attributeName: "transform",
|
|
@@ -1938,12 +1935,12 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1938
1935
|
Re.Generating,
|
|
1939
1936
|
Re.ExternalSources
|
|
1940
1937
|
]), Ga = ({ threadList: e }) => {
|
|
1941
|
-
var
|
|
1942
|
-
const { channel: t, channelConfig: s, thread: a } =
|
|
1938
|
+
var p, N;
|
|
1939
|
+
const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } = ns(), { aiState: o } = ss(t), l = Se(cn);
|
|
1943
1940
|
if (!e && l && Ua.has(o)) {
|
|
1944
|
-
const v = Ha(t, (
|
|
1941
|
+
const v = Ha(t, (p = r.user) == null ? void 0 : p.id);
|
|
1945
1942
|
return /* @__PURE__ */ n(
|
|
1946
|
-
|
|
1943
|
+
Bt,
|
|
1947
1944
|
{
|
|
1948
1945
|
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
1949
1946
|
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
@@ -1969,7 +1966,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1969
1966
|
return null;
|
|
1970
1967
|
const f = (N = u[0]) == null ? void 0 : N.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
1971
1968
|
return /* @__PURE__ */ n(
|
|
1972
|
-
|
|
1969
|
+
Bt,
|
|
1973
1970
|
{
|
|
1974
1971
|
avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
1975
1972
|
avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
|
|
@@ -1977,7 +1974,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1977
1974
|
testId: "typing-indicator"
|
|
1978
1975
|
}
|
|
1979
1976
|
);
|
|
1980
|
-
},
|
|
1977
|
+
}, Bt = ({
|
|
1981
1978
|
avatarId: e,
|
|
1982
1979
|
avatarName: t,
|
|
1983
1980
|
avatarImage: s,
|
|
@@ -1990,7 +1987,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1990
1987
|
style: { insetInlineStart: 0, insetInlineEnd: "auto" },
|
|
1991
1988
|
children: [
|
|
1992
1989
|
/* @__PURE__ */ n("div", { className: "shrink-0", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
1993
|
-
|
|
1990
|
+
ae,
|
|
1994
1991
|
{
|
|
1995
1992
|
id: e,
|
|
1996
1993
|
name: t,
|
|
@@ -2075,7 +2072,7 @@ const Ya = () => null, qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2075
2072
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2076
2073
|
] }) }));
|
|
2077
2074
|
ke.displayName = "LoadingState";
|
|
2078
|
-
const
|
|
2075
|
+
const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", jt = "Replies instantly with AI assistant", Wa = ({
|
|
2079
2076
|
onBack: e,
|
|
2080
2077
|
showBackButton: t,
|
|
2081
2078
|
onShowInfo: s,
|
|
@@ -2083,17 +2080,17 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2083
2080
|
showStarButton: r = !1,
|
|
2084
2081
|
dmAgentEnabled: i = !1
|
|
2085
2082
|
}) => {
|
|
2086
|
-
var f, c,
|
|
2087
|
-
const { channel: o } =
|
|
2088
|
-
var
|
|
2089
|
-
const x = (
|
|
2090
|
-
return x ? Object.values(((
|
|
2083
|
+
var f, c, p, N, v;
|
|
2084
|
+
const { channel: o } = ce(), l = z.useMemo(() => {
|
|
2085
|
+
var A, T;
|
|
2086
|
+
const x = (A = o._client) == null ? void 0 : A.userID;
|
|
2087
|
+
return x ? Object.values(((T = o.state) == null ? void 0 : T.members) || {}).find(
|
|
2091
2088
|
(S) => {
|
|
2092
|
-
var
|
|
2093
|
-
return ((
|
|
2089
|
+
var R;
|
|
2090
|
+
return ((R = S.user) == null ? void 0 : R.id) && S.user.id !== x;
|
|
2094
2091
|
}
|
|
2095
2092
|
) : void 0;
|
|
2096
|
-
}, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Te(l == null ? void 0 : l.user), m = (
|
|
2093
|
+
}, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Te(l == null ? void 0 : l.user), m = (p = l == null ? void 0 : l.user) == null ? void 0 : p.image, g = Wt(o), u = async () => {
|
|
2097
2094
|
try {
|
|
2098
2095
|
g ? await o.unpin() : await o.pin();
|
|
2099
2096
|
} catch (x) {
|
|
@@ -2104,56 +2101,53 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2104
2101
|
}
|
|
2105
2102
|
};
|
|
2106
2103
|
return /* @__PURE__ */ h("div", { className: "@container", children: [
|
|
2107
|
-
/* @__PURE__ */ h("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden", children: [
|
|
2104
|
+
/* @__PURE__ */ h("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden px-6 py-3", children: [
|
|
2108
2105
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
|
|
2109
2106
|
"button",
|
|
2110
2107
|
{
|
|
2111
2108
|
className: y(
|
|
2112
|
-
|
|
2113
|
-
"messaging-channel-view-back-button-mobile"
|
|
2109
|
+
oe,
|
|
2110
|
+
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
2114
2111
|
),
|
|
2115
2112
|
onClick: e || (() => {
|
|
2116
2113
|
}),
|
|
2117
2114
|
type: "button",
|
|
2118
2115
|
"aria-label": "Back to conversations",
|
|
2119
|
-
children: /* @__PURE__ */ n(
|
|
2116
|
+
children: /* @__PURE__ */ n(Dt, { className: "size-5 text-black/90" })
|
|
2120
2117
|
}
|
|
2121
2118
|
) }),
|
|
2122
2119
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
2123
2120
|
/* @__PURE__ */ n(
|
|
2124
|
-
|
|
2121
|
+
ae,
|
|
2125
2122
|
{
|
|
2126
2123
|
id: ((N = l == null ? void 0 : l.user) == null ? void 0 : N.id) || o.id || "unknown",
|
|
2127
2124
|
name: d,
|
|
2128
2125
|
image: m,
|
|
2129
2126
|
starred: r && g,
|
|
2130
2127
|
dmAgentEnabled: i,
|
|
2131
|
-
size:
|
|
2128
|
+
size: 48
|
|
2132
2129
|
}
|
|
2133
2130
|
),
|
|
2134
|
-
/* @__PURE__ */
|
|
2131
|
+
/* @__PURE__ */ n(
|
|
2135
2132
|
"button",
|
|
2136
2133
|
{
|
|
2137
2134
|
type: "button",
|
|
2138
2135
|
onClick: s,
|
|
2139
|
-
className: "flex items-center gap-0.5 rounded-full
|
|
2136
|
+
className: "flex items-center gap-0.5 rounded-full px-3 py-1 text-xs font-medium text-black/90 hover:bg-black/[0.08] transition-colors",
|
|
2140
2137
|
"aria-label": `View info for ${d}`,
|
|
2141
|
-
children:
|
|
2142
|
-
d,
|
|
2143
|
-
/* @__PURE__ */ n(Ve, { className: "size-3 shrink-0" })
|
|
2144
|
-
]
|
|
2138
|
+
children: d
|
|
2145
2139
|
}
|
|
2146
2140
|
),
|
|
2147
2141
|
i && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2148
2142
|
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
2149
|
-
/* @__PURE__ */ n("span", { children:
|
|
2143
|
+
/* @__PURE__ */ n("span", { children: jt })
|
|
2150
2144
|
] })
|
|
2151
2145
|
] }),
|
|
2152
2146
|
/* @__PURE__ */ h("div", { className: "flex justify-end items-center gap-2", children: [
|
|
2153
2147
|
r && /* @__PURE__ */ n(
|
|
2154
2148
|
"button",
|
|
2155
2149
|
{
|
|
2156
|
-
className:
|
|
2150
|
+
className: oe,
|
|
2157
2151
|
onClick: u,
|
|
2158
2152
|
type: "button",
|
|
2159
2153
|
"aria-label": g ? "Unstar conversation" : "Star conversation",
|
|
@@ -2172,58 +2166,55 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2172
2166
|
/* @__PURE__ */ n(
|
|
2173
2167
|
"button",
|
|
2174
2168
|
{
|
|
2175
|
-
className:
|
|
2169
|
+
className: y(oe, "bg-[#F1F0EE]"),
|
|
2176
2170
|
onClick: s,
|
|
2177
2171
|
type: "button",
|
|
2178
2172
|
"aria-label": "Show info",
|
|
2179
|
-
children: /* @__PURE__ */ n(
|
|
2173
|
+
children: /* @__PURE__ */ n(Rt, { className: "size-5 text-black/90" })
|
|
2180
2174
|
}
|
|
2181
2175
|
)
|
|
2182
2176
|
] })
|
|
2183
2177
|
] }),
|
|
2184
|
-
/* @__PURE__ */ h("div", { className: "hidden @lg:flex items-center justify-between gap-3 min-h-12", children: [
|
|
2178
|
+
/* @__PURE__ */ h("div", { className: "px-6 py-3 hidden @lg:flex items-center justify-between gap-3 min-h-12 border-b border-b-black/[0.08]", children: [
|
|
2185
2179
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-4 min-w-0", children: [
|
|
2186
2180
|
t && e && /* @__PURE__ */ n(
|
|
2187
2181
|
"button",
|
|
2188
2182
|
{
|
|
2189
2183
|
className: y(
|
|
2190
|
-
|
|
2184
|
+
oe,
|
|
2191
2185
|
"messaging-channel-view-back-button-desktop"
|
|
2192
2186
|
),
|
|
2193
2187
|
type: "button",
|
|
2194
2188
|
onClick: e,
|
|
2195
2189
|
"aria-label": "Back to conversations",
|
|
2196
|
-
children: /* @__PURE__ */ n(
|
|
2190
|
+
children: /* @__PURE__ */ n(Dt, { className: "size-5 text-black/90" })
|
|
2197
2191
|
}
|
|
2198
2192
|
),
|
|
2199
2193
|
/* @__PURE__ */ n(
|
|
2200
|
-
|
|
2194
|
+
ae,
|
|
2201
2195
|
{
|
|
2202
2196
|
id: ((v = l == null ? void 0 : l.user) == null ? void 0 : v.id) || o.id || "unknown",
|
|
2203
2197
|
name: d,
|
|
2204
2198
|
image: m,
|
|
2205
2199
|
starred: r && g,
|
|
2206
2200
|
dmAgentEnabled: i,
|
|
2207
|
-
size:
|
|
2201
|
+
size: 48
|
|
2208
2202
|
}
|
|
2209
2203
|
),
|
|
2210
2204
|
/* @__PURE__ */ h("div", { className: "min-w-0", children: [
|
|
2211
|
-
a ? /* @__PURE__ */
|
|
2205
|
+
a ? /* @__PURE__ */ n(
|
|
2212
2206
|
"button",
|
|
2213
2207
|
{
|
|
2214
2208
|
type: "button",
|
|
2215
2209
|
onClick: s,
|
|
2216
2210
|
className: "flex items-center gap-1 font-medium text-black/90 truncate hover:text-black/70 transition-colors",
|
|
2217
2211
|
"aria-label": `View info for ${d}`,
|
|
2218
|
-
children:
|
|
2219
|
-
/* @__PURE__ */ n("span", { className: "truncate", children: d }),
|
|
2220
|
-
/* @__PURE__ */ n(Ve, { className: "size-4 shrink-0" })
|
|
2221
|
-
]
|
|
2212
|
+
children: /* @__PURE__ */ n("span", { className: "truncate", children: d })
|
|
2222
2213
|
}
|
|
2223
2214
|
) : /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: d }),
|
|
2224
2215
|
i && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2225
2216
|
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
2226
|
-
/* @__PURE__ */ n("span", { className: "truncate", children:
|
|
2217
|
+
/* @__PURE__ */ n("span", { className: "truncate", children: jt })
|
|
2227
2218
|
] })
|
|
2228
2219
|
] })
|
|
2229
2220
|
] }),
|
|
@@ -2231,14 +2222,14 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2231
2222
|
r && /* @__PURE__ */ n(
|
|
2232
2223
|
"button",
|
|
2233
2224
|
{
|
|
2234
|
-
className:
|
|
2225
|
+
className: oe,
|
|
2235
2226
|
onClick: u,
|
|
2236
2227
|
type: "button",
|
|
2237
2228
|
"aria-label": g ? "Unstar conversation" : "Star conversation",
|
|
2238
2229
|
children: /* @__PURE__ */ n(
|
|
2239
2230
|
$e,
|
|
2240
2231
|
{
|
|
2241
|
-
className: y("size-
|
|
2232
|
+
className: y("size-6", {
|
|
2242
2233
|
"text-yellow-600": g,
|
|
2243
2234
|
"text-black/90": !g
|
|
2244
2235
|
}),
|
|
@@ -2250,11 +2241,11 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2250
2241
|
a && s && /* @__PURE__ */ n(
|
|
2251
2242
|
"button",
|
|
2252
2243
|
{
|
|
2253
|
-
className:
|
|
2244
|
+
className: oe,
|
|
2254
2245
|
onClick: s,
|
|
2255
2246
|
type: "button",
|
|
2256
2247
|
"aria-label": "Show info",
|
|
2257
|
-
children: /* @__PURE__ */ n(
|
|
2248
|
+
children: /* @__PURE__ */ n(Rt, { className: "size-6 text-black/90" })
|
|
2258
2249
|
}
|
|
2259
2250
|
)
|
|
2260
2251
|
] })
|
|
@@ -2275,71 +2266,71 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2275
2266
|
showBlockParticipant: u = !0,
|
|
2276
2267
|
showReportParticipant: f = !0,
|
|
2277
2268
|
showFollowerStatus: c = !0,
|
|
2278
|
-
composerDisabled:
|
|
2269
|
+
composerDisabled: p = !1,
|
|
2279
2270
|
composerDisabledReason: N,
|
|
2280
2271
|
showStarButton: v = !1,
|
|
2281
2272
|
chatbotVotingEnabled: x = !1,
|
|
2282
2273
|
renderChannelBanner: w,
|
|
2283
|
-
customProfileContent:
|
|
2284
|
-
customChannelActions:
|
|
2274
|
+
customProfileContent: A,
|
|
2275
|
+
customChannelActions: T,
|
|
2285
2276
|
renderMessage: S,
|
|
2286
|
-
dmAgentEnabled:
|
|
2277
|
+
dmAgentEnabled: R = !1,
|
|
2287
2278
|
viewerLanguage: I
|
|
2288
2279
|
}) => {
|
|
2289
|
-
var H,
|
|
2290
|
-
const { channel: C } =
|
|
2291
|
-
var
|
|
2292
|
-
const
|
|
2293
|
-
return
|
|
2294
|
-
(
|
|
2295
|
-
var
|
|
2296
|
-
return ((
|
|
2280
|
+
var H, Y, $, b, _, L;
|
|
2281
|
+
const { channel: C } = ce(), k = X(null), E = z.useMemo(() => {
|
|
2282
|
+
var j, K;
|
|
2283
|
+
const M = (j = C._client) == null ? void 0 : j.userID;
|
|
2284
|
+
return M ? Object.values(((K = C.state) == null ? void 0 : K.members) || {}).find(
|
|
2285
|
+
(ee) => {
|
|
2286
|
+
var Q;
|
|
2287
|
+
return ((Q = ee.user) == null ? void 0 : Q.id) && ee.user.id !== M;
|
|
2297
2288
|
}
|
|
2298
2289
|
) : void 0;
|
|
2299
|
-
}, [(H = C._client) == null ? void 0 : H.userID, (
|
|
2300
|
-
var
|
|
2301
|
-
const
|
|
2302
|
-
return
|
|
2303
|
-
var
|
|
2304
|
-
return ((
|
|
2290
|
+
}, [(H = C._client) == null ? void 0 : H.userID, (Y = C.state) == null ? void 0 : Y.members]), D = z.useMemo(() => {
|
|
2291
|
+
var j, K;
|
|
2292
|
+
const M = (j = C._client) == null ? void 0 : j.userID;
|
|
2293
|
+
return M ? Object.values(((K = C.state) == null ? void 0 : K.members) || {}).find((ee) => {
|
|
2294
|
+
var Q;
|
|
2295
|
+
return ((Q = ee.user) == null ? void 0 : Q.id) === M;
|
|
2305
2296
|
}) : void 0;
|
|
2306
|
-
}, [($ = C._client) == null ? void 0 : $.userID, (
|
|
2297
|
+
}, [($ = C._client) == null ? void 0 : $.userID, (b = C.state) == null ? void 0 : b.members]), V = ((_ = D == null ? void 0 : D.user) == null ? void 0 : _.is_account) ?? (D == null ? void 0 : D.is_account), F = ((L = E == null ? void 0 : E.user) == null ? void 0 : L.is_account) ?? (E == null ? void 0 : E.is_account), Z = R && V === !1 && F === !0, U = z.useMemo(() => {
|
|
2307
2298
|
if (!c) return;
|
|
2308
|
-
const
|
|
2309
|
-
if (
|
|
2310
|
-
return String(
|
|
2311
|
-
if (
|
|
2312
|
-
return
|
|
2299
|
+
const M = C.data ?? {};
|
|
2300
|
+
if (M.followerStatus)
|
|
2301
|
+
return String(M.followerStatus);
|
|
2302
|
+
if (M.isFollower !== void 0)
|
|
2303
|
+
return M.isFollower ? "Subscribed to you" : "Not subscribed";
|
|
2313
2304
|
}, [C.data, c]), G = q(() => {
|
|
2314
|
-
var
|
|
2315
|
-
(
|
|
2305
|
+
var M;
|
|
2306
|
+
(M = k.current) == null || M.showModal();
|
|
2316
2307
|
}, []), P = q(() => {
|
|
2317
|
-
var
|
|
2318
|
-
(
|
|
2308
|
+
var M;
|
|
2309
|
+
(M = k.current) == null || M.close();
|
|
2319
2310
|
}, []), B = q(
|
|
2320
|
-
(
|
|
2321
|
-
const { message:
|
|
2311
|
+
(M) => {
|
|
2312
|
+
const { message: W } = be("ChannelView"), j = /* @__PURE__ */ n(
|
|
2322
2313
|
Ca,
|
|
2323
2314
|
{
|
|
2324
|
-
...
|
|
2315
|
+
...M,
|
|
2325
2316
|
chatbotVotingEnabled: x,
|
|
2326
2317
|
viewerLanguage: I
|
|
2327
2318
|
}
|
|
2328
2319
|
);
|
|
2329
|
-
return !S || !
|
|
2320
|
+
return !S || !W ? j : S(j, W);
|
|
2330
2321
|
},
|
|
2331
2322
|
[x, S, I]
|
|
2332
2323
|
);
|
|
2333
|
-
return /* @__PURE__ */ h(
|
|
2324
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
2334
2325
|
/* @__PURE__ */ n(
|
|
2335
|
-
|
|
2326
|
+
rs,
|
|
2336
2327
|
{
|
|
2337
2328
|
overrides: {
|
|
2338
2329
|
Message: B,
|
|
2339
2330
|
MessageActions: Ia
|
|
2340
2331
|
},
|
|
2341
|
-
children: /* @__PURE__ */ h(
|
|
2342
|
-
/* @__PURE__ */ n("div", {
|
|
2332
|
+
children: /* @__PURE__ */ h(is, { children: [
|
|
2333
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
2343
2334
|
Wa,
|
|
2344
2335
|
{
|
|
2345
2336
|
onBack: e,
|
|
@@ -2347,7 +2338,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2347
2338
|
onShowInfo: G,
|
|
2348
2339
|
canShowInfo: !!E,
|
|
2349
2340
|
showStarButton: v,
|
|
2350
|
-
dmAgentEnabled:
|
|
2341
|
+
dmAgentEnabled: Z
|
|
2351
2342
|
}
|
|
2352
2343
|
) }, "lt-channel-header"),
|
|
2353
2344
|
w ? /* @__PURE__ */ n(z.Fragment, { children: w() }, "lt-channel-banner") : null,
|
|
@@ -2356,7 +2347,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2356
2347
|
{
|
|
2357
2348
|
className: "flex-1 overflow-hidden relative",
|
|
2358
2349
|
children: /* @__PURE__ */ n(
|
|
2359
|
-
|
|
2350
|
+
os,
|
|
2360
2351
|
{
|
|
2361
2352
|
hideDeletedMessages: !0,
|
|
2362
2353
|
hideNewMessageSeparator: !1
|
|
@@ -2369,9 +2360,11 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2369
2360
|
/* @__PURE__ */ n(
|
|
2370
2361
|
Ra,
|
|
2371
2362
|
{
|
|
2372
|
-
|
|
2363
|
+
...s && {
|
|
2364
|
+
renderActions: () => s == null ? void 0 : s(C)
|
|
2365
|
+
},
|
|
2373
2366
|
renderFooter: () => a == null ? void 0 : a(C),
|
|
2374
|
-
disabled:
|
|
2367
|
+
disabled: p,
|
|
2375
2368
|
disabledReason: N
|
|
2376
2369
|
},
|
|
2377
2370
|
"lt-channel-message-input"
|
|
@@ -2396,12 +2389,12 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2396
2389
|
onDeleteConversationClick: d,
|
|
2397
2390
|
onBlockParticipantClick: m,
|
|
2398
2391
|
onReportParticipantClick: g,
|
|
2399
|
-
customProfileContent:
|
|
2400
|
-
customChannelActions:
|
|
2392
|
+
customProfileContent: A,
|
|
2393
|
+
customChannelActions: T
|
|
2401
2394
|
}
|
|
2402
2395
|
)
|
|
2403
2396
|
] });
|
|
2404
|
-
},
|
|
2397
|
+
}, dn = z.memo(
|
|
2405
2398
|
({
|
|
2406
2399
|
channel: e,
|
|
2407
2400
|
onBack: t,
|
|
@@ -2417,15 +2410,15 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2417
2410
|
onDeleteConversationClick: u,
|
|
2418
2411
|
onBlockParticipantClick: f,
|
|
2419
2412
|
onReportParticipantClick: c,
|
|
2420
|
-
showBlockParticipant:
|
|
2413
|
+
showBlockParticipant: p = !0,
|
|
2421
2414
|
showReportParticipant: N = !0,
|
|
2422
2415
|
showFollowerStatus: v = !0,
|
|
2423
2416
|
composerDisabled: x = !1,
|
|
2424
2417
|
composerDisabledReason: w,
|
|
2425
|
-
dmAgentEnabled:
|
|
2426
|
-
messageMetadata:
|
|
2418
|
+
dmAgentEnabled: A,
|
|
2419
|
+
messageMetadata: T,
|
|
2427
2420
|
onMessageSent: S,
|
|
2428
|
-
showStarButton:
|
|
2421
|
+
showStarButton: R = !1,
|
|
2429
2422
|
chatbotVotingEnabled: I = !1,
|
|
2430
2423
|
renderChannelBanner: C,
|
|
2431
2424
|
customProfileContent: k,
|
|
@@ -2433,38 +2426,38 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2433
2426
|
renderMessage: D,
|
|
2434
2427
|
onMessageLinkClick: V,
|
|
2435
2428
|
sendButton: F,
|
|
2436
|
-
attachmentPreviewList:
|
|
2429
|
+
attachmentPreviewList: Z,
|
|
2437
2430
|
viewerLanguage: U
|
|
2438
2431
|
}) => {
|
|
2439
2432
|
const G = q(
|
|
2440
|
-
async (B, H,
|
|
2441
|
-
var
|
|
2442
|
-
const $ = ((
|
|
2433
|
+
async (B, H, Y) => {
|
|
2434
|
+
var W;
|
|
2435
|
+
const $ = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, b = A && !$, _ = {
|
|
2443
2436
|
...H,
|
|
2444
|
-
...
|
|
2445
|
-
...
|
|
2437
|
+
...b && { silent: !0 },
|
|
2438
|
+
...T && {
|
|
2446
2439
|
metadata: {
|
|
2447
2440
|
...H.metadata ?? {},
|
|
2448
|
-
...
|
|
2441
|
+
...T
|
|
2449
2442
|
}
|
|
2450
2443
|
}
|
|
2451
|
-
},
|
|
2452
|
-
...
|
|
2453
|
-
...
|
|
2454
|
-
},
|
|
2455
|
-
return S == null || S(
|
|
2444
|
+
}, L = {
|
|
2445
|
+
...Y,
|
|
2446
|
+
...b && { skip_push: !0 }
|
|
2447
|
+
}, M = await e.sendMessage(_, L);
|
|
2448
|
+
return S == null || S(M), M;
|
|
2456
2449
|
},
|
|
2457
|
-
[e,
|
|
2458
|
-
), P =
|
|
2450
|
+
[e, A, T, S]
|
|
2451
|
+
), P = X(null);
|
|
2459
2452
|
return J(() => {
|
|
2460
2453
|
if (!V) return;
|
|
2461
2454
|
const B = P.current;
|
|
2462
2455
|
if (!B) return;
|
|
2463
|
-
const H = (
|
|
2464
|
-
const $ =
|
|
2456
|
+
const H = (Y) => {
|
|
2457
|
+
const $ = Y.target, b = $ == null ? void 0 : $.closest("a[href]"), _ = b == null ? void 0 : b.getAttribute("href");
|
|
2465
2458
|
if (!_) return;
|
|
2466
|
-
const
|
|
2467
|
-
V(_,
|
|
2459
|
+
const L = b == null ? void 0 : b.closest("[data-message-id]"), M = L == null ? void 0 : L.getAttribute("data-message-id"), W = M ? e.state.messages.find((j) => j.id === M) : void 0;
|
|
2460
|
+
V(_, W);
|
|
2468
2461
|
};
|
|
2469
2462
|
return B.addEventListener("click", H), () => B.removeEventListener("click", H);
|
|
2470
2463
|
}, [V, e]), /* @__PURE__ */ n(
|
|
@@ -2475,8 +2468,8 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2475
2468
|
"messaging-channel-view h-full flex flex-col",
|
|
2476
2469
|
d
|
|
2477
2470
|
),
|
|
2478
|
-
children: /* @__PURE__ */ n(
|
|
2479
|
-
|
|
2471
|
+
children: /* @__PURE__ */ n(cn.Provider, { value: A ?? !1, children: /* @__PURE__ */ n(
|
|
2472
|
+
as,
|
|
2480
2473
|
{
|
|
2481
2474
|
channel: e,
|
|
2482
2475
|
MessageSystem: Va,
|
|
@@ -2486,7 +2479,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2486
2479
|
TypingIndicator: Ga,
|
|
2487
2480
|
doSendMessageRequest: G,
|
|
2488
2481
|
...F ? { SendButton: F } : {},
|
|
2489
|
-
...
|
|
2482
|
+
...Z ? { AttachmentPreviewList: Z } : {},
|
|
2490
2483
|
children: /* @__PURE__ */ n(
|
|
2491
2484
|
Xa,
|
|
2492
2485
|
{
|
|
@@ -2502,13 +2495,13 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2502
2495
|
onDeleteConversationClick: u,
|
|
2503
2496
|
onBlockParticipantClick: f,
|
|
2504
2497
|
onReportParticipantClick: c,
|
|
2505
|
-
showBlockParticipant:
|
|
2498
|
+
showBlockParticipant: p,
|
|
2506
2499
|
showReportParticipant: N,
|
|
2507
2500
|
showFollowerStatus: v,
|
|
2508
2501
|
composerDisabled: x,
|
|
2509
2502
|
composerDisabledReason: w,
|
|
2510
|
-
showStarButton:
|
|
2511
|
-
dmAgentEnabled:
|
|
2503
|
+
showStarButton: R,
|
|
2504
|
+
dmAgentEnabled: A,
|
|
2512
2505
|
chatbotVotingEnabled: I,
|
|
2513
2506
|
renderChannelBanner: C,
|
|
2514
2507
|
customProfileContent: k,
|
|
@@ -2523,7 +2516,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2523
2516
|
);
|
|
2524
2517
|
}
|
|
2525
2518
|
);
|
|
2526
|
-
|
|
2519
|
+
dn.displayName = "ChannelView";
|
|
2527
2520
|
const he = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
2528
2521
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
2529
2522
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -2554,101 +2547,111 @@ const _i = ({
|
|
|
2554
2547
|
onMessageSent: u,
|
|
2555
2548
|
chatbotVotingEnabled: f = !1,
|
|
2556
2549
|
viewerLanguage: c,
|
|
2557
|
-
renderChannelBanner:
|
|
2550
|
+
renderChannelBanner: p,
|
|
2558
2551
|
customChannelActions: N,
|
|
2559
2552
|
renderMessage: v,
|
|
2560
2553
|
onMessageLinkClick: x
|
|
2561
2554
|
}) => {
|
|
2562
2555
|
const {
|
|
2563
2556
|
client: w,
|
|
2564
|
-
isConnected:
|
|
2565
|
-
isLoading:
|
|
2557
|
+
isConnected: A,
|
|
2558
|
+
isLoading: T,
|
|
2566
2559
|
error: S,
|
|
2567
|
-
refreshConnection:
|
|
2560
|
+
refreshConnection: R,
|
|
2568
2561
|
service: I,
|
|
2569
2562
|
debug: C
|
|
2570
|
-
} = Ds(), [k, E] = O(null), [D, V] = O(null), [F,
|
|
2563
|
+
} = Ds(), [k, E] = O(null), [D, V] = O(null), [F, Z] = O(!1), { showDeleteConversation: U = !0 } = e, G = X(o);
|
|
2571
2564
|
G.current = o;
|
|
2572
|
-
const P =
|
|
2573
|
-
P.current = a
|
|
2574
|
-
|
|
2565
|
+
const P = X(a);
|
|
2566
|
+
P.current = a;
|
|
2567
|
+
const B = X(null), H = X(null);
|
|
2568
|
+
J(() => {
|
|
2569
|
+
H.current = k;
|
|
2570
|
+
}, [k]), J(() => {
|
|
2571
|
+
if (!w || !A) return;
|
|
2572
|
+
const b = w.userID;
|
|
2573
|
+
if (!b) return;
|
|
2574
|
+
const _ = `${b}::${i}`;
|
|
2575
|
+
if (B.current === _) return;
|
|
2576
|
+
B.current = _;
|
|
2577
|
+
const L = () => {
|
|
2578
|
+
B.current === _ && (B.current = null);
|
|
2579
|
+
};
|
|
2575
2580
|
(async () => {
|
|
2576
|
-
var
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2581
|
+
var W, j;
|
|
2582
|
+
try {
|
|
2583
|
+
C && console.log(
|
|
2584
|
+
"[MessagingShell] Loading initial conversation with:",
|
|
2585
|
+
i
|
|
2586
|
+
);
|
|
2587
|
+
const K = await w.queryChannels(
|
|
2588
|
+
{
|
|
2589
|
+
type: "messaging",
|
|
2590
|
+
members: { $eq: [b, i] }
|
|
2591
|
+
},
|
|
2592
|
+
{},
|
|
2593
|
+
{ limit: 1 }
|
|
2594
|
+
);
|
|
2595
|
+
if (K.length > 0) {
|
|
2596
|
+
E(K[0]), V(null), (W = P.current) == null || W.call(P, K[0]), C && console.log(
|
|
2597
|
+
"[MessagingShell] Initial conversation loaded:",
|
|
2598
|
+
K[0].id
|
|
2599
|
+
);
|
|
2600
|
+
return;
|
|
2601
|
+
}
|
|
2602
|
+
const ee = G.current;
|
|
2603
|
+
if (!ee || !I) {
|
|
2604
|
+
L(), V("No conversation found with this account"), C && console.log(
|
|
2605
|
+
"[MessagingShell] No conversation found for:",
|
|
2582
2606
|
i
|
|
2583
2607
|
);
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2608
|
+
return;
|
|
2609
|
+
}
|
|
2610
|
+
try {
|
|
2611
|
+
const Q = await I.startChannelWithParticipant({
|
|
2612
|
+
id: ee.id,
|
|
2613
|
+
name: ee.name,
|
|
2614
|
+
phone: ee.phone
|
|
2615
|
+
});
|
|
2616
|
+
E(Q), V(null), (j = P.current) == null || j.call(P, Q), C && console.log(
|
|
2617
|
+
"[MessagingShell] Channel created and loaded:",
|
|
2618
|
+
Q.id
|
|
2591
2619
|
);
|
|
2592
|
-
|
|
2593
|
-
E(R[0]), V(null), (p = P.current) == null || p.call(P, R[0]), C && console.log(
|
|
2594
|
-
"[MessagingShell] Initial conversation loaded:",
|
|
2595
|
-
R[0].id
|
|
2596
|
-
);
|
|
2597
|
-
return;
|
|
2598
|
-
}
|
|
2599
|
-
const T = G.current;
|
|
2600
|
-
if (!T || !I) {
|
|
2601
|
-
V("No conversation found with this account"), C && console.log(
|
|
2602
|
-
"[MessagingShell] No conversation found for:",
|
|
2603
|
-
i
|
|
2604
|
-
);
|
|
2605
|
-
return;
|
|
2606
|
-
}
|
|
2607
|
-
try {
|
|
2608
|
-
const j = await I.startChannelWithParticipant({
|
|
2609
|
-
id: T.id,
|
|
2610
|
-
name: T.name,
|
|
2611
|
-
phone: T.phone
|
|
2612
|
-
});
|
|
2613
|
-
E(j), V(null), (_ = P.current) == null || _.call(P, j), C && console.log(
|
|
2614
|
-
"[MessagingShell] Channel created and loaded:",
|
|
2615
|
-
j.id
|
|
2616
|
-
);
|
|
2617
|
-
} catch (j) {
|
|
2618
|
-
console.error(
|
|
2619
|
-
"[MessagingShell] Failed to create conversation:",
|
|
2620
|
-
j
|
|
2621
|
-
), V("Failed to create conversation");
|
|
2622
|
-
}
|
|
2623
|
-
} catch (R) {
|
|
2620
|
+
} catch (Q) {
|
|
2624
2621
|
console.error(
|
|
2625
|
-
"[MessagingShell] Failed to
|
|
2626
|
-
|
|
2627
|
-
), V("Failed to
|
|
2622
|
+
"[MessagingShell] Failed to create conversation:",
|
|
2623
|
+
Q
|
|
2624
|
+
), L(), V("Failed to create conversation");
|
|
2628
2625
|
}
|
|
2626
|
+
} catch (K) {
|
|
2627
|
+
console.error(
|
|
2628
|
+
"[MessagingShell] Failed to load initial conversation:",
|
|
2629
|
+
K
|
|
2630
|
+
), L(), H.current || V("Failed to load conversation");
|
|
2631
|
+
}
|
|
2629
2632
|
})();
|
|
2630
|
-
}, [i, w,
|
|
2631
|
-
const
|
|
2632
|
-
|
|
2633
|
-
const
|
|
2634
|
-
var
|
|
2635
|
-
E(null),
|
|
2633
|
+
}, [i, w, A, I, C]);
|
|
2634
|
+
const Y = X(r);
|
|
2635
|
+
Y.current = r;
|
|
2636
|
+
const $ = q(() => {
|
|
2637
|
+
var b;
|
|
2638
|
+
E(null), Z(!0), (b = Y.current) == null || b.call(Y);
|
|
2636
2639
|
}, []);
|
|
2637
|
-
return
|
|
2640
|
+
return T ? /* @__PURE__ */ n(ke, {}) : S ? /* @__PURE__ */ n(he, { message: S, onBack: R }) : !A || !w ? /* @__PURE__ */ n(
|
|
2638
2641
|
he,
|
|
2639
2642
|
{
|
|
2640
2643
|
message: "Not connected to messaging service",
|
|
2641
|
-
onBack:
|
|
2644
|
+
onBack: R
|
|
2642
2645
|
}
|
|
2643
2646
|
) : D ? /* @__PURE__ */ n(he, { message: D }) : F && !k ? /* @__PURE__ */ n(he, { message: "Conversation ended" }) : k ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
|
|
2644
|
-
|
|
2647
|
+
dn,
|
|
2645
2648
|
{
|
|
2646
2649
|
channel: k,
|
|
2647
2650
|
renderMessageInputActions: t,
|
|
2648
2651
|
renderConversationFooter: s,
|
|
2649
|
-
renderChannelBanner:
|
|
2650
|
-
onLeaveConversation:
|
|
2651
|
-
onBlockParticipant:
|
|
2652
|
+
renderChannelBanner: p,
|
|
2653
|
+
onLeaveConversation: $,
|
|
2654
|
+
onBlockParticipant: $,
|
|
2652
2655
|
CustomChannelEmptyState: l,
|
|
2653
2656
|
showDeleteConversation: U,
|
|
2654
2657
|
onBlockParticipantClick: d,
|
|
@@ -2670,14 +2673,14 @@ function Ka(e) {
|
|
|
2670
2673
|
for (const s of t)
|
|
2671
2674
|
e.state.addMessageSorted(s.message);
|
|
2672
2675
|
}
|
|
2673
|
-
const
|
|
2676
|
+
const un = z.createContext({
|
|
2674
2677
|
selectedChannel: void 0,
|
|
2675
2678
|
onChannelSelect: () => {
|
|
2676
2679
|
},
|
|
2677
2680
|
debug: !1,
|
|
2678
2681
|
renderMessagePreview: void 0,
|
|
2679
2682
|
viewerLanguage: void 0
|
|
2680
|
-
}), Ja =
|
|
2683
|
+
}), Ja = un.Provider, Za = () => z.useContext(un), Qa = (e, t) => {
|
|
2681
2684
|
const s = new Date(
|
|
2682
2685
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2683
2686
|
), r = new Date(
|
|
@@ -2698,9 +2701,9 @@ const mn = z.createContext({
|
|
|
2698
2701
|
day: "numeric",
|
|
2699
2702
|
year: "2-digit"
|
|
2700
2703
|
});
|
|
2701
|
-
},
|
|
2704
|
+
}, mn = z.memo(
|
|
2702
2705
|
({ channel: e, unread: t }) => {
|
|
2703
|
-
var
|
|
2706
|
+
var R, I, C;
|
|
2704
2707
|
const {
|
|
2705
2708
|
selectedChannel: s,
|
|
2706
2709
|
onChannelSelect: a,
|
|
@@ -2712,12 +2715,12 @@ const mn = z.createContext({
|
|
|
2712
2715
|
}, m = (k) => {
|
|
2713
2716
|
const E = k.key === "Enter" || k.key === " ", D = k.repeat;
|
|
2714
2717
|
!E || D || (k.preventDefault(), d());
|
|
2715
|
-
}, u = Object.values(((
|
|
2718
|
+
}, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
|
|
2716
2719
|
(k) => {
|
|
2717
2720
|
var E, D;
|
|
2718
2721
|
return ((E = k.user) == null ? void 0 : E.id) && k.user.id !== ((D = e == null ? void 0 : e._client) == null ? void 0 : D.userID);
|
|
2719
2722
|
}
|
|
2720
|
-
), f = Te(u == null ? void 0 : u.user), c = (I = u == null ? void 0 : u.user) == null ? void 0 : I.image,
|
|
2723
|
+
), f = Te(u == null ? void 0 : u.user), c = (I = u == null ? void 0 : u.user) == null ? void 0 : I.image, p = (() => {
|
|
2721
2724
|
var E;
|
|
2722
2725
|
const k = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
|
|
2723
2726
|
if (k != null && k.length) {
|
|
@@ -2725,18 +2728,18 @@ const mn = z.createContext({
|
|
|
2725
2728
|
if (k[D].type !== "system") return k[D];
|
|
2726
2729
|
}
|
|
2727
2730
|
})(), v = (() => {
|
|
2728
|
-
var
|
|
2729
|
-
const k =
|
|
2730
|
-
message:
|
|
2731
|
+
var Z, U, G, P;
|
|
2732
|
+
const k = Xt({
|
|
2733
|
+
message: p,
|
|
2731
2734
|
viewerLanguage: o
|
|
2732
2735
|
});
|
|
2733
|
-
if (((
|
|
2734
|
-
if (((U =
|
|
2735
|
-
if (((G =
|
|
2736
|
+
if (((Z = p == null ? void 0 : p.metadata) == null ? void 0 : Z.custom_type) === "MESSAGE_TIP") return k ? `💵 ${k}` : "💵 Sent a tip";
|
|
2737
|
+
if (((U = p == null ? void 0 : p.metadata) == null ? void 0 : U.custom_type) === "MESSAGE_PAID") return k ? `💰 ${k}` : "💰 Sent a message";
|
|
2738
|
+
if (((G = p == null ? void 0 : p.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_ATTACHMENT") return k ? `📎 ${k}` : "📎 Sent an attachment";
|
|
2736
2739
|
if (k) return k;
|
|
2737
|
-
const F = (P =
|
|
2740
|
+
const F = (P = p == null ? void 0 : p.attachments) == null ? void 0 : P[0];
|
|
2738
2741
|
return F ? F.og_scrape_url ? F.og_scrape_url : F.type === "image" ? "📷 Sent an image" : F.type === "video" ? "🎥 Sent a video" : F.type === "audio" ? "🎵 Sent audio" : F.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2739
|
-
})(), x =
|
|
2742
|
+
})(), x = p != null && p.created_at ? er(new Date(p.created_at)) : "", w = p ? Ce(p) : !1, A = i ? i(p, v) : `${w ? "✨ " : ""}${v}`, T = Wt(e), S = t ?? 0;
|
|
2740
2743
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2741
2744
|
channelId: e == null ? void 0 : e.id,
|
|
2742
2745
|
isSelected: l,
|
|
@@ -2751,22 +2754,21 @@ const mn = z.createContext({
|
|
|
2751
2754
|
onClick: d,
|
|
2752
2755
|
onKeyDown: m,
|
|
2753
2756
|
className: y(
|
|
2754
|
-
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring",
|
|
2757
|
+
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
2755
2758
|
{
|
|
2756
|
-
"bg-
|
|
2757
|
-
"hover:bg-
|
|
2759
|
+
"bg-black/[0.04]": l,
|
|
2760
|
+
"hover:bg-black/[0.02]": !l
|
|
2758
2761
|
}
|
|
2759
2762
|
),
|
|
2760
|
-
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-
|
|
2763
|
+
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
|
|
2761
2764
|
/* @__PURE__ */ n(
|
|
2762
|
-
|
|
2765
|
+
ae,
|
|
2763
2766
|
{
|
|
2764
2767
|
id: ((C = u == null ? void 0 : u.user) == null ? void 0 : C.id) || e.id || "unknown",
|
|
2765
2768
|
name: f,
|
|
2766
2769
|
image: c,
|
|
2767
|
-
size:
|
|
2768
|
-
starred:
|
|
2769
|
-
className: "[&_.avatar-fallback]:group-hover:bg-[#eeeeee]"
|
|
2770
|
+
size: 48,
|
|
2771
|
+
starred: T
|
|
2770
2772
|
}
|
|
2771
2773
|
),
|
|
2772
2774
|
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
|
|
@@ -2775,20 +2777,19 @@ const mn = z.createContext({
|
|
|
2775
2777
|
"h3",
|
|
2776
2778
|
{
|
|
2777
2779
|
className: y(
|
|
2778
|
-
"text-sm font-medium truncate"
|
|
2779
|
-
l ? "text-primary" : "text-charcoal"
|
|
2780
|
+
"text-sm font-medium truncate text-[#191918]"
|
|
2780
2781
|
),
|
|
2781
2782
|
children: [
|
|
2782
|
-
|
|
2783
|
+
T && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
2783
2784
|
f
|
|
2784
2785
|
]
|
|
2785
2786
|
}
|
|
2786
2787
|
),
|
|
2787
|
-
x && /* @__PURE__ */ n("span", { className: "text-xs text-
|
|
2788
|
+
x && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: x })
|
|
2788
2789
|
] }),
|
|
2789
2790
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2790
|
-
/* @__PURE__ */ n("p", { className: "text-
|
|
2791
|
-
S > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-
|
|
2791
|
+
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
|
|
2792
|
+
S > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: S > 99 ? "99+" : S })
|
|
2792
2793
|
] })
|
|
2793
2794
|
] })
|
|
2794
2795
|
] })
|
|
@@ -2796,7 +2797,7 @@ const mn = z.createContext({
|
|
|
2796
2797
|
);
|
|
2797
2798
|
}
|
|
2798
2799
|
);
|
|
2799
|
-
|
|
2800
|
+
mn.displayName = "CustomChannelPreview";
|
|
2800
2801
|
const tr = { last_message_at: -1 }, nr = z.memo(
|
|
2801
2802
|
({
|
|
2802
2803
|
onChannelSelect: e,
|
|
@@ -2812,11 +2813,11 @@ const tr = { last_message_at: -1 }, nr = z.memo(
|
|
|
2812
2813
|
}) => {
|
|
2813
2814
|
const g = z.useRef(0);
|
|
2814
2815
|
g.current++;
|
|
2815
|
-
const { debug: u = !1 } =
|
|
2816
|
-
(
|
|
2817
|
-
for (const N of
|
|
2816
|
+
const { debug: u = !1 } = qe(), f = z.useCallback(
|
|
2817
|
+
(p) => {
|
|
2818
|
+
for (const N of p)
|
|
2818
2819
|
Ka(N);
|
|
2819
|
-
return r ? r(
|
|
2820
|
+
return r ? r(p) : p;
|
|
2820
2821
|
},
|
|
2821
2822
|
[r]
|
|
2822
2823
|
);
|
|
@@ -2849,14 +2850,14 @@ const tr = { last_message_at: -1 }, nr = z.memo(
|
|
|
2849
2850
|
o
|
|
2850
2851
|
),
|
|
2851
2852
|
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Ja, { value: c, children: /* @__PURE__ */ n(
|
|
2852
|
-
|
|
2853
|
+
ls,
|
|
2853
2854
|
{
|
|
2854
2855
|
filters: s,
|
|
2855
2856
|
sort: i,
|
|
2856
2857
|
options: { limit: 30 },
|
|
2857
2858
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
2858
2859
|
channelRenderFilterFn: f,
|
|
2859
|
-
Preview:
|
|
2860
|
+
Preview: mn,
|
|
2860
2861
|
EmptyStateIndicator: l
|
|
2861
2862
|
},
|
|
2862
2863
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
@@ -2867,7 +2868,7 @@ const tr = { last_message_at: -1 }, nr = z.memo(
|
|
|
2867
2868
|
);
|
|
2868
2869
|
nr.displayName = "ChannelList";
|
|
2869
2870
|
const sr = /^([a-z][a-z0-9+.-]*):/i, ar = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2870
|
-
function
|
|
2871
|
+
function Qe(e) {
|
|
2871
2872
|
if (typeof e != "string") return;
|
|
2872
2873
|
const t = e.trim();
|
|
2873
2874
|
if (t === "") return;
|
|
@@ -2885,7 +2886,7 @@ const rr = {
|
|
|
2885
2886
|
const s = y(
|
|
2886
2887
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2887
2888
|
rr[e]
|
|
2888
|
-
), a =
|
|
2889
|
+
), a = Qe(t.href);
|
|
2889
2890
|
return a ? /* @__PURE__ */ n(
|
|
2890
2891
|
"a",
|
|
2891
2892
|
{
|
|
@@ -2917,7 +2918,7 @@ const rr = {
|
|
|
2917
2918
|
}, lr = "text-white/30", cr = {
|
|
2918
2919
|
dark: "text-white/55",
|
|
2919
2920
|
light: "text-black/55"
|
|
2920
|
-
},
|
|
2921
|
+
}, et = ({
|
|
2921
2922
|
variant: e,
|
|
2922
2923
|
title: t,
|
|
2923
2924
|
placeholderTitle: s,
|
|
@@ -2927,8 +2928,8 @@ const rr = {
|
|
|
2927
2928
|
cta: o,
|
|
2928
2929
|
trailingAction: l
|
|
2929
2930
|
}) => {
|
|
2930
|
-
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 !== "",
|
|
2931
|
-
if (!g && !u && !c && !
|
|
2931
|
+
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 = o != null;
|
|
2932
|
+
if (!g && !u && !c && !p) return null;
|
|
2932
2933
|
const v = y(
|
|
2933
2934
|
"truncate text-base font-medium leading-6",
|
|
2934
2935
|
d && !t ? lr : or[e]
|
|
@@ -2946,7 +2947,7 @@ const rr = {
|
|
|
2946
2947
|
] }),
|
|
2947
2948
|
u && /* @__PURE__ */ n("p", { className: x, children: a })
|
|
2948
2949
|
] }),
|
|
2949
|
-
!
|
|
2950
|
+
!p && c && /* @__PURE__ */ n("p", { className: x, children: f })
|
|
2950
2951
|
] }),
|
|
2951
2952
|
l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
|
|
2952
2953
|
] }),
|
|
@@ -3025,11 +3026,11 @@ const rr = {
|
|
|
3025
3026
|
}, mr = {
|
|
3026
3027
|
dark: "size-16 text-white/25",
|
|
3027
3028
|
light: "size-16 text-black/25"
|
|
3028
|
-
}, Ae = (e, t) => !!t && !!e &&
|
|
3029
|
+
}, Ae = (e, t) => !!t && !!e && re(e) === "audio", hn = (e, t) => {
|
|
3029
3030
|
if (!t || !e) return !1;
|
|
3030
|
-
const s =
|
|
3031
|
+
const s = re(e);
|
|
3031
3032
|
return s === "video" || s === "audio";
|
|
3032
|
-
},
|
|
3033
|
+
}, tt = "bg-[#F2F3F4]", Ie = ({
|
|
3033
3034
|
variant: e,
|
|
3034
3035
|
thumbnailUrl: t,
|
|
3035
3036
|
sourceUrl: s,
|
|
@@ -3038,7 +3039,7 @@ const rr = {
|
|
|
3038
3039
|
topLeft: i,
|
|
3039
3040
|
topRight: o
|
|
3040
3041
|
}) => {
|
|
3041
|
-
const l =
|
|
3042
|
+
const l = re(r), d = !!s && l === "video";
|
|
3042
3043
|
return Ae(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
3043
3044
|
"audio",
|
|
3044
3045
|
{
|
|
@@ -3082,7 +3083,7 @@ const rr = {
|
|
|
3082
3083
|
"flex h-full w-full items-center justify-center",
|
|
3083
3084
|
ur[e]
|
|
3084
3085
|
),
|
|
3085
|
-
children:
|
|
3086
|
+
children: le(r, {
|
|
3086
3087
|
className: mr[e],
|
|
3087
3088
|
weight: "regular"
|
|
3088
3089
|
})
|
|
@@ -3107,7 +3108,7 @@ const rr = {
|
|
|
3107
3108
|
onDismiss: g,
|
|
3108
3109
|
onEditClick: u
|
|
3109
3110
|
}) => {
|
|
3110
|
-
const f = l === "classic", c = Ae(r, o),
|
|
3111
|
+
const f = l === "classic", c = Ae(r, o), p = g ? /* @__PURE__ */ n(
|
|
3111
3112
|
"button",
|
|
3112
3113
|
{
|
|
3113
3114
|
type: "button",
|
|
@@ -3123,10 +3124,10 @@ const rr = {
|
|
|
3123
3124
|
onClick: u,
|
|
3124
3125
|
"aria-label": "Edit attachment",
|
|
3125
3126
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3126
|
-
children: /* @__PURE__ */ n(
|
|
3127
|
+
children: /* @__PURE__ */ n(Ss, { className: "size-5", weight: "regular" })
|
|
3127
3128
|
}
|
|
3128
3129
|
) : void 0;
|
|
3129
|
-
return c ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName:
|
|
3130
|
+
return c ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3130
3131
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
|
|
3131
3132
|
Ie,
|
|
3132
3133
|
{
|
|
@@ -3136,12 +3137,12 @@ const rr = {
|
|
|
3136
3137
|
mimeType: r
|
|
3137
3138
|
}
|
|
3138
3139
|
) }),
|
|
3139
|
-
|
|
3140
|
+
p && /* @__PURE__ */ n("div", { className: "shrink-0", children: p })
|
|
3140
3141
|
] }) }) : /* @__PURE__ */ h(
|
|
3141
3142
|
Ee,
|
|
3142
3143
|
{
|
|
3143
3144
|
variant: "dark",
|
|
3144
|
-
topRight: f ?
|
|
3145
|
+
topRight: f ? p : void 0,
|
|
3145
3146
|
children: [
|
|
3146
3147
|
!f && /* @__PURE__ */ n(
|
|
3147
3148
|
Ie,
|
|
@@ -3151,11 +3152,11 @@ const rr = {
|
|
|
3151
3152
|
sourceUrl: o,
|
|
3152
3153
|
title: e,
|
|
3153
3154
|
mimeType: r,
|
|
3154
|
-
topRight:
|
|
3155
|
+
topRight: p
|
|
3155
3156
|
}
|
|
3156
3157
|
),
|
|
3157
3158
|
/* @__PURE__ */ n(
|
|
3158
|
-
|
|
3159
|
+
et,
|
|
3159
3160
|
{
|
|
3160
3161
|
variant: "dark",
|
|
3161
3162
|
title: e,
|
|
@@ -3182,7 +3183,7 @@ const rr = {
|
|
|
3182
3183
|
cta: d,
|
|
3183
3184
|
onClick: m
|
|
3184
3185
|
}) => {
|
|
3185
|
-
const g =
|
|
3186
|
+
const g = hn(a, i), u = Qe(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, p = Ae(a, i) ? tt : void 0, N = d && m ? {
|
|
3186
3187
|
...d,
|
|
3187
3188
|
onClick: () => {
|
|
3188
3189
|
var v;
|
|
@@ -3196,7 +3197,7 @@ const rr = {
|
|
|
3196
3197
|
href: f,
|
|
3197
3198
|
onClick: c,
|
|
3198
3199
|
ariaLabel: e ?? "Open attachment preview",
|
|
3199
|
-
bgClassName:
|
|
3200
|
+
bgClassName: p,
|
|
3200
3201
|
"data-testid": "link-attachment",
|
|
3201
3202
|
children: [
|
|
3202
3203
|
o === "featured" && /* @__PURE__ */ n(
|
|
@@ -3210,7 +3211,7 @@ const rr = {
|
|
|
3210
3211
|
}
|
|
3211
3212
|
),
|
|
3212
3213
|
/* @__PURE__ */ n(
|
|
3213
|
-
|
|
3214
|
+
et,
|
|
3214
3215
|
{
|
|
3215
3216
|
variant: "light",
|
|
3216
3217
|
title: e,
|
|
@@ -3236,14 +3237,14 @@ const rr = {
|
|
|
3236
3237
|
cta: m,
|
|
3237
3238
|
onClick: g
|
|
3238
3239
|
}) => {
|
|
3239
|
-
const u =
|
|
3240
|
+
const u = hn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, p = m == null && !u && c != null ? g : void 0;
|
|
3240
3241
|
return /* @__PURE__ */ h(
|
|
3241
3242
|
Ee,
|
|
3242
3243
|
{
|
|
3243
3244
|
variant: "dark",
|
|
3244
3245
|
href: c,
|
|
3245
|
-
onClick:
|
|
3246
|
-
bgClassName: Ae(r, o) ?
|
|
3246
|
+
onClick: p,
|
|
3247
|
+
bgClassName: Ae(r, o) ? tt : void 0,
|
|
3247
3248
|
children: [
|
|
3248
3249
|
l === "featured" && /* @__PURE__ */ n(
|
|
3249
3250
|
Ie,
|
|
@@ -3256,7 +3257,7 @@ const rr = {
|
|
|
3256
3257
|
}
|
|
3257
3258
|
),
|
|
3258
3259
|
/* @__PURE__ */ n(
|
|
3259
|
-
|
|
3260
|
+
et,
|
|
3260
3261
|
{
|
|
3261
3262
|
variant: "dark",
|
|
3262
3263
|
title: e,
|
|
@@ -3387,7 +3388,7 @@ const rr = {
|
|
|
3387
3388
|
}
|
|
3388
3389
|
),
|
|
3389
3390
|
s ?? null
|
|
3390
|
-
] }),
|
|
3391
|
+
] }), nt = ({
|
|
3391
3392
|
state: e,
|
|
3392
3393
|
src: t,
|
|
3393
3394
|
mimeType: s,
|
|
@@ -3409,7 +3410,7 @@ const rr = {
|
|
|
3409
3410
|
text: i,
|
|
3410
3411
|
groupPosition: o,
|
|
3411
3412
|
"data-testid": "audio-attachment",
|
|
3412
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c,
|
|
3413
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, p) => /* @__PURE__ */ n(
|
|
3413
3414
|
_r,
|
|
3414
3415
|
{
|
|
3415
3416
|
item: c,
|
|
@@ -3417,14 +3418,14 @@ const rr = {
|
|
|
3417
3418
|
trailingAction: (
|
|
3418
3419
|
// Composer only supports a single attachment, so the
|
|
3419
3420
|
// dismiss control sits on the only player.
|
|
3420
|
-
g &&
|
|
3421
|
+
g && p === 0 ? /* @__PURE__ */ n(xe, { onClick: d, variant: "inline" }) : void 0
|
|
3421
3422
|
)
|
|
3422
3423
|
},
|
|
3423
|
-
`${c.src}-${
|
|
3424
|
+
`${c.src}-${p}`
|
|
3424
3425
|
)) })
|
|
3425
3426
|
}
|
|
3426
3427
|
);
|
|
3427
|
-
}, yr = (e) => /* @__PURE__ */ n(
|
|
3428
|
+
}, yr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Cr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), kr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Er = {
|
|
3428
3429
|
Composer: yr,
|
|
3429
3430
|
Sent: Cr,
|
|
3430
3431
|
Received: kr
|
|
@@ -3451,8 +3452,8 @@ function Tr(e, t) {
|
|
|
3451
3452
|
}
|
|
3452
3453
|
}
|
|
3453
3454
|
if (!e) return;
|
|
3454
|
-
if (
|
|
3455
|
-
const r =
|
|
3455
|
+
if (re(e) === "document") {
|
|
3456
|
+
const r = Zt(e), i = Sr[r];
|
|
3456
3457
|
if (i) return i;
|
|
3457
3458
|
if (e === "application/octet-stream") return;
|
|
3458
3459
|
}
|
|
@@ -3464,7 +3465,7 @@ function Ar(e, t, s) {
|
|
|
3464
3465
|
const a = Tr(e, t), r = typeof s == "number" && s > 0 ? Ir(s) : void 0;
|
|
3465
3466
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
3466
3467
|
}
|
|
3467
|
-
function
|
|
3468
|
+
function te(e) {
|
|
3468
3469
|
try {
|
|
3469
3470
|
const s = new URL(e).pathname.split("/").pop();
|
|
3470
3471
|
return s && s.length > 0 ? decodeURIComponent(s) : "download";
|
|
@@ -3481,7 +3482,7 @@ const Mr = {
|
|
|
3481
3482
|
}, Rr = {
|
|
3482
3483
|
dark: "text-white/85",
|
|
3483
3484
|
light: "text-black/85"
|
|
3484
|
-
},
|
|
3485
|
+
}, fn = ({
|
|
3485
3486
|
variant: e,
|
|
3486
3487
|
filename: t,
|
|
3487
3488
|
title: s,
|
|
@@ -3499,7 +3500,7 @@ const Mr = {
|
|
|
3499
3500
|
Dr[e]
|
|
3500
3501
|
),
|
|
3501
3502
|
"aria-hidden": !0,
|
|
3502
|
-
children:
|
|
3503
|
+
children: le(a, {
|
|
3503
3504
|
className: y("size-6", Rr[e]),
|
|
3504
3505
|
weight: "regular"
|
|
3505
3506
|
})
|
|
@@ -3531,7 +3532,7 @@ const Mr = {
|
|
|
3531
3532
|
u
|
|
3532
3533
|
]
|
|
3533
3534
|
}
|
|
3534
|
-
) : /* @__PURE__ */ h(
|
|
3535
|
+
) : /* @__PURE__ */ h(se, { children: [
|
|
3535
3536
|
g,
|
|
3536
3537
|
u
|
|
3537
3538
|
] });
|
|
@@ -3540,8 +3541,8 @@ const Mr = {
|
|
|
3540
3541
|
l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
|
|
3541
3542
|
] });
|
|
3542
3543
|
};
|
|
3543
|
-
async function
|
|
3544
|
-
const s = t ??
|
|
3544
|
+
async function gn(e, t) {
|
|
3545
|
+
const s = t ?? te(e);
|
|
3545
3546
|
try {
|
|
3546
3547
|
const a = await fetch(e, { mode: "cors" });
|
|
3547
3548
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
@@ -3568,9 +3569,9 @@ const Lr = ({
|
|
|
3568
3569
|
onActivate: a,
|
|
3569
3570
|
trailingAction: r
|
|
3570
3571
|
}) => {
|
|
3571
|
-
const i = t.filename ??
|
|
3572
|
+
const i = t.filename ?? te(t.src);
|
|
3572
3573
|
return /* @__PURE__ */ n(
|
|
3573
|
-
|
|
3574
|
+
fn,
|
|
3574
3575
|
{
|
|
3575
3576
|
variant: e,
|
|
3576
3577
|
filename: i,
|
|
@@ -3582,7 +3583,7 @@ const Lr = ({
|
|
|
3582
3583
|
trailingAction: r
|
|
3583
3584
|
}
|
|
3584
3585
|
);
|
|
3585
|
-
},
|
|
3586
|
+
}, st = ({
|
|
3586
3587
|
state: e,
|
|
3587
3588
|
src: t,
|
|
3588
3589
|
filename: s,
|
|
@@ -3602,12 +3603,12 @@ const Lr = ({
|
|
|
3602
3603
|
mimeType: r,
|
|
3603
3604
|
title: i,
|
|
3604
3605
|
items: o
|
|
3605
|
-
}),
|
|
3606
|
+
}), p = (v) => {
|
|
3606
3607
|
if ((m == null ? void 0 : m(v)) === !1) return;
|
|
3607
3608
|
const x = c[v];
|
|
3608
3609
|
if (!x) return;
|
|
3609
|
-
const w = x.filename ??
|
|
3610
|
-
|
|
3610
|
+
const w = x.filename ?? te(x.src);
|
|
3611
|
+
gn(x.src, w);
|
|
3611
3612
|
};
|
|
3612
3613
|
if (c.length === 0)
|
|
3613
3614
|
return null;
|
|
@@ -3635,23 +3636,23 @@ const Lr = ({
|
|
|
3635
3636
|
variant: u,
|
|
3636
3637
|
item: v,
|
|
3637
3638
|
index: x,
|
|
3638
|
-
onActivate:
|
|
3639
|
+
onActivate: p,
|
|
3639
3640
|
trailingAction: f && x === 0 ? /* @__PURE__ */ n(xe, { onClick: g, variant: "inline" }) : N
|
|
3640
3641
|
},
|
|
3641
3642
|
`${v.src}-${x}`
|
|
3642
3643
|
)) })
|
|
3643
3644
|
}
|
|
3644
3645
|
);
|
|
3645
|
-
}, Or = (e) => /* @__PURE__ */ n(
|
|
3646
|
+
}, Or = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), zr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), $r = {
|
|
3646
3647
|
Composer: Or,
|
|
3647
3648
|
Sent: zr,
|
|
3648
3649
|
Received: Fr
|
|
3649
|
-
},
|
|
3650
|
+
}, at = ({
|
|
3650
3651
|
onPrev: e,
|
|
3651
3652
|
onNext: t,
|
|
3652
3653
|
prevLabel: s = "Previous",
|
|
3653
3654
|
nextLabel: a = "Next"
|
|
3654
|
-
}) => /* @__PURE__ */ h(
|
|
3655
|
+
}) => /* @__PURE__ */ h(se, { children: [
|
|
3655
3656
|
/* @__PURE__ */ n(
|
|
3656
3657
|
"button",
|
|
3657
3658
|
{
|
|
@@ -3659,7 +3660,7 @@ const Lr = ({
|
|
|
3659
3660
|
onClick: e,
|
|
3660
3661
|
"aria-label": s,
|
|
3661
3662
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
3662
|
-
children: /* @__PURE__ */ n(
|
|
3663
|
+
children: /* @__PURE__ */ n(Ts, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3663
3664
|
}
|
|
3664
3665
|
),
|
|
3665
3666
|
/* @__PURE__ */ n(
|
|
@@ -3669,10 +3670,10 @@ const Lr = ({
|
|
|
3669
3670
|
onClick: t,
|
|
3670
3671
|
"aria-label": a,
|
|
3671
3672
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3672
|
-
children: /* @__PURE__ */ n(
|
|
3673
|
+
children: /* @__PURE__ */ n(As, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3673
3674
|
}
|
|
3674
3675
|
)
|
|
3675
|
-
] }),
|
|
3676
|
+
] }), bn = ({
|
|
3676
3677
|
url: e,
|
|
3677
3678
|
filename: t,
|
|
3678
3679
|
variant: s = "pill",
|
|
@@ -3683,7 +3684,7 @@ const Lr = ({
|
|
|
3683
3684
|
}) => {
|
|
3684
3685
|
const [l, d] = O(!1), m = q(
|
|
3685
3686
|
(c) => {
|
|
3686
|
-
c.stopPropagation(), !l && (d(!0),
|
|
3687
|
+
c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
|
|
3687
3688
|
}).finally(() => {
|
|
3688
3689
|
d(!1), o == null || o();
|
|
3689
3690
|
}));
|
|
@@ -3757,7 +3758,7 @@ const Lr = ({
|
|
|
3757
3758
|
]
|
|
3758
3759
|
}
|
|
3759
3760
|
);
|
|
3760
|
-
}, Fe = (e, t, s) => Math.min(Math.max(e, t), s),
|
|
3761
|
+
}, Fe = (e, t, s) => Math.min(Math.max(e, t), s), rt = ({
|
|
3761
3762
|
length: e,
|
|
3762
3763
|
initialIndex: t,
|
|
3763
3764
|
open: s
|
|
@@ -3782,7 +3783,7 @@ const Lr = ({
|
|
|
3782
3783
|
};
|
|
3783
3784
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
3784
3785
|
}, [s, e, o, l]), { index: r, prev: o, next: l };
|
|
3785
|
-
},
|
|
3786
|
+
}, it = ({
|
|
3786
3787
|
open: e,
|
|
3787
3788
|
onClose: t,
|
|
3788
3789
|
ariaLabel: s,
|
|
@@ -3791,7 +3792,7 @@ const Lr = ({
|
|
|
3791
3792
|
children: i,
|
|
3792
3793
|
"data-testid": o
|
|
3793
3794
|
}) => {
|
|
3794
|
-
const l =
|
|
3795
|
+
const l = X(null), d = X(null);
|
|
3795
3796
|
return J(() => {
|
|
3796
3797
|
var f;
|
|
3797
3798
|
const u = l.current;
|
|
@@ -3872,29 +3873,29 @@ const Lr = ({
|
|
|
3872
3873
|
]
|
|
3873
3874
|
}
|
|
3874
3875
|
);
|
|
3875
|
-
},
|
|
3876
|
+
}, pn = ({
|
|
3876
3877
|
open: e,
|
|
3877
3878
|
items: t,
|
|
3878
3879
|
initialIndex: s = 0,
|
|
3879
3880
|
onClose: a
|
|
3880
3881
|
}) => {
|
|
3881
|
-
const { index: r, prev: i, next: o } =
|
|
3882
|
+
const { index: r, prev: i, next: o } = rt({
|
|
3882
3883
|
length: t.length,
|
|
3883
3884
|
initialIndex: s,
|
|
3884
3885
|
open: e
|
|
3885
|
-
}), l = t[r], d =
|
|
3886
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
3886
|
+
}), l = t[r], d = ne(
|
|
3887
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "image"),
|
|
3887
3888
|
[l]
|
|
3888
3889
|
);
|
|
3889
3890
|
return l ? /* @__PURE__ */ h(
|
|
3890
|
-
|
|
3891
|
+
it,
|
|
3891
3892
|
{
|
|
3892
3893
|
open: e,
|
|
3893
3894
|
onClose: a,
|
|
3894
3895
|
ariaLabel: d,
|
|
3895
3896
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
3896
3897
|
actions: /* @__PURE__ */ n(
|
|
3897
|
-
|
|
3898
|
+
bn,
|
|
3898
3899
|
{
|
|
3899
3900
|
url: l.src,
|
|
3900
3901
|
filename: d,
|
|
@@ -3917,7 +3918,7 @@ const Lr = ({
|
|
|
3917
3918
|
`${r}:${l.src}`
|
|
3918
3919
|
),
|
|
3919
3920
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3920
|
-
|
|
3921
|
+
at,
|
|
3921
3922
|
{
|
|
3922
3923
|
onPrev: i,
|
|
3923
3924
|
onNext: o,
|
|
@@ -3928,7 +3929,7 @@ const Lr = ({
|
|
|
3928
3929
|
]
|
|
3929
3930
|
}
|
|
3930
3931
|
) : null;
|
|
3931
|
-
}, Br = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black",
|
|
3932
|
+
}, Br = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", vn = ({
|
|
3932
3933
|
tiles: e,
|
|
3933
3934
|
onTileActivate: t,
|
|
3934
3935
|
maxVisible: s = 4,
|
|
@@ -4025,7 +4026,7 @@ const Lr = ({
|
|
|
4025
4026
|
src: e,
|
|
4026
4027
|
alt: t,
|
|
4027
4028
|
items: s
|
|
4028
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
4029
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], xn = (e, t) => e.map((s, a) => ({
|
|
4029
4030
|
src: s.src,
|
|
4030
4031
|
alt: s.alt,
|
|
4031
4032
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
@@ -4056,16 +4057,16 @@ const Lr = ({
|
|
|
4056
4057
|
),
|
|
4057
4058
|
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
|
|
4058
4059
|
/* @__PURE__ */ n(
|
|
4059
|
-
|
|
4060
|
+
pn,
|
|
4060
4061
|
{
|
|
4061
4062
|
open: o,
|
|
4062
|
-
items:
|
|
4063
|
+
items: xn([{ src: e, alt: t }], s),
|
|
4063
4064
|
initialIndex: l,
|
|
4064
4065
|
onClose: m
|
|
4065
4066
|
}
|
|
4066
4067
|
)
|
|
4067
4068
|
] });
|
|
4068
|
-
},
|
|
4069
|
+
}, wn = ({
|
|
4069
4070
|
state: e,
|
|
4070
4071
|
src: t,
|
|
4071
4072
|
alt: s,
|
|
@@ -4076,7 +4077,7 @@ const Lr = ({
|
|
|
4076
4077
|
loading: l = "lazy",
|
|
4077
4078
|
onClick: d
|
|
4078
4079
|
}) => {
|
|
4079
|
-
const m = Vr({ src: t, alt: s, items: r }), g = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer:
|
|
4080
|
+
const m = Vr({ src: t, alt: s, items: r }), g = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: p } = Ne(
|
|
4080
4081
|
d
|
|
4081
4082
|
);
|
|
4082
4083
|
if (m.length === 0)
|
|
@@ -4092,20 +4093,20 @@ const Lr = ({
|
|
|
4092
4093
|
groupPosition: o,
|
|
4093
4094
|
"data-testid": "image-attachment",
|
|
4094
4095
|
children: [
|
|
4095
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4096
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(vn, { tiles: N, onTileActivate: c }) }),
|
|
4096
4097
|
/* @__PURE__ */ n(
|
|
4097
|
-
|
|
4098
|
+
pn,
|
|
4098
4099
|
{
|
|
4099
4100
|
open: u,
|
|
4100
|
-
items:
|
|
4101
|
+
items: xn(m, a),
|
|
4101
4102
|
initialIndex: f,
|
|
4102
|
-
onClose:
|
|
4103
|
+
onClose: p
|
|
4103
4104
|
}
|
|
4104
4105
|
)
|
|
4105
4106
|
]
|
|
4106
4107
|
}
|
|
4107
4108
|
);
|
|
4108
|
-
}, Gr = (e) => /* @__PURE__ */ n(Ur, { ...e }), Hr = (e) => /* @__PURE__ */ n(
|
|
4109
|
+
}, Gr = (e) => /* @__PURE__ */ n(Ur, { ...e }), Hr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Yr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), qr = {
|
|
4109
4110
|
Composer: Gr,
|
|
4110
4111
|
Sent: Hr,
|
|
4111
4112
|
Received: Yr
|
|
@@ -4115,19 +4116,19 @@ const Lr = ({
|
|
|
4115
4116
|
initialIndex: s = 0,
|
|
4116
4117
|
onClose: a
|
|
4117
4118
|
}) => {
|
|
4118
|
-
const { index: r, prev: i, next: o } =
|
|
4119
|
+
const { index: r, prev: i, next: o } = rt({
|
|
4119
4120
|
length: t.length,
|
|
4120
4121
|
initialIndex: s,
|
|
4121
4122
|
open: e
|
|
4122
|
-
}), l = t[r], d =
|
|
4123
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4123
|
+
}), l = t[r], d = ne(
|
|
4124
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "document"),
|
|
4124
4125
|
[l]
|
|
4125
|
-
), m =
|
|
4126
|
+
), m = ne(
|
|
4126
4127
|
() => l ? Xr(l.src) : void 0,
|
|
4127
4128
|
[l]
|
|
4128
4129
|
);
|
|
4129
4130
|
return !l || !m ? null : /* @__PURE__ */ h(
|
|
4130
|
-
|
|
4131
|
+
it,
|
|
4131
4132
|
{
|
|
4132
4133
|
open: e,
|
|
4133
4134
|
onClose: a,
|
|
@@ -4146,7 +4147,7 @@ const Lr = ({
|
|
|
4146
4147
|
`${r}:${l.src}`
|
|
4147
4148
|
),
|
|
4148
4149
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
4149
|
-
|
|
4150
|
+
at,
|
|
4150
4151
|
{
|
|
4151
4152
|
onPrev: i,
|
|
4152
4153
|
onNext: o,
|
|
@@ -4173,9 +4174,9 @@ const Lr = ({
|
|
|
4173
4174
|
onActivate: a,
|
|
4174
4175
|
trailingAction: r
|
|
4175
4176
|
}) => {
|
|
4176
|
-
const i = t.filename ??
|
|
4177
|
+
const i = t.filename ?? te(t.src);
|
|
4177
4178
|
return /* @__PURE__ */ n(
|
|
4178
|
-
|
|
4179
|
+
fn,
|
|
4179
4180
|
{
|
|
4180
4181
|
variant: e,
|
|
4181
4182
|
filename: i,
|
|
@@ -4187,7 +4188,7 @@ const Lr = ({
|
|
|
4187
4188
|
trailingAction: r
|
|
4188
4189
|
}
|
|
4189
4190
|
);
|
|
4190
|
-
},
|
|
4191
|
+
}, ot = ({
|
|
4191
4192
|
state: e,
|
|
4192
4193
|
src: t,
|
|
4193
4194
|
filename: s,
|
|
@@ -4199,14 +4200,14 @@ const Lr = ({
|
|
|
4199
4200
|
onClick: d,
|
|
4200
4201
|
onDismiss: m
|
|
4201
4202
|
}) => {
|
|
4202
|
-
const g = we(e), u = Kr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate:
|
|
4203
|
+
const g = we(e), u = Kr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ne(
|
|
4203
4204
|
d
|
|
4204
4205
|
), v = e === "composer" && !!m;
|
|
4205
4206
|
if (u.length === 0)
|
|
4206
4207
|
return null;
|
|
4207
4208
|
const x = u.map((w) => ({
|
|
4208
4209
|
src: w.src,
|
|
4209
|
-
filename: w.filename ??
|
|
4210
|
+
filename: w.filename ?? te(w.src)
|
|
4210
4211
|
}));
|
|
4211
4212
|
return /* @__PURE__ */ h(
|
|
4212
4213
|
ve,
|
|
@@ -4216,14 +4217,14 @@ const Lr = ({
|
|
|
4216
4217
|
groupPosition: l,
|
|
4217
4218
|
"data-testid": "pdf-attachment",
|
|
4218
4219
|
children: [
|
|
4219
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w,
|
|
4220
|
-
const
|
|
4221
|
-
|
|
4220
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, A) => {
|
|
4221
|
+
const T = w.filename ?? te(w.src), S = v && A === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4222
|
+
bn,
|
|
4222
4223
|
{
|
|
4223
4224
|
url: w.src,
|
|
4224
|
-
filename:
|
|
4225
|
+
filename: T,
|
|
4225
4226
|
variant: "inline",
|
|
4226
|
-
label: `Download ${
|
|
4227
|
+
label: `Download ${T}`,
|
|
4227
4228
|
tone: g
|
|
4228
4229
|
}
|
|
4229
4230
|
);
|
|
@@ -4232,11 +4233,11 @@ const Lr = ({
|
|
|
4232
4233
|
{
|
|
4233
4234
|
variant: g,
|
|
4234
4235
|
item: w,
|
|
4235
|
-
index:
|
|
4236
|
-
onActivate:
|
|
4236
|
+
index: A,
|
|
4237
|
+
onActivate: p,
|
|
4237
4238
|
trailingAction: S
|
|
4238
4239
|
},
|
|
4239
|
-
`${w.src}-${
|
|
4240
|
+
`${w.src}-${A}`
|
|
4240
4241
|
);
|
|
4241
4242
|
}) }),
|
|
4242
4243
|
/* @__PURE__ */ n(
|
|
@@ -4251,26 +4252,26 @@ const Lr = ({
|
|
|
4251
4252
|
]
|
|
4252
4253
|
}
|
|
4253
4254
|
);
|
|
4254
|
-
}, Zr = (e) => /* @__PURE__ */ n(
|
|
4255
|
+
}, Zr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Qr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ei = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), ti = {
|
|
4255
4256
|
Composer: Zr,
|
|
4256
4257
|
Sent: Qr,
|
|
4257
4258
|
Received: ei
|
|
4258
|
-
},
|
|
4259
|
+
}, Nn = ({
|
|
4259
4260
|
open: e,
|
|
4260
4261
|
items: t,
|
|
4261
4262
|
initialIndex: s = 0,
|
|
4262
4263
|
onClose: a
|
|
4263
4264
|
}) => {
|
|
4264
|
-
const { index: r, prev: i, next: o } =
|
|
4265
|
+
const { index: r, prev: i, next: o } = rt({
|
|
4265
4266
|
length: t.length,
|
|
4266
4267
|
initialIndex: s,
|
|
4267
4268
|
open: e
|
|
4268
|
-
}), l = t[r], d =
|
|
4269
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4269
|
+
}), l = t[r], d = ne(
|
|
4270
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "video"),
|
|
4270
4271
|
[l]
|
|
4271
4272
|
);
|
|
4272
4273
|
return l ? /* @__PURE__ */ h(
|
|
4273
|
-
|
|
4274
|
+
it,
|
|
4274
4275
|
{
|
|
4275
4276
|
open: e,
|
|
4276
4277
|
onClose: a,
|
|
@@ -4294,7 +4295,7 @@ const Lr = ({
|
|
|
4294
4295
|
`${r}:${l.src}`
|
|
4295
4296
|
),
|
|
4296
4297
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
4297
|
-
|
|
4298
|
+
at,
|
|
4298
4299
|
{
|
|
4299
4300
|
onPrev: i,
|
|
4300
4301
|
onNext: o,
|
|
@@ -4305,7 +4306,7 @@ const Lr = ({
|
|
|
4305
4306
|
]
|
|
4306
4307
|
}
|
|
4307
4308
|
) : null;
|
|
4308
|
-
}, ni = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }),
|
|
4309
|
+
}, ni = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), _n = ({
|
|
4309
4310
|
item: e,
|
|
4310
4311
|
index: t
|
|
4311
4312
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4320,7 +4321,7 @@ const Lr = ({
|
|
|
4320
4321
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
4321
4322
|
}
|
|
4322
4323
|
) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
4323
|
-
|
|
4324
|
+
Ht,
|
|
4324
4325
|
{
|
|
4325
4326
|
className: "size-16 rounded-md text-white/30",
|
|
4326
4327
|
weight: "regular",
|
|
@@ -4330,14 +4331,14 @@ const Lr = ({
|
|
|
4330
4331
|
/* @__PURE__ */ n(ni, {})
|
|
4331
4332
|
] }), si = (e, t, s) => ({
|
|
4332
4333
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4333
|
-
content: /* @__PURE__ */ n(
|
|
4334
|
+
content: /* @__PURE__ */ n(_n, { item: e, index: t })
|
|
4334
4335
|
}), ai = ({
|
|
4335
4336
|
src: e,
|
|
4336
4337
|
poster: t,
|
|
4337
4338
|
mimeType: s,
|
|
4338
4339
|
preload: a,
|
|
4339
4340
|
items: r
|
|
4340
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
4341
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], yn = (e, t) => e.map((s, a) => ({
|
|
4341
4342
|
src: s.src,
|
|
4342
4343
|
poster: s.poster,
|
|
4343
4344
|
mimeType: s.mimeType,
|
|
@@ -4355,15 +4356,15 @@ const Lr = ({
|
|
|
4355
4356
|
onClick: () => m(0),
|
|
4356
4357
|
"aria-label": "Play video",
|
|
4357
4358
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
4358
|
-
children: /* @__PURE__ */ n(
|
|
4359
|
+
children: /* @__PURE__ */ n(_n, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
4359
4360
|
}
|
|
4360
4361
|
),
|
|
4361
4362
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
|
|
4362
4363
|
/* @__PURE__ */ n(
|
|
4363
|
-
|
|
4364
|
+
Nn,
|
|
4364
4365
|
{
|
|
4365
4366
|
open: l,
|
|
4366
|
-
items:
|
|
4367
|
+
items: yn(
|
|
4367
4368
|
[{ src: e, poster: t, mimeType: s, preload: r }],
|
|
4368
4369
|
a
|
|
4369
4370
|
),
|
|
@@ -4372,7 +4373,7 @@ const Lr = ({
|
|
|
4372
4373
|
}
|
|
4373
4374
|
)
|
|
4374
4375
|
] });
|
|
4375
|
-
},
|
|
4376
|
+
}, Cn = ({
|
|
4376
4377
|
state: e,
|
|
4377
4378
|
src: t,
|
|
4378
4379
|
poster: s,
|
|
@@ -4384,7 +4385,7 @@ const Lr = ({
|
|
|
4384
4385
|
preload: d,
|
|
4385
4386
|
onClick: m
|
|
4386
4387
|
}) => {
|
|
4387
|
-
const g = ai({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate:
|
|
4388
|
+
const g = ai({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ne(
|
|
4388
4389
|
m
|
|
4389
4390
|
);
|
|
4390
4391
|
if (g.length === 0)
|
|
@@ -4401,18 +4402,18 @@ const Lr = ({
|
|
|
4401
4402
|
"data-testid": "video-attachment",
|
|
4402
4403
|
children: [
|
|
4403
4404
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4404
|
-
|
|
4405
|
+
vn,
|
|
4405
4406
|
{
|
|
4406
4407
|
tiles: v,
|
|
4407
|
-
onTileActivate:
|
|
4408
|
+
onTileActivate: p,
|
|
4408
4409
|
className: "overflow-hidden rounded-md"
|
|
4409
4410
|
}
|
|
4410
4411
|
) }),
|
|
4411
4412
|
/* @__PURE__ */ n(
|
|
4412
|
-
|
|
4413
|
+
Nn,
|
|
4413
4414
|
{
|
|
4414
4415
|
open: f,
|
|
4415
|
-
items:
|
|
4416
|
+
items: yn(g, r),
|
|
4416
4417
|
initialIndex: c,
|
|
4417
4418
|
onClose: N
|
|
4418
4419
|
}
|
|
@@ -4420,7 +4421,7 @@ const Lr = ({
|
|
|
4420
4421
|
]
|
|
4421
4422
|
}
|
|
4422
4423
|
);
|
|
4423
|
-
}, ii = (e) => /* @__PURE__ */ n(ri, { ...e }), oi = (e) => /* @__PURE__ */ n(
|
|
4424
|
+
}, ii = (e) => /* @__PURE__ */ n(ri, { ...e }), oi = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), ci = {
|
|
4424
4425
|
Composer: ii,
|
|
4425
4426
|
Sent: oi,
|
|
4426
4427
|
Received: li
|
|
@@ -4464,7 +4465,7 @@ const Lr = ({
|
|
|
4464
4465
|
const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
|
|
4465
4466
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
4466
4467
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
4467
|
-
|
|
4468
|
+
ae,
|
|
4468
4469
|
{
|
|
4469
4470
|
id: o || "account",
|
|
4470
4471
|
name: o || "Account",
|
|
@@ -4495,7 +4496,7 @@ const Lr = ({
|
|
|
4495
4496
|
] }) });
|
|
4496
4497
|
};
|
|
4497
4498
|
export {
|
|
4498
|
-
|
|
4499
|
+
Qt as A,
|
|
4499
4500
|
Vs as B,
|
|
4500
4501
|
Ya as C,
|
|
4501
4502
|
Ds as D,
|
|
@@ -4503,13 +4504,13 @@ export {
|
|
|
4503
4504
|
yi as L,
|
|
4504
4505
|
wi as M,
|
|
4505
4506
|
ye as a,
|
|
4506
|
-
|
|
4507
|
+
ae as b,
|
|
4507
4508
|
nr as c,
|
|
4508
|
-
|
|
4509
|
+
dn as d,
|
|
4509
4510
|
Ni as e,
|
|
4510
4511
|
di as f,
|
|
4511
|
-
|
|
4512
|
-
|
|
4512
|
+
re as g,
|
|
4513
|
+
zt as h,
|
|
4513
4514
|
ki as i,
|
|
4514
4515
|
Na as j,
|
|
4515
4516
|
xi as k,
|
|
@@ -4518,15 +4519,15 @@ export {
|
|
|
4518
4519
|
Ir as n,
|
|
4519
4520
|
er as o,
|
|
4520
4521
|
Tr as p,
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4522
|
+
Xt as q,
|
|
4523
|
+
le as r,
|
|
4524
|
+
nn as s,
|
|
4524
4525
|
Ls as t,
|
|
4525
4526
|
Ci as u,
|
|
4526
4527
|
Us as v,
|
|
4527
|
-
|
|
4528
|
-
|
|
4528
|
+
Je as w,
|
|
4529
|
+
Ze as x,
|
|
4529
4530
|
Te as y,
|
|
4530
4531
|
ga as z
|
|
4531
4532
|
};
|
|
4532
|
-
//# sourceMappingURL=index-
|
|
4533
|
+
//# sourceMappingURL=index-UtNoTrrb.js.map
|