@versini/sassysaint 7.1.1 → 7.1.2
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/chunks/{App.Cx-e5bZ5.js → App.CBWEb0V8.js} +878 -872
- package/dist/chunks/{ChatBubbleAssistant.B02s8tZ4.js → ChatBubbleAssistant.XRTqE2w4.js} +731 -721
- package/dist/chunks/{HeaderEntry.rgTf-RhA.js → HeaderEntry.D5tq2VRC.js} +451 -469
- package/dist/chunks/{MarkdownWithExtra.DO2ytP63.js → MarkdownWithExtra.-zr5boZg.js} +2 -2
- package/dist/chunks/{index.B2XPWk2Q.js → index.DdXdvpdr.js} +145 -135
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as l, jsxs as L, Fragment as _e } from "react/jsx-runtime";
|
|
2
|
-
import { f as ye, ACTION_SORT as Rn, ACTION_SEARCH as In, ACTION_RESET_PROMPT as Ea, ACTION_TOGGLE_PROMPT as Ta, ROLE_ASSISTANT as Fe, DEFAULT_AI_PROVIDER as ot, re as $e, DEFAULT_ICON_ACTION_SIZE as ge, L as An, j as Mr, C as Dr, LOCAL_STORAGE_PREFIX as Ft, LOCAL_STORAGE_PRIVATE_DISCLOSURE as $n, un as Le, PROVIDER_ANTHROPIC as Ct, PROVIDER_OPENAI as Vr, PROMPT_CLASSNAME as Ln, PROMPT_EDITABLE_AREA_CLASSNAME as On, ROLE_SYSTEM as Bn, ROLE_INTERNAL as at, ROLE_HIDDEN as Mn, STATS_SEPARATOR as Pr, ERROR_MESSAGE as zr, CLIPBOARD_PROMPT as Ur, TYPE_QUESTION as Dn, ROLE_USER as Sa, FOOTER_DISCLAIMER as Vn, getMessageContaintWrapperClass as Pn, Logo as zn, getMainPaddingClass as Hr, r as Un, LOCAL_STORAGE_SEARCH as Hn, LOCAL_STORAGE_SORT as Fn } from "./index.
|
|
3
|
-
import
|
|
2
|
+
import { f as ye, ACTION_SORT as Rn, ACTION_SEARCH as In, ACTION_RESET_PROMPT as Ea, ACTION_TOGGLE_PROMPT as Ta, ROLE_ASSISTANT as Fe, DEFAULT_AI_PROVIDER as ot, re as $e, DEFAULT_ICON_ACTION_SIZE as ge, L as An, j as Mr, C as Dr, LOCAL_STORAGE_PREFIX as Ft, LOCAL_STORAGE_PRIVATE_DISCLOSURE as $n, un as Le, PROVIDER_ANTHROPIC as Ct, PROVIDER_OPENAI as Vr, PROMPT_CLASSNAME as Ln, PROMPT_EDITABLE_AREA_CLASSNAME as On, ROLE_SYSTEM as Bn, ROLE_INTERNAL as at, ROLE_HIDDEN as Mn, STATS_SEPARATOR as Pr, ERROR_MESSAGE as zr, CLIPBOARD_PROMPT as Ur, TYPE_QUESTION as Dn, ROLE_USER as Sa, FOOTER_DISCLAIMER as Vn, getMessageContaintWrapperClass as Pn, Logo as zn, getMainPaddingClass as Hr, r as Un, LOCAL_STORAGE_SEARCH as Hn, LOCAL_STORAGE_SORT as Fn } from "./index.DdXdvpdr.js";
|
|
3
|
+
import m from "clsx";
|
|
4
4
|
import * as J from "react";
|
|
5
|
-
import U, { useEffect as M, useRef as
|
|
5
|
+
import U, { useEffect as M, useRef as S, useState as W, useCallback as Z, useSyncExternalStore as Wn, useMemo as oe, useId as dr, useLayoutEffect as pe, useContext as G, createContext as Gn, useDebugValue as jn, forwardRef as Ca, lazy as Na, Suspense as Wt, useReducer as Nt } from "react";
|
|
6
6
|
import { useMergeRefs as ur, FloatingPortal as Ra, FloatingOverlay as qn, FloatingFocusManager as Ia, useFloating as Aa, useClick as $a, useDismiss as La, useRole as Oa, useInteractions as Ba, useFloatingTree as Ma, useFloatingNodeId as Kn, useListItem as Da, offset as Yn, flip as Jn, shift as Zn, autoUpdate as Xn, useListNavigation as Qn, useTypeahead as eo, FloatingNode as to, FloatingList as ro, FloatingTree as ao } from "@floating-ui/react";
|
|
7
7
|
const Fr = ({
|
|
8
8
|
className: e,
|
|
@@ -242,7 +242,7 @@ const mo = "av-header", fo = ({
|
|
|
242
242
|
noMargin: s = !1,
|
|
243
243
|
noPadding: c = !1
|
|
244
244
|
}) => {
|
|
245
|
-
const d =
|
|
245
|
+
const d = m(
|
|
246
246
|
mo,
|
|
247
247
|
{
|
|
248
248
|
"border-border-accent": a === "dark" && !r && !n && !i,
|
|
@@ -258,12 +258,12 @@ const mo = "av-header", fo = ({
|
|
|
258
258
|
"sticky top-0 z-50": o
|
|
259
259
|
},
|
|
260
260
|
t
|
|
261
|
-
),
|
|
261
|
+
), f = m({
|
|
262
262
|
"mt-0": !s,
|
|
263
263
|
"p-2": !c,
|
|
264
264
|
"flex flex-col w-full md:mx-auto md:max-w-4xl": !r
|
|
265
265
|
});
|
|
266
|
-
return /* @__PURE__ */ l("header", { className: d, children: /* @__PURE__ */ l("div", { className:
|
|
266
|
+
return /* @__PURE__ */ l("header", { className: d, children: /* @__PURE__ */ l("div", { className: f, children: e }) });
|
|
267
267
|
};
|
|
268
268
|
function ho(e) {
|
|
269
269
|
const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
|
|
@@ -279,15 +279,15 @@ function ho(e) {
|
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
function go(e, t) {
|
|
282
|
-
const { alt: r, ctrl: a, meta: n, mod: o, shift: i, key: s } = e, { altKey: c, ctrlKey: d, metaKey:
|
|
282
|
+
const { alt: r, ctrl: a, meta: n, mod: o, shift: i, key: s } = e, { altKey: c, ctrlKey: d, metaKey: f, shiftKey: u, key: h } = t;
|
|
283
283
|
if (r !== c)
|
|
284
284
|
return !1;
|
|
285
285
|
if (o) {
|
|
286
|
-
if (!d && !
|
|
286
|
+
if (!d && !f)
|
|
287
287
|
return !1;
|
|
288
|
-
} else if (a !== d || n !==
|
|
288
|
+
} else if (a !== d || n !== f)
|
|
289
289
|
return !1;
|
|
290
|
-
return i !==
|
|
290
|
+
return i !== u ? !1 : !!(s && (h.toLowerCase() === s.toLowerCase() || t.code.replace("Key", "").toLowerCase() === s.toLowerCase()));
|
|
291
291
|
}
|
|
292
292
|
function Va(e) {
|
|
293
293
|
return (t) => go(ho(e), t);
|
|
@@ -316,7 +316,7 @@ function bo(e, t = ["INPUT", "TEXTAREA", "SELECT"], r = !1) {
|
|
|
316
316
|
}, [e, t, r]);
|
|
317
317
|
}
|
|
318
318
|
function vo() {
|
|
319
|
-
const e =
|
|
319
|
+
const e = S(null), [t, r] = W(!1);
|
|
320
320
|
return { ref: Z((a) => {
|
|
321
321
|
var n, o;
|
|
322
322
|
typeof IntersectionObserver < "u" && (a && !e.current ? e.current = new IntersectionObserver(
|
|
@@ -325,7 +325,7 @@ function vo() {
|
|
|
325
325
|
}, []), inViewport: t };
|
|
326
326
|
}
|
|
327
327
|
function ko() {
|
|
328
|
-
const e =
|
|
328
|
+
const e = S(!1);
|
|
329
329
|
return M(() => (e.current = !0, () => {
|
|
330
330
|
e.current = !1;
|
|
331
331
|
}), []), Z(() => e.current, []);
|
|
@@ -387,7 +387,7 @@ const Eo = {
|
|
|
387
387
|
right: 0
|
|
388
388
|
};
|
|
389
389
|
function To(e) {
|
|
390
|
-
const t = ko(), r =
|
|
390
|
+
const t = ko(), r = S(0), a = S(null), [n, o] = W(Eo), i = oe(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
|
|
391
391
|
const c = s[0];
|
|
392
392
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
393
393
|
a.current && t() && o(c.contentRect);
|
|
@@ -407,12 +407,12 @@ function So({
|
|
|
407
407
|
}) {
|
|
408
408
|
const [o, i] = W(!1), [s, c] = W(
|
|
409
409
|
t !== void 0 ? t : r
|
|
410
|
-
), d = (
|
|
411
|
-
c(
|
|
410
|
+
), d = (f) => {
|
|
411
|
+
c(f), a == null || a(f);
|
|
412
412
|
};
|
|
413
413
|
return M(() => {
|
|
414
414
|
(async () => e !== void 0 && !o && n > 0 && (await new Promise(
|
|
415
|
-
(
|
|
415
|
+
(f) => setTimeout(f, n)
|
|
416
416
|
), i(!0)))();
|
|
417
417
|
}, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [s, d, !1];
|
|
418
418
|
}
|
|
@@ -459,7 +459,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
459
459
|
stickyHeader: a,
|
|
460
460
|
stickyFooter: n
|
|
461
461
|
}) => ({
|
|
462
|
-
wrapper:
|
|
462
|
+
wrapper: m(
|
|
463
463
|
"not-prose relative w-full rounded-lg shadow-md",
|
|
464
464
|
{
|
|
465
465
|
"overflow-x-auto": !a && !n,
|
|
@@ -475,13 +475,13 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
475
475
|
},
|
|
476
476
|
r
|
|
477
477
|
),
|
|
478
|
-
table:
|
|
478
|
+
table: m("my-0 w-full text-left text-sm", t, {
|
|
479
479
|
"text-copy-light": e === "dark",
|
|
480
480
|
"text-copy-dark": e === "light",
|
|
481
481
|
"text-copy-light dark:text-copy-dark": e === "system",
|
|
482
482
|
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
483
483
|
}),
|
|
484
|
-
caption:
|
|
484
|
+
caption: m("py-2 text-sm font-bold", {
|
|
485
485
|
"text-copy-light": e === "dark",
|
|
486
486
|
"text-copy-dark": e === "light",
|
|
487
487
|
"text-copy-light dark:text-copy-dark": e === "system",
|
|
@@ -491,7 +491,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
491
491
|
className: e,
|
|
492
492
|
stickyHeader: t,
|
|
493
493
|
mode: r
|
|
494
|
-
}) =>
|
|
494
|
+
}) => m(
|
|
495
495
|
{
|
|
496
496
|
"sticky top-0 z-10": t,
|
|
497
497
|
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": t && r === "dark",
|
|
@@ -504,7 +504,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
504
504
|
className: e,
|
|
505
505
|
stickyFooter: t,
|
|
506
506
|
mode: r
|
|
507
|
-
}) =>
|
|
507
|
+
}) => m(
|
|
508
508
|
{
|
|
509
509
|
"sticky bottom-0 z-10": t,
|
|
510
510
|
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": t && r === "dark",
|
|
@@ -517,7 +517,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
517
517
|
mode: e,
|
|
518
518
|
className: t,
|
|
519
519
|
cellWrapper: r
|
|
520
|
-
}) => r === dt || r === mr ?
|
|
520
|
+
}) => r === dt || r === mr ? m(
|
|
521
521
|
{
|
|
522
522
|
"bg-table-head-dark": e === "dark" || e === "system",
|
|
523
523
|
"bg-table-head-light": e === "light" || e === "alt-system",
|
|
@@ -525,7 +525,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
525
525
|
"dark:bg-table-head-dark": e === "alt-system"
|
|
526
526
|
},
|
|
527
527
|
t
|
|
528
|
-
) :
|
|
528
|
+
) : m(
|
|
529
529
|
"border-b last:border-0",
|
|
530
530
|
{
|
|
531
531
|
"border-table-dark": e === "dark" || e === "system",
|
|
@@ -545,12 +545,12 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
545
545
|
mode: a,
|
|
546
546
|
align: n
|
|
547
547
|
}) => ({
|
|
548
|
-
alignClasses:
|
|
548
|
+
alignClasses: m({
|
|
549
549
|
"flex justify-start text-left": n === "left",
|
|
550
550
|
"flex justify-center text-center": n === "center",
|
|
551
551
|
"flex justify-end text-right": n === "right"
|
|
552
552
|
}),
|
|
553
|
-
mainClasses:
|
|
553
|
+
mainClasses: m(
|
|
554
554
|
{
|
|
555
555
|
"text-copy-light": a === "dark" || a === "system",
|
|
556
556
|
"text-copy-dark": a === "light" || a === "alt-system",
|
|
@@ -564,7 +564,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
564
564
|
)
|
|
565
565
|
}), Oo = ({
|
|
566
566
|
buttonClassName: e
|
|
567
|
-
}) =>
|
|
567
|
+
}) => m("rounded-none text-sm", e), Kr = "av-button", ut = "icon", za = "button", jt = "link", Bo = ({
|
|
568
568
|
type: e,
|
|
569
569
|
size: t,
|
|
570
570
|
labelRight: r,
|
|
@@ -576,13 +576,13 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
576
576
|
switch (e) {
|
|
577
577
|
case za:
|
|
578
578
|
case jt:
|
|
579
|
-
return
|
|
579
|
+
return m({
|
|
580
580
|
[i]: t === "small",
|
|
581
581
|
[s]: t === "medium",
|
|
582
582
|
[c]: t === "large"
|
|
583
583
|
});
|
|
584
584
|
case ut:
|
|
585
|
-
return
|
|
585
|
+
return m("flex items-center", {
|
|
586
586
|
"justify-center": n === "center",
|
|
587
587
|
"justify-start": n === "left",
|
|
588
588
|
"justify-end": n === "right",
|
|
@@ -610,14 +610,14 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
610
610
|
switch (e) {
|
|
611
611
|
case za:
|
|
612
612
|
case jt:
|
|
613
|
-
return
|
|
613
|
+
return m({
|
|
614
614
|
"text-center": e === jt,
|
|
615
615
|
[n]: t === "small",
|
|
616
616
|
[o]: t === "medium",
|
|
617
617
|
[i]: t === "large"
|
|
618
618
|
});
|
|
619
619
|
case ut:
|
|
620
|
-
return
|
|
620
|
+
return m({
|
|
621
621
|
[n]: t === "small" && (r || a),
|
|
622
622
|
[o]: t === "medium" && (r || a),
|
|
623
623
|
[i]: t === "large" && (r || a)
|
|
@@ -632,7 +632,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
632
632
|
if (t)
|
|
633
633
|
return "not-prose";
|
|
634
634
|
if (a === "primary")
|
|
635
|
-
return
|
|
635
|
+
return m("not-prose", {
|
|
636
636
|
truncate: !r,
|
|
637
637
|
"text-copy-light": e === "dark" || e === "system",
|
|
638
638
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -640,7 +640,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
640
640
|
"dark:text-copy-light": e === "alt-system"
|
|
641
641
|
});
|
|
642
642
|
if (a === "secondary")
|
|
643
|
-
return
|
|
643
|
+
return m("not-prose", {
|
|
644
644
|
truncate: !r,
|
|
645
645
|
"text-copy-light": e === "light" || e === "system",
|
|
646
646
|
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
@@ -648,7 +648,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
648
648
|
"dark:text-copy-light": e === "system"
|
|
649
649
|
});
|
|
650
650
|
if (a === "danger")
|
|
651
|
-
return
|
|
651
|
+
return m("not-prose", {
|
|
652
652
|
truncate: !r,
|
|
653
653
|
"text-copy-light": e === "dark" || e === "system",
|
|
654
654
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -656,7 +656,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
656
656
|
"dark:text-copy-light": e === "alt-system"
|
|
657
657
|
});
|
|
658
658
|
if (a === "selected")
|
|
659
|
-
return
|
|
659
|
+
return m("not-prose text-copy-lighter", {
|
|
660
660
|
truncate: !r
|
|
661
661
|
});
|
|
662
662
|
}, Vo = ({
|
|
@@ -666,21 +666,21 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
666
666
|
}) => {
|
|
667
667
|
if (!t) {
|
|
668
668
|
if (r === "primary")
|
|
669
|
-
return
|
|
669
|
+
return m({
|
|
670
670
|
"bg-action-dark": e === "dark",
|
|
671
671
|
"bg-action-light": e === "light",
|
|
672
672
|
"bg-action-dark dark:bg-action-light": e === "system",
|
|
673
673
|
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
674
674
|
});
|
|
675
675
|
if (r === "secondary")
|
|
676
|
-
return
|
|
676
|
+
return m({
|
|
677
677
|
"bg-action-dark": e === "light",
|
|
678
678
|
"bg-action-light": e === "dark",
|
|
679
679
|
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
680
680
|
"bg-action-light dark:bg-action-dark": e === "system"
|
|
681
681
|
});
|
|
682
682
|
if (r === "danger")
|
|
683
|
-
return
|
|
683
|
+
return m({
|
|
684
684
|
"bg-action-danger-dark": e === "dark",
|
|
685
685
|
"bg-action-danger-light": e === "light",
|
|
686
686
|
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
@@ -691,7 +691,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
691
691
|
}
|
|
692
692
|
}, Po = ({
|
|
693
693
|
radius: e
|
|
694
|
-
}) =>
|
|
694
|
+
}) => m({
|
|
695
695
|
"rounded-full": e === "large",
|
|
696
696
|
"rounded-md": e === "medium",
|
|
697
697
|
"rounded-sm": e === "small"
|
|
@@ -703,21 +703,21 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
703
703
|
if (t)
|
|
704
704
|
return "";
|
|
705
705
|
if (r === "primary")
|
|
706
|
-
return
|
|
706
|
+
return m("hover:text-copy-light-hover", {
|
|
707
707
|
"hover:bg-action-dark-hover": e === "dark",
|
|
708
708
|
"hover:bg-action-light-hover": e === "light",
|
|
709
709
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
710
710
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
711
711
|
});
|
|
712
712
|
if (r === "secondary")
|
|
713
|
-
return
|
|
713
|
+
return m("hover:text-copy-light-hover", {
|
|
714
714
|
"hover:bg-action-dark-hover": e === "light",
|
|
715
715
|
"hover:bg-action-light-hover": e === "dark",
|
|
716
716
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
717
717
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
718
718
|
});
|
|
719
719
|
if (r === "danger")
|
|
720
|
-
return
|
|
720
|
+
return m("hover:text-copy-light-hover", {
|
|
721
721
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
722
722
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
723
723
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
@@ -733,21 +733,21 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
733
733
|
if (t)
|
|
734
734
|
return "";
|
|
735
735
|
if (r === "primary")
|
|
736
|
-
return
|
|
736
|
+
return m("active:text-copy-light-active", {
|
|
737
737
|
"active:bg-action-dark-active": e === "dark",
|
|
738
738
|
"active:bg-action-light-active": e === "light",
|
|
739
739
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
740
740
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
741
741
|
});
|
|
742
742
|
if (r === "secondary")
|
|
743
|
-
return
|
|
743
|
+
return m("active:text-copy-light-active", {
|
|
744
744
|
"active:bg-action-dark-active": e === "light",
|
|
745
745
|
"active:bg-action-light-active": e === "dark",
|
|
746
746
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
747
747
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
748
748
|
});
|
|
749
749
|
if (r === "danger")
|
|
750
|
-
return
|
|
750
|
+
return m("active:text-copy-lighter-active", {
|
|
751
751
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
752
752
|
"active:bg-action-danger-light-active": e === "light",
|
|
753
753
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
@@ -763,21 +763,21 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
763
763
|
if (t)
|
|
764
764
|
return "border border-transparent";
|
|
765
765
|
if (r === "primary")
|
|
766
|
-
return
|
|
766
|
+
return m("border", {
|
|
767
767
|
"border-border-dark": e === "dark",
|
|
768
768
|
"border-border-accent": e === "light",
|
|
769
769
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
770
770
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
771
771
|
});
|
|
772
772
|
if (r === "secondary")
|
|
773
|
-
return
|
|
773
|
+
return m("border", {
|
|
774
774
|
"border-border-dark": e === "light",
|
|
775
775
|
"border-border-accent": e === "dark",
|
|
776
776
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
777
777
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
778
778
|
});
|
|
779
779
|
if (r === "danger")
|
|
780
|
-
return
|
|
780
|
+
return m("border", {
|
|
781
781
|
"border-border-danger-dark": e === "dark",
|
|
782
782
|
"border-border-danger-medium": e === "light",
|
|
783
783
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
@@ -787,7 +787,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
787
787
|
return "border border-border-selected-dark";
|
|
788
788
|
}, Fo = ({
|
|
789
789
|
focusMode: e
|
|
790
|
-
}) =>
|
|
790
|
+
}) => m("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
791
791
|
"focus:outline-focus-dark": e === "dark",
|
|
792
792
|
"focus:outline-focus-light": e === "light",
|
|
793
793
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -796,7 +796,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
796
796
|
mode: e,
|
|
797
797
|
raw: t,
|
|
798
798
|
iconClassName: r
|
|
799
|
-
}) => t ? "" :
|
|
799
|
+
}) => t ? "" : m(
|
|
800
800
|
{
|
|
801
801
|
"text-copy-accent-dark": e === "light" || e === "alt-system",
|
|
802
802
|
"text-copy-light": e === "dark" || e === "system",
|
|
@@ -806,7 +806,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
806
806
|
r
|
|
807
807
|
), Go = ({
|
|
808
808
|
animated: e
|
|
809
|
-
}) =>
|
|
809
|
+
}) => m({
|
|
810
810
|
"transition-opacity duration-300 ease-in": e
|
|
811
811
|
}), jo = ({
|
|
812
812
|
type: e,
|
|
@@ -819,42 +819,42 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
819
819
|
size: s,
|
|
820
820
|
noBorder: c,
|
|
821
821
|
labelRight: d,
|
|
822
|
-
labelLeft:
|
|
823
|
-
noBackground:
|
|
824
|
-
variant:
|
|
825
|
-
noTruncate:
|
|
822
|
+
labelLeft: f,
|
|
823
|
+
noBackground: u,
|
|
824
|
+
variant: h,
|
|
825
|
+
noTruncate: g,
|
|
826
826
|
align: p,
|
|
827
|
-
radius:
|
|
828
|
-
animated:
|
|
829
|
-
}) => (
|
|
827
|
+
radius: y,
|
|
828
|
+
animated: b
|
|
829
|
+
}) => (h || (h = "primary"), r ? m(Kr, t) : m(
|
|
830
830
|
Kr,
|
|
831
831
|
Do({
|
|
832
832
|
mode: a,
|
|
833
|
-
variant:
|
|
834
|
-
noBackground:
|
|
835
|
-
noTruncate:
|
|
833
|
+
variant: h,
|
|
834
|
+
noBackground: u,
|
|
835
|
+
noTruncate: g
|
|
836
836
|
}),
|
|
837
|
-
Vo({ mode: a, noBackground:
|
|
838
|
-
Po({ radius:
|
|
837
|
+
Vo({ mode: a, noBackground: u, variant: h }),
|
|
838
|
+
Po({ radius: y }),
|
|
839
839
|
Bo({
|
|
840
840
|
type: e,
|
|
841
841
|
size: s,
|
|
842
842
|
labelRight: d,
|
|
843
|
-
labelLeft:
|
|
843
|
+
labelLeft: f,
|
|
844
844
|
align: p,
|
|
845
|
-
animated:
|
|
845
|
+
animated: b
|
|
846
846
|
}),
|
|
847
|
-
Mo({ type: e, size: s, labelRight: d, labelLeft:
|
|
848
|
-
Ho({ mode: a, variant:
|
|
847
|
+
Mo({ type: e, size: s, labelRight: d, labelLeft: f }),
|
|
848
|
+
Ho({ mode: a, variant: h, noBorder: c }),
|
|
849
849
|
Fo({ focusMode: n }),
|
|
850
|
-
zo({ mode: a, variant:
|
|
851
|
-
Uo({ mode: a, variant:
|
|
850
|
+
zo({ mode: a, variant: h, disabled: o }),
|
|
851
|
+
Uo({ mode: a, variant: h, disabled: o }),
|
|
852
852
|
{
|
|
853
853
|
"w-full": i,
|
|
854
854
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
855
855
|
},
|
|
856
|
-
|
|
857
|
-
"transition-[width] duration-300 ease-in-out": e === ut &&
|
|
856
|
+
m({
|
|
857
|
+
"transition-[width] duration-300 ease-in-out": e === ut && b
|
|
858
858
|
}),
|
|
859
859
|
t
|
|
860
860
|
)), qo = (e, t, r) => {
|
|
@@ -875,7 +875,7 @@ const dt = "thead", mr = "tfoot", Ce = "tbody", Ue = {
|
|
|
875
875
|
});
|
|
876
876
|
Ua.displayName = "BaseButton";
|
|
877
877
|
function Ko() {
|
|
878
|
-
const e =
|
|
878
|
+
const e = S(!1);
|
|
879
879
|
return M(() => (e.current = !0, () => {
|
|
880
880
|
e.current = !1;
|
|
881
881
|
}), []), Z(() => e.current, []);
|
|
@@ -899,7 +899,7 @@ const Jo = {
|
|
|
899
899
|
right: 0
|
|
900
900
|
};
|
|
901
901
|
function Rt(e) {
|
|
902
|
-
const t = Ko(), r =
|
|
902
|
+
const t = Ko(), r = S(0), a = S(null), [n, o] = W(Jo), i = oe(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
|
|
903
903
|
const c = s[0];
|
|
904
904
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
905
905
|
a.current && t() && o(c.contentRect);
|
|
@@ -935,19 +935,19 @@ const Zo = {
|
|
|
935
935
|
raw: s = !1,
|
|
936
936
|
noBorder: c = !1,
|
|
937
937
|
"aria-label": d,
|
|
938
|
-
label:
|
|
939
|
-
size:
|
|
940
|
-
labelRight:
|
|
941
|
-
labelLeft:
|
|
938
|
+
label: f,
|
|
939
|
+
size: u = "medium",
|
|
940
|
+
labelRight: h,
|
|
941
|
+
labelLeft: g,
|
|
942
942
|
noBackground: p = !1,
|
|
943
|
-
align:
|
|
944
|
-
radius:
|
|
943
|
+
align: y = "center",
|
|
944
|
+
radius: b = "large",
|
|
945
945
|
variant: v = "primary",
|
|
946
946
|
iconClassName: x,
|
|
947
947
|
animated: k = !1,
|
|
948
|
-
...
|
|
949
|
-
},
|
|
950
|
-
const
|
|
948
|
+
...A
|
|
949
|
+
}, E) => {
|
|
950
|
+
const C = jo({
|
|
951
951
|
type: ut,
|
|
952
952
|
mode: r,
|
|
953
953
|
focusMode: a,
|
|
@@ -956,54 +956,54 @@ const Zo = {
|
|
|
956
956
|
raw: s,
|
|
957
957
|
className: o,
|
|
958
958
|
noBorder: c,
|
|
959
|
-
size:
|
|
960
|
-
labelRight:
|
|
961
|
-
labelLeft:
|
|
959
|
+
size: u,
|
|
960
|
+
labelRight: h,
|
|
961
|
+
labelLeft: g,
|
|
962
962
|
noBackground: p,
|
|
963
|
-
align:
|
|
964
|
-
radius:
|
|
963
|
+
align: y,
|
|
964
|
+
radius: b,
|
|
965
965
|
variant: v,
|
|
966
966
|
animated: k
|
|
967
|
-
}),
|
|
967
|
+
}), N = Wo({ mode: r, raw: s, iconClassName: x }), _ = Go({ animated: k }), [w, T] = Rt(), [R, B] = Rt(), [$, O] = Rt(), V = S(0), I = S(null), H = Yo([E, I]);
|
|
968
968
|
return pe(() => {
|
|
969
|
-
|
|
970
|
-
}, [O,
|
|
971
|
-
|
|
969
|
+
$ && $.current && k && (V.current = O.width + Xo[u] + (c ? 0 : Qo));
|
|
970
|
+
}, [O, $, u, c, k]), pe(() => {
|
|
971
|
+
I && I.current && k && (h && w && T.width > 0 ? (w.current && (w.current.style.opacity = "100"), I.current.style.width = `${T.width + V.current}px`) : g && B.width > 0 ? (R.current && (R.current.style.opacity = "100"), I.current.style.width = `${B.width + V.current}px`) : (w.current && (w.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), I.current.style.width = `${Zo[u]}px`));
|
|
972
972
|
}, [
|
|
973
|
-
|
|
974
|
-
|
|
973
|
+
T,
|
|
974
|
+
h,
|
|
975
975
|
w,
|
|
976
976
|
B,
|
|
977
|
+
g,
|
|
978
|
+
R,
|
|
977
979
|
u,
|
|
978
|
-
C,
|
|
979
|
-
m,
|
|
980
980
|
k
|
|
981
981
|
]), /* @__PURE__ */ L(
|
|
982
982
|
Ua,
|
|
983
983
|
{
|
|
984
984
|
ref: H,
|
|
985
|
-
className:
|
|
985
|
+
className: C,
|
|
986
986
|
disabled: t,
|
|
987
987
|
type: i,
|
|
988
|
-
"aria-label": d ||
|
|
989
|
-
...
|
|
988
|
+
"aria-label": d || f,
|
|
989
|
+
...A,
|
|
990
990
|
children: [
|
|
991
991
|
/* @__PURE__ */ l(
|
|
992
992
|
Yr,
|
|
993
993
|
{
|
|
994
|
-
label:
|
|
995
|
-
labelRef:
|
|
996
|
-
labelClass:
|
|
994
|
+
label: g,
|
|
995
|
+
labelRef: R,
|
|
996
|
+
labelClass: _,
|
|
997
997
|
labelInnerClass: "pr-2"
|
|
998
998
|
}
|
|
999
999
|
),
|
|
1000
|
-
/* @__PURE__ */ l("span", { ref:
|
|
1000
|
+
/* @__PURE__ */ l("span", { ref: $, className: N, children: e }),
|
|
1001
1001
|
/* @__PURE__ */ l(
|
|
1002
1002
|
Yr,
|
|
1003
1003
|
{
|
|
1004
|
-
label:
|
|
1004
|
+
label: h,
|
|
1005
1005
|
labelRef: w,
|
|
1006
|
-
labelClass:
|
|
1006
|
+
labelClass: _,
|
|
1007
1007
|
labelInnerClass: "pl-2"
|
|
1008
1008
|
}
|
|
1009
1009
|
)
|
|
@@ -1039,7 +1039,7 @@ const Fa = U.forwardRef(
|
|
|
1039
1039
|
active: a = !1,
|
|
1040
1040
|
...n
|
|
1041
1041
|
}, o) => {
|
|
1042
|
-
const i = a ?
|
|
1042
|
+
const i = a ? m(
|
|
1043
1043
|
"relative",
|
|
1044
1044
|
"focus-within:static",
|
|
1045
1045
|
"focus-within:after:border-transparent",
|
|
@@ -1059,7 +1059,7 @@ const Fa = U.forwardRef(
|
|
|
1059
1059
|
return /* @__PURE__ */ l("div", { className: i, children: /* @__PURE__ */ l(
|
|
1060
1060
|
Ha,
|
|
1061
1061
|
{
|
|
1062
|
-
className:
|
|
1062
|
+
className: m("justify-center", r),
|
|
1063
1063
|
ref: o,
|
|
1064
1064
|
mode: t,
|
|
1065
1065
|
radius: "small",
|
|
@@ -1081,7 +1081,7 @@ const fr = ({
|
|
|
1081
1081
|
semantic: s = !1,
|
|
1082
1082
|
...c
|
|
1083
1083
|
}) => {
|
|
1084
|
-
const d =
|
|
1084
|
+
const d = m(o, a);
|
|
1085
1085
|
return /* @__PURE__ */ L(_e, { children: [
|
|
1086
1086
|
/* @__PURE__ */ l(
|
|
1087
1087
|
"svg",
|
|
@@ -1222,9 +1222,9 @@ const Oe = U.createContext({
|
|
|
1222
1222
|
maxHeight: s,
|
|
1223
1223
|
stickyHeader: c,
|
|
1224
1224
|
stickyFooter: d,
|
|
1225
|
-
...
|
|
1225
|
+
...f
|
|
1226
1226
|
}) => {
|
|
1227
|
-
const
|
|
1227
|
+
const u = Ro({
|
|
1228
1228
|
mode: t,
|
|
1229
1229
|
className: o,
|
|
1230
1230
|
wrapperClassName: i,
|
|
@@ -1238,12 +1238,12 @@ const Oe = U.createContext({
|
|
|
1238
1238
|
children: /* @__PURE__ */ l(
|
|
1239
1239
|
"div",
|
|
1240
1240
|
{
|
|
1241
|
-
className:
|
|
1241
|
+
className: u.wrapper,
|
|
1242
1242
|
...s && {
|
|
1243
1243
|
style: { maxHeight: s }
|
|
1244
1244
|
},
|
|
1245
|
-
children: /* @__PURE__ */ L("table", { className:
|
|
1246
|
-
r && /* @__PURE__ */ l("caption", { className:
|
|
1245
|
+
children: /* @__PURE__ */ L("table", { className: u.table, summary: n, ...f, children: [
|
|
1246
|
+
r && /* @__PURE__ */ l("caption", { className: u.caption, children: r }),
|
|
1247
1247
|
e
|
|
1248
1248
|
] })
|
|
1249
1249
|
}
|
|
@@ -1316,23 +1316,23 @@ const Oe = U.createContext({
|
|
|
1316
1316
|
onClick: s,
|
|
1317
1317
|
sortDirection: c,
|
|
1318
1318
|
sortedCell: d,
|
|
1319
|
-
cellId:
|
|
1320
|
-
...
|
|
1319
|
+
cellId: f,
|
|
1320
|
+
...u
|
|
1321
1321
|
}) => {
|
|
1322
|
-
const
|
|
1322
|
+
const h = Oo({ buttonClassName: r });
|
|
1323
1323
|
return /* @__PURE__ */ l(
|
|
1324
1324
|
ai,
|
|
1325
1325
|
{
|
|
1326
1326
|
component: n,
|
|
1327
1327
|
className: a,
|
|
1328
1328
|
role: "columnheader",
|
|
1329
|
-
"aria-sort": c === Ue.ASC && d ===
|
|
1330
|
-
...
|
|
1329
|
+
"aria-sort": c === Ue.ASC && d === f ? "ascending" : c === Ue.DESC && d === f ? "descending" : "other",
|
|
1330
|
+
...u,
|
|
1331
1331
|
children: /* @__PURE__ */ l(
|
|
1332
1332
|
Fa,
|
|
1333
1333
|
{
|
|
1334
|
-
active: d ===
|
|
1335
|
-
className:
|
|
1334
|
+
active: d === f,
|
|
1335
|
+
className: h,
|
|
1336
1336
|
onClick: s,
|
|
1337
1337
|
align: e,
|
|
1338
1338
|
noBorder: !0,
|
|
@@ -1340,7 +1340,7 @@ const Oe = U.createContext({
|
|
|
1340
1340
|
mode: i,
|
|
1341
1341
|
fullWidth: !0,
|
|
1342
1342
|
labelRight: t,
|
|
1343
|
-
children: c === Ue.ASC && d ===
|
|
1343
|
+
children: c === Ue.ASC && d === f ? /* @__PURE__ */ l(ri, { className: "size-4", monotone: !0 }) : c === Ue.DESC && d === f ? /* @__PURE__ */ l(ti, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ l(ei, { className: "size-4", monotone: !0 })
|
|
1344
1344
|
}
|
|
1345
1345
|
)
|
|
1346
1346
|
}
|
|
@@ -1420,41 +1420,41 @@ function di() {
|
|
|
1420
1420
|
if (Zr) return At;
|
|
1421
1421
|
Zr = 1;
|
|
1422
1422
|
var e = U;
|
|
1423
|
-
function t(
|
|
1424
|
-
return
|
|
1423
|
+
function t(u, h) {
|
|
1424
|
+
return u === h && (u !== 0 || 1 / u === 1 / h) || u !== u && h !== h;
|
|
1425
1425
|
}
|
|
1426
1426
|
var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, o = e.useLayoutEffect, i = e.useDebugValue;
|
|
1427
|
-
function s(
|
|
1428
|
-
var
|
|
1427
|
+
function s(u, h) {
|
|
1428
|
+
var g = h(), p = a({ inst: { value: g, getSnapshot: h } }), y = p[0].inst, b = p[1];
|
|
1429
1429
|
return o(
|
|
1430
1430
|
function() {
|
|
1431
|
-
|
|
1431
|
+
y.value = g, y.getSnapshot = h, c(y) && b({ inst: y });
|
|
1432
1432
|
},
|
|
1433
|
-
[
|
|
1433
|
+
[u, g, h]
|
|
1434
1434
|
), n(
|
|
1435
1435
|
function() {
|
|
1436
|
-
return c(
|
|
1437
|
-
c(
|
|
1436
|
+
return c(y) && b({ inst: y }), u(function() {
|
|
1437
|
+
c(y) && b({ inst: y });
|
|
1438
1438
|
});
|
|
1439
1439
|
},
|
|
1440
|
-
[
|
|
1441
|
-
), i(
|
|
1440
|
+
[u]
|
|
1441
|
+
), i(g), g;
|
|
1442
1442
|
}
|
|
1443
|
-
function c(
|
|
1444
|
-
var
|
|
1445
|
-
|
|
1443
|
+
function c(u) {
|
|
1444
|
+
var h = u.getSnapshot;
|
|
1445
|
+
u = u.value;
|
|
1446
1446
|
try {
|
|
1447
|
-
var
|
|
1448
|
-
return !r(
|
|
1447
|
+
var g = h();
|
|
1448
|
+
return !r(u, g);
|
|
1449
1449
|
} catch {
|
|
1450
1450
|
return !0;
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
|
-
function d(
|
|
1454
|
-
return
|
|
1453
|
+
function d(u, h) {
|
|
1454
|
+
return h();
|
|
1455
1455
|
}
|
|
1456
|
-
var
|
|
1457
|
-
return At.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore :
|
|
1456
|
+
var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : s;
|
|
1457
|
+
return At.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, At;
|
|
1458
1458
|
}
|
|
1459
1459
|
var $t = {};
|
|
1460
1460
|
/**
|
|
@@ -1469,54 +1469,54 @@ var $t = {};
|
|
|
1469
1469
|
var Xr;
|
|
1470
1470
|
function ui() {
|
|
1471
1471
|
return Xr || (Xr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1472
|
-
function e(
|
|
1473
|
-
return
|
|
1472
|
+
function e(g, p) {
|
|
1473
|
+
return g === p && (g !== 0 || 1 / g === 1 / p) || g !== g && p !== p;
|
|
1474
1474
|
}
|
|
1475
|
-
function t(
|
|
1476
|
-
|
|
1475
|
+
function t(g, p) {
|
|
1476
|
+
f || n.startTransition === void 0 || (f = !0, console.error(
|
|
1477
1477
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
1478
1478
|
));
|
|
1479
|
-
var
|
|
1480
|
-
if (!
|
|
1481
|
-
var
|
|
1482
|
-
o(
|
|
1479
|
+
var y = p();
|
|
1480
|
+
if (!u) {
|
|
1481
|
+
var b = p();
|
|
1482
|
+
o(y, b) || (console.error(
|
|
1483
1483
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
1484
|
-
),
|
|
1484
|
+
), u = !0);
|
|
1485
1485
|
}
|
|
1486
|
-
|
|
1487
|
-
inst: { value:
|
|
1486
|
+
b = i({
|
|
1487
|
+
inst: { value: y, getSnapshot: p }
|
|
1488
1488
|
});
|
|
1489
|
-
var v =
|
|
1489
|
+
var v = b[0].inst, x = b[1];
|
|
1490
1490
|
return c(
|
|
1491
1491
|
function() {
|
|
1492
|
-
v.value =
|
|
1492
|
+
v.value = y, v.getSnapshot = p, r(v) && x({ inst: v });
|
|
1493
1493
|
},
|
|
1494
|
-
[
|
|
1494
|
+
[g, y, p]
|
|
1495
1495
|
), s(
|
|
1496
1496
|
function() {
|
|
1497
|
-
return r(v) && x({ inst: v }),
|
|
1497
|
+
return r(v) && x({ inst: v }), g(function() {
|
|
1498
1498
|
r(v) && x({ inst: v });
|
|
1499
1499
|
});
|
|
1500
1500
|
},
|
|
1501
|
-
[
|
|
1502
|
-
), d(
|
|
1501
|
+
[g]
|
|
1502
|
+
), d(y), y;
|
|
1503
1503
|
}
|
|
1504
|
-
function r(
|
|
1505
|
-
var p =
|
|
1506
|
-
|
|
1504
|
+
function r(g) {
|
|
1505
|
+
var p = g.getSnapshot;
|
|
1506
|
+
g = g.value;
|
|
1507
1507
|
try {
|
|
1508
|
-
var
|
|
1509
|
-
return !o(
|
|
1508
|
+
var y = p();
|
|
1509
|
+
return !o(g, y);
|
|
1510
1510
|
} catch {
|
|
1511
1511
|
return !0;
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
|
-
function a(
|
|
1514
|
+
function a(g, p) {
|
|
1515
1515
|
return p();
|
|
1516
1516
|
}
|
|
1517
1517
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1518
|
-
var n = U, o = typeof Object.is == "function" ? Object.is : e, i = n.useState, s = n.useEffect, c = n.useLayoutEffect, d = n.useDebugValue,
|
|
1519
|
-
$t.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore :
|
|
1518
|
+
var n = U, o = typeof Object.is == "function" ? Object.is : e, i = n.useState, s = n.useEffect, c = n.useLayoutEffect, d = n.useDebugValue, f = !1, u = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
|
|
1519
|
+
$t.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1520
1520
|
}()), $t;
|
|
1521
1521
|
}
|
|
1522
1522
|
var Qr;
|
|
@@ -1653,73 +1653,73 @@ async function Ya(...e) {
|
|
|
1653
1653
|
let i = o.populateCache;
|
|
1654
1654
|
const s = o.rollbackOnError;
|
|
1655
1655
|
let c = o.optimisticData;
|
|
1656
|
-
const d = (
|
|
1656
|
+
const d = (h) => typeof s == "function" ? s(h) : s !== !1, f = o.throwOnError;
|
|
1657
1657
|
if (ce(r)) {
|
|
1658
|
-
const
|
|
1659
|
-
for (const
|
|
1658
|
+
const h = r, g = [], p = t.keys();
|
|
1659
|
+
for (const y of p)
|
|
1660
1660
|
// Skip the special useSWRInfinite and useSWRSubscription keys.
|
|
1661
|
-
!/^\$(inf|sub)\$/.test(
|
|
1662
|
-
return Promise.all(
|
|
1661
|
+
!/^\$(inf|sub)\$/.test(y) && h(t.get(y)._k) && g.push(y);
|
|
1662
|
+
return Promise.all(g.map(u));
|
|
1663
1663
|
}
|
|
1664
|
-
return
|
|
1665
|
-
async function
|
|
1666
|
-
const [
|
|
1667
|
-
if (!
|
|
1668
|
-
const [p,
|
|
1669
|
-
const
|
|
1670
|
-
return (ce(o.revalidate) ? o.revalidate(p().data,
|
|
1664
|
+
return u(r);
|
|
1665
|
+
async function u(h) {
|
|
1666
|
+
const [g] = ft(h);
|
|
1667
|
+
if (!g) return;
|
|
1668
|
+
const [p, y] = Ga(t, g), [b, v, x, k] = le.get(t), A = () => {
|
|
1669
|
+
const $ = b[g];
|
|
1670
|
+
return (ce(o.revalidate) ? o.revalidate(p().data, h) : o.revalidate !== !1) && (delete x[g], delete k[g], $ && $[0]) ? $[0](Ka).then(() => p().data) : p().data;
|
|
1671
1671
|
};
|
|
1672
1672
|
if (e.length < 3)
|
|
1673
|
-
return
|
|
1674
|
-
let
|
|
1675
|
-
const
|
|
1676
|
-
v[
|
|
1677
|
-
|
|
1673
|
+
return A();
|
|
1674
|
+
let E = a, C;
|
|
1675
|
+
const N = er();
|
|
1676
|
+
v[g] = [
|
|
1677
|
+
N,
|
|
1678
1678
|
0
|
|
1679
1679
|
];
|
|
1680
|
-
const
|
|
1681
|
-
if (
|
|
1680
|
+
const _ = !D(c), w = p(), T = w.data, R = w._c, B = D(R) ? T : R;
|
|
1681
|
+
if (_ && (c = ce(c) ? c(B, T) : c, y({
|
|
1682
1682
|
data: c,
|
|
1683
1683
|
_c: B
|
|
1684
|
-
})), ce(
|
|
1684
|
+
})), ce(E))
|
|
1685
1685
|
try {
|
|
1686
|
-
|
|
1687
|
-
} catch (
|
|
1688
|
-
|
|
1686
|
+
E = E(B);
|
|
1687
|
+
} catch ($) {
|
|
1688
|
+
C = $;
|
|
1689
1689
|
}
|
|
1690
|
-
if (
|
|
1691
|
-
if (
|
|
1692
|
-
|
|
1693
|
-
}),
|
|
1694
|
-
if (
|
|
1695
|
-
return
|
|
1696
|
-
} else
|
|
1690
|
+
if (E && Wa(E))
|
|
1691
|
+
if (E = await E.catch(($) => {
|
|
1692
|
+
C = $;
|
|
1693
|
+
}), N !== v[g][0]) {
|
|
1694
|
+
if (C) throw C;
|
|
1695
|
+
return E;
|
|
1696
|
+
} else C && _ && d(C) && (i = !0, y({
|
|
1697
1697
|
data: B,
|
|
1698
1698
|
_c: ee
|
|
1699
1699
|
}));
|
|
1700
|
-
if (i && !
|
|
1700
|
+
if (i && !C)
|
|
1701
1701
|
if (ce(i)) {
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1704
|
-
data:
|
|
1702
|
+
const $ = i(E, B);
|
|
1703
|
+
y({
|
|
1704
|
+
data: $,
|
|
1705
1705
|
error: ee,
|
|
1706
1706
|
_c: ee
|
|
1707
1707
|
});
|
|
1708
1708
|
} else
|
|
1709
|
-
|
|
1710
|
-
data:
|
|
1709
|
+
y({
|
|
1710
|
+
data: E,
|
|
1711
1711
|
error: ee,
|
|
1712
1712
|
_c: ee
|
|
1713
1713
|
});
|
|
1714
|
-
if (v[
|
|
1715
|
-
|
|
1714
|
+
if (v[g][1] = er(), Promise.resolve(A()).then(() => {
|
|
1715
|
+
y({
|
|
1716
1716
|
_c: ee
|
|
1717
1717
|
});
|
|
1718
|
-
}),
|
|
1719
|
-
if (
|
|
1718
|
+
}), C) {
|
|
1719
|
+
if (f) throw C;
|
|
1720
1720
|
return;
|
|
1721
1721
|
}
|
|
1722
|
-
return
|
|
1722
|
+
return E;
|
|
1723
1723
|
}
|
|
1724
1724
|
}
|
|
1725
1725
|
const aa = (e, t) => {
|
|
@@ -1729,15 +1729,15 @@ const aa = (e, t) => {
|
|
|
1729
1729
|
if (!le.has(e)) {
|
|
1730
1730
|
const r = ke(ki, t), a = {}, n = Ya.bind(ee, e);
|
|
1731
1731
|
let o = ve;
|
|
1732
|
-
const i = {}, s = (
|
|
1733
|
-
const
|
|
1734
|
-
return i[
|
|
1735
|
-
}, c = (
|
|
1736
|
-
e.set(
|
|
1737
|
-
const
|
|
1738
|
-
if (
|
|
1739
|
-
for (const p of
|
|
1740
|
-
p(
|
|
1732
|
+
const i = {}, s = (f, u) => {
|
|
1733
|
+
const h = i[f] || [];
|
|
1734
|
+
return i[f] = h, h.push(u), () => h.splice(h.indexOf(u), 1);
|
|
1735
|
+
}, c = (f, u, h) => {
|
|
1736
|
+
e.set(f, u);
|
|
1737
|
+
const g = i[f];
|
|
1738
|
+
if (g)
|
|
1739
|
+
for (const p of g)
|
|
1740
|
+
p(u, h);
|
|
1741
1741
|
}, d = () => {
|
|
1742
1742
|
if (!le.has(e) && (le.set(e, [
|
|
1743
1743
|
a,
|
|
@@ -1748,9 +1748,9 @@ const aa = (e, t) => {
|
|
|
1748
1748
|
c,
|
|
1749
1749
|
s
|
|
1750
1750
|
]), !We)) {
|
|
1751
|
-
const
|
|
1751
|
+
const f = r.initFocus(setTimeout.bind(ee, aa.bind(ee, a, ja))), u = r.initReconnect(setTimeout.bind(ee, aa.bind(ee, a, qa)));
|
|
1752
1752
|
o = () => {
|
|
1753
|
-
|
|
1753
|
+
f && f(), u && u(), le.delete(e);
|
|
1754
1754
|
};
|
|
1755
1755
|
}
|
|
1756
1756
|
};
|
|
@@ -1826,9 +1826,9 @@ const aa = (e, t) => {
|
|
|
1826
1826
|
}), a), Vi = Li.concat(Di), Pi = (e) => function(...r) {
|
|
1827
1827
|
const a = Mi(), [n, o, i] = Bi(r), s = Ii(a, i);
|
|
1828
1828
|
let c = e;
|
|
1829
|
-
const { use: d } = s,
|
|
1830
|
-
for (let
|
|
1831
|
-
c =
|
|
1829
|
+
const { use: d } = s, f = (d || []).concat(Vi);
|
|
1830
|
+
for (let u = f.length; u--; )
|
|
1831
|
+
c = f[u](c);
|
|
1832
1832
|
return c(n, o || s.fetcher || null, s);
|
|
1833
1833
|
}, zi = (e, t, r) => {
|
|
1834
1834
|
const a = t[e] || (t[e] = []);
|
|
@@ -1860,7 +1860,7 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
1860
1860
|
}), Vt = {
|
|
1861
1861
|
dedupe: !0
|
|
1862
1862
|
}, Ui = (e, t, r) => {
|
|
1863
|
-
const { cache: a, compare: n, suspense: o, fallbackData: i, revalidateOnMount: s, revalidateIfStale: c, refreshInterval: d, refreshWhenHidden:
|
|
1863
|
+
const { cache: a, compare: n, suspense: o, fallbackData: i, revalidateOnMount: s, revalidateIfStale: c, refreshInterval: d, refreshWhenHidden: f, refreshWhenOffline: u, keepPreviousData: h } = r, [g, p, y, b] = le.get(a), [v, x] = ft(e), k = S(!1), A = S(!1), E = S(v), C = S(t), N = S(r), _ = () => N.current, w = () => _().isVisible() && _().isOnline(), [T, R, B, $] = Ga(a, v), O = S({}).current, V = D(i) ? D(r.fallback) ? ee : r.fallback[v] : i, I = (P, z) => {
|
|
1864
1864
|
for (const X in O) {
|
|
1865
1865
|
const F = X;
|
|
1866
1866
|
if (F === "data") {
|
|
@@ -1871,19 +1871,19 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
1871
1871
|
}
|
|
1872
1872
|
return !0;
|
|
1873
1873
|
}, H = oe(() => {
|
|
1874
|
-
const P = !v || !t ? !1 : D(s) ?
|
|
1874
|
+
const P = !v || !t ? !1 : D(s) ? _().isPaused() || o ? !1 : c !== !1 : s, z = (Q) => {
|
|
1875
1875
|
const me = ke(Q);
|
|
1876
1876
|
return delete me._k, P ? {
|
|
1877
1877
|
isValidating: !0,
|
|
1878
1878
|
isLoading: !0,
|
|
1879
1879
|
...me
|
|
1880
1880
|
} : me;
|
|
1881
|
-
}, X =
|
|
1881
|
+
}, X = T(), F = $(), se = z(X), Se = X === F ? se : z(F);
|
|
1882
1882
|
let K = se;
|
|
1883
1883
|
return [
|
|
1884
1884
|
() => {
|
|
1885
|
-
const Q = z(
|
|
1886
|
-
return
|
|
1885
|
+
const Q = z(T());
|
|
1886
|
+
return I(Q, K) ? (K.data = Q.data, K.isLoading = Q.isLoading, K.isValidating = Q.isValidating, K.error = Q.error, K) : (K = Q, Q);
|
|
1887
1887
|
},
|
|
1888
1888
|
() => Se
|
|
1889
1889
|
];
|
|
@@ -1892,53 +1892,53 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
1892
1892
|
v
|
|
1893
1893
|
]), j = fi.useSyncExternalStore(Z(
|
|
1894
1894
|
(P) => B(v, (z, X) => {
|
|
1895
|
-
|
|
1895
|
+
I(X, z) || P();
|
|
1896
1896
|
}),
|
|
1897
1897
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1898
1898
|
[
|
|
1899
1899
|
a,
|
|
1900
1900
|
v
|
|
1901
1901
|
]
|
|
1902
|
-
), H[0], H[1]), q = !k.current, Et =
|
|
1902
|
+
), H[0], H[1]), q = !k.current, Et = g[v] && g[v].length > 0, Ee = j.data, Te = D(Ee) ? V && Wa(V) ? Dt(V) : V : Ee, Je = j.error, Rr = S(Te), Ze = h ? D(Ee) ? Rr.current : Ee : Te, Ir = Et && !D(Je) ? !1 : q && !D(s) ? s : _().isPaused() ? !1 : o ? D(Te) ? !1 : c : D(Te) || c, Ar = !!(v && t && q && Ir), Sn = D(j.isValidating) ? Ar : j.isValidating, Cn = D(j.isLoading) ? Ar : j.isLoading, Pe = Z(
|
|
1903
1903
|
async (P) => {
|
|
1904
|
-
const z =
|
|
1905
|
-
if (!v || !z ||
|
|
1904
|
+
const z = C.current;
|
|
1905
|
+
if (!v || !z || A.current || _().isPaused())
|
|
1906
1906
|
return !1;
|
|
1907
1907
|
let X, F, se = !0;
|
|
1908
|
-
const Se = P || {}, K = !
|
|
1908
|
+
const Se = P || {}, K = !y[v] || !Se.dedupe, Q = () => ta ? !A.current && v === E.current && k.current : v === E.current, me = {
|
|
1909
1909
|
isValidating: !1,
|
|
1910
1910
|
isLoading: !1
|
|
1911
1911
|
}, Lr = () => {
|
|
1912
|
-
|
|
1912
|
+
R(me);
|
|
1913
1913
|
}, Or = () => {
|
|
1914
|
-
const re =
|
|
1915
|
-
re && re[1] === F && delete
|
|
1914
|
+
const re = y[v];
|
|
1915
|
+
re && re[1] === F && delete y[v];
|
|
1916
1916
|
}, Br = {
|
|
1917
1917
|
isValidating: !0
|
|
1918
1918
|
};
|
|
1919
|
-
D(
|
|
1919
|
+
D(T().data) && (Br.isLoading = !0);
|
|
1920
1920
|
try {
|
|
1921
|
-
if (K && (
|
|
1922
|
-
se && Q() &&
|
|
1923
|
-
}, r.loadingTimeout),
|
|
1921
|
+
if (K && (R(Br), r.loadingTimeout && D(T().data) && setTimeout(() => {
|
|
1922
|
+
se && Q() && _().onLoadingSlow(v, r);
|
|
1923
|
+
}, r.loadingTimeout), y[v] = [
|
|
1924
1924
|
z(x),
|
|
1925
1925
|
er()
|
|
1926
|
-
]), [X, F] =
|
|
1927
|
-
return K && Q() &&
|
|
1926
|
+
]), [X, F] = y[v], X = await X, K && setTimeout(Or, r.dedupingInterval), !y[v] || y[v][1] !== F)
|
|
1927
|
+
return K && Q() && _().onDiscarded(v), !1;
|
|
1928
1928
|
me.error = ee;
|
|
1929
1929
|
const re = p[v];
|
|
1930
1930
|
if (!D(re) && // case 1
|
|
1931
1931
|
(F <= re[0] || // case 2
|
|
1932
1932
|
F <= re[1] || // case 3
|
|
1933
1933
|
re[1] === 0))
|
|
1934
|
-
return Lr(), K && Q() &&
|
|
1935
|
-
const fe =
|
|
1936
|
-
me.data = n(fe, X) ? fe : X, K && Q() &&
|
|
1934
|
+
return Lr(), K && Q() && _().onDiscarded(v), !1;
|
|
1935
|
+
const fe = T().data;
|
|
1936
|
+
me.data = n(fe, X) ? fe : X, K && Q() && _().onSuccess(X, v, r);
|
|
1937
1937
|
} catch (re) {
|
|
1938
1938
|
Or();
|
|
1939
|
-
const fe =
|
|
1940
|
-
fe.isPaused() || (me.error = re, K && Q() && (fe.onError(re, v, fe), (Tt === !0 || ce(Tt) && Tt(re)) && (!
|
|
1941
|
-
const St =
|
|
1939
|
+
const fe = _(), { shouldRetryOnError: Tt } = fe;
|
|
1940
|
+
fe.isPaused() || (me.error = re, K && Q() && (fe.onError(re, v, fe), (Tt === !0 || ce(Tt) && Tt(re)) && (!_().revalidateOnFocus || !_().revalidateOnReconnect || w()) && fe.onErrorRetry(re, v, fe, (Nn) => {
|
|
1941
|
+
const St = g[v];
|
|
1942
1942
|
St && St[0] && St[0](ze.ERROR_REVALIDATE_EVENT, Nn);
|
|
1943
1943
|
}, {
|
|
1944
1944
|
retryCount: (Se.retryCount || 0) + 1,
|
|
@@ -1964,22 +1964,22 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
1964
1964
|
]
|
|
1965
1965
|
), $r = Z(
|
|
1966
1966
|
// Use callback to make sure `keyRef.current` returns latest result every time
|
|
1967
|
-
(...P) => Ya(a,
|
|
1967
|
+
(...P) => Ya(a, E.current, ...P),
|
|
1968
1968
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1969
1969
|
[]
|
|
1970
1970
|
);
|
|
1971
1971
|
if (Ot(() => {
|
|
1972
|
-
|
|
1972
|
+
C.current = t, N.current = r, D(Ee) || (Rr.current = Ee);
|
|
1973
1973
|
}), Ot(() => {
|
|
1974
1974
|
if (!v) return;
|
|
1975
1975
|
const P = Pe.bind(ee, Vt);
|
|
1976
1976
|
let z = 0;
|
|
1977
|
-
const F = zi(v,
|
|
1977
|
+
const F = zi(v, g, (se, Se = {}) => {
|
|
1978
1978
|
if (se == ze.FOCUS_EVENT) {
|
|
1979
1979
|
const K = Date.now();
|
|
1980
|
-
|
|
1980
|
+
_().revalidateOnFocus && K > z && w() && (z = K + _().focusThrottleInterval, P());
|
|
1981
1981
|
} else if (se == ze.RECONNECT_EVENT)
|
|
1982
|
-
|
|
1982
|
+
_().revalidateOnReconnect && w() && P();
|
|
1983
1983
|
else {
|
|
1984
1984
|
if (se == ze.MUTATE_EVENT)
|
|
1985
1985
|
return Pe();
|
|
@@ -1987,35 +1987,35 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
1987
1987
|
return Pe(Se);
|
|
1988
1988
|
}
|
|
1989
1989
|
});
|
|
1990
|
-
return
|
|
1990
|
+
return A.current = !1, E.current = v, k.current = !0, R({
|
|
1991
1991
|
_k: x
|
|
1992
1992
|
}), Ir && (D(Te) || We ? P() : wi(P)), () => {
|
|
1993
|
-
|
|
1993
|
+
A.current = !0, F();
|
|
1994
1994
|
};
|
|
1995
1995
|
}, [
|
|
1996
1996
|
v
|
|
1997
1997
|
]), Ot(() => {
|
|
1998
1998
|
let P;
|
|
1999
1999
|
function z() {
|
|
2000
|
-
const F = ce(d) ? d(
|
|
2000
|
+
const F = ce(d) ? d(T().data) : d;
|
|
2001
2001
|
F && P !== -1 && (P = setTimeout(X, F));
|
|
2002
2002
|
}
|
|
2003
2003
|
function X() {
|
|
2004
|
-
!
|
|
2004
|
+
!T().error && (f || _().isVisible()) && (u || _().isOnline()) ? Pe(Vt).then(z) : z();
|
|
2005
2005
|
}
|
|
2006
2006
|
return z(), () => {
|
|
2007
2007
|
P && (clearTimeout(P), P = -1);
|
|
2008
2008
|
};
|
|
2009
2009
|
}, [
|
|
2010
2010
|
d,
|
|
2011
|
-
|
|
2012
|
-
|
|
2011
|
+
f,
|
|
2012
|
+
u,
|
|
2013
2013
|
v
|
|
2014
2014
|
]), jn(Ze), o && D(Te) && v) {
|
|
2015
2015
|
if (!ta && We)
|
|
2016
2016
|
throw new Error("Fallback data is required when using Suspense in SSR.");
|
|
2017
|
-
|
|
2018
|
-
const P =
|
|
2017
|
+
C.current = t, N.current = r, A.current = !1;
|
|
2018
|
+
const P = b[v];
|
|
2019
2019
|
if (!D(P)) {
|
|
2020
2020
|
const z = $r(P);
|
|
2021
2021
|
Dt(z);
|
|
@@ -2375,45 +2375,47 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2375
2375
|
}) => {
|
|
2376
2376
|
Za(["/capabilities"], (t) => en(t, e));
|
|
2377
2377
|
}, nt = "CHAT_ADD_MESSAGE", tr = "CHAT_ADD_INTERNAL_MESSAGE", rr = "CHAT_SET_LOADING", ar = "CHAT_SET_STREAMING", Me = "CHAT_RESET", Ji = "CHAT_RESTORE", Zi = (e, t) => {
|
|
2378
|
-
var r, a, n, o, i, s, c, d,
|
|
2378
|
+
var r, a, n, o, i, s, c, d, f, u, h, g;
|
|
2379
2379
|
switch (t.type) {
|
|
2380
2380
|
case nt: {
|
|
2381
|
-
const
|
|
2382
|
-
if (
|
|
2383
|
-
const
|
|
2384
|
-
(
|
|
2381
|
+
const p = (r = t.payload) == null ? void 0 : r.role, y = (a = t.payload) == null ? void 0 : a.messageId, b = (n = t.payload) == null ? void 0 : n.content, v = (o = t.payload) == null ? void 0 : o.name, x = (i = t.payload) == null ? void 0 : i.processingTime, k = (s = t.payload) == null ? void 0 : s.usage, A = ((c = t.payload) == null ? void 0 : c.model) || e.model;
|
|
2382
|
+
if (p === Fe) {
|
|
2383
|
+
const E = e.messages.findIndex(
|
|
2384
|
+
(C) => C.messageId === y
|
|
2385
2385
|
);
|
|
2386
|
-
if (
|
|
2387
|
-
const
|
|
2388
|
-
...
|
|
2389
|
-
content: `${
|
|
2390
|
-
processingTime:
|
|
2391
|
-
name:
|
|
2392
|
-
|
|
2386
|
+
if (E !== -1) {
|
|
2387
|
+
const C = e.messages.map((N, _) => _ === E ? {
|
|
2388
|
+
...N,
|
|
2389
|
+
content: `${N.content}${b}`,
|
|
2390
|
+
processingTime: x,
|
|
2391
|
+
name: v,
|
|
2392
|
+
usage: k
|
|
2393
|
+
} : N);
|
|
2393
2394
|
return {
|
|
2394
2395
|
...e,
|
|
2395
|
-
model:
|
|
2396
|
-
messages:
|
|
2396
|
+
model: A,
|
|
2397
|
+
messages: C
|
|
2397
2398
|
};
|
|
2398
2399
|
}
|
|
2399
2400
|
}
|
|
2400
2401
|
return {
|
|
2401
2402
|
...e,
|
|
2402
|
-
model: ((
|
|
2403
|
+
model: ((d = t.payload) == null ? void 0 : d.model) || e.model,
|
|
2403
2404
|
messages: [
|
|
2404
2405
|
...e.messages,
|
|
2405
2406
|
{
|
|
2406
|
-
role:
|
|
2407
|
+
role: p,
|
|
2407
2408
|
content: b,
|
|
2408
|
-
name:
|
|
2409
|
-
processingTime:
|
|
2410
|
-
|
|
2409
|
+
name: v,
|
|
2410
|
+
processingTime: x,
|
|
2411
|
+
usage: k,
|
|
2412
|
+
messageId: y
|
|
2411
2413
|
}
|
|
2412
2414
|
]
|
|
2413
2415
|
};
|
|
2414
2416
|
}
|
|
2415
2417
|
case tr: {
|
|
2416
|
-
const
|
|
2418
|
+
const p = (f = t.payload) == null ? void 0 : f.role, y = (u = t.payload) == null ? void 0 : u.content;
|
|
2417
2419
|
return {
|
|
2418
2420
|
...e,
|
|
2419
2421
|
streaming: !1,
|
|
@@ -2421,8 +2423,8 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2421
2423
|
messages: [
|
|
2422
2424
|
...e.messages,
|
|
2423
2425
|
{
|
|
2424
|
-
role:
|
|
2425
|
-
content:
|
|
2426
|
+
role: p,
|
|
2427
|
+
content: y
|
|
2426
2428
|
}
|
|
2427
2429
|
]
|
|
2428
2430
|
};
|
|
@@ -2433,20 +2435,20 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2433
2435
|
loading: t.payload
|
|
2434
2436
|
};
|
|
2435
2437
|
case ar: {
|
|
2436
|
-
let
|
|
2437
|
-
return e.streaming !== t.payload && (
|
|
2438
|
+
let p = e.lastTriggeredTimestamp;
|
|
2439
|
+
return e.streaming !== t.payload && (p = (/* @__PURE__ */ new Date()).getTime()), {
|
|
2438
2440
|
...e,
|
|
2439
2441
|
streaming: t.payload,
|
|
2440
|
-
lastTriggeredTimestamp:
|
|
2442
|
+
lastTriggeredTimestamp: p
|
|
2441
2443
|
};
|
|
2442
2444
|
}
|
|
2443
2445
|
case Me: {
|
|
2444
|
-
let
|
|
2445
|
-
return typeof ((
|
|
2446
|
+
let p = !1;
|
|
2447
|
+
return typeof ((h = t == null ? void 0 : t.payload) == null ? void 0 : h.privateChat) == "boolean" ? p = t.payload.privateChat : typeof e.privateChat == "boolean" && (p = e.privateChat), {
|
|
2446
2448
|
id: hr(),
|
|
2447
2449
|
model: e.model,
|
|
2448
2450
|
provider: ((g = t == null ? void 0 : t.payload) == null ? void 0 : g.provider) || e.provider,
|
|
2449
|
-
privateChat:
|
|
2451
|
+
privateChat: p,
|
|
2450
2452
|
usage: 0,
|
|
2451
2453
|
messages: [],
|
|
2452
2454
|
streaming: !1,
|
|
@@ -2455,11 +2457,11 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2455
2457
|
};
|
|
2456
2458
|
}
|
|
2457
2459
|
case Ji: {
|
|
2458
|
-
const
|
|
2459
|
-
role:
|
|
2460
|
-
content:
|
|
2461
|
-
name:
|
|
2462
|
-
processingTime:
|
|
2460
|
+
const p = t.payload.messages.map((y) => ({
|
|
2461
|
+
role: y.role,
|
|
2462
|
+
content: y.content,
|
|
2463
|
+
name: y.name,
|
|
2464
|
+
processingTime: y.processingTime
|
|
2463
2465
|
}));
|
|
2464
2466
|
return {
|
|
2465
2467
|
...e,
|
|
@@ -2468,7 +2470,7 @@ const Dt = U.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2468
2470
|
model: t.payload.model,
|
|
2469
2471
|
provider: t.payload.provider,
|
|
2470
2472
|
usage: t.payload.usage,
|
|
2471
|
-
messages:
|
|
2473
|
+
messages: p
|
|
2472
2474
|
};
|
|
2473
2475
|
}
|
|
2474
2476
|
default:
|
|
@@ -2621,48 +2623,48 @@ function na(e, t, r) {
|
|
|
2621
2623
|
reference: a,
|
|
2622
2624
|
floating: n
|
|
2623
2625
|
} = e;
|
|
2624
|
-
const o = Ie(t), i = kr(t), s = vr(i), c = xe(t), d = o === "y",
|
|
2625
|
-
let
|
|
2626
|
+
const o = Ie(t), i = kr(t), s = vr(i), c = xe(t), d = o === "y", f = a.x + a.width / 2 - n.width / 2, u = a.y + a.height / 2 - n.height / 2, h = a[s] / 2 - n[s] / 2;
|
|
2627
|
+
let g;
|
|
2626
2628
|
switch (c) {
|
|
2627
2629
|
case "top":
|
|
2628
|
-
|
|
2629
|
-
x:
|
|
2630
|
+
g = {
|
|
2631
|
+
x: f,
|
|
2630
2632
|
y: a.y - n.height
|
|
2631
2633
|
};
|
|
2632
2634
|
break;
|
|
2633
2635
|
case "bottom":
|
|
2634
|
-
|
|
2635
|
-
x:
|
|
2636
|
+
g = {
|
|
2637
|
+
x: f,
|
|
2636
2638
|
y: a.y + a.height
|
|
2637
2639
|
};
|
|
2638
2640
|
break;
|
|
2639
2641
|
case "right":
|
|
2640
|
-
|
|
2642
|
+
g = {
|
|
2641
2643
|
x: a.x + a.width,
|
|
2642
|
-
y:
|
|
2644
|
+
y: u
|
|
2643
2645
|
};
|
|
2644
2646
|
break;
|
|
2645
2647
|
case "left":
|
|
2646
|
-
|
|
2648
|
+
g = {
|
|
2647
2649
|
x: a.x - n.width,
|
|
2648
|
-
y:
|
|
2650
|
+
y: u
|
|
2649
2651
|
};
|
|
2650
2652
|
break;
|
|
2651
2653
|
default:
|
|
2652
|
-
|
|
2654
|
+
g = {
|
|
2653
2655
|
x: a.x,
|
|
2654
2656
|
y: a.y
|
|
2655
2657
|
};
|
|
2656
2658
|
}
|
|
2657
2659
|
switch (Ke(t)) {
|
|
2658
2660
|
case "start":
|
|
2659
|
-
|
|
2661
|
+
g[i] -= h * (r && d ? -1 : 1);
|
|
2660
2662
|
break;
|
|
2661
2663
|
case "end":
|
|
2662
|
-
|
|
2664
|
+
g[i] += h * (r && d ? -1 : 1);
|
|
2663
2665
|
break;
|
|
2664
2666
|
}
|
|
2665
|
-
return
|
|
2667
|
+
return g;
|
|
2666
2668
|
}
|
|
2667
2669
|
const ds = async (e, t, r) => {
|
|
2668
2670
|
const {
|
|
@@ -2676,25 +2678,25 @@ const ds = async (e, t, r) => {
|
|
|
2676
2678
|
floating: t,
|
|
2677
2679
|
strategy: n
|
|
2678
2680
|
}), {
|
|
2679
|
-
x:
|
|
2680
|
-
y:
|
|
2681
|
-
} = na(d, a, c),
|
|
2682
|
-
for (let
|
|
2681
|
+
x: f,
|
|
2682
|
+
y: u
|
|
2683
|
+
} = na(d, a, c), h = a, g = {}, p = 0;
|
|
2684
|
+
for (let y = 0; y < s.length; y++) {
|
|
2683
2685
|
const {
|
|
2684
|
-
name:
|
|
2686
|
+
name: b,
|
|
2685
2687
|
fn: v
|
|
2686
|
-
} = s[
|
|
2688
|
+
} = s[y], {
|
|
2687
2689
|
x,
|
|
2688
2690
|
y: k,
|
|
2689
|
-
data:
|
|
2690
|
-
reset:
|
|
2691
|
+
data: A,
|
|
2692
|
+
reset: E
|
|
2691
2693
|
} = await v({
|
|
2692
|
-
x:
|
|
2693
|
-
y:
|
|
2694
|
+
x: f,
|
|
2695
|
+
y: u,
|
|
2694
2696
|
initialPlacement: a,
|
|
2695
|
-
placement:
|
|
2697
|
+
placement: h,
|
|
2696
2698
|
strategy: n,
|
|
2697
|
-
middlewareData:
|
|
2699
|
+
middlewareData: g,
|
|
2698
2700
|
rects: d,
|
|
2699
2701
|
platform: i,
|
|
2700
2702
|
elements: {
|
|
@@ -2702,27 +2704,27 @@ const ds = async (e, t, r) => {
|
|
|
2702
2704
|
floating: t
|
|
2703
2705
|
}
|
|
2704
2706
|
});
|
|
2705
|
-
|
|
2706
|
-
...
|
|
2707
|
-
[
|
|
2708
|
-
...
|
|
2709
|
-
...
|
|
2707
|
+
f = x ?? f, u = k ?? u, g = {
|
|
2708
|
+
...g,
|
|
2709
|
+
[b]: {
|
|
2710
|
+
...g[b],
|
|
2711
|
+
...A
|
|
2710
2712
|
}
|
|
2711
|
-
},
|
|
2713
|
+
}, E && p <= 50 && (p++, typeof E == "object" && (E.placement && (h = E.placement), E.rects && (d = E.rects === !0 ? await i.getElementRects({
|
|
2712
2714
|
reference: e,
|
|
2713
2715
|
floating: t,
|
|
2714
2716
|
strategy: n
|
|
2715
|
-
}) :
|
|
2716
|
-
x:
|
|
2717
|
-
y:
|
|
2718
|
-
} = na(d,
|
|
2717
|
+
}) : E.rects), {
|
|
2718
|
+
x: f,
|
|
2719
|
+
y: u
|
|
2720
|
+
} = na(d, h, c)), y = -1);
|
|
2719
2721
|
}
|
|
2720
2722
|
return {
|
|
2721
|
-
x:
|
|
2722
|
-
y:
|
|
2723
|
-
placement:
|
|
2723
|
+
x: f,
|
|
2724
|
+
y: u,
|
|
2725
|
+
placement: h,
|
|
2724
2726
|
strategy: n,
|
|
2725
|
-
middlewareData:
|
|
2727
|
+
middlewareData: g
|
|
2726
2728
|
};
|
|
2727
2729
|
};
|
|
2728
2730
|
async function an(e, t) {
|
|
@@ -2737,16 +2739,16 @@ async function an(e, t) {
|
|
|
2737
2739
|
strategy: c
|
|
2738
2740
|
} = e, {
|
|
2739
2741
|
boundary: d = "clippingAncestors",
|
|
2740
|
-
rootBoundary:
|
|
2741
|
-
elementContext:
|
|
2742
|
-
altBoundary:
|
|
2743
|
-
padding:
|
|
2744
|
-
} = qe(t, e), p = rn(
|
|
2745
|
-
element: (r = await (o.isElement == null ? void 0 : o.isElement(
|
|
2742
|
+
rootBoundary: f = "viewport",
|
|
2743
|
+
elementContext: u = "floating",
|
|
2744
|
+
altBoundary: h = !1,
|
|
2745
|
+
padding: g = 0
|
|
2746
|
+
} = qe(t, e), p = rn(g), y = s[h ? u === "floating" ? "reference" : "floating" : u], b = lt(await o.getClippingRect({
|
|
2747
|
+
element: (r = await (o.isElement == null ? void 0 : o.isElement(y))) == null || r ? y : y.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(s.floating)),
|
|
2746
2748
|
boundary: d,
|
|
2747
|
-
rootBoundary:
|
|
2749
|
+
rootBoundary: f,
|
|
2748
2750
|
strategy: c
|
|
2749
|
-
})), v =
|
|
2751
|
+
})), v = u === "floating" ? {
|
|
2750
2752
|
x: a,
|
|
2751
2753
|
y: n,
|
|
2752
2754
|
width: i.floating.width,
|
|
@@ -2757,17 +2759,17 @@ async function an(e, t) {
|
|
|
2757
2759
|
} : {
|
|
2758
2760
|
x: 1,
|
|
2759
2761
|
y: 1
|
|
2760
|
-
},
|
|
2762
|
+
}, A = lt(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2761
2763
|
elements: s,
|
|
2762
2764
|
rect: v,
|
|
2763
2765
|
offsetParent: x,
|
|
2764
2766
|
strategy: c
|
|
2765
2767
|
}) : v);
|
|
2766
2768
|
return {
|
|
2767
|
-
top: (
|
|
2768
|
-
bottom: (
|
|
2769
|
-
left: (
|
|
2770
|
-
right: (
|
|
2769
|
+
top: (b.top - A.top + p.top) / k.y,
|
|
2770
|
+
bottom: (A.bottom - b.bottom + p.bottom) / k.y,
|
|
2771
|
+
left: (b.left - A.left + p.left) / k.x,
|
|
2772
|
+
right: (A.right - b.right + p.right) / k.x
|
|
2771
2773
|
};
|
|
2772
2774
|
}
|
|
2773
2775
|
const us = (e) => ({
|
|
@@ -2784,27 +2786,27 @@ const us = (e) => ({
|
|
|
2784
2786
|
middlewareData: c
|
|
2785
2787
|
} = t, {
|
|
2786
2788
|
element: d,
|
|
2787
|
-
padding:
|
|
2789
|
+
padding: f = 0
|
|
2788
2790
|
} = qe(e, t) || {};
|
|
2789
2791
|
if (d == null)
|
|
2790
2792
|
return {};
|
|
2791
|
-
const
|
|
2793
|
+
const u = rn(f), h = {
|
|
2792
2794
|
x: r,
|
|
2793
2795
|
y: a
|
|
2794
|
-
},
|
|
2795
|
-
let
|
|
2796
|
-
(
|
|
2797
|
-
const
|
|
2796
|
+
}, g = kr(n), p = vr(g), y = await i.getDimensions(d), b = g === "y", v = b ? "top" : "left", x = b ? "bottom" : "right", k = b ? "clientHeight" : "clientWidth", A = o.reference[p] + o.reference[g] - h[g] - o.floating[p], E = h[g] - o.reference[g], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
|
|
2797
|
+
let N = C ? C[k] : 0;
|
|
2798
|
+
(!N || !await (i.isElement == null ? void 0 : i.isElement(C))) && (N = s.floating[k] || o.floating[p]);
|
|
2799
|
+
const _ = A / 2 - E / 2, w = N / 2 - y[p] / 2 - 1, T = Ge(u[v], w), R = Ge(u[x], w), B = T, $ = N - y[p] - R, O = N / 2 - y[p] / 2 + _, V = nr(B, O, $), I = !c.arrow && Ke(n) != null && O !== V && o.reference[p] / 2 - (O < B ? T : R) - y[p] / 2 < 0, H = I ? O < B ? O - B : O - $ : 0;
|
|
2798
2800
|
return {
|
|
2799
|
-
[
|
|
2801
|
+
[g]: h[g] + H,
|
|
2800
2802
|
data: {
|
|
2801
|
-
[
|
|
2803
|
+
[g]: V,
|
|
2802
2804
|
centerOffset: O - V - H,
|
|
2803
|
-
...
|
|
2805
|
+
...I && {
|
|
2804
2806
|
alignmentOffset: H
|
|
2805
2807
|
}
|
|
2806
2808
|
},
|
|
2807
|
-
reset:
|
|
2809
|
+
reset: I
|
|
2808
2810
|
};
|
|
2809
2811
|
}
|
|
2810
2812
|
}), ms = function(e) {
|
|
@@ -2821,65 +2823,65 @@ const us = (e) => ({
|
|
|
2821
2823
|
platform: c,
|
|
2822
2824
|
elements: d
|
|
2823
2825
|
} = t, {
|
|
2824
|
-
mainAxis:
|
|
2825
|
-
crossAxis:
|
|
2826
|
-
fallbackPlacements:
|
|
2827
|
-
fallbackStrategy:
|
|
2826
|
+
mainAxis: f = !0,
|
|
2827
|
+
crossAxis: u = !0,
|
|
2828
|
+
fallbackPlacements: h,
|
|
2829
|
+
fallbackStrategy: g = "bestFit",
|
|
2828
2830
|
fallbackAxisSideDirection: p = "none",
|
|
2829
|
-
flipAlignment:
|
|
2830
|
-
...
|
|
2831
|
+
flipAlignment: y = !0,
|
|
2832
|
+
...b
|
|
2831
2833
|
} = qe(e, t);
|
|
2832
2834
|
if ((r = o.arrow) != null && r.alignmentOffset)
|
|
2833
2835
|
return {};
|
|
2834
|
-
const v = xe(n), x = Ie(s), k = xe(s) === s,
|
|
2835
|
-
!
|
|
2836
|
-
const
|
|
2837
|
-
let
|
|
2838
|
-
if (
|
|
2839
|
-
const O = os(n, i,
|
|
2840
|
-
w.push(
|
|
2836
|
+
const v = xe(n), x = Ie(s), k = xe(s) === s, A = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), E = h || (k || !y ? [st(s)] : is(s)), C = p !== "none";
|
|
2837
|
+
!h && C && E.push(...ls(s, y, p, A));
|
|
2838
|
+
const N = [s, ...E], _ = await an(t, b), w = [];
|
|
2839
|
+
let T = ((a = o.flip) == null ? void 0 : a.overflows) || [];
|
|
2840
|
+
if (f && w.push(_[v]), u) {
|
|
2841
|
+
const O = os(n, i, A);
|
|
2842
|
+
w.push(_[O[0]], _[O[1]]);
|
|
2841
2843
|
}
|
|
2842
|
-
if (
|
|
2844
|
+
if (T = [...T, {
|
|
2843
2845
|
placement: n,
|
|
2844
2846
|
overflows: w
|
|
2845
2847
|
}], !w.every((O) => O <= 0)) {
|
|
2846
|
-
var
|
|
2847
|
-
const O = (((
|
|
2848
|
+
var R, B;
|
|
2849
|
+
const O = (((R = o.flip) == null ? void 0 : R.index) || 0) + 1, V = N[O];
|
|
2848
2850
|
if (V)
|
|
2849
2851
|
return {
|
|
2850
2852
|
data: {
|
|
2851
2853
|
index: O,
|
|
2852
|
-
overflows:
|
|
2854
|
+
overflows: T
|
|
2853
2855
|
},
|
|
2854
2856
|
reset: {
|
|
2855
2857
|
placement: V
|
|
2856
2858
|
}
|
|
2857
2859
|
};
|
|
2858
|
-
let
|
|
2859
|
-
if (!
|
|
2860
|
-
switch (
|
|
2860
|
+
let I = (B = T.filter((H) => H.overflows[0] <= 0).sort((H, j) => H.overflows[1] - j.overflows[1])[0]) == null ? void 0 : B.placement;
|
|
2861
|
+
if (!I)
|
|
2862
|
+
switch (g) {
|
|
2861
2863
|
case "bestFit": {
|
|
2862
|
-
var
|
|
2863
|
-
const H = (
|
|
2864
|
-
if (
|
|
2864
|
+
var $;
|
|
2865
|
+
const H = ($ = T.filter((j) => {
|
|
2866
|
+
if (C) {
|
|
2865
2867
|
const q = Ie(j.placement);
|
|
2866
2868
|
return q === x || // Create a bias to the `y` side axis due to horizontal
|
|
2867
2869
|
// reading directions favoring greater width.
|
|
2868
2870
|
q === "y";
|
|
2869
2871
|
}
|
|
2870
2872
|
return !0;
|
|
2871
|
-
}).map((j) => [j.placement, j.overflows.filter((q) => q > 0).reduce((q, Et) => q + Et, 0)]).sort((j, q) => j[1] - q[1])[0]) == null ? void 0 :
|
|
2872
|
-
H && (
|
|
2873
|
+
}).map((j) => [j.placement, j.overflows.filter((q) => q > 0).reduce((q, Et) => q + Et, 0)]).sort((j, q) => j[1] - q[1])[0]) == null ? void 0 : $[0];
|
|
2874
|
+
H && (I = H);
|
|
2873
2875
|
break;
|
|
2874
2876
|
}
|
|
2875
2877
|
case "initialPlacement":
|
|
2876
|
-
|
|
2878
|
+
I = s;
|
|
2877
2879
|
break;
|
|
2878
2880
|
}
|
|
2879
|
-
if (n !==
|
|
2881
|
+
if (n !== I)
|
|
2880
2882
|
return {
|
|
2881
2883
|
reset: {
|
|
2882
|
-
placement:
|
|
2884
|
+
placement: I
|
|
2883
2885
|
}
|
|
2884
2886
|
};
|
|
2885
2887
|
}
|
|
@@ -2892,26 +2894,26 @@ async function fs(e, t) {
|
|
|
2892
2894
|
placement: r,
|
|
2893
2895
|
platform: a,
|
|
2894
2896
|
elements: n
|
|
2895
|
-
} = e, o = await (a.isRTL == null ? void 0 : a.isRTL(n.floating)), i = xe(r), s = Ke(r), c = Ie(r) === "y", d = ["left", "top"].includes(i) ? -1 : 1,
|
|
2897
|
+
} = e, o = await (a.isRTL == null ? void 0 : a.isRTL(n.floating)), i = xe(r), s = Ke(r), c = Ie(r) === "y", d = ["left", "top"].includes(i) ? -1 : 1, f = o && c ? -1 : 1, u = qe(t, e);
|
|
2896
2898
|
let {
|
|
2897
|
-
mainAxis:
|
|
2898
|
-
crossAxis:
|
|
2899
|
+
mainAxis: h,
|
|
2900
|
+
crossAxis: g,
|
|
2899
2901
|
alignmentAxis: p
|
|
2900
|
-
} = typeof
|
|
2901
|
-
mainAxis:
|
|
2902
|
+
} = typeof u == "number" ? {
|
|
2903
|
+
mainAxis: u,
|
|
2902
2904
|
crossAxis: 0,
|
|
2903
2905
|
alignmentAxis: null
|
|
2904
2906
|
} : {
|
|
2905
|
-
mainAxis:
|
|
2906
|
-
crossAxis:
|
|
2907
|
-
alignmentAxis:
|
|
2907
|
+
mainAxis: u.mainAxis || 0,
|
|
2908
|
+
crossAxis: u.crossAxis || 0,
|
|
2909
|
+
alignmentAxis: u.alignmentAxis
|
|
2908
2910
|
};
|
|
2909
|
-
return s && typeof p == "number" && (
|
|
2910
|
-
x:
|
|
2911
|
-
y:
|
|
2911
|
+
return s && typeof p == "number" && (g = s === "end" ? p * -1 : p), c ? {
|
|
2912
|
+
x: g * f,
|
|
2913
|
+
y: h * d
|
|
2912
2914
|
} : {
|
|
2913
|
-
x:
|
|
2914
|
-
y:
|
|
2915
|
+
x: h * d,
|
|
2916
|
+
y: g * f
|
|
2915
2917
|
};
|
|
2916
2918
|
}
|
|
2917
2919
|
const hs = function(e) {
|
|
@@ -2949,11 +2951,11 @@ const hs = function(e) {
|
|
|
2949
2951
|
mainAxis: o = !0,
|
|
2950
2952
|
crossAxis: i = !1,
|
|
2951
2953
|
limiter: s = {
|
|
2952
|
-
fn: (
|
|
2954
|
+
fn: (b) => {
|
|
2953
2955
|
let {
|
|
2954
2956
|
x: v,
|
|
2955
2957
|
y: x
|
|
2956
|
-
} =
|
|
2958
|
+
} = b;
|
|
2957
2959
|
return {
|
|
2958
2960
|
x: v,
|
|
2959
2961
|
y: x
|
|
@@ -2964,29 +2966,29 @@ const hs = function(e) {
|
|
|
2964
2966
|
} = qe(e, t), d = {
|
|
2965
2967
|
x: r,
|
|
2966
2968
|
y: a
|
|
2967
|
-
},
|
|
2968
|
-
let
|
|
2969
|
+
}, f = await an(t, c), u = Ie(xe(n)), h = tn(u);
|
|
2970
|
+
let g = d[h], p = d[u];
|
|
2969
2971
|
if (o) {
|
|
2970
|
-
const
|
|
2971
|
-
|
|
2972
|
+
const b = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", x = g + f[b], k = g - f[v];
|
|
2973
|
+
g = nr(x, g, k);
|
|
2972
2974
|
}
|
|
2973
2975
|
if (i) {
|
|
2974
|
-
const
|
|
2976
|
+
const b = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right", x = p + f[b], k = p - f[v];
|
|
2975
2977
|
p = nr(x, p, k);
|
|
2976
2978
|
}
|
|
2977
|
-
const
|
|
2979
|
+
const y = s.fn({
|
|
2978
2980
|
...t,
|
|
2979
|
-
[
|
|
2980
|
-
[
|
|
2981
|
+
[h]: g,
|
|
2982
|
+
[u]: p
|
|
2981
2983
|
});
|
|
2982
2984
|
return {
|
|
2983
|
-
...
|
|
2985
|
+
...y,
|
|
2984
2986
|
data: {
|
|
2985
|
-
x:
|
|
2986
|
-
y:
|
|
2987
|
+
x: y.x - r,
|
|
2988
|
+
y: y.y - a,
|
|
2987
2989
|
enabled: {
|
|
2988
|
-
[
|
|
2989
|
-
[
|
|
2990
|
+
[h]: o,
|
|
2991
|
+
[u]: i
|
|
2990
2992
|
}
|
|
2991
2993
|
}
|
|
2992
2994
|
};
|
|
@@ -3143,18 +3145,18 @@ function je(e, t, r, a) {
|
|
|
3143
3145
|
let i = de(1);
|
|
3144
3146
|
t && (a ? ae(a) && (i = Re(a)) : i = Re(e));
|
|
3145
3147
|
const s = vs(o, r, a) ? dn(o) : de(0);
|
|
3146
|
-
let c = (n.left + s.x) / i.x, d = (n.top + s.y) / i.y,
|
|
3148
|
+
let c = (n.left + s.x) / i.x, d = (n.top + s.y) / i.y, f = n.width / i.x, u = n.height / i.y;
|
|
3147
3149
|
if (o) {
|
|
3148
|
-
const
|
|
3149
|
-
let p =
|
|
3150
|
-
for (;
|
|
3151
|
-
const
|
|
3152
|
-
c *=
|
|
3150
|
+
const h = te(o), g = a && ae(a) ? te(a) : a;
|
|
3151
|
+
let p = h, y = ia(p);
|
|
3152
|
+
for (; y && a && g !== p; ) {
|
|
3153
|
+
const b = Re(y), v = y.getBoundingClientRect(), x = ne(y), k = v.left + (y.clientLeft + parseFloat(x.paddingLeft)) * b.x, A = v.top + (y.clientTop + parseFloat(x.paddingTop)) * b.y;
|
|
3154
|
+
c *= b.x, d *= b.y, f *= b.x, u *= b.y, c += k, d += A, p = te(y), y = ia(p);
|
|
3153
3155
|
}
|
|
3154
3156
|
}
|
|
3155
3157
|
return lt({
|
|
3156
|
-
width:
|
|
3157
|
-
height:
|
|
3158
|
+
width: f,
|
|
3159
|
+
height: u,
|
|
3158
3160
|
x: c,
|
|
3159
3161
|
y: d
|
|
3160
3162
|
});
|
|
@@ -3188,17 +3190,17 @@ function ks(e) {
|
|
|
3188
3190
|
scrollLeft: 0,
|
|
3189
3191
|
scrollTop: 0
|
|
3190
3192
|
}, d = de(1);
|
|
3191
|
-
const
|
|
3192
|
-
if ((
|
|
3193
|
-
const
|
|
3194
|
-
d = Re(a),
|
|
3193
|
+
const f = de(0), u = ue(a);
|
|
3194
|
+
if ((u || !u && !o) && ((De(a) !== "body" || Ye(i)) && (c = vt(a)), ue(a))) {
|
|
3195
|
+
const g = je(a);
|
|
3196
|
+
d = Re(a), f.x = g.x + a.clientLeft, f.y = g.y + a.clientTop;
|
|
3195
3197
|
}
|
|
3196
|
-
const
|
|
3198
|
+
const h = i && !u && !o ? un(i, c, !0) : de(0);
|
|
3197
3199
|
return {
|
|
3198
3200
|
width: r.width * d.x,
|
|
3199
3201
|
height: r.height * d.y,
|
|
3200
|
-
x: r.x * d.x - c.scrollLeft * d.x +
|
|
3201
|
-
y: r.y * d.y - c.scrollTop * d.y +
|
|
3202
|
+
x: r.x * d.x - c.scrollLeft * d.x + f.x + h.x,
|
|
3203
|
+
y: r.y * d.y - c.scrollTop * d.y + f.y + h.y
|
|
3202
3204
|
};
|
|
3203
3205
|
}
|
|
3204
3206
|
function ws(e) {
|
|
@@ -3283,8 +3285,8 @@ function Ss(e) {
|
|
|
3283
3285
|
strategy: n
|
|
3284
3286
|
} = e;
|
|
3285
3287
|
const o = [...r === "clippingAncestors" ? bt(t) ? [] : Ts(t, this._c) : [].concat(r), a], i = o[0], s = o.reduce((c, d) => {
|
|
3286
|
-
const
|
|
3287
|
-
return c.top = Ne(
|
|
3288
|
+
const f = sa(t, d, n);
|
|
3289
|
+
return c.top = Ne(f.top, c.top), c.right = Ge(f.right, c.right), c.bottom = Ge(f.bottom, c.bottom), c.left = Ne(f.left, c.left), c;
|
|
3288
3290
|
}, sa(t, i, n));
|
|
3289
3291
|
return {
|
|
3290
3292
|
width: s.right - s.left,
|
|
@@ -3312,13 +3314,13 @@ function Ns(e, t, r) {
|
|
|
3312
3314
|
const c = de(0);
|
|
3313
3315
|
if (a || !a && !o)
|
|
3314
3316
|
if ((De(t) !== "body" || Ye(n)) && (s = vt(t)), a) {
|
|
3315
|
-
const
|
|
3316
|
-
c.x =
|
|
3317
|
+
const h = je(t, !0, o, t);
|
|
3318
|
+
c.x = h.x + t.clientLeft, c.y = h.y + t.clientTop;
|
|
3317
3319
|
} else n && (c.x = _r(n));
|
|
3318
|
-
const d = n && !a && !o ? un(n, s) : de(0),
|
|
3320
|
+
const d = n && !a && !o ? un(n, s) : de(0), f = i.left + s.scrollLeft - c.x - d.x, u = i.top + s.scrollTop - c.y - d.y;
|
|
3319
3321
|
return {
|
|
3320
|
-
x:
|
|
3321
|
-
y:
|
|
3322
|
+
x: f,
|
|
3323
|
+
y: u,
|
|
3322
3324
|
width: i.width,
|
|
3323
3325
|
height: i.height
|
|
3324
3326
|
};
|
|
@@ -3392,7 +3394,7 @@ const As = {
|
|
|
3392
3394
|
});
|
|
3393
3395
|
}, ca = ["mousedown", "touchstart"];
|
|
3394
3396
|
function Ds(e, t, r) {
|
|
3395
|
-
const a =
|
|
3397
|
+
const a = S(null);
|
|
3396
3398
|
return M(() => {
|
|
3397
3399
|
const n = (o) => {
|
|
3398
3400
|
const i = o ? o.target : void 0;
|
|
@@ -3413,40 +3415,40 @@ function Ds(e, t, r) {
|
|
|
3413
3415
|
}, [e, r, t]), a;
|
|
3414
3416
|
}
|
|
3415
3417
|
function Vs(e, t) {
|
|
3416
|
-
const [r, a] = W(!1), n =
|
|
3418
|
+
const [r, a] = W(!1), n = S(null), o = S(null), i = Z(() => {
|
|
3417
3419
|
a((c) => (!c && (!n.current || n.current === -1) && (n.current = window.setInterval(o.current, t)), !0));
|
|
3418
3420
|
}, [t]), s = Z(() => {
|
|
3419
3421
|
a(!1), window.clearInterval(n.current || -1), n.current = -1;
|
|
3420
3422
|
}, []);
|
|
3421
3423
|
return M(() => (o.current = e, r && i(), s), [e, r, i, s]), { start: i, stop: s, active: r };
|
|
3422
3424
|
}
|
|
3423
|
-
const tt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Ps = () =>
|
|
3425
|
+
const tt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Ps = () => m("absolute top-0 left-0 w-max py-1 px-2 rounded text-sm z-50"), da = ({
|
|
3424
3426
|
mode: e
|
|
3425
|
-
}) =>
|
|
3427
|
+
}) => m({
|
|
3426
3428
|
"bg-surface-darker": e === "dark" || e === "system",
|
|
3427
3429
|
"bg-surface-light": e === "light" || e === "alt-system",
|
|
3428
3430
|
"dark:bg-surface-light": e === "system",
|
|
3429
3431
|
"dark:bg-surface-darker": e === "alt-system"
|
|
3430
3432
|
}), zs = ({
|
|
3431
3433
|
mode: e
|
|
3432
|
-
}) =>
|
|
3434
|
+
}) => m({
|
|
3433
3435
|
"text-copy-light": e === "dark" || e === "system",
|
|
3434
3436
|
"text-copy-dark": e === "light" || e === "alt-system",
|
|
3435
3437
|
"dark:text-copy-dark": e === "system",
|
|
3436
3438
|
"dark:text-copy-light": e === "alt-system"
|
|
3437
|
-
}), Us = () =>
|
|
3439
|
+
}), Us = () => m("absolute", "size-2", "transform rotate-45"), Hs = ({
|
|
3438
3440
|
mode: e,
|
|
3439
3441
|
className: t,
|
|
3440
3442
|
tooltipClassName: r,
|
|
3441
3443
|
arrowClassName: a
|
|
3442
3444
|
}) => {
|
|
3443
|
-
const n =
|
|
3445
|
+
const n = m("relative inline-block", t), o = m(
|
|
3444
3446
|
ts,
|
|
3445
3447
|
Ps(),
|
|
3446
3448
|
da({ mode: e }),
|
|
3447
3449
|
zs({ mode: e }),
|
|
3448
3450
|
r
|
|
3449
|
-
), i =
|
|
3451
|
+
), i = m(
|
|
3450
3452
|
rs,
|
|
3451
3453
|
Us(),
|
|
3452
3454
|
da({ mode: e }),
|
|
@@ -3466,22 +3468,22 @@ const tt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Ps = (
|
|
|
3466
3468
|
arrowClassName: s
|
|
3467
3469
|
}) => {
|
|
3468
3470
|
const c = Ds(() => {
|
|
3469
|
-
|
|
3470
|
-
}), d =
|
|
3471
|
+
y.stop(), p(!1);
|
|
3472
|
+
}), d = S(null), f = S(null), [u, h] = W(!1), [g, p] = W(!1), y = Vs(() => {
|
|
3471
3473
|
p(!1);
|
|
3472
|
-
}, Ws),
|
|
3474
|
+
}, Ws), b = Hs({
|
|
3473
3475
|
mode: a,
|
|
3474
3476
|
className: o,
|
|
3475
3477
|
tooltipClassName: i,
|
|
3476
3478
|
arrowClassName: s
|
|
3477
3479
|
}), v = Fs({ delay: n }), x = Z(async () => {
|
|
3478
|
-
var
|
|
3479
|
-
if (c.current && d.current &&
|
|
3480
|
+
var C, N, _, w;
|
|
3481
|
+
if (c.current && d.current && f.current) {
|
|
3480
3482
|
const {
|
|
3481
|
-
x:
|
|
3482
|
-
y:
|
|
3483
|
+
x: T,
|
|
3484
|
+
y: R,
|
|
3483
3485
|
middlewareData: B,
|
|
3484
|
-
placement:
|
|
3486
|
+
placement: $
|
|
3485
3487
|
} = await Ms(c.current, d.current, {
|
|
3486
3488
|
placement: r,
|
|
3487
3489
|
middleware: [
|
|
@@ -3491,12 +3493,12 @@ const tt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Ps = (
|
|
|
3491
3493
|
fallbackAxisSideDirection: "start"
|
|
3492
3494
|
}),
|
|
3493
3495
|
Ls({ padding: 5 }),
|
|
3494
|
-
Bs({ element:
|
|
3496
|
+
Bs({ element: f.current })
|
|
3495
3497
|
]
|
|
3496
3498
|
});
|
|
3497
|
-
(
|
|
3498
|
-
left: tt(
|
|
3499
|
-
top: tt(
|
|
3499
|
+
(C = d == null ? void 0 : d.current) != null && C.style && Object.assign(d.current.style, {
|
|
3500
|
+
left: tt(T),
|
|
3501
|
+
top: tt(R),
|
|
3500
3502
|
...v
|
|
3501
3503
|
});
|
|
3502
3504
|
const O = {
|
|
@@ -3504,9 +3506,9 @@ const tt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Ps = (
|
|
|
3504
3506
|
right: "left",
|
|
3505
3507
|
bottom: "top",
|
|
3506
3508
|
left: "right"
|
|
3507
|
-
}[
|
|
3508
|
-
(
|
|
3509
|
-
left: tt((
|
|
3509
|
+
}[$.split("-")[0]];
|
|
3510
|
+
(N = f == null ? void 0 : f.current) != null && N.style && Object.assign(f.current.style, {
|
|
3511
|
+
left: tt((_ = B.arrow) == null ? void 0 : _.x),
|
|
3510
3512
|
top: tt((w = B.arrow) == null ? void 0 : w.y),
|
|
3511
3513
|
right: "",
|
|
3512
3514
|
bottom: "",
|
|
@@ -3515,34 +3517,34 @@ const tt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Ps = (
|
|
|
3515
3517
|
}
|
|
3516
3518
|
}, [r, v, c]);
|
|
3517
3519
|
M(() => {
|
|
3518
|
-
(async () =>
|
|
3519
|
-
}, [x,
|
|
3520
|
+
(async () => u && await x())();
|
|
3521
|
+
}, [x, u]);
|
|
3520
3522
|
const k = () => {
|
|
3521
|
-
|
|
3522
|
-
},
|
|
3523
|
-
|
|
3524
|
-
},
|
|
3525
|
-
|
|
3523
|
+
h(!1), p(!0), y.start();
|
|
3524
|
+
}, A = () => {
|
|
3525
|
+
g || h(!0);
|
|
3526
|
+
}, E = () => {
|
|
3527
|
+
g || h(!1);
|
|
3526
3528
|
};
|
|
3527
3529
|
return /* @__PURE__ */ L(
|
|
3528
3530
|
"div",
|
|
3529
3531
|
{
|
|
3530
|
-
className:
|
|
3532
|
+
className: b.wrapper,
|
|
3531
3533
|
ref: c,
|
|
3532
|
-
onMouseEnter:
|
|
3533
|
-
onMouseLeave:
|
|
3534
|
+
onMouseEnter: A,
|
|
3535
|
+
onMouseLeave: E,
|
|
3534
3536
|
onClick: k,
|
|
3535
3537
|
children: [
|
|
3536
3538
|
e,
|
|
3537
|
-
|
|
3539
|
+
u && /* @__PURE__ */ L(
|
|
3538
3540
|
"div",
|
|
3539
3541
|
{
|
|
3540
3542
|
role: "tooltip",
|
|
3541
3543
|
ref: d,
|
|
3542
|
-
className:
|
|
3544
|
+
className: b.tooltip,
|
|
3543
3545
|
children: [
|
|
3544
3546
|
t,
|
|
3545
|
-
/* @__PURE__ */ l("div", { ref:
|
|
3547
|
+
/* @__PURE__ */ l("div", { ref: f, className: b.arrow })
|
|
3546
3548
|
]
|
|
3547
3549
|
}
|
|
3548
3550
|
)
|
|
@@ -3555,7 +3557,7 @@ const tt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Ps = (
|
|
|
3555
3557
|
const {
|
|
3556
3558
|
state: { streaming: t },
|
|
3557
3559
|
dispatch: r
|
|
3558
|
-
} = G(ie), a =
|
|
3560
|
+
} = G(ie), a = S(null), n = S(!1), o = (i) => {
|
|
3559
3561
|
i.preventDefault(), r({
|
|
3560
3562
|
type: Me,
|
|
3561
3563
|
payload: {
|
|
@@ -3613,13 +3615,13 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3613
3615
|
switch (e) {
|
|
3614
3616
|
case hn:
|
|
3615
3617
|
case ir:
|
|
3616
|
-
return
|
|
3618
|
+
return m({
|
|
3617
3619
|
[i]: t === "small",
|
|
3618
3620
|
[s]: t === "medium",
|
|
3619
3621
|
[c]: t === "large"
|
|
3620
3622
|
});
|
|
3621
3623
|
case kt:
|
|
3622
|
-
return
|
|
3624
|
+
return m("flex items-center", {
|
|
3623
3625
|
"justify-center": n === "center",
|
|
3624
3626
|
"justify-start": n === "left",
|
|
3625
3627
|
"justify-end": n === "right",
|
|
@@ -3647,14 +3649,14 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3647
3649
|
switch (e) {
|
|
3648
3650
|
case hn:
|
|
3649
3651
|
case ir:
|
|
3650
|
-
return
|
|
3652
|
+
return m({
|
|
3651
3653
|
"text-center": e === ir,
|
|
3652
3654
|
[n]: t === "small",
|
|
3653
3655
|
[o]: t === "medium",
|
|
3654
3656
|
[i]: t === "large"
|
|
3655
3657
|
});
|
|
3656
3658
|
case kt:
|
|
3657
|
-
return
|
|
3659
|
+
return m({
|
|
3658
3660
|
[n]: t === "small" && (r || a),
|
|
3659
3661
|
[o]: t === "medium" && (r || a),
|
|
3660
3662
|
[i]: t === "large" && (r || a)
|
|
@@ -3669,7 +3671,7 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3669
3671
|
if (t)
|
|
3670
3672
|
return "not-prose";
|
|
3671
3673
|
if (a === "primary")
|
|
3672
|
-
return
|
|
3674
|
+
return m("not-prose", {
|
|
3673
3675
|
truncate: !r,
|
|
3674
3676
|
"text-copy-light": e === "dark" || e === "system",
|
|
3675
3677
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -3677,7 +3679,7 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3677
3679
|
"dark:text-copy-light": e === "alt-system"
|
|
3678
3680
|
});
|
|
3679
3681
|
if (a === "secondary")
|
|
3680
|
-
return
|
|
3682
|
+
return m("not-prose", {
|
|
3681
3683
|
truncate: !r,
|
|
3682
3684
|
"text-copy-light": e === "light" || e === "system",
|
|
3683
3685
|
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
@@ -3685,7 +3687,7 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3685
3687
|
"dark:text-copy-light": e === "system"
|
|
3686
3688
|
});
|
|
3687
3689
|
if (a === "danger")
|
|
3688
|
-
return
|
|
3690
|
+
return m("not-prose", {
|
|
3689
3691
|
truncate: !r,
|
|
3690
3692
|
"text-copy-light": e === "dark" || e === "system",
|
|
3691
3693
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -3693,7 +3695,7 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3693
3695
|
"dark:text-copy-light": e === "alt-system"
|
|
3694
3696
|
});
|
|
3695
3697
|
if (a === "selected")
|
|
3696
|
-
return
|
|
3698
|
+
return m("not-prose text-copy-lighter", {
|
|
3697
3699
|
truncate: !r
|
|
3698
3700
|
});
|
|
3699
3701
|
}, Ys = ({
|
|
@@ -3703,21 +3705,21 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3703
3705
|
}) => {
|
|
3704
3706
|
if (!t) {
|
|
3705
3707
|
if (r === "primary")
|
|
3706
|
-
return
|
|
3708
|
+
return m({
|
|
3707
3709
|
"bg-action-dark": e === "dark",
|
|
3708
3710
|
"bg-action-light": e === "light",
|
|
3709
3711
|
"bg-action-dark dark:bg-action-light": e === "system",
|
|
3710
3712
|
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
3711
3713
|
});
|
|
3712
3714
|
if (r === "secondary")
|
|
3713
|
-
return
|
|
3715
|
+
return m({
|
|
3714
3716
|
"bg-action-dark": e === "light",
|
|
3715
3717
|
"bg-action-light": e === "dark",
|
|
3716
3718
|
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
3717
3719
|
"bg-action-light dark:bg-action-dark": e === "system"
|
|
3718
3720
|
});
|
|
3719
3721
|
if (r === "danger")
|
|
3720
|
-
return
|
|
3722
|
+
return m({
|
|
3721
3723
|
"bg-action-danger-dark": e === "dark",
|
|
3722
3724
|
"bg-action-danger-light": e === "light",
|
|
3723
3725
|
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
@@ -3728,7 +3730,7 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3728
3730
|
}
|
|
3729
3731
|
}, Js = ({
|
|
3730
3732
|
radius: e
|
|
3731
|
-
}) =>
|
|
3733
|
+
}) => m({
|
|
3732
3734
|
"rounded-full": e === "large",
|
|
3733
3735
|
"rounded-md": e === "medium",
|
|
3734
3736
|
"rounded-sm": e === "small"
|
|
@@ -3740,21 +3742,21 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3740
3742
|
if (t)
|
|
3741
3743
|
return "";
|
|
3742
3744
|
if (r === "primary")
|
|
3743
|
-
return
|
|
3745
|
+
return m("hover:text-copy-light-hover", {
|
|
3744
3746
|
"hover:bg-action-dark-hover": e === "dark",
|
|
3745
3747
|
"hover:bg-action-light-hover": e === "light",
|
|
3746
3748
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
3747
3749
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
3748
3750
|
});
|
|
3749
3751
|
if (r === "secondary")
|
|
3750
|
-
return
|
|
3752
|
+
return m("hover:text-copy-light-hover", {
|
|
3751
3753
|
"hover:bg-action-dark-hover": e === "light",
|
|
3752
3754
|
"hover:bg-action-light-hover": e === "dark",
|
|
3753
3755
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
3754
3756
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
3755
3757
|
});
|
|
3756
3758
|
if (r === "danger")
|
|
3757
|
-
return
|
|
3759
|
+
return m("hover:text-copy-light-hover", {
|
|
3758
3760
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
3759
3761
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
3760
3762
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
@@ -3770,21 +3772,21 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3770
3772
|
if (t)
|
|
3771
3773
|
return "";
|
|
3772
3774
|
if (r === "primary")
|
|
3773
|
-
return
|
|
3775
|
+
return m("active:text-copy-light-active", {
|
|
3774
3776
|
"active:bg-action-dark-active": e === "dark",
|
|
3775
3777
|
"active:bg-action-light-active": e === "light",
|
|
3776
3778
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
3777
3779
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
3778
3780
|
});
|
|
3779
3781
|
if (r === "secondary")
|
|
3780
|
-
return
|
|
3782
|
+
return m("active:text-copy-light-active", {
|
|
3781
3783
|
"active:bg-action-dark-active": e === "light",
|
|
3782
3784
|
"active:bg-action-light-active": e === "dark",
|
|
3783
3785
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
3784
3786
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
3785
3787
|
});
|
|
3786
3788
|
if (r === "danger")
|
|
3787
|
-
return
|
|
3789
|
+
return m("active:text-copy-lighter-active", {
|
|
3788
3790
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
3789
3791
|
"active:bg-action-danger-light-active": e === "light",
|
|
3790
3792
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
@@ -3800,21 +3802,21 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3800
3802
|
if (t)
|
|
3801
3803
|
return "border border-transparent";
|
|
3802
3804
|
if (r === "primary")
|
|
3803
|
-
return
|
|
3805
|
+
return m("border", {
|
|
3804
3806
|
"border-border-dark": e === "dark",
|
|
3805
3807
|
"border-border-accent": e === "light",
|
|
3806
3808
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
3807
3809
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
3808
3810
|
});
|
|
3809
3811
|
if (r === "secondary")
|
|
3810
|
-
return
|
|
3812
|
+
return m("border", {
|
|
3811
3813
|
"border-border-dark": e === "light",
|
|
3812
3814
|
"border-border-accent": e === "dark",
|
|
3813
3815
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
3814
3816
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
3815
3817
|
});
|
|
3816
3818
|
if (r === "danger")
|
|
3817
|
-
return
|
|
3819
|
+
return m("border", {
|
|
3818
3820
|
"border-border-danger-dark": e === "dark",
|
|
3819
3821
|
"border-border-danger-medium": e === "light",
|
|
3820
3822
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
@@ -3824,7 +3826,7 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3824
3826
|
return "border border-border-selected-dark";
|
|
3825
3827
|
}, el = ({
|
|
3826
3828
|
focusMode: e
|
|
3827
|
-
}) =>
|
|
3829
|
+
}) => m("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
3828
3830
|
"focus:outline-focus-dark": e === "dark",
|
|
3829
3831
|
"focus:outline-focus-light": e === "light",
|
|
3830
3832
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -3833,7 +3835,7 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3833
3835
|
mode: e,
|
|
3834
3836
|
raw: t,
|
|
3835
3837
|
iconClassName: r
|
|
3836
|
-
}) => t ? "" :
|
|
3838
|
+
}) => t ? "" : m(
|
|
3837
3839
|
{
|
|
3838
3840
|
"text-copy-accent-dark": e === "light" || e === "alt-system",
|
|
3839
3841
|
"text-copy-light": e === "dark" || e === "system",
|
|
@@ -3843,7 +3845,7 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3843
3845
|
r
|
|
3844
3846
|
), rl = ({
|
|
3845
3847
|
animated: e
|
|
3846
|
-
}) =>
|
|
3848
|
+
}) => m({
|
|
3847
3849
|
"transition-opacity duration-300 ease-in": e
|
|
3848
3850
|
}), al = ({
|
|
3849
3851
|
type: e,
|
|
@@ -3856,42 +3858,42 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3856
3858
|
size: s,
|
|
3857
3859
|
noBorder: c,
|
|
3858
3860
|
labelRight: d,
|
|
3859
|
-
labelLeft:
|
|
3860
|
-
noBackground:
|
|
3861
|
-
variant:
|
|
3862
|
-
noTruncate:
|
|
3861
|
+
labelLeft: f,
|
|
3862
|
+
noBackground: u,
|
|
3863
|
+
variant: h,
|
|
3864
|
+
noTruncate: g,
|
|
3863
3865
|
align: p,
|
|
3864
|
-
radius:
|
|
3865
|
-
animated:
|
|
3866
|
-
}) => (
|
|
3866
|
+
radius: y,
|
|
3867
|
+
animated: b
|
|
3868
|
+
}) => (h || (h = "primary"), r ? m(fa, t) : m(
|
|
3867
3869
|
fa,
|
|
3868
3870
|
Ks({
|
|
3869
3871
|
mode: a,
|
|
3870
|
-
variant:
|
|
3871
|
-
noBackground:
|
|
3872
|
-
noTruncate:
|
|
3872
|
+
variant: h,
|
|
3873
|
+
noBackground: u,
|
|
3874
|
+
noTruncate: g
|
|
3873
3875
|
}),
|
|
3874
|
-
Ys({ mode: a, noBackground:
|
|
3875
|
-
Js({ radius:
|
|
3876
|
+
Ys({ mode: a, noBackground: u, variant: h }),
|
|
3877
|
+
Js({ radius: y }),
|
|
3876
3878
|
js({
|
|
3877
3879
|
type: e,
|
|
3878
3880
|
size: s,
|
|
3879
3881
|
labelRight: d,
|
|
3880
|
-
labelLeft:
|
|
3882
|
+
labelLeft: f,
|
|
3881
3883
|
align: p,
|
|
3882
|
-
animated:
|
|
3884
|
+
animated: b
|
|
3883
3885
|
}),
|
|
3884
|
-
qs({ type: e, size: s, labelRight: d, labelLeft:
|
|
3885
|
-
Qs({ mode: a, variant:
|
|
3886
|
+
qs({ type: e, size: s, labelRight: d, labelLeft: f }),
|
|
3887
|
+
Qs({ mode: a, variant: h, noBorder: c }),
|
|
3886
3888
|
el({ focusMode: n }),
|
|
3887
|
-
Zs({ mode: a, variant:
|
|
3888
|
-
Xs({ mode: a, variant:
|
|
3889
|
+
Zs({ mode: a, variant: h, disabled: o }),
|
|
3890
|
+
Xs({ mode: a, variant: h, disabled: o }),
|
|
3889
3891
|
{
|
|
3890
3892
|
"w-full": i,
|
|
3891
3893
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
3892
3894
|
},
|
|
3893
|
-
|
|
3894
|
-
"transition-[width] duration-300 ease-in-out": e === kt &&
|
|
3895
|
+
m({
|
|
3896
|
+
"transition-[width] duration-300 ease-in-out": e === kt && b
|
|
3895
3897
|
}),
|
|
3896
3898
|
t
|
|
3897
3899
|
)), nl = (e, t, r) => {
|
|
@@ -3912,7 +3914,7 @@ const ua = "av-messagebox", ma = "av-panel", fa = "av-button", kt = "icon", hn =
|
|
|
3912
3914
|
});
|
|
3913
3915
|
gn.displayName = "BaseButton";
|
|
3914
3916
|
function ol() {
|
|
3915
|
-
const e =
|
|
3917
|
+
const e = S(!1);
|
|
3916
3918
|
return M(() => (e.current = !0, () => {
|
|
3917
3919
|
e.current = !1;
|
|
3918
3920
|
}), []), Z(() => e.current, []);
|
|
@@ -3936,7 +3938,7 @@ const sl = {
|
|
|
3936
3938
|
right: 0
|
|
3937
3939
|
};
|
|
3938
3940
|
function zt(e) {
|
|
3939
|
-
const t = ol(), r =
|
|
3941
|
+
const t = ol(), r = S(0), a = S(null), [n, o] = W(sl), i = oe(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
|
|
3940
3942
|
const c = s[0];
|
|
3941
3943
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3942
3944
|
a.current && t() && o(c.contentRect);
|
|
@@ -3972,19 +3974,19 @@ const ll = {
|
|
|
3972
3974
|
raw: s = !1,
|
|
3973
3975
|
noBorder: c = !1,
|
|
3974
3976
|
"aria-label": d,
|
|
3975
|
-
label:
|
|
3976
|
-
size:
|
|
3977
|
-
labelRight:
|
|
3978
|
-
labelLeft:
|
|
3977
|
+
label: f,
|
|
3978
|
+
size: u = "medium",
|
|
3979
|
+
labelRight: h,
|
|
3980
|
+
labelLeft: g,
|
|
3979
3981
|
noBackground: p = !1,
|
|
3980
|
-
align:
|
|
3981
|
-
radius:
|
|
3982
|
+
align: y = "center",
|
|
3983
|
+
radius: b = "large",
|
|
3982
3984
|
variant: v = "primary",
|
|
3983
3985
|
iconClassName: x,
|
|
3984
3986
|
animated: k = !1,
|
|
3985
|
-
...
|
|
3986
|
-
},
|
|
3987
|
-
const
|
|
3987
|
+
...A
|
|
3988
|
+
}, E) => {
|
|
3989
|
+
const C = al({
|
|
3988
3990
|
type: kt,
|
|
3989
3991
|
mode: r,
|
|
3990
3992
|
focusMode: a,
|
|
@@ -3993,54 +3995,54 @@ const ll = {
|
|
|
3993
3995
|
raw: s,
|
|
3994
3996
|
className: o,
|
|
3995
3997
|
noBorder: c,
|
|
3996
|
-
size:
|
|
3997
|
-
labelRight:
|
|
3998
|
-
labelLeft:
|
|
3998
|
+
size: u,
|
|
3999
|
+
labelRight: h,
|
|
4000
|
+
labelLeft: g,
|
|
3999
4001
|
noBackground: p,
|
|
4000
|
-
align:
|
|
4001
|
-
radius:
|
|
4002
|
+
align: y,
|
|
4003
|
+
radius: b,
|
|
4002
4004
|
variant: v,
|
|
4003
4005
|
animated: k
|
|
4004
|
-
}),
|
|
4006
|
+
}), N = tl({ mode: r, raw: s, iconClassName: x }), _ = rl({ animated: k }), [w, T] = zt(), [R, B] = zt(), [$, O] = zt(), V = S(0), I = S(null), H = il([E, I]);
|
|
4005
4007
|
return pe(() => {
|
|
4006
|
-
|
|
4007
|
-
}, [O,
|
|
4008
|
-
|
|
4008
|
+
$ && $.current && k && (V.current = O.width + cl[u] + (c ? 0 : dl));
|
|
4009
|
+
}, [O, $, u, c, k]), pe(() => {
|
|
4010
|
+
I && I.current && k && (h && w && T.width > 0 ? (w.current && (w.current.style.opacity = "100"), I.current.style.width = `${T.width + V.current}px`) : g && B.width > 0 ? (R.current && (R.current.style.opacity = "100"), I.current.style.width = `${B.width + V.current}px`) : (w.current && (w.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), I.current.style.width = `${ll[u]}px`));
|
|
4009
4011
|
}, [
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
+
T,
|
|
4013
|
+
h,
|
|
4012
4014
|
w,
|
|
4013
4015
|
B,
|
|
4016
|
+
g,
|
|
4017
|
+
R,
|
|
4014
4018
|
u,
|
|
4015
|
-
C,
|
|
4016
|
-
m,
|
|
4017
4019
|
k
|
|
4018
4020
|
]), /* @__PURE__ */ L(
|
|
4019
4021
|
gn,
|
|
4020
4022
|
{
|
|
4021
4023
|
ref: H,
|
|
4022
|
-
className:
|
|
4024
|
+
className: C,
|
|
4023
4025
|
disabled: t,
|
|
4024
4026
|
type: i,
|
|
4025
|
-
"aria-label": d ||
|
|
4026
|
-
...
|
|
4027
|
+
"aria-label": d || f,
|
|
4028
|
+
...A,
|
|
4027
4029
|
children: [
|
|
4028
4030
|
/* @__PURE__ */ l(
|
|
4029
4031
|
ha,
|
|
4030
4032
|
{
|
|
4031
|
-
label:
|
|
4032
|
-
labelRef:
|
|
4033
|
-
labelClass:
|
|
4033
|
+
label: g,
|
|
4034
|
+
labelRef: R,
|
|
4035
|
+
labelClass: _,
|
|
4034
4036
|
labelInnerClass: "pr-2"
|
|
4035
4037
|
}
|
|
4036
4038
|
),
|
|
4037
|
-
/* @__PURE__ */ l("span", { ref:
|
|
4039
|
+
/* @__PURE__ */ l("span", { ref: $, className: N, children: e }),
|
|
4038
4040
|
/* @__PURE__ */ l(
|
|
4039
4041
|
ha,
|
|
4040
4042
|
{
|
|
4041
|
-
label:
|
|
4043
|
+
label: h,
|
|
4042
4044
|
labelRef: w,
|
|
4043
|
-
labelClass:
|
|
4045
|
+
labelClass: _,
|
|
4044
4046
|
labelInnerClass: "pl-2"
|
|
4045
4047
|
}
|
|
4046
4048
|
)
|
|
@@ -4076,7 +4078,7 @@ const ul = U.forwardRef(
|
|
|
4076
4078
|
active: a = !1,
|
|
4077
4079
|
...n
|
|
4078
4080
|
}, o) => {
|
|
4079
|
-
const i = a ?
|
|
4081
|
+
const i = a ? m(
|
|
4080
4082
|
"relative",
|
|
4081
4083
|
"focus-within:static",
|
|
4082
4084
|
"focus-within:after:border-transparent",
|
|
@@ -4096,7 +4098,7 @@ const ul = U.forwardRef(
|
|
|
4096
4098
|
return /* @__PURE__ */ l("div", { className: i, children: /* @__PURE__ */ l(
|
|
4097
4099
|
Er,
|
|
4098
4100
|
{
|
|
4099
|
-
className:
|
|
4101
|
+
className: m("justify-center", r),
|
|
4100
4102
|
ref: o,
|
|
4101
4103
|
mode: t,
|
|
4102
4104
|
radius: "small",
|
|
@@ -4118,7 +4120,7 @@ const ml = ({
|
|
|
4118
4120
|
semantic: s = !1,
|
|
4119
4121
|
...c
|
|
4120
4122
|
}) => {
|
|
4121
|
-
const d =
|
|
4123
|
+
const d = m(o, a);
|
|
4122
4124
|
return /* @__PURE__ */ L(_e, { children: [
|
|
4123
4125
|
/* @__PURE__ */ l(
|
|
4124
4126
|
"svg",
|
|
@@ -4193,27 +4195,27 @@ function hl({
|
|
|
4193
4195
|
open: t,
|
|
4194
4196
|
onOpenChange: r
|
|
4195
4197
|
} = {}) {
|
|
4196
|
-
const [a, n] = J.useState(e), [o, i] = J.useState(), [s, c] = J.useState(), d = t ?? a,
|
|
4198
|
+
const [a, n] = J.useState(e), [o, i] = J.useState(), [s, c] = J.useState(), d = t ?? a, f = r ?? n, u = Aa({
|
|
4197
4199
|
open: d,
|
|
4198
|
-
onOpenChange:
|
|
4199
|
-
}),
|
|
4200
|
+
onOpenChange: f
|
|
4201
|
+
}), h = u.context, g = $a(h, {
|
|
4200
4202
|
enabled: t == null
|
|
4201
|
-
}), p = La(
|
|
4203
|
+
}), p = La(h, {
|
|
4202
4204
|
outsidePress: !1,
|
|
4203
4205
|
outsidePressEvent: "mousedown"
|
|
4204
|
-
}),
|
|
4206
|
+
}), y = Oa(h), b = Ba([g, p, y]);
|
|
4205
4207
|
return J.useMemo(
|
|
4206
4208
|
() => ({
|
|
4207
4209
|
open: d,
|
|
4208
|
-
setOpen:
|
|
4209
|
-
...
|
|
4210
|
-
...
|
|
4210
|
+
setOpen: f,
|
|
4211
|
+
...b,
|
|
4212
|
+
...u,
|
|
4211
4213
|
labelId: o,
|
|
4212
4214
|
descriptionId: s,
|
|
4213
4215
|
setLabelId: i,
|
|
4214
4216
|
setDescriptionId: c
|
|
4215
4217
|
}),
|
|
4216
|
-
[d,
|
|
4218
|
+
[d, f, b, u, o, s]
|
|
4217
4219
|
);
|
|
4218
4220
|
}
|
|
4219
4221
|
const wt = () => {
|
|
@@ -4233,7 +4235,7 @@ const pl = J.forwardRef(function(e, t) {
|
|
|
4233
4235
|
const { context: r, ...a } = wt(), n = ur([a.refs.setFloating, t]);
|
|
4234
4236
|
if (!r.open)
|
|
4235
4237
|
return null;
|
|
4236
|
-
const { overlayBackground: o, ...i } = e, s =
|
|
4238
|
+
const { overlayBackground: o, ...i } = e, s = m("grid place-items-center", {
|
|
4237
4239
|
[`${o}`]: o,
|
|
4238
4240
|
"bg-black sm:bg-black/[.8]": !o
|
|
4239
4241
|
});
|
|
@@ -4279,7 +4281,7 @@ const He = "panel", rt = "messagebox", kl = ({
|
|
|
4279
4281
|
kind: t,
|
|
4280
4282
|
borderMode: r
|
|
4281
4283
|
}) => ({
|
|
4282
|
-
main:
|
|
4284
|
+
main: m("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
4283
4285
|
[`${ma} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === He,
|
|
4284
4286
|
[`${ma} w-full sm:w-[95%] md:max-w-2xl`]: t === He && !e,
|
|
4285
4287
|
[`${ua} rounded-lg border-2`]: t === rt,
|
|
@@ -4304,7 +4306,7 @@ const He = "panel", rt = "messagebox", kl = ({
|
|
|
4304
4306
|
kind: i = He,
|
|
4305
4307
|
className: s
|
|
4306
4308
|
}) => {
|
|
4307
|
-
const c =
|
|
4309
|
+
const c = S(""), d = kl({ className: s, kind: i, borderMode: o });
|
|
4308
4310
|
return M(() => (e && (c.current = document.title, document.title = `${r} | ${c.current}`), () => {
|
|
4309
4311
|
e && (document.title = c.current);
|
|
4310
4312
|
}), [r, e]), /* @__PURE__ */ l(_e, { children: e && /* @__PURE__ */ l(gl, { open: e, onOpenChange: t, children: /* @__PURE__ */ L(pl, { className: d.main, children: [
|
|
@@ -4464,32 +4466,32 @@ const He = "panel", rt = "messagebox", kl = ({
|
|
|
4464
4466
|
focusMode: i = "system",
|
|
4465
4467
|
...s
|
|
4466
4468
|
}, c) => {
|
|
4467
|
-
const [d,
|
|
4469
|
+
const [d, f] = W(!1), [u, h] = W(!1), [g, p] = W(null), y = S([]), b = S([]), v = G(sr), x = Ma(), k = Kn(), A = Da(), { floatingStyles: E, refs: C, context: N } = Aa({
|
|
4468
4470
|
nodeId: k,
|
|
4469
4471
|
open: d,
|
|
4470
4472
|
onOpenChange: (q) => {
|
|
4471
|
-
|
|
4473
|
+
f(q), n == null || n(q);
|
|
4472
4474
|
},
|
|
4473
4475
|
placement: a,
|
|
4474
4476
|
strategy: "fixed",
|
|
4475
4477
|
middleware: [Yn({ mainAxis: 10 }), Jn(), Zn()],
|
|
4476
4478
|
whileElementsMounted: Xn
|
|
4477
|
-
}),
|
|
4479
|
+
}), _ = $a(N, {
|
|
4478
4480
|
event: "mousedown",
|
|
4479
4481
|
toggle: !0,
|
|
4480
4482
|
ignoreMouse: !1
|
|
4481
|
-
}), w = Oa(
|
|
4482
|
-
listRef:
|
|
4483
|
-
activeIndex:
|
|
4483
|
+
}), w = Oa(N, { role: "menu" }), T = La(N, { bubbles: !0 }), R = Qn(N, {
|
|
4484
|
+
listRef: y,
|
|
4485
|
+
activeIndex: g,
|
|
4484
4486
|
nested: !1,
|
|
4485
4487
|
onNavigate: p,
|
|
4486
4488
|
loop: !0
|
|
4487
|
-
}), B = eo(
|
|
4488
|
-
listRef:
|
|
4489
|
+
}), B = eo(N, {
|
|
4490
|
+
listRef: b,
|
|
4489
4491
|
onMatch: d ? p : void 0,
|
|
4490
|
-
activeIndex:
|
|
4491
|
-
}), { getReferenceProps:
|
|
4492
|
-
noInternalClick:
|
|
4492
|
+
activeIndex: g
|
|
4493
|
+
}), { getReferenceProps: $, getFloatingProps: O, getItemProps: V } = Ba([_, w, T, R, B]), I = ga(e) === "Button" || ga(e) === "ButtonIcon", H = I ? {
|
|
4494
|
+
noInternalClick: I,
|
|
4493
4495
|
focusMode: i,
|
|
4494
4496
|
mode: o
|
|
4495
4497
|
} : {}, j = U.cloneElement(
|
|
@@ -4498,9 +4500,9 @@ const He = "panel", rt = "messagebox", kl = ({
|
|
|
4498
4500
|
...H,
|
|
4499
4501
|
"aria-label": r,
|
|
4500
4502
|
"data-open": d ? "" : void 0,
|
|
4501
|
-
"data-focus-inside":
|
|
4502
|
-
ref: ur([
|
|
4503
|
-
|
|
4503
|
+
"data-focus-inside": u ? "" : void 0,
|
|
4504
|
+
ref: ur([C.setReference, A.ref, c]),
|
|
4505
|
+
...$(
|
|
4504
4506
|
v.getItemProps({
|
|
4505
4507
|
...s
|
|
4506
4508
|
})
|
|
@@ -4511,7 +4513,7 @@ const He = "panel", rt = "messagebox", kl = ({
|
|
|
4511
4513
|
if (!x)
|
|
4512
4514
|
return;
|
|
4513
4515
|
function q() {
|
|
4514
|
-
|
|
4516
|
+
f(!1), n == null || n(!1);
|
|
4515
4517
|
}
|
|
4516
4518
|
return x.events.on("click", q), () => {
|
|
4517
4519
|
x.events.off("click", q);
|
|
@@ -4524,25 +4526,25 @@ const He = "panel", rt = "messagebox", kl = ({
|
|
|
4524
4526
|
sr.Provider,
|
|
4525
4527
|
{
|
|
4526
4528
|
value: {
|
|
4527
|
-
activeIndex:
|
|
4529
|
+
activeIndex: g,
|
|
4528
4530
|
setActiveIndex: p,
|
|
4529
4531
|
getItemProps: V,
|
|
4530
|
-
setHasFocusInside:
|
|
4532
|
+
setHasFocusInside: h,
|
|
4531
4533
|
isOpen: d
|
|
4532
4534
|
},
|
|
4533
|
-
children: /* @__PURE__ */ l(ro, { elementsRef:
|
|
4535
|
+
children: /* @__PURE__ */ l(ro, { elementsRef: y, labelsRef: b, children: d && /* @__PURE__ */ l(Ra, { children: /* @__PURE__ */ l(
|
|
4534
4536
|
Ia,
|
|
4535
4537
|
{
|
|
4536
|
-
context:
|
|
4538
|
+
context: N,
|
|
4537
4539
|
modal: !1,
|
|
4538
4540
|
initialFocus: 0,
|
|
4539
4541
|
returnFocus: !0,
|
|
4540
4542
|
children: /* @__PURE__ */ l(
|
|
4541
4543
|
"div",
|
|
4542
4544
|
{
|
|
4543
|
-
ref:
|
|
4545
|
+
ref: C.setFloating,
|
|
4544
4546
|
className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-none p-4 sm:p-2",
|
|
4545
|
-
style:
|
|
4547
|
+
style: E,
|
|
4546
4548
|
...O(),
|
|
4547
4549
|
children: t
|
|
4548
4550
|
}
|
|
@@ -4568,23 +4570,23 @@ const ct = J.forwardRef(
|
|
|
4568
4570
|
...s
|
|
4569
4571
|
}, c) => {
|
|
4570
4572
|
let d = "";
|
|
4571
|
-
const
|
|
4573
|
+
const f = J.useContext(sr), u = Da({ label: t ? null : e }), h = Ma(), g = ur([u.ref, c]);
|
|
4572
4574
|
if (a && n)
|
|
4573
4575
|
return /* @__PURE__ */ l(
|
|
4574
4576
|
"div",
|
|
4575
4577
|
{
|
|
4576
4578
|
role: "menuitem",
|
|
4577
|
-
...
|
|
4578
|
-
onClick(
|
|
4579
|
-
var
|
|
4580
|
-
o || ((
|
|
4579
|
+
...f.getItemProps({
|
|
4580
|
+
onClick(y) {
|
|
4581
|
+
var b;
|
|
4582
|
+
o || ((b = s.onClick) == null || b.call(s, y), h == null || h.events.emit("click"));
|
|
4581
4583
|
}
|
|
4582
4584
|
}),
|
|
4583
4585
|
children: n
|
|
4584
4586
|
}
|
|
4585
4587
|
);
|
|
4586
4588
|
r && (d = "pl-2");
|
|
4587
|
-
const p =
|
|
4589
|
+
const p = m(
|
|
4588
4590
|
"m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1 flex w-full rounded-md border border-transparent text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium",
|
|
4589
4591
|
{
|
|
4590
4592
|
"bg-surface-medium text-copy-lighter font-bold": !t && i,
|
|
@@ -4596,19 +4598,19 @@ const ct = J.forwardRef(
|
|
|
4596
4598
|
"button",
|
|
4597
4599
|
{
|
|
4598
4600
|
...s,
|
|
4599
|
-
ref:
|
|
4601
|
+
ref: g,
|
|
4600
4602
|
role: "menuitem",
|
|
4601
4603
|
className: p,
|
|
4602
4604
|
tabIndex: 0,
|
|
4603
4605
|
disabled: t,
|
|
4604
|
-
...
|
|
4605
|
-
onClick(
|
|
4606
|
-
var
|
|
4607
|
-
o || ((
|
|
4606
|
+
...f.getItemProps({
|
|
4607
|
+
onClick(y) {
|
|
4608
|
+
var b;
|
|
4609
|
+
o || ((b = s.onClick) == null || b.call(s, y), h == null || h.events.emit("click"));
|
|
4608
4610
|
},
|
|
4609
|
-
onFocus(
|
|
4610
|
-
var
|
|
4611
|
-
(
|
|
4611
|
+
onFocus(y) {
|
|
4612
|
+
var b;
|
|
4613
|
+
(b = s.onFocus) == null || b.call(s, y), f.setHasFocusInside(!0);
|
|
4612
4614
|
}
|
|
4613
4615
|
}),
|
|
4614
4616
|
children: [
|
|
@@ -4621,13 +4623,13 @@ const ct = J.forwardRef(
|
|
|
4621
4623
|
);
|
|
4622
4624
|
ct.displayName = "MenuItem";
|
|
4623
4625
|
const Qc = ({ className: e, ...t }) => {
|
|
4624
|
-
const r =
|
|
4626
|
+
const r = m(e, "my-1 border-t border-border-medium");
|
|
4625
4627
|
return /* @__PURE__ */ l("div", { className: r, ...t });
|
|
4626
4628
|
}, bn = ({
|
|
4627
4629
|
className: e,
|
|
4628
4630
|
...t
|
|
4629
4631
|
}) => {
|
|
4630
|
-
const r =
|
|
4632
|
+
const r = m(
|
|
4631
4633
|
e,
|
|
4632
4634
|
"pt-1 mb-2 text-sm text-copy-dark border-b border-border-medium"
|
|
4633
4635
|
);
|
|
@@ -4662,8 +4664,8 @@ const El = (e) => {
|
|
|
4662
4664
|
} = br({
|
|
4663
4665
|
keys: [o == null ? void 0 : o.username],
|
|
4664
4666
|
getAccessToken: n
|
|
4665
|
-
}), d = (
|
|
4666
|
-
|
|
4667
|
+
}), d = (f, u, h) => {
|
|
4668
|
+
f.preventDefault(), h && r({
|
|
4667
4669
|
type: Me,
|
|
4668
4670
|
payload: {
|
|
4669
4671
|
privateChat: !0
|
|
@@ -4671,7 +4673,7 @@ const El = (e) => {
|
|
|
4671
4673
|
}), a({
|
|
4672
4674
|
type: Ta,
|
|
4673
4675
|
payload: {
|
|
4674
|
-
prompt:
|
|
4676
|
+
prompt: u
|
|
4675
4677
|
}
|
|
4676
4678
|
});
|
|
4677
4679
|
};
|
|
@@ -4690,17 +4692,17 @@ const El = (e) => {
|
|
|
4690
4692
|
defaultPlacement: t,
|
|
4691
4693
|
children: [
|
|
4692
4694
|
/* @__PURE__ */ l(bn, { children: "Prompts" }),
|
|
4693
|
-
i && i.tags && i.tags.map((
|
|
4695
|
+
i && i.tags && i.tags.map((f) => f.enabled && f.label && f.content && /* @__PURE__ */ l(
|
|
4694
4696
|
ct,
|
|
4695
4697
|
{
|
|
4696
|
-
label:
|
|
4697
|
-
onClick: (
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4698
|
+
label: f.label,
|
|
4699
|
+
onClick: (u) => d(
|
|
4700
|
+
u,
|
|
4701
|
+
f.content,
|
|
4702
|
+
f == null ? void 0 : f.privateChat
|
|
4701
4703
|
)
|
|
4702
4704
|
},
|
|
4703
|
-
`prompt-button-${
|
|
4705
|
+
`prompt-button-${f.slot}`
|
|
4704
4706
|
))
|
|
4705
4707
|
]
|
|
4706
4708
|
}
|
|
@@ -4712,8 +4714,8 @@ const El = (e) => {
|
|
|
4712
4714
|
}) => {
|
|
4713
4715
|
const { user: t, getAccessToken: r } = Le(), {
|
|
4714
4716
|
state: { messages: a, usage: n, provider: o, id: i, privateChat: s }
|
|
4715
|
-
} = G(ie), [c, d] = W(!1),
|
|
4716
|
-
|
|
4717
|
+
} = G(ie), [c, d] = W(!1), f = async (u) => {
|
|
4718
|
+
u.preventDefault();
|
|
4717
4719
|
try {
|
|
4718
4720
|
i && a && o && await yr({
|
|
4719
4721
|
accessToken: await r(),
|
|
@@ -4745,7 +4747,7 @@ const El = (e) => {
|
|
|
4745
4747
|
mode: "dark",
|
|
4746
4748
|
focusMode: "light",
|
|
4747
4749
|
label: "Save Private Chat",
|
|
4748
|
-
onClick:
|
|
4750
|
+
onClick: f,
|
|
4749
4751
|
children: /* @__PURE__ */ l(io, { size: ge, monotone: !0 })
|
|
4750
4752
|
}
|
|
4751
4753
|
)
|
|
@@ -4754,7 +4756,7 @@ const El = (e) => {
|
|
|
4754
4756
|
}, Cl = ({ show: e }) => e ? /* @__PURE__ */ l(
|
|
4755
4757
|
"div",
|
|
4756
4758
|
{
|
|
4757
|
-
className:
|
|
4759
|
+
className: m(
|
|
4758
4760
|
Qi,
|
|
4759
4761
|
"bottom-44 fixed left-1/2 transform -translate-x-1/2"
|
|
4760
4762
|
),
|
|
@@ -4823,16 +4825,16 @@ const El = (e) => {
|
|
|
4823
4825
|
} = br({
|
|
4824
4826
|
keys: [n == null ? void 0 : n.username],
|
|
4825
4827
|
getAccessToken: a
|
|
4826
|
-
}), d = async (
|
|
4828
|
+
}), d = async (f) => {
|
|
4827
4829
|
try {
|
|
4828
4830
|
await Gi({
|
|
4829
|
-
provider:
|
|
4831
|
+
provider: f,
|
|
4830
4832
|
accessToken: await a(),
|
|
4831
4833
|
username: (n == null ? void 0 : n.username) || ""
|
|
4832
4834
|
}), c({ ...o }), r({
|
|
4833
4835
|
type: Me,
|
|
4834
4836
|
payload: {
|
|
4835
|
-
provider:
|
|
4837
|
+
provider: f
|
|
4836
4838
|
}
|
|
4837
4839
|
});
|
|
4838
4840
|
} catch {
|
|
@@ -4876,26 +4878,26 @@ const El = (e) => {
|
|
|
4876
4878
|
)
|
|
4877
4879
|
}
|
|
4878
4880
|
);
|
|
4879
|
-
}, Il = () =>
|
|
4881
|
+
}, Il = () => m(
|
|
4880
4882
|
"relative rounded-md text-base h-auto min-w-28 overflow-hidden pt-2"
|
|
4881
|
-
), pa = () =>
|
|
4883
|
+
), pa = () => m("bg-surface-darker"), Al = () => m("text-copy-lighter caret-copy-light"), $l = () => m(
|
|
4882
4884
|
"has-[.av-prompt-editable:focus]:outline",
|
|
4883
4885
|
"has-[.av-prompt-editable:focus]:outline-2",
|
|
4884
4886
|
"has-[.av-prompt-editable:focus]:outline-offset-2",
|
|
4885
4887
|
"has-[.av-prompt-editable:focus]:outline-focus-light"
|
|
4886
|
-
), Ll = () =>
|
|
4888
|
+
), Ll = () => m(
|
|
4887
4889
|
"peer",
|
|
4888
4890
|
"text-base resize-none overflow-hidden w-full text-inherit outline-none",
|
|
4889
4891
|
"h-6 pr-2 pl-4"
|
|
4890
4892
|
), Ol = ({ className: e }) => {
|
|
4891
|
-
const t =
|
|
4893
|
+
const t = m(
|
|
4892
4894
|
Ln,
|
|
4893
4895
|
Il(),
|
|
4894
4896
|
pa(),
|
|
4895
4897
|
Al(),
|
|
4896
4898
|
$l(),
|
|
4897
4899
|
e
|
|
4898
|
-
), r =
|
|
4900
|
+
), r = m(
|
|
4899
4901
|
On,
|
|
4900
4902
|
Ll(),
|
|
4901
4903
|
pa()
|
|
@@ -4914,11 +4916,11 @@ const El = (e) => {
|
|
|
4914
4916
|
ref: i,
|
|
4915
4917
|
...s
|
|
4916
4918
|
}) => {
|
|
4917
|
-
const
|
|
4918
|
-
state: { usage:
|
|
4919
|
-
} = G(ie), { state: p } = G(pt),
|
|
4919
|
+
const f = ya * 2, u = 5 * ya, {
|
|
4920
|
+
state: { usage: h, messages: g }
|
|
4921
|
+
} = G(ie), { state: p } = G(pt), y = S(null), b = S(null), v = _o([i, b]), x = Co(), k = Ol({
|
|
4920
4922
|
className: e
|
|
4921
|
-
}), [
|
|
4923
|
+
}), [A, E] = So({
|
|
4922
4924
|
value: r,
|
|
4923
4925
|
initialControlledDelay: 20,
|
|
4924
4926
|
defaultValue: a,
|
|
@@ -4929,34 +4931,34 @@ const El = (e) => {
|
|
|
4929
4931
|
}
|
|
4930
4932
|
});
|
|
4931
4933
|
}
|
|
4932
|
-
}),
|
|
4933
|
-
if (!
|
|
4934
|
+
}), C = Z(() => {
|
|
4935
|
+
if (!b.current)
|
|
4934
4936
|
return;
|
|
4935
|
-
|
|
4936
|
-
const w =
|
|
4937
|
-
if (w >
|
|
4938
|
-
|
|
4937
|
+
b.current.style.height = "auto";
|
|
4938
|
+
const w = b.current.scrollHeight;
|
|
4939
|
+
if (w > u) {
|
|
4940
|
+
b.current.style.height = `${u}px`, b.current.style.overflowY = "scroll";
|
|
4939
4941
|
return;
|
|
4940
4942
|
}
|
|
4941
|
-
|
|
4942
|
-
}, [
|
|
4943
|
-
|
|
4944
|
-
},
|
|
4945
|
-
|
|
4943
|
+
b.current.style.height = `${w}px`, b.current.style.overflowY = "hidden";
|
|
4944
|
+
}, [u]), N = (w) => {
|
|
4945
|
+
E(""), b.current && (b.current.style.height = `${f}px`), o(w, A);
|
|
4946
|
+
}, _ = (w) => {
|
|
4947
|
+
E(w.target.value), C();
|
|
4946
4948
|
};
|
|
4947
4949
|
return M(() => {
|
|
4948
|
-
|
|
4949
|
-
}, [
|
|
4950
|
+
h === 0 && (g == null ? void 0 : g.length) === 0 && b.current && (b.current.style.height = `${f}px`);
|
|
4951
|
+
}, [h, g, f]), M(() => {
|
|
4950
4952
|
p.lastTriggeredTimestamp && setTimeout(() => {
|
|
4951
|
-
|
|
4953
|
+
C();
|
|
4952
4954
|
}, 100);
|
|
4953
|
-
}, [p.lastTriggeredTimestamp,
|
|
4955
|
+
}, [p.lastTriggeredTimestamp, C]), /* @__PURE__ */ l(
|
|
4954
4956
|
"div",
|
|
4955
4957
|
{
|
|
4956
4958
|
className: k.wrapper,
|
|
4957
|
-
ref:
|
|
4959
|
+
ref: y,
|
|
4958
4960
|
...s,
|
|
4959
|
-
children: /* @__PURE__ */ L("form", { onSubmit:
|
|
4961
|
+
children: /* @__PURE__ */ L("form", { onSubmit: N, children: [
|
|
4960
4962
|
/* @__PURE__ */ l("div", { id: x, className: "sr-only", children: t }),
|
|
4961
4963
|
/* @__PURE__ */ l("div", { className: "relative", children: /* @__PURE__ */ l(
|
|
4962
4964
|
"textarea",
|
|
@@ -4966,9 +4968,9 @@ const El = (e) => {
|
|
|
4966
4968
|
ref: v,
|
|
4967
4969
|
placeholder: "Type your question here.",
|
|
4968
4970
|
translate: "no",
|
|
4969
|
-
onChange:
|
|
4970
|
-
value:
|
|
4971
|
-
onKeyDown: po([["mod+Enter",
|
|
4971
|
+
onChange: _,
|
|
4972
|
+
value: A,
|
|
4973
|
+
onKeyDown: po([["mod+Enter", N]]),
|
|
4972
4974
|
className: k.textArea,
|
|
4973
4975
|
"aria-labelledby": x
|
|
4974
4976
|
}
|
|
@@ -4988,19 +4990,19 @@ const El = (e) => {
|
|
|
4988
4990
|
const {
|
|
4989
4991
|
state: { messages: e, provider: t, id: r, usage: a, privateChat: n, streaming: o },
|
|
4990
4992
|
dispatch: i
|
|
4991
|
-
} = G(ie), { state: s, dispatch: c } = G(pt), [d,
|
|
4993
|
+
} = G(ie), { state: s, dispatch: c } = G(pt), [d, f] = W(""), { getAccessToken: u, user: h } = Le(), g = S(null), p = S(
|
|
4992
4994
|
null
|
|
4993
4995
|
);
|
|
4994
4996
|
bo([
|
|
4995
4997
|
[
|
|
4996
4998
|
"mod+K",
|
|
4997
4999
|
() => {
|
|
4998
|
-
|
|
5000
|
+
g && g.current && g.current.focus();
|
|
4999
5001
|
}
|
|
5000
5002
|
]
|
|
5001
5003
|
]);
|
|
5002
|
-
const
|
|
5003
|
-
|
|
5004
|
+
const y = async (b) => {
|
|
5005
|
+
b.preventDefault(), i({
|
|
5004
5006
|
type: nt,
|
|
5005
5007
|
payload: {
|
|
5006
5008
|
content: d,
|
|
@@ -5015,20 +5017,20 @@ const El = (e) => {
|
|
|
5015
5017
|
(v = p == null ? void 0 : p.current) == null || v.cancel();
|
|
5016
5018
|
return;
|
|
5017
5019
|
}
|
|
5018
|
-
const
|
|
5019
|
-
if (!(e.length === 0 ||
|
|
5020
|
+
const b = e[e.length - 1];
|
|
5021
|
+
if (!(e.length === 0 || b.role === Fe || b.role === Bn || b.role === at || b.role === Mn)) {
|
|
5020
5022
|
i({
|
|
5021
5023
|
type: rr,
|
|
5022
5024
|
payload: !0
|
|
5023
5025
|
});
|
|
5024
5026
|
try {
|
|
5025
5027
|
const x = await Wi({
|
|
5026
|
-
accessToken: await
|
|
5028
|
+
accessToken: await u(),
|
|
5027
5029
|
name: "generate",
|
|
5028
5030
|
data: {
|
|
5029
5031
|
messages: e,
|
|
5030
5032
|
model: t || ot,
|
|
5031
|
-
user: (
|
|
5033
|
+
user: (h == null ? void 0 : h.username) || "",
|
|
5032
5034
|
id: r,
|
|
5033
5035
|
usage: a,
|
|
5034
5036
|
private: n
|
|
@@ -5044,25 +5046,26 @@ const El = (e) => {
|
|
|
5044
5046
|
});
|
|
5045
5047
|
const k = hr();
|
|
5046
5048
|
p.current = x.body.getReader();
|
|
5047
|
-
const
|
|
5049
|
+
const A = new TextDecoder();
|
|
5048
5050
|
for (; ; ) {
|
|
5049
|
-
const { done:
|
|
5050
|
-
if (
|
|
5051
|
+
const { done: E, value: C } = await p.current.read();
|
|
5052
|
+
if (E)
|
|
5051
5053
|
break;
|
|
5052
|
-
const
|
|
5053
|
-
if (
|
|
5054
|
-
const w =
|
|
5055
|
-
|
|
5054
|
+
const N = A.decode(C, { stream: !0 }), _ = N.indexOf(Pr);
|
|
5055
|
+
if (_ !== -1) {
|
|
5056
|
+
const w = N.substring(0, _), T = JSON.parse(
|
|
5057
|
+
N.substring(_ + Pr.length)
|
|
5056
5058
|
);
|
|
5057
5059
|
i({
|
|
5058
5060
|
type: nt,
|
|
5059
5061
|
payload: {
|
|
5060
|
-
model:
|
|
5062
|
+
model: T.model,
|
|
5061
5063
|
content: w,
|
|
5062
5064
|
role: Fe,
|
|
5063
5065
|
messageId: k,
|
|
5064
|
-
processingTime:
|
|
5065
|
-
name:
|
|
5066
|
+
processingTime: T.processingTime,
|
|
5067
|
+
name: T.name,
|
|
5068
|
+
usage: T.usage
|
|
5066
5069
|
}
|
|
5067
5070
|
});
|
|
5068
5071
|
break;
|
|
@@ -5070,7 +5073,7 @@ const El = (e) => {
|
|
|
5070
5073
|
i({
|
|
5071
5074
|
type: nt,
|
|
5072
5075
|
payload: {
|
|
5073
|
-
content:
|
|
5076
|
+
content: N,
|
|
5074
5077
|
role: Fe,
|
|
5075
5078
|
messageId: k
|
|
5076
5079
|
}
|
|
@@ -5101,25 +5104,25 @@ const El = (e) => {
|
|
|
5101
5104
|
})();
|
|
5102
5105
|
}, [e]), M(() => {
|
|
5103
5106
|
if (s.prompt !== "") {
|
|
5104
|
-
const
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
}) :
|
|
5107
|
+
const b = s.prompt.endsWith(":") && !s.prompt.endsWith(": ") ? s.prompt + " " : s.prompt;
|
|
5108
|
+
b.indexOf(Ur) !== -1 ? navigator.clipboard.readText().then((x) => {
|
|
5109
|
+
f(b.replace(Ur, x));
|
|
5110
|
+
}) : f(b), g.current && g.current.focus(), c({
|
|
5108
5111
|
type: Ea
|
|
5109
5112
|
});
|
|
5110
5113
|
}
|
|
5111
5114
|
}, [s, c]), M(() => {
|
|
5112
|
-
a === 0 && (e == null ? void 0 : e.length) === 0 && (
|
|
5115
|
+
a === 0 && (e == null ? void 0 : e.length) === 0 && (f(""), g.current && g.current.focus());
|
|
5113
5116
|
}, [a, e]), M(() => {
|
|
5114
|
-
o === !1 &&
|
|
5117
|
+
o === !1 && g.current && g.current.focus();
|
|
5115
5118
|
}, [o]), /* @__PURE__ */ l(_e, { children: /* @__PURE__ */ l(
|
|
5116
5119
|
Bl,
|
|
5117
5120
|
{
|
|
5118
5121
|
label: Dn,
|
|
5119
|
-
onSubmit:
|
|
5120
|
-
ref:
|
|
5122
|
+
onSubmit: y,
|
|
5123
|
+
ref: g,
|
|
5121
5124
|
value: d,
|
|
5122
|
-
onChange: (
|
|
5125
|
+
onChange: (b) => f(b.target.value)
|
|
5123
5126
|
}
|
|
5124
5127
|
) });
|
|
5125
5128
|
}, Dl = ({ isComponent: e }) => {
|
|
@@ -5127,8 +5130,8 @@ const El = (e) => {
|
|
|
5127
5130
|
state: { loading: t, streaming: r, restoring: a, messages: n }
|
|
5128
5131
|
} = G(ie), { height: o } = No(), [i, s] = To(), c = window.innerWidth < 403;
|
|
5129
5132
|
return M(() => {
|
|
5130
|
-
var d,
|
|
5131
|
-
(t && !r || a) && ((d = i == null ? void 0 : i.current) == null || d.style.setProperty("--sassy-bottom", "16px")), !t && !r && n.length === 0 && ((
|
|
5133
|
+
var d, f;
|
|
5134
|
+
(t && !r || a) && ((d = i == null ? void 0 : i.current) == null || d.style.setProperty("--sassy-bottom", "16px")), !t && !r && n.length === 0 && ((f = i == null ? void 0 : i.current) == null || f.style.setProperty(
|
|
5132
5135
|
"--sassy-bottom",
|
|
5133
5136
|
`${o - s.height - (e ? 300 : c ? 220 : 245)}px`
|
|
5134
5137
|
));
|
|
@@ -5146,7 +5149,7 @@ const El = (e) => {
|
|
|
5146
5149
|
"footer",
|
|
5147
5150
|
{
|
|
5148
5151
|
ref: i,
|
|
5149
|
-
className:
|
|
5152
|
+
className: m(
|
|
5150
5153
|
"px-2 sm:px-0 md:mx-auto md:max-w-4xl w-full",
|
|
5151
5154
|
"fixed left-1/2 transform -translate-x-1/2",
|
|
5152
5155
|
"transition-all ease-in-out duration-500",
|
|
@@ -5185,13 +5188,13 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5185
5188
|
switch (e) {
|
|
5186
5189
|
case vn:
|
|
5187
5190
|
case lr:
|
|
5188
|
-
return
|
|
5191
|
+
return m({
|
|
5189
5192
|
[i]: t === "small",
|
|
5190
5193
|
[s]: t === "medium",
|
|
5191
5194
|
[c]: t === "large"
|
|
5192
5195
|
});
|
|
5193
5196
|
case xt:
|
|
5194
|
-
return
|
|
5197
|
+
return m("flex items-center", {
|
|
5195
5198
|
"justify-center": n === "center",
|
|
5196
5199
|
"justify-start": n === "left",
|
|
5197
5200
|
"justify-end": n === "right",
|
|
@@ -5219,14 +5222,14 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5219
5222
|
switch (e) {
|
|
5220
5223
|
case vn:
|
|
5221
5224
|
case lr:
|
|
5222
|
-
return
|
|
5225
|
+
return m({
|
|
5223
5226
|
"text-center": e === lr,
|
|
5224
5227
|
[n]: t === "small",
|
|
5225
5228
|
[o]: t === "medium",
|
|
5226
5229
|
[i]: t === "large"
|
|
5227
5230
|
});
|
|
5228
5231
|
case xt:
|
|
5229
|
-
return
|
|
5232
|
+
return m({
|
|
5230
5233
|
[n]: t === "small" && (r || a),
|
|
5231
5234
|
[o]: t === "medium" && (r || a),
|
|
5232
5235
|
[i]: t === "large" && (r || a)
|
|
@@ -5241,7 +5244,7 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5241
5244
|
if (t)
|
|
5242
5245
|
return "not-prose";
|
|
5243
5246
|
if (a === "primary")
|
|
5244
|
-
return
|
|
5247
|
+
return m("not-prose", {
|
|
5245
5248
|
truncate: !r,
|
|
5246
5249
|
"text-copy-light": e === "dark" || e === "system",
|
|
5247
5250
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -5249,7 +5252,7 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5249
5252
|
"dark:text-copy-light": e === "alt-system"
|
|
5250
5253
|
});
|
|
5251
5254
|
if (a === "secondary")
|
|
5252
|
-
return
|
|
5255
|
+
return m("not-prose", {
|
|
5253
5256
|
truncate: !r,
|
|
5254
5257
|
"text-copy-light": e === "light" || e === "system",
|
|
5255
5258
|
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
@@ -5257,7 +5260,7 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5257
5260
|
"dark:text-copy-light": e === "system"
|
|
5258
5261
|
});
|
|
5259
5262
|
if (a === "danger")
|
|
5260
|
-
return
|
|
5263
|
+
return m("not-prose", {
|
|
5261
5264
|
truncate: !r,
|
|
5262
5265
|
"text-copy-light": e === "dark" || e === "system",
|
|
5263
5266
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -5265,7 +5268,7 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5265
5268
|
"dark:text-copy-light": e === "alt-system"
|
|
5266
5269
|
});
|
|
5267
5270
|
if (a === "selected")
|
|
5268
|
-
return
|
|
5271
|
+
return m("not-prose text-copy-lighter", {
|
|
5269
5272
|
truncate: !r
|
|
5270
5273
|
});
|
|
5271
5274
|
}, Hl = ({
|
|
@@ -5275,21 +5278,21 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5275
5278
|
}) => {
|
|
5276
5279
|
if (!t) {
|
|
5277
5280
|
if (r === "primary")
|
|
5278
|
-
return
|
|
5281
|
+
return m({
|
|
5279
5282
|
"bg-action-dark": e === "dark",
|
|
5280
5283
|
"bg-action-light": e === "light",
|
|
5281
5284
|
"bg-action-dark dark:bg-action-light": e === "system",
|
|
5282
5285
|
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
5283
5286
|
});
|
|
5284
5287
|
if (r === "secondary")
|
|
5285
|
-
return
|
|
5288
|
+
return m({
|
|
5286
5289
|
"bg-action-dark": e === "light",
|
|
5287
5290
|
"bg-action-light": e === "dark",
|
|
5288
5291
|
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
5289
5292
|
"bg-action-light dark:bg-action-dark": e === "system"
|
|
5290
5293
|
});
|
|
5291
5294
|
if (r === "danger")
|
|
5292
|
-
return
|
|
5295
|
+
return m({
|
|
5293
5296
|
"bg-action-danger-dark": e === "dark",
|
|
5294
5297
|
"bg-action-danger-light": e === "light",
|
|
5295
5298
|
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
@@ -5300,7 +5303,7 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5300
5303
|
}
|
|
5301
5304
|
}, Fl = ({
|
|
5302
5305
|
radius: e
|
|
5303
|
-
}) =>
|
|
5306
|
+
}) => m({
|
|
5304
5307
|
"rounded-full": e === "large",
|
|
5305
5308
|
"rounded-md": e === "medium",
|
|
5306
5309
|
"rounded-sm": e === "small"
|
|
@@ -5312,21 +5315,21 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5312
5315
|
if (t)
|
|
5313
5316
|
return "";
|
|
5314
5317
|
if (r === "primary")
|
|
5315
|
-
return
|
|
5318
|
+
return m("hover:text-copy-light-hover", {
|
|
5316
5319
|
"hover:bg-action-dark-hover": e === "dark",
|
|
5317
5320
|
"hover:bg-action-light-hover": e === "light",
|
|
5318
5321
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
5319
5322
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
5320
5323
|
});
|
|
5321
5324
|
if (r === "secondary")
|
|
5322
|
-
return
|
|
5325
|
+
return m("hover:text-copy-light-hover", {
|
|
5323
5326
|
"hover:bg-action-dark-hover": e === "light",
|
|
5324
5327
|
"hover:bg-action-light-hover": e === "dark",
|
|
5325
5328
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
5326
5329
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
5327
5330
|
});
|
|
5328
5331
|
if (r === "danger")
|
|
5329
|
-
return
|
|
5332
|
+
return m("hover:text-copy-light-hover", {
|
|
5330
5333
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
5331
5334
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
5332
5335
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
@@ -5342,21 +5345,21 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5342
5345
|
if (t)
|
|
5343
5346
|
return "";
|
|
5344
5347
|
if (r === "primary")
|
|
5345
|
-
return
|
|
5348
|
+
return m("active:text-copy-light-active", {
|
|
5346
5349
|
"active:bg-action-dark-active": e === "dark",
|
|
5347
5350
|
"active:bg-action-light-active": e === "light",
|
|
5348
5351
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
5349
5352
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
5350
5353
|
});
|
|
5351
5354
|
if (r === "secondary")
|
|
5352
|
-
return
|
|
5355
|
+
return m("active:text-copy-light-active", {
|
|
5353
5356
|
"active:bg-action-dark-active": e === "light",
|
|
5354
5357
|
"active:bg-action-light-active": e === "dark",
|
|
5355
5358
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
5356
5359
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
5357
5360
|
});
|
|
5358
5361
|
if (r === "danger")
|
|
5359
|
-
return
|
|
5362
|
+
return m("active:text-copy-lighter-active", {
|
|
5360
5363
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
5361
5364
|
"active:bg-action-danger-light-active": e === "light",
|
|
5362
5365
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
@@ -5372,21 +5375,21 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5372
5375
|
if (t)
|
|
5373
5376
|
return "border border-transparent";
|
|
5374
5377
|
if (r === "primary")
|
|
5375
|
-
return
|
|
5378
|
+
return m("border", {
|
|
5376
5379
|
"border-border-dark": e === "dark",
|
|
5377
5380
|
"border-border-accent": e === "light",
|
|
5378
5381
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
5379
5382
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
5380
5383
|
});
|
|
5381
5384
|
if (r === "secondary")
|
|
5382
|
-
return
|
|
5385
|
+
return m("border", {
|
|
5383
5386
|
"border-border-dark": e === "light",
|
|
5384
5387
|
"border-border-accent": e === "dark",
|
|
5385
5388
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
5386
5389
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
5387
5390
|
});
|
|
5388
5391
|
if (r === "danger")
|
|
5389
|
-
return
|
|
5392
|
+
return m("border", {
|
|
5390
5393
|
"border-border-danger-dark": e === "dark",
|
|
5391
5394
|
"border-border-danger-medium": e === "light",
|
|
5392
5395
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
@@ -5396,7 +5399,7 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5396
5399
|
return "border border-border-selected-dark";
|
|
5397
5400
|
}, ql = ({
|
|
5398
5401
|
focusMode: e
|
|
5399
|
-
}) =>
|
|
5402
|
+
}) => m("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
5400
5403
|
"focus:outline-focus-dark": e === "dark",
|
|
5401
5404
|
"focus:outline-focus-light": e === "light",
|
|
5402
5405
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -5405,7 +5408,7 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5405
5408
|
mode: e,
|
|
5406
5409
|
raw: t,
|
|
5407
5410
|
iconClassName: r
|
|
5408
|
-
}) => t ? "" :
|
|
5411
|
+
}) => t ? "" : m(
|
|
5409
5412
|
{
|
|
5410
5413
|
"text-copy-accent-dark": e === "light" || e === "alt-system",
|
|
5411
5414
|
"text-copy-light": e === "dark" || e === "system",
|
|
@@ -5415,7 +5418,7 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5415
5418
|
r
|
|
5416
5419
|
), Yl = ({
|
|
5417
5420
|
animated: e
|
|
5418
|
-
}) =>
|
|
5421
|
+
}) => m({
|
|
5419
5422
|
"transition-opacity duration-300 ease-in": e
|
|
5420
5423
|
}), Jl = ({
|
|
5421
5424
|
type: e,
|
|
@@ -5428,42 +5431,42 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5428
5431
|
size: s,
|
|
5429
5432
|
noBorder: c,
|
|
5430
5433
|
labelRight: d,
|
|
5431
|
-
labelLeft:
|
|
5432
|
-
noBackground:
|
|
5433
|
-
variant:
|
|
5434
|
-
noTruncate:
|
|
5434
|
+
labelLeft: f,
|
|
5435
|
+
noBackground: u,
|
|
5436
|
+
variant: h,
|
|
5437
|
+
noTruncate: g,
|
|
5435
5438
|
align: p,
|
|
5436
|
-
radius:
|
|
5437
|
-
animated:
|
|
5438
|
-
}) => (
|
|
5439
|
+
radius: y,
|
|
5440
|
+
animated: b
|
|
5441
|
+
}) => (h || (h = "primary"), r ? m(ba, t) : m(
|
|
5439
5442
|
ba,
|
|
5440
5443
|
Ul({
|
|
5441
5444
|
mode: a,
|
|
5442
|
-
variant:
|
|
5443
|
-
noBackground:
|
|
5444
|
-
noTruncate:
|
|
5445
|
+
variant: h,
|
|
5446
|
+
noBackground: u,
|
|
5447
|
+
noTruncate: g
|
|
5445
5448
|
}),
|
|
5446
|
-
Hl({ mode: a, noBackground:
|
|
5447
|
-
Fl({ radius:
|
|
5449
|
+
Hl({ mode: a, noBackground: u, variant: h }),
|
|
5450
|
+
Fl({ radius: y }),
|
|
5448
5451
|
Pl({
|
|
5449
5452
|
type: e,
|
|
5450
5453
|
size: s,
|
|
5451
5454
|
labelRight: d,
|
|
5452
|
-
labelLeft:
|
|
5455
|
+
labelLeft: f,
|
|
5453
5456
|
align: p,
|
|
5454
|
-
animated:
|
|
5457
|
+
animated: b
|
|
5455
5458
|
}),
|
|
5456
|
-
zl({ type: e, size: s, labelRight: d, labelLeft:
|
|
5457
|
-
jl({ mode: a, variant:
|
|
5459
|
+
zl({ type: e, size: s, labelRight: d, labelLeft: f }),
|
|
5460
|
+
jl({ mode: a, variant: h, noBorder: c }),
|
|
5458
5461
|
ql({ focusMode: n }),
|
|
5459
|
-
Wl({ mode: a, variant:
|
|
5460
|
-
Gl({ mode: a, variant:
|
|
5462
|
+
Wl({ mode: a, variant: h, disabled: o }),
|
|
5463
|
+
Gl({ mode: a, variant: h, disabled: o }),
|
|
5461
5464
|
{
|
|
5462
5465
|
"w-full": i,
|
|
5463
5466
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
5464
5467
|
},
|
|
5465
|
-
|
|
5466
|
-
"transition-[width] duration-300 ease-in-out": e === xt &&
|
|
5468
|
+
m({
|
|
5469
|
+
"transition-[width] duration-300 ease-in-out": e === xt && b
|
|
5467
5470
|
}),
|
|
5468
5471
|
t
|
|
5469
5472
|
)), Zl = (e, t, r) => {
|
|
@@ -5484,7 +5487,7 @@ const Vl = "av-bubble", ba = "av-button", xt = "icon", vn = "button", lr = "link
|
|
|
5484
5487
|
});
|
|
5485
5488
|
kn.displayName = "BaseButton";
|
|
5486
5489
|
function Xl() {
|
|
5487
|
-
const e =
|
|
5490
|
+
const e = S(!1);
|
|
5488
5491
|
return M(() => (e.current = !0, () => {
|
|
5489
5492
|
e.current = !1;
|
|
5490
5493
|
}), []), Z(() => e.current, []);
|
|
@@ -5508,7 +5511,7 @@ const ec = {
|
|
|
5508
5511
|
right: 0
|
|
5509
5512
|
};
|
|
5510
5513
|
function Ut(e) {
|
|
5511
|
-
const t = Xl(), r =
|
|
5514
|
+
const t = Xl(), r = S(0), a = S(null), [n, o] = W(ec), i = oe(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
|
|
5512
5515
|
const c = s[0];
|
|
5513
5516
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
5514
5517
|
a.current && t() && o(c.contentRect);
|
|
@@ -5544,19 +5547,19 @@ const tc = {
|
|
|
5544
5547
|
raw: s = !1,
|
|
5545
5548
|
noBorder: c = !1,
|
|
5546
5549
|
"aria-label": d,
|
|
5547
|
-
label:
|
|
5548
|
-
size:
|
|
5549
|
-
labelRight:
|
|
5550
|
-
labelLeft:
|
|
5550
|
+
label: f,
|
|
5551
|
+
size: u = "medium",
|
|
5552
|
+
labelRight: h,
|
|
5553
|
+
labelLeft: g,
|
|
5551
5554
|
noBackground: p = !1,
|
|
5552
|
-
align:
|
|
5553
|
-
radius:
|
|
5555
|
+
align: y = "center",
|
|
5556
|
+
radius: b = "large",
|
|
5554
5557
|
variant: v = "primary",
|
|
5555
5558
|
iconClassName: x,
|
|
5556
5559
|
animated: k = !1,
|
|
5557
|
-
...
|
|
5558
|
-
},
|
|
5559
|
-
const
|
|
5560
|
+
...A
|
|
5561
|
+
}, E) => {
|
|
5562
|
+
const C = Jl({
|
|
5560
5563
|
type: xt,
|
|
5561
5564
|
mode: r,
|
|
5562
5565
|
focusMode: a,
|
|
@@ -5565,54 +5568,54 @@ const tc = {
|
|
|
5565
5568
|
raw: s,
|
|
5566
5569
|
className: o,
|
|
5567
5570
|
noBorder: c,
|
|
5568
|
-
size:
|
|
5569
|
-
labelRight:
|
|
5570
|
-
labelLeft:
|
|
5571
|
+
size: u,
|
|
5572
|
+
labelRight: h,
|
|
5573
|
+
labelLeft: g,
|
|
5571
5574
|
noBackground: p,
|
|
5572
|
-
align:
|
|
5573
|
-
radius:
|
|
5575
|
+
align: y,
|
|
5576
|
+
radius: b,
|
|
5574
5577
|
variant: v,
|
|
5575
5578
|
animated: k
|
|
5576
|
-
}),
|
|
5579
|
+
}), N = Kl({ mode: r, raw: s, iconClassName: x }), _ = Yl({ animated: k }), [w, T] = Ut(), [R, B] = Ut(), [$, O] = Ut(), V = S(0), I = S(null), H = Ql([E, I]);
|
|
5577
5580
|
return pe(() => {
|
|
5578
|
-
|
|
5579
|
-
}, [O,
|
|
5580
|
-
|
|
5581
|
+
$ && $.current && k && (V.current = O.width + rc[u] + (c ? 0 : ac));
|
|
5582
|
+
}, [O, $, u, c, k]), pe(() => {
|
|
5583
|
+
I && I.current && k && (h && w && T.width > 0 ? (w.current && (w.current.style.opacity = "100"), I.current.style.width = `${T.width + V.current}px`) : g && B.width > 0 ? (R.current && (R.current.style.opacity = "100"), I.current.style.width = `${B.width + V.current}px`) : (w.current && (w.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), I.current.style.width = `${tc[u]}px`));
|
|
5581
5584
|
}, [
|
|
5582
|
-
|
|
5583
|
-
|
|
5585
|
+
T,
|
|
5586
|
+
h,
|
|
5584
5587
|
w,
|
|
5585
5588
|
B,
|
|
5589
|
+
g,
|
|
5590
|
+
R,
|
|
5586
5591
|
u,
|
|
5587
|
-
C,
|
|
5588
|
-
m,
|
|
5589
5592
|
k
|
|
5590
5593
|
]), /* @__PURE__ */ L(
|
|
5591
5594
|
kn,
|
|
5592
5595
|
{
|
|
5593
5596
|
ref: H,
|
|
5594
|
-
className:
|
|
5597
|
+
className: C,
|
|
5595
5598
|
disabled: t,
|
|
5596
5599
|
type: i,
|
|
5597
|
-
"aria-label": d ||
|
|
5598
|
-
...
|
|
5600
|
+
"aria-label": d || f,
|
|
5601
|
+
...A,
|
|
5599
5602
|
children: [
|
|
5600
5603
|
/* @__PURE__ */ l(
|
|
5601
5604
|
va,
|
|
5602
5605
|
{
|
|
5603
|
-
label:
|
|
5604
|
-
labelRef:
|
|
5605
|
-
labelClass:
|
|
5606
|
+
label: g,
|
|
5607
|
+
labelRef: R,
|
|
5608
|
+
labelClass: _,
|
|
5606
5609
|
labelInnerClass: "pr-2"
|
|
5607
5610
|
}
|
|
5608
5611
|
),
|
|
5609
|
-
/* @__PURE__ */ l("span", { ref:
|
|
5612
|
+
/* @__PURE__ */ l("span", { ref: $, className: N, children: e }),
|
|
5610
5613
|
/* @__PURE__ */ l(
|
|
5611
5614
|
va,
|
|
5612
5615
|
{
|
|
5613
|
-
label:
|
|
5616
|
+
label: h,
|
|
5614
5617
|
labelRef: w,
|
|
5615
|
-
labelClass:
|
|
5618
|
+
labelClass: _,
|
|
5616
5619
|
labelInnerClass: "pl-2"
|
|
5617
5620
|
}
|
|
5618
5621
|
)
|
|
@@ -5648,7 +5651,7 @@ const nc = U.forwardRef(
|
|
|
5648
5651
|
active: a = !1,
|
|
5649
5652
|
...n
|
|
5650
5653
|
}, o) => {
|
|
5651
|
-
const i = a ?
|
|
5654
|
+
const i = a ? m(
|
|
5652
5655
|
"relative",
|
|
5653
5656
|
"focus-within:static",
|
|
5654
5657
|
"focus-within:after:border-transparent",
|
|
@@ -5668,7 +5671,7 @@ const nc = U.forwardRef(
|
|
|
5668
5671
|
return /* @__PURE__ */ l("div", { className: i, children: /* @__PURE__ */ l(
|
|
5669
5672
|
Sr,
|
|
5670
5673
|
{
|
|
5671
|
-
className:
|
|
5674
|
+
className: m("justify-center", r),
|
|
5672
5675
|
ref: o,
|
|
5673
5676
|
mode: t,
|
|
5674
5677
|
radius: "small",
|
|
@@ -5690,7 +5693,7 @@ const wn = ({
|
|
|
5690
5693
|
semantic: s = !1,
|
|
5691
5694
|
...c
|
|
5692
5695
|
}) => {
|
|
5693
|
-
const d =
|
|
5696
|
+
const d = m(o, a);
|
|
5694
5697
|
return /* @__PURE__ */ L(_e, { children: [
|
|
5695
5698
|
/* @__PURE__ */ l(
|
|
5696
5699
|
"svg",
|
|
@@ -5782,18 +5785,18 @@ try {
|
|
|
5782
5785
|
const sc = ({
|
|
5783
5786
|
kind: e,
|
|
5784
5787
|
noMaxWidth: t
|
|
5785
|
-
}) =>
|
|
5788
|
+
}) => m("p-4", {
|
|
5786
5789
|
"max-w-xs sm:max-w-md md:max-w-2xl": !t,
|
|
5787
5790
|
"lg:max-w-3xl": e === "left" && !t
|
|
5788
|
-
}), lc = ({ kind: e }) =>
|
|
5791
|
+
}), lc = ({ kind: e }) => m({
|
|
5789
5792
|
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
5790
5793
|
"bg-surface-accent": e === "right"
|
|
5791
|
-
}), cc = ({ kind: e }) =>
|
|
5794
|
+
}), cc = ({ kind: e }) => m(
|
|
5792
5795
|
"prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
|
|
5793
5796
|
{
|
|
5794
5797
|
"text-copy-lighter": e === "right"
|
|
5795
5798
|
}
|
|
5796
|
-
), dc = ({ kind: e }) =>
|
|
5799
|
+
), dc = ({ kind: e }) => m("rounded-b-xl", {
|
|
5797
5800
|
"rounded-tr-xl": e === "left",
|
|
5798
5801
|
"rounded-tl-xl": e === "right"
|
|
5799
5802
|
}), uc = ({
|
|
@@ -5801,20 +5804,20 @@ const sc = ({
|
|
|
5801
5804
|
className: t,
|
|
5802
5805
|
noMaxWidth: r
|
|
5803
5806
|
}) => {
|
|
5804
|
-
const a =
|
|
5807
|
+
const a = m(
|
|
5805
5808
|
Vl,
|
|
5806
5809
|
"flex items-start",
|
|
5807
5810
|
{
|
|
5808
5811
|
"flex-row-reverse": e === "right"
|
|
5809
5812
|
},
|
|
5810
5813
|
t
|
|
5811
|
-
), n =
|
|
5814
|
+
), n = m(
|
|
5812
5815
|
"flex flex-col empty:hidden",
|
|
5813
5816
|
sc({ kind: e, noMaxWidth: r }),
|
|
5814
5817
|
cc({ kind: e }),
|
|
5815
5818
|
lc({ kind: e }),
|
|
5816
5819
|
dc({ kind: e })
|
|
5817
|
-
), o = "pr-2 pt-1 text-end text-xs text-copy-light", i =
|
|
5820
|
+
), o = "pr-2 pt-1 text-end text-xs text-copy-light", i = m("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
5818
5821
|
"ml-2": e === "left",
|
|
5819
5822
|
"mr-2": e === "right"
|
|
5820
5823
|
});
|
|
@@ -5835,27 +5838,27 @@ const sc = ({
|
|
|
5835
5838
|
copyToClipboardMode: s = "system",
|
|
5836
5839
|
noMaxWidth: c = !1
|
|
5837
5840
|
}) => {
|
|
5838
|
-
const [d,
|
|
5839
|
-
|
|
5841
|
+
const [d, f] = W(!1), u = uc({ kind: t, className: r, noMaxWidth: c }), h = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), g = () => {
|
|
5842
|
+
f(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
5840
5843
|
};
|
|
5841
5844
|
return M(() => {
|
|
5842
5845
|
let p;
|
|
5843
5846
|
return d && (p = window.setTimeout(() => {
|
|
5844
|
-
|
|
5847
|
+
f(!1);
|
|
5845
5848
|
}, 3e3)), () => {
|
|
5846
5849
|
clearTimeout(p);
|
|
5847
5850
|
};
|
|
5848
|
-
}, [d]), /* @__PURE__ */ L("div", { className:
|
|
5851
|
+
}, [d]), /* @__PURE__ */ L("div", { className: u.wrapper, children: [
|
|
5849
5852
|
/* @__PURE__ */ L("div", { children: [
|
|
5850
|
-
/* @__PURE__ */ l("div", { className:
|
|
5851
|
-
a && Object.keys(a).map((p,
|
|
5853
|
+
/* @__PURE__ */ l("div", { className: u.main, children: e }),
|
|
5854
|
+
a && Object.keys(a).map((p, y) => a[p] ? /* @__PURE__ */ l("div", { className: "prose-p:m-0", children: /* @__PURE__ */ L("p", { className: u.footer, children: [
|
|
5852
5855
|
p,
|
|
5853
5856
|
": ",
|
|
5854
5857
|
a[p]
|
|
5855
|
-
] }) }, `${p}-${
|
|
5858
|
+
] }) }, `${p}-${y}`) : null),
|
|
5856
5859
|
n && n
|
|
5857
5860
|
] }),
|
|
5858
|
-
|
|
5861
|
+
h && /* @__PURE__ */ l("div", { className: u.copyButton, children: /* @__PURE__ */ l(
|
|
5859
5862
|
Sr,
|
|
5860
5863
|
{
|
|
5861
5864
|
noBorder: !0,
|
|
@@ -5864,7 +5867,7 @@ const sc = ({
|
|
|
5864
5867
|
mode: s,
|
|
5865
5868
|
focusMode: i,
|
|
5866
5869
|
label: d ? "Copied to clipboard" : "Copy to clipboard",
|
|
5867
|
-
onClick:
|
|
5870
|
+
onClick: g,
|
|
5868
5871
|
disabled: d,
|
|
5869
5872
|
children: d ? /* @__PURE__ */ l(oc, { size: "size-3" }) : /* @__PURE__ */ l(ic, { size: "size-3" })
|
|
5870
5873
|
}
|
|
@@ -5882,13 +5885,13 @@ const sc = ({
|
|
|
5882
5885
|
switch (e) {
|
|
5883
5886
|
case Cr:
|
|
5884
5887
|
case cr:
|
|
5885
|
-
return
|
|
5888
|
+
return m({
|
|
5886
5889
|
[i]: t === "small",
|
|
5887
5890
|
[s]: t === "medium",
|
|
5888
5891
|
[c]: t === "large"
|
|
5889
5892
|
});
|
|
5890
5893
|
case _t:
|
|
5891
|
-
return
|
|
5894
|
+
return m("flex items-center", {
|
|
5892
5895
|
"justify-center": n === "center",
|
|
5893
5896
|
"justify-start": n === "left",
|
|
5894
5897
|
"justify-end": n === "right",
|
|
@@ -5916,14 +5919,14 @@ const sc = ({
|
|
|
5916
5919
|
switch (e) {
|
|
5917
5920
|
case Cr:
|
|
5918
5921
|
case cr:
|
|
5919
|
-
return
|
|
5922
|
+
return m({
|
|
5920
5923
|
"text-center": e === cr,
|
|
5921
5924
|
[n]: t === "small",
|
|
5922
5925
|
[o]: t === "medium",
|
|
5923
5926
|
[i]: t === "large"
|
|
5924
5927
|
});
|
|
5925
5928
|
case _t:
|
|
5926
|
-
return
|
|
5929
|
+
return m({
|
|
5927
5930
|
[n]: t === "small" && (r || a),
|
|
5928
5931
|
[o]: t === "medium" && (r || a),
|
|
5929
5932
|
[i]: t === "large" && (r || a)
|
|
@@ -5938,7 +5941,7 @@ const sc = ({
|
|
|
5938
5941
|
if (t)
|
|
5939
5942
|
return "not-prose";
|
|
5940
5943
|
if (a === "primary")
|
|
5941
|
-
return
|
|
5944
|
+
return m("not-prose", {
|
|
5942
5945
|
truncate: !r,
|
|
5943
5946
|
"text-copy-light": e === "dark" || e === "system",
|
|
5944
5947
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -5946,7 +5949,7 @@ const sc = ({
|
|
|
5946
5949
|
"dark:text-copy-light": e === "alt-system"
|
|
5947
5950
|
});
|
|
5948
5951
|
if (a === "secondary")
|
|
5949
|
-
return
|
|
5952
|
+
return m("not-prose", {
|
|
5950
5953
|
truncate: !r,
|
|
5951
5954
|
"text-copy-light": e === "light" || e === "system",
|
|
5952
5955
|
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
@@ -5954,7 +5957,7 @@ const sc = ({
|
|
|
5954
5957
|
"dark:text-copy-light": e === "system"
|
|
5955
5958
|
});
|
|
5956
5959
|
if (a === "danger")
|
|
5957
|
-
return
|
|
5960
|
+
return m("not-prose", {
|
|
5958
5961
|
truncate: !r,
|
|
5959
5962
|
"text-copy-light": e === "dark" || e === "system",
|
|
5960
5963
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -5962,7 +5965,7 @@ const sc = ({
|
|
|
5962
5965
|
"dark:text-copy-light": e === "alt-system"
|
|
5963
5966
|
});
|
|
5964
5967
|
if (a === "selected")
|
|
5965
|
-
return
|
|
5968
|
+
return m("not-prose text-copy-lighter", {
|
|
5966
5969
|
truncate: !r
|
|
5967
5970
|
});
|
|
5968
5971
|
}, pc = ({
|
|
@@ -5972,21 +5975,21 @@ const sc = ({
|
|
|
5972
5975
|
}) => {
|
|
5973
5976
|
if (!t) {
|
|
5974
5977
|
if (r === "primary")
|
|
5975
|
-
return
|
|
5978
|
+
return m({
|
|
5976
5979
|
"bg-action-dark": e === "dark",
|
|
5977
5980
|
"bg-action-light": e === "light",
|
|
5978
5981
|
"bg-action-dark dark:bg-action-light": e === "system",
|
|
5979
5982
|
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
5980
5983
|
});
|
|
5981
5984
|
if (r === "secondary")
|
|
5982
|
-
return
|
|
5985
|
+
return m({
|
|
5983
5986
|
"bg-action-dark": e === "light",
|
|
5984
5987
|
"bg-action-light": e === "dark",
|
|
5985
5988
|
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
5986
5989
|
"bg-action-light dark:bg-action-dark": e === "system"
|
|
5987
5990
|
});
|
|
5988
5991
|
if (r === "danger")
|
|
5989
|
-
return
|
|
5992
|
+
return m({
|
|
5990
5993
|
"bg-action-danger-dark": e === "dark",
|
|
5991
5994
|
"bg-action-danger-light": e === "light",
|
|
5992
5995
|
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
@@ -5997,7 +6000,7 @@ const sc = ({
|
|
|
5997
6000
|
}
|
|
5998
6001
|
}, yc = ({
|
|
5999
6002
|
radius: e
|
|
6000
|
-
}) =>
|
|
6003
|
+
}) => m({
|
|
6001
6004
|
"rounded-full": e === "large",
|
|
6002
6005
|
"rounded-md": e === "medium",
|
|
6003
6006
|
"rounded-sm": e === "small"
|
|
@@ -6009,21 +6012,21 @@ const sc = ({
|
|
|
6009
6012
|
if (t)
|
|
6010
6013
|
return "";
|
|
6011
6014
|
if (r === "primary")
|
|
6012
|
-
return
|
|
6015
|
+
return m("hover:text-copy-light-hover", {
|
|
6013
6016
|
"hover:bg-action-dark-hover": e === "dark",
|
|
6014
6017
|
"hover:bg-action-light-hover": e === "light",
|
|
6015
6018
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
6016
6019
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
6017
6020
|
});
|
|
6018
6021
|
if (r === "secondary")
|
|
6019
|
-
return
|
|
6022
|
+
return m("hover:text-copy-light-hover", {
|
|
6020
6023
|
"hover:bg-action-dark-hover": e === "light",
|
|
6021
6024
|
"hover:bg-action-light-hover": e === "dark",
|
|
6022
6025
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
6023
6026
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
6024
6027
|
});
|
|
6025
6028
|
if (r === "danger")
|
|
6026
|
-
return
|
|
6029
|
+
return m("hover:text-copy-light-hover", {
|
|
6027
6030
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
6028
6031
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
6029
6032
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
@@ -6039,21 +6042,21 @@ const sc = ({
|
|
|
6039
6042
|
if (t)
|
|
6040
6043
|
return "";
|
|
6041
6044
|
if (r === "primary")
|
|
6042
|
-
return
|
|
6045
|
+
return m("active:text-copy-light-active", {
|
|
6043
6046
|
"active:bg-action-dark-active": e === "dark",
|
|
6044
6047
|
"active:bg-action-light-active": e === "light",
|
|
6045
6048
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
6046
6049
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
6047
6050
|
});
|
|
6048
6051
|
if (r === "secondary")
|
|
6049
|
-
return
|
|
6052
|
+
return m("active:text-copy-light-active", {
|
|
6050
6053
|
"active:bg-action-dark-active": e === "light",
|
|
6051
6054
|
"active:bg-action-light-active": e === "dark",
|
|
6052
6055
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
6053
6056
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
6054
6057
|
});
|
|
6055
6058
|
if (r === "danger")
|
|
6056
|
-
return
|
|
6059
|
+
return m("active:text-copy-lighter-active", {
|
|
6057
6060
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
6058
6061
|
"active:bg-action-danger-light-active": e === "light",
|
|
6059
6062
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
@@ -6069,21 +6072,21 @@ const sc = ({
|
|
|
6069
6072
|
if (t)
|
|
6070
6073
|
return "border border-transparent";
|
|
6071
6074
|
if (r === "primary")
|
|
6072
|
-
return
|
|
6075
|
+
return m("border", {
|
|
6073
6076
|
"border-border-dark": e === "dark",
|
|
6074
6077
|
"border-border-accent": e === "light",
|
|
6075
6078
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
6076
6079
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
6077
6080
|
});
|
|
6078
6081
|
if (r === "secondary")
|
|
6079
|
-
return
|
|
6082
|
+
return m("border", {
|
|
6080
6083
|
"border-border-dark": e === "light",
|
|
6081
6084
|
"border-border-accent": e === "dark",
|
|
6082
6085
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
6083
6086
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
6084
6087
|
});
|
|
6085
6088
|
if (r === "danger")
|
|
6086
|
-
return
|
|
6089
|
+
return m("border", {
|
|
6087
6090
|
"border-border-danger-dark": e === "dark",
|
|
6088
6091
|
"border-border-danger-medium": e === "light",
|
|
6089
6092
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
@@ -6093,7 +6096,7 @@ const sc = ({
|
|
|
6093
6096
|
return "border border-border-selected-dark";
|
|
6094
6097
|
}, wc = ({
|
|
6095
6098
|
focusMode: e
|
|
6096
|
-
}) =>
|
|
6099
|
+
}) => m("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
6097
6100
|
"focus:outline-focus-dark": e === "dark",
|
|
6098
6101
|
"focus:outline-focus-light": e === "light",
|
|
6099
6102
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -6102,7 +6105,7 @@ const sc = ({
|
|
|
6102
6105
|
mode: e,
|
|
6103
6106
|
raw: t,
|
|
6104
6107
|
iconClassName: r
|
|
6105
|
-
}) => t ? "" :
|
|
6108
|
+
}) => t ? "" : m(
|
|
6106
6109
|
{
|
|
6107
6110
|
"text-copy-accent-dark": e === "light" || e === "alt-system",
|
|
6108
6111
|
"text-copy-light": e === "dark" || e === "system",
|
|
@@ -6112,7 +6115,7 @@ const sc = ({
|
|
|
6112
6115
|
r
|
|
6113
6116
|
), _c = ({
|
|
6114
6117
|
animated: e
|
|
6115
|
-
}) =>
|
|
6118
|
+
}) => m({
|
|
6116
6119
|
"transition-opacity duration-300 ease-in": e
|
|
6117
6120
|
}), xn = ({
|
|
6118
6121
|
type: e,
|
|
@@ -6125,42 +6128,42 @@ const sc = ({
|
|
|
6125
6128
|
size: s,
|
|
6126
6129
|
noBorder: c,
|
|
6127
6130
|
labelRight: d,
|
|
6128
|
-
labelLeft:
|
|
6129
|
-
noBackground:
|
|
6130
|
-
variant:
|
|
6131
|
-
noTruncate:
|
|
6131
|
+
labelLeft: f,
|
|
6132
|
+
noBackground: u,
|
|
6133
|
+
variant: h,
|
|
6134
|
+
noTruncate: g,
|
|
6132
6135
|
align: p,
|
|
6133
|
-
radius:
|
|
6134
|
-
animated:
|
|
6135
|
-
}) => (
|
|
6136
|
+
radius: y,
|
|
6137
|
+
animated: b
|
|
6138
|
+
}) => (h || (h = "primary"), r ? m(ka, t) : m(
|
|
6136
6139
|
ka,
|
|
6137
6140
|
gc({
|
|
6138
6141
|
mode: a,
|
|
6139
|
-
variant:
|
|
6140
|
-
noBackground:
|
|
6141
|
-
noTruncate:
|
|
6142
|
+
variant: h,
|
|
6143
|
+
noBackground: u,
|
|
6144
|
+
noTruncate: g
|
|
6142
6145
|
}),
|
|
6143
|
-
pc({ mode: a, noBackground:
|
|
6144
|
-
yc({ radius:
|
|
6146
|
+
pc({ mode: a, noBackground: u, variant: h }),
|
|
6147
|
+
yc({ radius: y }),
|
|
6145
6148
|
fc({
|
|
6146
6149
|
type: e,
|
|
6147
6150
|
size: s,
|
|
6148
6151
|
labelRight: d,
|
|
6149
|
-
labelLeft:
|
|
6152
|
+
labelLeft: f,
|
|
6150
6153
|
align: p,
|
|
6151
|
-
animated:
|
|
6154
|
+
animated: b
|
|
6152
6155
|
}),
|
|
6153
|
-
hc({ type: e, size: s, labelRight: d, labelLeft:
|
|
6154
|
-
kc({ mode: a, variant:
|
|
6156
|
+
hc({ type: e, size: s, labelRight: d, labelLeft: f }),
|
|
6157
|
+
kc({ mode: a, variant: h, noBorder: c }),
|
|
6155
6158
|
wc({ focusMode: n }),
|
|
6156
|
-
bc({ mode: a, variant:
|
|
6157
|
-
vc({ mode: a, variant:
|
|
6159
|
+
bc({ mode: a, variant: h, disabled: o }),
|
|
6160
|
+
vc({ mode: a, variant: h, disabled: o }),
|
|
6158
6161
|
{
|
|
6159
6162
|
"w-full": i,
|
|
6160
6163
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
6161
6164
|
},
|
|
6162
|
-
|
|
6163
|
-
"transition-[width] duration-300 ease-in-out": e === _t &&
|
|
6165
|
+
m({
|
|
6166
|
+
"transition-[width] duration-300 ease-in-out": e === _t && b
|
|
6164
6167
|
}),
|
|
6165
6168
|
t
|
|
6166
6169
|
)), Ec = (e, t, r) => {
|
|
@@ -6192,10 +6195,10 @@ const _n = U.forwardRef(
|
|
|
6192
6195
|
raw: s = !1,
|
|
6193
6196
|
noBorder: c = !1,
|
|
6194
6197
|
variant: d = "primary",
|
|
6195
|
-
noTruncate:
|
|
6196
|
-
radius:
|
|
6197
|
-
...
|
|
6198
|
-
},
|
|
6198
|
+
noTruncate: f = !1,
|
|
6199
|
+
radius: u = "large",
|
|
6200
|
+
...h
|
|
6201
|
+
}, g) => {
|
|
6199
6202
|
const p = xn({
|
|
6200
6203
|
type: Cr,
|
|
6201
6204
|
mode: r,
|
|
@@ -6207,16 +6210,16 @@ const _n = U.forwardRef(
|
|
|
6207
6210
|
size: i,
|
|
6208
6211
|
noBorder: c,
|
|
6209
6212
|
variant: d,
|
|
6210
|
-
noTruncate:
|
|
6211
|
-
radius:
|
|
6213
|
+
noTruncate: f,
|
|
6214
|
+
radius: u
|
|
6212
6215
|
});
|
|
6213
6216
|
return /* @__PURE__ */ l(
|
|
6214
6217
|
Nr,
|
|
6215
6218
|
{
|
|
6216
|
-
ref:
|
|
6219
|
+
ref: g,
|
|
6217
6220
|
className: p,
|
|
6218
6221
|
disabled: t,
|
|
6219
|
-
...
|
|
6222
|
+
...h,
|
|
6220
6223
|
children: e
|
|
6221
6224
|
}
|
|
6222
6225
|
);
|
|
@@ -6224,7 +6227,7 @@ const _n = U.forwardRef(
|
|
|
6224
6227
|
);
|
|
6225
6228
|
_n.displayName = "Button";
|
|
6226
6229
|
function Tc() {
|
|
6227
|
-
const e =
|
|
6230
|
+
const e = S(!1);
|
|
6228
6231
|
return M(() => (e.current = !0, () => {
|
|
6229
6232
|
e.current = !1;
|
|
6230
6233
|
}), []), Z(() => e.current, []);
|
|
@@ -6248,7 +6251,7 @@ const Cc = {
|
|
|
6248
6251
|
right: 0
|
|
6249
6252
|
};
|
|
6250
6253
|
function Ht(e) {
|
|
6251
|
-
const t = Tc(), r =
|
|
6254
|
+
const t = Tc(), r = S(0), a = S(null), [n, o] = W(Cc), i = oe(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
|
|
6252
6255
|
const c = s[0];
|
|
6253
6256
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
6254
6257
|
a.current && t() && o(c.contentRect);
|
|
@@ -6284,19 +6287,19 @@ const Nc = {
|
|
|
6284
6287
|
raw: s = !1,
|
|
6285
6288
|
noBorder: c = !1,
|
|
6286
6289
|
"aria-label": d,
|
|
6287
|
-
label:
|
|
6288
|
-
size:
|
|
6289
|
-
labelRight:
|
|
6290
|
-
labelLeft:
|
|
6290
|
+
label: f,
|
|
6291
|
+
size: u = "medium",
|
|
6292
|
+
labelRight: h,
|
|
6293
|
+
labelLeft: g,
|
|
6291
6294
|
noBackground: p = !1,
|
|
6292
|
-
align:
|
|
6293
|
-
radius:
|
|
6295
|
+
align: y = "center",
|
|
6296
|
+
radius: b = "large",
|
|
6294
6297
|
variant: v = "primary",
|
|
6295
6298
|
iconClassName: x,
|
|
6296
6299
|
animated: k = !1,
|
|
6297
|
-
...
|
|
6298
|
-
},
|
|
6299
|
-
const
|
|
6300
|
+
...A
|
|
6301
|
+
}, E) => {
|
|
6302
|
+
const C = xn({
|
|
6300
6303
|
type: _t,
|
|
6301
6304
|
mode: r,
|
|
6302
6305
|
focusMode: a,
|
|
@@ -6305,54 +6308,54 @@ const Nc = {
|
|
|
6305
6308
|
raw: s,
|
|
6306
6309
|
className: o,
|
|
6307
6310
|
noBorder: c,
|
|
6308
|
-
size:
|
|
6309
|
-
labelRight:
|
|
6310
|
-
labelLeft:
|
|
6311
|
+
size: u,
|
|
6312
|
+
labelRight: h,
|
|
6313
|
+
labelLeft: g,
|
|
6311
6314
|
noBackground: p,
|
|
6312
|
-
align:
|
|
6313
|
-
radius:
|
|
6315
|
+
align: y,
|
|
6316
|
+
radius: b,
|
|
6314
6317
|
variant: v,
|
|
6315
6318
|
animated: k
|
|
6316
|
-
}),
|
|
6319
|
+
}), N = xc({ mode: r, raw: s, iconClassName: x }), _ = _c({ animated: k }), [w, T] = Ht(), [R, B] = Ht(), [$, O] = Ht(), V = S(0), I = S(null), H = Sc([E, I]);
|
|
6317
6320
|
return pe(() => {
|
|
6318
|
-
|
|
6319
|
-
}, [O,
|
|
6320
|
-
|
|
6321
|
+
$ && $.current && k && (V.current = O.width + Rc[u] + (c ? 0 : Ic));
|
|
6322
|
+
}, [O, $, u, c, k]), pe(() => {
|
|
6323
|
+
I && I.current && k && (h && w && T.width > 0 ? (w.current && (w.current.style.opacity = "100"), I.current.style.width = `${T.width + V.current}px`) : g && B.width > 0 ? (R.current && (R.current.style.opacity = "100"), I.current.style.width = `${B.width + V.current}px`) : (w.current && (w.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), I.current.style.width = `${Nc[u]}px`));
|
|
6321
6324
|
}, [
|
|
6322
|
-
|
|
6323
|
-
|
|
6325
|
+
T,
|
|
6326
|
+
h,
|
|
6324
6327
|
w,
|
|
6325
6328
|
B,
|
|
6329
|
+
g,
|
|
6330
|
+
R,
|
|
6326
6331
|
u,
|
|
6327
|
-
C,
|
|
6328
|
-
m,
|
|
6329
6332
|
k
|
|
6330
6333
|
]), /* @__PURE__ */ L(
|
|
6331
6334
|
Nr,
|
|
6332
6335
|
{
|
|
6333
6336
|
ref: H,
|
|
6334
|
-
className:
|
|
6337
|
+
className: C,
|
|
6335
6338
|
disabled: t,
|
|
6336
6339
|
type: i,
|
|
6337
|
-
"aria-label": d ||
|
|
6338
|
-
...
|
|
6340
|
+
"aria-label": d || f,
|
|
6341
|
+
...A,
|
|
6339
6342
|
children: [
|
|
6340
6343
|
/* @__PURE__ */ l(
|
|
6341
6344
|
wa,
|
|
6342
6345
|
{
|
|
6343
|
-
label:
|
|
6344
|
-
labelRef:
|
|
6345
|
-
labelClass:
|
|
6346
|
+
label: g,
|
|
6347
|
+
labelRef: R,
|
|
6348
|
+
labelClass: _,
|
|
6346
6349
|
labelInnerClass: "pr-2"
|
|
6347
6350
|
}
|
|
6348
6351
|
),
|
|
6349
|
-
/* @__PURE__ */ l("span", { ref:
|
|
6352
|
+
/* @__PURE__ */ l("span", { ref: $, className: N, children: e }),
|
|
6350
6353
|
/* @__PURE__ */ l(
|
|
6351
6354
|
wa,
|
|
6352
6355
|
{
|
|
6353
|
-
label:
|
|
6356
|
+
label: h,
|
|
6354
6357
|
labelRef: w,
|
|
6355
|
-
labelClass:
|
|
6358
|
+
labelClass: _,
|
|
6356
6359
|
labelInnerClass: "pl-2"
|
|
6357
6360
|
}
|
|
6358
6361
|
)
|
|
@@ -6388,7 +6391,7 @@ const Ac = U.forwardRef(
|
|
|
6388
6391
|
active: a = !1,
|
|
6389
6392
|
...n
|
|
6390
6393
|
}, o) => {
|
|
6391
|
-
const i = a ?
|
|
6394
|
+
const i = a ? m(
|
|
6392
6395
|
"relative",
|
|
6393
6396
|
"focus-within:static",
|
|
6394
6397
|
"focus-within:after:border-transparent",
|
|
@@ -6408,7 +6411,7 @@ const Ac = U.forwardRef(
|
|
|
6408
6411
|
return /* @__PURE__ */ l("div", { className: i, children: /* @__PURE__ */ l(
|
|
6409
6412
|
En,
|
|
6410
6413
|
{
|
|
6411
|
-
className:
|
|
6414
|
+
className: m("justify-center", r),
|
|
6412
6415
|
ref: o,
|
|
6413
6416
|
mode: t,
|
|
6414
6417
|
radius: "small",
|
|
@@ -6487,7 +6490,7 @@ const Bc = ({ content: e }) => /* @__PURE__ */ l(
|
|
|
6487
6490
|
), xa = Na(
|
|
6488
6491
|
() => import(
|
|
6489
6492
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
6490
|
-
"./ChatBubbleAssistant.
|
|
6493
|
+
"./ChatBubbleAssistant.XRTqE2w4.js"
|
|
6491
6494
|
).then((e) => e.ChatBubbleAssistant)
|
|
6492
6495
|
), _a = U.memo(
|
|
6493
6496
|
({
|
|
@@ -6495,15 +6498,17 @@ const Bc = ({ content: e }) => /* @__PURE__ */ l(
|
|
|
6495
6498
|
content: t,
|
|
6496
6499
|
name: r,
|
|
6497
6500
|
processingTime: a,
|
|
6498
|
-
|
|
6501
|
+
usage: n,
|
|
6502
|
+
loading: o = !1
|
|
6499
6503
|
}) => (e === Fe || e === at) && t ? /* @__PURE__ */ l(Wt, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(
|
|
6500
6504
|
xa,
|
|
6501
6505
|
{
|
|
6502
6506
|
name: r,
|
|
6503
6507
|
processingTime: a,
|
|
6508
|
+
usage: n,
|
|
6504
6509
|
content: t
|
|
6505
6510
|
}
|
|
6506
|
-
) }) : e === Sa && t ? /* @__PURE__ */ l(Bc, { content: t }) :
|
|
6511
|
+
) }) : e === Sa && t ? /* @__PURE__ */ l(Bc, { content: t }) : o ? /* @__PURE__ */ l(Wt, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(xa, { loading: !0 }) }) : null
|
|
6507
6512
|
), Mc = () => {
|
|
6508
6513
|
var r;
|
|
6509
6514
|
const {
|
|
@@ -6511,16 +6516,17 @@ const Bc = ({ content: e }) => /* @__PURE__ */ l(
|
|
|
6511
6516
|
} = G(ie);
|
|
6512
6517
|
return /* @__PURE__ */ l("div", { className: "space-y-6 mt-2 @container", children: /* @__PURE__ */ L("div", { children: [
|
|
6513
6518
|
e && e.length > 0 && e.map((a, n) => {
|
|
6514
|
-
const { role: o, content: i, messageId: s, name: c, processingTime: d } = a,
|
|
6519
|
+
const { role: o, content: i, messageId: s, name: c, processingTime: d, usage: f } = a, u = s ? `${s}-${o}` : `${n}-${o}`;
|
|
6515
6520
|
return /* @__PURE__ */ l(
|
|
6516
6521
|
_a,
|
|
6517
6522
|
{
|
|
6518
6523
|
role: o,
|
|
6519
6524
|
content: i,
|
|
6520
6525
|
name: c,
|
|
6521
|
-
processingTime: d
|
|
6526
|
+
processingTime: d,
|
|
6527
|
+
usage: f
|
|
6522
6528
|
},
|
|
6523
|
-
|
|
6529
|
+
u
|
|
6524
6530
|
);
|
|
6525
6531
|
}),
|
|
6526
6532
|
((r = e == null ? void 0 : e.at(-1)) == null ? void 0 : r.role) === "user" && /* @__PURE__ */ l(_a, { loading: t })
|
|
@@ -6541,7 +6547,7 @@ const Bc = ({ content: e }) => /* @__PURE__ */ l(
|
|
|
6541
6547
|
}, Vc = Na(
|
|
6542
6548
|
() => import(
|
|
6543
6549
|
/* webpackChunkName: "LazyHeader" */
|
|
6544
|
-
"./HeaderEntry.
|
|
6550
|
+
"./HeaderEntry.D5tq2VRC.js"
|
|
6545
6551
|
)
|
|
6546
6552
|
);
|
|
6547
6553
|
function Tn({ isComponent: e = !1 }) {
|
|
@@ -6558,7 +6564,7 @@ function Tn({ isComponent: e = !1 }) {
|
|
|
6558
6564
|
}), [s, c] = Nt(ci, {
|
|
6559
6565
|
prompt: "",
|
|
6560
6566
|
lastTriggeredTimestamp: 0
|
|
6561
|
-
}), [d,
|
|
6567
|
+
}), [d, f] = Nt(Zi, {
|
|
6562
6568
|
id: hr(),
|
|
6563
6569
|
model: "",
|
|
6564
6570
|
provider: "",
|
|
@@ -6579,24 +6585,24 @@ function Tn({ isComponent: e = !1 }) {
|
|
|
6579
6585
|
],
|
|
6580
6586
|
getAccessToken: r
|
|
6581
6587
|
}), Yi({ getAccessToken: r });
|
|
6582
|
-
const { data:
|
|
6588
|
+
const { data: u } = br({
|
|
6583
6589
|
keys: [t == null ? void 0 : t.username],
|
|
6584
6590
|
getAccessToken: r
|
|
6585
6591
|
});
|
|
6586
6592
|
return M(() => {
|
|
6587
|
-
var
|
|
6588
|
-
(
|
|
6593
|
+
var g;
|
|
6594
|
+
(g = document.getElementById("logo")) == null || g.classList.add("fadeOut"), setTimeout(() => {
|
|
6589
6595
|
var p;
|
|
6590
6596
|
(p = document.getElementById("root")) == null || p.classList.replace("app-hidden", "fadeIn");
|
|
6591
6597
|
}, 500);
|
|
6592
6598
|
}), M(() => {
|
|
6593
|
-
|
|
6599
|
+
u && f({
|
|
6594
6600
|
type: Me,
|
|
6595
6601
|
payload: {
|
|
6596
|
-
provider:
|
|
6602
|
+
provider: u.provider || ot
|
|
6597
6603
|
}
|
|
6598
6604
|
});
|
|
6599
|
-
}, [
|
|
6605
|
+
}, [u]), /* @__PURE__ */ l(
|
|
6600
6606
|
es.Provider,
|
|
6601
6607
|
{
|
|
6602
6608
|
value: {
|
|
@@ -6610,7 +6616,7 @@ function Tn({ isComponent: e = !1 }) {
|
|
|
6610
6616
|
children: /* @__PURE__ */ L(
|
|
6611
6617
|
ie.Provider,
|
|
6612
6618
|
{
|
|
6613
|
-
value: { state: d, dispatch:
|
|
6619
|
+
value: { state: d, dispatch: f },
|
|
6614
6620
|
children: [
|
|
6615
6621
|
/* @__PURE__ */ l(
|
|
6616
6622
|
fo,
|