zs_library 0.6.7 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/desktop/modal/base-modal.d.ts +2 -0
- package/dist/index.js +918 -914
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import qo from "i18next";
|
|
|
6
6
|
import { initReactI18next as Zo } from "react-i18next";
|
|
7
7
|
import { jsx as a, jsxs as w, Fragment as Se } from "react/jsx-runtime";
|
|
8
8
|
import * as le from "react";
|
|
9
|
-
import { createContext as zt, useMemo as oe, useContext as Le, useState as E, useRef as ie, useCallback as
|
|
9
|
+
import { createContext as zt, useMemo as oe, useContext as Le, useState as E, useRef as ie, useCallback as pe, useEffect as W, forwardRef as We, useImperativeHandle as et, memo as Te, Fragment as Ko, useLayoutEffect as Jo, cloneElement as Qo } from "react";
|
|
10
10
|
import { css as I, cx as N } from "@emotion/css";
|
|
11
11
|
import en from "react-slick";
|
|
12
12
|
import { ReactSortable as ut } from "react-sortablejs";
|
|
@@ -434,11 +434,11 @@ const fo = zt({
|
|
|
434
434
|
onChange: r,
|
|
435
435
|
storageKey: n = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
|
|
436
436
|
enableCaching: s = !0
|
|
437
|
-
} = t, [i,
|
|
437
|
+
} = t, [i, l] = E(), [m, p] = E(), [c, u] = E(null), f = ie(c), [d, z] = E(null), [v, x] = E([]), [g, k] = E(null), [h, b] = E(null), [y, C] = E(!1), [L, R] = E(null), [X, _] = E(null), [ee, U] = E(null), [V, T] = E(!1), [H, se] = tn(n, {
|
|
438
438
|
defaultValue: [],
|
|
439
439
|
listenStorageChange: !0
|
|
440
440
|
}), ne = () => {
|
|
441
|
-
z(null), clearTimeout(i),
|
|
441
|
+
z(null), clearTimeout(i), l(void 0), f.current = null;
|
|
442
442
|
}, F = (S, P) => {
|
|
443
443
|
let O = S.target;
|
|
444
444
|
for (; O && !O.getAttribute("data-id"); )
|
|
@@ -455,28 +455,28 @@ const fo = zt({
|
|
|
455
455
|
const { config: O = {} } = S;
|
|
456
456
|
return O.allowContextMenu === !1 ? {} : {
|
|
457
457
|
onMouseDown: (B) => {
|
|
458
|
-
|
|
458
|
+
l(
|
|
459
459
|
setTimeout(() => {
|
|
460
|
-
P &&
|
|
460
|
+
P && f.current === null && F(B, S);
|
|
461
461
|
}, 800)
|
|
462
|
-
), C(!1),
|
|
462
|
+
), C(!1), p(
|
|
463
463
|
setTimeout(() => {
|
|
464
464
|
C(!0);
|
|
465
465
|
}, 800)
|
|
466
466
|
);
|
|
467
467
|
},
|
|
468
468
|
onMouseUp: () => {
|
|
469
|
-
clearTimeout(
|
|
469
|
+
clearTimeout(m), p(void 0), clearTimeout(i), l(void 0);
|
|
470
470
|
},
|
|
471
471
|
onContextMenu: (B) => {
|
|
472
472
|
P && (B.preventDefault(), F(B, S));
|
|
473
473
|
}
|
|
474
474
|
};
|
|
475
|
-
}, ce =
|
|
475
|
+
}, ce = pe(
|
|
476
476
|
(S, P) => {
|
|
477
477
|
const O = [...P || []];
|
|
478
478
|
if (O.length > 0)
|
|
479
|
-
|
|
479
|
+
x((B) => {
|
|
480
480
|
const K = [...B], Q = (G) => {
|
|
481
481
|
var D, q;
|
|
482
482
|
const te = O.shift(), de = G.find((j) => j.id === te), ze = G.findIndex((j) => j.id === te);
|
|
@@ -500,12 +500,12 @@ const fo = zt({
|
|
|
500
500
|
});
|
|
501
501
|
else {
|
|
502
502
|
const B = Re.uniqueArray(S);
|
|
503
|
-
r == null || r(B),
|
|
503
|
+
r == null || r(B), x(B);
|
|
504
504
|
}
|
|
505
505
|
},
|
|
506
506
|
[r]
|
|
507
507
|
), ae = (S, P) => {
|
|
508
|
-
|
|
508
|
+
x((O) => {
|
|
509
509
|
const B = [...O], K = (Q) => {
|
|
510
510
|
var G;
|
|
511
511
|
for (let te = 0; te < Q.length; te++)
|
|
@@ -517,7 +517,7 @@ const fo = zt({
|
|
|
517
517
|
return K(B), r == null || r(B), B;
|
|
518
518
|
});
|
|
519
519
|
}, ue = (S, P) => {
|
|
520
|
-
|
|
520
|
+
x((O) => {
|
|
521
521
|
const B = [...O], K = (Q) => {
|
|
522
522
|
var G;
|
|
523
523
|
for (let te = 0; te < Q.length; te++)
|
|
@@ -528,8 +528,8 @@ const fo = zt({
|
|
|
528
528
|
};
|
|
529
529
|
return K(B), r == null || r(B), B;
|
|
530
530
|
});
|
|
531
|
-
},
|
|
532
|
-
|
|
531
|
+
}, me = (S) => {
|
|
532
|
+
x((P) => {
|
|
533
533
|
const O = [...P], B = (K) => {
|
|
534
534
|
var Q;
|
|
535
535
|
for (let G = 0; G < K.length; G++)
|
|
@@ -540,7 +540,7 @@ const fo = zt({
|
|
|
540
540
|
};
|
|
541
541
|
return B(O), r == null || r(O), O;
|
|
542
542
|
});
|
|
543
|
-
},
|
|
543
|
+
}, ge = (S, P) => {
|
|
544
544
|
const O = [...v], B = (K, Q) => {
|
|
545
545
|
const G = Q.shift(), te = K.find((ze) => ze.id === G), de = K.findIndex((ze) => ze.id === G);
|
|
546
546
|
return te && (Q.length ? te.children = B(te.children || [], Q) : te.children = [
|
|
@@ -552,9 +552,9 @@ const fo = zt({
|
|
|
552
552
|
}
|
|
553
553
|
], K.splice(de, 1, te)), K;
|
|
554
554
|
};
|
|
555
|
-
|
|
556
|
-
},
|
|
557
|
-
|
|
555
|
+
x(B(O, P));
|
|
556
|
+
}, fe = (S) => {
|
|
557
|
+
x((P) => {
|
|
558
558
|
const O = {
|
|
559
559
|
...S,
|
|
560
560
|
id: ht()
|
|
@@ -562,12 +562,12 @@ const fo = zt({
|
|
|
562
562
|
return r == null || r(B), B;
|
|
563
563
|
});
|
|
564
564
|
}, $ = (S, P) => {
|
|
565
|
-
|
|
565
|
+
x((O) => {
|
|
566
566
|
const B = [...O], K = B.findIndex((Q) => Q.id === S);
|
|
567
567
|
return K !== -1 && (B[K] = { ...B[K], ...P }, r == null || r(B)), B;
|
|
568
568
|
});
|
|
569
569
|
}, M = (S) => {
|
|
570
|
-
|
|
570
|
+
x((P) => {
|
|
571
571
|
const O = P.filter((B) => B.id !== S);
|
|
572
572
|
return r == null || r(O), O;
|
|
573
573
|
});
|
|
@@ -575,8 +575,8 @@ const fo = zt({
|
|
|
575
575
|
return W(() => {
|
|
576
576
|
(o == null ? void 0 : o.length) > 0 && v.length === 0 && ce(o);
|
|
577
577
|
}, [o]), W(() => {
|
|
578
|
-
|
|
579
|
-
}, [
|
|
578
|
+
f.current = c, c !== null && ne();
|
|
579
|
+
}, [c]), W(() => {
|
|
580
580
|
s && H != null && H.length && !V && (ce(H), T(!0));
|
|
581
581
|
}, [H, V, s, ce]), on(
|
|
582
582
|
() => {
|
|
@@ -592,22 +592,22 @@ const fo = zt({
|
|
|
592
592
|
value: {
|
|
593
593
|
list: v,
|
|
594
594
|
setList: ce,
|
|
595
|
-
contextMenu:
|
|
595
|
+
contextMenu: d,
|
|
596
596
|
setContextMenu: z,
|
|
597
|
-
listStatus:
|
|
598
|
-
setListStatus:
|
|
597
|
+
listStatus: c,
|
|
598
|
+
setListStatus: u,
|
|
599
599
|
contextMenuFuns: re,
|
|
600
600
|
hideContextMenu: ne,
|
|
601
|
-
showInfoItemData:
|
|
601
|
+
showInfoItemData: g,
|
|
602
602
|
setShowInfoItemData: k,
|
|
603
|
-
openGroupItemData:
|
|
604
|
-
setOpenGroupItemData:
|
|
605
|
-
longPressTriggered:
|
|
603
|
+
openGroupItemData: h,
|
|
604
|
+
setOpenGroupItemData: b,
|
|
605
|
+
longPressTriggered: y,
|
|
606
606
|
updateItemConfig: ae,
|
|
607
607
|
updateItem: ue,
|
|
608
|
-
removeItem:
|
|
609
|
-
addItem:
|
|
610
|
-
addRootItem:
|
|
608
|
+
removeItem: me,
|
|
609
|
+
addItem: ge,
|
|
610
|
+
addRootItem: fe,
|
|
611
611
|
updateRootItem: $,
|
|
612
612
|
removeRootItem: M,
|
|
613
613
|
moveItemId: L,
|
|
@@ -629,22 +629,22 @@ const fo = zt({
|
|
|
629
629
|
triggerDelay: n = 800,
|
|
630
630
|
triggerZoneWidth: s = 80,
|
|
631
631
|
containerRef: i,
|
|
632
|
-
onCreateNewPage:
|
|
633
|
-
},
|
|
634
|
-
const
|
|
635
|
-
|
|
636
|
-
}, []), v =
|
|
637
|
-
(
|
|
632
|
+
onCreateNewPage: l
|
|
633
|
+
}, m) => {
|
|
634
|
+
const p = ie(null), [c, u] = E(null), f = ie(0), d = ie(!1), z = pe(() => {
|
|
635
|
+
p.current && (clearTimeout(p.current), p.current = null), d.current = !1;
|
|
636
|
+
}, []), v = pe(
|
|
637
|
+
(h) => {
|
|
638
638
|
if (!r) return;
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
const
|
|
642
|
-
if (!
|
|
643
|
-
|
|
639
|
+
const b = Date.now();
|
|
640
|
+
d.current || b - f.current < n + 200 || c !== h && (u(h), z(), p.current = setTimeout(() => {
|
|
641
|
+
const y = t.current;
|
|
642
|
+
if (!y) {
|
|
643
|
+
u(null);
|
|
644
644
|
return;
|
|
645
645
|
}
|
|
646
|
-
|
|
647
|
-
|
|
646
|
+
d.current = !0, f.current = Date.now(), h === "left" && e > 0 ? y.slickGoTo(e - 1) : h === "right" && (e < o - 1 ? y.slickGoTo(e + 1) : l == null || l()), u(null), setTimeout(() => {
|
|
647
|
+
d.current = !1;
|
|
648
648
|
}, 300);
|
|
649
649
|
}, n));
|
|
650
650
|
},
|
|
@@ -654,18 +654,18 @@ const fo = zt({
|
|
|
654
654
|
o,
|
|
655
655
|
z,
|
|
656
656
|
t,
|
|
657
|
-
|
|
657
|
+
c,
|
|
658
658
|
n,
|
|
659
|
-
|
|
659
|
+
l
|
|
660
660
|
]
|
|
661
|
-
),
|
|
662
|
-
|
|
663
|
-
}, [z]),
|
|
664
|
-
(
|
|
661
|
+
), x = pe(() => {
|
|
662
|
+
u(null), z();
|
|
663
|
+
}, [z]), g = pe(
|
|
664
|
+
(h) => {
|
|
665
665
|
if (!r || !i.current)
|
|
666
666
|
return;
|
|
667
|
-
const
|
|
668
|
-
|
|
667
|
+
const b = i.current.getBoundingClientRect(), y = h.clientX - b.left, C = b.width - s;
|
|
668
|
+
y < s && e > 0 ? v("left") : y > C ? v("right") : c && x();
|
|
669
669
|
},
|
|
670
670
|
[
|
|
671
671
|
r,
|
|
@@ -674,20 +674,20 @@ const fo = zt({
|
|
|
674
674
|
e,
|
|
675
675
|
o,
|
|
676
676
|
v,
|
|
677
|
-
|
|
678
|
-
|
|
677
|
+
c,
|
|
678
|
+
x
|
|
679
679
|
]
|
|
680
680
|
);
|
|
681
681
|
et(
|
|
682
|
-
|
|
682
|
+
m,
|
|
683
683
|
() => ({
|
|
684
|
-
handleDragMove:
|
|
684
|
+
handleDragMove: g
|
|
685
685
|
}),
|
|
686
|
-
[
|
|
686
|
+
[g]
|
|
687
687
|
), W(() => () => {
|
|
688
688
|
z();
|
|
689
689
|
}, [z]), W(() => {
|
|
690
|
-
r || (z(),
|
|
690
|
+
r || (z(), u(null), d.current = !1, f.current = 0);
|
|
691
691
|
}, [r, z]);
|
|
692
692
|
const k = I`
|
|
693
693
|
position: absolute;
|
|
@@ -756,24 +756,24 @@ const fo = zt({
|
|
|
756
756
|
e > 0 && /* @__PURE__ */ a(
|
|
757
757
|
"div",
|
|
758
758
|
{
|
|
759
|
-
className: N(k, "left",
|
|
759
|
+
className: N(k, "left", c === "left" && "active"),
|
|
760
760
|
onMouseEnter: () => {
|
|
761
761
|
r && v("left");
|
|
762
762
|
},
|
|
763
763
|
onMouseLeave: () => {
|
|
764
|
-
|
|
764
|
+
x();
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
),
|
|
768
768
|
/* @__PURE__ */ a(
|
|
769
769
|
"div",
|
|
770
770
|
{
|
|
771
|
-
className: N(k, "right",
|
|
771
|
+
className: N(k, "right", c === "right" && "active"),
|
|
772
772
|
onMouseEnter: () => {
|
|
773
773
|
r && v("right");
|
|
774
774
|
},
|
|
775
775
|
onMouseLeave: () => {
|
|
776
|
-
|
|
776
|
+
x();
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
)
|
|
@@ -979,45 +979,45 @@ function Ga(t, e, o) {
|
|
|
979
979
|
return { col: n.col, row: n.row };
|
|
980
980
|
}
|
|
981
981
|
const Ya = Te(({ src: t }) => {
|
|
982
|
-
const [e, o] = E(!0), [r, n] = E(!1), s =
|
|
982
|
+
const [e, o] = E(!0), [r, n] = E(!1), s = pe(() => {
|
|
983
983
|
o(!1);
|
|
984
|
-
}, []), i =
|
|
984
|
+
}, []), i = pe(() => {
|
|
985
985
|
o(!1), n(!0);
|
|
986
|
-
}, []),
|
|
986
|
+
}, []), l = oe(() => `zs-w-full zs-h-full zs-object-cover zs-transition-opacity zs-duration-300 ${e ? "zs-opacity-0" : "zs-opacity-100"}`, [e]);
|
|
987
987
|
return /* @__PURE__ */ w("div", { className: "zs-relative zs-w-full zs-h-full", children: [
|
|
988
988
|
e && /* @__PURE__ */ a("div", { className: "zs-absolute zs-inset-0 zs-flex zs-items-center zs-justify-center zs-bg-gray-100", children: /* @__PURE__ */ a("div", { className: "zs-animate-spin zs-rounded-full zs-h-4 zs-w-4 zs-border-b-2 zs-border-gray-600" }) }),
|
|
989
|
-
r ? /* @__PURE__ */ a("div", { className: "zs-w-full zs-h-full zs-flex zs-items-center zs-justify-center zs-bg-gray-100 zs-text-gray-400", children: /* @__PURE__ */ a("span", { className: "zs-text-xs", children: "加载失败" }) }) : /* @__PURE__ */ a("img", { src: t, alt: "", className:
|
|
989
|
+
r ? /* @__PURE__ */ a("div", { className: "zs-w-full zs-h-full zs-flex zs-items-center zs-justify-center zs-bg-gray-100 zs-text-gray-400", children: /* @__PURE__ */ a("span", { className: "zs-text-xs", children: "加载失败" }) }) : /* @__PURE__ */ a("img", { src: t, alt: "", className: l, onLoad: s, onError: i })
|
|
990
990
|
] });
|
|
991
991
|
}), qe = (t, e, o) => {
|
|
992
992
|
const { data: r = {} } = t, { icon: n } = r;
|
|
993
993
|
return e || (n ? typeof n == "string" && (n.startsWith("http") || n.startsWith("https")) ? /* @__PURE__ */ a(Ya, { src: n }) : n : o ? typeof o == "function" ? o(t) : o : null);
|
|
994
994
|
}, ko = (t) => {
|
|
995
|
-
var
|
|
996
|
-
const { data: e, noLetters: o = !1, name: r, defaultName: n, className: s } = t, { moveItemId: i } = De(), { theme:
|
|
995
|
+
var u, f;
|
|
996
|
+
const { data: e, noLetters: o = !1, name: r, defaultName: n, className: s } = t, { moveItemId: i } = De(), { theme: l } = be(), m = {
|
|
997
997
|
visible: { opacity: 1, scale: 1 },
|
|
998
998
|
hidden: { opacity: 0, scale: 0.95 }
|
|
999
|
-
},
|
|
999
|
+
}, p = oe(() => i === e.id.toString(), [e.id, i]), c = r || ((u = e.data) == null ? void 0 : u.name) || n || "";
|
|
1000
1000
|
return /* @__PURE__ */ a(
|
|
1001
1001
|
Y.p,
|
|
1002
1002
|
{
|
|
1003
1003
|
className: N(
|
|
1004
1004
|
"zs-whitespace-nowrap zs-text-ellipsis zs-overflow-hidden zs-text-center zs-mt-1 zs-mb-0 zs-absolute zs-left-0 zs-right-0 zs-text-sm",
|
|
1005
1005
|
I`
|
|
1006
|
-
color: ${(
|
|
1006
|
+
color: ${(f = l.token.items) == null ? void 0 : f.textColor};
|
|
1007
1007
|
`,
|
|
1008
1008
|
o && I`
|
|
1009
1009
|
color: transparent;
|
|
1010
1010
|
`,
|
|
1011
1011
|
s
|
|
1012
1012
|
),
|
|
1013
|
-
variants:
|
|
1014
|
-
animate:
|
|
1015
|
-
children:
|
|
1013
|
+
variants: m,
|
|
1014
|
+
animate: p ? "hidden" : "visible",
|
|
1015
|
+
children: c
|
|
1016
1016
|
}
|
|
1017
1017
|
);
|
|
1018
1018
|
}, Va = (t) => {
|
|
1019
|
-
var z, v,
|
|
1020
|
-
const { data: e, noLetters: o = !1, icon: r, from: n, iconSize: s = 64, contextMenuProps: i } = t, { contextMenuFuns:
|
|
1019
|
+
var z, v, x;
|
|
1020
|
+
const { data: e, noLetters: o = !1, icon: r, from: n, iconSize: s = 64, contextMenuProps: i } = t, { contextMenuFuns: l } = De(), { itemIconBuilder: m, theme: p, contextMenu: c } = be(), u = i != !1 ? i || c : i, { data: f = {} } = e, { name: d } = f;
|
|
1021
1021
|
return /* @__PURE__ */ w(Se, { children: [
|
|
1022
1022
|
/* @__PURE__ */ a(
|
|
1023
1023
|
Y.div,
|
|
@@ -1025,9 +1025,9 @@ const Ya = Te(({ src: t }) => {
|
|
|
1025
1025
|
className: N(
|
|
1026
1026
|
"zs-cursor-pointer zs-relative zs-overflow-hidden",
|
|
1027
1027
|
I`
|
|
1028
|
-
background-color: ${(z =
|
|
1028
|
+
background-color: ${(z = p.token.items) == null ? void 0 : z.iconBackgroundColor};
|
|
1029
1029
|
border-radius: 0.75rem;
|
|
1030
|
-
box-shadow: 0 0 0.5rem ${(v =
|
|
1030
|
+
box-shadow: 0 0 0.5rem ${(v = p.token.items) == null ? void 0 : v.iconShadowColor};
|
|
1031
1031
|
width: ${s}px;
|
|
1032
1032
|
height: ${s}px;
|
|
1033
1033
|
`
|
|
@@ -1039,29 +1039,29 @@ const Ya = Te(({ src: t }) => {
|
|
|
1039
1039
|
className: N(
|
|
1040
1040
|
"zs-absolute zs-left-0 zs-top-0 zs-w-full zs-h-full",
|
|
1041
1041
|
I`
|
|
1042
|
-
color: ${(
|
|
1042
|
+
color: ${(x = p.token.items) == null ? void 0 : x.textColor};
|
|
1043
1043
|
`
|
|
1044
1044
|
),
|
|
1045
|
-
...
|
|
1045
|
+
...l(
|
|
1046
1046
|
{ ...e, ...n === "dock" ? { config: { allowResize: !1 } } : {} },
|
|
1047
|
-
|
|
1047
|
+
u !== !1
|
|
1048
1048
|
),
|
|
1049
|
-
children: qe(e, r,
|
|
1049
|
+
children: qe(e, r, m)
|
|
1050
1050
|
}
|
|
1051
1051
|
)
|
|
1052
1052
|
}
|
|
1053
1053
|
),
|
|
1054
|
-
/* @__PURE__ */ a(ko, { data: e, noLetters: o, name:
|
|
1054
|
+
/* @__PURE__ */ a(ko, { data: e, noLetters: o, name: d })
|
|
1055
1055
|
] });
|
|
1056
1056
|
}, Pe = (t) => {
|
|
1057
|
-
const { data: e, className: o, itemIndex: r, onClick: n, disabledDrag: s = !1, children: i, parentIds:
|
|
1057
|
+
const { data: e, className: o, itemIndex: r, onClick: n, disabledDrag: s = !1, children: i, parentIds: l, childrenLength: m } = t;
|
|
1058
1058
|
return /* @__PURE__ */ a(
|
|
1059
1059
|
Y.div,
|
|
1060
1060
|
{
|
|
1061
1061
|
"data-id": e.id,
|
|
1062
1062
|
"data-index": r,
|
|
1063
|
-
"data-parent-ids":
|
|
1064
|
-
"data-children-length":
|
|
1063
|
+
"data-parent-ids": l == null ? void 0 : l.join(","),
|
|
1064
|
+
"data-children-length": m,
|
|
1065
1065
|
onClick: () => n == null ? void 0 : n(e),
|
|
1066
1066
|
className: N(s && "drag-disabled", "zs-relative", o),
|
|
1067
1067
|
initial: { opacity: 0 },
|
|
@@ -1073,19 +1073,19 @@ const Ya = Te(({ src: t }) => {
|
|
|
1073
1073
|
);
|
|
1074
1074
|
}, Co = (t) => {
|
|
1075
1075
|
var U, V, T, H, se;
|
|
1076
|
-
const { data: e, className: o, parentIds: r, itemIndex: n, onClick: s, noLetters: i = !1, disabledDrag:
|
|
1077
|
-
contextMenuFuns:
|
|
1078
|
-
setList:
|
|
1079
|
-
setOpenGroupItemData:
|
|
1080
|
-
longPressTriggered:
|
|
1081
|
-
moveTargetId:
|
|
1076
|
+
const { data: e, className: o, parentIds: r, itemIndex: n, onClick: s, noLetters: i = !1, disabledDrag: l = !1, icon: m } = t, {
|
|
1077
|
+
contextMenuFuns: p,
|
|
1078
|
+
setList: c,
|
|
1079
|
+
setOpenGroupItemData: u,
|
|
1080
|
+
longPressTriggered: f,
|
|
1081
|
+
moveTargetId: d,
|
|
1082
1082
|
setMoveTargetId: z,
|
|
1083
1083
|
listStatus: v
|
|
1084
|
-
} = De(), { itemIconBuilder:
|
|
1084
|
+
} = De(), { itemIconBuilder: x, theme: g, contextMenu: k, typeConfigMap: h } = be(), { children: b } = e, { row: y, col: C } = Ga(e.type, (U = e.config) == null ? void 0 : U.sizeId, h), L = ((b == null ? void 0 : b.length) ?? 0) === 0, R = L ? [e] : [...b ?? []].slice(0, 9), X = oe(() => d === e.id, [e.id, d]), _ = I`
|
|
1085
1085
|
overflow: hidden;
|
|
1086
1086
|
cursor: pointer;
|
|
1087
|
-
background-color: ${(V =
|
|
1088
|
-
box-shadow: 0 0 0.5rem ${(T =
|
|
1087
|
+
background-color: ${(V = g.token.items) == null ? void 0 : V.iconBackgroundColor};
|
|
1088
|
+
box-shadow: 0 0 0.5rem ${(T = g.token.items) == null ? void 0 : T.iconShadowColor};
|
|
1089
1089
|
`, ee = () => {
|
|
1090
1090
|
var ne;
|
|
1091
1091
|
if (L)
|
|
@@ -1095,17 +1095,17 @@ const Ya = Te(({ src: t }) => {
|
|
|
1095
1095
|
className: N(
|
|
1096
1096
|
"sortable-group-item zs-cursor-pointer zs-w-full zs-h-full zs-absolute zs-left-0 zs-top-0 zs-bottom-0 zs-right-0 zs-overflow-hidden",
|
|
1097
1097
|
I`
|
|
1098
|
-
background-color: ${(ne =
|
|
1098
|
+
background-color: ${(ne = g.token.items) == null ? void 0 : ne.iconBackgroundColor};
|
|
1099
1099
|
border-radius: 0.75rem;
|
|
1100
1100
|
`
|
|
1101
1101
|
),
|
|
1102
1102
|
onClick: (F) => {
|
|
1103
1103
|
F.stopPropagation(), s == null || s(e);
|
|
1104
1104
|
},
|
|
1105
|
-
children: qe(e,
|
|
1105
|
+
children: qe(e, m, x)
|
|
1106
1106
|
}
|
|
1107
1107
|
);
|
|
1108
|
-
if (
|
|
1108
|
+
if (y === 1 && C === 1 || y === 2 && C === 2)
|
|
1109
1109
|
return /* @__PURE__ */ a(
|
|
1110
1110
|
Y.div,
|
|
1111
1111
|
{
|
|
@@ -1129,13 +1129,13 @@ const Ya = Te(({ src: t }) => {
|
|
|
1129
1129
|
onClick: (re) => {
|
|
1130
1130
|
re.stopPropagation(), s == null || s(F);
|
|
1131
1131
|
},
|
|
1132
|
-
children: qe(F, void 0,
|
|
1132
|
+
children: qe(F, void 0, x)
|
|
1133
1133
|
},
|
|
1134
1134
|
F.id
|
|
1135
1135
|
))
|
|
1136
1136
|
}
|
|
1137
1137
|
);
|
|
1138
|
-
if (
|
|
1138
|
+
if (y === 1 && C === 2)
|
|
1139
1139
|
return /* @__PURE__ */ a(Y.div, { className: "zs-grid zs-grid-cols-10 zs-grid-rows-4 zs-gap-x-2 zs-gap-y-1 zs-place-items-center zs-w-36 h-[52px]", children: R == null ? void 0 : R.slice(0, 4).map((F, re) => /* @__PURE__ */ a(
|
|
1140
1140
|
Y.div,
|
|
1141
1141
|
{
|
|
@@ -1158,11 +1158,11 @@ const Ya = Te(({ src: t }) => {
|
|
|
1158
1158
|
onClick: (ce) => {
|
|
1159
1159
|
re > 2 || (ce.stopPropagation(), s == null || s(F));
|
|
1160
1160
|
},
|
|
1161
|
-
children: qe(F, void 0,
|
|
1161
|
+
children: qe(F, void 0, x)
|
|
1162
1162
|
},
|
|
1163
1163
|
F.id
|
|
1164
1164
|
)) });
|
|
1165
|
-
if (
|
|
1165
|
+
if (y === 2 && C === 1)
|
|
1166
1166
|
return /* @__PURE__ */ a(Y.div, { className: "zs-grid zs-grid-cols-4 zs-grid-rows-10 zs-gap-x-1 zs-gap-y-2 w-[52px] zs-h-36 zs-place-items-center", children: R == null ? void 0 : R.slice(0, 4).map((F, re) => /* @__PURE__ */ a(
|
|
1167
1167
|
Y.div,
|
|
1168
1168
|
{
|
|
@@ -1185,7 +1185,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
1185
1185
|
onClick: (ce) => {
|
|
1186
1186
|
re > 2 || (ce.stopPropagation(), s == null || s(F));
|
|
1187
1187
|
},
|
|
1188
|
-
children: qe(F, void 0,
|
|
1188
|
+
children: qe(F, void 0, x)
|
|
1189
1189
|
},
|
|
1190
1190
|
F.id
|
|
1191
1191
|
)) });
|
|
@@ -1196,10 +1196,10 @@ const Ya = Te(({ src: t }) => {
|
|
|
1196
1196
|
data: e,
|
|
1197
1197
|
itemIndex: n,
|
|
1198
1198
|
parentIds: r,
|
|
1199
|
-
childrenLength:
|
|
1199
|
+
childrenLength: b == null ? void 0 : b.length,
|
|
1200
1200
|
className: N(
|
|
1201
1201
|
I`
|
|
1202
|
-
grid-row: span ${
|
|
1202
|
+
grid-row: span ${y};
|
|
1203
1203
|
grid-column: span ${C};
|
|
1204
1204
|
`,
|
|
1205
1205
|
o
|
|
@@ -1214,18 +1214,18 @@ const Ya = Te(({ src: t }) => {
|
|
|
1214
1214
|
"zs-cursor-pointer zs-relative my-0 zs-mx-auto",
|
|
1215
1215
|
I`
|
|
1216
1216
|
border-radius: 0.75rem;
|
|
1217
|
-
background-color: ${(H =
|
|
1218
|
-
box-shadow: 0 0 0.5rem ${(se =
|
|
1217
|
+
background-color: ${(H = g.token.items) == null ? void 0 : H.groupIconBackgroundColor};
|
|
1218
|
+
box-shadow: 0 0 0.5rem ${(se = g.token.items) == null ? void 0 : se.groupIconShadowColor};
|
|
1219
1219
|
/* overflow: hidden; */
|
|
1220
1220
|
transition: all 0.3s;
|
|
1221
1221
|
width: ${C * 64 + 44 * (C - 1)}px;
|
|
1222
|
-
height: ${
|
|
1222
|
+
height: ${y * 64 + 44 * (y - 1)}px;
|
|
1223
1223
|
`
|
|
1224
1224
|
),
|
|
1225
1225
|
onClick: (ne) => {
|
|
1226
|
-
!L && !
|
|
1226
|
+
!L && !f && (e.parentIds = r, e.pageX = ne.pageX, e.pageY = ne.pageY, u(e));
|
|
1227
1227
|
},
|
|
1228
|
-
...
|
|
1228
|
+
...p(e, k !== !1),
|
|
1229
1229
|
children: /* @__PURE__ */ w(
|
|
1230
1230
|
Y.div,
|
|
1231
1231
|
{
|
|
@@ -1257,13 +1257,13 @@ const Ya = Te(({ src: t }) => {
|
|
|
1257
1257
|
group: { name: "nested", pull: !1, put: !0 },
|
|
1258
1258
|
animation: 150,
|
|
1259
1259
|
fallbackOnBody: !0,
|
|
1260
|
-
list:
|
|
1261
|
-
setList: (ne) => !
|
|
1260
|
+
list: b ?? [],
|
|
1261
|
+
setList: (ne) => !l && c(ne, r),
|
|
1262
1262
|
filter: () => !0,
|
|
1263
|
-
disabled:
|
|
1263
|
+
disabled: l,
|
|
1264
1264
|
"data-id": e.id,
|
|
1265
1265
|
onChange: () => {
|
|
1266
|
-
!
|
|
1266
|
+
!l && z(e.id);
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
1269
|
)
|
|
@@ -1277,11 +1277,11 @@ const Ya = Te(({ src: t }) => {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
);
|
|
1279
1279
|
}, zo = ja, Wa = ({ value: t, onChange: e, onBlur: o, placeholder: r = "标题" }) => {
|
|
1280
|
-
var
|
|
1281
|
-
const [n, s] = E(t), { theme: i } = be(),
|
|
1280
|
+
var p, c, u, f, d, z, v, x, g, k, h, b, y, C, L, R, X, _, ee, U, V;
|
|
1281
|
+
const [n, s] = E(t), { theme: i } = be(), l = (T) => {
|
|
1282
1282
|
const H = T.target.value;
|
|
1283
1283
|
s(H), e(H);
|
|
1284
|
-
},
|
|
1284
|
+
}, m = () => {
|
|
1285
1285
|
o == null || o();
|
|
1286
1286
|
};
|
|
1287
1287
|
return /* @__PURE__ */ a(
|
|
@@ -1291,23 +1291,23 @@ const Ya = Te(({ src: t }) => {
|
|
|
1291
1291
|
"zs-bg-transparent zs-text-center zs-text-xl zs-w-full zs-rounded-lg py-2 px-4",
|
|
1292
1292
|
I`
|
|
1293
1293
|
border-style: none;
|
|
1294
|
-
color: ${(
|
|
1294
|
+
color: ${(u = (c = (p = i.token.items) == null ? void 0 : p.groupModal) == null ? void 0 : c.title) == null ? void 0 : u.textColor};
|
|
1295
1295
|
font-weight: 600;
|
|
1296
1296
|
letter-spacing: -0.5px;
|
|
1297
1297
|
transition: all 0.2s ease-out;
|
|
1298
|
-
background: ${(z = (
|
|
1298
|
+
background: ${(z = (d = (f = i.token.items) == null ? void 0 : f.groupModal) == null ? void 0 : d.title) == null ? void 0 : z.backgroundColor};
|
|
1299
1299
|
|
|
1300
1300
|
&:focus {
|
|
1301
1301
|
outline: none;
|
|
1302
|
-
background: ${(
|
|
1302
|
+
background: ${(g = (x = (v = i.token.items) == null ? void 0 : v.groupModal) == null ? void 0 : x.title) == null ? void 0 : g.focusBackgroundColor};
|
|
1303
1303
|
backdrop-filter: blur(8px);
|
|
1304
1304
|
-webkit-backdrop-filter: blur(8px);
|
|
1305
|
-
box-shadow: 0 0 0 2px ${(
|
|
1305
|
+
box-shadow: 0 0 0 2px ${(b = (h = (k = i.token.items) == null ? void 0 : k.groupModal) == null ? void 0 : h.title) == null ? void 0 : b.shadowColor};
|
|
1306
1306
|
transform: scale(1.02);
|
|
1307
1307
|
}
|
|
1308
1308
|
|
|
1309
1309
|
&:hover {
|
|
1310
|
-
background: ${(L = (C = (
|
|
1310
|
+
background: ${(L = (C = (y = i.token.items) == null ? void 0 : y.groupModal) == null ? void 0 : C.title) == null ? void 0 : L.hoverBackgroundColor};
|
|
1311
1311
|
}
|
|
1312
1312
|
|
|
1313
1313
|
&::placeholder {
|
|
@@ -1320,13 +1320,13 @@ const Ya = Te(({ src: t }) => {
|
|
|
1320
1320
|
`
|
|
1321
1321
|
),
|
|
1322
1322
|
value: n,
|
|
1323
|
-
onChange:
|
|
1324
|
-
onBlur:
|
|
1323
|
+
onChange: l,
|
|
1324
|
+
onBlur: m,
|
|
1325
1325
|
placeholder: r
|
|
1326
1326
|
}
|
|
1327
1327
|
);
|
|
1328
1328
|
}, ft = (t) => {
|
|
1329
|
-
var
|
|
1329
|
+
var h, b, y, C, L, R, X, _, ee, U, V, T, H, se, ne, F, re, ce, ae, ue, me, ge;
|
|
1330
1330
|
const {
|
|
1331
1331
|
visible: e,
|
|
1332
1332
|
onClose: o,
|
|
@@ -1334,34 +1334,36 @@ const Ya = Te(({ src: t }) => {
|
|
|
1334
1334
|
children: n,
|
|
1335
1335
|
width: s = 600,
|
|
1336
1336
|
mousePosition: i,
|
|
1337
|
-
destroyOnClose:
|
|
1338
|
-
closable:
|
|
1339
|
-
footer:
|
|
1340
|
-
|
|
1337
|
+
destroyOnClose: l = !0,
|
|
1338
|
+
closable: m = !1,
|
|
1339
|
+
footer: p = null,
|
|
1340
|
+
className: c,
|
|
1341
|
+
contentClassName: u
|
|
1342
|
+
} = t, { theme: f } = be(), d = f.token.modal, [z, v] = E(!1), [x, g] = E(!1);
|
|
1341
1343
|
return W(() => {
|
|
1342
|
-
|
|
1344
|
+
v(!!e);
|
|
1343
1345
|
}, [e]), /* @__PURE__ */ a(ke, { children: e && /* @__PURE__ */ a(
|
|
1344
1346
|
rn,
|
|
1345
1347
|
{
|
|
1346
|
-
visible:
|
|
1348
|
+
visible: z,
|
|
1347
1349
|
onClose: () => {
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
+
g(!0), v(!1), setTimeout(() => {
|
|
1351
|
+
g(!1), o();
|
|
1350
1352
|
}, 300);
|
|
1351
1353
|
},
|
|
1352
1354
|
animation: "zoom",
|
|
1353
1355
|
maskAnimation: "fade",
|
|
1354
1356
|
mousePosition: i,
|
|
1355
1357
|
title: r,
|
|
1356
|
-
footer:
|
|
1357
|
-
closable:
|
|
1358
|
+
footer: p,
|
|
1359
|
+
closable: m,
|
|
1358
1360
|
className: N(
|
|
1359
1361
|
"base-modal",
|
|
1360
|
-
{ "modal-closing":
|
|
1362
|
+
{ "modal-closing": x },
|
|
1361
1363
|
I`
|
|
1362
1364
|
.rc-dialog-mask {
|
|
1363
|
-
background: ${(
|
|
1364
|
-
backdrop-filter: ${(
|
|
1365
|
+
background: ${(h = d == null ? void 0 : d.mask) == null ? void 0 : h.backgroundColor};
|
|
1366
|
+
backdrop-filter: ${(b = d == null ? void 0 : d.mask) == null ? void 0 : b.backdropFilter};
|
|
1365
1367
|
animation: maskFadeIn 0.2s ease-out;
|
|
1366
1368
|
}
|
|
1367
1369
|
|
|
@@ -1372,7 +1374,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
1372
1374
|
}
|
|
1373
1375
|
to {
|
|
1374
1376
|
opacity: 1;
|
|
1375
|
-
backdrop-filter: ${(
|
|
1377
|
+
backdrop-filter: ${(y = d == null ? void 0 : d.mask) == null ? void 0 : y.backdropFilter};
|
|
1376
1378
|
}
|
|
1377
1379
|
}
|
|
1378
1380
|
|
|
@@ -1384,13 +1386,13 @@ const Ya = Te(({ src: t }) => {
|
|
|
1384
1386
|
}
|
|
1385
1387
|
|
|
1386
1388
|
.rc-dialog-content {
|
|
1387
|
-
background: ${(
|
|
1388
|
-
backdrop-filter: ${(
|
|
1389
|
-
box-shadow: 0 20px 40px ${(
|
|
1390
|
-
0 0 0 0.75px ${(
|
|
1391
|
-
border: 0.75px solid ${(
|
|
1389
|
+
background: ${(C = d == null ? void 0 : d.content) == null ? void 0 : C.backgroundColor};
|
|
1390
|
+
backdrop-filter: ${(L = d == null ? void 0 : d.content) == null ? void 0 : L.backdropFilter};
|
|
1391
|
+
box-shadow: 0 20px 40px ${(R = d == null ? void 0 : d.content) == null ? void 0 : R.boxShadowColor},
|
|
1392
|
+
0 0 0 0.75px ${(X = d == null ? void 0 : d.content) == null ? void 0 : X.boxShadowBorderColor};
|
|
1393
|
+
border: 0.75px solid ${(_ = d == null ? void 0 : d.content) == null ? void 0 : _.borderColor};
|
|
1392
1394
|
padding: 0;
|
|
1393
|
-
border-radius: ${(
|
|
1395
|
+
border-radius: ${(ee = d == null ? void 0 : d.content) == null ? void 0 : ee.borderRadius};
|
|
1394
1396
|
overflow: hidden;
|
|
1395
1397
|
animation: modalSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
|
|
1396
1398
|
position: relative;
|
|
@@ -1421,7 +1423,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
1421
1423
|
@keyframes maskFadeOut {
|
|
1422
1424
|
from {
|
|
1423
1425
|
opacity: 1;
|
|
1424
|
-
backdrop-filter: ${(
|
|
1426
|
+
backdrop-filter: ${(U = d == null ? void 0 : d.mask) == null ? void 0 : U.backdropFilter};
|
|
1425
1427
|
}
|
|
1426
1428
|
to {
|
|
1427
1429
|
opacity: 0;
|
|
@@ -1449,7 +1451,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
1449
1451
|
position: relative;
|
|
1450
1452
|
|
|
1451
1453
|
.ant-modal-name {
|
|
1452
|
-
color: ${(
|
|
1454
|
+
color: ${(V = d == null ? void 0 : d.header) == null ? void 0 : V.textColor};
|
|
1453
1455
|
}
|
|
1454
1456
|
}
|
|
1455
1457
|
|
|
@@ -1470,27 +1472,28 @@ const Ya = Te(({ src: t }) => {
|
|
|
1470
1472
|
}
|
|
1471
1473
|
|
|
1472
1474
|
&::-webkit-scrollbar-track {
|
|
1473
|
-
background: ${(
|
|
1475
|
+
background: ${(T = d == null ? void 0 : d.scrollbar) == null ? void 0 : T.trackColor};
|
|
1474
1476
|
}
|
|
1475
1477
|
|
|
1476
1478
|
&::-webkit-scrollbar-thumb {
|
|
1477
|
-
background: ${(
|
|
1478
|
-
border-radius: ${(
|
|
1479
|
+
background: ${(H = d == null ? void 0 : d.scrollbar) == null ? void 0 : H.thumbColor};
|
|
1480
|
+
border-radius: ${(se = d == null ? void 0 : d.scrollbar) == null ? void 0 : se.borderRadius};
|
|
1479
1481
|
transition: background-color 0.2s ease;
|
|
1480
1482
|
}
|
|
1481
1483
|
|
|
1482
1484
|
&::-webkit-scrollbar-thumb:hover {
|
|
1483
|
-
background: ${(
|
|
1485
|
+
background: ${(ne = d == null ? void 0 : d.scrollbar) == null ? void 0 : ne.thumbHoverColor};
|
|
1484
1486
|
}
|
|
1485
1487
|
|
|
1486
1488
|
/* Firefox 滚动条样式 */
|
|
1487
1489
|
scrollbar-width: thin;
|
|
1488
|
-
scrollbar-color: ${(
|
|
1490
|
+
scrollbar-color: ${(F = d == null ? void 0 : d.scrollbar) == null ? void 0 : F.thumbColor} ${(re = d == null ? void 0 : d.scrollbar) == null ? void 0 : re.trackColor};
|
|
1489
1491
|
}
|
|
1490
|
-
|
|
1492
|
+
`,
|
|
1493
|
+
c
|
|
1491
1494
|
),
|
|
1492
1495
|
width: s,
|
|
1493
|
-
destroyOnClose:
|
|
1496
|
+
destroyOnClose: l,
|
|
1494
1497
|
children: /* @__PURE__ */ a(
|
|
1495
1498
|
"div",
|
|
1496
1499
|
{
|
|
@@ -1501,23 +1504,24 @@ const Ya = Te(({ src: t }) => {
|
|
|
1501
1504
|
|
|
1502
1505
|
/* iOS 风格的滚动条 */
|
|
1503
1506
|
&::-webkit-scrollbar {
|
|
1504
|
-
width: ${(
|
|
1507
|
+
width: ${(ce = d == null ? void 0 : d.scrollbar) == null ? void 0 : ce.width};
|
|
1505
1508
|
}
|
|
1506
1509
|
|
|
1507
1510
|
&::-webkit-scrollbar-track {
|
|
1508
|
-
background: ${(
|
|
1511
|
+
background: ${(ae = d == null ? void 0 : d.scrollbar) == null ? void 0 : ae.trackColor};
|
|
1509
1512
|
}
|
|
1510
1513
|
|
|
1511
1514
|
&::-webkit-scrollbar-thumb {
|
|
1512
|
-
background: ${(
|
|
1513
|
-
border-radius: ${(
|
|
1515
|
+
background: ${(ue = d == null ? void 0 : d.scrollbar) == null ? void 0 : ue.thumbColor};
|
|
1516
|
+
border-radius: ${(me = d == null ? void 0 : d.scrollbar) == null ? void 0 : me.borderRadius};
|
|
1514
1517
|
transition: background 0.2s ease;
|
|
1515
1518
|
}
|
|
1516
1519
|
|
|
1517
1520
|
&::-webkit-scrollbar-thumb:hover {
|
|
1518
|
-
background: ${(
|
|
1521
|
+
background: ${(ge = d == null ? void 0 : d.scrollbar) == null ? void 0 : ge.thumbHoverColor};
|
|
1519
1522
|
}
|
|
1520
|
-
|
|
1523
|
+
`,
|
|
1524
|
+
u
|
|
1521
1525
|
),
|
|
1522
1526
|
children: n
|
|
1523
1527
|
}
|
|
@@ -1525,21 +1529,21 @@ const Ya = Te(({ src: t }) => {
|
|
|
1525
1529
|
}
|
|
1526
1530
|
) });
|
|
1527
1531
|
}, Xa = (t) => {
|
|
1528
|
-
const { data: e, onClose: o, onItemClick: r } = t, { list: n, setList: s, setListStatus: i, setMoveItemId:
|
|
1532
|
+
const { data: e, onClose: o, onItemClick: r } = t, { list: n, setList: s, setListStatus: i, setMoveItemId: l, setMoveTargetId: m, updateItem: p } = De(), [c, u] = E("文件夹"), f = [...(e == null ? void 0 : e.children) ?? []];
|
|
1529
1533
|
W(() => {
|
|
1530
|
-
var
|
|
1531
|
-
e &&
|
|
1534
|
+
var x;
|
|
1535
|
+
e && u((x = e.data) == null ? void 0 : x.name);
|
|
1532
1536
|
}, [e]);
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1537
|
+
const d = (x) => {
|
|
1538
|
+
u(x);
|
|
1535
1539
|
}, z = () => {
|
|
1536
|
-
e &&
|
|
1540
|
+
e && p(e.id, {
|
|
1537
1541
|
...e.data,
|
|
1538
|
-
name:
|
|
1542
|
+
name: c
|
|
1539
1543
|
});
|
|
1540
|
-
}, v = (
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1544
|
+
}, v = (x) => {
|
|
1545
|
+
const g = x.relatedTarget;
|
|
1546
|
+
g && (x.currentTarget.contains(g) || setTimeout(() => {
|
|
1543
1547
|
o();
|
|
1544
1548
|
}, 500));
|
|
1545
1549
|
};
|
|
@@ -1548,7 +1552,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
1548
1552
|
{
|
|
1549
1553
|
visible: !!e,
|
|
1550
1554
|
onClose: o,
|
|
1551
|
-
title: /* @__PURE__ */ a(Wa, { value:
|
|
1555
|
+
title: /* @__PURE__ */ a(Wa, { value: c, onChange: d, onBlur: z, placeholder: "文件夹" }),
|
|
1552
1556
|
mousePosition: e != null && e.pageX && (e != null && e.pageY) ? {
|
|
1553
1557
|
x: e == null ? void 0 : e.pageX,
|
|
1554
1558
|
y: e == null ? void 0 : e.pageY
|
|
@@ -1559,21 +1563,21 @@ const Ya = Te(({ src: t }) => {
|
|
|
1559
1563
|
className: Ha,
|
|
1560
1564
|
...Ua,
|
|
1561
1565
|
list: (e == null ? void 0 : e.children) ?? [],
|
|
1562
|
-
setList: (
|
|
1563
|
-
var
|
|
1564
|
-
const
|
|
1565
|
-
|
|
1566
|
+
setList: (x) => {
|
|
1567
|
+
var h, b;
|
|
1568
|
+
const g = x.map((y) => y.id), k = (b = (h = n.find((y) => y.id === (e == null ? void 0 : e.id))) == null ? void 0 : h.children) == null ? void 0 : b.map((y) => y.id);
|
|
1569
|
+
g.length === (k == null ? void 0 : k.length) && g.every((y, C) => y === k[C]) || g.length < ((k == null ? void 0 : k.length) ?? 0) || s(x, [...(e == null ? void 0 : e.parentIds) ?? [], e == null ? void 0 : e.id]);
|
|
1566
1570
|
},
|
|
1567
|
-
onMove: () => (
|
|
1568
|
-
onStart: (
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
+
onMove: () => (m(null), i("onMove"), !0),
|
|
1572
|
+
onStart: (x) => {
|
|
1573
|
+
const g = x.item.dataset;
|
|
1574
|
+
g != null && g.id && l(g.id), i("onMove");
|
|
1571
1575
|
},
|
|
1572
1576
|
onEnd: () => {
|
|
1573
|
-
|
|
1577
|
+
l(null), m(null), i(null);
|
|
1574
1578
|
},
|
|
1575
1579
|
ghostClass: zo,
|
|
1576
|
-
children: /* @__PURE__ */ a(ke, { mode: "popLayout", children:
|
|
1580
|
+
children: /* @__PURE__ */ a(ke, { mode: "popLayout", children: f.map((x, g) => /* @__PURE__ */ a(Pe, { data: x, itemIndex: g, onClick: r }, x.id)) })
|
|
1577
1581
|
}
|
|
1578
1582
|
) })
|
|
1579
1583
|
}
|
|
@@ -1667,19 +1671,19 @@ const Ya = Te(({ src: t }) => {
|
|
|
1667
1671
|
}
|
|
1668
1672
|
);
|
|
1669
1673
|
}, Qa = ({ onClick: t, className: e }) => {
|
|
1670
|
-
var
|
|
1671
|
-
const [o, r] = E(!1), { theme: n } = be(), s = (v = (z = (
|
|
1672
|
-
if (
|
|
1673
|
-
const
|
|
1674
|
+
var d, z, v;
|
|
1675
|
+
const [o, r] = E(!1), { theme: n } = be(), s = (v = (z = (d = n == null ? void 0 : n.token) == null ? void 0 : d.dock) == null ? void 0 : z.launchpad) == null ? void 0 : v.icon, i = s.textColor, l = s.backgroundColor, m = s.borderColor, p = s.shadowColor, c = s.hoverGlowColor, u = (x, g) => {
|
|
1676
|
+
if (x.startsWith("#")) {
|
|
1677
|
+
const h = x.slice(1), b = parseInt(h.slice(0, 2), 16), y = parseInt(h.slice(2, 4), 16), C = parseInt(h.slice(4, 6), 16), L = g * 15, R = Math.max(0, b - L), X = Math.max(0, y - L), _ = Math.max(0, C - L);
|
|
1674
1678
|
return `rgb(${R}, ${X}, ${_})`;
|
|
1675
1679
|
}
|
|
1676
|
-
const k =
|
|
1680
|
+
const k = x.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);
|
|
1677
1681
|
if (k) {
|
|
1678
|
-
const
|
|
1682
|
+
const h = parseInt(k[1]), b = parseInt(k[2]), y = parseInt(k[3]), C = k[4] || "1", L = g * 15, R = Math.max(0, h - L), X = Math.max(0, b - L), _ = Math.max(0, y - L);
|
|
1679
1683
|
return `rgba(${R}, ${X}, ${_}, ${C})`;
|
|
1680
1684
|
}
|
|
1681
|
-
return
|
|
1682
|
-
},
|
|
1685
|
+
return x;
|
|
1686
|
+
}, f = [
|
|
1683
1687
|
{
|
|
1684
1688
|
id: "app1",
|
|
1685
1689
|
icon: /* @__PURE__ */ a(sn, { size: 32 })
|
|
@@ -1721,40 +1725,40 @@ const Ya = Te(({ src: t }) => {
|
|
|
1721
1725
|
height: "56px",
|
|
1722
1726
|
overflow: "visible"
|
|
1723
1727
|
},
|
|
1724
|
-
children:
|
|
1725
|
-
const k =
|
|
1728
|
+
children: f.map((x, g) => {
|
|
1729
|
+
const k = g * 4, h = 0, b = o ? k + g * 2 : k, y = h, C = 0, L = 1 - g * 0.05, R = f.length - g, X = (_) => _ === 0 ? l : u(l, _);
|
|
1726
1730
|
return /* @__PURE__ */ a(
|
|
1727
1731
|
Y.div,
|
|
1728
1732
|
{
|
|
1729
1733
|
className: N(
|
|
1730
1734
|
"zs-absolute zs-w-full zs-h-full zs-rounded-xl zs-flex zs-items-center zs-justify-center zs-shadow-lg",
|
|
1731
1735
|
I`
|
|
1732
|
-
background: ${X(
|
|
1736
|
+
background: ${X(g)};
|
|
1733
1737
|
color: ${i};
|
|
1734
1738
|
z-index: ${R};
|
|
1735
|
-
box-shadow: 0 ${1 +
|
|
1736
|
-
${
|
|
1737
|
-
border: 0.5px solid ${
|
|
1739
|
+
box-shadow: 0 ${1 + g * 0.5}px ${4 + g * 1}px
|
|
1740
|
+
${p.replace(/[\d.]+\)$/, `${0.1 + g * 0.02})`)};
|
|
1741
|
+
border: 0.5px solid ${m};
|
|
1738
1742
|
`
|
|
1739
1743
|
),
|
|
1740
1744
|
initial: { opacity: 0, scale: 0.8 },
|
|
1741
1745
|
animate: {
|
|
1742
1746
|
opacity: 1,
|
|
1743
1747
|
scale: L,
|
|
1744
|
-
x:
|
|
1745
|
-
y
|
|
1748
|
+
x: b,
|
|
1749
|
+
y,
|
|
1746
1750
|
rotate: C
|
|
1747
1751
|
},
|
|
1748
1752
|
transition: {
|
|
1749
|
-
delay:
|
|
1753
|
+
delay: g * 0.1,
|
|
1750
1754
|
duration: 0.3,
|
|
1751
1755
|
x: { duration: 0.2 },
|
|
1752
1756
|
y: { duration: 0.2 },
|
|
1753
1757
|
rotate: { duration: 0.2 }
|
|
1754
1758
|
},
|
|
1755
|
-
children:
|
|
1759
|
+
children: g === 0 && /* @__PURE__ */ a("div", { className: "zs-flex zs-items-center zs-justify-center zs-w-full zs-h-full", children: x.icon })
|
|
1756
1760
|
},
|
|
1757
|
-
|
|
1761
|
+
x.id
|
|
1758
1762
|
);
|
|
1759
1763
|
})
|
|
1760
1764
|
}
|
|
@@ -1765,7 +1769,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
1765
1769
|
className: N(
|
|
1766
1770
|
"zs-absolute zs-inset-0 zs-rounded-xl zs-pointer-events-none",
|
|
1767
1771
|
I`
|
|
1768
|
-
background: radial-gradient(circle, ${
|
|
1772
|
+
background: radial-gradient(circle, ${c} 0%, transparent 70%);
|
|
1769
1773
|
opacity: 0;
|
|
1770
1774
|
`
|
|
1771
1775
|
),
|
|
@@ -1784,12 +1788,12 @@ const Ya = Te(({ src: t }) => {
|
|
|
1784
1788
|
itemBuilder: n,
|
|
1785
1789
|
fixedItemBuilder: s,
|
|
1786
1790
|
showLaunchpad: i = !0,
|
|
1787
|
-
onLaunchpadClick:
|
|
1788
|
-
onDrop:
|
|
1789
|
-
onDockItemsChange:
|
|
1791
|
+
onLaunchpadClick: l,
|
|
1792
|
+
onDrop: m,
|
|
1793
|
+
onDockItemsChange: p
|
|
1790
1794
|
}) => {
|
|
1791
|
-
var
|
|
1792
|
-
const { setListStatus:
|
|
1795
|
+
var x;
|
|
1796
|
+
const { setListStatus: c } = De(), { theme: u } = be(), f = u.token.dock, d = (g, k) => n ? n(g, k) : /* @__PURE__ */ a(Pe, { data: g, itemIndex: k, noLetters: !0, from: "dock", iconSize: 56 }), z = (g, k) => s ? s(g, k) : /* @__PURE__ */ a(Pe, { data: g, itemIndex: k, noLetters: !0, from: "dock", disabledDrag: !0, iconSize: 56 });
|
|
1793
1797
|
if (!t.length && !e.length && !i)
|
|
1794
1798
|
return null;
|
|
1795
1799
|
const v = /* @__PURE__ */ a(
|
|
@@ -1799,7 +1803,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
1799
1803
|
"zs-flex zs-transition-colors",
|
|
1800
1804
|
o === "top" || o === "bottom" ? "zs-w-[1px] zs-h-8 zs-mx-1" : "zs-w-8 zs-h-[1px] zs-my-1",
|
|
1801
1805
|
I`
|
|
1802
|
-
background-color: ${((
|
|
1806
|
+
background-color: ${((x = f == null ? void 0 : f.divider) == null ? void 0 : x.color) || "rgba(255, 255, 255, 0.3)"};
|
|
1803
1807
|
`
|
|
1804
1808
|
)
|
|
1805
1809
|
}
|
|
@@ -1813,15 +1817,15 @@ const Ya = Te(({ src: t }) => {
|
|
|
1813
1817
|
o === "top" && "zs-mb-4",
|
|
1814
1818
|
o === "bottom" && "zs-mt-4",
|
|
1815
1819
|
I`
|
|
1816
|
-
background-color: ${(
|
|
1817
|
-
border-color: ${(
|
|
1818
|
-
box-shadow: 0 8px 32px ${(
|
|
1820
|
+
background-color: ${(f == null ? void 0 : f.backgroundColor) || "rgba(255, 255, 255, 0.8)"};
|
|
1821
|
+
border-color: ${(f == null ? void 0 : f.borderColor) || "rgba(255, 255, 255, 0.2)"};
|
|
1822
|
+
box-shadow: 0 8px 32px ${(f == null ? void 0 : f.boxShadowColor) || "rgba(0, 0, 0, 0.1)"};
|
|
1819
1823
|
`,
|
|
1820
1824
|
r
|
|
1821
1825
|
),
|
|
1822
|
-
onDragOver: (
|
|
1823
|
-
onDrop: (
|
|
1824
|
-
|
|
1826
|
+
onDragOver: (g) => g.preventDefault(),
|
|
1827
|
+
onDrop: (g) => {
|
|
1828
|
+
g.preventDefault(), m && m();
|
|
1825
1829
|
},
|
|
1826
1830
|
children: [
|
|
1827
1831
|
e.length > 0 && /* @__PURE__ */ a(
|
|
@@ -1833,7 +1837,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
1833
1837
|
${o === "top" || o === "bottom" ? "flex-direction: row;" : "flex-direction: column;"}
|
|
1834
1838
|
`
|
|
1835
1839
|
),
|
|
1836
|
-
children: /* @__PURE__ */ a(ke, { mode: "popLayout", children: e.map((
|
|
1840
|
+
children: /* @__PURE__ */ a(ke, { mode: "popLayout", children: e.map((g, k) => /* @__PURE__ */ a("div", { children: z(g, k) }, g.id)) })
|
|
1837
1841
|
}
|
|
1838
1842
|
),
|
|
1839
1843
|
e.length > 0 && t.length > 0 && v,
|
|
@@ -1841,8 +1845,8 @@ const Ya = Te(({ src: t }) => {
|
|
|
1841
1845
|
ut,
|
|
1842
1846
|
{
|
|
1843
1847
|
list: t,
|
|
1844
|
-
setList: (
|
|
1845
|
-
|
|
1848
|
+
setList: (g) => {
|
|
1849
|
+
p && p(g);
|
|
1846
1850
|
},
|
|
1847
1851
|
...bo,
|
|
1848
1852
|
className: N(
|
|
@@ -1864,27 +1868,27 @@ const Ya = Te(({ src: t }) => {
|
|
|
1864
1868
|
}
|
|
1865
1869
|
`
|
|
1866
1870
|
),
|
|
1867
|
-
onMove: () => (
|
|
1871
|
+
onMove: () => (c("onMove"), !0),
|
|
1868
1872
|
onEnd: () => {
|
|
1869
|
-
|
|
1873
|
+
c(null);
|
|
1870
1874
|
},
|
|
1871
|
-
children: /* @__PURE__ */ a(ke, { mode: "popLayout", children: t.map((
|
|
1875
|
+
children: /* @__PURE__ */ a(ke, { mode: "popLayout", children: t.map((g, k) => d(g, k)) })
|
|
1872
1876
|
}
|
|
1873
1877
|
),
|
|
1874
1878
|
i && (e.length > 0 || t.length > 0) && v,
|
|
1875
|
-
i && /* @__PURE__ */ a(wo, { onClick:
|
|
1879
|
+
i && /* @__PURE__ */ a(wo, { onClick: l, position: o })
|
|
1876
1880
|
]
|
|
1877
1881
|
}
|
|
1878
1882
|
);
|
|
1879
1883
|
}, bt = I`
|
|
1880
1884
|
transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
1881
1885
|
`, es = ({ value: t, onChange: e, placeholder: o = "搜索应用", className: r = "" }) => {
|
|
1882
|
-
var
|
|
1883
|
-
const { theme: n } = be(), s = ie(null), i = ie(null),
|
|
1884
|
-
|
|
1885
|
-
},
|
|
1886
|
-
|
|
1887
|
-
},
|
|
1886
|
+
var d, z, v, x, g, k, h, b, y, C, L, R, X, _, ee, U, V, T, H, se, ne, F, re, ce, ae, ue, me, ge, fe, $, M, S, P, O, B, K, Q, G, te, de, ze, D, q;
|
|
1887
|
+
const { theme: n } = be(), s = ie(null), i = ie(null), l = ie(null), [m, p] = E(!1), c = () => {
|
|
1888
|
+
p(!0), i.current && (i.current.style.transform = "translateY(-50%) translateX(-0.5rem)"), l.current && (l.current.style.transform = "translateY(-50%) translateX(0.5rem)");
|
|
1889
|
+
}, u = () => {
|
|
1890
|
+
p(!1), i.current && (i.current.style.transform = "translateY(-50%) translateX(0)"), l.current && (l.current.style.transform = "translateY(-50%) translateX(0)");
|
|
1891
|
+
}, f = () => {
|
|
1888
1892
|
var j;
|
|
1889
1893
|
e(""), (j = s.current) == null || j.focus();
|
|
1890
1894
|
};
|
|
@@ -1896,7 +1900,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
1896
1900
|
className: N(
|
|
1897
1901
|
"zs-absolute zs-left-4 zs-top-1/2 zs-transform zs--translate-y-1/2 zs-pointer-events-none zs-transition-all zs-duration-300",
|
|
1898
1902
|
I`
|
|
1899
|
-
color: ${
|
|
1903
|
+
color: ${m ? (x = (v = (z = (d = n.token.dock) == null ? void 0 : d.launchpad) == null ? void 0 : z.modal) == null ? void 0 : v.searchBox) == null ? void 0 : x.iconFocusColor : (b = (h = (k = (g = n.token.dock) == null ? void 0 : g.launchpad) == null ? void 0 : k.modal) == null ? void 0 : h.searchBox) == null ? void 0 : b.iconColor};
|
|
1900
1904
|
`,
|
|
1901
1905
|
bt
|
|
1902
1906
|
),
|
|
@@ -1910,14 +1914,14 @@ const Ya = Te(({ src: t }) => {
|
|
|
1910
1914
|
className: N(
|
|
1911
1915
|
"zs-w-full zs-h-11 zs-pl-12 zs-pr-12 zs-border-none zs-rounded-[22px] zs-text-base zs-outline-none zs-transition-all zs-duration-300 placeholder:zs-font-normal focus:zs-scale-[1.02]",
|
|
1912
1916
|
I`
|
|
1913
|
-
background-color: ${(R = (L = (C = (
|
|
1917
|
+
background-color: ${(R = (L = (C = (y = n.token.dock) == null ? void 0 : y.launchpad) == null ? void 0 : C.modal) == null ? void 0 : L.searchBox) == null ? void 0 : R.backgroundColor};
|
|
1914
1918
|
color: ${(U = (ee = (_ = (X = n.token.dock) == null ? void 0 : X.launchpad) == null ? void 0 : _.modal) == null ? void 0 : ee.searchBox) == null ? void 0 : U.textColor};
|
|
1915
1919
|
&::placeholder {
|
|
1916
1920
|
color: ${(se = (H = (T = (V = n.token.dock) == null ? void 0 : V.launchpad) == null ? void 0 : T.modal) == null ? void 0 : H.searchBox) == null ? void 0 : se.placeholderColor};
|
|
1917
1921
|
}
|
|
1918
1922
|
&:focus {
|
|
1919
1923
|
background-color: ${(ce = (re = (F = (ne = n.token.dock) == null ? void 0 : ne.launchpad) == null ? void 0 : F.modal) == null ? void 0 : re.searchBox) == null ? void 0 : ce.focusBackgroundColor};
|
|
1920
|
-
box-shadow: 0 4px 20px ${(
|
|
1924
|
+
box-shadow: 0 4px 20px ${(ge = (me = (ue = (ae = n.token.dock) == null ? void 0 : ae.launchpad) == null ? void 0 : ue.modal) == null ? void 0 : me.searchBox) == null ? void 0 : ge.shadowColor};
|
|
1921
1925
|
}
|
|
1922
1926
|
`,
|
|
1923
1927
|
bt
|
|
@@ -1926,18 +1930,18 @@ const Ya = Te(({ src: t }) => {
|
|
|
1926
1930
|
placeholder: o,
|
|
1927
1931
|
value: t,
|
|
1928
1932
|
onChange: (j) => e(j.target.value),
|
|
1929
|
-
onFocus:
|
|
1930
|
-
onBlur:
|
|
1933
|
+
onFocus: c,
|
|
1934
|
+
onBlur: u
|
|
1931
1935
|
}
|
|
1932
1936
|
),
|
|
1933
1937
|
t && /* @__PURE__ */ a(
|
|
1934
1938
|
"button",
|
|
1935
1939
|
{
|
|
1936
|
-
ref:
|
|
1940
|
+
ref: l,
|
|
1937
1941
|
className: N(
|
|
1938
1942
|
"zs-absolute zs-right-3 zs-top-1/2 zs-transform zs--translate-y-1/2 zs-w-5 zs-h-5 zs-rounded-full zs-border-none zs-text-xs zs-cursor-pointer zs-flex zs-items-center zs-justify-center zs-transition-all zs-duration-300 hover:zs-scale-110 active:zs-scale-95",
|
|
1939
1943
|
I`
|
|
1940
|
-
background-color: ${(P = (S = (M = ($ = (
|
|
1944
|
+
background-color: ${(P = (S = (M = ($ = (fe = n.token.dock) == null ? void 0 : fe.launchpad) == null ? void 0 : $.modal) == null ? void 0 : M.searchBox) == null ? void 0 : S.clearButton) == null ? void 0 : P.backgroundColor};
|
|
1941
1945
|
color: ${(G = (Q = (K = (B = (O = n.token.dock) == null ? void 0 : O.launchpad) == null ? void 0 : B.modal) == null ? void 0 : K.searchBox) == null ? void 0 : Q.clearButton) == null ? void 0 : G.textColor};
|
|
1942
1946
|
&:hover {
|
|
1943
1947
|
background-color: ${(q = (D = (ze = (de = (te = n.token.dock) == null ? void 0 : te.launchpad) == null ? void 0 : de.modal) == null ? void 0 : ze.searchBox) == null ? void 0 : D.clearButton) == null ? void 0 : q.hoverBackgroundColor};
|
|
@@ -1945,42 +1949,42 @@ const Ya = Te(({ src: t }) => {
|
|
|
1945
1949
|
`,
|
|
1946
1950
|
bt
|
|
1947
1951
|
),
|
|
1948
|
-
onClick:
|
|
1952
|
+
onClick: f,
|
|
1949
1953
|
title: "清除搜索",
|
|
1950
1954
|
children: /* @__PURE__ */ a(Vt, { size: 12 })
|
|
1951
1955
|
}
|
|
1952
1956
|
)
|
|
1953
1957
|
] });
|
|
1954
1958
|
}, No = ({ visible: t, onClose: e, onItemClick: o }) => {
|
|
1955
|
-
const { list: r } = De(), [n, s] = E(""), { allApps: i, groupedData:
|
|
1959
|
+
const { list: r } = De(), [n, s] = E(""), { allApps: i, groupedData: l, groups: m, groupCounts: p } = oe(() => {
|
|
1956
1960
|
if (!r || r.length === 0)
|
|
1957
1961
|
return { allApps: [], groupedData: [], groups: [], groupCounts: [] };
|
|
1958
|
-
const
|
|
1959
|
-
var
|
|
1960
|
-
return (((
|
|
1961
|
-
}) :
|
|
1962
|
+
const u = (h) => h.flatMap((b) => b.type === "app" ? [{ ...b }] : b.type === "group" && b.children ? u(b.children) : []), f = r.flatMap((h) => h.children ? u(h.children) : []), z = (n.trim() ? f.filter((h) => {
|
|
1963
|
+
var y;
|
|
1964
|
+
return (((y = h.data) == null ? void 0 : y.name) || h.id || "").toString().toLowerCase().includes(n.toLowerCase());
|
|
1965
|
+
}) : f).sort((h, b) => {
|
|
1962
1966
|
var L, R;
|
|
1963
|
-
const
|
|
1964
|
-
return
|
|
1967
|
+
const y = (((L = h.data) == null ? void 0 : L.name) || h.id || "").toString(), C = (((R = b.data) == null ? void 0 : R.name) || b.id || "").toString();
|
|
1968
|
+
return y.localeCompare(C);
|
|
1965
1969
|
}), v = /* @__PURE__ */ new Map();
|
|
1966
|
-
z.forEach((
|
|
1970
|
+
z.forEach((h) => {
|
|
1967
1971
|
var L;
|
|
1968
|
-
const
|
|
1969
|
-
v.has(C) || v.set(C, []), v.get(C).push(
|
|
1972
|
+
const y = (((L = h.data) == null ? void 0 : L.name) || h.id || "").toString().charAt(0).toUpperCase(), C = /[A-Z]/.test(y) ? y : "#";
|
|
1973
|
+
v.has(C) || v.set(C, []), v.get(C).push(h);
|
|
1970
1974
|
});
|
|
1971
|
-
const
|
|
1972
|
-
return
|
|
1973
|
-
const
|
|
1974
|
-
|
|
1975
|
+
const x = Array.from(v.keys()).sort((h, b) => h === "#" ? 1 : b === "#" ? -1 : h.localeCompare(b)), g = [], k = [];
|
|
1976
|
+
return x.forEach((h) => {
|
|
1977
|
+
const b = v.get(h) || [];
|
|
1978
|
+
g.push(...b), k.push(b.length);
|
|
1975
1979
|
}), {
|
|
1976
1980
|
allApps: z,
|
|
1977
|
-
groupedData:
|
|
1978
|
-
groups:
|
|
1981
|
+
groupedData: g,
|
|
1982
|
+
groups: x,
|
|
1979
1983
|
groupCounts: k
|
|
1980
1984
|
};
|
|
1981
|
-
}, [r, n]),
|
|
1982
|
-
const
|
|
1983
|
-
|
|
1985
|
+
}, [r, n]), c = (u) => {
|
|
1986
|
+
const f = m[u], d = document.getElementById(`group-${f}`);
|
|
1987
|
+
d && d.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
1984
1988
|
};
|
|
1985
1989
|
return /* @__PURE__ */ w(
|
|
1986
1990
|
ft,
|
|
@@ -1996,33 +2000,33 @@ const Ya = Te(({ src: t }) => {
|
|
|
1996
2000
|
/* @__PURE__ */ a("div", { className: "zs-text-base zs-text-[#c7c7cc] zs-font-normal", children: n.trim() ? "尝试使用其他关键词搜索" : "请添加应用到启动台" })
|
|
1997
2001
|
] }) : /* @__PURE__ */ a(Se, { children: /* @__PURE__ */ a("div", { className: N("zs-overflow-y-auto zs-h-full zs-ml-14 zs-p-1"), children: /* @__PURE__ */ a("div", { className: "zs-flex zs-gap-8 zs-flex-wrap", children: /* @__PURE__ */ a(ke, { mode: "popLayout", children: n.trim() ? (
|
|
1998
2002
|
// 搜索模式:简单网格布局
|
|
1999
|
-
i.map((
|
|
2003
|
+
i.map((u, f) => /* @__PURE__ */ a("div", { className: "zs-mb-6", children: /* @__PURE__ */ a(
|
|
2000
2004
|
Pe,
|
|
2001
2005
|
{
|
|
2002
|
-
data:
|
|
2003
|
-
itemIndex:
|
|
2006
|
+
data: u,
|
|
2007
|
+
itemIndex: f,
|
|
2004
2008
|
parentIds: [],
|
|
2005
2009
|
onClick: o,
|
|
2006
2010
|
disabledDrag: !0
|
|
2007
2011
|
}
|
|
2008
|
-
) },
|
|
2012
|
+
) }, u.id))
|
|
2009
2013
|
) : (
|
|
2010
2014
|
// 正常模式:字母分组布局groups
|
|
2011
|
-
|
|
2012
|
-
const
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
+
m.map((u, f) => {
|
|
2016
|
+
const d = p.slice(0, f).reduce((v, x) => v + x, 0), z = l.slice(
|
|
2017
|
+
d,
|
|
2018
|
+
d + p[f]
|
|
2015
2019
|
);
|
|
2016
|
-
return /* @__PURE__ */ a(Se, { children: z.map((v,
|
|
2020
|
+
return /* @__PURE__ */ a(Se, { children: z.map((v, x) => /* @__PURE__ */ a(
|
|
2017
2021
|
"div",
|
|
2018
2022
|
{
|
|
2019
|
-
id:
|
|
2023
|
+
id: x === 0 ? `group-${u}` : void 0,
|
|
2020
2024
|
className: "zs-mb-6",
|
|
2021
2025
|
children: /* @__PURE__ */ a(
|
|
2022
2026
|
Pe,
|
|
2023
2027
|
{
|
|
2024
2028
|
data: v,
|
|
2025
|
-
itemIndex:
|
|
2029
|
+
itemIndex: d + x,
|
|
2026
2030
|
parentIds: [],
|
|
2027
2031
|
onClick: o,
|
|
2028
2032
|
disabledDrag: !0
|
|
@@ -2041,14 +2045,14 @@ const Ya = Te(({ src: t }) => {
|
|
|
2041
2045
|
exit: { opacity: 0, x: -20 },
|
|
2042
2046
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
2043
2047
|
className: "zs-absolute zs-top-0 zs-left-0 zs-bottom-0 zs-flex zs-flex-col zs-items-center zs-z-50 zs-w-12 zs-rounded-xl zs-py-2",
|
|
2044
|
-
children:
|
|
2048
|
+
children: m.map((u, f) => /* @__PURE__ */ a(
|
|
2045
2049
|
Y.button,
|
|
2046
2050
|
{
|
|
2047
2051
|
initial: { opacity: 0, scale: 0.8 },
|
|
2048
2052
|
animate: { opacity: 1, scale: 1 },
|
|
2049
2053
|
transition: {
|
|
2050
2054
|
duration: 0.2,
|
|
2051
|
-
delay:
|
|
2055
|
+
delay: f * 0.05,
|
|
2052
2056
|
ease: "easeOut"
|
|
2053
2057
|
},
|
|
2054
2058
|
whileHover: {
|
|
@@ -2059,11 +2063,11 @@ const Ya = Te(({ src: t }) => {
|
|
|
2059
2063
|
},
|
|
2060
2064
|
whileTap: { scale: 0.95 },
|
|
2061
2065
|
className: "zs-text-sm zs-p-2 zs-cursor-pointer zs-rounded-xl zs-w-8 zs-h-8 zs-flex zs-items-center zs-justify-center zs-bg-transparent zs-border-none zs-font-semibold zs-my-1 zs-text-[#666] zs-leading-none",
|
|
2062
|
-
onClick: () =>
|
|
2063
|
-
title: `跳转到 ${
|
|
2064
|
-
children:
|
|
2066
|
+
onClick: () => c(f),
|
|
2067
|
+
title: `跳转到 ${u}`,
|
|
2068
|
+
children: u
|
|
2065
2069
|
},
|
|
2066
|
-
|
|
2070
|
+
u
|
|
2067
2071
|
))
|
|
2068
2072
|
}
|
|
2069
2073
|
) })
|
|
@@ -2089,15 +2093,15 @@ const Ya = Te(({ src: t }) => {
|
|
|
2089
2093
|
sliderRef: n,
|
|
2090
2094
|
onItemClick: s,
|
|
2091
2095
|
extraItems: i,
|
|
2092
|
-
dock:
|
|
2096
|
+
dock: l = {
|
|
2093
2097
|
enabled: !0,
|
|
2094
2098
|
position: "bottom",
|
|
2095
2099
|
showLaunchpad: !0
|
|
2096
2100
|
}
|
|
2097
|
-
} = t,
|
|
2098
|
-
list:
|
|
2099
|
-
setList:
|
|
2100
|
-
setListStatus:
|
|
2101
|
+
} = t, m = ie(null), p = ie(null), c = ie(null), [u, f] = E(0), [d, z] = E(!1), [v, x] = E(!1), [g, k] = E(!0), {
|
|
2102
|
+
list: h,
|
|
2103
|
+
setList: b,
|
|
2104
|
+
setListStatus: y,
|
|
2101
2105
|
showInfoItemData: C,
|
|
2102
2106
|
setShowInfoItemData: L,
|
|
2103
2107
|
openGroupItemData: R,
|
|
@@ -2110,9 +2114,9 @@ const Ya = Te(({ src: t }) => {
|
|
|
2110
2114
|
addRootItem: H,
|
|
2111
2115
|
removeRootItem: se
|
|
2112
2116
|
} = De(), { pagingDotBuilder: ne, pagingDotsBuilder: F, itemBuilder: re } = be(), ce = oe(() => {
|
|
2113
|
-
const $ =
|
|
2117
|
+
const $ = h.find((M) => M.type === "dock");
|
|
2114
2118
|
return ($ == null ? void 0 : $.children) ?? [];
|
|
2115
|
-
}, [
|
|
2119
|
+
}, [h]), ae = oe(() => h.filter(($) => $.type !== "dock"), [h]), ue = pe(() => {
|
|
2116
2120
|
const $ = {
|
|
2117
2121
|
id: `page_${Date.now()}`,
|
|
2118
2122
|
type: "page",
|
|
@@ -2120,16 +2124,16 @@ const Ya = Te(({ src: t }) => {
|
|
|
2120
2124
|
};
|
|
2121
2125
|
H($), setTimeout(() => {
|
|
2122
2126
|
var M;
|
|
2123
|
-
(M = (n ??
|
|
2127
|
+
(M = (n ?? m).current) == null || M.slickGoTo(ae.length);
|
|
2124
2128
|
}, 100);
|
|
2125
|
-
}, [ae.length, H, n,
|
|
2129
|
+
}, [ae.length, H, n, m]), me = pe(() => {
|
|
2126
2130
|
const $ = ae.filter((M) => !M.children || M.children.length === 0);
|
|
2127
2131
|
$.length === ae.length && ae.length > 1 ? $.slice(1).forEach((M) => {
|
|
2128
2132
|
se(M.id);
|
|
2129
2133
|
}) : $.length > 0 && ae.length > 1 && $.forEach((M) => {
|
|
2130
2134
|
(ae.length - $.length > 0 || ae.indexOf(M) > 0) && se(M.id);
|
|
2131
2135
|
});
|
|
2132
|
-
}, [ae, se]),
|
|
2136
|
+
}, [ae, se]), ge = oe(() => e === !1 ? {} : {
|
|
2133
2137
|
top: I`
|
|
2134
2138
|
display: flex;
|
|
2135
2139
|
flex-direction: column;
|
|
@@ -2177,10 +2181,10 @@ const Ya = Te(({ src: t }) => {
|
|
|
2177
2181
|
}
|
|
2178
2182
|
}
|
|
2179
2183
|
`
|
|
2180
|
-
}[e.position ?? "bottom"], [e]),
|
|
2181
|
-
if (!
|
|
2184
|
+
}[e.position ?? "bottom"], [e]), fe = oe(() => {
|
|
2185
|
+
if (!l.enabled)
|
|
2182
2186
|
return {};
|
|
2183
|
-
const $ =
|
|
2187
|
+
const $ = l.position ?? "bottom";
|
|
2184
2188
|
return {
|
|
2185
2189
|
top: I`
|
|
2186
2190
|
display: flex;
|
|
@@ -2235,46 +2239,46 @@ const Ya = Te(({ src: t }) => {
|
|
|
2235
2239
|
}
|
|
2236
2240
|
`
|
|
2237
2241
|
}[$];
|
|
2238
|
-
}, [
|
|
2242
|
+
}, [l]);
|
|
2239
2243
|
return /* @__PURE__ */ w(Se, { children: [
|
|
2240
2244
|
/* @__PURE__ */ w(
|
|
2241
2245
|
"div",
|
|
2242
2246
|
{
|
|
2243
|
-
ref:
|
|
2244
|
-
className: N("zs-relative zs-w-full zs-h-full",
|
|
2247
|
+
ref: p,
|
|
2248
|
+
className: N("zs-relative zs-w-full zs-h-full", fe),
|
|
2245
2249
|
onDragOver: ($) => {
|
|
2246
|
-
$.preventDefault(),
|
|
2250
|
+
$.preventDefault(), c.current && c.current.handleDragMove($);
|
|
2247
2251
|
},
|
|
2248
2252
|
children: [
|
|
2249
|
-
|
|
2253
|
+
l.enabled && /* @__PURE__ */ a("div", { className: "zs-flex zs-items-center zs-justify-center dock-container", children: /* @__PURE__ */ a(
|
|
2250
2254
|
So,
|
|
2251
2255
|
{
|
|
2252
2256
|
items: ce,
|
|
2253
|
-
fixedItems:
|
|
2254
|
-
position:
|
|
2255
|
-
className:
|
|
2257
|
+
fixedItems: l.fixedItems,
|
|
2258
|
+
position: l.position,
|
|
2259
|
+
className: l.className,
|
|
2256
2260
|
onItemClick: s,
|
|
2257
|
-
itemBuilder:
|
|
2258
|
-
fixedItemBuilder:
|
|
2259
|
-
showLaunchpad:
|
|
2260
|
-
onLaunchpadClick: () =>
|
|
2261
|
+
itemBuilder: l.itemBuilder,
|
|
2262
|
+
fixedItemBuilder: l.fixedItemBuilder,
|
|
2263
|
+
showLaunchpad: l.showLaunchpad,
|
|
2264
|
+
onLaunchpadClick: () => x(!0),
|
|
2261
2265
|
onDockItemsChange: ($) => {
|
|
2262
|
-
const M =
|
|
2266
|
+
const M = h.map((S) => S.type === "dock" ? {
|
|
2263
2267
|
...S,
|
|
2264
2268
|
children: $
|
|
2265
2269
|
} : S);
|
|
2266
|
-
|
|
2270
|
+
b(M);
|
|
2267
2271
|
},
|
|
2268
2272
|
onDrop: () => {
|
|
2269
2273
|
if (V && ce.every(($) => $.id !== V.id)) {
|
|
2270
|
-
const M =
|
|
2274
|
+
const M = h.map((S) => S.type === "dock" ? {
|
|
2271
2275
|
...S,
|
|
2272
2276
|
children: [...S.children ?? [], V]
|
|
2273
2277
|
} : S).map((S) => S.type !== "dock" && S.children ? {
|
|
2274
2278
|
...S,
|
|
2275
2279
|
children: S.children.filter((P) => P.id !== V.id)
|
|
2276
2280
|
} : S);
|
|
2277
|
-
|
|
2281
|
+
b(M);
|
|
2278
2282
|
}
|
|
2279
2283
|
T(null);
|
|
2280
2284
|
}
|
|
@@ -2284,12 +2288,12 @@ const Ya = Te(({ src: t }) => {
|
|
|
2284
2288
|
/* @__PURE__ */ a(
|
|
2285
2289
|
po,
|
|
2286
2290
|
{
|
|
2287
|
-
ref:
|
|
2288
|
-
isDragging:
|
|
2289
|
-
activeSlide:
|
|
2291
|
+
ref: c,
|
|
2292
|
+
isDragging: d,
|
|
2293
|
+
activeSlide: u,
|
|
2290
2294
|
totalSlides: ae.length,
|
|
2291
|
-
sliderRef: n ??
|
|
2292
|
-
containerRef:
|
|
2295
|
+
sliderRef: n ?? m,
|
|
2296
|
+
containerRef: p,
|
|
2293
2297
|
onCreateNewPage: ue
|
|
2294
2298
|
}
|
|
2295
2299
|
),
|
|
@@ -2299,13 +2303,13 @@ const Ya = Te(({ src: t }) => {
|
|
|
2299
2303
|
useCSS: !0,
|
|
2300
2304
|
useTransform: !0,
|
|
2301
2305
|
arrows: !1,
|
|
2302
|
-
ref: n ??
|
|
2306
|
+
ref: n ?? m,
|
|
2303
2307
|
infinite: !1,
|
|
2304
2308
|
dots: !0,
|
|
2305
2309
|
lazyLoad: "anticipated",
|
|
2306
|
-
touchMove:
|
|
2310
|
+
touchMove: g,
|
|
2307
2311
|
className: N(
|
|
2308
|
-
|
|
2312
|
+
ge,
|
|
2309
2313
|
I`
|
|
2310
2314
|
height: 100%;
|
|
2311
2315
|
.slick-list {
|
|
@@ -2329,18 +2333,18 @@ const Ya = Te(({ src: t }) => {
|
|
|
2329
2333
|
`,
|
|
2330
2334
|
o
|
|
2331
2335
|
),
|
|
2332
|
-
customPaging: Ja(ae,
|
|
2336
|
+
customPaging: Ja(ae, u, ne),
|
|
2333
2337
|
appendDots: ($) => /* @__PURE__ */ a(
|
|
2334
2338
|
Ka,
|
|
2335
2339
|
{
|
|
2336
|
-
activeSlide:
|
|
2340
|
+
activeSlide: u,
|
|
2337
2341
|
onDragEnter: (M) => {
|
|
2338
2342
|
var S;
|
|
2339
|
-
(S = (n ??
|
|
2343
|
+
(S = (n ?? m).current) == null || S.slickGoTo(M);
|
|
2340
2344
|
},
|
|
2341
2345
|
onClick: (M) => {
|
|
2342
2346
|
var S;
|
|
2343
|
-
(S = (n ??
|
|
2347
|
+
(S = (n ?? m).current) == null || S.slickGoTo(M);
|
|
2344
2348
|
},
|
|
2345
2349
|
pagingDotsBuilder: F,
|
|
2346
2350
|
slickDots: $,
|
|
@@ -2356,7 +2360,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
2356
2360
|
}
|
|
2357
2361
|
),
|
|
2358
2362
|
beforeChange: ($, M) => {
|
|
2359
|
-
|
|
2363
|
+
f(M);
|
|
2360
2364
|
},
|
|
2361
2365
|
...r,
|
|
2362
2366
|
children: ae.map(($) => /* @__PURE__ */ a(
|
|
@@ -2381,23 +2385,23 @@ const Ya = Te(({ src: t }) => {
|
|
|
2381
2385
|
className: N(Fa),
|
|
2382
2386
|
...bo,
|
|
2383
2387
|
list: $.children ?? [],
|
|
2384
|
-
setList: (M) =>
|
|
2388
|
+
setList: (M) => b(M, [$.id]),
|
|
2385
2389
|
onMove: (M) => {
|
|
2386
2390
|
var K;
|
|
2387
|
-
|
|
2391
|
+
y("onMove");
|
|
2388
2392
|
const { dragged: S, related: P } = M, O = S.dataset, B = P.dataset;
|
|
2389
2393
|
return ee(null), !((Object.keys(B).length === 0 || B.parentIds) && Number(O.childrenLength) > 0 && P.classList.contains("sortable-group-item") || (P.classList.contains("desktop-dock-sortable") || (K = P.parentElement) != null && K.classList.contains("desktop-dock-sortable")) && Number(O.childrenLength) > 0);
|
|
2390
2394
|
},
|
|
2391
2395
|
onStart: (M) => {
|
|
2392
2396
|
var O;
|
|
2393
2397
|
const S = M.item.dataset;
|
|
2394
|
-
S != null && S.id && _(S.id),
|
|
2398
|
+
S != null && S.id && _(S.id), y("onMove"), z(!0);
|
|
2395
2399
|
const P = (O = $.children) == null ? void 0 : O.find((B) => B.id === S.id);
|
|
2396
2400
|
P && T(P);
|
|
2397
2401
|
},
|
|
2398
2402
|
onEnd: () => {
|
|
2399
|
-
_(null), ee(null),
|
|
2400
|
-
|
|
2403
|
+
_(null), ee(null), y(null), z(!1), T(null), setTimeout(() => {
|
|
2404
|
+
me();
|
|
2401
2405
|
}, 100);
|
|
2402
2406
|
},
|
|
2403
2407
|
ghostClass: zo,
|
|
@@ -2473,10 +2477,10 @@ const Ya = Te(({ src: t }) => {
|
|
|
2473
2477
|
onItemClick: s
|
|
2474
2478
|
}
|
|
2475
2479
|
),
|
|
2476
|
-
v && /* @__PURE__ */ a(No, { visible: v, onClose: () =>
|
|
2480
|
+
v && /* @__PURE__ */ a(No, { visible: v, onClose: () => x(!1), onItemClick: s })
|
|
2477
2481
|
] });
|
|
2478
2482
|
}, Mo = (t) => {
|
|
2479
|
-
var s, i,
|
|
2483
|
+
var s, i, l, m, p;
|
|
2480
2484
|
const { className: e, children: o, ...r } = t, { theme: n } = be();
|
|
2481
2485
|
return /* @__PURE__ */ a(
|
|
2482
2486
|
Y.div,
|
|
@@ -2486,10 +2490,10 @@ const Ya = Te(({ src: t }) => {
|
|
|
2486
2490
|
I`
|
|
2487
2491
|
background-color: ${(s = n.token.contextMenu) == null ? void 0 : s.backgroundColor};
|
|
2488
2492
|
box-shadow: 0 20px 40px ${(i = n.token.contextMenu) == null ? void 0 : i.shadowColor},
|
|
2489
|
-
0 0 0 0.75px ${(
|
|
2493
|
+
0 0 0 0.75px ${(l = n.token.contextMenu) == null ? void 0 : l.boxShadowBorderColor};
|
|
2490
2494
|
min-width: 200px;
|
|
2491
|
-
border: 0.75px solid ${(
|
|
2492
|
-
backdrop-filter: ${(
|
|
2495
|
+
border: 0.75px solid ${(m = n.token.contextMenu) == null ? void 0 : m.borderColor};
|
|
2496
|
+
backdrop-filter: ${(p = n.token.contextMenu) == null ? void 0 : p.backdropFilter};
|
|
2493
2497
|
`,
|
|
2494
2498
|
e
|
|
2495
2499
|
),
|
|
@@ -2502,8 +2506,8 @@ const Ya = Te(({ src: t }) => {
|
|
|
2502
2506
|
damping: 30,
|
|
2503
2507
|
duration: 0.15
|
|
2504
2508
|
},
|
|
2505
|
-
onMouseDown: (
|
|
2506
|
-
|
|
2509
|
+
onMouseDown: (c) => {
|
|
2510
|
+
c.stopPropagation(), c.preventDefault();
|
|
2507
2511
|
},
|
|
2508
2512
|
...r,
|
|
2509
2513
|
children: o
|
|
@@ -2513,9 +2517,9 @@ const Ya = Te(({ src: t }) => {
|
|
|
2513
2517
|
hoveredIndex: null,
|
|
2514
2518
|
setHoveredIndex: () => {
|
|
2515
2519
|
}
|
|
2516
|
-
}), rt = ({ icon: t, text: e, color: o, textColor: r, onClick: n, index: s, children: i, ...
|
|
2517
|
-
var v,
|
|
2518
|
-
const { hoveredIndex:
|
|
2520
|
+
}), rt = ({ icon: t, text: e, color: o, textColor: r, onClick: n, index: s, children: i, ...l }) => {
|
|
2521
|
+
var v, x, g;
|
|
2522
|
+
const { hoveredIndex: m, setHoveredIndex: p } = Le(It), { theme: c } = be(), u = m === s, f = r || ((v = c.token.contextMenu) == null ? void 0 : v.textColor) || "#1d1d1f", d = o || ((x = c.token.contextMenu) == null ? void 0 : x.textColor) || "black";
|
|
2519
2523
|
return /* @__PURE__ */ w(
|
|
2520
2524
|
Y.div,
|
|
2521
2525
|
{
|
|
@@ -2525,12 +2529,12 @@ const Ya = Te(({ src: t }) => {
|
|
|
2525
2529
|
z-index: 1;
|
|
2526
2530
|
`
|
|
2527
2531
|
),
|
|
2528
|
-
onMouseEnter: () =>
|
|
2529
|
-
onMouseLeave: () =>
|
|
2532
|
+
onMouseEnter: () => p(s),
|
|
2533
|
+
onMouseLeave: () => p(null),
|
|
2530
2534
|
onClick: n,
|
|
2531
|
-
...
|
|
2535
|
+
...l,
|
|
2532
2536
|
children: [
|
|
2533
|
-
/* @__PURE__ */ a(ke, { children:
|
|
2537
|
+
/* @__PURE__ */ a(ke, { children: u && /* @__PURE__ */ a(
|
|
2534
2538
|
Y.div,
|
|
2535
2539
|
{
|
|
2536
2540
|
layoutId: "menuHover",
|
|
@@ -2538,7 +2542,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
2538
2542
|
"zs-absolute zs-top-0.5 zs-left-2 zs-right-2 zs-bottom-0.5 zs-bg-black zs-bg-opacity-5 zs-rounded-lg",
|
|
2539
2543
|
I`
|
|
2540
2544
|
z-index: -1;
|
|
2541
|
-
background-color: ${((
|
|
2545
|
+
background-color: ${((g = c.token.contextMenu) == null ? void 0 : g.activeColor) || "rgba(0, 0, 0, 0.05)"};
|
|
2542
2546
|
`
|
|
2543
2547
|
),
|
|
2544
2548
|
initial: { opacity: 0 },
|
|
@@ -2559,7 +2563,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
2559
2563
|
I`
|
|
2560
2564
|
font-weight: 400;
|
|
2561
2565
|
line-height: 18px;
|
|
2562
|
-
color: ${
|
|
2566
|
+
color: ${f};
|
|
2563
2567
|
letter-spacing: -0.28px;
|
|
2564
2568
|
`
|
|
2565
2569
|
),
|
|
@@ -2572,7 +2576,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
2572
2576
|
className: N(
|
|
2573
2577
|
"zs-flex zs-items-center zs-justify-center zs-shrink-0",
|
|
2574
2578
|
I`
|
|
2575
|
-
color: ${
|
|
2579
|
+
color: ${d};
|
|
2576
2580
|
width: 18px;
|
|
2577
2581
|
height: 18px;
|
|
2578
2582
|
`
|
|
@@ -2586,40 +2590,40 @@ const Ya = Te(({ src: t }) => {
|
|
|
2586
2590
|
);
|
|
2587
2591
|
}, os = ({ text: t, icon: e, index: o, children: r, color: n, textColor: s, ...i }) => {
|
|
2588
2592
|
var L, R, X;
|
|
2589
|
-
const [
|
|
2590
|
-
if (
|
|
2591
|
-
const _ =
|
|
2592
|
-
|
|
2593
|
+
const [l, m] = E(!1), [p, c] = E({ x: 0, y: 0 }), u = ie(null), f = ie(null), { hoveredIndex: d, setHoveredIndex: z } = Le(It), { theme: v } = be(), x = d === o, g = s || ((L = v.token.contextMenu) == null ? void 0 : L.textColor) || "#1d1d1f", k = n || ((R = v.token.contextMenu) == null ? void 0 : R.textColor) || "black", h = () => {
|
|
2594
|
+
if (f.current && clearTimeout(f.current), z(o), m(!0), u.current) {
|
|
2595
|
+
const _ = u.current.getBoundingClientRect();
|
|
2596
|
+
c({
|
|
2593
2597
|
x: _.width - 4,
|
|
2594
2598
|
y: 0
|
|
2595
2599
|
});
|
|
2596
2600
|
}
|
|
2597
|
-
}, h = () => {
|
|
2598
|
-
m.current = setTimeout(() => {
|
|
2599
|
-
u(!1);
|
|
2600
|
-
}, 150);
|
|
2601
2601
|
}, b = () => {
|
|
2602
|
-
|
|
2602
|
+
f.current = setTimeout(() => {
|
|
2603
|
+
m(!1);
|
|
2604
|
+
}, 150);
|
|
2605
|
+
}, y = () => {
|
|
2606
|
+
f.current && clearTimeout(f.current);
|
|
2603
2607
|
}, C = () => {
|
|
2604
|
-
|
|
2608
|
+
m(!1);
|
|
2605
2609
|
};
|
|
2606
2610
|
return W(() => () => {
|
|
2607
|
-
|
|
2611
|
+
f.current && clearTimeout(f.current);
|
|
2608
2612
|
}, []), /* @__PURE__ */ w(
|
|
2609
2613
|
Y.div,
|
|
2610
2614
|
{
|
|
2611
|
-
ref:
|
|
2615
|
+
ref: u,
|
|
2612
2616
|
className: N(
|
|
2613
2617
|
"zs-py-0 zs-px-5 zs-flex zs-items-center zs-gap-4 zs-cursor-pointer zs-relative zs-h-10 zs-outline-none",
|
|
2614
2618
|
I`
|
|
2615
2619
|
z-index: 1;
|
|
2616
2620
|
`
|
|
2617
2621
|
),
|
|
2618
|
-
onMouseEnter:
|
|
2619
|
-
onMouseLeave:
|
|
2622
|
+
onMouseEnter: h,
|
|
2623
|
+
onMouseLeave: b,
|
|
2620
2624
|
...i,
|
|
2621
2625
|
children: [
|
|
2622
|
-
/* @__PURE__ */ a(ke, { children:
|
|
2626
|
+
/* @__PURE__ */ a(ke, { children: x && /* @__PURE__ */ a(
|
|
2623
2627
|
Y.div,
|
|
2624
2628
|
{
|
|
2625
2629
|
layoutId: "menuHover",
|
|
@@ -2648,7 +2652,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
2648
2652
|
I`
|
|
2649
2653
|
font-weight: 400;
|
|
2650
2654
|
line-height: 18px;
|
|
2651
|
-
color: ${
|
|
2655
|
+
color: ${g};
|
|
2652
2656
|
letter-spacing: -0.28px;
|
|
2653
2657
|
`
|
|
2654
2658
|
),
|
|
@@ -2669,14 +2673,14 @@ const Ya = Te(({ src: t }) => {
|
|
|
2669
2673
|
children: /* @__PURE__ */ a(Wt, { size: 16 })
|
|
2670
2674
|
}
|
|
2671
2675
|
),
|
|
2672
|
-
/* @__PURE__ */ a(ke, { children:
|
|
2676
|
+
/* @__PURE__ */ a(ke, { children: l && /* @__PURE__ */ a(
|
|
2673
2677
|
Mo,
|
|
2674
2678
|
{
|
|
2675
2679
|
className: N(
|
|
2676
2680
|
"zs-absolute zs-overflow-hidden zs-z-50",
|
|
2677
2681
|
I`
|
|
2678
|
-
left: ${
|
|
2679
|
-
top: ${
|
|
2682
|
+
left: ${p.x}px;
|
|
2683
|
+
top: ${p.y}px;
|
|
2680
2684
|
`
|
|
2681
2685
|
),
|
|
2682
2686
|
initial: { opacity: 0, scale: 0.6, x: -8 },
|
|
@@ -2684,7 +2688,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
2684
2688
|
style: {
|
|
2685
2689
|
transformOrigin: "left"
|
|
2686
2690
|
},
|
|
2687
|
-
onMouseEnter:
|
|
2691
|
+
onMouseEnter: y,
|
|
2688
2692
|
onMouseLeave: C,
|
|
2689
2693
|
children: r
|
|
2690
2694
|
}
|
|
@@ -2695,8 +2699,8 @@ const Ya = Te(({ src: t }) => {
|
|
|
2695
2699
|
}, ns = ({ sizes: t, currentSize: e, onSizeChange: o }) => {
|
|
2696
2700
|
const [r, n] = E(null), { theme: s } = be();
|
|
2697
2701
|
return /* @__PURE__ */ a(Se, { children: t.map((i) => {
|
|
2698
|
-
var
|
|
2699
|
-
const
|
|
2702
|
+
var p, c, u;
|
|
2703
|
+
const l = r === i, m = e === i;
|
|
2700
2704
|
return /* @__PURE__ */ w(
|
|
2701
2705
|
Y.div,
|
|
2702
2706
|
{
|
|
@@ -2711,14 +2715,14 @@ const Ya = Te(({ src: t }) => {
|
|
|
2711
2715
|
onClick: () => o(i),
|
|
2712
2716
|
whileTap: { scale: 0.98 },
|
|
2713
2717
|
children: [
|
|
2714
|
-
/* @__PURE__ */ a(ke, { children: (
|
|
2718
|
+
/* @__PURE__ */ a(ke, { children: (l || m) && /* @__PURE__ */ a(
|
|
2715
2719
|
Y.div,
|
|
2716
2720
|
{
|
|
2717
2721
|
className: N(
|
|
2718
2722
|
"zs-absolute zs-top-0.5 zs-left-2 zs-right-2 zs-bottom-0.5 zs-rounded-lg",
|
|
2719
2723
|
I`
|
|
2720
2724
|
z-index: -1;
|
|
2721
|
-
background-color: ${((
|
|
2725
|
+
background-color: ${((p = s.token.contextMenu) == null ? void 0 : p.activeColor) || "rgba(0, 0, 0, 0.05)"};
|
|
2722
2726
|
`
|
|
2723
2727
|
),
|
|
2724
2728
|
initial: { opacity: 0 },
|
|
@@ -2739,20 +2743,20 @@ const Ya = Te(({ src: t }) => {
|
|
|
2739
2743
|
I`
|
|
2740
2744
|
font-weight: 400;
|
|
2741
2745
|
line-height: 18px;
|
|
2742
|
-
color: ${((
|
|
2746
|
+
color: ${((c = s.token.contextMenu) == null ? void 0 : c.textColor) || "#1d1d1f"};
|
|
2743
2747
|
letter-spacing: -0.28px;
|
|
2744
2748
|
`
|
|
2745
2749
|
),
|
|
2746
2750
|
children: i
|
|
2747
2751
|
}
|
|
2748
2752
|
),
|
|
2749
|
-
|
|
2753
|
+
m && /* @__PURE__ */ a(
|
|
2750
2754
|
Y.div,
|
|
2751
2755
|
{
|
|
2752
2756
|
className: N(
|
|
2753
2757
|
"zs-flex zs-items-center zs-justify-center zs-shrink-0",
|
|
2754
2758
|
I`
|
|
2755
|
-
color: ${((
|
|
2759
|
+
color: ${((u = s.token.contextMenu) == null ? void 0 : u.textColor) || "#1d1d1f"};
|
|
2756
2760
|
width: 18px;
|
|
2757
2761
|
height: 18px;
|
|
2758
2762
|
`
|
|
@@ -2774,24 +2778,24 @@ const Ya = Te(({ src: t }) => {
|
|
|
2774
2778
|
showSizeButton: n = !0,
|
|
2775
2779
|
animationOrigin: s = "center",
|
|
2776
2780
|
isOpen: i = !0,
|
|
2777
|
-
onInfoClick:
|
|
2778
|
-
onShareClick:
|
|
2779
|
-
onRemoveClick:
|
|
2780
|
-
} = t, { contextMenu:
|
|
2781
|
+
onInfoClick: l,
|
|
2782
|
+
onShareClick: m,
|
|
2783
|
+
onRemoveClick: p
|
|
2784
|
+
} = t, { contextMenu: c, setContextMenu: u, hideContextMenu: f, setShowInfoItemData: d, removeItem: z, updateItemConfig: v } = De(), { typeConfigMap: x, dataTypeMenuConfigMap: g, theme: k } = be(), [h, b] = E(null), { data: y } = c ?? {}, { config: C = {} } = y ?? {}, L = () => {
|
|
2781
2785
|
var V;
|
|
2782
|
-
return lt(((V =
|
|
2786
|
+
return lt(((V = c == null ? void 0 : c.data) == null ? void 0 : V.type) || "app", x).sizeConfigs.map((T) => T.name);
|
|
2783
2787
|
}, R = () => {
|
|
2784
2788
|
var V;
|
|
2785
|
-
const U = (V =
|
|
2786
|
-
return !U || !
|
|
2789
|
+
const U = (V = c == null ? void 0 : c.data) == null ? void 0 : V.dataType;
|
|
2790
|
+
return !U || !g ? [] : g[U] || [];
|
|
2787
2791
|
}, X = {
|
|
2788
|
-
setContextMenu:
|
|
2789
|
-
hideContextMenu:
|
|
2790
|
-
setShowInfoItemData:
|
|
2792
|
+
setContextMenu: u,
|
|
2793
|
+
hideContextMenu: f,
|
|
2794
|
+
setShowInfoItemData: d,
|
|
2791
2795
|
removeItem: z,
|
|
2792
2796
|
updateItemConfig: v
|
|
2793
2797
|
};
|
|
2794
|
-
return /* @__PURE__ */ a(ke, { children:
|
|
2798
|
+
return /* @__PURE__ */ a(ke, { children: c && i && /* @__PURE__ */ a(It.Provider, { value: { hoveredIndex: h, setHoveredIndex: b }, children: /* @__PURE__ */ w(
|
|
2795
2799
|
Mo,
|
|
2796
2800
|
{
|
|
2797
2801
|
style: {
|
|
@@ -2807,11 +2811,11 @@ const Ya = Te(({ src: t }) => {
|
|
|
2807
2811
|
textColor: ((ee = k.token.contextMenu) == null ? void 0 : ee.dangerColor) || "#ff3b30",
|
|
2808
2812
|
index: 0,
|
|
2809
2813
|
onClick: () => {
|
|
2810
|
-
if (
|
|
2811
|
-
|
|
2814
|
+
if (p) {
|
|
2815
|
+
p(c.data, z);
|
|
2812
2816
|
return;
|
|
2813
2817
|
}
|
|
2814
|
-
|
|
2818
|
+
u(null), z(c.data.id);
|
|
2815
2819
|
}
|
|
2816
2820
|
}
|
|
2817
2821
|
),
|
|
@@ -2822,8 +2826,8 @@ const Ya = Te(({ src: t }) => {
|
|
|
2822
2826
|
icon: /* @__PURE__ */ a(dn, {}),
|
|
2823
2827
|
index: 1,
|
|
2824
2828
|
onClick: () => {
|
|
2825
|
-
if (
|
|
2826
|
-
|
|
2829
|
+
if (m) {
|
|
2830
|
+
m(c.data);
|
|
2827
2831
|
return;
|
|
2828
2832
|
}
|
|
2829
2833
|
}
|
|
@@ -2836,22 +2840,22 @@ const Ya = Te(({ src: t }) => {
|
|
|
2836
2840
|
icon: /* @__PURE__ */ a(un, {}),
|
|
2837
2841
|
index: 2,
|
|
2838
2842
|
onClick: () => {
|
|
2839
|
-
if (
|
|
2840
|
-
c
|
|
2843
|
+
if (l) {
|
|
2844
|
+
l(c.data);
|
|
2841
2845
|
return;
|
|
2842
2846
|
}
|
|
2843
|
-
|
|
2844
|
-
...
|
|
2845
|
-
pageX:
|
|
2846
|
-
pageY:
|
|
2847
|
-
}),
|
|
2847
|
+
d({
|
|
2848
|
+
...c.data,
|
|
2849
|
+
pageX: c.pageX,
|
|
2850
|
+
pageY: c.pageY
|
|
2851
|
+
}), f();
|
|
2848
2852
|
}
|
|
2849
2853
|
}
|
|
2850
2854
|
),
|
|
2851
2855
|
n && C.allowResize !== !1 && (() => {
|
|
2852
2856
|
var H, se;
|
|
2853
|
-
const U = lt(((H =
|
|
2854
|
-
(se =
|
|
2857
|
+
const U = lt(((H = c == null ? void 0 : c.data) == null ? void 0 : H.type) || "app", x), V = vo(
|
|
2858
|
+
(se = y == null ? void 0 : y.config) == null ? void 0 : se.sizeId,
|
|
2855
2859
|
U.sizeConfigs,
|
|
2856
2860
|
U.defaultSizeId
|
|
2857
2861
|
);
|
|
@@ -2863,7 +2867,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
2863
2867
|
currentSize: V.name,
|
|
2864
2868
|
onSizeChange: (ne) => {
|
|
2865
2869
|
const F = U.sizeConfigs.find((re) => re.name === ne);
|
|
2866
|
-
F && v(
|
|
2870
|
+
F && v(c.data.id, {
|
|
2867
2871
|
sizeId: F.id || ne
|
|
2868
2872
|
});
|
|
2869
2873
|
}
|
|
@@ -2881,7 +2885,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
2881
2885
|
textColor: U.textColor,
|
|
2882
2886
|
index: T,
|
|
2883
2887
|
onClick: () => {
|
|
2884
|
-
U.onClick && U.onClick(
|
|
2888
|
+
U.onClick && U.onClick(c.data, X);
|
|
2885
2889
|
}
|
|
2886
2890
|
},
|
|
2887
2891
|
`custom-${V}`
|
|
@@ -2902,46 +2906,46 @@ const Ya = Te(({ src: t }) => {
|
|
|
2902
2906
|
top: window.scrollY,
|
|
2903
2907
|
bottom: window.innerHeight + window.scrollY
|
|
2904
2908
|
}), ss = (t) => {
|
|
2905
|
-
const { contextMenu: e, setContextMenu: o } = De(), [r, n] = E(!1), [s, i] = E(!1), [
|
|
2909
|
+
const { contextMenu: e, setContextMenu: o } = De(), [r, n] = E(!1), [s, i] = E(!1), [l, m] = E({
|
|
2906
2910
|
left: 0,
|
|
2907
2911
|
top: 0
|
|
2908
|
-
}), [
|
|
2909
|
-
(
|
|
2910
|
-
left:
|
|
2911
|
-
right:
|
|
2912
|
-
top:
|
|
2913
|
-
bottom:
|
|
2914
|
-
width:
|
|
2915
|
-
height:
|
|
2912
|
+
}), [p, c] = E("center"), u = pe(
|
|
2913
|
+
(g) => ({
|
|
2914
|
+
left: g.left,
|
|
2915
|
+
right: g.right,
|
|
2916
|
+
top: g.top + window.scrollY,
|
|
2917
|
+
bottom: g.bottom + window.scrollY,
|
|
2918
|
+
width: g.width,
|
|
2919
|
+
height: g.height
|
|
2916
2920
|
}),
|
|
2917
2921
|
[]
|
|
2918
|
-
),
|
|
2919
|
-
const
|
|
2922
|
+
), f = pe((g, k, h, b) => {
|
|
2923
|
+
const y = as(), C = Ee.GAP;
|
|
2920
2924
|
return {
|
|
2921
|
-
left: Math.max(
|
|
2922
|
-
top: Math.max(
|
|
2925
|
+
left: Math.max(y.left + C, Math.min(g, y.right - h - C)),
|
|
2926
|
+
top: Math.max(y.top + C, Math.min(k, y.bottom - b - C))
|
|
2923
2927
|
};
|
|
2924
|
-
}, []),
|
|
2925
|
-
(
|
|
2926
|
-
const
|
|
2927
|
-
let
|
|
2928
|
-
if (
|
|
2929
|
-
if (
|
|
2930
|
-
|
|
2928
|
+
}, []), d = pe(
|
|
2929
|
+
(g, k, h) => {
|
|
2930
|
+
const b = Ee.GAP;
|
|
2931
|
+
let y = g.right + b, C = g.top;
|
|
2932
|
+
if (y + k > window.innerWidth) {
|
|
2933
|
+
if (y = g.left - k - b, y < 0) {
|
|
2934
|
+
y = g.left, C = g.bottom + b;
|
|
2931
2935
|
const L = window.innerHeight + window.scrollY;
|
|
2932
|
-
C +
|
|
2936
|
+
C + h > L && (C = g.top - h - b);
|
|
2933
2937
|
}
|
|
2934
2938
|
} else {
|
|
2935
2939
|
const L = window.innerHeight + window.scrollY;
|
|
2936
|
-
if (C +
|
|
2937
|
-
C =
|
|
2940
|
+
if (C + h > L) {
|
|
2941
|
+
C = g.bottom - h;
|
|
2938
2942
|
const R = window.scrollY;
|
|
2939
|
-
C < R +
|
|
2943
|
+
C < R + b && (C = R + b);
|
|
2940
2944
|
}
|
|
2941
2945
|
}
|
|
2942
|
-
return
|
|
2946
|
+
return f(y, C, k, h);
|
|
2943
2947
|
},
|
|
2944
|
-
[
|
|
2948
|
+
[f]
|
|
2945
2949
|
), z = e ? {
|
|
2946
2950
|
getBoundingClientRect() {
|
|
2947
2951
|
return {
|
|
@@ -2972,43 +2976,43 @@ const Ya = Te(({ src: t }) => {
|
|
|
2972
2976
|
elements: {
|
|
2973
2977
|
reference: z
|
|
2974
2978
|
}
|
|
2975
|
-
}),
|
|
2976
|
-
const
|
|
2977
|
-
return
|
|
2979
|
+
}), x = (g, k, h) => {
|
|
2980
|
+
const b = g < h.left, y = g > h.right, C = k < h.top, L = k > h.bottom;
|
|
2981
|
+
return y ? C ? "bottom left" : L ? "top left" : "center left" : b ? C ? "bottom right" : L ? "top right" : "center right" : L ? "top center" : C ? "bottom center" : "center";
|
|
2978
2982
|
};
|
|
2979
2983
|
return W(() => {
|
|
2980
2984
|
if (e) {
|
|
2981
2985
|
i(!0), n(!0);
|
|
2982
|
-
const { rect:
|
|
2986
|
+
const { rect: g } = e, k = u(g), { left: h, top: b } = d(
|
|
2983
2987
|
k,
|
|
2984
2988
|
Ee.ESTIMATED_MENU_WIDTH,
|
|
2985
2989
|
Ee.ESTIMATED_MENU_HEIGHT
|
|
2986
|
-
),
|
|
2987
|
-
|
|
2990
|
+
), y = x(h, b, k);
|
|
2991
|
+
c(y), m({ left: h, top: b });
|
|
2988
2992
|
} else {
|
|
2989
2993
|
n(!1);
|
|
2990
|
-
const
|
|
2994
|
+
const g = setTimeout(() => {
|
|
2991
2995
|
i(!1);
|
|
2992
2996
|
}, Ee.ANIMATION_DELAY);
|
|
2993
|
-
return () => clearTimeout(
|
|
2997
|
+
return () => clearTimeout(g);
|
|
2994
2998
|
}
|
|
2995
|
-
}, [e,
|
|
2999
|
+
}, [e, u, d]), W(() => {
|
|
2996
3000
|
r && v.floating.current && e && s && requestAnimationFrame(() => {
|
|
2997
|
-
const { rect:
|
|
2998
|
-
|
|
3001
|
+
const { rect: g } = e, k = u(g), h = v.floating.current, b = (h == null ? void 0 : h.offsetWidth) || Ee.ESTIMATED_MENU_WIDTH, y = (h == null ? void 0 : h.offsetHeight) || Ee.ESTIMATED_MENU_HEIGHT, { left: C, top: L } = d(k, b, y), R = x(C, L, k);
|
|
3002
|
+
c(R), m({ left: C, top: L });
|
|
2999
3003
|
});
|
|
3000
|
-
}, [r, e, v, s,
|
|
3004
|
+
}, [r, e, v, s, u, d]), W(() => {
|
|
3001
3005
|
if (!r) return;
|
|
3002
|
-
const
|
|
3003
|
-
const
|
|
3004
|
-
C && !C.contains(
|
|
3005
|
-
}, k = (
|
|
3006
|
-
|
|
3007
|
-
},
|
|
3008
|
-
document.addEventListener("mousedown",
|
|
3006
|
+
const g = (b) => {
|
|
3007
|
+
const y = b.target, C = v.floating.current;
|
|
3008
|
+
C && !C.contains(y) && o(null);
|
|
3009
|
+
}, k = (b) => {
|
|
3010
|
+
b.key === "Escape" && o(null);
|
|
3011
|
+
}, h = setTimeout(() => {
|
|
3012
|
+
document.addEventListener("mousedown", g), document.addEventListener("keydown", k);
|
|
3009
3013
|
}, Ee.EVENT_LISTENER_DELAY);
|
|
3010
3014
|
return () => {
|
|
3011
|
-
clearTimeout(
|
|
3015
|
+
clearTimeout(h), document.removeEventListener("mousedown", g), document.removeEventListener("keydown", k);
|
|
3012
3016
|
};
|
|
3013
3017
|
}, [r, o, v.floating]), s ? /* @__PURE__ */ a(En, { children: /* @__PURE__ */ a(
|
|
3014
3018
|
"div",
|
|
@@ -3016,16 +3020,16 @@ const Ya = Te(({ src: t }) => {
|
|
|
3016
3020
|
ref: v.setFloating,
|
|
3017
3021
|
style: {
|
|
3018
3022
|
position: "absolute",
|
|
3019
|
-
left:
|
|
3020
|
-
top:
|
|
3023
|
+
left: l.left,
|
|
3024
|
+
top: l.top,
|
|
3021
3025
|
zIndex: 9999,
|
|
3022
|
-
transformOrigin:
|
|
3026
|
+
transformOrigin: p
|
|
3023
3027
|
// 只设置变换原点,让内部的 motion/react 处理动画
|
|
3024
3028
|
},
|
|
3025
|
-
onMouseDown: (
|
|
3026
|
-
|
|
3029
|
+
onMouseDown: (g) => {
|
|
3030
|
+
g.stopPropagation();
|
|
3027
3031
|
},
|
|
3028
|
-
children: /* @__PURE__ */ a(rs, { ...t, animationOrigin:
|
|
3032
|
+
children: /* @__PURE__ */ a(rs, { ...t, animationOrigin: p, isOpen: r })
|
|
3029
3033
|
}
|
|
3030
3034
|
) }) : null;
|
|
3031
3035
|
}, is = We((t, e) => {
|
|
@@ -3035,38 +3039,38 @@ const Ya = Te(({ src: t }) => {
|
|
|
3035
3039
|
storageKey: n,
|
|
3036
3040
|
enableCaching: s,
|
|
3037
3041
|
theme: i,
|
|
3038
|
-
noLetters:
|
|
3039
|
-
typeConfigMap:
|
|
3040
|
-
contextMenu:
|
|
3041
|
-
contextMenuBuilder:
|
|
3042
|
-
itemBuilder:
|
|
3043
|
-
itemIconBuilder:
|
|
3044
|
-
pagingDotBuilder:
|
|
3042
|
+
noLetters: l,
|
|
3043
|
+
typeConfigMap: m,
|
|
3044
|
+
contextMenu: p,
|
|
3045
|
+
contextMenuBuilder: c,
|
|
3046
|
+
itemBuilder: u,
|
|
3047
|
+
itemIconBuilder: f,
|
|
3048
|
+
pagingDotBuilder: d,
|
|
3045
3049
|
pagingDotsBuilder: z,
|
|
3046
3050
|
...v
|
|
3047
|
-
} = t,
|
|
3051
|
+
} = t, x = {
|
|
3048
3052
|
list: o,
|
|
3049
3053
|
onChange: r,
|
|
3050
3054
|
storageKey: n,
|
|
3051
3055
|
enableCaching: s
|
|
3052
|
-
},
|
|
3056
|
+
}, g = {
|
|
3053
3057
|
theme: i,
|
|
3054
|
-
noLetters:
|
|
3055
|
-
typeConfigMap:
|
|
3058
|
+
noLetters: l,
|
|
3059
|
+
typeConfigMap: m,
|
|
3056
3060
|
dataTypeMenuConfigMap: t.dataTypeMenuConfigMap,
|
|
3057
|
-
contextMenu:
|
|
3061
|
+
contextMenu: p,
|
|
3058
3062
|
pagingDotsBuilder: z,
|
|
3059
|
-
pagingDotBuilder:
|
|
3060
|
-
itemBuilder:
|
|
3061
|
-
itemIconBuilder:
|
|
3062
|
-
contextMenuBuilder:
|
|
3063
|
+
pagingDotBuilder: d,
|
|
3064
|
+
itemBuilder: u,
|
|
3065
|
+
itemIconBuilder: f,
|
|
3066
|
+
contextMenuBuilder: c
|
|
3063
3067
|
};
|
|
3064
|
-
return /* @__PURE__ */ a(go, { ...
|
|
3068
|
+
return /* @__PURE__ */ a(go, { ...x, children: /* @__PURE__ */ w(mo, { ...g, children: [
|
|
3065
3069
|
/* @__PURE__ */ a(() => {
|
|
3066
|
-
const
|
|
3070
|
+
const h = De(), b = be();
|
|
3067
3071
|
return W(() => {
|
|
3068
|
-
e && (typeof e == "function" ? e({ state:
|
|
3069
|
-
}, [
|
|
3072
|
+
e && (typeof e == "function" ? e({ state: h, config: b }) : e.current = { state: h, config: b });
|
|
3073
|
+
}, [h, b]), null;
|
|
3070
3074
|
}, {}),
|
|
3071
3075
|
/* @__PURE__ */ a(Io, { ...v }),
|
|
3072
3076
|
/* @__PURE__ */ a(ss, {})
|
|
@@ -3462,15 +3466,15 @@ const Ya = Te(({ src: t }) => {
|
|
|
3462
3466
|
pluginConfig: n,
|
|
3463
3467
|
className: s,
|
|
3464
3468
|
theme: i = "auto",
|
|
3465
|
-
...
|
|
3466
|
-
} = t,
|
|
3467
|
-
image:
|
|
3468
|
-
diffSource:
|
|
3469
|
+
...l
|
|
3470
|
+
} = t, m = ie(null), {
|
|
3471
|
+
image: p,
|
|
3472
|
+
diffSource: c = {
|
|
3469
3473
|
viewMode: "rich-text"
|
|
3470
3474
|
},
|
|
3471
|
-
headings:
|
|
3472
|
-
link:
|
|
3473
|
-
codeBlock:
|
|
3475
|
+
headings: u,
|
|
3476
|
+
link: f,
|
|
3477
|
+
codeBlock: d,
|
|
3474
3478
|
codeMirror: z = {
|
|
3475
3479
|
codeBlockLanguages: {
|
|
3476
3480
|
js: "JavaScript",
|
|
@@ -3483,14 +3487,14 @@ const Ya = Te(({ src: t }) => {
|
|
|
3483
3487
|
directives: v = {
|
|
3484
3488
|
directiveDescriptors: [Rn]
|
|
3485
3489
|
}
|
|
3486
|
-
} = n ?? {}, [
|
|
3490
|
+
} = n ?? {}, [x, g] = E("");
|
|
3487
3491
|
return W(() => {
|
|
3488
3492
|
var k;
|
|
3489
|
-
e !== void 0 &&
|
|
3490
|
-
}, [e,
|
|
3493
|
+
e !== void 0 && m.current && ((k = m.current) == null || k.setMarkdown(e), g(e));
|
|
3494
|
+
}, [e, m]), /* @__PURE__ */ a(
|
|
3491
3495
|
Pn,
|
|
3492
3496
|
{
|
|
3493
|
-
ref:
|
|
3497
|
+
ref: m,
|
|
3494
3498
|
className: N(
|
|
3495
3499
|
us,
|
|
3496
3500
|
kt(i) ? ds : "",
|
|
@@ -3498,9 +3502,9 @@ const Ya = Te(({ src: t }) => {
|
|
|
3498
3502
|
s
|
|
3499
3503
|
),
|
|
3500
3504
|
contentEditableClassName: Lo,
|
|
3501
|
-
markdown:
|
|
3505
|
+
markdown: x,
|
|
3502
3506
|
onChange: (k) => {
|
|
3503
|
-
!e && !o &&
|
|
3507
|
+
!e && !o && g(k), o && o(k);
|
|
3504
3508
|
},
|
|
3505
3509
|
translation: r ?? cs,
|
|
3506
3510
|
plugins: [
|
|
@@ -3526,22 +3530,22 @@ const Ya = Te(({ src: t }) => {
|
|
|
3526
3530
|
/* @__PURE__ */ a(lr, {})
|
|
3527
3531
|
] })
|
|
3528
3532
|
}),
|
|
3529
|
-
$n(
|
|
3533
|
+
$n(c),
|
|
3530
3534
|
_n(),
|
|
3531
3535
|
On(),
|
|
3532
|
-
Hn(
|
|
3533
|
-
Fn(
|
|
3536
|
+
Hn(u),
|
|
3537
|
+
Fn(f),
|
|
3534
3538
|
jn(),
|
|
3535
|
-
Un(
|
|
3539
|
+
Un(p),
|
|
3536
3540
|
Gn(),
|
|
3537
3541
|
Yn(),
|
|
3538
3542
|
Vn(),
|
|
3539
|
-
Wn(
|
|
3543
|
+
Wn(d),
|
|
3540
3544
|
Xn(z),
|
|
3541
3545
|
qn(),
|
|
3542
3546
|
Zn(v)
|
|
3543
3547
|
],
|
|
3544
|
-
...
|
|
3548
|
+
...l
|
|
3545
3549
|
}
|
|
3546
3550
|
);
|
|
3547
3551
|
}, Ao = (t) => {
|
|
@@ -3558,20 +3562,20 @@ const Ya = Te(({ src: t }) => {
|
|
|
3558
3562
|
rehypePlugins: [ur],
|
|
3559
3563
|
components: {
|
|
3560
3564
|
code(s) {
|
|
3561
|
-
const { children: i, className:
|
|
3562
|
-
return
|
|
3565
|
+
const { children: i, className: l, node: m, ref: p, ...c } = s, u = /language-(\w+)/.exec(l || "");
|
|
3566
|
+
return u ? /* @__PURE__ */ a(
|
|
3563
3567
|
mr,
|
|
3564
3568
|
{
|
|
3565
|
-
...
|
|
3569
|
+
...c,
|
|
3566
3570
|
PreTag: "div",
|
|
3567
3571
|
children: String(i).replace(/\n$/, ""),
|
|
3568
|
-
language:
|
|
3572
|
+
language: u[1],
|
|
3569
3573
|
style: fr
|
|
3570
3574
|
}
|
|
3571
|
-
) : /* @__PURE__ */ a("code", { ...
|
|
3575
|
+
) : /* @__PURE__ */ a("code", { ...c, className: l, children: i });
|
|
3572
3576
|
},
|
|
3573
3577
|
img(s) {
|
|
3574
|
-
const { preview: i, ...
|
|
3578
|
+
const { preview: i, ...l } = n ?? {};
|
|
3575
3579
|
return /* @__PURE__ */ a(
|
|
3576
3580
|
gr,
|
|
3577
3581
|
{
|
|
@@ -3595,7 +3599,7 @@ const Ya = Te(({ src: t }) => {
|
|
|
3595
3599
|
className: I`
|
|
3596
3600
|
cursor: zoom-in;
|
|
3597
3601
|
`,
|
|
3598
|
-
...
|
|
3602
|
+
...l
|
|
3599
3603
|
}
|
|
3600
3604
|
);
|
|
3601
3605
|
}
|
|
@@ -3618,15 +3622,15 @@ const Mt = (t) => {
|
|
|
3618
3622
|
href: n,
|
|
3619
3623
|
children: s,
|
|
3620
3624
|
as: i = Y.div,
|
|
3621
|
-
componentClassName:
|
|
3622
|
-
titleClassName:
|
|
3623
|
-
childrenClassName:
|
|
3624
|
-
...
|
|
3625
|
-
} = t,
|
|
3625
|
+
componentClassName: l = "zs-rounded-full zs-bg-gray-200 dark:zs-bg-neutral-800",
|
|
3626
|
+
titleClassName: m = "zs-rounded-md zs-bg-gray-100 zs-border dark:zs-bg-neutral-800 dark:zs-border-neutral-900 dark:zs-text-white zs-border-gray-200 zs-text-neutral-700",
|
|
3627
|
+
childrenClassName: p,
|
|
3628
|
+
...c
|
|
3629
|
+
} = t, u = ie(null), f = Fe(e, (X) => {
|
|
3626
3630
|
var ee;
|
|
3627
|
-
const _ = ((ee =
|
|
3631
|
+
const _ = ((ee = u.current) == null ? void 0 : ee.getBoundingClientRect()) ?? { x: 0, width: 0 };
|
|
3628
3632
|
return X - _.x - _.width / 2;
|
|
3629
|
-
}),
|
|
3633
|
+
}), d = Fe(f, [-150, 0, 150], [40, 80, 40]), z = Fe(f, [-150, 0, 150], [40, 80, 40]), v = Fe(f, [-150, 0, 150], [20, 40, 20]), x = Fe(f, [-150, 0, 150], [20, 40, 20]), g = ot(d, {
|
|
3630
3634
|
mass: 0.1,
|
|
3631
3635
|
stiffness: 150,
|
|
3632
3636
|
damping: 12
|
|
@@ -3634,23 +3638,23 @@ const Mt = (t) => {
|
|
|
3634
3638
|
mass: 0.1,
|
|
3635
3639
|
stiffness: 150,
|
|
3636
3640
|
damping: 12
|
|
3637
|
-
}),
|
|
3641
|
+
}), h = ot(v, {
|
|
3638
3642
|
mass: 0.1,
|
|
3639
3643
|
stiffness: 150,
|
|
3640
3644
|
damping: 12
|
|
3641
|
-
}),
|
|
3645
|
+
}), b = ot(x, {
|
|
3642
3646
|
mass: 0.1,
|
|
3643
3647
|
stiffness: 150,
|
|
3644
3648
|
damping: 12
|
|
3645
|
-
}),
|
|
3649
|
+
}), y = Fe(h, (X) => `${X}px`), [C, L] = E(!1), R = /* @__PURE__ */ w(
|
|
3646
3650
|
i,
|
|
3647
3651
|
{
|
|
3648
|
-
ref:
|
|
3649
|
-
style: { width:
|
|
3652
|
+
ref: u,
|
|
3653
|
+
style: { width: g, height: k },
|
|
3650
3654
|
onMouseEnter: () => L(!0),
|
|
3651
3655
|
onMouseLeave: () => L(!1),
|
|
3652
|
-
className: Ze("zs-aspect-square zs-flex zs-items-center zs-justify-center zs-relative",
|
|
3653
|
-
...
|
|
3656
|
+
className: Ze("zs-aspect-square zs-flex zs-items-center zs-justify-center zs-relative", l),
|
|
3657
|
+
...c,
|
|
3654
3658
|
children: [
|
|
3655
3659
|
o && /* @__PURE__ */ a(ke, { children: C && /* @__PURE__ */ a(
|
|
3656
3660
|
Y.div,
|
|
@@ -3660,7 +3664,7 @@ const Mt = (t) => {
|
|
|
3660
3664
|
exit: { opacity: 0, y: 2, x: "-50%" },
|
|
3661
3665
|
className: Ze(
|
|
3662
3666
|
"zs-px-2 zs-py-0.5 zs-whitespace-pre zs-absolute zs-left-1/2 zs--translate-x-1/2 zs--top-8 zs-w-fit zs-text-xs",
|
|
3663
|
-
|
|
3667
|
+
m
|
|
3664
3668
|
),
|
|
3665
3669
|
children: o
|
|
3666
3670
|
}
|
|
@@ -3669,12 +3673,12 @@ const Mt = (t) => {
|
|
|
3669
3673
|
Y.div,
|
|
3670
3674
|
{
|
|
3671
3675
|
style: {
|
|
3672
|
-
width:
|
|
3673
|
-
height:
|
|
3674
|
-
fontSize:
|
|
3676
|
+
width: h,
|
|
3677
|
+
height: b,
|
|
3678
|
+
fontSize: y
|
|
3675
3679
|
},
|
|
3676
|
-
className: Ze("zs-flex zs-items-center zs-justify-center",
|
|
3677
|
-
children: typeof s == "function" ? s({ widthIcon:
|
|
3680
|
+
className: Ze("zs-flex zs-items-center zs-justify-center", p),
|
|
3681
|
+
children: typeof s == "function" ? s({ widthIcon: h, heightIcon: b, fontSizeTransform: y }) : s || r
|
|
3678
3682
|
}
|
|
3679
3683
|
)
|
|
3680
3684
|
]
|
|
@@ -3689,20 +3693,20 @@ const Mt = (t) => {
|
|
|
3689
3693
|
children: n,
|
|
3690
3694
|
mouseX: s,
|
|
3691
3695
|
as: i = Y.div
|
|
3692
|
-
} = t,
|
|
3696
|
+
} = t, l = Yt(1 / 0), m = s ?? l;
|
|
3693
3697
|
return /* @__PURE__ */ a(
|
|
3694
3698
|
i,
|
|
3695
3699
|
{
|
|
3696
|
-
onMouseMove: (
|
|
3697
|
-
onMouseLeave: () =>
|
|
3700
|
+
onMouseMove: (p) => m.set(p.pageX),
|
|
3701
|
+
onMouseLeave: () => m.set(1 / 0),
|
|
3698
3702
|
className: Ze("zs-mx-auto zs-hidden md:zs-flex zs-h-16 zs-gap-4 zs-items-end zs-px-4 zs-pb-3", o),
|
|
3699
3703
|
children: n || e.map(
|
|
3700
|
-
(
|
|
3704
|
+
(p) => r ? r(p, m) : /* @__PURE__ */ a(Mt, { mouseX: m, ...p }, p.title)
|
|
3701
3705
|
)
|
|
3702
3706
|
}
|
|
3703
3707
|
);
|
|
3704
3708
|
}, ct = (t) => {
|
|
3705
|
-
const { title: e, icon: o, href: r, index: n, totalItems: s, children: i, ...
|
|
3709
|
+
const { title: e, icon: o, href: r, index: n, totalItems: s, children: i, ...l } = t;
|
|
3706
3710
|
return /* @__PURE__ */ a(
|
|
3707
3711
|
Y.div,
|
|
3708
3712
|
{
|
|
@@ -3719,7 +3723,7 @@ const Mt = (t) => {
|
|
|
3719
3723
|
}
|
|
3720
3724
|
},
|
|
3721
3725
|
transition: { delay: (s - 1 - n) * 0.05 },
|
|
3722
|
-
...
|
|
3726
|
+
...l,
|
|
3723
3727
|
children: i || /* @__PURE__ */ a(
|
|
3724
3728
|
"a",
|
|
3725
3729
|
{
|
|
@@ -3732,24 +3736,24 @@ const Mt = (t) => {
|
|
|
3732
3736
|
e
|
|
3733
3737
|
);
|
|
3734
3738
|
}, Tt = (t) => {
|
|
3735
|
-
const { items: e = [], className: o, collapseIcon: r, autoHidden: n = !1, itemBuilder: s, children: i } = t, [
|
|
3736
|
-
|
|
3739
|
+
const { items: e = [], className: o, collapseIcon: r, autoHidden: n = !1, itemBuilder: s, children: i } = t, [l, m] = E(!1), p = () => {
|
|
3740
|
+
m(!l);
|
|
3737
3741
|
};
|
|
3738
3742
|
return /* @__PURE__ */ w("div", { className: Ze("zs-relative zs-block", n ? "md:zs-hidden" : "", o), children: [
|
|
3739
|
-
/* @__PURE__ */ a(ke, { children:
|
|
3743
|
+
/* @__PURE__ */ a(ke, { children: l && /* @__PURE__ */ a(
|
|
3740
3744
|
Y.div,
|
|
3741
3745
|
{
|
|
3742
3746
|
layoutId: "nav",
|
|
3743
3747
|
className: "zs-absolute zs-bottom-full zs-mb-2 zs-inset-x-0 zs-flex zs-flex-col zs-gap-2",
|
|
3744
3748
|
children: i || e.map(
|
|
3745
|
-
(
|
|
3749
|
+
(c, u) => s ? /* @__PURE__ */ a(ct, { ...c, index: u, totalItems: e.length, children: s(c, u, e) }, c.title) : /* @__PURE__ */ a(ct, { ...c, index: u, totalItems: e.length }, c.title)
|
|
3746
3750
|
)
|
|
3747
3751
|
}
|
|
3748
3752
|
) }),
|
|
3749
3753
|
/* @__PURE__ */ a(
|
|
3750
3754
|
"button",
|
|
3751
3755
|
{
|
|
3752
|
-
onClick:
|
|
3756
|
+
onClick: p,
|
|
3753
3757
|
className: "zs-h-10 zs-w-10 zs-rounded-full zs-bg-gray-50 dark:zs-bg-neutral-800 zs-flex zs-items-center zs-justify-center",
|
|
3754
3758
|
children: r || /* @__PURE__ */ a(kn, { className: "zs-h-5 zs-w-5 zs-text-neutral-500 dark:zs-text-neutral-400" })
|
|
3755
3759
|
}
|
|
@@ -3763,9 +3767,9 @@ const Mt = (t) => {
|
|
|
3763
3767
|
desktopItemBuilder: n,
|
|
3764
3768
|
mobileItemBuilder: s,
|
|
3765
3769
|
desktopChildren: i,
|
|
3766
|
-
mobileChildren:
|
|
3767
|
-
desktopMouseX:
|
|
3768
|
-
...
|
|
3770
|
+
mobileChildren: l,
|
|
3771
|
+
desktopMouseX: m,
|
|
3772
|
+
...p
|
|
3769
3773
|
} = t;
|
|
3770
3774
|
return /* @__PURE__ */ w(Se, { children: [
|
|
3771
3775
|
/* @__PURE__ */ a(
|
|
@@ -3775,8 +3779,8 @@ const Mt = (t) => {
|
|
|
3775
3779
|
className: o,
|
|
3776
3780
|
itemBuilder: n,
|
|
3777
3781
|
children: i,
|
|
3778
|
-
mouseX:
|
|
3779
|
-
...
|
|
3782
|
+
mouseX: m,
|
|
3783
|
+
...p
|
|
3780
3784
|
}
|
|
3781
3785
|
),
|
|
3782
3786
|
/* @__PURE__ */ a(
|
|
@@ -3785,9 +3789,9 @@ const Mt = (t) => {
|
|
|
3785
3789
|
items: e,
|
|
3786
3790
|
className: r,
|
|
3787
3791
|
itemBuilder: s,
|
|
3788
|
-
children:
|
|
3792
|
+
children: l,
|
|
3789
3793
|
autoHidden: !0,
|
|
3790
|
-
...
|
|
3794
|
+
...p
|
|
3791
3795
|
}
|
|
3792
3796
|
)
|
|
3793
3797
|
] });
|
|
@@ -3817,10 +3821,10 @@ function hs(t, e) {
|
|
|
3817
3821
|
function bs(t) {
|
|
3818
3822
|
const e = t.getBoundingClientRect(), o = t.closest('[role="dialog"]'), r = t.closest(".ProseMirror"), n = r == null ? void 0 : r.getBoundingClientRect(), s = window.pageXOffset || document.documentElement.scrollLeft, i = window.pageYOffset || document.documentElement.scrollTop;
|
|
3819
3823
|
if (o && window.getComputedStyle(o).transform !== "none") {
|
|
3820
|
-
const
|
|
3824
|
+
const l = o.getBoundingClientRect();
|
|
3821
3825
|
return {
|
|
3822
|
-
top: e.top -
|
|
3823
|
-
left: e.left -
|
|
3826
|
+
top: e.top - l.top + i,
|
|
3827
|
+
left: e.left - l.left + s,
|
|
3824
3828
|
width: e.width
|
|
3825
3829
|
};
|
|
3826
3830
|
}
|
|
@@ -3865,45 +3869,45 @@ function at(t, e) {
|
|
|
3865
3869
|
}
|
|
3866
3870
|
function ys(t) {
|
|
3867
3871
|
let e = "", o = !1;
|
|
3868
|
-
function r(
|
|
3869
|
-
if (
|
|
3870
|
-
const
|
|
3872
|
+
function r(c, u) {
|
|
3873
|
+
if (u.focus(), !c.dataTransfer) return;
|
|
3874
|
+
const f = At(
|
|
3871
3875
|
{
|
|
3872
|
-
x:
|
|
3873
|
-
y:
|
|
3876
|
+
x: c.clientX + 50 + t.dragHandleWidth,
|
|
3877
|
+
y: c.clientY
|
|
3874
3878
|
},
|
|
3875
3879
|
t
|
|
3876
3880
|
);
|
|
3877
|
-
if (!(
|
|
3878
|
-
let
|
|
3879
|
-
if (
|
|
3880
|
-
|
|
3881
|
-
const { from: z, to: v } =
|
|
3881
|
+
if (!(f instanceof Element)) return;
|
|
3882
|
+
let d = Et(f, u, t);
|
|
3883
|
+
if (d == null || d < 0) return;
|
|
3884
|
+
d = at(d, u);
|
|
3885
|
+
const { from: z, to: v } = u.state.selection, x = z - v, g = at(z, u);
|
|
3882
3886
|
let k = !1;
|
|
3883
|
-
const
|
|
3884
|
-
if (
|
|
3887
|
+
const h = u.state.doc.resolve(g);
|
|
3888
|
+
if (h.node().type.name === "doc") k = !0;
|
|
3885
3889
|
else {
|
|
3886
3890
|
const R = we.create(
|
|
3887
|
-
|
|
3888
|
-
|
|
3891
|
+
u.state.doc,
|
|
3892
|
+
h.before()
|
|
3889
3893
|
);
|
|
3890
|
-
k = !(
|
|
3894
|
+
k = !(d + 1 >= R.$from.pos && d <= R.$to.pos);
|
|
3891
3895
|
}
|
|
3892
|
-
let
|
|
3893
|
-
if (!k &&
|
|
3894
|
-
const R = we.create(
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3896
|
+
let b = u.state.selection;
|
|
3897
|
+
if (!k && x !== 0 && !(u.state.selection instanceof we)) {
|
|
3898
|
+
const R = we.create(u.state.doc, v - 1);
|
|
3899
|
+
b = sa.create(
|
|
3900
|
+
u.state.doc,
|
|
3901
|
+
d,
|
|
3898
3902
|
R.$to.pos
|
|
3899
3903
|
);
|
|
3900
|
-
} else if (
|
|
3901
|
-
const R =
|
|
3902
|
-
|
|
3904
|
+
} else if (b = we.create(u.state.doc, d), b.node.type.isInline || b.node.type.name === "tableRow") {
|
|
3905
|
+
const R = u.state.doc.resolve(b.from);
|
|
3906
|
+
b = we.create(u.state.doc, R.before());
|
|
3903
3907
|
}
|
|
3904
|
-
|
|
3905
|
-
const
|
|
3906
|
-
|
|
3908
|
+
u.dispatch(u.state.tr.setSelection(b)), u.state.selection instanceof we && u.state.selection.node.type.name === "listItem" && (e = f.parentElement.tagName);
|
|
3909
|
+
const y = u.state.selection.content(), { dom: C, text: L } = hs(u, y);
|
|
3910
|
+
c.dataTransfer.clearData(), c.dataTransfer.setData("text/html", C.innerHTML), c.dataTransfer.setData("text/plain", L), c.dataTransfer.effectAllowed = "copyMove", c.dataTransfer.setDragImage(f, 0, 0), u.dragging = { slice: y, move: c.ctrlKey };
|
|
3907
3911
|
}
|
|
3908
3912
|
let n = null;
|
|
3909
3913
|
function s() {
|
|
@@ -3912,91 +3916,91 @@ function ys(t) {
|
|
|
3912
3916
|
function i() {
|
|
3913
3917
|
n && n.classList.remove("hide");
|
|
3914
3918
|
}
|
|
3915
|
-
function c
|
|
3916
|
-
const
|
|
3917
|
-
|
|
3919
|
+
function l(c, u) {
|
|
3920
|
+
const f = at(u, c), d = we.create(c.state.doc, f);
|
|
3921
|
+
c.dispatch(c.state.tr.setSelection(d)), c.focus(), o = !0;
|
|
3918
3922
|
}
|
|
3919
|
-
function
|
|
3920
|
-
if (o =
|
|
3921
|
-
const
|
|
3923
|
+
function m(c) {
|
|
3924
|
+
if (o = c.state.selection instanceof we, o && (n != null && n.dataset.nodePos)) {
|
|
3925
|
+
const f = parseInt(n.dataset.nodePos, 10);
|
|
3922
3926
|
try {
|
|
3923
|
-
const
|
|
3924
|
-
|
|
3927
|
+
const d = c.state.doc.resolve(f);
|
|
3928
|
+
d && d.parent && d.parent.type.name !== "doc" || (o = !1, s());
|
|
3925
3929
|
} catch {
|
|
3926
3930
|
o = !1, s();
|
|
3927
3931
|
}
|
|
3928
3932
|
}
|
|
3929
3933
|
o && n && !n.classList.contains("hide") ? i() : o || s();
|
|
3930
3934
|
}
|
|
3931
|
-
function
|
|
3932
|
-
if (!(
|
|
3933
|
-
const
|
|
3934
|
-
if (!
|
|
3935
|
+
function p(c) {
|
|
3936
|
+
if (!(c.target instanceof Element)) return;
|
|
3937
|
+
const u = c.relatedTarget;
|
|
3938
|
+
if (!u) {
|
|
3935
3939
|
o || s();
|
|
3936
3940
|
return;
|
|
3937
3941
|
}
|
|
3938
|
-
const
|
|
3939
|
-
!
|
|
3942
|
+
const f = u.closest(".drag-handle") || u.classList.contains("drag-handle"), d = u.closest(".tiptap") || u.classList.contains("tiptap");
|
|
3943
|
+
!f && !d && !o && s();
|
|
3940
3944
|
}
|
|
3941
3945
|
return new ra({
|
|
3942
3946
|
key: new aa(t.pluginKey),
|
|
3943
|
-
view: (
|
|
3944
|
-
var v,
|
|
3945
|
-
const
|
|
3946
|
-
n =
|
|
3947
|
-
function
|
|
3948
|
-
r(
|
|
3947
|
+
view: (c) => {
|
|
3948
|
+
var v, x, g, k;
|
|
3949
|
+
const u = t.dragHandleSelector ? document.querySelector(t.dragHandleSelector) : null;
|
|
3950
|
+
n = u ?? document.createElement("div"), n.draggable = !0, n.dataset.dragHandle = "", n.classList.add("drag-handle");
|
|
3951
|
+
function f(h) {
|
|
3952
|
+
r(h, c);
|
|
3949
3953
|
}
|
|
3950
|
-
n.addEventListener("dragstart",
|
|
3951
|
-
function
|
|
3952
|
-
|
|
3953
|
-
const
|
|
3954
|
-
|
|
3954
|
+
n.addEventListener("dragstart", f);
|
|
3955
|
+
function d(h) {
|
|
3956
|
+
u || (h.preventDefault(), h.stopPropagation());
|
|
3957
|
+
const b = n == null ? void 0 : n.dataset.nodePos;
|
|
3958
|
+
b && l(c, parseInt(b, 10));
|
|
3955
3959
|
}
|
|
3956
|
-
n.addEventListener("click",
|
|
3957
|
-
function z(
|
|
3960
|
+
n.addEventListener("click", d);
|
|
3961
|
+
function z(h) {
|
|
3958
3962
|
s();
|
|
3959
|
-
const
|
|
3960
|
-
|
|
3963
|
+
const b = window.scrollY;
|
|
3964
|
+
h.clientY < t.scrollTreshold ? window.scrollTo({ top: b - 30, behavior: "smooth" }) : window.innerHeight - h.clientY < t.scrollTreshold && window.scrollTo({ top: b + 30, behavior: "smooth" });
|
|
3961
3965
|
}
|
|
3962
|
-
return n.addEventListener("drag", z), s(),
|
|
3966
|
+
return n.addEventListener("drag", z), s(), u || (x = (v = c == null ? void 0 : c.dom) == null ? void 0 : v.parentElement) == null || x.appendChild(n), (k = (g = c == null ? void 0 : c.dom) == null ? void 0 : g.parentElement) == null || k.addEventListener(
|
|
3963
3967
|
"mouseout",
|
|
3964
|
-
|
|
3968
|
+
p
|
|
3965
3969
|
), {
|
|
3966
3970
|
destroy: () => {
|
|
3967
|
-
var
|
|
3968
|
-
|
|
3971
|
+
var h, b, y;
|
|
3972
|
+
u || (h = n == null ? void 0 : n.remove) == null || h.call(n), n == null || n.removeEventListener("drag", z), n == null || n.removeEventListener(
|
|
3969
3973
|
"dragstart",
|
|
3970
|
-
|
|
3971
|
-
), n == null || n.removeEventListener("click",
|
|
3974
|
+
f
|
|
3975
|
+
), n == null || n.removeEventListener("click", d), n = null, (y = (b = c == null ? void 0 : c.dom) == null ? void 0 : b.parentElement) == null || y.removeEventListener(
|
|
3972
3976
|
"mouseout",
|
|
3973
|
-
|
|
3977
|
+
p
|
|
3974
3978
|
);
|
|
3975
3979
|
}
|
|
3976
3980
|
};
|
|
3977
3981
|
},
|
|
3978
3982
|
props: {
|
|
3979
3983
|
handleDOMEvents: {
|
|
3980
|
-
mousemove: (
|
|
3981
|
-
if (!
|
|
3984
|
+
mousemove: (c, u) => {
|
|
3985
|
+
if (!c.editable)
|
|
3982
3986
|
return;
|
|
3983
|
-
const
|
|
3987
|
+
const f = At(
|
|
3984
3988
|
{
|
|
3985
|
-
x:
|
|
3986
|
-
y:
|
|
3989
|
+
x: u.clientX + 50 + t.dragHandleWidth,
|
|
3990
|
+
y: u.clientY
|
|
3987
3991
|
},
|
|
3988
3992
|
t
|
|
3989
|
-
),
|
|
3990
|
-
if (!(
|
|
3993
|
+
), d = f == null ? void 0 : f.closest(".not-draggable"), z = t.excludedTags.concat(["ol", "ul"]).join(", ");
|
|
3994
|
+
if (!(f instanceof Element) || f.matches(z) || d) {
|
|
3991
3995
|
o || s();
|
|
3992
3996
|
return;
|
|
3993
3997
|
}
|
|
3994
|
-
const v = Et(
|
|
3998
|
+
const v = Et(f, c, t);
|
|
3995
3999
|
v != null && v >= 0 && (n.dataset.nodePos = String(
|
|
3996
|
-
at(v,
|
|
4000
|
+
at(v, c)
|
|
3997
4001
|
));
|
|
3998
|
-
const
|
|
3999
|
-
|
|
4002
|
+
const x = window.getComputedStyle(f), g = parseInt(x.lineHeight, 10), k = isNaN(g) ? parseInt(x.fontSize) * 1.2 : g, h = parseInt(x.paddingTop, 10), b = bs(f);
|
|
4003
|
+
b.top += (k - 24) / 2, b.top += h, f.matches("ul:not([data-type=taskList]) li, ol li") && (b.left -= t.dragHandleWidth - 28), b.width = t.dragHandleWidth, n && (n.style.position = "absolute", n.style.left = `${b.left - b.width}px`, n.style.top = `${b.top}px`, i());
|
|
4000
4004
|
},
|
|
4001
4005
|
keydown: () => {
|
|
4002
4006
|
o || s();
|
|
@@ -4005,33 +4009,33 @@ function ys(t) {
|
|
|
4005
4009
|
o || s();
|
|
4006
4010
|
},
|
|
4007
4011
|
// 在选择状态变化时更新拖拽按钮的状态
|
|
4008
|
-
selectionChange: (
|
|
4009
|
-
|
|
4012
|
+
selectionChange: (c) => {
|
|
4013
|
+
m(c);
|
|
4010
4014
|
},
|
|
4011
4015
|
// dragging class is used for CSS
|
|
4012
|
-
dragstart: (
|
|
4013
|
-
|
|
4016
|
+
dragstart: (c) => {
|
|
4017
|
+
c.dom.classList.add("dragging");
|
|
4014
4018
|
},
|
|
4015
|
-
drop: (
|
|
4016
|
-
var
|
|
4017
|
-
|
|
4018
|
-
let
|
|
4019
|
-
const
|
|
4020
|
-
left:
|
|
4021
|
-
top:
|
|
4019
|
+
drop: (c, u) => {
|
|
4020
|
+
var x;
|
|
4021
|
+
c.dom.classList.remove("dragging"), s();
|
|
4022
|
+
let f = null;
|
|
4023
|
+
const d = c.posAtCoords({
|
|
4024
|
+
left: u.clientX,
|
|
4025
|
+
top: u.clientY
|
|
4022
4026
|
});
|
|
4023
|
-
if (!
|
|
4024
|
-
const v =
|
|
4025
|
-
if (
|
|
4026
|
-
const
|
|
4027
|
+
if (!d || (c.state.selection instanceof we && (f = c.state.selection.node), !f)) return;
|
|
4028
|
+
const v = c.state.doc.resolve(d.pos).parent.type.name === "listItem";
|
|
4029
|
+
if (c.state.selection instanceof we && c.state.selection.node.type.name === "listItem" && !v && e == "OL") {
|
|
4030
|
+
const g = (x = c.state.schema.nodes.orderedList) == null ? void 0 : x.createAndFill(
|
|
4027
4031
|
null,
|
|
4028
|
-
|
|
4029
|
-
), k = new ia(la.from(
|
|
4030
|
-
|
|
4032
|
+
f
|
|
4033
|
+
), k = new ia(la.from(g), 0, 0);
|
|
4034
|
+
c.dragging = { slice: k, move: u.ctrlKey };
|
|
4031
4035
|
}
|
|
4032
4036
|
},
|
|
4033
|
-
dragend: (
|
|
4034
|
-
|
|
4037
|
+
dragend: (c) => {
|
|
4038
|
+
c.dom.classList.remove("dragging");
|
|
4035
4039
|
}
|
|
4036
4040
|
}
|
|
4037
4041
|
},
|
|
@@ -4040,17 +4044,17 @@ function ys(t) {
|
|
|
4040
4044
|
init() {
|
|
4041
4045
|
return {};
|
|
4042
4046
|
},
|
|
4043
|
-
apply(
|
|
4044
|
-
if (
|
|
4047
|
+
apply(c, u, f, d) {
|
|
4048
|
+
if (c.docChanged && n && n.dataset.nodePos) {
|
|
4045
4049
|
const z = parseInt(n.dataset.nodePos, 10);
|
|
4046
4050
|
try {
|
|
4047
|
-
const v =
|
|
4051
|
+
const v = d.doc.resolve(z);
|
|
4048
4052
|
(!v || v.parent.type.name === "doc") && (o = !1, s());
|
|
4049
4053
|
} catch {
|
|
4050
4054
|
o = !1, s();
|
|
4051
4055
|
}
|
|
4052
4056
|
}
|
|
4053
|
-
return
|
|
4057
|
+
return u;
|
|
4054
4058
|
}
|
|
4055
4059
|
}
|
|
4056
4060
|
});
|
|
@@ -4495,8 +4499,8 @@ const Os = ({ open: t, onOpenChange: e }) => {
|
|
|
4495
4499
|
onSubmit: (n) => {
|
|
4496
4500
|
const s = n.currentTarget;
|
|
4497
4501
|
n.preventDefault();
|
|
4498
|
-
const i = s[0],
|
|
4499
|
-
|
|
4502
|
+
const i = s[0], l = _s(i.value);
|
|
4503
|
+
l && (r.chain().focus().setLink({ href: l }).run(), e(!1));
|
|
4500
4504
|
},
|
|
4501
4505
|
className: "flex p-1 ",
|
|
4502
4506
|
children: [
|
|
@@ -4965,28 +4969,28 @@ const qs = ({
|
|
|
4965
4969
|
] });
|
|
4966
4970
|
};
|
|
4967
4971
|
function Js({ onOpenChange: t, options: e }) {
|
|
4968
|
-
const { editor: o } = Ie(), [r, n] = E(""), { completion: s, complete: i, isLoading:
|
|
4972
|
+
const { editor: o } = Ie(), [r, n] = E(""), { completion: s, complete: i, isLoading: l } = La({
|
|
4969
4973
|
// id: "novel",
|
|
4970
4974
|
api: "/api/generate",
|
|
4971
|
-
onResponse: (
|
|
4972
|
-
if (
|
|
4975
|
+
onResponse: (p) => {
|
|
4976
|
+
if (p.status === 429) {
|
|
4973
4977
|
Je.error("You have reached your request limit for the day.");
|
|
4974
4978
|
return;
|
|
4975
4979
|
}
|
|
4976
4980
|
},
|
|
4977
|
-
onError: (
|
|
4978
|
-
Je.error(
|
|
4981
|
+
onError: (p) => {
|
|
4982
|
+
Je.error(p.message);
|
|
4979
4983
|
},
|
|
4980
4984
|
...e
|
|
4981
|
-
}),
|
|
4985
|
+
}), m = s.length > 0;
|
|
4982
4986
|
return /* @__PURE__ */ w(Oo, { className: "w-[350px]", children: [
|
|
4983
|
-
|
|
4984
|
-
|
|
4987
|
+
m && /* @__PURE__ */ a("div", { className: "flex max-h-[400px]", children: /* @__PURE__ */ a(Bo, { children: /* @__PURE__ */ a("div", { className: "prose p-2 px-4 prose-sm", children: /* @__PURE__ */ a(ao, { children: s }) }) }) }),
|
|
4988
|
+
l && /* @__PURE__ */ w("div", { className: "flex h-12 w-full items-center px-4 text-sm font-medium text-muted-foreground text-purple-500", children: [
|
|
4985
4989
|
/* @__PURE__ */ a(wt, { size: 14, className: "mr-2 shrink-0" }),
|
|
4986
4990
|
"AI正在思考",
|
|
4987
4991
|
/* @__PURE__ */ a("div", { className: "ml-2 mt-1", children: /* @__PURE__ */ a(js, {}) })
|
|
4988
4992
|
] }),
|
|
4989
|
-
!
|
|
4993
|
+
!l && /* @__PURE__ */ w(Se, { children: [
|
|
4990
4994
|
/* @__PURE__ */ w("div", { className: "relative", children: [
|
|
4991
4995
|
/* @__PURE__ */ a(
|
|
4992
4996
|
Ho,
|
|
@@ -4994,7 +4998,7 @@ function Js({ onOpenChange: t, options: e }) {
|
|
|
4994
4998
|
value: r,
|
|
4995
4999
|
onValueChange: n,
|
|
4996
5000
|
autoFocus: !0,
|
|
4997
|
-
placeholder:
|
|
5001
|
+
placeholder: m ? "告诉AI下一步该怎么做" : "要求AI编辑或生成……",
|
|
4998
5002
|
onFocus: () => Br(o)
|
|
4999
5003
|
}
|
|
5000
5004
|
),
|
|
@@ -5008,10 +5012,10 @@ function Js({ onOpenChange: t, options: e }) {
|
|
|
5008
5012
|
return i(s, {
|
|
5009
5013
|
body: { option: "zap", command: r }
|
|
5010
5014
|
}).then(() => n(""));
|
|
5011
|
-
const
|
|
5012
|
-
|
|
5015
|
+
const p = o.state.selection.content(), c = o.storage.markdown.serializer.serialize(
|
|
5016
|
+
p.content
|
|
5013
5017
|
);
|
|
5014
|
-
i(
|
|
5018
|
+
i(c, {
|
|
5015
5019
|
body: { option: "zap", command: r }
|
|
5016
5020
|
}).then(() => n(""));
|
|
5017
5021
|
},
|
|
@@ -5019,7 +5023,7 @@ function Js({ onOpenChange: t, options: e }) {
|
|
|
5019
5023
|
}
|
|
5020
5024
|
)
|
|
5021
5025
|
] }),
|
|
5022
|
-
|
|
5026
|
+
m ? /* @__PURE__ */ a(
|
|
5023
5027
|
qs,
|
|
5024
5028
|
{
|
|
5025
5029
|
onDiscard: () => {
|
|
@@ -5030,7 +5034,7 @@ function Js({ onOpenChange: t, options: e }) {
|
|
|
5030
5034
|
) : /* @__PURE__ */ a(
|
|
5031
5035
|
Ks,
|
|
5032
5036
|
{
|
|
5033
|
-
onSelect: (
|
|
5037
|
+
onSelect: (p, c) => i(p, { body: { option: c } })
|
|
5034
5038
|
}
|
|
5035
5039
|
)
|
|
5036
5040
|
] })
|
|
@@ -5318,7 +5322,7 @@ const Qs = ({
|
|
|
5318
5322
|
},
|
|
5319
5323
|
i.key
|
|
5320
5324
|
), s = (i) => {
|
|
5321
|
-
var
|
|
5325
|
+
var l;
|
|
5322
5326
|
return /* @__PURE__ */ a(
|
|
5323
5327
|
nt.SubMenu,
|
|
5324
5328
|
{
|
|
@@ -5354,7 +5358,7 @@ const Qs = ({
|
|
|
5354
5358
|
i.label,
|
|
5355
5359
|
/* @__PURE__ */ a("div", { className: "flex-1" })
|
|
5356
5360
|
] }),
|
|
5357
|
-
children: (
|
|
5361
|
+
children: (l = i.children) == null ? void 0 : l.map(n)
|
|
5358
5362
|
},
|
|
5359
5363
|
i.key
|
|
5360
5364
|
);
|
|
@@ -5392,21 +5396,21 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5392
5396
|
o && o.state.selection instanceof we && (o.commands.deleteSelection(), o.commands.focus());
|
|
5393
5397
|
}, n = () => {
|
|
5394
5398
|
if (o && o.state.selection instanceof we) {
|
|
5395
|
-
const
|
|
5396
|
-
o.chain().insertContentAt(
|
|
5397
|
-
type:
|
|
5398
|
-
attrs: { ...
|
|
5399
|
-
content:
|
|
5399
|
+
const l = o.state.selection.node, m = o.state.selection.to;
|
|
5400
|
+
o.chain().insertContentAt(m, {
|
|
5401
|
+
type: l.type.name,
|
|
5402
|
+
attrs: { ...l.attrs },
|
|
5403
|
+
content: l.content.toJSON()
|
|
5400
5404
|
}).focus().run();
|
|
5401
5405
|
}
|
|
5402
|
-
}, s = Ct.map((
|
|
5403
|
-
key: `transform-${
|
|
5404
|
-
icon: /* @__PURE__ */ a(
|
|
5405
|
-
label:
|
|
5406
|
+
}, s = Ct.map((l) => ({
|
|
5407
|
+
key: `transform-${l.name}`,
|
|
5408
|
+
icon: /* @__PURE__ */ a(l.icon, { size: 16 }),
|
|
5409
|
+
label: l.name,
|
|
5406
5410
|
onClick: () => {
|
|
5407
|
-
o && o.state.selection instanceof we &&
|
|
5411
|
+
o && o.state.selection instanceof we && l.command(o);
|
|
5408
5412
|
},
|
|
5409
|
-
isActive:
|
|
5413
|
+
isActive: l.isActive(o)
|
|
5410
5414
|
}));
|
|
5411
5415
|
return /* @__PURE__ */ a(jo, { items: [
|
|
5412
5416
|
{
|
|
@@ -5497,14 +5501,14 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5497
5501
|
cacheKey: n = "novel-content",
|
|
5498
5502
|
enableCache: s = !1,
|
|
5499
5503
|
showSaveStatus: i = !0,
|
|
5500
|
-
showWordCount:
|
|
5501
|
-
uploadImageProps:
|
|
5502
|
-
editorRef:
|
|
5503
|
-
enableAI:
|
|
5504
|
-
aiOptions:
|
|
5505
|
-
} = t, [
|
|
5504
|
+
showWordCount: l = !0,
|
|
5505
|
+
uploadImageProps: m,
|
|
5506
|
+
editorRef: p,
|
|
5507
|
+
enableAI: c = !1,
|
|
5508
|
+
aiOptions: u
|
|
5509
|
+
} = t, [f, d] = E(
|
|
5506
5510
|
o
|
|
5507
|
-
), [z, v] = E("Saved"), [
|
|
5511
|
+
), [z, v] = E("Saved"), [x, g] = E(), [k, h] = E(!1), [b, y] = E(!1), [C, L] = E(!1), [R, X] = E(!1), _ = (T) => {
|
|
5508
5512
|
const H = new DOMParser().parseFromString(T, "text/html");
|
|
5509
5513
|
return H.querySelectorAll("pre code").forEach((se) => {
|
|
5510
5514
|
Ta.highlightElement(se);
|
|
@@ -5512,7 +5516,7 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5512
5516
|
}, ee = Jr(
|
|
5513
5517
|
async (T) => {
|
|
5514
5518
|
const H = T.getJSON();
|
|
5515
|
-
|
|
5519
|
+
g(T.storage.characterCount.words()), r == null || r(H), s && (window.localStorage.setItem(
|
|
5516
5520
|
"html-content",
|
|
5517
5521
|
_(T.getHTML())
|
|
5518
5522
|
), window.localStorage.setItem(n, JSON.stringify(H)), window.localStorage.setItem(
|
|
@@ -5522,7 +5526,7 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5522
5526
|
},
|
|
5523
5527
|
500
|
|
5524
5528
|
), U = oe(() => {
|
|
5525
|
-
if (!
|
|
5529
|
+
if (!m) return ti;
|
|
5526
5530
|
const {
|
|
5527
5531
|
beforeUpload: T,
|
|
5528
5532
|
maxSize: H,
|
|
@@ -5533,47 +5537,47 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5533
5537
|
onSuccess: ce,
|
|
5534
5538
|
onError: ae,
|
|
5535
5539
|
customUploadFn: ue
|
|
5536
|
-
} =
|
|
5540
|
+
} = m;
|
|
5537
5541
|
return so({
|
|
5538
|
-
onUpload: async (
|
|
5539
|
-
let
|
|
5542
|
+
onUpload: async (me) => {
|
|
5543
|
+
let ge;
|
|
5540
5544
|
if (ue)
|
|
5541
|
-
|
|
5545
|
+
ge = ue(me);
|
|
5542
5546
|
else {
|
|
5543
|
-
const
|
|
5544
|
-
|
|
5547
|
+
const fe = new FormData();
|
|
5548
|
+
fe.append(re || "file", me), ge = fetch(se, {
|
|
5545
5549
|
method: F || "POST",
|
|
5546
5550
|
headers: {
|
|
5547
5551
|
...ne
|
|
5548
5552
|
},
|
|
5549
|
-
body:
|
|
5553
|
+
body: fe
|
|
5550
5554
|
});
|
|
5551
5555
|
}
|
|
5552
|
-
return new Promise((
|
|
5553
|
-
|
|
5556
|
+
return new Promise((fe, $) => {
|
|
5557
|
+
ge.then(async (M) => {
|
|
5554
5558
|
if (ce) {
|
|
5555
5559
|
const S = ue ? M : await M.json();
|
|
5556
|
-
|
|
5560
|
+
fe(ce(S));
|
|
5557
5561
|
return;
|
|
5558
5562
|
}
|
|
5559
5563
|
if (ue) {
|
|
5560
5564
|
if (typeof M == "object" && M !== null && "url" in M) {
|
|
5561
|
-
|
|
5565
|
+
fe(M.url);
|
|
5562
5566
|
return;
|
|
5563
5567
|
}
|
|
5564
5568
|
if (typeof M == "object" && M !== null && "data" in M && typeof M.data == "object" && M.data !== null && "url" in M.data) {
|
|
5565
|
-
|
|
5569
|
+
fe(M.data.url);
|
|
5566
5570
|
return;
|
|
5567
5571
|
}
|
|
5568
|
-
|
|
5572
|
+
fe(M);
|
|
5569
5573
|
return;
|
|
5570
5574
|
}
|
|
5571
5575
|
if (M.status === 200) {
|
|
5572
5576
|
const { url: S } = await M.json(), P = new Image();
|
|
5573
5577
|
P.src = S, P.onload = () => {
|
|
5574
|
-
|
|
5578
|
+
fe(S);
|
|
5575
5579
|
};
|
|
5576
|
-
} else throw M.status === 401 ? (me
|
|
5580
|
+
} else throw M.status === 401 ? (fe(me), new Error(
|
|
5577
5581
|
"`BLOB_READ_WRITE_TOKEN` environment variable not found, reading image locally instead."
|
|
5578
5582
|
)) : new Error("Error uploading image. Please try again.");
|
|
5579
5583
|
}).catch((M) => {
|
|
@@ -5581,14 +5585,14 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5581
5585
|
});
|
|
5582
5586
|
});
|
|
5583
5587
|
},
|
|
5584
|
-
validateFn: (
|
|
5588
|
+
validateFn: (me) => T ? T(me) : me.type.includes("image/") ? H && me.size > H ? (console.error("File size too big (max 20MB)."), !1) : !0 : (console.error("File type not supported."), !1)
|
|
5585
5589
|
});
|
|
5586
|
-
}, [
|
|
5590
|
+
}, [m]);
|
|
5587
5591
|
if (W(() => {
|
|
5588
5592
|
if (!s) return;
|
|
5589
5593
|
const T = window.localStorage.getItem(n);
|
|
5590
|
-
|
|
5591
|
-
}, [n, s]), !
|
|
5594
|
+
d(T ? JSON.parse(T) : ri);
|
|
5595
|
+
}, [n, s]), !f) return null;
|
|
5592
5596
|
const V = [
|
|
5593
5597
|
...Ro,
|
|
5594
5598
|
ni({
|
|
@@ -5596,14 +5600,14 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5596
5600
|
})
|
|
5597
5601
|
];
|
|
5598
5602
|
return /* @__PURE__ */ w("div", { className: N("relative w-full max-w-screen-lg", e), children: [
|
|
5599
|
-
(s && i ||
|
|
5603
|
+
(s && i || l) && /* @__PURE__ */ w("div", { className: "flex absolute right-5 top-5 z-10 mb-5 gap-2", children: [
|
|
5600
5604
|
s && i && /* @__PURE__ */ a("div", { className: "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground", children: z }),
|
|
5601
|
-
|
|
5605
|
+
l && /* @__PURE__ */ w(
|
|
5602
5606
|
"div",
|
|
5603
5607
|
{
|
|
5604
|
-
className:
|
|
5608
|
+
className: x ? "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground" : "hidden",
|
|
5605
5609
|
children: [
|
|
5606
|
-
|
|
5610
|
+
x,
|
|
5607
5611
|
" Words"
|
|
5608
5612
|
]
|
|
5609
5613
|
}
|
|
@@ -5613,9 +5617,9 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5613
5617
|
Ur,
|
|
5614
5618
|
{
|
|
5615
5619
|
onCreate: ({ editor: T }) => {
|
|
5616
|
-
|
|
5620
|
+
p && (p.current = T);
|
|
5617
5621
|
},
|
|
5618
|
-
initialContent:
|
|
5622
|
+
initialContent: f,
|
|
5619
5623
|
extensions: V,
|
|
5620
5624
|
className: "relative min-h-[500px] w-full editor-content",
|
|
5621
5625
|
editorProps: {
|
|
@@ -5659,11 +5663,11 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5659
5663
|
{
|
|
5660
5664
|
open: R,
|
|
5661
5665
|
onOpenChange: X,
|
|
5662
|
-
enableAI:
|
|
5663
|
-
aiOptions:
|
|
5666
|
+
enableAI: c,
|
|
5667
|
+
aiOptions: u,
|
|
5664
5668
|
children: [
|
|
5665
|
-
|
|
5666
|
-
/* @__PURE__ */ a(Fs, { open: k, onOpenChange:
|
|
5669
|
+
c && /* @__PURE__ */ a(Ue, { orientation: "vertical" }),
|
|
5670
|
+
/* @__PURE__ */ a(Fs, { open: k, onOpenChange: h }),
|
|
5667
5671
|
/* @__PURE__ */ a(Ue, { orientation: "vertical" }),
|
|
5668
5672
|
/* @__PURE__ */ a(Os, { open: C, onOpenChange: L }),
|
|
5669
5673
|
/* @__PURE__ */ a(Ue, { orientation: "vertical" }),
|
|
@@ -5671,7 +5675,7 @@ const ai = ({ children: t, ...e }) => {
|
|
|
5671
5675
|
/* @__PURE__ */ a(Ue, { orientation: "vertical" }),
|
|
5672
5676
|
/* @__PURE__ */ a(oi, {}),
|
|
5673
5677
|
/* @__PURE__ */ a(Ue, { orientation: "vertical" }),
|
|
5674
|
-
/* @__PURE__ */ a(Bs, { open:
|
|
5678
|
+
/* @__PURE__ */ a(Bs, { open: b, onOpenChange: y })
|
|
5675
5679
|
]
|
|
5676
5680
|
}
|
|
5677
5681
|
),
|
|
@@ -5854,8 +5858,8 @@ class Ve {
|
|
|
5854
5858
|
n._container = o;
|
|
5855
5859
|
const i = n._resizeObserver;
|
|
5856
5860
|
i && (i.disconnect(), i.observe(o)), r.setProps({ ...e, styleDiffing: !1 }), n.resize();
|
|
5857
|
-
const { initialViewState:
|
|
5858
|
-
return
|
|
5861
|
+
const { initialViewState: l } = e;
|
|
5862
|
+
return l && (l.bounds ? n.fitBounds(l.bounds, { ...l.fitBoundsOptions, duration: 0 }) : r._updateViewState(l)), n.isStyleLoaded() ? n.fire("load") : n.once("style.load", () => n.fire("load")), n._update(), r;
|
|
5859
5863
|
}
|
|
5860
5864
|
/* eslint-disable complexity,max-statements */
|
|
5861
5865
|
_initialize(e) {
|
|
@@ -5871,28 +5875,28 @@ class Ve {
|
|
|
5871
5875
|
pitch: s.pitch || 0,
|
|
5872
5876
|
bearing: s.bearing || 0
|
|
5873
5877
|
}), o.gl) {
|
|
5874
|
-
const
|
|
5875
|
-
HTMLCanvasElement.prototype.getContext = () => (HTMLCanvasElement.prototype.getContext =
|
|
5878
|
+
const l = HTMLCanvasElement.prototype.getContext;
|
|
5879
|
+
HTMLCanvasElement.prototype.getContext = () => (HTMLCanvasElement.prototype.getContext = l, o.gl);
|
|
5876
5880
|
}
|
|
5877
5881
|
const i = new this._MapClass(n);
|
|
5878
5882
|
s.padding && i.setPadding(s.padding), o.cursor && (i.getCanvas().style.cursor = o.cursor), i.transformCameraUpdate = this._onCameraUpdate, i.on("style.load", () => {
|
|
5879
|
-
var
|
|
5883
|
+
var l;
|
|
5880
5884
|
this._styleComponents = {
|
|
5881
5885
|
light: i.getLight(),
|
|
5882
5886
|
sky: i.getSky(),
|
|
5883
5887
|
// @ts-ignore getProjection() does not exist in v4
|
|
5884
|
-
projection: (
|
|
5888
|
+
projection: (l = i.getProjection) == null ? void 0 : l.call(i),
|
|
5885
5889
|
terrain: i.getTerrain()
|
|
5886
5890
|
}, this._updateStyleComponents(this.props);
|
|
5887
5891
|
}), i.on("sourcedata", () => {
|
|
5888
5892
|
this._updateStyleComponents(this.props);
|
|
5889
5893
|
});
|
|
5890
|
-
for (const
|
|
5891
|
-
i.on(
|
|
5892
|
-
for (const
|
|
5893
|
-
i.on(
|
|
5894
|
-
for (const
|
|
5895
|
-
i.on(
|
|
5894
|
+
for (const l in Ht)
|
|
5895
|
+
i.on(l, this._onPointerEvent);
|
|
5896
|
+
for (const l in Ft)
|
|
5897
|
+
i.on(l, this._onCameraEvent);
|
|
5898
|
+
for (const l in jt)
|
|
5899
|
+
i.on(l, this._onEvent);
|
|
5896
5900
|
this._map = i;
|
|
5897
5901
|
}
|
|
5898
5902
|
/* eslint-enable complexity,max-statements */
|
|
@@ -5969,9 +5973,9 @@ class Ve {
|
|
|
5969
5973
|
* 2. They can be overwritten by mapStyle
|
|
5970
5974
|
*/
|
|
5971
5975
|
_updateStyleComponents({ light: e, projection: o, sky: r, terrain: n }) {
|
|
5972
|
-
var
|
|
5976
|
+
var l, m;
|
|
5973
5977
|
const s = this._map, i = this._styleComponents;
|
|
5974
|
-
s.style._loaded && (e && !ve(e, i.light) && (i.light = e, s.setLight(e)), o && !ve(o, i.projection) && o !== ((
|
|
5978
|
+
s.style._loaded && (e && !ve(e, i.light) && (i.light = e, s.setLight(e)), o && !ve(o, i.projection) && o !== ((l = i.projection) == null ? void 0 : l.type) && (i.projection = typeof o == "string" ? { type: o } : o, (m = s.setProjection) == null || m.call(s, i.projection)), r && !ve(r, i.sky) && (i.sky = r, s.setSky(r)), n !== void 0 && !ve(n, i.terrain) && (!n || s.getSource(n.source)) && (i.terrain = n, s.setTerrain(n)));
|
|
5975
5979
|
}
|
|
5976
5980
|
/* Update interaction handlers to match props */
|
|
5977
5981
|
_updateHandlers(e, o) {
|
|
@@ -5995,8 +5999,8 @@ class Ve {
|
|
|
5995
5999
|
var n;
|
|
5996
6000
|
const { props: o } = this;
|
|
5997
6001
|
if (o.interactiveLayerIds && (o.onMouseMove || o.onMouseEnter || o.onMouseLeave)) {
|
|
5998
|
-
const s = e.type, i = ((n = this._hoveredFeatures) == null ? void 0 : n.length) > 0,
|
|
5999
|
-
!
|
|
6002
|
+
const s = e.type, i = ((n = this._hoveredFeatures) == null ? void 0 : n.length) > 0, l = this._queryRenderedFeatures(e.point), m = l.length > 0;
|
|
6003
|
+
!m && i && (e.type = "mouseleave", this._onPointerEvent(e)), this._hoveredFeatures = l, m && !i && (e.type = "mouseenter", this._onPointerEvent(e)), e.type = s;
|
|
6000
6004
|
} else
|
|
6001
6005
|
this._hoveredFeatures = null;
|
|
6002
6006
|
}
|
|
@@ -6048,10 +6052,10 @@ const bi = typeof document < "u" ? Jo : W;
|
|
|
6048
6052
|
function yi(t, e) {
|
|
6049
6053
|
const { RTLTextPlugin: o, maxParallelImageRequests: r, workerCount: n, workerUrl: s } = e;
|
|
6050
6054
|
if (o && t.getRTLTextPluginStatus && t.getRTLTextPluginStatus() === "unavailable") {
|
|
6051
|
-
const { pluginUrl: i, lazy:
|
|
6052
|
-
t.setRTLTextPlugin(i, (
|
|
6053
|
-
|
|
6054
|
-
},
|
|
6055
|
+
const { pluginUrl: i, lazy: l = !0 } = typeof o == "string" ? { pluginUrl: o } : o;
|
|
6056
|
+
t.setRTLTextPlugin(i, (m) => {
|
|
6057
|
+
m && console.error(m);
|
|
6058
|
+
}, l);
|
|
6055
6059
|
}
|
|
6056
6060
|
r !== void 0 && t.setMaxParallelImageRequests(r), n !== void 0 && t.setWorkerCount(n), s !== void 0 && t.setWorkerUrl(s);
|
|
6057
6061
|
}
|
|
@@ -6059,43 +6063,43 @@ const Xe = le.createContext(null);
|
|
|
6059
6063
|
function xi(t, e) {
|
|
6060
6064
|
const o = Le(ci), [r, n] = E(null), s = ie(), { current: i } = ie({ mapLib: null, map: null });
|
|
6061
6065
|
W(() => {
|
|
6062
|
-
const
|
|
6063
|
-
let
|
|
6064
|
-
return Promise.resolve(
|
|
6065
|
-
if (!
|
|
6066
|
+
const p = t.mapLib;
|
|
6067
|
+
let c = !0, u;
|
|
6068
|
+
return Promise.resolve(p || import("maplibre-gl")).then((f) => {
|
|
6069
|
+
if (!c)
|
|
6066
6070
|
return;
|
|
6067
|
-
if (!
|
|
6071
|
+
if (!f)
|
|
6068
6072
|
throw new Error("Invalid mapLib");
|
|
6069
|
-
const
|
|
6070
|
-
if (!
|
|
6073
|
+
const d = "Map" in f ? f : f.default;
|
|
6074
|
+
if (!d.Map)
|
|
6071
6075
|
throw new Error("Invalid mapLib");
|
|
6072
|
-
yi(
|
|
6073
|
-
}).catch((
|
|
6074
|
-
const { onError:
|
|
6075
|
-
|
|
6076
|
+
yi(d, t), t.reuseMaps && (u = Ve.reuse(t, s.current)), u || (u = new Ve(d.Map, t, s.current)), i.map = pi(u), i.mapLib = d, n(u), o == null || o.onMapMount(i.map, t.id);
|
|
6077
|
+
}).catch((f) => {
|
|
6078
|
+
const { onError: d } = t;
|
|
6079
|
+
d ? d({
|
|
6076
6080
|
type: "error",
|
|
6077
6081
|
target: null,
|
|
6078
6082
|
originalEvent: null,
|
|
6079
|
-
error:
|
|
6080
|
-
}) : console.error(
|
|
6083
|
+
error: f
|
|
6084
|
+
}) : console.error(f);
|
|
6081
6085
|
}), () => {
|
|
6082
|
-
|
|
6086
|
+
c = !1, u && (o == null || o.onMapUnmount(t.id), t.reuseMaps ? u.recycle() : u.destroy());
|
|
6083
6087
|
};
|
|
6084
6088
|
}, []), bi(() => {
|
|
6085
6089
|
r && r.setProps(t);
|
|
6086
6090
|
}), et(e, () => i.map, [r]);
|
|
6087
|
-
const
|
|
6091
|
+
const l = oe(() => ({
|
|
6088
6092
|
position: "relative",
|
|
6089
6093
|
width: "100%",
|
|
6090
6094
|
height: "100%",
|
|
6091
6095
|
...t.style
|
|
6092
|
-
}), [t.style]),
|
|
6096
|
+
}), [t.style]), m = {
|
|
6093
6097
|
height: "100%"
|
|
6094
6098
|
};
|
|
6095
|
-
return le.createElement("div", { id: t.id, ref: s, style:
|
|
6099
|
+
return le.createElement("div", { id: t.id, ref: s, style: l }, r && le.createElement(
|
|
6096
6100
|
Xe.Provider,
|
|
6097
6101
|
{ value: i },
|
|
6098
|
-
le.createElement("div", { "mapboxgl-children": "", style:
|
|
6102
|
+
le.createElement("div", { "mapboxgl-children": "", style: m }, t.children)
|
|
6099
6103
|
));
|
|
6100
6104
|
}
|
|
6101
6105
|
const vi = le.forwardRef(xi), ki = /box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;
|
|
@@ -6123,75 +6127,75 @@ function Ut(t) {
|
|
|
6123
6127
|
}
|
|
6124
6128
|
const yt = Te(We((t, e) => {
|
|
6125
6129
|
const { map: o, mapLib: r } = Le(Xe), n = ie({ props: t }), s = oe(() => {
|
|
6126
|
-
let
|
|
6127
|
-
le.Children.forEach(t.children, (
|
|
6128
|
-
|
|
6130
|
+
let g = !1;
|
|
6131
|
+
le.Children.forEach(t.children, (b) => {
|
|
6132
|
+
b && (g = !0);
|
|
6129
6133
|
});
|
|
6130
6134
|
const k = {
|
|
6131
6135
|
...t,
|
|
6132
|
-
element:
|
|
6133
|
-
},
|
|
6134
|
-
return
|
|
6135
|
-
var
|
|
6136
|
-
(C = (
|
|
6136
|
+
element: g ? document.createElement("div") : void 0
|
|
6137
|
+
}, h = new r.Marker(k);
|
|
6138
|
+
return h.setLngLat([t.longitude, t.latitude]), h.getElement().addEventListener("click", (b) => {
|
|
6139
|
+
var y, C;
|
|
6140
|
+
(C = (y = n.current.props).onClick) == null || C.call(y, {
|
|
6137
6141
|
type: "click",
|
|
6138
|
-
target:
|
|
6139
|
-
originalEvent:
|
|
6142
|
+
target: h,
|
|
6143
|
+
originalEvent: b
|
|
6140
6144
|
});
|
|
6141
|
-
}),
|
|
6145
|
+
}), h.on("dragstart", (b) => {
|
|
6142
6146
|
var C, L;
|
|
6143
|
-
const
|
|
6144
|
-
|
|
6145
|
-
}),
|
|
6147
|
+
const y = b;
|
|
6148
|
+
y.lngLat = s.getLngLat(), (L = (C = n.current.props).onDragStart) == null || L.call(C, y);
|
|
6149
|
+
}), h.on("drag", (b) => {
|
|
6146
6150
|
var C, L;
|
|
6147
|
-
const
|
|
6148
|
-
|
|
6149
|
-
}),
|
|
6151
|
+
const y = b;
|
|
6152
|
+
y.lngLat = s.getLngLat(), (L = (C = n.current.props).onDrag) == null || L.call(C, y);
|
|
6153
|
+
}), h.on("dragend", (b) => {
|
|
6150
6154
|
var C, L;
|
|
6151
|
-
const
|
|
6152
|
-
|
|
6153
|
-
}),
|
|
6155
|
+
const y = b;
|
|
6156
|
+
y.lngLat = s.getLngLat(), (L = (C = n.current.props).onDragEnd) == null || L.call(C, y);
|
|
6157
|
+
}), h;
|
|
6154
6158
|
}, []);
|
|
6155
6159
|
W(() => (s.addTo(o.getMap()), () => {
|
|
6156
6160
|
s.remove();
|
|
6157
6161
|
}), []);
|
|
6158
|
-
const { longitude: i, latitude:
|
|
6162
|
+
const { longitude: i, latitude: l, offset: m, style: p, draggable: c = !1, popup: u = null, rotation: f = 0, rotationAlignment: d = "auto", pitchAlignment: z = "auto" } = t;
|
|
6159
6163
|
W(() => {
|
|
6160
|
-
Ae(s.getElement(),
|
|
6161
|
-
}, [
|
|
6164
|
+
Ae(s.getElement(), p);
|
|
6165
|
+
}, [p]), et(e, () => s, []);
|
|
6162
6166
|
const v = n.current.props;
|
|
6163
|
-
(s.getLngLat().lng !== i || s.getLngLat().lat !==
|
|
6164
|
-
const
|
|
6165
|
-
if (
|
|
6166
|
-
for (const
|
|
6167
|
-
s.toggleClassName(
|
|
6167
|
+
(s.getLngLat().lng !== i || s.getLngLat().lat !== l) && s.setLngLat([i, l]), m && !di(s.getOffset(), m) && s.setOffset(m), s.isDraggable() !== c && s.setDraggable(c), s.getRotation() !== f && s.setRotation(f), s.getRotationAlignment() !== d && s.setRotationAlignment(d), s.getPitchAlignment() !== z && s.setPitchAlignment(z), s.getPopup() !== u && s.setPopup(u);
|
|
6168
|
+
const x = Go(v.className, t.className);
|
|
6169
|
+
if (x)
|
|
6170
|
+
for (const g of x)
|
|
6171
|
+
s.toggleClassName(g);
|
|
6168
6172
|
return n.current.props = t, co(t.children, s.getElement());
|
|
6169
6173
|
}));
|
|
6170
6174
|
Te(We((t, e) => {
|
|
6171
6175
|
const { map: o, mapLib: r } = Le(Xe), n = oe(() => document.createElement("div"), []), s = ie({ props: t }), i = oe(() => {
|
|
6172
|
-
const
|
|
6173
|
-
return
|
|
6174
|
-
var
|
|
6175
|
-
(
|
|
6176
|
-
}),
|
|
6176
|
+
const l = { ...t }, m = new r.Popup(l);
|
|
6177
|
+
return m.setLngLat([t.longitude, t.latitude]), m.once("open", (p) => {
|
|
6178
|
+
var c, u;
|
|
6179
|
+
(u = (c = s.current.props).onOpen) == null || u.call(c, p);
|
|
6180
|
+
}), m;
|
|
6177
6181
|
}, []);
|
|
6178
6182
|
if (W(() => {
|
|
6179
|
-
const
|
|
6180
|
-
var
|
|
6181
|
-
(
|
|
6183
|
+
const l = (m) => {
|
|
6184
|
+
var p, c;
|
|
6185
|
+
(c = (p = s.current.props).onClose) == null || c.call(p, m);
|
|
6182
6186
|
};
|
|
6183
|
-
return i.on("close",
|
|
6184
|
-
i.off("close",
|
|
6187
|
+
return i.on("close", l), i.setDOMContent(n).addTo(o.getMap()), () => {
|
|
6188
|
+
i.off("close", l), i.isOpen() && i.remove();
|
|
6185
6189
|
};
|
|
6186
6190
|
}, []), W(() => {
|
|
6187
6191
|
Ae(i.getElement(), t.style);
|
|
6188
6192
|
}, [t.style]), et(e, () => i, []), i.isOpen()) {
|
|
6189
|
-
const
|
|
6190
|
-
(i.getLngLat().lng !== t.longitude || i.getLngLat().lat !== t.latitude) && i.setLngLat([t.longitude, t.latitude]), t.offset && !ve(
|
|
6191
|
-
const
|
|
6192
|
-
if (
|
|
6193
|
-
for (const
|
|
6194
|
-
i.toggleClassName(
|
|
6193
|
+
const l = s.current.props;
|
|
6194
|
+
(i.getLngLat().lng !== t.longitude || i.getLngLat().lat !== t.latitude) && i.setLngLat([t.longitude, t.latitude]), t.offset && !ve(l.offset, t.offset) && i.setOffset(t.offset), (l.anchor !== t.anchor || l.maxWidth !== t.maxWidth) && (i.options.anchor = t.anchor, i.setMaxWidth(t.maxWidth));
|
|
6195
|
+
const m = Go(l.className, t.className);
|
|
6196
|
+
if (m)
|
|
6197
|
+
for (const p of m)
|
|
6198
|
+
i.toggleClassName(p);
|
|
6195
6199
|
s.current.props = t;
|
|
6196
6200
|
}
|
|
6197
6201
|
return co(t.children, n);
|
|
@@ -6199,9 +6203,9 @@ Te(We((t, e) => {
|
|
|
6199
6203
|
function He(t, e, o, r) {
|
|
6200
6204
|
const n = Le(Xe), s = oe(() => t(n), []);
|
|
6201
6205
|
return W(() => {
|
|
6202
|
-
const i = e,
|
|
6203
|
-
return
|
|
6204
|
-
|
|
6206
|
+
const i = e, l = null, m = typeof e == "function" ? e : null, { map: p } = n;
|
|
6207
|
+
return p.hasControl(s) || (p.addControl(s, i == null ? void 0 : i.position), l && l(n)), () => {
|
|
6208
|
+
m && m(n), p.hasControl(s) && p.removeControl(s);
|
|
6205
6209
|
};
|
|
6206
6210
|
}, []), s;
|
|
6207
6211
|
}
|
|
@@ -6228,21 +6232,21 @@ function wi(t, e) {
|
|
|
6228
6232
|
const s = new n.GeolocateControl(t), i = s._setupUI;
|
|
6229
6233
|
return s._setupUI = () => {
|
|
6230
6234
|
s._container.hasChildNodes() || i();
|
|
6231
|
-
}, s.on("geolocate", (
|
|
6232
|
-
var
|
|
6233
|
-
(
|
|
6234
|
-
}), s.on("error", (
|
|
6235
|
-
var
|
|
6236
|
-
(
|
|
6237
|
-
}), s.on("outofmaxbounds", (
|
|
6238
|
-
var
|
|
6239
|
-
(
|
|
6240
|
-
}), s.on("trackuserlocationstart", (
|
|
6241
|
-
var
|
|
6242
|
-
(
|
|
6243
|
-
}), s.on("trackuserlocationend", (
|
|
6244
|
-
var
|
|
6245
|
-
(
|
|
6235
|
+
}, s.on("geolocate", (l) => {
|
|
6236
|
+
var m, p;
|
|
6237
|
+
(p = (m = o.current.props).onGeolocate) == null || p.call(m, l);
|
|
6238
|
+
}), s.on("error", (l) => {
|
|
6239
|
+
var m, p;
|
|
6240
|
+
(p = (m = o.current.props).onError) == null || p.call(m, l);
|
|
6241
|
+
}), s.on("outofmaxbounds", (l) => {
|
|
6242
|
+
var m, p;
|
|
6243
|
+
(p = (m = o.current.props).onOutOfMaxBounds) == null || p.call(m, l);
|
|
6244
|
+
}), s.on("trackuserlocationstart", (l) => {
|
|
6245
|
+
var m, p;
|
|
6246
|
+
(p = (m = o.current.props).onTrackUserLocationStart) == null || p.call(m, l);
|
|
6247
|
+
}), s.on("trackuserlocationend", (l) => {
|
|
6248
|
+
var m, p;
|
|
6249
|
+
(p = (m = o.current.props).onTrackUserLocationEnd) == null || p.call(m, l);
|
|
6246
6250
|
}), s;
|
|
6247
6251
|
}, { position: t.position });
|
|
6248
6252
|
return o.current.props = t, et(e, () => r, []), W(() => {
|
|
@@ -6299,11 +6303,11 @@ function Ti(t, e, o) {
|
|
|
6299
6303
|
return null;
|
|
6300
6304
|
}
|
|
6301
6305
|
function Di(t, e, o) {
|
|
6302
|
-
var i,
|
|
6306
|
+
var i, l, m;
|
|
6303
6307
|
dt(e.id === o.id, "source id changed"), dt(e.type === o.type, "source type changed");
|
|
6304
6308
|
let r = "", n = 0;
|
|
6305
|
-
for (const
|
|
6306
|
-
|
|
6309
|
+
for (const p in e)
|
|
6310
|
+
p !== "children" && p !== "id" && !ve(o[p], e[p]) && (r = p, n++);
|
|
6307
6311
|
if (!n)
|
|
6308
6312
|
return;
|
|
6309
6313
|
const s = e.type;
|
|
@@ -6320,10 +6324,10 @@ function Di(t, e, o) {
|
|
|
6320
6324
|
(i = t.setCoordinates) == null || i.call(t, e.coordinates);
|
|
6321
6325
|
break;
|
|
6322
6326
|
case "url":
|
|
6323
|
-
(
|
|
6327
|
+
(l = t.setUrl) == null || l.call(t, e.url);
|
|
6324
6328
|
break;
|
|
6325
6329
|
case "tiles":
|
|
6326
|
-
(
|
|
6330
|
+
(m = t.setTiles) == null || m.call(t, e.tiles);
|
|
6327
6331
|
break;
|
|
6328
6332
|
default:
|
|
6329
6333
|
console.warn(`Unable to update <Source> prop: ${r}`);
|
|
@@ -6333,14 +6337,14 @@ function xt(t) {
|
|
|
6333
6337
|
const e = Le(Xe).map.getMap(), o = ie(t), [, r] = E(0), n = oe(() => t.id || `jsx-source-${Li++}`, []);
|
|
6334
6338
|
W(() => {
|
|
6335
6339
|
if (e) {
|
|
6336
|
-
const i = () => setTimeout(() => r((
|
|
6340
|
+
const i = () => setTimeout(() => r((l) => l + 1), 0);
|
|
6337
6341
|
return e.on("styledata", i), i(), () => {
|
|
6338
|
-
var
|
|
6342
|
+
var l;
|
|
6339
6343
|
if (e.off("styledata", i), e.style && e.style._loaded && e.getSource(n)) {
|
|
6340
|
-
const
|
|
6341
|
-
if (
|
|
6342
|
-
for (const
|
|
6343
|
-
|
|
6344
|
+
const m = (l = e.getStyle()) == null ? void 0 : l.layers;
|
|
6345
|
+
if (m)
|
|
6346
|
+
for (const p of m)
|
|
6347
|
+
p.source === n && e.removeLayer(p.id);
|
|
6344
6348
|
e.removeSource(n);
|
|
6345
6349
|
}
|
|
6346
6350
|
};
|
|
@@ -6354,22 +6358,22 @@ function xt(t) {
|
|
|
6354
6358
|
function Ai(t, e, o, r) {
|
|
6355
6359
|
if (dt(o.id === r.id, "layer id changed"), dt(o.type === r.type, "layer type changed"), o.type === "custom" || r.type === "custom")
|
|
6356
6360
|
return;
|
|
6357
|
-
const { layout: n = {}, paint: s = {}, filter: i, minzoom:
|
|
6358
|
-
if (
|
|
6359
|
-
const
|
|
6360
|
-
for (const
|
|
6361
|
-
ve(n[
|
|
6362
|
-
for (const
|
|
6363
|
-
n.hasOwnProperty(
|
|
6361
|
+
const { layout: n = {}, paint: s = {}, filter: i, minzoom: l, maxzoom: m, beforeId: p } = o;
|
|
6362
|
+
if (p !== r.beforeId && t.moveLayer(e, p), n !== r.layout) {
|
|
6363
|
+
const c = r.layout || {};
|
|
6364
|
+
for (const u in n)
|
|
6365
|
+
ve(n[u], c[u]) || t.setLayoutProperty(e, u, n[u]);
|
|
6366
|
+
for (const u in c)
|
|
6367
|
+
n.hasOwnProperty(u) || t.setLayoutProperty(e, u, void 0);
|
|
6364
6368
|
}
|
|
6365
6369
|
if (s !== r.paint) {
|
|
6366
|
-
const
|
|
6367
|
-
for (const
|
|
6368
|
-
ve(s[
|
|
6369
|
-
for (const
|
|
6370
|
-
s.hasOwnProperty(
|
|
6370
|
+
const c = r.paint || {};
|
|
6371
|
+
for (const u in s)
|
|
6372
|
+
ve(s[u], c[u]) || t.setPaintProperty(e, u, s[u]);
|
|
6373
|
+
for (const u in c)
|
|
6374
|
+
s.hasOwnProperty(u) || t.setPaintProperty(e, u, void 0);
|
|
6371
6375
|
}
|
|
6372
|
-
ve(i, r.filter) || t.setFilter(e, i), (
|
|
6376
|
+
ve(i, r.filter) || t.setFilter(e, i), (l !== r.minzoom || m !== r.maxzoom) && t.setLayerZoomRange(e, l, m);
|
|
6373
6377
|
}
|
|
6374
6378
|
function Ei(t, e, o) {
|
|
6375
6379
|
if (t.style && t.style._loaded && (!("source" in o) || t.getSource(o.source))) {
|
|
@@ -6382,7 +6386,7 @@ function je(t) {
|
|
|
6382
6386
|
const e = Le(Xe).map.getMap(), o = ie(t), [, r] = E(0), n = oe(() => t.id || `jsx-layer-${Ri++}`, []);
|
|
6383
6387
|
if (W(() => {
|
|
6384
6388
|
if (e) {
|
|
6385
|
-
const i = () => r((
|
|
6389
|
+
const i = () => r((l) => l + 1);
|
|
6386
6390
|
return e.on("styledata", i), i(), () => {
|
|
6387
6391
|
e.off("styledata", i), e.style && e.style._loaded && e.getLayer(n) && e.removeLayer(n);
|
|
6388
6392
|
};
|
|
@@ -6403,13 +6407,13 @@ const Pi = (t) => {
|
|
|
6403
6407
|
if (!t.geometry) return null;
|
|
6404
6408
|
try {
|
|
6405
6409
|
let e = 180, o = 90, r = -180, n = -90;
|
|
6406
|
-
const s = (
|
|
6407
|
-
if (
|
|
6408
|
-
const [
|
|
6409
|
-
e = Math.min(e,
|
|
6410
|
+
const s = (l) => {
|
|
6411
|
+
if (l.length >= 2) {
|
|
6412
|
+
const [m, p] = l;
|
|
6413
|
+
e = Math.min(e, m), o = Math.min(o, p), r = Math.max(r, m), n = Math.max(n, p);
|
|
6410
6414
|
}
|
|
6411
|
-
}, i = (
|
|
6412
|
-
Array.isArray(
|
|
6415
|
+
}, i = (l) => {
|
|
6416
|
+
Array.isArray(l) && (typeof l[0] == "number" ? s(l) : l.forEach((m) => i(m)));
|
|
6413
6417
|
};
|
|
6414
6418
|
switch (t.geometry.type) {
|
|
6415
6419
|
case "Point":
|
|
@@ -6423,9 +6427,9 @@ const Pi = (t) => {
|
|
|
6423
6427
|
t.geometry.coordinates && i(t.geometry.coordinates);
|
|
6424
6428
|
break;
|
|
6425
6429
|
case "GeometryCollection":
|
|
6426
|
-
t.geometry.geometries && t.geometry.geometries.forEach((
|
|
6427
|
-
"coordinates" in
|
|
6428
|
-
|
|
6430
|
+
t.geometry.geometries && t.geometry.geometries.forEach((l) => {
|
|
6431
|
+
"coordinates" in l && l.coordinates && i(
|
|
6432
|
+
l.coordinates
|
|
6429
6433
|
);
|
|
6430
6434
|
});
|
|
6431
6435
|
break;
|
|
@@ -6438,50 +6442,50 @@ const Pi = (t) => {
|
|
|
6438
6442
|
return null;
|
|
6439
6443
|
}, Bi = (t, e, o) => {
|
|
6440
6444
|
if (!t || !e) return [];
|
|
6441
|
-
const r = t.getBounds(), n = r.getWest(), s = r.getEast(), i = r.getSouth(),
|
|
6445
|
+
const r = t.getBounds(), n = r.getWest(), s = r.getEast(), i = r.getSouth(), l = r.getNorth(), m = Math.abs(s - n), p = Math.abs(l - i);
|
|
6442
6446
|
if (console.log("视图边界:", {
|
|
6443
6447
|
west: n,
|
|
6444
6448
|
east: s,
|
|
6445
6449
|
south: i,
|
|
6446
|
-
north:
|
|
6447
|
-
width:
|
|
6448
|
-
height:
|
|
6449
|
-
}),
|
|
6450
|
+
north: l,
|
|
6451
|
+
width: m,
|
|
6452
|
+
height: p
|
|
6453
|
+
}), m > 50 && p > 30)
|
|
6450
6454
|
return console.log("视图范围很大,返回所有省份"), [...o];
|
|
6451
|
-
const
|
|
6452
|
-
o.map((
|
|
6455
|
+
const c = [], u = new Map(
|
|
6456
|
+
o.map((f) => [f.code, f])
|
|
6453
6457
|
);
|
|
6454
|
-
if (e.features.forEach((
|
|
6455
|
-
if (!
|
|
6456
|
-
const { adcode:
|
|
6458
|
+
if (e.features.forEach((f) => {
|
|
6459
|
+
if (!f.properties || !f.properties.adcode) return;
|
|
6460
|
+
const { adcode: d } = f.properties, z = u.get(d);
|
|
6457
6461
|
if (!z) return;
|
|
6458
|
-
let v = Pi(
|
|
6462
|
+
let v = Pi(f);
|
|
6459
6463
|
if (!v && z) {
|
|
6460
|
-
const { longitude:
|
|
6461
|
-
v = [
|
|
6464
|
+
const { longitude: y, latitude: C } = z;
|
|
6465
|
+
v = [y - 2, C - 2, y + 2, C + 2];
|
|
6462
6466
|
}
|
|
6463
6467
|
if (!v) return;
|
|
6464
|
-
const [
|
|
6468
|
+
const [x, g, k, h] = v;
|
|
6465
6469
|
!(k < n || // 省份完全在视图左侧
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
}),
|
|
6470
|
-
if (
|
|
6471
|
-
const { longitude: z, latitude: v } =
|
|
6472
|
-
z >= n && z <= s && v >= i && v <=
|
|
6473
|
-
}),
|
|
6470
|
+
x > s || // 省份完全在视图右侧
|
|
6471
|
+
h < i || // 省份完全在视图下方
|
|
6472
|
+
g > l) && c.push(z);
|
|
6473
|
+
}), c.length < 3 && (console.log("找到的相交区域太少,尝试其他检查方法..."), o.forEach((f) => {
|
|
6474
|
+
if (c.some((x) => x.code === f.code)) return;
|
|
6475
|
+
const { longitude: z, latitude: v } = f;
|
|
6476
|
+
z >= n && z <= s && v >= i && v <= l && c.push(f);
|
|
6477
|
+
}), c.length < 3 && (m > 10 || p > 10))) {
|
|
6474
6478
|
console.log("扩大检查范围...");
|
|
6475
|
-
const
|
|
6476
|
-
o.forEach((
|
|
6477
|
-
if (
|
|
6478
|
-
(
|
|
6479
|
+
const f = n - 2, d = s + 2, z = i - 2, v = l + 2;
|
|
6480
|
+
o.forEach((x) => {
|
|
6481
|
+
if (c.some(
|
|
6482
|
+
(b) => b.code === x.code
|
|
6479
6483
|
)) return;
|
|
6480
|
-
const { longitude: k, latitude:
|
|
6481
|
-
k >=
|
|
6484
|
+
const { longitude: k, latitude: h } = x;
|
|
6485
|
+
k >= f && k <= d && h >= z && h <= v && c.push(x);
|
|
6482
6486
|
});
|
|
6483
6487
|
}
|
|
6484
|
-
return console.log(`找到 ${
|
|
6488
|
+
return console.log(`找到 ${c.length} 个区域与视图相交`), c;
|
|
6485
6489
|
}, Gt = "100000", $i = {
|
|
6486
6490
|
6: 0,
|
|
6487
6491
|
// 国家级别 (6位ID长度)
|
|
@@ -6505,29 +6509,29 @@ const Pi = (t) => {
|
|
|
6505
6509
|
zoomLevels: n = $i,
|
|
6506
6510
|
mapStyle: s,
|
|
6507
6511
|
style: i,
|
|
6508
|
-
onVisibleAreasChanged:
|
|
6509
|
-
cityMinZoom:
|
|
6510
|
-
districtMinZoom:
|
|
6511
|
-
fetchGeoData:
|
|
6512
|
-
children:
|
|
6512
|
+
onVisibleAreasChanged: l,
|
|
6513
|
+
cityMinZoom: m = 5,
|
|
6514
|
+
districtMinZoom: p = 7,
|
|
6515
|
+
fetchGeoData: c,
|
|
6516
|
+
children: u
|
|
6513
6517
|
}) => {
|
|
6514
|
-
const
|
|
6515
|
-
() =>
|
|
6516
|
-
[
|
|
6517
|
-
), { run:
|
|
6518
|
+
const f = ie(null), [d, z] = E(Gt), [v, x] = E(null), [g, k] = E(t), [h, b] = E([]), y = ie({}), [C, L] = E({}), [R, X] = E({}), [_, ee] = E(!1), [U, V] = E([]), [T, H] = E({}), [se, ne] = E({}), [F, re] = E(!1), [ce, ae] = E([]), ue = oe(
|
|
6519
|
+
() => c || _i,
|
|
6520
|
+
[c]
|
|
6521
|
+
), { run: me } = nn(
|
|
6518
6522
|
(D) => ue(D),
|
|
6519
6523
|
{
|
|
6520
6524
|
manual: !0,
|
|
6521
6525
|
onSuccess: (D) => {
|
|
6522
|
-
|
|
6523
|
-
const q =
|
|
6524
|
-
|
|
6526
|
+
x(D);
|
|
6527
|
+
const q = ge(D);
|
|
6528
|
+
b(q);
|
|
6525
6529
|
},
|
|
6526
6530
|
onError: (D) => {
|
|
6527
6531
|
console.error("Failed to load geo data:", D);
|
|
6528
6532
|
}
|
|
6529
6533
|
}
|
|
6530
|
-
),
|
|
6534
|
+
), ge = pe((D) => {
|
|
6531
6535
|
const q = [];
|
|
6532
6536
|
let j = 0, he = 0;
|
|
6533
6537
|
return D.features.forEach((A) => {
|
|
@@ -6554,7 +6558,7 @@ const Pi = (t) => {
|
|
|
6554
6558
|
}), console.info(
|
|
6555
6559
|
`Centroid points collection: ${j} successful, ${he} failed`
|
|
6556
6560
|
), q;
|
|
6557
|
-
}, []),
|
|
6561
|
+
}, []), fe = pe(
|
|
6558
6562
|
(D) => {
|
|
6559
6563
|
if (D.length === 0)
|
|
6560
6564
|
return;
|
|
@@ -6577,7 +6581,7 @@ const Pi = (t) => {
|
|
|
6577
6581
|
...ye,
|
|
6578
6582
|
[A.code]: J
|
|
6579
6583
|
}));
|
|
6580
|
-
const Z =
|
|
6584
|
+
const Z = ge(J);
|
|
6581
6585
|
return X((ye) => ({
|
|
6582
6586
|
...ye,
|
|
6583
6587
|
[A.code]: Z
|
|
@@ -6597,10 +6601,10 @@ const Pi = (t) => {
|
|
|
6597
6601
|
[
|
|
6598
6602
|
U,
|
|
6599
6603
|
C,
|
|
6600
|
-
|
|
6604
|
+
ge,
|
|
6601
6605
|
ue
|
|
6602
6606
|
]
|
|
6603
|
-
), $ =
|
|
6607
|
+
), $ = pe(
|
|
6604
6608
|
(D) => {
|
|
6605
6609
|
if (D.length === 0)
|
|
6606
6610
|
return;
|
|
@@ -6623,7 +6627,7 @@ const Pi = (t) => {
|
|
|
6623
6627
|
...ye,
|
|
6624
6628
|
[A.code]: J
|
|
6625
6629
|
}));
|
|
6626
|
-
const Z =
|
|
6630
|
+
const Z = ge(J);
|
|
6627
6631
|
return ne((ye) => ({
|
|
6628
6632
|
...ye,
|
|
6629
6633
|
[A.code]: Z
|
|
@@ -6640,88 +6644,88 @@ const Pi = (t) => {
|
|
|
6640
6644
|
);
|
|
6641
6645
|
});
|
|
6642
6646
|
},
|
|
6643
|
-
[ce, T,
|
|
6644
|
-
), M = oe(() => _ ? Object.values(R).flat() : [], [R, _]), S = oe(() => F ? Object.values(se).flat() : [], [se, F]), P =
|
|
6645
|
-
if (!
|
|
6647
|
+
[ce, T, ge, ue]
|
|
6648
|
+
), M = oe(() => _ ? Object.values(R).flat() : [], [R, _]), S = oe(() => F ? Object.values(se).flat() : [], [se, F]), P = pe(() => {
|
|
6649
|
+
if (!f.current || !v)
|
|
6646
6650
|
return;
|
|
6647
|
-
const D =
|
|
6651
|
+
const D = f.current.getBounds(), q = {
|
|
6648
6652
|
north: D.getNorth(),
|
|
6649
6653
|
south: D.getSouth(),
|
|
6650
6654
|
east: D.getEast(),
|
|
6651
6655
|
west: D.getWest()
|
|
6652
6656
|
};
|
|
6653
|
-
if (
|
|
6657
|
+
if (y.current.bounds && Math.abs(y.current.bounds.north - q.north) < 1e-4 && Math.abs(y.current.bounds.south - q.south) < 1e-4 && Math.abs(y.current.bounds.east - q.east) < 1e-4 && Math.abs(y.current.bounds.west - q.west) < 1e-4)
|
|
6654
6658
|
return;
|
|
6655
6659
|
const j = Bi(
|
|
6656
|
-
|
|
6660
|
+
f.current,
|
|
6657
6661
|
v,
|
|
6658
|
-
|
|
6662
|
+
h
|
|
6659
6663
|
);
|
|
6660
|
-
if (
|
|
6664
|
+
if (y.current = {
|
|
6661
6665
|
bounds: q,
|
|
6662
6666
|
visibleAreasCount: j.length,
|
|
6663
|
-
zoom:
|
|
6664
|
-
}, console.debug("计算结果:", j.length, "个区域在视图内"),
|
|
6665
|
-
ee(!0), re(!0),
|
|
6667
|
+
zoom: g
|
|
6668
|
+
}, console.debug("计算结果:", j.length, "个区域在视图内"), l && l(j), g > p) {
|
|
6669
|
+
ee(!0), re(!0), fe(j);
|
|
6666
6670
|
const he = Object.values(R).flat().filter(
|
|
6667
6671
|
(A) => {
|
|
6668
6672
|
var J;
|
|
6669
|
-
return (J =
|
|
6673
|
+
return (J = f.current) == null ? void 0 : J.getBounds().contains([A.longitude, A.latitude]);
|
|
6670
6674
|
}
|
|
6671
6675
|
);
|
|
6672
6676
|
he.length > 0 && (console.debug(`加载${he.length}个城市的区级数据`), $(he));
|
|
6673
|
-
} else
|
|
6677
|
+
} else g > m ? (ee(!0), re(!1), fe(j)) : (ee(!1), re(!1));
|
|
6674
6678
|
}, [
|
|
6675
|
-
m,
|
|
6676
|
-
v,
|
|
6677
|
-
p,
|
|
6678
|
-
c,
|
|
6679
6679
|
f,
|
|
6680
|
-
|
|
6680
|
+
v,
|
|
6681
|
+
h,
|
|
6682
|
+
l,
|
|
6683
|
+
g,
|
|
6684
|
+
fe,
|
|
6681
6685
|
$,
|
|
6682
6686
|
R,
|
|
6683
|
-
|
|
6684
|
-
|
|
6687
|
+
m,
|
|
6688
|
+
p
|
|
6685
6689
|
]);
|
|
6686
6690
|
W(() => {
|
|
6687
|
-
|
|
6688
|
-
}, [
|
|
6689
|
-
if (
|
|
6691
|
+
me(d);
|
|
6692
|
+
}, [d, me]), W(() => {
|
|
6693
|
+
if (f.current && h.length > 0) {
|
|
6690
6694
|
const D = requestAnimationFrame(() => {
|
|
6691
6695
|
P();
|
|
6692
6696
|
});
|
|
6693
6697
|
return () => cancelAnimationFrame(D);
|
|
6694
6698
|
}
|
|
6695
|
-
}, [
|
|
6699
|
+
}, [f, h.length, P]), W(() => {
|
|
6696
6700
|
const D = setTimeout(() => {
|
|
6697
6701
|
P();
|
|
6698
6702
|
}, 50);
|
|
6699
6703
|
return () => clearTimeout(D);
|
|
6700
|
-
}, [
|
|
6701
|
-
const O =
|
|
6704
|
+
}, [g, P]);
|
|
6705
|
+
const O = pe(
|
|
6702
6706
|
(D) => {
|
|
6703
|
-
const q = D.viewState.zoom, j =
|
|
6704
|
-
if (
|
|
6705
|
-
const A =
|
|
6707
|
+
const q = D.viewState.zoom, j = y.current.zoom || g, he = Math.abs(q - j) >= 5e-3;
|
|
6708
|
+
if (f.current) {
|
|
6709
|
+
const A = f.current.getBounds(), J = {
|
|
6706
6710
|
north: A.getNorth(),
|
|
6707
6711
|
south: A.getSouth(),
|
|
6708
6712
|
east: A.getEast(),
|
|
6709
6713
|
west: A.getWest()
|
|
6710
|
-
}, Z = !
|
|
6714
|
+
}, Z = !y.current.bounds || Math.abs(y.current.bounds.north - J.north) >= 1e-3 || Math.abs(y.current.bounds.south - J.south) >= 1e-3 || Math.abs(y.current.bounds.east - J.east) >= 1e-3 || Math.abs(y.current.bounds.west - J.west) >= 1e-3;
|
|
6711
6715
|
if (he) {
|
|
6712
|
-
k(q),
|
|
6716
|
+
k(q), y.current.zoom = q;
|
|
6713
6717
|
let ye = 6;
|
|
6714
6718
|
for (const [Yo, Vo] of Object.entries(n))
|
|
6715
6719
|
q >= Vo && (ye = parseInt(Yo, 10));
|
|
6716
|
-
|
|
6720
|
+
d.length !== ye && z(Gt);
|
|
6717
6721
|
}
|
|
6718
6722
|
(Z || he) && P();
|
|
6719
6723
|
}
|
|
6720
6724
|
},
|
|
6721
|
-
[
|
|
6722
|
-
), B =
|
|
6723
|
-
|
|
6724
|
-
}, [
|
|
6725
|
+
[d, n, g, P]
|
|
6726
|
+
), B = pe(() => {
|
|
6727
|
+
h.length > 0 && f.current && P();
|
|
6728
|
+
}, [h, P]), K = oe(
|
|
6725
6729
|
() => ({
|
|
6726
6730
|
"fill-color": "#e2e8f0",
|
|
6727
6731
|
"fill-opacity": 0.6,
|
|
@@ -6833,7 +6837,7 @@ const Pi = (t) => {
|
|
|
6833
6837
|
children: /* @__PURE__ */ w(
|
|
6834
6838
|
vi,
|
|
6835
6839
|
{
|
|
6836
|
-
ref:
|
|
6840
|
+
ref: f,
|
|
6837
6841
|
initialViewState: {
|
|
6838
6842
|
longitude: e,
|
|
6839
6843
|
latitude: o,
|
|
@@ -6849,7 +6853,7 @@ const Pi = (t) => {
|
|
|
6849
6853
|
de,
|
|
6850
6854
|
ze,
|
|
6851
6855
|
" ",
|
|
6852
|
-
|
|
6856
|
+
h.map((D) => {
|
|
6853
6857
|
const q = _ && Object.keys(C).some((j) => j === D.code);
|
|
6854
6858
|
return !_ || !q ? /* @__PURE__ */ a(
|
|
6855
6859
|
yt,
|
|
@@ -6893,7 +6897,7 @@ const Pi = (t) => {
|
|
|
6893
6897
|
},
|
|
6894
6898
|
`district-${D.code}`
|
|
6895
6899
|
)),
|
|
6896
|
-
|
|
6900
|
+
u
|
|
6897
6901
|
]
|
|
6898
6902
|
}
|
|
6899
6903
|
)
|