ordify-chat-widget 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AttachmentPicker.d.ts.map +1 -1
- package/dist/components/ChatHeader.d.ts.map +1 -1
- package/dist/components/Conversation.d.ts.map +1 -1
- package/dist/components/InlineChat.d.ts.map +1 -1
- package/dist/components/MarkdownRenderer.d.ts.map +1 -1
- package/dist/components/styled/ChatComponents.d.ts.map +1 -1
- package/dist/index.cjs.js +100 -269
- package/dist/index.esm.js +1147 -1224
- package/dist/ordify-chat-widget.standalone.js +105 -274
- package/dist/ordify-chat-widget.standalone.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var zn = (e, t, r) => t in e ?
|
|
3
|
-
var
|
|
4
|
-
import * as
|
|
5
|
-
import F, { useState as ee, useRef as ae, useEffect as
|
|
6
|
-
var
|
|
1
|
+
var Dn = Object.defineProperty;
|
|
2
|
+
var zn = (e, t, r) => t in e ? Dn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var xt = (e, t, r) => zn(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import * as Lt from "react";
|
|
5
|
+
import F, { useState as ee, useRef as ae, useEffect as Oe, useCallback as Z, useMemo as Ft, forwardRef as Hr, createElement as et, useContext as qr, useImperativeHandle as On, useLayoutEffect as Nn, createContext as Bn } from "react";
|
|
6
|
+
var Gr = { exports: {} }, st = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
@@ -13,42 +13,42 @@ var qr = { exports: {} }, at = {};
|
|
|
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 Ln = F, Fn = Symbol.for("react.element"), Kn = Symbol.for("react.fragment"), Wn = Object.prototype.hasOwnProperty, Un = Ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Hn = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function Qr(e, t, r) {
|
|
18
18
|
var n, o = {}, 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) Wn.call(t, n) && !
|
|
20
|
+
for (n in t) Wn.call(t, n) && !Hn.hasOwnProperty(n) && (o[n] = t[n]);
|
|
21
21
|
if (e && e.defaultProps) for (n in t = e.defaultProps, t) o[n] === void 0 && (o[n] = t[n]);
|
|
22
|
-
return { $$typeof:
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var l =
|
|
29
|
-
function
|
|
22
|
+
return { $$typeof: Fn, type: e, key: c, ref: u, props: o, _owner: Un.current };
|
|
23
|
+
}
|
|
24
|
+
st.Fragment = Kn;
|
|
25
|
+
st.jsx = Qr;
|
|
26
|
+
st.jsxs = Qr;
|
|
27
|
+
Gr.exports = st;
|
|
28
|
+
var l = Gr.exports;
|
|
29
|
+
function qe() {
|
|
30
30
|
return Math.random().toString(36).substr(2, 9);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Ci(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 ji(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 Ii(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 cr(e) {
|
|
52
52
|
let t = e.replace(/\r\n/g, `
|
|
53
53
|
`);
|
|
54
54
|
return t = t.replace(/\n\nUsing [^\n]+\.{3}(?:\s*\n)+/g, `
|
|
@@ -59,11 +59,11 @@ function ir(e) {
|
|
|
59
59
|
|
|
60
60
|
`), t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function qn(e) {
|
|
63
63
|
const t = e.type;
|
|
64
64
|
return t === "adk_tool" || t === "ADK_TOOL";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Gn(e) {
|
|
67
67
|
return {
|
|
68
68
|
id: e.id,
|
|
69
69
|
name: e.name,
|
|
@@ -75,10 +75,10 @@ function qn(e) {
|
|
|
75
75
|
oauth_token: null
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
class
|
|
78
|
+
class Qn {
|
|
79
79
|
constructor(t) {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
xt(this, "config");
|
|
81
|
+
xt(this, "warnedLegacyApiKey", !1);
|
|
82
82
|
if (this.config = t, !this.config.publishableKey && !this.config.apiKey)
|
|
83
83
|
throw new Error("Either publishableKey or apiKey is required.");
|
|
84
84
|
this.config.publishableKey && this.config.apiKey && console.warn("[Ordify] Both publishableKey and apiKey provided. publishableKey will be used.");
|
|
@@ -135,12 +135,12 @@ class Gn {
|
|
|
135
135
|
if (!o.ok) {
|
|
136
136
|
let p = `HTTP ${o.status}`;
|
|
137
137
|
try {
|
|
138
|
-
const
|
|
139
|
-
p = typeof
|
|
138
|
+
const k = await o.json();
|
|
139
|
+
p = typeof k.detail == "string" ? k.detail : p;
|
|
140
140
|
} catch {
|
|
141
141
|
try {
|
|
142
|
-
const
|
|
143
|
-
|
|
142
|
+
const k = await o.text();
|
|
143
|
+
k && (p = k.slice(0, 500));
|
|
144
144
|
} catch {
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -160,7 +160,7 @@ class Gn {
|
|
|
160
160
|
g.href = b, g.download = d, g.rel = "noopener noreferrer", document.body.appendChild(g), g.click(), document.body.removeChild(g), URL.revokeObjectURL(b);
|
|
161
161
|
}
|
|
162
162
|
async sendMessage(t, r, n, o) {
|
|
163
|
-
const c = this.usePublishableKey() ? `/widget/chat/${this.config.agentId}` : `/chat/agents/${this.config.agentId}`, u = `${this.config.apiBaseUrl}${c}`, d = o != null && o.length ? o.map(
|
|
163
|
+
const c = this.usePublishableKey() ? `/widget/chat/${this.config.agentId}` : `/chat/agents/${this.config.agentId}`, u = `${this.config.apiBaseUrl}${c}`, d = o != null && o.length ? o.map(Gn) : void 0, h = {
|
|
164
164
|
message: t,
|
|
165
165
|
sessionId: r,
|
|
166
166
|
context: n,
|
|
@@ -318,18 +318,18 @@ ${n}
|
|
|
318
318
|
}
|
|
319
319
|
return null;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function lr(e) {
|
|
322
322
|
const t = (e.attachments || []).map((r) => r.id).join("|");
|
|
323
323
|
return `${e.role}:${e.content.trim()}:${t}`;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Vn(e) {
|
|
326
326
|
const t = e.attachments;
|
|
327
327
|
if (!t || !Array.isArray(t) || t.length === 0) return;
|
|
328
328
|
const r = [];
|
|
329
329
|
for (const n of t) {
|
|
330
330
|
const o = n.url || "";
|
|
331
331
|
o && r.push({
|
|
332
|
-
id: n.id ||
|
|
332
|
+
id: n.id || qe(),
|
|
333
333
|
name: String(n.name || "attachment"),
|
|
334
334
|
type: n.type === "image" ? "image" : "document",
|
|
335
335
|
url: o,
|
|
@@ -340,9 +340,9 @@ function Qn(e) {
|
|
|
340
340
|
}
|
|
341
341
|
return r.length ? r : void 0;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
const [t, r] = ee([]), [n, o] = ee(!1), [c, u] = ee(null), [d, h] = ee(e.sessionId || null), [b, g] = ee(!1), [p,
|
|
345
|
-
f.current !==
|
|
343
|
+
function Zn(e) {
|
|
344
|
+
const [t, r] = ee([]), [n, o] = ee(!1), [c, u] = ee(null), [d, h] = ee(e.sessionId || null), [b, g] = ee(!1), [p, k] = ee(!1), [w, S] = ee(!1), [j, v] = ee(!1), [a, i] = ee(!1), s = ae(null), f = ae(""), m = ae(!1), x = ae(!1), y = ae(!1), T = `${e.publishableKey ?? ""}|${e.apiKey ?? ""}|${e.apiBaseUrl ?? ""}|${e.agentId}|${e.useThinking === !0 ? "1" : "0"}|img:${e.enableImageGeneration === !0 ? "1" : e.enableImageGeneration === !1 ? "0" : ""}`;
|
|
345
|
+
f.current !== T && (s.current = null, f.current = T), s.current || (s.current = new Qn({
|
|
346
346
|
publishableKey: e.publishableKey,
|
|
347
347
|
apiKey: e.apiKey,
|
|
348
348
|
apiBaseUrl: e.apiBaseUrl || "https://api.ordify.ai",
|
|
@@ -350,54 +350,54 @@ function Vn(e) {
|
|
|
350
350
|
useThinking: e.useThinking === !0,
|
|
351
351
|
enableImageGeneration: e.enableImageGeneration
|
|
352
352
|
}));
|
|
353
|
-
const
|
|
354
|
-
|
|
353
|
+
const E = ae(null), z = ae(/* @__PURE__ */ new Set());
|
|
354
|
+
Oe(() => {
|
|
355
355
|
if (e.sessionId && e.sessionId !== d) {
|
|
356
|
-
const I =
|
|
357
|
-
h(e.sessionId), x.current = !1,
|
|
356
|
+
const I = z.current.has(e.sessionId);
|
|
357
|
+
h(e.sessionId), x.current = !1, E.current = null, S(!1), I || r([]);
|
|
358
358
|
}
|
|
359
|
-
}, [e.sessionId]),
|
|
359
|
+
}, [e.sessionId]), Oe(() => {
|
|
360
360
|
(async () => {
|
|
361
|
-
const
|
|
361
|
+
const D = d || e.sessionId;
|
|
362
362
|
if (y.current || n)
|
|
363
363
|
return;
|
|
364
|
-
if (!
|
|
365
|
-
x.current = !0,
|
|
364
|
+
if (!D) {
|
|
365
|
+
x.current = !0, E.current = null, S(!1);
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
|
-
if (
|
|
368
|
+
if (E.current === D)
|
|
369
369
|
return;
|
|
370
|
-
if (
|
|
371
|
-
x.current = !0,
|
|
370
|
+
if (z.current.has(D) && t.length > 0 && !x.current) {
|
|
371
|
+
x.current = !0, E.current = D, v(!1);
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
|
-
|
|
374
|
+
E.current = D, v(!0);
|
|
375
375
|
try {
|
|
376
|
-
const $ = await s.current.getSessionWithMessages(
|
|
376
|
+
const $ = await s.current.getSessionWithMessages(D);
|
|
377
377
|
if ($.messages && $.messages.length > 0) {
|
|
378
|
-
const P = $.messages.filter((
|
|
379
|
-
const
|
|
378
|
+
const P = $.messages.filter((O) => !qn(O)).map((O) => {
|
|
379
|
+
const L = O.role === "assistant" ? "assistant" : "user", _ = String(O.content || "");
|
|
380
380
|
return {
|
|
381
|
-
id:
|
|
382
|
-
content:
|
|
383
|
-
role:
|
|
384
|
-
timestamp:
|
|
385
|
-
sessionId:
|
|
386
|
-
attachments:
|
|
381
|
+
id: O.id || qe(),
|
|
382
|
+
content: L === "assistant" ? cr(_) : _,
|
|
383
|
+
role: L,
|
|
384
|
+
timestamp: O.timestamp ? new Date(O.timestamp) : /* @__PURE__ */ new Date(),
|
|
385
|
+
sessionId: D,
|
|
386
|
+
attachments: Vn(O)
|
|
387
387
|
};
|
|
388
388
|
});
|
|
389
|
-
r((
|
|
390
|
-
if (
|
|
391
|
-
const
|
|
392
|
-
return
|
|
393
|
-
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
}), P.forEach((
|
|
397
|
-
const
|
|
398
|
-
!
|
|
399
|
-
}), Array.from(
|
|
400
|
-
(
|
|
389
|
+
r((O) => {
|
|
390
|
+
if (O.length > 0) {
|
|
391
|
+
const L = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
392
|
+
return O.forEach((N) => {
|
|
393
|
+
L.set(N.id, N);
|
|
394
|
+
const q = lr(N);
|
|
395
|
+
_.has(q) || _.set(q, N);
|
|
396
|
+
}), P.forEach((N) => {
|
|
397
|
+
const q = lr(N);
|
|
398
|
+
!L.has(N.id) && !_.has(q) ? (L.set(N.id, N), _.set(q, N)) : L.has(N.id) && L.set(N.id, N);
|
|
399
|
+
}), Array.from(L.values()).sort(
|
|
400
|
+
(N, q) => N.timestamp.getTime() - q.timestamp.getTime()
|
|
401
401
|
);
|
|
402
402
|
}
|
|
403
403
|
return P;
|
|
@@ -405,76 +405,76 @@ function Vn(e) {
|
|
|
405
405
|
} else
|
|
406
406
|
S(!1);
|
|
407
407
|
} catch ($) {
|
|
408
|
-
console.warn("Failed to load session history:", $), S(!1), $ instanceof Error && $.message.includes("404") && (h(null),
|
|
408
|
+
console.warn("Failed to load session history:", $), S(!1), $ instanceof Error && $.message.includes("404") && (h(null), E.current = null);
|
|
409
409
|
} finally {
|
|
410
410
|
v(!1), x.current = !0;
|
|
411
411
|
}
|
|
412
412
|
})();
|
|
413
413
|
}, [d, e.sessionId]);
|
|
414
|
-
const
|
|
414
|
+
const R = Z(() => {
|
|
415
415
|
u(null);
|
|
416
416
|
}, []), K = Z(async (I) => {
|
|
417
417
|
if (!s.current)
|
|
418
418
|
throw new Error("API client not initialized");
|
|
419
419
|
return s.current.uploadAttachment(I);
|
|
420
|
-
}, []),
|
|
420
|
+
}, []), C = Z(async (I, D) => {
|
|
421
421
|
if (!s.current)
|
|
422
422
|
throw new Error("API client not initialized");
|
|
423
|
-
await s.current.exportMessagePdf(I,
|
|
424
|
-
}, []),
|
|
425
|
-
async (I,
|
|
426
|
-
const $ = I.trim(), P = !!(
|
|
423
|
+
await s.current.exportMessagePdf(I, D);
|
|
424
|
+
}, []), W = Z(
|
|
425
|
+
async (I, D, H) => {
|
|
426
|
+
const $ = I.trim(), P = !!(H && H.length > 0);
|
|
427
427
|
if (!(!$ && !P || n)) {
|
|
428
428
|
o(!0), u(null);
|
|
429
429
|
try {
|
|
430
|
-
const
|
|
431
|
-
id:
|
|
430
|
+
const O = H != null && H.length ? H.map((J) => ({ ...J })) : void 0, L = {
|
|
431
|
+
id: qe(),
|
|
432
432
|
content: $,
|
|
433
433
|
role: "user",
|
|
434
434
|
timestamp: /* @__PURE__ */ new Date(),
|
|
435
435
|
sessionId: d || void 0,
|
|
436
|
-
attachments:
|
|
436
|
+
attachments: O
|
|
437
437
|
};
|
|
438
|
-
r((J) => [...J,
|
|
439
|
-
let
|
|
440
|
-
|
|
441
|
-
const
|
|
438
|
+
r((J) => [...J, L]), i(!0);
|
|
439
|
+
let _ = d || e.sessionId || null;
|
|
440
|
+
_ ? _ !== d && h(_) : (_ = (await s.current.createSession()).id, z.current.add(_), e.onSessionCreated && e.onSessionCreated(_)), y.current = !0;
|
|
441
|
+
const N = (await s.current.sendMessage(
|
|
442
442
|
$ || "(see attachments)",
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
)).getReader(),
|
|
447
|
-
let
|
|
448
|
-
id:
|
|
443
|
+
_,
|
|
444
|
+
D,
|
|
445
|
+
O
|
|
446
|
+
)).getReader(), q = new TextDecoder();
|
|
447
|
+
let V = {
|
|
448
|
+
id: qe(),
|
|
449
449
|
content: "",
|
|
450
450
|
role: "assistant",
|
|
451
451
|
timestamp: /* @__PURE__ */ new Date(),
|
|
452
|
-
sessionId:
|
|
452
|
+
sessionId: _
|
|
453
453
|
};
|
|
454
|
-
for (r((J) => [...J,
|
|
455
|
-
const { done: J, value: le } = await
|
|
454
|
+
for (r((J) => [...J, V]); ; ) {
|
|
455
|
+
const { done: J, value: le } = await N.read();
|
|
456
456
|
if (J) break;
|
|
457
|
-
const
|
|
457
|
+
const Re = q.decode(le, { stream: !0 }).split(`
|
|
458
458
|
`);
|
|
459
|
-
for (const me of
|
|
459
|
+
for (const me of Re) {
|
|
460
460
|
if (!me.trim()) continue;
|
|
461
461
|
const X = Yn(me);
|
|
462
462
|
if (X) {
|
|
463
463
|
if (X.type === "stream" && X.text)
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
), r((
|
|
467
|
-
(
|
|
468
|
-
) : [...
|
|
464
|
+
V.content = cr(
|
|
465
|
+
V.content + X.text
|
|
466
|
+
), r((yt) => yt.find((Pe) => Pe.id === V.id) ? yt.map(
|
|
467
|
+
(Pe) => Pe.id === V.id ? { ...Pe, content: V.content } : Pe
|
|
468
|
+
) : [...yt, { ...V, content: V.content }]);
|
|
469
469
|
else if (X.type === "done")
|
|
470
470
|
break;
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
|
|
475
|
-
} catch (
|
|
476
|
-
const
|
|
477
|
-
u(
|
|
474
|
+
_ && _ !== d && h(_), e.onMessage && e.onMessage(V);
|
|
475
|
+
} catch (O) {
|
|
476
|
+
const L = O instanceof Error ? O.message : "Failed to send message";
|
|
477
|
+
u(L), e.onError && e.onError(O instanceof Error ? O : new Error(L));
|
|
478
478
|
} finally {
|
|
479
479
|
y.current = !1, o(!1);
|
|
480
480
|
}
|
|
@@ -490,10 +490,10 @@ function Vn(e) {
|
|
|
490
490
|
d
|
|
491
491
|
]
|
|
492
492
|
);
|
|
493
|
-
return
|
|
494
|
-
const
|
|
495
|
-
if ((e.initialMessage || e.initialContext) &&
|
|
496
|
-
|
|
493
|
+
return Oe(() => {
|
|
494
|
+
const D = !(d || e.sessionId) || !w, H = e.quickQuestions && e.quickQuestions.length > 0;
|
|
495
|
+
if ((e.initialMessage || e.initialContext) && D && !p && !n && !j && !m.current && x.current && !H) {
|
|
496
|
+
k(!0), m.current = !0;
|
|
497
497
|
let $, P;
|
|
498
498
|
if (e.initialMessage && e.initialContext)
|
|
499
499
|
$ = e.initialMessage, P = e.initialContext;
|
|
@@ -504,32 +504,32 @@ function Vn(e) {
|
|
|
504
504
|
else
|
|
505
505
|
return;
|
|
506
506
|
setTimeout(() => {
|
|
507
|
-
|
|
507
|
+
W($, P);
|
|
508
508
|
}, 0);
|
|
509
509
|
}
|
|
510
|
-
}, [e.initialMessage, e.initialContext, p, n,
|
|
510
|
+
}, [e.initialMessage, e.initialContext, p, n, j, w, d, e.sessionId, W]), {
|
|
511
511
|
messages: t,
|
|
512
|
-
sendMessage:
|
|
512
|
+
sendMessage: W,
|
|
513
513
|
uploadAttachment: K,
|
|
514
|
-
exportMessagePdf:
|
|
514
|
+
exportMessagePdf: C,
|
|
515
515
|
isLoading: n,
|
|
516
516
|
error: c,
|
|
517
|
-
clearError:
|
|
517
|
+
clearError: R,
|
|
518
518
|
sessionId: d,
|
|
519
519
|
isOpen: b,
|
|
520
520
|
setIsOpen: g,
|
|
521
521
|
hasSessionStarted: a
|
|
522
522
|
};
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function Ke(e) {
|
|
525
525
|
if (typeof process > "u" || !process.env)
|
|
526
526
|
return;
|
|
527
527
|
const t = process.env[e];
|
|
528
528
|
return typeof t == "string" && t.length > 0 ? t : void 0;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
return
|
|
532
|
-
const t = e.agentId ||
|
|
530
|
+
function Jn(e) {
|
|
531
|
+
return Ft(() => {
|
|
532
|
+
const t = e.agentId || Ke("ORDIFY_AGENT_ID"), r = e.publishableKey || Ke("ORDIFY_PUBLISHABLE_KEY"), n = e.apiKey || Ke("ORDIFY_API_KEY"), o = e.apiBaseUrl || Ke("ORDIFY_API_BASE_URL") || "https://r.ordify.ai";
|
|
533
533
|
if (!t)
|
|
534
534
|
throw new Error("Ordify agent ID is required. Provide agentId prop or set ORDIFY_AGENT_ID environment variable.");
|
|
535
535
|
if (!r && !n)
|
|
@@ -576,7 +576,7 @@ function Zn(e) {
|
|
|
576
576
|
};
|
|
577
577
|
}, [e]);
|
|
578
578
|
}
|
|
579
|
-
async function
|
|
579
|
+
async function Xn(e) {
|
|
580
580
|
var r;
|
|
581
581
|
if (typeof navigator < "u" && ((r = navigator.clipboard) != null && r.writeText))
|
|
582
582
|
try {
|
|
@@ -598,13 +598,13 @@ async function Jn(e) {
|
|
|
598
598
|
* This source code is licensed under the ISC license.
|
|
599
599
|
* See the LICENSE file in the root directory of this source tree.
|
|
600
600
|
*/
|
|
601
|
-
const
|
|
601
|
+
const eo = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), to = (e) => e.replace(
|
|
602
602
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
603
603
|
(t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
|
|
604
|
-
),
|
|
605
|
-
const t =
|
|
604
|
+
), dr = (e) => {
|
|
605
|
+
const t = to(e);
|
|
606
606
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
607
|
-
}, Yr = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(),
|
|
607
|
+
}, Yr = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), ro = (e) => {
|
|
608
608
|
for (const t in e)
|
|
609
609
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
610
610
|
return !0;
|
|
@@ -615,7 +615,7 @@ const Xn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), eo = (
|
|
|
615
615
|
* This source code is licensed under the ISC license.
|
|
616
616
|
* See the LICENSE file in the root directory of this source tree.
|
|
617
617
|
*/
|
|
618
|
-
var
|
|
618
|
+
var no = {
|
|
619
619
|
xmlns: "http://www.w3.org/2000/svg",
|
|
620
620
|
width: 24,
|
|
621
621
|
height: 24,
|
|
@@ -632,7 +632,7 @@ var ro = {
|
|
|
632
632
|
* This source code is licensed under the ISC license.
|
|
633
633
|
* See the LICENSE file in the root directory of this source tree.
|
|
634
634
|
*/
|
|
635
|
-
const
|
|
635
|
+
const oo = Hr(
|
|
636
636
|
({
|
|
637
637
|
color: e = "currentColor",
|
|
638
638
|
size: t = 24,
|
|
@@ -642,21 +642,21 @@ const no = Ur(
|
|
|
642
642
|
children: c,
|
|
643
643
|
iconNode: u,
|
|
644
644
|
...d
|
|
645
|
-
}, h) =>
|
|
645
|
+
}, h) => et(
|
|
646
646
|
"svg",
|
|
647
647
|
{
|
|
648
648
|
ref: h,
|
|
649
|
-
...
|
|
649
|
+
...no,
|
|
650
650
|
width: t,
|
|
651
651
|
height: t,
|
|
652
652
|
stroke: e,
|
|
653
653
|
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
654
654
|
className: Yr("lucide", o),
|
|
655
|
-
...!c && !
|
|
655
|
+
...!c && !ro(d) && { "aria-hidden": "true" },
|
|
656
656
|
...d
|
|
657
657
|
},
|
|
658
658
|
[
|
|
659
|
-
...u.map(([b, g]) =>
|
|
659
|
+
...u.map(([b, g]) => et(b, g)),
|
|
660
660
|
...Array.isArray(c) ? c : [c]
|
|
661
661
|
]
|
|
662
662
|
)
|
|
@@ -667,20 +667,20 @@ const no = Ur(
|
|
|
667
667
|
* This source code is licensed under the ISC license.
|
|
668
668
|
* See the LICENSE file in the root directory of this source tree.
|
|
669
669
|
*/
|
|
670
|
-
const
|
|
671
|
-
const r =
|
|
672
|
-
({ className: n, ...o }, c) =>
|
|
670
|
+
const Me = (e, t) => {
|
|
671
|
+
const r = Hr(
|
|
672
|
+
({ className: n, ...o }, c) => et(oo, {
|
|
673
673
|
ref: c,
|
|
674
674
|
iconNode: t,
|
|
675
675
|
className: Yr(
|
|
676
|
-
`lucide-${
|
|
676
|
+
`lucide-${eo(dr(e))}`,
|
|
677
677
|
`lucide-${e}`,
|
|
678
678
|
n
|
|
679
679
|
),
|
|
680
680
|
...o
|
|
681
681
|
})
|
|
682
682
|
);
|
|
683
|
-
return r.displayName =
|
|
683
|
+
return r.displayName = dr(e), r;
|
|
684
684
|
};
|
|
685
685
|
/**
|
|
686
686
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -688,53 +688,53 @@ const Ee = (e, t) => {
|
|
|
688
688
|
* This source code is licensed under the ISC license.
|
|
689
689
|
* See the LICENSE file in the root directory of this source tree.
|
|
690
690
|
*/
|
|
691
|
-
const
|
|
691
|
+
const ao = [
|
|
692
692
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
693
693
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
694
|
-
],
|
|
694
|
+
], so = Me("copy", ao);
|
|
695
695
|
/**
|
|
696
696
|
* @license lucide-react v0.544.0 - ISC
|
|
697
697
|
*
|
|
698
698
|
* This source code is licensed under the ISC license.
|
|
699
699
|
* See the LICENSE file in the root directory of this source tree.
|
|
700
700
|
*/
|
|
701
|
-
const
|
|
701
|
+
const io = [
|
|
702
702
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
703
703
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
704
704
|
["path", { d: "M12 18v-6", key: "17g6i2" }],
|
|
705
705
|
["path", { d: "m9 15 3 3 3-3", key: "1npd3o" }]
|
|
706
|
-
],
|
|
706
|
+
], co = Me("file-down", io);
|
|
707
707
|
/**
|
|
708
708
|
* @license lucide-react v0.544.0 - ISC
|
|
709
709
|
*
|
|
710
710
|
* This source code is licensed under the ISC license.
|
|
711
711
|
* See the LICENSE file in the root directory of this source tree.
|
|
712
712
|
*/
|
|
713
|
-
const
|
|
713
|
+
const lo = [
|
|
714
714
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
715
715
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
716
716
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
717
717
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
718
718
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
719
|
-
],
|
|
719
|
+
], uo = Me("file-text", lo);
|
|
720
720
|
/**
|
|
721
721
|
* @license lucide-react v0.544.0 - ISC
|
|
722
722
|
*
|
|
723
723
|
* This source code is licensed under the ISC license.
|
|
724
724
|
* See the LICENSE file in the root directory of this source tree.
|
|
725
725
|
*/
|
|
726
|
-
const
|
|
726
|
+
const po = [
|
|
727
727
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
728
728
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
729
729
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
730
|
-
],
|
|
730
|
+
], fo = Me("image", po);
|
|
731
731
|
/**
|
|
732
732
|
* @license lucide-react v0.544.0 - ISC
|
|
733
733
|
*
|
|
734
734
|
* This source code is licensed under the ISC license.
|
|
735
735
|
* See the LICENSE file in the root directory of this source tree.
|
|
736
736
|
*/
|
|
737
|
-
const
|
|
737
|
+
const ho = [
|
|
738
738
|
[
|
|
739
739
|
"path",
|
|
740
740
|
{
|
|
@@ -742,17 +742,17 @@ const fo = [
|
|
|
742
742
|
key: "1miecu"
|
|
743
743
|
}
|
|
744
744
|
]
|
|
745
|
-
],
|
|
745
|
+
], mo = Me("paperclip", ho);
|
|
746
746
|
/**
|
|
747
747
|
* @license lucide-react v0.544.0 - ISC
|
|
748
748
|
*
|
|
749
749
|
* This source code is licensed under the ISC license.
|
|
750
750
|
* See the LICENSE file in the root directory of this source tree.
|
|
751
751
|
*/
|
|
752
|
-
const
|
|
752
|
+
const go = [
|
|
753
753
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
754
754
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
755
|
-
],
|
|
755
|
+
], bo = Me("x", go);
|
|
756
756
|
var te = function() {
|
|
757
757
|
return te = Object.assign || function(t) {
|
|
758
758
|
for (var r, n = 1, o = arguments.length; n < o; n++) {
|
|
@@ -762,16 +762,16 @@ var te = function() {
|
|
|
762
762
|
return t;
|
|
763
763
|
}, te.apply(this, arguments);
|
|
764
764
|
};
|
|
765
|
-
function
|
|
765
|
+
function tt(e, t, r) {
|
|
766
766
|
if (r || arguments.length === 2) for (var n = 0, o = t.length, c; n < o; n++)
|
|
767
767
|
(c || !(n in t)) && (c || (c = Array.prototype.slice.call(t, 0, n)), c[n] = t[n]);
|
|
768
768
|
return e.concat(c || Array.prototype.slice.call(t));
|
|
769
769
|
}
|
|
770
|
-
var
|
|
771
|
-
function
|
|
772
|
-
return
|
|
770
|
+
var U = "-ms-", Ne = "-moz-", B = "-webkit-", Vr = "comm", it = "rule", Kt = "decl", yo = "@import", Zr = "@keyframes", xo = "@layer", Jr = Math.abs, Wt = String.fromCharCode, Rt = Object.assign;
|
|
771
|
+
function wo(e, t) {
|
|
772
|
+
return Q(e, 0) ^ 45 ? (((t << 2 ^ Q(e, 0)) << 2 ^ Q(e, 1)) << 2 ^ Q(e, 2)) << 2 ^ Q(e, 3) : 0;
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Xr(e) {
|
|
775
775
|
return e.trim();
|
|
776
776
|
}
|
|
777
777
|
function ce(e, t) {
|
|
@@ -780,19 +780,19 @@ function ce(e, t) {
|
|
|
780
780
|
function M(e, t, r) {
|
|
781
781
|
return e.replace(t, r);
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function Ge(e, t, r) {
|
|
784
784
|
return e.indexOf(t, r);
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function Q(e, t) {
|
|
787
787
|
return e.charCodeAt(t) | 0;
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function Ce(e, t, r) {
|
|
790
790
|
return e.slice(t, r);
|
|
791
791
|
}
|
|
792
792
|
function se(e) {
|
|
793
793
|
return e.length;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function en(e) {
|
|
796
796
|
return e.length;
|
|
797
797
|
}
|
|
798
798
|
function ze(e, t) {
|
|
@@ -801,42 +801,42 @@ function ze(e, t) {
|
|
|
801
801
|
function ko(e, t) {
|
|
802
802
|
return e.map(t).join("");
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function ur(e, t) {
|
|
805
805
|
return e.filter(function(r) {
|
|
806
806
|
return !ce(r, t);
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
|
-
var
|
|
810
|
-
function
|
|
811
|
-
return { value: e, root: t, parent: r, type: n, props: o, children: c, line:
|
|
809
|
+
var ct = 1, je = 1, tn = 0, re = 0, G = 0, _e = "";
|
|
810
|
+
function lt(e, t, r, n, o, c, u, d) {
|
|
811
|
+
return { value: e, root: t, parent: r, type: n, props: o, children: c, line: ct, column: je, length: u, return: "", siblings: d };
|
|
812
812
|
}
|
|
813
813
|
function fe(e, t) {
|
|
814
|
-
return
|
|
814
|
+
return Rt(lt("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
|
|
815
815
|
}
|
|
816
816
|
function ve(e) {
|
|
817
817
|
for (; e.root; )
|
|
818
818
|
e = fe(e.root, { children: [e] });
|
|
819
819
|
ze(e, e.siblings);
|
|
820
820
|
}
|
|
821
|
-
function wo() {
|
|
822
|
-
return q;
|
|
823
|
-
}
|
|
824
821
|
function vo() {
|
|
825
|
-
return
|
|
822
|
+
return G;
|
|
823
|
+
}
|
|
824
|
+
function $o() {
|
|
825
|
+
return G = re > 0 ? Q(_e, --re) : 0, je--, G === 10 && (je = 1, ct--), G;
|
|
826
826
|
}
|
|
827
827
|
function ne() {
|
|
828
|
-
return
|
|
828
|
+
return G = re < tn ? Q(_e, re++) : 0, je++, G === 10 && (je = 1, ct++), G;
|
|
829
829
|
}
|
|
830
830
|
function ye() {
|
|
831
|
-
return
|
|
831
|
+
return Q(_e, re);
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function Qe() {
|
|
834
834
|
return re;
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
return
|
|
836
|
+
function dt(e, t) {
|
|
837
|
+
return Ce(_e, e, t);
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Pt(e) {
|
|
840
840
|
switch (e) {
|
|
841
841
|
case 0:
|
|
842
842
|
case 9:
|
|
@@ -868,36 +868,36 @@ function Rt(e) {
|
|
|
868
868
|
}
|
|
869
869
|
return 0;
|
|
870
870
|
}
|
|
871
|
-
function $o(e) {
|
|
872
|
-
return it = Ce = 1, en = se(_e = e), re = 0, [];
|
|
873
|
-
}
|
|
874
871
|
function So(e) {
|
|
872
|
+
return ct = je = 1, tn = se(_e = e), re = 0, [];
|
|
873
|
+
}
|
|
874
|
+
function Co(e) {
|
|
875
875
|
return _e = "", e;
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
877
|
+
function wt(e) {
|
|
878
|
+
return Xr(dt(re - 1, Dt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
879
879
|
}
|
|
880
|
-
function
|
|
881
|
-
for (; (
|
|
880
|
+
function jo(e) {
|
|
881
|
+
for (; (G = ye()) && G < 33; )
|
|
882
882
|
ne();
|
|
883
|
-
return
|
|
883
|
+
return Pt(e) > 2 || Pt(G) > 3 ? "" : " ";
|
|
884
884
|
}
|
|
885
|
-
function
|
|
886
|
-
for (; --t && ne() && !(
|
|
885
|
+
function Io(e, t) {
|
|
886
|
+
for (; --t && ne() && !(G < 48 || G > 102 || G > 57 && G < 65 || G > 70 && G < 97); )
|
|
887
887
|
;
|
|
888
|
-
return
|
|
888
|
+
return dt(e, Qe() + (t < 6 && ye() == 32 && ne() == 32));
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Dt(e) {
|
|
891
891
|
for (; ne(); )
|
|
892
|
-
switch (
|
|
892
|
+
switch (G) {
|
|
893
893
|
case e:
|
|
894
894
|
return re;
|
|
895
895
|
case 34:
|
|
896
896
|
case 39:
|
|
897
|
-
e !== 34 && e !== 39 &&
|
|
897
|
+
e !== 34 && e !== 39 && Dt(G);
|
|
898
898
|
break;
|
|
899
899
|
case 40:
|
|
900
|
-
e === 41 &&
|
|
900
|
+
e === 41 && Dt(e);
|
|
901
901
|
break;
|
|
902
902
|
case 92:
|
|
903
903
|
ne();
|
|
@@ -905,55 +905,55 @@ function Pt(e) {
|
|
|
905
905
|
}
|
|
906
906
|
return re;
|
|
907
907
|
}
|
|
908
|
-
function
|
|
909
|
-
for (; ne() && e +
|
|
910
|
-
if (e +
|
|
908
|
+
function To(e, t) {
|
|
909
|
+
for (; ne() && e + G !== 57; )
|
|
910
|
+
if (e + G === 84 && ye() === 47)
|
|
911
911
|
break;
|
|
912
|
-
return "/*" +
|
|
912
|
+
return "/*" + dt(t, re - 1) + "*" + Wt(e === 47 ? e : ne());
|
|
913
913
|
}
|
|
914
914
|
function Ao(e) {
|
|
915
|
-
for (; !
|
|
915
|
+
for (; !Pt(ye()); )
|
|
916
916
|
ne();
|
|
917
|
-
return
|
|
917
|
+
return dt(e, re);
|
|
918
918
|
}
|
|
919
|
-
function
|
|
920
|
-
return
|
|
919
|
+
function Eo(e) {
|
|
920
|
+
return Co(Ye("", null, null, null, [""], e = So(e), 0, [0], e));
|
|
921
921
|
}
|
|
922
922
|
function Ye(e, t, r, n, o, c, u, d, h) {
|
|
923
|
-
for (var b = 0, g = 0, p = u,
|
|
923
|
+
for (var b = 0, g = 0, p = u, k = 0, w = 0, S = 0, j = 1, v = 1, a = 1, i = 0, s = "", f = o, m = c, x = n, y = s; v; )
|
|
924
924
|
switch (S = i, i = ne()) {
|
|
925
925
|
case 40:
|
|
926
|
-
if (S != 108 &&
|
|
927
|
-
|
|
926
|
+
if (S != 108 && Q(y, p - 1) == 58) {
|
|
927
|
+
Ge(y += M(wt(i), "&", "&\f"), "&\f", Jr(b ? d[b - 1] : 0)) != -1 && (a = -1);
|
|
928
928
|
break;
|
|
929
929
|
}
|
|
930
930
|
case 34:
|
|
931
931
|
case 39:
|
|
932
932
|
case 91:
|
|
933
|
-
y +=
|
|
933
|
+
y += wt(i);
|
|
934
934
|
break;
|
|
935
935
|
case 9:
|
|
936
936
|
case 10:
|
|
937
937
|
case 13:
|
|
938
938
|
case 32:
|
|
939
|
-
y +=
|
|
939
|
+
y += jo(S);
|
|
940
940
|
break;
|
|
941
941
|
case 92:
|
|
942
|
-
y +=
|
|
942
|
+
y += Io(Qe() - 1, 7);
|
|
943
943
|
continue;
|
|
944
944
|
case 47:
|
|
945
945
|
switch (ye()) {
|
|
946
946
|
case 42:
|
|
947
947
|
case 47:
|
|
948
|
-
ze(
|
|
948
|
+
ze(Mo(To(ne(), Qe()), t, r, h), h);
|
|
949
949
|
break;
|
|
950
950
|
default:
|
|
951
951
|
y += "/";
|
|
952
952
|
}
|
|
953
953
|
break;
|
|
954
|
-
case 123 *
|
|
954
|
+
case 123 * j:
|
|
955
955
|
d[b++] = se(y) * a;
|
|
956
|
-
case 125 *
|
|
956
|
+
case 125 * j:
|
|
957
957
|
case 59:
|
|
958
958
|
case 0:
|
|
959
959
|
switch (i) {
|
|
@@ -961,38 +961,38 @@ function Ye(e, t, r, n, o, c, u, d, h) {
|
|
|
961
961
|
case 125:
|
|
962
962
|
v = 0;
|
|
963
963
|
case 59 + g:
|
|
964
|
-
a == -1 && (y = M(y, /\f/g, "")),
|
|
964
|
+
a == -1 && (y = M(y, /\f/g, "")), w > 0 && se(y) - p && ze(w > 32 ? fr(y + ";", n, r, p - 1, h) : fr(M(y, " ", "") + ";", n, r, p - 2, h), h);
|
|
965
965
|
break;
|
|
966
966
|
case 59:
|
|
967
967
|
y += ";";
|
|
968
968
|
default:
|
|
969
|
-
if (ze(x =
|
|
969
|
+
if (ze(x = pr(y, t, r, b, g, o, d, s, f = [], m = [], p, c), c), i === 123)
|
|
970
970
|
if (g === 0)
|
|
971
971
|
Ye(y, t, x, x, f, c, p, d, m);
|
|
972
972
|
else
|
|
973
|
-
switch (
|
|
973
|
+
switch (k === 99 && Q(y, 3) === 110 ? 100 : k) {
|
|
974
974
|
case 100:
|
|
975
975
|
case 108:
|
|
976
976
|
case 109:
|
|
977
977
|
case 115:
|
|
978
|
-
Ye(e, x, x, n && ze(
|
|
978
|
+
Ye(e, x, x, n && ze(pr(e, x, x, 0, 0, o, d, s, o, f = [], p, m), m), o, m, p, d, n ? f : m);
|
|
979
979
|
break;
|
|
980
980
|
default:
|
|
981
981
|
Ye(y, x, x, x, [""], m, 0, d, m);
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
|
-
b = g =
|
|
984
|
+
b = g = w = 0, j = a = 1, s = y = "", p = u;
|
|
985
985
|
break;
|
|
986
986
|
case 58:
|
|
987
|
-
p = 1 + se(y),
|
|
987
|
+
p = 1 + se(y), w = S;
|
|
988
988
|
default:
|
|
989
|
-
if (
|
|
989
|
+
if (j < 1) {
|
|
990
990
|
if (i == 123)
|
|
991
|
-
--
|
|
992
|
-
else if (i == 125 &&
|
|
991
|
+
--j;
|
|
992
|
+
else if (i == 125 && j++ == 0 && $o() == 125)
|
|
993
993
|
continue;
|
|
994
994
|
}
|
|
995
|
-
switch (y += Wt(i), i *
|
|
995
|
+
switch (y += Wt(i), i * j) {
|
|
996
996
|
case 38:
|
|
997
997
|
a = g > 0 ? 1 : (y += "\f", -1);
|
|
998
998
|
break;
|
|
@@ -1000,30 +1000,30 @@ function Ye(e, t, r, n, o, c, u, d, h) {
|
|
|
1000
1000
|
d[b++] = (se(y) - 1) * a, a = 1;
|
|
1001
1001
|
break;
|
|
1002
1002
|
case 64:
|
|
1003
|
-
ye() === 45 && (y +=
|
|
1003
|
+
ye() === 45 && (y += wt(ne())), k = ye(), g = p = se(s = y += Ao(Qe())), i++;
|
|
1004
1004
|
break;
|
|
1005
1005
|
case 45:
|
|
1006
|
-
S === 45 && se(y) == 2 && (
|
|
1006
|
+
S === 45 && se(y) == 2 && (j = 0);
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
1009
|
return c;
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1012
|
-
for (var
|
|
1013
|
-
for (var i = 0, s =
|
|
1014
|
-
(f =
|
|
1015
|
-
return
|
|
1011
|
+
function pr(e, t, r, n, o, c, u, d, h, b, g, p) {
|
|
1012
|
+
for (var k = o - 1, w = o === 0 ? c : [""], S = en(w), j = 0, v = 0, a = 0; j < n; ++j)
|
|
1013
|
+
for (var i = 0, s = Ce(e, k + 1, k = Jr(v = u[j])), f = e; i < S; ++i)
|
|
1014
|
+
(f = Xr(v > 0 ? w[i] + " " + s : M(s, /&\f/g, w[i]))) && (h[a++] = f);
|
|
1015
|
+
return lt(e, t, r, o === 0 ? it : d, h, b, g, p);
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
return
|
|
1017
|
+
function Mo(e, t, r, n) {
|
|
1018
|
+
return lt(e, t, r, Vr, Wt(vo()), Ce(e, 2, -2), 0, n);
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1021
|
-
return
|
|
1020
|
+
function fr(e, t, r, n, o) {
|
|
1021
|
+
return lt(e, t, r, Kt, Ce(e, 0, n), Ce(e, n + 1, -1), n, o);
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1024
|
-
switch (
|
|
1023
|
+
function rn(e, t, r) {
|
|
1024
|
+
switch (wo(e, t)) {
|
|
1025
1025
|
case 5103:
|
|
1026
|
-
return
|
|
1026
|
+
return B + "print-" + e + e;
|
|
1027
1027
|
case 5737:
|
|
1028
1028
|
case 4201:
|
|
1029
1029
|
case 3177:
|
|
@@ -1049,72 +1049,72 @@ function tn(e, t, r) {
|
|
|
1049
1049
|
case 5365:
|
|
1050
1050
|
case 5621:
|
|
1051
1051
|
case 3829:
|
|
1052
|
-
return
|
|
1052
|
+
return B + e + e;
|
|
1053
1053
|
case 4789:
|
|
1054
|
-
return
|
|
1054
|
+
return Ne + e + e;
|
|
1055
1055
|
case 5349:
|
|
1056
1056
|
case 4246:
|
|
1057
1057
|
case 4810:
|
|
1058
1058
|
case 6968:
|
|
1059
1059
|
case 2756:
|
|
1060
|
-
return
|
|
1060
|
+
return B + e + Ne + e + U + e + e;
|
|
1061
1061
|
case 5936:
|
|
1062
|
-
switch (
|
|
1062
|
+
switch (Q(e, t + 11)) {
|
|
1063
1063
|
case 114:
|
|
1064
|
-
return
|
|
1064
|
+
return B + e + U + M(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
1065
1065
|
case 108:
|
|
1066
|
-
return
|
|
1066
|
+
return B + e + U + M(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
1067
1067
|
case 45:
|
|
1068
|
-
return
|
|
1068
|
+
return B + e + U + M(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
1069
1069
|
}
|
|
1070
1070
|
case 6828:
|
|
1071
1071
|
case 4268:
|
|
1072
1072
|
case 2903:
|
|
1073
|
-
return
|
|
1073
|
+
return B + e + U + e + e;
|
|
1074
1074
|
case 6165:
|
|
1075
|
-
return
|
|
1075
|
+
return B + e + U + "flex-" + e + e;
|
|
1076
1076
|
case 5187:
|
|
1077
|
-
return
|
|
1077
|
+
return B + e + M(e, /(\w+).+(:[^]+)/, B + "box-$1$2" + U + "flex-$1$2") + e;
|
|
1078
1078
|
case 5443:
|
|
1079
|
-
return
|
|
1079
|
+
return B + e + U + "flex-item-" + M(e, /flex-|-self/g, "") + (ce(e, /flex-|baseline/) ? "" : U + "grid-row-" + M(e, /flex-|-self/g, "")) + e;
|
|
1080
1080
|
case 4675:
|
|
1081
|
-
return
|
|
1081
|
+
return B + e + U + "flex-line-pack" + M(e, /align-content|flex-|-self/g, "") + e;
|
|
1082
1082
|
case 5548:
|
|
1083
|
-
return
|
|
1083
|
+
return B + e + U + M(e, "shrink", "negative") + e;
|
|
1084
1084
|
case 5292:
|
|
1085
|
-
return
|
|
1085
|
+
return B + e + U + M(e, "basis", "preferred-size") + e;
|
|
1086
1086
|
case 6060:
|
|
1087
|
-
return
|
|
1087
|
+
return B + "box-" + M(e, "-grow", "") + B + e + U + M(e, "grow", "positive") + e;
|
|
1088
1088
|
case 4554:
|
|
1089
|
-
return
|
|
1089
|
+
return B + M(e, /([^-])(transform)/g, "$1" + B + "$2") + e;
|
|
1090
1090
|
case 6187:
|
|
1091
|
-
return M(M(M(e, /(zoom-|grab)/,
|
|
1091
|
+
return M(M(M(e, /(zoom-|grab)/, B + "$1"), /(image-set)/, B + "$1"), e, "") + e;
|
|
1092
1092
|
case 5495:
|
|
1093
1093
|
case 3959:
|
|
1094
|
-
return M(e, /(image-set\([^]*)/,
|
|
1094
|
+
return M(e, /(image-set\([^]*)/, B + "$1$`$1");
|
|
1095
1095
|
case 4968:
|
|
1096
|
-
return M(M(e, /(.+:)(flex-)?(.*)/,
|
|
1096
|
+
return M(M(e, /(.+:)(flex-)?(.*)/, B + "box-pack:$3" + U + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + B + e + e;
|
|
1097
1097
|
case 4200:
|
|
1098
|
-
if (!ce(e, /flex-|baseline/)) return
|
|
1098
|
+
if (!ce(e, /flex-|baseline/)) return U + "grid-column-align" + Ce(e, t) + e;
|
|
1099
1099
|
break;
|
|
1100
1100
|
case 2592:
|
|
1101
1101
|
case 3360:
|
|
1102
|
-
return
|
|
1102
|
+
return U + M(e, "template-", "") + e;
|
|
1103
1103
|
case 4384:
|
|
1104
1104
|
case 3616:
|
|
1105
1105
|
return r && r.some(function(n, o) {
|
|
1106
1106
|
return t = o, ce(n.props, /grid-\w+-end/);
|
|
1107
|
-
}) ? ~
|
|
1107
|
+
}) ? ~Ge(e + (r = r[t].value), "span", 0) ? e : U + M(e, "-start", "") + e + U + "grid-row-span:" + (~Ge(r, "span", 0) ? ce(r, /\d+/) : +ce(r, /\d+/) - +ce(e, /\d+/)) + ";" : U + M(e, "-start", "") + e;
|
|
1108
1108
|
case 4896:
|
|
1109
1109
|
case 4128:
|
|
1110
1110
|
return r && r.some(function(n) {
|
|
1111
1111
|
return ce(n.props, /grid-\w+-start/);
|
|
1112
|
-
}) ? e :
|
|
1112
|
+
}) ? e : U + M(M(e, "-end", "-span"), "span ", "") + e;
|
|
1113
1113
|
case 4095:
|
|
1114
1114
|
case 3583:
|
|
1115
1115
|
case 4068:
|
|
1116
1116
|
case 2532:
|
|
1117
|
-
return M(e, /(.+)-inline(.+)/,
|
|
1117
|
+
return M(e, /(.+)-inline(.+)/, B + "$1$2") + e;
|
|
1118
1118
|
case 8116:
|
|
1119
1119
|
case 7059:
|
|
1120
1120
|
case 5753:
|
|
@@ -1128,31 +1128,31 @@ function tn(e, t, r) {
|
|
|
1128
1128
|
case 5021:
|
|
1129
1129
|
case 4765:
|
|
1130
1130
|
if (se(e) - 1 - t > 6)
|
|
1131
|
-
switch (
|
|
1131
|
+
switch (Q(e, t + 1)) {
|
|
1132
1132
|
case 109:
|
|
1133
|
-
if (
|
|
1133
|
+
if (Q(e, t + 4) !== 45)
|
|
1134
1134
|
break;
|
|
1135
1135
|
case 102:
|
|
1136
|
-
return M(e, /(.+:)(.+)-([^]+)/, "$1" +
|
|
1136
|
+
return M(e, /(.+:)(.+)-([^]+)/, "$1" + B + "$2-$3$1" + Ne + (Q(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
1137
1137
|
case 115:
|
|
1138
|
-
return ~
|
|
1138
|
+
return ~Ge(e, "stretch", 0) ? rn(M(e, "stretch", "fill-available"), t, r) + e : e;
|
|
1139
1139
|
}
|
|
1140
1140
|
break;
|
|
1141
1141
|
case 5152:
|
|
1142
1142
|
case 5920:
|
|
1143
1143
|
return M(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, o, c, u, d, h, b) {
|
|
1144
|
-
return
|
|
1144
|
+
return U + o + ":" + c + b + (u ? U + o + "-span:" + (d ? h : +h - +c) + b : "") + e;
|
|
1145
1145
|
});
|
|
1146
1146
|
case 4949:
|
|
1147
|
-
if (
|
|
1148
|
-
return M(e, ":", ":" +
|
|
1147
|
+
if (Q(e, t + 6) === 121)
|
|
1148
|
+
return M(e, ":", ":" + B) + e;
|
|
1149
1149
|
break;
|
|
1150
1150
|
case 6444:
|
|
1151
|
-
switch (
|
|
1151
|
+
switch (Q(e, Q(e, 14) === 45 ? 18 : 11)) {
|
|
1152
1152
|
case 120:
|
|
1153
|
-
return M(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" +
|
|
1153
|
+
return M(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + B + (Q(e, 14) === 45 ? "inline-" : "") + "box$3$1" + B + "$2$3$1" + U + "$2box$3") + e;
|
|
1154
1154
|
case 100:
|
|
1155
|
-
return M(e, ":", ":" +
|
|
1155
|
+
return M(e, ":", ":" + U) + e;
|
|
1156
1156
|
}
|
|
1157
1157
|
break;
|
|
1158
1158
|
case 5719:
|
|
@@ -1164,58 +1164,58 @@ function tn(e, t, r) {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
return e;
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1167
|
+
function rt(e, t) {
|
|
1168
1168
|
for (var r = "", n = 0; n < e.length; n++)
|
|
1169
1169
|
r += t(e[n], n, e, t) || "";
|
|
1170
1170
|
return r;
|
|
1171
1171
|
}
|
|
1172
1172
|
function _o(e, t, r, n) {
|
|
1173
1173
|
switch (e.type) {
|
|
1174
|
-
case
|
|
1174
|
+
case xo:
|
|
1175
1175
|
if (e.children.length) break;
|
|
1176
|
-
case
|
|
1177
|
-
case
|
|
1176
|
+
case yo:
|
|
1177
|
+
case Kt:
|
|
1178
1178
|
return e.return = e.return || e.value;
|
|
1179
|
-
case Qr:
|
|
1180
|
-
return "";
|
|
1181
1179
|
case Vr:
|
|
1182
|
-
return
|
|
1183
|
-
case
|
|
1180
|
+
return "";
|
|
1181
|
+
case Zr:
|
|
1182
|
+
return e.return = e.value + "{" + rt(e.children, n) + "}";
|
|
1183
|
+
case it:
|
|
1184
1184
|
if (!se(e.value = e.props.join(","))) return "";
|
|
1185
1185
|
}
|
|
1186
|
-
return se(r =
|
|
1186
|
+
return se(r = rt(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1189
|
-
var t =
|
|
1188
|
+
function Ro(e) {
|
|
1189
|
+
var t = en(e);
|
|
1190
1190
|
return function(r, n, o, c) {
|
|
1191
1191
|
for (var u = "", d = 0; d < t; d++)
|
|
1192
1192
|
u += e[d](r, n, o, c) || "";
|
|
1193
1193
|
return u;
|
|
1194
1194
|
};
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function Po(e) {
|
|
1197
1197
|
return function(t) {
|
|
1198
1198
|
t.root || (t = t.return) && e(t);
|
|
1199
1199
|
};
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function Do(e, t, r, n) {
|
|
1202
1202
|
if (e.length > -1 && !e.return)
|
|
1203
1203
|
switch (e.type) {
|
|
1204
|
-
case
|
|
1205
|
-
e.return =
|
|
1204
|
+
case Kt:
|
|
1205
|
+
e.return = rn(e.value, e.length, r);
|
|
1206
1206
|
return;
|
|
1207
|
-
case
|
|
1208
|
-
return
|
|
1209
|
-
case
|
|
1207
|
+
case Zr:
|
|
1208
|
+
return rt([fe(e, { value: M(e.value, "@", "@" + B) })], n);
|
|
1209
|
+
case it:
|
|
1210
1210
|
if (e.length)
|
|
1211
1211
|
return ko(r = e.props, function(o) {
|
|
1212
1212
|
switch (ce(o, n = /(::plac\w+|:read-\w+)/)) {
|
|
1213
1213
|
case ":read-only":
|
|
1214
1214
|
case ":read-write":
|
|
1215
|
-
ve(fe(e, { props: [M(o, /:(read-\w+)/, ":" +
|
|
1215
|
+
ve(fe(e, { props: [M(o, /:(read-\w+)/, ":" + Ne + "$1")] })), ve(fe(e, { props: [o] })), Rt(e, { props: ur(r, n) });
|
|
1216
1216
|
break;
|
|
1217
1217
|
case "::placeholder":
|
|
1218
|
-
ve(fe(e, { props: [M(o, /:(plac\w+)/, ":" +
|
|
1218
|
+
ve(fe(e, { props: [M(o, /:(plac\w+)/, ":" + B + "input-$1")] })), ve(fe(e, { props: [M(o, /:(plac\w+)/, ":" + Ne + "$1")] })), ve(fe(e, { props: [M(o, /:(plac\w+)/, U + "input-$1")] })), ve(fe(e, { props: [o] })), Rt(e, { props: ur(r, n) });
|
|
1219
1219
|
break;
|
|
1220
1220
|
}
|
|
1221
1221
|
return "";
|
|
@@ -1270,58 +1270,58 @@ var zo = {
|
|
|
1270
1270
|
strokeMiterlimit: 1,
|
|
1271
1271
|
strokeOpacity: 1,
|
|
1272
1272
|
strokeWidth: 1
|
|
1273
|
-
},
|
|
1274
|
-
`,
|
|
1275
|
-
function
|
|
1276
|
-
return r === void 0 && (r =
|
|
1273
|
+
}, Ie = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", nn = "active", on = "data-styled-version", ut = "6.1.19", Ut = `/*!sc*/
|
|
1274
|
+
`, nt = typeof window < "u" && typeof document < "u", Oo = !!(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), pt = Object.freeze([]), Te = Object.freeze({});
|
|
1275
|
+
function No(e, t, r) {
|
|
1276
|
+
return r === void 0 && (r = Te), e.theme !== r.theme && e.theme || t || r.theme;
|
|
1277
1277
|
}
|
|
1278
|
-
var
|
|
1279
|
-
function
|
|
1280
|
-
return e.replace(
|
|
1278
|
+
var an = /* @__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"]), Bo = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Lo = /(^-|-$)/g;
|
|
1279
|
+
function hr(e) {
|
|
1280
|
+
return e.replace(Bo, "-").replace(Lo, "");
|
|
1281
1281
|
}
|
|
1282
|
-
var
|
|
1282
|
+
var Fo = /(a)(d)/gi, We = 52, mr = function(e) {
|
|
1283
1283
|
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
1284
1284
|
};
|
|
1285
1285
|
function zt(e) {
|
|
1286
1286
|
var t, r = "";
|
|
1287
|
-
for (t = Math.abs(e); t > We; t = t / We | 0) r =
|
|
1288
|
-
return (
|
|
1287
|
+
for (t = Math.abs(e); t > We; t = t / We | 0) r = mr(t % We) + r;
|
|
1288
|
+
return (mr(t % We) + r).replace(Fo, "$1-$2");
|
|
1289
1289
|
}
|
|
1290
|
-
var kt,
|
|
1290
|
+
var kt, sn = 5381, Se = function(e, t) {
|
|
1291
1291
|
for (var r = t.length; r; ) e = 33 * e ^ t.charCodeAt(--r);
|
|
1292
1292
|
return e;
|
|
1293
|
-
},
|
|
1294
|
-
return
|
|
1293
|
+
}, cn = function(e) {
|
|
1294
|
+
return Se(sn, e);
|
|
1295
1295
|
};
|
|
1296
|
-
function
|
|
1297
|
-
return zt(
|
|
1296
|
+
function Ko(e) {
|
|
1297
|
+
return zt(cn(e) >>> 0);
|
|
1298
1298
|
}
|
|
1299
1299
|
function Wo(e) {
|
|
1300
1300
|
return e.displayName || e.name || "Component";
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function vt(e) {
|
|
1303
1303
|
return typeof e == "string" && !0;
|
|
1304
1304
|
}
|
|
1305
|
-
var
|
|
1306
|
-
function
|
|
1307
|
-
return ("type" in (t = e) && t.type.$$typeof) ===
|
|
1305
|
+
var ln = typeof Symbol == "function" && Symbol.for, dn = ln ? Symbol.for("react.memo") : 60115, Uo = ln ? Symbol.for("react.forward_ref") : 60112, Ho = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, qo = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, un = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Go = ((kt = {})[Uo] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, kt[dn] = un, kt);
|
|
1306
|
+
function gr(e) {
|
|
1307
|
+
return ("type" in (t = e) && t.type.$$typeof) === dn ? un : "$$typeof" in e ? Go[e.$$typeof] : Ho;
|
|
1308
1308
|
var t;
|
|
1309
1309
|
}
|
|
1310
|
-
var
|
|
1311
|
-
function
|
|
1310
|
+
var Qo = Object.defineProperty, Yo = Object.getOwnPropertyNames, br = Object.getOwnPropertySymbols, Vo = Object.getOwnPropertyDescriptor, Zo = Object.getPrototypeOf, yr = Object.prototype;
|
|
1311
|
+
function pn(e, t, r) {
|
|
1312
1312
|
if (typeof t != "string") {
|
|
1313
|
-
if (
|
|
1314
|
-
var n =
|
|
1315
|
-
n && n !==
|
|
1313
|
+
if (yr) {
|
|
1314
|
+
var n = Zo(t);
|
|
1315
|
+
n && n !== yr && pn(e, n, r);
|
|
1316
1316
|
}
|
|
1317
1317
|
var o = Yo(t);
|
|
1318
|
-
|
|
1319
|
-
for (var c =
|
|
1318
|
+
br && (o = o.concat(br(t)));
|
|
1319
|
+
for (var c = gr(e), u = gr(t), d = 0; d < o.length; ++d) {
|
|
1320
1320
|
var h = o[d];
|
|
1321
|
-
if (!(h in
|
|
1322
|
-
var b =
|
|
1321
|
+
if (!(h in qo || r && r[h] || u && h in u || c && h in c)) {
|
|
1322
|
+
var b = Vo(t, h);
|
|
1323
1323
|
try {
|
|
1324
|
-
|
|
1324
|
+
Qo(e, h, b);
|
|
1325
1325
|
} catch {
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
@@ -1332,34 +1332,34 @@ function un(e, t, r) {
|
|
|
1332
1332
|
function Ae(e) {
|
|
1333
1333
|
return typeof e == "function";
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function Ht(e) {
|
|
1336
1336
|
return typeof e == "object" && "styledComponentId" in e;
|
|
1337
1337
|
}
|
|
1338
1338
|
function be(e, t) {
|
|
1339
1339
|
return e && t ? "".concat(e, " ").concat(t) : e || t || "";
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function xr(e, t) {
|
|
1342
1342
|
if (e.length === 0) return "";
|
|
1343
1343
|
for (var r = e[0], n = 1; n < e.length; n++) r += e[n];
|
|
1344
1344
|
return r;
|
|
1345
1345
|
}
|
|
1346
|
-
function
|
|
1346
|
+
function Le(e) {
|
|
1347
1347
|
return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1350
|
-
if (r === void 0 && (r = !1), !r && !
|
|
1351
|
-
if (Array.isArray(t)) for (var n = 0; n < t.length; n++) e[n] =
|
|
1352
|
-
else if (
|
|
1349
|
+
function Ot(e, t, r) {
|
|
1350
|
+
if (r === void 0 && (r = !1), !r && !Le(e) && !Array.isArray(e)) return t;
|
|
1351
|
+
if (Array.isArray(t)) for (var n = 0; n < t.length; n++) e[n] = Ot(e[n], t[n]);
|
|
1352
|
+
else if (Le(t)) for (var n in t) e[n] = Ot(e[n], t[n]);
|
|
1353
1353
|
return e;
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function qt(e, t) {
|
|
1356
1356
|
Object.defineProperty(e, "toString", { value: t });
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1358
|
+
function Fe(e) {
|
|
1359
1359
|
for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
|
|
1360
1360
|
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(", ")) : ""));
|
|
1361
1361
|
}
|
|
1362
|
-
var
|
|
1362
|
+
var Jo = function() {
|
|
1363
1363
|
function e(t) {
|
|
1364
1364
|
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
|
|
1365
1365
|
}
|
|
@@ -1368,7 +1368,7 @@ var Zo = function() {
|
|
|
1368
1368
|
return r;
|
|
1369
1369
|
}, e.prototype.insertRules = function(t, r) {
|
|
1370
1370
|
if (t >= this.groupSizes.length) {
|
|
1371
|
-
for (var n = this.groupSizes, o = n.length, c = o; t >= c; ) if ((c <<= 1) < 0) throw
|
|
1371
|
+
for (var n = this.groupSizes, o = n.length, c = o; t >= c; ) if ((c <<= 1) < 0) throw Fe(16, "".concat(t));
|
|
1372
1372
|
this.groupSizes = new Uint32Array(c), this.groupSizes.set(n), this.length = c;
|
|
1373
1373
|
for (var u = o; u < c; u++) this.groupSizes[u] = 0;
|
|
1374
1374
|
}
|
|
@@ -1382,55 +1382,55 @@ var Zo = function() {
|
|
|
1382
1382
|
}, e.prototype.getGroup = function(t) {
|
|
1383
1383
|
var r = "";
|
|
1384
1384
|
if (t >= this.length || this.groupSizes[t] === 0) return r;
|
|
1385
|
-
for (var n = this.groupSizes[t], o = this.indexOfGroup(t), c = o + n, u = o; u < c; u++) r += "".concat(this.tag.getRule(u)).concat(
|
|
1385
|
+
for (var n = this.groupSizes[t], o = this.indexOfGroup(t), c = o + n, u = o; u < c; u++) r += "".concat(this.tag.getRule(u)).concat(Ut);
|
|
1386
1386
|
return r;
|
|
1387
1387
|
}, e;
|
|
1388
|
-
}(),
|
|
1389
|
-
if (
|
|
1390
|
-
for (;
|
|
1391
|
-
var t =
|
|
1392
|
-
return
|
|
1393
|
-
},
|
|
1394
|
-
|
|
1395
|
-
},
|
|
1388
|
+
}(), Ve = /* @__PURE__ */ new Map(), ot = /* @__PURE__ */ new Map(), Ze = 1, Ue = function(e) {
|
|
1389
|
+
if (Ve.has(e)) return Ve.get(e);
|
|
1390
|
+
for (; ot.has(Ze); ) Ze++;
|
|
1391
|
+
var t = Ze++;
|
|
1392
|
+
return Ve.set(e, t), ot.set(t, e), t;
|
|
1393
|
+
}, Xo = function(e, t) {
|
|
1394
|
+
Ze = t + 1, Ve.set(e, t), ot.set(t, e);
|
|
1395
|
+
}, ea = "style[".concat(Ie, "][").concat(on, '="').concat(ut, '"]'), ta = new RegExp("^".concat(Ie, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), ra = function(e, t, r) {
|
|
1396
1396
|
for (var n, o = r.split(","), c = 0, u = o.length; c < u; c++) (n = o[c]) && e.registerName(t, n);
|
|
1397
|
-
},
|
|
1398
|
-
for (var r, n = ((r = t.textContent) !== null && r !== void 0 ? r : "").split(
|
|
1397
|
+
}, na = function(e, t) {
|
|
1398
|
+
for (var r, n = ((r = t.textContent) !== null && r !== void 0 ? r : "").split(Ut), o = [], c = 0, u = n.length; c < u; c++) {
|
|
1399
1399
|
var d = n[c].trim();
|
|
1400
1400
|
if (d) {
|
|
1401
|
-
var h = d.match(
|
|
1401
|
+
var h = d.match(ta);
|
|
1402
1402
|
if (h) {
|
|
1403
1403
|
var b = 0 | parseInt(h[1], 10), g = h[2];
|
|
1404
|
-
b !== 0 && (
|
|
1404
|
+
b !== 0 && (Xo(g, b), ra(e, g, h[3]), e.getTag().insertRules(b, o)), o.length = 0;
|
|
1405
1405
|
} else o.push(d);
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
|
-
},
|
|
1409
|
-
for (var t = document.querySelectorAll(
|
|
1408
|
+
}, wr = function(e) {
|
|
1409
|
+
for (var t = document.querySelectorAll(ea), r = 0, n = t.length; r < n; r++) {
|
|
1410
1410
|
var o = t[r];
|
|
1411
|
-
o && o.getAttribute(
|
|
1411
|
+
o && o.getAttribute(Ie) !== nn && (na(e, o), o.parentNode && o.parentNode.removeChild(o));
|
|
1412
1412
|
}
|
|
1413
1413
|
};
|
|
1414
|
-
function
|
|
1414
|
+
function oa() {
|
|
1415
1415
|
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
|
|
1416
1416
|
}
|
|
1417
|
-
var
|
|
1417
|
+
var fn = function(e) {
|
|
1418
1418
|
var t = document.head, r = e || t, n = document.createElement("style"), o = function(d) {
|
|
1419
|
-
var h = Array.from(d.querySelectorAll("style[".concat(
|
|
1419
|
+
var h = Array.from(d.querySelectorAll("style[".concat(Ie, "]")));
|
|
1420
1420
|
return h[h.length - 1];
|
|
1421
1421
|
}(r), c = o !== void 0 ? o.nextSibling : null;
|
|
1422
|
-
n.setAttribute(
|
|
1423
|
-
var u =
|
|
1422
|
+
n.setAttribute(Ie, nn), n.setAttribute(on, ut);
|
|
1423
|
+
var u = oa();
|
|
1424
1424
|
return u && n.setAttribute("nonce", u), r.insertBefore(n, c), n;
|
|
1425
|
-
},
|
|
1425
|
+
}, aa = function() {
|
|
1426
1426
|
function e(t) {
|
|
1427
|
-
this.element =
|
|
1427
|
+
this.element = fn(t), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) {
|
|
1428
1428
|
if (r.sheet) return r.sheet;
|
|
1429
1429
|
for (var n = document.styleSheets, o = 0, c = n.length; o < c; o++) {
|
|
1430
1430
|
var u = n[o];
|
|
1431
1431
|
if (u.ownerNode === r) return u;
|
|
1432
1432
|
}
|
|
1433
|
-
throw
|
|
1433
|
+
throw Fe(17);
|
|
1434
1434
|
}(this.element), this.length = 0;
|
|
1435
1435
|
}
|
|
1436
1436
|
return e.prototype.insertRule = function(t, r) {
|
|
@@ -1445,9 +1445,9 @@ var pn = function(e) {
|
|
|
1445
1445
|
var r = this.sheet.cssRules[t];
|
|
1446
1446
|
return r && r.cssText ? r.cssText : "";
|
|
1447
1447
|
}, e;
|
|
1448
|
-
}(),
|
|
1448
|
+
}(), sa = function() {
|
|
1449
1449
|
function e(t) {
|
|
1450
|
-
this.element =
|
|
1450
|
+
this.element = fn(t), this.nodes = this.element.childNodes, this.length = 0;
|
|
1451
1451
|
}
|
|
1452
1452
|
return e.prototype.insertRule = function(t, r) {
|
|
1453
1453
|
if (t <= this.length && t >= 0) {
|
|
@@ -1460,7 +1460,7 @@ var pn = function(e) {
|
|
|
1460
1460
|
}, e.prototype.getRule = function(t) {
|
|
1461
1461
|
return t < this.length ? this.nodes[t].textContent : "";
|
|
1462
1462
|
}, e;
|
|
1463
|
-
}(),
|
|
1463
|
+
}(), ia = function() {
|
|
1464
1464
|
function e(t) {
|
|
1465
1465
|
this.rules = [], this.length = 0;
|
|
1466
1466
|
}
|
|
@@ -1471,32 +1471,32 @@ var pn = function(e) {
|
|
|
1471
1471
|
}, e.prototype.getRule = function(t) {
|
|
1472
1472
|
return t < this.length ? this.rules[t] : "";
|
|
1473
1473
|
}, e;
|
|
1474
|
-
}(), kr =
|
|
1474
|
+
}(), kr = nt, ca = { isServer: !nt, useCSSOMInjection: !Oo }, hn = function() {
|
|
1475
1475
|
function e(t, r, n) {
|
|
1476
|
-
t === void 0 && (t =
|
|
1476
|
+
t === void 0 && (t = Te), r === void 0 && (r = {});
|
|
1477
1477
|
var o = this;
|
|
1478
|
-
this.options = te(te({},
|
|
1478
|
+
this.options = te(te({}, ca), t), this.gs = r, this.names = new Map(n), this.server = !!t.isServer, !this.server && nt && kr && (kr = !1, wr(this)), qt(this, function() {
|
|
1479
1479
|
return function(c) {
|
|
1480
1480
|
for (var u = c.getTag(), d = u.length, h = "", b = function(p) {
|
|
1481
|
-
var
|
|
1482
|
-
return
|
|
1481
|
+
var k = function(a) {
|
|
1482
|
+
return ot.get(a);
|
|
1483
1483
|
}(p);
|
|
1484
|
-
if (
|
|
1485
|
-
var
|
|
1486
|
-
if (
|
|
1487
|
-
var
|
|
1488
|
-
|
|
1484
|
+
if (k === void 0) return "continue";
|
|
1485
|
+
var w = c.names.get(k), S = u.getGroup(p);
|
|
1486
|
+
if (w === void 0 || !w.size || S.length === 0) return "continue";
|
|
1487
|
+
var j = "".concat(Ie, ".g").concat(p, '[id="').concat(k, '"]'), v = "";
|
|
1488
|
+
w !== void 0 && w.forEach(function(a) {
|
|
1489
1489
|
a.length > 0 && (v += "".concat(a, ","));
|
|
1490
|
-
}), h += "".concat(S).concat(
|
|
1490
|
+
}), h += "".concat(S).concat(j, '{content:"').concat(v, '"}').concat(Ut);
|
|
1491
1491
|
}, g = 0; g < d; g++) b(g);
|
|
1492
1492
|
return h;
|
|
1493
1493
|
}(o);
|
|
1494
1494
|
});
|
|
1495
1495
|
}
|
|
1496
1496
|
return e.registerId = function(t) {
|
|
1497
|
-
return
|
|
1497
|
+
return Ue(t);
|
|
1498
1498
|
}, e.prototype.rehydrate = function() {
|
|
1499
|
-
!this.server &&
|
|
1499
|
+
!this.server && nt && wr(this);
|
|
1500
1500
|
}, e.prototype.reconstructWithOptions = function(t, r) {
|
|
1501
1501
|
return r === void 0 && (r = !0), new e(te(te({}, this.options), t), this.gs, r && this.names || void 0);
|
|
1502
1502
|
}, e.prototype.allocateGSInstance = function(t) {
|
|
@@ -1504,124 +1504,124 @@ var pn = function(e) {
|
|
|
1504
1504
|
}, e.prototype.getTag = function() {
|
|
1505
1505
|
return this.tag || (this.tag = (t = function(r) {
|
|
1506
1506
|
var n = r.useCSSOMInjection, o = r.target;
|
|
1507
|
-
return r.isServer ? new
|
|
1508
|
-
}(this.options), new
|
|
1507
|
+
return r.isServer ? new ia(o) : n ? new aa(o) : new sa(o);
|
|
1508
|
+
}(this.options), new Jo(t)));
|
|
1509
1509
|
var t;
|
|
1510
1510
|
}, e.prototype.hasNameForId = function(t, r) {
|
|
1511
1511
|
return this.names.has(t) && this.names.get(t).has(r);
|
|
1512
1512
|
}, e.prototype.registerName = function(t, r) {
|
|
1513
|
-
if (
|
|
1513
|
+
if (Ue(t), this.names.has(t)) this.names.get(t).add(r);
|
|
1514
1514
|
else {
|
|
1515
1515
|
var n = /* @__PURE__ */ new Set();
|
|
1516
1516
|
n.add(r), this.names.set(t, n);
|
|
1517
1517
|
}
|
|
1518
1518
|
}, e.prototype.insertRules = function(t, r, n) {
|
|
1519
|
-
this.registerName(t, r), this.getTag().insertRules(
|
|
1519
|
+
this.registerName(t, r), this.getTag().insertRules(Ue(t), n);
|
|
1520
1520
|
}, e.prototype.clearNames = function(t) {
|
|
1521
1521
|
this.names.has(t) && this.names.get(t).clear();
|
|
1522
1522
|
}, e.prototype.clearRules = function(t) {
|
|
1523
|
-
this.getTag().clearGroup(
|
|
1523
|
+
this.getTag().clearGroup(Ue(t)), this.clearNames(t);
|
|
1524
1524
|
}, e.prototype.clearTag = function() {
|
|
1525
1525
|
this.tag = void 0;
|
|
1526
1526
|
}, e;
|
|
1527
|
-
}(),
|
|
1528
|
-
function
|
|
1527
|
+
}(), la = /&/g, da = /^\s*\/\/.*$/gm;
|
|
1528
|
+
function mn(e, t) {
|
|
1529
1529
|
return e.map(function(r) {
|
|
1530
1530
|
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) {
|
|
1531
1531
|
return "".concat(t, " ").concat(n);
|
|
1532
|
-
})), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children =
|
|
1532
|
+
})), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = mn(r.children, t)), r;
|
|
1533
1533
|
});
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1536
|
-
var t, r, n, o =
|
|
1537
|
-
return S.startsWith(r) && S.endsWith(r) && S.replaceAll(r, "").length > 0 ? ".".concat(t) :
|
|
1535
|
+
function ua(e) {
|
|
1536
|
+
var t, r, n, o = Te, c = o.options, u = c === void 0 ? Te : c, d = o.plugins, h = d === void 0 ? pt : d, b = function(k, w, S) {
|
|
1537
|
+
return S.startsWith(r) && S.endsWith(r) && S.replaceAll(r, "").length > 0 ? ".".concat(t) : k;
|
|
1538
1538
|
}, g = h.slice();
|
|
1539
|
-
g.push(function(
|
|
1540
|
-
|
|
1541
|
-
}), u.prefix && g.push(
|
|
1542
|
-
var p = function(
|
|
1543
|
-
|
|
1544
|
-
var v =
|
|
1545
|
-
u.namespace && (a =
|
|
1539
|
+
g.push(function(k) {
|
|
1540
|
+
k.type === it && k.value.includes("&") && (k.props[0] = k.props[0].replace(la, r).replace(n, b));
|
|
1541
|
+
}), u.prefix && g.push(Do), g.push(_o);
|
|
1542
|
+
var p = function(k, w, S, j) {
|
|
1543
|
+
w === void 0 && (w = ""), S === void 0 && (S = ""), j === void 0 && (j = "&"), t = j, r = w, n = new RegExp("\\".concat(r, "\\b"), "g");
|
|
1544
|
+
var v = k.replace(da, ""), a = Eo(S || w ? "".concat(S, " ").concat(w, " { ").concat(v, " }") : v);
|
|
1545
|
+
u.namespace && (a = mn(a, u.namespace));
|
|
1546
1546
|
var i = [];
|
|
1547
|
-
return
|
|
1547
|
+
return rt(a, Ro(g.concat(Po(function(s) {
|
|
1548
1548
|
return i.push(s);
|
|
1549
1549
|
})))), i;
|
|
1550
1550
|
};
|
|
1551
|
-
return p.hash = h.length ? h.reduce(function(
|
|
1552
|
-
return
|
|
1553
|
-
},
|
|
1551
|
+
return p.hash = h.length ? h.reduce(function(k, w) {
|
|
1552
|
+
return w.name || Fe(15), Se(k, w.name);
|
|
1553
|
+
}, sn).toString() : "", p;
|
|
1554
1554
|
}
|
|
1555
|
-
var
|
|
1556
|
-
|
|
1555
|
+
var pa = new hn(), Nt = ua(), gn = F.createContext({ shouldForwardProp: void 0, styleSheet: pa, stylis: Nt });
|
|
1556
|
+
gn.Consumer;
|
|
1557
1557
|
F.createContext(void 0);
|
|
1558
|
-
function
|
|
1559
|
-
return
|
|
1558
|
+
function vr() {
|
|
1559
|
+
return qr(gn);
|
|
1560
1560
|
}
|
|
1561
|
-
var
|
|
1561
|
+
var fa = function() {
|
|
1562
1562
|
function e(t, r) {
|
|
1563
1563
|
var n = this;
|
|
1564
1564
|
this.inject = function(o, c) {
|
|
1565
|
-
c === void 0 && (c =
|
|
1565
|
+
c === void 0 && (c = Nt);
|
|
1566
1566
|
var u = n.name + c.hash;
|
|
1567
1567
|
o.hasNameForId(n.id, u) || o.insertRules(n.id, u, c(n.rules, u, "@keyframes"));
|
|
1568
|
-
}, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = r,
|
|
1569
|
-
throw
|
|
1568
|
+
}, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = r, qt(this, function() {
|
|
1569
|
+
throw Fe(12, String(n.name));
|
|
1570
1570
|
});
|
|
1571
1571
|
}
|
|
1572
1572
|
return e.prototype.getName = function(t) {
|
|
1573
|
-
return t === void 0 && (t =
|
|
1573
|
+
return t === void 0 && (t = Nt), this.name + t.hash;
|
|
1574
1574
|
}, e;
|
|
1575
|
-
}(),
|
|
1575
|
+
}(), ha = function(e) {
|
|
1576
1576
|
return e >= "A" && e <= "Z";
|
|
1577
1577
|
};
|
|
1578
|
-
function
|
|
1578
|
+
function $r(e) {
|
|
1579
1579
|
for (var t = "", r = 0; r < e.length; r++) {
|
|
1580
1580
|
var n = e[r];
|
|
1581
1581
|
if (r === 1 && n === "-" && e[0] === "-") return e;
|
|
1582
|
-
|
|
1582
|
+
ha(n) ? t += "-" + n.toLowerCase() : t += n;
|
|
1583
1583
|
}
|
|
1584
1584
|
return t.startsWith("ms-") ? "-" + t : t;
|
|
1585
1585
|
}
|
|
1586
|
-
var
|
|
1586
|
+
var bn = function(e) {
|
|
1587
1587
|
return e == null || e === !1 || e === "";
|
|
1588
|
-
},
|
|
1588
|
+
}, yn = function(e) {
|
|
1589
1589
|
var t, r, n = [];
|
|
1590
1590
|
for (var o in e) {
|
|
1591
1591
|
var c = e[o];
|
|
1592
|
-
e.hasOwnProperty(o) && !
|
|
1592
|
+
e.hasOwnProperty(o) && !bn(c) && (Array.isArray(c) && c.isCss || Ae(c) ? n.push("".concat($r(o), ":"), c, ";") : Le(c) ? n.push.apply(n, tt(tt(["".concat(o, " {")], yn(c), !1), ["}"], !1)) : n.push("".concat($r(o), ": ").concat((t = o, (r = c) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || t in zo || t.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";")));
|
|
1593
1593
|
}
|
|
1594
1594
|
return n;
|
|
1595
1595
|
};
|
|
1596
1596
|
function xe(e, t, r, n) {
|
|
1597
|
-
if (
|
|
1598
|
-
if (
|
|
1597
|
+
if (bn(e)) return [];
|
|
1598
|
+
if (Ht(e)) return [".".concat(e.styledComponentId)];
|
|
1599
1599
|
if (Ae(e)) {
|
|
1600
1600
|
if (!Ae(c = e) || c.prototype && c.prototype.isReactComponent || !t) return [e];
|
|
1601
1601
|
var o = e(t);
|
|
1602
1602
|
return xe(o, t, r, n);
|
|
1603
1603
|
}
|
|
1604
1604
|
var c;
|
|
1605
|
-
return e instanceof
|
|
1605
|
+
return e instanceof fa ? r ? (e.inject(r, n), [e.getName(n)]) : [e] : Le(e) ? yn(e) : Array.isArray(e) ? Array.prototype.concat.apply(pt, e.map(function(u) {
|
|
1606
1606
|
return xe(u, t, r, n);
|
|
1607
1607
|
})) : [e.toString()];
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function ma(e) {
|
|
1610
1610
|
for (var t = 0; t < e.length; t += 1) {
|
|
1611
1611
|
var r = e[t];
|
|
1612
|
-
if (Ae(r) && !
|
|
1612
|
+
if (Ae(r) && !Ht(r)) return !1;
|
|
1613
1613
|
}
|
|
1614
1614
|
return !0;
|
|
1615
1615
|
}
|
|
1616
|
-
var
|
|
1616
|
+
var ga = cn(ut), ba = function() {
|
|
1617
1617
|
function e(t, r, n) {
|
|
1618
|
-
this.rules = t, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) &&
|
|
1618
|
+
this.rules = t, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) && ma(t), this.componentId = r, this.baseHash = Se(ga, r), this.baseStyle = n, hn.registerId(r);
|
|
1619
1619
|
}
|
|
1620
1620
|
return e.prototype.generateAndInjectStyles = function(t, r, n) {
|
|
1621
1621
|
var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, r, n) : "";
|
|
1622
1622
|
if (this.isStatic && !n.hash) if (this.staticRulesId && r.hasNameForId(this.componentId, this.staticRulesId)) o = be(o, this.staticRulesId);
|
|
1623
1623
|
else {
|
|
1624
|
-
var c =
|
|
1624
|
+
var c = xr(xe(this.rules, t, r, n)), u = zt(Se(this.baseHash, c) >>> 0);
|
|
1625
1625
|
if (!r.hasNameForId(this.componentId, u)) {
|
|
1626
1626
|
var d = n(c, ".".concat(u), void 0, this.componentId);
|
|
1627
1627
|
r.insertRules(this.componentId, u, d);
|
|
@@ -1629,112 +1629,112 @@ var ma = sn(dt), ga = function() {
|
|
|
1629
1629
|
o = be(o, u), this.staticRulesId = u;
|
|
1630
1630
|
}
|
|
1631
1631
|
else {
|
|
1632
|
-
for (var h =
|
|
1632
|
+
for (var h = Se(this.baseHash, n.hash), b = "", g = 0; g < this.rules.length; g++) {
|
|
1633
1633
|
var p = this.rules[g];
|
|
1634
1634
|
if (typeof p == "string") b += p;
|
|
1635
1635
|
else if (p) {
|
|
1636
|
-
var
|
|
1637
|
-
h =
|
|
1636
|
+
var k = xr(xe(p, t, r, n));
|
|
1637
|
+
h = Se(h, k + g), b += k;
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
1640
1640
|
if (b) {
|
|
1641
|
-
var
|
|
1642
|
-
r.hasNameForId(this.componentId,
|
|
1641
|
+
var w = zt(h >>> 0);
|
|
1642
|
+
r.hasNameForId(this.componentId, w) || r.insertRules(this.componentId, w, n(b, ".".concat(w), void 0, this.componentId)), o = be(o, w);
|
|
1643
1643
|
}
|
|
1644
1644
|
}
|
|
1645
1645
|
return o;
|
|
1646
1646
|
}, e;
|
|
1647
|
-
}(),
|
|
1648
|
-
|
|
1649
|
-
var
|
|
1650
|
-
function
|
|
1651
|
-
var n =
|
|
1652
|
-
var x = typeof f != "string" ? "sc" :
|
|
1653
|
-
|
|
1654
|
-
var y = "".concat(x, "-").concat(
|
|
1647
|
+
}(), xn = F.createContext(void 0);
|
|
1648
|
+
xn.Consumer;
|
|
1649
|
+
var $t = {};
|
|
1650
|
+
function ya(e, t, r) {
|
|
1651
|
+
var n = Ht(e), o = e, c = !vt(e), u = t.attrs, d = u === void 0 ? pt : u, h = t.componentId, b = h === void 0 ? function(f, m) {
|
|
1652
|
+
var x = typeof f != "string" ? "sc" : hr(f);
|
|
1653
|
+
$t[x] = ($t[x] || 0) + 1;
|
|
1654
|
+
var y = "".concat(x, "-").concat(Ko(ut + x + $t[x]));
|
|
1655
1655
|
return m ? "".concat(m, "-").concat(y) : y;
|
|
1656
1656
|
}(t.displayName, t.parentComponentId) : h, g = t.displayName, p = g === void 0 ? function(f) {
|
|
1657
|
-
return
|
|
1658
|
-
}(e) : g,
|
|
1657
|
+
return vt(f) ? "styled.".concat(f) : "Styled(".concat(Wo(f), ")");
|
|
1658
|
+
}(e) : g, k = t.displayName && t.componentId ? "".concat(hr(t.displayName), "-").concat(t.componentId) : t.componentId || b, w = n && o.attrs ? o.attrs.concat(d).filter(Boolean) : d, S = t.shouldForwardProp;
|
|
1659
1659
|
if (n && o.shouldForwardProp) {
|
|
1660
|
-
var
|
|
1660
|
+
var j = o.shouldForwardProp;
|
|
1661
1661
|
if (t.shouldForwardProp) {
|
|
1662
1662
|
var v = t.shouldForwardProp;
|
|
1663
1663
|
S = function(f, m) {
|
|
1664
|
-
return
|
|
1664
|
+
return j(f, m) && v(f, m);
|
|
1665
1665
|
};
|
|
1666
|
-
} else S =
|
|
1666
|
+
} else S = j;
|
|
1667
1667
|
}
|
|
1668
|
-
var a = new
|
|
1668
|
+
var a = new ba(r, k, n ? o.componentStyle : void 0);
|
|
1669
1669
|
function i(f, m) {
|
|
1670
|
-
return function(x, y,
|
|
1671
|
-
var
|
|
1672
|
-
for (var le, de = te(te({},
|
|
1673
|
-
var me = Ae(le =
|
|
1670
|
+
return function(x, y, T) {
|
|
1671
|
+
var E = x.attrs, z = x.componentStyle, R = x.defaultProps, K = x.foldedComponentIds, C = x.styledComponentId, W = x.target, I = F.useContext(xn), D = vr(), H = x.shouldForwardProp || D.shouldForwardProp, $ = No(y, I, R) || Te, P = function(q, V, J) {
|
|
1672
|
+
for (var le, de = te(te({}, V), { className: void 0, theme: J }), Re = 0; Re < q.length; Re += 1) {
|
|
1673
|
+
var me = Ae(le = q[Re]) ? le(de) : le;
|
|
1674
1674
|
for (var X in me) de[X] = X === "className" ? be(de[X], me[X]) : X === "style" ? te(te({}, de[X]), me[X]) : me[X];
|
|
1675
1675
|
}
|
|
1676
|
-
return
|
|
1677
|
-
}(
|
|
1678
|
-
for (var
|
|
1679
|
-
var Y = function(
|
|
1680
|
-
var J =
|
|
1676
|
+
return V.className && (de.className = be(de.className, V.className)), de;
|
|
1677
|
+
}(E, y, $), O = P.as || W, L = {};
|
|
1678
|
+
for (var _ in P) P[_] === void 0 || _[0] === "$" || _ === "as" || _ === "theme" && P.theme === $ || (_ === "forwardedAs" ? L.as = P.forwardedAs : H && !H(_, O) || (L[_] = P[_]));
|
|
1679
|
+
var Y = function(q, V) {
|
|
1680
|
+
var J = vr(), le = q.generateAndInjectStyles(V, J.styleSheet, J.stylis);
|
|
1681
1681
|
return le;
|
|
1682
|
-
}(
|
|
1683
|
-
return Y && (
|
|
1682
|
+
}(z, P), N = be(K, C);
|
|
1683
|
+
return Y && (N += " " + Y), P.className && (N += " " + P.className), L[vt(O) && !an.has(O) ? "class" : "className"] = N, T && (L.ref = T), et(O, L);
|
|
1684
1684
|
}(s, f, m);
|
|
1685
1685
|
}
|
|
1686
1686
|
i.displayName = p;
|
|
1687
1687
|
var s = F.forwardRef(i);
|
|
1688
|
-
return s.attrs =
|
|
1688
|
+
return s.attrs = w, s.componentStyle = a, s.displayName = p, s.shouldForwardProp = S, s.foldedComponentIds = n ? be(o.foldedComponentIds, o.styledComponentId) : "", s.styledComponentId = k, s.target = n ? o.target : e, Object.defineProperty(s, "defaultProps", { get: function() {
|
|
1689
1689
|
return this._foldedDefaultProps;
|
|
1690
1690
|
}, set: function(f) {
|
|
1691
1691
|
this._foldedDefaultProps = n ? function(m) {
|
|
1692
1692
|
for (var x = [], y = 1; y < arguments.length; y++) x[y - 1] = arguments[y];
|
|
1693
|
-
for (var
|
|
1693
|
+
for (var T = 0, E = x; T < E.length; T++) Ot(m, E[T], !0);
|
|
1694
1694
|
return m;
|
|
1695
1695
|
}({}, o.defaultProps, f) : f;
|
|
1696
|
-
} }),
|
|
1696
|
+
} }), qt(s, function() {
|
|
1697
1697
|
return ".".concat(s.styledComponentId);
|
|
1698
|
-
}), c &&
|
|
1698
|
+
}), c && pn(s, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), s;
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1700
|
+
function Sr(e, t) {
|
|
1701
1701
|
for (var r = [e[0]], n = 0, o = t.length; n < o; n += 1) r.push(t[n], e[n + 1]);
|
|
1702
1702
|
return r;
|
|
1703
1703
|
}
|
|
1704
|
-
var
|
|
1704
|
+
var Cr = function(e) {
|
|
1705
1705
|
return Object.assign(e, { isCss: !0 });
|
|
1706
1706
|
};
|
|
1707
|
-
function
|
|
1707
|
+
function xa(e) {
|
|
1708
1708
|
for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
|
|
1709
|
-
if (Ae(e) ||
|
|
1709
|
+
if (Ae(e) || Le(e)) return Cr(xe(Sr(pt, tt([e], t, !0))));
|
|
1710
1710
|
var n = e;
|
|
1711
|
-
return t.length === 0 && n.length === 1 && typeof n[0] == "string" ? xe(n) :
|
|
1711
|
+
return t.length === 0 && n.length === 1 && typeof n[0] == "string" ? xe(n) : Cr(xe(Sr(n, t)));
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1714
|
-
if (r === void 0 && (r =
|
|
1713
|
+
function Bt(e, t, r) {
|
|
1714
|
+
if (r === void 0 && (r = Te), !t) throw Fe(1, t);
|
|
1715
1715
|
var n = function(o) {
|
|
1716
1716
|
for (var c = [], u = 1; u < arguments.length; u++) c[u - 1] = arguments[u];
|
|
1717
|
-
return e(t, r,
|
|
1717
|
+
return e(t, r, xa.apply(void 0, tt([o], c, !1)));
|
|
1718
1718
|
};
|
|
1719
1719
|
return n.attrs = function(o) {
|
|
1720
|
-
return
|
|
1720
|
+
return Bt(e, t, te(te({}, r), { attrs: Array.prototype.concat(r.attrs, o).filter(Boolean) }));
|
|
1721
1721
|
}, n.withConfig = function(o) {
|
|
1722
|
-
return
|
|
1722
|
+
return Bt(e, t, te(te({}, r), o));
|
|
1723
1723
|
}, n;
|
|
1724
1724
|
}
|
|
1725
|
-
var
|
|
1726
|
-
return
|
|
1727
|
-
},
|
|
1728
|
-
|
|
1729
|
-
|
|
1725
|
+
var wn = function(e) {
|
|
1726
|
+
return Bt(ya, e);
|
|
1727
|
+
}, A = wn;
|
|
1728
|
+
an.forEach(function(e) {
|
|
1729
|
+
A[e] = wn(e);
|
|
1730
1730
|
});
|
|
1731
|
-
const
|
|
1731
|
+
const wa = A.div`
|
|
1732
1732
|
display: flex;
|
|
1733
1733
|
align-items: center;
|
|
1734
1734
|
gap: 4px;
|
|
1735
1735
|
margin-top: 6px;
|
|
1736
1736
|
padding-left: 2px;
|
|
1737
|
-
`,
|
|
1737
|
+
`, jr = A.button`
|
|
1738
1738
|
cursor: pointer;
|
|
1739
1739
|
display: inline-flex;
|
|
1740
1740
|
align-items: center;
|
|
@@ -1773,7 +1773,7 @@ function kn({
|
|
|
1773
1773
|
onExportPdf: r
|
|
1774
1774
|
}) {
|
|
1775
1775
|
const [n, o] = F.useState(!1), c = () => {
|
|
1776
|
-
|
|
1776
|
+
Xn(e);
|
|
1777
1777
|
}, u = async () => {
|
|
1778
1778
|
o(!0);
|
|
1779
1779
|
try {
|
|
@@ -1782,37 +1782,37 @@ function kn({
|
|
|
1782
1782
|
o(!1);
|
|
1783
1783
|
}
|
|
1784
1784
|
};
|
|
1785
|
-
return /* @__PURE__ */ l.jsxs(
|
|
1785
|
+
return /* @__PURE__ */ l.jsxs(wa, { children: [
|
|
1786
1786
|
/* @__PURE__ */ l.jsx(
|
|
1787
|
-
|
|
1787
|
+
jr,
|
|
1788
1788
|
{
|
|
1789
1789
|
type: "button",
|
|
1790
1790
|
onClick: c,
|
|
1791
1791
|
disabled: t,
|
|
1792
1792
|
"aria-label": "Copy message",
|
|
1793
1793
|
title: "Copy",
|
|
1794
|
-
children: /* @__PURE__ */ l.jsx(
|
|
1794
|
+
children: /* @__PURE__ */ l.jsx(so, { size: 16, strokeWidth: 1.75 })
|
|
1795
1795
|
}
|
|
1796
1796
|
),
|
|
1797
1797
|
/* @__PURE__ */ l.jsx(
|
|
1798
|
-
|
|
1798
|
+
jr,
|
|
1799
1799
|
{
|
|
1800
1800
|
type: "button",
|
|
1801
1801
|
onClick: () => void u(),
|
|
1802
1802
|
disabled: t || n,
|
|
1803
1803
|
"aria-label": "Download PDF",
|
|
1804
1804
|
title: "Download PDF",
|
|
1805
|
-
children: /* @__PURE__ */ l.jsx(
|
|
1805
|
+
children: /* @__PURE__ */ l.jsx(co, { size: 16, strokeWidth: 1.75 })
|
|
1806
1806
|
}
|
|
1807
1807
|
)
|
|
1808
1808
|
] });
|
|
1809
1809
|
}
|
|
1810
|
-
const ka =
|
|
1810
|
+
const ka = A.div`
|
|
1811
1811
|
display: flex;
|
|
1812
1812
|
flex-wrap: wrap;
|
|
1813
1813
|
gap: 6px;
|
|
1814
1814
|
margin-bottom: 6px;
|
|
1815
|
-
`,
|
|
1815
|
+
`, va = A.div`
|
|
1816
1816
|
display: inline-flex;
|
|
1817
1817
|
align-items: center;
|
|
1818
1818
|
gap: 6px;
|
|
@@ -1829,18 +1829,18 @@ const ka = T.div`
|
|
|
1829
1829
|
border-color: #4b5563;
|
|
1830
1830
|
background: ${(e) => e.$isImage ? "rgba(59, 130, 246, 0.2)" : "rgba(107, 114, 128, 0.25)"};
|
|
1831
1831
|
}
|
|
1832
|
-
`,
|
|
1832
|
+
`, $a = A.img`
|
|
1833
1833
|
width: 28px;
|
|
1834
1834
|
height: 28px;
|
|
1835
1835
|
object-fit: cover;
|
|
1836
1836
|
border-radius: 4px;
|
|
1837
|
-
`,
|
|
1837
|
+
`, Sa = A.span`
|
|
1838
1838
|
overflow: hidden;
|
|
1839
1839
|
text-overflow: ellipsis;
|
|
1840
1840
|
white-space: nowrap;
|
|
1841
1841
|
flex: 1;
|
|
1842
1842
|
min-width: 0;
|
|
1843
|
-
`,
|
|
1843
|
+
`, Ca = A.button`
|
|
1844
1844
|
display: flex;
|
|
1845
1845
|
align-items: center;
|
|
1846
1846
|
justify-content: center;
|
|
@@ -1856,13 +1856,13 @@ const ka = T.div`
|
|
|
1856
1856
|
background: rgba(239, 68, 68, 0.1);
|
|
1857
1857
|
}
|
|
1858
1858
|
`;
|
|
1859
|
-
function
|
|
1859
|
+
function we({ attachments: e, onRemove: t, readOnly: r }) {
|
|
1860
1860
|
return e.length ? /* @__PURE__ */ l.jsx(ka, { children: e.map((n) => {
|
|
1861
1861
|
const o = n.type === "image", c = o && (n.preview || n.url);
|
|
1862
|
-
return /* @__PURE__ */ l.jsxs(
|
|
1863
|
-
c ? /* @__PURE__ */ l.jsx(
|
|
1864
|
-
/* @__PURE__ */ l.jsx(
|
|
1865
|
-
!r && t && /* @__PURE__ */ l.jsx(
|
|
1862
|
+
return /* @__PURE__ */ l.jsxs(va, { $isImage: o, title: n.name, children: [
|
|
1863
|
+
c ? /* @__PURE__ */ l.jsx($a, { src: n.preview || n.url, alt: "", loading: "lazy", decoding: "async" }) : o ? /* @__PURE__ */ l.jsx(fo, { size: 16, "aria-hidden": !0 }) : /* @__PURE__ */ l.jsx(uo, { size: 16, "aria-hidden": !0 }),
|
|
1864
|
+
/* @__PURE__ */ l.jsx(Sa, { children: n.name }),
|
|
1865
|
+
!r && t && /* @__PURE__ */ l.jsx(Ca, { type: "button", onClick: () => t(n.id), "aria-label": `Remove ${n.name}`, children: /* @__PURE__ */ l.jsx(bo, { size: 14 }) })
|
|
1866
1866
|
] }, n.id);
|
|
1867
1867
|
}) }) : null;
|
|
1868
1868
|
}
|
|
@@ -1875,43 +1875,43 @@ function ge() {
|
|
|
1875
1875
|
return e;
|
|
1876
1876
|
}, ge.apply(this, arguments);
|
|
1877
1877
|
}
|
|
1878
|
-
const
|
|
1879
|
-
function
|
|
1880
|
-
return "( *)(" + (e === 1 ?
|
|
1878
|
+
const ja = ["children", "options"], Ir = ["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" }), Tr = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, Ia = ["style", "script", "pre"], Ta = ["src", "href", "data", "formAction", "srcDoc", "action"], Aa = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Ea = /mailto:/i, Ma = /\n{2,}$/, Ar = /^(\s*>[\s\S]*?)(?=\n\n|$)/, _a = /^ *> ?/gm, Ra = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Pa = /^ {2,}\n/, Da = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Er = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Mr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, za = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Oa = /^(?:\n *)*\n/, Na = /\r\n?/g, Ba = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, La = /^\[\^([^\]]+)]/, Fa = /\f/g, Ka = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Wa = /^\s*?\[(x|\s)\]/, _r = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Rr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Pr = /^([^\n]+)\n *(=|-){3,} *\n/, St = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Ua = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Dr = /^<!--[\s\S]*?(?:-->)/, Ha = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Ct = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, qa = /^\{.*\}$/, Ga = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Qa = /^<([^ >]+@[^ >]+)>/, Ya = /^<([^ >]+:\/[^ >]+)>/, Va = /-([a-z])?/gi, zr = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Za = /^[^\n]+(?: \n|\n{2,})/, Ja = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Xa = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, es = /^\[([^\]]*)\] ?\[([^\]]*)\]/, ts = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, rs = /\t/g, ns = /(^ *\||\| *$)/g, os = /^ *:-+: *$/, as = /^ *:-+ *$/, ss = /^ *-+: *$/, ft = (e) => `(?=[\\s\\S]+?\\1${e ? "\\1" : ""})`, ht = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", is = RegExp(`^([*_])\\1${ft(1)}${ht}\\1\\1(?!\\1)`), cs = RegExp(`^([*_])${ft(0)}${ht}\\1(?!\\1)`), ls = RegExp(`^(==)${ft(0)}${ht}\\1`), ds = RegExp(`^(~~)${ft(0)}${ht}\\1`), us = /^(:[a-zA-Z0-9-_]+:)/, ps = /^\\([^0-9A-Za-z\s])/, fs = /\\([^0-9A-Za-z\s])/g, hs = /^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/, ms = /^\n+/, gs = /^([ \t]*)/, bs = /(?:^|\n)( *)$/, Gt = "(?:\\d+\\.)", Qt = "(?:[*+-])";
|
|
1879
|
+
function vn(e) {
|
|
1880
|
+
return "( *)(" + (e === 1 ? Gt : Qt) + ") +";
|
|
1881
1881
|
}
|
|
1882
|
-
const
|
|
1883
|
-
function Sn(e) {
|
|
1884
|
-
return RegExp("^" + (e === 1 ? vn : $n));
|
|
1885
|
-
}
|
|
1886
|
-
const bs = Sn(1), ys = Sn(2);
|
|
1882
|
+
const $n = vn(1), Sn = vn(2);
|
|
1887
1883
|
function Cn(e) {
|
|
1888
|
-
return RegExp("^" + (e === 1 ?
|
|
1884
|
+
return RegExp("^" + (e === 1 ? $n : Sn));
|
|
1889
1885
|
}
|
|
1890
|
-
const
|
|
1886
|
+
const ys = Cn(1), xs = Cn(2);
|
|
1891
1887
|
function jn(e) {
|
|
1892
|
-
|
|
1888
|
+
return RegExp("^" + (e === 1 ? $n : Sn) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Gt : Qt) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
1889
|
+
}
|
|
1890
|
+
const ws = jn(1), ks = jn(2);
|
|
1891
|
+
function In(e) {
|
|
1892
|
+
const t = e === 1 ? Gt : Qt;
|
|
1893
1893
|
return RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
|
|
1894
1894
|
}
|
|
1895
|
-
const
|
|
1896
|
-
function
|
|
1897
|
-
const r = t === 1, n = r ?
|
|
1898
|
-
return { t: (u) => c.test(u), o:
|
|
1899
|
-
const h =
|
|
1895
|
+
const Tn = In(1), An = In(2);
|
|
1896
|
+
function Or(e, t) {
|
|
1897
|
+
const r = t === 1, n = r ? Tn : An, o = r ? ws : ks, c = r ? ys : xs;
|
|
1898
|
+
return { t: (u) => c.test(u), o: Ee(function(u, d) {
|
|
1899
|
+
const h = bs.exec(d.prevCapture);
|
|
1900
1900
|
return h && (d.list || !d.inline && !d.simple) ? n.exec(u = h[1] + u) : null;
|
|
1901
1901
|
}), i: 1, u(u, d, h) {
|
|
1902
|
-
const b = r ? +u[2] : void 0, g = u[0].replace(
|
|
1902
|
+
const b = r ? +u[2] : void 0, g = u[0].replace(Ma, `
|
|
1903
1903
|
`).match(o);
|
|
1904
1904
|
let p = !1;
|
|
1905
|
-
return { items: g.map(function(
|
|
1906
|
-
const S = c.exec(
|
|
1905
|
+
return { items: g.map(function(k, w) {
|
|
1906
|
+
const S = c.exec(k)[0].length, j = RegExp("^ {1," + S + "}", "gm"), v = k.replace(j, "").replace(c, ""), a = w === g.length - 1, i = v.indexOf(`
|
|
1907
1907
|
|
|
1908
1908
|
`) !== -1 || a && p;
|
|
1909
1909
|
p = i;
|
|
1910
1910
|
const s = h.inline, f = h.list;
|
|
1911
1911
|
let m;
|
|
1912
|
-
h.list = !0, i ? (h.inline = !1, m =
|
|
1912
|
+
h.list = !0, i ? (h.inline = !1, m = Be(v) + `
|
|
1913
1913
|
|
|
1914
|
-
`) : (h.inline = !0, m =
|
|
1914
|
+
`) : (h.inline = !0, m = Be(v));
|
|
1915
1915
|
const x = d(m, h);
|
|
1916
1916
|
return h.inline = s, h.list = f, x;
|
|
1917
1917
|
}), ordered: r, start: b };
|
|
@@ -1919,29 +1919,29 @@ function Dr(e, t) {
|
|
|
1919
1919
|
return e("li", { key: g }, d(b, h));
|
|
1920
1920
|
})) };
|
|
1921
1921
|
}
|
|
1922
|
-
const
|
|
1923
|
-
function
|
|
1922
|
+
const vs = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), $s = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
|
|
1923
|
+
function Be(e) {
|
|
1924
1924
|
let t = e.length;
|
|
1925
1925
|
for (; t > 0 && e[t - 1] <= " "; ) t--;
|
|
1926
1926
|
return e.slice(0, t);
|
|
1927
1927
|
}
|
|
1928
|
-
function
|
|
1928
|
+
function Je(e, t) {
|
|
1929
1929
|
return e.startsWith(t);
|
|
1930
1930
|
}
|
|
1931
|
-
function
|
|
1931
|
+
function Ss(e, t, r) {
|
|
1932
1932
|
if (Array.isArray(r)) {
|
|
1933
|
-
for (let n = 0; n < r.length; n++) if (
|
|
1933
|
+
for (let n = 0; n < r.length; n++) if (Je(e, r[n])) return !0;
|
|
1934
1934
|
return !1;
|
|
1935
1935
|
}
|
|
1936
1936
|
return r(e, t);
|
|
1937
1937
|
}
|
|
1938
|
-
function
|
|
1938
|
+
function De(e) {
|
|
1939
1939
|
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();
|
|
1940
1940
|
}
|
|
1941
|
-
function
|
|
1942
|
-
return
|
|
1941
|
+
function Cs(e) {
|
|
1942
|
+
return ss.test(e) ? "right" : os.test(e) ? "center" : as.test(e) ? "left" : null;
|
|
1943
1943
|
}
|
|
1944
|
-
function
|
|
1944
|
+
function Nr(e, t, r, n) {
|
|
1945
1945
|
const o = r.inTable;
|
|
1946
1946
|
r.inTable = !0;
|
|
1947
1947
|
let c = [[]], u = "";
|
|
@@ -1954,29 +1954,29 @@ function Or(e, t, r, n) {
|
|
|
1954
1954
|
h.trim() === "|" && (d(), n) ? b !== 0 && b !== g.length - 1 && c.push([]) : u += h;
|
|
1955
1955
|
}), d(), r.inTable = o, c;
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1957
|
+
function js(e, t, r) {
|
|
1958
1958
|
r.inline = !0;
|
|
1959
|
-
const n = e[2] ? e[2].replace(
|
|
1959
|
+
const n = e[2] ? e[2].replace(ns, "").split("|").map(Cs) : [], o = e[3] ? function(u, d, h) {
|
|
1960
1960
|
return u.trim().split(`
|
|
1961
1961
|
`).map(function(b) {
|
|
1962
|
-
return
|
|
1962
|
+
return Nr(b, d, h, !0);
|
|
1963
1963
|
});
|
|
1964
|
-
}(e[3], t, r) : [], c =
|
|
1964
|
+
}(e[3], t, r) : [], c = Nr(e[1], t, r, !!o.length);
|
|
1965
1965
|
return r.inline = !1, o.length ? { align: n, cells: o, header: c, type: "25" } : { children: c, type: "21" };
|
|
1966
1966
|
}
|
|
1967
|
-
function
|
|
1967
|
+
function Br(e, t) {
|
|
1968
1968
|
return e.align[t] == null ? {} : { textAlign: e.align[t] };
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1970
|
+
function Ee(e) {
|
|
1971
1971
|
return e.inline = 1, e;
|
|
1972
1972
|
}
|
|
1973
1973
|
function ue(e) {
|
|
1974
|
-
return
|
|
1974
|
+
return Ee(function(t, r) {
|
|
1975
1975
|
return r.inline ? e.exec(t) : null;
|
|
1976
1976
|
});
|
|
1977
1977
|
}
|
|
1978
1978
|
function pe(e) {
|
|
1979
|
-
return
|
|
1979
|
+
return Ee(function(t, r) {
|
|
1980
1980
|
return r.inline || r.simple ? e.exec(t) : null;
|
|
1981
1981
|
});
|
|
1982
1982
|
}
|
|
@@ -1985,25 +1985,25 @@ function ie(e) {
|
|
|
1985
1985
|
return r.inline || r.simple ? null : e.exec(t);
|
|
1986
1986
|
};
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1989
|
-
return
|
|
1988
|
+
function He(e) {
|
|
1989
|
+
return Ee(function(t) {
|
|
1990
1990
|
return e.exec(t);
|
|
1991
1991
|
});
|
|
1992
1992
|
}
|
|
1993
|
-
const
|
|
1994
|
-
function
|
|
1993
|
+
const Is = /(javascript|vbscript|data(?!:image)):/i;
|
|
1994
|
+
function Ts(e) {
|
|
1995
1995
|
try {
|
|
1996
1996
|
const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
|
1997
|
-
if (
|
|
1997
|
+
if (Is.test(t)) return null;
|
|
1998
1998
|
} catch {
|
|
1999
1999
|
return null;
|
|
2000
2000
|
}
|
|
2001
2001
|
return e;
|
|
2002
2002
|
}
|
|
2003
2003
|
function oe(e) {
|
|
2004
|
-
return e && e.replace(
|
|
2004
|
+
return e && e.replace(fs, "$1");
|
|
2005
2005
|
}
|
|
2006
|
-
function
|
|
2006
|
+
function Xe(e, t, r) {
|
|
2007
2007
|
const n = r.inline || !1, o = r.simple || !1;
|
|
2008
2008
|
r.inline = !0, r.simple = !0;
|
|
2009
2009
|
const c = e(t, r);
|
|
@@ -2015,20 +2015,20 @@ function As(e, t, r) {
|
|
|
2015
2015
|
const c = e(t, r);
|
|
2016
2016
|
return r.inline = n, r.simple = o, c;
|
|
2017
2017
|
}
|
|
2018
|
-
function
|
|
2018
|
+
function Es(e, t, r) {
|
|
2019
2019
|
const n = r.inline || !1;
|
|
2020
2020
|
r.inline = !1;
|
|
2021
2021
|
const o = e(t, r);
|
|
2022
2022
|
return r.inline = n, o;
|
|
2023
2023
|
}
|
|
2024
|
-
const
|
|
2025
|
-
function
|
|
2024
|
+
const jt = (e, t, r) => ({ children: Xe(t, e[2], r) });
|
|
2025
|
+
function It() {
|
|
2026
2026
|
return {};
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function Tt() {
|
|
2029
2029
|
return null;
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function Ms(...e) {
|
|
2032
2032
|
return e.filter(Boolean).join(" ");
|
|
2033
2033
|
}
|
|
2034
2034
|
function At(e, t, r) {
|
|
@@ -2038,20 +2038,20 @@ function At(e, t, r) {
|
|
|
2038
2038
|
return n || r;
|
|
2039
2039
|
}
|
|
2040
2040
|
function _s(e = "", t = {}) {
|
|
2041
|
-
t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? ge({},
|
|
2042
|
-
const r = t.slugify ||
|
|
2041
|
+
t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? ge({}, Tr, t.namedCodesToUnicode) : Tr;
|
|
2042
|
+
const r = t.slugify || De, n = t.sanitizer || Ts, o = t.createElement || Lt.createElement, c = [Ar, Er, Mr, t.enforceAtxHeadings ? Rr : _r, Pr, zr, Tn, An], u = [...c, Za, St, Dr, Ct];
|
|
2043
2043
|
function d(a, i, ...s) {
|
|
2044
2044
|
const f = At(t.overrides, a + ".props", {});
|
|
2045
2045
|
return o(function(m, x) {
|
|
2046
2046
|
const y = At(x, m);
|
|
2047
2047
|
return y ? typeof y == "function" || typeof y == "object" && "render" in y ? y : At(x, m + ".component", m) : m;
|
|
2048
|
-
}(a, t.overrides), ge({}, i, f, { className:
|
|
2048
|
+
}(a, t.overrides), ge({}, i, f, { className: Ms(i == null ? void 0 : i.className, f.className) || void 0 }), ...s);
|
|
2049
2049
|
}
|
|
2050
2050
|
function h(a) {
|
|
2051
|
-
a = a.replace(
|
|
2051
|
+
a = a.replace(Ka, "");
|
|
2052
2052
|
let i = !1;
|
|
2053
|
-
t.forceInline ? i = !0 : t.forceBlock || (i =
|
|
2054
|
-
const s = S(
|
|
2053
|
+
t.forceInline ? i = !0 : t.forceBlock || (i = ts.test(a) === !1);
|
|
2054
|
+
const s = S(w(i ? a : Be(a).replace(ms, "") + `
|
|
2055
2055
|
|
|
2056
2056
|
`, { inline: i }));
|
|
2057
2057
|
for (; typeof s[s.length - 1] == "string" && !s[s.length - 1].trim(); ) s.pop();
|
|
@@ -2071,80 +2071,80 @@ function _s(e = "", t = {}) {
|
|
|
2071
2071
|
return s ? s.reduce(function(f, m) {
|
|
2072
2072
|
const x = m.indexOf("=");
|
|
2073
2073
|
if (x !== -1) {
|
|
2074
|
-
const y = function(
|
|
2075
|
-
return
|
|
2076
|
-
return
|
|
2077
|
-
})),
|
|
2078
|
-
}(m.slice(0, x)).trim(),
|
|
2079
|
-
const K =
|
|
2080
|
-
return (K === '"' || K === "'") &&
|
|
2081
|
-
}(m.slice(x + 1).trim()),
|
|
2082
|
-
if (
|
|
2083
|
-
const
|
|
2074
|
+
const y = function(R) {
|
|
2075
|
+
return R.indexOf("-") !== -1 && R.match(Ha) === null && (R = R.replace(Va, function(K, C) {
|
|
2076
|
+
return C.toUpperCase();
|
|
2077
|
+
})), R;
|
|
2078
|
+
}(m.slice(0, x)).trim(), T = function(R) {
|
|
2079
|
+
const K = R[0];
|
|
2080
|
+
return (K === '"' || K === "'") && R.length >= 2 && R[R.length - 1] === K ? R.slice(1, -1) : R;
|
|
2081
|
+
}(m.slice(x + 1).trim()), E = Ir[y] || y;
|
|
2082
|
+
if (E === "ref") return f;
|
|
2083
|
+
const z = f[E] = function(R, K, C, W) {
|
|
2084
2084
|
return K === "style" ? function(I) {
|
|
2085
|
-
const
|
|
2086
|
-
let
|
|
2087
|
-
if (!I) return
|
|
2088
|
-
for (let
|
|
2089
|
-
const Y = I[
|
|
2090
|
-
if (Y !== '"' && Y !== "'" || $ || (P ? Y ===
|
|
2085
|
+
const D = [];
|
|
2086
|
+
let H = "", $ = !1, P = !1, O = "";
|
|
2087
|
+
if (!I) return D;
|
|
2088
|
+
for (let _ = 0; _ < I.length; _++) {
|
|
2089
|
+
const Y = I[_];
|
|
2090
|
+
if (Y !== '"' && Y !== "'" || $ || (P ? Y === O && (P = !1, O = "") : (P = !0, O = Y)), Y === "(" && H.endsWith("url") ? $ = !0 : Y === ")" && $ && ($ = !1), Y !== ";" || P || $) H += Y;
|
|
2091
2091
|
else {
|
|
2092
|
-
const
|
|
2093
|
-
if (
|
|
2094
|
-
const
|
|
2095
|
-
if (
|
|
2096
|
-
const
|
|
2097
|
-
|
|
2092
|
+
const N = H.trim();
|
|
2093
|
+
if (N) {
|
|
2094
|
+
const q = N.indexOf(":");
|
|
2095
|
+
if (q > 0) {
|
|
2096
|
+
const V = N.slice(0, q).trim(), J = N.slice(q + 1).trim();
|
|
2097
|
+
D.push([V, J]);
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
2100
|
-
|
|
2100
|
+
H = "";
|
|
2101
2101
|
}
|
|
2102
2102
|
}
|
|
2103
|
-
const
|
|
2104
|
-
if (
|
|
2105
|
-
const
|
|
2106
|
-
if (
|
|
2107
|
-
const Y =
|
|
2108
|
-
|
|
2103
|
+
const L = H.trim();
|
|
2104
|
+
if (L) {
|
|
2105
|
+
const _ = L.indexOf(":");
|
|
2106
|
+
if (_ > 0) {
|
|
2107
|
+
const Y = L.slice(0, _).trim(), N = L.slice(_ + 1).trim();
|
|
2108
|
+
D.push([Y, N]);
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
|
-
return
|
|
2112
|
-
}(
|
|
2113
|
-
return I[
|
|
2114
|
-
}, {}) :
|
|
2115
|
-
}(a, y,
|
|
2116
|
-
typeof
|
|
2117
|
-
} else m !== "style" && (f[
|
|
2111
|
+
return D;
|
|
2112
|
+
}(C).reduce(function(I, [D, H]) {
|
|
2113
|
+
return I[D.replace(/(-[a-z])/g, ($) => $[1].toUpperCase())] = W(H, R, D), I;
|
|
2114
|
+
}, {}) : Ta.indexOf(K) !== -1 ? W(oe(C), R, K) : (C.match(qa) && (C = oe(C.slice(1, C.length - 1))), C === "true" || C !== "false" && C);
|
|
2115
|
+
}(a, y, T, n);
|
|
2116
|
+
typeof z == "string" && (St.test(z) || Ct.test(z)) && (f[E] = h(z.trim()));
|
|
2117
|
+
} else m !== "style" && (f[Ir[m] || m] = !0);
|
|
2118
2118
|
return f;
|
|
2119
2119
|
}, {}) : null;
|
|
2120
2120
|
}
|
|
2121
|
-
const g = [], p = {},
|
|
2122
|
-
const [, f, m] = a[0].replace(_a, "").match(
|
|
2121
|
+
const g = [], p = {}, k = { 0: { t: [">"], o: ie(Ar), i: 1, u(a, i, s) {
|
|
2122
|
+
const [, f, m] = a[0].replace(_a, "").match(Ra);
|
|
2123
2123
|
return { alert: f, children: i(m, s) };
|
|
2124
2124
|
}, l(a, i, s) {
|
|
2125
2125
|
const f = { key: s.key };
|
|
2126
|
-
return a.alert && (f.className = "markdown-alert-" + r(a.alert.toLowerCase(),
|
|
2127
|
-
} }, 1: { o:
|
|
2126
|
+
return a.alert && (f.className = "markdown-alert-" + r(a.alert.toLowerCase(), De), a.children.unshift({ attrs: {}, children: [{ type: "27", text: a.alert }], noInnerParse: !0, type: "11", tag: "header" })), d("blockquote", f, i(a.children, s));
|
|
2127
|
+
} }, 1: { o: He(Pa), i: 1, u: It, l: (a, i, s) => d("br", { key: s.key }) }, 2: { t: (a) => {
|
|
2128
2128
|
const i = a[0];
|
|
2129
2129
|
return i === "-" || i === "*" || i === "_";
|
|
2130
|
-
}, o: ie(
|
|
2131
|
-
const [, f] = a[3].match(
|
|
2132
|
-
var
|
|
2133
|
-
const
|
|
2134
|
-
if (s.inAnchor = s.inAnchor ||
|
|
2130
|
+
}, o: ie(Da), i: 1, u: It, l: (a, i, s) => d("hr", { key: s.key }) }, 3: { t: [" "], o: ie(Mr), i: 0, u: (a) => ({ lang: void 0, text: oe(Be(a[0].replace(/^ {4}/gm, ""))) }), l: (a, i, s) => d("pre", { key: s.key }, d("code", ge({}, a.attrs, { className: a.lang ? "lang-" + a.lang : "" }), a.text)) }, 4: { t: ["```", "~~~"], o: ie(Er), i: 0, u: (a) => ({ attrs: b("code", a[3] || ""), lang: a[2] || void 0, text: a[4], type: "3" }) }, 5: { t: ["`"], o: pe(za), i: 3, u: (a) => ({ text: oe(a[2]) }), l: (a, i, s) => d("code", { key: s.key }, a.text) }, 6: { t: ["[^"], o: ie(Ba), i: 0, u: (a) => (g.push({ footnote: a[2], identifier: a[1] }), {}), l: Tt }, 7: { t: ["[^"], o: ue(La), i: 1, u: (a) => ({ target: "#" + r(a[1], De), text: a[1] }), l: (a, i, s) => d("a", { key: s.key, href: n(a.target, "a", "href") }, d("sup", { key: s.key }, a.text)) }, 8: { t: ["[ ]", "[x]"], o: ue(Wa), i: 1, u: (a) => ({ completed: a[1].toLowerCase() === "x" }), l: (a, i, s) => d("input", { checked: a.completed, key: s.key, readOnly: !0, type: "checkbox" }) }, 9: { t: ["#"], o: ie(t.enforceAtxHeadings ? Rr : _r), i: 1, u: (a, i, s) => ({ children: Xe(i, a[2], s), id: r(a[2], De), level: a[1].length }), l: (a, i, s) => d("h" + a.level, { id: a.id, key: s.key }, i(a.children, s)) }, 10: { o: ie(Pr), i: 0, u: (a, i, s) => ({ children: Xe(i, a[1], s), level: a[2] === "=" ? 1 : 2, type: "9" }) }, 11: { t: ["<"], o: He(St), i: 1, u(a, i, s) {
|
|
2131
|
+
const [, f] = a[3].match(gs), m = RegExp("^" + f, "gm"), x = a[3].replace(m, ""), y = (T = x, u.some((C) => C.test(T)) ? Es : Xe);
|
|
2132
|
+
var T;
|
|
2133
|
+
const E = a[1].toLowerCase(), z = Ia.indexOf(E) !== -1, R = (z ? E : a[1]).trim(), K = { attrs: b(R, a[2]), noInnerParse: z, tag: R };
|
|
2134
|
+
if (s.inAnchor = s.inAnchor || E === "a", z) K.text = a[3];
|
|
2135
2135
|
else {
|
|
2136
|
-
const
|
|
2137
|
-
s.inHTML = !0, K.children = y(i, x, s), s.inHTML =
|
|
2136
|
+
const C = s.inHTML;
|
|
2137
|
+
s.inHTML = !0, K.children = y(i, x, s), s.inHTML = C;
|
|
2138
2138
|
}
|
|
2139
2139
|
return s.inAnchor = !1, K;
|
|
2140
|
-
}, l: (a, i, s) => d(a.tag, ge({ key: s.key }, a.attrs), a.text || (a.children ? i(a.children, s) : "")) }, 13: { t: ["<"], o:
|
|
2140
|
+
}, l: (a, i, s) => d(a.tag, ge({ key: s.key }, a.attrs), a.text || (a.children ? i(a.children, s) : "")) }, 13: { t: ["<"], o: He(Ct), i: 1, u(a) {
|
|
2141
2141
|
const i = a[1].trim();
|
|
2142
2142
|
return { attrs: b(i, a[2] || ""), tag: i };
|
|
2143
|
-
}, l: (a, i, s) => d(a.tag, ge({}, a.attrs, { key: s.key })) }, 12: { t: ["<!--"], o:
|
|
2143
|
+
}, l: (a, i, s) => d(a.tag, ge({}, a.attrs, { key: s.key })) }, 12: { t: ["<!--"], o: He(Dr), i: 1, u: () => ({}), l: Tt }, 14: { t: ["!["], o: pe($s), i: 1, u: (a) => ({ alt: oe(a[1]), target: oe(a[2]), title: oe(a[3]) }), l: (a, i, s) => d("img", { key: s.key, alt: a.alt || void 0, title: a.title || void 0, src: n(a.target, "img", "src") }) }, 15: { t: ["["], o: ue(vs), i: 3, u: (a, i, s) => ({ children: As(i, a[1], s), target: oe(a[2]), title: oe(a[3]) }), l: (a, i, s) => d("a", { key: s.key, href: n(a.target, "a", "href"), title: a.title }, i(a.children, s)) }, 16: { t: ["<"], o: ue(Ya), i: 0, u: (a) => ({ children: [{ text: a[1], type: "27" }], target: a[1], type: "15" }) }, 17: { t: (a, i) => !i.inAnchor && !t.disableAutoLink && (Je(a, "http://") || Je(a, "https://")), o: ue(Ga), i: 0, u: (a) => ({ children: [{ text: a[1], type: "27" }], target: a[1], title: void 0, type: "15" }) }, 18: { t: ["<"], o: ue(Qa), i: 0, u(a) {
|
|
2144
2144
|
let i = a[1], s = a[1];
|
|
2145
|
-
return
|
|
2146
|
-
} }, 20:
|
|
2147
|
-
` }, 21: { o:
|
|
2145
|
+
return Ea.test(s) || (s = "mailto:" + s), { children: [{ text: i.replace("mailto:", ""), type: "27" }], target: s, type: "15" };
|
|
2146
|
+
} }, 20: Or(d, 1), 33: Or(d, 2), 19: { o: ie(Oa), i: 3, u: It, l: () => `
|
|
2147
|
+
` }, 21: { o: Ee(function(a, i) {
|
|
2148
2148
|
if (i.inline || i.simple || i.inHTML && a.indexOf(`
|
|
2149
2149
|
|
|
2150
2150
|
`) === -1 && i.prevCapture.indexOf(`
|
|
@@ -2154,40 +2154,40 @@ function _s(e = "", t = {}) {
|
|
|
2154
2154
|
a.split(`
|
|
2155
2155
|
`).every((m) => (m += `
|
|
2156
2156
|
`, !c.some((x) => x.test(m)) && (s += m, !!m.trim())));
|
|
2157
|
-
const f =
|
|
2157
|
+
const f = Be(s);
|
|
2158
2158
|
return f === "" ? null : [s, , f];
|
|
2159
|
-
}), i: 3, u:
|
|
2159
|
+
}), i: 3, u: jt, l: (a, i, s) => d("p", { key: s.key }, i(a.children, s)) }, 22: { t: ["["], o: ue(Ja), i: 0, u: (a) => (p[a[1]] = { target: a[2], title: a[4] }, {}), l: Tt }, 23: { t: ["!["], o: pe(Xa), i: 0, u: (a) => ({ alt: a[1] ? oe(a[1]) : void 0, ref: a[2] }), l: (a, i, s) => p[a.ref] ? d("img", { key: s.key, alt: a.alt, src: n(p[a.ref].target, "img", "src"), title: p[a.ref].title }) : null }, 24: { t: (a) => a[0] === "[" && a.indexOf("](") === -1, o: ue(es), i: 0, u: (a, i, s) => ({ children: i(a[1], s), fallbackChildren: a[0], ref: a[2] }), l: (a, i, s) => p[a.ref] ? d("a", { key: s.key, href: n(p[a.ref].target, "a", "href"), title: p[a.ref].title }, i(a.children, s)) : d("span", { key: s.key }, a.fallbackChildren) }, 25: { t: ["|"], o: ie(zr), i: 1, u: js, l(a, i, s) {
|
|
2160
2160
|
const f = a;
|
|
2161
2161
|
return d("table", { key: s.key }, d("thead", null, d("tr", null, f.header.map(function(m, x) {
|
|
2162
|
-
return d("th", { key: x, style:
|
|
2162
|
+
return d("th", { key: x, style: Br(f, x) }, i(m, s));
|
|
2163
2163
|
}))), d("tbody", null, f.cells.map(function(m, x) {
|
|
2164
|
-
return d("tr", { key: x }, m.map(function(y,
|
|
2165
|
-
return d("td", { key:
|
|
2164
|
+
return d("tr", { key: x }, m.map(function(y, T) {
|
|
2165
|
+
return d("td", { key: T, style: Br(f, T) }, i(y, s));
|
|
2166
2166
|
}));
|
|
2167
2167
|
})));
|
|
2168
|
-
} }, 27: { o:
|
|
2168
|
+
} }, 27: { o: Ee(function(a, i) {
|
|
2169
2169
|
let s;
|
|
2170
|
-
return
|
|
2170
|
+
return Je(a, ":") && (s = us.exec(a)), s || hs.exec(a);
|
|
2171
2171
|
}), i: 4, u(a) {
|
|
2172
2172
|
const i = a[0];
|
|
2173
|
-
return { text: i.indexOf("&") === -1 ? i : i.replace(
|
|
2174
|
-
}, l: (a) => a.text }, 28: { t: ["**", "__"], o: pe(
|
|
2173
|
+
return { text: i.indexOf("&") === -1 ? i : i.replace(Ua, (s, f) => t.namedCodesToUnicode[f] || s) };
|
|
2174
|
+
}, l: (a) => a.text }, 28: { t: ["**", "__"], o: pe(is), i: 2, u: (a, i, s) => ({ children: i(a[2], s) }), l: (a, i, s) => d("strong", { key: s.key }, i(a.children, s)) }, 29: { t: (a) => {
|
|
2175
2175
|
const i = a[0];
|
|
2176
2176
|
return (i === "*" || i === "_") && a[1] !== i;
|
|
2177
|
-
}, o: pe(
|
|
2178
|
-
t.disableParsingRawHTML === !0 && (delete
|
|
2179
|
-
const
|
|
2177
|
+
}, o: pe(cs), i: 3, u: (a, i, s) => ({ children: i(a[2], s) }), l: (a, i, s) => d("em", { key: s.key }, i(a.children, s)) }, 30: { t: ["\\"], o: pe(ps), i: 1, u: (a) => ({ text: a[1], type: "27" }) }, 31: { t: ["=="], o: pe(ls), i: 3, u: jt, l: (a, i, s) => d("mark", { key: s.key }, i(a.children, s)) }, 32: { t: ["~~"], o: pe(ds), i: 3, u: jt, l: (a, i, s) => d("del", { key: s.key }, i(a.children, s)) } };
|
|
2178
|
+
t.disableParsingRawHTML === !0 && (delete k[11], delete k[13]);
|
|
2179
|
+
const w = function(a) {
|
|
2180
2180
|
var i = Object.keys(a);
|
|
2181
2181
|
function s(f, m) {
|
|
2182
2182
|
var x = [];
|
|
2183
2183
|
if (m.prevCapture = m.prevCapture || "", f.trim()) for (; f; ) for (var y = 0; y < i.length; ) {
|
|
2184
|
-
var
|
|
2185
|
-
if (!
|
|
2186
|
-
var
|
|
2187
|
-
if (
|
|
2188
|
-
f = f.substring(
|
|
2189
|
-
var
|
|
2190
|
-
m.prevCapture +=
|
|
2184
|
+
var T = i[y], E = a[T];
|
|
2185
|
+
if (!E.t || Ss(f, m, E.t)) {
|
|
2186
|
+
var z = E.o(f, m);
|
|
2187
|
+
if (z && z[0]) {
|
|
2188
|
+
f = f.substring(z[0].length);
|
|
2189
|
+
var R = E.u(z, s, m);
|
|
2190
|
+
m.prevCapture += z[0], R.type || (R.type = T), x.push(R);
|
|
2191
2191
|
break;
|
|
2192
2192
|
}
|
|
2193
2193
|
y++;
|
|
@@ -2199,93 +2199,145 @@ function _s(e = "", t = {}) {
|
|
|
2199
2199
|
return a[f].i - a[m].i || (f < m ? -1 : 1);
|
|
2200
2200
|
}), function(f, m) {
|
|
2201
2201
|
return s(function(x) {
|
|
2202
|
-
return x.replace(
|
|
2203
|
-
`).replace(
|
|
2202
|
+
return x.replace(Na, `
|
|
2203
|
+
`).replace(Fa, "").replace(rs, " ");
|
|
2204
2204
|
}(f), m);
|
|
2205
2205
|
};
|
|
2206
|
-
}(
|
|
2206
|
+
}(k), S = (j = /* @__PURE__ */ function(a, i) {
|
|
2207
2207
|
return function(s, f, m) {
|
|
2208
2208
|
const x = a[s.type].l;
|
|
2209
2209
|
return i ? i(() => x(s, f, m), s, f, m) : x(s, f, m);
|
|
2210
2210
|
};
|
|
2211
|
-
}(
|
|
2211
|
+
}(k, t.renderRule), function a(i, s = {}) {
|
|
2212
2212
|
if (Array.isArray(i)) {
|
|
2213
2213
|
const f = s.key, m = [];
|
|
2214
2214
|
let x = !1;
|
|
2215
2215
|
for (let y = 0; y < i.length; y++) {
|
|
2216
2216
|
s.key = y;
|
|
2217
|
-
const
|
|
2218
|
-
|
|
2217
|
+
const T = a(i[y], s), E = typeof T == "string";
|
|
2218
|
+
E && x ? m[m.length - 1] += T : T !== null && m.push(T), x = E;
|
|
2219
2219
|
}
|
|
2220
2220
|
return s.key = f, m;
|
|
2221
2221
|
}
|
|
2222
|
-
return
|
|
2222
|
+
return j(i, a, s);
|
|
2223
2223
|
});
|
|
2224
|
-
var
|
|
2224
|
+
var j;
|
|
2225
2225
|
const v = h(e);
|
|
2226
2226
|
return g.length ? d("div", null, v, d("footer", { key: "footer" }, g.map(function(a) {
|
|
2227
|
-
return d("div", { id: r(a.identifier,
|
|
2227
|
+
return d("div", { id: r(a.identifier, De), key: a.identifier }, a.identifier, S(w(a.footnote, { inline: !0 })));
|
|
2228
2228
|
}))) : v;
|
|
2229
2229
|
}
|
|
2230
|
-
const
|
|
2230
|
+
const Rs = (e) => {
|
|
2231
2231
|
let { children: t = "", options: r } = e, n = function(o, c) {
|
|
2232
2232
|
if (o == null) return {};
|
|
2233
2233
|
var u, d, h = {}, b = Object.keys(o);
|
|
2234
2234
|
for (d = 0; d < b.length; d++) c.indexOf(u = b[d]) >= 0 || (h[u] = o[u]);
|
|
2235
2235
|
return h;
|
|
2236
|
-
}(e,
|
|
2237
|
-
return
|
|
2238
|
-
},
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
[data-theme="dark"] & {
|
|
2246
|
-
background-color: #374151 !important;
|
|
2247
|
-
color: #e5e7eb !important;
|
|
2248
|
-
}
|
|
2236
|
+
}(e, ja);
|
|
2237
|
+
return Lt.cloneElement(_s(t, r), n);
|
|
2238
|
+
}, Ps = A.div`
|
|
2239
|
+
overflow-wrap: anywhere;
|
|
2240
|
+
|
|
2241
|
+
> *:first-child {
|
|
2242
|
+
margin-top: 0 !important;
|
|
2249
2243
|
}
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
background-color: #374151 !important;
|
|
2254
|
-
color: #e5e7eb !important;
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
[data-theme="dark"] & {
|
|
2258
|
-
background-color: #374151 !important;
|
|
2259
|
-
color: #e5e7eb !important;
|
|
2260
|
-
}
|
|
2244
|
+
|
|
2245
|
+
> *:last-child {
|
|
2246
|
+
margin-bottom: 0 !important;
|
|
2261
2247
|
}
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
border-left-color: #3b82f6 !important;
|
|
2267
|
-
color: #e5e7eb !important;
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
[data-theme="dark"] & {
|
|
2271
|
-
background-color: #1e3a8a !important;
|
|
2272
|
-
border-left-color: #3b82f6 !important;
|
|
2273
|
-
color: #e5e7eb !important;
|
|
2274
|
-
}
|
|
2248
|
+
|
|
2249
|
+
[data-theme='dark'] & code {
|
|
2250
|
+
background-color: #374151 !important;
|
|
2251
|
+
color: #e5e7eb !important;
|
|
2275
2252
|
}
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2253
|
+
|
|
2254
|
+
[data-theme='dark'] & pre {
|
|
2255
|
+
background-color: #374151 !important;
|
|
2256
|
+
color: #e5e7eb !important;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
[data-theme='dark'] & blockquote {
|
|
2260
|
+
background-color: #1e3a8a !important;
|
|
2261
|
+
border-left-color: #3b82f6 !important;
|
|
2262
|
+
color: #e5e7eb !important;
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
[data-theme='dark'] & table th,
|
|
2266
|
+
[data-theme='dark'] & table td {
|
|
2267
|
+
border-color: #4b5563 !important;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
[data-theme='dark'] & table th {
|
|
2271
|
+
background-color: #374151 !important;
|
|
2272
|
+
color: #f9fafb !important;
|
|
2273
|
+
}
|
|
2274
|
+
`, Ds = {
|
|
2275
|
+
marginTop: 0,
|
|
2276
|
+
marginBottom: "12px",
|
|
2277
|
+
paddingLeft: "20px",
|
|
2278
|
+
listStyleType: "disc",
|
|
2279
|
+
listStylePosition: "outside",
|
|
2280
|
+
lineHeight: 1.5
|
|
2281
|
+
}, zs = {
|
|
2282
|
+
marginTop: 0,
|
|
2283
|
+
marginBottom: "12px",
|
|
2284
|
+
paddingLeft: "20px",
|
|
2285
|
+
listStyleType: "decimal",
|
|
2286
|
+
listStylePosition: "outside",
|
|
2287
|
+
lineHeight: 1.5
|
|
2288
|
+
}, Os = {
|
|
2289
|
+
marginBottom: "4px",
|
|
2290
|
+
lineHeight: 1.5,
|
|
2291
|
+
color: "inherit"
|
|
2292
|
+
}, $e = (e) => ({
|
|
2293
|
+
fontSize: e,
|
|
2294
|
+
fontWeight: 700,
|
|
2295
|
+
marginTop: "16px",
|
|
2296
|
+
marginBottom: "8px",
|
|
2297
|
+
color: "inherit"
|
|
2298
|
+
});
|
|
2299
|
+
function Ns({
|
|
2300
|
+
children: e,
|
|
2301
|
+
...t
|
|
2302
|
+
}) {
|
|
2303
|
+
return /* @__PURE__ */ l.jsx(
|
|
2304
|
+
"div",
|
|
2305
|
+
{
|
|
2306
|
+
style: {
|
|
2307
|
+
display: "block",
|
|
2308
|
+
overflowX: "auto",
|
|
2309
|
+
marginBottom: "12px",
|
|
2310
|
+
maxWidth: "100%",
|
|
2311
|
+
WebkitOverflowScrolling: "touch"
|
|
2312
|
+
},
|
|
2313
|
+
children: /* @__PURE__ */ l.jsx(
|
|
2314
|
+
"table",
|
|
2315
|
+
{
|
|
2316
|
+
...t,
|
|
2317
|
+
style: {
|
|
2318
|
+
borderCollapse: "collapse",
|
|
2319
|
+
width: "100%",
|
|
2320
|
+
fontSize: "inherit",
|
|
2321
|
+
color: "inherit"
|
|
2322
|
+
},
|
|
2323
|
+
children: e
|
|
2324
|
+
}
|
|
2325
|
+
)
|
|
2326
|
+
}
|
|
2327
|
+
);
|
|
2328
|
+
}
|
|
2329
|
+
function Bs({ content: e, className: t }) {
|
|
2330
|
+
return /* @__PURE__ */ l.jsx(Ps, { className: t, children: /* @__PURE__ */ l.jsx(
|
|
2331
|
+
Rs,
|
|
2280
2332
|
{
|
|
2281
2333
|
options: {
|
|
2282
2334
|
overrides: {
|
|
2283
|
-
// Custom styling for markdown elements with better spacing
|
|
2284
2335
|
p: {
|
|
2285
2336
|
props: {
|
|
2286
2337
|
style: {
|
|
2338
|
+
marginTop: 0,
|
|
2287
2339
|
marginBottom: "12px",
|
|
2288
|
-
lineHeight:
|
|
2340
|
+
lineHeight: 1.5,
|
|
2289
2341
|
color: "inherit"
|
|
2290
2342
|
}
|
|
2291
2343
|
}
|
|
@@ -2328,97 +2380,116 @@ function Ps({ content: e, className: t }) {
|
|
|
2328
2380
|
fontFamily: "monospace",
|
|
2329
2381
|
color: "#111827",
|
|
2330
2382
|
overflowX: "auto",
|
|
2383
|
+
marginTop: 0,
|
|
2331
2384
|
marginBottom: "12px"
|
|
2332
2385
|
}
|
|
2333
2386
|
}
|
|
2334
2387
|
},
|
|
2335
2388
|
ul: {
|
|
2336
2389
|
props: {
|
|
2337
|
-
|
|
2390
|
+
style: Ds
|
|
2338
2391
|
}
|
|
2339
2392
|
},
|
|
2340
2393
|
ol: {
|
|
2341
2394
|
props: {
|
|
2342
|
-
|
|
2395
|
+
style: zs
|
|
2343
2396
|
}
|
|
2344
2397
|
},
|
|
2345
2398
|
li: {
|
|
2346
2399
|
props: {
|
|
2347
|
-
|
|
2400
|
+
style: Os
|
|
2348
2401
|
}
|
|
2349
2402
|
},
|
|
2350
|
-
|
|
2403
|
+
table: {
|
|
2404
|
+
component: Ns
|
|
2405
|
+
},
|
|
2406
|
+
th: {
|
|
2351
2407
|
props: {
|
|
2352
2408
|
style: {
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
backgroundColor: "#eff6ff",
|
|
2359
|
-
borderRadius: "4px",
|
|
2409
|
+
border: "1px solid #e5e7eb",
|
|
2410
|
+
padding: "6px 8px",
|
|
2411
|
+
textAlign: "left",
|
|
2412
|
+
backgroundColor: "#f9fafb",
|
|
2413
|
+
fontWeight: 600,
|
|
2360
2414
|
color: "inherit"
|
|
2361
2415
|
}
|
|
2362
2416
|
}
|
|
2363
2417
|
},
|
|
2364
|
-
|
|
2418
|
+
td: {
|
|
2365
2419
|
props: {
|
|
2366
2420
|
style: {
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2421
|
+
border: "1px solid #e5e7eb",
|
|
2422
|
+
padding: "6px 8px",
|
|
2423
|
+
textAlign: "left",
|
|
2424
|
+
verticalAlign: "top",
|
|
2370
2425
|
color: "inherit"
|
|
2371
2426
|
}
|
|
2372
2427
|
}
|
|
2373
2428
|
},
|
|
2374
|
-
|
|
2429
|
+
tr: {
|
|
2375
2430
|
props: {
|
|
2376
2431
|
style: {
|
|
2377
|
-
|
|
2378
|
-
fontWeight: 700,
|
|
2379
|
-
marginBottom: "8px",
|
|
2380
|
-
color: "inherit"
|
|
2432
|
+
backgroundColor: "transparent"
|
|
2381
2433
|
}
|
|
2382
2434
|
}
|
|
2383
2435
|
},
|
|
2384
|
-
|
|
2436
|
+
thead: {
|
|
2385
2437
|
props: {
|
|
2386
2438
|
style: {
|
|
2387
|
-
|
|
2388
|
-
fontWeight: 700,
|
|
2389
|
-
marginBottom: "8px",
|
|
2390
|
-
color: "inherit"
|
|
2439
|
+
backgroundColor: "transparent"
|
|
2391
2440
|
}
|
|
2392
2441
|
}
|
|
2393
2442
|
},
|
|
2394
|
-
|
|
2443
|
+
tbody: {
|
|
2395
2444
|
props: {
|
|
2396
2445
|
style: {
|
|
2397
|
-
|
|
2398
|
-
fontWeight: 700,
|
|
2399
|
-
marginBottom: "8px",
|
|
2400
|
-
color: "inherit"
|
|
2446
|
+
backgroundColor: "transparent"
|
|
2401
2447
|
}
|
|
2402
2448
|
}
|
|
2403
2449
|
},
|
|
2404
|
-
|
|
2450
|
+
blockquote: {
|
|
2405
2451
|
props: {
|
|
2406
2452
|
style: {
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2453
|
+
borderLeft: "4px solid #93c5fd",
|
|
2454
|
+
padding: "8px",
|
|
2455
|
+
paddingLeft: "16px",
|
|
2456
|
+
fontStyle: "italic",
|
|
2457
|
+
marginTop: 0,
|
|
2458
|
+
marginBottom: "12px",
|
|
2459
|
+
backgroundColor: "#eff6ff",
|
|
2460
|
+
borderRadius: "4px",
|
|
2410
2461
|
color: "inherit"
|
|
2411
2462
|
}
|
|
2412
2463
|
}
|
|
2413
2464
|
},
|
|
2465
|
+
h1: {
|
|
2466
|
+
props: {
|
|
2467
|
+
style: $e("20px")
|
|
2468
|
+
}
|
|
2469
|
+
},
|
|
2470
|
+
h2: {
|
|
2471
|
+
props: {
|
|
2472
|
+
style: $e("18px")
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
h3: {
|
|
2476
|
+
props: {
|
|
2477
|
+
style: $e("16px")
|
|
2478
|
+
}
|
|
2479
|
+
},
|
|
2480
|
+
h4: {
|
|
2481
|
+
props: {
|
|
2482
|
+
style: $e("14px")
|
|
2483
|
+
}
|
|
2484
|
+
},
|
|
2485
|
+
h5: {
|
|
2486
|
+
props: {
|
|
2487
|
+
style: $e("14px")
|
|
2488
|
+
}
|
|
2489
|
+
},
|
|
2414
2490
|
h6: {
|
|
2415
2491
|
props: {
|
|
2416
|
-
style:
|
|
2417
|
-
fontSize: "14px",
|
|
2418
|
-
fontWeight: 700,
|
|
2419
|
-
marginBottom: "8px",
|
|
2420
|
-
color: "inherit"
|
|
2421
|
-
}
|
|
2492
|
+
style: $e("14px")
|
|
2422
2493
|
}
|
|
2423
2494
|
},
|
|
2424
2495
|
hr: {
|
|
@@ -2480,11 +2551,11 @@ function Yt({ message: e, className: t }) {
|
|
|
2480
2551
|
},
|
|
2481
2552
|
c.id
|
|
2482
2553
|
)),
|
|
2483
|
-
o.length > 0 && /* @__PURE__ */ l.jsx(
|
|
2484
|
-
/* @__PURE__ */ l.jsx(
|
|
2554
|
+
o.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: o, readOnly: !0 }),
|
|
2555
|
+
/* @__PURE__ */ l.jsx(Bs, { content: e.content, className: t })
|
|
2485
2556
|
] });
|
|
2486
2557
|
}
|
|
2487
|
-
const
|
|
2558
|
+
const En = [
|
|
2488
2559
|
"application/pdf",
|
|
2489
2560
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
2490
2561
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
@@ -2497,7 +2568,7 @@ const Tn = [
|
|
|
2497
2568
|
"image/jpeg",
|
|
2498
2569
|
"image/webp",
|
|
2499
2570
|
"image/gif"
|
|
2500
|
-
],
|
|
2571
|
+
], Ls = {
|
|
2501
2572
|
".pdf": "application/pdf",
|
|
2502
2573
|
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
2503
2574
|
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
@@ -2512,12 +2583,12 @@ const Tn = [
|
|
|
2512
2583
|
".webp": "image/webp",
|
|
2513
2584
|
".gif": "image/gif"
|
|
2514
2585
|
};
|
|
2515
|
-
function
|
|
2586
|
+
function Fs(e) {
|
|
2516
2587
|
const t = e.lastIndexOf(".");
|
|
2517
2588
|
if (!(t < 0))
|
|
2518
|
-
return
|
|
2589
|
+
return Ls[e.slice(t).toLowerCase()];
|
|
2519
2590
|
}
|
|
2520
|
-
async function
|
|
2591
|
+
async function Vt(e) {
|
|
2521
2592
|
var r;
|
|
2522
2593
|
if (!e) return [];
|
|
2523
2594
|
const t = [];
|
|
@@ -2526,14 +2597,14 @@ async function Qt(e) {
|
|
|
2526
2597
|
t.push(e.files[n]);
|
|
2527
2598
|
return t;
|
|
2528
2599
|
}
|
|
2529
|
-
function
|
|
2600
|
+
function Mn(e, t, r) {
|
|
2530
2601
|
if (e.size > t)
|
|
2531
2602
|
return `File too large (max ${Math.floor(t / (1024 * 1024))}MB)`;
|
|
2532
2603
|
if (r.includes(e.type)) return null;
|
|
2533
|
-
const n =
|
|
2604
|
+
const n = Fs(e.name);
|
|
2534
2605
|
return n && r.includes(n) ? null : "File type not allowed for attachments";
|
|
2535
2606
|
}
|
|
2536
|
-
const
|
|
2607
|
+
const Ks = A.button`
|
|
2537
2608
|
display: flex;
|
|
2538
2609
|
align-items: center;
|
|
2539
2610
|
justify-content: center;
|
|
@@ -2564,7 +2635,7 @@ const Os = T.button`
|
|
|
2564
2635
|
border-color: #4b5563;
|
|
2565
2636
|
color: #e5e7eb;
|
|
2566
2637
|
}
|
|
2567
|
-
`,
|
|
2638
|
+
`, Ws = A.button`
|
|
2568
2639
|
display: flex;
|
|
2569
2640
|
align-items: center;
|
|
2570
2641
|
justify-content: center;
|
|
@@ -2590,15 +2661,6 @@ const Os = T.button`
|
|
|
2590
2661
|
cursor: not-allowed;
|
|
2591
2662
|
}
|
|
2592
2663
|
|
|
2593
|
-
@media (prefers-color-scheme: dark) {
|
|
2594
|
-
color: #94a3b8;
|
|
2595
|
-
|
|
2596
|
-
&:hover:not(:disabled) {
|
|
2597
|
-
background: rgba(255, 255, 255, 0.08);
|
|
2598
|
-
color: #e2e8f0;
|
|
2599
|
-
}
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
2664
|
[data-theme='dark'] & {
|
|
2603
2665
|
color: #94a3b8;
|
|
2604
2666
|
|
|
@@ -2608,24 +2670,24 @@ const Os = T.button`
|
|
|
2608
2670
|
}
|
|
2609
2671
|
}
|
|
2610
2672
|
`;
|
|
2611
|
-
function
|
|
2673
|
+
function Zt({
|
|
2612
2674
|
disabled: e,
|
|
2613
2675
|
integrated: t = !1,
|
|
2614
2676
|
maxFileBytes: r,
|
|
2615
2677
|
maxFiles: n,
|
|
2616
|
-
allowedMime: o =
|
|
2678
|
+
allowedMime: o = En,
|
|
2617
2679
|
currentCount: c,
|
|
2618
2680
|
uploadAttachment: u,
|
|
2619
2681
|
onUploaded: d,
|
|
2620
2682
|
onError: h
|
|
2621
2683
|
}) {
|
|
2622
|
-
const b = F.useRef(null), [g, p] = F.useState(!1),
|
|
2684
|
+
const b = F.useRef(null), [g, p] = F.useState(!1), k = F.useMemo(
|
|
2623
2685
|
() => [
|
|
2624
2686
|
".pdf,.docx,.xlsx,.xls,.csv,.txt,.md,.json",
|
|
2625
2687
|
"image/png,image/jpeg,image/webp,image/gif"
|
|
2626
2688
|
].join(","),
|
|
2627
2689
|
[]
|
|
2628
|
-
),
|
|
2690
|
+
), w = F.useCallback(
|
|
2629
2691
|
async (i) => {
|
|
2630
2692
|
const s = Array.from(i);
|
|
2631
2693
|
if (!s.length) return;
|
|
@@ -2635,7 +2697,7 @@ function Vt({
|
|
|
2635
2697
|
h == null || h(`You can attach at most ${n} files per message.`);
|
|
2636
2698
|
break;
|
|
2637
2699
|
}
|
|
2638
|
-
const x =
|
|
2700
|
+
const x = Mn(m, r, o);
|
|
2639
2701
|
if (x) {
|
|
2640
2702
|
h == null || h(`${m.name}: ${x}`);
|
|
2641
2703
|
continue;
|
|
@@ -2645,8 +2707,8 @@ function Vt({
|
|
|
2645
2707
|
const y = await u(m);
|
|
2646
2708
|
d(y), f += 1;
|
|
2647
2709
|
} catch (y) {
|
|
2648
|
-
const
|
|
2649
|
-
h == null || h(
|
|
2710
|
+
const T = y instanceof Error ? y.message : "Upload failed";
|
|
2711
|
+
h == null || h(T);
|
|
2650
2712
|
} finally {
|
|
2651
2713
|
p(!1);
|
|
2652
2714
|
}
|
|
@@ -2655,8 +2717,8 @@ function Vt({
|
|
|
2655
2717
|
[o, c, r, n, h, d, u]
|
|
2656
2718
|
), S = (i) => {
|
|
2657
2719
|
const s = i.target.files;
|
|
2658
|
-
s != null && s.length &&
|
|
2659
|
-
},
|
|
2720
|
+
s != null && s.length && w(s), i.target.value = "";
|
|
2721
|
+
}, j = c >= n, v = !!(e || g || j), a = t ? Ws : Ks;
|
|
2660
2722
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
2661
2723
|
/* @__PURE__ */ l.jsx(
|
|
2662
2724
|
"input",
|
|
@@ -2664,7 +2726,7 @@ function Vt({
|
|
|
2664
2726
|
ref: b,
|
|
2665
2727
|
type: "file",
|
|
2666
2728
|
multiple: !0,
|
|
2667
|
-
accept:
|
|
2729
|
+
accept: k,
|
|
2668
2730
|
style: { display: "none" },
|
|
2669
2731
|
onChange: S
|
|
2670
2732
|
}
|
|
@@ -2680,12 +2742,12 @@ function Vt({
|
|
|
2680
2742
|
var i;
|
|
2681
2743
|
return (i = b.current) == null ? void 0 : i.click();
|
|
2682
2744
|
},
|
|
2683
|
-
children: /* @__PURE__ */ l.jsx(
|
|
2745
|
+
children: /* @__PURE__ */ l.jsx(mo, { size: 16, strokeWidth: 2 })
|
|
2684
2746
|
}
|
|
2685
2747
|
)
|
|
2686
2748
|
] });
|
|
2687
2749
|
}
|
|
2688
|
-
const _n =
|
|
2750
|
+
const _n = A.div`
|
|
2689
2751
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
2690
2752
|
background-color: white;
|
|
2691
2753
|
border: 1px solid #e5e7eb;
|
|
@@ -2713,13 +2775,6 @@ const _n = T.div`
|
|
|
2713
2775
|
appearance: none;
|
|
2714
2776
|
}
|
|
2715
2777
|
|
|
2716
|
-
/* Try both media query approaches */
|
|
2717
|
-
@media (prefers-color-scheme: dark) {
|
|
2718
|
-
background-color: #1f2937;
|
|
2719
|
-
border-color: #374151;
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2722
|
-
/* Alternative approach using data attribute */
|
|
2723
2778
|
&[data-theme="dark"] {
|
|
2724
2779
|
background-color: #1f2937;
|
|
2725
2780
|
border-color: #374151;
|
|
@@ -2731,7 +2786,7 @@ const _n = T.div`
|
|
|
2731
2786
|
border-color: #e5e7eb;
|
|
2732
2787
|
color: #111827;
|
|
2733
2788
|
}
|
|
2734
|
-
`, he =
|
|
2789
|
+
`, he = A.div`
|
|
2735
2790
|
max-width: 80%;
|
|
2736
2791
|
padding: 12px;
|
|
2737
2792
|
border-radius: 8px;
|
|
@@ -2751,18 +2806,6 @@ const _n = T.div`
|
|
|
2751
2806
|
color: inherit;
|
|
2752
2807
|
}
|
|
2753
2808
|
|
|
2754
|
-
/* Dark mode support - Media query */
|
|
2755
|
-
@media (prefers-color-scheme: dark) {
|
|
2756
|
-
background-color: ${(e) => e.$isUser ? "#3b82f6" : "transparent"};
|
|
2757
|
-
color: ${(e) => e.$isUser ? "#ffffff" : "#e5e7eb"};
|
|
2758
|
-
|
|
2759
|
-
strong, b {
|
|
2760
|
-
color: ${(e) => (e.$isUser, "#ffffff")};
|
|
2761
|
-
font-weight: 700;
|
|
2762
|
-
}
|
|
2763
|
-
}
|
|
2764
|
-
|
|
2765
|
-
/* Dark mode support - Data attribute (for ChatWindow/ChatWidget parents) */
|
|
2766
2809
|
[data-theme="dark"] & {
|
|
2767
2810
|
background-color: ${(e) => e.$isUser ? "#3b82f6" : "transparent"};
|
|
2768
2811
|
color: ${(e) => e.$isUser ? "#ffffff" : "#e5e7eb"};
|
|
@@ -2782,7 +2825,7 @@ const _n = T.div`
|
|
|
2782
2825
|
color: inherit;
|
|
2783
2826
|
}
|
|
2784
2827
|
}
|
|
2785
|
-
`,
|
|
2828
|
+
`, Jt = A.div`
|
|
2786
2829
|
display: flex;
|
|
2787
2830
|
flex-direction: column;
|
|
2788
2831
|
flex: 1;
|
|
@@ -2798,15 +2841,6 @@ const _n = T.div`
|
|
|
2798
2841
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
2799
2842
|
}
|
|
2800
2843
|
|
|
2801
|
-
@media (prefers-color-scheme: dark) {
|
|
2802
|
-
background-color: #18181b;
|
|
2803
|
-
border-color: rgba(255, 255, 255, 0.1);
|
|
2804
|
-
|
|
2805
|
-
&:focus-within {
|
|
2806
|
-
border-color: rgba(255, 255, 255, 0.3);
|
|
2807
|
-
}
|
|
2808
|
-
}
|
|
2809
|
-
|
|
2810
2844
|
[data-theme='dark'] & {
|
|
2811
2845
|
background-color: #18181b;
|
|
2812
2846
|
border-color: rgba(255, 255, 255, 0.1);
|
|
@@ -2815,7 +2849,7 @@ const _n = T.div`
|
|
|
2815
2849
|
border-color: rgba(255, 255, 255, 0.3);
|
|
2816
2850
|
}
|
|
2817
2851
|
}
|
|
2818
|
-
`,
|
|
2852
|
+
`, Xt = A.div`
|
|
2819
2853
|
display: flex;
|
|
2820
2854
|
align-items: center;
|
|
2821
2855
|
justify-content: space-between;
|
|
@@ -2825,16 +2859,11 @@ const _n = T.div`
|
|
|
2825
2859
|
border-top: 1px solid #e5e7eb;
|
|
2826
2860
|
background-color: #f9fafb;
|
|
2827
2861
|
|
|
2828
|
-
@media (prefers-color-scheme: dark) {
|
|
2829
|
-
border-top-color: #52525b;
|
|
2830
|
-
background-color: #3f3f46;
|
|
2831
|
-
}
|
|
2832
|
-
|
|
2833
2862
|
[data-theme='dark'] & {
|
|
2834
2863
|
border-top-color: #52525b;
|
|
2835
2864
|
background-color: #3f3f46;
|
|
2836
2865
|
}
|
|
2837
|
-
`,
|
|
2866
|
+
`, Us = A.textarea`
|
|
2838
2867
|
display: block;
|
|
2839
2868
|
width: 100%;
|
|
2840
2869
|
min-width: 0;
|
|
@@ -2864,14 +2893,6 @@ const _n = T.div`
|
|
|
2864
2893
|
cursor: not-allowed;
|
|
2865
2894
|
}
|
|
2866
2895
|
|
|
2867
|
-
@media (prefers-color-scheme: dark) {
|
|
2868
|
-
color: #f9fafb;
|
|
2869
|
-
|
|
2870
|
-
&::placeholder {
|
|
2871
|
-
color: #9ca3af;
|
|
2872
|
-
}
|
|
2873
|
-
}
|
|
2874
|
-
|
|
2875
2896
|
[data-theme='dark'] & {
|
|
2876
2897
|
color: #f9fafb;
|
|
2877
2898
|
|
|
@@ -2879,7 +2900,7 @@ const _n = T.div`
|
|
|
2879
2900
|
color: #9ca3af;
|
|
2880
2901
|
}
|
|
2881
2902
|
}
|
|
2882
|
-
`,
|
|
2903
|
+
`, er = A.div`
|
|
2883
2904
|
display: flex;
|
|
2884
2905
|
align-items: center;
|
|
2885
2906
|
gap: 8px;
|
|
@@ -2887,16 +2908,11 @@ const _n = T.div`
|
|
|
2887
2908
|
border-top: 1px solid #e5e7eb;
|
|
2888
2909
|
background-color: #ffffff;
|
|
2889
2910
|
|
|
2890
|
-
@media (prefers-color-scheme: dark) {
|
|
2891
|
-
background-color: #1f2937;
|
|
2892
|
-
border-top-color: #374151;
|
|
2893
|
-
}
|
|
2894
|
-
|
|
2895
2911
|
[data-theme="dark"] & {
|
|
2896
2912
|
background-color: #1f2937;
|
|
2897
2913
|
border-top-color: #374151;
|
|
2898
2914
|
}
|
|
2899
|
-
`,
|
|
2915
|
+
`, Hs = A.textarea`
|
|
2900
2916
|
flex: 1;
|
|
2901
2917
|
width: 100%;
|
|
2902
2918
|
margin: 0;
|
|
@@ -2927,21 +2943,6 @@ const _n = T.div`
|
|
|
2927
2943
|
cursor: not-allowed;
|
|
2928
2944
|
}
|
|
2929
2945
|
|
|
2930
|
-
@media (prefers-color-scheme: dark) {
|
|
2931
|
-
background-color: #374151;
|
|
2932
|
-
color: #f9fafb;
|
|
2933
|
-
border-color: #4b5563;
|
|
2934
|
-
|
|
2935
|
-
&::placeholder {
|
|
2936
|
-
color: #9ca3af;
|
|
2937
|
-
}
|
|
2938
|
-
|
|
2939
|
-
&:focus {
|
|
2940
|
-
border-color: #3b82f6;
|
|
2941
|
-
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
|
2942
|
-
}
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
2946
|
[data-theme="dark"] & {
|
|
2946
2947
|
background-color: #374151;
|
|
2947
2948
|
color: #f9fafb;
|
|
@@ -2956,7 +2957,7 @@ const _n = T.div`
|
|
|
2956
2957
|
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
|
2957
2958
|
}
|
|
2958
2959
|
}
|
|
2959
|
-
`,
|
|
2960
|
+
`, qs = A.button`
|
|
2960
2961
|
width: 32px;
|
|
2961
2962
|
height: 32px;
|
|
2962
2963
|
min-width: 32px;
|
|
@@ -3004,19 +3005,6 @@ const _n = T.div`
|
|
|
3004
3005
|
visibility: visible !important;
|
|
3005
3006
|
}
|
|
3006
3007
|
|
|
3007
|
-
@media (prefers-color-scheme: dark) {
|
|
3008
|
-
border-color: #60a5fa;
|
|
3009
|
-
color: #60a5fa;
|
|
3010
|
-
&:hover:not(:disabled) {
|
|
3011
|
-
background: #2563eb;
|
|
3012
|
-
color: white;
|
|
3013
|
-
}
|
|
3014
|
-
&:disabled {
|
|
3015
|
-
border-color: #6b7280;
|
|
3016
|
-
color: #6b7280;
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
3008
|
[data-theme="dark"] & {
|
|
3021
3009
|
border-color: #60a5fa;
|
|
3022
3010
|
color: #60a5fa;
|
|
@@ -3029,7 +3017,7 @@ const _n = T.div`
|
|
|
3029
3017
|
color: #6b7280;
|
|
3030
3018
|
}
|
|
3031
3019
|
}
|
|
3032
|
-
`,
|
|
3020
|
+
`, tr = A.button`
|
|
3033
3021
|
width: 26px;
|
|
3034
3022
|
height: 26px;
|
|
3035
3023
|
min-width: 26px;
|
|
@@ -3085,26 +3073,6 @@ const _n = T.div`
|
|
|
3085
3073
|
visibility: visible !important;
|
|
3086
3074
|
}
|
|
3087
3075
|
|
|
3088
|
-
@media (prefers-color-scheme: dark) {
|
|
3089
|
-
border-color: #60a5fa;
|
|
3090
|
-
color: #60a5fa;
|
|
3091
|
-
|
|
3092
|
-
&:hover:not(:disabled) {
|
|
3093
|
-
background: rgba(96, 165, 250, 0.14);
|
|
3094
|
-
color: #93c5fd;
|
|
3095
|
-
border-color: #93c5fd;
|
|
3096
|
-
}
|
|
3097
|
-
|
|
3098
|
-
&:focus-visible {
|
|
3099
|
-
box-shadow: 0 0 0 2px #18181b, 0 0 0 4px rgba(96, 165, 250, 0.45);
|
|
3100
|
-
}
|
|
3101
|
-
|
|
3102
|
-
&:disabled {
|
|
3103
|
-
border-color: #6b7280;
|
|
3104
|
-
color: #6b7280;
|
|
3105
|
-
}
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
3076
|
[data-theme='dark'] & {
|
|
3109
3077
|
border-color: #60a5fa;
|
|
3110
3078
|
color: #60a5fa;
|
|
@@ -3124,7 +3092,7 @@ const _n = T.div`
|
|
|
3124
3092
|
color: #6b7280;
|
|
3125
3093
|
}
|
|
3126
3094
|
}
|
|
3127
|
-
`,
|
|
3095
|
+
`, Et = (e, t = 0.15) => {
|
|
3128
3096
|
if (e && e.startsWith("#")) {
|
|
3129
3097
|
const r = e.replace("#", ""), n = parseInt(r, 16);
|
|
3130
3098
|
if (isNaN(n)) return e;
|
|
@@ -3132,7 +3100,7 @@ const _n = T.div`
|
|
|
3132
3100
|
return `#${Math.floor(o).toString(16).padStart(2, "0")}${Math.floor(c).toString(16).padStart(2, "0")}${Math.floor(u).toString(16).padStart(2, "0")}`;
|
|
3133
3101
|
}
|
|
3134
3102
|
return e || "#2563eb";
|
|
3135
|
-
},
|
|
3103
|
+
}, Gs = A.button`
|
|
3136
3104
|
position: fixed;
|
|
3137
3105
|
z-index: 50;
|
|
3138
3106
|
height: 48px;
|
|
@@ -3141,7 +3109,7 @@ const _n = T.div`
|
|
|
3141
3109
|
line-height: normal;
|
|
3142
3110
|
background: ${(e) => {
|
|
3143
3111
|
if (e.$primaryColor) {
|
|
3144
|
-
const t =
|
|
3112
|
+
const t = Et(e.$primaryColor, 0.1);
|
|
3145
3113
|
return `linear-gradient(135deg, ${e.$primaryColor} 0%, ${t} 100%)`;
|
|
3146
3114
|
}
|
|
3147
3115
|
return "linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%)";
|
|
@@ -3175,7 +3143,7 @@ const _n = T.div`
|
|
|
3175
3143
|
&:hover {
|
|
3176
3144
|
background: ${(e) => {
|
|
3177
3145
|
if (e.$primaryColor) {
|
|
3178
|
-
const t =
|
|
3146
|
+
const t = Et(e.$primaryColor, 0.2), r = Et(e.$primaryColor, 0.3);
|
|
3179
3147
|
return `linear-gradient(135deg, ${t} 0%, ${r} 100%)`;
|
|
3180
3148
|
}
|
|
3181
3149
|
return "linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%)";
|
|
@@ -3192,7 +3160,7 @@ const _n = T.div`
|
|
|
3192
3160
|
align-items: center;
|
|
3193
3161
|
justify-content: center;
|
|
3194
3162
|
}
|
|
3195
|
-
`,
|
|
3163
|
+
`, Qs = A.div`
|
|
3196
3164
|
position: fixed;
|
|
3197
3165
|
z-index: 50;
|
|
3198
3166
|
width: 320px;
|
|
@@ -3217,11 +3185,6 @@ const _n = T.div`
|
|
|
3217
3185
|
}
|
|
3218
3186
|
}}
|
|
3219
3187
|
|
|
3220
|
-
@media (prefers-color-scheme: dark) {
|
|
3221
|
-
background: #1f2937;
|
|
3222
|
-
border-color: #374151;
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3225
3188
|
&[data-theme="dark"] {
|
|
3226
3189
|
background: #1f2937;
|
|
3227
3190
|
border-color: #374151;
|
|
@@ -3237,7 +3200,7 @@ const _n = T.div`
|
|
|
3237
3200
|
width: 384px;
|
|
3238
3201
|
}
|
|
3239
3202
|
`;
|
|
3240
|
-
|
|
3203
|
+
A.div`
|
|
3241
3204
|
padding: 12px 16px;
|
|
3242
3205
|
background: ${(e) => e.primaryColor || "#3b82f6"};
|
|
3243
3206
|
color: white;
|
|
@@ -3259,7 +3222,7 @@ T.div`
|
|
|
3259
3222
|
gap: 4px;
|
|
3260
3223
|
}
|
|
3261
3224
|
`;
|
|
3262
|
-
|
|
3225
|
+
A.button`
|
|
3263
3226
|
width: 24px;
|
|
3264
3227
|
height: 24px;
|
|
3265
3228
|
padding: 0;
|
|
@@ -3284,7 +3247,7 @@ T.button`
|
|
|
3284
3247
|
height: 16px;
|
|
3285
3248
|
}
|
|
3286
3249
|
`;
|
|
3287
|
-
|
|
3250
|
+
A.div`
|
|
3288
3251
|
flex: 1;
|
|
3289
3252
|
overflow-y: auto;
|
|
3290
3253
|
padding: 16px;
|
|
@@ -3310,20 +3273,6 @@ T.div`
|
|
|
3310
3273
|
background: #94a3b8;
|
|
3311
3274
|
}
|
|
3312
3275
|
|
|
3313
|
-
@media (prefers-color-scheme: dark) {
|
|
3314
|
-
&::-webkit-scrollbar-track {
|
|
3315
|
-
background: #374151;
|
|
3316
|
-
}
|
|
3317
|
-
|
|
3318
|
-
&::-webkit-scrollbar-thumb {
|
|
3319
|
-
background: #6b7280;
|
|
3320
|
-
}
|
|
3321
|
-
|
|
3322
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
3323
|
-
background: #9ca3af;
|
|
3324
|
-
}
|
|
3325
|
-
}
|
|
3326
|
-
|
|
3327
3276
|
[data-theme="dark"] & {
|
|
3328
3277
|
&::-webkit-scrollbar-track {
|
|
3329
3278
|
background: #374151;
|
|
@@ -3338,7 +3287,7 @@ T.div`
|
|
|
3338
3287
|
}
|
|
3339
3288
|
}
|
|
3340
3289
|
`;
|
|
3341
|
-
const
|
|
3290
|
+
const rr = A.div`
|
|
3342
3291
|
display: flex;
|
|
3343
3292
|
gap: 4px;
|
|
3344
3293
|
align-items: center;
|
|
@@ -3364,36 +3313,32 @@ const tr = T.div`
|
|
|
3364
3313
|
}
|
|
3365
3314
|
}
|
|
3366
3315
|
|
|
3367
|
-
|
|
3316
|
+
[data-theme="dark"] & {
|
|
3368
3317
|
.dot {
|
|
3369
3318
|
background: #9ca3af;
|
|
3370
3319
|
}
|
|
3371
3320
|
}
|
|
3372
3321
|
`;
|
|
3373
|
-
|
|
3322
|
+
A.div`
|
|
3374
3323
|
font-size: 12px;
|
|
3375
3324
|
margin-top: 4px;
|
|
3376
3325
|
color: ${(e) => e.$isUser ? "rgba(255, 255, 255, 0.8)" : "#6b7280"};
|
|
3377
3326
|
|
|
3378
|
-
@media (prefers-color-scheme: dark) {
|
|
3379
|
-
color: ${(e) => e.$isUser ? "rgba(255, 255, 255, 0.8)" : "#d1d5db"};
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3382
3327
|
[data-theme="dark"] & {
|
|
3383
3328
|
color: ${(e) => e.$isUser ? "rgba(255, 255, 255, 0.8)" : "#d1d5db"};
|
|
3384
3329
|
}
|
|
3385
3330
|
`;
|
|
3386
|
-
const
|
|
3331
|
+
const nr = A.div`
|
|
3387
3332
|
font-size: 14px;
|
|
3388
3333
|
color: #dc2626;
|
|
3389
3334
|
text-align: center;
|
|
3390
3335
|
padding: 8px;
|
|
3391
3336
|
margin: 16px 0;
|
|
3392
3337
|
|
|
3393
|
-
|
|
3338
|
+
[data-theme="dark"] & {
|
|
3394
3339
|
color: #f87171;
|
|
3395
3340
|
}
|
|
3396
|
-
`,
|
|
3341
|
+
`, Ys = A.div`
|
|
3397
3342
|
position: absolute;
|
|
3398
3343
|
${(e) => e.$position === "top" ? "top: 0;" : "bottom: 0;"}
|
|
3399
3344
|
left: 0;
|
|
@@ -3410,14 +3355,14 @@ const rr = T.div`
|
|
|
3410
3355
|
background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #3b82f6 100%);
|
|
3411
3356
|
}
|
|
3412
3357
|
|
|
3413
|
-
|
|
3358
|
+
[data-theme="dark"] & {
|
|
3414
3359
|
background: linear-gradient(90deg, #374151 0%, #3b82f6 50%, #374151 100%);
|
|
3415
3360
|
|
|
3416
3361
|
&:hover {
|
|
3417
3362
|
background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #3b82f6 100%);
|
|
3418
3363
|
}
|
|
3419
3364
|
}
|
|
3420
|
-
`,
|
|
3365
|
+
`, ke = A.img`
|
|
3421
3366
|
width: ${(e) => e.$size || "32px"};
|
|
3422
3367
|
height: ${(e) => e.$size || "32px"};
|
|
3423
3368
|
border-radius: 50%;
|
|
@@ -3425,7 +3370,7 @@ const rr = T.div`
|
|
|
3425
3370
|
flex-shrink: 0;
|
|
3426
3371
|
border: 2px solid rgba(255, 255, 255, 0.2);
|
|
3427
3372
|
background-color: rgba(255, 255, 255, 0.1);
|
|
3428
|
-
`,
|
|
3373
|
+
`, Vs = A.div`
|
|
3429
3374
|
display: flex;
|
|
3430
3375
|
flex-direction: column;
|
|
3431
3376
|
align-items: center;
|
|
@@ -3440,10 +3385,6 @@ const rr = T.div`
|
|
|
3440
3385
|
/* Gradient background - starts with full primary color at top, fades to background color */
|
|
3441
3386
|
background: ${(e) => e.$primaryColor ? `linear-gradient(to bottom, ${e.$primaryColor} 0%, ${e.$primaryColor} 20%, rgba(255, 255, 255, 0.3) 45%, rgba(255, 255, 255, 0.7) 65%, rgba(255, 255, 255, 1) 100%)` : "#ffffff"};
|
|
3442
3387
|
|
|
3443
|
-
@media (prefers-color-scheme: dark) {
|
|
3444
|
-
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%)` : "#1f2937"};
|
|
3445
|
-
}
|
|
3446
|
-
|
|
3447
3388
|
[data-theme="dark"] & {
|
|
3448
3389
|
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%)` : "#1f2937"};
|
|
3449
3390
|
}
|
|
@@ -3451,17 +3392,13 @@ const rr = T.div`
|
|
|
3451
3392
|
[data-theme="light"] & {
|
|
3452
3393
|
background: ${(e) => e.$primaryColor ? `linear-gradient(to bottom, ${e.$primaryColor} 0%, ${e.$primaryColor} 20%, rgba(255, 255, 255, 0.3) 45%, rgba(255, 255, 255, 0.7) 65%, rgba(255, 255, 255, 1) 100%)` : "#ffffff"};
|
|
3453
3394
|
}
|
|
3454
|
-
`,
|
|
3395
|
+
`, Zs = A.div`
|
|
3455
3396
|
font-size: 18px;
|
|
3456
3397
|
font-weight: 600;
|
|
3457
3398
|
text-align: center;
|
|
3458
3399
|
color: #111827;
|
|
3459
3400
|
margin-bottom: 8px;
|
|
3460
3401
|
|
|
3461
|
-
@media (prefers-color-scheme: dark) {
|
|
3462
|
-
color: #f9fafb;
|
|
3463
|
-
}
|
|
3464
|
-
|
|
3465
3402
|
[data-theme="dark"] & {
|
|
3466
3403
|
color: #f9fafb;
|
|
3467
3404
|
}
|
|
@@ -3469,7 +3406,7 @@ const rr = T.div`
|
|
|
3469
3406
|
[data-theme="light"] & {
|
|
3470
3407
|
color: #111827;
|
|
3471
3408
|
}
|
|
3472
|
-
`,
|
|
3409
|
+
`, Js = A.img`
|
|
3473
3410
|
max-width: 120px;
|
|
3474
3411
|
max-height: 120px;
|
|
3475
3412
|
width: auto;
|
|
@@ -3477,14 +3414,14 @@ const rr = T.div`
|
|
|
3477
3414
|
object-fit: contain;
|
|
3478
3415
|
margin-bottom: 8px;
|
|
3479
3416
|
border-radius: 8px;
|
|
3480
|
-
`,
|
|
3417
|
+
`, Xs = A.div`
|
|
3481
3418
|
display: flex;
|
|
3482
3419
|
flex-direction: column;
|
|
3483
3420
|
gap: 12px;
|
|
3484
3421
|
width: 100%;
|
|
3485
3422
|
max-width: 100%;
|
|
3486
3423
|
margin-bottom: 16px;
|
|
3487
|
-
`,
|
|
3424
|
+
`, ei = A.button`
|
|
3488
3425
|
width: 100%;
|
|
3489
3426
|
padding: 12px 16px;
|
|
3490
3427
|
box-sizing: border-box;
|
|
@@ -3515,17 +3452,6 @@ const rr = T.div`
|
|
|
3515
3452
|
cursor: not-allowed;
|
|
3516
3453
|
}
|
|
3517
3454
|
|
|
3518
|
-
@media (prefers-color-scheme: dark) {
|
|
3519
|
-
background-color: #374151;
|
|
3520
|
-
color: #f9fafb;
|
|
3521
|
-
border-color: #4b5563;
|
|
3522
|
-
|
|
3523
|
-
&:hover:not(:disabled) {
|
|
3524
|
-
background-color: ${(e) => e.$primaryColor ? `${e.$primaryColor}25` : "#4b5563"};
|
|
3525
|
-
border-color: ${(e) => e.$primaryColor || "#6b7280"};
|
|
3526
|
-
}
|
|
3527
|
-
}
|
|
3528
|
-
|
|
3529
3455
|
[data-theme="dark"] & {
|
|
3530
3456
|
background-color: #374151;
|
|
3531
3457
|
color: #f9fafb;
|
|
@@ -3536,7 +3462,7 @@ const rr = T.div`
|
|
|
3536
3462
|
border-color: ${(e) => e.$primaryColor || "#6b7280"};
|
|
3537
3463
|
}
|
|
3538
3464
|
}
|
|
3539
|
-
`,
|
|
3465
|
+
`, ti = A.div`
|
|
3540
3466
|
display: flex;
|
|
3541
3467
|
align-items: center;
|
|
3542
3468
|
gap: 8px;
|
|
@@ -3545,14 +3471,10 @@ const rr = T.div`
|
|
|
3545
3471
|
padding-top: 16px;
|
|
3546
3472
|
border-top: 1px solid #e5e7eb;
|
|
3547
3473
|
|
|
3548
|
-
@media (prefers-color-scheme: dark) {
|
|
3549
|
-
border-top-color: #374151;
|
|
3550
|
-
}
|
|
3551
|
-
|
|
3552
3474
|
[data-theme="dark"] & {
|
|
3553
3475
|
border-top-color: #374151;
|
|
3554
3476
|
}
|
|
3555
|
-
`,
|
|
3477
|
+
`, mt = F.forwardRef(function({
|
|
3556
3478
|
value: t,
|
|
3557
3479
|
onChange: r,
|
|
3558
3480
|
onKeyDown: n,
|
|
@@ -3562,13 +3484,13 @@ const rr = T.div`
|
|
|
3562
3484
|
maxLength: d = 2e3,
|
|
3563
3485
|
variant: h = "default"
|
|
3564
3486
|
}, b) {
|
|
3565
|
-
const g = (
|
|
3566
|
-
r(
|
|
3567
|
-
}, p = (
|
|
3568
|
-
|
|
3569
|
-
},
|
|
3487
|
+
const g = (w) => {
|
|
3488
|
+
r(w.target.value);
|
|
3489
|
+
}, p = (w) => {
|
|
3490
|
+
w.key === "Enter" && !w.shiftKey && w.preventDefault(), n(w);
|
|
3491
|
+
}, k = h === "composer" ? Us : Hs;
|
|
3570
3492
|
return /* @__PURE__ */ l.jsx(
|
|
3571
|
-
|
|
3493
|
+
k,
|
|
3572
3494
|
{
|
|
3573
3495
|
ref: b,
|
|
3574
3496
|
value: t,
|
|
@@ -3578,16 +3500,16 @@ const rr = T.div`
|
|
|
3578
3500
|
disabled: c,
|
|
3579
3501
|
maxLength: d,
|
|
3580
3502
|
className: u,
|
|
3581
|
-
onInput: (
|
|
3582
|
-
const S =
|
|
3503
|
+
onInput: (w) => {
|
|
3504
|
+
const S = w.target;
|
|
3583
3505
|
S.style.height = "auto";
|
|
3584
|
-
const
|
|
3585
|
-
S.style.height = `${Math.min(S.scrollHeight,
|
|
3506
|
+
const j = h === "composer" ? 96 : 120;
|
|
3507
|
+
S.style.height = `${Math.min(S.scrollHeight, j)}px`;
|
|
3586
3508
|
}
|
|
3587
3509
|
}
|
|
3588
3510
|
);
|
|
3589
3511
|
});
|
|
3590
|
-
function
|
|
3512
|
+
function gt({ size: e = 16 }) {
|
|
3591
3513
|
return /* @__PURE__ */ l.jsxs(
|
|
3592
3514
|
"svg",
|
|
3593
3515
|
{
|
|
@@ -3607,23 +3529,23 @@ function mt({ size: e = 16 }) {
|
|
|
3607
3529
|
}
|
|
3608
3530
|
);
|
|
3609
3531
|
}
|
|
3610
|
-
function
|
|
3532
|
+
function or({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
|
|
3611
3533
|
const [o, c] = F.useState(""), u = F.useRef(null), d = async () => {
|
|
3612
3534
|
!o.trim() || n || (await r(o.trim()), c(""));
|
|
3613
3535
|
}, h = (g) => {
|
|
3614
3536
|
g.key === "Enter" && !g.shiftKey && (g.preventDefault(), d());
|
|
3615
3537
|
}, b = e.welcomeMessage || "Hi there 👋 How can we help?";
|
|
3616
|
-
return /* @__PURE__ */ l.jsxs(
|
|
3538
|
+
return /* @__PURE__ */ l.jsxs(Vs, { $primaryColor: e.primaryColor, children: [
|
|
3617
3539
|
e.welcomeImage && /* @__PURE__ */ l.jsx(
|
|
3618
|
-
|
|
3540
|
+
Js,
|
|
3619
3541
|
{
|
|
3620
3542
|
src: e.welcomeImage,
|
|
3621
3543
|
alt: "Welcome"
|
|
3622
3544
|
}
|
|
3623
3545
|
),
|
|
3624
|
-
/* @__PURE__ */ l.jsx(
|
|
3625
|
-
e.quickQuestions && e.quickQuestions.length > 0 && /* @__PURE__ */ l.jsx(
|
|
3626
|
-
|
|
3546
|
+
/* @__PURE__ */ l.jsx(Zs, { children: b }),
|
|
3547
|
+
e.quickQuestions && e.quickQuestions.length > 0 && /* @__PURE__ */ l.jsx(Xs, { children: e.quickQuestions.map((g, p) => /* @__PURE__ */ l.jsx(
|
|
3548
|
+
ei,
|
|
3627
3549
|
{
|
|
3628
3550
|
onClick: () => t(g),
|
|
3629
3551
|
disabled: n,
|
|
@@ -3632,9 +3554,9 @@ function nr({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
|
|
|
3632
3554
|
},
|
|
3633
3555
|
p
|
|
3634
3556
|
)) }),
|
|
3635
|
-
/* @__PURE__ */ l.jsxs(
|
|
3557
|
+
/* @__PURE__ */ l.jsxs(ti, { children: [
|
|
3636
3558
|
/* @__PURE__ */ l.jsx(
|
|
3637
|
-
|
|
3559
|
+
mt,
|
|
3638
3560
|
{
|
|
3639
3561
|
ref: u,
|
|
3640
3562
|
value: o,
|
|
@@ -3645,20 +3567,20 @@ function nr({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
|
|
|
3645
3567
|
}
|
|
3646
3568
|
),
|
|
3647
3569
|
/* @__PURE__ */ l.jsx(
|
|
3648
|
-
|
|
3570
|
+
qs,
|
|
3649
3571
|
{
|
|
3650
3572
|
onClick: d,
|
|
3651
3573
|
disabled: n || !o.trim(),
|
|
3652
|
-
children: /* @__PURE__ */ l.jsx(
|
|
3574
|
+
children: /* @__PURE__ */ l.jsx(gt, { size: 16 })
|
|
3653
3575
|
}
|
|
3654
3576
|
)
|
|
3655
3577
|
] })
|
|
3656
3578
|
] });
|
|
3657
3579
|
}
|
|
3658
|
-
function
|
|
3659
|
-
var
|
|
3660
|
-
const r = (e.maxAttachmentSizeMB ?? 10) * 1024 * 1024, n = e.maxAttachments ?? 3, o = (
|
|
3661
|
-
|
|
3580
|
+
function ar(e, t) {
|
|
3581
|
+
var j;
|
|
3582
|
+
const r = (e.maxAttachmentSizeMB ?? 10) * 1024 * 1024, n = e.maxAttachments ?? 3, o = (j = e.allowedAttachmentTypes) != null && j.length ? e.allowedAttachmentTypes : En, c = !!(e.enableAttachments && e.publishableKey), [u, d] = ee([]), [h, b] = ee(null), g = ae([]);
|
|
3583
|
+
Oe(() => {
|
|
3662
3584
|
g.current = u;
|
|
3663
3585
|
}, [u]);
|
|
3664
3586
|
const p = Z(
|
|
@@ -3670,7 +3592,7 @@ function or(e, t) {
|
|
|
3670
3592
|
b(`At most ${n} attachments per message.`);
|
|
3671
3593
|
break;
|
|
3672
3594
|
}
|
|
3673
|
-
const i =
|
|
3595
|
+
const i = Mn(a, r, o);
|
|
3674
3596
|
if (i) {
|
|
3675
3597
|
b(`${a.name}: ${i}`);
|
|
3676
3598
|
continue;
|
|
@@ -3689,12 +3611,12 @@ function or(e, t) {
|
|
|
3689
3611
|
}
|
|
3690
3612
|
},
|
|
3691
3613
|
[o, c, r, n, t]
|
|
3692
|
-
),
|
|
3614
|
+
), k = Z((v) => {
|
|
3693
3615
|
d((a) => {
|
|
3694
3616
|
const i = a.filter((s) => s.id !== v);
|
|
3695
3617
|
return g.current = i, i;
|
|
3696
3618
|
});
|
|
3697
|
-
}, []),
|
|
3619
|
+
}, []), w = Z(() => {
|
|
3698
3620
|
d([]), g.current = [], b(null);
|
|
3699
3621
|
}, []), S = Z(
|
|
3700
3622
|
(v) => {
|
|
@@ -3713,19 +3635,19 @@ function or(e, t) {
|
|
|
3713
3635
|
setAttachmentError: b,
|
|
3714
3636
|
addFiles: p,
|
|
3715
3637
|
appendStaged: S,
|
|
3716
|
-
removeStaged:
|
|
3717
|
-
clearStaged:
|
|
3638
|
+
removeStaged: k,
|
|
3639
|
+
clearStaged: w,
|
|
3718
3640
|
maxFiles: n,
|
|
3719
3641
|
maxBytes: r,
|
|
3720
3642
|
allowed: o
|
|
3721
3643
|
};
|
|
3722
3644
|
}
|
|
3723
|
-
function
|
|
3645
|
+
function Rn(e, t, r) {
|
|
3724
3646
|
if (e.role !== "assistant" || !e.content.trim()) return !1;
|
|
3725
3647
|
const n = t[t.length - 1];
|
|
3726
3648
|
return n ? !(r && n.role === "assistant" && n.id === e.id) : !0;
|
|
3727
3649
|
}
|
|
3728
|
-
function
|
|
3650
|
+
function ri({ size: e = 16 }) {
|
|
3729
3651
|
return /* @__PURE__ */ l.jsx(
|
|
3730
3652
|
"svg",
|
|
3731
3653
|
{
|
|
@@ -3742,7 +3664,7 @@ function Zs({ size: e = 16 }) {
|
|
|
3742
3664
|
}
|
|
3743
3665
|
);
|
|
3744
3666
|
}
|
|
3745
|
-
function
|
|
3667
|
+
function ni({ size: e = 16 }) {
|
|
3746
3668
|
return /* @__PURE__ */ l.jsxs(
|
|
3747
3669
|
"svg",
|
|
3748
3670
|
{
|
|
@@ -3766,7 +3688,7 @@ function Js({ size: e = 16 }) {
|
|
|
3766
3688
|
* Copyright (c) StackBlitz. All rights reserved.
|
|
3767
3689
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
3768
3690
|
*--------------------------------------------------------------------------------------------*/
|
|
3769
|
-
const
|
|
3691
|
+
const oi = {
|
|
3770
3692
|
/**
|
|
3771
3693
|
* A value from 0 to 1, on how much to damp the animation.
|
|
3772
3694
|
* 0 means no damping, 1 means full damping.
|
|
@@ -3787,26 +3709,26 @@ const Xs = {
|
|
|
3787
3709
|
* @default 1.25
|
|
3788
3710
|
*/
|
|
3789
3711
|
mass: 1.25
|
|
3790
|
-
},
|
|
3791
|
-
let
|
|
3792
|
-
var
|
|
3793
|
-
(
|
|
3794
|
-
|
|
3712
|
+
}, ai = 70, si = 1e3 / 60, ii = 350;
|
|
3713
|
+
let bt = !1;
|
|
3714
|
+
var Kr;
|
|
3715
|
+
(Kr = globalThis.document) == null || Kr.addEventListener("mousedown", () => {
|
|
3716
|
+
bt = !0;
|
|
3795
3717
|
});
|
|
3796
3718
|
var Wr;
|
|
3797
3719
|
(Wr = globalThis.document) == null || Wr.addEventListener("mouseup", () => {
|
|
3798
|
-
|
|
3720
|
+
bt = !1;
|
|
3799
3721
|
});
|
|
3800
|
-
var
|
|
3801
|
-
(
|
|
3802
|
-
|
|
3722
|
+
var Ur;
|
|
3723
|
+
(Ur = globalThis.document) == null || Ur.addEventListener("click", () => {
|
|
3724
|
+
bt = !1;
|
|
3803
3725
|
});
|
|
3804
|
-
const
|
|
3726
|
+
const ci = (e = {}) => {
|
|
3805
3727
|
const [t, r] = ee(!1), [n, o] = ee(e.initial !== !1), [c, u] = ee(!1), d = ae(null);
|
|
3806
3728
|
d.current = e;
|
|
3807
3729
|
const h = Z(() => {
|
|
3808
3730
|
var f;
|
|
3809
|
-
if (!
|
|
3731
|
+
if (!bt)
|
|
3810
3732
|
return !1;
|
|
3811
3733
|
const i = window.getSelection();
|
|
3812
3734
|
if (!i || !i.rangeCount)
|
|
@@ -3817,7 +3739,7 @@ const ni = (e = {}) => {
|
|
|
3817
3739
|
p.isAtBottom = i, o(i);
|
|
3818
3740
|
}, []), g = Z((i) => {
|
|
3819
3741
|
p.escapedFromLock = i, r(i);
|
|
3820
|
-
}, []), p =
|
|
3742
|
+
}, []), p = Ft(() => {
|
|
3821
3743
|
let i;
|
|
3822
3744
|
return {
|
|
3823
3745
|
escapedFromLock: t,
|
|
@@ -3856,45 +3778,45 @@ const ni = (e = {}) => {
|
|
|
3856
3778
|
return this.calculatedTargetScrollTop - this.scrollTop;
|
|
3857
3779
|
},
|
|
3858
3780
|
get isNearBottom() {
|
|
3859
|
-
return this.scrollDifference <=
|
|
3781
|
+
return this.scrollDifference <= ai;
|
|
3860
3782
|
}
|
|
3861
3783
|
};
|
|
3862
|
-
}, []),
|
|
3863
|
-
var
|
|
3784
|
+
}, []), k = Z((i = {}) => {
|
|
3785
|
+
var E;
|
|
3864
3786
|
typeof i == "string" && (i = { animation: i }), i.preserveScrollPosition || b(!0);
|
|
3865
3787
|
const s = Date.now() + (Number(i.wait) || 0), f = _t(d.current, i.animation), { ignoreEscapes: m = !1 } = i;
|
|
3866
3788
|
let x, y = p.calculatedTargetScrollTop;
|
|
3867
3789
|
i.duration instanceof Promise ? i.duration.finally(() => {
|
|
3868
3790
|
x = Date.now();
|
|
3869
3791
|
}) : x = s + (i.duration ?? 0);
|
|
3870
|
-
const
|
|
3871
|
-
const
|
|
3872
|
-
var
|
|
3792
|
+
const T = async () => {
|
|
3793
|
+
const z = new Promise(requestAnimationFrame).then(() => {
|
|
3794
|
+
var W;
|
|
3873
3795
|
if (!p.isAtBottom)
|
|
3874
3796
|
return p.animation = void 0, !1;
|
|
3875
|
-
const { scrollTop:
|
|
3876
|
-
if (p.animation || (p.animation = { behavior: f, promise:
|
|
3877
|
-
return
|
|
3878
|
-
if (
|
|
3879
|
-
if (((
|
|
3797
|
+
const { scrollTop: R } = p, K = performance.now(), C = (K - (p.lastTick ?? K)) / si;
|
|
3798
|
+
if (p.animation || (p.animation = { behavior: f, promise: z, ignoreEscapes: m }), p.animation.behavior === f && (p.lastTick = K), h() || s > Date.now())
|
|
3799
|
+
return T();
|
|
3800
|
+
if (R < Math.min(y, p.calculatedTargetScrollTop)) {
|
|
3801
|
+
if (((W = p.animation) == null ? void 0 : W.behavior) === f) {
|
|
3880
3802
|
if (f === "instant")
|
|
3881
|
-
return p.scrollTop = p.calculatedTargetScrollTop,
|
|
3882
|
-
p.velocity = (f.damping * p.velocity + f.stiffness * p.scrollDifference) / f.mass, p.accumulated += p.velocity *
|
|
3803
|
+
return p.scrollTop = p.calculatedTargetScrollTop, T();
|
|
3804
|
+
p.velocity = (f.damping * p.velocity + f.stiffness * p.scrollDifference) / f.mass, p.accumulated += p.velocity * C, p.scrollTop += p.accumulated, p.scrollTop !== R && (p.accumulated = 0);
|
|
3883
3805
|
}
|
|
3884
|
-
return
|
|
3806
|
+
return T();
|
|
3885
3807
|
}
|
|
3886
|
-
return x > Date.now() ? (y = p.calculatedTargetScrollTop,
|
|
3808
|
+
return x > Date.now() ? (y = p.calculatedTargetScrollTop, T()) : (p.animation = void 0, p.scrollTop < p.calculatedTargetScrollTop ? k({
|
|
3887
3809
|
animation: _t(d.current, d.current.resize),
|
|
3888
3810
|
ignoreEscapes: m,
|
|
3889
3811
|
duration: Math.max(0, x - Date.now()) || void 0
|
|
3890
3812
|
}) : p.isAtBottom);
|
|
3891
3813
|
});
|
|
3892
|
-
return
|
|
3814
|
+
return z.then((R) => (requestAnimationFrame(() => {
|
|
3893
3815
|
p.animation || (p.lastTick = void 0, p.velocity = 0);
|
|
3894
|
-
}),
|
|
3816
|
+
}), R));
|
|
3895
3817
|
};
|
|
3896
|
-
return i.wait !== !0 && (p.animation = void 0), ((
|
|
3897
|
-
}, [b, h, p]),
|
|
3818
|
+
return i.wait !== !0 && (p.animation = void 0), ((E = p.animation) == null ? void 0 : E.behavior) === f ? p.animation.promise : T();
|
|
3819
|
+
}, [b, h, p]), w = Z(() => {
|
|
3898
3820
|
g(!0), b(!1);
|
|
3899
3821
|
}, [g, b]), S = Z(({ target: i }) => {
|
|
3900
3822
|
if (i !== v.current)
|
|
@@ -3902,7 +3824,7 @@ const ni = (e = {}) => {
|
|
|
3902
3824
|
const { scrollTop: s, ignoreScrollToTop: f } = p;
|
|
3903
3825
|
let { lastScrollTop: m = s } = p;
|
|
3904
3826
|
p.lastScrollTop = s, p.ignoreScrollToTop = void 0, f && f > s && (m = f), u(p.isNearBottom), setTimeout(() => {
|
|
3905
|
-
var
|
|
3827
|
+
var T;
|
|
3906
3828
|
if (p.resizeDifference || s === f)
|
|
3907
3829
|
return;
|
|
3908
3830
|
if (h()) {
|
|
@@ -3910,13 +3832,13 @@ const ni = (e = {}) => {
|
|
|
3910
3832
|
return;
|
|
3911
3833
|
}
|
|
3912
3834
|
const x = s > m, y = s < m;
|
|
3913
|
-
if ((
|
|
3835
|
+
if ((T = p.animation) != null && T.ignoreEscapes) {
|
|
3914
3836
|
p.scrollTop = m;
|
|
3915
3837
|
return;
|
|
3916
3838
|
}
|
|
3917
3839
|
y && (g(!0), b(!1)), x && g(!1), !p.escapedFromLock && p.isNearBottom && b(!0);
|
|
3918
3840
|
}, 1);
|
|
3919
|
-
}, [g, b, h, p]),
|
|
3841
|
+
}, [g, b, h, p]), j = Z(({ target: i, deltaY: s }) => {
|
|
3920
3842
|
var m;
|
|
3921
3843
|
let f = i;
|
|
3922
3844
|
for (; !["scroll", "auto"].includes(getComputedStyle(f).overflow); ) {
|
|
@@ -3925,29 +3847,29 @@ const ni = (e = {}) => {
|
|
|
3925
3847
|
f = f.parentElement;
|
|
3926
3848
|
}
|
|
3927
3849
|
f === v.current && s < 0 && v.current.scrollHeight > v.current.clientHeight && !((m = p.animation) != null && m.ignoreEscapes) && (g(!0), b(!1));
|
|
3928
|
-
}, [g, b, p]), v =
|
|
3850
|
+
}, [g, b, p]), v = Lr((i) => {
|
|
3929
3851
|
var s, f;
|
|
3930
|
-
(s = v.current) == null || s.removeEventListener("scroll", S), (f = v.current) == null || f.removeEventListener("wheel",
|
|
3931
|
-
}, []), a =
|
|
3852
|
+
(s = v.current) == null || s.removeEventListener("scroll", S), (f = v.current) == null || f.removeEventListener("wheel", j), i == null || i.addEventListener("scroll", S, { passive: !0 }), i == null || i.addEventListener("wheel", j, { passive: !0 });
|
|
3853
|
+
}, []), a = Lr((i) => {
|
|
3932
3854
|
var f, m;
|
|
3933
3855
|
if ((f = p.resizeObserver) == null || f.disconnect(), !i)
|
|
3934
3856
|
return;
|
|
3935
3857
|
let s;
|
|
3936
3858
|
p.resizeObserver = new ResizeObserver(([x]) => {
|
|
3937
|
-
const { height: y } = x.contentRect,
|
|
3938
|
-
if (p.resizeDifference =
|
|
3939
|
-
const
|
|
3940
|
-
|
|
3941
|
-
animation:
|
|
3859
|
+
const { height: y } = x.contentRect, T = y - (s ?? y);
|
|
3860
|
+
if (p.resizeDifference = T, p.scrollTop > p.targetScrollTop && (p.scrollTop = p.targetScrollTop), u(p.isNearBottom), T >= 0) {
|
|
3861
|
+
const E = _t(d.current, s ? d.current.resize : d.current.initial);
|
|
3862
|
+
k({
|
|
3863
|
+
animation: E,
|
|
3942
3864
|
wait: !0,
|
|
3943
3865
|
preserveScrollPosition: !0,
|
|
3944
|
-
duration:
|
|
3866
|
+
duration: E === "instant" ? void 0 : ii
|
|
3945
3867
|
});
|
|
3946
3868
|
} else
|
|
3947
3869
|
p.isNearBottom && (g(!1), b(!0));
|
|
3948
3870
|
s = y, requestAnimationFrame(() => {
|
|
3949
3871
|
setTimeout(() => {
|
|
3950
|
-
p.resizeDifference ===
|
|
3872
|
+
p.resizeDifference === T && (p.resizeDifference = 0);
|
|
3951
3873
|
}, 1);
|
|
3952
3874
|
});
|
|
3953
3875
|
}), (m = p.resizeObserver) == null || m.observe(i);
|
|
@@ -3955,21 +3877,21 @@ const ni = (e = {}) => {
|
|
|
3955
3877
|
return {
|
|
3956
3878
|
contentRef: a,
|
|
3957
3879
|
scrollRef: v,
|
|
3958
|
-
scrollToBottom:
|
|
3959
|
-
stopScroll:
|
|
3880
|
+
scrollToBottom: k,
|
|
3881
|
+
stopScroll: w,
|
|
3960
3882
|
isAtBottom: n || c,
|
|
3961
3883
|
isNearBottom: c,
|
|
3962
3884
|
escapedFromLock: t,
|
|
3963
3885
|
state: p
|
|
3964
3886
|
};
|
|
3965
3887
|
};
|
|
3966
|
-
function
|
|
3888
|
+
function Lr(e, t) {
|
|
3967
3889
|
const r = Z((n) => (r.current = n, e(n)), t);
|
|
3968
3890
|
return r;
|
|
3969
3891
|
}
|
|
3970
|
-
const
|
|
3892
|
+
const Mt = /* @__PURE__ */ new Map();
|
|
3971
3893
|
function _t(...e) {
|
|
3972
|
-
const t = { ...
|
|
3894
|
+
const t = { ...oi };
|
|
3973
3895
|
let r = !1;
|
|
3974
3896
|
for (const o of e) {
|
|
3975
3897
|
if (o === "instant") {
|
|
@@ -3979,24 +3901,24 @@ function _t(...e) {
|
|
|
3979
3901
|
typeof o == "object" && (r = !1, t.damping = o.damping ?? t.damping, t.stiffness = o.stiffness ?? t.stiffness, t.mass = o.mass ?? t.mass);
|
|
3980
3902
|
}
|
|
3981
3903
|
const n = JSON.stringify(t);
|
|
3982
|
-
return
|
|
3904
|
+
return Mt.has(n) || Mt.set(n, Object.freeze(t)), r ? "instant" : Mt.get(n);
|
|
3983
3905
|
}
|
|
3984
|
-
const
|
|
3985
|
-
function
|
|
3986
|
-
const g = ae(null), p =
|
|
3906
|
+
const Pn = Bn(null), li = typeof window < "u" ? Nn : Oe;
|
|
3907
|
+
function at({ instance: e, children: t, resize: r, initial: n, mass: o, damping: c, stiffness: u, targetScrollTop: d, contextRef: h, ...b }) {
|
|
3908
|
+
const g = ae(null), p = Lt.useCallback((m, x) => {
|
|
3987
3909
|
const y = (f == null ? void 0 : f.targetScrollTop) ?? d;
|
|
3988
3910
|
return (y == null ? void 0 : y(m, x)) ?? m;
|
|
3989
|
-
}, [d]),
|
|
3911
|
+
}, [d]), k = ci({
|
|
3990
3912
|
mass: o,
|
|
3991
3913
|
damping: c,
|
|
3992
3914
|
stiffness: u,
|
|
3993
3915
|
resize: r,
|
|
3994
3916
|
initial: n,
|
|
3995
3917
|
targetScrollTop: p
|
|
3996
|
-
}), { scrollRef:
|
|
3997
|
-
scrollToBottom:
|
|
3918
|
+
}), { scrollRef: w, contentRef: S, scrollToBottom: j, stopScroll: v, isAtBottom: a, escapedFromLock: i, state: s } = e ?? k, f = Ft(() => ({
|
|
3919
|
+
scrollToBottom: j,
|
|
3998
3920
|
stopScroll: v,
|
|
3999
|
-
scrollRef:
|
|
3921
|
+
scrollRef: w,
|
|
4000
3922
|
isAtBottom: a,
|
|
4001
3923
|
escapedFromLock: i,
|
|
4002
3924
|
contentRef: S,
|
|
@@ -4008,35 +3930,35 @@ function ot({ instance: e, children: t, resize: r, initial: n, mass: o, damping:
|
|
|
4008
3930
|
g.current = m;
|
|
4009
3931
|
}
|
|
4010
3932
|
}), [
|
|
4011
|
-
|
|
3933
|
+
j,
|
|
4012
3934
|
a,
|
|
4013
3935
|
S,
|
|
4014
|
-
|
|
3936
|
+
w,
|
|
4015
3937
|
v,
|
|
4016
3938
|
i,
|
|
4017
3939
|
s
|
|
4018
3940
|
]);
|
|
4019
|
-
return
|
|
4020
|
-
|
|
4021
|
-
}, []), l.jsx(
|
|
3941
|
+
return On(h, () => f, [f]), li(() => {
|
|
3942
|
+
w.current && getComputedStyle(w.current).overflow === "visible" && (w.current.style.overflow = "auto");
|
|
3943
|
+
}, []), l.jsx(Pn.Provider, { value: f, children: l.jsx("div", { ...b, children: typeof t == "function" ? t(f) : t }) });
|
|
4022
3944
|
}
|
|
4023
3945
|
(function(e) {
|
|
4024
3946
|
function t({ children: r, ...n }) {
|
|
4025
|
-
const o =
|
|
3947
|
+
const o = di();
|
|
4026
3948
|
return l.jsx("div", { ref: o.scrollRef, style: {
|
|
4027
3949
|
height: "100%",
|
|
4028
3950
|
width: "100%"
|
|
4029
3951
|
}, children: l.jsx("div", { ...n, ref: o.contentRef, children: typeof r == "function" ? r(o) : r }) });
|
|
4030
3952
|
}
|
|
4031
3953
|
e.Content = t;
|
|
4032
|
-
})(
|
|
4033
|
-
function
|
|
4034
|
-
const e =
|
|
3954
|
+
})(at || (at = {}));
|
|
3955
|
+
function di() {
|
|
3956
|
+
const e = qr(Pn);
|
|
4035
3957
|
if (!e)
|
|
4036
3958
|
throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");
|
|
4037
3959
|
return e;
|
|
4038
3960
|
}
|
|
4039
|
-
const
|
|
3961
|
+
const ui = A(at)`
|
|
4040
3962
|
position: relative;
|
|
4041
3963
|
flex: 1;
|
|
4042
3964
|
overflow-y: auto;
|
|
@@ -4064,18 +3986,6 @@ const si = T(ot)`
|
|
|
4064
3986
|
background-color: rgba(100, 116, 139, 0.55);
|
|
4065
3987
|
}
|
|
4066
3988
|
|
|
4067
|
-
@media (prefers-color-scheme: dark) {
|
|
4068
|
-
scrollbar-color: rgba(71, 85, 105, 0.75) transparent;
|
|
4069
|
-
|
|
4070
|
-
&::-webkit-scrollbar-thumb {
|
|
4071
|
-
background-color: rgba(71, 85, 105, 0.65);
|
|
4072
|
-
}
|
|
4073
|
-
|
|
4074
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
4075
|
-
background-color: rgba(100, 116, 139, 0.75);
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
|
|
4079
3989
|
[data-theme='dark'] & {
|
|
4080
3990
|
scrollbar-color: rgba(71, 85, 105, 0.75) transparent;
|
|
4081
3991
|
|
|
@@ -4087,10 +3997,10 @@ const si = T(ot)`
|
|
|
4087
3997
|
background-color: rgba(100, 116, 139, 0.75);
|
|
4088
3998
|
}
|
|
4089
3999
|
}
|
|
4090
|
-
`,
|
|
4000
|
+
`, pi = A(at.Content)`
|
|
4091
4001
|
padding: 16px;
|
|
4092
4002
|
`;
|
|
4093
|
-
|
|
4003
|
+
A.button`
|
|
4094
4004
|
position: absolute;
|
|
4095
4005
|
bottom: 16px;
|
|
4096
4006
|
left: 50%;
|
|
@@ -4119,7 +4029,7 @@ T.button`
|
|
|
4119
4029
|
height: 16px;
|
|
4120
4030
|
}
|
|
4121
4031
|
|
|
4122
|
-
|
|
4032
|
+
[data-theme='dark'] & {
|
|
4123
4033
|
background: #1f2937;
|
|
4124
4034
|
border-color: #374151;
|
|
4125
4035
|
color: #9ca3af;
|
|
@@ -4131,7 +4041,7 @@ T.button`
|
|
|
4131
4041
|
}
|
|
4132
4042
|
}
|
|
4133
4043
|
`;
|
|
4134
|
-
function
|
|
4044
|
+
function sr({
|
|
4135
4045
|
className: e,
|
|
4136
4046
|
children: t,
|
|
4137
4047
|
style: r,
|
|
@@ -4142,7 +4052,7 @@ function ar({
|
|
|
4142
4052
|
}) {
|
|
4143
4053
|
const d = n === "dark" ? "dark" : "light";
|
|
4144
4054
|
return /* @__PURE__ */ l.jsx(
|
|
4145
|
-
|
|
4055
|
+
ui,
|
|
4146
4056
|
{
|
|
4147
4057
|
className: e,
|
|
4148
4058
|
style: r,
|
|
@@ -4157,10 +4067,10 @@ function ar({
|
|
|
4157
4067
|
}
|
|
4158
4068
|
);
|
|
4159
4069
|
}
|
|
4160
|
-
function
|
|
4161
|
-
return /* @__PURE__ */ l.jsx(
|
|
4070
|
+
function ir({ className: e, children: t }) {
|
|
4071
|
+
return /* @__PURE__ */ l.jsx(pi, { className: e, children: t });
|
|
4162
4072
|
}
|
|
4163
|
-
function
|
|
4073
|
+
function fi({ config: e, chat: t }) {
|
|
4164
4074
|
const {
|
|
4165
4075
|
messages: r,
|
|
4166
4076
|
sendMessage: n,
|
|
@@ -4169,9 +4079,9 @@ function ci({ config: e, chat: t }) {
|
|
|
4169
4079
|
isLoading: u,
|
|
4170
4080
|
error: d,
|
|
4171
4081
|
hasSessionStarted: h
|
|
4172
|
-
} = t, [b, g] = F.useState(""), [p,
|
|
4082
|
+
} = t, [b, g] = F.useState(""), [p, k] = F.useState(!1), w = F.useRef(null), {
|
|
4173
4083
|
enabled: S,
|
|
4174
|
-
staged:
|
|
4084
|
+
staged: j,
|
|
4175
4085
|
attachmentError: v,
|
|
4176
4086
|
setAttachmentError: a,
|
|
4177
4087
|
addFiles: i,
|
|
@@ -4180,27 +4090,27 @@ function ci({ config: e, chat: t }) {
|
|
|
4180
4090
|
clearStaged: m,
|
|
4181
4091
|
maxFiles: x,
|
|
4182
4092
|
maxBytes: y,
|
|
4183
|
-
allowed:
|
|
4184
|
-
} =
|
|
4093
|
+
allowed: T
|
|
4094
|
+
} = ar(e, o), E = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : p ? "dark" : "light";
|
|
4185
4095
|
F.useEffect(() => {
|
|
4186
4096
|
if (e.theme === "auto" || !e.theme) {
|
|
4187
4097
|
const I = () => {
|
|
4188
|
-
|
|
4098
|
+
k(window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
4189
4099
|
};
|
|
4190
4100
|
I();
|
|
4191
|
-
const
|
|
4192
|
-
return
|
|
4101
|
+
const D = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4102
|
+
return D.addEventListener("change", I), () => D.removeEventListener("change", I);
|
|
4193
4103
|
} else
|
|
4194
|
-
|
|
4104
|
+
k(e.theme === "dark");
|
|
4195
4105
|
}, [e.theme]);
|
|
4196
|
-
const
|
|
4106
|
+
const z = async () => {
|
|
4197
4107
|
const I = b.trim();
|
|
4198
|
-
!I &&
|
|
4199
|
-
var
|
|
4200
|
-
(
|
|
4108
|
+
!I && j.length === 0 || u || (await n(I, void 0, j.length ? j : void 0), g(""), m(), setTimeout(() => {
|
|
4109
|
+
var D;
|
|
4110
|
+
(D = w.current) == null || D.focus();
|
|
4201
4111
|
}, 100));
|
|
4202
|
-
},
|
|
4203
|
-
I.key === "Enter" && !I.shiftKey && (I.preventDefault(),
|
|
4112
|
+
}, R = (I) => {
|
|
4113
|
+
I.key === "Enter" && !I.shiftKey && (I.preventDefault(), z());
|
|
4204
4114
|
}, K = F.useMemo(() => e.height === "100%" || e.height === "100vh" ? {
|
|
4205
4115
|
height: "100%",
|
|
4206
4116
|
minHeight: 0,
|
|
@@ -4212,18 +4122,18 @@ function ci({ config: e, chat: t }) {
|
|
|
4212
4122
|
display: "flex",
|
|
4213
4123
|
flexDirection: "column",
|
|
4214
4124
|
borderRadius: "8px"
|
|
4215
|
-
}, [e.height]),
|
|
4125
|
+
}, [e.height]), C = (I) => {
|
|
4216
4126
|
S && (I.preventDefault(), I.dataTransfer.dropEffect = "copy");
|
|
4217
|
-
},
|
|
4127
|
+
}, W = async (I) => {
|
|
4218
4128
|
if (!S) return;
|
|
4219
4129
|
I.preventDefault();
|
|
4220
|
-
const
|
|
4221
|
-
|
|
4130
|
+
const D = await Vt(I.dataTransfer);
|
|
4131
|
+
D.length && await i(D);
|
|
4222
4132
|
};
|
|
4223
4133
|
return /* @__PURE__ */ l.jsx(
|
|
4224
4134
|
_n,
|
|
4225
4135
|
{
|
|
4226
|
-
"data-theme":
|
|
4136
|
+
"data-theme": E(),
|
|
4227
4137
|
style: {
|
|
4228
4138
|
...K,
|
|
4229
4139
|
...e.backgroundColor ? { backgroundColor: e.backgroundColor } : {},
|
|
@@ -4231,7 +4141,7 @@ function ci({ config: e, chat: t }) {
|
|
|
4231
4141
|
...e.borderRadius != null && e.borderRadius !== "" ? { borderRadius: e.borderRadius } : {}
|
|
4232
4142
|
},
|
|
4233
4143
|
children: e.quickQuestions && e.quickQuestions.length > 0 && !h ? /* @__PURE__ */ l.jsx(
|
|
4234
|
-
|
|
4144
|
+
or,
|
|
4235
4145
|
{
|
|
4236
4146
|
config: e,
|
|
4237
4147
|
onQuestionClick: async (I) => {
|
|
@@ -4242,13 +4152,13 @@ function ci({ config: e, chat: t }) {
|
|
|
4242
4152
|
}
|
|
4243
4153
|
) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4244
4154
|
/* @__PURE__ */ l.jsx(
|
|
4245
|
-
|
|
4155
|
+
sr,
|
|
4246
4156
|
{
|
|
4247
4157
|
style: { flex: 1 },
|
|
4248
|
-
surfaceTheme:
|
|
4249
|
-
onDragOver:
|
|
4250
|
-
onDrop:
|
|
4251
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
4158
|
+
surfaceTheme: E(),
|
|
4159
|
+
onDragOver: C,
|
|
4160
|
+
onDrop: W,
|
|
4161
|
+
children: /* @__PURE__ */ l.jsxs(ir, { children: [
|
|
4252
4162
|
r.map((I) => /* @__PURE__ */ l.jsxs(
|
|
4253
4163
|
"div",
|
|
4254
4164
|
{
|
|
@@ -4261,7 +4171,7 @@ function ci({ config: e, chat: t }) {
|
|
|
4261
4171
|
},
|
|
4262
4172
|
children: [
|
|
4263
4173
|
I.role === "assistant" && e.agentImage && /* @__PURE__ */ l.jsx(
|
|
4264
|
-
|
|
4174
|
+
ke,
|
|
4265
4175
|
{
|
|
4266
4176
|
src: e.agentImage,
|
|
4267
4177
|
alt: e.chatName || "Agent",
|
|
@@ -4279,18 +4189,18 @@ function ci({ config: e, chat: t }) {
|
|
|
4279
4189
|
},
|
|
4280
4190
|
children: [
|
|
4281
4191
|
/* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsx(Yt, { message: I }) }),
|
|
4282
|
-
|
|
4192
|
+
Rn(I, r, u) && /* @__PURE__ */ l.jsx(
|
|
4283
4193
|
kn,
|
|
4284
4194
|
{
|
|
4285
4195
|
content: I.content,
|
|
4286
4196
|
disabled: u,
|
|
4287
|
-
onExportPdf: (
|
|
4197
|
+
onExportPdf: (D) => c(D)
|
|
4288
4198
|
}
|
|
4289
4199
|
)
|
|
4290
4200
|
]
|
|
4291
4201
|
}
|
|
4292
4202
|
) : /* @__PURE__ */ l.jsx(he, { $isUser: !0, children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4293
|
-
I.attachments && I.attachments.length > 0 && /* @__PURE__ */ l.jsx(
|
|
4203
|
+
I.attachments && I.attachments.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: I.attachments, readOnly: !0 }),
|
|
4294
4204
|
I.content ? I.content : null
|
|
4295
4205
|
] }) })
|
|
4296
4206
|
]
|
|
@@ -4299,64 +4209,64 @@ function ci({ config: e, chat: t }) {
|
|
|
4299
4209
|
)),
|
|
4300
4210
|
u && /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", justifyContent: "flex-start", alignItems: "flex-start", gap: "8px", marginBottom: "16px" }, children: [
|
|
4301
4211
|
e.agentImage && /* @__PURE__ */ l.jsx(
|
|
4302
|
-
|
|
4212
|
+
ke,
|
|
4303
4213
|
{
|
|
4304
4214
|
src: e.agentImage,
|
|
4305
4215
|
alt: e.chatName || "Agent",
|
|
4306
4216
|
$size: "28px"
|
|
4307
4217
|
}
|
|
4308
4218
|
),
|
|
4309
|
-
/* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(
|
|
4219
|
+
/* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(rr, { children: [
|
|
4310
4220
|
/* @__PURE__ */ l.jsx("div", { className: "dot" }),
|
|
4311
4221
|
/* @__PURE__ */ l.jsx("div", { className: "dot" }),
|
|
4312
4222
|
/* @__PURE__ */ l.jsx("div", { className: "dot" })
|
|
4313
4223
|
] }) })
|
|
4314
4224
|
] }),
|
|
4315
|
-
d && /* @__PURE__ */ l.jsx(
|
|
4225
|
+
d && /* @__PURE__ */ l.jsx(nr, { children: d })
|
|
4316
4226
|
] })
|
|
4317
4227
|
}
|
|
4318
4228
|
),
|
|
4319
|
-
/* @__PURE__ */ l.jsxs(
|
|
4320
|
-
(v || S &&
|
|
4229
|
+
/* @__PURE__ */ l.jsxs(er, { style: { flexDirection: "column", alignItems: "stretch", gap: 0 }, children: [
|
|
4230
|
+
(v || S && j.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
|
|
4321
4231
|
v && /* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: "#dc2626", marginBottom: 4 }, children: v }),
|
|
4322
|
-
S &&
|
|
4232
|
+
S && j.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: j, onRemove: f })
|
|
4323
4233
|
] }),
|
|
4324
|
-
/* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(
|
|
4234
|
+
/* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(Jt, { children: [
|
|
4325
4235
|
/* @__PURE__ */ l.jsx(
|
|
4326
|
-
|
|
4236
|
+
mt,
|
|
4327
4237
|
{
|
|
4328
|
-
ref:
|
|
4238
|
+
ref: w,
|
|
4329
4239
|
variant: "composer",
|
|
4330
4240
|
value: b,
|
|
4331
4241
|
onChange: g,
|
|
4332
|
-
onKeyDown:
|
|
4242
|
+
onKeyDown: R,
|
|
4333
4243
|
placeholder: e.placeholder,
|
|
4334
4244
|
disabled: u
|
|
4335
4245
|
}
|
|
4336
4246
|
),
|
|
4337
|
-
/* @__PURE__ */ l.jsxs(
|
|
4247
|
+
/* @__PURE__ */ l.jsxs(Xt, { children: [
|
|
4338
4248
|
/* @__PURE__ */ l.jsx("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: S && /* @__PURE__ */ l.jsx(
|
|
4339
|
-
|
|
4249
|
+
Zt,
|
|
4340
4250
|
{
|
|
4341
4251
|
integrated: !0,
|
|
4342
4252
|
disabled: u,
|
|
4343
4253
|
maxFileBytes: y,
|
|
4344
4254
|
maxFiles: x,
|
|
4345
|
-
allowedMime:
|
|
4346
|
-
currentCount:
|
|
4255
|
+
allowedMime: T,
|
|
4256
|
+
currentCount: j.length,
|
|
4347
4257
|
uploadAttachment: o,
|
|
4348
4258
|
onUploaded: s,
|
|
4349
4259
|
onError: a
|
|
4350
4260
|
}
|
|
4351
4261
|
) }),
|
|
4352
4262
|
/* @__PURE__ */ l.jsx(
|
|
4353
|
-
|
|
4263
|
+
tr,
|
|
4354
4264
|
{
|
|
4355
4265
|
type: "button",
|
|
4356
|
-
onClick:
|
|
4357
|
-
disabled: u || !b.trim() &&
|
|
4266
|
+
onClick: z,
|
|
4267
|
+
disabled: u || !b.trim() && j.length === 0,
|
|
4358
4268
|
"aria-label": "Send message",
|
|
4359
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4269
|
+
children: /* @__PURE__ */ l.jsx(gt, { size: 13 })
|
|
4360
4270
|
}
|
|
4361
4271
|
)
|
|
4362
4272
|
] })
|
|
@@ -4366,7 +4276,7 @@ function ci({ config: e, chat: t }) {
|
|
|
4366
4276
|
}
|
|
4367
4277
|
);
|
|
4368
4278
|
}
|
|
4369
|
-
const
|
|
4279
|
+
const hi = A.div`
|
|
4370
4280
|
display: flex;
|
|
4371
4281
|
align-items: center;
|
|
4372
4282
|
justify-content: space-between;
|
|
@@ -4377,12 +4287,6 @@ const li = T.div`
|
|
|
4377
4287
|
border-bottom: none;
|
|
4378
4288
|
transition: background-color 0.3s ease, color 0.3s ease;
|
|
4379
4289
|
|
|
4380
|
-
@media (prefers-color-scheme: dark) {
|
|
4381
|
-
background: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? e.$primaryColor : "#1f2937"};
|
|
4382
|
-
color: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? "white" : "#f9fafb"};
|
|
4383
|
-
border-bottom: none;
|
|
4384
|
-
}
|
|
4385
|
-
|
|
4386
4290
|
[data-theme="dark"] & {
|
|
4387
4291
|
background: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? e.$primaryColor : "#1f2937"};
|
|
4388
4292
|
color: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? "white" : "#f9fafb"};
|
|
@@ -4392,15 +4296,15 @@ const li = T.div`
|
|
|
4392
4296
|
background: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? e.$primaryColor : "#ffffff"};
|
|
4393
4297
|
color: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? "white" : "#111827"};
|
|
4394
4298
|
}
|
|
4395
|
-
`,
|
|
4299
|
+
`, mi = A.div`
|
|
4396
4300
|
display: flex;
|
|
4397
4301
|
align-items: center;
|
|
4398
4302
|
gap: 12px;
|
|
4399
|
-
`,
|
|
4303
|
+
`, gi = A.div`
|
|
4400
4304
|
display: flex;
|
|
4401
4305
|
align-items: center;
|
|
4402
4306
|
gap: 8px;
|
|
4403
|
-
`,
|
|
4307
|
+
`, bi = A.div`
|
|
4404
4308
|
width: 8px;
|
|
4405
4309
|
height: 8px;
|
|
4406
4310
|
background: #10b981;
|
|
@@ -4415,14 +4319,14 @@ const li = T.div`
|
|
|
4415
4319
|
opacity: 0.5;
|
|
4416
4320
|
}
|
|
4417
4321
|
}
|
|
4418
|
-
`,
|
|
4322
|
+
`, yi = A.span`
|
|
4419
4323
|
font-weight: 500;
|
|
4420
4324
|
font-size: 14px;
|
|
4421
|
-
`,
|
|
4325
|
+
`, xi = A.div`
|
|
4422
4326
|
display: flex;
|
|
4423
4327
|
align-items: center;
|
|
4424
4328
|
gap: 4px;
|
|
4425
|
-
`,
|
|
4329
|
+
`, wi = A.button`
|
|
4426
4330
|
padding: 4px;
|
|
4427
4331
|
background: transparent;
|
|
4428
4332
|
border: none;
|
|
@@ -4443,7 +4347,7 @@ const li = T.div`
|
|
|
4443
4347
|
height: 16px;
|
|
4444
4348
|
}
|
|
4445
4349
|
`;
|
|
4446
|
-
function
|
|
4350
|
+
function ki({
|
|
4447
4351
|
chatName: e = "Chat Assistant",
|
|
4448
4352
|
showCloseButton: t = !0,
|
|
4449
4353
|
onClose: r,
|
|
@@ -4453,39 +4357,39 @@ function gi({
|
|
|
4453
4357
|
showWelcomeScreen: u = !1
|
|
4454
4358
|
}) {
|
|
4455
4359
|
return /* @__PURE__ */ l.jsxs(
|
|
4456
|
-
|
|
4360
|
+
hi,
|
|
4457
4361
|
{
|
|
4458
4362
|
className: o,
|
|
4459
4363
|
$primaryColor: c,
|
|
4460
4364
|
$showWelcomeScreen: u,
|
|
4461
4365
|
children: [
|
|
4462
|
-
/* @__PURE__ */ l.jsxs(
|
|
4366
|
+
/* @__PURE__ */ l.jsxs(mi, { children: [
|
|
4463
4367
|
n && /* @__PURE__ */ l.jsx(
|
|
4464
|
-
|
|
4368
|
+
ke,
|
|
4465
4369
|
{
|
|
4466
4370
|
src: n,
|
|
4467
4371
|
alt: e || "Agent",
|
|
4468
4372
|
$size: "32px"
|
|
4469
4373
|
}
|
|
4470
4374
|
),
|
|
4471
|
-
/* @__PURE__ */ l.jsxs(
|
|
4472
|
-
/* @__PURE__ */ l.jsx(
|
|
4473
|
-
/* @__PURE__ */ l.jsx(
|
|
4375
|
+
/* @__PURE__ */ l.jsxs(gi, { children: [
|
|
4376
|
+
/* @__PURE__ */ l.jsx(bi, {}),
|
|
4377
|
+
/* @__PURE__ */ l.jsx(yi, { children: e })
|
|
4474
4378
|
] })
|
|
4475
4379
|
] }),
|
|
4476
|
-
/* @__PURE__ */ l.jsx(
|
|
4477
|
-
|
|
4380
|
+
/* @__PURE__ */ l.jsx(xi, { children: t && /* @__PURE__ */ l.jsx(
|
|
4381
|
+
wi,
|
|
4478
4382
|
{
|
|
4479
4383
|
onClick: r,
|
|
4480
4384
|
"aria-label": "Close",
|
|
4481
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4385
|
+
children: /* @__PURE__ */ l.jsx(ni, { size: 16 })
|
|
4482
4386
|
}
|
|
4483
4387
|
) })
|
|
4484
4388
|
]
|
|
4485
4389
|
}
|
|
4486
4390
|
);
|
|
4487
4391
|
}
|
|
4488
|
-
function
|
|
4392
|
+
function Fr({ config: e, chat: t }) {
|
|
4489
4393
|
const {
|
|
4490
4394
|
messages: r,
|
|
4491
4395
|
sendMessage: n,
|
|
@@ -4496,19 +4400,19 @@ function Lr({ config: e, chat: t }) {
|
|
|
4496
4400
|
isOpen: h,
|
|
4497
4401
|
setIsOpen: b,
|
|
4498
4402
|
hasSessionStarted: g
|
|
4499
|
-
} = t, [p,
|
|
4403
|
+
} = t, [p, k] = F.useState(""), [w, S] = F.useState(e.height || 600), [j, v] = F.useState(!1), a = F.useRef(null), {
|
|
4500
4404
|
enabled: i,
|
|
4501
4405
|
staged: s,
|
|
4502
4406
|
attachmentError: f,
|
|
4503
4407
|
setAttachmentError: m,
|
|
4504
4408
|
addFiles: x,
|
|
4505
4409
|
appendStaged: y,
|
|
4506
|
-
removeStaged:
|
|
4507
|
-
clearStaged:
|
|
4508
|
-
maxFiles:
|
|
4509
|
-
maxBytes:
|
|
4410
|
+
removeStaged: T,
|
|
4411
|
+
clearStaged: E,
|
|
4412
|
+
maxFiles: z,
|
|
4413
|
+
maxBytes: R,
|
|
4510
4414
|
allowed: K
|
|
4511
|
-
} =
|
|
4415
|
+
} = ar(e, o), C = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : j ? "dark" : "light";
|
|
4512
4416
|
F.useEffect(() => {
|
|
4513
4417
|
if (e.theme === "auto" || !e.theme) {
|
|
4514
4418
|
const $ = () => {
|
|
@@ -4520,52 +4424,52 @@ function Lr({ config: e, chat: t }) {
|
|
|
4520
4424
|
} else
|
|
4521
4425
|
v(e.theme === "dark");
|
|
4522
4426
|
}, [e.theme]);
|
|
4523
|
-
const
|
|
4427
|
+
const W = async () => {
|
|
4524
4428
|
const $ = p.trim();
|
|
4525
|
-
!$ && s.length === 0 || u || (await n($, void 0, s.length ? s : void 0),
|
|
4429
|
+
!$ && s.length === 0 || u || (await n($, void 0, s.length ? s : void 0), k(""), E(), setTimeout(() => {
|
|
4526
4430
|
var P;
|
|
4527
4431
|
(P = a.current) == null || P.focus();
|
|
4528
4432
|
}, 100));
|
|
4529
4433
|
}, I = ($) => {
|
|
4530
|
-
$.key === "Enter" && !$.shiftKey && ($.preventDefault(),
|
|
4531
|
-
},
|
|
4434
|
+
$.key === "Enter" && !$.shiftKey && ($.preventDefault(), W());
|
|
4435
|
+
}, D = ($) => {
|
|
4532
4436
|
i && ($.preventDefault(), $.dataTransfer.dropEffect = "copy");
|
|
4533
|
-
},
|
|
4437
|
+
}, H = async ($) => {
|
|
4534
4438
|
if (!i) return;
|
|
4535
4439
|
$.preventDefault();
|
|
4536
|
-
const P = await
|
|
4440
|
+
const P = await Vt($.dataTransfer);
|
|
4537
4441
|
P.length && await x(P);
|
|
4538
4442
|
};
|
|
4539
4443
|
return h ? /* @__PURE__ */ l.jsxs(
|
|
4540
|
-
|
|
4444
|
+
Qs,
|
|
4541
4445
|
{
|
|
4542
4446
|
$position: e.position || "bottom-right",
|
|
4543
|
-
"data-theme":
|
|
4447
|
+
"data-theme": C(),
|
|
4544
4448
|
style: {
|
|
4545
|
-
height:
|
|
4449
|
+
height: w,
|
|
4546
4450
|
...e.backgroundColor ? { backgroundColor: e.backgroundColor } : {},
|
|
4547
4451
|
...e.textColor ? { color: e.textColor } : {},
|
|
4548
4452
|
...e.chatWindowStyle
|
|
4549
4453
|
},
|
|
4550
4454
|
children: [
|
|
4551
4455
|
e.resizable !== !1 && /* @__PURE__ */ l.jsx(
|
|
4552
|
-
|
|
4456
|
+
Ys,
|
|
4553
4457
|
{
|
|
4554
4458
|
$position: "top",
|
|
4555
4459
|
onMouseDown: ($) => {
|
|
4556
4460
|
$.preventDefault();
|
|
4557
|
-
const P = $.clientY,
|
|
4558
|
-
const
|
|
4559
|
-
S(Math.max(200, Math.min(600,
|
|
4560
|
-
},
|
|
4561
|
-
document.removeEventListener("mousemove",
|
|
4461
|
+
const P = $.clientY, O = typeof w == "number" ? w : 600, L = (Y) => {
|
|
4462
|
+
const N = Y.clientY - P, q = O - N;
|
|
4463
|
+
S(Math.max(200, Math.min(600, q)));
|
|
4464
|
+
}, _ = () => {
|
|
4465
|
+
document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", _);
|
|
4562
4466
|
};
|
|
4563
|
-
document.addEventListener("mousemove",
|
|
4467
|
+
document.addEventListener("mousemove", L), document.addEventListener("mouseup", _);
|
|
4564
4468
|
}
|
|
4565
4469
|
}
|
|
4566
4470
|
),
|
|
4567
4471
|
e.showHeader !== !1 && /* @__PURE__ */ l.jsx(
|
|
4568
|
-
|
|
4472
|
+
ki,
|
|
4569
4473
|
{
|
|
4570
4474
|
agentImage: e.agentImage,
|
|
4571
4475
|
chatName: e.chatName,
|
|
@@ -4575,7 +4479,7 @@ function Lr({ config: e, chat: t }) {
|
|
|
4575
4479
|
}
|
|
4576
4480
|
),
|
|
4577
4481
|
e.quickQuestions && e.quickQuestions.length > 0 && !g ? /* @__PURE__ */ l.jsx(
|
|
4578
|
-
|
|
4482
|
+
or,
|
|
4579
4483
|
{
|
|
4580
4484
|
config: e,
|
|
4581
4485
|
onQuestionClick: async ($) => {
|
|
@@ -4585,7 +4489,7 @@ function Lr({ config: e, chat: t }) {
|
|
|
4585
4489
|
isLoading: u
|
|
4586
4490
|
}
|
|
4587
4491
|
) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4588
|
-
/* @__PURE__ */ l.jsx(
|
|
4492
|
+
/* @__PURE__ */ l.jsx(sr, { surfaceTheme: C(), onDragOver: D, onDrop: H, children: /* @__PURE__ */ l.jsxs(ir, { children: [
|
|
4589
4493
|
r.map(($) => /* @__PURE__ */ l.jsxs(
|
|
4590
4494
|
"div",
|
|
4591
4495
|
{
|
|
@@ -4598,7 +4502,7 @@ function Lr({ config: e, chat: t }) {
|
|
|
4598
4502
|
},
|
|
4599
4503
|
children: [
|
|
4600
4504
|
$.role === "assistant" && e.agentImage && /* @__PURE__ */ l.jsx(
|
|
4601
|
-
|
|
4505
|
+
ke,
|
|
4602
4506
|
{
|
|
4603
4507
|
src: e.agentImage,
|
|
4604
4508
|
alt: e.chatName || "Agent",
|
|
@@ -4616,7 +4520,7 @@ function Lr({ config: e, chat: t }) {
|
|
|
4616
4520
|
},
|
|
4617
4521
|
children: [
|
|
4618
4522
|
/* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsx(Yt, { message: $ }) }),
|
|
4619
|
-
|
|
4523
|
+
Rn($, r, u) && /* @__PURE__ */ l.jsx(
|
|
4620
4524
|
kn,
|
|
4621
4525
|
{
|
|
4622
4526
|
content: $.content,
|
|
@@ -4627,7 +4531,7 @@ function Lr({ config: e, chat: t }) {
|
|
|
4627
4531
|
]
|
|
4628
4532
|
}
|
|
4629
4533
|
) : /* @__PURE__ */ l.jsx(he, { $isUser: !0, children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4630
|
-
$.attachments && $.attachments.length > 0 && /* @__PURE__ */ l.jsx(
|
|
4534
|
+
$.attachments && $.attachments.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: $.attachments, readOnly: !0 }),
|
|
4631
4535
|
$.content ? $.content : null
|
|
4632
4536
|
] }) })
|
|
4633
4537
|
]
|
|
@@ -4636,47 +4540,47 @@ function Lr({ config: e, chat: t }) {
|
|
|
4636
4540
|
)),
|
|
4637
4541
|
u && /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", justifyContent: "flex-start", alignItems: "flex-start", gap: "8px", marginBottom: "16px" }, children: [
|
|
4638
4542
|
e.agentImage && /* @__PURE__ */ l.jsx(
|
|
4639
|
-
|
|
4543
|
+
ke,
|
|
4640
4544
|
{
|
|
4641
4545
|
src: e.agentImage,
|
|
4642
4546
|
alt: e.chatName || "Agent",
|
|
4643
4547
|
$size: "28px"
|
|
4644
4548
|
}
|
|
4645
4549
|
),
|
|
4646
|
-
/* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(
|
|
4550
|
+
/* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(rr, { children: [
|
|
4647
4551
|
/* @__PURE__ */ l.jsx("div", { className: "dot" }),
|
|
4648
4552
|
/* @__PURE__ */ l.jsx("div", { className: "dot" }),
|
|
4649
4553
|
/* @__PURE__ */ l.jsx("div", { className: "dot" })
|
|
4650
4554
|
] }) })
|
|
4651
4555
|
] }),
|
|
4652
|
-
d && /* @__PURE__ */ l.jsx(
|
|
4556
|
+
d && /* @__PURE__ */ l.jsx(nr, { children: d })
|
|
4653
4557
|
] }) }),
|
|
4654
|
-
/* @__PURE__ */ l.jsxs(
|
|
4558
|
+
/* @__PURE__ */ l.jsxs(er, { style: { flexDirection: "column", alignItems: "stretch", gap: 0 }, children: [
|
|
4655
4559
|
(f || i && s.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
|
|
4656
4560
|
f && /* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: "#dc2626", marginBottom: 4 }, children: f }),
|
|
4657
|
-
i && s.length > 0 && /* @__PURE__ */ l.jsx(
|
|
4561
|
+
i && s.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: s, onRemove: T })
|
|
4658
4562
|
] }),
|
|
4659
|
-
/* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(
|
|
4563
|
+
/* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(Jt, { children: [
|
|
4660
4564
|
/* @__PURE__ */ l.jsx(
|
|
4661
|
-
|
|
4565
|
+
mt,
|
|
4662
4566
|
{
|
|
4663
4567
|
ref: a,
|
|
4664
4568
|
variant: "composer",
|
|
4665
4569
|
value: p,
|
|
4666
|
-
onChange:
|
|
4570
|
+
onChange: k,
|
|
4667
4571
|
onKeyDown: I,
|
|
4668
4572
|
placeholder: e.placeholder,
|
|
4669
4573
|
disabled: u
|
|
4670
4574
|
}
|
|
4671
4575
|
),
|
|
4672
|
-
/* @__PURE__ */ l.jsxs(
|
|
4576
|
+
/* @__PURE__ */ l.jsxs(Xt, { children: [
|
|
4673
4577
|
/* @__PURE__ */ l.jsx("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: i && /* @__PURE__ */ l.jsx(
|
|
4674
|
-
|
|
4578
|
+
Zt,
|
|
4675
4579
|
{
|
|
4676
4580
|
integrated: !0,
|
|
4677
4581
|
disabled: u,
|
|
4678
|
-
maxFileBytes:
|
|
4679
|
-
maxFiles:
|
|
4582
|
+
maxFileBytes: R,
|
|
4583
|
+
maxFiles: z,
|
|
4680
4584
|
allowedMime: K,
|
|
4681
4585
|
currentCount: s.length,
|
|
4682
4586
|
uploadAttachment: o,
|
|
@@ -4685,13 +4589,13 @@ function Lr({ config: e, chat: t }) {
|
|
|
4685
4589
|
}
|
|
4686
4590
|
) }),
|
|
4687
4591
|
/* @__PURE__ */ l.jsx(
|
|
4688
|
-
|
|
4592
|
+
tr,
|
|
4689
4593
|
{
|
|
4690
4594
|
type: "button",
|
|
4691
|
-
onClick:
|
|
4595
|
+
onClick: W,
|
|
4692
4596
|
disabled: u || !p.trim() && s.length === 0,
|
|
4693
4597
|
"aria-label": "Send message",
|
|
4694
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4598
|
+
children: /* @__PURE__ */ l.jsx(gt, { size: 13 })
|
|
4695
4599
|
}
|
|
4696
4600
|
)
|
|
4697
4601
|
] })
|
|
@@ -4701,7 +4605,7 @@ function Lr({ config: e, chat: t }) {
|
|
|
4701
4605
|
]
|
|
4702
4606
|
}
|
|
4703
4607
|
) : /* @__PURE__ */ l.jsxs(
|
|
4704
|
-
|
|
4608
|
+
Gs,
|
|
4705
4609
|
{
|
|
4706
4610
|
onClick: () => b(!0),
|
|
4707
4611
|
style: e.buttonStyle,
|
|
@@ -4709,161 +4613,180 @@ function Lr({ config: e, chat: t }) {
|
|
|
4709
4613
|
$primaryColor: e.primaryColor,
|
|
4710
4614
|
"aria-label": "Open chat",
|
|
4711
4615
|
children: [
|
|
4712
|
-
/* @__PURE__ */ l.jsx("div", { className: "icon-container", children: /* @__PURE__ */ l.jsx(
|
|
4616
|
+
/* @__PURE__ */ l.jsx("div", { className: "icon-container", children: /* @__PURE__ */ l.jsx(ri, { size: 16 }) }),
|
|
4713
4617
|
/* @__PURE__ */ l.jsx("span", { children: e.buttonText || e.chatName || "AI Chat" })
|
|
4714
4618
|
]
|
|
4715
4619
|
}
|
|
4716
4620
|
);
|
|
4717
4621
|
}
|
|
4718
|
-
function
|
|
4719
|
-
const t =
|
|
4622
|
+
function Ti(e) {
|
|
4623
|
+
const t = Jn(e), r = Zn(t);
|
|
4720
4624
|
switch (t.mode) {
|
|
4721
4625
|
case "floating":
|
|
4722
|
-
return /* @__PURE__ */ l.jsx(
|
|
4626
|
+
return /* @__PURE__ */ l.jsx(Fr, { config: t, chat: r });
|
|
4723
4627
|
case "embedded":
|
|
4724
|
-
return /* @__PURE__ */ l.jsx(
|
|
4628
|
+
return /* @__PURE__ */ l.jsx(fi, { config: t, chat: r });
|
|
4725
4629
|
default:
|
|
4726
|
-
return /* @__PURE__ */ l.jsx(
|
|
4630
|
+
return /* @__PURE__ */ l.jsx(Fr, { config: t, chat: r });
|
|
4727
4631
|
}
|
|
4728
4632
|
}
|
|
4729
|
-
function
|
|
4633
|
+
function Ai({ config: e, chat: t }) {
|
|
4730
4634
|
const { messages: r, sendMessage: n, uploadAttachment: o, isLoading: c, error: u, hasSessionStarted: d } = t, [h, b] = F.useState(""), g = F.useRef(null), {
|
|
4731
4635
|
enabled: p,
|
|
4732
|
-
staged:
|
|
4733
|
-
attachmentError:
|
|
4636
|
+
staged: k,
|
|
4637
|
+
attachmentError: w,
|
|
4734
4638
|
setAttachmentError: S,
|
|
4735
|
-
addFiles:
|
|
4639
|
+
addFiles: j,
|
|
4736
4640
|
appendStaged: v,
|
|
4737
4641
|
removeStaged: a,
|
|
4738
4642
|
clearStaged: i,
|
|
4739
4643
|
maxFiles: s,
|
|
4740
4644
|
maxBytes: f,
|
|
4741
4645
|
allowed: m
|
|
4742
|
-
} =
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4646
|
+
} = ar(e, o), [x, y] = F.useState(!1), T = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : x ? "dark" : "light";
|
|
4647
|
+
F.useEffect(() => {
|
|
4648
|
+
if (e.theme === "auto" || !e.theme) {
|
|
4649
|
+
const C = () => {
|
|
4650
|
+
y(window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
4651
|
+
};
|
|
4652
|
+
C();
|
|
4653
|
+
const W = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4654
|
+
return W.addEventListener("change", C), () => W.removeEventListener("change", C);
|
|
4655
|
+
} else
|
|
4656
|
+
y(e.theme === "dark");
|
|
4657
|
+
}, [e.theme]);
|
|
4658
|
+
const E = async () => {
|
|
4659
|
+
const C = h.trim();
|
|
4660
|
+
!C && k.length === 0 || c || (await n(C, void 0, k.length ? k : void 0), b(""), i(), setTimeout(() => {
|
|
4661
|
+
var W;
|
|
4662
|
+
(W = g.current) == null || W.focus();
|
|
4747
4663
|
}, 100));
|
|
4748
|
-
},
|
|
4749
|
-
|
|
4750
|
-
},
|
|
4751
|
-
p && (
|
|
4752
|
-
},
|
|
4664
|
+
}, z = (C) => {
|
|
4665
|
+
C.key === "Enter" && !C.shiftKey && (C.preventDefault(), E());
|
|
4666
|
+
}, R = (C) => {
|
|
4667
|
+
p && (C.preventDefault(), C.dataTransfer.dropEffect = "copy");
|
|
4668
|
+
}, K = async (C) => {
|
|
4753
4669
|
if (!p) return;
|
|
4754
|
-
|
|
4755
|
-
const
|
|
4756
|
-
|
|
4670
|
+
C.preventDefault();
|
|
4671
|
+
const W = await Vt(C.dataTransfer);
|
|
4672
|
+
W.length && await j(W);
|
|
4757
4673
|
};
|
|
4758
4674
|
return /* @__PURE__ */ l.jsx(
|
|
4759
4675
|
_n,
|
|
4760
4676
|
{
|
|
4761
|
-
"data-theme":
|
|
4677
|
+
"data-theme": T(),
|
|
4762
4678
|
style: {
|
|
4763
4679
|
height: e.height,
|
|
4764
4680
|
display: "flex",
|
|
4765
4681
|
flexDirection: "column",
|
|
4766
|
-
backgroundColor: "white",
|
|
4767
|
-
border: "1px solid #e5e7eb",
|
|
4768
4682
|
borderRadius: "8px"
|
|
4769
4683
|
},
|
|
4770
4684
|
children: e.quickQuestions && e.quickQuestions.length > 0 && !d ? /* @__PURE__ */ l.jsx(
|
|
4771
|
-
|
|
4685
|
+
or,
|
|
4772
4686
|
{
|
|
4773
4687
|
config: e,
|
|
4774
|
-
onQuestionClick: async (
|
|
4775
|
-
await n(
|
|
4688
|
+
onQuestionClick: async (C) => {
|
|
4689
|
+
await n(C);
|
|
4776
4690
|
},
|
|
4777
4691
|
onSendMessage: n,
|
|
4778
4692
|
isLoading: c
|
|
4779
4693
|
}
|
|
4780
4694
|
) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4781
|
-
/* @__PURE__ */ l.jsx(
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
{
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4695
|
+
/* @__PURE__ */ l.jsx(
|
|
4696
|
+
sr,
|
|
4697
|
+
{
|
|
4698
|
+
style: { flex: 1 },
|
|
4699
|
+
surfaceTheme: T(),
|
|
4700
|
+
onDragOver: R,
|
|
4701
|
+
onDrop: K,
|
|
4702
|
+
children: /* @__PURE__ */ l.jsxs(ir, { children: [
|
|
4703
|
+
r.map((C) => /* @__PURE__ */ l.jsxs(
|
|
4704
|
+
"div",
|
|
4705
|
+
{
|
|
4706
|
+
style: {
|
|
4707
|
+
display: "flex",
|
|
4708
|
+
marginBottom: "12px",
|
|
4709
|
+
justifyContent: C.role === "user" ? "flex-end" : "flex-start",
|
|
4710
|
+
alignItems: "flex-start",
|
|
4711
|
+
gap: "8px"
|
|
4712
|
+
},
|
|
4713
|
+
children: [
|
|
4714
|
+
C.role === "assistant" && e.agentImage && /* @__PURE__ */ l.jsx(
|
|
4715
|
+
ke,
|
|
4716
|
+
{
|
|
4717
|
+
src: e.agentImage,
|
|
4718
|
+
alt: e.chatName || "Agent",
|
|
4719
|
+
$size: "28px"
|
|
4720
|
+
}
|
|
4721
|
+
),
|
|
4722
|
+
/* @__PURE__ */ l.jsx(he, { $isUser: C.role === "user", children: C.role === "assistant" ? /* @__PURE__ */ l.jsx(Yt, { message: C }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
4723
|
+
C.attachments && C.attachments.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: C.attachments, readOnly: !0 }),
|
|
4724
|
+
C.content ? C.content : null
|
|
4725
|
+
] }) })
|
|
4726
|
+
]
|
|
4727
|
+
},
|
|
4728
|
+
C.id
|
|
4729
|
+
)),
|
|
4730
|
+
c && /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", justifyContent: "flex-start", alignItems: "flex-start", gap: "8px", marginBottom: "12px" }, children: [
|
|
4731
|
+
e.agentImage && /* @__PURE__ */ l.jsx(
|
|
4732
|
+
ke,
|
|
4795
4733
|
{
|
|
4796
4734
|
src: e.agentImage,
|
|
4797
4735
|
alt: e.chatName || "Agent",
|
|
4798
4736
|
$size: "28px"
|
|
4799
4737
|
}
|
|
4800
4738
|
),
|
|
4801
|
-
/* @__PURE__ */ l.jsx(he, { $isUser:
|
|
4802
|
-
|
|
4803
|
-
|
|
4739
|
+
/* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(rr, { children: [
|
|
4740
|
+
/* @__PURE__ */ l.jsx("div", { className: "dot" }),
|
|
4741
|
+
/* @__PURE__ */ l.jsx("div", { className: "dot" }),
|
|
4742
|
+
/* @__PURE__ */ l.jsx("div", { className: "dot" })
|
|
4804
4743
|
] }) })
|
|
4805
|
-
]
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
alt: e.chatName || "Agent",
|
|
4815
|
-
$size: "28px"
|
|
4816
|
-
}
|
|
4817
|
-
),
|
|
4818
|
-
/* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(tr, { children: [
|
|
4819
|
-
/* @__PURE__ */ l.jsx("div", { className: "dot" }),
|
|
4820
|
-
/* @__PURE__ */ l.jsx("div", { className: "dot" }),
|
|
4821
|
-
/* @__PURE__ */ l.jsx("div", { className: "dot" })
|
|
4822
|
-
] }) })
|
|
4823
|
-
] }),
|
|
4824
|
-
u && /* @__PURE__ */ l.jsx(rr, { children: u })
|
|
4825
|
-
] }) }),
|
|
4826
|
-
/* @__PURE__ */ l.jsxs(Xt, { style: { flexDirection: "column", alignItems: "stretch", gap: 0 }, children: [
|
|
4827
|
-
(k || p && w.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
|
|
4828
|
-
k && /* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: "#dc2626", marginBottom: 4 }, children: k }),
|
|
4829
|
-
p && w.length > 0 && /* @__PURE__ */ l.jsx(ke, { attachments: w, onRemove: a })
|
|
4744
|
+
] }),
|
|
4745
|
+
u && /* @__PURE__ */ l.jsx(nr, { children: u })
|
|
4746
|
+
] })
|
|
4747
|
+
}
|
|
4748
|
+
),
|
|
4749
|
+
/* @__PURE__ */ l.jsxs(er, { style: { flexDirection: "column", alignItems: "stretch", gap: 0 }, children: [
|
|
4750
|
+
(w || p && k.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
|
|
4751
|
+
w && /* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: "#dc2626", marginBottom: 4 }, children: w }),
|
|
4752
|
+
p && k.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: k, onRemove: a })
|
|
4830
4753
|
] }),
|
|
4831
|
-
/* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(
|
|
4754
|
+
/* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(Jt, { children: [
|
|
4832
4755
|
/* @__PURE__ */ l.jsx(
|
|
4833
|
-
|
|
4756
|
+
mt,
|
|
4834
4757
|
{
|
|
4835
4758
|
ref: g,
|
|
4836
4759
|
variant: "composer",
|
|
4837
4760
|
value: h,
|
|
4838
4761
|
onChange: b,
|
|
4839
|
-
onKeyDown:
|
|
4762
|
+
onKeyDown: z,
|
|
4840
4763
|
placeholder: e.placeholder,
|
|
4841
4764
|
disabled: c
|
|
4842
4765
|
}
|
|
4843
4766
|
),
|
|
4844
|
-
/* @__PURE__ */ l.jsxs(
|
|
4767
|
+
/* @__PURE__ */ l.jsxs(Xt, { children: [
|
|
4845
4768
|
/* @__PURE__ */ l.jsx("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: p && /* @__PURE__ */ l.jsx(
|
|
4846
|
-
|
|
4769
|
+
Zt,
|
|
4847
4770
|
{
|
|
4848
4771
|
integrated: !0,
|
|
4849
4772
|
disabled: c,
|
|
4850
4773
|
maxFileBytes: f,
|
|
4851
4774
|
maxFiles: s,
|
|
4852
4775
|
allowedMime: m,
|
|
4853
|
-
currentCount:
|
|
4776
|
+
currentCount: k.length,
|
|
4854
4777
|
uploadAttachment: o,
|
|
4855
4778
|
onUploaded: v,
|
|
4856
4779
|
onError: S
|
|
4857
4780
|
}
|
|
4858
4781
|
) }),
|
|
4859
4782
|
/* @__PURE__ */ l.jsx(
|
|
4860
|
-
|
|
4783
|
+
tr,
|
|
4861
4784
|
{
|
|
4862
4785
|
type: "button",
|
|
4863
|
-
onClick:
|
|
4864
|
-
disabled: c || !h.trim() &&
|
|
4786
|
+
onClick: E,
|
|
4787
|
+
disabled: c || !h.trim() && k.length === 0,
|
|
4865
4788
|
"aria-label": "Send message",
|
|
4866
|
-
children: /* @__PURE__ */ l.jsx(
|
|
4789
|
+
children: /* @__PURE__ */ l.jsx(gt, { size: 13 })
|
|
4867
4790
|
}
|
|
4868
4791
|
)
|
|
4869
4792
|
] })
|
|
@@ -4874,18 +4797,18 @@ function Si({ config: e, chat: t }) {
|
|
|
4874
4797
|
);
|
|
4875
4798
|
}
|
|
4876
4799
|
export {
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4800
|
+
fi as EmbeddedChat,
|
|
4801
|
+
Fr as FloatingChat,
|
|
4802
|
+
Ai as InlineChat,
|
|
4803
|
+
Bs as MarkdownRenderer,
|
|
4804
|
+
Qn as OrdifyApiClient,
|
|
4805
|
+
Ti as OrdifyChat,
|
|
4806
|
+
ji as debounce,
|
|
4807
|
+
Ci as formatTime,
|
|
4808
|
+
qe as generateId,
|
|
4886
4809
|
Yn as parseStreamingResponse,
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4810
|
+
Ii as throttle,
|
|
4811
|
+
Zn as useOrdifyChat,
|
|
4812
|
+
Jn as useOrdifyConfig,
|
|
4813
|
+
ar as useWidgetAttachmentStaging
|
|
4891
4814
|
};
|