ordify-chat-widget 1.0.47 → 1.0.48
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/hooks/useOrdifyChat.d.ts.map +1 -1
- package/dist/index.cjs.js +68 -61
- package/dist/index.esm.js +600 -580
- package/dist/ordify-chat-widget.standalone.js +67 -60
- package/dist/ordify-chat-widget.standalone.js.map +1 -1
- package/dist/utils/adkAssistantText.d.ts +5 -0
- package/dist/utils/adkAssistantText.d.ts.map +1 -0
- package/dist/utils/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var bt = (e, t, r) =>
|
|
1
|
+
var En = Object.defineProperty;
|
|
2
|
+
var _n = (e, t, r) => t in e ? En(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var bt = (e, t, r) => _n(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import * as Bt from "react";
|
|
5
|
-
import
|
|
6
|
-
var
|
|
5
|
+
import K, { useState as J, useRef as ae, useEffect as De, useCallback as Z, useMemo as Pt, forwardRef as Kr, createElement as Je, useContext as Wr, useImperativeHandle as Mn, useLayoutEffect as Rn, createContext as zn } from "react";
|
|
6
|
+
var Ur = { exports: {} }, ot = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
@@ -13,42 +13,57 @@ var Wr = { exports: {} }, ot = {};
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
17
|
-
function
|
|
16
|
+
var Dn = K, On = Symbol.for("react.element"), Nn = Symbol.for("react.fragment"), Bn = Object.prototype.hasOwnProperty, Pn = Dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Ln = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function Hr(e, t, r) {
|
|
18
18
|
var n, a = {}, c = null, u = null;
|
|
19
19
|
r !== void 0 && (c = "" + r), t.key !== void 0 && (c = "" + t.key), t.ref !== void 0 && (u = t.ref);
|
|
20
|
-
for (n in t)
|
|
20
|
+
for (n in t) Bn.call(t, n) && !Ln.hasOwnProperty(n) && (a[n] = t[n]);
|
|
21
21
|
if (e && e.defaultProps) for (n in t = e.defaultProps, t) a[n] === void 0 && (a[n] = t[n]);
|
|
22
|
-
return { $$typeof:
|
|
22
|
+
return { $$typeof: On, type: e, key: c, ref: u, props: a, _owner: Pn.current };
|
|
23
23
|
}
|
|
24
|
-
ot.Fragment =
|
|
25
|
-
ot.jsx =
|
|
26
|
-
ot.jsxs =
|
|
27
|
-
|
|
28
|
-
var l =
|
|
24
|
+
ot.Fragment = Nn;
|
|
25
|
+
ot.jsx = Hr;
|
|
26
|
+
ot.jsxs = Hr;
|
|
27
|
+
Ur.exports = ot;
|
|
28
|
+
var l = Ur.exports;
|
|
29
29
|
function Ue() {
|
|
30
30
|
return Math.random().toString(36).substr(2, 9);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function li(e) {
|
|
33
33
|
return new Intl.DateTimeFormat("en-US", {
|
|
34
34
|
hour: "2-digit",
|
|
35
35
|
minute: "2-digit",
|
|
36
36
|
hour12: !0
|
|
37
37
|
}).format(e);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function di(e, t) {
|
|
40
40
|
let r;
|
|
41
41
|
return (...n) => {
|
|
42
42
|
clearTimeout(r), r = setTimeout(() => e(...n), t);
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function ui(e, t) {
|
|
46
46
|
let r;
|
|
47
47
|
return (...n) => {
|
|
48
48
|
r || (e(...n), r = !0, setTimeout(() => r = !1, t));
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function sr(e) {
|
|
52
|
+
let t = e.replace(/\r\n/g, `
|
|
53
|
+
`);
|
|
54
|
+
return t = t.replace(/\n\nUsing [^\n]+\.{3}(?:\s*\n)+/g, `
|
|
55
|
+
|
|
56
|
+
`), t = t.replace(/\n\nAction completed(?:\s*\n)+/g, `
|
|
57
|
+
|
|
58
|
+
`), t = t.replace(/^Using [^\n]+\.{3}(?:\s*\n)+/m, ""), t = t.replace(/^Action completed(?:\s*\n)+/m, ""), t = t.replace(/\n{3,}/g, `
|
|
59
|
+
|
|
60
|
+
`), t;
|
|
61
|
+
}
|
|
62
|
+
function Fn(e) {
|
|
63
|
+
const t = e.type;
|
|
64
|
+
return t === "adk_tool" || t === "ADK_TOOL";
|
|
65
|
+
}
|
|
66
|
+
function Kn(e) {
|
|
52
67
|
return {
|
|
53
68
|
id: e.id,
|
|
54
69
|
name: e.name,
|
|
@@ -60,7 +75,7 @@ function Ln(e) {
|
|
|
60
75
|
oauth_token: null
|
|
61
76
|
};
|
|
62
77
|
}
|
|
63
|
-
class
|
|
78
|
+
class Wn {
|
|
64
79
|
constructor(t) {
|
|
65
80
|
bt(this, "config");
|
|
66
81
|
bt(this, "warnedLegacyApiKey", !1);
|
|
@@ -88,7 +103,7 @@ class Fn {
|
|
|
88
103
|
});
|
|
89
104
|
}
|
|
90
105
|
async sendMessage(t, r, n, a) {
|
|
91
|
-
const c = this.usePublishableKey() ? `/widget/chat/${this.config.agentId}` : `/chat/agents/${this.config.agentId}`, u = `${this.config.apiBaseUrl}${c}`, d = a != null && a.length ? a.map(
|
|
106
|
+
const c = this.usePublishableKey() ? `/widget/chat/${this.config.agentId}` : `/chat/agents/${this.config.agentId}`, u = `${this.config.apiBaseUrl}${c}`, d = a != null && a.length ? a.map(Kn) : void 0, h = {
|
|
92
107
|
message: t,
|
|
93
108
|
sessionId: r,
|
|
94
109
|
context: n
|
|
@@ -201,25 +216,25 @@ class Fn {
|
|
|
201
216
|
return r.json();
|
|
202
217
|
}
|
|
203
218
|
}
|
|
204
|
-
function
|
|
219
|
+
function Un(e) {
|
|
205
220
|
try {
|
|
206
221
|
if (e.startsWith("data: ")) {
|
|
207
222
|
const t = e.slice(6).trim();
|
|
208
223
|
if (t === "[DONE]" || t === "")
|
|
209
224
|
return { text: "", sessionId: "", type: "done" };
|
|
210
225
|
const r = JSON.parse(t);
|
|
211
|
-
return r.done ? { text: "", sessionId: r.sessionId || "", type: "done" } : r;
|
|
226
|
+
return r.done ? { text: "", sessionId: r.sessionId || "", type: "done" } : r.type === "adk_tool" || r.type === "turn_complete" || r.type === "image" ? null : r;
|
|
212
227
|
}
|
|
213
228
|
} catch (t) {
|
|
214
229
|
console.warn("Failed to parse streaming response:", t);
|
|
215
230
|
}
|
|
216
231
|
return null;
|
|
217
232
|
}
|
|
218
|
-
function
|
|
233
|
+
function ir(e) {
|
|
219
234
|
const t = (e.attachments || []).map((r) => r.id).join("|");
|
|
220
235
|
return `${e.role}:${e.content.trim()}:${t}`;
|
|
221
236
|
}
|
|
222
|
-
function
|
|
237
|
+
function Hn(e) {
|
|
223
238
|
const t = e.attachments;
|
|
224
239
|
if (!t || !Array.isArray(t) || t.length === 0) return;
|
|
225
240
|
const r = [];
|
|
@@ -237,67 +252,70 @@ function Wn(e) {
|
|
|
237
252
|
}
|
|
238
253
|
return r.length ? r : void 0;
|
|
239
254
|
}
|
|
240
|
-
function
|
|
255
|
+
function qn(e) {
|
|
241
256
|
const [t, r] = J([]), [n, a] = J(!1), [c, u] = J(null), [d, h] = J(e.sessionId || null), [g, b] = J(!1), [p, w] = J(!1), [k, $] = J(!1), [j, S] = J(!1), [o, i] = J(!1), s = ae(null), f = ae(""), m = ae(!1), y = ae(!1), x = ae(!1), A = `${e.publishableKey ?? ""}|${e.apiKey ?? ""}|${e.apiBaseUrl ?? ""}|${e.agentId}`;
|
|
242
|
-
f.current !== A && (s.current = null, f.current = A), s.current || (s.current = new
|
|
257
|
+
f.current !== A && (s.current = null, f.current = A), s.current || (s.current = new Wn({
|
|
243
258
|
publishableKey: e.publishableKey,
|
|
244
259
|
apiKey: e.apiKey,
|
|
245
260
|
apiBaseUrl: e.apiBaseUrl || "https://api.ordify.ai",
|
|
246
261
|
agentId: e.agentId
|
|
247
262
|
}));
|
|
248
|
-
const
|
|
263
|
+
const _ = ae(null), C = ae(/* @__PURE__ */ new Set());
|
|
249
264
|
De(() => {
|
|
250
265
|
if (e.sessionId && e.sessionId !== d) {
|
|
251
266
|
const I = C.current.has(e.sessionId);
|
|
252
|
-
h(e.sessionId), y.current = !1,
|
|
267
|
+
h(e.sessionId), y.current = !1, _.current = null, $(!1), I || r([]);
|
|
253
268
|
}
|
|
254
269
|
}, [e.sessionId]), De(() => {
|
|
255
270
|
(async () => {
|
|
256
|
-
const
|
|
271
|
+
const O = d || e.sessionId;
|
|
257
272
|
if (x.current || n)
|
|
258
273
|
return;
|
|
259
|
-
if (!
|
|
260
|
-
y.current = !0,
|
|
274
|
+
if (!O) {
|
|
275
|
+
y.current = !0, _.current = null, $(!1);
|
|
261
276
|
return;
|
|
262
277
|
}
|
|
263
|
-
if (
|
|
278
|
+
if (_.current === O)
|
|
264
279
|
return;
|
|
265
|
-
if (C.current.has(
|
|
266
|
-
y.current = !0,
|
|
280
|
+
if (C.current.has(O) && t.length > 0 && !y.current) {
|
|
281
|
+
y.current = !0, _.current = O, S(!1);
|
|
267
282
|
return;
|
|
268
283
|
}
|
|
269
|
-
|
|
284
|
+
_.current = O, S(!0);
|
|
270
285
|
try {
|
|
271
|
-
const v = await s.current.getSessionWithMessages(
|
|
286
|
+
const v = await s.current.getSessionWithMessages(O);
|
|
272
287
|
if (v.messages && v.messages.length > 0) {
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
288
|
+
const N = v.messages.filter((R) => !Fn(R)).map((R) => {
|
|
289
|
+
const L = R.role === "assistant" ? "assistant" : "user", z = String(R.content || "");
|
|
290
|
+
return {
|
|
291
|
+
id: R.id || Ue(),
|
|
292
|
+
content: L === "assistant" ? sr(z) : z,
|
|
293
|
+
role: L,
|
|
294
|
+
timestamp: R.timestamp ? new Date(R.timestamp) : /* @__PURE__ */ new Date(),
|
|
295
|
+
sessionId: O,
|
|
296
|
+
attachments: Hn(R)
|
|
297
|
+
};
|
|
298
|
+
});
|
|
281
299
|
r((R) => {
|
|
282
300
|
if (R.length > 0) {
|
|
283
|
-
const
|
|
284
|
-
return R.forEach((
|
|
285
|
-
|
|
286
|
-
const U =
|
|
287
|
-
|
|
288
|
-
}),
|
|
289
|
-
const U =
|
|
290
|
-
!
|
|
291
|
-
}), Array.from(
|
|
292
|
-
(
|
|
301
|
+
const L = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map();
|
|
302
|
+
return R.forEach((D) => {
|
|
303
|
+
L.set(D.id, D);
|
|
304
|
+
const U = ir(D);
|
|
305
|
+
z.has(U) || z.set(U, D);
|
|
306
|
+
}), N.forEach((D) => {
|
|
307
|
+
const U = ir(D);
|
|
308
|
+
!L.has(D.id) && !z.has(U) ? (L.set(D.id, D), z.set(U, D)) : L.has(D.id) && L.set(D.id, D);
|
|
309
|
+
}), Array.from(L.values()).sort(
|
|
310
|
+
(D, U) => D.timestamp.getTime() - U.timestamp.getTime()
|
|
293
311
|
);
|
|
294
312
|
}
|
|
295
|
-
return
|
|
313
|
+
return N;
|
|
296
314
|
}), $(!0), i(!0);
|
|
297
315
|
} else
|
|
298
316
|
$(!1);
|
|
299
317
|
} catch (v) {
|
|
300
|
-
console.warn("Failed to load session history:", v), $(!1), v instanceof Error && v.message.includes("404") && (h(null),
|
|
318
|
+
console.warn("Failed to load session history:", v), $(!1), v instanceof Error && v.message.includes("404") && (h(null), _.current = null);
|
|
301
319
|
} finally {
|
|
302
320
|
S(!1), y.current = !0;
|
|
303
321
|
}
|
|
@@ -305,17 +323,17 @@ function Un(e) {
|
|
|
305
323
|
}, [d, e.sessionId]);
|
|
306
324
|
const E = Z(() => {
|
|
307
325
|
u(null);
|
|
308
|
-
}, []),
|
|
326
|
+
}, []), W = Z(async (I) => {
|
|
309
327
|
if (!s.current)
|
|
310
328
|
throw new Error("API client not initialized");
|
|
311
329
|
return s.current.uploadAttachment(I);
|
|
312
330
|
}, []), P = Z(
|
|
313
|
-
async (I,
|
|
314
|
-
const v = I.trim(),
|
|
315
|
-
if (!(!v && !
|
|
331
|
+
async (I, O, H) => {
|
|
332
|
+
const v = I.trim(), N = !!(H && H.length > 0);
|
|
333
|
+
if (!(!v && !N || n)) {
|
|
316
334
|
a(!0), u(null);
|
|
317
335
|
try {
|
|
318
|
-
const R = H != null && H.length ? H.map((V) => ({ ...V })) : void 0,
|
|
336
|
+
const R = H != null && H.length ? H.map((V) => ({ ...V })) : void 0, L = {
|
|
319
337
|
id: Ue(),
|
|
320
338
|
content: v,
|
|
321
339
|
role: "user",
|
|
@@ -323,44 +341,46 @@ function Un(e) {
|
|
|
323
341
|
sessionId: d || void 0,
|
|
324
342
|
attachments: R
|
|
325
343
|
};
|
|
326
|
-
r((V) => [...V,
|
|
327
|
-
let
|
|
328
|
-
|
|
329
|
-
const
|
|
344
|
+
r((V) => [...V, L]), i(!0);
|
|
345
|
+
let z = d || e.sessionId || null;
|
|
346
|
+
z ? z !== d && h(z) : (z = (await s.current.createSession()).id, C.current.add(z), e.onSessionCreated && e.onSessionCreated(z)), x.current = !0;
|
|
347
|
+
const D = (await s.current.sendMessage(
|
|
330
348
|
v || "(see attachments)",
|
|
331
|
-
|
|
332
|
-
|
|
349
|
+
z,
|
|
350
|
+
O,
|
|
333
351
|
R
|
|
334
352
|
)).getReader(), U = new TextDecoder();
|
|
335
|
-
let
|
|
353
|
+
let Y = {
|
|
336
354
|
id: Ue(),
|
|
337
355
|
content: "",
|
|
338
356
|
role: "assistant",
|
|
339
357
|
timestamp: /* @__PURE__ */ new Date(),
|
|
340
|
-
sessionId:
|
|
358
|
+
sessionId: z
|
|
341
359
|
};
|
|
342
|
-
for (r((V) => [...V,
|
|
343
|
-
const { done: V, value: ie } = await
|
|
360
|
+
for (r((V) => [...V, Y]); ; ) {
|
|
361
|
+
const { done: V, value: ie } = await D.read();
|
|
344
362
|
if (V) break;
|
|
345
363
|
const ce = U.decode(ie, { stream: !0 }).split(`
|
|
346
364
|
`);
|
|
347
365
|
for (const ke of ce) {
|
|
348
366
|
if (!ke.trim()) continue;
|
|
349
|
-
const ne =
|
|
367
|
+
const ne = Un(ke);
|
|
350
368
|
if (ne) {
|
|
351
369
|
if (ne.type === "stream" && ne.text)
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
)
|
|
370
|
+
Y.content = sr(
|
|
371
|
+
Y.content + ne.text
|
|
372
|
+
), r((ee) => ee.find((Me) => Me.id === Y.id) ? ee.map(
|
|
373
|
+
(Me) => Me.id === Y.id ? { ...Me, content: Y.content } : Me
|
|
374
|
+
) : [...ee, { ...Y, content: Y.content }]);
|
|
355
375
|
else if (ne.type === "done")
|
|
356
376
|
break;
|
|
357
377
|
}
|
|
358
378
|
}
|
|
359
379
|
}
|
|
360
|
-
|
|
380
|
+
z && z !== d && h(z), e.onMessage && e.onMessage(Y);
|
|
361
381
|
} catch (R) {
|
|
362
|
-
const
|
|
363
|
-
u(
|
|
382
|
+
const L = R instanceof Error ? R.message : "Failed to send message";
|
|
383
|
+
u(L), e.onError && e.onError(R instanceof Error ? R : new Error(L));
|
|
364
384
|
} finally {
|
|
365
385
|
x.current = !1, a(!1);
|
|
366
386
|
}
|
|
@@ -369,26 +389,26 @@ function Un(e) {
|
|
|
369
389
|
[e.onSessionCreated, e.onMessage, e.onError, e.sessionId, n, d]
|
|
370
390
|
);
|
|
371
391
|
return De(() => {
|
|
372
|
-
const
|
|
373
|
-
if ((e.initialMessage || e.initialContext) &&
|
|
392
|
+
const O = !(d || e.sessionId) || !k, H = e.quickQuestions && e.quickQuestions.length > 0;
|
|
393
|
+
if ((e.initialMessage || e.initialContext) && O && !p && !n && !j && !m.current && y.current && !H) {
|
|
374
394
|
w(!0), m.current = !0;
|
|
375
|
-
let v,
|
|
395
|
+
let v, N;
|
|
376
396
|
if (e.initialMessage && e.initialContext)
|
|
377
|
-
v = e.initialMessage,
|
|
397
|
+
v = e.initialMessage, N = e.initialContext;
|
|
378
398
|
else if (e.initialMessage)
|
|
379
|
-
v = e.initialMessage,
|
|
399
|
+
v = e.initialMessage, N = void 0;
|
|
380
400
|
else if (e.initialContext)
|
|
381
|
-
v = "Hi",
|
|
401
|
+
v = "Hi", N = e.initialContext;
|
|
382
402
|
else
|
|
383
403
|
return;
|
|
384
404
|
setTimeout(() => {
|
|
385
|
-
P(v,
|
|
405
|
+
P(v, N);
|
|
386
406
|
}, 0);
|
|
387
407
|
}
|
|
388
408
|
}, [e.initialMessage, e.initialContext, p, n, j, k, d, e.sessionId, P]), {
|
|
389
409
|
messages: t,
|
|
390
410
|
sendMessage: P,
|
|
391
|
-
uploadAttachment:
|
|
411
|
+
uploadAttachment: W,
|
|
392
412
|
isLoading: n,
|
|
393
413
|
error: c,
|
|
394
414
|
clearError: E,
|
|
@@ -404,7 +424,7 @@ function Le(e) {
|
|
|
404
424
|
const t = process.env[e];
|
|
405
425
|
return typeof t == "string" && t.length > 0 ? t : void 0;
|
|
406
426
|
}
|
|
407
|
-
function
|
|
427
|
+
function Gn(e) {
|
|
408
428
|
return Pt(() => {
|
|
409
429
|
const t = e.agentId || Le("ORDIFY_AGENT_ID"), r = e.publishableKey || Le("ORDIFY_PUBLISHABLE_KEY"), n = e.apiKey || Le("ORDIFY_API_KEY"), a = e.apiBaseUrl || Le("ORDIFY_API_BASE_URL") || "https://r.ordify.ai";
|
|
410
430
|
if (!t)
|
|
@@ -454,13 +474,13 @@ function Hn(e) {
|
|
|
454
474
|
* This source code is licensed under the ISC license.
|
|
455
475
|
* See the LICENSE file in the root directory of this source tree.
|
|
456
476
|
*/
|
|
457
|
-
const
|
|
477
|
+
const Yn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Qn = (e) => e.replace(
|
|
458
478
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
459
479
|
(t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
|
|
460
|
-
),
|
|
461
|
-
const t =
|
|
480
|
+
), cr = (e) => {
|
|
481
|
+
const t = Qn(e);
|
|
462
482
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
463
|
-
},
|
|
483
|
+
}, qr = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), Vn = (e) => {
|
|
464
484
|
for (const t in e)
|
|
465
485
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
466
486
|
return !0;
|
|
@@ -471,7 +491,7 @@ const qn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Gn = (
|
|
|
471
491
|
* This source code is licensed under the ISC license.
|
|
472
492
|
* See the LICENSE file in the root directory of this source tree.
|
|
473
493
|
*/
|
|
474
|
-
var
|
|
494
|
+
var Zn = {
|
|
475
495
|
xmlns: "http://www.w3.org/2000/svg",
|
|
476
496
|
width: 24,
|
|
477
497
|
height: 24,
|
|
@@ -488,7 +508,7 @@ var Qn = {
|
|
|
488
508
|
* This source code is licensed under the ISC license.
|
|
489
509
|
* See the LICENSE file in the root directory of this source tree.
|
|
490
510
|
*/
|
|
491
|
-
const
|
|
511
|
+
const Jn = Kr(
|
|
492
512
|
({
|
|
493
513
|
color: e = "currentColor",
|
|
494
514
|
size: t = 24,
|
|
@@ -502,13 +522,13 @@ const Vn = Fr(
|
|
|
502
522
|
"svg",
|
|
503
523
|
{
|
|
504
524
|
ref: h,
|
|
505
|
-
...
|
|
525
|
+
...Zn,
|
|
506
526
|
width: t,
|
|
507
527
|
height: t,
|
|
508
528
|
stroke: e,
|
|
509
529
|
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
510
|
-
className:
|
|
511
|
-
...!c && !
|
|
530
|
+
className: qr("lucide", a),
|
|
531
|
+
...!c && !Vn(d) && { "aria-hidden": "true" },
|
|
512
532
|
...d
|
|
513
533
|
},
|
|
514
534
|
[
|
|
@@ -524,19 +544,19 @@ const Vn = Fr(
|
|
|
524
544
|
* See the LICENSE file in the root directory of this source tree.
|
|
525
545
|
*/
|
|
526
546
|
const at = (e, t) => {
|
|
527
|
-
const r =
|
|
528
|
-
({ className: n, ...a }, c) => Je(
|
|
547
|
+
const r = Kr(
|
|
548
|
+
({ className: n, ...a }, c) => Je(Jn, {
|
|
529
549
|
ref: c,
|
|
530
550
|
iconNode: t,
|
|
531
|
-
className:
|
|
532
|
-
`lucide-${
|
|
551
|
+
className: qr(
|
|
552
|
+
`lucide-${Yn(cr(e))}`,
|
|
533
553
|
`lucide-${e}`,
|
|
534
554
|
n
|
|
535
555
|
),
|
|
536
556
|
...a
|
|
537
557
|
})
|
|
538
558
|
);
|
|
539
|
-
return r.displayName =
|
|
559
|
+
return r.displayName = cr(e), r;
|
|
540
560
|
};
|
|
541
561
|
/**
|
|
542
562
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -544,31 +564,31 @@ const at = (e, t) => {
|
|
|
544
564
|
* This source code is licensed under the ISC license.
|
|
545
565
|
* See the LICENSE file in the root directory of this source tree.
|
|
546
566
|
*/
|
|
547
|
-
const
|
|
567
|
+
const Xn = [
|
|
548
568
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
549
569
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
550
570
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
551
571
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
552
572
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
553
|
-
],
|
|
573
|
+
], eo = at("file-text", Xn);
|
|
554
574
|
/**
|
|
555
575
|
* @license lucide-react v0.544.0 - ISC
|
|
556
576
|
*
|
|
557
577
|
* This source code is licensed under the ISC license.
|
|
558
578
|
* See the LICENSE file in the root directory of this source tree.
|
|
559
579
|
*/
|
|
560
|
-
const
|
|
580
|
+
const to = [
|
|
561
581
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
562
582
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
563
583
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
564
|
-
],
|
|
584
|
+
], ro = at("image", to);
|
|
565
585
|
/**
|
|
566
586
|
* @license lucide-react v0.544.0 - ISC
|
|
567
587
|
*
|
|
568
588
|
* This source code is licensed under the ISC license.
|
|
569
589
|
* See the LICENSE file in the root directory of this source tree.
|
|
570
590
|
*/
|
|
571
|
-
const
|
|
591
|
+
const no = [
|
|
572
592
|
[
|
|
573
593
|
"path",
|
|
574
594
|
{
|
|
@@ -576,17 +596,17 @@ const to = [
|
|
|
576
596
|
key: "1miecu"
|
|
577
597
|
}
|
|
578
598
|
]
|
|
579
|
-
],
|
|
599
|
+
], oo = at("paperclip", no);
|
|
580
600
|
/**
|
|
581
601
|
* @license lucide-react v0.544.0 - ISC
|
|
582
602
|
*
|
|
583
603
|
* This source code is licensed under the ISC license.
|
|
584
604
|
* See the LICENSE file in the root directory of this source tree.
|
|
585
605
|
*/
|
|
586
|
-
const
|
|
606
|
+
const ao = [
|
|
587
607
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
588
608
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
589
|
-
],
|
|
609
|
+
], so = at("x", ao);
|
|
590
610
|
var X = function() {
|
|
591
611
|
return X = Object.assign || function(t) {
|
|
592
612
|
for (var r, n = 1, a = arguments.length; n < a; n++) {
|
|
@@ -601,23 +621,23 @@ function Xe(e, t, r) {
|
|
|
601
621
|
(c || !(n in t)) && (c || (c = Array.prototype.slice.call(t, 0, n)), c[n] = t[n]);
|
|
602
622
|
return e.concat(c || Array.prototype.slice.call(t));
|
|
603
623
|
}
|
|
604
|
-
var
|
|
605
|
-
function
|
|
606
|
-
return
|
|
624
|
+
var F = "-ms-", Oe = "-moz-", B = "-webkit-", Gr = "comm", st = "rule", Lt = "decl", io = "@import", Yr = "@keyframes", co = "@layer", Qr = Math.abs, Ft = String.fromCharCode, _t = Object.assign;
|
|
625
|
+
function lo(e, t) {
|
|
626
|
+
return Q(e, 0) ^ 45 ? (((t << 2 ^ Q(e, 0)) << 2 ^ Q(e, 1)) << 2 ^ Q(e, 2)) << 2 ^ Q(e, 3) : 0;
|
|
607
627
|
}
|
|
608
|
-
function
|
|
628
|
+
function Vr(e) {
|
|
609
629
|
return e.trim();
|
|
610
630
|
}
|
|
611
631
|
function de(e, t) {
|
|
612
632
|
return (e = t.exec(e)) ? e[0] : e;
|
|
613
633
|
}
|
|
614
|
-
function
|
|
634
|
+
function M(e, t, r) {
|
|
615
635
|
return e.replace(t, r);
|
|
616
636
|
}
|
|
617
637
|
function He(e, t, r) {
|
|
618
638
|
return e.indexOf(t, r);
|
|
619
639
|
}
|
|
620
|
-
function
|
|
640
|
+
function Q(e, t) {
|
|
621
641
|
return e.charCodeAt(t) | 0;
|
|
622
642
|
}
|
|
623
643
|
function $e(e, t, r) {
|
|
@@ -626,51 +646,51 @@ function $e(e, t, r) {
|
|
|
626
646
|
function se(e) {
|
|
627
647
|
return e.length;
|
|
628
648
|
}
|
|
629
|
-
function
|
|
649
|
+
function Zr(e) {
|
|
630
650
|
return e.length;
|
|
631
651
|
}
|
|
632
652
|
function ze(e, t) {
|
|
633
653
|
return t.push(e), e;
|
|
634
654
|
}
|
|
635
|
-
function
|
|
655
|
+
function uo(e, t) {
|
|
636
656
|
return e.map(t).join("");
|
|
637
657
|
}
|
|
638
|
-
function
|
|
658
|
+
function lr(e, t) {
|
|
639
659
|
return e.filter(function(r) {
|
|
640
660
|
return !de(r, t);
|
|
641
661
|
});
|
|
642
662
|
}
|
|
643
|
-
var it = 1, Se = 1,
|
|
663
|
+
var it = 1, Se = 1, Jr = 0, te = 0, G = 0, _e = "";
|
|
644
664
|
function ct(e, t, r, n, a, c, u, d) {
|
|
645
665
|
return { value: e, root: t, parent: r, type: n, props: a, children: c, line: it, column: Se, length: u, return: "", siblings: d };
|
|
646
666
|
}
|
|
647
667
|
function fe(e, t) {
|
|
648
|
-
return
|
|
668
|
+
return _t(ct("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
|
|
649
669
|
}
|
|
650
670
|
function we(e) {
|
|
651
671
|
for (; e.root; )
|
|
652
672
|
e = fe(e.root, { children: [e] });
|
|
653
673
|
ze(e, e.siblings);
|
|
654
674
|
}
|
|
655
|
-
function
|
|
675
|
+
function po() {
|
|
656
676
|
return G;
|
|
657
677
|
}
|
|
658
|
-
function
|
|
659
|
-
return G = te > 0 ?
|
|
678
|
+
function fo() {
|
|
679
|
+
return G = te > 0 ? Q(_e, --te) : 0, Se--, G === 10 && (Se = 1, it--), G;
|
|
660
680
|
}
|
|
661
681
|
function re() {
|
|
662
|
-
return G = te <
|
|
682
|
+
return G = te < Jr ? Q(_e, te++) : 0, Se++, G === 10 && (Se = 1, it++), G;
|
|
663
683
|
}
|
|
664
684
|
function ge() {
|
|
665
|
-
return
|
|
685
|
+
return Q(_e, te);
|
|
666
686
|
}
|
|
667
687
|
function qe() {
|
|
668
688
|
return te;
|
|
669
689
|
}
|
|
670
690
|
function lt(e, t) {
|
|
671
|
-
return $e(
|
|
691
|
+
return $e(_e, e, t);
|
|
672
692
|
}
|
|
673
|
-
function
|
|
693
|
+
function Mt(e) {
|
|
674
694
|
switch (e) {
|
|
675
695
|
case 0:
|
|
676
696
|
case 9:
|
|
@@ -702,21 +722,21 @@ function _t(e) {
|
|
|
702
722
|
}
|
|
703
723
|
return 0;
|
|
704
724
|
}
|
|
705
|
-
function
|
|
706
|
-
return it = Se = 1,
|
|
725
|
+
function ho(e) {
|
|
726
|
+
return it = Se = 1, Jr = se(_e = e), te = 0, [];
|
|
707
727
|
}
|
|
708
|
-
function
|
|
709
|
-
return
|
|
728
|
+
function mo(e) {
|
|
729
|
+
return _e = "", e;
|
|
710
730
|
}
|
|
711
731
|
function xt(e) {
|
|
712
|
-
return
|
|
732
|
+
return Vr(lt(te - 1, Rt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
713
733
|
}
|
|
714
|
-
function
|
|
734
|
+
function go(e) {
|
|
715
735
|
for (; (G = ge()) && G < 33; )
|
|
716
736
|
re();
|
|
717
|
-
return
|
|
737
|
+
return Mt(e) > 2 || Mt(G) > 3 ? "" : " ";
|
|
718
738
|
}
|
|
719
|
-
function
|
|
739
|
+
function bo(e, t) {
|
|
720
740
|
for (; --t && re() && !(G < 48 || G > 102 || G > 57 && G < 65 || G > 70 && G < 97); )
|
|
721
741
|
;
|
|
722
742
|
return lt(e, qe() + (t < 6 && ge() == 32 && re() == 32));
|
|
@@ -739,26 +759,26 @@ function Rt(e) {
|
|
|
739
759
|
}
|
|
740
760
|
return te;
|
|
741
761
|
}
|
|
742
|
-
function
|
|
762
|
+
function xo(e, t) {
|
|
743
763
|
for (; re() && e + G !== 57; )
|
|
744
764
|
if (e + G === 84 && ge() === 47)
|
|
745
765
|
break;
|
|
746
766
|
return "/*" + lt(t, te - 1) + "*" + Ft(e === 47 ? e : re());
|
|
747
767
|
}
|
|
748
|
-
function
|
|
749
|
-
for (; !
|
|
768
|
+
function yo(e) {
|
|
769
|
+
for (; !Mt(ge()); )
|
|
750
770
|
re();
|
|
751
771
|
return lt(e, te);
|
|
752
772
|
}
|
|
753
|
-
function
|
|
754
|
-
return
|
|
773
|
+
function ko(e) {
|
|
774
|
+
return mo(Ge("", null, null, null, [""], e = ho(e), 0, [0], e));
|
|
755
775
|
}
|
|
756
776
|
function Ge(e, t, r, n, a, c, u, d, h) {
|
|
757
777
|
for (var g = 0, b = 0, p = u, w = 0, k = 0, $ = 0, j = 1, S = 1, o = 1, i = 0, s = "", f = a, m = c, y = n, x = s; S; )
|
|
758
778
|
switch ($ = i, i = re()) {
|
|
759
779
|
case 40:
|
|
760
|
-
if ($ != 108 &&
|
|
761
|
-
He(x +=
|
|
780
|
+
if ($ != 108 && Q(x, p - 1) == 58) {
|
|
781
|
+
He(x += M(xt(i), "&", "&\f"), "&\f", Qr(g ? d[g - 1] : 0)) != -1 && (o = -1);
|
|
762
782
|
break;
|
|
763
783
|
}
|
|
764
784
|
case 34:
|
|
@@ -770,16 +790,16 @@ function Ge(e, t, r, n, a, c, u, d, h) {
|
|
|
770
790
|
case 10:
|
|
771
791
|
case 13:
|
|
772
792
|
case 32:
|
|
773
|
-
x +=
|
|
793
|
+
x += go($);
|
|
774
794
|
break;
|
|
775
795
|
case 92:
|
|
776
|
-
x +=
|
|
796
|
+
x += bo(qe() - 1, 7);
|
|
777
797
|
continue;
|
|
778
798
|
case 47:
|
|
779
799
|
switch (ge()) {
|
|
780
800
|
case 42:
|
|
781
801
|
case 47:
|
|
782
|
-
ze(
|
|
802
|
+
ze(wo(xo(re(), qe()), t, r, h), h);
|
|
783
803
|
break;
|
|
784
804
|
default:
|
|
785
805
|
x += "/";
|
|
@@ -795,21 +815,21 @@ function Ge(e, t, r, n, a, c, u, d, h) {
|
|
|
795
815
|
case 125:
|
|
796
816
|
S = 0;
|
|
797
817
|
case 59 + b:
|
|
798
|
-
o == -1 && (x =
|
|
818
|
+
o == -1 && (x = M(x, /\f/g, "")), k > 0 && se(x) - p && ze(k > 32 ? ur(x + ";", n, r, p - 1, h) : ur(M(x, " ", "") + ";", n, r, p - 2, h), h);
|
|
799
819
|
break;
|
|
800
820
|
case 59:
|
|
801
821
|
x += ";";
|
|
802
822
|
default:
|
|
803
|
-
if (ze(y =
|
|
823
|
+
if (ze(y = dr(x, t, r, g, b, a, d, s, f = [], m = [], p, c), c), i === 123)
|
|
804
824
|
if (b === 0)
|
|
805
825
|
Ge(x, t, y, y, f, c, p, d, m);
|
|
806
826
|
else
|
|
807
|
-
switch (w === 99 &&
|
|
827
|
+
switch (w === 99 && Q(x, 3) === 110 ? 100 : w) {
|
|
808
828
|
case 100:
|
|
809
829
|
case 108:
|
|
810
830
|
case 109:
|
|
811
831
|
case 115:
|
|
812
|
-
Ge(e, y, y, n && ze(
|
|
832
|
+
Ge(e, y, y, n && ze(dr(e, y, y, 0, 0, a, d, s, a, f = [], p, m), m), a, m, p, d, n ? f : m);
|
|
813
833
|
break;
|
|
814
834
|
default:
|
|
815
835
|
Ge(x, y, y, y, [""], m, 0, d, m);
|
|
@@ -823,7 +843,7 @@ function Ge(e, t, r, n, a, c, u, d, h) {
|
|
|
823
843
|
if (j < 1) {
|
|
824
844
|
if (i == 123)
|
|
825
845
|
--j;
|
|
826
|
-
else if (i == 125 && j++ == 0 &&
|
|
846
|
+
else if (i == 125 && j++ == 0 && fo() == 125)
|
|
827
847
|
continue;
|
|
828
848
|
}
|
|
829
849
|
switch (x += Ft(i), i * j) {
|
|
@@ -834,7 +854,7 @@ function Ge(e, t, r, n, a, c, u, d, h) {
|
|
|
834
854
|
d[g++] = (se(x) - 1) * o, o = 1;
|
|
835
855
|
break;
|
|
836
856
|
case 64:
|
|
837
|
-
ge() === 45 && (x += xt(re())), w = ge(), b = p = se(s = x +=
|
|
857
|
+
ge() === 45 && (x += xt(re())), w = ge(), b = p = se(s = x += yo(qe())), i++;
|
|
838
858
|
break;
|
|
839
859
|
case 45:
|
|
840
860
|
$ === 45 && se(x) == 2 && (j = 0);
|
|
@@ -842,20 +862,20 @@ function Ge(e, t, r, n, a, c, u, d, h) {
|
|
|
842
862
|
}
|
|
843
863
|
return c;
|
|
844
864
|
}
|
|
845
|
-
function
|
|
846
|
-
for (var w = a - 1, k = a === 0 ? c : [""], $ =
|
|
847
|
-
for (var i = 0, s = $e(e, w + 1, w =
|
|
848
|
-
(f =
|
|
865
|
+
function dr(e, t, r, n, a, c, u, d, h, g, b, p) {
|
|
866
|
+
for (var w = a - 1, k = a === 0 ? c : [""], $ = Zr(k), j = 0, S = 0, o = 0; j < n; ++j)
|
|
867
|
+
for (var i = 0, s = $e(e, w + 1, w = Qr(S = u[j])), f = e; i < $; ++i)
|
|
868
|
+
(f = Vr(S > 0 ? k[i] + " " + s : M(s, /&\f/g, k[i]))) && (h[o++] = f);
|
|
849
869
|
return ct(e, t, r, a === 0 ? st : d, h, g, b, p);
|
|
850
870
|
}
|
|
851
|
-
function
|
|
852
|
-
return ct(e, t, r,
|
|
871
|
+
function wo(e, t, r, n) {
|
|
872
|
+
return ct(e, t, r, Gr, Ft(po()), $e(e, 2, -2), 0, n);
|
|
853
873
|
}
|
|
854
|
-
function
|
|
874
|
+
function ur(e, t, r, n, a) {
|
|
855
875
|
return ct(e, t, r, Lt, $e(e, 0, n), $e(e, n + 1, -1), n, a);
|
|
856
876
|
}
|
|
857
|
-
function
|
|
858
|
-
switch (
|
|
877
|
+
function Xr(e, t, r) {
|
|
878
|
+
switch (lo(e, t)) {
|
|
859
879
|
case 5103:
|
|
860
880
|
return B + "print-" + e + e;
|
|
861
881
|
case 5737:
|
|
@@ -891,64 +911,64 @@ function Jr(e, t, r) {
|
|
|
891
911
|
case 4810:
|
|
892
912
|
case 6968:
|
|
893
913
|
case 2756:
|
|
894
|
-
return B + e + Oe + e +
|
|
914
|
+
return B + e + Oe + e + F + e + e;
|
|
895
915
|
case 5936:
|
|
896
|
-
switch (
|
|
916
|
+
switch (Q(e, t + 11)) {
|
|
897
917
|
case 114:
|
|
898
|
-
return B + e +
|
|
918
|
+
return B + e + F + M(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
899
919
|
case 108:
|
|
900
|
-
return B + e +
|
|
920
|
+
return B + e + F + M(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
901
921
|
case 45:
|
|
902
|
-
return B + e +
|
|
922
|
+
return B + e + F + M(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
903
923
|
}
|
|
904
924
|
case 6828:
|
|
905
925
|
case 4268:
|
|
906
926
|
case 2903:
|
|
907
|
-
return B + e +
|
|
927
|
+
return B + e + F + e + e;
|
|
908
928
|
case 6165:
|
|
909
|
-
return B + e +
|
|
929
|
+
return B + e + F + "flex-" + e + e;
|
|
910
930
|
case 5187:
|
|
911
|
-
return B + e +
|
|
931
|
+
return B + e + M(e, /(\w+).+(:[^]+)/, B + "box-$1$2" + F + "flex-$1$2") + e;
|
|
912
932
|
case 5443:
|
|
913
|
-
return B + e +
|
|
933
|
+
return B + e + F + "flex-item-" + M(e, /flex-|-self/g, "") + (de(e, /flex-|baseline/) ? "" : F + "grid-row-" + M(e, /flex-|-self/g, "")) + e;
|
|
914
934
|
case 4675:
|
|
915
|
-
return B + e +
|
|
935
|
+
return B + e + F + "flex-line-pack" + M(e, /align-content|flex-|-self/g, "") + e;
|
|
916
936
|
case 5548:
|
|
917
|
-
return B + e +
|
|
937
|
+
return B + e + F + M(e, "shrink", "negative") + e;
|
|
918
938
|
case 5292:
|
|
919
|
-
return B + e +
|
|
939
|
+
return B + e + F + M(e, "basis", "preferred-size") + e;
|
|
920
940
|
case 6060:
|
|
921
|
-
return B + "box-" +
|
|
941
|
+
return B + "box-" + M(e, "-grow", "") + B + e + F + M(e, "grow", "positive") + e;
|
|
922
942
|
case 4554:
|
|
923
|
-
return B +
|
|
943
|
+
return B + M(e, /([^-])(transform)/g, "$1" + B + "$2") + e;
|
|
924
944
|
case 6187:
|
|
925
|
-
return
|
|
945
|
+
return M(M(M(e, /(zoom-|grab)/, B + "$1"), /(image-set)/, B + "$1"), e, "") + e;
|
|
926
946
|
case 5495:
|
|
927
947
|
case 3959:
|
|
928
|
-
return
|
|
948
|
+
return M(e, /(image-set\([^]*)/, B + "$1$`$1");
|
|
929
949
|
case 4968:
|
|
930
|
-
return
|
|
950
|
+
return M(M(e, /(.+:)(flex-)?(.*)/, B + "box-pack:$3" + F + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + B + e + e;
|
|
931
951
|
case 4200:
|
|
932
|
-
if (!de(e, /flex-|baseline/)) return
|
|
952
|
+
if (!de(e, /flex-|baseline/)) return F + "grid-column-align" + $e(e, t) + e;
|
|
933
953
|
break;
|
|
934
954
|
case 2592:
|
|
935
955
|
case 3360:
|
|
936
|
-
return
|
|
956
|
+
return F + M(e, "template-", "") + e;
|
|
937
957
|
case 4384:
|
|
938
958
|
case 3616:
|
|
939
959
|
return r && r.some(function(n, a) {
|
|
940
960
|
return t = a, de(n.props, /grid-\w+-end/);
|
|
941
|
-
}) ? ~He(e + (r = r[t].value), "span", 0) ? e :
|
|
961
|
+
}) ? ~He(e + (r = r[t].value), "span", 0) ? e : F + M(e, "-start", "") + e + F + "grid-row-span:" + (~He(r, "span", 0) ? de(r, /\d+/) : +de(r, /\d+/) - +de(e, /\d+/)) + ";" : F + M(e, "-start", "") + e;
|
|
942
962
|
case 4896:
|
|
943
963
|
case 4128:
|
|
944
964
|
return r && r.some(function(n) {
|
|
945
965
|
return de(n.props, /grid-\w+-start/);
|
|
946
|
-
}) ? e :
|
|
966
|
+
}) ? e : F + M(M(e, "-end", "-span"), "span ", "") + e;
|
|
947
967
|
case 4095:
|
|
948
968
|
case 3583:
|
|
949
969
|
case 4068:
|
|
950
970
|
case 2532:
|
|
951
|
-
return
|
|
971
|
+
return M(e, /(.+)-inline(.+)/, B + "$1$2") + e;
|
|
952
972
|
case 8116:
|
|
953
973
|
case 7059:
|
|
954
974
|
case 5753:
|
|
@@ -962,31 +982,31 @@ function Jr(e, t, r) {
|
|
|
962
982
|
case 5021:
|
|
963
983
|
case 4765:
|
|
964
984
|
if (se(e) - 1 - t > 6)
|
|
965
|
-
switch (
|
|
985
|
+
switch (Q(e, t + 1)) {
|
|
966
986
|
case 109:
|
|
967
|
-
if (
|
|
987
|
+
if (Q(e, t + 4) !== 45)
|
|
968
988
|
break;
|
|
969
989
|
case 102:
|
|
970
|
-
return
|
|
990
|
+
return M(e, /(.+:)(.+)-([^]+)/, "$1" + B + "$2-$3$1" + Oe + (Q(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
971
991
|
case 115:
|
|
972
|
-
return ~He(e, "stretch", 0) ?
|
|
992
|
+
return ~He(e, "stretch", 0) ? Xr(M(e, "stretch", "fill-available"), t, r) + e : e;
|
|
973
993
|
}
|
|
974
994
|
break;
|
|
975
995
|
case 5152:
|
|
976
996
|
case 5920:
|
|
977
|
-
return
|
|
978
|
-
return
|
|
997
|
+
return M(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, a, c, u, d, h, g) {
|
|
998
|
+
return F + a + ":" + c + g + (u ? F + a + "-span:" + (d ? h : +h - +c) + g : "") + e;
|
|
979
999
|
});
|
|
980
1000
|
case 4949:
|
|
981
|
-
if (
|
|
982
|
-
return
|
|
1001
|
+
if (Q(e, t + 6) === 121)
|
|
1002
|
+
return M(e, ":", ":" + B) + e;
|
|
983
1003
|
break;
|
|
984
1004
|
case 6444:
|
|
985
|
-
switch (
|
|
1005
|
+
switch (Q(e, Q(e, 14) === 45 ? 18 : 11)) {
|
|
986
1006
|
case 120:
|
|
987
|
-
return
|
|
1007
|
+
return M(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + B + (Q(e, 14) === 45 ? "inline-" : "") + "box$3$1" + B + "$2$3$1" + F + "$2box$3") + e;
|
|
988
1008
|
case 100:
|
|
989
|
-
return
|
|
1009
|
+
return M(e, ":", ":" + F) + e;
|
|
990
1010
|
}
|
|
991
1011
|
break;
|
|
992
1012
|
case 5719:
|
|
@@ -994,7 +1014,7 @@ function Jr(e, t, r) {
|
|
|
994
1014
|
case 2135:
|
|
995
1015
|
case 3927:
|
|
996
1016
|
case 2391:
|
|
997
|
-
return
|
|
1017
|
+
return M(e, "scroll-", "scroll-snap-") + e;
|
|
998
1018
|
}
|
|
999
1019
|
return e;
|
|
1000
1020
|
}
|
|
@@ -1003,60 +1023,60 @@ function et(e, t) {
|
|
|
1003
1023
|
r += t(e[n], n, e, t) || "";
|
|
1004
1024
|
return r;
|
|
1005
1025
|
}
|
|
1006
|
-
function
|
|
1026
|
+
function vo(e, t, r, n) {
|
|
1007
1027
|
switch (e.type) {
|
|
1008
|
-
case
|
|
1028
|
+
case co:
|
|
1009
1029
|
if (e.children.length) break;
|
|
1010
|
-
case
|
|
1030
|
+
case io:
|
|
1011
1031
|
case Lt:
|
|
1012
1032
|
return e.return = e.return || e.value;
|
|
1013
|
-
case qr:
|
|
1014
|
-
return "";
|
|
1015
1033
|
case Gr:
|
|
1034
|
+
return "";
|
|
1035
|
+
case Yr:
|
|
1016
1036
|
return e.return = e.value + "{" + et(e.children, n) + "}";
|
|
1017
1037
|
case st:
|
|
1018
1038
|
if (!se(e.value = e.props.join(","))) return "";
|
|
1019
1039
|
}
|
|
1020
1040
|
return se(r = et(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
1021
1041
|
}
|
|
1022
|
-
function
|
|
1023
|
-
var t =
|
|
1042
|
+
function $o(e) {
|
|
1043
|
+
var t = Zr(e);
|
|
1024
1044
|
return function(r, n, a, c) {
|
|
1025
1045
|
for (var u = "", d = 0; d < t; d++)
|
|
1026
1046
|
u += e[d](r, n, a, c) || "";
|
|
1027
1047
|
return u;
|
|
1028
1048
|
};
|
|
1029
1049
|
}
|
|
1030
|
-
function
|
|
1050
|
+
function So(e) {
|
|
1031
1051
|
return function(t) {
|
|
1032
1052
|
t.root || (t = t.return) && e(t);
|
|
1033
1053
|
};
|
|
1034
1054
|
}
|
|
1035
|
-
function
|
|
1055
|
+
function Co(e, t, r, n) {
|
|
1036
1056
|
if (e.length > -1 && !e.return)
|
|
1037
1057
|
switch (e.type) {
|
|
1038
1058
|
case Lt:
|
|
1039
|
-
e.return =
|
|
1059
|
+
e.return = Xr(e.value, e.length, r);
|
|
1040
1060
|
return;
|
|
1041
|
-
case
|
|
1042
|
-
return et([fe(e, { value:
|
|
1061
|
+
case Yr:
|
|
1062
|
+
return et([fe(e, { value: M(e.value, "@", "@" + B) })], n);
|
|
1043
1063
|
case st:
|
|
1044
1064
|
if (e.length)
|
|
1045
|
-
return
|
|
1065
|
+
return uo(r = e.props, function(a) {
|
|
1046
1066
|
switch (de(a, n = /(::plac\w+|:read-\w+)/)) {
|
|
1047
1067
|
case ":read-only":
|
|
1048
1068
|
case ":read-write":
|
|
1049
|
-
we(fe(e, { props: [
|
|
1069
|
+
we(fe(e, { props: [M(a, /:(read-\w+)/, ":" + Oe + "$1")] })), we(fe(e, { props: [a] })), _t(e, { props: lr(r, n) });
|
|
1050
1070
|
break;
|
|
1051
1071
|
case "::placeholder":
|
|
1052
|
-
we(fe(e, { props: [
|
|
1072
|
+
we(fe(e, { props: [M(a, /:(plac\w+)/, ":" + B + "input-$1")] })), we(fe(e, { props: [M(a, /:(plac\w+)/, ":" + Oe + "$1")] })), we(fe(e, { props: [M(a, /:(plac\w+)/, F + "input-$1")] })), we(fe(e, { props: [a] })), _t(e, { props: lr(r, n) });
|
|
1053
1073
|
break;
|
|
1054
1074
|
}
|
|
1055
1075
|
return "";
|
|
1056
1076
|
});
|
|
1057
1077
|
}
|
|
1058
1078
|
}
|
|
1059
|
-
var
|
|
1079
|
+
var jo = {
|
|
1060
1080
|
animationIterationCount: 1,
|
|
1061
1081
|
aspectRatio: 1,
|
|
1062
1082
|
borderImageOutset: 1,
|
|
@@ -1104,58 +1124,58 @@ var So = {
|
|
|
1104
1124
|
strokeMiterlimit: 1,
|
|
1105
1125
|
strokeOpacity: 1,
|
|
1106
1126
|
strokeWidth: 1
|
|
1107
|
-
}, Ce = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled",
|
|
1108
|
-
`, tt = typeof window < "u" && typeof document < "u",
|
|
1109
|
-
function
|
|
1127
|
+
}, Ce = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", en = "active", tn = "data-styled-version", dt = "6.1.19", Kt = `/*!sc*/
|
|
1128
|
+
`, tt = typeof window < "u" && typeof document < "u", Io = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" && process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY), ut = Object.freeze([]), je = Object.freeze({});
|
|
1129
|
+
function Ao(e, t, r) {
|
|
1110
1130
|
return r === void 0 && (r = je), e.theme !== r.theme && e.theme || t || r.theme;
|
|
1111
1131
|
}
|
|
1112
|
-
var
|
|
1113
|
-
function
|
|
1114
|
-
return e.replace(
|
|
1132
|
+
var rn = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), To = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Eo = /(^-|-$)/g;
|
|
1133
|
+
function pr(e) {
|
|
1134
|
+
return e.replace(To, "-").replace(Eo, "");
|
|
1115
1135
|
}
|
|
1116
|
-
var
|
|
1136
|
+
var _o = /(a)(d)/gi, Fe = 52, fr = function(e) {
|
|
1117
1137
|
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
1118
1138
|
};
|
|
1119
1139
|
function zt(e) {
|
|
1120
1140
|
var t, r = "";
|
|
1121
|
-
for (t = Math.abs(e); t > Fe; t = t / Fe | 0) r =
|
|
1122
|
-
return (
|
|
1141
|
+
for (t = Math.abs(e); t > Fe; t = t / Fe | 0) r = fr(t % Fe) + r;
|
|
1142
|
+
return (fr(t % Fe) + r).replace(_o, "$1-$2");
|
|
1123
1143
|
}
|
|
1124
|
-
var yt,
|
|
1144
|
+
var yt, nn = 5381, ve = function(e, t) {
|
|
1125
1145
|
for (var r = t.length; r; ) e = 33 * e ^ t.charCodeAt(--r);
|
|
1126
1146
|
return e;
|
|
1127
|
-
},
|
|
1128
|
-
return ve(
|
|
1147
|
+
}, on = function(e) {
|
|
1148
|
+
return ve(nn, e);
|
|
1129
1149
|
};
|
|
1130
|
-
function Eo(e) {
|
|
1131
|
-
return zt(nn(e) >>> 0);
|
|
1132
|
-
}
|
|
1133
1150
|
function Mo(e) {
|
|
1151
|
+
return zt(on(e) >>> 0);
|
|
1152
|
+
}
|
|
1153
|
+
function Ro(e) {
|
|
1134
1154
|
return e.displayName || e.name || "Component";
|
|
1135
1155
|
}
|
|
1136
1156
|
function kt(e) {
|
|
1137
1157
|
return typeof e == "string" && !0;
|
|
1138
1158
|
}
|
|
1139
|
-
var
|
|
1140
|
-
function
|
|
1141
|
-
return ("type" in (t = e) && t.type.$$typeof) ===
|
|
1159
|
+
var an = typeof Symbol == "function" && Symbol.for, sn = an ? Symbol.for("react.memo") : 60115, zo = an ? Symbol.for("react.forward_ref") : 60112, Do = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, Oo = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, cn = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, No = ((yt = {})[zo] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, yt[sn] = cn, yt);
|
|
1160
|
+
function hr(e) {
|
|
1161
|
+
return ("type" in (t = e) && t.type.$$typeof) === sn ? cn : "$$typeof" in e ? No[e.$$typeof] : Do;
|
|
1142
1162
|
var t;
|
|
1143
1163
|
}
|
|
1144
|
-
var
|
|
1145
|
-
function
|
|
1164
|
+
var Bo = Object.defineProperty, Po = Object.getOwnPropertyNames, mr = Object.getOwnPropertySymbols, Lo = Object.getOwnPropertyDescriptor, Fo = Object.getPrototypeOf, gr = Object.prototype;
|
|
1165
|
+
function ln(e, t, r) {
|
|
1146
1166
|
if (typeof t != "string") {
|
|
1147
|
-
if (
|
|
1148
|
-
var n =
|
|
1149
|
-
n && n !==
|
|
1167
|
+
if (gr) {
|
|
1168
|
+
var n = Fo(t);
|
|
1169
|
+
n && n !== gr && ln(e, n, r);
|
|
1150
1170
|
}
|
|
1151
|
-
var a =
|
|
1152
|
-
|
|
1153
|
-
for (var c =
|
|
1171
|
+
var a = Po(t);
|
|
1172
|
+
mr && (a = a.concat(mr(t)));
|
|
1173
|
+
for (var c = hr(e), u = hr(t), d = 0; d < a.length; ++d) {
|
|
1154
1174
|
var h = a[d];
|
|
1155
|
-
if (!(h in
|
|
1156
|
-
var g =
|
|
1175
|
+
if (!(h in Oo || r && r[h] || u && h in u || c && h in c)) {
|
|
1176
|
+
var g = Lo(t, h);
|
|
1157
1177
|
try {
|
|
1158
|
-
|
|
1178
|
+
Bo(e, h, g);
|
|
1159
1179
|
} catch {
|
|
1160
1180
|
}
|
|
1161
1181
|
}
|
|
@@ -1172,7 +1192,7 @@ function Wt(e) {
|
|
|
1172
1192
|
function me(e, t) {
|
|
1173
1193
|
return e && t ? "".concat(e, " ").concat(t) : e || t || "";
|
|
1174
1194
|
}
|
|
1175
|
-
function
|
|
1195
|
+
function br(e, t) {
|
|
1176
1196
|
if (e.length === 0) return "";
|
|
1177
1197
|
for (var r = e[0], n = 1; n < e.length; n++) r += e[n];
|
|
1178
1198
|
return r;
|
|
@@ -1193,7 +1213,7 @@ function Pe(e) {
|
|
|
1193
1213
|
for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
|
|
1194
1214
|
return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(t.length > 0 ? " Args: ".concat(t.join(", ")) : ""));
|
|
1195
1215
|
}
|
|
1196
|
-
var
|
|
1216
|
+
var Ko = function() {
|
|
1197
1217
|
function e(t) {
|
|
1198
1218
|
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
|
|
1199
1219
|
}
|
|
@@ -1224,41 +1244,41 @@ var Lo = function() {
|
|
|
1224
1244
|
for (; rt.has(Qe); ) Qe++;
|
|
1225
1245
|
var t = Qe++;
|
|
1226
1246
|
return Ye.set(e, t), rt.set(t, e), t;
|
|
1227
|
-
},
|
|
1247
|
+
}, Wo = function(e, t) {
|
|
1228
1248
|
Qe = t + 1, Ye.set(e, t), rt.set(t, e);
|
|
1229
|
-
},
|
|
1249
|
+
}, Uo = "style[".concat(Ce, "][").concat(tn, '="').concat(dt, '"]'), Ho = new RegExp("^".concat(Ce, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), qo = function(e, t, r) {
|
|
1230
1250
|
for (var n, a = r.split(","), c = 0, u = a.length; c < u; c++) (n = a[c]) && e.registerName(t, n);
|
|
1231
|
-
},
|
|
1251
|
+
}, Go = function(e, t) {
|
|
1232
1252
|
for (var r, n = ((r = t.textContent) !== null && r !== void 0 ? r : "").split(Kt), a = [], c = 0, u = n.length; c < u; c++) {
|
|
1233
1253
|
var d = n[c].trim();
|
|
1234
1254
|
if (d) {
|
|
1235
|
-
var h = d.match(
|
|
1255
|
+
var h = d.match(Ho);
|
|
1236
1256
|
if (h) {
|
|
1237
1257
|
var g = 0 | parseInt(h[1], 10), b = h[2];
|
|
1238
|
-
g !== 0 && (
|
|
1258
|
+
g !== 0 && (Wo(b, g), qo(e, b, h[3]), e.getTag().insertRules(g, a)), a.length = 0;
|
|
1239
1259
|
} else a.push(d);
|
|
1240
1260
|
}
|
|
1241
1261
|
}
|
|
1242
|
-
},
|
|
1243
|
-
for (var t = document.querySelectorAll(
|
|
1262
|
+
}, xr = function(e) {
|
|
1263
|
+
for (var t = document.querySelectorAll(Uo), r = 0, n = t.length; r < n; r++) {
|
|
1244
1264
|
var a = t[r];
|
|
1245
|
-
a && a.getAttribute(Ce) !==
|
|
1265
|
+
a && a.getAttribute(Ce) !== en && (Go(e, a), a.parentNode && a.parentNode.removeChild(a));
|
|
1246
1266
|
}
|
|
1247
1267
|
};
|
|
1248
|
-
function
|
|
1268
|
+
function Yo() {
|
|
1249
1269
|
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
|
|
1250
1270
|
}
|
|
1251
|
-
var
|
|
1271
|
+
var dn = function(e) {
|
|
1252
1272
|
var t = document.head, r = e || t, n = document.createElement("style"), a = function(d) {
|
|
1253
1273
|
var h = Array.from(d.querySelectorAll("style[".concat(Ce, "]")));
|
|
1254
1274
|
return h[h.length - 1];
|
|
1255
1275
|
}(r), c = a !== void 0 ? a.nextSibling : null;
|
|
1256
|
-
n.setAttribute(Ce,
|
|
1257
|
-
var u =
|
|
1276
|
+
n.setAttribute(Ce, en), n.setAttribute(tn, dt);
|
|
1277
|
+
var u = Yo();
|
|
1258
1278
|
return u && n.setAttribute("nonce", u), r.insertBefore(n, c), n;
|
|
1259
|
-
},
|
|
1279
|
+
}, Qo = function() {
|
|
1260
1280
|
function e(t) {
|
|
1261
|
-
this.element =
|
|
1281
|
+
this.element = dn(t), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) {
|
|
1262
1282
|
if (r.sheet) return r.sheet;
|
|
1263
1283
|
for (var n = document.styleSheets, a = 0, c = n.length; a < c; a++) {
|
|
1264
1284
|
var u = n[a];
|
|
@@ -1279,9 +1299,9 @@ var ln = function(e) {
|
|
|
1279
1299
|
var r = this.sheet.cssRules[t];
|
|
1280
1300
|
return r && r.cssText ? r.cssText : "";
|
|
1281
1301
|
}, e;
|
|
1282
|
-
}(),
|
|
1302
|
+
}(), Vo = function() {
|
|
1283
1303
|
function e(t) {
|
|
1284
|
-
this.element =
|
|
1304
|
+
this.element = dn(t), this.nodes = this.element.childNodes, this.length = 0;
|
|
1285
1305
|
}
|
|
1286
1306
|
return e.prototype.insertRule = function(t, r) {
|
|
1287
1307
|
if (t <= this.length && t >= 0) {
|
|
@@ -1294,7 +1314,7 @@ var ln = function(e) {
|
|
|
1294
1314
|
}, e.prototype.getRule = function(t) {
|
|
1295
1315
|
return t < this.length ? this.nodes[t].textContent : "";
|
|
1296
1316
|
}, e;
|
|
1297
|
-
}(),
|
|
1317
|
+
}(), Zo = function() {
|
|
1298
1318
|
function e(t) {
|
|
1299
1319
|
this.rules = [], this.length = 0;
|
|
1300
1320
|
}
|
|
@@ -1305,11 +1325,11 @@ var ln = function(e) {
|
|
|
1305
1325
|
}, e.prototype.getRule = function(t) {
|
|
1306
1326
|
return t < this.length ? this.rules[t] : "";
|
|
1307
1327
|
}, e;
|
|
1308
|
-
}(),
|
|
1328
|
+
}(), yr = tt, Jo = { isServer: !tt, useCSSOMInjection: !Io }, un = function() {
|
|
1309
1329
|
function e(t, r, n) {
|
|
1310
1330
|
t === void 0 && (t = je), r === void 0 && (r = {});
|
|
1311
1331
|
var a = this;
|
|
1312
|
-
this.options = X(X({},
|
|
1332
|
+
this.options = X(X({}, Jo), t), this.gs = r, this.names = new Map(n), this.server = !!t.isServer, !this.server && tt && yr && (yr = !1, xr(this)), Ut(this, function() {
|
|
1313
1333
|
return function(c) {
|
|
1314
1334
|
for (var u = c.getTag(), d = u.length, h = "", g = function(p) {
|
|
1315
1335
|
var w = function(o) {
|
|
@@ -1330,7 +1350,7 @@ var ln = function(e) {
|
|
|
1330
1350
|
return e.registerId = function(t) {
|
|
1331
1351
|
return Ke(t);
|
|
1332
1352
|
}, e.prototype.rehydrate = function() {
|
|
1333
|
-
!this.server && tt &&
|
|
1353
|
+
!this.server && tt && xr(this);
|
|
1334
1354
|
}, e.prototype.reconstructWithOptions = function(t, r) {
|
|
1335
1355
|
return r === void 0 && (r = !0), new e(X(X({}, this.options), t), this.gs, r && this.names || void 0);
|
|
1336
1356
|
}, e.prototype.allocateGSInstance = function(t) {
|
|
@@ -1338,8 +1358,8 @@ var ln = function(e) {
|
|
|
1338
1358
|
}, e.prototype.getTag = function() {
|
|
1339
1359
|
return this.tag || (this.tag = (t = function(r) {
|
|
1340
1360
|
var n = r.useCSSOMInjection, a = r.target;
|
|
1341
|
-
return r.isServer ? new
|
|
1342
|
-
}(this.options), new
|
|
1361
|
+
return r.isServer ? new Zo(a) : n ? new Qo(a) : new Vo(a);
|
|
1362
|
+
}(this.options), new Ko(t)));
|
|
1343
1363
|
var t;
|
|
1344
1364
|
}, e.prototype.hasNameForId = function(t, r) {
|
|
1345
1365
|
return this.names.has(t) && this.names.get(t).has(r);
|
|
@@ -1358,41 +1378,41 @@ var ln = function(e) {
|
|
|
1358
1378
|
}, e.prototype.clearTag = function() {
|
|
1359
1379
|
this.tag = void 0;
|
|
1360
1380
|
}, e;
|
|
1361
|
-
}(),
|
|
1362
|
-
function
|
|
1381
|
+
}(), Xo = /&/g, ea = /^\s*\/\/.*$/gm;
|
|
1382
|
+
function pn(e, t) {
|
|
1363
1383
|
return e.map(function(r) {
|
|
1364
1384
|
return r.type === "rule" && (r.value = "".concat(t, " ").concat(r.value), r.value = r.value.replaceAll(",", ",".concat(t, " ")), r.props = r.props.map(function(n) {
|
|
1365
1385
|
return "".concat(t, " ").concat(n);
|
|
1366
|
-
})), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children =
|
|
1386
|
+
})), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = pn(r.children, t)), r;
|
|
1367
1387
|
});
|
|
1368
1388
|
}
|
|
1369
|
-
function
|
|
1389
|
+
function ta(e) {
|
|
1370
1390
|
var t, r, n, a = je, c = a.options, u = c === void 0 ? je : c, d = a.plugins, h = d === void 0 ? ut : d, g = function(w, k, $) {
|
|
1371
1391
|
return $.startsWith(r) && $.endsWith(r) && $.replaceAll(r, "").length > 0 ? ".".concat(t) : w;
|
|
1372
1392
|
}, b = h.slice();
|
|
1373
1393
|
b.push(function(w) {
|
|
1374
|
-
w.type === st && w.value.includes("&") && (w.props[0] = w.props[0].replace(
|
|
1375
|
-
}), u.prefix && b.push(
|
|
1394
|
+
w.type === st && w.value.includes("&") && (w.props[0] = w.props[0].replace(Xo, r).replace(n, g));
|
|
1395
|
+
}), u.prefix && b.push(Co), b.push(vo);
|
|
1376
1396
|
var p = function(w, k, $, j) {
|
|
1377
1397
|
k === void 0 && (k = ""), $ === void 0 && ($ = ""), j === void 0 && (j = "&"), t = j, r = k, n = new RegExp("\\".concat(r, "\\b"), "g");
|
|
1378
|
-
var S = w.replace(
|
|
1379
|
-
u.namespace && (o =
|
|
1398
|
+
var S = w.replace(ea, ""), o = ko($ || k ? "".concat($, " ").concat(k, " { ").concat(S, " }") : S);
|
|
1399
|
+
u.namespace && (o = pn(o, u.namespace));
|
|
1380
1400
|
var i = [];
|
|
1381
|
-
return et(o,
|
|
1401
|
+
return et(o, $o(b.concat(So(function(s) {
|
|
1382
1402
|
return i.push(s);
|
|
1383
1403
|
})))), i;
|
|
1384
1404
|
};
|
|
1385
1405
|
return p.hash = h.length ? h.reduce(function(w, k) {
|
|
1386
1406
|
return k.name || Pe(15), ve(w, k.name);
|
|
1387
|
-
},
|
|
1407
|
+
}, nn).toString() : "", p;
|
|
1388
1408
|
}
|
|
1389
|
-
var
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
function
|
|
1393
|
-
return
|
|
1409
|
+
var ra = new un(), Ot = ta(), fn = K.createContext({ shouldForwardProp: void 0, styleSheet: ra, stylis: Ot });
|
|
1410
|
+
fn.Consumer;
|
|
1411
|
+
K.createContext(void 0);
|
|
1412
|
+
function kr() {
|
|
1413
|
+
return Wr(fn);
|
|
1394
1414
|
}
|
|
1395
|
-
var
|
|
1415
|
+
var na = function() {
|
|
1396
1416
|
function e(t, r) {
|
|
1397
1417
|
var n = this;
|
|
1398
1418
|
this.inject = function(a, c) {
|
|
@@ -1406,29 +1426,29 @@ var ta = function() {
|
|
|
1406
1426
|
return e.prototype.getName = function(t) {
|
|
1407
1427
|
return t === void 0 && (t = Ot), this.name + t.hash;
|
|
1408
1428
|
}, e;
|
|
1409
|
-
}(),
|
|
1429
|
+
}(), oa = function(e) {
|
|
1410
1430
|
return e >= "A" && e <= "Z";
|
|
1411
1431
|
};
|
|
1412
|
-
function
|
|
1432
|
+
function wr(e) {
|
|
1413
1433
|
for (var t = "", r = 0; r < e.length; r++) {
|
|
1414
1434
|
var n = e[r];
|
|
1415
1435
|
if (r === 1 && n === "-" && e[0] === "-") return e;
|
|
1416
|
-
|
|
1436
|
+
oa(n) ? t += "-" + n.toLowerCase() : t += n;
|
|
1417
1437
|
}
|
|
1418
1438
|
return t.startsWith("ms-") ? "-" + t : t;
|
|
1419
1439
|
}
|
|
1420
|
-
var
|
|
1440
|
+
var hn = function(e) {
|
|
1421
1441
|
return e == null || e === !1 || e === "";
|
|
1422
|
-
},
|
|
1442
|
+
}, mn = function(e) {
|
|
1423
1443
|
var t, r, n = [];
|
|
1424
1444
|
for (var a in e) {
|
|
1425
1445
|
var c = e[a];
|
|
1426
|
-
e.hasOwnProperty(a) && !
|
|
1446
|
+
e.hasOwnProperty(a) && !hn(c) && (Array.isArray(c) && c.isCss || Ie(c) ? n.push("".concat(wr(a), ":"), c, ";") : Be(c) ? n.push.apply(n, Xe(Xe(["".concat(a, " {")], mn(c), !1), ["}"], !1)) : n.push("".concat(wr(a), ": ").concat((t = a, (r = c) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || t in jo || t.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";")));
|
|
1427
1447
|
}
|
|
1428
1448
|
return n;
|
|
1429
1449
|
};
|
|
1430
1450
|
function be(e, t, r, n) {
|
|
1431
|
-
if (
|
|
1451
|
+
if (hn(e)) return [];
|
|
1432
1452
|
if (Wt(e)) return [".".concat(e.styledComponentId)];
|
|
1433
1453
|
if (Ie(e)) {
|
|
1434
1454
|
if (!Ie(c = e) || c.prototype && c.prototype.isReactComponent || !t) return [e];
|
|
@@ -1436,26 +1456,26 @@ function be(e, t, r, n) {
|
|
|
1436
1456
|
return be(a, t, r, n);
|
|
1437
1457
|
}
|
|
1438
1458
|
var c;
|
|
1439
|
-
return e instanceof
|
|
1459
|
+
return e instanceof na ? r ? (e.inject(r, n), [e.getName(n)]) : [e] : Be(e) ? mn(e) : Array.isArray(e) ? Array.prototype.concat.apply(ut, e.map(function(u) {
|
|
1440
1460
|
return be(u, t, r, n);
|
|
1441
1461
|
})) : [e.toString()];
|
|
1442
1462
|
}
|
|
1443
|
-
function
|
|
1463
|
+
function aa(e) {
|
|
1444
1464
|
for (var t = 0; t < e.length; t += 1) {
|
|
1445
1465
|
var r = e[t];
|
|
1446
1466
|
if (Ie(r) && !Wt(r)) return !1;
|
|
1447
1467
|
}
|
|
1448
1468
|
return !0;
|
|
1449
1469
|
}
|
|
1450
|
-
var
|
|
1470
|
+
var sa = on(dt), ia = function() {
|
|
1451
1471
|
function e(t, r, n) {
|
|
1452
|
-
this.rules = t, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) &&
|
|
1472
|
+
this.rules = t, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) && aa(t), this.componentId = r, this.baseHash = ve(sa, r), this.baseStyle = n, un.registerId(r);
|
|
1453
1473
|
}
|
|
1454
1474
|
return e.prototype.generateAndInjectStyles = function(t, r, n) {
|
|
1455
1475
|
var a = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, r, n) : "";
|
|
1456
1476
|
if (this.isStatic && !n.hash) if (this.staticRulesId && r.hasNameForId(this.componentId, this.staticRulesId)) a = me(a, this.staticRulesId);
|
|
1457
1477
|
else {
|
|
1458
|
-
var c =
|
|
1478
|
+
var c = br(be(this.rules, t, r, n)), u = zt(ve(this.baseHash, c) >>> 0);
|
|
1459
1479
|
if (!r.hasNameForId(this.componentId, u)) {
|
|
1460
1480
|
var d = n(c, ".".concat(u), void 0, this.componentId);
|
|
1461
1481
|
r.insertRules(this.componentId, u, d);
|
|
@@ -1467,7 +1487,7 @@ var oa = nn(dt), aa = function() {
|
|
|
1467
1487
|
var p = this.rules[b];
|
|
1468
1488
|
if (typeof p == "string") g += p;
|
|
1469
1489
|
else if (p) {
|
|
1470
|
-
var w =
|
|
1490
|
+
var w = br(be(p, t, r, n));
|
|
1471
1491
|
h = ve(h, w + b), g += w;
|
|
1472
1492
|
}
|
|
1473
1493
|
}
|
|
@@ -1478,18 +1498,18 @@ var oa = nn(dt), aa = function() {
|
|
|
1478
1498
|
}
|
|
1479
1499
|
return a;
|
|
1480
1500
|
}, e;
|
|
1481
|
-
}(),
|
|
1482
|
-
|
|
1501
|
+
}(), gn = K.createContext(void 0);
|
|
1502
|
+
gn.Consumer;
|
|
1483
1503
|
var wt = {};
|
|
1484
|
-
function
|
|
1504
|
+
function ca(e, t, r) {
|
|
1485
1505
|
var n = Wt(e), a = e, c = !kt(e), u = t.attrs, d = u === void 0 ? ut : u, h = t.componentId, g = h === void 0 ? function(f, m) {
|
|
1486
|
-
var y = typeof f != "string" ? "sc" :
|
|
1506
|
+
var y = typeof f != "string" ? "sc" : pr(f);
|
|
1487
1507
|
wt[y] = (wt[y] || 0) + 1;
|
|
1488
|
-
var x = "".concat(y, "-").concat(
|
|
1508
|
+
var x = "".concat(y, "-").concat(Mo(dt + y + wt[y]));
|
|
1489
1509
|
return m ? "".concat(m, "-").concat(x) : x;
|
|
1490
1510
|
}(t.displayName, t.parentComponentId) : h, b = t.displayName, p = b === void 0 ? function(f) {
|
|
1491
|
-
return kt(f) ? "styled.".concat(f) : "Styled(".concat(
|
|
1492
|
-
}(e) : b, w = t.displayName && t.componentId ? "".concat(
|
|
1511
|
+
return kt(f) ? "styled.".concat(f) : "Styled(".concat(Ro(f), ")");
|
|
1512
|
+
}(e) : b, w = t.displayName && t.componentId ? "".concat(pr(t.displayName), "-").concat(t.componentId) : t.componentId || g, k = n && a.attrs ? a.attrs.concat(d).filter(Boolean) : d, $ = t.shouldForwardProp;
|
|
1493
1513
|
if (n && a.shouldForwardProp) {
|
|
1494
1514
|
var j = a.shouldForwardProp;
|
|
1495
1515
|
if (t.shouldForwardProp) {
|
|
@@ -1499,56 +1519,56 @@ function sa(e, t, r) {
|
|
|
1499
1519
|
};
|
|
1500
1520
|
} else $ = j;
|
|
1501
1521
|
}
|
|
1502
|
-
var o = new
|
|
1522
|
+
var o = new ia(r, w, n ? a.componentStyle : void 0);
|
|
1503
1523
|
function i(f, m) {
|
|
1504
1524
|
return function(y, x, A) {
|
|
1505
|
-
var
|
|
1506
|
-
for (var ye, ce = X(X({}, V), { className: void 0, theme: ie }), ke = 0; ke <
|
|
1507
|
-
var ne = Ie(ye =
|
|
1525
|
+
var _ = y.attrs, C = y.componentStyle, E = y.defaultProps, W = y.foldedComponentIds, P = y.styledComponentId, I = y.target, O = K.useContext(gn), H = kr(), v = y.shouldForwardProp || H.shouldForwardProp, N = Ao(x, O, E) || je, R = function(Y, V, ie) {
|
|
1526
|
+
for (var ye, ce = X(X({}, V), { className: void 0, theme: ie }), ke = 0; ke < Y.length; ke += 1) {
|
|
1527
|
+
var ne = Ie(ye = Y[ke]) ? ye(ce) : ye;
|
|
1508
1528
|
for (var ee in ne) ce[ee] = ee === "className" ? me(ce[ee], ne[ee]) : ee === "style" ? X(X({}, ce[ee]), ne[ee]) : ne[ee];
|
|
1509
1529
|
}
|
|
1510
1530
|
return V.className && (ce.className = me(ce.className, V.className)), ce;
|
|
1511
|
-
}(
|
|
1512
|
-
for (var q in R) R[q] === void 0 || q[0] === "$" || q === "as" || q === "theme" && R.theme ===
|
|
1513
|
-
var
|
|
1514
|
-
var ie =
|
|
1531
|
+
}(_, x, N), L = R.as || I, z = {};
|
|
1532
|
+
for (var q in R) R[q] === void 0 || q[0] === "$" || q === "as" || q === "theme" && R.theme === N || (q === "forwardedAs" ? z.as = R.forwardedAs : v && !v(q, L) || (z[q] = R[q]));
|
|
1533
|
+
var D = function(Y, V) {
|
|
1534
|
+
var ie = kr(), ye = Y.generateAndInjectStyles(V, ie.styleSheet, ie.stylis);
|
|
1515
1535
|
return ye;
|
|
1516
|
-
}(C, R), U = me(
|
|
1517
|
-
return
|
|
1536
|
+
}(C, R), U = me(W, P);
|
|
1537
|
+
return D && (U += " " + D), R.className && (U += " " + R.className), z[kt(L) && !rn.has(L) ? "class" : "className"] = U, A && (z.ref = A), Je(L, z);
|
|
1518
1538
|
}(s, f, m);
|
|
1519
1539
|
}
|
|
1520
1540
|
i.displayName = p;
|
|
1521
|
-
var s =
|
|
1541
|
+
var s = K.forwardRef(i);
|
|
1522
1542
|
return s.attrs = k, s.componentStyle = o, s.displayName = p, s.shouldForwardProp = $, s.foldedComponentIds = n ? me(a.foldedComponentIds, a.styledComponentId) : "", s.styledComponentId = w, s.target = n ? a.target : e, Object.defineProperty(s, "defaultProps", { get: function() {
|
|
1523
1543
|
return this._foldedDefaultProps;
|
|
1524
1544
|
}, set: function(f) {
|
|
1525
1545
|
this._foldedDefaultProps = n ? function(m) {
|
|
1526
1546
|
for (var y = [], x = 1; x < arguments.length; x++) y[x - 1] = arguments[x];
|
|
1527
|
-
for (var A = 0,
|
|
1547
|
+
for (var A = 0, _ = y; A < _.length; A++) Dt(m, _[A], !0);
|
|
1528
1548
|
return m;
|
|
1529
1549
|
}({}, a.defaultProps, f) : f;
|
|
1530
1550
|
} }), Ut(s, function() {
|
|
1531
1551
|
return ".".concat(s.styledComponentId);
|
|
1532
|
-
}), c &&
|
|
1552
|
+
}), c && ln(s, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), s;
|
|
1533
1553
|
}
|
|
1534
|
-
function
|
|
1554
|
+
function vr(e, t) {
|
|
1535
1555
|
for (var r = [e[0]], n = 0, a = t.length; n < a; n += 1) r.push(t[n], e[n + 1]);
|
|
1536
1556
|
return r;
|
|
1537
1557
|
}
|
|
1538
|
-
var
|
|
1558
|
+
var $r = function(e) {
|
|
1539
1559
|
return Object.assign(e, { isCss: !0 });
|
|
1540
1560
|
};
|
|
1541
|
-
function
|
|
1561
|
+
function la(e) {
|
|
1542
1562
|
for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
|
|
1543
|
-
if (Ie(e) || Be(e)) return
|
|
1563
|
+
if (Ie(e) || Be(e)) return $r(be(vr(ut, Xe([e], t, !0))));
|
|
1544
1564
|
var n = e;
|
|
1545
|
-
return t.length === 0 && n.length === 1 && typeof n[0] == "string" ? be(n) :
|
|
1565
|
+
return t.length === 0 && n.length === 1 && typeof n[0] == "string" ? be(n) : $r(be(vr(n, t)));
|
|
1546
1566
|
}
|
|
1547
1567
|
function Nt(e, t, r) {
|
|
1548
1568
|
if (r === void 0 && (r = je), !t) throw Pe(1, t);
|
|
1549
1569
|
var n = function(a) {
|
|
1550
1570
|
for (var c = [], u = 1; u < arguments.length; u++) c[u - 1] = arguments[u];
|
|
1551
|
-
return e(t, r,
|
|
1571
|
+
return e(t, r, la.apply(void 0, Xe([a], c, !1)));
|
|
1552
1572
|
};
|
|
1553
1573
|
return n.attrs = function(a) {
|
|
1554
1574
|
return Nt(e, t, X(X({}, r), { attrs: Array.prototype.concat(r.attrs, a).filter(Boolean) }));
|
|
@@ -1556,18 +1576,18 @@ function Nt(e, t, r) {
|
|
|
1556
1576
|
return Nt(e, t, X(X({}, r), a));
|
|
1557
1577
|
}, n;
|
|
1558
1578
|
}
|
|
1559
|
-
var
|
|
1560
|
-
return Nt(
|
|
1561
|
-
}, T =
|
|
1562
|
-
|
|
1563
|
-
T[e] =
|
|
1579
|
+
var bn = function(e) {
|
|
1580
|
+
return Nt(ca, e);
|
|
1581
|
+
}, T = bn;
|
|
1582
|
+
rn.forEach(function(e) {
|
|
1583
|
+
T[e] = bn(e);
|
|
1564
1584
|
});
|
|
1565
|
-
const
|
|
1585
|
+
const da = T.div`
|
|
1566
1586
|
display: flex;
|
|
1567
1587
|
flex-wrap: wrap;
|
|
1568
1588
|
gap: 6px;
|
|
1569
1589
|
margin-bottom: 6px;
|
|
1570
|
-
`,
|
|
1590
|
+
`, ua = T.div`
|
|
1571
1591
|
display: inline-flex;
|
|
1572
1592
|
align-items: center;
|
|
1573
1593
|
gap: 6px;
|
|
@@ -1584,18 +1604,18 @@ const ca = T.div`
|
|
|
1584
1604
|
border-color: #4b5563;
|
|
1585
1605
|
background: ${(e) => e.$isImage ? "rgba(59, 130, 246, 0.2)" : "rgba(107, 114, 128, 0.25)"};
|
|
1586
1606
|
}
|
|
1587
|
-
`,
|
|
1607
|
+
`, pa = T.img`
|
|
1588
1608
|
width: 28px;
|
|
1589
1609
|
height: 28px;
|
|
1590
1610
|
object-fit: cover;
|
|
1591
1611
|
border-radius: 4px;
|
|
1592
|
-
`,
|
|
1612
|
+
`, fa = T.span`
|
|
1593
1613
|
overflow: hidden;
|
|
1594
1614
|
text-overflow: ellipsis;
|
|
1595
1615
|
white-space: nowrap;
|
|
1596
1616
|
flex: 1;
|
|
1597
1617
|
min-width: 0;
|
|
1598
|
-
`,
|
|
1618
|
+
`, ha = T.button`
|
|
1599
1619
|
display: flex;
|
|
1600
1620
|
align-items: center;
|
|
1601
1621
|
justify-content: center;
|
|
@@ -1612,16 +1632,16 @@ const ca = T.div`
|
|
|
1612
1632
|
}
|
|
1613
1633
|
`;
|
|
1614
1634
|
function Ae({ attachments: e, onRemove: t, readOnly: r }) {
|
|
1615
|
-
return e.length ? /* @__PURE__ */ l.jsx(
|
|
1635
|
+
return e.length ? /* @__PURE__ */ l.jsx(da, { children: e.map((n) => {
|
|
1616
1636
|
const a = n.type === "image", c = a && (n.preview || n.url);
|
|
1617
|
-
return /* @__PURE__ */ l.jsxs(
|
|
1618
|
-
c ? /* @__PURE__ */ l.jsx(
|
|
1619
|
-
/* @__PURE__ */ l.jsx(
|
|
1620
|
-
!r && t && /* @__PURE__ */ l.jsx(
|
|
1637
|
+
return /* @__PURE__ */ l.jsxs(ua, { $isImage: a, title: n.name, children: [
|
|
1638
|
+
c ? /* @__PURE__ */ l.jsx(pa, { src: n.preview || n.url, alt: "", loading: "lazy", decoding: "async" }) : a ? /* @__PURE__ */ l.jsx(ro, { size: 16, "aria-hidden": !0 }) : /* @__PURE__ */ l.jsx(eo, { size: 16, "aria-hidden": !0 }),
|
|
1639
|
+
/* @__PURE__ */ l.jsx(fa, { children: n.name }),
|
|
1640
|
+
!r && t && /* @__PURE__ */ l.jsx(ha, { type: "button", onClick: () => t(n.id), "aria-label": `Remove ${n.name}`, children: /* @__PURE__ */ l.jsx(so, { size: 14 }) })
|
|
1621
1641
|
] }, n.id);
|
|
1622
1642
|
}) }) : null;
|
|
1623
1643
|
}
|
|
1624
|
-
const
|
|
1644
|
+
const xn = [
|
|
1625
1645
|
"application/pdf",
|
|
1626
1646
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
1627
1647
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
@@ -1634,7 +1654,7 @@ const bn = [
|
|
|
1634
1654
|
"image/jpeg",
|
|
1635
1655
|
"image/webp",
|
|
1636
1656
|
"image/gif"
|
|
1637
|
-
],
|
|
1657
|
+
], ma = {
|
|
1638
1658
|
".pdf": "application/pdf",
|
|
1639
1659
|
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
1640
1660
|
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
@@ -1649,10 +1669,10 @@ const bn = [
|
|
|
1649
1669
|
".webp": "image/webp",
|
|
1650
1670
|
".gif": "image/gif"
|
|
1651
1671
|
};
|
|
1652
|
-
function
|
|
1672
|
+
function ga(e) {
|
|
1653
1673
|
const t = e.lastIndexOf(".");
|
|
1654
1674
|
if (!(t < 0))
|
|
1655
|
-
return
|
|
1675
|
+
return ma[e.slice(t).toLowerCase()];
|
|
1656
1676
|
}
|
|
1657
1677
|
async function Ht(e) {
|
|
1658
1678
|
var r;
|
|
@@ -1663,14 +1683,14 @@ async function Ht(e) {
|
|
|
1663
1683
|
t.push(e.files[n]);
|
|
1664
1684
|
return t;
|
|
1665
1685
|
}
|
|
1666
|
-
function
|
|
1686
|
+
function yn(e, t, r) {
|
|
1667
1687
|
if (e.size > t)
|
|
1668
1688
|
return `File too large (max ${Math.floor(t / (1024 * 1024))}MB)`;
|
|
1669
1689
|
if (r.includes(e.type)) return null;
|
|
1670
|
-
const n =
|
|
1690
|
+
const n = ga(e.name);
|
|
1671
1691
|
return n && r.includes(n) ? null : "File type not allowed for attachments";
|
|
1672
1692
|
}
|
|
1673
|
-
const
|
|
1693
|
+
const ba = T.button`
|
|
1674
1694
|
display: flex;
|
|
1675
1695
|
align-items: center;
|
|
1676
1696
|
justify-content: center;
|
|
@@ -1701,7 +1721,7 @@ const ma = T.button`
|
|
|
1701
1721
|
border-color: #4b5563;
|
|
1702
1722
|
color: #e5e7eb;
|
|
1703
1723
|
}
|
|
1704
|
-
`,
|
|
1724
|
+
`, xa = T.button`
|
|
1705
1725
|
display: flex;
|
|
1706
1726
|
align-items: center;
|
|
1707
1727
|
justify-content: center;
|
|
@@ -1750,19 +1770,19 @@ function qt({
|
|
|
1750
1770
|
integrated: t = !1,
|
|
1751
1771
|
maxFileBytes: r,
|
|
1752
1772
|
maxFiles: n,
|
|
1753
|
-
allowedMime: a =
|
|
1773
|
+
allowedMime: a = xn,
|
|
1754
1774
|
currentCount: c,
|
|
1755
1775
|
uploadAttachment: u,
|
|
1756
1776
|
onUploaded: d,
|
|
1757
1777
|
onError: h
|
|
1758
1778
|
}) {
|
|
1759
|
-
const g =
|
|
1779
|
+
const g = K.useRef(null), [b, p] = K.useState(!1), w = K.useMemo(
|
|
1760
1780
|
() => [
|
|
1761
1781
|
".pdf,.docx,.xlsx,.xls,.csv,.txt,.md,.json",
|
|
1762
1782
|
"image/png,image/jpeg,image/webp,image/gif"
|
|
1763
1783
|
].join(","),
|
|
1764
1784
|
[]
|
|
1765
|
-
), k =
|
|
1785
|
+
), k = K.useCallback(
|
|
1766
1786
|
async (i) => {
|
|
1767
1787
|
const s = Array.from(i);
|
|
1768
1788
|
if (!s.length) return;
|
|
@@ -1772,7 +1792,7 @@ function qt({
|
|
|
1772
1792
|
h == null || h(`You can attach at most ${n} files per message.`);
|
|
1773
1793
|
break;
|
|
1774
1794
|
}
|
|
1775
|
-
const y =
|
|
1795
|
+
const y = yn(m, r, a);
|
|
1776
1796
|
if (y) {
|
|
1777
1797
|
h == null || h(`${m.name}: ${y}`);
|
|
1778
1798
|
continue;
|
|
@@ -1793,7 +1813,7 @@ function qt({
|
|
|
1793
1813
|
), $ = (i) => {
|
|
1794
1814
|
const s = i.target.files;
|
|
1795
1815
|
s != null && s.length && k(s), i.target.value = "";
|
|
1796
|
-
}, j = c >= n, S = !!(e || b || j), o = t ?
|
|
1816
|
+
}, j = c >= n, S = !!(e || b || j), o = t ? xa : ba;
|
|
1797
1817
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
1798
1818
|
/* @__PURE__ */ l.jsx(
|
|
1799
1819
|
"input",
|
|
@@ -1817,7 +1837,7 @@ function qt({
|
|
|
1817
1837
|
var i;
|
|
1818
1838
|
return (i = g.current) == null ? void 0 : i.click();
|
|
1819
1839
|
},
|
|
1820
|
-
children: /* @__PURE__ */ l.jsx(
|
|
1840
|
+
children: /* @__PURE__ */ l.jsx(oo, { size: 16, strokeWidth: 2 })
|
|
1821
1841
|
}
|
|
1822
1842
|
)
|
|
1823
1843
|
] });
|
|
@@ -1831,31 +1851,31 @@ function he() {
|
|
|
1831
1851
|
return e;
|
|
1832
1852
|
}, he.apply(this, arguments);
|
|
1833
1853
|
}
|
|
1834
|
-
const
|
|
1835
|
-
function
|
|
1854
|
+
const ya = ["children", "options"], Sr = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), { class: "className", for: "htmlFor" }), Cr = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, ka = ["style", "script", "pre"], wa = ["src", "href", "data", "formAction", "srcDoc", "action"], va = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, $a = /mailto:/i, Sa = /\n{2,}$/, jr = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Ca = /^ *> ?/gm, ja = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Ia = /^ {2,}\n/, Aa = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Ir = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Ar = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, Ta = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Ea = /^(?:\n *)*\n/, _a = /\r\n?/g, Ma = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Ra = /^\[\^([^\]]+)]/, za = /\f/g, Da = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Oa = /^\s*?\[(x|\s)\]/, Tr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Er = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, _r = /^([^\n]+)\n *(=|-){3,} *\n/, vt = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Na = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Mr = /^<!--[\s\S]*?(?:-->)/, Ba = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, $t = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Pa = /^\{.*\}$/, La = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Fa = /^<([^ >]+@[^ >]+)>/, Ka = /^<([^ >]+:\/[^ >]+)>/, Wa = /-([a-z])?/gi, Rr = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Ua = /^[^\n]+(?: \n|\n{2,})/, Ha = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, qa = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Ga = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Ya = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Qa = /\t/g, Va = /(^ *\||\| *$)/g, Za = /^ *:-+: *$/, Ja = /^ *:-+ *$/, Xa = /^ *-+: *$/, pt = (e) => `(?=[\\s\\S]+?\\1${e ? "\\1" : ""})`, ft = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", es = RegExp(`^([*_])\\1${pt(1)}${ft}\\1\\1(?!\\1)`), ts = RegExp(`^([*_])${pt(0)}${ft}\\1(?!\\1)`), rs = RegExp(`^(==)${pt(0)}${ft}\\1`), ns = RegExp(`^(~~)${pt(0)}${ft}\\1`), os = /^(:[a-zA-Z0-9-_]+:)/, as = /^\\([^0-9A-Za-z\s])/, ss = /\\([^0-9A-Za-z\s])/g, is = /^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/, cs = /^\n+/, ls = /^([ \t]*)/, ds = /(?:^|\n)( *)$/, Gt = "(?:\\d+\\.)", Yt = "(?:[*+-])";
|
|
1855
|
+
function kn(e) {
|
|
1836
1856
|
return "( *)(" + (e === 1 ? Gt : Yt) + ") +";
|
|
1837
1857
|
}
|
|
1838
|
-
const
|
|
1839
|
-
function vn(e) {
|
|
1840
|
-
return RegExp("^" + (e === 1 ? kn : wn));
|
|
1841
|
-
}
|
|
1842
|
-
const ls = vn(1), ds = vn(2);
|
|
1858
|
+
const wn = kn(1), vn = kn(2);
|
|
1843
1859
|
function $n(e) {
|
|
1844
|
-
return RegExp("^" + (e === 1 ?
|
|
1860
|
+
return RegExp("^" + (e === 1 ? wn : vn));
|
|
1845
1861
|
}
|
|
1846
1862
|
const us = $n(1), ps = $n(2);
|
|
1847
1863
|
function Sn(e) {
|
|
1864
|
+
return RegExp("^" + (e === 1 ? wn : vn) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Gt : Yt) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
1865
|
+
}
|
|
1866
|
+
const fs = Sn(1), hs = Sn(2);
|
|
1867
|
+
function Cn(e) {
|
|
1848
1868
|
const t = e === 1 ? Gt : Yt;
|
|
1849
1869
|
return RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
|
|
1850
1870
|
}
|
|
1851
|
-
const
|
|
1852
|
-
function
|
|
1853
|
-
const r = t === 1, n = r ?
|
|
1871
|
+
const jn = Cn(1), In = Cn(2);
|
|
1872
|
+
function zr(e, t) {
|
|
1873
|
+
const r = t === 1, n = r ? jn : In, a = r ? fs : hs, c = r ? us : ps;
|
|
1854
1874
|
return { t: (u) => c.test(u), o: Te(function(u, d) {
|
|
1855
|
-
const h =
|
|
1875
|
+
const h = ds.exec(d.prevCapture);
|
|
1856
1876
|
return h && (d.list || !d.inline && !d.simple) ? n.exec(u = h[1] + u) : null;
|
|
1857
1877
|
}), i: 1, u(u, d, h) {
|
|
1858
|
-
const g = r ? +u[2] : void 0, b = u[0].replace(
|
|
1878
|
+
const g = r ? +u[2] : void 0, b = u[0].replace(Sa, `
|
|
1859
1879
|
`).match(a);
|
|
1860
1880
|
let p = !1;
|
|
1861
1881
|
return { items: b.map(function(w, k) {
|
|
@@ -1875,7 +1895,7 @@ function Rr(e, t) {
|
|
|
1875
1895
|
return e("li", { key: b }, d(g, h));
|
|
1876
1896
|
})) };
|
|
1877
1897
|
}
|
|
1878
|
-
const
|
|
1898
|
+
const ms = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), gs = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
|
|
1879
1899
|
function Ne(e) {
|
|
1880
1900
|
let t = e.length;
|
|
1881
1901
|
for (; t > 0 && e[t - 1] <= " "; ) t--;
|
|
@@ -1884,7 +1904,7 @@ function Ne(e) {
|
|
|
1884
1904
|
function Ve(e, t) {
|
|
1885
1905
|
return e.startsWith(t);
|
|
1886
1906
|
}
|
|
1887
|
-
function
|
|
1907
|
+
function bs(e, t, r) {
|
|
1888
1908
|
if (Array.isArray(r)) {
|
|
1889
1909
|
for (let n = 0; n < r.length; n++) if (Ve(e, r[n])) return !0;
|
|
1890
1910
|
return !1;
|
|
@@ -1894,10 +1914,10 @@ function ms(e, t, r) {
|
|
|
1894
1914
|
function Re(e) {
|
|
1895
1915
|
return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
|
|
1896
1916
|
}
|
|
1897
|
-
function
|
|
1898
|
-
return
|
|
1917
|
+
function xs(e) {
|
|
1918
|
+
return Xa.test(e) ? "right" : Za.test(e) ? "center" : Ja.test(e) ? "left" : null;
|
|
1899
1919
|
}
|
|
1900
|
-
function
|
|
1920
|
+
function Dr(e, t, r, n) {
|
|
1901
1921
|
const a = r.inTable;
|
|
1902
1922
|
r.inTable = !0;
|
|
1903
1923
|
let c = [[]], u = "";
|
|
@@ -1910,17 +1930,17 @@ function zr(e, t, r, n) {
|
|
|
1910
1930
|
h.trim() === "|" && (d(), n) ? g !== 0 && g !== b.length - 1 && c.push([]) : u += h;
|
|
1911
1931
|
}), d(), r.inTable = a, c;
|
|
1912
1932
|
}
|
|
1913
|
-
function
|
|
1933
|
+
function ys(e, t, r) {
|
|
1914
1934
|
r.inline = !0;
|
|
1915
|
-
const n = e[2] ? e[2].replace(
|
|
1935
|
+
const n = e[2] ? e[2].replace(Va, "").split("|").map(xs) : [], a = e[3] ? function(u, d, h) {
|
|
1916
1936
|
return u.trim().split(`
|
|
1917
1937
|
`).map(function(g) {
|
|
1918
|
-
return
|
|
1938
|
+
return Dr(g, d, h, !0);
|
|
1919
1939
|
});
|
|
1920
|
-
}(e[3], t, r) : [], c =
|
|
1940
|
+
}(e[3], t, r) : [], c = Dr(e[1], t, r, !!a.length);
|
|
1921
1941
|
return r.inline = !1, a.length ? { align: n, cells: a, header: c, type: "25" } : { children: c, type: "21" };
|
|
1922
1942
|
}
|
|
1923
|
-
function
|
|
1943
|
+
function Or(e, t) {
|
|
1924
1944
|
return e.align[t] == null ? {} : { textAlign: e.align[t] };
|
|
1925
1945
|
}
|
|
1926
1946
|
function Te(e) {
|
|
@@ -1946,18 +1966,18 @@ function We(e) {
|
|
|
1946
1966
|
return e.exec(t);
|
|
1947
1967
|
});
|
|
1948
1968
|
}
|
|
1949
|
-
const
|
|
1950
|
-
function
|
|
1969
|
+
const ks = /(javascript|vbscript|data(?!:image)):/i;
|
|
1970
|
+
function ws(e) {
|
|
1951
1971
|
try {
|
|
1952
1972
|
const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
|
1953
|
-
if (
|
|
1973
|
+
if (ks.test(t)) return null;
|
|
1954
1974
|
} catch {
|
|
1955
1975
|
return null;
|
|
1956
1976
|
}
|
|
1957
1977
|
return e;
|
|
1958
1978
|
}
|
|
1959
1979
|
function oe(e) {
|
|
1960
|
-
return e && e.replace(
|
|
1980
|
+
return e && e.replace(ss, "$1");
|
|
1961
1981
|
}
|
|
1962
1982
|
function Ze(e, t, r) {
|
|
1963
1983
|
const n = r.inline || !1, a = r.simple || !1;
|
|
@@ -1965,13 +1985,13 @@ function Ze(e, t, r) {
|
|
|
1965
1985
|
const c = e(t, r);
|
|
1966
1986
|
return r.inline = n, r.simple = a, c;
|
|
1967
1987
|
}
|
|
1968
|
-
function
|
|
1988
|
+
function vs(e, t, r) {
|
|
1969
1989
|
const n = r.inline || !1, a = r.simple || !1;
|
|
1970
1990
|
r.inline = !1, r.simple = !0;
|
|
1971
1991
|
const c = e(t, r);
|
|
1972
1992
|
return r.inline = n, r.simple = a, c;
|
|
1973
1993
|
}
|
|
1974
|
-
function
|
|
1994
|
+
function $s(e, t, r) {
|
|
1975
1995
|
const n = r.inline || !1;
|
|
1976
1996
|
r.inline = !1;
|
|
1977
1997
|
const a = e(t, r);
|
|
@@ -1984,7 +2004,7 @@ function Ct() {
|
|
|
1984
2004
|
function jt() {
|
|
1985
2005
|
return null;
|
|
1986
2006
|
}
|
|
1987
|
-
function
|
|
2007
|
+
function Ss(...e) {
|
|
1988
2008
|
return e.filter(Boolean).join(" ");
|
|
1989
2009
|
}
|
|
1990
2010
|
function It(e, t, r) {
|
|
@@ -1993,21 +2013,21 @@ function It(e, t, r) {
|
|
|
1993
2013
|
for (; a.length && (n = n[a[0]], n !== void 0); ) a.shift();
|
|
1994
2014
|
return n || r;
|
|
1995
2015
|
}
|
|
1996
|
-
function
|
|
1997
|
-
t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? he({},
|
|
1998
|
-
const r = t.slugify || Re, n = t.sanitizer ||
|
|
2016
|
+
function Cs(e = "", t = {}) {
|
|
2017
|
+
t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? he({}, Cr, t.namedCodesToUnicode) : Cr;
|
|
2018
|
+
const r = t.slugify || Re, n = t.sanitizer || ws, a = t.createElement || Bt.createElement, c = [jr, Ir, Ar, t.enforceAtxHeadings ? Er : Tr, _r, Rr, jn, In], u = [...c, Ua, vt, Mr, $t];
|
|
1999
2019
|
function d(o, i, ...s) {
|
|
2000
2020
|
const f = It(t.overrides, o + ".props", {});
|
|
2001
2021
|
return a(function(m, y) {
|
|
2002
2022
|
const x = It(y, m);
|
|
2003
2023
|
return x ? typeof x == "function" || typeof x == "object" && "render" in x ? x : It(y, m + ".component", m) : m;
|
|
2004
|
-
}(o, t.overrides), he({}, i, f, { className:
|
|
2024
|
+
}(o, t.overrides), he({}, i, f, { className: Ss(i == null ? void 0 : i.className, f.className) || void 0 }), ...s);
|
|
2005
2025
|
}
|
|
2006
2026
|
function h(o) {
|
|
2007
|
-
o = o.replace(
|
|
2027
|
+
o = o.replace(Da, "");
|
|
2008
2028
|
let i = !1;
|
|
2009
|
-
t.forceInline ? i = !0 : t.forceBlock || (i =
|
|
2010
|
-
const s = $(k(i ? o : Ne(o).replace(
|
|
2029
|
+
t.forceInline ? i = !0 : t.forceBlock || (i = Ya.test(o) === !1);
|
|
2030
|
+
const s = $(k(i ? o : Ne(o).replace(cs, "") + `
|
|
2011
2031
|
|
|
2012
2032
|
`, { inline: i }));
|
|
2013
2033
|
for (; typeof s[s.length - 1] == "string" && !s[s.length - 1].trim(); ) s.pop();
|
|
@@ -2023,83 +2043,83 @@ function $s(e = "", t = {}) {
|
|
|
2023
2043
|
}
|
|
2024
2044
|
function g(o, i) {
|
|
2025
2045
|
if (!i || !i.trim()) return null;
|
|
2026
|
-
const s = i.match(
|
|
2046
|
+
const s = i.match(va);
|
|
2027
2047
|
return s ? s.reduce(function(f, m) {
|
|
2028
2048
|
const y = m.indexOf("=");
|
|
2029
2049
|
if (y !== -1) {
|
|
2030
2050
|
const x = function(E) {
|
|
2031
|
-
return E.indexOf("-") !== -1 && E.match(
|
|
2051
|
+
return E.indexOf("-") !== -1 && E.match(Ba) === null && (E = E.replace(Wa, function(W, P) {
|
|
2032
2052
|
return P.toUpperCase();
|
|
2033
2053
|
})), E;
|
|
2034
2054
|
}(m.slice(0, y)).trim(), A = function(E) {
|
|
2035
|
-
const
|
|
2036
|
-
return (
|
|
2037
|
-
}(m.slice(y + 1).trim()),
|
|
2038
|
-
if (
|
|
2039
|
-
const C = f[
|
|
2040
|
-
return
|
|
2055
|
+
const W = E[0];
|
|
2056
|
+
return (W === '"' || W === "'") && E.length >= 2 && E[E.length - 1] === W ? E.slice(1, -1) : E;
|
|
2057
|
+
}(m.slice(y + 1).trim()), _ = Sr[x] || x;
|
|
2058
|
+
if (_ === "ref") return f;
|
|
2059
|
+
const C = f[_] = function(E, W, P, I) {
|
|
2060
|
+
return W === "style" ? function(O) {
|
|
2041
2061
|
const H = [];
|
|
2042
|
-
let v = "",
|
|
2043
|
-
if (!
|
|
2044
|
-
for (let q = 0; q <
|
|
2045
|
-
const
|
|
2046
|
-
if (
|
|
2062
|
+
let v = "", N = !1, R = !1, L = "";
|
|
2063
|
+
if (!O) return H;
|
|
2064
|
+
for (let q = 0; q < O.length; q++) {
|
|
2065
|
+
const D = O[q];
|
|
2066
|
+
if (D !== '"' && D !== "'" || N || (R ? D === L && (R = !1, L = "") : (R = !0, L = D)), D === "(" && v.endsWith("url") ? N = !0 : D === ")" && N && (N = !1), D !== ";" || R || N) v += D;
|
|
2047
2067
|
else {
|
|
2048
2068
|
const U = v.trim();
|
|
2049
2069
|
if (U) {
|
|
2050
|
-
const
|
|
2051
|
-
if (
|
|
2052
|
-
const V = U.slice(0,
|
|
2070
|
+
const Y = U.indexOf(":");
|
|
2071
|
+
if (Y > 0) {
|
|
2072
|
+
const V = U.slice(0, Y).trim(), ie = U.slice(Y + 1).trim();
|
|
2053
2073
|
H.push([V, ie]);
|
|
2054
2074
|
}
|
|
2055
2075
|
}
|
|
2056
2076
|
v = "";
|
|
2057
2077
|
}
|
|
2058
2078
|
}
|
|
2059
|
-
const
|
|
2060
|
-
if (
|
|
2061
|
-
const q =
|
|
2079
|
+
const z = v.trim();
|
|
2080
|
+
if (z) {
|
|
2081
|
+
const q = z.indexOf(":");
|
|
2062
2082
|
if (q > 0) {
|
|
2063
|
-
const
|
|
2064
|
-
H.push([
|
|
2083
|
+
const D = z.slice(0, q).trim(), U = z.slice(q + 1).trim();
|
|
2084
|
+
H.push([D, U]);
|
|
2065
2085
|
}
|
|
2066
2086
|
}
|
|
2067
2087
|
return H;
|
|
2068
|
-
}(P).reduce(function(
|
|
2069
|
-
return
|
|
2070
|
-
}, {}) :
|
|
2088
|
+
}(P).reduce(function(O, [H, v]) {
|
|
2089
|
+
return O[H.replace(/(-[a-z])/g, (N) => N[1].toUpperCase())] = I(v, E, H), O;
|
|
2090
|
+
}, {}) : wa.indexOf(W) !== -1 ? I(oe(P), E, W) : (P.match(Pa) && (P = oe(P.slice(1, P.length - 1))), P === "true" || P !== "false" && P);
|
|
2071
2091
|
}(o, x, A, n);
|
|
2072
|
-
typeof C == "string" && (vt.test(C) || $t.test(C)) && (f[
|
|
2073
|
-
} else m !== "style" && (f[
|
|
2092
|
+
typeof C == "string" && (vt.test(C) || $t.test(C)) && (f[_] = h(C.trim()));
|
|
2093
|
+
} else m !== "style" && (f[Sr[m] || m] = !0);
|
|
2074
2094
|
return f;
|
|
2075
2095
|
}, {}) : null;
|
|
2076
2096
|
}
|
|
2077
|
-
const b = [], p = {}, w = { 0: { t: [">"], o: le(
|
|
2078
|
-
const [, f, m] = o[0].replace(
|
|
2097
|
+
const b = [], p = {}, w = { 0: { t: [">"], o: le(jr), i: 1, u(o, i, s) {
|
|
2098
|
+
const [, f, m] = o[0].replace(Ca, "").match(ja);
|
|
2079
2099
|
return { alert: f, children: i(m, s) };
|
|
2080
2100
|
}, l(o, i, s) {
|
|
2081
2101
|
const f = { key: s.key };
|
|
2082
2102
|
return o.alert && (f.className = "markdown-alert-" + r(o.alert.toLowerCase(), Re), o.children.unshift({ attrs: {}, children: [{ type: "27", text: o.alert }], noInnerParse: !0, type: "11", tag: "header" })), d("blockquote", f, i(o.children, s));
|
|
2083
|
-
} }, 1: { o: We(
|
|
2103
|
+
} }, 1: { o: We(Ia), i: 1, u: Ct, l: (o, i, s) => d("br", { key: s.key }) }, 2: { t: (o) => {
|
|
2084
2104
|
const i = o[0];
|
|
2085
2105
|
return i === "-" || i === "*" || i === "_";
|
|
2086
|
-
}, o: le(
|
|
2087
|
-
const [, f] = o[3].match(
|
|
2106
|
+
}, o: le(Aa), i: 1, u: Ct, l: (o, i, s) => d("hr", { key: s.key }) }, 3: { t: [" "], o: le(Ar), i: 0, u: (o) => ({ lang: void 0, text: oe(Ne(o[0].replace(/^ {4}/gm, ""))) }), l: (o, i, s) => d("pre", { key: s.key }, d("code", he({}, o.attrs, { className: o.lang ? "lang-" + o.lang : "" }), o.text)) }, 4: { t: ["```", "~~~"], o: le(Ir), i: 0, u: (o) => ({ attrs: g("code", o[3] || ""), lang: o[2] || void 0, text: o[4], type: "3" }) }, 5: { t: ["`"], o: pe(Ta), i: 3, u: (o) => ({ text: oe(o[2]) }), l: (o, i, s) => d("code", { key: s.key }, o.text) }, 6: { t: ["[^"], o: le(Ma), i: 0, u: (o) => (b.push({ footnote: o[2], identifier: o[1] }), {}), l: jt }, 7: { t: ["[^"], o: ue(Ra), i: 1, u: (o) => ({ target: "#" + r(o[1], Re), text: o[1] }), l: (o, i, s) => d("a", { key: s.key, href: n(o.target, "a", "href") }, d("sup", { key: s.key }, o.text)) }, 8: { t: ["[ ]", "[x]"], o: ue(Oa), i: 1, u: (o) => ({ completed: o[1].toLowerCase() === "x" }), l: (o, i, s) => d("input", { checked: o.completed, key: s.key, readOnly: !0, type: "checkbox" }) }, 9: { t: ["#"], o: le(t.enforceAtxHeadings ? Er : Tr), i: 1, u: (o, i, s) => ({ children: Ze(i, o[2], s), id: r(o[2], Re), level: o[1].length }), l: (o, i, s) => d("h" + o.level, { id: o.id, key: s.key }, i(o.children, s)) }, 10: { o: le(_r), i: 0, u: (o, i, s) => ({ children: Ze(i, o[1], s), level: o[2] === "=" ? 1 : 2, type: "9" }) }, 11: { t: ["<"], o: We(vt), i: 1, u(o, i, s) {
|
|
2107
|
+
const [, f] = o[3].match(ls), m = RegExp("^" + f, "gm"), y = o[3].replace(m, ""), x = (A = y, u.some((P) => P.test(A)) ? $s : Ze);
|
|
2088
2108
|
var A;
|
|
2089
|
-
const
|
|
2090
|
-
if (s.inAnchor = s.inAnchor ||
|
|
2109
|
+
const _ = o[1].toLowerCase(), C = ka.indexOf(_) !== -1, E = (C ? _ : o[1]).trim(), W = { attrs: g(E, o[2]), noInnerParse: C, tag: E };
|
|
2110
|
+
if (s.inAnchor = s.inAnchor || _ === "a", C) W.text = o[3];
|
|
2091
2111
|
else {
|
|
2092
2112
|
const P = s.inHTML;
|
|
2093
|
-
s.inHTML = !0,
|
|
2113
|
+
s.inHTML = !0, W.children = x(i, y, s), s.inHTML = P;
|
|
2094
2114
|
}
|
|
2095
|
-
return s.inAnchor = !1,
|
|
2115
|
+
return s.inAnchor = !1, W;
|
|
2096
2116
|
}, l: (o, i, s) => d(o.tag, he({ key: s.key }, o.attrs), o.text || (o.children ? i(o.children, s) : "")) }, 13: { t: ["<"], o: We($t), i: 1, u(o) {
|
|
2097
2117
|
const i = o[1].trim();
|
|
2098
2118
|
return { attrs: g(i, o[2] || ""), tag: i };
|
|
2099
|
-
}, l: (o, i, s) => d(o.tag, he({}, o.attrs, { key: s.key })) }, 12: { t: ["<!--"], o: We(Mr), i: 1, u: () => ({}), l: jt }, 14: { t: ["!["], o: pe(
|
|
2119
|
+
}, l: (o, i, s) => d(o.tag, he({}, o.attrs, { key: s.key })) }, 12: { t: ["<!--"], o: We(Mr), i: 1, u: () => ({}), l: jt }, 14: { t: ["!["], o: pe(gs), i: 1, u: (o) => ({ alt: oe(o[1]), target: oe(o[2]), title: oe(o[3]) }), l: (o, i, s) => d("img", { key: s.key, alt: o.alt || void 0, title: o.title || void 0, src: n(o.target, "img", "src") }) }, 15: { t: ["["], o: ue(ms), i: 3, u: (o, i, s) => ({ children: vs(i, o[1], s), target: oe(o[2]), title: oe(o[3]) }), l: (o, i, s) => d("a", { key: s.key, href: n(o.target, "a", "href"), title: o.title }, i(o.children, s)) }, 16: { t: ["<"], o: ue(Ka), i: 0, u: (o) => ({ children: [{ text: o[1], type: "27" }], target: o[1], type: "15" }) }, 17: { t: (o, i) => !i.inAnchor && !t.disableAutoLink && (Ve(o, "http://") || Ve(o, "https://")), o: ue(La), i: 0, u: (o) => ({ children: [{ text: o[1], type: "27" }], target: o[1], title: void 0, type: "15" }) }, 18: { t: ["<"], o: ue(Fa), i: 0, u(o) {
|
|
2100
2120
|
let i = o[1], s = o[1];
|
|
2101
|
-
return
|
|
2102
|
-
} }, 20:
|
|
2121
|
+
return $a.test(s) || (s = "mailto:" + s), { children: [{ text: i.replace("mailto:", ""), type: "27" }], target: s, type: "15" };
|
|
2122
|
+
} }, 20: zr(d, 1), 33: zr(d, 2), 19: { o: le(Ea), i: 3, u: Ct, l: () => `
|
|
2103
2123
|
` }, 21: { o: Te(function(o, i) {
|
|
2104
2124
|
if (i.inline || i.simple || i.inHTML && o.indexOf(`
|
|
2105
2125
|
|
|
@@ -2112,37 +2132,37 @@ function $s(e = "", t = {}) {
|
|
|
2112
2132
|
`, !c.some((y) => y.test(m)) && (s += m, !!m.trim())));
|
|
2113
2133
|
const f = Ne(s);
|
|
2114
2134
|
return f === "" ? null : [s, , f];
|
|
2115
|
-
}), i: 3, u: St, l: (o, i, s) => d("p", { key: s.key }, i(o.children, s)) }, 22: { t: ["["], o: ue(
|
|
2135
|
+
}), i: 3, u: St, l: (o, i, s) => d("p", { key: s.key }, i(o.children, s)) }, 22: { t: ["["], o: ue(Ha), i: 0, u: (o) => (p[o[1]] = { target: o[2], title: o[4] }, {}), l: jt }, 23: { t: ["!["], o: pe(qa), i: 0, u: (o) => ({ alt: o[1] ? oe(o[1]) : void 0, ref: o[2] }), l: (o, i, s) => p[o.ref] ? d("img", { key: s.key, alt: o.alt, src: n(p[o.ref].target, "img", "src"), title: p[o.ref].title }) : null }, 24: { t: (o) => o[0] === "[" && o.indexOf("](") === -1, o: ue(Ga), i: 0, u: (o, i, s) => ({ children: i(o[1], s), fallbackChildren: o[0], ref: o[2] }), l: (o, i, s) => p[o.ref] ? d("a", { key: s.key, href: n(p[o.ref].target, "a", "href"), title: p[o.ref].title }, i(o.children, s)) : d("span", { key: s.key }, o.fallbackChildren) }, 25: { t: ["|"], o: le(Rr), i: 1, u: ys, l(o, i, s) {
|
|
2116
2136
|
const f = o;
|
|
2117
2137
|
return d("table", { key: s.key }, d("thead", null, d("tr", null, f.header.map(function(m, y) {
|
|
2118
|
-
return d("th", { key: y, style:
|
|
2138
|
+
return d("th", { key: y, style: Or(f, y) }, i(m, s));
|
|
2119
2139
|
}))), d("tbody", null, f.cells.map(function(m, y) {
|
|
2120
2140
|
return d("tr", { key: y }, m.map(function(x, A) {
|
|
2121
|
-
return d("td", { key: A, style:
|
|
2141
|
+
return d("td", { key: A, style: Or(f, A) }, i(x, s));
|
|
2122
2142
|
}));
|
|
2123
2143
|
})));
|
|
2124
2144
|
} }, 27: { o: Te(function(o, i) {
|
|
2125
2145
|
let s;
|
|
2126
|
-
return Ve(o, ":") && (s =
|
|
2146
|
+
return Ve(o, ":") && (s = os.exec(o)), s || is.exec(o);
|
|
2127
2147
|
}), i: 4, u(o) {
|
|
2128
2148
|
const i = o[0];
|
|
2129
|
-
return { text: i.indexOf("&") === -1 ? i : i.replace(
|
|
2130
|
-
}, l: (o) => o.text }, 28: { t: ["**", "__"], o: pe(
|
|
2149
|
+
return { text: i.indexOf("&") === -1 ? i : i.replace(Na, (s, f) => t.namedCodesToUnicode[f] || s) };
|
|
2150
|
+
}, l: (o) => o.text }, 28: { t: ["**", "__"], o: pe(es), i: 2, u: (o, i, s) => ({ children: i(o[2], s) }), l: (o, i, s) => d("strong", { key: s.key }, i(o.children, s)) }, 29: { t: (o) => {
|
|
2131
2151
|
const i = o[0];
|
|
2132
2152
|
return (i === "*" || i === "_") && o[1] !== i;
|
|
2133
|
-
}, o: pe(
|
|
2153
|
+
}, o: pe(ts), i: 3, u: (o, i, s) => ({ children: i(o[2], s) }), l: (o, i, s) => d("em", { key: s.key }, i(o.children, s)) }, 30: { t: ["\\"], o: pe(as), i: 1, u: (o) => ({ text: o[1], type: "27" }) }, 31: { t: ["=="], o: pe(rs), i: 3, u: St, l: (o, i, s) => d("mark", { key: s.key }, i(o.children, s)) }, 32: { t: ["~~"], o: pe(ns), i: 3, u: St, l: (o, i, s) => d("del", { key: s.key }, i(o.children, s)) } };
|
|
2134
2154
|
t.disableParsingRawHTML === !0 && (delete w[11], delete w[13]);
|
|
2135
2155
|
const k = function(o) {
|
|
2136
2156
|
var i = Object.keys(o);
|
|
2137
2157
|
function s(f, m) {
|
|
2138
2158
|
var y = [];
|
|
2139
2159
|
if (m.prevCapture = m.prevCapture || "", f.trim()) for (; f; ) for (var x = 0; x < i.length; ) {
|
|
2140
|
-
var A = i[x],
|
|
2141
|
-
if (!
|
|
2142
|
-
var C =
|
|
2160
|
+
var A = i[x], _ = o[A];
|
|
2161
|
+
if (!_.t || bs(f, m, _.t)) {
|
|
2162
|
+
var C = _.o(f, m);
|
|
2143
2163
|
if (C && C[0]) {
|
|
2144
2164
|
f = f.substring(C[0].length);
|
|
2145
|
-
var E =
|
|
2165
|
+
var E = _.u(C, s, m);
|
|
2146
2166
|
m.prevCapture += C[0], E.type || (E.type = A), y.push(E);
|
|
2147
2167
|
break;
|
|
2148
2168
|
}
|
|
@@ -2155,8 +2175,8 @@ function $s(e = "", t = {}) {
|
|
|
2155
2175
|
return o[f].i - o[m].i || (f < m ? -1 : 1);
|
|
2156
2176
|
}), function(f, m) {
|
|
2157
2177
|
return s(function(y) {
|
|
2158
|
-
return y.replace(
|
|
2159
|
-
`).replace(
|
|
2178
|
+
return y.replace(_a, `
|
|
2179
|
+
`).replace(za, "").replace(Qa, " ");
|
|
2160
2180
|
}(f), m);
|
|
2161
2181
|
};
|
|
2162
2182
|
}(w), $ = (j = /* @__PURE__ */ function(o, i) {
|
|
@@ -2170,8 +2190,8 @@ function $s(e = "", t = {}) {
|
|
|
2170
2190
|
let y = !1;
|
|
2171
2191
|
for (let x = 0; x < i.length; x++) {
|
|
2172
2192
|
s.key = x;
|
|
2173
|
-
const A = o(i[x], s),
|
|
2174
|
-
|
|
2193
|
+
const A = o(i[x], s), _ = typeof A == "string";
|
|
2194
|
+
_ && y ? m[m.length - 1] += A : A !== null && m.push(A), y = _;
|
|
2175
2195
|
}
|
|
2176
2196
|
return s.key = f, m;
|
|
2177
2197
|
}
|
|
@@ -2183,15 +2203,15 @@ function $s(e = "", t = {}) {
|
|
|
2183
2203
|
return d("div", { id: r(o.identifier, Re), key: o.identifier }, o.identifier, $(k(o.footnote, { inline: !0 })));
|
|
2184
2204
|
}))) : S;
|
|
2185
2205
|
}
|
|
2186
|
-
const
|
|
2206
|
+
const js = (e) => {
|
|
2187
2207
|
let { children: t = "", options: r } = e, n = function(a, c) {
|
|
2188
2208
|
if (a == null) return {};
|
|
2189
2209
|
var u, d, h = {}, g = Object.keys(a);
|
|
2190
2210
|
for (d = 0; d < g.length; d++) c.indexOf(u = g[d]) >= 0 || (h[u] = a[u]);
|
|
2191
2211
|
return h;
|
|
2192
|
-
}(e,
|
|
2193
|
-
return Bt.cloneElement(
|
|
2194
|
-
},
|
|
2212
|
+
}(e, ya);
|
|
2213
|
+
return Bt.cloneElement(Cs(t, r), n);
|
|
2214
|
+
}, Is = T.div`
|
|
2195
2215
|
code {
|
|
2196
2216
|
@media (prefers-color-scheme: dark) {
|
|
2197
2217
|
background-color: #374151 !important;
|
|
@@ -2231,8 +2251,8 @@ const Ss = (e) => {
|
|
|
2231
2251
|
}
|
|
2232
2252
|
`;
|
|
2233
2253
|
function Qt({ content: e, className: t }) {
|
|
2234
|
-
return /* @__PURE__ */ l.jsx(
|
|
2235
|
-
|
|
2254
|
+
return /* @__PURE__ */ l.jsx(Is, { className: t, children: /* @__PURE__ */ l.jsx(
|
|
2255
|
+
js,
|
|
2236
2256
|
{
|
|
2237
2257
|
options: {
|
|
2238
2258
|
overrides: {
|
|
@@ -2403,7 +2423,7 @@ function Qt({ content: e, className: t }) {
|
|
|
2403
2423
|
}
|
|
2404
2424
|
) });
|
|
2405
2425
|
}
|
|
2406
|
-
const
|
|
2426
|
+
const An = T.div`
|
|
2407
2427
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
2408
2428
|
background-color: white;
|
|
2409
2429
|
border: 1px solid #e5e7eb;
|
|
@@ -2533,7 +2553,7 @@ const In = T.div`
|
|
|
2533
2553
|
border-top-color: #52525b;
|
|
2534
2554
|
background-color: #3f3f46;
|
|
2535
2555
|
}
|
|
2536
|
-
`,
|
|
2556
|
+
`, As = T.textarea`
|
|
2537
2557
|
display: block;
|
|
2538
2558
|
width: 100%;
|
|
2539
2559
|
min-width: 0;
|
|
@@ -2594,7 +2614,7 @@ const In = T.div`
|
|
|
2594
2614
|
background-color: #1f2937;
|
|
2595
2615
|
border-top-color: #374151;
|
|
2596
2616
|
}
|
|
2597
|
-
`,
|
|
2617
|
+
`, Ts = T.textarea`
|
|
2598
2618
|
flex: 1;
|
|
2599
2619
|
width: 100%;
|
|
2600
2620
|
min-height: 40px;
|
|
@@ -2653,7 +2673,7 @@ const In = T.div`
|
|
|
2653
2673
|
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
|
2654
2674
|
}
|
|
2655
2675
|
}
|
|
2656
|
-
`,
|
|
2676
|
+
`, Es = T.button`
|
|
2657
2677
|
width: 32px;
|
|
2658
2678
|
height: 32px;
|
|
2659
2679
|
min-width: 32px;
|
|
@@ -2829,7 +2849,7 @@ const In = T.div`
|
|
|
2829
2849
|
return `#${Math.floor(a).toString(16).padStart(2, "0")}${Math.floor(c).toString(16).padStart(2, "0")}${Math.floor(u).toString(16).padStart(2, "0")}`;
|
|
2830
2850
|
}
|
|
2831
2851
|
return e || "#2563eb";
|
|
2832
|
-
},
|
|
2852
|
+
}, _s = T.button`
|
|
2833
2853
|
position: fixed;
|
|
2834
2854
|
z-index: 50;
|
|
2835
2855
|
height: 48px;
|
|
@@ -2889,7 +2909,7 @@ const In = T.div`
|
|
|
2889
2909
|
align-items: center;
|
|
2890
2910
|
justify-content: center;
|
|
2891
2911
|
}
|
|
2892
|
-
`,
|
|
2912
|
+
`, Ms = T.div`
|
|
2893
2913
|
position: fixed;
|
|
2894
2914
|
z-index: 50;
|
|
2895
2915
|
width: 320px;
|
|
@@ -3084,7 +3104,7 @@ const tr = T.div`
|
|
|
3084
3104
|
@media (prefers-color-scheme: dark) {
|
|
3085
3105
|
color: #f87171;
|
|
3086
3106
|
}
|
|
3087
|
-
`,
|
|
3107
|
+
`, Rs = T.div`
|
|
3088
3108
|
position: absolute;
|
|
3089
3109
|
${(e) => e.$position === "top" ? "top: 0;" : "bottom: 0;"}
|
|
3090
3110
|
left: 0;
|
|
@@ -3116,7 +3136,7 @@ const tr = T.div`
|
|
|
3116
3136
|
flex-shrink: 0;
|
|
3117
3137
|
border: 2px solid rgba(255, 255, 255, 0.2);
|
|
3118
3138
|
background-color: rgba(255, 255, 255, 0.1);
|
|
3119
|
-
`,
|
|
3139
|
+
`, zs = T.div`
|
|
3120
3140
|
display: flex;
|
|
3121
3141
|
flex-direction: column;
|
|
3122
3142
|
align-items: center;
|
|
@@ -3138,7 +3158,7 @@ const tr = T.div`
|
|
|
3138
3158
|
[data-theme="dark"] & {
|
|
3139
3159
|
background: ${(e) => e.$primaryColor ? `linear-gradient(to bottom, ${e.$primaryColor} 0%, ${e.$primaryColor} 20%, rgba(31, 41, 55, 0.3) 45%, rgba(31, 41, 55, 0.7) 65%, rgba(31, 41, 55, 1) 100%)` : "transparent"};
|
|
3140
3160
|
}
|
|
3141
|
-
`,
|
|
3161
|
+
`, Ds = T.div`
|
|
3142
3162
|
font-size: 18px;
|
|
3143
3163
|
font-weight: 600;
|
|
3144
3164
|
text-align: center;
|
|
@@ -3152,7 +3172,7 @@ const tr = T.div`
|
|
|
3152
3172
|
[data-theme="dark"] & {
|
|
3153
3173
|
color: #f9fafb;
|
|
3154
3174
|
}
|
|
3155
|
-
`,
|
|
3175
|
+
`, Os = T.img`
|
|
3156
3176
|
max-width: 120px;
|
|
3157
3177
|
max-height: 120px;
|
|
3158
3178
|
width: auto;
|
|
@@ -3160,14 +3180,14 @@ const tr = T.div`
|
|
|
3160
3180
|
object-fit: contain;
|
|
3161
3181
|
margin-bottom: 8px;
|
|
3162
3182
|
border-radius: 8px;
|
|
3163
|
-
`,
|
|
3183
|
+
`, Ns = T.div`
|
|
3164
3184
|
display: flex;
|
|
3165
3185
|
flex-direction: column;
|
|
3166
3186
|
gap: 12px;
|
|
3167
3187
|
width: 100%;
|
|
3168
3188
|
max-width: 100%;
|
|
3169
3189
|
margin-bottom: 16px;
|
|
3170
|
-
`,
|
|
3190
|
+
`, Bs = T.button`
|
|
3171
3191
|
width: 100%;
|
|
3172
3192
|
padding: 12px 16px;
|
|
3173
3193
|
box-sizing: border-box;
|
|
@@ -3219,7 +3239,7 @@ const tr = T.div`
|
|
|
3219
3239
|
border-color: ${(e) => e.$primaryColor || "#6b7280"};
|
|
3220
3240
|
}
|
|
3221
3241
|
}
|
|
3222
|
-
`,
|
|
3242
|
+
`, Ps = T.div`
|
|
3223
3243
|
display: flex;
|
|
3224
3244
|
align-items: center;
|
|
3225
3245
|
gap: 8px;
|
|
@@ -3235,7 +3255,7 @@ const tr = T.div`
|
|
|
3235
3255
|
[data-theme="dark"] & {
|
|
3236
3256
|
border-top-color: #374151;
|
|
3237
3257
|
}
|
|
3238
|
-
`, ht =
|
|
3258
|
+
`, ht = K.forwardRef(function({
|
|
3239
3259
|
value: t,
|
|
3240
3260
|
onChange: r,
|
|
3241
3261
|
onKeyDown: n,
|
|
@@ -3249,7 +3269,7 @@ const tr = T.div`
|
|
|
3249
3269
|
r(k.target.value);
|
|
3250
3270
|
}, p = (k) => {
|
|
3251
3271
|
k.key === "Enter" && !k.shiftKey && k.preventDefault(), n(k);
|
|
3252
|
-
}, w = h === "composer" ?
|
|
3272
|
+
}, w = h === "composer" ? As : Ts;
|
|
3253
3273
|
return /* @__PURE__ */ l.jsx(
|
|
3254
3274
|
w,
|
|
3255
3275
|
{
|
|
@@ -3291,22 +3311,22 @@ function mt({ size: e = 16 }) {
|
|
|
3291
3311
|
);
|
|
3292
3312
|
}
|
|
3293
3313
|
function rr({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
|
|
3294
|
-
const [a, c] =
|
|
3314
|
+
const [a, c] = K.useState(""), u = K.useRef(null), d = async () => {
|
|
3295
3315
|
!a.trim() || n || (await r(a.trim()), c(""));
|
|
3296
3316
|
}, h = (b) => {
|
|
3297
3317
|
b.key === "Enter" && !b.shiftKey && (b.preventDefault(), d());
|
|
3298
3318
|
}, g = e.welcomeMessage || "Hi there 👋 How can we help?";
|
|
3299
|
-
return /* @__PURE__ */ l.jsxs(
|
|
3319
|
+
return /* @__PURE__ */ l.jsxs(zs, { $primaryColor: e.primaryColor, children: [
|
|
3300
3320
|
e.welcomeImage && /* @__PURE__ */ l.jsx(
|
|
3301
|
-
|
|
3321
|
+
Os,
|
|
3302
3322
|
{
|
|
3303
3323
|
src: e.welcomeImage,
|
|
3304
3324
|
alt: "Welcome"
|
|
3305
3325
|
}
|
|
3306
3326
|
),
|
|
3307
|
-
/* @__PURE__ */ l.jsx(
|
|
3308
|
-
e.quickQuestions && e.quickQuestions.length > 0 && /* @__PURE__ */ l.jsx(
|
|
3309
|
-
|
|
3327
|
+
/* @__PURE__ */ l.jsx(Ds, { children: g }),
|
|
3328
|
+
e.quickQuestions && e.quickQuestions.length > 0 && /* @__PURE__ */ l.jsx(Ns, { children: e.quickQuestions.map((b, p) => /* @__PURE__ */ l.jsx(
|
|
3329
|
+
Bs,
|
|
3310
3330
|
{
|
|
3311
3331
|
onClick: () => t(b),
|
|
3312
3332
|
disabled: n,
|
|
@@ -3315,7 +3335,7 @@ function rr({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
|
|
|
3315
3335
|
},
|
|
3316
3336
|
p
|
|
3317
3337
|
)) }),
|
|
3318
|
-
/* @__PURE__ */ l.jsxs(
|
|
3338
|
+
/* @__PURE__ */ l.jsxs(Ps, { children: [
|
|
3319
3339
|
/* @__PURE__ */ l.jsx(
|
|
3320
3340
|
ht,
|
|
3321
3341
|
{
|
|
@@ -3328,7 +3348,7 @@ function rr({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
|
|
|
3328
3348
|
}
|
|
3329
3349
|
),
|
|
3330
3350
|
/* @__PURE__ */ l.jsx(
|
|
3331
|
-
|
|
3351
|
+
Es,
|
|
3332
3352
|
{
|
|
3333
3353
|
onClick: d,
|
|
3334
3354
|
disabled: n || !a.trim(),
|
|
@@ -3340,7 +3360,7 @@ function rr({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
|
|
|
3340
3360
|
}
|
|
3341
3361
|
function nr(e, t) {
|
|
3342
3362
|
var j;
|
|
3343
|
-
const r = (e.maxAttachmentSizeMB ?? 10) * 1024 * 1024, n = e.maxAttachments ?? 3, a = (j = e.allowedAttachmentTypes) != null && j.length ? e.allowedAttachmentTypes :
|
|
3363
|
+
const r = (e.maxAttachmentSizeMB ?? 10) * 1024 * 1024, n = e.maxAttachments ?? 3, a = (j = e.allowedAttachmentTypes) != null && j.length ? e.allowedAttachmentTypes : xn, c = !!(e.enableAttachments && e.publishableKey), [u, d] = J([]), [h, g] = J(null), b = ae([]);
|
|
3344
3364
|
De(() => {
|
|
3345
3365
|
b.current = u;
|
|
3346
3366
|
}, [u]);
|
|
@@ -3353,7 +3373,7 @@ function nr(e, t) {
|
|
|
3353
3373
|
g(`At most ${n} attachments per message.`);
|
|
3354
3374
|
break;
|
|
3355
3375
|
}
|
|
3356
|
-
const i =
|
|
3376
|
+
const i = yn(o, r, a);
|
|
3357
3377
|
if (i) {
|
|
3358
3378
|
g(`${o.name}: ${i}`);
|
|
3359
3379
|
continue;
|
|
@@ -3403,7 +3423,7 @@ function nr(e, t) {
|
|
|
3403
3423
|
allowed: a
|
|
3404
3424
|
};
|
|
3405
3425
|
}
|
|
3406
|
-
function
|
|
3426
|
+
function Ls({ size: e = 16 }) {
|
|
3407
3427
|
return /* @__PURE__ */ l.jsx(
|
|
3408
3428
|
"svg",
|
|
3409
3429
|
{
|
|
@@ -3420,7 +3440,7 @@ function Bs({ size: e = 16 }) {
|
|
|
3420
3440
|
}
|
|
3421
3441
|
);
|
|
3422
3442
|
}
|
|
3423
|
-
function
|
|
3443
|
+
function Fs({ size: e = 16 }) {
|
|
3424
3444
|
return /* @__PURE__ */ l.jsxs(
|
|
3425
3445
|
"svg",
|
|
3426
3446
|
{
|
|
@@ -3444,7 +3464,7 @@ function Ps({ size: e = 16 }) {
|
|
|
3444
3464
|
* Copyright (c) StackBlitz. All rights reserved.
|
|
3445
3465
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
3446
3466
|
*--------------------------------------------------------------------------------------------*/
|
|
3447
|
-
const
|
|
3467
|
+
const Ks = {
|
|
3448
3468
|
/**
|
|
3449
3469
|
* A value from 0 to 1, on how much to damp the animation.
|
|
3450
3470
|
* 0 means no damping, 1 means full damping.
|
|
@@ -3465,21 +3485,21 @@ const Ls = {
|
|
|
3465
3485
|
* @default 1.25
|
|
3466
3486
|
*/
|
|
3467
3487
|
mass: 1.25
|
|
3468
|
-
},
|
|
3488
|
+
}, Ws = 70, Us = 1e3 / 60, Hs = 350;
|
|
3469
3489
|
let gt = !1;
|
|
3470
|
-
var
|
|
3471
|
-
(
|
|
3490
|
+
var Pr;
|
|
3491
|
+
(Pr = globalThis.document) == null || Pr.addEventListener("mousedown", () => {
|
|
3472
3492
|
gt = !0;
|
|
3473
3493
|
});
|
|
3474
|
-
var
|
|
3475
|
-
(
|
|
3494
|
+
var Lr;
|
|
3495
|
+
(Lr = globalThis.document) == null || Lr.addEventListener("mouseup", () => {
|
|
3476
3496
|
gt = !1;
|
|
3477
3497
|
});
|
|
3478
|
-
var
|
|
3479
|
-
(
|
|
3498
|
+
var Fr;
|
|
3499
|
+
(Fr = globalThis.document) == null || Fr.addEventListener("click", () => {
|
|
3480
3500
|
gt = !1;
|
|
3481
3501
|
});
|
|
3482
|
-
const
|
|
3502
|
+
const qs = (e = {}) => {
|
|
3483
3503
|
const [t, r] = J(!1), [n, a] = J(e.initial !== !1), [c, u] = J(!1), d = ae(null);
|
|
3484
3504
|
d.current = e;
|
|
3485
3505
|
const h = Z(() => {
|
|
@@ -3534,11 +3554,11 @@ const Us = (e = {}) => {
|
|
|
3534
3554
|
return this.calculatedTargetScrollTop - this.scrollTop;
|
|
3535
3555
|
},
|
|
3536
3556
|
get isNearBottom() {
|
|
3537
|
-
return this.scrollDifference <=
|
|
3557
|
+
return this.scrollDifference <= Ws;
|
|
3538
3558
|
}
|
|
3539
3559
|
};
|
|
3540
3560
|
}, []), w = Z((i = {}) => {
|
|
3541
|
-
var
|
|
3561
|
+
var _;
|
|
3542
3562
|
typeof i == "string" && (i = { animation: i }), i.preserveScrollPosition || g(!0);
|
|
3543
3563
|
const s = Date.now() + (Number(i.wait) || 0), f = Et(d.current, i.animation), { ignoreEscapes: m = !1 } = i;
|
|
3544
3564
|
let y, x = p.calculatedTargetScrollTop;
|
|
@@ -3550,8 +3570,8 @@ const Us = (e = {}) => {
|
|
|
3550
3570
|
var I;
|
|
3551
3571
|
if (!p.isAtBottom)
|
|
3552
3572
|
return p.animation = void 0, !1;
|
|
3553
|
-
const { scrollTop: E } = p,
|
|
3554
|
-
if (p.animation || (p.animation = { behavior: f, promise: C, ignoreEscapes: m }), p.animation.behavior === f && (p.lastTick =
|
|
3573
|
+
const { scrollTop: E } = p, W = performance.now(), P = (W - (p.lastTick ?? W)) / Us;
|
|
3574
|
+
if (p.animation || (p.animation = { behavior: f, promise: C, ignoreEscapes: m }), p.animation.behavior === f && (p.lastTick = W), h() || s > Date.now())
|
|
3555
3575
|
return A();
|
|
3556
3576
|
if (E < Math.min(x, p.calculatedTargetScrollTop)) {
|
|
3557
3577
|
if (((I = p.animation) == null ? void 0 : I.behavior) === f) {
|
|
@@ -3571,7 +3591,7 @@ const Us = (e = {}) => {
|
|
|
3571
3591
|
p.animation || (p.lastTick = void 0, p.velocity = 0);
|
|
3572
3592
|
}), E));
|
|
3573
3593
|
};
|
|
3574
|
-
return i.wait !== !0 && (p.animation = void 0), ((
|
|
3594
|
+
return i.wait !== !0 && (p.animation = void 0), ((_ = p.animation) == null ? void 0 : _.behavior) === f ? p.animation.promise : A();
|
|
3575
3595
|
}, [g, h, p]), k = Z(() => {
|
|
3576
3596
|
b(!0), g(!1);
|
|
3577
3597
|
}, [b, g]), $ = Z(({ target: i }) => {
|
|
@@ -3603,10 +3623,10 @@ const Us = (e = {}) => {
|
|
|
3603
3623
|
f = f.parentElement;
|
|
3604
3624
|
}
|
|
3605
3625
|
f === S.current && s < 0 && S.current.scrollHeight > S.current.clientHeight && !((m = p.animation) != null && m.ignoreEscapes) && (b(!0), g(!1));
|
|
3606
|
-
}, [b, g, p]), S =
|
|
3626
|
+
}, [b, g, p]), S = Nr((i) => {
|
|
3607
3627
|
var s, f;
|
|
3608
3628
|
(s = S.current) == null || s.removeEventListener("scroll", $), (f = S.current) == null || f.removeEventListener("wheel", j), i == null || i.addEventListener("scroll", $, { passive: !0 }), i == null || i.addEventListener("wheel", j, { passive: !0 });
|
|
3609
|
-
}, []), o =
|
|
3629
|
+
}, []), o = Nr((i) => {
|
|
3610
3630
|
var f, m;
|
|
3611
3631
|
if ((f = p.resizeObserver) == null || f.disconnect(), !i)
|
|
3612
3632
|
return;
|
|
@@ -3614,12 +3634,12 @@ const Us = (e = {}) => {
|
|
|
3614
3634
|
p.resizeObserver = new ResizeObserver(([y]) => {
|
|
3615
3635
|
const { height: x } = y.contentRect, A = x - (s ?? x);
|
|
3616
3636
|
if (p.resizeDifference = A, p.scrollTop > p.targetScrollTop && (p.scrollTop = p.targetScrollTop), u(p.isNearBottom), A >= 0) {
|
|
3617
|
-
const
|
|
3637
|
+
const _ = Et(d.current, s ? d.current.resize : d.current.initial);
|
|
3618
3638
|
w({
|
|
3619
|
-
animation:
|
|
3639
|
+
animation: _,
|
|
3620
3640
|
wait: !0,
|
|
3621
3641
|
preserveScrollPosition: !0,
|
|
3622
|
-
duration:
|
|
3642
|
+
duration: _ === "instant" ? void 0 : Hs
|
|
3623
3643
|
});
|
|
3624
3644
|
} else
|
|
3625
3645
|
p.isNearBottom && (b(!1), g(!0));
|
|
@@ -3641,13 +3661,13 @@ const Us = (e = {}) => {
|
|
|
3641
3661
|
state: p
|
|
3642
3662
|
};
|
|
3643
3663
|
};
|
|
3644
|
-
function
|
|
3664
|
+
function Nr(e, t) {
|
|
3645
3665
|
const r = Z((n) => (r.current = n, e(n)), t);
|
|
3646
3666
|
return r;
|
|
3647
3667
|
}
|
|
3648
3668
|
const Tt = /* @__PURE__ */ new Map();
|
|
3649
3669
|
function Et(...e) {
|
|
3650
|
-
const t = { ...
|
|
3670
|
+
const t = { ...Ks };
|
|
3651
3671
|
let r = !1;
|
|
3652
3672
|
for (const a of e) {
|
|
3653
3673
|
if (a === "instant") {
|
|
@@ -3659,12 +3679,12 @@ function Et(...e) {
|
|
|
3659
3679
|
const n = JSON.stringify(t);
|
|
3660
3680
|
return Tt.has(n) || Tt.set(n, Object.freeze(t)), r ? "instant" : Tt.get(n);
|
|
3661
3681
|
}
|
|
3662
|
-
const
|
|
3682
|
+
const Tn = zn(null), Gs = typeof window < "u" ? Rn : De;
|
|
3663
3683
|
function nt({ instance: e, children: t, resize: r, initial: n, mass: a, damping: c, stiffness: u, targetScrollTop: d, contextRef: h, ...g }) {
|
|
3664
3684
|
const b = ae(null), p = Bt.useCallback((m, y) => {
|
|
3665
3685
|
const x = (f == null ? void 0 : f.targetScrollTop) ?? d;
|
|
3666
3686
|
return (x == null ? void 0 : x(m, y)) ?? m;
|
|
3667
|
-
}, [d]), w =
|
|
3687
|
+
}, [d]), w = qs({
|
|
3668
3688
|
mass: a,
|
|
3669
3689
|
damping: c,
|
|
3670
3690
|
stiffness: u,
|
|
@@ -3694,13 +3714,13 @@ function nt({ instance: e, children: t, resize: r, initial: n, mass: a, damping:
|
|
|
3694
3714
|
i,
|
|
3695
3715
|
s
|
|
3696
3716
|
]);
|
|
3697
|
-
return Mn(h, () => f, [f]),
|
|
3717
|
+
return Mn(h, () => f, [f]), Gs(() => {
|
|
3698
3718
|
k.current && getComputedStyle(k.current).overflow === "visible" && (k.current.style.overflow = "auto");
|
|
3699
|
-
}, []), l.jsx(
|
|
3719
|
+
}, []), l.jsx(Tn.Provider, { value: f, children: l.jsx("div", { ...g, children: typeof t == "function" ? t(f) : t }) });
|
|
3700
3720
|
}
|
|
3701
3721
|
(function(e) {
|
|
3702
3722
|
function t({ children: r, ...n }) {
|
|
3703
|
-
const a =
|
|
3723
|
+
const a = Ys();
|
|
3704
3724
|
return l.jsx("div", { ref: a.scrollRef, style: {
|
|
3705
3725
|
height: "100%",
|
|
3706
3726
|
width: "100%"
|
|
@@ -3708,13 +3728,13 @@ function nt({ instance: e, children: t, resize: r, initial: n, mass: a, damping:
|
|
|
3708
3728
|
}
|
|
3709
3729
|
e.Content = t;
|
|
3710
3730
|
})(nt || (nt = {}));
|
|
3711
|
-
function
|
|
3712
|
-
const e =
|
|
3731
|
+
function Ys() {
|
|
3732
|
+
const e = Wr(Tn);
|
|
3713
3733
|
if (!e)
|
|
3714
3734
|
throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");
|
|
3715
3735
|
return e;
|
|
3716
3736
|
}
|
|
3717
|
-
const
|
|
3737
|
+
const Qs = T(nt)`
|
|
3718
3738
|
position: relative;
|
|
3719
3739
|
flex: 1;
|
|
3720
3740
|
overflow-y: auto;
|
|
@@ -3764,7 +3784,7 @@ const Gs = T(nt)`
|
|
|
3764
3784
|
background-color: rgba(100, 116, 139, 0.75);
|
|
3765
3785
|
}
|
|
3766
3786
|
}
|
|
3767
|
-
`,
|
|
3787
|
+
`, Vs = T(nt.Content)`
|
|
3768
3788
|
padding: 16px;
|
|
3769
3789
|
`;
|
|
3770
3790
|
T.button`
|
|
@@ -3817,7 +3837,7 @@ function or({
|
|
|
3817
3837
|
onDrop: c
|
|
3818
3838
|
}) {
|
|
3819
3839
|
return /* @__PURE__ */ l.jsx(
|
|
3820
|
-
|
|
3840
|
+
Qs,
|
|
3821
3841
|
{
|
|
3822
3842
|
className: e,
|
|
3823
3843
|
style: r,
|
|
@@ -3832,10 +3852,10 @@ function or({
|
|
|
3832
3852
|
);
|
|
3833
3853
|
}
|
|
3834
3854
|
function ar({ className: e, children: t }) {
|
|
3835
|
-
return /* @__PURE__ */ l.jsx(
|
|
3855
|
+
return /* @__PURE__ */ l.jsx(Vs, { className: e, children: t });
|
|
3836
3856
|
}
|
|
3837
|
-
function
|
|
3838
|
-
const { messages: r, sendMessage: n, uploadAttachment: a, isLoading: c, error: u, hasSessionStarted: d } = t, [h, g] =
|
|
3857
|
+
function Zs({ config: e, chat: t }) {
|
|
3858
|
+
const { messages: r, sendMessage: n, uploadAttachment: a, isLoading: c, error: u, hasSessionStarted: d } = t, [h, g] = K.useState(""), [b, p] = K.useState(!1), w = K.useRef(null), {
|
|
3839
3859
|
enabled: k,
|
|
3840
3860
|
staged: $,
|
|
3841
3861
|
attachmentError: j,
|
|
@@ -3848,26 +3868,26 @@ function Qs({ config: e, chat: t }) {
|
|
|
3848
3868
|
maxBytes: y,
|
|
3849
3869
|
allowed: x
|
|
3850
3870
|
} = nr(e, a), A = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : b ? "dark" : "light";
|
|
3851
|
-
|
|
3871
|
+
K.useEffect(() => {
|
|
3852
3872
|
if (e.theme === "auto" || !e.theme) {
|
|
3853
3873
|
const I = () => {
|
|
3854
3874
|
p(window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
3855
3875
|
};
|
|
3856
3876
|
I();
|
|
3857
|
-
const
|
|
3858
|
-
return
|
|
3877
|
+
const O = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3878
|
+
return O.addEventListener("change", I), () => O.removeEventListener("change", I);
|
|
3859
3879
|
} else
|
|
3860
3880
|
p(e.theme === "dark");
|
|
3861
3881
|
}, [e.theme]);
|
|
3862
|
-
const
|
|
3882
|
+
const _ = async () => {
|
|
3863
3883
|
const I = h.trim();
|
|
3864
3884
|
!I && $.length === 0 || c || (await n(I, void 0, $.length ? $ : void 0), g(""), f(), setTimeout(() => {
|
|
3865
|
-
var
|
|
3866
|
-
(
|
|
3885
|
+
var O;
|
|
3886
|
+
(O = w.current) == null || O.focus();
|
|
3867
3887
|
}, 100));
|
|
3868
3888
|
}, C = (I) => {
|
|
3869
|
-
I.key === "Enter" && !I.shiftKey && (I.preventDefault(),
|
|
3870
|
-
}, E =
|
|
3889
|
+
I.key === "Enter" && !I.shiftKey && (I.preventDefault(), _());
|
|
3890
|
+
}, E = K.useMemo(() => e.height === "100%" || e.height === "100vh" ? {
|
|
3871
3891
|
height: "100%",
|
|
3872
3892
|
minHeight: 0,
|
|
3873
3893
|
display: "flex",
|
|
@@ -3878,16 +3898,16 @@ function Qs({ config: e, chat: t }) {
|
|
|
3878
3898
|
display: "flex",
|
|
3879
3899
|
flexDirection: "column",
|
|
3880
3900
|
borderRadius: "8px"
|
|
3881
|
-
}, [e.height]),
|
|
3901
|
+
}, [e.height]), W = (I) => {
|
|
3882
3902
|
k && (I.preventDefault(), I.dataTransfer.dropEffect = "copy");
|
|
3883
3903
|
}, P = async (I) => {
|
|
3884
3904
|
if (!k) return;
|
|
3885
3905
|
I.preventDefault();
|
|
3886
|
-
const
|
|
3887
|
-
|
|
3906
|
+
const O = await Ht(I.dataTransfer);
|
|
3907
|
+
O.length && await o(O);
|
|
3888
3908
|
};
|
|
3889
3909
|
return /* @__PURE__ */ l.jsx(
|
|
3890
|
-
|
|
3910
|
+
An,
|
|
3891
3911
|
{
|
|
3892
3912
|
"data-theme": A(),
|
|
3893
3913
|
style: E,
|
|
@@ -3902,7 +3922,7 @@ function Qs({ config: e, chat: t }) {
|
|
|
3902
3922
|
isLoading: c
|
|
3903
3923
|
}
|
|
3904
3924
|
) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
3905
|
-
/* @__PURE__ */ l.jsx(or, { style: { flex: 1 }, onDragOver:
|
|
3925
|
+
/* @__PURE__ */ l.jsx(or, { style: { flex: 1 }, onDragOver: W, onDrop: P, children: /* @__PURE__ */ l.jsxs(ar, { children: [
|
|
3906
3926
|
r.map((I) => /* @__PURE__ */ l.jsxs(
|
|
3907
3927
|
"div",
|
|
3908
3928
|
{
|
|
@@ -3984,7 +4004,7 @@ function Qs({ config: e, chat: t }) {
|
|
|
3984
4004
|
Xt,
|
|
3985
4005
|
{
|
|
3986
4006
|
type: "button",
|
|
3987
|
-
onClick:
|
|
4007
|
+
onClick: _,
|
|
3988
4008
|
disabled: c || !h.trim() && $.length === 0,
|
|
3989
4009
|
"aria-label": "Send message",
|
|
3990
4010
|
children: /* @__PURE__ */ l.jsx(mt, { size: 13 })
|
|
@@ -3997,7 +4017,7 @@ function Qs({ config: e, chat: t }) {
|
|
|
3997
4017
|
}
|
|
3998
4018
|
);
|
|
3999
4019
|
}
|
|
4000
|
-
const
|
|
4020
|
+
const Js = T.div`
|
|
4001
4021
|
display: flex;
|
|
4002
4022
|
align-items: center;
|
|
4003
4023
|
justify-content: space-between;
|
|
@@ -4023,15 +4043,15 @@ const Vs = T.div`
|
|
|
4023
4043
|
background: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? e.$primaryColor : "#ffffff"};
|
|
4024
4044
|
color: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? "white" : "#111827"};
|
|
4025
4045
|
}
|
|
4026
|
-
`,
|
|
4046
|
+
`, Xs = T.div`
|
|
4027
4047
|
display: flex;
|
|
4028
4048
|
align-items: center;
|
|
4029
4049
|
gap: 12px;
|
|
4030
|
-
`,
|
|
4050
|
+
`, ei = T.div`
|
|
4031
4051
|
display: flex;
|
|
4032
4052
|
align-items: center;
|
|
4033
4053
|
gap: 8px;
|
|
4034
|
-
`,
|
|
4054
|
+
`, ti = T.div`
|
|
4035
4055
|
width: 8px;
|
|
4036
4056
|
height: 8px;
|
|
4037
4057
|
background: #10b981;
|
|
@@ -4046,14 +4066,14 @@ const Vs = T.div`
|
|
|
4046
4066
|
opacity: 0.5;
|
|
4047
4067
|
}
|
|
4048
4068
|
}
|
|
4049
|
-
`,
|
|
4069
|
+
`, ri = T.span`
|
|
4050
4070
|
font-weight: 500;
|
|
4051
4071
|
font-size: 14px;
|
|
4052
|
-
`,
|
|
4072
|
+
`, ni = T.div`
|
|
4053
4073
|
display: flex;
|
|
4054
4074
|
align-items: center;
|
|
4055
4075
|
gap: 4px;
|
|
4056
|
-
`,
|
|
4076
|
+
`, oi = T.button`
|
|
4057
4077
|
padding: 4px;
|
|
4058
4078
|
background: transparent;
|
|
4059
4079
|
border: none;
|
|
@@ -4074,7 +4094,7 @@ const Vs = T.div`
|
|
|
4074
4094
|
height: 16px;
|
|
4075
4095
|
}
|
|
4076
4096
|
`;
|
|
4077
|
-
function
|
|
4097
|
+
function ai({
|
|
4078
4098
|
chatName: e = "Chat Assistant",
|
|
4079
4099
|
showCloseButton: t = !0,
|
|
4080
4100
|
onClose: r,
|
|
@@ -4084,13 +4104,13 @@ function ni({
|
|
|
4084
4104
|
showWelcomeScreen: u = !1
|
|
4085
4105
|
}) {
|
|
4086
4106
|
return /* @__PURE__ */ l.jsxs(
|
|
4087
|
-
|
|
4107
|
+
Js,
|
|
4088
4108
|
{
|
|
4089
4109
|
className: a,
|
|
4090
4110
|
$primaryColor: c,
|
|
4091
4111
|
$showWelcomeScreen: u,
|
|
4092
4112
|
children: [
|
|
4093
|
-
/* @__PURE__ */ l.jsxs(
|
|
4113
|
+
/* @__PURE__ */ l.jsxs(Xs, { children: [
|
|
4094
4114
|
n && /* @__PURE__ */ l.jsx(
|
|
4095
4115
|
xe,
|
|
4096
4116
|
{
|
|
@@ -4099,25 +4119,25 @@ function ni({
|
|
|
4099
4119
|
$size: "32px"
|
|
4100
4120
|
}
|
|
4101
4121
|
),
|
|
4102
|
-
/* @__PURE__ */ l.jsxs(
|
|
4103
|
-
/* @__PURE__ */ l.jsx(
|
|
4104
|
-
/* @__PURE__ */ l.jsx(
|
|
4122
|
+
/* @__PURE__ */ l.jsxs(ei, { children: [
|
|
4123
|
+
/* @__PURE__ */ l.jsx(ti, {}),
|
|
4124
|
+
/* @__PURE__ */ l.jsx(ri, { children: e })
|
|
4105
4125
|
] })
|
|
4106
4126
|
] }),
|
|
4107
|
-
/* @__PURE__ */ l.jsx(
|
|
4108
|
-
|
|
4127
|
+
/* @__PURE__ */ l.jsx(ni, { children: t && /* @__PURE__ */ l.jsx(
|
|
4128
|
+
oi,
|
|
4109
4129
|
{
|
|
4110
4130
|
onClick: r,
|
|
4111
4131
|
"aria-label": "Close",
|
|
4112
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4132
|
+
children: /* @__PURE__ */ l.jsx(Fs, { size: 16 })
|
|
4113
4133
|
}
|
|
4114
4134
|
) })
|
|
4115
4135
|
]
|
|
4116
4136
|
}
|
|
4117
4137
|
);
|
|
4118
4138
|
}
|
|
4119
|
-
function
|
|
4120
|
-
const { messages: r, sendMessage: n, uploadAttachment: a, isLoading: c, error: u, isOpen: d, setIsOpen: h, hasSessionStarted: g } = t, [b, p] =
|
|
4139
|
+
function Br({ config: e, chat: t }) {
|
|
4140
|
+
const { messages: r, sendMessage: n, uploadAttachment: a, isLoading: c, error: u, isOpen: d, setIsOpen: h, hasSessionStarted: g } = t, [b, p] = K.useState(""), [w, k] = K.useState(e.height || 600), [$, j] = K.useState(!1), S = K.useRef(null), {
|
|
4121
4141
|
enabled: o,
|
|
4122
4142
|
staged: i,
|
|
4123
4143
|
attachmentError: s,
|
|
@@ -4126,65 +4146,65 @@ function Nr({ config: e, chat: t }) {
|
|
|
4126
4146
|
appendStaged: y,
|
|
4127
4147
|
removeStaged: x,
|
|
4128
4148
|
clearStaged: A,
|
|
4129
|
-
maxFiles:
|
|
4149
|
+
maxFiles: _,
|
|
4130
4150
|
maxBytes: C,
|
|
4131
4151
|
allowed: E
|
|
4132
|
-
} = nr(e, a),
|
|
4133
|
-
|
|
4152
|
+
} = nr(e, a), W = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : $ ? "dark" : "light";
|
|
4153
|
+
K.useEffect(() => {
|
|
4134
4154
|
if (e.theme === "auto" || !e.theme) {
|
|
4135
4155
|
const v = () => {
|
|
4136
4156
|
j(window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
4137
4157
|
};
|
|
4138
4158
|
v();
|
|
4139
|
-
const
|
|
4140
|
-
return
|
|
4159
|
+
const N = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4160
|
+
return N.addEventListener("change", v), () => N.removeEventListener("change", v);
|
|
4141
4161
|
} else
|
|
4142
4162
|
j(e.theme === "dark");
|
|
4143
4163
|
}, [e.theme]);
|
|
4144
4164
|
const P = async () => {
|
|
4145
4165
|
const v = b.trim();
|
|
4146
4166
|
!v && i.length === 0 || c || (await n(v, void 0, i.length ? i : void 0), p(""), A(), setTimeout(() => {
|
|
4147
|
-
var
|
|
4148
|
-
(
|
|
4167
|
+
var N;
|
|
4168
|
+
(N = S.current) == null || N.focus();
|
|
4149
4169
|
}, 100));
|
|
4150
4170
|
}, I = (v) => {
|
|
4151
4171
|
v.key === "Enter" && !v.shiftKey && (v.preventDefault(), P());
|
|
4152
|
-
},
|
|
4172
|
+
}, O = (v) => {
|
|
4153
4173
|
o && (v.preventDefault(), v.dataTransfer.dropEffect = "copy");
|
|
4154
4174
|
}, H = async (v) => {
|
|
4155
4175
|
if (!o) return;
|
|
4156
4176
|
v.preventDefault();
|
|
4157
|
-
const
|
|
4158
|
-
|
|
4177
|
+
const N = await Ht(v.dataTransfer);
|
|
4178
|
+
N.length && await m(N);
|
|
4159
4179
|
};
|
|
4160
4180
|
return d ? /* @__PURE__ */ l.jsxs(
|
|
4161
|
-
|
|
4181
|
+
Ms,
|
|
4162
4182
|
{
|
|
4163
4183
|
$position: e.position || "bottom-right",
|
|
4164
|
-
"data-theme":
|
|
4184
|
+
"data-theme": W(),
|
|
4165
4185
|
style: {
|
|
4166
4186
|
height: w,
|
|
4167
4187
|
...e.chatWindowStyle
|
|
4168
4188
|
},
|
|
4169
4189
|
children: [
|
|
4170
4190
|
e.resizable !== !1 && /* @__PURE__ */ l.jsx(
|
|
4171
|
-
|
|
4191
|
+
Rs,
|
|
4172
4192
|
{
|
|
4173
4193
|
$position: "top",
|
|
4174
4194
|
onMouseDown: (v) => {
|
|
4175
4195
|
v.preventDefault();
|
|
4176
|
-
const
|
|
4177
|
-
const
|
|
4196
|
+
const N = v.clientY, R = typeof w == "number" ? w : 600, L = (q) => {
|
|
4197
|
+
const D = q.clientY - N, U = R - D;
|
|
4178
4198
|
k(Math.max(200, Math.min(600, U)));
|
|
4179
|
-
},
|
|
4180
|
-
document.removeEventListener("mousemove",
|
|
4199
|
+
}, z = () => {
|
|
4200
|
+
document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", z);
|
|
4181
4201
|
};
|
|
4182
|
-
document.addEventListener("mousemove",
|
|
4202
|
+
document.addEventListener("mousemove", L), document.addEventListener("mouseup", z);
|
|
4183
4203
|
}
|
|
4184
4204
|
}
|
|
4185
4205
|
),
|
|
4186
4206
|
e.showHeader !== !1 && /* @__PURE__ */ l.jsx(
|
|
4187
|
-
|
|
4207
|
+
ai,
|
|
4188
4208
|
{
|
|
4189
4209
|
agentImage: e.agentImage,
|
|
4190
4210
|
chatName: e.chatName,
|
|
@@ -4204,7 +4224,7 @@ function Nr({ config: e, chat: t }) {
|
|
|
4204
4224
|
isLoading: c
|
|
4205
4225
|
}
|
|
4206
4226
|
) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4207
|
-
/* @__PURE__ */ l.jsx(or, { onDragOver:
|
|
4227
|
+
/* @__PURE__ */ l.jsx(or, { onDragOver: O, onDrop: H, children: /* @__PURE__ */ l.jsxs(ar, { children: [
|
|
4208
4228
|
r.map((v) => /* @__PURE__ */ l.jsxs(
|
|
4209
4229
|
"div",
|
|
4210
4230
|
{
|
|
@@ -4274,7 +4294,7 @@ function Nr({ config: e, chat: t }) {
|
|
|
4274
4294
|
integrated: !0,
|
|
4275
4295
|
disabled: c,
|
|
4276
4296
|
maxFileBytes: C,
|
|
4277
|
-
maxFiles:
|
|
4297
|
+
maxFiles: _,
|
|
4278
4298
|
allowedMime: E,
|
|
4279
4299
|
currentCount: i.length,
|
|
4280
4300
|
uploadAttachment: a,
|
|
@@ -4299,7 +4319,7 @@ function Nr({ config: e, chat: t }) {
|
|
|
4299
4319
|
]
|
|
4300
4320
|
}
|
|
4301
4321
|
) : /* @__PURE__ */ l.jsxs(
|
|
4302
|
-
|
|
4322
|
+
_s,
|
|
4303
4323
|
{
|
|
4304
4324
|
onClick: () => h(!0),
|
|
4305
4325
|
style: e.buttonStyle,
|
|
@@ -4307,25 +4327,25 @@ function Nr({ config: e, chat: t }) {
|
|
|
4307
4327
|
$primaryColor: e.primaryColor,
|
|
4308
4328
|
"aria-label": "Open chat",
|
|
4309
4329
|
children: [
|
|
4310
|
-
/* @__PURE__ */ l.jsx("div", { className: "icon-container", children: /* @__PURE__ */ l.jsx(
|
|
4330
|
+
/* @__PURE__ */ l.jsx("div", { className: "icon-container", children: /* @__PURE__ */ l.jsx(Ls, { size: 16 }) }),
|
|
4311
4331
|
/* @__PURE__ */ l.jsx("span", { children: e.buttonText || e.chatName || "AI Chat" })
|
|
4312
4332
|
]
|
|
4313
4333
|
}
|
|
4314
4334
|
);
|
|
4315
4335
|
}
|
|
4316
|
-
function
|
|
4317
|
-
const t =
|
|
4336
|
+
function pi(e) {
|
|
4337
|
+
const t = Gn(e), r = qn(t);
|
|
4318
4338
|
switch (t.mode) {
|
|
4319
4339
|
case "floating":
|
|
4320
|
-
return /* @__PURE__ */ l.jsx(
|
|
4340
|
+
return /* @__PURE__ */ l.jsx(Br, { config: t, chat: r });
|
|
4321
4341
|
case "embedded":
|
|
4322
|
-
return /* @__PURE__ */ l.jsx(
|
|
4342
|
+
return /* @__PURE__ */ l.jsx(Zs, { config: t, chat: r });
|
|
4323
4343
|
default:
|
|
4324
|
-
return /* @__PURE__ */ l.jsx(
|
|
4344
|
+
return /* @__PURE__ */ l.jsx(Br, { config: t, chat: r });
|
|
4325
4345
|
}
|
|
4326
4346
|
}
|
|
4327
|
-
function
|
|
4328
|
-
const { messages: r, sendMessage: n, uploadAttachment: a, isLoading: c, error: u, hasSessionStarted: d } = t, [h, g] =
|
|
4347
|
+
function fi({ config: e, chat: t }) {
|
|
4348
|
+
const { messages: r, sendMessage: n, uploadAttachment: a, isLoading: c, error: u, hasSessionStarted: d } = t, [h, g] = K.useState(""), b = K.useRef(null), {
|
|
4329
4349
|
enabled: p,
|
|
4330
4350
|
staged: w,
|
|
4331
4351
|
attachmentError: k,
|
|
@@ -4347,14 +4367,14 @@ function ui({ config: e, chat: t }) {
|
|
|
4347
4367
|
C.key === "Enter" && !C.shiftKey && (C.preventDefault(), y());
|
|
4348
4368
|
}, A = (C) => {
|
|
4349
4369
|
p && (C.preventDefault(), C.dataTransfer.dropEffect = "copy");
|
|
4350
|
-
},
|
|
4370
|
+
}, _ = async (C) => {
|
|
4351
4371
|
if (!p) return;
|
|
4352
4372
|
C.preventDefault();
|
|
4353
4373
|
const E = await Ht(C.dataTransfer);
|
|
4354
4374
|
E.length && await j(E);
|
|
4355
4375
|
};
|
|
4356
4376
|
return /* @__PURE__ */ l.jsx(
|
|
4357
|
-
|
|
4377
|
+
An,
|
|
4358
4378
|
{
|
|
4359
4379
|
style: {
|
|
4360
4380
|
height: e.height,
|
|
@@ -4375,7 +4395,7 @@ function ui({ config: e, chat: t }) {
|
|
|
4375
4395
|
isLoading: c
|
|
4376
4396
|
}
|
|
4377
4397
|
) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4378
|
-
/* @__PURE__ */ l.jsx(or, { style: { flex: 1 }, onDragOver: A, onDrop:
|
|
4398
|
+
/* @__PURE__ */ l.jsx(or, { style: { flex: 1 }, onDragOver: A, onDrop: _, children: /* @__PURE__ */ l.jsxs(ar, { children: [
|
|
4379
4399
|
r.map((C) => /* @__PURE__ */ l.jsxs(
|
|
4380
4400
|
"div",
|
|
4381
4401
|
{
|
|
@@ -4471,18 +4491,18 @@ function ui({ config: e, chat: t }) {
|
|
|
4471
4491
|
);
|
|
4472
4492
|
}
|
|
4473
4493
|
export {
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4494
|
+
Zs as EmbeddedChat,
|
|
4495
|
+
Br as FloatingChat,
|
|
4496
|
+
fi as InlineChat,
|
|
4477
4497
|
Qt as MarkdownRenderer,
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4498
|
+
Wn as OrdifyApiClient,
|
|
4499
|
+
pi as OrdifyChat,
|
|
4500
|
+
di as debounce,
|
|
4501
|
+
li as formatTime,
|
|
4482
4502
|
Ue as generateId,
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4503
|
+
Un as parseStreamingResponse,
|
|
4504
|
+
ui as throttle,
|
|
4505
|
+
qn as useOrdifyChat,
|
|
4506
|
+
Gn as useOrdifyConfig,
|
|
4487
4507
|
nr as useWidgetAttachmentStaging
|
|
4488
4508
|
};
|