@linktr.ee/messaging-react 4.1.2 → 4.1.3
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-1LeQJY-E.cjs → Card-DKP7SMTp.cjs} +2 -2
- package/dist/{Card-1LeQJY-E.cjs.map → Card-DKP7SMTp.cjs.map} +1 -1
- package/dist/{Card-BXlNaNGk.js → Card-avnlyzrl.js} +2 -2
- package/dist/{Card-BXlNaNGk.js.map → Card-avnlyzrl.js.map} +1 -1
- package/dist/{index-yg1xEb2Y.cjs → index-Bq5DM1Lm.cjs} +3 -3
- package/dist/{index-yg1xEb2Y.cjs.map → index-Bq5DM1Lm.cjs.map} +1 -1
- package/dist/{index-C1cbPKI7.js → index-DFykbijs.js} +722 -761
- package/dist/{index-C1cbPKI7.js.map → index-DFykbijs.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/CustomMessage/StreamAttachmentMessage.tsx +21 -54
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as n, jsxs as f, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as cs, useChannelStateContext as we, useChatContext as He, DateSeparator as ds, useMessageContext as fe, MessageStatus as us, MessageErrorIcon as st, MessageText as
|
|
6
|
-
import { isOfficialChannel as hn, OFFICIAL_SENDER_USER_ID as Vs, MESSAGE_CUSTOM_TYPE as
|
|
1
|
+
import { jsx as n, jsxs as f, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import P, { createContext as je, useContext as xe, useCallback as K, useState as $, useRef as V, useEffect as W, useId as rs, Suspense as is, useMemo as oe } from "react";
|
|
3
|
+
import { StreamChatService as os } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as ls, LinkPreviewsManager as nt } from "stream-chat";
|
|
5
|
+
import { Chat as cs, useChannelStateContext as we, useChatContext as He, DateSeparator as ds, useMessageContext as fe, MessageStatus as us, MessageErrorIcon as st, MessageText as Fe, areMessageUIPropsEqual as ms, useMessageReminder as hs, useComponentContext as mn, Attachment as fs, EditMessageModal as gs, MessageBlocked as ps, MessageBouncePrompt as bs, MessageDeleted as vs, MessageIsThreadReplyInChannelButtonIndicator as xs, MessageRepliesCountButton as ws, ReminderNotification as _s, StreamedMessageText as ys, messageHasAttachments as Ns, messageHasReactions as ks, isDateSeparatorMessage as Cs, isMessageBlocked as Ss, isMessageBounced as Es, MessageBounceModal as Is, Poll as Ts, useMessageComposer as As, useStateStore as Rs, MessageInput as Vt, useMessageInputContext as Ls, useMessageComposerHasSendableData as Ms, AttachmentPreviewList as Ds, QuotedMessagePreview as Os, TextareaComposer as Ps, MessageTimestamp as Ke, AIStates as Xe, useTypingContext as Fs, useAIState as zs, Channel as $s, WithComponents as Bs, Window as Us, MessageList as Gt, ChannelList as js, InfiniteScroll as Hs } from "stream-chat-react";
|
|
6
|
+
import { isOfficialChannel as hn, OFFICIAL_SENDER_USER_ID as Vs, MESSAGE_CUSTOM_TYPE as le, isDmAgentSystemType as Yt, isAgeSafetySystemType as Gs, resolveRichCardImagePresentation as Ys, selectEnabledFaqs as Ws } from "@linktr.ee/messaging-taxonomy";
|
|
7
7
|
import N from "classnames";
|
|
8
|
-
import { StarIcon as at, DotsThreeIcon as
|
|
8
|
+
import { StarIcon as at, DotsThreeIcon as Ks, SpinnerGapIcon as Oe, SignOutIcon as Xs, ProhibitInsetIcon as Wt, FlagIcon as fn, CurrencyDollarIcon as qs, CaretRightIcon as gn, ArrowLeftIcon as Zs, FileIcon as pn, ImageIcon as Js, SpeakerHighIcon as Qs, VideoCameraIcon as bn, FileMdIcon as ea, FileTextIcon as ta, FileZipIcon as na, FilePptIcon as sa, FileCsvIcon as aa, FileXlsIcon as ra, FileDocIcon as ia, FilePdfIcon as oa, CircleNotchIcon as be, PlayIcon as rt, PauseIcon as la, LinkIcon as ca, DownloadSimpleIcon as Se, GiftIcon as da, WarningCircleIcon as ua, MegaphoneIcon as ma, ChecksIcon as ha, XIcon as ot, PencilSimpleIcon as fa, CaretLeftIcon as ga, TrashSimpleIcon as pa, ArrowUpIcon as ba, SparkleIcon as va, ProhibitIcon as xa } from "@phosphor-icons/react";
|
|
9
9
|
import { MessageActions as wa, DefaultDropdownActionButton as vn } from "stream-chat-react/experimental";
|
|
10
10
|
const xn = je({
|
|
11
11
|
service: null,
|
|
@@ -17,29 +17,29 @@ const xn = je({
|
|
|
17
17
|
refreshConnection: async () => {
|
|
18
18
|
},
|
|
19
19
|
debug: !1
|
|
20
|
-
}),
|
|
20
|
+
}), lt = () => xe(xn), nl = ({
|
|
21
21
|
children: e,
|
|
22
22
|
user: t,
|
|
23
23
|
serviceConfig: s,
|
|
24
24
|
apiKey: a,
|
|
25
25
|
capabilities: r = {},
|
|
26
26
|
debug: i = !1,
|
|
27
|
-
client:
|
|
27
|
+
client: l
|
|
28
28
|
}) => {
|
|
29
29
|
var S, C;
|
|
30
|
-
const
|
|
31
|
-
(A, ...
|
|
32
|
-
i && console.log(`🔥 [MessagingProvider] ${A}`, ...
|
|
30
|
+
const o = K(
|
|
31
|
+
(A, ...O) => {
|
|
32
|
+
i && console.log(`🔥 [MessagingProvider] ${A}`, ...O);
|
|
33
33
|
},
|
|
34
34
|
[i]
|
|
35
35
|
);
|
|
36
|
-
|
|
36
|
+
o("🔄 RENDER START", {
|
|
37
37
|
userId: t == null ? void 0 : t.id,
|
|
38
38
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
39
39
|
serviceConfig: !!s,
|
|
40
40
|
capabilities: Object.keys(r)
|
|
41
41
|
});
|
|
42
|
-
const [d, u] =
|
|
42
|
+
const [d, u] = $(null), [h, m] = $(null), [g, c] = $(!1), [p, w] = $(!1), [v, x] = $(null), b = V(!1), y = V(null), _ = V(s);
|
|
43
43
|
_.current = s;
|
|
44
44
|
const T = V(i);
|
|
45
45
|
T.current = i;
|
|
@@ -49,7 +49,7 @@ const xn = je({
|
|
|
49
49
|
serviceConfig: s,
|
|
50
50
|
capabilities: r
|
|
51
51
|
}), E = V(0);
|
|
52
|
-
E.current++,
|
|
52
|
+
E.current++, o("📊 RENDER INFO", {
|
|
53
53
|
renderCount: E.current,
|
|
54
54
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
55
55
|
propChanges: {
|
|
@@ -64,118 +64,118 @@ const xn = je({
|
|
|
64
64
|
serviceConfig: s,
|
|
65
65
|
capabilities: r
|
|
66
66
|
};
|
|
67
|
-
const
|
|
68
|
-
!
|
|
69
|
-
const F =
|
|
67
|
+
const z = V(null);
|
|
68
|
+
!l && a && ((S = z.current) == null ? void 0 : S.apiKey) !== a && (z.current = { apiKey: a, client: new ls(a) });
|
|
69
|
+
const F = l || (a ? ((C = z.current) == null ? void 0 : C.client) ?? null : null);
|
|
70
70
|
W(() => {
|
|
71
|
-
const A = E.current,
|
|
72
|
-
if (
|
|
71
|
+
const A = E.current, O = _.current;
|
|
72
|
+
if (l) {
|
|
73
73
|
y.current = null, u(null), m(null), c(!1), x(null), w(!1);
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
if (!a || !F || !
|
|
77
|
-
|
|
76
|
+
if (!a || !F || !O) {
|
|
77
|
+
o("⚠️ SERVICE INIT SKIPPED", {
|
|
78
78
|
renderCount: A,
|
|
79
79
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
80
80
|
});
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
o("🚀 CREATING SERVICE", {
|
|
84
84
|
renderCount: A,
|
|
85
85
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
86
86
|
});
|
|
87
|
-
const
|
|
88
|
-
...
|
|
87
|
+
const B = new os({
|
|
88
|
+
...O,
|
|
89
89
|
apiKey: a,
|
|
90
90
|
debug: T.current,
|
|
91
91
|
client: F
|
|
92
92
|
});
|
|
93
|
-
y.current =
|
|
93
|
+
y.current = B, u(B), o("✅ SERVICE SET", {
|
|
94
94
|
renderCount: A,
|
|
95
|
-
serviceInstance: !!
|
|
95
|
+
serviceInstance: !!B
|
|
96
96
|
});
|
|
97
|
-
}, [a, F,
|
|
97
|
+
}, [a, F, l]);
|
|
98
98
|
const R = V(null);
|
|
99
99
|
W(() => {
|
|
100
|
-
var
|
|
101
|
-
if (
|
|
100
|
+
var O, B;
|
|
101
|
+
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
102
102
|
hasService: !!d,
|
|
103
103
|
hasUser: !!t,
|
|
104
104
|
userId: t == null ? void 0 : t.id,
|
|
105
105
|
isConnecting: b.current,
|
|
106
106
|
isConnected: g,
|
|
107
107
|
dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
|
|
108
|
-
}),
|
|
108
|
+
}), l)
|
|
109
109
|
return;
|
|
110
110
|
if (!d || !t) {
|
|
111
|
-
|
|
111
|
+
o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
if (b.current) {
|
|
115
|
-
|
|
115
|
+
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
if (((
|
|
119
|
-
|
|
118
|
+
if (((O = R.current) == null ? void 0 : O.serviceId) === d && ((B = R.current) == null ? void 0 : B.userId) === t.id) {
|
|
119
|
+
o(
|
|
120
120
|
"⚠️ USER CONNECTION SKIPPED",
|
|
121
121
|
"Already connected this user with this service"
|
|
122
122
|
);
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
(async () => {
|
|
126
|
-
|
|
126
|
+
o("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, w(!0), x(null);
|
|
127
127
|
try {
|
|
128
|
-
|
|
128
|
+
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
129
129
|
const G = await d.connectUser(t);
|
|
130
|
-
m(G), c(!0), R.current = { serviceId: d, userId: t.id },
|
|
130
|
+
m(G), c(!0), R.current = { serviceId: d, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
131
131
|
userId: t.id,
|
|
132
132
|
clientId: G.userID
|
|
133
133
|
});
|
|
134
134
|
} catch (G) {
|
|
135
135
|
const ee = G instanceof Error ? G.message : "Connection failed";
|
|
136
|
-
x(ee),
|
|
136
|
+
x(ee), o("❌ USER CONNECTION ERROR", {
|
|
137
137
|
userId: t.id,
|
|
138
138
|
error: ee
|
|
139
139
|
});
|
|
140
140
|
} finally {
|
|
141
|
-
w(!1), b.current = !1,
|
|
141
|
+
w(!1), b.current = !1, o("🔄 USER CONNECTION FINISHED", {
|
|
142
142
|
userId: t.id,
|
|
143
143
|
isConnected: g
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
})();
|
|
147
|
-
}, [d, t,
|
|
147
|
+
}, [d, t, o, g, l]), W(() => {
|
|
148
148
|
const A = F;
|
|
149
149
|
return () => {
|
|
150
|
-
var
|
|
151
|
-
A && (R.current = null, (
|
|
150
|
+
var O;
|
|
151
|
+
A && (R.current = null, (O = y.current) == null || O.disconnectUser().catch(console.error));
|
|
152
152
|
};
|
|
153
153
|
}, [F]);
|
|
154
|
-
const I =
|
|
155
|
-
if (
|
|
154
|
+
const I = K(async () => {
|
|
155
|
+
if (o("🔄 REFRESH CONNECTION CALLED", {
|
|
156
156
|
hasService: !!d,
|
|
157
157
|
hasUser: !!t
|
|
158
|
-
}), !
|
|
158
|
+
}), !l) {
|
|
159
159
|
if (!d || !t) {
|
|
160
|
-
|
|
160
|
+
o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
|
|
163
|
+
o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), w(!0);
|
|
164
164
|
try {
|
|
165
|
-
|
|
165
|
+
o("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
|
|
166
166
|
const A = await d.connectUser(t);
|
|
167
|
-
m(A), c(!0), x(null),
|
|
167
|
+
m(A), c(!0), x(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
168
168
|
} catch (A) {
|
|
169
|
-
const
|
|
170
|
-
x(
|
|
169
|
+
const O = A instanceof Error ? A.message : "Refresh failed";
|
|
170
|
+
x(O), o("❌ CONNECTION REFRESH ERROR", {
|
|
171
171
|
userId: t.id,
|
|
172
|
-
error:
|
|
172
|
+
error: O
|
|
173
173
|
});
|
|
174
174
|
} finally {
|
|
175
|
-
w(!1),
|
|
175
|
+
w(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
}, [d, t,
|
|
178
|
+
}, [d, t, o, l]), M = P.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
179
179
|
hasService: !!d,
|
|
180
180
|
hasClient: !!h,
|
|
181
181
|
isConnected: g,
|
|
@@ -187,31 +187,31 @@ const xn = je({
|
|
|
187
187
|
// its lifecycle and there is no backend to reach. Suppressing it stops
|
|
188
188
|
// service-dependent paths (channel creation, block/unblock) from calling
|
|
189
189
|
// a stale apiKey-path service if the same provider previously connected.
|
|
190
|
-
service:
|
|
190
|
+
service: l ? null : d,
|
|
191
191
|
// An injected client is already connected and owns its lifecycle, so
|
|
192
192
|
// surface it directly and report a clean connected state — the apiKey
|
|
193
193
|
// path's `client`/`isLoading`/`error` (from connectUser) must not leak
|
|
194
194
|
// through if the same provider previously attempted an apiKey connect.
|
|
195
|
-
client:
|
|
196
|
-
isConnected:
|
|
197
|
-
isLoading:
|
|
198
|
-
error:
|
|
195
|
+
client: l ?? h,
|
|
196
|
+
isConnected: l ? !0 : g,
|
|
197
|
+
isLoading: l ? !1 : p,
|
|
198
|
+
error: l ? null : v,
|
|
199
199
|
capabilities: r,
|
|
200
200
|
refreshConnection: I,
|
|
201
201
|
debug: i
|
|
202
202
|
}), [
|
|
203
203
|
d,
|
|
204
204
|
h,
|
|
205
|
-
|
|
205
|
+
l,
|
|
206
206
|
g,
|
|
207
207
|
p,
|
|
208
208
|
v,
|
|
209
209
|
r,
|
|
210
210
|
I,
|
|
211
211
|
i,
|
|
212
|
-
|
|
212
|
+
o
|
|
213
213
|
]);
|
|
214
|
-
return
|
|
214
|
+
return o("🔄 RENDER END", {
|
|
215
215
|
renderCount: E.current,
|
|
216
216
|
willRenderChat: !!F,
|
|
217
217
|
contextValueReady: !!M
|
|
@@ -225,22 +225,22 @@ const xn = je({
|
|
|
225
225
|
children: e
|
|
226
226
|
}
|
|
227
227
|
) : e });
|
|
228
|
-
}, _a = () =>
|
|
228
|
+
}, _a = () => lt(), wn = (e) => {
|
|
229
229
|
var a, r;
|
|
230
|
-
const [t, s] =
|
|
230
|
+
const [t, s] = $(
|
|
231
231
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
232
232
|
);
|
|
233
233
|
return W(() => {
|
|
234
|
-
var
|
|
234
|
+
var l;
|
|
235
235
|
if (!e) {
|
|
236
236
|
s(!1);
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
|
-
s(!!((
|
|
240
|
-
const i = (
|
|
239
|
+
s(!!((l = e.state.membership) != null && l.pinned_at));
|
|
240
|
+
const i = (o) => {
|
|
241
241
|
var d;
|
|
242
242
|
s(
|
|
243
|
-
|
|
243
|
+
o != null && o.member ? !!o.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
|
|
244
244
|
);
|
|
245
245
|
};
|
|
246
246
|
return e.on("member.updated", i), () => {
|
|
@@ -253,8 +253,8 @@ function _n(e, t, s) {
|
|
|
253
253
|
if (hn(s)) {
|
|
254
254
|
const r = a.find(
|
|
255
255
|
(i) => {
|
|
256
|
-
var
|
|
257
|
-
return ((
|
|
256
|
+
var l;
|
|
257
|
+
return ((l = i.user) == null ? void 0 : l.id) === Vs;
|
|
258
258
|
}
|
|
259
259
|
);
|
|
260
260
|
if (r) return r;
|
|
@@ -270,14 +270,14 @@ const ya = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]
|
|
|
270
270
|
function Na(e) {
|
|
271
271
|
return ya.test(e.trim());
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Kt(e, t) {
|
|
274
274
|
const s = e == null ? void 0 : e.trim();
|
|
275
275
|
return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !Na(s);
|
|
276
276
|
}
|
|
277
277
|
function yn(e) {
|
|
278
|
-
return
|
|
278
|
+
return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const Xt = [
|
|
281
281
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
282
282
|
// Apple
|
|
283
283
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -314,7 +314,7 @@ function ka(e) {
|
|
|
314
314
|
return Math.abs(t);
|
|
315
315
|
}
|
|
316
316
|
function Nn(e) {
|
|
317
|
-
return
|
|
317
|
+
return Xt[ka(e) % Xt.length];
|
|
318
318
|
}
|
|
319
319
|
function Ca(e) {
|
|
320
320
|
return Nn(e).emoji;
|
|
@@ -329,9 +329,9 @@ const _e = ({
|
|
|
329
329
|
className: a,
|
|
330
330
|
starred: r = !1,
|
|
331
331
|
shape: i = "squircle",
|
|
332
|
-
dmAgentEnabled:
|
|
332
|
+
dmAgentEnabled: l = !1
|
|
333
333
|
}) => {
|
|
334
|
-
const
|
|
334
|
+
const o = Ca(e), d = Sa(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, p = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ n(
|
|
335
335
|
"div",
|
|
336
336
|
{
|
|
337
337
|
"aria-hidden": "true",
|
|
@@ -339,7 +339,7 @@ const _e = ({
|
|
|
339
339
|
"avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
|
|
340
340
|
),
|
|
341
341
|
style: { fontSize: m, lineHeight: 1 },
|
|
342
|
-
children:
|
|
342
|
+
children: o
|
|
343
343
|
}
|
|
344
344
|
) });
|
|
345
345
|
return /* @__PURE__ */ f(
|
|
@@ -369,7 +369,7 @@ const _e = ({
|
|
|
369
369
|
className: N("h-full w-full", "bg-transparent"),
|
|
370
370
|
style: {
|
|
371
371
|
...c,
|
|
372
|
-
...
|
|
372
|
+
...l && {
|
|
373
373
|
borderWidth: `${g}px`,
|
|
374
374
|
borderStyle: "solid",
|
|
375
375
|
borderColor: "var(--AI-Gradient, #7F22FE)",
|
|
@@ -389,14 +389,14 @@ const _e = ({
|
|
|
389
389
|
enabled: a = !0,
|
|
390
390
|
onLeaveConversation: r,
|
|
391
391
|
onBlockParticipant: i,
|
|
392
|
-
onDeleteConversationClick:
|
|
393
|
-
onBlockParticipantClick:
|
|
392
|
+
onDeleteConversationClick: l,
|
|
393
|
+
onBlockParticipantClick: o,
|
|
394
394
|
onReportParticipantClick: d,
|
|
395
395
|
onActionComplete: u,
|
|
396
396
|
logLabel: h = "useChannelModerationActions"
|
|
397
397
|
}) => {
|
|
398
398
|
var M;
|
|
399
|
-
const { service: m, debug: g } =
|
|
399
|
+
const { service: m, debug: g } = lt(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, p = !!(a && s && m && c), [w, v] = $(!1), [x, b] = $(null), [y, _] = $(!1), [T, L] = $(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
|
|
400
400
|
return W(() => {
|
|
401
401
|
if (!p || !m || !c) {
|
|
402
402
|
v(!1), b(null);
|
|
@@ -428,7 +428,7 @@ const _e = ({
|
|
|
428
428
|
handleLeaveConversation: async () => {
|
|
429
429
|
var S;
|
|
430
430
|
if (!y) {
|
|
431
|
-
|
|
431
|
+
l == null || l(), g && console.log(`[${h}] Leave conversation`, e.cid), _(!0);
|
|
432
432
|
try {
|
|
433
433
|
const C = ((S = e._client) == null ? void 0 : S.userID) ?? null;
|
|
434
434
|
await e.hide(C, !1), r && await r(e), u == null || u();
|
|
@@ -442,11 +442,11 @@ const _e = ({
|
|
|
442
442
|
handleBlockUser: async () => {
|
|
443
443
|
var S, C, A;
|
|
444
444
|
if (!(T || !m)) {
|
|
445
|
-
|
|
445
|
+
o == null || o(), g && console.log(`[${h}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), L(!0);
|
|
446
446
|
try {
|
|
447
447
|
await m.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), u == null || u();
|
|
448
|
-
} catch (
|
|
449
|
-
console.error(`[${h}] Failed to block member`,
|
|
448
|
+
} catch (O) {
|
|
449
|
+
console.error(`[${h}] Failed to block member`, O);
|
|
450
450
|
} finally {
|
|
451
451
|
L(!1);
|
|
452
452
|
}
|
|
@@ -455,11 +455,11 @@ const _e = ({
|
|
|
455
455
|
handleUnblockUser: async () => {
|
|
456
456
|
var S, C, A;
|
|
457
457
|
if (!(T || !m)) {
|
|
458
|
-
|
|
458
|
+
o == null || o(), g && console.log(`[${h}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), L(!0);
|
|
459
459
|
try {
|
|
460
460
|
await m.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), u == null || u();
|
|
461
|
-
} catch (
|
|
462
|
-
console.error(`[${h}] Failed to unblock member`,
|
|
461
|
+
} catch (O) {
|
|
462
|
+
console.error(`[${h}] Failed to unblock member`, O);
|
|
463
463
|
} finally {
|
|
464
464
|
L(!1);
|
|
465
465
|
}
|
|
@@ -493,14 +493,14 @@ const _e = ({
|
|
|
493
493
|
showBlockParticipant: a = !0,
|
|
494
494
|
showReportParticipant: r = !0,
|
|
495
495
|
onLeaveConversation: i,
|
|
496
|
-
onBlockParticipant:
|
|
497
|
-
onDeleteConversationClick:
|
|
496
|
+
onBlockParticipant: l,
|
|
497
|
+
onDeleteConversationClick: o,
|
|
498
498
|
onBlockParticipantClick: d,
|
|
499
499
|
onReportParticipantClick: u,
|
|
500
500
|
customChannelActions: h,
|
|
501
501
|
triggerClassName: m
|
|
502
502
|
}) => {
|
|
503
|
-
const [g, c] =
|
|
503
|
+
const [g, c] = $(!1), p = V(null), w = rs(), v = K(() => c(!1), []), {
|
|
504
504
|
isParticipantBlocked: x,
|
|
505
505
|
isCheckingBlockedStatus: b,
|
|
506
506
|
isLeaving: y,
|
|
@@ -508,15 +508,15 @@ const _e = ({
|
|
|
508
508
|
handleLeaveConversation: T,
|
|
509
509
|
handleBlockUser: L,
|
|
510
510
|
handleUnblockUser: E,
|
|
511
|
-
handleReportUser:
|
|
511
|
+
handleReportUser: z
|
|
512
512
|
} = Ia({
|
|
513
513
|
channel: e,
|
|
514
514
|
participant: t,
|
|
515
515
|
showBlockParticipant: a,
|
|
516
516
|
enabled: g,
|
|
517
517
|
onLeaveConversation: i,
|
|
518
|
-
onBlockParticipant:
|
|
519
|
-
onDeleteConversationClick:
|
|
518
|
+
onBlockParticipant: l,
|
|
519
|
+
onDeleteConversationClick: o,
|
|
520
520
|
onBlockParticipantClick: d,
|
|
521
521
|
onReportParticipantClick: u,
|
|
522
522
|
onActionComplete: v,
|
|
@@ -543,7 +543,7 @@ const _e = ({
|
|
|
543
543
|
"aria-controls": g ? w : void 0,
|
|
544
544
|
onClick: () => c((R) => !R),
|
|
545
545
|
children: [
|
|
546
|
-
/* @__PURE__ */ n(
|
|
546
|
+
/* @__PURE__ */ n(Ks, { className: "size-5 text-black/90" }),
|
|
547
547
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
548
548
|
]
|
|
549
549
|
}
|
|
@@ -565,7 +565,7 @@ const _e = ({
|
|
|
565
565
|
disabled: y,
|
|
566
566
|
"aria-busy": y,
|
|
567
567
|
children: [
|
|
568
|
-
y ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
568
|
+
y ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Xs, { className: "h-5 w-5" }),
|
|
569
569
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
570
570
|
]
|
|
571
571
|
}
|
|
@@ -600,7 +600,7 @@ const _e = ({
|
|
|
600
600
|
]
|
|
601
601
|
}
|
|
602
602
|
) }),
|
|
603
|
-
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(Ne, { variant: "danger", onClick:
|
|
603
|
+
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(Ne, { variant: "danger", onClick: z, children: [
|
|
604
604
|
/* @__PURE__ */ n(fn, { className: "h-5 w-5" }),
|
|
605
605
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
606
606
|
] }) }),
|
|
@@ -609,15 +609,15 @@ const _e = ({
|
|
|
609
609
|
}
|
|
610
610
|
)
|
|
611
611
|
] });
|
|
612
|
-
},
|
|
612
|
+
}, qe = "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 = ({
|
|
613
613
|
className: e,
|
|
614
614
|
onBack: t,
|
|
615
615
|
showBackButton: s,
|
|
616
616
|
showStarButton: a = !1,
|
|
617
617
|
onLeaveConversation: r,
|
|
618
618
|
onBlockParticipant: i,
|
|
619
|
-
showDeleteConversation:
|
|
620
|
-
showBlockParticipant:
|
|
619
|
+
showDeleteConversation: l = !0,
|
|
620
|
+
showBlockParticipant: o = !0,
|
|
621
621
|
showReportParticipant: d = !0,
|
|
622
622
|
onDeleteConversationClick: u,
|
|
623
623
|
onBlockParticipantClick: h,
|
|
@@ -628,7 +628,7 @@ const _e = ({
|
|
|
628
628
|
onParticipantNameClick: w
|
|
629
629
|
}) => {
|
|
630
630
|
var I, M, S, C;
|
|
631
|
-
const { channel: v } = we(), { client: x } = He(), b =
|
|
631
|
+
const { channel: v } = we(), { client: x } = He(), b = P.useMemo(
|
|
632
632
|
() => {
|
|
633
633
|
var A;
|
|
634
634
|
return _n(
|
|
@@ -638,7 +638,7 @@ const _e = ({
|
|
|
638
638
|
);
|
|
639
639
|
},
|
|
640
640
|
[(I = v.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, v.type]
|
|
641
|
-
), y = yn(b == null ? void 0 : b.user), _ = (M = b == null ? void 0 : b.user) == null ? void 0 : M.image, T = wn(v), L = Ra((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T,
|
|
641
|
+
), y = yn(b == null ? void 0 : b.user), _ = (M = b == null ? void 0 : b.user) == null ? void 0 : M.image, T = wn(v), L = Ra((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, z = L || E || !!w, F = async () => {
|
|
642
642
|
try {
|
|
643
643
|
T ? await v.unpin() : await v.pin();
|
|
644
644
|
} catch (A) {
|
|
@@ -647,7 +647,7 @@ const _e = ({
|
|
|
647
647
|
A
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
|
-
}, R = /* @__PURE__ */ f(
|
|
650
|
+
}, R = /* @__PURE__ */ f(q, { children: [
|
|
651
651
|
/* @__PURE__ */ n(
|
|
652
652
|
_e,
|
|
653
653
|
{
|
|
@@ -664,17 +664,17 @@ const _e = ({
|
|
|
664
664
|
{
|
|
665
665
|
className: N(
|
|
666
666
|
"relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95",
|
|
667
|
-
|
|
667
|
+
z ? "pl-3 pr-2" : "px-3"
|
|
668
668
|
),
|
|
669
669
|
children: /* @__PURE__ */ f("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
670
670
|
/* @__PURE__ */ n("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: y }),
|
|
671
|
-
|
|
671
|
+
z && /* @__PURE__ */ f("span", { className: "ml-2 flex gap-1", children: [
|
|
672
672
|
L && /* @__PURE__ */ n(
|
|
673
673
|
"span",
|
|
674
674
|
{
|
|
675
675
|
"aria-label": "Paid customer",
|
|
676
676
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
677
|
-
children: /* @__PURE__ */ n(
|
|
677
|
+
children: /* @__PURE__ */ n(qs, { className: "size-2.5", weight: "bold" })
|
|
678
678
|
}
|
|
679
679
|
),
|
|
680
680
|
E && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
|
|
@@ -710,7 +710,7 @@ const _e = ({
|
|
|
710
710
|
"button",
|
|
711
711
|
{
|
|
712
712
|
className: N(
|
|
713
|
-
|
|
713
|
+
qe,
|
|
714
714
|
"messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
|
|
715
715
|
),
|
|
716
716
|
onClick: t || (() => {
|
|
@@ -734,7 +734,7 @@ const _e = ({
|
|
|
734
734
|
a && /* @__PURE__ */ n(
|
|
735
735
|
"button",
|
|
736
736
|
{
|
|
737
|
-
className:
|
|
737
|
+
className: qe,
|
|
738
738
|
onClick: F,
|
|
739
739
|
type: "button",
|
|
740
740
|
"aria-pressed": T,
|
|
@@ -756,8 +756,8 @@ const _e = ({
|
|
|
756
756
|
{
|
|
757
757
|
channel: v,
|
|
758
758
|
participant: b,
|
|
759
|
-
showDeleteConversation:
|
|
760
|
-
showBlockParticipant:
|
|
759
|
+
showDeleteConversation: l,
|
|
760
|
+
showBlockParticipant: o,
|
|
761
761
|
showReportParticipant: d,
|
|
762
762
|
onLeaveConversation: r,
|
|
763
763
|
onBlockParticipant: i,
|
|
@@ -765,7 +765,7 @@ const _e = ({
|
|
|
765
765
|
onBlockParticipantClick: h,
|
|
766
766
|
onReportParticipantClick: m,
|
|
767
767
|
customChannelActions: g,
|
|
768
|
-
triggerClassName:
|
|
768
|
+
triggerClassName: qe
|
|
769
769
|
}
|
|
770
770
|
))
|
|
771
771
|
] })
|
|
@@ -784,7 +784,7 @@ function kn({
|
|
|
784
784
|
const s = e == null ? void 0 : e.text, a = Da(t);
|
|
785
785
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
786
786
|
}
|
|
787
|
-
const Oa = ["linktr.ee"],
|
|
787
|
+
const Oa = ["linktr.ee"], qt = "messaging-attachment-v1_0";
|
|
788
788
|
function Pa(e) {
|
|
789
789
|
try {
|
|
790
790
|
return new URL(e).hostname.toLowerCase();
|
|
@@ -792,7 +792,7 @@ function Pa(e) {
|
|
|
792
792
|
return null;
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function Fa(e) {
|
|
796
796
|
return Oa.some(
|
|
797
797
|
(t) => e === t || e.endsWith(`.${t}`)
|
|
798
798
|
);
|
|
@@ -801,11 +801,11 @@ function ce(e) {
|
|
|
801
801
|
const t = e == null ? void 0 : e.trim();
|
|
802
802
|
if (!t) return;
|
|
803
803
|
const s = Pa(t);
|
|
804
|
-
if (!s || !
|
|
804
|
+
if (!s || !Fa(s)) return t;
|
|
805
805
|
const a = new URL(t);
|
|
806
|
-
return a.searchParams.get("io") === "true" && a.searchParams.get("size") ===
|
|
806
|
+
return a.searchParams.get("io") === "true" && a.searchParams.get("size") === qt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", qt), a.toString());
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const za = [
|
|
809
809
|
[/pdf/, "pdf"],
|
|
810
810
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
811
811
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -819,7 +819,7 @@ function de(e) {
|
|
|
819
819
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
820
820
|
}
|
|
821
821
|
function Cn(e) {
|
|
822
|
-
const t =
|
|
822
|
+
const t = za.find(
|
|
823
823
|
([s]) => s.test(e)
|
|
824
824
|
);
|
|
825
825
|
return t ? t[1] : "generic";
|
|
@@ -830,7 +830,7 @@ const $a = {
|
|
|
830
830
|
image: Js,
|
|
831
831
|
document: pn
|
|
832
832
|
}, Ba = {
|
|
833
|
-
pdf:
|
|
833
|
+
pdf: oa,
|
|
834
834
|
doc: ia,
|
|
835
835
|
xls: ra,
|
|
836
836
|
csv: aa,
|
|
@@ -845,7 +845,7 @@ function Ua(e) {
|
|
|
845
845
|
return t !== "document" ? $a[t] : Ba[Cn(e)];
|
|
846
846
|
}
|
|
847
847
|
function ve(e, t) {
|
|
848
|
-
return
|
|
848
|
+
return P.createElement(Ua(e), t);
|
|
849
849
|
}
|
|
850
850
|
const ja = (e) => {
|
|
851
851
|
var t, s;
|
|
@@ -857,14 +857,14 @@ const ja = (e) => {
|
|
|
857
857
|
autoPlay: a = !1,
|
|
858
858
|
playing: r,
|
|
859
859
|
loop: i = !1,
|
|
860
|
-
controls:
|
|
861
|
-
showProgress:
|
|
860
|
+
controls: l = !0,
|
|
861
|
+
showProgress: o = !1,
|
|
862
862
|
muted: d = !1,
|
|
863
863
|
onContainerClick: u
|
|
864
864
|
}) => {
|
|
865
|
-
const h = de(t), m = V(null), g = V(null), c = V(null), p = V(r), [w, v] =
|
|
866
|
-
|
|
867
|
-
}, []),
|
|
865
|
+
const h = de(t), m = V(null), g = V(null), c = V(null), p = V(r), [w, v] = $(a), [x, b] = $(0), [y, _] = $(!1), [T, L] = $(!1), [E, z] = $(!1), [F, R] = $(!1), [I, M] = $(!0), [S, C] = $(null), A = K(() => {
|
|
866
|
+
z(!1), v(!0);
|
|
867
|
+
}, []), O = K((k) => {
|
|
868
868
|
const D = g.current;
|
|
869
869
|
if (!D) return 0;
|
|
870
870
|
const Y = D.getBoundingClientRect();
|
|
@@ -872,18 +872,18 @@ const ja = (e) => {
|
|
|
872
872
|
0,
|
|
873
873
|
Math.min(1, (ja(k) - Y.left) / Y.width)
|
|
874
874
|
);
|
|
875
|
-
}, []),
|
|
875
|
+
}, []), B = K((k) => {
|
|
876
876
|
const D = m.current;
|
|
877
877
|
D && D.duration && (D.currentTime = k * D.duration);
|
|
878
878
|
}, []), G = (k) => {
|
|
879
879
|
k.stopPropagation(), _(!0);
|
|
880
|
-
const D =
|
|
881
|
-
b(D),
|
|
882
|
-
}, ee =
|
|
880
|
+
const D = O(k);
|
|
881
|
+
b(D), B(D);
|
|
882
|
+
}, ee = K(
|
|
883
883
|
(k) => {
|
|
884
|
-
k.key === "ArrowRight" &&
|
|
884
|
+
k.key === "ArrowRight" && B(Math.min(1, x + 0.05)), k.key === "ArrowLeft" && B(Math.max(0, x - 0.05));
|
|
885
885
|
},
|
|
886
|
-
[
|
|
886
|
+
[B, x]
|
|
887
887
|
);
|
|
888
888
|
W(() => {
|
|
889
889
|
r !== void 0 && r !== p.current && (p.current = r, v(r));
|
|
@@ -902,18 +902,18 @@ const ja = (e) => {
|
|
|
902
902
|
}, [w, y]), W(() => {
|
|
903
903
|
const k = m.current;
|
|
904
904
|
k && (w ? k.play().catch((D) => {
|
|
905
|
-
v(!1),
|
|
905
|
+
v(!1), z(!0);
|
|
906
906
|
}) : k.pause());
|
|
907
907
|
}, [w]), W(() => {
|
|
908
908
|
if (!y) return;
|
|
909
|
-
const k = (Y) => b(
|
|
910
|
-
_(!1),
|
|
909
|
+
const k = (Y) => b(O(Y)), D = (Y) => {
|
|
910
|
+
_(!1), B(O(Y));
|
|
911
911
|
};
|
|
912
912
|
return window.addEventListener("mousemove", k), window.addEventListener("mouseup", D), window.addEventListener("touchmove", k, { passive: !0 }), window.addEventListener("touchend", D), () => {
|
|
913
913
|
window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", D), window.removeEventListener("touchmove", k), window.removeEventListener("touchend", D);
|
|
914
914
|
};
|
|
915
|
-
}, [y,
|
|
916
|
-
const Z = S ? { aspectRatio: String(S) } : void 0, J = S ? "" : " aspect-video",
|
|
915
|
+
}, [y, O, B]);
|
|
916
|
+
const Z = S ? { aspectRatio: String(S) } : void 0, J = S ? "" : " aspect-video", j = Math.round(x * 100);
|
|
917
917
|
return /* @__PURE__ */ f(
|
|
918
918
|
"div",
|
|
919
919
|
{
|
|
@@ -926,7 +926,7 @@ const ja = (e) => {
|
|
|
926
926
|
u(k);
|
|
927
927
|
return;
|
|
928
928
|
}
|
|
929
|
-
E ||
|
|
929
|
+
E || l && v((D) => !D);
|
|
930
930
|
},
|
|
931
931
|
onKeyDown: (k) => {
|
|
932
932
|
if (!(k.key !== "Enter" && k.key !== " ")) {
|
|
@@ -934,7 +934,7 @@ const ja = (e) => {
|
|
|
934
934
|
u(k);
|
|
935
935
|
return;
|
|
936
936
|
}
|
|
937
|
-
E ||
|
|
937
|
+
E || l && v((D) => !D);
|
|
938
938
|
}
|
|
939
939
|
},
|
|
940
940
|
children: [
|
|
@@ -963,7 +963,7 @@ const ja = (e) => {
|
|
|
963
963
|
R(!1), M(!1);
|
|
964
964
|
},
|
|
965
965
|
onWaiting: () => R(!0),
|
|
966
|
-
onPlay: () =>
|
|
966
|
+
onPlay: () => z(!1),
|
|
967
967
|
onEnded: () => {
|
|
968
968
|
i || (v(!1), b(0));
|
|
969
969
|
},
|
|
@@ -983,7 +983,7 @@ const ja = (e) => {
|
|
|
983
983
|
R(!1), M(!1);
|
|
984
984
|
},
|
|
985
985
|
onWaiting: () => R(!0),
|
|
986
|
-
onPlay: () =>
|
|
986
|
+
onPlay: () => z(!1),
|
|
987
987
|
onLoadedMetadata: () => {
|
|
988
988
|
const k = m.current;
|
|
989
989
|
k instanceof HTMLVideoElement && k.videoWidth && k.videoHeight && C(k.videoWidth / k.videoHeight);
|
|
@@ -1001,7 +1001,7 @@ const ja = (e) => {
|
|
|
1001
1001
|
weight: "bold"
|
|
1002
1002
|
}
|
|
1003
1003
|
) }),
|
|
1004
|
-
E && !
|
|
1004
|
+
E && !l && /* @__PURE__ */ n(
|
|
1005
1005
|
"div",
|
|
1006
1006
|
{
|
|
1007
1007
|
className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
|
|
@@ -1017,12 +1017,12 @@ const ja = (e) => {
|
|
|
1017
1017
|
children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(rt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1018
1018
|
}
|
|
1019
1019
|
),
|
|
1020
|
-
|
|
1020
|
+
o && !l && /* @__PURE__ */ n("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__ */ n(
|
|
1021
1021
|
"div",
|
|
1022
1022
|
{
|
|
1023
1023
|
role: "slider",
|
|
1024
1024
|
"aria-label": "Playback position",
|
|
1025
|
-
"aria-valuenow":
|
|
1025
|
+
"aria-valuenow": j,
|
|
1026
1026
|
"aria-valuemin": 0,
|
|
1027
1027
|
"aria-valuemax": 100,
|
|
1028
1028
|
tabIndex: 0,
|
|
@@ -1036,12 +1036,12 @@ const ja = (e) => {
|
|
|
1036
1036
|
"div",
|
|
1037
1037
|
{
|
|
1038
1038
|
className: "h-full rounded-full bg-white",
|
|
1039
|
-
style: { width: `${
|
|
1039
|
+
style: { width: `${j}%` }
|
|
1040
1040
|
}
|
|
1041
1041
|
) })
|
|
1042
1042
|
}
|
|
1043
1043
|
) }),
|
|
1044
|
-
|
|
1044
|
+
l && /* @__PURE__ */ f("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
|
|
1045
1045
|
/* @__PURE__ */ n(
|
|
1046
1046
|
"button",
|
|
1047
1047
|
{
|
|
@@ -1051,7 +1051,7 @@ const ja = (e) => {
|
|
|
1051
1051
|
},
|
|
1052
1052
|
className: "shrink-0 text-white",
|
|
1053
1053
|
"aria-label": w ? "Pause" : "Play",
|
|
1054
|
-
children: w ? /* @__PURE__ */ n(
|
|
1054
|
+
children: w ? /* @__PURE__ */ n(la, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(rt, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1055
1055
|
}
|
|
1056
1056
|
),
|
|
1057
1057
|
/* @__PURE__ */ f(
|
|
@@ -1059,7 +1059,7 @@ const ja = (e) => {
|
|
|
1059
1059
|
{
|
|
1060
1060
|
role: "slider",
|
|
1061
1061
|
"aria-label": "Playback position",
|
|
1062
|
-
"aria-valuenow":
|
|
1062
|
+
"aria-valuenow": j,
|
|
1063
1063
|
"aria-valuemin": 0,
|
|
1064
1064
|
"aria-valuemax": 100,
|
|
1065
1065
|
tabIndex: 0,
|
|
@@ -1080,7 +1080,7 @@ const ja = (e) => {
|
|
|
1080
1080
|
"div",
|
|
1081
1081
|
{
|
|
1082
1082
|
className: "h-full rounded-full bg-white",
|
|
1083
|
-
style: { width: `${
|
|
1083
|
+
style: { width: `${j}%` }
|
|
1084
1084
|
}
|
|
1085
1085
|
)
|
|
1086
1086
|
}
|
|
@@ -1089,7 +1089,7 @@ const ja = (e) => {
|
|
|
1089
1089
|
"div",
|
|
1090
1090
|
{
|
|
1091
1091
|
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || y ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1092
|
-
style: { left: `${
|
|
1092
|
+
style: { left: `${j}%` }
|
|
1093
1093
|
}
|
|
1094
1094
|
)
|
|
1095
1095
|
]
|
|
@@ -1106,10 +1106,10 @@ const ja = (e) => {
|
|
|
1106
1106
|
title: a,
|
|
1107
1107
|
variant: r,
|
|
1108
1108
|
mediaPlayerProps: i,
|
|
1109
|
-
containedImage:
|
|
1109
|
+
containedImage: l = !1
|
|
1110
1110
|
}) => {
|
|
1111
|
-
const
|
|
1112
|
-
return t && (
|
|
1111
|
+
const o = de(e), [d, u] = $(!1), h = ce(t), m = ce(s);
|
|
1112
|
+
return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
|
|
1113
1113
|
Ha,
|
|
1114
1114
|
{
|
|
1115
1115
|
source: t,
|
|
@@ -1118,7 +1118,7 @@ const ja = (e) => {
|
|
|
1118
1118
|
controls: !0,
|
|
1119
1119
|
...i
|
|
1120
1120
|
}
|
|
1121
|
-
) : t &&
|
|
1121
|
+
) : t && o === "image" ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
|
|
1122
1122
|
"img",
|
|
1123
1123
|
{
|
|
1124
1124
|
src: h ?? t,
|
|
@@ -1135,7 +1135,7 @@ const ja = (e) => {
|
|
|
1135
1135
|
className: "block w-full",
|
|
1136
1136
|
draggable: !1
|
|
1137
1137
|
}
|
|
1138
|
-
) : t &&
|
|
1138
|
+
) : t && o === "document" ? s ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
|
|
1139
1139
|
"img",
|
|
1140
1140
|
{
|
|
1141
1141
|
src: m ?? s,
|
|
@@ -1186,8 +1186,8 @@ const ja = (e) => {
|
|
|
1186
1186
|
placeholderTitle: a = "Attachment title",
|
|
1187
1187
|
mimeType: r,
|
|
1188
1188
|
detail: i,
|
|
1189
|
-
statusBadge:
|
|
1190
|
-
action:
|
|
1189
|
+
statusBadge: l,
|
|
1190
|
+
action: o,
|
|
1191
1191
|
topLeft: d,
|
|
1192
1192
|
topRight: u,
|
|
1193
1193
|
rootRef: h,
|
|
@@ -1237,9 +1237,9 @@ const ja = (e) => {
|
|
|
1237
1237
|
children: i
|
|
1238
1238
|
}
|
|
1239
1239
|
),
|
|
1240
|
-
|
|
1240
|
+
l
|
|
1241
1241
|
] }),
|
|
1242
|
-
|
|
1242
|
+
o
|
|
1243
1243
|
] })
|
|
1244
1244
|
]
|
|
1245
1245
|
}
|
|
@@ -1260,14 +1260,14 @@ function Ya(e) {
|
|
|
1260
1260
|
function Wa(e) {
|
|
1261
1261
|
return e ? "text-white/55" : "text-black/55";
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function Ka(e) {
|
|
1264
1264
|
return e ? "text-white/40" : "text-black/40";
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function Xa(e) {
|
|
1267
1267
|
return e ? "text-white/20" : "text-black/20";
|
|
1268
1268
|
}
|
|
1269
1269
|
const dt = ({ attachment: e, isMyMessage: t }) => {
|
|
1270
|
-
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link:
|
|
1270
|
+
const { title: s, 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, u = /* @__PURE__ */ f(P.Fragment, { children: [
|
|
1271
1271
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1272
1272
|
"img",
|
|
1273
1273
|
{
|
|
@@ -1279,7 +1279,7 @@ const dt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1279
1279
|
"div",
|
|
1280
1280
|
{
|
|
1281
1281
|
className: `aspect-video w-full rounded-[20px] ${Ga(t)} flex items-center justify-center`,
|
|
1282
|
-
children: /* @__PURE__ */ n(ca, { className: `size-12 ${
|
|
1282
|
+
children: /* @__PURE__ */ n(ca, { className: `size-12 ${Xa(t)}` })
|
|
1283
1283
|
}
|
|
1284
1284
|
) }),
|
|
1285
1285
|
/* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
|
|
@@ -1300,7 +1300,7 @@ const dt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1300
1300
|
d && /* @__PURE__ */ n(
|
|
1301
1301
|
"p",
|
|
1302
1302
|
{
|
|
1303
|
-
className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1303
|
+
className: `mt-1 truncate text-[12px] leading-4 ${Ka(t)}`,
|
|
1304
1304
|
children: d
|
|
1305
1305
|
}
|
|
1306
1306
|
)
|
|
@@ -1325,7 +1325,7 @@ function ut(e) {
|
|
|
1325
1325
|
var t;
|
|
1326
1326
|
return (t = e.attachments) == null ? void 0 : t.find(Ve);
|
|
1327
1327
|
}
|
|
1328
|
-
async function
|
|
1328
|
+
async function qa(e, t) {
|
|
1329
1329
|
let s;
|
|
1330
1330
|
try {
|
|
1331
1331
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1334,25 +1334,25 @@ async function Ka(e, t) {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
const a = await fetch(e, { mode: "cors" });
|
|
1336
1336
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
1337
|
-
const r = await a.blob(), i = URL.createObjectURL(r),
|
|
1338
|
-
|
|
1337
|
+
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
1338
|
+
l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
1339
1339
|
}
|
|
1340
1340
|
const Za = ({
|
|
1341
1341
|
url: e,
|
|
1342
1342
|
filename: t
|
|
1343
1343
|
}) => {
|
|
1344
|
-
const [s, a] =
|
|
1344
|
+
const [s, a] = $(!1);
|
|
1345
1345
|
return /* @__PURE__ */ n(
|
|
1346
1346
|
"button",
|
|
1347
1347
|
{
|
|
1348
1348
|
type: "button",
|
|
1349
1349
|
onClick: (i) => {
|
|
1350
1350
|
i.stopPropagation();
|
|
1351
|
-
const
|
|
1352
|
-
a(!0),
|
|
1353
|
-
|
|
1351
|
+
const l = window.open("", "_blank", "noopener,noreferrer");
|
|
1352
|
+
a(!0), qa(e, t).then(() => {
|
|
1353
|
+
l == null || l.close();
|
|
1354
1354
|
}).catch(() => {
|
|
1355
|
-
|
|
1355
|
+
l && (l.location.href = e);
|
|
1356
1356
|
}).finally(() => a(!1));
|
|
1357
1357
|
},
|
|
1358
1358
|
disabled: s,
|
|
@@ -1363,7 +1363,7 @@ const Za = ({
|
|
|
1363
1363
|
className: "size-4 animate-spin text-white",
|
|
1364
1364
|
weight: "bold"
|
|
1365
1365
|
}
|
|
1366
|
-
) : /* @__PURE__ */ f(
|
|
1366
|
+
) : /* @__PURE__ */ f(P.Fragment, { children: [
|
|
1367
1367
|
/* @__PURE__ */ n(Se, { className: "size-4 text-white", weight: "bold" }),
|
|
1368
1368
|
"Download"
|
|
1369
1369
|
] })
|
|
@@ -1380,12 +1380,12 @@ function mt(e) {
|
|
|
1380
1380
|
(w) => w.type === "audio" && w.asset_url
|
|
1381
1381
|
), r = (p = e.attachments) == null ? void 0 : p.find(
|
|
1382
1382
|
(w) => w.type === "file" && w.asset_url
|
|
1383
|
-
), i = t ?? s ?? a ?? r,
|
|
1384
|
-
if (!
|
|
1385
|
-
const
|
|
1383
|
+
), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1384
|
+
if (!l) return null;
|
|
1385
|
+
const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, h = t == null ? void 0 : t.thumb_url;
|
|
1386
1386
|
return {
|
|
1387
|
-
resolvedUrl:
|
|
1388
|
-
resolvedType:
|
|
1387
|
+
resolvedUrl: l,
|
|
1388
|
+
resolvedType: o,
|
|
1389
1389
|
title: d,
|
|
1390
1390
|
fileSize: u,
|
|
1391
1391
|
thumbnailUrl: h
|
|
@@ -1426,14 +1426,14 @@ const Tn = ({
|
|
|
1426
1426
|
fileSize: a,
|
|
1427
1427
|
thumbnailUrl: r
|
|
1428
1428
|
}) => {
|
|
1429
|
-
const i = de(t),
|
|
1429
|
+
const i = de(t), l = a !== void 0 ? In(a) : void 0;
|
|
1430
1430
|
return /* @__PURE__ */ n(
|
|
1431
1431
|
En,
|
|
1432
1432
|
{
|
|
1433
1433
|
variant: "light",
|
|
1434
1434
|
title: s,
|
|
1435
1435
|
mimeType: t,
|
|
1436
|
-
detail:
|
|
1436
|
+
detail: l,
|
|
1437
1437
|
thumbnail: /* @__PURE__ */ n(
|
|
1438
1438
|
Sn,
|
|
1439
1439
|
{
|
|
@@ -1507,24 +1507,24 @@ const Tn = ({
|
|
|
1507
1507
|
return /* @__PURE__ */ n("div", { className: ct(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !1 }) });
|
|
1508
1508
|
const s = mt(e);
|
|
1509
1509
|
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(An, { ...s }) }) : null;
|
|
1510
|
-
},
|
|
1510
|
+
}, sl = Object.assign(Ja, {
|
|
1511
1511
|
Creator: Qa,
|
|
1512
1512
|
Visitor: er
|
|
1513
1513
|
}), tr = {
|
|
1514
1514
|
isUnlocking: () => !1
|
|
1515
1515
|
}, nr = {
|
|
1516
1516
|
LockedAttachment: tr
|
|
1517
|
-
}, Rn = je({}),
|
|
1517
|
+
}, Rn = je({}), al = Rn.Provider;
|
|
1518
1518
|
function sr(e) {
|
|
1519
1519
|
return xe(Rn)[e] ?? nr[e];
|
|
1520
1520
|
}
|
|
1521
|
-
const ar =
|
|
1521
|
+
const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import("./Card-avnlyzrl.js")), ir = () => /* @__PURE__ */ n(
|
|
1522
1522
|
"div",
|
|
1523
1523
|
{
|
|
1524
1524
|
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)]",
|
|
1525
1525
|
"aria-hidden": !0
|
|
1526
1526
|
}
|
|
1527
|
-
), Pe = (e) => /* @__PURE__ */ n(is, { fallback: /* @__PURE__ */ n(ir, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(ar, { ...e }) : /* @__PURE__ */ n(rr, { ...e }) }),
|
|
1527
|
+
), Pe = (e) => /* @__PURE__ */ n(is, { fallback: /* @__PURE__ */ n(ir, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(ar, { ...e }) : /* @__PURE__ */ n(rr, { ...e }) }), or = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1528
1528
|
"svg",
|
|
1529
1529
|
{
|
|
1530
1530
|
width: e,
|
|
@@ -1541,25 +1541,25 @@ const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import(
|
|
|
1541
1541
|
}
|
|
1542
1542
|
)
|
|
1543
1543
|
}
|
|
1544
|
-
),
|
|
1544
|
+
), lr = (e) => {
|
|
1545
1545
|
var t;
|
|
1546
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) ===
|
|
1546
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.TIP;
|
|
1547
1547
|
}, Ln = (e) => {
|
|
1548
1548
|
var t;
|
|
1549
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) ===
|
|
1550
|
-
},
|
|
1549
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.PAID;
|
|
1550
|
+
}, ze = (e) => {
|
|
1551
1551
|
var t;
|
|
1552
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) ===
|
|
1552
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.CHATBOT;
|
|
1553
1553
|
}, ht = (e) => {
|
|
1554
1554
|
var t;
|
|
1555
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) ===
|
|
1555
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.ATTACHMENT;
|
|
1556
1556
|
}, cr = (e) => {
|
|
1557
1557
|
var t;
|
|
1558
1558
|
return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
1559
1559
|
}, dr = (e) => {
|
|
1560
1560
|
var t;
|
|
1561
1561
|
return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
1562
|
-
}, Mn = (e) =>
|
|
1562
|
+
}, Mn = (e) => lr(e) || Ln(e), ur = (e) => {
|
|
1563
1563
|
var t;
|
|
1564
1564
|
return Mn(e) && !((t = e.text) != null && t.trim());
|
|
1565
1565
|
}, Ze = ({
|
|
@@ -1569,7 +1569,7 @@ const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import(
|
|
|
1569
1569
|
hasAttachment: a = !1
|
|
1570
1570
|
}) => {
|
|
1571
1571
|
var g;
|
|
1572
|
-
const r = Mn(e), i =
|
|
1572
|
+
const r = Mn(e), i = ze(e);
|
|
1573
1573
|
if (!r && !i)
|
|
1574
1574
|
return null;
|
|
1575
1575
|
if (r) {
|
|
@@ -1581,16 +1581,16 @@ const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import(
|
|
|
1581
1581
|
/* @__PURE__ */ n("span", { children: v })
|
|
1582
1582
|
] });
|
|
1583
1583
|
}
|
|
1584
|
-
const
|
|
1584
|
+
const l = s && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = l ? "justify-end gap-2 text-black/30" : s ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ n("span", { className: "text-left", children: o }), m = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(or, { size: l ? 12 : 15 }) });
|
|
1585
1585
|
return /* @__PURE__ */ n(
|
|
1586
1586
|
"div",
|
|
1587
1587
|
{
|
|
1588
1588
|
className: `${d} ${u}`,
|
|
1589
1589
|
"data-testid": "message-chatbot-indicator",
|
|
1590
|
-
children: s && !
|
|
1590
|
+
children: s && !l ? /* @__PURE__ */ f(q, { children: [
|
|
1591
1591
|
h,
|
|
1592
1592
|
m
|
|
1593
|
-
] }) : /* @__PURE__ */ f(
|
|
1593
|
+
] }) : /* @__PURE__ */ f(q, { children: [
|
|
1594
1594
|
m,
|
|
1595
1595
|
h
|
|
1596
1596
|
] })
|
|
@@ -1630,10 +1630,10 @@ const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import(
|
|
|
1630
1630
|
if (!i || s.has(i))
|
|
1631
1631
|
continue;
|
|
1632
1632
|
s.add(i);
|
|
1633
|
-
const
|
|
1634
|
-
|
|
1635
|
-
id:
|
|
1636
|
-
...
|
|
1633
|
+
const l = t(i);
|
|
1634
|
+
l && (a ?? (a = {}), a[i] = {
|
|
1635
|
+
id: l.id,
|
|
1636
|
+
...l.name !== void 0 ? { name: l.name } : {}
|
|
1637
1637
|
});
|
|
1638
1638
|
}
|
|
1639
1639
|
return a;
|
|
@@ -1645,12 +1645,12 @@ const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import(
|
|
|
1645
1645
|
const s = Object.keys(e), a = Object.keys(t);
|
|
1646
1646
|
return s.length !== a.length ? !1 : s.every(
|
|
1647
1647
|
(r) => {
|
|
1648
|
-
var i,
|
|
1649
|
-
return e[r].id === ((i = t[r]) == null ? void 0 : i.id) && e[r].name === ((
|
|
1648
|
+
var i, l;
|
|
1649
|
+
return e[r].id === ((i = t[r]) == null ? void 0 : i.id) && e[r].name === ((l = t[r]) == null ? void 0 : l.name);
|
|
1650
1650
|
}
|
|
1651
1651
|
);
|
|
1652
1652
|
}, pr = (e, t) => {
|
|
1653
|
-
const s = fr(e, t), [a, r] =
|
|
1653
|
+
const s = fr(e, t), [a, r] = $(s);
|
|
1654
1654
|
return gr(a, s) ? a : (r(s), s);
|
|
1655
1655
|
}, ft = () => {
|
|
1656
1656
|
const { message: e } = fe("SentMessageDeliveryStatus"), { messages: t } = we("SentMessageDeliveryStatus"), s = (() => {
|
|
@@ -1662,10 +1662,10 @@ const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import(
|
|
|
1662
1662
|
}
|
|
1663
1663
|
})();
|
|
1664
1664
|
return e.id === s;
|
|
1665
|
-
}, Je = () => ft() ? /* @__PURE__ */ f(
|
|
1665
|
+
}, Je = () => ft() ? /* @__PURE__ */ f(q, { children: [
|
|
1666
1666
|
/* @__PURE__ */ n(ha, { weight: "bold", "aria-hidden": "true" }),
|
|
1667
1667
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
1668
|
-
] }) : null, br = () => ft() ? /* @__PURE__ */ f(
|
|
1668
|
+
] }) : null, br = () => ft() ? /* @__PURE__ */ f(q, { children: [
|
|
1669
1669
|
/* @__PURE__ */ n(
|
|
1670
1670
|
be,
|
|
1671
1671
|
{
|
|
@@ -1679,7 +1679,7 @@ const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import(
|
|
|
1679
1679
|
outbound: e,
|
|
1680
1680
|
onOutboundClick: t
|
|
1681
1681
|
}) => {
|
|
1682
|
-
const s = e.name || "Broadcast", r = /* @__PURE__ */ f(
|
|
1682
|
+
const s = e.name || "Broadcast", r = /* @__PURE__ */ f(q, { children: [
|
|
1683
1683
|
/* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(ma, { weight: "fill" }) }),
|
|
1684
1684
|
/* @__PURE__ */ n(
|
|
1685
1685
|
"span",
|
|
@@ -1712,14 +1712,14 @@ const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import(
|
|
|
1712
1712
|
var h;
|
|
1713
1713
|
const { isMyMessage: s, message: a, threadList: r } = fe(
|
|
1714
1714
|
"SentMessageDeliveryStatus"
|
|
1715
|
-
), i = s(),
|
|
1715
|
+
), i = s(), l = ft();
|
|
1716
1716
|
if (r)
|
|
1717
1717
|
return null;
|
|
1718
1718
|
if (a.status === "failed" && i && a.type !== "error")
|
|
1719
1719
|
return /* @__PURE__ */ n(xr, {});
|
|
1720
1720
|
if (!i)
|
|
1721
1721
|
return null;
|
|
1722
|
-
const
|
|
1722
|
+
const o = (h = a.metadata) == null ? void 0 : h.outbound_id, d = a.status !== "sending" && a.status !== "failed" && o && t ? /* @__PURE__ */ n(
|
|
1723
1723
|
vr,
|
|
1724
1724
|
{
|
|
1725
1725
|
outbound: t,
|
|
@@ -1736,7 +1736,7 @@ const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import(
|
|
|
1736
1736
|
);
|
|
1737
1737
|
return d ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
|
|
1738
1738
|
u,
|
|
1739
|
-
|
|
1739
|
+
l && /* @__PURE__ */ n("span", { className: "sent-message-outbound-separator", "aria-hidden": "true", children: "•" }),
|
|
1740
1740
|
d
|
|
1741
1741
|
] }) : u;
|
|
1742
1742
|
}, _r = /^([a-z][a-z0-9+.-]*):/i, yr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
@@ -1771,11 +1771,11 @@ const Nr = {
|
|
|
1771
1771
|
s ? "w-full" : "min-w-0",
|
|
1772
1772
|
!a && "mt-2",
|
|
1773
1773
|
Nr[e][r]
|
|
1774
|
-
),
|
|
1775
|
-
return
|
|
1774
|
+
), l = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), o = gt(t.href);
|
|
1775
|
+
return o ? /* @__PURE__ */ n(
|
|
1776
1776
|
"a",
|
|
1777
1777
|
{
|
|
1778
|
-
href:
|
|
1778
|
+
href: o,
|
|
1779
1779
|
target: "_blank",
|
|
1780
1780
|
rel: "noopener noreferrer",
|
|
1781
1781
|
onClick: (d) => {
|
|
@@ -1783,7 +1783,7 @@ const Nr = {
|
|
|
1783
1783
|
d.stopPropagation(), (u = t.onClick) == null || u.call(t);
|
|
1784
1784
|
},
|
|
1785
1785
|
className: `${i} no-underline`,
|
|
1786
|
-
children:
|
|
1786
|
+
children: l
|
|
1787
1787
|
}
|
|
1788
1788
|
) : /* @__PURE__ */ n(
|
|
1789
1789
|
"button",
|
|
@@ -1794,7 +1794,7 @@ const Nr = {
|
|
|
1794
1794
|
d.stopPropagation(), (u = t.onClick) == null || u.call(t);
|
|
1795
1795
|
},
|
|
1796
1796
|
className: i,
|
|
1797
|
-
children:
|
|
1797
|
+
children: l
|
|
1798
1798
|
}
|
|
1799
1799
|
);
|
|
1800
1800
|
}, kr = {
|
|
@@ -1813,14 +1813,14 @@ const Nr = {
|
|
|
1813
1813
|
title: a,
|
|
1814
1814
|
placeholderTitle: r,
|
|
1815
1815
|
description: i,
|
|
1816
|
-
descriptionLines:
|
|
1817
|
-
url:
|
|
1816
|
+
descriptionLines: l = 1,
|
|
1817
|
+
url: o,
|
|
1818
1818
|
appIcon: d,
|
|
1819
1819
|
cta: u,
|
|
1820
1820
|
trailingAction: h,
|
|
1821
1821
|
isLoading: m = !1
|
|
1822
1822
|
}) => {
|
|
1823
|
-
const g = e === "dark", c = a ?? (g ? r : void 0) ?? "", p = c.trim() !== "", w = i != null && i.trim() !== "", v = typeof
|
|
1823
|
+
const g = e === "dark", c = a ?? (g ? r : void 0) ?? "", p = c.trim() !== "", w = i != null && i.trim() !== "", v = typeof o == "string" ? o.trim() : "", x = v !== "", b = u != null;
|
|
1824
1824
|
if (!m && !p && !w && !x && !b)
|
|
1825
1825
|
return null;
|
|
1826
1826
|
const y = g && !a, _ = N(
|
|
@@ -1831,7 +1831,7 @@ const Nr = {
|
|
|
1831
1831
|
s == null && Qt[e]
|
|
1832
1832
|
), L = N(
|
|
1833
1833
|
"text-[12px] leading-4 tracking-[0.24px]",
|
|
1834
|
-
|
|
1834
|
+
l <= 1 && "truncate",
|
|
1835
1835
|
s == null && Qt[e]
|
|
1836
1836
|
);
|
|
1837
1837
|
if (m) {
|
|
@@ -1844,11 +1844,11 @@ const Nr = {
|
|
|
1844
1844
|
/* @__PURE__ */ n("div", { className: N("h-4 w-1/2", F), "aria-hidden": !0 })
|
|
1845
1845
|
] }) });
|
|
1846
1846
|
}
|
|
1847
|
-
const E = s ? { color: s } : void 0,
|
|
1847
|
+
const E = s ? { color: s } : void 0, z = l > 1 ? {
|
|
1848
1848
|
...E,
|
|
1849
1849
|
display: "-webkit-box",
|
|
1850
1850
|
WebkitBoxOrient: "vertical",
|
|
1851
|
-
WebkitLineClamp:
|
|
1851
|
+
WebkitLineClamp: l,
|
|
1852
1852
|
overflow: "hidden"
|
|
1853
1853
|
} : E;
|
|
1854
1854
|
return /* @__PURE__ */ f("div", { className: "shrink-0 px-4 py-3", children: [
|
|
@@ -1865,7 +1865,7 @@ const Nr = {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
)
|
|
1867
1867
|
] }),
|
|
1868
|
-
w && /* @__PURE__ */ n("p", { className: L, style:
|
|
1868
|
+
w && /* @__PURE__ */ n("p", { className: L, style: z, children: i }),
|
|
1869
1869
|
!b && x && /* @__PURE__ */ n("p", { className: T, style: E, children: v })
|
|
1870
1870
|
] }),
|
|
1871
1871
|
h && /* @__PURE__ */ n("div", { className: "shrink-0", children: h })
|
|
@@ -1889,8 +1889,8 @@ const Nr = {
|
|
|
1889
1889
|
onClick: a,
|
|
1890
1890
|
ariaLabel: r,
|
|
1891
1891
|
rootRef: i,
|
|
1892
|
-
topRight:
|
|
1893
|
-
bgClassName:
|
|
1892
|
+
topRight: l,
|
|
1893
|
+
bgClassName: o,
|
|
1894
1894
|
accentHex: d,
|
|
1895
1895
|
fixedHeight: u = !1,
|
|
1896
1896
|
busy: h = !1,
|
|
@@ -1916,12 +1916,12 @@ const Nr = {
|
|
|
1916
1916
|
// `--str-chat__own-message-bubble-background-color` and `#f1f0ee` is
|
|
1917
1917
|
// `--str-chat__message-bubble-background-color`, mirrored by the bubble
|
|
1918
1918
|
// tail's own fills in `styles.css`.
|
|
1919
|
-
|
|
1919
|
+
o ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"),
|
|
1920
1920
|
// `focus-ring` is a design-system utility from the component-library
|
|
1921
1921
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
1922
1922
|
// with offset, so keyboard users can see the focused card.
|
|
1923
1923
|
g ? "cursor-pointer no-underline focus-ring" : null
|
|
1924
|
-
), p = h ? { role: "status", "aria-busy": !0, "aria-label": Er } : void 0, w = d ? { "--accent": d } : void 0, v =
|
|
1924
|
+
), p = h ? { role: "status", "aria-busy": !0, "aria-label": Er } : void 0, w = d ? { "--accent": d } : void 0, v = l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
|
|
1925
1925
|
return s ? /* @__PURE__ */ f(
|
|
1926
1926
|
"a",
|
|
1927
1927
|
{
|
|
@@ -1989,12 +1989,12 @@ const Nr = {
|
|
|
1989
1989
|
title: a,
|
|
1990
1990
|
mimeType: r = "image/*",
|
|
1991
1991
|
topLeft: i,
|
|
1992
|
-
topRight:
|
|
1993
|
-
isLoading:
|
|
1992
|
+
topRight: l,
|
|
1993
|
+
isLoading: o = !1,
|
|
1994
1994
|
onImageError: d
|
|
1995
1995
|
}) => {
|
|
1996
1996
|
const u = de(r), h = !!s && u === "video", m = ce(t);
|
|
1997
|
-
return !
|
|
1997
|
+
return !o && Te(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
1998
1998
|
"audio",
|
|
1999
1999
|
{
|
|
2000
2000
|
src: s,
|
|
@@ -2014,7 +2014,7 @@ const Nr = {
|
|
|
2014
2014
|
h && "bg-black"
|
|
2015
2015
|
),
|
|
2016
2016
|
children: [
|
|
2017
|
-
|
|
2017
|
+
o ? (
|
|
2018
2018
|
// Reuses the placeholder fill: a fixed `bg-black/[0.06]` would be
|
|
2019
2019
|
// invisible on the dark card's dark surface. Stock Tailwind only
|
|
2020
2020
|
// — `animate-shimmer` exists in this package's own tailwind config but
|
|
@@ -2030,7 +2030,7 @@ const Nr = {
|
|
|
2030
2030
|
"aria-hidden": !0
|
|
2031
2031
|
}
|
|
2032
2032
|
)
|
|
2033
|
-
) : h ? /* @__PURE__ */ f(
|
|
2033
|
+
) : h ? /* @__PURE__ */ f(q, { children: [
|
|
2034
2034
|
/* @__PURE__ */ n(
|
|
2035
2035
|
"video",
|
|
2036
2036
|
{
|
|
@@ -2078,7 +2078,7 @@ const Nr = {
|
|
|
2078
2078
|
}
|
|
2079
2079
|
),
|
|
2080
2080
|
i ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-10", children: i }) : null,
|
|
2081
|
-
|
|
2081
|
+
l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null
|
|
2082
2082
|
]
|
|
2083
2083
|
}
|
|
2084
2084
|
);
|
|
@@ -2098,17 +2098,17 @@ function Ge({
|
|
|
2098
2098
|
layout: a = "featured",
|
|
2099
2099
|
thumbnailUrl: r,
|
|
2100
2100
|
mimeType: i,
|
|
2101
|
-
sourceUrl:
|
|
2101
|
+
sourceUrl: l
|
|
2102
2102
|
}) {
|
|
2103
|
-
const [
|
|
2104
|
-
|
|
2103
|
+
const [o, d] = P.useState(!1);
|
|
2104
|
+
P.useEffect(() => {
|
|
2105
2105
|
d(!1);
|
|
2106
2106
|
}, [r]);
|
|
2107
|
-
const u =
|
|
2107
|
+
const u = P.useCallback(() => {
|
|
2108
2108
|
d(!0);
|
|
2109
|
-
}, []), h = Te(i,
|
|
2109
|
+
}, []), h = Te(i, l), c = a === "featured" && !!r && !h && !o && s === "ready" && t != null && Rr.test(t.trim()) ? Lr(t) : void 0, p = h ? Pn : Dr[e];
|
|
2110
2110
|
return {
|
|
2111
|
-
thumbnailUrl:
|
|
2111
|
+
thumbnailUrl: o ? void 0 : r,
|
|
2112
2112
|
accentHex: c,
|
|
2113
2113
|
chinTextColor: p,
|
|
2114
2114
|
surface: h ? "light" : e,
|
|
@@ -2116,15 +2116,15 @@ function Ge({
|
|
|
2116
2116
|
onImageError: u
|
|
2117
2117
|
};
|
|
2118
2118
|
}
|
|
2119
|
-
const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Pr = "relative before:absolute before:-inset-[10px] before:content-['']",
|
|
2119
|
+
const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Pr = "relative before:absolute before:-inset-[10px] before:content-['']", Fr = ({
|
|
2120
2120
|
title: e,
|
|
2121
2121
|
placeholderTitle: t,
|
|
2122
2122
|
description: s,
|
|
2123
2123
|
descriptionLines: a,
|
|
2124
2124
|
url: r,
|
|
2125
2125
|
mimeType: i,
|
|
2126
|
-
thumbnailUrl:
|
|
2127
|
-
sourceUrl:
|
|
2126
|
+
thumbnailUrl: l,
|
|
2127
|
+
sourceUrl: o,
|
|
2128
2128
|
layout: d = "featured",
|
|
2129
2129
|
appIcon: u,
|
|
2130
2130
|
cta: h,
|
|
@@ -2134,14 +2134,14 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2134
2134
|
onEditClick: p,
|
|
2135
2135
|
dismissLabel: w = "Dismiss attachment"
|
|
2136
2136
|
}) => {
|
|
2137
|
-
const v = d === "classic", x = Te(i,
|
|
2137
|
+
const v = d === "classic", x = Te(i, o), b = Ge({
|
|
2138
2138
|
variant: "dark",
|
|
2139
2139
|
accentColor: m,
|
|
2140
2140
|
status: g,
|
|
2141
2141
|
layout: d,
|
|
2142
|
-
thumbnailUrl:
|
|
2142
|
+
thumbnailUrl: l,
|
|
2143
2143
|
mimeType: i,
|
|
2144
|
-
sourceUrl:
|
|
2144
|
+
sourceUrl: o
|
|
2145
2145
|
}), y = c ? /* @__PURE__ */ n(
|
|
2146
2146
|
"button",
|
|
2147
2147
|
{
|
|
@@ -2152,7 +2152,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2152
2152
|
Or,
|
|
2153
2153
|
!x && Pr
|
|
2154
2154
|
),
|
|
2155
|
-
children: /* @__PURE__ */ n(
|
|
2155
|
+
children: /* @__PURE__ */ n(ot, { className: "size-3", weight: "bold" })
|
|
2156
2156
|
}
|
|
2157
2157
|
) : void 0, _ = p ? /* @__PURE__ */ n(
|
|
2158
2158
|
"button",
|
|
@@ -2169,7 +2169,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2169
2169
|
Ie,
|
|
2170
2170
|
{
|
|
2171
2171
|
variant: "dark",
|
|
2172
|
-
sourceUrl:
|
|
2172
|
+
sourceUrl: o,
|
|
2173
2173
|
title: e,
|
|
2174
2174
|
mimeType: i
|
|
2175
2175
|
}
|
|
@@ -2189,7 +2189,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2189
2189
|
{
|
|
2190
2190
|
variant: "dark",
|
|
2191
2191
|
thumbnailUrl: b.thumbnailUrl,
|
|
2192
|
-
sourceUrl:
|
|
2192
|
+
sourceUrl: o,
|
|
2193
2193
|
title: e,
|
|
2194
2194
|
mimeType: i,
|
|
2195
2195
|
topRight: y,
|
|
@@ -2242,15 +2242,15 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2242
2242
|
}
|
|
2243
2243
|
)
|
|
2244
2244
|
] })
|
|
2245
|
-
) : /* @__PURE__ */ n(
|
|
2245
|
+
) : /* @__PURE__ */ n(q, { children: a }), zr = ({
|
|
2246
2246
|
title: e,
|
|
2247
2247
|
description: t,
|
|
2248
2248
|
descriptionLines: s,
|
|
2249
2249
|
url: a,
|
|
2250
2250
|
mimeType: r,
|
|
2251
2251
|
thumbnailUrl: i,
|
|
2252
|
-
sourceUrl:
|
|
2253
|
-
layout:
|
|
2252
|
+
sourceUrl: l,
|
|
2253
|
+
layout: o = "featured",
|
|
2254
2254
|
appIcon: d,
|
|
2255
2255
|
cta: u,
|
|
2256
2256
|
accentColor: h,
|
|
@@ -2258,7 +2258,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2258
2258
|
onClick: g,
|
|
2259
2259
|
groupPosition: c = "single"
|
|
2260
2260
|
}) => {
|
|
2261
|
-
const p = bt(r,
|
|
2261
|
+
const p = bt(r, l), w = gt(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Te(r, l) ? vt : void 0, y = u && g ? {
|
|
2262
2262
|
...u,
|
|
2263
2263
|
onClick: () => {
|
|
2264
2264
|
var T;
|
|
@@ -2268,10 +2268,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2268
2268
|
variant: "light",
|
|
2269
2269
|
accentColor: h,
|
|
2270
2270
|
status: m,
|
|
2271
|
-
layout:
|
|
2271
|
+
layout: o,
|
|
2272
2272
|
thumbnailUrl: i,
|
|
2273
2273
|
mimeType: r,
|
|
2274
|
-
sourceUrl:
|
|
2274
|
+
sourceUrl: l
|
|
2275
2275
|
});
|
|
2276
2276
|
return /* @__PURE__ */ n(
|
|
2277
2277
|
xt,
|
|
@@ -2286,18 +2286,18 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2286
2286
|
href: v,
|
|
2287
2287
|
onClick: x,
|
|
2288
2288
|
ariaLabel: e ?? "Open attachment preview",
|
|
2289
|
-
fixedHeight:
|
|
2289
|
+
fixedHeight: o === "featured" && b == null,
|
|
2290
2290
|
accentHex: _.accentHex,
|
|
2291
2291
|
busy: _.isLoading,
|
|
2292
2292
|
bgClassName: b,
|
|
2293
2293
|
"data-testid": "link-attachment",
|
|
2294
2294
|
children: [
|
|
2295
|
-
|
|
2295
|
+
o === "featured" && /* @__PURE__ */ n(
|
|
2296
2296
|
Ie,
|
|
2297
2297
|
{
|
|
2298
2298
|
variant: "light",
|
|
2299
2299
|
thumbnailUrl: _.thumbnailUrl,
|
|
2300
|
-
sourceUrl:
|
|
2300
|
+
sourceUrl: l,
|
|
2301
2301
|
title: e,
|
|
2302
2302
|
mimeType: r,
|
|
2303
2303
|
isLoading: _.isLoading,
|
|
@@ -2331,8 +2331,8 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2331
2331
|
descriptionLines: a,
|
|
2332
2332
|
url: r,
|
|
2333
2333
|
mimeType: i,
|
|
2334
|
-
thumbnailUrl:
|
|
2335
|
-
sourceUrl:
|
|
2334
|
+
thumbnailUrl: l,
|
|
2335
|
+
sourceUrl: o,
|
|
2336
2336
|
layout: d = "featured",
|
|
2337
2337
|
appIcon: u,
|
|
2338
2338
|
cta: h,
|
|
@@ -2341,14 +2341,14 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2341
2341
|
onClick: c,
|
|
2342
2342
|
groupPosition: p = "single"
|
|
2343
2343
|
}) => {
|
|
2344
|
-
const w = bt(i,
|
|
2344
|
+
const w = bt(i, o), v = gt(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, y = g !== "loading" && Te(i, o), _ = Ge({
|
|
2345
2345
|
variant: "dark",
|
|
2346
2346
|
accentColor: m,
|
|
2347
2347
|
status: g,
|
|
2348
2348
|
layout: d,
|
|
2349
|
-
thumbnailUrl:
|
|
2349
|
+
thumbnailUrl: l,
|
|
2350
2350
|
mimeType: i,
|
|
2351
|
-
sourceUrl:
|
|
2351
|
+
sourceUrl: o
|
|
2352
2352
|
});
|
|
2353
2353
|
return /* @__PURE__ */ n(
|
|
2354
2354
|
xt,
|
|
@@ -2372,7 +2372,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2372
2372
|
{
|
|
2373
2373
|
variant: "dark",
|
|
2374
2374
|
thumbnailUrl: _.thumbnailUrl,
|
|
2375
|
-
sourceUrl:
|
|
2375
|
+
sourceUrl: o,
|
|
2376
2376
|
title: e,
|
|
2377
2377
|
mimeType: i,
|
|
2378
2378
|
isLoading: _.isLoading,
|
|
@@ -2401,9 +2401,9 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2401
2401
|
}
|
|
2402
2402
|
);
|
|
2403
2403
|
}, it = {
|
|
2404
|
-
Composer:
|
|
2404
|
+
Composer: Fr,
|
|
2405
2405
|
Sent: $r,
|
|
2406
|
-
Received:
|
|
2406
|
+
Received: zr
|
|
2407
2407
|
}, Br = {
|
|
2408
2408
|
dark: "bg-[#1e2330]",
|
|
2409
2409
|
light: "bg-[#f2f1ef]"
|
|
@@ -2433,12 +2433,12 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2433
2433
|
groupPosition: a = "single",
|
|
2434
2434
|
widthClassName: r = "w-[280px]",
|
|
2435
2435
|
paddingClassName: i = "px-2 py-2",
|
|
2436
|
-
radiusClassName:
|
|
2437
|
-
className:
|
|
2436
|
+
radiusClassName: l,
|
|
2437
|
+
className: o,
|
|
2438
2438
|
children: d,
|
|
2439
2439
|
"data-testid": u
|
|
2440
2440
|
}) => {
|
|
2441
|
-
const h = t != null && t !== "", m =
|
|
2441
|
+
const h = t != null && t !== "", m = l ?? Vr[Hr(e)][a];
|
|
2442
2442
|
return /* @__PURE__ */ f(
|
|
2443
2443
|
"div",
|
|
2444
2444
|
{
|
|
@@ -2471,7 +2471,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2471
2471
|
Ur[e],
|
|
2472
2472
|
s && "border",
|
|
2473
2473
|
s && jr[e],
|
|
2474
|
-
|
|
2474
|
+
o
|
|
2475
2475
|
),
|
|
2476
2476
|
children: [
|
|
2477
2477
|
d,
|
|
@@ -2514,9 +2514,9 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2514
2514
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
2515
2515
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
2516
2516
|
),
|
|
2517
|
-
children: /* @__PURE__ */ n(
|
|
2517
|
+
children: /* @__PURE__ */ n(ot, { className: "size-3", weight: "bold" })
|
|
2518
2518
|
}
|
|
2519
|
-
), Le = (e) => e === "received" ? "light" : "dark",
|
|
2519
|
+
), Le = (e) => e === "received" ? "light" : "dark", rl = ({
|
|
2520
2520
|
firstOfGroup: e,
|
|
2521
2521
|
endOfGroup: t,
|
|
2522
2522
|
groupedByUser: s
|
|
@@ -2544,20 +2544,20 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2544
2544
|
filename: a,
|
|
2545
2545
|
items: r,
|
|
2546
2546
|
text: i,
|
|
2547
|
-
groupPosition:
|
|
2548
|
-
preload:
|
|
2547
|
+
groupPosition: l,
|
|
2548
|
+
preload: o,
|
|
2549
2549
|
onDismiss: d
|
|
2550
2550
|
}) => {
|
|
2551
2551
|
const u = Le(e), h = e === "composer" && !!d, m = Gr({ src: t, mimeType: s, filename: a, items: r });
|
|
2552
2552
|
if (m.length === 0)
|
|
2553
2553
|
return null;
|
|
2554
|
-
const g =
|
|
2554
|
+
const g = o ?? (m.length > 1 ? "none" : "metadata");
|
|
2555
2555
|
return /* @__PURE__ */ n(
|
|
2556
2556
|
Ae,
|
|
2557
2557
|
{
|
|
2558
2558
|
variant: u,
|
|
2559
2559
|
text: i,
|
|
2560
|
-
groupPosition:
|
|
2560
|
+
groupPosition: l,
|
|
2561
2561
|
"data-testid": "audio-attachment",
|
|
2562
2562
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, p) => /* @__PURE__ */ n(
|
|
2563
2563
|
Yr,
|
|
@@ -2574,10 +2574,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2574
2574
|
)) })
|
|
2575
2575
|
}
|
|
2576
2576
|
);
|
|
2577
|
-
}, Wr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }),
|
|
2577
|
+
}, Wr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }), Kr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "received" }), qr = {
|
|
2578
2578
|
Composer: Wr,
|
|
2579
|
-
Sent:
|
|
2580
|
-
Received:
|
|
2579
|
+
Sent: Kr,
|
|
2580
|
+
Received: Xr
|
|
2581
2581
|
};
|
|
2582
2582
|
function Zr(e) {
|
|
2583
2583
|
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`;
|
|
@@ -2631,15 +2631,15 @@ const ti = {
|
|
|
2631
2631
|
}, si = {
|
|
2632
2632
|
dark: "text-white/85",
|
|
2633
2633
|
light: "text-black/85"
|
|
2634
|
-
},
|
|
2634
|
+
}, Fn = ({
|
|
2635
2635
|
variant: e,
|
|
2636
2636
|
filename: t,
|
|
2637
2637
|
title: s,
|
|
2638
2638
|
mimeType: a = "application/octet-stream",
|
|
2639
2639
|
fileSize: r,
|
|
2640
2640
|
onActivate: i,
|
|
2641
|
-
activateLabel:
|
|
2642
|
-
trailingAction:
|
|
2641
|
+
activateLabel: l,
|
|
2642
|
+
trailingAction: o
|
|
2643
2643
|
}) => {
|
|
2644
2644
|
const d = s ?? t ?? "File", u = ei(a, t, r), h = /* @__PURE__ */ n(
|
|
2645
2645
|
"div",
|
|
@@ -2671,7 +2671,7 @@ const ti = {
|
|
|
2671
2671
|
{
|
|
2672
2672
|
type: "button",
|
|
2673
2673
|
onClick: i,
|
|
2674
|
-
"aria-label":
|
|
2674
|
+
"aria-label": l,
|
|
2675
2675
|
className: N(
|
|
2676
2676
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
2677
2677
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
@@ -2681,22 +2681,22 @@ const ti = {
|
|
|
2681
2681
|
m
|
|
2682
2682
|
]
|
|
2683
2683
|
}
|
|
2684
|
-
) : /* @__PURE__ */ f(
|
|
2684
|
+
) : /* @__PURE__ */ f(q, { children: [
|
|
2685
2685
|
h,
|
|
2686
2686
|
m
|
|
2687
2687
|
] });
|
|
2688
2688
|
return /* @__PURE__ */ f("div", { className: "flex items-center gap-3 px-3 py-2", children: [
|
|
2689
2689
|
g,
|
|
2690
|
-
|
|
2690
|
+
o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
|
|
2691
2691
|
] });
|
|
2692
2692
|
};
|
|
2693
|
-
async function
|
|
2693
|
+
async function zn(e, t) {
|
|
2694
2694
|
const s = t ?? re(e);
|
|
2695
2695
|
try {
|
|
2696
2696
|
const a = await fetch(e, { mode: "cors" });
|
|
2697
2697
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
2698
|
-
const r = await a.blob(), i = URL.createObjectURL(r),
|
|
2699
|
-
|
|
2698
|
+
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
2699
|
+
l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
2700
2700
|
} catch {
|
|
2701
2701
|
if (!window.open(e, "_blank", "noopener,noreferrer")) {
|
|
2702
2702
|
const r = document.createElement("a");
|
|
@@ -2720,7 +2720,7 @@ const ai = ({
|
|
|
2720
2720
|
}) => {
|
|
2721
2721
|
const i = t.filename ?? re(t.src);
|
|
2722
2722
|
return /* @__PURE__ */ n(
|
|
2723
|
-
|
|
2723
|
+
Fn,
|
|
2724
2724
|
{
|
|
2725
2725
|
variant: e,
|
|
2726
2726
|
filename: i,
|
|
@@ -2739,8 +2739,8 @@ const ai = ({
|
|
|
2739
2739
|
fileSize: a,
|
|
2740
2740
|
mimeType: r,
|
|
2741
2741
|
title: i,
|
|
2742
|
-
items:
|
|
2743
|
-
text:
|
|
2742
|
+
items: l,
|
|
2743
|
+
text: o,
|
|
2744
2744
|
groupPosition: d,
|
|
2745
2745
|
onClick: u,
|
|
2746
2746
|
onDismiss: h
|
|
@@ -2751,13 +2751,13 @@ const ai = ({
|
|
|
2751
2751
|
fileSize: a,
|
|
2752
2752
|
mimeType: r,
|
|
2753
2753
|
title: i,
|
|
2754
|
-
items:
|
|
2754
|
+
items: l
|
|
2755
2755
|
}), p = (v) => {
|
|
2756
2756
|
if ((u == null ? void 0 : u(v)) === !1) return;
|
|
2757
2757
|
const x = c[v];
|
|
2758
2758
|
if (!x) return;
|
|
2759
2759
|
const b = x.filename ?? re(x.src);
|
|
2760
|
-
|
|
2760
|
+
zn(x.src, b);
|
|
2761
2761
|
};
|
|
2762
2762
|
if (c.length === 0)
|
|
2763
2763
|
return null;
|
|
@@ -2776,7 +2776,7 @@ const ai = ({
|
|
|
2776
2776
|
Ae,
|
|
2777
2777
|
{
|
|
2778
2778
|
variant: m,
|
|
2779
|
-
text:
|
|
2779
|
+
text: o,
|
|
2780
2780
|
groupPosition: d,
|
|
2781
2781
|
"data-testid": "file-attachment",
|
|
2782
2782
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
|
|
@@ -2792,16 +2792,16 @@ const ai = ({
|
|
|
2792
2792
|
)) })
|
|
2793
2793
|
}
|
|
2794
2794
|
);
|
|
2795
|
-
}, ii = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }),
|
|
2795
|
+
}, ii = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }), oi = (e) => /* @__PURE__ */ n(_t, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(_t, { ...e, state: "received" }), ci = {
|
|
2796
2796
|
Composer: ii,
|
|
2797
|
-
Sent:
|
|
2798
|
-
Received:
|
|
2797
|
+
Sent: oi,
|
|
2798
|
+
Received: li
|
|
2799
2799
|
}, $n = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", tn = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", yt = ({
|
|
2800
2800
|
onPrev: e,
|
|
2801
2801
|
onNext: t,
|
|
2802
2802
|
prevLabel: s = "Previous",
|
|
2803
2803
|
nextLabel: a = "Next"
|
|
2804
|
-
}) => /* @__PURE__ */ f(
|
|
2804
|
+
}) => /* @__PURE__ */ f(q, { children: [
|
|
2805
2805
|
/* @__PURE__ */ n(
|
|
2806
2806
|
"button",
|
|
2807
2807
|
{
|
|
@@ -2829,16 +2829,16 @@ const ai = ({
|
|
|
2829
2829
|
label: a = "Download",
|
|
2830
2830
|
iconOnly: r,
|
|
2831
2831
|
tone: i = "dark",
|
|
2832
|
-
onTriggered:
|
|
2832
|
+
onTriggered: l
|
|
2833
2833
|
}) => {
|
|
2834
|
-
const [
|
|
2834
|
+
const [o, d] = $(!1), u = K(
|
|
2835
2835
|
(c) => {
|
|
2836
|
-
c.stopPropagation(), !
|
|
2836
|
+
c.stopPropagation(), !o && (d(!0), zn(e, t).catch(() => {
|
|
2837
2837
|
}).finally(() => {
|
|
2838
|
-
d(!1),
|
|
2838
|
+
d(!1), l == null || l();
|
|
2839
2839
|
}));
|
|
2840
2840
|
},
|
|
2841
|
-
[
|
|
2841
|
+
[o, e, t, l]
|
|
2842
2842
|
), h = r ?? s !== "pill", g = { className: N(
|
|
2843
2843
|
s === "pill" ? "size-4" : "size-5",
|
|
2844
2844
|
"shrink-0"
|
|
@@ -2848,7 +2848,7 @@ const ai = ({
|
|
|
2848
2848
|
{
|
|
2849
2849
|
type: "button",
|
|
2850
2850
|
onClick: u,
|
|
2851
|
-
disabled:
|
|
2851
|
+
disabled: o,
|
|
2852
2852
|
"aria-label": a,
|
|
2853
2853
|
className: N(
|
|
2854
2854
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
@@ -2857,7 +2857,7 @@ const ai = ({
|
|
|
2857
2857
|
light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
|
|
2858
2858
|
}[i]
|
|
2859
2859
|
),
|
|
2860
|
-
children:
|
|
2860
|
+
children: o ? /* @__PURE__ */ n(
|
|
2861
2861
|
be,
|
|
2862
2862
|
{
|
|
2863
2863
|
className: "size-4 animate-spin",
|
|
@@ -2878,24 +2878,24 @@ const ai = ({
|
|
|
2878
2878
|
{
|
|
2879
2879
|
type: "button",
|
|
2880
2880
|
onClick: u,
|
|
2881
|
-
disabled:
|
|
2881
|
+
disabled: o,
|
|
2882
2882
|
"aria-label": a,
|
|
2883
2883
|
className: $n,
|
|
2884
|
-
children:
|
|
2884
|
+
children: o ? /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2885
2885
|
}
|
|
2886
2886
|
) : /* @__PURE__ */ f(
|
|
2887
2887
|
"button",
|
|
2888
2888
|
{
|
|
2889
2889
|
type: "button",
|
|
2890
2890
|
onClick: u,
|
|
2891
|
-
disabled:
|
|
2891
|
+
disabled: o,
|
|
2892
2892
|
"aria-label": h ? a : void 0,
|
|
2893
2893
|
className: N(
|
|
2894
2894
|
"mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
|
|
2895
2895
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
2896
2896
|
),
|
|
2897
2897
|
children: [
|
|
2898
|
-
|
|
2898
|
+
o ? /* @__PURE__ */ n(
|
|
2899
2899
|
be,
|
|
2900
2900
|
{
|
|
2901
2901
|
className: "size-4 animate-spin",
|
|
@@ -2912,15 +2912,15 @@ const ai = ({
|
|
|
2912
2912
|
initialIndex: t,
|
|
2913
2913
|
open: s
|
|
2914
2914
|
}) => {
|
|
2915
|
-
const a = Qe(t, 0, Math.max(e - 1, 0)), [r, i] =
|
|
2915
|
+
const a = Qe(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
|
|
2916
2916
|
W(() => {
|
|
2917
2917
|
s && i(Qe(t, 0, Math.max(e - 1, 0)));
|
|
2918
2918
|
}, [s, t, e]), W(() => {
|
|
2919
2919
|
i((d) => Qe(d, 0, Math.max(e - 1, 0)));
|
|
2920
2920
|
}, [e]);
|
|
2921
|
-
const
|
|
2921
|
+
const l = K(() => {
|
|
2922
2922
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
2923
|
-
}, [e]),
|
|
2923
|
+
}, [e]), o = K(() => {
|
|
2924
2924
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
2925
2925
|
}, [e]);
|
|
2926
2926
|
return W(() => {
|
|
@@ -2928,10 +2928,10 @@ const ai = ({
|
|
|
2928
2928
|
const d = (u) => {
|
|
2929
2929
|
if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
|
|
2930
2930
|
const h = document.activeElement;
|
|
2931
|
-
h && (h.tagName === "VIDEO" || h.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ?
|
|
2931
|
+
h && (h.tagName === "VIDEO" || h.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? l() : o());
|
|
2932
2932
|
};
|
|
2933
2933
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
2934
|
-
}, [s, e,
|
|
2934
|
+
}, [s, e, l, o]), { index: r, prev: l, next: o };
|
|
2935
2935
|
}, kt = ({
|
|
2936
2936
|
open: e,
|
|
2937
2937
|
onClose: t,
|
|
@@ -2939,12 +2939,12 @@ const ai = ({
|
|
|
2939
2939
|
counter: a,
|
|
2940
2940
|
actions: r,
|
|
2941
2941
|
children: i,
|
|
2942
|
-
"data-testid":
|
|
2942
|
+
"data-testid": l
|
|
2943
2943
|
}) => {
|
|
2944
|
-
const
|
|
2944
|
+
const o = V(null), d = V(null);
|
|
2945
2945
|
return W(() => {
|
|
2946
2946
|
var g;
|
|
2947
|
-
const m =
|
|
2947
|
+
const m = o.current;
|
|
2948
2948
|
if (m) {
|
|
2949
2949
|
if (e) {
|
|
2950
2950
|
if (!m.open)
|
|
@@ -2990,15 +2990,15 @@ const ai = ({
|
|
|
2990
2990
|
/* @__PURE__ */ f(
|
|
2991
2991
|
"dialog",
|
|
2992
2992
|
{
|
|
2993
|
-
ref:
|
|
2993
|
+
ref: o,
|
|
2994
2994
|
className: "mes-media-viewer",
|
|
2995
2995
|
"aria-label": s ?? "Attachment viewer",
|
|
2996
|
-
"data-testid":
|
|
2996
|
+
"data-testid": l,
|
|
2997
2997
|
onClose: () => {
|
|
2998
2998
|
t();
|
|
2999
2999
|
},
|
|
3000
3000
|
onClick: (m) => {
|
|
3001
|
-
m.target ===
|
|
3001
|
+
m.target === o.current && t();
|
|
3002
3002
|
},
|
|
3003
3003
|
children: [
|
|
3004
3004
|
/* @__PURE__ */ f("div", { className: "pointer-events-none absolute inset-x-3 top-3 z-[1] flex items-center justify-between gap-3", children: [
|
|
@@ -3013,7 +3013,7 @@ const ai = ({
|
|
|
3013
3013
|
onClick: t,
|
|
3014
3014
|
"aria-label": "Close viewer",
|
|
3015
3015
|
className: $n,
|
|
3016
|
-
children: /* @__PURE__ */ n(
|
|
3016
|
+
children: /* @__PURE__ */ n(ot, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3017
3017
|
}
|
|
3018
3018
|
)
|
|
3019
3019
|
] })
|
|
@@ -3028,15 +3028,15 @@ const ai = ({
|
|
|
3028
3028
|
initialIndex: s = 0,
|
|
3029
3029
|
onClose: a
|
|
3030
3030
|
}) => {
|
|
3031
|
-
const { index: r, prev: i, next:
|
|
3031
|
+
const { index: r, prev: i, next: l } = Nt({
|
|
3032
3032
|
length: t.length,
|
|
3033
3033
|
initialIndex: s,
|
|
3034
3034
|
open: e
|
|
3035
|
-
}),
|
|
3036
|
-
() => (
|
|
3037
|
-
[
|
|
3035
|
+
}), o = t[r], d = oe(
|
|
3036
|
+
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "image"),
|
|
3037
|
+
[o]
|
|
3038
3038
|
);
|
|
3039
|
-
return
|
|
3039
|
+
return o ? /* @__PURE__ */ f(
|
|
3040
3040
|
kt,
|
|
3041
3041
|
{
|
|
3042
3042
|
open: e,
|
|
@@ -3046,7 +3046,7 @@ const ai = ({
|
|
|
3046
3046
|
actions: /* @__PURE__ */ n(
|
|
3047
3047
|
Bn,
|
|
3048
3048
|
{
|
|
3049
|
-
url:
|
|
3049
|
+
url: o.src,
|
|
3050
3050
|
filename: d,
|
|
3051
3051
|
variant: "viewer",
|
|
3052
3052
|
label: `Download ${d}`
|
|
@@ -3057,19 +3057,19 @@ const ai = ({
|
|
|
3057
3057
|
e ? /* @__PURE__ */ n(
|
|
3058
3058
|
"img",
|
|
3059
3059
|
{
|
|
3060
|
-
src:
|
|
3061
|
-
alt:
|
|
3060
|
+
src: o.src,
|
|
3061
|
+
alt: o.alt ?? d,
|
|
3062
3062
|
draggable: !1,
|
|
3063
3063
|
decoding: "async",
|
|
3064
3064
|
className: "block h-auto max-h-[calc(100dvh-128px)] w-auto max-w-[min(96vw,1400px)] select-none object-contain"
|
|
3065
3065
|
},
|
|
3066
|
-
`${r}:${
|
|
3066
|
+
`${r}:${o.src}`
|
|
3067
3067
|
) : null,
|
|
3068
3068
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3069
3069
|
yt,
|
|
3070
3070
|
{
|
|
3071
3071
|
onPrev: i,
|
|
3072
|
-
onNext:
|
|
3072
|
+
onNext: l,
|
|
3073
3073
|
prevLabel: "Previous image",
|
|
3074
3074
|
nextLabel: "Next image"
|
|
3075
3075
|
}
|
|
@@ -3096,12 +3096,12 @@ const ai = ({
|
|
|
3096
3096
|
}) => {
|
|
3097
3097
|
const i = e.length;
|
|
3098
3098
|
if (i === 0) return null;
|
|
3099
|
-
const
|
|
3099
|
+
const l = e.slice(0, Math.min(i, s)), o = i - l.length, d = (h, m, g) => {
|
|
3100
3100
|
var p;
|
|
3101
3101
|
const c = N(
|
|
3102
3102
|
di,
|
|
3103
3103
|
"h-full w-full",
|
|
3104
|
-
(p = ui[
|
|
3104
|
+
(p = ui[l.length]) == null ? void 0 : p[m]
|
|
3105
3105
|
);
|
|
3106
3106
|
return t ? /* @__PURE__ */ f(
|
|
3107
3107
|
"button",
|
|
@@ -3129,7 +3129,7 @@ const ai = ({
|
|
|
3129
3129
|
width: `min(var(${mi}), ${Math.round(fi * a * 100) / 100}px)`,
|
|
3130
3130
|
// Only bites in a container narrower than the width cap.
|
|
3131
3131
|
maxWidth: "100%"
|
|
3132
|
-
}),
|
|
3132
|
+
}), l.length === 1 ? /* @__PURE__ */ n(
|
|
3133
3133
|
"div",
|
|
3134
3134
|
{
|
|
3135
3135
|
className: N(
|
|
@@ -3137,18 +3137,18 @@ const ai = ({
|
|
|
3137
3137
|
r
|
|
3138
3138
|
),
|
|
3139
3139
|
style: u,
|
|
3140
|
-
children: d(
|
|
3140
|
+
children: d(l[0], 0)
|
|
3141
3141
|
}
|
|
3142
|
-
) :
|
|
3142
|
+
) : l.length === 2 ? /* @__PURE__ */ n(
|
|
3143
3143
|
"div",
|
|
3144
3144
|
{
|
|
3145
3145
|
className: N(
|
|
3146
3146
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
3147
3147
|
r
|
|
3148
3148
|
),
|
|
3149
|
-
children:
|
|
3149
|
+
children: l.map((h, m) => d(h, m))
|
|
3150
3150
|
}
|
|
3151
|
-
) :
|
|
3151
|
+
) : l.length === 3 ? /* @__PURE__ */ f(
|
|
3152
3152
|
"div",
|
|
3153
3153
|
{
|
|
3154
3154
|
className: N(
|
|
@@ -3156,9 +3156,9 @@ const ai = ({
|
|
|
3156
3156
|
r
|
|
3157
3157
|
),
|
|
3158
3158
|
children: [
|
|
3159
|
-
/* @__PURE__ */ n("div", { className: "row-span-2", children: d(
|
|
3160
|
-
d(
|
|
3161
|
-
d(
|
|
3159
|
+
/* @__PURE__ */ n("div", { className: "row-span-2", children: d(l[0], 0) }),
|
|
3160
|
+
d(l[1], 1),
|
|
3161
|
+
d(l[2], 2)
|
|
3162
3162
|
]
|
|
3163
3163
|
}
|
|
3164
3164
|
) : /* @__PURE__ */ n(
|
|
@@ -3175,27 +3175,27 @@ const ai = ({
|
|
|
3175
3175
|
"grid aspect-[379/286] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3176
3176
|
r
|
|
3177
3177
|
),
|
|
3178
|
-
children:
|
|
3179
|
-
const g =
|
|
3178
|
+
children: l.map((h, m) => {
|
|
3179
|
+
const g = o > 0 && m === l.length - 1;
|
|
3180
3180
|
return d(
|
|
3181
3181
|
h,
|
|
3182
3182
|
m,
|
|
3183
3183
|
g ? /* @__PURE__ */ f("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
|
|
3184
3184
|
"+",
|
|
3185
|
-
|
|
3185
|
+
o
|
|
3186
3186
|
] }) : null
|
|
3187
3187
|
);
|
|
3188
3188
|
})
|
|
3189
3189
|
}
|
|
3190
3190
|
);
|
|
3191
3191
|
}, Me = (e) => {
|
|
3192
|
-
const [t, s] =
|
|
3193
|
-
(
|
|
3194
|
-
(e == null ? void 0 : e(
|
|
3192
|
+
const [t, s] = $(!1), [a, r] = $(0), i = K(
|
|
3193
|
+
(o) => {
|
|
3194
|
+
(e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
|
|
3195
3195
|
},
|
|
3196
3196
|
[e]
|
|
3197
|
-
),
|
|
3198
|
-
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer:
|
|
3197
|
+
), l = K(() => s(!1), []);
|
|
3198
|
+
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
|
|
3199
3199
|
}, gi = ({
|
|
3200
3200
|
item: e,
|
|
3201
3201
|
index: t,
|
|
@@ -3233,7 +3233,7 @@ const ai = ({
|
|
|
3233
3233
|
alt: s.alt,
|
|
3234
3234
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3235
3235
|
})), bi = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
3236
|
-
const { viewerOpen:
|
|
3236
|
+
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Me(r);
|
|
3237
3237
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
3238
3238
|
/* @__PURE__ */ n(
|
|
3239
3239
|
"button",
|
|
@@ -3259,15 +3259,15 @@ const ai = ({
|
|
|
3259
3259
|
/* @__PURE__ */ n(
|
|
3260
3260
|
Un,
|
|
3261
3261
|
{
|
|
3262
|
-
open:
|
|
3262
|
+
open: l,
|
|
3263
3263
|
items: Hn([{ src: e, alt: t }], s),
|
|
3264
|
-
initialIndex:
|
|
3264
|
+
initialIndex: o,
|
|
3265
3265
|
onClose: u
|
|
3266
3266
|
}
|
|
3267
3267
|
)
|
|
3268
3268
|
] });
|
|
3269
3269
|
}, vi = 326 / 246, xi = (e) => {
|
|
3270
|
-
const t = e == null ? void 0 : e.src, [s, a] =
|
|
3270
|
+
const t = e == null ? void 0 : e.src, [s, a] = P.useState(), r = P.useCallback(
|
|
3271
3271
|
(d) => {
|
|
3272
3272
|
if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
|
|
3273
3273
|
const u = d.naturalWidth / d.naturalHeight;
|
|
@@ -3276,12 +3276,12 @@ const ai = ({
|
|
|
3276
3276
|
);
|
|
3277
3277
|
},
|
|
3278
3278
|
[t]
|
|
3279
|
-
), i =
|
|
3279
|
+
), i = P.useCallback(
|
|
3280
3280
|
(d) => r(d.currentTarget),
|
|
3281
3281
|
[r]
|
|
3282
|
-
),
|
|
3282
|
+
), l = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, o = s && s.src === t ? s.ratio : void 0;
|
|
3283
3283
|
return {
|
|
3284
|
-
ratio:
|
|
3284
|
+
ratio: l ?? o ?? vi,
|
|
3285
3285
|
imgRef: r,
|
|
3286
3286
|
onLoad: i
|
|
3287
3287
|
};
|
|
@@ -3292,8 +3292,8 @@ const ai = ({
|
|
|
3292
3292
|
filename: a,
|
|
3293
3293
|
items: r,
|
|
3294
3294
|
text: i,
|
|
3295
|
-
groupPosition:
|
|
3296
|
-
loading:
|
|
3295
|
+
groupPosition: l,
|
|
3296
|
+
loading: o = "lazy",
|
|
3297
3297
|
onClick: d
|
|
3298
3298
|
}) => {
|
|
3299
3299
|
const u = pi({ src: t, alt: s, items: r }), h = Le(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = Me(d), w = u.length === 1, v = xi(w ? u[0] : void 0);
|
|
@@ -3304,7 +3304,7 @@ const ai = ({
|
|
|
3304
3304
|
item: b,
|
|
3305
3305
|
index: y,
|
|
3306
3306
|
totalCount: u.length,
|
|
3307
|
-
fallbackLoading:
|
|
3307
|
+
fallbackLoading: o,
|
|
3308
3308
|
imgRef: w ? v.imgRef : void 0,
|
|
3309
3309
|
onLoad: w ? v.onLoad : void 0
|
|
3310
3310
|
})
|
|
@@ -3314,7 +3314,7 @@ const ai = ({
|
|
|
3314
3314
|
{
|
|
3315
3315
|
variant: h,
|
|
3316
3316
|
text: i,
|
|
3317
|
-
groupPosition:
|
|
3317
|
+
groupPosition: l,
|
|
3318
3318
|
bordered: !1,
|
|
3319
3319
|
widthClassName: w ? "w-fit max-w-[min(100%,313px)] sm:max-w-[min(100%,330px)]" : "w-[383px] max-w-full",
|
|
3320
3320
|
paddingClassName: "p-0.5",
|
|
@@ -3351,18 +3351,18 @@ const ai = ({
|
|
|
3351
3351
|
initialIndex: s = 0,
|
|
3352
3352
|
onClose: a
|
|
3353
3353
|
}) => {
|
|
3354
|
-
const { index: r, prev: i, next:
|
|
3354
|
+
const { index: r, prev: i, next: l } = Nt({
|
|
3355
3355
|
length: t.length,
|
|
3356
3356
|
initialIndex: s,
|
|
3357
3357
|
open: e
|
|
3358
|
-
}),
|
|
3359
|
-
() => (
|
|
3360
|
-
[
|
|
3361
|
-
), u =
|
|
3362
|
-
() =>
|
|
3363
|
-
[
|
|
3358
|
+
}), o = t[r], d = oe(
|
|
3359
|
+
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
|
|
3360
|
+
[o]
|
|
3361
|
+
), u = oe(
|
|
3362
|
+
() => o ? Ci(o.src) : void 0,
|
|
3363
|
+
[o]
|
|
3364
3364
|
);
|
|
3365
|
-
return !
|
|
3365
|
+
return !o || !u ? null : /* @__PURE__ */ f(
|
|
3366
3366
|
kt,
|
|
3367
3367
|
{
|
|
3368
3368
|
open: e,
|
|
@@ -3379,13 +3379,13 @@ const ai = ({
|
|
|
3379
3379
|
className: "block h-[calc(100dvh-128px)] w-[min(96vw,1400px)] border-0 bg-white",
|
|
3380
3380
|
sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
|
|
3381
3381
|
},
|
|
3382
|
-
`${r}:${
|
|
3382
|
+
`${r}:${o.src}`
|
|
3383
3383
|
),
|
|
3384
3384
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3385
3385
|
yt,
|
|
3386
3386
|
{
|
|
3387
3387
|
onPrev: i,
|
|
3388
|
-
onNext:
|
|
3388
|
+
onNext: l,
|
|
3389
3389
|
prevLabel: "Previous document",
|
|
3390
3390
|
nextLabel: "Next document"
|
|
3391
3391
|
}
|
|
@@ -3411,7 +3411,7 @@ const ai = ({
|
|
|
3411
3411
|
}) => {
|
|
3412
3412
|
const i = t.filename ?? re(t.src);
|
|
3413
3413
|
return /* @__PURE__ */ n(
|
|
3414
|
-
|
|
3414
|
+
Fn,
|
|
3415
3415
|
{
|
|
3416
3416
|
variant: e,
|
|
3417
3417
|
filename: i,
|
|
@@ -3430,8 +3430,8 @@ const ai = ({
|
|
|
3430
3430
|
fileSize: a,
|
|
3431
3431
|
title: r,
|
|
3432
3432
|
items: i,
|
|
3433
|
-
text:
|
|
3434
|
-
groupPosition:
|
|
3433
|
+
text: l,
|
|
3434
|
+
groupPosition: o,
|
|
3435
3435
|
onClick: d,
|
|
3436
3436
|
onDismiss: u
|
|
3437
3437
|
}) => {
|
|
@@ -3446,8 +3446,8 @@ const ai = ({
|
|
|
3446
3446
|
Ae,
|
|
3447
3447
|
{
|
|
3448
3448
|
variant: h,
|
|
3449
|
-
text:
|
|
3450
|
-
groupPosition:
|
|
3449
|
+
text: l,
|
|
3450
|
+
groupPosition: o,
|
|
3451
3451
|
"data-testid": "pdf-attachment",
|
|
3452
3452
|
children: [
|
|
3453
3453
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((b, y) => {
|
|
@@ -3495,15 +3495,15 @@ const ai = ({
|
|
|
3495
3495
|
initialIndex: s = 0,
|
|
3496
3496
|
onClose: a
|
|
3497
3497
|
}) => {
|
|
3498
|
-
const { index: r, prev: i, next:
|
|
3498
|
+
const { index: r, prev: i, next: l } = Nt({
|
|
3499
3499
|
length: t.length,
|
|
3500
3500
|
initialIndex: s,
|
|
3501
3501
|
open: e
|
|
3502
|
-
}),
|
|
3503
|
-
() => (
|
|
3504
|
-
[
|
|
3502
|
+
}), o = t[r], d = oe(
|
|
3503
|
+
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "video"),
|
|
3504
|
+
[o]
|
|
3505
3505
|
);
|
|
3506
|
-
return
|
|
3506
|
+
return o ? /* @__PURE__ */ f(
|
|
3507
3507
|
kt,
|
|
3508
3508
|
{
|
|
3509
3509
|
open: e,
|
|
@@ -3515,23 +3515,23 @@ const ai = ({
|
|
|
3515
3515
|
/* @__PURE__ */ n(
|
|
3516
3516
|
"video",
|
|
3517
3517
|
{
|
|
3518
|
-
src:
|
|
3519
|
-
poster:
|
|
3518
|
+
src: o.src,
|
|
3519
|
+
poster: o.poster,
|
|
3520
3520
|
controls: !0,
|
|
3521
3521
|
autoPlay: !0,
|
|
3522
3522
|
muted: !0,
|
|
3523
3523
|
playsInline: !0,
|
|
3524
|
-
preload:
|
|
3524
|
+
preload: o.preload ?? "metadata",
|
|
3525
3525
|
className: "block h-auto max-h-[calc(100dvh-128px)] w-auto max-w-[min(96vw,1400px)] bg-black",
|
|
3526
|
-
children:
|
|
3526
|
+
children: o.mimeType ? /* @__PURE__ */ n("source", { src: o.src, type: o.mimeType }) : null
|
|
3527
3527
|
},
|
|
3528
|
-
`${r}:${
|
|
3528
|
+
`${r}:${o.src}`
|
|
3529
3529
|
),
|
|
3530
3530
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3531
3531
|
yt,
|
|
3532
3532
|
{
|
|
3533
3533
|
onPrev: i,
|
|
3534
|
-
onNext:
|
|
3534
|
+
onNext: l,
|
|
3535
3535
|
prevLabel: "Previous video",
|
|
3536
3536
|
nextLabel: "Next video"
|
|
3537
3537
|
}
|
|
@@ -3577,8 +3577,8 @@ const ai = ({
|
|
|
3577
3577
|
mimeType: s.mimeType,
|
|
3578
3578
|
preload: s.preload,
|
|
3579
3579
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3580
|
-
})), Oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss:
|
|
3581
|
-
const { viewerOpen:
|
|
3580
|
+
})), Oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
|
|
3581
|
+
const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: h } = Me(i);
|
|
3582
3582
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
3583
3583
|
/* @__PURE__ */ n(
|
|
3584
3584
|
"button",
|
|
@@ -3590,26 +3590,26 @@ const ai = ({
|
|
|
3590
3590
|
children: /* @__PURE__ */ n(Yn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
3591
3591
|
}
|
|
3592
3592
|
),
|
|
3593
|
-
|
|
3593
|
+
l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Re, { onClick: l }) }) : null,
|
|
3594
3594
|
/* @__PURE__ */ n(
|
|
3595
3595
|
Gn,
|
|
3596
3596
|
{
|
|
3597
|
-
open:
|
|
3597
|
+
open: o,
|
|
3598
3598
|
items: Wn([{ src: e, poster: t, mimeType: s, preload: r }], a),
|
|
3599
3599
|
initialIndex: d,
|
|
3600
3600
|
onClose: h
|
|
3601
3601
|
}
|
|
3602
3602
|
)
|
|
3603
3603
|
] });
|
|
3604
|
-
},
|
|
3604
|
+
}, Kn = ({
|
|
3605
3605
|
state: e,
|
|
3606
3606
|
src: t,
|
|
3607
3607
|
poster: s,
|
|
3608
3608
|
mimeType: a,
|
|
3609
3609
|
filename: r,
|
|
3610
3610
|
items: i,
|
|
3611
|
-
text:
|
|
3612
|
-
groupPosition:
|
|
3611
|
+
text: l,
|
|
3612
|
+
groupPosition: o,
|
|
3613
3613
|
preload: d,
|
|
3614
3614
|
onClick: u
|
|
3615
3615
|
}) => {
|
|
@@ -3623,8 +3623,8 @@ const ai = ({
|
|
|
3623
3623
|
Ae,
|
|
3624
3624
|
{
|
|
3625
3625
|
variant: m,
|
|
3626
|
-
text:
|
|
3627
|
-
groupPosition:
|
|
3626
|
+
text: l,
|
|
3627
|
+
groupPosition: o,
|
|
3628
3628
|
"data-testid": "video-attachment",
|
|
3629
3629
|
children: [
|
|
3630
3630
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(jn, { tiles: v, onTileActivate: p }) }),
|
|
@@ -3640,18 +3640,18 @@ const ai = ({
|
|
|
3640
3640
|
]
|
|
3641
3641
|
}
|
|
3642
3642
|
);
|
|
3643
|
-
}, Pi = (e) => /* @__PURE__ */ n(Oi, { ...e }),
|
|
3643
|
+
}, Pi = (e) => /* @__PURE__ */ n(Oi, { ...e }), Fi = (e) => /* @__PURE__ */ n(Kn, { ...e, state: "sent" }), zi = (e) => /* @__PURE__ */ n(Kn, { ...e, state: "received" }), $i = {
|
|
3644
3644
|
Composer: Pi,
|
|
3645
|
-
Sent:
|
|
3646
|
-
Received:
|
|
3645
|
+
Sent: Fi,
|
|
3646
|
+
Received: zi
|
|
3647
3647
|
}, ke = {
|
|
3648
3648
|
Image: Ni,
|
|
3649
3649
|
Video: $i,
|
|
3650
|
-
Audio:
|
|
3650
|
+
Audio: qr,
|
|
3651
3651
|
Pdf: Ri,
|
|
3652
3652
|
File: ci
|
|
3653
3653
|
};
|
|
3654
|
-
function
|
|
3654
|
+
function H(e) {
|
|
3655
3655
|
const t = e == null ? void 0 : e.trim();
|
|
3656
3656
|
return t || void 0;
|
|
3657
3657
|
}
|
|
@@ -3670,10 +3670,10 @@ function Bi(e, t) {
|
|
|
3670
3670
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3671
3671
|
}
|
|
3672
3672
|
function sn(e) {
|
|
3673
|
-
const t =
|
|
3673
|
+
const t = H(e.og_scrape_url) ?? H(e.title_link), s = H(e.image_url) ?? H(e.thumb_url), a = H(e.asset_url), r = H(e.mime_type);
|
|
3674
3674
|
return {
|
|
3675
|
-
title:
|
|
3676
|
-
description:
|
|
3675
|
+
title: H(e.title),
|
|
3676
|
+
description: H(e.text),
|
|
3677
3677
|
url: t,
|
|
3678
3678
|
thumbnailUrl: ce(s),
|
|
3679
3679
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
@@ -3686,7 +3686,7 @@ function sn(e) {
|
|
|
3686
3686
|
// paints an identical chin without re-extracting — visitors in
|
|
3687
3687
|
// linktr.ee-profiles cannot call the extraction query at all. Absent on
|
|
3688
3688
|
// messages sent before MES-1349, which render the fallback chin.
|
|
3689
|
-
accentColor:
|
|
3689
|
+
accentColor: H(e.accent_color),
|
|
3690
3690
|
// A persisted attachment is by definition fully scraped.
|
|
3691
3691
|
status: "ready"
|
|
3692
3692
|
};
|
|
@@ -3695,12 +3695,12 @@ function Ui(e) {
|
|
|
3695
3695
|
var t;
|
|
3696
3696
|
return Ve(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;
|
|
3697
3697
|
}
|
|
3698
|
-
function
|
|
3698
|
+
function Xn(e) {
|
|
3699
3699
|
if (!(e != null && e.length)) return [];
|
|
3700
3700
|
const t = [], s = (r, i) => {
|
|
3701
|
-
const
|
|
3702
|
-
if ((
|
|
3703
|
-
|
|
3701
|
+
const l = t[t.length - 1];
|
|
3702
|
+
if ((l == null ? void 0 : l.type) === "media" && l.kind === r) {
|
|
3703
|
+
l.attachments.push(i);
|
|
3704
3704
|
return;
|
|
3705
3705
|
}
|
|
3706
3706
|
t.push({ type: "media", kind: r, attachments: [i] });
|
|
@@ -3728,10 +3728,10 @@ function ji(e) {
|
|
|
3728
3728
|
function Hi(e, t, s) {
|
|
3729
3729
|
return t <= 1 ? s : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3730
3730
|
}
|
|
3731
|
-
function an(e) {
|
|
3732
|
-
return O(e.image_url) ?? O(e.asset_url) ?? "";
|
|
3733
|
-
}
|
|
3734
3731
|
function Vi(e) {
|
|
3732
|
+
return H(e.image_url) ?? H(e.asset_url) ?? "";
|
|
3733
|
+
}
|
|
3734
|
+
function Gi(e) {
|
|
3735
3735
|
switch (e) {
|
|
3736
3736
|
case "image":
|
|
3737
3737
|
return ke.Image;
|
|
@@ -3745,110 +3745,71 @@ function Vi(e) {
|
|
|
3745
3745
|
return ke.File;
|
|
3746
3746
|
}
|
|
3747
3747
|
}
|
|
3748
|
-
function
|
|
3749
|
-
if (t.length > 1)
|
|
3750
|
-
switch (e) {
|
|
3751
|
-
case "image":
|
|
3752
|
-
return {
|
|
3753
|
-
items: t.map((a) => ({
|
|
3754
|
-
src: an(a),
|
|
3755
|
-
alt: O(a.title)
|
|
3756
|
-
}))
|
|
3757
|
-
};
|
|
3758
|
-
case "video":
|
|
3759
|
-
return {
|
|
3760
|
-
items: t.map((a) => ({
|
|
3761
|
-
src: O(a.asset_url) ?? "",
|
|
3762
|
-
poster: O(
|
|
3763
|
-
a.thumb_url
|
|
3764
|
-
),
|
|
3765
|
-
mimeType: O(a.mime_type)
|
|
3766
|
-
}))
|
|
3767
|
-
};
|
|
3768
|
-
case "audio":
|
|
3769
|
-
return {
|
|
3770
|
-
items: t.map((a) => ({
|
|
3771
|
-
src: O(a.asset_url) ?? "",
|
|
3772
|
-
mimeType: O(a.mime_type) ?? "audio/mpeg",
|
|
3773
|
-
filename: O(a.title)
|
|
3774
|
-
}))
|
|
3775
|
-
};
|
|
3776
|
-
case "pdf":
|
|
3777
|
-
return {
|
|
3778
|
-
items: t.map((a) => ({
|
|
3779
|
-
src: O(a.asset_url) ?? "",
|
|
3780
|
-
filename: O(a.title),
|
|
3781
|
-
fileSize: a.file_size
|
|
3782
|
-
}))
|
|
3783
|
-
};
|
|
3784
|
-
case "file":
|
|
3785
|
-
return {
|
|
3786
|
-
items: t.map((a) => ({
|
|
3787
|
-
src: O(a.asset_url) ?? "",
|
|
3788
|
-
filename: O(a.title),
|
|
3789
|
-
fileSize: a.file_size,
|
|
3790
|
-
mimeType: O(a.mime_type) ?? "application/octet-stream"
|
|
3791
|
-
}))
|
|
3792
|
-
};
|
|
3793
|
-
}
|
|
3794
|
-
const s = t[0];
|
|
3795
|
-
if (!s) return {};
|
|
3748
|
+
function an(e, t) {
|
|
3796
3749
|
switch (e) {
|
|
3797
3750
|
case "image":
|
|
3798
3751
|
return {
|
|
3799
|
-
src:
|
|
3800
|
-
alt:
|
|
3752
|
+
src: Vi(t),
|
|
3753
|
+
alt: H(t.title)
|
|
3801
3754
|
};
|
|
3802
3755
|
case "video":
|
|
3803
3756
|
return {
|
|
3804
|
-
src:
|
|
3805
|
-
poster:
|
|
3806
|
-
|
|
3757
|
+
src: H(t.asset_url) ?? "",
|
|
3758
|
+
poster: H(
|
|
3759
|
+
t.thumb_url
|
|
3807
3760
|
),
|
|
3808
|
-
mimeType:
|
|
3761
|
+
mimeType: H(t.mime_type)
|
|
3809
3762
|
};
|
|
3810
3763
|
case "audio":
|
|
3811
3764
|
return {
|
|
3812
|
-
src:
|
|
3813
|
-
mimeType:
|
|
3814
|
-
filename:
|
|
3765
|
+
src: H(t.asset_url) ?? "",
|
|
3766
|
+
mimeType: H(t.mime_type) ?? "audio/mpeg",
|
|
3767
|
+
filename: H(t.title)
|
|
3815
3768
|
};
|
|
3816
3769
|
case "pdf":
|
|
3817
3770
|
return {
|
|
3818
|
-
src:
|
|
3819
|
-
filename:
|
|
3820
|
-
fileSize:
|
|
3771
|
+
src: H(t.asset_url) ?? "",
|
|
3772
|
+
filename: H(t.title),
|
|
3773
|
+
fileSize: t.file_size
|
|
3821
3774
|
};
|
|
3822
3775
|
case "file":
|
|
3823
3776
|
return {
|
|
3824
|
-
src:
|
|
3825
|
-
filename:
|
|
3826
|
-
fileSize:
|
|
3827
|
-
mimeType:
|
|
3777
|
+
src: H(t.asset_url) ?? "",
|
|
3778
|
+
filename: H(t.title),
|
|
3779
|
+
fileSize: t.file_size,
|
|
3780
|
+
mimeType: H(t.mime_type) ?? "application/octet-stream"
|
|
3828
3781
|
};
|
|
3829
3782
|
}
|
|
3830
3783
|
}
|
|
3831
|
-
function Yi({
|
|
3784
|
+
function Yi(e, t) {
|
|
3785
|
+
if (t.length > 1)
|
|
3786
|
+
return {
|
|
3787
|
+
items: t.map((a) => an(e, a))
|
|
3788
|
+
};
|
|
3789
|
+
const s = t[0];
|
|
3790
|
+
return s ? an(e, s) : {};
|
|
3791
|
+
}
|
|
3792
|
+
function Wi({
|
|
3832
3793
|
groupPosition: e,
|
|
3833
3794
|
isMyMessage: t,
|
|
3834
3795
|
segment: s
|
|
3835
3796
|
}) {
|
|
3836
|
-
const a =
|
|
3837
|
-
...
|
|
3797
|
+
const a = Gi(s.kind), r = {
|
|
3798
|
+
...Yi(s.kind, s.attachments),
|
|
3838
3799
|
groupPosition: e
|
|
3839
3800
|
};
|
|
3840
3801
|
return t ? /* @__PURE__ */ n(a.Sent, { ...r }) : /* @__PURE__ */ n(a.Received, { ...r });
|
|
3841
3802
|
}
|
|
3842
|
-
const
|
|
3803
|
+
const Ki = ({
|
|
3843
3804
|
groupPosition: e,
|
|
3844
3805
|
isMyMessage: t,
|
|
3845
3806
|
message: s,
|
|
3846
3807
|
renderText: a
|
|
3847
3808
|
}) => {
|
|
3848
3809
|
var v;
|
|
3849
|
-
const r =
|
|
3810
|
+
const r = Xn(s.attachments);
|
|
3850
3811
|
if (r.length === 0) return null;
|
|
3851
|
-
const i = ji(r),
|
|
3812
|
+
const i = ji(r), l = (v = s.text) == null ? void 0 : v.trim(), o = r.find((x) => x.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? sn(o.attachments[0] ?? {}).url : void 0, u = l && Bi(l, d) ? void 0 : l;
|
|
3852
3813
|
let h = 0;
|
|
3853
3814
|
const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", p = (x, b, y) => {
|
|
3854
3815
|
const _ = t ? it.Sent : it.Received;
|
|
@@ -3870,7 +3831,7 @@ const Wi = ({
|
|
|
3870
3831
|
);
|
|
3871
3832
|
h += 1, m.push(
|
|
3872
3833
|
/* @__PURE__ */ n(
|
|
3873
|
-
|
|
3834
|
+
Wi,
|
|
3874
3835
|
{
|
|
3875
3836
|
groupPosition: y,
|
|
3876
3837
|
isMyMessage: t,
|
|
@@ -3918,7 +3879,7 @@ const Wi = ({
|
|
|
3918
3879
|
"relative isolate": c
|
|
3919
3880
|
}),
|
|
3920
3881
|
children: [
|
|
3921
|
-
/* @__PURE__ */ n(
|
|
3882
|
+
/* @__PURE__ */ n(Fe, { message: s, renderText: a }),
|
|
3922
3883
|
/* @__PURE__ */ n(st, {}),
|
|
3923
3884
|
c && /* @__PURE__ */ n($e, { side: t ? "me" : "other" })
|
|
3924
3885
|
]
|
|
@@ -3926,15 +3887,15 @@ const Wi = ({
|
|
|
3926
3887
|
) : null
|
|
3927
3888
|
] });
|
|
3928
3889
|
}, Xi = (e) => {
|
|
3929
|
-
var Lt, Mt, Dt, Ot, Pt,
|
|
3890
|
+
var Lt, Mt, Dt, Ot, Pt, Ft, zt, $t, Bt, Ut;
|
|
3930
3891
|
const {
|
|
3931
3892
|
additionalMessageInputProps: t,
|
|
3932
3893
|
editing: s,
|
|
3933
3894
|
endOfGroup: a,
|
|
3934
3895
|
firstOfGroup: r,
|
|
3935
3896
|
groupStyles: i,
|
|
3936
|
-
groupedByUser:
|
|
3937
|
-
handleAction:
|
|
3897
|
+
groupedByUser: l,
|
|
3898
|
+
handleAction: o,
|
|
3938
3899
|
handleOpenThread: d,
|
|
3939
3900
|
handleRetry: u,
|
|
3940
3901
|
highlighted: h,
|
|
@@ -3946,40 +3907,40 @@ const Wi = ({
|
|
|
3946
3907
|
viewerLanguage: v,
|
|
3947
3908
|
onOutboundClick: x,
|
|
3948
3909
|
resolvedOutbound: b
|
|
3949
|
-
} = e, { client: y } = He("CustomMessage"), { channel: _ } = we("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick:
|
|
3910
|
+
} = e, { client: y } = He("CustomMessage"), { channel: _ } = we("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick: z } = sr("LockedAttachment"), [F, R] = $(!1), I = hs(c.id), {
|
|
3950
3911
|
Attachment: M = fs,
|
|
3951
3912
|
EditMessageModal: S = gs,
|
|
3952
3913
|
MessageActions: C,
|
|
3953
3914
|
MessageBlocked: A = ps,
|
|
3954
|
-
MessageBouncePrompt:
|
|
3955
|
-
MessageDeleted:
|
|
3915
|
+
MessageBouncePrompt: O = bs,
|
|
3916
|
+
MessageDeleted: B = vs,
|
|
3956
3917
|
MessageIsThreadReplyInChannelButtonIndicator: G = xs,
|
|
3957
3918
|
MessageRepliesCountButton: ee = ws,
|
|
3958
3919
|
ReminderNotification: Z = _s,
|
|
3959
3920
|
StreamedMessageText: J = ys,
|
|
3960
|
-
PinIndicator:
|
|
3961
|
-
} = mn("CustomMessage"), k = Ns(c), D = ks(c), Y =
|
|
3921
|
+
PinIndicator: j
|
|
3922
|
+
} = mn("CustomMessage"), k = Ns(c), D = ks(c), Y = oe(
|
|
3962
3923
|
() => m == null ? void 0 : m(c),
|
|
3963
3924
|
[m, c]
|
|
3964
|
-
),
|
|
3925
|
+
), U = oe(() => {
|
|
3965
3926
|
const he = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...he] : he;
|
|
3966
|
-
if (!
|
|
3927
|
+
if (!ze(c)) return pe;
|
|
3967
3928
|
const jt = pe.filter((Ht) => !("type" in Ht) || !Ve(Ht));
|
|
3968
3929
|
return jt.length === pe.length ? pe : jt;
|
|
3969
|
-
}, [c]), Q =
|
|
3970
|
-
() =>
|
|
3971
|
-
[
|
|
3972
|
-
),
|
|
3930
|
+
}, [c]), Q = oe(
|
|
3931
|
+
() => Xn(U),
|
|
3932
|
+
[U]
|
|
3933
|
+
), X = oe(() => {
|
|
3973
3934
|
const he = kn({ message: c, viewerLanguage: v });
|
|
3974
3935
|
return he === c.text ? c : { ...c, text: he };
|
|
3975
3936
|
}, [c, v]), ne = Q.length > 0, ue = Q.reduce(
|
|
3976
3937
|
(he, pe) => he + pe.attachments.length,
|
|
3977
3938
|
0
|
|
3978
|
-
) === ((
|
|
3939
|
+
) === ((U == null ? void 0 : U.length) ?? 0), ae = (i == null ? void 0 : i[0]) ?? "", De = ae === "top" ? "first" : ae === "middle" ? "middle" : ae === "bottom" ? "end" : "single", se = ae === "single" || ae === "bottom";
|
|
3979
3940
|
if (Cs(c))
|
|
3980
3941
|
return null;
|
|
3981
3942
|
if (c.deleted_at || c.type === "deleted")
|
|
3982
|
-
return /* @__PURE__ */ n(
|
|
3943
|
+
return /* @__PURE__ */ n(B, { message: c });
|
|
3983
3944
|
if (Ss(c))
|
|
3984
3945
|
return /* @__PURE__ */ n(A, {});
|
|
3985
3946
|
const me = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, St = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, Et = Es(c);
|
|
@@ -4000,24 +3961,24 @@ const Wi = ({
|
|
|
4000
3961
|
"str-chat__message-with-thread-link": me || ie,
|
|
4001
3962
|
"str-chat__virtual-message__wrapper--end": a,
|
|
4002
3963
|
"str-chat__virtual-message__wrapper--first": r,
|
|
4003
|
-
"str-chat__virtual-message__wrapper--group":
|
|
3964
|
+
"str-chat__virtual-message__wrapper--group": l
|
|
4004
3965
|
}
|
|
4005
|
-
), Ye = c.poll_id && y.polls.fromState(c.poll_id), It = ur(c), ye =
|
|
3966
|
+
), Ye = c.poll_id && y.polls.fromState(c.poll_id), It = ur(c), ye = ze(c), ss = ht(c), We = !!(U != null && U.length && !c.quoted_message), Tt = ye && te && We, as = ne && ue && !c.quoted_message && !Ye && !Y && !ye, At = {
|
|
4006
3967
|
contentType: "text",
|
|
4007
3968
|
amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
|
|
4008
3969
|
paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
|
|
4009
|
-
renderedText: c.text && /* @__PURE__ */ n(
|
|
3970
|
+
renderedText: c.text && /* @__PURE__ */ n(Fe, { message: X, renderText: p })
|
|
4010
3971
|
}, Rt = {
|
|
4011
3972
|
contentType: "media",
|
|
4012
3973
|
title: (Pt = c.metadata) == null ? void 0 : Pt.attachment_title,
|
|
4013
|
-
mimeType: (
|
|
4014
|
-
thumbnailUrl: (
|
|
3974
|
+
mimeType: (Ft = c.metadata) == null ? void 0 : Ft.attachment_mime_type,
|
|
3975
|
+
thumbnailUrl: (zt = c.metadata) == null ? void 0 : zt.attachment_thumbnail,
|
|
4015
3976
|
amountText: ($t = c.metadata) == null ? void 0 : $t.amount_text,
|
|
4016
3977
|
detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
|
|
4017
3978
|
paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
|
|
4018
3979
|
onFetchSource: E ? () => E(c, _) : void 0
|
|
4019
3980
|
};
|
|
4020
|
-
return /* @__PURE__ */ f(
|
|
3981
|
+
return /* @__PURE__ */ f(q, { children: [
|
|
4021
3982
|
s && /* @__PURE__ */ n(
|
|
4022
3983
|
S,
|
|
4023
3984
|
{
|
|
@@ -4027,7 +3988,7 @@ const Wi = ({
|
|
|
4027
3988
|
F && /* @__PURE__ */ n(
|
|
4028
3989
|
Is,
|
|
4029
3990
|
{
|
|
4030
|
-
MessageBouncePrompt:
|
|
3991
|
+
MessageBouncePrompt: O,
|
|
4031
3992
|
onClose: () => R(!1),
|
|
4032
3993
|
open: F
|
|
4033
3994
|
}
|
|
@@ -4039,7 +4000,7 @@ const Wi = ({
|
|
|
4039
4000
|
"data-message-id": c.id,
|
|
4040
4001
|
"data-dd-privacy": "mask",
|
|
4041
4002
|
children: [
|
|
4042
|
-
|
|
4003
|
+
j && /* @__PURE__ */ n(j, {}),
|
|
4043
4004
|
!!I && /* @__PURE__ */ n(Z, { reminder: I }),
|
|
4044
4005
|
c.user && /* @__PURE__ */ n(
|
|
4045
4006
|
_e,
|
|
@@ -4099,7 +4060,7 @@ const Wi = ({
|
|
|
4099
4060
|
isMine: !1,
|
|
4100
4061
|
isUnlocking: T(c.id),
|
|
4101
4062
|
onUnlockClick: () => L ? L(c, _) : void 0,
|
|
4102
|
-
onDownloadClick: () =>
|
|
4063
|
+
onDownloadClick: () => z ? z(c, _) : void 0
|
|
4103
4064
|
}
|
|
4104
4065
|
),
|
|
4105
4066
|
!te && C && /* @__PURE__ */ n(C, {})
|
|
@@ -4112,9 +4073,9 @@ const Wi = ({
|
|
|
4112
4073
|
}),
|
|
4113
4074
|
children: [
|
|
4114
4075
|
/* @__PURE__ */ n(
|
|
4115
|
-
|
|
4076
|
+
Fe,
|
|
4116
4077
|
{
|
|
4117
|
-
message:
|
|
4078
|
+
message: X,
|
|
4118
4079
|
renderText: p
|
|
4119
4080
|
}
|
|
4120
4081
|
),
|
|
@@ -4123,13 +4084,13 @@ const Wi = ({
|
|
|
4123
4084
|
}
|
|
4124
4085
|
)
|
|
4125
4086
|
] }) : as ? /* @__PURE__ */ n(
|
|
4126
|
-
|
|
4087
|
+
Ki,
|
|
4127
4088
|
{
|
|
4128
4089
|
groupPosition: De,
|
|
4129
4090
|
isMyMessage: te,
|
|
4130
4091
|
message: {
|
|
4131
|
-
...
|
|
4132
|
-
attachments:
|
|
4092
|
+
...X,
|
|
4093
|
+
attachments: U,
|
|
4133
4094
|
// MessageText prefers message.i18n[userLanguage_text] from
|
|
4134
4095
|
// Stream's TranslationContext over message.text. Drop i18n so
|
|
4135
4096
|
// the caption uses displayMessage.text from viewerLanguage.
|
|
@@ -4153,23 +4114,23 @@ const Wi = ({
|
|
|
4153
4114
|
}
|
|
4154
4115
|
),
|
|
4155
4116
|
Ye && /* @__PURE__ */ n(Ts, { poll: Ye }),
|
|
4156
|
-
|
|
4117
|
+
U != null && U.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
4157
4118
|
M,
|
|
4158
4119
|
{
|
|
4159
|
-
actionHandler:
|
|
4160
|
-
attachments:
|
|
4120
|
+
actionHandler: o,
|
|
4121
|
+
attachments: U
|
|
4161
4122
|
}
|
|
4162
4123
|
) : null,
|
|
4163
4124
|
Y ? /* @__PURE__ */ n(
|
|
4164
4125
|
J,
|
|
4165
4126
|
{
|
|
4166
|
-
message:
|
|
4127
|
+
message: X,
|
|
4167
4128
|
renderText: p
|
|
4168
4129
|
}
|
|
4169
4130
|
) : /* @__PURE__ */ n(
|
|
4170
|
-
|
|
4131
|
+
Fe,
|
|
4171
4132
|
{
|
|
4172
|
-
message:
|
|
4133
|
+
message: X,
|
|
4173
4134
|
renderText: p
|
|
4174
4135
|
}
|
|
4175
4136
|
),
|
|
@@ -4208,13 +4169,13 @@ const Wi = ({
|
|
|
4208
4169
|
c.id
|
|
4209
4170
|
)
|
|
4210
4171
|
] });
|
|
4211
|
-
}, qi =
|
|
4172
|
+
}, qi = P.memo(
|
|
4212
4173
|
Xi,
|
|
4213
4174
|
(e, t) => {
|
|
4214
4175
|
var s, a, r, i;
|
|
4215
4176
|
return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : ms(e, t);
|
|
4216
4177
|
}
|
|
4217
|
-
),
|
|
4178
|
+
), Zi = (e) => {
|
|
4218
4179
|
var i;
|
|
4219
4180
|
const t = fe("CustomMessage"), s = xe(Dn), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
|
|
4220
4181
|
return /* @__PURE__ */ n(
|
|
@@ -4225,7 +4186,7 @@ const Wi = ({
|
|
|
4225
4186
|
resolvedOutbound: r
|
|
4226
4187
|
}
|
|
4227
4188
|
);
|
|
4228
|
-
},
|
|
4189
|
+
}, Ji = () => {
|
|
4229
4190
|
var s;
|
|
4230
4191
|
const { handleDelete: e, message: t } = fe("CustomMessageActions");
|
|
4231
4192
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
@@ -4238,7 +4199,7 @@ const Wi = ({
|
|
|
4238
4199
|
children: /* @__PURE__ */ n(pa, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4239
4200
|
}
|
|
4240
4201
|
);
|
|
4241
|
-
},
|
|
4202
|
+
}, Qi = () => {
|
|
4242
4203
|
const { handleFlag: e } = fe("CustomMessageActions");
|
|
4243
4204
|
return /* @__PURE__ */ n(
|
|
4244
4205
|
vn,
|
|
@@ -4250,26 +4211,26 @@ const Wi = ({
|
|
|
4250
4211
|
children: /* @__PURE__ */ n(fn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4251
4212
|
}
|
|
4252
4213
|
);
|
|
4253
|
-
},
|
|
4214
|
+
}, eo = () => {
|
|
4254
4215
|
var t;
|
|
4255
4216
|
const { message: e } = fe("CustomMessageActions");
|
|
4256
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) !==
|
|
4217
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== le.ATTACHMENT ? null : /* @__PURE__ */ n(
|
|
4257
4218
|
wa,
|
|
4258
4219
|
{
|
|
4259
4220
|
messageActionSet: [
|
|
4260
|
-
{ Component:
|
|
4261
|
-
{ Component:
|
|
4221
|
+
{ Component: Ji, placement: "quick", type: "delete" },
|
|
4222
|
+
{ Component: Qi, placement: "quick", type: "flag" }
|
|
4262
4223
|
]
|
|
4263
4224
|
}
|
|
4264
4225
|
);
|
|
4265
|
-
},
|
|
4226
|
+
}, to = (e) => ({
|
|
4266
4227
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
4267
4228
|
(t) => nt.previewIsLoaded(t) || nt.previewIsLoading(t)
|
|
4268
4229
|
)
|
|
4269
|
-
}),
|
|
4230
|
+
}), no = () => {
|
|
4270
4231
|
const { linkPreviewsManager: e } = As(), { linkPreviews: t } = Rs(
|
|
4271
4232
|
e.state,
|
|
4272
|
-
|
|
4233
|
+
to
|
|
4273
4234
|
), s = (r) => {
|
|
4274
4235
|
e.dismissPreview(r);
|
|
4275
4236
|
};
|
|
@@ -4333,7 +4294,7 @@ const Wi = ({
|
|
|
4333
4294
|
);
|
|
4334
4295
|
}) })
|
|
4335
4296
|
) : null;
|
|
4336
|
-
}, Be =
|
|
4297
|
+
}, Be = P.createContext(!1), so = 200, il = () => xe(Be), ao = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
4337
4298
|
"button",
|
|
4338
4299
|
{
|
|
4339
4300
|
...s,
|
|
@@ -4346,20 +4307,20 @@ const Wi = ({
|
|
|
4346
4307
|
}
|
|
4347
4308
|
), rn = () => {
|
|
4348
4309
|
const e = xe(Be), { handleSubmit: t } = Ls(), s = Ms(), a = e || !s, {
|
|
4349
|
-
SendButton: r =
|
|
4310
|
+
SendButton: r = ao,
|
|
4350
4311
|
AttachmentPreviewList: i = Ds
|
|
4351
|
-
} = mn("CustomMessageInput"),
|
|
4352
|
-
return
|
|
4353
|
-
const
|
|
4354
|
-
if (!
|
|
4312
|
+
} = mn("CustomMessageInput"), l = P.useRef(null);
|
|
4313
|
+
return P.useEffect(() => {
|
|
4314
|
+
const o = l.current;
|
|
4315
|
+
if (!o || typeof ResizeObserver > "u")
|
|
4355
4316
|
return;
|
|
4356
4317
|
const d = new ResizeObserver(() => {
|
|
4357
|
-
|
|
4318
|
+
o.contains(document.activeElement) && (o.scrollTop = o.scrollHeight);
|
|
4358
4319
|
});
|
|
4359
|
-
return d.observe(
|
|
4360
|
-
}, []),
|
|
4361
|
-
const
|
|
4362
|
-
if (!
|
|
4320
|
+
return d.observe(o), () => d.disconnect();
|
|
4321
|
+
}, []), P.useEffect(() => {
|
|
4322
|
+
const o = l.current;
|
|
4323
|
+
if (!o)
|
|
4363
4324
|
return;
|
|
4364
4325
|
const d = (u) => {
|
|
4365
4326
|
var m;
|
|
@@ -4367,7 +4328,7 @@ const Wi = ({
|
|
|
4367
4328
|
(g) => g.kind === "file"
|
|
4368
4329
|
) || u.stopPropagation();
|
|
4369
4330
|
};
|
|
4370
|
-
return
|
|
4331
|
+
return o.addEventListener("paste", d), () => o.removeEventListener("paste", d);
|
|
4371
4332
|
}, []), // This card is the composer's ONE scroll container: staged previews and the
|
|
4372
4333
|
// textarea row scroll together past a cap, instead of the previews being
|
|
4373
4334
|
// squeezed to keep the row in view (MES-1037). Nothing inside may shrink, or
|
|
@@ -4406,13 +4367,13 @@ const Wi = ({
|
|
|
4406
4367
|
/* @__PURE__ */ f(
|
|
4407
4368
|
"div",
|
|
4408
4369
|
{
|
|
4409
|
-
ref:
|
|
4370
|
+
ref: l,
|
|
4410
4371
|
className: "central-container flex flex-col min-w-0 w-full max-h-[calc(var(--messaging-surface-height,100dvh)*0.5)] overflow-y-auto overscroll-contain bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)] [&>:not(.messaging-composer-previews):not(.messaging-composer-row)]:p-2",
|
|
4411
4372
|
"data-dd-privacy": "mask",
|
|
4412
4373
|
children: [
|
|
4413
4374
|
/* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
|
|
4414
4375
|
/* @__PURE__ */ n(Os, {}),
|
|
4415
|
-
/* @__PURE__ */ n(
|
|
4376
|
+
/* @__PURE__ */ n(no, {}),
|
|
4416
4377
|
/* @__PURE__ */ n(i, {})
|
|
4417
4378
|
] }),
|
|
4418
4379
|
/* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
|
|
@@ -4444,14 +4405,14 @@ const Wi = ({
|
|
|
4444
4405
|
]
|
|
4445
4406
|
}
|
|
4446
4407
|
);
|
|
4447
|
-
},
|
|
4408
|
+
}, on = () => /* @__PURE__ */ f("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
|
|
4448
4409
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4449
4410
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4450
4411
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4451
4412
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4452
4413
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4453
4414
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-gradient" })
|
|
4454
|
-
] }),
|
|
4415
|
+
] }), ln = ({
|
|
4455
4416
|
renderActions: e,
|
|
4456
4417
|
renderHeader: t,
|
|
4457
4418
|
renderFooter: s,
|
|
@@ -4460,8 +4421,8 @@ const Wi = ({
|
|
|
4460
4421
|
composerInput: i
|
|
4461
4422
|
}) => {
|
|
4462
4423
|
var h;
|
|
4463
|
-
const { channel:
|
|
4464
|
-
return
|
|
4424
|
+
const { channel: l } = we(), o = ((h = l == null ? void 0 : l.data) == null ? void 0 : h.frozen) === !0, d = !!i, u = P.useRef(null);
|
|
4425
|
+
return P.useEffect(() => {
|
|
4465
4426
|
if (!d)
|
|
4466
4427
|
return;
|
|
4467
4428
|
const m = u.current, g = m == null ? void 0 : m.parentElement;
|
|
@@ -4473,7 +4434,7 @@ const Wi = ({
|
|
|
4473
4434
|
c = v;
|
|
4474
4435
|
const b = Array.from(
|
|
4475
4436
|
g.querySelectorAll(".str-chat__list")
|
|
4476
|
-
).find((_) => _.scrollHeight > _.clientHeight) ?? null, y = b ? b.scrollHeight - b.scrollTop - b.clientHeight <
|
|
4437
|
+
).find((_) => _.scrollHeight > _.clientHeight) ?? null, y = b ? b.scrollHeight - b.scrollTop - b.clientHeight < so : !1;
|
|
4477
4438
|
g.style.setProperty(
|
|
4478
4439
|
"--messaging-composer-height",
|
|
4479
4440
|
`${v}px`
|
|
@@ -4491,7 +4452,7 @@ const Wi = ({
|
|
|
4491
4452
|
ref: u,
|
|
4492
4453
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4493
4454
|
children: [
|
|
4494
|
-
/* @__PURE__ */ n(
|
|
4455
|
+
/* @__PURE__ */ n(on, {}),
|
|
4495
4456
|
/* @__PURE__ */ f("div", { className: "relative z-10 flex flex-col", children: [
|
|
4496
4457
|
t == null ? void 0 : t(),
|
|
4497
4458
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
|
|
@@ -4499,7 +4460,7 @@ const Wi = ({
|
|
|
4499
4460
|
] })
|
|
4500
4461
|
]
|
|
4501
4462
|
}
|
|
4502
|
-
) : /* @__PURE__ */ f(
|
|
4463
|
+
) : /* @__PURE__ */ f(q, { children: [
|
|
4503
4464
|
t == null ? void 0 : t(),
|
|
4504
4465
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
|
|
4505
4466
|
s == null ? void 0 : s()
|
|
@@ -4509,19 +4470,19 @@ const Wi = ({
|
|
|
4509
4470
|
ref: u,
|
|
4510
4471
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4511
4472
|
children: [
|
|
4512
|
-
/* @__PURE__ */ n(
|
|
4473
|
+
/* @__PURE__ */ n(on, {}),
|
|
4513
4474
|
/* @__PURE__ */ f("div", { className: "relative z-10 flex min-h-0 flex-col", children: [
|
|
4514
4475
|
t == null ? void 0 : t(),
|
|
4515
4476
|
/* @__PURE__ */ f("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
|
|
4516
4477
|
/* @__PURE__ */ f(
|
|
4517
4478
|
"div",
|
|
4518
4479
|
{
|
|
4519
|
-
inert:
|
|
4520
|
-
"aria-disabled":
|
|
4480
|
+
inert: o ? "" : void 0,
|
|
4481
|
+
"aria-disabled": o || void 0,
|
|
4521
4482
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4522
4483
|
children: [
|
|
4523
4484
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4524
|
-
/* @__PURE__ */ n(Be.Provider, { value:
|
|
4485
|
+
/* @__PURE__ */ n(Be.Provider, { value: o, children: /* @__PURE__ */ n(Vt, { Input: i ?? rn }) })
|
|
4525
4486
|
]
|
|
4526
4487
|
}
|
|
4527
4488
|
),
|
|
@@ -4535,28 +4496,28 @@ const Wi = ({
|
|
|
4535
4496
|
/* @__PURE__ */ f(
|
|
4536
4497
|
"div",
|
|
4537
4498
|
{
|
|
4538
|
-
inert:
|
|
4539
|
-
"aria-disabled":
|
|
4499
|
+
inert: o ? "" : void 0,
|
|
4500
|
+
"aria-disabled": o || void 0,
|
|
4540
4501
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4541
4502
|
children: [
|
|
4542
4503
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4543
|
-
/* @__PURE__ */ n(Be.Provider, { value:
|
|
4504
|
+
/* @__PURE__ */ n(Be.Provider, { value: o, children: /* @__PURE__ */ n(Vt, { Input: rn }) })
|
|
4544
4505
|
]
|
|
4545
4506
|
}
|
|
4546
4507
|
),
|
|
4547
4508
|
s == null ? void 0 : s()
|
|
4548
4509
|
] });
|
|
4549
|
-
},
|
|
4510
|
+
}, ro = {
|
|
4550
4511
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
4551
4512
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
4552
|
-
},
|
|
4513
|
+
}, io = ["SYSTEM_AGE_SAFETY_BLOCKED"], oo = {
|
|
4553
4514
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4554
|
-
}, et = "age safety guidelines.",
|
|
4515
|
+
}, et = "age safety guidelines.", lo = "https://linktr.ee/s/about/contact", co = (e) => io.includes(
|
|
4555
4516
|
e
|
|
4556
|
-
),
|
|
4517
|
+
), uo = (e) => {
|
|
4557
4518
|
var t;
|
|
4558
|
-
return
|
|
4559
|
-
},
|
|
4519
|
+
return co((t = e.metadata) == null ? void 0 : t.custom_type);
|
|
4520
|
+
}, mo = (e) => {
|
|
4560
4521
|
var a;
|
|
4561
4522
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4562
4523
|
if (Yt(t))
|
|
@@ -4575,17 +4536,17 @@ const Wi = ({
|
|
|
4575
4536
|
kind: "dm-agent",
|
|
4576
4537
|
type: s
|
|
4577
4538
|
};
|
|
4578
|
-
},
|
|
4539
|
+
}, ho = (e) => {
|
|
4579
4540
|
const t = e.indexOf(et);
|
|
4580
4541
|
if (t === -1)
|
|
4581
4542
|
return e;
|
|
4582
4543
|
const s = t + et.length;
|
|
4583
|
-
return /* @__PURE__ */ f(
|
|
4544
|
+
return /* @__PURE__ */ f(q, { children: [
|
|
4584
4545
|
e.slice(0, t),
|
|
4585
4546
|
/* @__PURE__ */ n(
|
|
4586
4547
|
"a",
|
|
4587
4548
|
{
|
|
4588
|
-
href:
|
|
4549
|
+
href: lo,
|
|
4589
4550
|
target: "_blank",
|
|
4590
4551
|
rel: "noopener noreferrer",
|
|
4591
4552
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -4594,13 +4555,13 @@ const Wi = ({
|
|
|
4594
4555
|
),
|
|
4595
4556
|
e.slice(s)
|
|
4596
4557
|
] });
|
|
4597
|
-
},
|
|
4558
|
+
}, fo = (e) => {
|
|
4598
4559
|
var a, r;
|
|
4599
|
-
const t = !
|
|
4560
|
+
const t = !uo(e.message), s = mo(
|
|
4600
4561
|
e.message
|
|
4601
4562
|
);
|
|
4602
4563
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
4603
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
4564
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || ro[s.type];
|
|
4604
4565
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4605
4566
|
/* @__PURE__ */ f(
|
|
4606
4567
|
"div",
|
|
@@ -4622,11 +4583,11 @@ const Wi = ({
|
|
|
4622
4583
|
]
|
|
4623
4584
|
}
|
|
4624
4585
|
),
|
|
4625
|
-
!t && /* @__PURE__ */ n(
|
|
4586
|
+
!t && /* @__PURE__ */ n(Ke, { message: e.message })
|
|
4626
4587
|
] });
|
|
4627
4588
|
}
|
|
4628
4589
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
4629
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4590
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || oo[s.type];
|
|
4630
4591
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4631
4592
|
/* @__PURE__ */ f(
|
|
4632
4593
|
"div",
|
|
@@ -4645,11 +4606,11 @@ const Wi = ({
|
|
|
4645
4606
|
"data-testid": "age-safety-system-message-icon"
|
|
4646
4607
|
}
|
|
4647
4608
|
),
|
|
4648
|
-
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("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:
|
|
4609
|
+
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("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: ho(i) }) })
|
|
4649
4610
|
]
|
|
4650
4611
|
}
|
|
4651
4612
|
),
|
|
4652
|
-
!t && /* @__PURE__ */ n(
|
|
4613
|
+
!t && /* @__PURE__ */ n(Ke, { message: e.message })
|
|
4653
4614
|
] });
|
|
4654
4615
|
}
|
|
4655
4616
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -4658,9 +4619,9 @@ const Wi = ({
|
|
|
4658
4619
|
/* @__PURE__ */ n("p", { children: e.message.text }),
|
|
4659
4620
|
/* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
|
|
4660
4621
|
] }),
|
|
4661
|
-
!t && /* @__PURE__ */ n(
|
|
4622
|
+
!t && /* @__PURE__ */ n(Ke, { message: e.message })
|
|
4662
4623
|
] });
|
|
4663
|
-
},
|
|
4624
|
+
}, qn = je(!1), tt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
4664
4625
|
"animateTransform",
|
|
4665
4626
|
{
|
|
4666
4627
|
attributeName: "transform",
|
|
@@ -4670,15 +4631,15 @@ const Wi = ({
|
|
|
4670
4631
|
begin: `${120 * t}ms`,
|
|
4671
4632
|
repeatCount: "indefinite"
|
|
4672
4633
|
}
|
|
4673
|
-
) }),
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
]),
|
|
4634
|
+
) }), go = /* @__PURE__ */ new Set([
|
|
4635
|
+
Xe.Thinking,
|
|
4636
|
+
Xe.Generating,
|
|
4637
|
+
Xe.ExternalSources
|
|
4638
|
+
]), po = ({ threadList: e }) => {
|
|
4678
4639
|
var p, w;
|
|
4679
|
-
const { channel: t, channelConfig: s, thread: a } = we(), { client: r } = He(), { typing: i = {} } =
|
|
4680
|
-
if (!e &&
|
|
4681
|
-
const v =
|
|
4640
|
+
const { channel: t, channelConfig: s, thread: a } = we(), { client: r } = He(), { typing: i = {} } = Fs(), { aiState: l } = zs(t), o = xe(qn);
|
|
4641
|
+
if (!e && o && go.has(l)) {
|
|
4642
|
+
const v = bo(t, (p = r.user) == null ? void 0 : p.id);
|
|
4682
4643
|
return /* @__PURE__ */ n(
|
|
4683
4644
|
cn,
|
|
4684
4645
|
{
|
|
@@ -4761,7 +4722,7 @@ const Wi = ({
|
|
|
4761
4722
|
] })
|
|
4762
4723
|
}
|
|
4763
4724
|
);
|
|
4764
|
-
function
|
|
4725
|
+
function bo(e, t) {
|
|
4765
4726
|
var a;
|
|
4766
4727
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4767
4728
|
for (const r of Object.values(s)) {
|
|
@@ -4770,7 +4731,7 @@ function gl(e, t) {
|
|
|
4770
4731
|
return i;
|
|
4771
4732
|
}
|
|
4772
4733
|
}
|
|
4773
|
-
const
|
|
4734
|
+
const vo = () => null, xo = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
4774
4735
|
"div",
|
|
4775
4736
|
{
|
|
4776
4737
|
className: N("flex items-center justify-center h-full", e),
|
|
@@ -4813,20 +4774,20 @@ const pl = () => null, bl = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
|
4813
4774
|
t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
|
|
4814
4775
|
]
|
|
4815
4776
|
}
|
|
4816
|
-
), Ue =
|
|
4817
|
-
/* @__PURE__ */ n(
|
|
4777
|
+
), Ue = P.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
|
|
4778
|
+
/* @__PURE__ */ n(xo, { className: "w-6 h-6" }),
|
|
4818
4779
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4819
4780
|
] }) }));
|
|
4820
4781
|
Ue.displayName = "LoadingState";
|
|
4821
|
-
const
|
|
4782
|
+
const wo = ({
|
|
4822
4783
|
onBack: e,
|
|
4823
4784
|
showBackButton: t,
|
|
4824
4785
|
renderMessageInputActions: s,
|
|
4825
4786
|
renderMessageInputFooter: a,
|
|
4826
4787
|
renderConversationFooter: r,
|
|
4827
4788
|
onLeaveConversation: i,
|
|
4828
|
-
onBlockParticipant:
|
|
4829
|
-
showDeleteConversation:
|
|
4789
|
+
onBlockParticipant: l,
|
|
4790
|
+
showDeleteConversation: o = !0,
|
|
4830
4791
|
onDeleteConversationClick: d,
|
|
4831
4792
|
onBlockParticipantClick: u,
|
|
4832
4793
|
onReportParticipantClick: h,
|
|
@@ -4843,19 +4804,19 @@ const vl = ({
|
|
|
4843
4804
|
showChannelInfo: T = !0,
|
|
4844
4805
|
onParticipantNameClick: L,
|
|
4845
4806
|
onOutboundClick: E,
|
|
4846
|
-
resolveOutbound:
|
|
4807
|
+
resolveOutbound: z,
|
|
4847
4808
|
composerInput: F
|
|
4848
4809
|
}) => {
|
|
4849
4810
|
const { channel: R, messages: I } = we(), M = V(E);
|
|
4850
4811
|
W(() => {
|
|
4851
4812
|
M.current = E;
|
|
4852
4813
|
}, [E]);
|
|
4853
|
-
const S =
|
|
4814
|
+
const S = K((Z) => {
|
|
4854
4815
|
var J;
|
|
4855
4816
|
(J = M.current) == null || J.call(M, Z);
|
|
4856
|
-
}, []), C = E ? S : void 0, A = pr(I,
|
|
4817
|
+
}, []), C = E ? S : void 0, A = pr(I, z), O = R.state.messages.some(
|
|
4857
4818
|
(Z) => Z.type !== "deleted"
|
|
4858
|
-
),
|
|
4819
|
+
), B = v ? /* @__PURE__ */ n(P.Fragment, { children: v() }, "lt-channel-banner") : null, G = /* @__PURE__ */ n(
|
|
4859
4820
|
La,
|
|
4860
4821
|
{
|
|
4861
4822
|
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%)]",
|
|
@@ -4864,8 +4825,8 @@ const vl = ({
|
|
|
4864
4825
|
showChannelInfo: T,
|
|
4865
4826
|
showStarButton: w,
|
|
4866
4827
|
onLeaveConversation: i,
|
|
4867
|
-
onBlockParticipant:
|
|
4868
|
-
showDeleteConversation:
|
|
4828
|
+
onBlockParticipant: l,
|
|
4829
|
+
showDeleteConversation: o,
|
|
4869
4830
|
showBlockParticipant: m,
|
|
4870
4831
|
showReportParticipant: g,
|
|
4871
4832
|
onDeleteConversationClick: d,
|
|
@@ -4875,17 +4836,17 @@ const vl = ({
|
|
|
4875
4836
|
renderChannelActions: b,
|
|
4876
4837
|
onParticipantNameClick: L
|
|
4877
4838
|
}
|
|
4878
|
-
), ee =
|
|
4839
|
+
), ee = K(
|
|
4879
4840
|
(Z) => {
|
|
4880
|
-
const { message: J } = fe("ChannelView"),
|
|
4881
|
-
|
|
4841
|
+
const { message: J } = fe("ChannelView"), j = /* @__PURE__ */ n(
|
|
4842
|
+
Zi,
|
|
4882
4843
|
{
|
|
4883
4844
|
...Z,
|
|
4884
4845
|
viewerLanguage: _,
|
|
4885
4846
|
onOutboundClick: C
|
|
4886
4847
|
}
|
|
4887
4848
|
);
|
|
4888
|
-
return !y || !J ?
|
|
4849
|
+
return !y || !J ? j : y(j, J);
|
|
4889
4850
|
},
|
|
4890
4851
|
[C, y, _]
|
|
4891
4852
|
);
|
|
@@ -4894,7 +4855,7 @@ const vl = ({
|
|
|
4894
4855
|
{
|
|
4895
4856
|
overrides: {
|
|
4896
4857
|
Message: ee,
|
|
4897
|
-
MessageActions:
|
|
4858
|
+
MessageActions: eo,
|
|
4898
4859
|
UnreadMessagesNotification: () => null,
|
|
4899
4860
|
UnreadMessagesSeparator: () => null
|
|
4900
4861
|
},
|
|
@@ -4904,16 +4865,16 @@ const vl = ({
|
|
|
4904
4865
|
{
|
|
4905
4866
|
className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
|
|
4906
4867
|
children: [
|
|
4907
|
-
!
|
|
4868
|
+
!O && /* @__PURE__ */ n("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
|
|
4908
4869
|
G,
|
|
4909
|
-
|
|
4870
|
+
B
|
|
4910
4871
|
] }) }),
|
|
4911
4872
|
/* @__PURE__ */ n(
|
|
4912
4873
|
Gt,
|
|
4913
4874
|
{
|
|
4914
|
-
head:
|
|
4875
|
+
head: O ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4915
4876
|
G,
|
|
4916
|
-
|
|
4877
|
+
B
|
|
4917
4878
|
] }) : void 0,
|
|
4918
4879
|
hideDeletedMessages: !0,
|
|
4919
4880
|
hideNewMessageSeparator: !1
|
|
@@ -4924,7 +4885,7 @@ const vl = ({
|
|
|
4924
4885
|
"lt-channel-message-list"
|
|
4925
4886
|
),
|
|
4926
4887
|
/* @__PURE__ */ n(
|
|
4927
|
-
|
|
4888
|
+
ln,
|
|
4928
4889
|
{
|
|
4929
4890
|
...s && {
|
|
4930
4891
|
renderActions: () => s == null ? void 0 : s(R)
|
|
@@ -4939,22 +4900,22 @@ const vl = ({
|
|
|
4939
4900
|
},
|
|
4940
4901
|
"lt-channel-message-input"
|
|
4941
4902
|
)
|
|
4942
|
-
] }) : /* @__PURE__ */ f(
|
|
4903
|
+
] }) : /* @__PURE__ */ f(q, { children: [
|
|
4943
4904
|
/* @__PURE__ */ f(
|
|
4944
4905
|
"div",
|
|
4945
4906
|
{
|
|
4946
4907
|
className: "flex-1 overflow-hidden relative",
|
|
4947
4908
|
children: [
|
|
4948
|
-
!
|
|
4909
|
+
!O && /* @__PURE__ */ n("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
|
|
4949
4910
|
G,
|
|
4950
|
-
|
|
4911
|
+
B
|
|
4951
4912
|
] }) }),
|
|
4952
4913
|
/* @__PURE__ */ n(
|
|
4953
4914
|
Gt,
|
|
4954
4915
|
{
|
|
4955
|
-
head:
|
|
4916
|
+
head: O ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4956
4917
|
G,
|
|
4957
|
-
|
|
4918
|
+
B
|
|
4958
4919
|
] }) : void 0,
|
|
4959
4920
|
hideDeletedMessages: !0,
|
|
4960
4921
|
hideNewMessageSeparator: !1
|
|
@@ -4964,9 +4925,9 @@ const vl = ({
|
|
|
4964
4925
|
},
|
|
4965
4926
|
"lt-channel-message-list"
|
|
4966
4927
|
),
|
|
4967
|
-
r ? /* @__PURE__ */ n(
|
|
4928
|
+
r ? /* @__PURE__ */ n(P.Fragment, { children: r(R) }, "lt-channel-conversation-footer") : null,
|
|
4968
4929
|
/* @__PURE__ */ n(
|
|
4969
|
-
|
|
4930
|
+
ln,
|
|
4970
4931
|
{
|
|
4971
4932
|
...s && {
|
|
4972
4933
|
renderActions: () => s == null ? void 0 : s(R)
|
|
@@ -4981,7 +4942,7 @@ const vl = ({
|
|
|
4981
4942
|
] }) })
|
|
4982
4943
|
}
|
|
4983
4944
|
) });
|
|
4984
|
-
}, Zn =
|
|
4945
|
+
}, Zn = P.memo(
|
|
4985
4946
|
({
|
|
4986
4947
|
channel: e,
|
|
4987
4948
|
onBack: t,
|
|
@@ -4989,10 +4950,10 @@ const vl = ({
|
|
|
4989
4950
|
renderMessageInputActions: a,
|
|
4990
4951
|
renderMessageInputFooter: r,
|
|
4991
4952
|
renderConversationFooter: i,
|
|
4992
|
-
onLeaveConversation:
|
|
4993
|
-
onBlockParticipant:
|
|
4953
|
+
onLeaveConversation: l,
|
|
4954
|
+
onBlockParticipant: o,
|
|
4994
4955
|
className: d,
|
|
4995
|
-
CustomChannelEmptyState: u =
|
|
4956
|
+
CustomChannelEmptyState: u = vo,
|
|
4996
4957
|
showDeleteConversation: h = !0,
|
|
4997
4958
|
onDeleteConversationClick: m,
|
|
4998
4959
|
onBlockParticipantClick: g,
|
|
@@ -5007,7 +4968,7 @@ const vl = ({
|
|
|
5007
4968
|
showStarButton: T = !1,
|
|
5008
4969
|
renderChannelBanner: L,
|
|
5009
4970
|
customChannelActions: E,
|
|
5010
|
-
renderChannelActions:
|
|
4971
|
+
renderChannelActions: z,
|
|
5011
4972
|
renderMessage: F,
|
|
5012
4973
|
onMessageLinkClick: R,
|
|
5013
4974
|
sendButton: I,
|
|
@@ -5015,41 +4976,41 @@ const vl = ({
|
|
|
5015
4976
|
viewerLanguage: S,
|
|
5016
4977
|
showChannelInfo: C = !0,
|
|
5017
4978
|
onParticipantNameClick: A,
|
|
5018
|
-
onOutboundClick:
|
|
5019
|
-
resolveOutbound:
|
|
4979
|
+
onOutboundClick: O,
|
|
4980
|
+
resolveOutbound: B,
|
|
5020
4981
|
composerInput: G
|
|
5021
4982
|
}) => {
|
|
5022
|
-
const ee =
|
|
5023
|
-
async (
|
|
4983
|
+
const ee = K(
|
|
4984
|
+
async (j, k, D) => {
|
|
5024
4985
|
var ue;
|
|
5025
|
-
const Y = ((ue = e.data) == null ? void 0 : ue.chatbot_paused) === !0,
|
|
4986
|
+
const Y = ((ue = e.data) == null ? void 0 : ue.chatbot_paused) === !0, U = b && !Y, Q = {
|
|
5026
4987
|
...k,
|
|
5027
|
-
...
|
|
4988
|
+
...U && { silent: !0 },
|
|
5028
4989
|
...y && {
|
|
5029
4990
|
metadata: {
|
|
5030
4991
|
...k.metadata ?? {},
|
|
5031
4992
|
...y
|
|
5032
4993
|
}
|
|
5033
4994
|
}
|
|
5034
|
-
},
|
|
4995
|
+
}, X = {
|
|
5035
4996
|
...D,
|
|
5036
|
-
...
|
|
5037
|
-
}, ne = await e.sendMessage(Q,
|
|
4997
|
+
...U && { skip_push: !0 }
|
|
4998
|
+
}, ne = await e.sendMessage(Q, X);
|
|
5038
4999
|
return _ == null || _(ne), ne;
|
|
5039
5000
|
},
|
|
5040
5001
|
[e, b, y, _]
|
|
5041
5002
|
), Z = V(null);
|
|
5042
5003
|
W(() => {
|
|
5043
5004
|
if (!R) return;
|
|
5044
|
-
const
|
|
5045
|
-
if (!
|
|
5005
|
+
const j = Z.current;
|
|
5006
|
+
if (!j) return;
|
|
5046
5007
|
const k = (D) => {
|
|
5047
|
-
const Y = D.target,
|
|
5008
|
+
const Y = D.target, U = Y == null ? void 0 : Y.closest("a[href]"), Q = U == null ? void 0 : U.getAttribute("href");
|
|
5048
5009
|
if (!Q) return;
|
|
5049
|
-
const
|
|
5010
|
+
const X = U == null ? void 0 : U.closest("[data-message-id]"), ne = X == null ? void 0 : X.getAttribute("data-message-id"), ue = ne ? e.state.messages.find((ae) => ae.id === ne) : void 0;
|
|
5050
5011
|
R(Q, ue);
|
|
5051
5012
|
};
|
|
5052
|
-
return
|
|
5013
|
+
return j.addEventListener("click", k), () => j.removeEventListener("click", k);
|
|
5053
5014
|
}, [R, e]);
|
|
5054
5015
|
const J = hn(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
|
|
5055
5016
|
return /* @__PURE__ */ n(
|
|
@@ -5061,28 +5022,28 @@ const vl = ({
|
|
|
5061
5022
|
d
|
|
5062
5023
|
),
|
|
5063
5024
|
style: J,
|
|
5064
|
-
children: /* @__PURE__ */ n(
|
|
5025
|
+
children: /* @__PURE__ */ n(qn.Provider, { value: b ?? !1, children: /* @__PURE__ */ n(
|
|
5065
5026
|
$s,
|
|
5066
5027
|
{
|
|
5067
5028
|
channel: e,
|
|
5068
|
-
MessageSystem:
|
|
5029
|
+
MessageSystem: fo,
|
|
5069
5030
|
EmptyStateIndicator: u,
|
|
5070
5031
|
LoadingIndicator: Ue,
|
|
5071
5032
|
DateSeparator: Ma,
|
|
5072
|
-
TypingIndicator:
|
|
5033
|
+
TypingIndicator: po,
|
|
5073
5034
|
doSendMessageRequest: ee,
|
|
5074
5035
|
...I ? { SendButton: I } : {},
|
|
5075
5036
|
...M ? { AttachmentPreviewList: M } : {},
|
|
5076
5037
|
children: /* @__PURE__ */ n(
|
|
5077
|
-
|
|
5038
|
+
wo,
|
|
5078
5039
|
{
|
|
5079
5040
|
onBack: t,
|
|
5080
5041
|
showBackButton: s,
|
|
5081
5042
|
renderMessageInputActions: a,
|
|
5082
5043
|
renderMessageInputFooter: r,
|
|
5083
5044
|
renderConversationFooter: i,
|
|
5084
|
-
onLeaveConversation:
|
|
5085
|
-
onBlockParticipant:
|
|
5045
|
+
onLeaveConversation: l,
|
|
5046
|
+
onBlockParticipant: o,
|
|
5086
5047
|
CustomChannelEmptyState: u,
|
|
5087
5048
|
showDeleteConversation: h,
|
|
5088
5049
|
onDeleteConversationClick: m,
|
|
@@ -5095,13 +5056,13 @@ const vl = ({
|
|
|
5095
5056
|
showStarButton: T,
|
|
5096
5057
|
renderChannelBanner: L,
|
|
5097
5058
|
customChannelActions: E,
|
|
5098
|
-
renderChannelActions:
|
|
5059
|
+
renderChannelActions: z,
|
|
5099
5060
|
renderMessage: F,
|
|
5100
5061
|
viewerLanguage: S,
|
|
5101
5062
|
showChannelInfo: C,
|
|
5102
5063
|
onParticipantNameClick: A,
|
|
5103
|
-
onOutboundClick:
|
|
5104
|
-
resolveOutbound:
|
|
5064
|
+
onOutboundClick: O,
|
|
5065
|
+
resolveOutbound: B,
|
|
5105
5066
|
composerInput: G
|
|
5106
5067
|
}
|
|
5107
5068
|
)
|
|
@@ -5112,7 +5073,7 @@ const vl = ({
|
|
|
5112
5073
|
}
|
|
5113
5074
|
);
|
|
5114
5075
|
Zn.displayName = "ChannelView";
|
|
5115
|
-
const Ce =
|
|
5076
|
+
const Ce = P.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("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: [
|
|
5116
5077
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
5117
5078
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
5118
5079
|
/* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -5127,15 +5088,15 @@ const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
5127
5088
|
)
|
|
5128
5089
|
] }) }));
|
|
5129
5090
|
Ce.displayName = "ErrorState";
|
|
5130
|
-
const
|
|
5091
|
+
const ol = ({
|
|
5131
5092
|
capabilities: e = {},
|
|
5132
5093
|
renderMessageInputActions: t,
|
|
5133
5094
|
renderConversationFooter: s,
|
|
5134
5095
|
onChannelSelect: a,
|
|
5135
5096
|
onExitConversation: r,
|
|
5136
5097
|
initialParticipantFilter: i,
|
|
5137
|
-
initialParticipantData:
|
|
5138
|
-
CustomChannelEmptyState:
|
|
5098
|
+
initialParticipantData: l,
|
|
5099
|
+
CustomChannelEmptyState: o,
|
|
5139
5100
|
onBlockParticipantClick: d,
|
|
5140
5101
|
onReportParticipantClick: u,
|
|
5141
5102
|
dmAgentEnabled: h,
|
|
@@ -5154,28 +5115,28 @@ const ro = ({
|
|
|
5154
5115
|
}) => {
|
|
5155
5116
|
const {
|
|
5156
5117
|
client: E,
|
|
5157
|
-
isConnected:
|
|
5118
|
+
isConnected: z,
|
|
5158
5119
|
isLoading: F,
|
|
5159
5120
|
error: R,
|
|
5160
5121
|
refreshConnection: I,
|
|
5161
5122
|
service: M,
|
|
5162
5123
|
debug: S
|
|
5163
|
-
} = _a(), [C, A] =
|
|
5164
|
-
J.current =
|
|
5165
|
-
const
|
|
5166
|
-
|
|
5124
|
+
} = _a(), [C, A] = $(null), [O, B] = $(null), [G, ee] = $(!1), { showDeleteConversation: Z = !0 } = e, J = V(l);
|
|
5125
|
+
J.current = l;
|
|
5126
|
+
const j = V(a);
|
|
5127
|
+
j.current = a;
|
|
5167
5128
|
const k = V(null), D = V(null);
|
|
5168
5129
|
W(() => {
|
|
5169
5130
|
D.current = C;
|
|
5170
5131
|
}, [C]), W(() => {
|
|
5171
|
-
if (!E ||
|
|
5132
|
+
if (!E || !z) return;
|
|
5172
5133
|
const Q = E.userID;
|
|
5173
5134
|
if (!Q) return;
|
|
5174
|
-
const
|
|
5175
|
-
if (k.current ===
|
|
5176
|
-
k.current =
|
|
5135
|
+
const X = `${Q}::${i}`;
|
|
5136
|
+
if (k.current === X) return;
|
|
5137
|
+
k.current = X;
|
|
5177
5138
|
const ne = () => {
|
|
5178
|
-
k.current ===
|
|
5139
|
+
k.current === X && (k.current = null);
|
|
5179
5140
|
};
|
|
5180
5141
|
(async () => {
|
|
5181
5142
|
var ae, De;
|
|
@@ -5193,7 +5154,7 @@ const ro = ({
|
|
|
5193
5154
|
{ limit: 1 }
|
|
5194
5155
|
);
|
|
5195
5156
|
if (se.length > 0) {
|
|
5196
|
-
A(se[0]),
|
|
5157
|
+
A(se[0]), B(null), (ae = j.current) == null || ae.call(j, se[0]), S && console.log(
|
|
5197
5158
|
"[MessagingShell] Initial conversation loaded:",
|
|
5198
5159
|
se[0].id
|
|
5199
5160
|
);
|
|
@@ -5201,7 +5162,7 @@ const ro = ({
|
|
|
5201
5162
|
}
|
|
5202
5163
|
const me = J.current;
|
|
5203
5164
|
if (!me || !M) {
|
|
5204
|
-
ne(),
|
|
5165
|
+
ne(), B("No conversation found with this account"), S && console.log(
|
|
5205
5166
|
"[MessagingShell] No conversation found for:",
|
|
5206
5167
|
i
|
|
5207
5168
|
);
|
|
@@ -5213,7 +5174,7 @@ const ro = ({
|
|
|
5213
5174
|
name: me.name,
|
|
5214
5175
|
phone: me.phone
|
|
5215
5176
|
});
|
|
5216
|
-
A(ie),
|
|
5177
|
+
A(ie), B(null), (De = j.current) == null || De.call(j, ie), S && console.log(
|
|
5217
5178
|
"[MessagingShell] Channel created and loaded:",
|
|
5218
5179
|
ie.id
|
|
5219
5180
|
);
|
|
@@ -5221,38 +5182,38 @@ const ro = ({
|
|
|
5221
5182
|
console.error(
|
|
5222
5183
|
"[MessagingShell] Failed to create conversation:",
|
|
5223
5184
|
ie
|
|
5224
|
-
), ne(),
|
|
5185
|
+
), ne(), B("Failed to create conversation");
|
|
5225
5186
|
}
|
|
5226
5187
|
} catch (se) {
|
|
5227
5188
|
console.error(
|
|
5228
5189
|
"[MessagingShell] Failed to load initial conversation:",
|
|
5229
5190
|
se
|
|
5230
|
-
), ne(), D.current ||
|
|
5191
|
+
), ne(), D.current || B("Failed to load conversation");
|
|
5231
5192
|
}
|
|
5232
5193
|
})();
|
|
5233
|
-
}, [i, E,
|
|
5194
|
+
}, [i, E, z, M, S]);
|
|
5234
5195
|
const Y = V(r);
|
|
5235
5196
|
Y.current = r;
|
|
5236
|
-
const
|
|
5197
|
+
const U = K(() => {
|
|
5237
5198
|
var Q;
|
|
5238
5199
|
A(null), ee(!0), (Q = Y.current) == null || Q.call(Y);
|
|
5239
5200
|
}, []);
|
|
5240
|
-
return F ? /* @__PURE__ */ n(Ue, {}) : R ? /* @__PURE__ */ n(Ce, { message: R, onBack: I }) :
|
|
5201
|
+
return F ? /* @__PURE__ */ n(Ue, {}) : R ? /* @__PURE__ */ n(Ce, { message: R, onBack: I }) : !z || !E ? /* @__PURE__ */ n(
|
|
5241
5202
|
Ce,
|
|
5242
5203
|
{
|
|
5243
5204
|
message: "Not connected to messaging service",
|
|
5244
5205
|
onBack: I
|
|
5245
5206
|
}
|
|
5246
|
-
) :
|
|
5207
|
+
) : O ? /* @__PURE__ */ n(Ce, { message: O }) : G && !C ? /* @__PURE__ */ n(Ce, { message: "Conversation ended" }) : C ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
|
|
5247
5208
|
Zn,
|
|
5248
5209
|
{
|
|
5249
5210
|
channel: C,
|
|
5250
5211
|
renderMessageInputActions: t,
|
|
5251
5212
|
renderConversationFooter: s,
|
|
5252
5213
|
renderChannelBanner: c,
|
|
5253
|
-
onLeaveConversation:
|
|
5254
|
-
onBlockParticipant:
|
|
5255
|
-
CustomChannelEmptyState:
|
|
5214
|
+
onLeaveConversation: U,
|
|
5215
|
+
onBlockParticipant: U,
|
|
5216
|
+
CustomChannelEmptyState: o,
|
|
5256
5217
|
showDeleteConversation: Z,
|
|
5257
5218
|
onBlockParticipantClick: d,
|
|
5258
5219
|
onReportParticipantClick: u,
|
|
@@ -5272,13 +5233,13 @@ const ro = ({
|
|
|
5272
5233
|
C.id
|
|
5273
5234
|
) }) }) : /* @__PURE__ */ n(Ue, {});
|
|
5274
5235
|
};
|
|
5275
|
-
function
|
|
5236
|
+
function _o(e) {
|
|
5276
5237
|
const t = e.state.pending_messages;
|
|
5277
5238
|
if (t != null && t.length)
|
|
5278
5239
|
for (const s of t)
|
|
5279
5240
|
e.state.addMessageSorted(s.message);
|
|
5280
5241
|
}
|
|
5281
|
-
const Jn =
|
|
5242
|
+
const Jn = P.createContext({
|
|
5282
5243
|
selectedChannel: void 0,
|
|
5283
5244
|
onChannelSelect: () => {
|
|
5284
5245
|
},
|
|
@@ -5286,14 +5247,14 @@ const Jn = z.createContext({
|
|
|
5286
5247
|
renderMessagePreview: void 0,
|
|
5287
5248
|
channelPreview: void 0,
|
|
5288
5249
|
viewerLanguage: void 0
|
|
5289
|
-
}),
|
|
5250
|
+
}), yo = Jn.Provider, No = () => P.useContext(Jn), ko = (e, t) => {
|
|
5290
5251
|
const s = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
5291
5252
|
return Math.floor((a - s) / (1e3 * 60 * 60 * 24));
|
|
5292
|
-
},
|
|
5253
|
+
}, Co = (e) => {
|
|
5293
5254
|
const t = /* @__PURE__ */ new Date();
|
|
5294
5255
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
5295
5256
|
return "Just now";
|
|
5296
|
-
const a =
|
|
5257
|
+
const a = ko(e, t);
|
|
5297
5258
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
5298
5259
|
hour: "numeric",
|
|
5299
5260
|
minute: "2-digit",
|
|
@@ -5306,20 +5267,20 @@ const Jn = z.createContext({
|
|
|
5306
5267
|
day: "numeric",
|
|
5307
5268
|
year: "numeric"
|
|
5308
5269
|
});
|
|
5309
|
-
}, Qn =
|
|
5270
|
+
}, Qn = P.memo(
|
|
5310
5271
|
(e) => {
|
|
5311
|
-
var
|
|
5272
|
+
var z, F, R;
|
|
5312
5273
|
const { channel: t, unread: s } = e, {
|
|
5313
5274
|
selectedChannel: a,
|
|
5314
5275
|
onChannelSelect: r,
|
|
5315
5276
|
debug: i,
|
|
5316
|
-
channelPreview:
|
|
5317
|
-
renderMessagePreview:
|
|
5277
|
+
channelPreview: l,
|
|
5278
|
+
renderMessagePreview: o,
|
|
5318
5279
|
viewerLanguage: d
|
|
5319
|
-
} =
|
|
5320
|
-
if (
|
|
5280
|
+
} = No(), { client: u } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = wn(t);
|
|
5281
|
+
if (l)
|
|
5321
5282
|
return /* @__PURE__ */ n(
|
|
5322
|
-
|
|
5283
|
+
l,
|
|
5323
5284
|
{
|
|
5324
5285
|
...e,
|
|
5325
5286
|
active: h,
|
|
@@ -5334,7 +5295,7 @@ const Jn = z.createContext({
|
|
|
5334
5295
|
const M = I.key === "Enter" || I.key === " ", S = I.repeat;
|
|
5335
5296
|
!M || S || (I.preventDefault(), g());
|
|
5336
5297
|
}, p = _n(
|
|
5337
|
-
(
|
|
5298
|
+
(z = t == null ? void 0 : t.state) == null ? void 0 : z.members,
|
|
5338
5299
|
u == null ? void 0 : u.userID,
|
|
5339
5300
|
t == null ? void 0 : t.type
|
|
5340
5301
|
), w = yn(p == null ? void 0 : p.user), v = (F = p == null ? void 0 : p.user) == null ? void 0 : F.image, x = (() => {
|
|
@@ -5350,11 +5311,11 @@ const Jn = z.createContext({
|
|
|
5350
5311
|
message: x,
|
|
5351
5312
|
viewerLanguage: d
|
|
5352
5313
|
}), { custom_type: M, attachment_content_type: S } = (x == null ? void 0 : x.metadata) || {};
|
|
5353
|
-
if (M ===
|
|
5314
|
+
if (M === le.TIP)
|
|
5354
5315
|
return I || "Sent a tip";
|
|
5355
|
-
if (M ===
|
|
5316
|
+
if (M === le.PAID)
|
|
5356
5317
|
return I || "Sent a message";
|
|
5357
|
-
if (M ===
|
|
5318
|
+
if (M === le.ATTACHMENT) {
|
|
5358
5319
|
if (S === "text")
|
|
5359
5320
|
return "🔒 Sent a locked message";
|
|
5360
5321
|
if (S === "media")
|
|
@@ -5363,7 +5324,7 @@ const Jn = z.createContext({
|
|
|
5363
5324
|
if (I) return I;
|
|
5364
5325
|
const C = (A = x == null ? void 0 : x.attachments) == null ? void 0 : A[0];
|
|
5365
5326
|
return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5366
|
-
})(), _ = x != null && x.created_at ?
|
|
5327
|
+
})(), _ = x != null && x.created_at ? Co(new Date(x.created_at)) : "", T = x ? ze(x) : !1, L = o ? o(x, y) : `${T ? "✨ " : ""}${y}`, E = s ?? 0;
|
|
5367
5328
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5368
5329
|
channelId: t == null ? void 0 : t.id,
|
|
5369
5330
|
isSelected: h,
|
|
@@ -5423,16 +5384,16 @@ const Jn = z.createContext({
|
|
|
5423
5384
|
}
|
|
5424
5385
|
);
|
|
5425
5386
|
Qn.displayName = "CustomChannelPreview";
|
|
5426
|
-
const
|
|
5387
|
+
const So = { last_message_at: -1 }, Eo = P.memo(
|
|
5427
5388
|
({
|
|
5428
5389
|
onChannelSelect: e,
|
|
5429
5390
|
selectedChannel: t,
|
|
5430
5391
|
filters: s,
|
|
5431
5392
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5432
5393
|
channelRenderFilterFn: r,
|
|
5433
|
-
sort: i =
|
|
5434
|
-
className:
|
|
5435
|
-
customEmptyStateIndicator:
|
|
5394
|
+
sort: i = So,
|
|
5395
|
+
className: l,
|
|
5396
|
+
customEmptyStateIndicator: o,
|
|
5436
5397
|
channelListPaginator: d = Hs,
|
|
5437
5398
|
channelPreview: u,
|
|
5438
5399
|
renderMessagePreview: h,
|
|
@@ -5444,12 +5405,12 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
|
5444
5405
|
onAddedToChannel: v,
|
|
5445
5406
|
onChannelUpdated: x
|
|
5446
5407
|
}) => {
|
|
5447
|
-
const b =
|
|
5408
|
+
const b = P.useRef(0);
|
|
5448
5409
|
b.current++;
|
|
5449
|
-
const { debug: y = !1 } =
|
|
5410
|
+
const { debug: y = !1 } = lt(), _ = P.useCallback(
|
|
5450
5411
|
(L) => {
|
|
5451
5412
|
for (const E of L)
|
|
5452
|
-
|
|
5413
|
+
_o(E);
|
|
5453
5414
|
return r ? r(L) : L;
|
|
5454
5415
|
},
|
|
5455
5416
|
[r]
|
|
@@ -5459,7 +5420,7 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
|
5459
5420
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5460
5421
|
filters: s
|
|
5461
5422
|
});
|
|
5462
|
-
const T =
|
|
5423
|
+
const T = P.useMemo(
|
|
5463
5424
|
() => ({
|
|
5464
5425
|
selectedChannel: t,
|
|
5465
5426
|
onChannelSelect: e,
|
|
@@ -5482,9 +5443,9 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
|
5482
5443
|
{
|
|
5483
5444
|
className: N(
|
|
5484
5445
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5485
|
-
|
|
5446
|
+
l
|
|
5486
5447
|
),
|
|
5487
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
5448
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(yo, { value: T, children: /* @__PURE__ */ n(
|
|
5488
5449
|
js,
|
|
5489
5450
|
{
|
|
5490
5451
|
filters: s,
|
|
@@ -5500,7 +5461,7 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
|
5500
5461
|
onChannelUpdated: x,
|
|
5501
5462
|
Paginator: d,
|
|
5502
5463
|
Preview: Qn,
|
|
5503
|
-
EmptyStateIndicator:
|
|
5464
|
+
EmptyStateIndicator: o
|
|
5504
5465
|
},
|
|
5505
5466
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
5506
5467
|
) }) })
|
|
@@ -5508,8 +5469,8 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
|
5508
5469
|
);
|
|
5509
5470
|
}
|
|
5510
5471
|
);
|
|
5511
|
-
|
|
5512
|
-
const
|
|
5472
|
+
Eo.displayName = "ChannelList";
|
|
5473
|
+
const Io = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", To = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", dn = ({ surface: e, actions: t, layout: s }) => {
|
|
5513
5474
|
if (t == null || t.length === 0) return null;
|
|
5514
5475
|
const a = s === "stacked";
|
|
5515
5476
|
return /* @__PURE__ */ n(
|
|
@@ -5535,31 +5496,31 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5535
5496
|
))
|
|
5536
5497
|
}
|
|
5537
5498
|
);
|
|
5538
|
-
},
|
|
5499
|
+
}, Ao = ({
|
|
5539
5500
|
ctaSurface: e,
|
|
5540
5501
|
chinTextColor: t,
|
|
5541
5502
|
title: s,
|
|
5542
5503
|
subtitle: a,
|
|
5543
5504
|
subtitleLines: r = 3,
|
|
5544
5505
|
appIcon: i,
|
|
5545
|
-
actions:
|
|
5506
|
+
actions: l
|
|
5546
5507
|
}) => {
|
|
5547
5508
|
var p;
|
|
5548
|
-
const
|
|
5549
|
-
if (!
|
|
5509
|
+
const o = s != null && s.trim() !== "", d = a != null && a.trim() !== "", u = l != null && l.length > 0;
|
|
5510
|
+
if (!o && !d && !u) return null;
|
|
5550
5511
|
const h = { color: t }, m = r > 1 ? {
|
|
5551
5512
|
...h,
|
|
5552
5513
|
display: "-webkit-box",
|
|
5553
5514
|
WebkitBoxOrient: "vertical",
|
|
5554
5515
|
WebkitLineClamp: r,
|
|
5555
5516
|
overflow: "hidden"
|
|
5556
|
-
} : h, g = u && (((p =
|
|
5557
|
-
|
|
5517
|
+
} : h, g = u && (((p = l == null ? void 0 : l[0]) == null ? void 0 : p.variant) ?? "primary") === "secondary", c = /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
|
|
5518
|
+
o && /* @__PURE__ */ f("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
5558
5519
|
i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
|
|
5559
5520
|
/* @__PURE__ */ n(
|
|
5560
5521
|
"p",
|
|
5561
5522
|
{
|
|
5562
|
-
className: N("min-w-0",
|
|
5523
|
+
className: N("min-w-0", Io),
|
|
5563
5524
|
style: h,
|
|
5564
5525
|
children: s
|
|
5565
5526
|
}
|
|
@@ -5569,7 +5530,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5569
5530
|
"p",
|
|
5570
5531
|
{
|
|
5571
5532
|
className: N(
|
|
5572
|
-
|
|
5533
|
+
To,
|
|
5573
5534
|
r > 1 && "whitespace-pre-line",
|
|
5574
5535
|
r <= 1 && "truncate"
|
|
5575
5536
|
),
|
|
@@ -5580,50 +5541,50 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5580
5541
|
] });
|
|
5581
5542
|
return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: g ? /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5582
5543
|
c,
|
|
5583
|
-
/* @__PURE__ */ n(dn, { surface: e, actions:
|
|
5584
|
-
] }) : /* @__PURE__ */ f(
|
|
5544
|
+
/* @__PURE__ */ n(dn, { surface: e, actions: l, layout: "row" })
|
|
5545
|
+
] }) : /* @__PURE__ */ f(q, { children: [
|
|
5585
5546
|
c,
|
|
5586
5547
|
/* @__PURE__ */ n(
|
|
5587
5548
|
dn,
|
|
5588
5549
|
{
|
|
5589
5550
|
surface: e,
|
|
5590
|
-
actions:
|
|
5551
|
+
actions: l,
|
|
5591
5552
|
layout: "stacked"
|
|
5592
5553
|
}
|
|
5593
5554
|
)
|
|
5594
5555
|
] }) });
|
|
5595
|
-
},
|
|
5556
|
+
}, Ro = {
|
|
5596
5557
|
dark: "bg-white/[0.06]",
|
|
5597
5558
|
light: "bg-black/[0.04]"
|
|
5598
|
-
},
|
|
5559
|
+
}, Lo = {
|
|
5599
5560
|
1: [0],
|
|
5600
5561
|
2: [-10, 10],
|
|
5601
5562
|
3: [-13, 0, 13]
|
|
5602
|
-
},
|
|
5563
|
+
}, Mo = {
|
|
5603
5564
|
1: [0],
|
|
5604
5565
|
2: [-26, 26],
|
|
5605
5566
|
3: [-40, 0, 40]
|
|
5606
|
-
},
|
|
5567
|
+
}, Do = {
|
|
5607
5568
|
1: [0],
|
|
5608
5569
|
2: [0, 1],
|
|
5609
5570
|
3: [1, 3, 2]
|
|
5610
|
-
},
|
|
5571
|
+
}, Oo = {
|
|
5611
5572
|
1: [1],
|
|
5612
5573
|
2: [1, 1],
|
|
5613
5574
|
3: [1, 1.08, 1]
|
|
5614
|
-
},
|
|
5615
|
-
const [s, a] =
|
|
5616
|
-
`), [i,
|
|
5617
|
-
r !== i && (
|
|
5618
|
-
const
|
|
5575
|
+
}, Po = ({ variant: e, images: t }) => {
|
|
5576
|
+
const [s, a] = P.useState({}), r = t.join(`
|
|
5577
|
+
`), [i, l] = P.useState(r);
|
|
5578
|
+
r !== i && (l(r), a({}));
|
|
5579
|
+
const o = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !s[c]), d = o.length >= 3 ? 3 : o.length === 2 ? 2 : 1, u = Lo[d], h = Mo[d], m = Do[d], g = Oo[d];
|
|
5619
5580
|
return /* @__PURE__ */ n(
|
|
5620
5581
|
"div",
|
|
5621
5582
|
{
|
|
5622
5583
|
className: N(
|
|
5623
5584
|
"relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
|
|
5624
|
-
|
|
5585
|
+
Ro[e]
|
|
5625
5586
|
),
|
|
5626
|
-
children:
|
|
5587
|
+
children: o.map(({ src: c, index: p }, w) => /* @__PURE__ */ n(
|
|
5627
5588
|
"img",
|
|
5628
5589
|
{
|
|
5629
5590
|
src: ce(c) ?? c,
|
|
@@ -5642,14 +5603,14 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5642
5603
|
))
|
|
5643
5604
|
}
|
|
5644
5605
|
);
|
|
5645
|
-
},
|
|
5606
|
+
}, Fo = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", zo = ({
|
|
5646
5607
|
variant: e,
|
|
5647
5608
|
presentation: t,
|
|
5648
5609
|
images: s,
|
|
5649
5610
|
title: a,
|
|
5650
5611
|
heroUrl: r,
|
|
5651
5612
|
onHeroError: i
|
|
5652
|
-
}) => /* @__PURE__ */ n("div", { className:
|
|
5613
|
+
}) => /* @__PURE__ */ n("div", { className: Fo, children: t === "fan" ? /* @__PURE__ */ n(Po, { variant: e, images: s }) : (
|
|
5653
5614
|
// `heroUrl` is the palette-tracked source: it becomes `undefined` when the
|
|
5654
5615
|
// hero image errors, so `CardThumbnail` falls through to its placeholder.
|
|
5655
5616
|
// Do NOT `?? images[0]` here — that would re-instate the failed URL.
|
|
@@ -5670,8 +5631,8 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5670
5631
|
subtitleLines: a,
|
|
5671
5632
|
images: r = [],
|
|
5672
5633
|
imagePresentation: i,
|
|
5673
|
-
actions:
|
|
5674
|
-
appIcon:
|
|
5634
|
+
actions: l,
|
|
5635
|
+
appIcon: o,
|
|
5675
5636
|
accentColor: d,
|
|
5676
5637
|
groupPosition: u = "single"
|
|
5677
5638
|
}) => {
|
|
@@ -5698,7 +5659,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5698
5659
|
"data-testid": "rich-card",
|
|
5699
5660
|
children: [
|
|
5700
5661
|
m && /* @__PURE__ */ n(
|
|
5701
|
-
|
|
5662
|
+
zo,
|
|
5702
5663
|
{
|
|
5703
5664
|
variant: e,
|
|
5704
5665
|
presentation: h,
|
|
@@ -5709,15 +5670,15 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5709
5670
|
}
|
|
5710
5671
|
),
|
|
5711
5672
|
/* @__PURE__ */ n(
|
|
5712
|
-
|
|
5673
|
+
Ao,
|
|
5713
5674
|
{
|
|
5714
5675
|
ctaSurface: c.surface,
|
|
5715
5676
|
chinTextColor: c.chinTextColor,
|
|
5716
5677
|
title: t,
|
|
5717
5678
|
subtitle: s,
|
|
5718
5679
|
subtitleLines: a,
|
|
5719
|
-
appIcon:
|
|
5720
|
-
actions:
|
|
5680
|
+
appIcon: o,
|
|
5681
|
+
actions: l
|
|
5721
5682
|
}
|
|
5722
5683
|
)
|
|
5723
5684
|
]
|
|
@@ -5725,13 +5686,13 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5725
5686
|
)
|
|
5726
5687
|
}
|
|
5727
5688
|
);
|
|
5728
|
-
},
|
|
5729
|
-
Sent:
|
|
5730
|
-
Received:
|
|
5731
|
-
}, un = `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%`,
|
|
5689
|
+
}, $o = (e) => /* @__PURE__ */ n(es, { ...e, variant: "dark" }), Bo = (e) => /* @__PURE__ */ n(es, { ...e, variant: "light" }), ll = {
|
|
5690
|
+
Sent: $o,
|
|
5691
|
+
Received: Bo
|
|
5692
|
+
}, un = `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 = {
|
|
5732
5693
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5733
5694
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5734
|
-
},
|
|
5695
|
+
}, jo = ({ variant: e }) => /* @__PURE__ */ n(
|
|
5735
5696
|
"span",
|
|
5736
5697
|
{
|
|
5737
5698
|
"aria-hidden": "true",
|
|
@@ -5741,12 +5702,12 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5741
5702
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5742
5703
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5743
5704
|
transformOrigin: "center",
|
|
5744
|
-
backgroundColor:
|
|
5705
|
+
backgroundColor: Uo[e],
|
|
5745
5706
|
WebkitMask: un,
|
|
5746
5707
|
mask: un
|
|
5747
5708
|
}
|
|
5748
5709
|
}
|
|
5749
|
-
),
|
|
5710
|
+
), Ho = {
|
|
5750
5711
|
sent: {
|
|
5751
5712
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5752
5713
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5771,17 +5732,17 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5771
5732
|
r
|
|
5772
5733
|
),
|
|
5773
5734
|
style: {
|
|
5774
|
-
...
|
|
5735
|
+
...Ho[e],
|
|
5775
5736
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5776
5737
|
isolation: "isolate"
|
|
5777
5738
|
},
|
|
5778
5739
|
children: [
|
|
5779
5740
|
a != null && /* @__PURE__ */ n("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5780
5741
|
/* @__PURE__ */ n("p", { className: "m-0 whitespace-pre-wrap break-words hyphens-manual", children: t }),
|
|
5781
|
-
s && /* @__PURE__ */ n(
|
|
5742
|
+
s && /* @__PURE__ */ n(jo, { variant: e })
|
|
5782
5743
|
]
|
|
5783
5744
|
}
|
|
5784
|
-
),
|
|
5745
|
+
), Vo = ({
|
|
5785
5746
|
text: e,
|
|
5786
5747
|
tail: t,
|
|
5787
5748
|
header: s,
|
|
@@ -5795,10 +5756,10 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5795
5756
|
header: s,
|
|
5796
5757
|
className: a
|
|
5797
5758
|
}
|
|
5798
|
-
),
|
|
5799
|
-
Sent:
|
|
5800
|
-
Received:
|
|
5801
|
-
},
|
|
5759
|
+
), Go = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(ts, { variant: "sent", text: e, tail: t, className: s }), cl = {
|
|
5760
|
+
Sent: Go,
|
|
5761
|
+
Received: Vo
|
|
5762
|
+
}, Yo = ({
|
|
5802
5763
|
question: e,
|
|
5803
5764
|
onClick: t,
|
|
5804
5765
|
loading: s = !1,
|
|
@@ -5820,22 +5781,22 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5820
5781
|
),
|
|
5821
5782
|
children: e
|
|
5822
5783
|
}
|
|
5823
|
-
),
|
|
5784
|
+
), dl = ({
|
|
5824
5785
|
faqs: e,
|
|
5825
5786
|
onFaqClick: t,
|
|
5826
5787
|
loadingFaqId: s,
|
|
5827
5788
|
headerText: a,
|
|
5828
5789
|
className: r,
|
|
5829
5790
|
avatarImage: i,
|
|
5830
|
-
avatarName:
|
|
5791
|
+
avatarName: l
|
|
5831
5792
|
}) => {
|
|
5832
|
-
const
|
|
5833
|
-
return
|
|
5834
|
-
(i ||
|
|
5793
|
+
const o = Ws(e);
|
|
5794
|
+
return o.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
|
|
5795
|
+
(i || l) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
5835
5796
|
_e,
|
|
5836
5797
|
{
|
|
5837
|
-
id:
|
|
5838
|
-
name:
|
|
5798
|
+
id: l || "account",
|
|
5799
|
+
name: l || "Account",
|
|
5839
5800
|
image: i,
|
|
5840
5801
|
size: 24,
|
|
5841
5802
|
shape: "circle"
|
|
@@ -5848,8 +5809,8 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5848
5809
|
style: { backgroundColor: "#F1F0EE" },
|
|
5849
5810
|
children: [
|
|
5850
5811
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5851
|
-
|
|
5852
|
-
|
|
5812
|
+
o.map((d) => /* @__PURE__ */ n(
|
|
5813
|
+
Yo,
|
|
5853
5814
|
{
|
|
5854
5815
|
question: d.question,
|
|
5855
5816
|
onClick: () => t(d.id),
|
|
@@ -5865,39 +5826,39 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5865
5826
|
export {
|
|
5866
5827
|
Sn as A,
|
|
5867
5828
|
yn as B,
|
|
5868
|
-
|
|
5869
|
-
|
|
5829
|
+
vo as C,
|
|
5830
|
+
il as D,
|
|
5870
5831
|
sr as E,
|
|
5871
|
-
|
|
5832
|
+
dl as F,
|
|
5872
5833
|
_a as G,
|
|
5873
5834
|
it as L,
|
|
5874
|
-
|
|
5875
|
-
|
|
5835
|
+
sl as M,
|
|
5836
|
+
ll as R,
|
|
5876
5837
|
Ne as a,
|
|
5877
5838
|
_e as b,
|
|
5878
|
-
|
|
5839
|
+
Eo as c,
|
|
5879
5840
|
Zn as d,
|
|
5880
|
-
|
|
5881
|
-
|
|
5841
|
+
al as e,
|
|
5842
|
+
Yo as f,
|
|
5882
5843
|
de as g,
|
|
5883
5844
|
Pe as h,
|
|
5884
5845
|
ke as i,
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5846
|
+
cl as j,
|
|
5847
|
+
nl as k,
|
|
5848
|
+
ol as l,
|
|
5888
5849
|
ei as m,
|
|
5889
5850
|
Zr as n,
|
|
5890
5851
|
ce as o,
|
|
5891
|
-
|
|
5852
|
+
Co as p,
|
|
5892
5853
|
Qr as q,
|
|
5893
5854
|
ve as r,
|
|
5894
5855
|
kn as s,
|
|
5895
5856
|
Ve as t,
|
|
5896
5857
|
Na as u,
|
|
5897
|
-
|
|
5858
|
+
rl as v,
|
|
5898
5859
|
Da as w,
|
|
5899
5860
|
_n as x,
|
|
5900
5861
|
ut as y,
|
|
5901
5862
|
mt as z
|
|
5902
5863
|
};
|
|
5903
|
-
//# sourceMappingURL=index-
|
|
5864
|
+
//# sourceMappingURL=index-DFykbijs.js.map
|