@linktr.ee/messaging-react 3.34.0 → 3.35.0-rc-1786104411
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-D28R0tmP.js → Card-ByFbaqsR.js} +2 -2
- package/dist/{Card-D28R0tmP.js.map → Card-ByFbaqsR.js.map} +1 -1
- package/dist/{Card-CbxXZm7k.cjs → Card-C6IwpYii.cjs} +2 -2
- package/dist/{Card-CbxXZm7k.cjs.map → Card-C6IwpYii.cjs.map} +1 -1
- package/dist/{index-Czf2XyYL.js → index-BaeffiED.js} +1044 -857
- package/dist/index-BaeffiED.js.map +1 -0
- package/dist/index-DNWZLZ_A.cjs +2 -0
- package/dist/index-DNWZLZ_A.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +95 -0
- package/dist/index.js +21 -20
- package/package.json +3 -3
- package/src/components/LinkAttachment/components/_shared/CardCta.tsx +21 -2
- package/src/components/RichCard/RichCard.stories.tsx +364 -0
- package/src/components/RichCard/RichCard.test.tsx +116 -0
- package/src/components/RichCard/RichCardBody.tsx +123 -0
- package/src/components/RichCard/RichCardCard.tsx +93 -0
- package/src/components/RichCard/RichCardImages.tsx +108 -0
- package/src/components/RichCard/index.tsx +44 -0
- package/src/components/RichCard/types.ts +72 -0
- package/src/index.ts +8 -0
- package/dist/index-BrVCdobn.cjs +0 -2
- package/dist/index-BrVCdobn.cjs.map +0 -1
- package/dist/index-Czf2XyYL.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as s, jsxs as f, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import F, { createContext as Ve, useContext as _e, useCallback as q, useState as U, useRef as H, useEffect as Y, useId as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
2
|
+
import F, { createContext as Ve, useContext as _e, useCallback as q, useState as U, useRef as H, useEffect as Y, useId as tn, useMemo as ae, Suspense as sn } from "react";
|
|
3
|
+
import { StreamChatService as nn } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as an, LinkPreviewsManager as tt } from "stream-chat";
|
|
5
|
+
import { Chat as rn, useChannelStateContext as fe, useChatContext as Te, DateSeparator as on, useMessageContext as ge, MessageStatus as ln, MessageErrorIcon as st, MessageText as Fe, areMessageUIPropsEqual as cn, useMessageReminder as dn, useComponentContext as ls, Attachment as un, EditMessageModal as mn, MessageBlocked as hn, MessageBouncePrompt as fn, MessageDeleted as gn, MessageIsThreadReplyInChannelButtonIndicator as pn, MessageRepliesCountButton as bn, ReminderNotification as vn, StreamedMessageText as xn, messageHasAttachments as wn, messageHasReactions as _n, isDateSeparatorMessage as yn, isMessageBlocked as Nn, isMessageBounced as kn, MessageBounceModal as Cn, Poll as Sn, useMessageComposer as En, useStateStore as In, MessageInput as Gt, useMessageInputContext as Tn, useMessageComposerHasSendableData as An, AttachmentPreviewList as Rn, QuotedMessagePreview as Ln, TextareaComposer as Mn, MessageTimestamp as We, AIStates as qe, useTypingContext as Dn, useAIState as On, Channel as Pn, WithComponents as zn, Window as Bn, MessageList as Yt, ChannelList as Fn, InfiniteScroll as $n } from "stream-chat-react";
|
|
6
6
|
import k from "classnames";
|
|
7
|
-
import { StarIcon as
|
|
8
|
-
import { isOfficialChannel as
|
|
9
|
-
import { MessageActions as
|
|
10
|
-
const
|
|
7
|
+
import { StarIcon as nt, DotsThreeIcon as Un, SpinnerGapIcon as ze, SignOutIcon as jn, ProhibitInsetIcon as Wt, FlagIcon as cs, CurrencyDollarIcon as Vn, CaretRightIcon as ds, ArrowLeftIcon as Hn, FileIcon as us, ImageIcon as Gn, SpeakerHighIcon as Yn, VideoCameraIcon as ms, FileMdIcon as Wn, FileTextIcon as qn, FileZipIcon as Xn, FilePptIcon as Kn, FileCsvIcon as Zn, FileXlsIcon as Jn, FileDocIcon as Qn, FilePdfIcon as ea, CircleNotchIcon as xe, PlayIcon as at, PauseIcon as ta, LinkIcon as sa, DownloadSimpleIcon as Se, XIcon as lt, CaretLeftIcon as na, GiftIcon as aa, ThumbsUpIcon as ra, ThumbsDownIcon as ia, WarningCircleIcon as oa, MegaphoneIcon as la, ChecksIcon as ca, PencilSimpleIcon as da, TrashSimpleIcon as ua, ArrowUpIcon as ma, SparkleIcon as ha, ProhibitIcon as fa } from "@phosphor-icons/react";
|
|
8
|
+
import { isOfficialChannel as ga, OFFICIAL_SENDER_USER_ID as pa, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as qt, isAgeSafetySystemType as ba, resolveRichCardImagePresentation as va, selectEnabledFaqs as xa } from "@linktr.ee/messaging-taxonomy";
|
|
9
|
+
import { MessageActions as wa, DefaultDropdownActionButton as hs } from "stream-chat-react/experimental";
|
|
10
|
+
const fs = Ve({
|
|
11
11
|
service: null,
|
|
12
12
|
client: null,
|
|
13
13
|
isConnected: !1,
|
|
@@ -17,7 +17,7 @@ const hs = Ve({
|
|
|
17
17
|
refreshConnection: async () => {
|
|
18
18
|
},
|
|
19
19
|
debug: !1
|
|
20
|
-
}),
|
|
20
|
+
}), ct = () => _e(fs), sl = ({
|
|
21
21
|
children: e,
|
|
22
22
|
user: t,
|
|
23
23
|
serviceConfig: n,
|
|
@@ -43,32 +43,32 @@ const hs = Ve({
|
|
|
43
43
|
_.current = n;
|
|
44
44
|
const A = H(i);
|
|
45
45
|
A.current = i;
|
|
46
|
-
const
|
|
46
|
+
const R = H({
|
|
47
47
|
userId: t == null ? void 0 : t.id,
|
|
48
48
|
apiKey: a,
|
|
49
49
|
serviceConfig: n,
|
|
50
50
|
capabilities: r
|
|
51
|
-
}),
|
|
52
|
-
|
|
53
|
-
renderCount:
|
|
51
|
+
}), L = H(0);
|
|
52
|
+
L.current++, o("📊 RENDER INFO", {
|
|
53
|
+
renderCount: L.current,
|
|
54
54
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
55
55
|
propChanges: {
|
|
56
|
-
userChanged:
|
|
57
|
-
apiKeyChanged:
|
|
58
|
-
serviceConfigChanged:
|
|
59
|
-
capabilitiesChanged:
|
|
56
|
+
userChanged: R.current.userId !== (t == null ? void 0 : t.id),
|
|
57
|
+
apiKeyChanged: R.current.apiKey !== a,
|
|
58
|
+
serviceConfigChanged: R.current.serviceConfig !== n,
|
|
59
|
+
capabilitiesChanged: R.current.capabilities !== r
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
61
|
+
}), R.current = {
|
|
62
62
|
userId: t == null ? void 0 : t.id,
|
|
63
63
|
apiKey: a,
|
|
64
64
|
serviceConfig: n,
|
|
65
65
|
capabilities: r
|
|
66
66
|
};
|
|
67
67
|
const D = H(null);
|
|
68
|
-
!l && a && ((S = D.current) == null ? void 0 : S.apiKey) !== a && (D.current = { apiKey: a, client: new
|
|
68
|
+
!l && a && ((S = D.current) == null ? void 0 : S.apiKey) !== a && (D.current = { apiKey: a, client: new an(a) });
|
|
69
69
|
const $ = l || (a ? ((T = D.current) == null ? void 0 : T.client) ?? null : null);
|
|
70
70
|
Y(() => {
|
|
71
|
-
const E =
|
|
71
|
+
const E = L.current, B = _.current;
|
|
72
72
|
if (l) {
|
|
73
73
|
N.current = null, m(null), u(null), c(!1), v(null), w(!1);
|
|
74
74
|
return;
|
|
@@ -84,7 +84,7 @@ const hs = Ve({
|
|
|
84
84
|
renderCount: E,
|
|
85
85
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
86
86
|
});
|
|
87
|
-
const z = new
|
|
87
|
+
const z = new nn({
|
|
88
88
|
...B,
|
|
89
89
|
apiKey: a,
|
|
90
90
|
debug: A.current,
|
|
@@ -95,7 +95,7 @@ const hs = Ve({
|
|
|
95
95
|
serviceInstance: !!z
|
|
96
96
|
});
|
|
97
97
|
}, [a, $, l]);
|
|
98
|
-
const
|
|
98
|
+
const O = H(null);
|
|
99
99
|
Y(() => {
|
|
100
100
|
var B, z;
|
|
101
101
|
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
@@ -115,7 +115,7 @@ const hs = Ve({
|
|
|
115
115
|
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
if (((B =
|
|
118
|
+
if (((B = O.current) == null ? void 0 : B.serviceId) === d && ((z = O.current) == null ? void 0 : z.userId) === t.id) {
|
|
119
119
|
o(
|
|
120
120
|
"⚠️ USER CONNECTION SKIPPED",
|
|
121
121
|
"Already connected this user with this service"
|
|
@@ -127,7 +127,7 @@ const hs = Ve({
|
|
|
127
127
|
try {
|
|
128
128
|
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
129
129
|
const j = await d.connectUser(t);
|
|
130
|
-
u(j), c(!0),
|
|
130
|
+
u(j), c(!0), O.current = { serviceId: d, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
131
131
|
userId: t.id,
|
|
132
132
|
clientId: j.userID
|
|
133
133
|
});
|
|
@@ -148,7 +148,7 @@ const hs = Ve({
|
|
|
148
148
|
const E = $;
|
|
149
149
|
return () => {
|
|
150
150
|
var B;
|
|
151
|
-
E && (
|
|
151
|
+
E && (O.current = null, (B = N.current) == null || B.disconnectUser().catch(console.error));
|
|
152
152
|
};
|
|
153
153
|
}, [$]);
|
|
154
154
|
const C = q(async () => {
|
|
@@ -175,7 +175,7 @@ const hs = Ve({
|
|
|
175
175
|
w(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
}, [d, t, o, l]),
|
|
178
|
+
}, [d, t, o, l]), P = F.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
179
179
|
hasService: !!d,
|
|
180
180
|
hasClient: !!h,
|
|
181
181
|
isConnected: g,
|
|
@@ -212,11 +212,11 @@ const hs = Ve({
|
|
|
212
212
|
o
|
|
213
213
|
]);
|
|
214
214
|
return o("🔄 RENDER END", {
|
|
215
|
-
renderCount:
|
|
215
|
+
renderCount: L.current,
|
|
216
216
|
willRenderChat: !!$,
|
|
217
|
-
contextValueReady: !!
|
|
218
|
-
}), /* @__PURE__ */ s(
|
|
219
|
-
|
|
217
|
+
contextValueReady: !!P
|
|
218
|
+
}), /* @__PURE__ */ s(fs.Provider, { value: P, children: $ ? /* @__PURE__ */ s(
|
|
219
|
+
rn,
|
|
220
220
|
{
|
|
221
221
|
client: $,
|
|
222
222
|
customClasses: {
|
|
@@ -225,7 +225,7 @@ const hs = Ve({
|
|
|
225
225
|
children: e
|
|
226
226
|
}
|
|
227
227
|
) : e });
|
|
228
|
-
},
|
|
228
|
+
}, _a = () => ct(), gs = (e) => {
|
|
229
229
|
var a, r;
|
|
230
230
|
const [t, n] = U(
|
|
231
231
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -248,13 +248,13 @@ const hs = Ve({
|
|
|
248
248
|
};
|
|
249
249
|
}, [e]), t;
|
|
250
250
|
};
|
|
251
|
-
function
|
|
251
|
+
function ps(e, t, n) {
|
|
252
252
|
const a = Object.values(e || {});
|
|
253
|
-
if (
|
|
253
|
+
if (ga(n)) {
|
|
254
254
|
const r = a.find(
|
|
255
255
|
(i) => {
|
|
256
256
|
var l;
|
|
257
|
-
return ((l = i.user) == null ? void 0 : l.id) ===
|
|
257
|
+
return ((l = i.user) == null ? void 0 : l.id) === pa;
|
|
258
258
|
}
|
|
259
259
|
);
|
|
260
260
|
if (r) return r;
|
|
@@ -266,18 +266,18 @@ function gs(e, t, n) {
|
|
|
266
266
|
}
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
|
-
const
|
|
270
|
-
function
|
|
271
|
-
return
|
|
269
|
+
const ya = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
270
|
+
function Na(e) {
|
|
271
|
+
return ya.test(e.trim());
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Xt(e, t) {
|
|
274
274
|
const n = e == null ? void 0 : e.trim();
|
|
275
|
-
return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !
|
|
275
|
+
return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !Na(n);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
return
|
|
277
|
+
function bs(e) {
|
|
278
|
+
return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const Kt = [
|
|
281
281
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
282
282
|
// Apple
|
|
283
283
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -305,7 +305,7 @@ const Xt = [
|
|
|
305
305
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
306
306
|
// Melon
|
|
307
307
|
];
|
|
308
|
-
function
|
|
308
|
+
function ka(e) {
|
|
309
309
|
let t = 0;
|
|
310
310
|
for (let n = 0; n < e.length; n++) {
|
|
311
311
|
const a = e.charCodeAt(n);
|
|
@@ -313,14 +313,14 @@ function _a(e) {
|
|
|
313
313
|
}
|
|
314
314
|
return Math.abs(t);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
return
|
|
316
|
+
function vs(e) {
|
|
317
|
+
return Kt[ka(e) % Kt.length];
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
return
|
|
319
|
+
function Ca(e) {
|
|
320
|
+
return vs(e).emoji;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
return
|
|
322
|
+
function Sa(e) {
|
|
323
|
+
return vs(e).bgColor;
|
|
324
324
|
}
|
|
325
325
|
const ye = ({
|
|
326
326
|
id: e,
|
|
@@ -331,7 +331,7 @@ const ye = ({
|
|
|
331
331
|
shape: i = "squircle",
|
|
332
332
|
dmAgentEnabled: l = !1
|
|
333
333
|
}) => {
|
|
334
|
-
const o =
|
|
334
|
+
const o = Ca(e), d = Sa(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, x = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
|
|
335
335
|
"img",
|
|
336
336
|
{
|
|
337
337
|
src: t,
|
|
@@ -369,7 +369,7 @@ const ye = ({
|
|
|
369
369
|
{
|
|
370
370
|
"aria-hidden": "true",
|
|
371
371
|
className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
372
|
-
children: /* @__PURE__ */ s(
|
|
372
|
+
children: /* @__PURE__ */ s(nt, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
373
373
|
}
|
|
374
374
|
),
|
|
375
375
|
/* @__PURE__ */ s(
|
|
@@ -395,7 +395,7 @@ const ye = ({
|
|
|
395
395
|
]
|
|
396
396
|
}
|
|
397
397
|
);
|
|
398
|
-
},
|
|
398
|
+
}, Ea = "https://linktr.ee/s/about/trust-center/report", Ia = ({
|
|
399
399
|
channel: e,
|
|
400
400
|
participant: t,
|
|
401
401
|
showBlockParticipant: n = !0,
|
|
@@ -408,8 +408,8 @@ const ye = ({
|
|
|
408
408
|
onActionComplete: m,
|
|
409
409
|
logLabel: h = "useChannelModerationActions"
|
|
410
410
|
}) => {
|
|
411
|
-
var
|
|
412
|
-
const { service: u, debug: g } =
|
|
411
|
+
var P;
|
|
412
|
+
const { service: u, debug: g } = ct(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, x = !!(a && n && u && c), [w, p] = U(!1), [v, b] = U(null), [N, _] = U(!1), [A, R] = U(!1), L = x && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
|
|
413
413
|
return Y(() => {
|
|
414
414
|
if (!x || !u || !c) {
|
|
415
415
|
p(!1), b(null);
|
|
@@ -435,7 +435,7 @@ const ye = ({
|
|
|
435
435
|
};
|
|
436
436
|
}, [x, u, c, h]), {
|
|
437
437
|
isParticipantBlocked: w,
|
|
438
|
-
isCheckingBlockedStatus:
|
|
438
|
+
isCheckingBlockedStatus: L,
|
|
439
439
|
isLeaving: N,
|
|
440
440
|
isUpdatingBlockStatus: A,
|
|
441
441
|
handleLeaveConversation: async () => {
|
|
@@ -455,31 +455,31 @@ const ye = ({
|
|
|
455
455
|
handleBlockUser: async () => {
|
|
456
456
|
var S, T, E;
|
|
457
457
|
if (!(A || !u)) {
|
|
458
|
-
o == null || o(), g && console.log(`[${h}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id),
|
|
458
|
+
o == null || o(), g && console.log(`[${h}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
|
|
459
459
|
try {
|
|
460
460
|
await u.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
|
|
461
461
|
} catch (B) {
|
|
462
462
|
console.error(`[${h}] Failed to block member`, B);
|
|
463
463
|
} finally {
|
|
464
|
-
|
|
464
|
+
R(!1);
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
467
|
},
|
|
468
468
|
handleUnblockUser: async () => {
|
|
469
469
|
var S, T, E;
|
|
470
470
|
if (!(A || !u)) {
|
|
471
|
-
o == null || o(), g && console.log(`[${h}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id),
|
|
471
|
+
o == null || o(), g && console.log(`[${h}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
|
|
472
472
|
try {
|
|
473
473
|
await u.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
|
|
474
474
|
} catch (B) {
|
|
475
475
|
console.error(`[${h}] Failed to unblock member`, B);
|
|
476
476
|
} finally {
|
|
477
|
-
|
|
477
|
+
R(!1);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
},
|
|
481
481
|
handleReportUser: () => {
|
|
482
|
-
d == null || d(), m == null || m(), window.open(
|
|
482
|
+
d == null || d(), m == null || m(), window.open(Ea, "_blank", "noopener,noreferrer");
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
485
|
}, Ne = ({
|
|
@@ -499,7 +499,7 @@ const ye = ({
|
|
|
499
499
|
...a,
|
|
500
500
|
children: n
|
|
501
501
|
}
|
|
502
|
-
),
|
|
502
|
+
), Ta = ({
|
|
503
503
|
channel: e,
|
|
504
504
|
participant: t,
|
|
505
505
|
showDeleteConversation: n = !0,
|
|
@@ -513,16 +513,16 @@ const ye = ({
|
|
|
513
513
|
customChannelActions: h,
|
|
514
514
|
triggerClassName: u
|
|
515
515
|
}) => {
|
|
516
|
-
const [g, c] = U(!1), x = H(null), w =
|
|
516
|
+
const [g, c] = U(!1), x = H(null), w = tn(), p = q(() => c(!1), []), {
|
|
517
517
|
isParticipantBlocked: v,
|
|
518
518
|
isCheckingBlockedStatus: b,
|
|
519
519
|
isLeaving: N,
|
|
520
520
|
isUpdatingBlockStatus: _,
|
|
521
521
|
handleLeaveConversation: A,
|
|
522
|
-
handleBlockUser:
|
|
523
|
-
handleUnblockUser:
|
|
522
|
+
handleBlockUser: R,
|
|
523
|
+
handleUnblockUser: L,
|
|
524
524
|
handleReportUser: D
|
|
525
|
-
} =
|
|
525
|
+
} = Ia({
|
|
526
526
|
channel: e,
|
|
527
527
|
participant: t,
|
|
528
528
|
showBlockParticipant: a,
|
|
@@ -537,13 +537,13 @@ const ye = ({
|
|
|
537
537
|
});
|
|
538
538
|
return Y(() => {
|
|
539
539
|
if (!g) return;
|
|
540
|
-
const
|
|
541
|
-
x.current && !x.current.contains(
|
|
542
|
-
}, C = (
|
|
543
|
-
|
|
540
|
+
const O = (P) => {
|
|
541
|
+
x.current && !x.current.contains(P.target) && c(!1);
|
|
542
|
+
}, C = (P) => {
|
|
543
|
+
P.key === "Escape" && c(!1);
|
|
544
544
|
};
|
|
545
|
-
return document.addEventListener("mousedown",
|
|
546
|
-
document.removeEventListener("mousedown",
|
|
545
|
+
return document.addEventListener("mousedown", O), document.addEventListener("keydown", C), () => {
|
|
546
|
+
document.removeEventListener("mousedown", O), document.removeEventListener("keydown", C);
|
|
547
547
|
};
|
|
548
548
|
}, [g]), !t || !(n || a || r || !!h) ? null : /* @__PURE__ */ f("div", { ref: x, className: "relative", children: [
|
|
549
549
|
/* @__PURE__ */ f(
|
|
@@ -554,9 +554,9 @@ const ye = ({
|
|
|
554
554
|
"aria-haspopup": "true",
|
|
555
555
|
"aria-expanded": g,
|
|
556
556
|
"aria-controls": g ? w : void 0,
|
|
557
|
-
onClick: () => c((
|
|
557
|
+
onClick: () => c((O) => !O),
|
|
558
558
|
children: [
|
|
559
|
-
/* @__PURE__ */ s(
|
|
559
|
+
/* @__PURE__ */ s(Un, { className: "size-5 text-black/90" }),
|
|
560
560
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
|
|
561
561
|
]
|
|
562
562
|
}
|
|
@@ -578,7 +578,7 @@ const ye = ({
|
|
|
578
578
|
disabled: N,
|
|
579
579
|
"aria-busy": N,
|
|
580
580
|
children: [
|
|
581
|
-
N ? /* @__PURE__ */ s(
|
|
581
|
+
N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(jn, { className: "h-5 w-5" }),
|
|
582
582
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
583
583
|
]
|
|
584
584
|
}
|
|
@@ -587,34 +587,34 @@ const ye = ({
|
|
|
587
587
|
// Block status not yet resolved — show a disabled placeholder
|
|
588
588
|
// so a premature click can't act on a stale block state.
|
|
589
589
|
/* @__PURE__ */ f(Ne, { disabled: !0, "aria-busy": !0, children: [
|
|
590
|
-
/* @__PURE__ */ s(
|
|
590
|
+
/* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
|
|
591
591
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
592
592
|
] })
|
|
593
593
|
) : v ? /* @__PURE__ */ f(
|
|
594
594
|
Ne,
|
|
595
595
|
{
|
|
596
|
-
onClick:
|
|
596
|
+
onClick: L,
|
|
597
597
|
disabled: _,
|
|
598
598
|
"aria-busy": _,
|
|
599
599
|
children: [
|
|
600
|
-
_ ? /* @__PURE__ */ s(
|
|
600
|
+
_ ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
|
|
601
601
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
602
602
|
]
|
|
603
603
|
}
|
|
604
604
|
) : /* @__PURE__ */ f(
|
|
605
605
|
Ne,
|
|
606
606
|
{
|
|
607
|
-
onClick:
|
|
607
|
+
onClick: R,
|
|
608
608
|
disabled: _,
|
|
609
609
|
"aria-busy": _,
|
|
610
610
|
children: [
|
|
611
|
-
_ ? /* @__PURE__ */ s(
|
|
611
|
+
_ ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
|
|
612
612
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
613
613
|
]
|
|
614
614
|
}
|
|
615
615
|
) }),
|
|
616
616
|
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ f(Ne, { variant: "danger", onClick: D, children: [
|
|
617
|
-
/* @__PURE__ */ s(
|
|
617
|
+
/* @__PURE__ */ s(cs, { className: "h-5 w-5" }),
|
|
618
618
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
619
619
|
] }) }),
|
|
620
620
|
h
|
|
@@ -622,7 +622,7 @@ const ye = ({
|
|
|
622
622
|
}
|
|
623
623
|
)
|
|
624
624
|
] });
|
|
625
|
-
},
|
|
625
|
+
}, Xe = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", Aa = "CUSTOMER_PAID", Ra = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Aa, La = ({
|
|
626
626
|
className: e,
|
|
627
627
|
onBack: t,
|
|
628
628
|
showBackButton: n,
|
|
@@ -640,18 +640,18 @@ const ye = ({
|
|
|
640
640
|
showChannelInfo: x = !0,
|
|
641
641
|
onParticipantNameClick: w
|
|
642
642
|
}) => {
|
|
643
|
-
var C,
|
|
644
|
-
const { channel: p } = fe(), { client: v } =
|
|
643
|
+
var C, P, S, T;
|
|
644
|
+
const { channel: p } = fe(), { client: v } = Te(), b = F.useMemo(
|
|
645
645
|
() => {
|
|
646
646
|
var E;
|
|
647
|
-
return
|
|
647
|
+
return ps(
|
|
648
648
|
(E = p.state) == null ? void 0 : E.members,
|
|
649
649
|
v == null ? void 0 : v.userID,
|
|
650
650
|
p.type
|
|
651
651
|
);
|
|
652
652
|
},
|
|
653
653
|
[(C = p.state) == null ? void 0 : C.members, v == null ? void 0 : v.userID, p.type]
|
|
654
|
-
), N =
|
|
654
|
+
), N = bs(b == null ? void 0 : b.user), _ = (P = b == null ? void 0 : b.user) == null ? void 0 : P.image, A = gs(p), R = Ra((S = p.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, L = a && A, D = R || L || !!w, $ = async () => {
|
|
655
655
|
try {
|
|
656
656
|
A ? await p.unpin() : await p.pin();
|
|
657
657
|
} catch (E) {
|
|
@@ -660,7 +660,7 @@ const ye = ({
|
|
|
660
660
|
E
|
|
661
661
|
);
|
|
662
662
|
}
|
|
663
|
-
},
|
|
663
|
+
}, O = /* @__PURE__ */ f(J, { children: [
|
|
664
664
|
/* @__PURE__ */ s(
|
|
665
665
|
ye,
|
|
666
666
|
{
|
|
@@ -682,24 +682,24 @@ const ye = ({
|
|
|
682
682
|
children: /* @__PURE__ */ f("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
683
683
|
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
|
|
684
684
|
D && /* @__PURE__ */ f("span", { className: "ml-2 flex gap-1", children: [
|
|
685
|
-
|
|
685
|
+
R && /* @__PURE__ */ s(
|
|
686
686
|
"span",
|
|
687
687
|
{
|
|
688
688
|
"aria-label": "Paid customer",
|
|
689
689
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
690
|
-
children: /* @__PURE__ */ s(
|
|
690
|
+
children: /* @__PURE__ */ s(Vn, { className: "size-2.5", weight: "bold" })
|
|
691
691
|
}
|
|
692
692
|
),
|
|
693
|
-
|
|
693
|
+
L && /* @__PURE__ */ s(
|
|
694
694
|
"span",
|
|
695
695
|
{
|
|
696
696
|
"aria-label": "Starred conversation",
|
|
697
697
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
|
|
698
|
-
children: /* @__PURE__ */ s(
|
|
698
|
+
children: /* @__PURE__ */ s(nt, { className: "size-2.5", weight: "fill" })
|
|
699
699
|
}
|
|
700
700
|
),
|
|
701
701
|
w && /* @__PURE__ */ s(
|
|
702
|
-
|
|
702
|
+
ds,
|
|
703
703
|
{
|
|
704
704
|
"aria-hidden": "true",
|
|
705
705
|
className: "size-4 shrink-0 text-black/65",
|
|
@@ -723,14 +723,14 @@ const ye = ({
|
|
|
723
723
|
"button",
|
|
724
724
|
{
|
|
725
725
|
className: k(
|
|
726
|
-
|
|
726
|
+
Xe,
|
|
727
727
|
"messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
|
|
728
728
|
),
|
|
729
729
|
onClick: t || (() => {
|
|
730
730
|
}),
|
|
731
731
|
type: "button",
|
|
732
732
|
"aria-label": "Back to conversations",
|
|
733
|
-
children: /* @__PURE__ */ s(
|
|
733
|
+
children: /* @__PURE__ */ s(Hn, { className: "size-5 text-black/90" })
|
|
734
734
|
}
|
|
735
735
|
) }),
|
|
736
736
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: w ? /* @__PURE__ */ s(
|
|
@@ -740,20 +740,20 @@ const ye = ({
|
|
|
740
740
|
onClick: w,
|
|
741
741
|
"aria-label": `View details for ${N}`,
|
|
742
742
|
className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
|
|
743
|
-
children:
|
|
743
|
+
children: O
|
|
744
744
|
}
|
|
745
|
-
) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children:
|
|
745
|
+
) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: O }) }),
|
|
746
746
|
/* @__PURE__ */ f("div", { className: "flex items-start justify-end gap-2", children: [
|
|
747
747
|
a && /* @__PURE__ */ s(
|
|
748
748
|
"button",
|
|
749
749
|
{
|
|
750
|
-
className:
|
|
750
|
+
className: Xe,
|
|
751
751
|
onClick: $,
|
|
752
752
|
type: "button",
|
|
753
753
|
"aria-pressed": A,
|
|
754
754
|
"aria-label": A ? "Unstar conversation" : "Star conversation",
|
|
755
755
|
children: /* @__PURE__ */ s(
|
|
756
|
-
|
|
756
|
+
nt,
|
|
757
757
|
{
|
|
758
758
|
className: k("size-5", {
|
|
759
759
|
"text-[#FFD60A]": A,
|
|
@@ -765,7 +765,7 @@ const ye = ({
|
|
|
765
765
|
}
|
|
766
766
|
),
|
|
767
767
|
x && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
768
|
-
|
|
768
|
+
Ta,
|
|
769
769
|
{
|
|
770
770
|
channel: p,
|
|
771
771
|
participant: b,
|
|
@@ -778,27 +778,27 @@ const ye = ({
|
|
|
778
778
|
onBlockParticipantClick: h,
|
|
779
779
|
onReportParticipantClick: u,
|
|
780
780
|
customChannelActions: g,
|
|
781
|
-
triggerClassName:
|
|
781
|
+
triggerClassName: Xe
|
|
782
782
|
}
|
|
783
783
|
))
|
|
784
784
|
] })
|
|
785
785
|
] })
|
|
786
786
|
}
|
|
787
787
|
);
|
|
788
|
-
},
|
|
789
|
-
function
|
|
790
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
788
|
+
}, Ma = (e) => /* @__PURE__ */ s(on, { ...e, position: "center" }), rt = "vote_up", it = "vote_down";
|
|
789
|
+
function Da(e) {
|
|
790
|
+
return e != null && e.length ? e.some((t) => t.type === it) ? "down" : e.some((t) => t.type === rt) ? "up" : null : null;
|
|
791
791
|
}
|
|
792
|
-
function
|
|
793
|
-
const { channel: t } = fe(), { client: n } =
|
|
794
|
-
() =>
|
|
792
|
+
function Oa(e) {
|
|
793
|
+
const { channel: t } = fe(), { client: n } = Te("useMessageVote"), a = ae(
|
|
794
|
+
() => Da(e.own_reactions),
|
|
795
795
|
[e.own_reactions]
|
|
796
796
|
), r = q(async () => {
|
|
797
797
|
if (n != null && n.userID)
|
|
798
798
|
try {
|
|
799
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
799
|
+
a === "up" ? await t.deleteReaction(e.id, rt) : await t.sendReaction(
|
|
800
800
|
e.id,
|
|
801
|
-
{ type:
|
|
801
|
+
{ type: rt },
|
|
802
802
|
{ enforce_unique: !0, skip_push: !0 }
|
|
803
803
|
);
|
|
804
804
|
} catch {
|
|
@@ -806,9 +806,9 @@ function Ma(e) {
|
|
|
806
806
|
}, [t, n == null ? void 0 : n.userID, e.id, a]), i = q(async () => {
|
|
807
807
|
if (n != null && n.userID)
|
|
808
808
|
try {
|
|
809
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
809
|
+
a === "down" ? await t.deleteReaction(e.id, it) : await t.sendReaction(
|
|
810
810
|
e.id,
|
|
811
|
-
{ type:
|
|
811
|
+
{ type: it },
|
|
812
812
|
{ enforce_unique: !0, skip_push: !0 }
|
|
813
813
|
);
|
|
814
814
|
} catch {
|
|
@@ -816,39 +816,39 @@ function Ma(e) {
|
|
|
816
816
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
817
817
|
return { selected: a, voteUp: r, voteDown: i };
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function Pa(e) {
|
|
820
820
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function xs({
|
|
823
823
|
message: e,
|
|
824
824
|
viewerLanguage: t
|
|
825
825
|
}) {
|
|
826
826
|
var r;
|
|
827
|
-
const n = e == null ? void 0 : e.text, a =
|
|
827
|
+
const n = e == null ? void 0 : e.text, a = Pa(t);
|
|
828
828
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
function
|
|
830
|
+
const za = ["linktr.ee"], Zt = "messaging-attachment-v1_0";
|
|
831
|
+
function Ba(e) {
|
|
832
832
|
try {
|
|
833
833
|
return new URL(e).hostname.toLowerCase();
|
|
834
834
|
} catch {
|
|
835
835
|
return null;
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
|
-
function
|
|
839
|
-
return
|
|
838
|
+
function Fa(e) {
|
|
839
|
+
return za.some(
|
|
840
840
|
(t) => e === t || e.endsWith(`.${t}`)
|
|
841
841
|
);
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function de(e) {
|
|
844
844
|
const t = e == null ? void 0 : e.trim();
|
|
845
845
|
if (!t) return;
|
|
846
|
-
const n =
|
|
847
|
-
if (!n || !
|
|
846
|
+
const n = Ba(t);
|
|
847
|
+
if (!n || !Fa(n)) return t;
|
|
848
848
|
const a = new URL(t);
|
|
849
|
-
return a.searchParams.get("io") === "true" && a.searchParams.get("size") ===
|
|
849
|
+
return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Zt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Zt), a.toString());
|
|
850
850
|
}
|
|
851
|
-
const
|
|
851
|
+
const $a = [
|
|
852
852
|
[/pdf/, "pdf"],
|
|
853
853
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
854
854
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -858,42 +858,42 @@ const za = [
|
|
|
858
858
|
[/plain|rtf/, "text"],
|
|
859
859
|
[/markdown/, "markdown"]
|
|
860
860
|
];
|
|
861
|
-
function
|
|
861
|
+
function ue(e) {
|
|
862
862
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
863
863
|
}
|
|
864
|
-
function
|
|
865
|
-
const t =
|
|
864
|
+
function ws(e) {
|
|
865
|
+
const t = $a.find(
|
|
866
866
|
([n]) => n.test(e)
|
|
867
867
|
);
|
|
868
868
|
return t ? t[1] : "generic";
|
|
869
869
|
}
|
|
870
|
-
const
|
|
871
|
-
video:
|
|
872
|
-
audio:
|
|
873
|
-
image:
|
|
874
|
-
document:
|
|
875
|
-
},
|
|
876
|
-
pdf:
|
|
877
|
-
doc:
|
|
878
|
-
xls:
|
|
879
|
-
csv:
|
|
880
|
-
ppt:
|
|
881
|
-
zip:
|
|
882
|
-
text:
|
|
883
|
-
markdown:
|
|
884
|
-
generic:
|
|
870
|
+
const Ua = {
|
|
871
|
+
video: ms,
|
|
872
|
+
audio: Yn,
|
|
873
|
+
image: Gn,
|
|
874
|
+
document: us
|
|
875
|
+
}, ja = {
|
|
876
|
+
pdf: ea,
|
|
877
|
+
doc: Qn,
|
|
878
|
+
xls: Jn,
|
|
879
|
+
csv: Zn,
|
|
880
|
+
ppt: Kn,
|
|
881
|
+
zip: Xn,
|
|
882
|
+
text: qn,
|
|
883
|
+
markdown: Wn,
|
|
884
|
+
generic: us
|
|
885
885
|
};
|
|
886
|
-
function
|
|
887
|
-
const t =
|
|
888
|
-
return t !== "document" ?
|
|
886
|
+
function Va(e) {
|
|
887
|
+
const t = ue(e);
|
|
888
|
+
return t !== "document" ? Ua[t] : ja[ws(e)];
|
|
889
889
|
}
|
|
890
890
|
function we(e, t) {
|
|
891
|
-
return F.createElement(
|
|
891
|
+
return F.createElement(Va(e), t);
|
|
892
892
|
}
|
|
893
|
-
const
|
|
893
|
+
const Ha = (e) => {
|
|
894
894
|
var t, n;
|
|
895
895
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
|
|
896
|
-
},
|
|
896
|
+
}, Ga = ({
|
|
897
897
|
source: e,
|
|
898
898
|
mimeType: t,
|
|
899
899
|
poster: n,
|
|
@@ -905,7 +905,7 @@ const Ua = (e) => {
|
|
|
905
905
|
muted: d = !1,
|
|
906
906
|
onContainerClick: m
|
|
907
907
|
}) => {
|
|
908
|
-
const h =
|
|
908
|
+
const h = ue(t), u = H(null), g = H(null), c = H(null), x = H(r), [w, p] = U(a), [v, b] = U(0), [N, _] = U(!1), [A, R] = U(!1), [L, D] = U(!1), [$, O] = U(!1), [C, P] = U(!0), [S, T] = U(null), E = q(() => {
|
|
909
909
|
D(!1), p(!0);
|
|
910
910
|
}, []), B = q((y) => {
|
|
911
911
|
const I = g.current;
|
|
@@ -913,7 +913,7 @@ const Ua = (e) => {
|
|
|
913
913
|
const W = I.getBoundingClientRect();
|
|
914
914
|
return Math.max(
|
|
915
915
|
0,
|
|
916
|
-
Math.min(1, (
|
|
916
|
+
Math.min(1, (Ha(y) - W.left) / W.width)
|
|
917
917
|
);
|
|
918
918
|
}, []), z = q((y) => {
|
|
919
919
|
const I = u.current;
|
|
@@ -964,7 +964,7 @@ const Ua = (e) => {
|
|
|
964
964
|
m(y);
|
|
965
965
|
return;
|
|
966
966
|
}
|
|
967
|
-
|
|
967
|
+
L || l && p((I) => !I);
|
|
968
968
|
},
|
|
969
969
|
onKeyDown: (y) => {
|
|
970
970
|
if (!(y.key !== "Enter" && y.key !== " ")) {
|
|
@@ -972,7 +972,7 @@ const Ua = (e) => {
|
|
|
972
972
|
m(y);
|
|
973
973
|
return;
|
|
974
974
|
}
|
|
975
|
-
|
|
975
|
+
L || l && p((I) => !I);
|
|
976
976
|
}
|
|
977
977
|
},
|
|
978
978
|
children: [
|
|
@@ -996,11 +996,11 @@ const Ua = (e) => {
|
|
|
996
996
|
loop: i,
|
|
997
997
|
muted: d,
|
|
998
998
|
style: { width: "100%", height: "100%" },
|
|
999
|
-
onLoadStart: () =>
|
|
999
|
+
onLoadStart: () => O(!0),
|
|
1000
1000
|
onCanPlay: () => {
|
|
1001
|
-
|
|
1001
|
+
O(!1), P(!1);
|
|
1002
1002
|
},
|
|
1003
|
-
onWaiting: () =>
|
|
1003
|
+
onWaiting: () => O(!0),
|
|
1004
1004
|
onPlay: () => D(!1),
|
|
1005
1005
|
onEnded: () => {
|
|
1006
1006
|
i || (p(!1), b(0));
|
|
@@ -1016,11 +1016,11 @@ const Ua = (e) => {
|
|
|
1016
1016
|
muted: d,
|
|
1017
1017
|
playsInline: !0,
|
|
1018
1018
|
style: { width: "100%", height: "100%" },
|
|
1019
|
-
onLoadStart: () =>
|
|
1019
|
+
onLoadStart: () => O(!0),
|
|
1020
1020
|
onCanPlay: () => {
|
|
1021
|
-
|
|
1021
|
+
O(!1), P(!1);
|
|
1022
1022
|
},
|
|
1023
|
-
onWaiting: () =>
|
|
1023
|
+
onWaiting: () => O(!0),
|
|
1024
1024
|
onPlay: () => D(!1),
|
|
1025
1025
|
onLoadedMetadata: () => {
|
|
1026
1026
|
const y = u.current;
|
|
@@ -1032,14 +1032,14 @@ const Ua = (e) => {
|
|
|
1032
1032
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
1033
1033
|
}
|
|
1034
1034
|
) }),
|
|
1035
|
-
$ && !
|
|
1035
|
+
$ && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
1036
1036
|
xe,
|
|
1037
1037
|
{
|
|
1038
1038
|
className: "size-8 animate-spin text-white/80",
|
|
1039
1039
|
weight: "bold"
|
|
1040
1040
|
}
|
|
1041
1041
|
) }),
|
|
1042
|
-
|
|
1042
|
+
L && !l && /* @__PURE__ */ s(
|
|
1043
1043
|
"div",
|
|
1044
1044
|
{
|
|
1045
1045
|
className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
|
|
@@ -1052,7 +1052,7 @@ const Ua = (e) => {
|
|
|
1052
1052
|
onKeyDown: (y) => {
|
|
1053
1053
|
y.key !== "Enter" && y.key !== " " || (y.preventDefault(), y.stopPropagation(), E());
|
|
1054
1054
|
},
|
|
1055
|
-
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(
|
|
1055
|
+
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(at, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1056
1056
|
}
|
|
1057
1057
|
),
|
|
1058
1058
|
o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
|
|
@@ -1091,7 +1091,7 @@ const Ua = (e) => {
|
|
|
1091
1091
|
},
|
|
1092
1092
|
className: "shrink-0 text-white",
|
|
1093
1093
|
"aria-label": w ? "Pause" : "Play",
|
|
1094
|
-
children: w ? /* @__PURE__ */ s(
|
|
1094
|
+
children: w ? /* @__PURE__ */ s(ta, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(at, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1095
1095
|
}
|
|
1096
1096
|
),
|
|
1097
1097
|
/* @__PURE__ */ f(
|
|
@@ -1108,8 +1108,8 @@ const Ua = (e) => {
|
|
|
1108
1108
|
onMouseDown: j,
|
|
1109
1109
|
onTouchStart: j,
|
|
1110
1110
|
onClick: (y) => y.stopPropagation(),
|
|
1111
|
-
onMouseEnter: () =>
|
|
1112
|
-
onMouseLeave: () =>
|
|
1111
|
+
onMouseEnter: () => R(!0),
|
|
1112
|
+
onMouseLeave: () => R(!1),
|
|
1113
1113
|
onKeyDown: (y) => {
|
|
1114
1114
|
y.key === "ArrowRight" && z(Math.min(1, v + 0.05)), y.key === "ArrowLeft" && z(Math.max(0, v - 0.05));
|
|
1115
1115
|
},
|
|
@@ -1141,7 +1141,7 @@ const Ua = (e) => {
|
|
|
1141
1141
|
]
|
|
1142
1142
|
}
|
|
1143
1143
|
);
|
|
1144
|
-
},
|
|
1144
|
+
}, Jt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ya = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", _s = ({
|
|
1145
1145
|
mimeType: e,
|
|
1146
1146
|
sourceUrl: t,
|
|
1147
1147
|
thumbnailUrl: n,
|
|
@@ -1150,9 +1150,9 @@ const Ua = (e) => {
|
|
|
1150
1150
|
mediaPlayerProps: i,
|
|
1151
1151
|
containedImage: l = !1
|
|
1152
1152
|
}) => {
|
|
1153
|
-
const o =
|
|
1153
|
+
const o = ue(e), [d, m] = U(!1), h = de(t), u = de(n);
|
|
1154
1154
|
return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
|
|
1155
|
-
|
|
1155
|
+
Ga,
|
|
1156
1156
|
{
|
|
1157
1157
|
source: t,
|
|
1158
1158
|
mimeType: e,
|
|
@@ -1199,11 +1199,11 @@ const Ua = (e) => {
|
|
|
1199
1199
|
{
|
|
1200
1200
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1201
1201
|
children: we(e, {
|
|
1202
|
-
className:
|
|
1202
|
+
className: Jt(r),
|
|
1203
1203
|
weight: "regular"
|
|
1204
1204
|
})
|
|
1205
1205
|
}
|
|
1206
|
-
) : n ? /* @__PURE__ */ s("div", { className: `relative ${
|
|
1206
|
+
) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ya(r)}`, children: /* @__PURE__ */ s(
|
|
1207
1207
|
"img",
|
|
1208
1208
|
{
|
|
1209
1209
|
src: u ?? n,
|
|
@@ -1216,12 +1216,12 @@ const Ua = (e) => {
|
|
|
1216
1216
|
{
|
|
1217
1217
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1218
1218
|
children: we(e, {
|
|
1219
|
-
className:
|
|
1219
|
+
className: Jt(r),
|
|
1220
1220
|
weight: "regular"
|
|
1221
1221
|
})
|
|
1222
1222
|
}
|
|
1223
1223
|
);
|
|
1224
|
-
},
|
|
1224
|
+
}, ys = ({
|
|
1225
1225
|
variant: e,
|
|
1226
1226
|
thumbnail: t,
|
|
1227
1227
|
title: n,
|
|
@@ -1287,59 +1287,59 @@ const Ua = (e) => {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
);
|
|
1289
1289
|
};
|
|
1290
|
-
function
|
|
1290
|
+
function Ns(e) {
|
|
1291
1291
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function dt(e) {
|
|
1294
1294
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function Wa(e) {
|
|
1297
1297
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function qa(e) {
|
|
1300
1300
|
return e ? "text-white" : "text-black";
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function Xa(e) {
|
|
1303
1303
|
return e ? "text-white/55" : "text-black/55";
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function Ka(e) {
|
|
1306
1306
|
return e ? "text-white/40" : "text-black/40";
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Za(e) {
|
|
1309
1309
|
return e ? "text-white/20" : "text-black/20";
|
|
1310
1310
|
}
|
|
1311
|
-
const
|
|
1311
|
+
const ut = ({ attachment: e, isMyMessage: t }) => {
|
|
1312
1312
|
const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, m = /* @__PURE__ */ f(F.Fragment, { children: [
|
|
1313
1313
|
/* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
|
|
1314
1314
|
"img",
|
|
1315
1315
|
{
|
|
1316
|
-
src:
|
|
1316
|
+
src: de(r) ?? r,
|
|
1317
1317
|
alt: n ?? "",
|
|
1318
1318
|
className: "aspect-video w-full rounded-[20px] object-cover"
|
|
1319
1319
|
}
|
|
1320
1320
|
) : /* @__PURE__ */ s(
|
|
1321
1321
|
"div",
|
|
1322
1322
|
{
|
|
1323
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1324
|
-
children: /* @__PURE__ */ s(
|
|
1323
|
+
className: `aspect-video w-full rounded-[20px] ${Wa(t)} flex items-center justify-center`,
|
|
1324
|
+
children: /* @__PURE__ */ s(sa, { className: `size-12 ${Za(t)}` })
|
|
1325
1325
|
}
|
|
1326
1326
|
) }),
|
|
1327
1327
|
/* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
|
|
1328
|
-
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1329
|
-
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${
|
|
1330
|
-
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1328
|
+
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${qa(t)}`, children: n }),
|
|
1329
|
+
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Xa(t)}`, children: a }),
|
|
1330
|
+
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Ka(t)}`, children: d })
|
|
1331
1331
|
] })
|
|
1332
1332
|
] });
|
|
1333
1333
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
|
|
1334
1334
|
};
|
|
1335
|
-
function
|
|
1335
|
+
function ks(e) {
|
|
1336
1336
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1338
|
+
function mt(e) {
|
|
1339
1339
|
var t;
|
|
1340
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1340
|
+
return (t = e.attachments) == null ? void 0 : t.find(ks);
|
|
1341
1341
|
}
|
|
1342
|
-
async function
|
|
1342
|
+
async function Ja(e, t) {
|
|
1343
1343
|
let n;
|
|
1344
1344
|
try {
|
|
1345
1345
|
n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1351,7 +1351,7 @@ async function Xa(e, t) {
|
|
|
1351
1351
|
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
1352
1352
|
l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
1353
1353
|
}
|
|
1354
|
-
const
|
|
1354
|
+
const Qa = ({
|
|
1355
1355
|
url: e,
|
|
1356
1356
|
filename: t
|
|
1357
1357
|
}) => {
|
|
@@ -1363,7 +1363,7 @@ const Ka = ({
|
|
|
1363
1363
|
onClick: (i) => {
|
|
1364
1364
|
i.stopPropagation();
|
|
1365
1365
|
const l = window.open("", "_blank", "noopener,noreferrer");
|
|
1366
|
-
a(!0),
|
|
1366
|
+
a(!0), Ja(e, t).then(() => {
|
|
1367
1367
|
l == null || l.close();
|
|
1368
1368
|
}).catch(() => {
|
|
1369
1369
|
l && (l.location.href = e);
|
|
@@ -1378,7 +1378,7 @@ const Ka = ({
|
|
|
1378
1378
|
}
|
|
1379
1379
|
);
|
|
1380
1380
|
};
|
|
1381
|
-
function
|
|
1381
|
+
function ht(e) {
|
|
1382
1382
|
var u, g, c, x;
|
|
1383
1383
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1384
1384
|
(w) => w.type === "video" && w.asset_url
|
|
@@ -1399,16 +1399,16 @@ function mt(e) {
|
|
|
1399
1399
|
thumbnailUrl: h
|
|
1400
1400
|
};
|
|
1401
1401
|
}
|
|
1402
|
-
const
|
|
1402
|
+
const Cs = ({
|
|
1403
1403
|
resolvedUrl: e,
|
|
1404
1404
|
resolvedType: t,
|
|
1405
1405
|
title: n,
|
|
1406
1406
|
fileSize: a,
|
|
1407
1407
|
thumbnailUrl: r
|
|
1408
1408
|
}) => {
|
|
1409
|
-
const i = a !== void 0 ?
|
|
1409
|
+
const i = a !== void 0 ? Ns(a) : void 0;
|
|
1410
1410
|
return /* @__PURE__ */ s(
|
|
1411
|
-
|
|
1411
|
+
ys,
|
|
1412
1412
|
{
|
|
1413
1413
|
variant: "dark",
|
|
1414
1414
|
title: n,
|
|
@@ -1416,7 +1416,7 @@ const ks = ({
|
|
|
1416
1416
|
mimeType: t,
|
|
1417
1417
|
detail: i,
|
|
1418
1418
|
thumbnail: /* @__PURE__ */ s(
|
|
1419
|
-
|
|
1419
|
+
_s,
|
|
1420
1420
|
{
|
|
1421
1421
|
mimeType: t,
|
|
1422
1422
|
sourceUrl: e,
|
|
@@ -1427,23 +1427,23 @@ const ks = ({
|
|
|
1427
1427
|
)
|
|
1428
1428
|
}
|
|
1429
1429
|
);
|
|
1430
|
-
},
|
|
1430
|
+
}, Ss = ({
|
|
1431
1431
|
resolvedUrl: e,
|
|
1432
1432
|
resolvedType: t,
|
|
1433
1433
|
title: n,
|
|
1434
1434
|
fileSize: a,
|
|
1435
1435
|
thumbnailUrl: r
|
|
1436
1436
|
}) => {
|
|
1437
|
-
const i =
|
|
1437
|
+
const i = ue(t), l = a !== void 0 ? Ns(a) : void 0;
|
|
1438
1438
|
return /* @__PURE__ */ s(
|
|
1439
|
-
|
|
1439
|
+
ys,
|
|
1440
1440
|
{
|
|
1441
1441
|
variant: "light",
|
|
1442
1442
|
title: n,
|
|
1443
1443
|
mimeType: t,
|
|
1444
1444
|
detail: l,
|
|
1445
1445
|
thumbnail: /* @__PURE__ */ s(
|
|
1446
|
-
|
|
1446
|
+
_s,
|
|
1447
1447
|
{
|
|
1448
1448
|
mimeType: t,
|
|
1449
1449
|
sourceUrl: e,
|
|
@@ -1453,14 +1453,14 @@ const ks = ({
|
|
|
1453
1453
|
containedImage: i === "image" || i === "document"
|
|
1454
1454
|
}
|
|
1455
1455
|
),
|
|
1456
|
-
action: /* @__PURE__ */ s(
|
|
1456
|
+
action: /* @__PURE__ */ s(Qa, { url: e, filename: n })
|
|
1457
1457
|
}
|
|
1458
1458
|
);
|
|
1459
|
-
},
|
|
1459
|
+
}, er = ({
|
|
1460
1460
|
message: e,
|
|
1461
1461
|
isMyMessage: t = !1
|
|
1462
1462
|
}) => {
|
|
1463
|
-
const n =
|
|
1463
|
+
const n = mt(e), a = ht(e);
|
|
1464
1464
|
return !n && !a ? null : /* @__PURE__ */ f("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", "data-dd-privacy": "mask", children: [
|
|
1465
1465
|
!t && e.user && /* @__PURE__ */ s(
|
|
1466
1466
|
ye,
|
|
@@ -1482,41 +1482,41 @@ const ks = ({
|
|
|
1482
1482
|
className: "str-chat__message-bubble",
|
|
1483
1483
|
"data-attachment-bubble": "true",
|
|
1484
1484
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1485
|
-
children: n ? /* @__PURE__ */ s("div", { className:
|
|
1485
|
+
children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(Cs, { ...a }) : /* @__PURE__ */ s(Ss, { ...a })
|
|
1486
1486
|
}
|
|
1487
1487
|
) })
|
|
1488
1488
|
}
|
|
1489
1489
|
)
|
|
1490
1490
|
] });
|
|
1491
|
-
},
|
|
1491
|
+
}, tr = ({
|
|
1492
1492
|
message: e
|
|
1493
1493
|
}) => {
|
|
1494
|
-
const t =
|
|
1494
|
+
const t = mt(e);
|
|
1495
1495
|
if (t)
|
|
1496
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1497
|
-
const n =
|
|
1498
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1499
|
-
},
|
|
1496
|
+
return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
|
|
1497
|
+
const n = ht(e);
|
|
1498
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Cs, { ...n }) }) : null;
|
|
1499
|
+
}, sr = ({
|
|
1500
1500
|
message: e
|
|
1501
1501
|
}) => {
|
|
1502
|
-
const t =
|
|
1502
|
+
const t = mt(e);
|
|
1503
1503
|
if (t)
|
|
1504
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1505
|
-
const n =
|
|
1506
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1507
|
-
},
|
|
1508
|
-
Creator:
|
|
1509
|
-
Visitor:
|
|
1510
|
-
}),
|
|
1504
|
+
return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
|
|
1505
|
+
const n = ht(e);
|
|
1506
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ss, { ...n }) }) : null;
|
|
1507
|
+
}, nl = Object.assign(er, {
|
|
1508
|
+
Creator: tr,
|
|
1509
|
+
Visitor: sr
|
|
1510
|
+
}), nr = {
|
|
1511
1511
|
dark: "bg-[#1e2330]",
|
|
1512
1512
|
light: "bg-[#f2f1ef]"
|
|
1513
|
-
},
|
|
1513
|
+
}, ar = {
|
|
1514
1514
|
dark: "text-white",
|
|
1515
1515
|
light: "text-[#000000]"
|
|
1516
|
-
},
|
|
1516
|
+
}, rr = {
|
|
1517
1517
|
dark: "border-white/[0.08]",
|
|
1518
1518
|
light: "border-black/[0.08]"
|
|
1519
|
-
},
|
|
1519
|
+
}, ir = (e) => e === "dark" ? "sender" : "receiver", or = {
|
|
1520
1520
|
sender: {
|
|
1521
1521
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
1522
1522
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -1529,7 +1529,7 @@ const ks = ({
|
|
|
1529
1529
|
middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
|
|
1530
1530
|
end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
|
|
1531
1531
|
}
|
|
1532
|
-
},
|
|
1532
|
+
}, Ae = ({
|
|
1533
1533
|
variant: e,
|
|
1534
1534
|
text: t,
|
|
1535
1535
|
bordered: n = !0,
|
|
@@ -1541,7 +1541,7 @@ const ks = ({
|
|
|
1541
1541
|
children: d,
|
|
1542
1542
|
"data-testid": m
|
|
1543
1543
|
}) => {
|
|
1544
|
-
const h = t != null && t !== "", u = l ??
|
|
1544
|
+
const h = t != null && t !== "", u = l ?? or[ir(e)][a];
|
|
1545
1545
|
return /* @__PURE__ */ f(
|
|
1546
1546
|
"div",
|
|
1547
1547
|
{
|
|
@@ -1570,10 +1570,10 @@ const ks = ({
|
|
|
1570
1570
|
// there is no ambiguity to resolve.
|
|
1571
1571
|
h && "pb-0",
|
|
1572
1572
|
u,
|
|
1573
|
-
|
|
1574
|
-
|
|
1573
|
+
nr[e],
|
|
1574
|
+
ar[e],
|
|
1575
1575
|
n && "border",
|
|
1576
|
-
n &&
|
|
1576
|
+
n && rr[e],
|
|
1577
1577
|
o
|
|
1578
1578
|
),
|
|
1579
1579
|
children: [
|
|
@@ -1601,7 +1601,7 @@ const ks = ({
|
|
|
1601
1601
|
]
|
|
1602
1602
|
}
|
|
1603
1603
|
);
|
|
1604
|
-
},
|
|
1604
|
+
}, Re = ({
|
|
1605
1605
|
onClick: e,
|
|
1606
1606
|
variant: t = "overlay",
|
|
1607
1607
|
ariaLabel: n = "Dismiss attachment"
|
|
@@ -1617,18 +1617,18 @@ const ks = ({
|
|
|
1617
1617
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
1618
1618
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
1619
1619
|
),
|
|
1620
|
-
children: /* @__PURE__ */ s(
|
|
1620
|
+
children: /* @__PURE__ */ s(lt, { className: "size-3", weight: "bold" })
|
|
1621
1621
|
}
|
|
1622
|
-
),
|
|
1622
|
+
), Le = (e) => e === "received" ? "light" : "dark", lr = ({
|
|
1623
1623
|
firstOfGroup: e,
|
|
1624
1624
|
endOfGroup: t,
|
|
1625
1625
|
groupedByUser: n
|
|
1626
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1626
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", cr = ({
|
|
1627
1627
|
src: e,
|
|
1628
1628
|
mimeType: t,
|
|
1629
1629
|
filename: n,
|
|
1630
1630
|
items: a
|
|
1631
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [],
|
|
1631
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], dr = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
1632
1632
|
/* @__PURE__ */ s(
|
|
1633
1633
|
"audio",
|
|
1634
1634
|
{
|
|
@@ -1640,7 +1640,7 @@ const ks = ({
|
|
|
1640
1640
|
}
|
|
1641
1641
|
),
|
|
1642
1642
|
n ?? null
|
|
1643
|
-
] }),
|
|
1643
|
+
] }), ft = ({
|
|
1644
1644
|
state: e,
|
|
1645
1645
|
src: t,
|
|
1646
1646
|
mimeType: n,
|
|
@@ -1651,41 +1651,41 @@ const ks = ({
|
|
|
1651
1651
|
preload: o,
|
|
1652
1652
|
onDismiss: d
|
|
1653
1653
|
}) => {
|
|
1654
|
-
const m =
|
|
1654
|
+
const m = Le(e), h = e === "composer" && !!d, u = cr({ src: t, mimeType: n, filename: a, items: r });
|
|
1655
1655
|
if (u.length === 0)
|
|
1656
1656
|
return null;
|
|
1657
1657
|
const g = o ?? (u.length > 1 ? "none" : "metadata");
|
|
1658
1658
|
return /* @__PURE__ */ s(
|
|
1659
|
-
|
|
1659
|
+
Ae,
|
|
1660
1660
|
{
|
|
1661
1661
|
variant: m,
|
|
1662
1662
|
text: i,
|
|
1663
1663
|
groupPosition: l,
|
|
1664
1664
|
"data-testid": "audio-attachment",
|
|
1665
1665
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((c, x) => /* @__PURE__ */ s(
|
|
1666
|
-
|
|
1666
|
+
dr,
|
|
1667
1667
|
{
|
|
1668
1668
|
item: c,
|
|
1669
1669
|
preload: g,
|
|
1670
1670
|
trailingAction: (
|
|
1671
1671
|
// Composer only supports a single attachment, so the
|
|
1672
1672
|
// dismiss control sits on the only player.
|
|
1673
|
-
h && x === 0 ? /* @__PURE__ */ s(
|
|
1673
|
+
h && x === 0 ? /* @__PURE__ */ s(Re, { onClick: d, variant: "inline" }) : void 0
|
|
1674
1674
|
)
|
|
1675
1675
|
},
|
|
1676
1676
|
`${c.src}-${x}`
|
|
1677
1677
|
)) })
|
|
1678
1678
|
}
|
|
1679
1679
|
);
|
|
1680
|
-
},
|
|
1681
|
-
Composer:
|
|
1682
|
-
Sent:
|
|
1683
|
-
Received:
|
|
1680
|
+
}, ur = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), fr = {
|
|
1681
|
+
Composer: ur,
|
|
1682
|
+
Sent: mr,
|
|
1683
|
+
Received: hr
|
|
1684
1684
|
};
|
|
1685
|
-
function
|
|
1685
|
+
function gr(e) {
|
|
1686
1686
|
return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
1687
1687
|
}
|
|
1688
|
-
const
|
|
1688
|
+
const pr = {
|
|
1689
1689
|
pdf: "PDF",
|
|
1690
1690
|
doc: "DOC",
|
|
1691
1691
|
xls: "XLS",
|
|
@@ -1695,7 +1695,7 @@ const hr = {
|
|
|
1695
1695
|
text: "TXT",
|
|
1696
1696
|
markdown: "MD"
|
|
1697
1697
|
};
|
|
1698
|
-
function
|
|
1698
|
+
function br(e, t) {
|
|
1699
1699
|
if (t) {
|
|
1700
1700
|
const r = t.lastIndexOf(".");
|
|
1701
1701
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -1704,8 +1704,8 @@ function fr(e, t) {
|
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
1706
|
if (!e) return;
|
|
1707
|
-
if (
|
|
1708
|
-
const r =
|
|
1707
|
+
if (ue(e) === "document") {
|
|
1708
|
+
const r = ws(e), i = pr[r];
|
|
1709
1709
|
if (i) return i;
|
|
1710
1710
|
if (e === "application/octet-stream") return;
|
|
1711
1711
|
}
|
|
@@ -1713,8 +1713,8 @@ function fr(e, t) {
|
|
|
1713
1713
|
if (!(!a || a === "*"))
|
|
1714
1714
|
return a.toUpperCase();
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1717
|
-
const a =
|
|
1716
|
+
function vr(e, t, n) {
|
|
1717
|
+
const a = br(e, t), r = typeof n == "number" && n > 0 ? gr(n) : void 0;
|
|
1718
1718
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
1719
1719
|
}
|
|
1720
1720
|
function re(e) {
|
|
@@ -1725,16 +1725,16 @@ function re(e) {
|
|
|
1725
1725
|
return "download";
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
|
-
const
|
|
1728
|
+
const xr = {
|
|
1729
1729
|
dark: "text-white/55",
|
|
1730
1730
|
light: "text-black/65"
|
|
1731
|
-
},
|
|
1731
|
+
}, wr = {
|
|
1732
1732
|
dark: "bg-white/10",
|
|
1733
1733
|
light: "bg-black/5"
|
|
1734
|
-
},
|
|
1734
|
+
}, _r = {
|
|
1735
1735
|
dark: "text-white/85",
|
|
1736
1736
|
light: "text-black/85"
|
|
1737
|
-
},
|
|
1737
|
+
}, Es = ({
|
|
1738
1738
|
variant: e,
|
|
1739
1739
|
filename: t,
|
|
1740
1740
|
title: n,
|
|
@@ -1744,16 +1744,16 @@ const pr = {
|
|
|
1744
1744
|
activateLabel: l,
|
|
1745
1745
|
trailingAction: o
|
|
1746
1746
|
}) => {
|
|
1747
|
-
const d = n ?? t ?? "File", m =
|
|
1747
|
+
const d = n ?? t ?? "File", m = vr(a, t, r), h = /* @__PURE__ */ s(
|
|
1748
1748
|
"div",
|
|
1749
1749
|
{
|
|
1750
1750
|
className: k(
|
|
1751
1751
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1752
|
-
|
|
1752
|
+
wr[e]
|
|
1753
1753
|
),
|
|
1754
1754
|
"aria-hidden": !0,
|
|
1755
1755
|
children: we(a, {
|
|
1756
|
-
className: k("size-6",
|
|
1756
|
+
className: k("size-6", _r[e]),
|
|
1757
1757
|
weight: "regular"
|
|
1758
1758
|
})
|
|
1759
1759
|
}
|
|
@@ -1764,7 +1764,7 @@ const pr = {
|
|
|
1764
1764
|
{
|
|
1765
1765
|
className: k(
|
|
1766
1766
|
"truncate text-xs leading-4",
|
|
1767
|
-
|
|
1767
|
+
xr[e]
|
|
1768
1768
|
),
|
|
1769
1769
|
children: m
|
|
1770
1770
|
}
|
|
@@ -1793,7 +1793,7 @@ const pr = {
|
|
|
1793
1793
|
o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
|
|
1794
1794
|
] });
|
|
1795
1795
|
};
|
|
1796
|
-
async function
|
|
1796
|
+
async function Is(e, t) {
|
|
1797
1797
|
const n = t ?? re(e);
|
|
1798
1798
|
try {
|
|
1799
1799
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -1807,14 +1807,14 @@ async function Es(e, t) {
|
|
|
1807
1807
|
}
|
|
1808
1808
|
}
|
|
1809
1809
|
}
|
|
1810
|
-
const
|
|
1810
|
+
const yr = ({
|
|
1811
1811
|
src: e,
|
|
1812
1812
|
filename: t,
|
|
1813
1813
|
fileSize: n,
|
|
1814
1814
|
mimeType: a,
|
|
1815
1815
|
title: r,
|
|
1816
1816
|
items: i
|
|
1817
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [],
|
|
1817
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], Nr = ({
|
|
1818
1818
|
variant: e,
|
|
1819
1819
|
item: t,
|
|
1820
1820
|
index: n,
|
|
@@ -1823,7 +1823,7 @@ const xr = ({
|
|
|
1823
1823
|
}) => {
|
|
1824
1824
|
const i = t.filename ?? re(t.src);
|
|
1825
1825
|
return /* @__PURE__ */ s(
|
|
1826
|
-
|
|
1826
|
+
Es,
|
|
1827
1827
|
{
|
|
1828
1828
|
variant: e,
|
|
1829
1829
|
filename: i,
|
|
@@ -1835,7 +1835,7 @@ const xr = ({
|
|
|
1835
1835
|
trailingAction: r
|
|
1836
1836
|
}
|
|
1837
1837
|
);
|
|
1838
|
-
},
|
|
1838
|
+
}, gt = ({
|
|
1839
1839
|
state: e,
|
|
1840
1840
|
src: t,
|
|
1841
1841
|
filename: n,
|
|
@@ -1848,7 +1848,7 @@ const xr = ({
|
|
|
1848
1848
|
onClick: m,
|
|
1849
1849
|
onDismiss: h
|
|
1850
1850
|
}) => {
|
|
1851
|
-
const u =
|
|
1851
|
+
const u = Le(e), g = e === "composer" && !!h, c = yr({
|
|
1852
1852
|
src: t,
|
|
1853
1853
|
filename: n,
|
|
1854
1854
|
fileSize: a,
|
|
@@ -1860,7 +1860,7 @@ const xr = ({
|
|
|
1860
1860
|
const v = c[p];
|
|
1861
1861
|
if (!v) return;
|
|
1862
1862
|
const b = v.filename ?? re(v.src);
|
|
1863
|
-
|
|
1863
|
+
Is(v.src, b);
|
|
1864
1864
|
};
|
|
1865
1865
|
if (c.length === 0)
|
|
1866
1866
|
return null;
|
|
@@ -1876,30 +1876,30 @@ const xr = ({
|
|
|
1876
1876
|
}
|
|
1877
1877
|
);
|
|
1878
1878
|
return /* @__PURE__ */ s(
|
|
1879
|
-
|
|
1879
|
+
Ae,
|
|
1880
1880
|
{
|
|
1881
1881
|
variant: u,
|
|
1882
1882
|
text: o,
|
|
1883
1883
|
groupPosition: d,
|
|
1884
1884
|
"data-testid": "file-attachment",
|
|
1885
1885
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((p, v) => /* @__PURE__ */ s(
|
|
1886
|
-
|
|
1886
|
+
Nr,
|
|
1887
1887
|
{
|
|
1888
1888
|
variant: u,
|
|
1889
1889
|
item: p,
|
|
1890
1890
|
index: v,
|
|
1891
1891
|
onActivate: x,
|
|
1892
|
-
trailingAction: g && v === 0 ? /* @__PURE__ */ s(
|
|
1892
|
+
trailingAction: g && v === 0 ? /* @__PURE__ */ s(Re, { onClick: h, variant: "inline" }) : w
|
|
1893
1893
|
},
|
|
1894
1894
|
`${p.src}-${v}`
|
|
1895
1895
|
)) })
|
|
1896
1896
|
}
|
|
1897
1897
|
);
|
|
1898
|
-
},
|
|
1899
|
-
Composer:
|
|
1900
|
-
Sent:
|
|
1901
|
-
Received:
|
|
1902
|
-
},
|
|
1898
|
+
}, kr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Cr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), Er = {
|
|
1899
|
+
Composer: kr,
|
|
1900
|
+
Sent: Cr,
|
|
1901
|
+
Received: Sr
|
|
1902
|
+
}, pt = ({
|
|
1903
1903
|
onPrev: e,
|
|
1904
1904
|
onNext: t,
|
|
1905
1905
|
prevLabel: n = "Previous",
|
|
@@ -1912,7 +1912,7 @@ const xr = ({
|
|
|
1912
1912
|
onClick: e,
|
|
1913
1913
|
"aria-label": n,
|
|
1914
1914
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1915
|
-
children: /* @__PURE__ */ s(
|
|
1915
|
+
children: /* @__PURE__ */ s(na, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1916
1916
|
}
|
|
1917
1917
|
),
|
|
1918
1918
|
/* @__PURE__ */ s(
|
|
@@ -1922,10 +1922,10 @@ const xr = ({
|
|
|
1922
1922
|
onClick: t,
|
|
1923
1923
|
"aria-label": a,
|
|
1924
1924
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
1925
|
-
children: /* @__PURE__ */ s(
|
|
1925
|
+
children: /* @__PURE__ */ s(ds, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1926
1926
|
}
|
|
1927
1927
|
)
|
|
1928
|
-
] }),
|
|
1928
|
+
] }), Ts = ({
|
|
1929
1929
|
url: e,
|
|
1930
1930
|
filename: t,
|
|
1931
1931
|
variant: n = "pill",
|
|
@@ -1936,7 +1936,7 @@ const xr = ({
|
|
|
1936
1936
|
}) => {
|
|
1937
1937
|
const [o, d] = U(!1), m = q(
|
|
1938
1938
|
(c) => {
|
|
1939
|
-
c.stopPropagation(), !o && (d(!0),
|
|
1939
|
+
c.stopPropagation(), !o && (d(!0), Is(e, t).catch(() => {
|
|
1940
1940
|
}).finally(() => {
|
|
1941
1941
|
d(!1), l == null || l();
|
|
1942
1942
|
}));
|
|
@@ -2010,16 +2010,16 @@ const xr = ({
|
|
|
2010
2010
|
]
|
|
2011
2011
|
}
|
|
2012
2012
|
);
|
|
2013
|
-
},
|
|
2013
|
+
}, Ke = (e, t, n) => Math.min(Math.max(e, t), n), bt = ({
|
|
2014
2014
|
length: e,
|
|
2015
2015
|
initialIndex: t,
|
|
2016
2016
|
open: n
|
|
2017
2017
|
}) => {
|
|
2018
|
-
const a =
|
|
2018
|
+
const a = Ke(t, 0, Math.max(e - 1, 0)), [r, i] = U(a);
|
|
2019
2019
|
Y(() => {
|
|
2020
|
-
n && i(
|
|
2020
|
+
n && i(Ke(t, 0, Math.max(e - 1, 0)));
|
|
2021
2021
|
}, [n, t, e]), Y(() => {
|
|
2022
|
-
i((d) =>
|
|
2022
|
+
i((d) => Ke(d, 0, Math.max(e - 1, 0)));
|
|
2023
2023
|
}, [e]);
|
|
2024
2024
|
const l = q(() => {
|
|
2025
2025
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
@@ -2035,7 +2035,7 @@ const xr = ({
|
|
|
2035
2035
|
};
|
|
2036
2036
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
2037
2037
|
}, [n, e, l, o]), { index: r, prev: l, next: o };
|
|
2038
|
-
},
|
|
2038
|
+
}, vt = ({
|
|
2039
2039
|
open: e,
|
|
2040
2040
|
onClose: t,
|
|
2041
2041
|
ariaLabel: n,
|
|
@@ -2116,7 +2116,7 @@ const xr = ({
|
|
|
2116
2116
|
onClick: t,
|
|
2117
2117
|
"aria-label": "Close viewer",
|
|
2118
2118
|
className: "mes-media-viewer__action",
|
|
2119
|
-
children: /* @__PURE__ */ s(
|
|
2119
|
+
children: /* @__PURE__ */ s(lt, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2120
2120
|
}
|
|
2121
2121
|
)
|
|
2122
2122
|
] })
|
|
@@ -2125,13 +2125,13 @@ const xr = ({
|
|
|
2125
2125
|
]
|
|
2126
2126
|
}
|
|
2127
2127
|
);
|
|
2128
|
-
},
|
|
2128
|
+
}, As = ({
|
|
2129
2129
|
open: e,
|
|
2130
2130
|
items: t,
|
|
2131
2131
|
initialIndex: n = 0,
|
|
2132
2132
|
onClose: a
|
|
2133
2133
|
}) => {
|
|
2134
|
-
const { index: r, prev: i, next: l } =
|
|
2134
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2135
2135
|
length: t.length,
|
|
2136
2136
|
initialIndex: n,
|
|
2137
2137
|
open: e
|
|
@@ -2140,14 +2140,14 @@ const xr = ({
|
|
|
2140
2140
|
[o]
|
|
2141
2141
|
);
|
|
2142
2142
|
return o ? /* @__PURE__ */ f(
|
|
2143
|
-
|
|
2143
|
+
vt,
|
|
2144
2144
|
{
|
|
2145
2145
|
open: e,
|
|
2146
2146
|
onClose: a,
|
|
2147
2147
|
ariaLabel: d,
|
|
2148
2148
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
2149
2149
|
actions: /* @__PURE__ */ s(
|
|
2150
|
-
|
|
2150
|
+
Ts,
|
|
2151
2151
|
{
|
|
2152
2152
|
url: o.src,
|
|
2153
2153
|
filename: d,
|
|
@@ -2170,7 +2170,7 @@ const xr = ({
|
|
|
2170
2170
|
`${r}:${o.src}`
|
|
2171
2171
|
) : null,
|
|
2172
2172
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2173
|
-
|
|
2173
|
+
pt,
|
|
2174
2174
|
{
|
|
2175
2175
|
onPrev: i,
|
|
2176
2176
|
onNext: l,
|
|
@@ -2181,7 +2181,7 @@ const xr = ({
|
|
|
2181
2181
|
]
|
|
2182
2182
|
}
|
|
2183
2183
|
) : null;
|
|
2184
|
-
},
|
|
2184
|
+
}, Ir = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", Tr = {
|
|
2185
2185
|
1: ["rounded-[18px]"],
|
|
2186
2186
|
2: ["rounded-l-[18px]", "rounded-r-[18px]"],
|
|
2187
2187
|
3: ["rounded-l-[18px]", "rounded-tr-[18px]", "rounded-br-[18px]"],
|
|
@@ -2191,7 +2191,7 @@ const xr = ({
|
|
|
2191
2191
|
"rounded-bl-[18px]",
|
|
2192
2192
|
"rounded-br-[18px]"
|
|
2193
2193
|
]
|
|
2194
|
-
},
|
|
2194
|
+
}, Ar = "--mes-single-width-cap", Rr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Lr = 436, Rs = ({
|
|
2195
2195
|
tiles: e,
|
|
2196
2196
|
onTileActivate: t,
|
|
2197
2197
|
maxVisible: n = 4,
|
|
@@ -2203,9 +2203,9 @@ const xr = ({
|
|
|
2203
2203
|
const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (h, u, g) => {
|
|
2204
2204
|
var x;
|
|
2205
2205
|
const c = k(
|
|
2206
|
-
|
|
2206
|
+
Ir,
|
|
2207
2207
|
"h-full w-full",
|
|
2208
|
-
(x =
|
|
2208
|
+
(x = Tr[l.length]) == null ? void 0 : x[u]
|
|
2209
2209
|
);
|
|
2210
2210
|
return t ? /* @__PURE__ */ f(
|
|
2211
2211
|
"button",
|
|
@@ -2230,14 +2230,14 @@ const xr = ({
|
|
|
2230
2230
|
aspectRatio: a,
|
|
2231
2231
|
// Hundredths keep the emitted declaration readable in devtools;
|
|
2232
2232
|
// the rounding error is well under a device pixel.
|
|
2233
|
-
width: `min(var(${
|
|
2233
|
+
width: `min(var(${Ar}), ${Math.round(Lr * a * 100) / 100}px)`,
|
|
2234
2234
|
// Only bites in a container narrower than the width cap.
|
|
2235
2235
|
maxWidth: "100%"
|
|
2236
2236
|
}), l.length === 1 ? /* @__PURE__ */ s(
|
|
2237
2237
|
"div",
|
|
2238
2238
|
{
|
|
2239
2239
|
className: k(
|
|
2240
|
-
a ?
|
|
2240
|
+
a ? Rr : "aspect-square w-full",
|
|
2241
2241
|
r
|
|
2242
2242
|
),
|
|
2243
2243
|
style: m,
|
|
@@ -2292,7 +2292,7 @@ const xr = ({
|
|
|
2292
2292
|
})
|
|
2293
2293
|
}
|
|
2294
2294
|
);
|
|
2295
|
-
},
|
|
2295
|
+
}, Me = (e) => {
|
|
2296
2296
|
const [t, n] = U(!1), [a, r] = U(0), i = q(
|
|
2297
2297
|
(o) => {
|
|
2298
2298
|
(e == null ? void 0 : e(o)) !== !1 && (r(o), n(!0));
|
|
@@ -2300,7 +2300,7 @@ const xr = ({
|
|
|
2300
2300
|
[e]
|
|
2301
2301
|
), l = q(() => n(!1), []);
|
|
2302
2302
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
|
|
2303
|
-
},
|
|
2303
|
+
}, Mr = ({
|
|
2304
2304
|
item: e,
|
|
2305
2305
|
index: t,
|
|
2306
2306
|
totalCount: n,
|
|
@@ -2316,7 +2316,7 @@ const xr = ({
|
|
|
2316
2316
|
"img",
|
|
2317
2317
|
{
|
|
2318
2318
|
ref: r,
|
|
2319
|
-
src:
|
|
2319
|
+
src: de(e.src) ?? e.src,
|
|
2320
2320
|
alt: e.alt ?? "",
|
|
2321
2321
|
width: e.width,
|
|
2322
2322
|
height: e.height,
|
|
@@ -2328,7 +2328,7 @@ const xr = ({
|
|
|
2328
2328
|
}
|
|
2329
2329
|
)
|
|
2330
2330
|
)
|
|
2331
|
-
}),
|
|
2331
|
+
}), Dr = ({
|
|
2332
2332
|
src: e,
|
|
2333
2333
|
alt: t,
|
|
2334
2334
|
items: n
|
|
@@ -2336,8 +2336,8 @@ const xr = ({
|
|
|
2336
2336
|
src: n.src,
|
|
2337
2337
|
alt: n.alt,
|
|
2338
2338
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2339
|
-
})),
|
|
2340
|
-
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } =
|
|
2339
|
+
})), Or = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2340
|
+
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = Me(
|
|
2341
2341
|
r
|
|
2342
2342
|
);
|
|
2343
2343
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
@@ -2351,7 +2351,7 @@ const xr = ({
|
|
|
2351
2351
|
children: /* @__PURE__ */ s(
|
|
2352
2352
|
"img",
|
|
2353
2353
|
{
|
|
2354
|
-
src:
|
|
2354
|
+
src: de(e) ?? e,
|
|
2355
2355
|
alt: t ?? "",
|
|
2356
2356
|
draggable: !1,
|
|
2357
2357
|
loading: a,
|
|
@@ -2361,9 +2361,9 @@ const xr = ({
|
|
|
2361
2361
|
)
|
|
2362
2362
|
}
|
|
2363
2363
|
),
|
|
2364
|
-
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(
|
|
2364
|
+
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Re, { onClick: i }) }) : null,
|
|
2365
2365
|
/* @__PURE__ */ s(
|
|
2366
|
-
|
|
2366
|
+
As,
|
|
2367
2367
|
{
|
|
2368
2368
|
open: l,
|
|
2369
2369
|
items: Ls([{ src: e, alt: t }], n),
|
|
@@ -2372,7 +2372,7 @@ const xr = ({
|
|
|
2372
2372
|
}
|
|
2373
2373
|
)
|
|
2374
2374
|
] });
|
|
2375
|
-
},
|
|
2375
|
+
}, Pr = 326 / 246, zr = (e) => {
|
|
2376
2376
|
const t = e == null ? void 0 : e.src, [n, a] = F.useState(), r = F.useCallback(
|
|
2377
2377
|
(d) => {
|
|
2378
2378
|
if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
|
|
@@ -2387,7 +2387,7 @@ const xr = ({
|
|
|
2387
2387
|
[r]
|
|
2388
2388
|
), l = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, o = n && n.src === t ? n.ratio : void 0;
|
|
2389
2389
|
return {
|
|
2390
|
-
ratio: l ?? o ??
|
|
2390
|
+
ratio: l ?? o ?? Pr,
|
|
2391
2391
|
imgRef: r,
|
|
2392
2392
|
onLoad: i
|
|
2393
2393
|
};
|
|
@@ -2402,13 +2402,13 @@ const xr = ({
|
|
|
2402
2402
|
loading: o = "lazy",
|
|
2403
2403
|
onClick: d
|
|
2404
2404
|
}) => {
|
|
2405
|
-
const m =
|
|
2405
|
+
const m = Dr({ src: t, alt: n, items: r }), h = Le(e), { viewerOpen: u, viewerIndex: g, handleActivate: c, closeViewer: x } = Me(
|
|
2406
2406
|
d
|
|
2407
|
-
), w = m.length === 1, p =
|
|
2407
|
+
), w = m.length === 1, p = zr(w ? m[0] : void 0);
|
|
2408
2408
|
if (m.length === 0)
|
|
2409
2409
|
return null;
|
|
2410
2410
|
const v = m.map(
|
|
2411
|
-
(b, N) =>
|
|
2411
|
+
(b, N) => Mr({
|
|
2412
2412
|
item: b,
|
|
2413
2413
|
index: N,
|
|
2414
2414
|
totalCount: m.length,
|
|
@@ -2418,7 +2418,7 @@ const xr = ({
|
|
|
2418
2418
|
})
|
|
2419
2419
|
);
|
|
2420
2420
|
return /* @__PURE__ */ f(
|
|
2421
|
-
|
|
2421
|
+
Ae,
|
|
2422
2422
|
{
|
|
2423
2423
|
variant: h,
|
|
2424
2424
|
text: i,
|
|
@@ -2430,7 +2430,7 @@ const xr = ({
|
|
|
2430
2430
|
"data-testid": "image-attachment",
|
|
2431
2431
|
children: [
|
|
2432
2432
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2433
|
-
|
|
2433
|
+
Rs,
|
|
2434
2434
|
{
|
|
2435
2435
|
tiles: v,
|
|
2436
2436
|
onTileActivate: c,
|
|
@@ -2438,7 +2438,7 @@ const xr = ({
|
|
|
2438
2438
|
}
|
|
2439
2439
|
) }),
|
|
2440
2440
|
/* @__PURE__ */ s(
|
|
2441
|
-
|
|
2441
|
+
As,
|
|
2442
2442
|
{
|
|
2443
2443
|
open: u,
|
|
2444
2444
|
items: Ls(m, a),
|
|
@@ -2449,17 +2449,17 @@ const xr = ({
|
|
|
2449
2449
|
]
|
|
2450
2450
|
}
|
|
2451
2451
|
);
|
|
2452
|
-
},
|
|
2453
|
-
Composer:
|
|
2454
|
-
Sent:
|
|
2455
|
-
Received:
|
|
2456
|
-
},
|
|
2452
|
+
}, Br = (e) => /* @__PURE__ */ s(Or, { ...e }), Fr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "sent" }), $r = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "received" }), Ur = {
|
|
2453
|
+
Composer: Br,
|
|
2454
|
+
Sent: Fr,
|
|
2455
|
+
Received: $r
|
|
2456
|
+
}, jr = ({
|
|
2457
2457
|
open: e,
|
|
2458
2458
|
items: t,
|
|
2459
2459
|
initialIndex: n = 0,
|
|
2460
2460
|
onClose: a
|
|
2461
2461
|
}) => {
|
|
2462
|
-
const { index: r, prev: i, next: l } =
|
|
2462
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2463
2463
|
length: t.length,
|
|
2464
2464
|
initialIndex: n,
|
|
2465
2465
|
open: e
|
|
@@ -2467,11 +2467,11 @@ const xr = ({
|
|
|
2467
2467
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
|
|
2468
2468
|
[o]
|
|
2469
2469
|
), m = ae(
|
|
2470
|
-
() => o ?
|
|
2470
|
+
() => o ? Vr(o.src) : void 0,
|
|
2471
2471
|
[o]
|
|
2472
2472
|
);
|
|
2473
2473
|
return !o || !m ? null : /* @__PURE__ */ f(
|
|
2474
|
-
|
|
2474
|
+
vt,
|
|
2475
2475
|
{
|
|
2476
2476
|
open: e,
|
|
2477
2477
|
onClose: a,
|
|
@@ -2490,7 +2490,7 @@ const xr = ({
|
|
|
2490
2490
|
`${r}:${o.src}`
|
|
2491
2491
|
),
|
|
2492
2492
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2493
|
-
|
|
2493
|
+
pt,
|
|
2494
2494
|
{
|
|
2495
2495
|
onPrev: i,
|
|
2496
2496
|
onNext: l,
|
|
@@ -2501,16 +2501,16 @@ const xr = ({
|
|
|
2501
2501
|
]
|
|
2502
2502
|
}
|
|
2503
2503
|
);
|
|
2504
|
-
},
|
|
2504
|
+
}, Vr = (e) => {
|
|
2505
2505
|
const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
2506
2506
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
|
|
2507
|
-
},
|
|
2507
|
+
}, Hr = ({
|
|
2508
2508
|
src: e,
|
|
2509
2509
|
filename: t,
|
|
2510
2510
|
fileSize: n,
|
|
2511
2511
|
title: a,
|
|
2512
2512
|
items: r
|
|
2513
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [],
|
|
2513
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Gr = ({
|
|
2514
2514
|
variant: e,
|
|
2515
2515
|
item: t,
|
|
2516
2516
|
index: n,
|
|
@@ -2519,7 +2519,7 @@ const xr = ({
|
|
|
2519
2519
|
}) => {
|
|
2520
2520
|
const i = t.filename ?? re(t.src);
|
|
2521
2521
|
return /* @__PURE__ */ s(
|
|
2522
|
-
|
|
2522
|
+
Es,
|
|
2523
2523
|
{
|
|
2524
2524
|
variant: e,
|
|
2525
2525
|
filename: i,
|
|
@@ -2531,7 +2531,7 @@ const xr = ({
|
|
|
2531
2531
|
trailingAction: r
|
|
2532
2532
|
}
|
|
2533
2533
|
);
|
|
2534
|
-
},
|
|
2534
|
+
}, xt = ({
|
|
2535
2535
|
state: e,
|
|
2536
2536
|
src: t,
|
|
2537
2537
|
filename: n,
|
|
@@ -2543,7 +2543,7 @@ const xr = ({
|
|
|
2543
2543
|
onClick: d,
|
|
2544
2544
|
onDismiss: m
|
|
2545
2545
|
}) => {
|
|
2546
|
-
const h =
|
|
2546
|
+
const h = Le(e), u = Hr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: w } = Me(
|
|
2547
2547
|
d
|
|
2548
2548
|
), p = e === "composer" && !!m;
|
|
2549
2549
|
if (u.length === 0)
|
|
@@ -2553,7 +2553,7 @@ const xr = ({
|
|
|
2553
2553
|
filename: b.filename ?? re(b.src)
|
|
2554
2554
|
}));
|
|
2555
2555
|
return /* @__PURE__ */ f(
|
|
2556
|
-
|
|
2556
|
+
Ae,
|
|
2557
2557
|
{
|
|
2558
2558
|
variant: h,
|
|
2559
2559
|
text: l,
|
|
@@ -2561,8 +2561,8 @@ const xr = ({
|
|
|
2561
2561
|
"data-testid": "pdf-attachment",
|
|
2562
2562
|
children: [
|
|
2563
2563
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((b, N) => {
|
|
2564
|
-
const _ = b.filename ?? re(b.src), A = p && N === 0 ? /* @__PURE__ */ s(
|
|
2565
|
-
|
|
2564
|
+
const _ = b.filename ?? re(b.src), A = p && N === 0 ? /* @__PURE__ */ s(Re, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2565
|
+
Ts,
|
|
2566
2566
|
{
|
|
2567
2567
|
url: b.src,
|
|
2568
2568
|
filename: _,
|
|
@@ -2572,7 +2572,7 @@ const xr = ({
|
|
|
2572
2572
|
}
|
|
2573
2573
|
);
|
|
2574
2574
|
return /* @__PURE__ */ s(
|
|
2575
|
-
|
|
2575
|
+
Gr,
|
|
2576
2576
|
{
|
|
2577
2577
|
variant: h,
|
|
2578
2578
|
item: b,
|
|
@@ -2584,7 +2584,7 @@ const xr = ({
|
|
|
2584
2584
|
);
|
|
2585
2585
|
}) }),
|
|
2586
2586
|
/* @__PURE__ */ s(
|
|
2587
|
-
|
|
2587
|
+
jr,
|
|
2588
2588
|
{
|
|
2589
2589
|
open: g,
|
|
2590
2590
|
items: v,
|
|
@@ -2595,17 +2595,17 @@ const xr = ({
|
|
|
2595
2595
|
]
|
|
2596
2596
|
}
|
|
2597
2597
|
);
|
|
2598
|
-
},
|
|
2599
|
-
Composer:
|
|
2600
|
-
Sent:
|
|
2601
|
-
Received:
|
|
2602
|
-
},
|
|
2598
|
+
}, Yr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Wr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), qr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Xr = {
|
|
2599
|
+
Composer: Yr,
|
|
2600
|
+
Sent: Wr,
|
|
2601
|
+
Received: qr
|
|
2602
|
+
}, Ds = ({
|
|
2603
2603
|
open: e,
|
|
2604
2604
|
items: t,
|
|
2605
2605
|
initialIndex: n = 0,
|
|
2606
2606
|
onClose: a
|
|
2607
2607
|
}) => {
|
|
2608
|
-
const { index: r, prev: i, next: l } =
|
|
2608
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2609
2609
|
length: t.length,
|
|
2610
2610
|
initialIndex: n,
|
|
2611
2611
|
open: e
|
|
@@ -2614,7 +2614,7 @@ const xr = ({
|
|
|
2614
2614
|
[o]
|
|
2615
2615
|
);
|
|
2616
2616
|
return o ? /* @__PURE__ */ f(
|
|
2617
|
-
|
|
2617
|
+
vt,
|
|
2618
2618
|
{
|
|
2619
2619
|
open: e,
|
|
2620
2620
|
onClose: a,
|
|
@@ -2638,7 +2638,7 @@ const xr = ({
|
|
|
2638
2638
|
`${r}:${o.src}`
|
|
2639
2639
|
),
|
|
2640
2640
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2641
|
-
|
|
2641
|
+
pt,
|
|
2642
2642
|
{
|
|
2643
2643
|
onPrev: i,
|
|
2644
2644
|
onNext: l,
|
|
@@ -2649,7 +2649,7 @@ const xr = ({
|
|
|
2649
2649
|
]
|
|
2650
2650
|
}
|
|
2651
2651
|
) : null;
|
|
2652
|
-
},
|
|
2652
|
+
}, Kr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(at, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Os = ({
|
|
2653
2653
|
item: e,
|
|
2654
2654
|
index: t
|
|
2655
2655
|
}) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2664,18 +2664,18 @@ const xr = ({
|
|
|
2664
2664
|
className: "absolute inset-0 size-full object-cover"
|
|
2665
2665
|
}
|
|
2666
2666
|
) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
2667
|
-
|
|
2667
|
+
ms,
|
|
2668
2668
|
{
|
|
2669
2669
|
className: "size-16 text-white/30",
|
|
2670
2670
|
weight: "regular",
|
|
2671
2671
|
"aria-hidden": !0
|
|
2672
2672
|
}
|
|
2673
2673
|
) }),
|
|
2674
|
-
/* @__PURE__ */ s(
|
|
2675
|
-
] }),
|
|
2674
|
+
/* @__PURE__ */ s(Kr, {})
|
|
2675
|
+
] }), Zr = (e, t, n) => ({
|
|
2676
2676
|
ariaLabel: `Play video ${t + 1} of ${n}`,
|
|
2677
|
-
content: /* @__PURE__ */ s(
|
|
2678
|
-
}),
|
|
2677
|
+
content: /* @__PURE__ */ s(Os, { item: e, index: t })
|
|
2678
|
+
}), Jr = ({
|
|
2679
2679
|
src: e,
|
|
2680
2680
|
poster: t,
|
|
2681
2681
|
mimeType: n,
|
|
@@ -2687,8 +2687,8 @@ const xr = ({
|
|
|
2687
2687
|
mimeType: n.mimeType,
|
|
2688
2688
|
preload: n.preload,
|
|
2689
2689
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2690
|
-
})),
|
|
2691
|
-
const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: h } =
|
|
2690
|
+
})), Qr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
|
|
2691
|
+
const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: h } = Me(
|
|
2692
2692
|
i
|
|
2693
2693
|
);
|
|
2694
2694
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
@@ -2699,12 +2699,12 @@ const xr = ({
|
|
|
2699
2699
|
onClick: () => m(0),
|
|
2700
2700
|
"aria-label": "Play video",
|
|
2701
2701
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
2702
|
-
children: /* @__PURE__ */ s(
|
|
2702
|
+
children: /* @__PURE__ */ s(Os, { item: { src: e, poster: t, mimeType: n }, index: 0 })
|
|
2703
2703
|
}
|
|
2704
2704
|
),
|
|
2705
|
-
l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(
|
|
2705
|
+
l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Re, { onClick: l }) }) : null,
|
|
2706
2706
|
/* @__PURE__ */ s(
|
|
2707
|
-
|
|
2707
|
+
Ds,
|
|
2708
2708
|
{
|
|
2709
2709
|
open: o,
|
|
2710
2710
|
items: Ps(
|
|
@@ -2716,7 +2716,7 @@ const xr = ({
|
|
|
2716
2716
|
}
|
|
2717
2717
|
)
|
|
2718
2718
|
] });
|
|
2719
|
-
},
|
|
2719
|
+
}, zs = ({
|
|
2720
2720
|
state: e,
|
|
2721
2721
|
src: t,
|
|
2722
2722
|
poster: n,
|
|
@@ -2728,25 +2728,25 @@ const xr = ({
|
|
|
2728
2728
|
preload: d,
|
|
2729
2729
|
onClick: m
|
|
2730
2730
|
}) => {
|
|
2731
|
-
const h =
|
|
2731
|
+
const h = Jr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Le(e), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: w } = Me(
|
|
2732
2732
|
m
|
|
2733
2733
|
);
|
|
2734
2734
|
if (h.length === 0)
|
|
2735
2735
|
return null;
|
|
2736
2736
|
const p = h.map(
|
|
2737
|
-
(v, b) =>
|
|
2737
|
+
(v, b) => Zr(v, b, h.length)
|
|
2738
2738
|
);
|
|
2739
2739
|
return /* @__PURE__ */ f(
|
|
2740
|
-
|
|
2740
|
+
Ae,
|
|
2741
2741
|
{
|
|
2742
2742
|
variant: u,
|
|
2743
2743
|
text: l,
|
|
2744
2744
|
groupPosition: o,
|
|
2745
2745
|
"data-testid": "video-attachment",
|
|
2746
2746
|
children: [
|
|
2747
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2747
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Rs, { tiles: p, onTileActivate: x }) }),
|
|
2748
2748
|
/* @__PURE__ */ s(
|
|
2749
|
-
|
|
2749
|
+
Ds,
|
|
2750
2750
|
{
|
|
2751
2751
|
open: g,
|
|
2752
2752
|
items: Ps(h, r),
|
|
@@ -2757,27 +2757,27 @@ const xr = ({
|
|
|
2757
2757
|
]
|
|
2758
2758
|
}
|
|
2759
2759
|
);
|
|
2760
|
-
},
|
|
2761
|
-
Composer:
|
|
2762
|
-
Sent:
|
|
2763
|
-
Received:
|
|
2760
|
+
}, ei = (e) => /* @__PURE__ */ s(Qr, { ...e }), ti = (e) => /* @__PURE__ */ s(zs, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ s(zs, { ...e, state: "received" }), ni = {
|
|
2761
|
+
Composer: ei,
|
|
2762
|
+
Sent: ti,
|
|
2763
|
+
Received: si
|
|
2764
2764
|
}, ke = {
|
|
2765
|
-
Image:
|
|
2766
|
-
Video:
|
|
2767
|
-
Audio:
|
|
2768
|
-
Pdf:
|
|
2769
|
-
File:
|
|
2770
|
-
},
|
|
2765
|
+
Image: Ur,
|
|
2766
|
+
Video: ni,
|
|
2767
|
+
Audio: fr,
|
|
2768
|
+
Pdf: Xr,
|
|
2769
|
+
File: Er
|
|
2770
|
+
}, Bs = Ve(void 0), ai = (e) => {
|
|
2771
2771
|
var n;
|
|
2772
2772
|
const t = (n = e.metadata) == null ? void 0 : n.broadcast_id;
|
|
2773
2773
|
return typeof t == "string" ? t : void 0;
|
|
2774
|
-
},
|
|
2774
|
+
}, ri = (e, t) => {
|
|
2775
2775
|
if (!t || !(e != null && e.length))
|
|
2776
2776
|
return;
|
|
2777
2777
|
const n = /* @__PURE__ */ new Set();
|
|
2778
2778
|
let a;
|
|
2779
2779
|
for (const r of e) {
|
|
2780
|
-
const i =
|
|
2780
|
+
const i = ai(r);
|
|
2781
2781
|
if (!i || n.has(i))
|
|
2782
2782
|
continue;
|
|
2783
2783
|
n.add(i);
|
|
@@ -2785,31 +2785,31 @@ const xr = ({
|
|
|
2785
2785
|
l && (a ?? (a = {}), a[i] = l);
|
|
2786
2786
|
}
|
|
2787
2787
|
return a;
|
|
2788
|
-
},
|
|
2788
|
+
}, ii = (e, t) => {
|
|
2789
2789
|
if (e === t)
|
|
2790
2790
|
return !0;
|
|
2791
2791
|
if (!e || !t)
|
|
2792
2792
|
return !1;
|
|
2793
2793
|
const n = Object.keys(e), a = Object.keys(t);
|
|
2794
2794
|
return n.length !== a.length ? !1 : n.every((r) => e[r] === t[r]);
|
|
2795
|
-
},
|
|
2796
|
-
const n =
|
|
2797
|
-
return
|
|
2798
|
-
},
|
|
2795
|
+
}, oi = (e, t) => {
|
|
2796
|
+
const n = ri(e, t), [a, r] = U(n);
|
|
2797
|
+
return ii(a, n) ? a : (r(n), n);
|
|
2798
|
+
}, li = {
|
|
2799
2799
|
isUnlocking: () => !1
|
|
2800
|
-
},
|
|
2801
|
-
LockedAttachment:
|
|
2802
|
-
},
|
|
2803
|
-
function
|
|
2804
|
-
return _e(
|
|
2800
|
+
}, ci = {
|
|
2801
|
+
LockedAttachment: li
|
|
2802
|
+
}, Fs = Ve({}), al = Fs.Provider;
|
|
2803
|
+
function di(e) {
|
|
2804
|
+
return _e(Fs)[e] ?? ci[e];
|
|
2805
2805
|
}
|
|
2806
|
-
const
|
|
2806
|
+
const ui = F.lazy(() => import("./Card-qS17qnN0.js")), mi = F.lazy(() => import("./Card-ByFbaqsR.js")), hi = () => /* @__PURE__ */ s(
|
|
2807
2807
|
"div",
|
|
2808
2808
|
{
|
|
2809
2809
|
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)]",
|
|
2810
2810
|
"aria-hidden": !0
|
|
2811
2811
|
}
|
|
2812
|
-
),
|
|
2812
|
+
), Be = (e) => /* @__PURE__ */ s(sn, { fallback: /* @__PURE__ */ s(hi, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(ui, { ...e }) : /* @__PURE__ */ s(mi, { ...e }) }), fi = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2813
2813
|
"svg",
|
|
2814
2814
|
{
|
|
2815
2815
|
width: e,
|
|
@@ -2826,43 +2826,43 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
2826
2826
|
}
|
|
2827
2827
|
)
|
|
2828
2828
|
}
|
|
2829
|
-
),
|
|
2829
|
+
), gi = (e) => {
|
|
2830
2830
|
var t;
|
|
2831
2831
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.TIP;
|
|
2832
|
-
},
|
|
2832
|
+
}, $s = (e) => {
|
|
2833
2833
|
var t;
|
|
2834
2834
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.PAID;
|
|
2835
|
-
},
|
|
2835
|
+
}, $e = (e) => {
|
|
2836
2836
|
var t;
|
|
2837
2837
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.CHATBOT;
|
|
2838
|
-
},
|
|
2838
|
+
}, wt = (e) => {
|
|
2839
2839
|
var t;
|
|
2840
2840
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.ATTACHMENT;
|
|
2841
|
-
},
|
|
2841
|
+
}, pi = (e) => {
|
|
2842
2842
|
var t;
|
|
2843
|
-
return
|
|
2844
|
-
},
|
|
2843
|
+
return wt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
2844
|
+
}, bi = (e) => {
|
|
2845
2845
|
var t;
|
|
2846
|
-
return
|
|
2847
|
-
},
|
|
2846
|
+
return wt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
2847
|
+
}, Us = (e) => gi(e) || $s(e), vi = (e) => {
|
|
2848
2848
|
var t;
|
|
2849
|
-
return
|
|
2850
|
-
},
|
|
2849
|
+
return Us(e) && !((t = e.text) != null && t.trim());
|
|
2850
|
+
}, Ze = ({
|
|
2851
2851
|
message: e,
|
|
2852
2852
|
standalone: t = !1,
|
|
2853
2853
|
isMyMessage: n = !1,
|
|
2854
2854
|
hasAttachment: a = !1
|
|
2855
2855
|
}) => {
|
|
2856
2856
|
var u;
|
|
2857
|
-
const r =
|
|
2857
|
+
const r = Us(e), i = $e(e);
|
|
2858
2858
|
if (!r && !i)
|
|
2859
2859
|
return null;
|
|
2860
2860
|
if (r) {
|
|
2861
2861
|
const g = (u = e.metadata) == null ? void 0 : u.amount_text;
|
|
2862
2862
|
if (!g) return null;
|
|
2863
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x =
|
|
2863
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = $s(e) ? "message" : "tip", w = t ? `${g} ${x}` : `Delivered with ${g} ${x}`;
|
|
2864
2864
|
return /* @__PURE__ */ f("div", { className: c, children: [
|
|
2865
|
-
/* @__PURE__ */ s(
|
|
2865
|
+
/* @__PURE__ */ s(aa, { size: t ? 14 : 12 }),
|
|
2866
2866
|
/* @__PURE__ */ s("span", { children: w })
|
|
2867
2867
|
] });
|
|
2868
2868
|
}
|
|
@@ -2870,7 +2870,7 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
2870
2870
|
"message-chatbot-indicator",
|
|
2871
2871
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2872
2872
|
l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2873
|
-
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), h = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(
|
|
2873
|
+
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), h = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(fi, { size: l ? 12 : 15 }) });
|
|
2874
2874
|
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ f(J, { children: [
|
|
2875
2875
|
m,
|
|
2876
2876
|
h
|
|
@@ -2878,7 +2878,7 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
2878
2878
|
h,
|
|
2879
2879
|
m
|
|
2880
2880
|
] }) });
|
|
2881
|
-
},
|
|
2881
|
+
}, xi = ({
|
|
2882
2882
|
selected: e,
|
|
2883
2883
|
onVoteUp: t,
|
|
2884
2884
|
onVoteDown: n
|
|
@@ -2894,7 +2894,7 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
2894
2894
|
"aria-label": "Good response",
|
|
2895
2895
|
"aria-pressed": e === "up",
|
|
2896
2896
|
"data-tooltip": "Good response",
|
|
2897
|
-
children: /* @__PURE__ */ s(
|
|
2897
|
+
children: /* @__PURE__ */ s(ra, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
2898
2898
|
}
|
|
2899
2899
|
),
|
|
2900
2900
|
/* @__PURE__ */ s(
|
|
@@ -2908,10 +2908,10 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
2908
2908
|
"aria-label": "Bad response",
|
|
2909
2909
|
"aria-pressed": e === "down",
|
|
2910
2910
|
"data-tooltip": "Bad response",
|
|
2911
|
-
children: /* @__PURE__ */ s(
|
|
2911
|
+
children: /* @__PURE__ */ s(ia, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
2912
2912
|
}
|
|
2913
2913
|
)
|
|
2914
|
-
] }),
|
|
2914
|
+
] }), _t = () => {
|
|
2915
2915
|
const { message: e } = ge("SentMessageDeliveryStatus"), { messages: t } = fe("SentMessageDeliveryStatus"), n = (() => {
|
|
2916
2916
|
if (t)
|
|
2917
2917
|
for (let a = t.length - 1; a >= 0; a -= 1) {
|
|
@@ -2921,10 +2921,10 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
2921
2921
|
}
|
|
2922
2922
|
})();
|
|
2923
2923
|
return e.id === n;
|
|
2924
|
-
},
|
|
2925
|
-
/* @__PURE__ */ s(
|
|
2924
|
+
}, Je = () => _t() ? /* @__PURE__ */ f(J, { children: [
|
|
2925
|
+
/* @__PURE__ */ s(ca, { weight: "bold", "aria-hidden": "true" }),
|
|
2926
2926
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2927
|
-
] }) : null,
|
|
2927
|
+
] }) : null, wi = () => _t() ? /* @__PURE__ */ f(J, { children: [
|
|
2928
2928
|
/* @__PURE__ */ s(
|
|
2929
2929
|
xe,
|
|
2930
2930
|
{
|
|
@@ -2934,14 +2934,14 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
2934
2934
|
}
|
|
2935
2935
|
),
|
|
2936
2936
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
|
|
2937
|
-
] }) : null,
|
|
2937
|
+
] }) : null, _i = ({
|
|
2938
2938
|
broadcastId: e,
|
|
2939
2939
|
broadcastName: t,
|
|
2940
2940
|
resolvedBroadcastName: n,
|
|
2941
2941
|
onBroadcastClick: a
|
|
2942
2942
|
}) => {
|
|
2943
2943
|
const r = n || t, i = r || "Broadcast", l = /* @__PURE__ */ f(J, { children: [
|
|
2944
|
-
/* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(
|
|
2944
|
+
/* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(la, { weight: "fill" }) }),
|
|
2945
2945
|
/* @__PURE__ */ s(
|
|
2946
2946
|
"span",
|
|
2947
2947
|
{
|
|
@@ -2964,25 +2964,25 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
2964
2964
|
children: l
|
|
2965
2965
|
}
|
|
2966
2966
|
) : l;
|
|
2967
|
-
},
|
|
2968
|
-
/* @__PURE__ */ s(
|
|
2967
|
+
}, yi = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
|
|
2968
|
+
/* @__PURE__ */ s(oa, { weight: "bold", "aria-hidden": "true" }),
|
|
2969
2969
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
|
|
2970
|
-
] }),
|
|
2970
|
+
] }), Ni = ({
|
|
2971
2971
|
onBroadcastClick: e,
|
|
2972
2972
|
resolvedBroadcastName: t
|
|
2973
2973
|
}) => {
|
|
2974
2974
|
var u, g;
|
|
2975
2975
|
const { isMyMessage: n, message: a, threadList: r } = ge(
|
|
2976
2976
|
"SentMessageDeliveryStatus"
|
|
2977
|
-
), i = n(), l =
|
|
2977
|
+
), i = n(), l = _t();
|
|
2978
2978
|
if (r)
|
|
2979
2979
|
return null;
|
|
2980
2980
|
if (a.status === "failed" && i && a.type !== "error")
|
|
2981
|
-
return /* @__PURE__ */ s(
|
|
2981
|
+
return /* @__PURE__ */ s(yi, {});
|
|
2982
2982
|
if (!i)
|
|
2983
2983
|
return null;
|
|
2984
2984
|
const o = (u = a.metadata) == null ? void 0 : u.broadcast_id, d = (g = a.metadata) == null ? void 0 : g.broadcast_name, m = a.status !== "sending" && a.status !== "failed" && o ? /* @__PURE__ */ s(
|
|
2985
|
-
|
|
2985
|
+
_i,
|
|
2986
2986
|
{
|
|
2987
2987
|
broadcastId: o,
|
|
2988
2988
|
broadcastName: d,
|
|
@@ -2990,12 +2990,12 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
2990
2990
|
onBroadcastClick: e
|
|
2991
2991
|
}
|
|
2992
2992
|
) : null, h = /* @__PURE__ */ s(
|
|
2993
|
-
|
|
2993
|
+
ln,
|
|
2994
2994
|
{
|
|
2995
|
-
MessageSentStatus:
|
|
2996
|
-
MessageDeliveredStatus:
|
|
2997
|
-
MessageReadStatus:
|
|
2998
|
-
MessageSendingStatus:
|
|
2995
|
+
MessageSentStatus: Je,
|
|
2996
|
+
MessageDeliveredStatus: Je,
|
|
2997
|
+
MessageReadStatus: Je,
|
|
2998
|
+
MessageSendingStatus: wi
|
|
2999
2999
|
}
|
|
3000
3000
|
);
|
|
3001
3001
|
return m ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
|
|
@@ -3010,19 +3010,19 @@ const li = F.lazy(() => import("./Card-qS17qnN0.js")), ci = F.lazy(() => import(
|
|
|
3010
3010
|
),
|
|
3011
3011
|
m
|
|
3012
3012
|
] }) : h;
|
|
3013
|
-
},
|
|
3014
|
-
function
|
|
3013
|
+
}, ki = /^([a-z][a-z0-9+.-]*):/i, Ci = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
3014
|
+
function yt(e) {
|
|
3015
3015
|
if (typeof e != "string") return;
|
|
3016
3016
|
const t = e.trim();
|
|
3017
3017
|
if (t === "") return;
|
|
3018
|
-
const n =
|
|
3018
|
+
const n = ki.exec(t);
|
|
3019
3019
|
if (n) {
|
|
3020
3020
|
const a = n[1].toLowerCase();
|
|
3021
|
-
return
|
|
3021
|
+
return Ci.has(a) ? t : void 0;
|
|
3022
3022
|
}
|
|
3023
3023
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
3024
3024
|
}
|
|
3025
|
-
const
|
|
3025
|
+
const Si = {
|
|
3026
3026
|
dark: {
|
|
3027
3027
|
primary: "bg-white text-[#121110] hover:bg-white/90",
|
|
3028
3028
|
secondary: "bg-white/15 text-white hover:bg-white/25"
|
|
@@ -3031,46 +3031,53 @@ const Ni = {
|
|
|
3031
3031
|
primary: "bg-[#121110] text-white hover:bg-[#2a2928]",
|
|
3032
3032
|
secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
|
|
3033
3033
|
}
|
|
3034
|
-
},
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3034
|
+
}, js = ({
|
|
3035
|
+
variant: e,
|
|
3036
|
+
cta: t,
|
|
3037
|
+
fullWidth: n = !0,
|
|
3038
|
+
standalone: a = !1
|
|
3039
|
+
}) => {
|
|
3040
|
+
const r = t.variant ?? "primary", i = k(
|
|
3041
|
+
"inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
3042
|
+
n && "w-full",
|
|
3043
|
+
!a && "mt-2",
|
|
3044
|
+
Si[e][r]
|
|
3045
|
+
), l = yt(t.href);
|
|
3046
|
+
return l ? /* @__PURE__ */ s(
|
|
3040
3047
|
"a",
|
|
3041
3048
|
{
|
|
3042
|
-
href:
|
|
3049
|
+
href: l,
|
|
3043
3050
|
target: "_blank",
|
|
3044
3051
|
rel: "noopener noreferrer",
|
|
3045
|
-
onClick: (
|
|
3046
|
-
var
|
|
3047
|
-
|
|
3052
|
+
onClick: (o) => {
|
|
3053
|
+
var d;
|
|
3054
|
+
o.stopPropagation(), (d = t.onClick) == null || d.call(t);
|
|
3048
3055
|
},
|
|
3049
|
-
className: `${
|
|
3056
|
+
className: `${i} no-underline`,
|
|
3050
3057
|
children: t.label
|
|
3051
3058
|
}
|
|
3052
3059
|
) : /* @__PURE__ */ s(
|
|
3053
3060
|
"button",
|
|
3054
3061
|
{
|
|
3055
3062
|
type: "button",
|
|
3056
|
-
onClick: (
|
|
3057
|
-
var
|
|
3058
|
-
|
|
3063
|
+
onClick: (o) => {
|
|
3064
|
+
var d;
|
|
3065
|
+
o.stopPropagation(), (d = t.onClick) == null || d.call(t);
|
|
3059
3066
|
},
|
|
3060
|
-
className:
|
|
3067
|
+
className: i,
|
|
3061
3068
|
children: t.label
|
|
3062
3069
|
}
|
|
3063
3070
|
);
|
|
3064
|
-
},
|
|
3071
|
+
}, Ei = {
|
|
3065
3072
|
dark: "text-white",
|
|
3066
3073
|
light: "text-black/90"
|
|
3067
|
-
},
|
|
3074
|
+
}, Ii = "text-white/30", Qt = {
|
|
3068
3075
|
dark: "text-white/55",
|
|
3069
3076
|
light: "text-black/55"
|
|
3070
|
-
},
|
|
3077
|
+
}, Ti = {
|
|
3071
3078
|
dark: "bg-white/25",
|
|
3072
3079
|
light: "bg-black/15"
|
|
3073
|
-
},
|
|
3080
|
+
}, Nt = ({
|
|
3074
3081
|
variant: e,
|
|
3075
3082
|
ctaSurface: t,
|
|
3076
3083
|
chinTextColor: n,
|
|
@@ -3089,32 +3096,32 @@ const Ni = {
|
|
|
3089
3096
|
return null;
|
|
3090
3097
|
const N = g && !a, _ = k(
|
|
3091
3098
|
"line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
|
|
3092
|
-
n == null && (N ?
|
|
3099
|
+
n == null && (N ? Ii : Ei[e])
|
|
3093
3100
|
), A = k(
|
|
3094
3101
|
"truncate text-[12px] leading-4 tracking-[0.24px]",
|
|
3095
|
-
n == null &&
|
|
3096
|
-
),
|
|
3102
|
+
n == null && Qt[e]
|
|
3103
|
+
), R = k(
|
|
3097
3104
|
"text-[12px] leading-4 tracking-[0.24px]",
|
|
3098
3105
|
l <= 1 && "truncate",
|
|
3099
|
-
n == null &&
|
|
3106
|
+
n == null && Qt[e]
|
|
3100
3107
|
);
|
|
3101
3108
|
if (u) {
|
|
3102
3109
|
const $ = k(
|
|
3103
3110
|
"animate-pulse rounded",
|
|
3104
|
-
|
|
3111
|
+
Ti[e]
|
|
3105
3112
|
);
|
|
3106
3113
|
return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
|
|
3107
3114
|
/* @__PURE__ */ s("div", { className: k("h-5 w-3/4", $), "aria-hidden": !0 }),
|
|
3108
3115
|
/* @__PURE__ */ s("div", { className: k("h-4 w-1/2", $), "aria-hidden": !0 })
|
|
3109
3116
|
] }) });
|
|
3110
3117
|
}
|
|
3111
|
-
const
|
|
3112
|
-
...
|
|
3118
|
+
const L = n ? { color: n } : void 0, D = l > 1 ? {
|
|
3119
|
+
...L,
|
|
3113
3120
|
display: "-webkit-box",
|
|
3114
3121
|
WebkitBoxOrient: "vertical",
|
|
3115
3122
|
WebkitLineClamp: l,
|
|
3116
3123
|
overflow: "hidden"
|
|
3117
|
-
} :
|
|
3124
|
+
} : L;
|
|
3118
3125
|
return /* @__PURE__ */ f("div", { className: "shrink-0 px-4 py-3", children: [
|
|
3119
3126
|
/* @__PURE__ */ f("div", { className: "flex items-end gap-3", children: [
|
|
3120
3127
|
/* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
|
|
@@ -3124,24 +3131,24 @@ const Ni = {
|
|
|
3124
3131
|
"p",
|
|
3125
3132
|
{
|
|
3126
3133
|
className: k("min-w-0", _),
|
|
3127
|
-
style:
|
|
3134
|
+
style: L,
|
|
3128
3135
|
children: c
|
|
3129
3136
|
}
|
|
3130
3137
|
)
|
|
3131
3138
|
] }),
|
|
3132
|
-
w && /* @__PURE__ */ s("p", { className:
|
|
3133
|
-
!b && v && /* @__PURE__ */ s("p", { className: A, style:
|
|
3139
|
+
w && /* @__PURE__ */ s("p", { className: R, style: D, children: i }),
|
|
3140
|
+
!b && v && /* @__PURE__ */ s("p", { className: A, style: L, children: p })
|
|
3134
3141
|
] }),
|
|
3135
3142
|
h && /* @__PURE__ */ s("div", { className: "shrink-0", children: h })
|
|
3136
3143
|
] }),
|
|
3137
|
-
m && /* @__PURE__ */ s(
|
|
3144
|
+
m && /* @__PURE__ */ s(js, { variant: t ?? e, cta: m })
|
|
3138
3145
|
] });
|
|
3139
|
-
},
|
|
3146
|
+
}, Ai = "Loading link preview", Ri = k(
|
|
3140
3147
|
"relative w-[290px] select-none overflow-hidden",
|
|
3141
3148
|
// 20px corners — no token exists for it in the component-library preset,
|
|
3142
3149
|
// whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
|
|
3143
3150
|
"rounded-[20px]"
|
|
3144
|
-
),
|
|
3151
|
+
), Li = "flex h-[250px] flex-col", Ee = ({
|
|
3145
3152
|
variant: e,
|
|
3146
3153
|
children: t,
|
|
3147
3154
|
href: n,
|
|
@@ -3157,8 +3164,8 @@ const Ni = {
|
|
|
3157
3164
|
}) => {
|
|
3158
3165
|
const g = n != null || a != null, c = k(
|
|
3159
3166
|
"messaging-link-card",
|
|
3160
|
-
|
|
3161
|
-
m ?
|
|
3167
|
+
Ri,
|
|
3168
|
+
m ? Li : "block",
|
|
3162
3169
|
// The plain fallback fill, kept underneath the `--accent` derivation: the
|
|
3163
3170
|
// `.messaging-link-card[style*='--accent']` rule in `styles.css` outranks
|
|
3164
3171
|
// this single class, so a published accent paints over it and an unset one
|
|
@@ -3180,7 +3187,7 @@ const Ni = {
|
|
|
3180
3187
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
3181
3188
|
// with offset, so keyboard users can see the focused card.
|
|
3182
3189
|
g ? "cursor-pointer no-underline focus-ring" : null
|
|
3183
|
-
), x = h ? { role: "status", "aria-busy": !0, "aria-label":
|
|
3190
|
+
), x = h ? { role: "status", "aria-busy": !0, "aria-label": Ai } : void 0, w = d ? { "--accent": d } : void 0, p = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
|
|
3184
3191
|
return n ? /* @__PURE__ */ f(
|
|
3185
3192
|
"a",
|
|
3186
3193
|
{
|
|
@@ -3231,17 +3238,17 @@ const Ni = {
|
|
|
3231
3238
|
]
|
|
3232
3239
|
}
|
|
3233
3240
|
);
|
|
3234
|
-
},
|
|
3241
|
+
}, es = {
|
|
3235
3242
|
dark: "bg-white/10",
|
|
3236
3243
|
light: "bg-black/5"
|
|
3237
|
-
},
|
|
3244
|
+
}, Mi = {
|
|
3238
3245
|
dark: "size-16 text-white/25",
|
|
3239
3246
|
light: "size-16 text-black/25"
|
|
3240
|
-
},
|
|
3247
|
+
}, De = (e, t) => !!t && !!e && ue(e) === "audio", kt = (e, t) => {
|
|
3241
3248
|
if (!t || !e) return !1;
|
|
3242
|
-
const n =
|
|
3249
|
+
const n = ue(e);
|
|
3243
3250
|
return n === "video" || n === "audio";
|
|
3244
|
-
},
|
|
3251
|
+
}, Ct = "bg-[#F2F3F4]", Ie = ({
|
|
3245
3252
|
variant: e,
|
|
3246
3253
|
thumbnailUrl: t,
|
|
3247
3254
|
sourceUrl: n,
|
|
@@ -3252,8 +3259,8 @@ const Ni = {
|
|
|
3252
3259
|
isLoading: o = !1,
|
|
3253
3260
|
onImageError: d
|
|
3254
3261
|
}) => {
|
|
3255
|
-
const m =
|
|
3256
|
-
return !o &&
|
|
3262
|
+
const m = ue(r), h = !!n && m === "video", u = de(t);
|
|
3263
|
+
return !o && De(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
|
|
3257
3264
|
"audio",
|
|
3258
3265
|
{
|
|
3259
3266
|
src: n,
|
|
@@ -3284,7 +3291,7 @@ const Ni = {
|
|
|
3284
3291
|
{
|
|
3285
3292
|
className: k(
|
|
3286
3293
|
"h-full w-full animate-pulse",
|
|
3287
|
-
|
|
3294
|
+
es[e]
|
|
3288
3295
|
),
|
|
3289
3296
|
"aria-hidden": !0
|
|
3290
3297
|
}
|
|
@@ -3328,10 +3335,10 @@ const Ni = {
|
|
|
3328
3335
|
{
|
|
3329
3336
|
className: k(
|
|
3330
3337
|
"flex h-full w-full items-center justify-center",
|
|
3331
|
-
|
|
3338
|
+
es[e]
|
|
3332
3339
|
),
|
|
3333
3340
|
children: we(r, {
|
|
3334
|
-
className:
|
|
3341
|
+
className: Mi[e],
|
|
3335
3342
|
weight: "regular"
|
|
3336
3343
|
})
|
|
3337
3344
|
}
|
|
@@ -3341,16 +3348,16 @@ const Ni = {
|
|
|
3341
3348
|
]
|
|
3342
3349
|
}
|
|
3343
3350
|
);
|
|
3344
|
-
},
|
|
3345
|
-
function
|
|
3351
|
+
}, Di = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
3352
|
+
function Oi(e) {
|
|
3346
3353
|
const t = e.trim();
|
|
3347
3354
|
return t.startsWith("#") ? t : `#${t}`;
|
|
3348
3355
|
}
|
|
3349
|
-
const
|
|
3350
|
-
dark:
|
|
3351
|
-
light:
|
|
3356
|
+
const Pi = "#FFFFFF", Vs = "#040403", zi = {
|
|
3357
|
+
dark: Pi,
|
|
3358
|
+
light: Vs
|
|
3352
3359
|
};
|
|
3353
|
-
function
|
|
3360
|
+
function He({
|
|
3354
3361
|
variant: e,
|
|
3355
3362
|
accentColor: t,
|
|
3356
3363
|
status: n = "ready",
|
|
@@ -3365,7 +3372,7 @@ function Ct({
|
|
|
3365
3372
|
}, [r]);
|
|
3366
3373
|
const m = F.useCallback(() => {
|
|
3367
3374
|
d(!0);
|
|
3368
|
-
}, []), h =
|
|
3375
|
+
}, []), h = De(i, l), c = a === "featured" && !!r && !h && !o && n === "ready" && t != null && Di.test(t.trim()) ? Oi(t) : void 0, x = h ? Vs : zi[e];
|
|
3369
3376
|
return {
|
|
3370
3377
|
thumbnailUrl: o ? void 0 : r,
|
|
3371
3378
|
accentHex: c,
|
|
@@ -3375,7 +3382,7 @@ function Ct({
|
|
|
3375
3382
|
onImageError: m
|
|
3376
3383
|
};
|
|
3377
3384
|
}
|
|
3378
|
-
const
|
|
3385
|
+
const Bi = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Fi = "relative before:absolute before:-inset-[10px] before:content-['']", $i = ({
|
|
3379
3386
|
title: e,
|
|
3380
3387
|
placeholderTitle: t,
|
|
3381
3388
|
description: n,
|
|
@@ -3393,7 +3400,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3393
3400
|
onEditClick: x,
|
|
3394
3401
|
dismissLabel: w = "Dismiss attachment"
|
|
3395
3402
|
}) => {
|
|
3396
|
-
const p = d === "classic", v =
|
|
3403
|
+
const p = d === "classic", v = De(i, o), b = He({
|
|
3397
3404
|
variant: "dark",
|
|
3398
3405
|
accentColor: u,
|
|
3399
3406
|
status: g,
|
|
@@ -3408,10 +3415,10 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3408
3415
|
onClick: c,
|
|
3409
3416
|
"aria-label": w,
|
|
3410
3417
|
className: k(
|
|
3411
|
-
|
|
3412
|
-
!v &&
|
|
3418
|
+
Bi,
|
|
3419
|
+
!v && Fi
|
|
3413
3420
|
),
|
|
3414
|
-
children: /* @__PURE__ */ s(
|
|
3421
|
+
children: /* @__PURE__ */ s(lt, { className: "size-3", weight: "bold" })
|
|
3415
3422
|
}
|
|
3416
3423
|
) : void 0, _ = x ? /* @__PURE__ */ s(
|
|
3417
3424
|
"button",
|
|
@@ -3420,12 +3427,12 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3420
3427
|
onClick: x,
|
|
3421
3428
|
"aria-label": "Edit attachment",
|
|
3422
3429
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3423
|
-
children: /* @__PURE__ */ s(
|
|
3430
|
+
children: /* @__PURE__ */ s(da, { className: "size-5", weight: "regular" })
|
|
3424
3431
|
}
|
|
3425
3432
|
) : void 0;
|
|
3426
|
-
return v && !b.isLoading ? /* @__PURE__ */ s(
|
|
3433
|
+
return v && !b.isLoading ? /* @__PURE__ */ s(Ee, { variant: "dark", bgClassName: Ct, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3427
3434
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3428
|
-
|
|
3435
|
+
Ie,
|
|
3429
3436
|
{
|
|
3430
3437
|
variant: "dark",
|
|
3431
3438
|
sourceUrl: o,
|
|
@@ -3435,7 +3442,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3435
3442
|
) }),
|
|
3436
3443
|
N && /* @__PURE__ */ s("div", { className: "shrink-0", children: N })
|
|
3437
3444
|
] }) }) : /* @__PURE__ */ f(
|
|
3438
|
-
|
|
3445
|
+
Ee,
|
|
3439
3446
|
{
|
|
3440
3447
|
variant: "dark",
|
|
3441
3448
|
fixedHeight: !p,
|
|
@@ -3444,7 +3451,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3444
3451
|
topRight: p ? N : void 0,
|
|
3445
3452
|
children: [
|
|
3446
3453
|
!p && /* @__PURE__ */ s(
|
|
3447
|
-
|
|
3454
|
+
Ie,
|
|
3448
3455
|
{
|
|
3449
3456
|
variant: "dark",
|
|
3450
3457
|
thumbnailUrl: b.thumbnailUrl,
|
|
@@ -3457,7 +3464,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3457
3464
|
}
|
|
3458
3465
|
),
|
|
3459
3466
|
/* @__PURE__ */ s(
|
|
3460
|
-
|
|
3467
|
+
Nt,
|
|
3461
3468
|
{
|
|
3462
3469
|
chinTextColor: b.chinTextColor,
|
|
3463
3470
|
variant: "dark",
|
|
@@ -3476,7 +3483,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3476
3483
|
]
|
|
3477
3484
|
}
|
|
3478
3485
|
);
|
|
3479
|
-
},
|
|
3486
|
+
}, St = ({
|
|
3480
3487
|
accentHex: e,
|
|
3481
3488
|
side: t,
|
|
3482
3489
|
visible: n,
|
|
@@ -3501,7 +3508,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3501
3508
|
}
|
|
3502
3509
|
)
|
|
3503
3510
|
] })
|
|
3504
|
-
) : /* @__PURE__ */ s(J, { children: a }),
|
|
3511
|
+
) : /* @__PURE__ */ s(J, { children: a }), Ui = ({
|
|
3505
3512
|
title: e,
|
|
3506
3513
|
description: t,
|
|
3507
3514
|
descriptionLines: n,
|
|
@@ -3517,13 +3524,13 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3517
3524
|
onClick: g,
|
|
3518
3525
|
groupPosition: c = "single"
|
|
3519
3526
|
}) => {
|
|
3520
|
-
const x =
|
|
3527
|
+
const x = kt(r, l), w = yt(a), p = m == null && w != null && !x ? w : void 0, v = m == null && !x ? g : void 0, b = u !== "loading" && De(r, l) ? Ct : void 0, N = m && g ? {
|
|
3521
3528
|
...m,
|
|
3522
3529
|
onClick: () => {
|
|
3523
3530
|
var A;
|
|
3524
3531
|
g(), (A = m.onClick) == null || A.call(m);
|
|
3525
3532
|
}
|
|
3526
|
-
} : m, _ =
|
|
3533
|
+
} : m, _ = He({
|
|
3527
3534
|
variant: "light",
|
|
3528
3535
|
accentColor: h,
|
|
3529
3536
|
status: u,
|
|
@@ -3533,13 +3540,13 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3533
3540
|
sourceUrl: l
|
|
3534
3541
|
});
|
|
3535
3542
|
return /* @__PURE__ */ s(
|
|
3536
|
-
|
|
3543
|
+
St,
|
|
3537
3544
|
{
|
|
3538
3545
|
accentHex: _.accentHex,
|
|
3539
3546
|
side: "receiver",
|
|
3540
3547
|
visible: b == null && (c === "single" || c === "end"),
|
|
3541
3548
|
children: /* @__PURE__ */ f(
|
|
3542
|
-
|
|
3549
|
+
Ee,
|
|
3543
3550
|
{
|
|
3544
3551
|
variant: "light",
|
|
3545
3552
|
href: p,
|
|
@@ -3552,7 +3559,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3552
3559
|
"data-testid": "link-attachment",
|
|
3553
3560
|
children: [
|
|
3554
3561
|
o === "featured" && /* @__PURE__ */ s(
|
|
3555
|
-
|
|
3562
|
+
Ie,
|
|
3556
3563
|
{
|
|
3557
3564
|
variant: "light",
|
|
3558
3565
|
thumbnailUrl: _.thumbnailUrl,
|
|
@@ -3564,7 +3571,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3564
3571
|
}
|
|
3565
3572
|
),
|
|
3566
3573
|
/* @__PURE__ */ s(
|
|
3567
|
-
|
|
3574
|
+
Nt,
|
|
3568
3575
|
{
|
|
3569
3576
|
chinTextColor: _.chinTextColor,
|
|
3570
3577
|
variant: "light",
|
|
@@ -3583,7 +3590,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3583
3590
|
)
|
|
3584
3591
|
}
|
|
3585
3592
|
);
|
|
3586
|
-
},
|
|
3593
|
+
}, ji = ({
|
|
3587
3594
|
title: e,
|
|
3588
3595
|
placeholderTitle: t,
|
|
3589
3596
|
description: n,
|
|
@@ -3600,7 +3607,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3600
3607
|
onClick: c,
|
|
3601
3608
|
groupPosition: x = "single"
|
|
3602
3609
|
}) => {
|
|
3603
|
-
const w =
|
|
3610
|
+
const w = kt(i, o), p = yt(r), v = h == null && p != null && !w ? p : void 0, b = h == null && !w && v != null ? c : void 0, N = g !== "loading" && De(i, o), _ = He({
|
|
3604
3611
|
variant: "dark",
|
|
3605
3612
|
accentColor: u,
|
|
3606
3613
|
status: g,
|
|
@@ -3610,13 +3617,13 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3610
3617
|
sourceUrl: o
|
|
3611
3618
|
});
|
|
3612
3619
|
return /* @__PURE__ */ s(
|
|
3613
|
-
|
|
3620
|
+
St,
|
|
3614
3621
|
{
|
|
3615
3622
|
accentHex: _.accentHex,
|
|
3616
3623
|
side: "sender",
|
|
3617
3624
|
visible: !N && (x === "single" || x === "end"),
|
|
3618
3625
|
children: /* @__PURE__ */ f(
|
|
3619
|
-
|
|
3626
|
+
Ee,
|
|
3620
3627
|
{
|
|
3621
3628
|
variant: "dark",
|
|
3622
3629
|
href: v,
|
|
@@ -3624,10 +3631,10 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3624
3631
|
fixedHeight: d === "featured" && !N,
|
|
3625
3632
|
accentHex: _.accentHex,
|
|
3626
3633
|
busy: _.isLoading,
|
|
3627
|
-
bgClassName: N ?
|
|
3634
|
+
bgClassName: N ? Ct : void 0,
|
|
3628
3635
|
children: [
|
|
3629
3636
|
d === "featured" && /* @__PURE__ */ s(
|
|
3630
|
-
|
|
3637
|
+
Ie,
|
|
3631
3638
|
{
|
|
3632
3639
|
variant: "dark",
|
|
3633
3640
|
thumbnailUrl: _.thumbnailUrl,
|
|
@@ -3639,7 +3646,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3639
3646
|
}
|
|
3640
3647
|
),
|
|
3641
3648
|
/* @__PURE__ */ s(
|
|
3642
|
-
|
|
3649
|
+
Nt,
|
|
3643
3650
|
{
|
|
3644
3651
|
chinTextColor: _.chinTextColor,
|
|
3645
3652
|
variant: "dark",
|
|
@@ -3659,22 +3666,22 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3659
3666
|
)
|
|
3660
3667
|
}
|
|
3661
3668
|
);
|
|
3662
|
-
},
|
|
3663
|
-
Composer:
|
|
3664
|
-
Sent:
|
|
3665
|
-
Received:
|
|
3669
|
+
}, ot = {
|
|
3670
|
+
Composer: $i,
|
|
3671
|
+
Sent: ji,
|
|
3672
|
+
Received: Ui
|
|
3666
3673
|
};
|
|
3667
|
-
function
|
|
3674
|
+
function M(e) {
|
|
3668
3675
|
const t = e == null ? void 0 : e.trim();
|
|
3669
3676
|
return t || void 0;
|
|
3670
3677
|
}
|
|
3671
|
-
function
|
|
3678
|
+
function ts(e) {
|
|
3672
3679
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3673
3680
|
}
|
|
3674
|
-
function
|
|
3681
|
+
function Vi(e, t) {
|
|
3675
3682
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3676
3683
|
return !1;
|
|
3677
|
-
const n =
|
|
3684
|
+
const n = ts(e), a = ts(t);
|
|
3678
3685
|
if (n === a)
|
|
3679
3686
|
return !0;
|
|
3680
3687
|
if (!n.includes(a))
|
|
@@ -3682,37 +3689,37 @@ function Ui(e, t) {
|
|
|
3682
3689
|
const r = n.split(a).join("");
|
|
3683
3690
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3684
3691
|
}
|
|
3685
|
-
function
|
|
3686
|
-
const t =
|
|
3692
|
+
function ss(e) {
|
|
3693
|
+
const t = M(e.og_scrape_url) ?? M(e.title_link), n = M(e.image_url) ?? M(e.thumb_url), a = M(e.asset_url), r = M(e.mime_type);
|
|
3687
3694
|
return {
|
|
3688
|
-
title:
|
|
3689
|
-
description:
|
|
3695
|
+
title: M(e.title),
|
|
3696
|
+
description: M(e.text),
|
|
3690
3697
|
url: t,
|
|
3691
|
-
thumbnailUrl:
|
|
3698
|
+
thumbnailUrl: de(n),
|
|
3692
3699
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3693
3700
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3694
3701
|
sourceUrl: a,
|
|
3695
|
-
layout: n ||
|
|
3702
|
+
layout: n || kt(r, a) ? "featured" : "classic",
|
|
3696
3703
|
mimeType: r,
|
|
3697
3704
|
// Dominant colour of the image, resolved by the sender at stage time and
|
|
3698
3705
|
// persisted on the attachment (`stream-custom-data.ts`), so every viewer
|
|
3699
3706
|
// paints an identical chin without re-extracting — visitors in
|
|
3700
3707
|
// linktr.ee-profiles cannot call the extraction query at all. Absent on
|
|
3701
3708
|
// messages sent before MES-1349, which render the fallback chin.
|
|
3702
|
-
accentColor:
|
|
3709
|
+
accentColor: M(e.accent_color),
|
|
3703
3710
|
// A persisted attachment is by definition fully scraped.
|
|
3704
3711
|
status: "ready"
|
|
3705
3712
|
};
|
|
3706
3713
|
}
|
|
3707
|
-
function
|
|
3714
|
+
function Hi(e) {
|
|
3708
3715
|
var t;
|
|
3709
|
-
return
|
|
3716
|
+
return Hs(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
|
|
3710
3717
|
}
|
|
3711
|
-
function
|
|
3712
|
-
const t =
|
|
3718
|
+
function Hs(e) {
|
|
3719
|
+
const t = M(e.og_scrape_url);
|
|
3713
3720
|
return e.type === "link" || !!t && !e.asset_url;
|
|
3714
3721
|
}
|
|
3715
|
-
function
|
|
3722
|
+
function Gs(e) {
|
|
3716
3723
|
if (!(e != null && e.length)) return [];
|
|
3717
3724
|
const t = [], n = (r, i) => {
|
|
3718
3725
|
const l = t[t.length - 1];
|
|
@@ -3730,25 +3737,25 @@ function Hs(e) {
|
|
|
3730
3737
|
t.push({ type: "link", attachments: [r] });
|
|
3731
3738
|
};
|
|
3732
3739
|
for (const r of e) {
|
|
3733
|
-
if (
|
|
3740
|
+
if (Hs(r)) {
|
|
3734
3741
|
a(r);
|
|
3735
3742
|
continue;
|
|
3736
3743
|
}
|
|
3737
|
-
const i =
|
|
3744
|
+
const i = Hi(r);
|
|
3738
3745
|
i && n(i, r);
|
|
3739
3746
|
}
|
|
3740
3747
|
return t;
|
|
3741
3748
|
}
|
|
3742
|
-
function
|
|
3749
|
+
function Gi(e) {
|
|
3743
3750
|
return e.filter((t) => t.type === "media").length;
|
|
3744
3751
|
}
|
|
3745
|
-
function
|
|
3752
|
+
function Yi(e, t, n) {
|
|
3746
3753
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3747
3754
|
}
|
|
3748
|
-
function
|
|
3749
|
-
return
|
|
3755
|
+
function ns(e) {
|
|
3756
|
+
return M(e.image_url) ?? M(e.asset_url) ?? "";
|
|
3750
3757
|
}
|
|
3751
|
-
function
|
|
3758
|
+
function Wi(e) {
|
|
3752
3759
|
switch (e) {
|
|
3753
3760
|
case "image":
|
|
3754
3761
|
return ke.Image;
|
|
@@ -3762,49 +3769,49 @@ function Gi(e) {
|
|
|
3762
3769
|
return ke.File;
|
|
3763
3770
|
}
|
|
3764
3771
|
}
|
|
3765
|
-
function
|
|
3772
|
+
function qi(e, t) {
|
|
3766
3773
|
if (t.length > 1)
|
|
3767
3774
|
switch (e) {
|
|
3768
3775
|
case "image":
|
|
3769
3776
|
return {
|
|
3770
3777
|
items: t.map((a) => ({
|
|
3771
|
-
src:
|
|
3772
|
-
alt:
|
|
3778
|
+
src: ns(a),
|
|
3779
|
+
alt: M(a.title)
|
|
3773
3780
|
}))
|
|
3774
3781
|
};
|
|
3775
3782
|
case "video":
|
|
3776
3783
|
return {
|
|
3777
3784
|
items: t.map((a) => ({
|
|
3778
|
-
src:
|
|
3779
|
-
poster:
|
|
3785
|
+
src: M(a.asset_url) ?? "",
|
|
3786
|
+
poster: M(
|
|
3780
3787
|
a.thumb_url
|
|
3781
3788
|
),
|
|
3782
|
-
mimeType:
|
|
3789
|
+
mimeType: M(a.mime_type)
|
|
3783
3790
|
}))
|
|
3784
3791
|
};
|
|
3785
3792
|
case "audio":
|
|
3786
3793
|
return {
|
|
3787
3794
|
items: t.map((a) => ({
|
|
3788
|
-
src:
|
|
3789
|
-
mimeType:
|
|
3790
|
-
filename:
|
|
3795
|
+
src: M(a.asset_url) ?? "",
|
|
3796
|
+
mimeType: M(a.mime_type) ?? "audio/mpeg",
|
|
3797
|
+
filename: M(a.title)
|
|
3791
3798
|
}))
|
|
3792
3799
|
};
|
|
3793
3800
|
case "pdf":
|
|
3794
3801
|
return {
|
|
3795
3802
|
items: t.map((a) => ({
|
|
3796
|
-
src:
|
|
3797
|
-
filename:
|
|
3803
|
+
src: M(a.asset_url) ?? "",
|
|
3804
|
+
filename: M(a.title),
|
|
3798
3805
|
fileSize: a.file_size
|
|
3799
3806
|
}))
|
|
3800
3807
|
};
|
|
3801
3808
|
case "file":
|
|
3802
3809
|
return {
|
|
3803
3810
|
items: t.map((a) => ({
|
|
3804
|
-
src:
|
|
3805
|
-
filename:
|
|
3811
|
+
src: M(a.asset_url) ?? "",
|
|
3812
|
+
filename: M(a.title),
|
|
3806
3813
|
fileSize: a.file_size,
|
|
3807
|
-
mimeType:
|
|
3814
|
+
mimeType: M(a.mime_type) ?? "application/octet-stream"
|
|
3808
3815
|
}))
|
|
3809
3816
|
};
|
|
3810
3817
|
}
|
|
@@ -3813,81 +3820,81 @@ function Yi(e, t) {
|
|
|
3813
3820
|
switch (e) {
|
|
3814
3821
|
case "image":
|
|
3815
3822
|
return {
|
|
3816
|
-
src:
|
|
3817
|
-
alt:
|
|
3823
|
+
src: ns(n),
|
|
3824
|
+
alt: M(n.title)
|
|
3818
3825
|
};
|
|
3819
3826
|
case "video":
|
|
3820
3827
|
return {
|
|
3821
|
-
src:
|
|
3822
|
-
poster:
|
|
3828
|
+
src: M(n.asset_url) ?? "",
|
|
3829
|
+
poster: M(
|
|
3823
3830
|
n.thumb_url
|
|
3824
3831
|
),
|
|
3825
|
-
mimeType:
|
|
3832
|
+
mimeType: M(n.mime_type)
|
|
3826
3833
|
};
|
|
3827
3834
|
case "audio":
|
|
3828
3835
|
return {
|
|
3829
|
-
src:
|
|
3830
|
-
mimeType:
|
|
3831
|
-
filename:
|
|
3836
|
+
src: M(n.asset_url) ?? "",
|
|
3837
|
+
mimeType: M(n.mime_type) ?? "audio/mpeg",
|
|
3838
|
+
filename: M(n.title)
|
|
3832
3839
|
};
|
|
3833
3840
|
case "pdf":
|
|
3834
3841
|
return {
|
|
3835
|
-
src:
|
|
3836
|
-
filename:
|
|
3842
|
+
src: M(n.asset_url) ?? "",
|
|
3843
|
+
filename: M(n.title),
|
|
3837
3844
|
fileSize: n.file_size
|
|
3838
3845
|
};
|
|
3839
3846
|
case "file":
|
|
3840
3847
|
return {
|
|
3841
|
-
src:
|
|
3842
|
-
filename:
|
|
3848
|
+
src: M(n.asset_url) ?? "",
|
|
3849
|
+
filename: M(n.title),
|
|
3843
3850
|
fileSize: n.file_size,
|
|
3844
|
-
mimeType:
|
|
3851
|
+
mimeType: M(n.mime_type) ?? "application/octet-stream"
|
|
3845
3852
|
};
|
|
3846
3853
|
}
|
|
3847
3854
|
}
|
|
3848
|
-
function
|
|
3855
|
+
function Xi({
|
|
3849
3856
|
groupPosition: e,
|
|
3850
3857
|
isMyMessage: t,
|
|
3851
3858
|
segment: n
|
|
3852
3859
|
}) {
|
|
3853
|
-
const a =
|
|
3854
|
-
...
|
|
3860
|
+
const a = Wi(n.kind), r = {
|
|
3861
|
+
...qi(n.kind, n.attachments),
|
|
3855
3862
|
groupPosition: e
|
|
3856
3863
|
};
|
|
3857
3864
|
return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
|
|
3858
3865
|
}
|
|
3859
|
-
const
|
|
3866
|
+
const Ki = ({
|
|
3860
3867
|
groupPosition: e,
|
|
3861
3868
|
isMyMessage: t,
|
|
3862
3869
|
message: n,
|
|
3863
3870
|
renderText: a
|
|
3864
3871
|
}) => {
|
|
3865
3872
|
var w;
|
|
3866
|
-
const r =
|
|
3873
|
+
const r = Gs(n.attachments);
|
|
3867
3874
|
if (r.length === 0) return null;
|
|
3868
|
-
const i =
|
|
3875
|
+
const i = Gi(r), l = (w = n.text) == null ? void 0 : w.trim(), o = r.find((p) => p.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, m = l && Vi(l, d) ? void 0 : l;
|
|
3869
3876
|
let h = 0;
|
|
3870
3877
|
const u = [], g = m ? "middle" : e, c = (p, v, b) => {
|
|
3871
|
-
const N = t ?
|
|
3878
|
+
const N = t ? ot.Sent : ot.Received;
|
|
3872
3879
|
u.push(
|
|
3873
3880
|
/* @__PURE__ */ s(
|
|
3874
3881
|
N,
|
|
3875
3882
|
{
|
|
3876
|
-
...
|
|
3883
|
+
...ss(p),
|
|
3877
3884
|
groupPosition: b ? g : "middle"
|
|
3878
3885
|
},
|
|
3879
3886
|
v
|
|
3880
3887
|
)
|
|
3881
3888
|
);
|
|
3882
3889
|
}, x = (p, v) => {
|
|
3883
|
-
const b =
|
|
3890
|
+
const b = Yi(
|
|
3884
3891
|
h,
|
|
3885
3892
|
i,
|
|
3886
3893
|
e
|
|
3887
3894
|
);
|
|
3888
3895
|
h += 1, u.push(
|
|
3889
3896
|
/* @__PURE__ */ s(
|
|
3890
|
-
|
|
3897
|
+
Xi,
|
|
3891
3898
|
{
|
|
3892
3899
|
groupPosition: b,
|
|
3893
3900
|
isMyMessage: t,
|
|
@@ -3924,17 +3931,17 @@ const qi = ({
|
|
|
3924
3931
|
},
|
|
3925
3932
|
children: [
|
|
3926
3933
|
u,
|
|
3927
|
-
!m && /* @__PURE__ */ s(
|
|
3934
|
+
!m && /* @__PURE__ */ s(st, {})
|
|
3928
3935
|
]
|
|
3929
3936
|
}
|
|
3930
3937
|
),
|
|
3931
3938
|
m ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble", children: [
|
|
3932
|
-
/* @__PURE__ */ s(
|
|
3933
|
-
/* @__PURE__ */ s(
|
|
3939
|
+
/* @__PURE__ */ s(Fe, { message: n, renderText: a }),
|
|
3940
|
+
/* @__PURE__ */ s(st, {})
|
|
3934
3941
|
] }) : null
|
|
3935
3942
|
] });
|
|
3936
|
-
},
|
|
3937
|
-
var Mt,
|
|
3943
|
+
}, Zi = (e) => {
|
|
3944
|
+
var Mt, Dt, Ot, Pt, zt, Bt, Ft, $t, Ut, jt;
|
|
3938
3945
|
const {
|
|
3939
3946
|
additionalMessageInputProps: t,
|
|
3940
3947
|
chatbotVotingEnabled: n,
|
|
@@ -3954,50 +3961,50 @@ const qi = ({
|
|
|
3954
3961
|
viewerLanguage: p,
|
|
3955
3962
|
onBroadcastClick: v,
|
|
3956
3963
|
resolvedBroadcastName: b
|
|
3957
|
-
} = e, { client: N } =
|
|
3958
|
-
Attachment: E =
|
|
3959
|
-
EditMessageModal: B =
|
|
3964
|
+
} = e, { client: N } = Te("CustomMessage"), { channel: _ } = fe("CustomMessage"), { isUnlocking: A, onUnlockClick: R, onFetchSource: L, onDownloadClick: D } = di("LockedAttachment"), [$, O] = U(!1), C = dn(c.id), { selected: P, voteUp: S, voteDown: T } = Oa(c), {
|
|
3965
|
+
Attachment: E = un,
|
|
3966
|
+
EditMessageModal: B = mn,
|
|
3960
3967
|
MessageActions: z,
|
|
3961
|
-
MessageBlocked: j =
|
|
3962
|
-
MessageBouncePrompt: K =
|
|
3963
|
-
MessageDeleted: se =
|
|
3964
|
-
MessageIsThreadReplyInChannelButtonIndicator: G =
|
|
3965
|
-
MessageRepliesCountButton: y =
|
|
3966
|
-
ReminderNotification: I =
|
|
3967
|
-
StreamedMessageText: W =
|
|
3968
|
+
MessageBlocked: j = hn,
|
|
3969
|
+
MessageBouncePrompt: K = fn,
|
|
3970
|
+
MessageDeleted: se = gn,
|
|
3971
|
+
MessageIsThreadReplyInChannelButtonIndicator: G = pn,
|
|
3972
|
+
MessageRepliesCountButton: y = bn,
|
|
3973
|
+
ReminderNotification: I = vn,
|
|
3974
|
+
StreamedMessageText: W = xn,
|
|
3968
3975
|
PinIndicator: Q
|
|
3969
|
-
} =
|
|
3976
|
+
} = ls("CustomMessage"), X = wn(c), ne = _n(c), Z = ae(
|
|
3970
3977
|
() => u == null ? void 0 : u(c),
|
|
3971
3978
|
[u, c]
|
|
3972
3979
|
), V = ae(() => {
|
|
3973
|
-
const
|
|
3974
|
-
if (
|
|
3975
|
-
const
|
|
3976
|
-
return
|
|
3980
|
+
const he = c.attachments ?? [], ve = c.shared_location ? [c.shared_location, ...he] : he;
|
|
3981
|
+
if (!$e(c)) return ve;
|
|
3982
|
+
const Vt = ve.filter((Ht) => !("type" in Ht) || !ks(Ht));
|
|
3983
|
+
return Vt.length === ve.length ? ve : Vt;
|
|
3977
3984
|
}, [c]), ee = ae(
|
|
3978
|
-
() =>
|
|
3985
|
+
() => Gs(V),
|
|
3979
3986
|
[V]
|
|
3980
3987
|
), ie = ae(() => {
|
|
3981
|
-
const
|
|
3982
|
-
return
|
|
3983
|
-
}, [c, p]),
|
|
3984
|
-
(
|
|
3988
|
+
const he = xs({ message: c, viewerLanguage: p });
|
|
3989
|
+
return he === c.text ? c : { ...c, text: he };
|
|
3990
|
+
}, [c, p]), Oe = ee.length > 0, Pe = ee.reduce(
|
|
3991
|
+
(he, ve) => he + ve.attachments.length,
|
|
3985
3992
|
0
|
|
3986
|
-
) === ((V == null ? void 0 : V.length) ?? 0), oe =
|
|
3993
|
+
) === ((V == null ? void 0 : V.length) ?? 0), oe = lr({
|
|
3987
3994
|
endOfGroup: r,
|
|
3988
3995
|
firstOfGroup: i,
|
|
3989
3996
|
groupedByUser: l
|
|
3990
3997
|
});
|
|
3991
|
-
if (
|
|
3998
|
+
if (yn(c))
|
|
3992
3999
|
return null;
|
|
3993
4000
|
if (c.deleted_at || c.type === "deleted")
|
|
3994
4001
|
return /* @__PURE__ */ s(se, { message: c });
|
|
3995
|
-
if (
|
|
4002
|
+
if (Nn(c))
|
|
3996
4003
|
return /* @__PURE__ */ s(j, {});
|
|
3997
|
-
const
|
|
4004
|
+
const me = !w && !!c.reply_count, le = !w && c.show_in_channel && c.parent_id, Et = c.status === "failed" && ((Mt = c.error) == null ? void 0 : Mt.status) !== 403, It = kn(c);
|
|
3998
4005
|
let pe;
|
|
3999
|
-
|
|
4000
|
-
const te = g(),
|
|
4006
|
+
Et ? pe = () => m(c) : It && (pe = () => O(!0));
|
|
4007
|
+
const te = g(), Js = k(
|
|
4001
4008
|
"str-chat__message str-chat__message-simple",
|
|
4002
4009
|
`str-chat__message--${c.type}`,
|
|
4003
4010
|
`str-chat__message--${c.status}`,
|
|
@@ -4008,26 +4015,26 @@ const qi = ({
|
|
|
4008
4015
|
"str-chat__message--highlighted": h,
|
|
4009
4016
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
4010
4017
|
"str-chat__message--with-reactions": ne,
|
|
4011
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
4012
|
-
"str-chat__message-with-thread-link":
|
|
4018
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Dt = c == null ? void 0 : c.error) == null ? void 0 : Dt.status) !== 403,
|
|
4019
|
+
"str-chat__message-with-thread-link": me || le,
|
|
4013
4020
|
"str-chat__virtual-message__wrapper--end": r,
|
|
4014
4021
|
"str-chat__virtual-message__wrapper--first": i,
|
|
4015
4022
|
"str-chat__virtual-message__wrapper--group": l
|
|
4016
4023
|
}
|
|
4017
|
-
),
|
|
4024
|
+
), Ge = c.poll_id && N.polls.fromState(c.poll_id), Tt = vi(c), be = $e(c), Qs = wt(c), Ye = !!(V != null && V.length && !c.quoted_message), At = be && te && Ye, en = Oe && Pe && !c.quoted_message && !Ge && !Z && !be, Rt = {
|
|
4018
4025
|
contentType: "text",
|
|
4019
|
-
amountText: (
|
|
4026
|
+
amountText: (Ot = c.metadata) == null ? void 0 : Ot.amount_text,
|
|
4020
4027
|
paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
|
|
4021
|
-
renderedText: c.text && /* @__PURE__ */ s(
|
|
4028
|
+
renderedText: c.text && /* @__PURE__ */ s(Fe, { message: ie, renderText: x })
|
|
4022
4029
|
}, Lt = {
|
|
4023
4030
|
contentType: "media",
|
|
4024
|
-
title: (
|
|
4025
|
-
mimeType: (
|
|
4026
|
-
thumbnailUrl: (
|
|
4027
|
-
amountText: (
|
|
4028
|
-
detail: (
|
|
4029
|
-
paymentStatus: (
|
|
4030
|
-
onFetchSource:
|
|
4031
|
+
title: (zt = c.metadata) == null ? void 0 : zt.attachment_title,
|
|
4032
|
+
mimeType: (Bt = c.metadata) == null ? void 0 : Bt.attachment_mime_type,
|
|
4033
|
+
thumbnailUrl: (Ft = c.metadata) == null ? void 0 : Ft.attachment_thumbnail,
|
|
4034
|
+
amountText: ($t = c.metadata) == null ? void 0 : $t.amount_text,
|
|
4035
|
+
detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
|
|
4036
|
+
paymentStatus: (jt = c.metadata) == null ? void 0 : jt.payment_status,
|
|
4037
|
+
onFetchSource: L ? () => L(c, _) : void 0
|
|
4031
4038
|
};
|
|
4032
4039
|
return /* @__PURE__ */ f(J, { children: [
|
|
4033
4040
|
a && /* @__PURE__ */ s(
|
|
@@ -4037,17 +4044,17 @@ const qi = ({
|
|
|
4037
4044
|
}
|
|
4038
4045
|
),
|
|
4039
4046
|
$ && /* @__PURE__ */ s(
|
|
4040
|
-
|
|
4047
|
+
Cn,
|
|
4041
4048
|
{
|
|
4042
4049
|
MessageBouncePrompt: K,
|
|
4043
|
-
onClose: () =>
|
|
4050
|
+
onClose: () => O(!1),
|
|
4044
4051
|
open: $
|
|
4045
4052
|
}
|
|
4046
4053
|
),
|
|
4047
4054
|
/* @__PURE__ */ f(
|
|
4048
4055
|
"div",
|
|
4049
4056
|
{
|
|
4050
|
-
className:
|
|
4057
|
+
className: Js,
|
|
4051
4058
|
"data-message-id": c.id,
|
|
4052
4059
|
"data-dd-privacy": "mask",
|
|
4053
4060
|
children: [
|
|
@@ -4069,7 +4076,7 @@ const qi = ({
|
|
|
4069
4076
|
"div",
|
|
4070
4077
|
{
|
|
4071
4078
|
className: k("str-chat__message-inner", {
|
|
4072
|
-
"str-chat__simple-message--error-failed":
|
|
4079
|
+
"str-chat__simple-message--error-failed": Et || It
|
|
4073
4080
|
}),
|
|
4074
4081
|
"data-testid": "message-inner",
|
|
4075
4082
|
onClick: pe,
|
|
@@ -4082,55 +4089,55 @@ const qi = ({
|
|
|
4082
4089
|
marginInlineEnd: 0,
|
|
4083
4090
|
marginInlineStart: 0
|
|
4084
4091
|
},
|
|
4085
|
-
children:
|
|
4092
|
+
children: Tt ? /* @__PURE__ */ s(Ze, { message: c, standalone: !0 }) : pi(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
4086
4093
|
te && z && /* @__PURE__ */ s(z, {}),
|
|
4087
4094
|
te ? /* @__PURE__ */ s(
|
|
4088
|
-
|
|
4095
|
+
Be,
|
|
4089
4096
|
{
|
|
4090
|
-
...
|
|
4097
|
+
...Rt,
|
|
4091
4098
|
isMine: !0
|
|
4092
4099
|
}
|
|
4093
4100
|
) : /* @__PURE__ */ s(
|
|
4094
|
-
|
|
4101
|
+
Be,
|
|
4095
4102
|
{
|
|
4096
|
-
...
|
|
4103
|
+
...Rt,
|
|
4097
4104
|
isMine: !1,
|
|
4098
4105
|
isUnlocking: A(c.id),
|
|
4099
|
-
onUnlockClick: () =>
|
|
4106
|
+
onUnlockClick: () => R == null ? void 0 : R(c, _)
|
|
4100
4107
|
}
|
|
4101
4108
|
),
|
|
4102
4109
|
!te && z && /* @__PURE__ */ s(z, {})
|
|
4103
|
-
] }) }) :
|
|
4110
|
+
] }) }) : bi(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
4104
4111
|
/* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
4105
4112
|
te && z && /* @__PURE__ */ s(z, {}),
|
|
4106
4113
|
te ? /* @__PURE__ */ s(
|
|
4107
|
-
|
|
4114
|
+
Be,
|
|
4108
4115
|
{
|
|
4109
4116
|
...Lt,
|
|
4110
4117
|
isMine: !0,
|
|
4111
|
-
onPreviewClick: () =>
|
|
4118
|
+
onPreviewClick: () => R ? R(c, _) : void 0
|
|
4112
4119
|
}
|
|
4113
4120
|
) : /* @__PURE__ */ s(
|
|
4114
|
-
|
|
4121
|
+
Be,
|
|
4115
4122
|
{
|
|
4116
4123
|
...Lt,
|
|
4117
4124
|
isMine: !1,
|
|
4118
4125
|
isUnlocking: A(c.id),
|
|
4119
|
-
onUnlockClick: () =>
|
|
4126
|
+
onUnlockClick: () => R ? R(c, _) : void 0,
|
|
4120
4127
|
onDownloadClick: () => D ? D(c, _) : void 0
|
|
4121
4128
|
}
|
|
4122
4129
|
),
|
|
4123
4130
|
!te && z && /* @__PURE__ */ s(z, {})
|
|
4124
4131
|
] }),
|
|
4125
4132
|
c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
|
|
4126
|
-
|
|
4133
|
+
Fe,
|
|
4127
4134
|
{
|
|
4128
4135
|
message: ie,
|
|
4129
4136
|
renderText: x
|
|
4130
4137
|
}
|
|
4131
4138
|
) })
|
|
4132
|
-
] }) :
|
|
4133
|
-
|
|
4139
|
+
] }) : en ? /* @__PURE__ */ s(
|
|
4140
|
+
Ki,
|
|
4134
4141
|
{
|
|
4135
4142
|
groupPosition: oe,
|
|
4136
4143
|
isMyMessage: te,
|
|
@@ -4145,15 +4152,15 @@ const qi = ({
|
|
|
4145
4152
|
renderText: x
|
|
4146
4153
|
}
|
|
4147
4154
|
) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "str-chat__message-bubble", children: [
|
|
4148
|
-
be && !
|
|
4149
|
-
|
|
4155
|
+
be && !At && /* @__PURE__ */ s(
|
|
4156
|
+
Ze,
|
|
4150
4157
|
{
|
|
4151
4158
|
message: c,
|
|
4152
|
-
hasAttachment:
|
|
4159
|
+
hasAttachment: Ye,
|
|
4153
4160
|
isMyMessage: te
|
|
4154
4161
|
}
|
|
4155
4162
|
),
|
|
4156
|
-
|
|
4163
|
+
Ge && /* @__PURE__ */ s(Sn, { poll: Ge }),
|
|
4157
4164
|
V != null && V.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
4158
4165
|
E,
|
|
4159
4166
|
{
|
|
@@ -4168,42 +4175,42 @@ const qi = ({
|
|
|
4168
4175
|
renderText: x
|
|
4169
4176
|
}
|
|
4170
4177
|
) : /* @__PURE__ */ s(
|
|
4171
|
-
|
|
4178
|
+
Fe,
|
|
4172
4179
|
{
|
|
4173
4180
|
message: ie,
|
|
4174
4181
|
renderText: x
|
|
4175
4182
|
}
|
|
4176
4183
|
),
|
|
4177
|
-
/* @__PURE__ */ s(
|
|
4184
|
+
/* @__PURE__ */ s(st, {})
|
|
4178
4185
|
] }) })
|
|
4179
4186
|
}
|
|
4180
4187
|
),
|
|
4181
|
-
!
|
|
4182
|
-
(!be ||
|
|
4183
|
-
|
|
4188
|
+
!Qs && !Tt && /* @__PURE__ */ f("div", { className: "str-chat__message-footer", children: [
|
|
4189
|
+
(!be || At) && /* @__PURE__ */ s(
|
|
4190
|
+
Ze,
|
|
4184
4191
|
{
|
|
4185
4192
|
message: c,
|
|
4186
|
-
hasAttachment:
|
|
4193
|
+
hasAttachment: Ye,
|
|
4187
4194
|
isMyMessage: te
|
|
4188
4195
|
}
|
|
4189
4196
|
),
|
|
4190
4197
|
n && be && /* @__PURE__ */ s(
|
|
4191
|
-
|
|
4198
|
+
xi,
|
|
4192
4199
|
{
|
|
4193
|
-
selected:
|
|
4200
|
+
selected: P,
|
|
4194
4201
|
onVoteUp: S,
|
|
4195
4202
|
onVoteDown: T
|
|
4196
4203
|
}
|
|
4197
4204
|
)
|
|
4198
4205
|
] }),
|
|
4199
4206
|
/* @__PURE__ */ s(
|
|
4200
|
-
|
|
4207
|
+
Ni,
|
|
4201
4208
|
{
|
|
4202
4209
|
onBroadcastClick: v,
|
|
4203
4210
|
resolvedBroadcastName: b
|
|
4204
4211
|
}
|
|
4205
4212
|
),
|
|
4206
|
-
|
|
4213
|
+
me && /* @__PURE__ */ s(
|
|
4207
4214
|
y,
|
|
4208
4215
|
{
|
|
4209
4216
|
onClick: d,
|
|
@@ -4216,65 +4223,65 @@ const qi = ({
|
|
|
4216
4223
|
c.id
|
|
4217
4224
|
)
|
|
4218
4225
|
] });
|
|
4219
|
-
},
|
|
4220
|
-
|
|
4221
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick || e.resolvedBroadcastName !== t.resolvedBroadcastName ? !1 :
|
|
4222
|
-
),
|
|
4226
|
+
}, Ji = F.memo(
|
|
4227
|
+
Zi,
|
|
4228
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick || e.resolvedBroadcastName !== t.resolvedBroadcastName ? !1 : cn(e, t)
|
|
4229
|
+
), Qi = (e) => {
|
|
4223
4230
|
var i;
|
|
4224
|
-
const t = ge("CustomMessage"), n = _e(
|
|
4231
|
+
const t = ge("CustomMessage"), n = _e(Bs), a = (i = t.message.metadata) == null ? void 0 : i.broadcast_id, r = typeof a == "string" ? n == null ? void 0 : n[a] : void 0;
|
|
4225
4232
|
return /* @__PURE__ */ s(
|
|
4226
|
-
|
|
4233
|
+
Ji,
|
|
4227
4234
|
{
|
|
4228
4235
|
...t,
|
|
4229
4236
|
...e,
|
|
4230
4237
|
resolvedBroadcastName: r
|
|
4231
4238
|
}
|
|
4232
4239
|
);
|
|
4233
|
-
},
|
|
4240
|
+
}, eo = () => {
|
|
4234
4241
|
var n;
|
|
4235
4242
|
const { handleDelete: e, message: t } = ge("CustomMessageActions");
|
|
4236
4243
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
4237
|
-
|
|
4244
|
+
hs,
|
|
4238
4245
|
{
|
|
4239
4246
|
onClick: e,
|
|
4240
4247
|
"aria-label": "Delete",
|
|
4241
4248
|
title: "Delete",
|
|
4242
4249
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4243
|
-
children: /* @__PURE__ */ s(
|
|
4250
|
+
children: /* @__PURE__ */ s(ua, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4244
4251
|
}
|
|
4245
4252
|
);
|
|
4246
|
-
},
|
|
4253
|
+
}, to = () => {
|
|
4247
4254
|
const { handleFlag: e } = ge("CustomMessageActions");
|
|
4248
4255
|
return /* @__PURE__ */ s(
|
|
4249
|
-
|
|
4256
|
+
hs,
|
|
4250
4257
|
{
|
|
4251
4258
|
onClick: e,
|
|
4252
4259
|
"aria-label": "Report",
|
|
4253
4260
|
title: "Report",
|
|
4254
4261
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4255
|
-
children: /* @__PURE__ */ s(
|
|
4262
|
+
children: /* @__PURE__ */ s(cs, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4256
4263
|
}
|
|
4257
4264
|
);
|
|
4258
|
-
},
|
|
4265
|
+
}, so = () => {
|
|
4259
4266
|
var t;
|
|
4260
4267
|
const { message: e } = ge("CustomMessageActions");
|
|
4261
4268
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== ce.ATTACHMENT ? null : /* @__PURE__ */ s(
|
|
4262
|
-
|
|
4269
|
+
wa,
|
|
4263
4270
|
{
|
|
4264
4271
|
messageActionSet: [
|
|
4265
|
-
{ Component:
|
|
4266
|
-
{ Component:
|
|
4272
|
+
{ Component: eo, placement: "quick", type: "delete" },
|
|
4273
|
+
{ Component: to, placement: "quick", type: "flag" }
|
|
4267
4274
|
]
|
|
4268
4275
|
}
|
|
4269
4276
|
);
|
|
4270
|
-
},
|
|
4277
|
+
}, no = (e) => ({
|
|
4271
4278
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
4272
|
-
(t) =>
|
|
4279
|
+
(t) => tt.previewIsLoaded(t) || tt.previewIsLoading(t)
|
|
4273
4280
|
)
|
|
4274
|
-
}),
|
|
4275
|
-
const { linkPreviewsManager: e } =
|
|
4281
|
+
}), ao = () => {
|
|
4282
|
+
const { linkPreviewsManager: e } = En(), { linkPreviews: t } = In(
|
|
4276
4283
|
e.state,
|
|
4277
|
-
|
|
4284
|
+
no
|
|
4278
4285
|
), n = (r) => {
|
|
4279
4286
|
e.dismissPreview(r);
|
|
4280
4287
|
};
|
|
@@ -4323,9 +4330,9 @@ const qi = ({
|
|
|
4323
4330
|
// edge lands ~6px past the fold, reachable by scrolling. That residue
|
|
4324
4331
|
// belongs to whoever owns the mobile layout contract, not to this component.
|
|
4325
4332
|
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2", children: t.map((r) => {
|
|
4326
|
-
const i =
|
|
4333
|
+
const i = tt.previewIsLoading(r);
|
|
4327
4334
|
return /* @__PURE__ */ s(
|
|
4328
|
-
|
|
4335
|
+
ot.Composer,
|
|
4329
4336
|
{
|
|
4330
4337
|
title: r.title,
|
|
4331
4338
|
url: r.og_scrape_url,
|
|
@@ -4338,7 +4345,7 @@ const qi = ({
|
|
|
4338
4345
|
);
|
|
4339
4346
|
}) })
|
|
4340
4347
|
) : null;
|
|
4341
|
-
}, Ue = F.createContext(!1),
|
|
4348
|
+
}, Ue = F.createContext(!1), ro = 200, rl = () => _e(Ue), io = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
4342
4349
|
"button",
|
|
4343
4350
|
{
|
|
4344
4351
|
...n,
|
|
@@ -4347,13 +4354,13 @@ const qi = ({
|
|
|
4347
4354
|
disabled: t,
|
|
4348
4355
|
onPointerDown: (a) => a.preventDefault(),
|
|
4349
4356
|
onClick: e,
|
|
4350
|
-
children: /* @__PURE__ */ s(
|
|
4357
|
+
children: /* @__PURE__ */ s(ma, { weight: "bold", className: "size-4" })
|
|
4351
4358
|
}
|
|
4352
|
-
),
|
|
4353
|
-
const e = _e(Ue), { handleSubmit: t } =
|
|
4354
|
-
SendButton: r =
|
|
4355
|
-
AttachmentPreviewList: i =
|
|
4356
|
-
} =
|
|
4359
|
+
), as = () => {
|
|
4360
|
+
const e = _e(Ue), { handleSubmit: t } = Tn(), n = An(), a = e || !n, {
|
|
4361
|
+
SendButton: r = io,
|
|
4362
|
+
AttachmentPreviewList: i = Rn
|
|
4363
|
+
} = ls("CustomMessageInput"), l = F.useRef(null);
|
|
4357
4364
|
return F.useEffect(() => {
|
|
4358
4365
|
const o = l.current;
|
|
4359
4366
|
if (!o || typeof ResizeObserver > "u")
|
|
@@ -4416,13 +4423,13 @@ const qi = ({
|
|
|
4416
4423
|
"data-dd-privacy": "mask",
|
|
4417
4424
|
children: [
|
|
4418
4425
|
/* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
|
|
4419
|
-
/* @__PURE__ */ s(
|
|
4420
|
-
/* @__PURE__ */ s(
|
|
4426
|
+
/* @__PURE__ */ s(Ln, {}),
|
|
4427
|
+
/* @__PURE__ */ s(ao, {}),
|
|
4421
4428
|
/* @__PURE__ */ s(i, {})
|
|
4422
4429
|
] }),
|
|
4423
4430
|
/* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
|
|
4424
4431
|
/* @__PURE__ */ s(
|
|
4425
|
-
|
|
4432
|
+
Mn,
|
|
4426
4433
|
{
|
|
4427
4434
|
"aria-disabled": e || void 0,
|
|
4428
4435
|
containerClassName: "min-w-0 flex-1 leading-[0]",
|
|
@@ -4449,7 +4456,7 @@ const qi = ({
|
|
|
4449
4456
|
]
|
|
4450
4457
|
}
|
|
4451
4458
|
);
|
|
4452
|
-
},
|
|
4459
|
+
}, rs = ({
|
|
4453
4460
|
renderActions: e,
|
|
4454
4461
|
renderHeader: t,
|
|
4455
4462
|
renderFooter: n,
|
|
@@ -4471,7 +4478,7 @@ const qi = ({
|
|
|
4471
4478
|
c = p;
|
|
4472
4479
|
const b = Array.from(
|
|
4473
4480
|
g.querySelectorAll(".str-chat__list")
|
|
4474
|
-
).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight <
|
|
4481
|
+
).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight < ro : !1;
|
|
4475
4482
|
g.style.setProperty(
|
|
4476
4483
|
"--messaging-composer-height",
|
|
4477
4484
|
`${p}px`
|
|
@@ -4533,7 +4540,7 @@ const qi = ({
|
|
|
4533
4540
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4534
4541
|
children: [
|
|
4535
4542
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4536
|
-
/* @__PURE__ */ s(Ue.Provider, { value: o, children: /* @__PURE__ */ s(
|
|
4543
|
+
/* @__PURE__ */ s(Ue.Provider, { value: o, children: /* @__PURE__ */ s(Gt, { Input: i ?? as }) })
|
|
4537
4544
|
]
|
|
4538
4545
|
}
|
|
4539
4546
|
),
|
|
@@ -4552,67 +4559,67 @@ const qi = ({
|
|
|
4552
4559
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4553
4560
|
children: [
|
|
4554
4561
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4555
|
-
/* @__PURE__ */ s(Ue.Provider, { value: o, children: /* @__PURE__ */ s(
|
|
4562
|
+
/* @__PURE__ */ s(Ue.Provider, { value: o, children: /* @__PURE__ */ s(Gt, { Input: as }) })
|
|
4556
4563
|
]
|
|
4557
4564
|
}
|
|
4558
4565
|
),
|
|
4559
4566
|
n == null ? void 0 : n()
|
|
4560
4567
|
] });
|
|
4561
|
-
},
|
|
4568
|
+
}, oo = {
|
|
4562
4569
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
4563
4570
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
4564
|
-
},
|
|
4571
|
+
}, lo = ["SYSTEM_AGE_SAFETY_BLOCKED"], co = {
|
|
4565
4572
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4566
|
-
},
|
|
4573
|
+
}, Qe = "age safety guidelines.", uo = "https://linktr.ee/s/about/contact", mo = (e) => lo.includes(
|
|
4567
4574
|
e
|
|
4568
|
-
),
|
|
4575
|
+
), ho = (e) => {
|
|
4569
4576
|
var t;
|
|
4570
|
-
return
|
|
4571
|
-
},
|
|
4577
|
+
return mo((t = e.metadata) == null ? void 0 : t.custom_type);
|
|
4578
|
+
}, fo = (e) => {
|
|
4572
4579
|
var a;
|
|
4573
4580
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4574
|
-
if (
|
|
4581
|
+
if (qt(t))
|
|
4575
4582
|
return {
|
|
4576
4583
|
kind: "dm-agent",
|
|
4577
4584
|
type: t
|
|
4578
4585
|
};
|
|
4579
|
-
if (
|
|
4586
|
+
if (ba(t))
|
|
4580
4587
|
return {
|
|
4581
4588
|
kind: "age-safety",
|
|
4582
4589
|
type: t
|
|
4583
4590
|
};
|
|
4584
4591
|
const n = e.dm_agent_system_type;
|
|
4585
|
-
if (
|
|
4592
|
+
if (qt(n))
|
|
4586
4593
|
return {
|
|
4587
4594
|
kind: "dm-agent",
|
|
4588
4595
|
type: n
|
|
4589
4596
|
};
|
|
4590
|
-
},
|
|
4591
|
-
const t = e.indexOf(
|
|
4597
|
+
}, go = (e) => {
|
|
4598
|
+
const t = e.indexOf(Qe);
|
|
4592
4599
|
if (t === -1)
|
|
4593
4600
|
return e;
|
|
4594
|
-
const n = t +
|
|
4601
|
+
const n = t + Qe.length;
|
|
4595
4602
|
return /* @__PURE__ */ f(J, { children: [
|
|
4596
4603
|
e.slice(0, t),
|
|
4597
4604
|
/* @__PURE__ */ s(
|
|
4598
4605
|
"a",
|
|
4599
4606
|
{
|
|
4600
|
-
href:
|
|
4607
|
+
href: uo,
|
|
4601
4608
|
target: "_blank",
|
|
4602
4609
|
rel: "noopener noreferrer",
|
|
4603
4610
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
4604
|
-
children:
|
|
4611
|
+
children: Qe
|
|
4605
4612
|
}
|
|
4606
4613
|
),
|
|
4607
4614
|
e.slice(n)
|
|
4608
4615
|
] });
|
|
4609
|
-
},
|
|
4616
|
+
}, po = (e) => {
|
|
4610
4617
|
var a, r;
|
|
4611
|
-
const t = !
|
|
4618
|
+
const t = !ho(e.message), n = fo(
|
|
4612
4619
|
e.message
|
|
4613
4620
|
);
|
|
4614
4621
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
4615
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
4622
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || oo[n.type];
|
|
4616
4623
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4617
4624
|
/* @__PURE__ */ f(
|
|
4618
4625
|
"div",
|
|
@@ -4622,7 +4629,7 @@ const qi = ({
|
|
|
4622
4629
|
"data-dm-agent-system-type": n.type,
|
|
4623
4630
|
children: [
|
|
4624
4631
|
/* @__PURE__ */ s(
|
|
4625
|
-
|
|
4632
|
+
ha,
|
|
4626
4633
|
{
|
|
4627
4634
|
size: 16,
|
|
4628
4635
|
weight: "regular",
|
|
@@ -4634,11 +4641,11 @@ const qi = ({
|
|
|
4634
4641
|
]
|
|
4635
4642
|
}
|
|
4636
4643
|
),
|
|
4637
|
-
!t && /* @__PURE__ */ s(
|
|
4644
|
+
!t && /* @__PURE__ */ s(We, { message: e.message })
|
|
4638
4645
|
] });
|
|
4639
4646
|
}
|
|
4640
4647
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
4641
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4648
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || co[n.type];
|
|
4642
4649
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4643
4650
|
/* @__PURE__ */ f(
|
|
4644
4651
|
"div",
|
|
@@ -4648,7 +4655,7 @@ const qi = ({
|
|
|
4648
4655
|
"data-age-safety-system-type": n.type,
|
|
4649
4656
|
children: [
|
|
4650
4657
|
/* @__PURE__ */ s(
|
|
4651
|
-
|
|
4658
|
+
fa,
|
|
4652
4659
|
{
|
|
4653
4660
|
size: 24,
|
|
4654
4661
|
weight: "duotone",
|
|
@@ -4657,11 +4664,11 @@ const qi = ({
|
|
|
4657
4664
|
"data-testid": "age-safety-system-message-icon"
|
|
4658
4665
|
}
|
|
4659
4666
|
),
|
|
4660
|
-
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
4667
|
+
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: go(i) }) })
|
|
4661
4668
|
]
|
|
4662
4669
|
}
|
|
4663
4670
|
),
|
|
4664
|
-
!t && /* @__PURE__ */ s(
|
|
4671
|
+
!t && /* @__PURE__ */ s(We, { message: e.message })
|
|
4665
4672
|
] });
|
|
4666
4673
|
}
|
|
4667
4674
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -4670,9 +4677,9 @@ const qi = ({
|
|
|
4670
4677
|
/* @__PURE__ */ s("p", { children: e.message.text }),
|
|
4671
4678
|
/* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
|
|
4672
4679
|
] }),
|
|
4673
|
-
!t && /* @__PURE__ */ s(
|
|
4680
|
+
!t && /* @__PURE__ */ s(We, { message: e.message })
|
|
4674
4681
|
] });
|
|
4675
|
-
},
|
|
4682
|
+
}, Ys = Ve(!1), et = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
4676
4683
|
"animateTransform",
|
|
4677
4684
|
{
|
|
4678
4685
|
attributeName: "transform",
|
|
@@ -4682,17 +4689,17 @@ const qi = ({
|
|
|
4682
4689
|
begin: `${120 * t}ms`,
|
|
4683
4690
|
repeatCount: "indefinite"
|
|
4684
4691
|
}
|
|
4685
|
-
) }),
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
]),
|
|
4692
|
+
) }), bo = /* @__PURE__ */ new Set([
|
|
4693
|
+
qe.Thinking,
|
|
4694
|
+
qe.Generating,
|
|
4695
|
+
qe.ExternalSources
|
|
4696
|
+
]), vo = ({ threadList: e }) => {
|
|
4690
4697
|
var x, w;
|
|
4691
|
-
const { channel: t, channelConfig: n, thread: a } = fe(), { client: r } =
|
|
4692
|
-
if (!e && o &&
|
|
4693
|
-
const p =
|
|
4698
|
+
const { channel: t, channelConfig: n, thread: a } = fe(), { client: r } = Te(), { typing: i = {} } = Dn(), { aiState: l } = On(t), o = _e(Ys);
|
|
4699
|
+
if (!e && o && bo.has(l)) {
|
|
4700
|
+
const p = xo(t, (x = r.user) == null ? void 0 : x.id);
|
|
4694
4701
|
return /* @__PURE__ */ s(
|
|
4695
|
-
|
|
4702
|
+
is,
|
|
4696
4703
|
{
|
|
4697
4704
|
avatarId: (p == null ? void 0 : p.id) ?? "ai-agent",
|
|
4698
4705
|
avatarName: (p == null ? void 0 : p.name) ?? (p == null ? void 0 : p.id) ?? "Agent",
|
|
@@ -4718,7 +4725,7 @@ const qi = ({
|
|
|
4718
4725
|
return null;
|
|
4719
4726
|
const g = (w = u[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4720
4727
|
return /* @__PURE__ */ s(
|
|
4721
|
-
|
|
4728
|
+
is,
|
|
4722
4729
|
{
|
|
4723
4730
|
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4724
4731
|
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
@@ -4726,7 +4733,7 @@ const qi = ({
|
|
|
4726
4733
|
testId: "typing-indicator"
|
|
4727
4734
|
}
|
|
4728
4735
|
);
|
|
4729
|
-
},
|
|
4736
|
+
}, is = ({
|
|
4730
4737
|
avatarId: e,
|
|
4731
4738
|
avatarName: t,
|
|
4732
4739
|
avatarImage: n,
|
|
@@ -4761,16 +4768,16 @@ const qi = ({
|
|
|
4761
4768
|
height: "13",
|
|
4762
4769
|
overflow: "visible",
|
|
4763
4770
|
children: [
|
|
4764
|
-
/* @__PURE__ */ s(
|
|
4765
|
-
/* @__PURE__ */ s(
|
|
4766
|
-
/* @__PURE__ */ s(
|
|
4771
|
+
/* @__PURE__ */ s(et, { cx: "4", index: 0 }),
|
|
4772
|
+
/* @__PURE__ */ s(et, { cx: "16", index: 1 }),
|
|
4773
|
+
/* @__PURE__ */ s(et, { cx: "28", index: 2 })
|
|
4767
4774
|
]
|
|
4768
4775
|
}
|
|
4769
4776
|
) }) }) }) }) })
|
|
4770
4777
|
] })
|
|
4771
4778
|
}
|
|
4772
4779
|
);
|
|
4773
|
-
function
|
|
4780
|
+
function xo(e, t) {
|
|
4774
4781
|
var a;
|
|
4775
4782
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4776
4783
|
for (const r of Object.values(n)) {
|
|
@@ -4779,7 +4786,7 @@ function bo(e, t) {
|
|
|
4779
4786
|
return i;
|
|
4780
4787
|
}
|
|
4781
4788
|
}
|
|
4782
|
-
const
|
|
4789
|
+
const wo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
4783
4790
|
"div",
|
|
4784
4791
|
{
|
|
4785
4792
|
className: k("flex items-center justify-center h-full", e),
|
|
@@ -4823,11 +4830,11 @@ const vo = () => null, xo = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
|
4823
4830
|
]
|
|
4824
4831
|
}
|
|
4825
4832
|
), je = F.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
|
|
4826
|
-
/* @__PURE__ */ s(
|
|
4833
|
+
/* @__PURE__ */ s(_o, { className: "w-6 h-6" }),
|
|
4827
4834
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4828
4835
|
] }) }));
|
|
4829
4836
|
je.displayName = "LoadingState";
|
|
4830
|
-
const
|
|
4837
|
+
const yo = ({
|
|
4831
4838
|
onBack: e,
|
|
4832
4839
|
showBackButton: t,
|
|
4833
4840
|
renderMessageInputActions: n,
|
|
@@ -4850,31 +4857,31 @@ const wo = ({
|
|
|
4850
4857
|
renderChannelActions: N,
|
|
4851
4858
|
renderMessage: _,
|
|
4852
4859
|
viewerLanguage: A,
|
|
4853
|
-
showChannelInfo:
|
|
4854
|
-
onParticipantNameClick:
|
|
4860
|
+
showChannelInfo: R = !0,
|
|
4861
|
+
onParticipantNameClick: L,
|
|
4855
4862
|
onBroadcastClick: D,
|
|
4856
4863
|
resolveBroadcastName: $,
|
|
4857
|
-
composerInput:
|
|
4864
|
+
composerInput: O
|
|
4858
4865
|
}) => {
|
|
4859
|
-
const { channel: C, messages:
|
|
4866
|
+
const { channel: C, messages: P } = fe(), S = H(D);
|
|
4860
4867
|
Y(() => {
|
|
4861
4868
|
S.current = D;
|
|
4862
4869
|
}, [D]);
|
|
4863
4870
|
const T = q((G) => {
|
|
4864
4871
|
var y;
|
|
4865
4872
|
(y = S.current) == null || y.call(S, G);
|
|
4866
|
-
}, []), E = D ? T : void 0, B =
|
|
4867
|
-
|
|
4873
|
+
}, []), E = D ? T : void 0, B = oi(
|
|
4874
|
+
P,
|
|
4868
4875
|
$
|
|
4869
4876
|
), z = C.state.messages.some(
|
|
4870
4877
|
(G) => G.type !== "deleted"
|
|
4871
4878
|
), j = v ? /* @__PURE__ */ s(F.Fragment, { children: v() }, "lt-channel-banner") : null, K = /* @__PURE__ */ s(
|
|
4872
|
-
|
|
4879
|
+
La,
|
|
4873
4880
|
{
|
|
4874
4881
|
className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
|
|
4875
4882
|
onBack: e,
|
|
4876
4883
|
showBackButton: t,
|
|
4877
|
-
showChannelInfo:
|
|
4884
|
+
showChannelInfo: R,
|
|
4878
4885
|
showStarButton: w,
|
|
4879
4886
|
onLeaveConversation: i,
|
|
4880
4887
|
onBlockParticipant: l,
|
|
@@ -4886,12 +4893,12 @@ const wo = ({
|
|
|
4886
4893
|
onReportParticipantClick: h,
|
|
4887
4894
|
customChannelActions: b,
|
|
4888
4895
|
renderChannelActions: N,
|
|
4889
|
-
onParticipantNameClick:
|
|
4896
|
+
onParticipantNameClick: L
|
|
4890
4897
|
}
|
|
4891
4898
|
), se = q(
|
|
4892
4899
|
(G) => {
|
|
4893
4900
|
const { message: y } = ge("ChannelView"), I = /* @__PURE__ */ s(
|
|
4894
|
-
|
|
4901
|
+
Qi,
|
|
4895
4902
|
{
|
|
4896
4903
|
...G,
|
|
4897
4904
|
chatbotVotingEnabled: p,
|
|
@@ -4903,16 +4910,16 @@ const wo = ({
|
|
|
4903
4910
|
},
|
|
4904
4911
|
[p, E, _, A]
|
|
4905
4912
|
);
|
|
4906
|
-
return /* @__PURE__ */ s(
|
|
4907
|
-
|
|
4913
|
+
return /* @__PURE__ */ s(Bs.Provider, { value: B, children: /* @__PURE__ */ s(
|
|
4914
|
+
zn,
|
|
4908
4915
|
{
|
|
4909
4916
|
overrides: {
|
|
4910
4917
|
Message: se,
|
|
4911
|
-
MessageActions:
|
|
4918
|
+
MessageActions: so,
|
|
4912
4919
|
UnreadMessagesNotification: () => null,
|
|
4913
4920
|
UnreadMessagesSeparator: () => null
|
|
4914
4921
|
},
|
|
4915
|
-
children: /* @__PURE__ */ s(
|
|
4922
|
+
children: /* @__PURE__ */ s(Bn, { children: O ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
|
|
4916
4923
|
/* @__PURE__ */ f(
|
|
4917
4924
|
"div",
|
|
4918
4925
|
{
|
|
@@ -4923,7 +4930,7 @@ const wo = ({
|
|
|
4923
4930
|
j
|
|
4924
4931
|
] }) }),
|
|
4925
4932
|
/* @__PURE__ */ s(
|
|
4926
|
-
|
|
4933
|
+
Yt,
|
|
4927
4934
|
{
|
|
4928
4935
|
head: z ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4929
4936
|
K,
|
|
@@ -4938,7 +4945,7 @@ const wo = ({
|
|
|
4938
4945
|
"lt-channel-message-list"
|
|
4939
4946
|
),
|
|
4940
4947
|
/* @__PURE__ */ s(
|
|
4941
|
-
|
|
4948
|
+
rs,
|
|
4942
4949
|
{
|
|
4943
4950
|
...n && {
|
|
4944
4951
|
renderActions: () => n == null ? void 0 : n(C)
|
|
@@ -4949,7 +4956,7 @@ const wo = ({
|
|
|
4949
4956
|
renderFooter: () => a == null ? void 0 : a(C),
|
|
4950
4957
|
disabled: c,
|
|
4951
4958
|
disabledReason: x,
|
|
4952
|
-
composerInput:
|
|
4959
|
+
composerInput: O
|
|
4953
4960
|
},
|
|
4954
4961
|
"lt-channel-message-input"
|
|
4955
4962
|
)
|
|
@@ -4964,7 +4971,7 @@ const wo = ({
|
|
|
4964
4971
|
j
|
|
4965
4972
|
] }) }),
|
|
4966
4973
|
/* @__PURE__ */ s(
|
|
4967
|
-
|
|
4974
|
+
Yt,
|
|
4968
4975
|
{
|
|
4969
4976
|
head: z ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4970
4977
|
K,
|
|
@@ -4980,7 +4987,7 @@ const wo = ({
|
|
|
4980
4987
|
),
|
|
4981
4988
|
r ? /* @__PURE__ */ s(F.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
|
|
4982
4989
|
/* @__PURE__ */ s(
|
|
4983
|
-
|
|
4990
|
+
rs,
|
|
4984
4991
|
{
|
|
4985
4992
|
...n && {
|
|
4986
4993
|
renderActions: () => n == null ? void 0 : n(C)
|
|
@@ -4988,14 +4995,14 @@ const wo = ({
|
|
|
4988
4995
|
renderFooter: () => a == null ? void 0 : a(C),
|
|
4989
4996
|
disabled: c,
|
|
4990
4997
|
disabledReason: x,
|
|
4991
|
-
composerInput:
|
|
4998
|
+
composerInput: O
|
|
4992
4999
|
},
|
|
4993
5000
|
"lt-channel-message-input"
|
|
4994
5001
|
)
|
|
4995
5002
|
] }) })
|
|
4996
5003
|
}
|
|
4997
5004
|
) });
|
|
4998
|
-
},
|
|
5005
|
+
}, Ws = F.memo(
|
|
4999
5006
|
({
|
|
5000
5007
|
channel: e,
|
|
5001
5008
|
onBack: t,
|
|
@@ -5006,7 +5013,7 @@ const wo = ({
|
|
|
5006
5013
|
onLeaveConversation: l,
|
|
5007
5014
|
onBlockParticipant: o,
|
|
5008
5015
|
className: d,
|
|
5009
|
-
CustomChannelEmptyState: m =
|
|
5016
|
+
CustomChannelEmptyState: m = wo,
|
|
5010
5017
|
showDeleteConversation: h = !0,
|
|
5011
5018
|
onDeleteConversationClick: u,
|
|
5012
5019
|
onBlockParticipantClick: g,
|
|
@@ -5019,13 +5026,13 @@ const wo = ({
|
|
|
5019
5026
|
messageMetadata: N,
|
|
5020
5027
|
onMessageSent: _,
|
|
5021
5028
|
showStarButton: A = !1,
|
|
5022
|
-
chatbotVotingEnabled:
|
|
5023
|
-
renderChannelBanner:
|
|
5029
|
+
chatbotVotingEnabled: R = !1,
|
|
5030
|
+
renderChannelBanner: L,
|
|
5024
5031
|
customChannelActions: D,
|
|
5025
5032
|
renderChannelActions: $,
|
|
5026
|
-
renderMessage:
|
|
5033
|
+
renderMessage: O,
|
|
5027
5034
|
onMessageLinkClick: C,
|
|
5028
|
-
sendButton:
|
|
5035
|
+
sendButton: P,
|
|
5029
5036
|
attachmentPreviewList: S,
|
|
5030
5037
|
viewerLanguage: T,
|
|
5031
5038
|
showChannelInfo: E = !0,
|
|
@@ -5073,20 +5080,20 @@ const wo = ({
|
|
|
5073
5080
|
"messaging-channel-view h-full flex flex-col",
|
|
5074
5081
|
d
|
|
5075
5082
|
),
|
|
5076
|
-
children: /* @__PURE__ */ s(
|
|
5077
|
-
|
|
5083
|
+
children: /* @__PURE__ */ s(Ys.Provider, { value: b ?? !1, children: /* @__PURE__ */ s(
|
|
5084
|
+
Pn,
|
|
5078
5085
|
{
|
|
5079
5086
|
channel: e,
|
|
5080
|
-
MessageSystem:
|
|
5087
|
+
MessageSystem: po,
|
|
5081
5088
|
EmptyStateIndicator: m,
|
|
5082
5089
|
LoadingIndicator: je,
|
|
5083
|
-
DateSeparator:
|
|
5084
|
-
TypingIndicator:
|
|
5090
|
+
DateSeparator: Ma,
|
|
5091
|
+
TypingIndicator: vo,
|
|
5085
5092
|
doSendMessageRequest: se,
|
|
5086
|
-
...
|
|
5093
|
+
...P ? { SendButton: P } : {},
|
|
5087
5094
|
...S ? { AttachmentPreviewList: S } : {},
|
|
5088
5095
|
children: /* @__PURE__ */ s(
|
|
5089
|
-
|
|
5096
|
+
yo,
|
|
5090
5097
|
{
|
|
5091
5098
|
onBack: t,
|
|
5092
5099
|
showBackButton: n,
|
|
@@ -5105,11 +5112,11 @@ const wo = ({
|
|
|
5105
5112
|
composerDisabled: p,
|
|
5106
5113
|
composerDisabledReason: v,
|
|
5107
5114
|
showStarButton: A,
|
|
5108
|
-
chatbotVotingEnabled:
|
|
5109
|
-
renderChannelBanner:
|
|
5115
|
+
chatbotVotingEnabled: R,
|
|
5116
|
+
renderChannelBanner: L,
|
|
5110
5117
|
customChannelActions: D,
|
|
5111
5118
|
renderChannelActions: $,
|
|
5112
|
-
renderMessage:
|
|
5119
|
+
renderMessage: O,
|
|
5113
5120
|
viewerLanguage: T,
|
|
5114
5121
|
showChannelInfo: E,
|
|
5115
5122
|
onParticipantNameClick: B,
|
|
@@ -5124,7 +5131,7 @@ const wo = ({
|
|
|
5124
5131
|
);
|
|
5125
5132
|
}
|
|
5126
5133
|
);
|
|
5127
|
-
|
|
5134
|
+
Ws.displayName = "ChannelView";
|
|
5128
5135
|
const Ce = F.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
|
|
5129
5136
|
/* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
5130
5137
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -5140,7 +5147,7 @@ const Ce = F.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
5140
5147
|
)
|
|
5141
5148
|
] }) }));
|
|
5142
5149
|
Ce.displayName = "ErrorState";
|
|
5143
|
-
const
|
|
5150
|
+
const il = ({
|
|
5144
5151
|
capabilities: e = {},
|
|
5145
5152
|
renderMessageInputActions: t,
|
|
5146
5153
|
renderConversationFooter: n,
|
|
@@ -5163,18 +5170,18 @@ const Wo = ({
|
|
|
5163
5170
|
resolveBroadcastName: N,
|
|
5164
5171
|
renderMessage: _,
|
|
5165
5172
|
onMessageLinkClick: A,
|
|
5166
|
-
showChannelInfo:
|
|
5167
|
-
composerInput:
|
|
5173
|
+
showChannelInfo: R,
|
|
5174
|
+
composerInput: L
|
|
5168
5175
|
}) => {
|
|
5169
5176
|
const {
|
|
5170
5177
|
client: D,
|
|
5171
5178
|
isConnected: $,
|
|
5172
|
-
isLoading:
|
|
5179
|
+
isLoading: O,
|
|
5173
5180
|
error: C,
|
|
5174
|
-
refreshConnection:
|
|
5181
|
+
refreshConnection: P,
|
|
5175
5182
|
service: S,
|
|
5176
5183
|
debug: T
|
|
5177
|
-
} =
|
|
5184
|
+
} = _a(), [E, B] = U(null), [z, j] = U(null), [K, se] = U(!1), { showDeleteConversation: G = !0 } = e, y = H(l);
|
|
5178
5185
|
y.current = l;
|
|
5179
5186
|
const I = H(a);
|
|
5180
5187
|
I.current = a;
|
|
@@ -5192,7 +5199,7 @@ const Wo = ({
|
|
|
5192
5199
|
W.current === V && (W.current = null);
|
|
5193
5200
|
};
|
|
5194
5201
|
(async () => {
|
|
5195
|
-
var
|
|
5202
|
+
var Oe, Pe;
|
|
5196
5203
|
try {
|
|
5197
5204
|
T && console.log(
|
|
5198
5205
|
"[MessagingShell] Loading initial conversation with:",
|
|
@@ -5207,14 +5214,14 @@ const Wo = ({
|
|
|
5207
5214
|
{ limit: 1 }
|
|
5208
5215
|
);
|
|
5209
5216
|
if (oe.length > 0) {
|
|
5210
|
-
B(oe[0]), j(null), (
|
|
5217
|
+
B(oe[0]), j(null), (Oe = I.current) == null || Oe.call(I, oe[0]), T && console.log(
|
|
5211
5218
|
"[MessagingShell] Initial conversation loaded:",
|
|
5212
5219
|
oe[0].id
|
|
5213
5220
|
);
|
|
5214
5221
|
return;
|
|
5215
5222
|
}
|
|
5216
|
-
const
|
|
5217
|
-
if (!
|
|
5223
|
+
const me = y.current;
|
|
5224
|
+
if (!me || !S) {
|
|
5218
5225
|
ee(), j("No conversation found with this account"), T && console.log(
|
|
5219
5226
|
"[MessagingShell] No conversation found for:",
|
|
5220
5227
|
i
|
|
@@ -5223,11 +5230,11 @@ const Wo = ({
|
|
|
5223
5230
|
}
|
|
5224
5231
|
try {
|
|
5225
5232
|
const le = await S.startChannelWithParticipant({
|
|
5226
|
-
id:
|
|
5227
|
-
name:
|
|
5228
|
-
phone:
|
|
5233
|
+
id: me.id,
|
|
5234
|
+
name: me.name,
|
|
5235
|
+
phone: me.phone
|
|
5229
5236
|
});
|
|
5230
|
-
B(le), j(null), (
|
|
5237
|
+
B(le), j(null), (Pe = I.current) == null || Pe.call(I, le), T && console.log(
|
|
5231
5238
|
"[MessagingShell] Channel created and loaded:",
|
|
5232
5239
|
le.id
|
|
5233
5240
|
);
|
|
@@ -5251,14 +5258,14 @@ const Wo = ({
|
|
|
5251
5258
|
var Z;
|
|
5252
5259
|
B(null), se(!0), (Z = X.current) == null || Z.call(X);
|
|
5253
5260
|
}, []);
|
|
5254
|
-
return
|
|
5261
|
+
return O ? /* @__PURE__ */ s(je, {}) : C ? /* @__PURE__ */ s(Ce, { message: C, onBack: P }) : !$ || !D ? /* @__PURE__ */ s(
|
|
5255
5262
|
Ce,
|
|
5256
5263
|
{
|
|
5257
5264
|
message: "Not connected to messaging service",
|
|
5258
|
-
onBack:
|
|
5265
|
+
onBack: P
|
|
5259
5266
|
}
|
|
5260
5267
|
) : z ? /* @__PURE__ */ s(Ce, { message: z }) : K && !E ? /* @__PURE__ */ s(Ce, { message: "Conversation ended" }) : E ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
5261
|
-
|
|
5268
|
+
Ws,
|
|
5262
5269
|
{
|
|
5263
5270
|
channel: E,
|
|
5264
5271
|
renderMessageInputActions: t,
|
|
@@ -5281,19 +5288,19 @@ const Wo = ({
|
|
|
5281
5288
|
resolveBroadcastName: N,
|
|
5282
5289
|
renderMessage: _,
|
|
5283
5290
|
onMessageLinkClick: A,
|
|
5284
|
-
showChannelInfo:
|
|
5285
|
-
composerInput:
|
|
5291
|
+
showChannelInfo: R,
|
|
5292
|
+
composerInput: L
|
|
5286
5293
|
},
|
|
5287
5294
|
E.id
|
|
5288
5295
|
) }) }) : /* @__PURE__ */ s(je, {});
|
|
5289
5296
|
};
|
|
5290
|
-
function
|
|
5297
|
+
function No(e) {
|
|
5291
5298
|
const t = e.state.pending_messages;
|
|
5292
5299
|
if (t != null && t.length)
|
|
5293
5300
|
for (const n of t)
|
|
5294
5301
|
e.state.addMessageSorted(n.message);
|
|
5295
5302
|
}
|
|
5296
|
-
const
|
|
5303
|
+
const qs = F.createContext({
|
|
5297
5304
|
selectedChannel: void 0,
|
|
5298
5305
|
onChannelSelect: () => {
|
|
5299
5306
|
},
|
|
@@ -5301,14 +5308,14 @@ const Ws = F.createContext({
|
|
|
5301
5308
|
renderMessagePreview: void 0,
|
|
5302
5309
|
channelPreview: void 0,
|
|
5303
5310
|
viewerLanguage: void 0
|
|
5304
|
-
}),
|
|
5311
|
+
}), ko = qs.Provider, Co = () => F.useContext(qs), So = (e, t) => {
|
|
5305
5312
|
const n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
5306
5313
|
return Math.floor((a - n) / (1e3 * 60 * 60 * 24));
|
|
5307
|
-
},
|
|
5314
|
+
}, Eo = (e) => {
|
|
5308
5315
|
const t = /* @__PURE__ */ new Date();
|
|
5309
5316
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
5310
5317
|
return "Just now";
|
|
5311
|
-
const a =
|
|
5318
|
+
const a = So(e, t);
|
|
5312
5319
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
5313
5320
|
hour: "numeric",
|
|
5314
5321
|
minute: "2-digit",
|
|
@@ -5321,9 +5328,9 @@ const Ws = F.createContext({
|
|
|
5321
5328
|
day: "numeric",
|
|
5322
5329
|
year: "numeric"
|
|
5323
5330
|
});
|
|
5324
|
-
},
|
|
5331
|
+
}, Xs = F.memo(
|
|
5325
5332
|
(e) => {
|
|
5326
|
-
var D, $,
|
|
5333
|
+
var D, $, O;
|
|
5327
5334
|
const { channel: t, unread: n } = e, {
|
|
5328
5335
|
selectedChannel: a,
|
|
5329
5336
|
onChannelSelect: r,
|
|
@@ -5331,7 +5338,7 @@ const Ws = F.createContext({
|
|
|
5331
5338
|
channelPreview: l,
|
|
5332
5339
|
renderMessagePreview: o,
|
|
5333
5340
|
viewerLanguage: d
|
|
5334
|
-
} =
|
|
5341
|
+
} = Co(), { client: m } = Te(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), u = gs(t);
|
|
5335
5342
|
if (l)
|
|
5336
5343
|
return /* @__PURE__ */ s(
|
|
5337
5344
|
l,
|
|
@@ -5346,30 +5353,30 @@ const Ws = F.createContext({
|
|
|
5346
5353
|
const g = () => {
|
|
5347
5354
|
t && r(t);
|
|
5348
5355
|
}, c = (C) => {
|
|
5349
|
-
const
|
|
5350
|
-
!
|
|
5351
|
-
}, x =
|
|
5356
|
+
const P = C.key === "Enter" || C.key === " ", S = C.repeat;
|
|
5357
|
+
!P || S || (C.preventDefault(), g());
|
|
5358
|
+
}, x = ps(
|
|
5352
5359
|
(D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
|
|
5353
5360
|
m == null ? void 0 : m.userID,
|
|
5354
5361
|
t == null ? void 0 : t.type
|
|
5355
|
-
), w =
|
|
5356
|
-
var
|
|
5357
|
-
const C = (
|
|
5362
|
+
), w = bs(x == null ? void 0 : x.user), p = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, v = (() => {
|
|
5363
|
+
var P;
|
|
5364
|
+
const C = (P = t == null ? void 0 : t.state) == null ? void 0 : P.messages;
|
|
5358
5365
|
if (C != null && C.length) {
|
|
5359
5366
|
for (let S = C.length - 1; S >= 0; S--)
|
|
5360
5367
|
if (C[S].type !== "system") return C[S];
|
|
5361
5368
|
}
|
|
5362
5369
|
})(), N = (() => {
|
|
5363
5370
|
var E;
|
|
5364
|
-
const C =
|
|
5371
|
+
const C = xs({
|
|
5365
5372
|
message: v,
|
|
5366
5373
|
viewerLanguage: d
|
|
5367
|
-
}), { custom_type:
|
|
5368
|
-
if (
|
|
5374
|
+
}), { custom_type: P, attachment_content_type: S } = (v == null ? void 0 : v.metadata) || {};
|
|
5375
|
+
if (P === ce.TIP)
|
|
5369
5376
|
return C || "Sent a tip";
|
|
5370
|
-
if (
|
|
5377
|
+
if (P === ce.PAID)
|
|
5371
5378
|
return C || "Sent a message";
|
|
5372
|
-
if (
|
|
5379
|
+
if (P === ce.ATTACHMENT) {
|
|
5373
5380
|
if (S === "text")
|
|
5374
5381
|
return "🔒 Sent a locked message";
|
|
5375
5382
|
if (S === "media")
|
|
@@ -5378,12 +5385,12 @@ const Ws = F.createContext({
|
|
|
5378
5385
|
if (C) return C;
|
|
5379
5386
|
const T = (E = v == null ? void 0 : v.attachments) == null ? void 0 : E[0];
|
|
5380
5387
|
return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5381
|
-
})(), _ = v != null && v.created_at ?
|
|
5388
|
+
})(), _ = v != null && v.created_at ? Eo(new Date(v.created_at)) : "", A = v ? $e(v) : !1, R = o ? o(v, N) : `${A ? "✨ " : ""}${N}`, L = n ?? 0;
|
|
5382
5389
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5383
5390
|
channelId: t == null ? void 0 : t.id,
|
|
5384
5391
|
isSelected: h,
|
|
5385
5392
|
participantName: w,
|
|
5386
|
-
unreadCount:
|
|
5393
|
+
unreadCount: L,
|
|
5387
5394
|
hasTimestamp: !!_
|
|
5388
5395
|
}), /* @__PURE__ */ s(
|
|
5389
5396
|
"div",
|
|
@@ -5404,7 +5411,7 @@ const Ws = F.createContext({
|
|
|
5404
5411
|
/* @__PURE__ */ s(
|
|
5405
5412
|
ye,
|
|
5406
5413
|
{
|
|
5407
|
-
id: ((
|
|
5414
|
+
id: ((O = x == null ? void 0 : x.user) == null ? void 0 : O.id) || t.id || "unknown",
|
|
5408
5415
|
name: w,
|
|
5409
5416
|
image: p,
|
|
5410
5417
|
size: 48,
|
|
@@ -5428,8 +5435,8 @@ const Ws = F.createContext({
|
|
|
5428
5435
|
_ && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: _ })
|
|
5429
5436
|
] }),
|
|
5430
5437
|
/* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
5431
|
-
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
5432
|
-
|
|
5438
|
+
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: R }),
|
|
5439
|
+
L > 0 && /* @__PURE__ */ s("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: L > 99 ? "99+" : L })
|
|
5433
5440
|
] })
|
|
5434
5441
|
] })
|
|
5435
5442
|
] })
|
|
@@ -5437,18 +5444,18 @@ const Ws = F.createContext({
|
|
|
5437
5444
|
);
|
|
5438
5445
|
}
|
|
5439
5446
|
);
|
|
5440
|
-
|
|
5441
|
-
const
|
|
5447
|
+
Xs.displayName = "CustomChannelPreview";
|
|
5448
|
+
const Io = { last_message_at: -1 }, To = F.memo(
|
|
5442
5449
|
({
|
|
5443
5450
|
onChannelSelect: e,
|
|
5444
5451
|
selectedChannel: t,
|
|
5445
5452
|
filters: n,
|
|
5446
5453
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5447
5454
|
channelRenderFilterFn: r,
|
|
5448
|
-
sort: i =
|
|
5455
|
+
sort: i = Io,
|
|
5449
5456
|
className: l,
|
|
5450
5457
|
customEmptyStateIndicator: o,
|
|
5451
|
-
channelListPaginator: d =
|
|
5458
|
+
channelListPaginator: d = $n,
|
|
5452
5459
|
channelPreview: m,
|
|
5453
5460
|
renderMessagePreview: h,
|
|
5454
5461
|
viewerLanguage: u,
|
|
@@ -5461,11 +5468,11 @@ const So = { last_message_at: -1 }, Eo = F.memo(
|
|
|
5461
5468
|
}) => {
|
|
5462
5469
|
const b = F.useRef(0);
|
|
5463
5470
|
b.current++;
|
|
5464
|
-
const { debug: N = !1 } =
|
|
5465
|
-
(
|
|
5466
|
-
for (const
|
|
5467
|
-
|
|
5468
|
-
return r ? r(
|
|
5471
|
+
const { debug: N = !1 } = ct(), _ = F.useCallback(
|
|
5472
|
+
(R) => {
|
|
5473
|
+
for (const L of R)
|
|
5474
|
+
No(L);
|
|
5475
|
+
return r ? r(R) : R;
|
|
5469
5476
|
},
|
|
5470
5477
|
[r]
|
|
5471
5478
|
);
|
|
@@ -5499,8 +5506,8 @@ const So = { last_message_at: -1 }, Eo = F.memo(
|
|
|
5499
5506
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5500
5507
|
l
|
|
5501
5508
|
),
|
|
5502
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5503
|
-
|
|
5509
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(ko, { value: A, children: /* @__PURE__ */ s(
|
|
5510
|
+
Fn,
|
|
5504
5511
|
{
|
|
5505
5512
|
filters: n,
|
|
5506
5513
|
sort: i,
|
|
@@ -5514,7 +5521,7 @@ const So = { last_message_at: -1 }, Eo = F.memo(
|
|
|
5514
5521
|
onAddedToChannel: p,
|
|
5515
5522
|
onChannelUpdated: v,
|
|
5516
5523
|
Paginator: d,
|
|
5517
|
-
Preview:
|
|
5524
|
+
Preview: Xs,
|
|
5518
5525
|
EmptyStateIndicator: o
|
|
5519
5526
|
},
|
|
5520
5527
|
`${JSON.stringify(n)}:${JSON.stringify(i)}`
|
|
@@ -5523,11 +5530,190 @@ const So = { last_message_at: -1 }, Eo = F.memo(
|
|
|
5523
5530
|
);
|
|
5524
5531
|
}
|
|
5525
5532
|
);
|
|
5526
|
-
|
|
5527
|
-
const
|
|
5533
|
+
To.displayName = "ChannelList";
|
|
5534
|
+
const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", Ro = "text-[12px] leading-4 tracking-[0.24px]", Lo = ({ surface: e, actions: t }) => {
|
|
5535
|
+
if (t == null || t.length === 0) return null;
|
|
5536
|
+
const n = (t[0].variant ?? "primary") === "secondary";
|
|
5537
|
+
return /* @__PURE__ */ s(
|
|
5538
|
+
"div",
|
|
5539
|
+
{
|
|
5540
|
+
className: k(
|
|
5541
|
+
"mt-3 flex gap-2",
|
|
5542
|
+
n ? "flex-row flex-wrap" : "flex-col"
|
|
5543
|
+
),
|
|
5544
|
+
children: t.map((a, r) => /* @__PURE__ */ s(
|
|
5545
|
+
js,
|
|
5546
|
+
{
|
|
5547
|
+
variant: e,
|
|
5548
|
+
cta: a,
|
|
5549
|
+
fullWidth: !n,
|
|
5550
|
+
standalone: !0
|
|
5551
|
+
},
|
|
5552
|
+
`${a.label}-${r}`
|
|
5553
|
+
))
|
|
5554
|
+
}
|
|
5555
|
+
);
|
|
5556
|
+
}, Mo = ({
|
|
5557
|
+
ctaSurface: e,
|
|
5558
|
+
chinTextColor: t,
|
|
5559
|
+
title: n,
|
|
5560
|
+
subtitle: a,
|
|
5561
|
+
subtitleLines: r = 3,
|
|
5562
|
+
appIcon: i,
|
|
5563
|
+
actions: l
|
|
5564
|
+
}) => {
|
|
5565
|
+
const o = n != null && n.trim() !== "", d = a != null && a.trim() !== "", m = l != null && l.length > 0;
|
|
5566
|
+
if (!o && !d && !m) return null;
|
|
5567
|
+
const h = { color: t }, u = r > 1 ? {
|
|
5568
|
+
...h,
|
|
5569
|
+
display: "-webkit-box",
|
|
5570
|
+
WebkitBoxOrient: "vertical",
|
|
5571
|
+
WebkitLineClamp: r,
|
|
5572
|
+
overflow: "hidden"
|
|
5573
|
+
} : h;
|
|
5574
|
+
return /* @__PURE__ */ f("div", { className: "shrink-0 px-4 py-3", children: [
|
|
5575
|
+
/* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
|
|
5576
|
+
o && /* @__PURE__ */ f("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
5577
|
+
i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
|
|
5578
|
+
/* @__PURE__ */ s("p", { className: k("min-w-0", Ao), style: h, children: n })
|
|
5579
|
+
] }),
|
|
5580
|
+
d && /* @__PURE__ */ s(
|
|
5581
|
+
"p",
|
|
5582
|
+
{
|
|
5583
|
+
className: k(
|
|
5584
|
+
Ro,
|
|
5585
|
+
r <= 1 && "truncate"
|
|
5586
|
+
),
|
|
5587
|
+
style: u,
|
|
5588
|
+
children: a
|
|
5589
|
+
}
|
|
5590
|
+
)
|
|
5591
|
+
] }),
|
|
5592
|
+
/* @__PURE__ */ s(Lo, { surface: e, actions: l })
|
|
5593
|
+
] });
|
|
5594
|
+
}, Do = {
|
|
5595
|
+
dark: "bg-white/[0.06]",
|
|
5596
|
+
light: "bg-black/[0.04]"
|
|
5597
|
+
}, Oo = {
|
|
5598
|
+
2: [-6, 6],
|
|
5599
|
+
3: [-9, 0, 9]
|
|
5600
|
+
}, Po = {
|
|
5601
|
+
2: [-28, 28],
|
|
5602
|
+
3: [-52, 0, 52]
|
|
5603
|
+
}, zo = ({ variant: e, images: t, title: n }) => {
|
|
5604
|
+
const a = t.slice(0, 3), r = a.length >= 3 ? 3 : 2, i = Oo[r], l = Po[r];
|
|
5605
|
+
return /* @__PURE__ */ s(
|
|
5606
|
+
"div",
|
|
5607
|
+
{
|
|
5608
|
+
className: k(
|
|
5609
|
+
"relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
|
|
5610
|
+
Do[e]
|
|
5611
|
+
),
|
|
5612
|
+
children: a.map((o, d) => /* @__PURE__ */ s(
|
|
5613
|
+
"img",
|
|
5614
|
+
{
|
|
5615
|
+
src: de(o) ?? o,
|
|
5616
|
+
alt: d === 0 ? n ?? "" : "",
|
|
5617
|
+
"aria-hidden": d !== 0,
|
|
5618
|
+
draggable: !1,
|
|
5619
|
+
loading: "lazy",
|
|
5620
|
+
decoding: "async",
|
|
5621
|
+
className: "absolute h-[68%] w-[52%] rounded-xl object-cover shadow-lg ring-1 ring-black/10",
|
|
5622
|
+
style: {
|
|
5623
|
+
transform: `translateX(${l[d]}px) rotate(${i[d]}deg)`,
|
|
5624
|
+
zIndex: d
|
|
5625
|
+
}
|
|
5626
|
+
},
|
|
5627
|
+
`${o}-${d}`
|
|
5628
|
+
))
|
|
5629
|
+
}
|
|
5630
|
+
);
|
|
5631
|
+
}, Bo = ({
|
|
5632
|
+
variant: e,
|
|
5633
|
+
presentation: t,
|
|
5634
|
+
images: n,
|
|
5635
|
+
title: a,
|
|
5636
|
+
heroUrl: r,
|
|
5637
|
+
onHeroError: i
|
|
5638
|
+
}) => t === "fan" ? /* @__PURE__ */ s(zo, { variant: e, images: n, title: a }) : /* @__PURE__ */ s(
|
|
5639
|
+
Ie,
|
|
5640
|
+
{
|
|
5641
|
+
variant: e,
|
|
5642
|
+
thumbnailUrl: r ?? n[0],
|
|
5643
|
+
title: a,
|
|
5644
|
+
mimeType: "image/*",
|
|
5645
|
+
onImageError: i
|
|
5646
|
+
}
|
|
5647
|
+
), Ks = ({
|
|
5648
|
+
variant: e,
|
|
5649
|
+
title: t,
|
|
5650
|
+
subtitle: n,
|
|
5651
|
+
subtitleLines: a,
|
|
5652
|
+
images: r = [],
|
|
5653
|
+
imagePresentation: i,
|
|
5654
|
+
actions: l,
|
|
5655
|
+
appIcon: o,
|
|
5656
|
+
accentColor: d,
|
|
5657
|
+
groupPosition: m = "single"
|
|
5658
|
+
}) => {
|
|
5659
|
+
const h = va({
|
|
5660
|
+
imagePresentation: i,
|
|
5661
|
+
images: r
|
|
5662
|
+
}), u = r.length > 0, g = u && h === "hero", c = He({
|
|
5663
|
+
variant: e,
|
|
5664
|
+
accentColor: d,
|
|
5665
|
+
layout: "featured",
|
|
5666
|
+
thumbnailUrl: g ? r[0] : void 0
|
|
5667
|
+
}), x = m === "single" || m === "end";
|
|
5668
|
+
return /* @__PURE__ */ s(
|
|
5669
|
+
St,
|
|
5670
|
+
{
|
|
5671
|
+
accentHex: c.accentHex,
|
|
5672
|
+
side: e === "dark" ? "sender" : "receiver",
|
|
5673
|
+
visible: x,
|
|
5674
|
+
children: /* @__PURE__ */ f(
|
|
5675
|
+
Ee,
|
|
5676
|
+
{
|
|
5677
|
+
variant: e,
|
|
5678
|
+
accentHex: c.accentHex,
|
|
5679
|
+
fixedHeight: u,
|
|
5680
|
+
"data-testid": "rich-card",
|
|
5681
|
+
children: [
|
|
5682
|
+
u && /* @__PURE__ */ s(
|
|
5683
|
+
Bo,
|
|
5684
|
+
{
|
|
5685
|
+
variant: e,
|
|
5686
|
+
presentation: h,
|
|
5687
|
+
images: r,
|
|
5688
|
+
title: t,
|
|
5689
|
+
heroUrl: g ? c.thumbnailUrl : void 0,
|
|
5690
|
+
onHeroError: c.onImageError
|
|
5691
|
+
}
|
|
5692
|
+
),
|
|
5693
|
+
/* @__PURE__ */ s(
|
|
5694
|
+
Mo,
|
|
5695
|
+
{
|
|
5696
|
+
ctaSurface: c.surface,
|
|
5697
|
+
chinTextColor: c.chinTextColor,
|
|
5698
|
+
title: t,
|
|
5699
|
+
subtitle: n,
|
|
5700
|
+
subtitleLines: a,
|
|
5701
|
+
appIcon: o,
|
|
5702
|
+
actions: l
|
|
5703
|
+
}
|
|
5704
|
+
)
|
|
5705
|
+
]
|
|
5706
|
+
}
|
|
5707
|
+
)
|
|
5708
|
+
}
|
|
5709
|
+
);
|
|
5710
|
+
}, Fo = (e) => /* @__PURE__ */ s(Ks, { ...e, variant: "dark" }), $o = (e) => /* @__PURE__ */ s(Ks, { ...e, variant: "light" }), ol = {
|
|
5711
|
+
Sent: Fo,
|
|
5712
|
+
Received: $o
|
|
5713
|
+
}, os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Uo = {
|
|
5528
5714
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5529
5715
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5530
|
-
},
|
|
5716
|
+
}, jo = ({ variant: e }) => /* @__PURE__ */ s(
|
|
5531
5717
|
"span",
|
|
5532
5718
|
{
|
|
5533
5719
|
"aria-hidden": "true",
|
|
@@ -5537,12 +5723,12 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5537
5723
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5538
5724
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5539
5725
|
transformOrigin: "center",
|
|
5540
|
-
backgroundColor:
|
|
5541
|
-
WebkitMask:
|
|
5542
|
-
mask:
|
|
5726
|
+
backgroundColor: Uo[e],
|
|
5727
|
+
WebkitMask: os,
|
|
5728
|
+
mask: os
|
|
5543
5729
|
}
|
|
5544
5730
|
}
|
|
5545
|
-
),
|
|
5731
|
+
), Vo = {
|
|
5546
5732
|
sent: {
|
|
5547
5733
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5548
5734
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5551,7 +5737,7 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5551
5737
|
backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
|
|
5552
5738
|
color: "var(--str-chat__message-bubble-color, #000000)"
|
|
5553
5739
|
}
|
|
5554
|
-
},
|
|
5740
|
+
}, Zs = ({
|
|
5555
5741
|
variant: e,
|
|
5556
5742
|
text: t,
|
|
5557
5743
|
tail: n = !0,
|
|
@@ -5567,23 +5753,23 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5567
5753
|
r
|
|
5568
5754
|
),
|
|
5569
5755
|
style: {
|
|
5570
|
-
...
|
|
5756
|
+
...Vo[e],
|
|
5571
5757
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5572
5758
|
isolation: "isolate"
|
|
5573
5759
|
},
|
|
5574
5760
|
children: [
|
|
5575
5761
|
a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5576
5762
|
/* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
|
|
5577
|
-
n && /* @__PURE__ */ s(
|
|
5763
|
+
n && /* @__PURE__ */ s(jo, { variant: e })
|
|
5578
5764
|
]
|
|
5579
5765
|
}
|
|
5580
|
-
),
|
|
5766
|
+
), Ho = ({
|
|
5581
5767
|
text: e,
|
|
5582
5768
|
tail: t,
|
|
5583
5769
|
header: n,
|
|
5584
5770
|
className: a
|
|
5585
5771
|
}) => /* @__PURE__ */ s(
|
|
5586
|
-
|
|
5772
|
+
Zs,
|
|
5587
5773
|
{
|
|
5588
5774
|
variant: "received",
|
|
5589
5775
|
text: e,
|
|
@@ -5591,10 +5777,10 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5591
5777
|
header: n,
|
|
5592
5778
|
className: a
|
|
5593
5779
|
}
|
|
5594
|
-
),
|
|
5595
|
-
Sent:
|
|
5596
|
-
Received:
|
|
5597
|
-
},
|
|
5780
|
+
), Go = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Zs, { variant: "sent", text: e, tail: t, className: n }), ll = {
|
|
5781
|
+
Sent: Go,
|
|
5782
|
+
Received: Ho
|
|
5783
|
+
}, Yo = ({
|
|
5598
5784
|
question: e,
|
|
5599
5785
|
onClick: t,
|
|
5600
5786
|
loading: n = !1,
|
|
@@ -5616,7 +5802,7 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5616
5802
|
),
|
|
5617
5803
|
children: e
|
|
5618
5804
|
}
|
|
5619
|
-
),
|
|
5805
|
+
), cl = ({
|
|
5620
5806
|
faqs: e,
|
|
5621
5807
|
onFaqClick: t,
|
|
5622
5808
|
loadingFaqId: n,
|
|
@@ -5625,7 +5811,7 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5625
5811
|
avatarImage: i,
|
|
5626
5812
|
avatarName: l
|
|
5627
5813
|
}) => {
|
|
5628
|
-
const o =
|
|
5814
|
+
const o = xa(e);
|
|
5629
5815
|
return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
|
|
5630
5816
|
(i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
|
|
5631
5817
|
ye,
|
|
@@ -5645,7 +5831,7 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5645
5831
|
children: [
|
|
5646
5832
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5647
5833
|
o.map((d) => /* @__PURE__ */ s(
|
|
5648
|
-
|
|
5834
|
+
Yo,
|
|
5649
5835
|
{
|
|
5650
5836
|
question: d.question,
|
|
5651
5837
|
onClick: () => t(d.id),
|
|
@@ -5659,42 +5845,43 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5659
5845
|
] }) });
|
|
5660
5846
|
};
|
|
5661
5847
|
export {
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5848
|
+
_s as A,
|
|
5849
|
+
ht as B,
|
|
5850
|
+
wo as C,
|
|
5851
|
+
bs as D,
|
|
5852
|
+
rl as E,
|
|
5853
|
+
cl as F,
|
|
5854
|
+
di as G,
|
|
5855
|
+
Oa as H,
|
|
5856
|
+
_a as I,
|
|
5857
|
+
ot as L,
|
|
5858
|
+
nl as M,
|
|
5859
|
+
ol as R,
|
|
5673
5860
|
Ne as a,
|
|
5674
5861
|
ye as b,
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5862
|
+
To as c,
|
|
5863
|
+
Ws as d,
|
|
5864
|
+
al as e,
|
|
5865
|
+
Yo as f,
|
|
5866
|
+
ue as g,
|
|
5867
|
+
Be as h,
|
|
5681
5868
|
ke as i,
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5869
|
+
ll as j,
|
|
5870
|
+
xi as k,
|
|
5871
|
+
sl as l,
|
|
5872
|
+
il as m,
|
|
5873
|
+
vr as n,
|
|
5874
|
+
de as o,
|
|
5875
|
+
gr as p,
|
|
5876
|
+
Eo as q,
|
|
5690
5877
|
we as r,
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5878
|
+
br as s,
|
|
5879
|
+
xs as t,
|
|
5880
|
+
ks as u,
|
|
5881
|
+
Na as v,
|
|
5882
|
+
lr as w,
|
|
5883
|
+
Pa as x,
|
|
5884
|
+
ps as y,
|
|
5885
|
+
mt as z
|
|
5699
5886
|
};
|
|
5700
|
-
//# sourceMappingURL=index-
|
|
5887
|
+
//# sourceMappingURL=index-BaeffiED.js.map
|