lizaui 12.0.21 → 12.0.23
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/autocomplete/index.cjs.js +1 -1
- package/dist/autocomplete/index.cjs.js.map +1 -1
- package/dist/autocomplete/index.es.js +1 -1
- package/dist/autocomplete/index.es.js.map +1 -1
- package/dist/calendar/index.cjs.js.map +1 -1
- package/dist/calendar/index.es.js.map +1 -1
- package/dist/chunks/BaseCollection-CdxYWaH6.js.map +1 -1
- package/dist/chunks/BaseCollection-DxI8p0cP.js.map +1 -1
- package/dist/chunks/Button-Bumy9bze.js.map +1 -1
- package/dist/chunks/Button-CFYOfByw.js.map +1 -1
- package/dist/chunks/FocusScope-4TdD5fCA.js.map +1 -1
- package/dist/chunks/FocusScope-jSNMAXzg.js.map +1 -1
- package/dist/chunks/Hidden-BY45Dc0j.js.map +1 -1
- package/dist/chunks/Hidden-C55DpjMP.js.map +1 -1
- package/dist/chunks/I18nProvider-BUfkOEhQ.js.map +1 -1
- package/dist/chunks/I18nProvider-Coj9x7B8.js.map +1 -1
- package/dist/chunks/ProgressBar-542C1mif.js.map +1 -1
- package/dist/chunks/ProgressBar-BiKRsJ8m.js.map +1 -1
- package/dist/chunks/SharedElementTransition-BSCoaphV.js.map +1 -1
- package/dist/chunks/SharedElementTransition-CJVe1D_I.js.map +1 -1
- package/dist/chunks/VisuallyHidden-CTe1-RoI.js.map +1 -1
- package/dist/chunks/VisuallyHidden-DPJuOMsW.js.map +1 -1
- package/dist/chunks/chevron-right-Bfa8mqfk.js.map +1 -1
- package/dist/chunks/chevron-right-D57wjjUp.js.map +1 -1
- package/dist/chunks/chevron-up-D8XaBFJG.js.map +1 -1
- package/dist/chunks/chevron-up-Diak1VOI.js.map +1 -1
- package/dist/chunks/chevrons-up-down-BEtKEloL.js.map +1 -1
- package/dist/chunks/chevrons-up-down-Cu7ozFlE.js.map +1 -1
- package/dist/chunks/createLucideIcon-C6RDgWrQ.js.map +1 -1
- package/dist/chunks/createLucideIcon-DvjiV7vp.js.map +1 -1
- package/dist/chunks/filterDOMProps-DqJGvnmf.js.map +1 -1
- package/dist/chunks/filterDOMProps-JgzPXl3Q.js.map +1 -1
- package/dist/chunks/focusSafely-CKxVSn6H.js.map +1 -1
- package/dist/chunks/focusSafely-DfEgLKh6.js.map +1 -1
- package/dist/chunks/index-CULZAuw9.js.map +1 -1
- package/dist/chunks/index-DvmTR3H_.js.map +1 -1
- package/dist/chunks/mergeRefs-Y9oG13yB.js.map +1 -1
- package/dist/chunks/mergeRefs-t6d4XvXq.js.map +1 -1
- package/dist/chunks/number-CYgYWykt.js.map +1 -1
- package/dist/chunks/number-DDpsLN2d.js.map +1 -1
- package/dist/chunks/radio-group-BwXvYzSm.js.map +1 -1
- package/dist/chunks/radio-group-hO2beGF6.js.map +1 -1
- package/dist/chunks/scroll-area-TppWtXwO.js.map +1 -1
- package/dist/chunks/scroll-area-W95K6hNR.js.map +1 -1
- package/dist/chunks/{textarea-8fv2j5Lo.js → textarea-C-0g_4r4.js} +1119 -1002
- package/dist/chunks/textarea-C-0g_4r4.js.map +1 -0
- package/dist/chunks/{textarea-DNdGuFw8.js → textarea-DUJqX13u.js} +1120 -1003
- package/dist/chunks/textarea-DUJqX13u.js.map +1 -0
- package/dist/chunks/useFormReset-BYRGk5vb.js.map +1 -1
- package/dist/chunks/useFormReset-Bgv2ktIE.js.map +1 -1
- package/dist/chunks/{useHasTabbableChild-kl2T5gEX.js → useHasTabbableChild-3an_bW0u.js} +2 -2
- package/dist/chunks/useHasTabbableChild-3an_bW0u.js.map +1 -0
- package/dist/chunks/{useHasTabbableChild-CSJ0P5QT.js → useHasTabbableChild-PNwltE9y.js} +2 -2
- package/dist/chunks/useHasTabbableChild-PNwltE9y.js.map +1 -0
- package/dist/chunks/useHover-BHCSbkLb.js.map +1 -1
- package/dist/chunks/useHover-D9f9xyxz.js.map +1 -1
- package/dist/chunks/useLabel-CzhH-Tov.js.map +1 -1
- package/dist/chunks/useLabel-YLbDMN-c.js.map +1 -1
- package/dist/chunks/useLabels-BiXnWBSL.js.map +1 -1
- package/dist/chunks/useLabels-Bl0mJafM.js.map +1 -1
- package/dist/chunks/useMove-DeuS9PRx.js.map +1 -1
- package/dist/chunks/useMove-Xpbmb6OD.js.map +1 -1
- package/dist/chunks/usePress-Arf10jW0.js.map +1 -1
- package/dist/chunks/usePress-B1yQk_p8.js.map +1 -1
- package/dist/chunks/useProgressBar-BsO-Q5JP.js.map +1 -1
- package/dist/chunks/useProgressBar-d2k0k8r0.js.map +1 -1
- package/dist/chunks/useSlot-CFaaZeQE.js.map +1 -1
- package/dist/chunks/useSlot-TNtJf1z8.js.map +1 -1
- package/dist/chunks/utils-BCEhcDlv.js.map +1 -1
- package/dist/chunks/utils-DvHk9ofL.js.map +1 -1
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/data-table/index.cjs.js +1 -1
- package/dist/data-table/index.cjs.js.map +1 -1
- package/dist/data-table/index.es.js +1 -1
- package/dist/data-table/index.es.js.map +1 -1
- package/dist/form-tabs/index.cjs.js.map +1 -1
- package/dist/form-tabs/index.es.js.map +1 -1
- package/dist/lizaui.css +9 -9
- package/dist/meter/index.cjs.js.map +1 -1
- package/dist/meter/index.es.js.map +1 -1
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +1 -1
- package/dist/slider/index.cjs.js.map +1 -1
- package/dist/slider/index.es.js.map +1 -1
- package/dist/tabs/index.cjs.js +1 -1
- package/dist/tabs/index.cjs.js.map +1 -1
- package/dist/tabs/index.es.js +1 -1
- package/dist/tabs/index.es.js.map +1 -1
- package/dist/time-input/index.cjs.js +1 -1
- package/dist/time-input/index.es.js +1 -1
- package/dist/toggle-switch/index.cjs.js.map +1 -1
- package/dist/toggle-switch/index.es.js.map +1 -1
- package/dist/toolbar/index.cjs.js.map +1 -1
- package/dist/toolbar/index.es.js.map +1 -1
- package/dist/travel-calendar/index.cjs.js +1 -1
- package/dist/travel-calendar/index.es.js +1 -1
- package/dist/ui/index.cjs.js +94 -420
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +96 -422
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +31 -31
- package/dist/chunks/textarea-8fv2j5Lo.js.map +0 -1
- package/dist/chunks/textarea-DNdGuFw8.js.map +0 -1
- package/dist/chunks/useHasTabbableChild-CSJ0P5QT.js.map +0 -1
- package/dist/chunks/useHasTabbableChild-kl2T5gEX.js.map +0 -1
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.d.ts.map +0 -1
|
@@ -908,12 +908,12 @@ const Switch = (t0) => {
|
|
|
908
908
|
return t28;
|
|
909
909
|
};
|
|
910
910
|
Switch.displayName = "Switch";
|
|
911
|
-
function
|
|
911
|
+
function De(e) {
|
|
912
912
|
const t = useId();
|
|
913
913
|
return `${e ?? t}`;
|
|
914
914
|
}
|
|
915
915
|
const ne = typeof window < "u" ? useLayoutEffect : useEffect;
|
|
916
|
-
function
|
|
916
|
+
function ye(e) {
|
|
917
917
|
const t = useRef(e);
|
|
918
918
|
return ne(() => {
|
|
919
919
|
t.current = e;
|
|
@@ -922,8 +922,8 @@ function ge(e) {
|
|
|
922
922
|
[t]
|
|
923
923
|
);
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
return
|
|
925
|
+
function Ve(...e) {
|
|
926
|
+
return ye((t) => {
|
|
927
927
|
e.forEach((n) => {
|
|
928
928
|
if (n)
|
|
929
929
|
switch (typeof n) {
|
|
@@ -939,21 +939,21 @@ function qe(...e) {
|
|
|
939
939
|
});
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function O(e, t = "Assertion error") {
|
|
943
943
|
if (!e)
|
|
944
944
|
throw Error(t);
|
|
945
945
|
}
|
|
946
946
|
createContext(null);
|
|
947
|
-
let
|
|
948
|
-
function
|
|
949
|
-
return
|
|
947
|
+
let Ye;
|
|
948
|
+
function kn() {
|
|
949
|
+
return Ye === void 0 && (typeof matchMedia == "function" ? Ye = !!matchMedia("(pointer:coarse)").matches : Ye = false), Ye;
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function ct({
|
|
952
952
|
expandHitTargets: e,
|
|
953
953
|
axis: t,
|
|
954
954
|
rect: n
|
|
955
955
|
}) {
|
|
956
|
-
const o = e ?
|
|
956
|
+
const o = e ? kn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
|
|
957
957
|
if (n.width < o) {
|
|
958
958
|
const r = o - n.width;
|
|
959
959
|
n = new DOMRect(
|
|
@@ -974,7 +974,7 @@ function ot({
|
|
|
974
974
|
}
|
|
975
975
|
return n;
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function sn(e) {
|
|
978
978
|
switch (typeof e) {
|
|
979
979
|
case "number":
|
|
980
980
|
return [e, "px"];
|
|
@@ -984,7 +984,7 @@ function Wt(e) {
|
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
|
-
class
|
|
987
|
+
class an {
|
|
988
988
|
#e = {};
|
|
989
989
|
addListener(t, n) {
|
|
990
990
|
const o = this.#e[t];
|
|
@@ -994,23 +994,24 @@ class Yt {
|
|
|
994
994
|
}
|
|
995
995
|
emit(t, n) {
|
|
996
996
|
const o = this.#e[t];
|
|
997
|
-
if (o !== void 0)
|
|
998
|
-
if (o.length === 1)
|
|
997
|
+
if (o !== void 0) {
|
|
998
|
+
if (o.length === 1) {
|
|
999
999
|
o[0].call(null, n);
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
}
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
1002
|
+
let r;
|
|
1003
|
+
const i = Array.from(o);
|
|
1004
|
+
for (let s = 0; s < i.length; s++) {
|
|
1005
|
+
const c2 = i[s];
|
|
1006
|
+
try {
|
|
1007
|
+
c2.call(null, n);
|
|
1008
|
+
} catch (a) {
|
|
1009
|
+
r ??= { error: a };
|
|
1010
1010
|
}
|
|
1011
|
-
if (r)
|
|
1012
|
-
throw i;
|
|
1013
1011
|
}
|
|
1012
|
+
if (r)
|
|
1013
|
+
throw r.error;
|
|
1014
|
+
}
|
|
1014
1015
|
}
|
|
1015
1016
|
removeAllListeners() {
|
|
1016
1017
|
this.#e = {};
|
|
@@ -1027,16 +1028,16 @@ let V = {
|
|
|
1027
1028
|
cursorFlags: 0,
|
|
1028
1029
|
state: "inactive"
|
|
1029
1030
|
};
|
|
1030
|
-
const
|
|
1031
|
-
function
|
|
1031
|
+
const mt = new an();
|
|
1032
|
+
function ie() {
|
|
1032
1033
|
return V;
|
|
1033
1034
|
}
|
|
1034
|
-
function
|
|
1035
|
-
return
|
|
1035
|
+
function pt(e) {
|
|
1036
|
+
return mt.addListener("change", e);
|
|
1036
1037
|
}
|
|
1037
|
-
function
|
|
1038
|
+
function On(e, t = [], n, o = false) {
|
|
1038
1039
|
const r = V, i = { ...V };
|
|
1039
|
-
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), V = i,
|
|
1040
|
+
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), V = i, mt.emit("change", {
|
|
1040
1041
|
prev: r,
|
|
1041
1042
|
next: i
|
|
1042
1043
|
});
|
|
@@ -1045,12 +1046,12 @@ function de(e) {
|
|
|
1045
1046
|
const t = V;
|
|
1046
1047
|
V = e, t.state === "active" && e.state !== "active" && t.didPointerMove && t.hitRegions.forEach(({ separator: n }) => {
|
|
1047
1048
|
n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
|
|
1048
|
-
}),
|
|
1049
|
+
}), mt.emit("change", {
|
|
1049
1050
|
prev: t,
|
|
1050
1051
|
next: e
|
|
1051
1052
|
});
|
|
1052
1053
|
}
|
|
1053
|
-
function
|
|
1054
|
+
function Nn(e) {
|
|
1054
1055
|
V.state !== "active" || !V.previews.some((t) => t.separator === e) || de({
|
|
1055
1056
|
...V,
|
|
1056
1057
|
previews: V.previews.map(
|
|
@@ -1058,35 +1059,33 @@ function Cn(e) {
|
|
|
1058
1059
|
)
|
|
1059
1060
|
});
|
|
1060
1061
|
}
|
|
1061
|
-
function
|
|
1062
|
+
function Gn(e) {
|
|
1062
1063
|
if (V.state === "inactive")
|
|
1063
|
-
return
|
|
1064
|
+
return;
|
|
1064
1065
|
const t = V.hitRegions.filter((o) => o.axis !== e), n = V.state === "active" && V.previews.some((o) => o.axis === e);
|
|
1065
|
-
if (t.length === V.hitRegions.length && !n)
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
de({ ...V, hitRegions: t });
|
|
1081
|
-
return true;
|
|
1066
|
+
if (!(t.length === V.hitRegions.length && !n))
|
|
1067
|
+
if (t.length === 0)
|
|
1068
|
+
de({ cursorFlags: 0, state: "inactive" });
|
|
1069
|
+
else if (V.state === "active") {
|
|
1070
|
+
const o = new Map(V.initialLayoutMap), r = new Map(V.previewLayoutMap);
|
|
1071
|
+
o.delete(e), r.delete(e), de({
|
|
1072
|
+
...V,
|
|
1073
|
+
cursorFlags: 0,
|
|
1074
|
+
hitRegions: t,
|
|
1075
|
+
initialLayoutMap: o,
|
|
1076
|
+
previewLayoutMap: r,
|
|
1077
|
+
previews: V.previews.filter((i) => i.axis !== e)
|
|
1078
|
+
});
|
|
1079
|
+
} else
|
|
1080
|
+
de({ ...V, hitRegions: t });
|
|
1082
1081
|
}
|
|
1083
|
-
const
|
|
1084
|
-
},
|
|
1085
|
-
let
|
|
1086
|
-
function
|
|
1087
|
-
return
|
|
1082
|
+
const Fn = (e) => e, st = () => {
|
|
1083
|
+
}, cn = 1, ln = 2, un = 4, dn = 8, Lt$1 = 3, Ct$1 = 12;
|
|
1084
|
+
let Xe;
|
|
1085
|
+
function Rt() {
|
|
1086
|
+
return Xe === void 0 && (Xe = false, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (Xe = true)), Xe;
|
|
1088
1087
|
}
|
|
1089
|
-
function
|
|
1088
|
+
function _n({
|
|
1090
1089
|
cursorFlags: e,
|
|
1091
1090
|
axes: t,
|
|
1092
1091
|
state: n
|
|
@@ -1112,13 +1111,13 @@ function En({
|
|
|
1112
1111
|
if (!(o === 0 && r === 0)) {
|
|
1113
1112
|
switch (n) {
|
|
1114
1113
|
case "active": {
|
|
1115
|
-
if (e &&
|
|
1116
|
-
const i = (e &
|
|
1114
|
+
if (e && Rt()) {
|
|
1115
|
+
const i = (e & cn) !== 0, s = (e & ln) !== 0, c2 = (e & un) !== 0, a = (e & dn) !== 0;
|
|
1117
1116
|
if (i)
|
|
1118
|
-
return
|
|
1117
|
+
return c2 ? "se-resize" : a ? "ne-resize" : "e-resize";
|
|
1119
1118
|
if (s)
|
|
1120
|
-
return
|
|
1121
|
-
if (
|
|
1119
|
+
return c2 ? "sw-resize" : a ? "nw-resize" : "w-resize";
|
|
1120
|
+
if (c2)
|
|
1122
1121
|
return "s-resize";
|
|
1123
1122
|
if (a)
|
|
1124
1123
|
return "n-resize";
|
|
@@ -1126,23 +1125,23 @@ function En({
|
|
|
1126
1125
|
break;
|
|
1127
1126
|
}
|
|
1128
1127
|
}
|
|
1129
|
-
return
|
|
1128
|
+
return Rt() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
1130
1129
|
}
|
|
1131
1130
|
}
|
|
1132
|
-
const
|
|
1133
|
-
function
|
|
1131
|
+
const Et$1 = /* @__PURE__ */ new WeakMap();
|
|
1132
|
+
function Mt$1(e) {
|
|
1134
1133
|
if (!e.defaultView || !e.adoptedStyleSheets)
|
|
1135
1134
|
return;
|
|
1136
|
-
let { prevStyle: t, styleSheet: n } =
|
|
1135
|
+
let { prevStyle: t, styleSheet: n } = Et$1.get(e) ?? {};
|
|
1137
1136
|
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
|
|
1138
1137
|
...e.adoptedStyleSheets,
|
|
1139
1138
|
n
|
|
1140
1139
|
]));
|
|
1141
|
-
|
|
1142
|
-
switch (o.state) {
|
|
1140
|
+
let o = ie();
|
|
1141
|
+
switch (o.state !== "inactive" && o.ownerDocument !== e && (o = { cursorFlags: 0, state: "inactive" }), o.state) {
|
|
1143
1142
|
case "active":
|
|
1144
1143
|
case "hover": {
|
|
1145
|
-
const r =
|
|
1144
|
+
const r = _n({
|
|
1146
1145
|
cursorFlags: o.cursorFlags,
|
|
1147
1146
|
axes: o.hitRegions.map((s) => s.axis),
|
|
1148
1147
|
state: o.state
|
|
@@ -1157,39 +1156,49 @@ function Ve(e) {
|
|
|
1157
1156
|
break;
|
|
1158
1157
|
}
|
|
1159
1158
|
}
|
|
1160
|
-
|
|
1159
|
+
Et$1.set(e, {
|
|
1161
1160
|
prevStyle: t,
|
|
1162
1161
|
styleSheet: n
|
|
1163
1162
|
});
|
|
1164
1163
|
}
|
|
1165
|
-
function
|
|
1164
|
+
function Pt$1(e) {
|
|
1165
|
+
return e.state === "inactive" ? void 0 : e.ownerDocument;
|
|
1166
|
+
}
|
|
1167
|
+
function Bn({
|
|
1168
|
+
next: e,
|
|
1169
|
+
prev: t
|
|
1170
|
+
}) {
|
|
1171
|
+
const n = Pt$1(t), o = Pt$1(e);
|
|
1172
|
+
n && n !== o && Mt$1(n), o && Mt$1(o);
|
|
1173
|
+
}
|
|
1174
|
+
function Te({
|
|
1166
1175
|
axis: e
|
|
1167
1176
|
}) {
|
|
1168
1177
|
const { layoutStrategy: t, orientation: n, items: o } = e;
|
|
1169
1178
|
return t ? t.calculateAvailableSize() : o.reduce((r, i) => (r += n === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r), 0);
|
|
1170
1179
|
}
|
|
1171
|
-
function
|
|
1180
|
+
function ht$1(e, t) {
|
|
1172
1181
|
const n = e.compareDocumentPosition(t);
|
|
1173
1182
|
return n & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
1174
1183
|
}
|
|
1175
|
-
function
|
|
1184
|
+
function Ge(e, t) {
|
|
1176
1185
|
return Array.from(t).sort((n, o) => {
|
|
1177
|
-
const r = e === "horizontal" ?
|
|
1178
|
-
return r !== 0 ? r :
|
|
1186
|
+
const r = e === "horizontal" ? qn(n, o) : Hn(n, o);
|
|
1187
|
+
return r !== 0 ? r : ht$1(n.element, o.element);
|
|
1179
1188
|
});
|
|
1180
1189
|
}
|
|
1181
|
-
function
|
|
1190
|
+
function qn(e, t) {
|
|
1182
1191
|
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
1183
1192
|
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
1184
1193
|
}
|
|
1185
|
-
function
|
|
1194
|
+
function Hn(e, t) {
|
|
1186
1195
|
const n = e.element.offsetTop - t.element.offsetTop;
|
|
1187
1196
|
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
1188
1197
|
}
|
|
1189
|
-
function
|
|
1198
|
+
function lt(e) {
|
|
1190
1199
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
1191
1200
|
}
|
|
1192
|
-
function
|
|
1201
|
+
function fn(e, t) {
|
|
1193
1202
|
return {
|
|
1194
1203
|
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
|
|
1195
1204
|
Math.abs(e.x - t.left),
|
|
@@ -1201,7 +1210,7 @@ function en(e, t) {
|
|
|
1201
1210
|
)
|
|
1202
1211
|
};
|
|
1203
1212
|
}
|
|
1204
|
-
function
|
|
1213
|
+
function Vn({
|
|
1205
1214
|
orientation: e,
|
|
1206
1215
|
rects: t,
|
|
1207
1216
|
targetRect: n
|
|
@@ -1212,12 +1221,12 @@ function Tn({
|
|
|
1212
1221
|
};
|
|
1213
1222
|
let r, i = Number.MAX_VALUE;
|
|
1214
1223
|
for (const s of t) {
|
|
1215
|
-
const { x:
|
|
1216
|
-
|
|
1224
|
+
const { x: c2, y: a } = fn(o, s), u = e === "horizontal" ? c2 : a;
|
|
1225
|
+
u < i && (i = u, r = s);
|
|
1217
1226
|
}
|
|
1218
|
-
return
|
|
1227
|
+
return O(r, "No rect found"), r;
|
|
1219
1228
|
}
|
|
1220
|
-
function
|
|
1229
|
+
function gt({
|
|
1221
1230
|
expandHitTargets: e = true,
|
|
1222
1231
|
axis: t,
|
|
1223
1232
|
includeDisabled: n = false
|
|
@@ -1228,30 +1237,30 @@ function ut({
|
|
|
1228
1237
|
axis: t,
|
|
1229
1238
|
includeDisabled: n
|
|
1230
1239
|
});
|
|
1231
|
-
const { element: o, orientation: r, items: i, separators: s } = t,
|
|
1240
|
+
const { element: o, orientation: r, items: i, separators: s } = t, c2 = Ge(
|
|
1232
1241
|
r,
|
|
1233
|
-
Array.from(o.children).filter(
|
|
1242
|
+
Array.from(o.children).filter(lt).filter((h) => !h.hasAttribute("data-resize-preview")).map((h) => ({ element: h }))
|
|
1234
1243
|
).map(({ element: h }) => h), a = [];
|
|
1235
|
-
let
|
|
1244
|
+
let u = false, l = false, d = -1, g, p = -1, m = 0, f, y = [];
|
|
1236
1245
|
{
|
|
1237
1246
|
let h = -1;
|
|
1238
|
-
for (const
|
|
1239
|
-
|
|
1247
|
+
for (const S of c2)
|
|
1248
|
+
S.hasAttribute("data-panel") && (h++, S.hasAttribute("data-disabled") || (m++, d === -1 && (d = h), p = h));
|
|
1240
1249
|
}
|
|
1241
1250
|
if (n || m > 1) {
|
|
1242
1251
|
let h = -1;
|
|
1243
|
-
for (const
|
|
1244
|
-
if (
|
|
1252
|
+
for (const S of c2)
|
|
1253
|
+
if (S.hasAttribute("data-panel")) {
|
|
1245
1254
|
h++;
|
|
1246
|
-
const
|
|
1247
|
-
(x) => x.element ===
|
|
1255
|
+
const z = i.find(
|
|
1256
|
+
(x) => x.element === S
|
|
1248
1257
|
);
|
|
1249
|
-
if (
|
|
1258
|
+
if (z) {
|
|
1250
1259
|
if (f) {
|
|
1251
|
-
const x = f.element.getBoundingClientRect(),
|
|
1252
|
-
let
|
|
1253
|
-
if (
|
|
1254
|
-
const
|
|
1260
|
+
const x = f.element.getBoundingClientRect(), R = S.getBoundingClientRect();
|
|
1261
|
+
let N;
|
|
1262
|
+
if (l) {
|
|
1263
|
+
const $ = r === "horizontal" ? new DOMRect(
|
|
1255
1264
|
x.right,
|
|
1256
1265
|
x.top,
|
|
1257
1266
|
0,
|
|
@@ -1261,86 +1270,86 @@ function ut({
|
|
|
1261
1270
|
x.bottom,
|
|
1262
1271
|
x.width,
|
|
1263
1272
|
0
|
|
1264
|
-
), b = r === "horizontal" ? new DOMRect(
|
|
1265
|
-
switch (
|
|
1273
|
+
), b = r === "horizontal" ? new DOMRect(R.left, R.top, 0, R.height) : new DOMRect(R.left, R.top, R.width, 0);
|
|
1274
|
+
switch (y.length) {
|
|
1266
1275
|
case 0: {
|
|
1267
|
-
|
|
1268
|
-
|
|
1276
|
+
N = [
|
|
1277
|
+
$,
|
|
1269
1278
|
b
|
|
1270
1279
|
];
|
|
1271
1280
|
break;
|
|
1272
1281
|
}
|
|
1273
1282
|
case 1: {
|
|
1274
|
-
const w =
|
|
1283
|
+
const w = y[0], v = Vn({
|
|
1275
1284
|
orientation: r,
|
|
1276
|
-
rects: [x,
|
|
1285
|
+
rects: [x, R],
|
|
1277
1286
|
targetRect: w.element.getBoundingClientRect()
|
|
1278
1287
|
});
|
|
1279
|
-
|
|
1288
|
+
N = [
|
|
1280
1289
|
w,
|
|
1281
|
-
v === x ? b :
|
|
1290
|
+
v === x ? b : $
|
|
1282
1291
|
];
|
|
1283
1292
|
break;
|
|
1284
1293
|
}
|
|
1285
1294
|
default: {
|
|
1286
|
-
|
|
1295
|
+
N = y;
|
|
1287
1296
|
break;
|
|
1288
1297
|
}
|
|
1289
1298
|
}
|
|
1290
1299
|
} else
|
|
1291
|
-
|
|
1300
|
+
y.length ? N = y : N = [
|
|
1292
1301
|
r === "horizontal" ? new DOMRect(
|
|
1293
1302
|
x.right,
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1303
|
+
R.top,
|
|
1304
|
+
R.left - x.right,
|
|
1305
|
+
R.height
|
|
1297
1306
|
) : new DOMRect(
|
|
1298
|
-
|
|
1307
|
+
R.left,
|
|
1299
1308
|
x.bottom,
|
|
1300
|
-
|
|
1301
|
-
|
|
1309
|
+
R.width,
|
|
1310
|
+
R.top - x.bottom
|
|
1302
1311
|
)
|
|
1303
1312
|
];
|
|
1304
|
-
for (const
|
|
1305
|
-
const b =
|
|
1313
|
+
for (const $ of N) {
|
|
1314
|
+
const b = ct({
|
|
1306
1315
|
expandHitTargets: e,
|
|
1307
1316
|
axis: t,
|
|
1308
|
-
rect: "width" in
|
|
1309
|
-
}), w = h <= d || h >
|
|
1310
|
-
(n || !
|
|
1317
|
+
rect: "width" in $ ? $ : $.element.getBoundingClientRect()
|
|
1318
|
+
}), w = h <= d || h > p;
|
|
1319
|
+
(n || !u && !w) && (g ??= Te({ axis: t }), a.push({
|
|
1311
1320
|
axis: t,
|
|
1312
|
-
axisSize:
|
|
1313
|
-
items: [f,
|
|
1314
|
-
separator: "width" in
|
|
1321
|
+
axisSize: g,
|
|
1322
|
+
items: [f, z],
|
|
1323
|
+
separator: "width" in $ ? void 0 : $,
|
|
1315
1324
|
rect: b
|
|
1316
|
-
})),
|
|
1325
|
+
})), u = false;
|
|
1317
1326
|
}
|
|
1318
1327
|
}
|
|
1319
|
-
|
|
1328
|
+
l = false, f = z, y = [];
|
|
1320
1329
|
}
|
|
1321
|
-
} else if (
|
|
1322
|
-
|
|
1323
|
-
const
|
|
1324
|
-
(x) => x.element ===
|
|
1330
|
+
} else if (S.hasAttribute("data-separator")) {
|
|
1331
|
+
S.ariaDisabled !== null && (u = true);
|
|
1332
|
+
const z = s.find(
|
|
1333
|
+
(x) => x.element === S
|
|
1325
1334
|
);
|
|
1326
|
-
|
|
1335
|
+
z ? y.push(z) : (f = void 0, y = []);
|
|
1327
1336
|
} else
|
|
1328
|
-
|
|
1337
|
+
l = true;
|
|
1329
1338
|
}
|
|
1330
1339
|
return a;
|
|
1331
1340
|
}
|
|
1332
|
-
function
|
|
1341
|
+
function jn(e, t) {
|
|
1333
1342
|
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
1334
1343
|
return t * o;
|
|
1335
1344
|
}
|
|
1336
|
-
function
|
|
1345
|
+
function Un(e, t) {
|
|
1337
1346
|
const n = getComputedStyle(e.ownerDocument.documentElement), o = parseFloat(n.fontSize);
|
|
1338
1347
|
return t * o;
|
|
1339
1348
|
}
|
|
1340
|
-
function
|
|
1349
|
+
function Wn(e) {
|
|
1341
1350
|
return e / 100 * window.innerHeight;
|
|
1342
1351
|
}
|
|
1343
|
-
function
|
|
1352
|
+
function Yn(e) {
|
|
1344
1353
|
return e / 100 * window.innerWidth;
|
|
1345
1354
|
}
|
|
1346
1355
|
function Ce({
|
|
@@ -1349,7 +1358,7 @@ function Ce({
|
|
|
1349
1358
|
styleProp: n
|
|
1350
1359
|
}) {
|
|
1351
1360
|
let o;
|
|
1352
|
-
const [r, i] =
|
|
1361
|
+
const [r, i] = sn(n);
|
|
1353
1362
|
switch (i) {
|
|
1354
1363
|
case "%": {
|
|
1355
1364
|
o = r / 100 * e;
|
|
@@ -1360,29 +1369,29 @@ function Ce({
|
|
|
1360
1369
|
break;
|
|
1361
1370
|
}
|
|
1362
1371
|
case "rem": {
|
|
1363
|
-
o =
|
|
1372
|
+
o = Un(t, r);
|
|
1364
1373
|
break;
|
|
1365
1374
|
}
|
|
1366
1375
|
case "em": {
|
|
1367
|
-
o =
|
|
1376
|
+
o = jn(t, r);
|
|
1368
1377
|
break;
|
|
1369
1378
|
}
|
|
1370
1379
|
case "vh": {
|
|
1371
|
-
o =
|
|
1380
|
+
o = Wn(r);
|
|
1372
1381
|
break;
|
|
1373
1382
|
}
|
|
1374
1383
|
case "vw": {
|
|
1375
|
-
o =
|
|
1384
|
+
o = Yn(r);
|
|
1376
1385
|
break;
|
|
1377
1386
|
}
|
|
1378
1387
|
}
|
|
1379
1388
|
return o;
|
|
1380
1389
|
}
|
|
1381
|
-
function
|
|
1390
|
+
function K(e) {
|
|
1382
1391
|
return parseFloat(e.toFixed(3));
|
|
1383
1392
|
}
|
|
1384
|
-
function
|
|
1385
|
-
const { items: t } = e, n =
|
|
1393
|
+
function ut(e) {
|
|
1394
|
+
const { items: t } = e, n = Te({ axis: e });
|
|
1386
1395
|
return n === 0 ? t.map((o) => ({
|
|
1387
1396
|
groupResizeBehavior: o.constraintProps.groupResizeBehavior,
|
|
1388
1397
|
collapsedSize: 0,
|
|
@@ -1401,16 +1410,16 @@ function it(e) {
|
|
|
1401
1410
|
itemElement: r,
|
|
1402
1411
|
styleProp: i.collapsedSize
|
|
1403
1412
|
});
|
|
1404
|
-
s =
|
|
1413
|
+
s = K(d / n * 100);
|
|
1405
1414
|
}
|
|
1406
|
-
let
|
|
1415
|
+
let c2;
|
|
1407
1416
|
if (i.collapsedThreshold !== void 0) {
|
|
1408
1417
|
const d = Ce({
|
|
1409
1418
|
axisSize: n,
|
|
1410
1419
|
itemElement: r,
|
|
1411
1420
|
styleProp: i.collapsedThreshold
|
|
1412
1421
|
});
|
|
1413
|
-
|
|
1422
|
+
c2 = K(d / n * 100);
|
|
1414
1423
|
}
|
|
1415
1424
|
let a;
|
|
1416
1425
|
if (i.defaultSize !== void 0) {
|
|
@@ -1419,45 +1428,66 @@ function it(e) {
|
|
|
1419
1428
|
itemElement: r,
|
|
1420
1429
|
styleProp: i.defaultSize
|
|
1421
1430
|
});
|
|
1422
|
-
a =
|
|
1431
|
+
a = K(d / n * 100);
|
|
1423
1432
|
}
|
|
1424
|
-
let
|
|
1433
|
+
let u = 0;
|
|
1425
1434
|
if (i.minSize !== void 0) {
|
|
1426
1435
|
const d = Ce({
|
|
1427
1436
|
axisSize: n,
|
|
1428
1437
|
itemElement: r,
|
|
1429
1438
|
styleProp: i.minSize
|
|
1430
1439
|
});
|
|
1431
|
-
|
|
1440
|
+
u = K(d / n * 100);
|
|
1432
1441
|
}
|
|
1433
|
-
let
|
|
1442
|
+
let l = 100;
|
|
1434
1443
|
if (i.maxSize !== void 0) {
|
|
1435
1444
|
const d = Ce({
|
|
1436
1445
|
axisSize: n,
|
|
1437
1446
|
itemElement: r,
|
|
1438
1447
|
styleProp: i.maxSize
|
|
1439
1448
|
});
|
|
1440
|
-
|
|
1449
|
+
l = K(d / n * 100);
|
|
1441
1450
|
}
|
|
1442
1451
|
return {
|
|
1443
1452
|
groupResizeBehavior: i.groupResizeBehavior,
|
|
1444
1453
|
collapsedSize: s,
|
|
1445
|
-
collapsedThreshold:
|
|
1454
|
+
collapsedThreshold: c2,
|
|
1446
1455
|
collapsible: i.collapsible === true,
|
|
1447
1456
|
defaultSize: a,
|
|
1448
1457
|
disabled: i.disabled,
|
|
1449
|
-
minSize:
|
|
1450
|
-
maxSize:
|
|
1458
|
+
minSize: u,
|
|
1459
|
+
maxSize: l,
|
|
1451
1460
|
itemId: o.id
|
|
1452
1461
|
};
|
|
1453
1462
|
});
|
|
1454
1463
|
}
|
|
1455
1464
|
let ue = /* @__PURE__ */ new Map();
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1465
|
+
const yt = new an();
|
|
1466
|
+
let Fe = 0;
|
|
1467
|
+
const Ke = [];
|
|
1468
|
+
let Je;
|
|
1469
|
+
function et() {
|
|
1470
|
+
Fe++;
|
|
1471
|
+
}
|
|
1472
|
+
function St$1() {
|
|
1473
|
+
for (let e = 0; e < Ke.length; e++)
|
|
1474
|
+
try {
|
|
1475
|
+
yt.emit("axisChange", Ke[e]);
|
|
1476
|
+
} catch (t) {
|
|
1477
|
+
Je ??= { error: t };
|
|
1478
|
+
}
|
|
1479
|
+
Ke.length = 0;
|
|
1480
|
+
}
|
|
1481
|
+
function tt() {
|
|
1482
|
+
if (Fe === 1 && St$1(), Fe--, Fe === 0 && Je) {
|
|
1483
|
+
const { error: e } = Je;
|
|
1484
|
+
throw Je = void 0, e;
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
function Xn(e) {
|
|
1458
1488
|
ue = new Map(ue), ue.delete(e);
|
|
1459
1489
|
}
|
|
1460
|
-
function
|
|
1490
|
+
function Ee(e, t) {
|
|
1461
1491
|
for (const [n] of ue)
|
|
1462
1492
|
if (n.id === e)
|
|
1463
1493
|
return n;
|
|
@@ -1469,24 +1499,33 @@ function ae(e, t) {
|
|
|
1469
1499
|
if (t)
|
|
1470
1500
|
throw Error(`Could not find data for Group with id ${e}`);
|
|
1471
1501
|
}
|
|
1472
|
-
function
|
|
1502
|
+
function ge() {
|
|
1473
1503
|
return ue;
|
|
1474
1504
|
}
|
|
1475
|
-
function
|
|
1476
|
-
return
|
|
1505
|
+
function Be(e, t) {
|
|
1506
|
+
return yt.addListener("axisChange", (n) => {
|
|
1477
1507
|
n.axis.id === e && t(n);
|
|
1478
1508
|
});
|
|
1479
1509
|
}
|
|
1480
1510
|
function fe(e, t, n) {
|
|
1481
1511
|
const o = ue.get(e);
|
|
1482
|
-
ue = new Map(ue), ue.set(e, t)
|
|
1512
|
+
ue = new Map(ue), ue.set(e, t);
|
|
1513
|
+
const r = {
|
|
1483
1514
|
axis: e,
|
|
1484
1515
|
isUserInteraction: n?.isUserInteraction === true,
|
|
1485
1516
|
prev: o,
|
|
1486
1517
|
next: t
|
|
1487
|
-
}
|
|
1518
|
+
};
|
|
1519
|
+
Fe > 0 ? Ke.push(r) : yt.emit("axisChange", r);
|
|
1520
|
+
}
|
|
1521
|
+
function mn(e, { pointerId: t, pointerType: n }) {
|
|
1522
|
+
return t === e.pointerId || // There is only one pen, but it may be assigned a new pointerId each time it comes into range
|
|
1523
|
+
n === "pen" && e.pointerType === "pen";
|
|
1488
1524
|
}
|
|
1489
|
-
function
|
|
1525
|
+
function nt$1(e, t, n = {}) {
|
|
1526
|
+
return e.ownerDocument === t && (n.pointerId === void 0 || mn(e, n));
|
|
1527
|
+
}
|
|
1528
|
+
function Kn(e, t) {
|
|
1490
1529
|
if (e.length !== t.length)
|
|
1491
1530
|
return false;
|
|
1492
1531
|
for (let n = 0; n < e.length; n++)
|
|
@@ -1495,12 +1534,12 @@ function Gn(e, t) {
|
|
|
1495
1534
|
return true;
|
|
1496
1535
|
}
|
|
1497
1536
|
function Y(e, t, n = 0) {
|
|
1498
|
-
return Math.abs(
|
|
1537
|
+
return Math.abs(K(e) - K(t)) <= n;
|
|
1499
1538
|
}
|
|
1500
|
-
function
|
|
1539
|
+
function le(e, t) {
|
|
1501
1540
|
return Y(e, t) ? 0 : e > t ? 1 : -1;
|
|
1502
1541
|
}
|
|
1503
|
-
function
|
|
1542
|
+
function Me({
|
|
1504
1543
|
overrideDisabledItems: e,
|
|
1505
1544
|
itemConstraints: t,
|
|
1506
1545
|
prevSize: n,
|
|
@@ -1510,21 +1549,21 @@ function Ee({
|
|
|
1510
1549
|
collapsedSize: r = 0,
|
|
1511
1550
|
collapsedThreshold: i,
|
|
1512
1551
|
collapsible: s,
|
|
1513
|
-
disabled:
|
|
1552
|
+
disabled: c2,
|
|
1514
1553
|
maxSize: a = 100,
|
|
1515
|
-
minSize:
|
|
1554
|
+
minSize: u = 0
|
|
1516
1555
|
} = t;
|
|
1517
|
-
if (
|
|
1556
|
+
if (c2 && !e)
|
|
1518
1557
|
return n;
|
|
1519
|
-
if (
|
|
1558
|
+
if (le(o, u) < 0)
|
|
1520
1559
|
if (s) {
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1560
|
+
const l = i ?? (u - r) / 2, d = le(n, r) <= 0, g = d ? r + l : u - l, p = le(o, g);
|
|
1561
|
+
le(o, r) <= 0 || p < 0 || i !== void 0 && d && p === 0 ? o = r : o = u;
|
|
1523
1562
|
} else
|
|
1524
|
-
o =
|
|
1525
|
-
return o = Math.min(a, o), o =
|
|
1563
|
+
o = u;
|
|
1564
|
+
return o = Math.min(a, o), o = K(o), o;
|
|
1526
1565
|
}
|
|
1527
|
-
function
|
|
1566
|
+
function qe({
|
|
1528
1567
|
delta: e,
|
|
1529
1568
|
initialLayout: t,
|
|
1530
1569
|
itemConstraints: n,
|
|
@@ -1534,73 +1573,73 @@ function Fe({
|
|
|
1534
1573
|
}) {
|
|
1535
1574
|
if (Y(e, 0))
|
|
1536
1575
|
return t;
|
|
1537
|
-
const s = i === "imperative-api",
|
|
1576
|
+
const s = i === "imperative-api", c2 = n.map(
|
|
1538
1577
|
({ itemId: m }) => t[m]
|
|
1539
1578
|
), a = n.map(
|
|
1540
1579
|
({ itemId: m }) => r[m]
|
|
1541
|
-
),
|
|
1542
|
-
|
|
1543
|
-
let
|
|
1580
|
+
), u = [...c2], [l, d] = o;
|
|
1581
|
+
O(l != null, "Invalid first pivot index"), O(d != null, "Invalid second pivot index");
|
|
1582
|
+
let g = 0;
|
|
1544
1583
|
switch (i) {
|
|
1545
1584
|
case "keyboard": {
|
|
1546
1585
|
{
|
|
1547
|
-
const m = e < 0 ? d :
|
|
1548
|
-
|
|
1586
|
+
const m = e < 0 ? d : l, f = n[m];
|
|
1587
|
+
O(
|
|
1549
1588
|
f,
|
|
1550
1589
|
`Panel constraints not found for index ${m}`
|
|
1551
1590
|
);
|
|
1552
1591
|
const {
|
|
1553
|
-
collapsedSize:
|
|
1592
|
+
collapsedSize: y = 0,
|
|
1554
1593
|
collapsible: h,
|
|
1555
|
-
minSize:
|
|
1594
|
+
minSize: S = 0
|
|
1556
1595
|
} = f;
|
|
1557
1596
|
if (h) {
|
|
1558
|
-
const
|
|
1559
|
-
if (
|
|
1560
|
-
|
|
1597
|
+
const z = c2[m];
|
|
1598
|
+
if (O(
|
|
1599
|
+
z != null,
|
|
1561
1600
|
`Previous layout not found for panel index ${m}`
|
|
1562
|
-
), Y(
|
|
1563
|
-
const x =
|
|
1564
|
-
|
|
1601
|
+
), Y(z, y)) {
|
|
1602
|
+
const x = S - z;
|
|
1603
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
1565
1604
|
}
|
|
1566
1605
|
}
|
|
1567
1606
|
}
|
|
1568
1607
|
{
|
|
1569
|
-
const m = e < 0 ?
|
|
1570
|
-
|
|
1608
|
+
const m = e < 0 ? l : d, f = n[m];
|
|
1609
|
+
O(
|
|
1571
1610
|
f,
|
|
1572
1611
|
`No panel constraints found for index ${m}`
|
|
1573
1612
|
);
|
|
1574
1613
|
const {
|
|
1575
|
-
collapsedSize:
|
|
1614
|
+
collapsedSize: y = 0,
|
|
1576
1615
|
collapsible: h,
|
|
1577
|
-
minSize:
|
|
1616
|
+
minSize: S = 0
|
|
1578
1617
|
} = f;
|
|
1579
1618
|
if (h) {
|
|
1580
|
-
const
|
|
1581
|
-
if (
|
|
1582
|
-
|
|
1619
|
+
const z = c2[m];
|
|
1620
|
+
if (O(
|
|
1621
|
+
z != null,
|
|
1583
1622
|
`Previous layout not found for panel index ${m}`
|
|
1584
|
-
), Y(
|
|
1585
|
-
const x =
|
|
1586
|
-
|
|
1623
|
+
), Y(z, S)) {
|
|
1624
|
+
const x = z - y;
|
|
1625
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
1587
1626
|
}
|
|
1588
1627
|
}
|
|
1589
1628
|
}
|
|
1590
1629
|
break;
|
|
1591
1630
|
}
|
|
1592
1631
|
default: {
|
|
1593
|
-
const m = e < 0 ? d :
|
|
1594
|
-
|
|
1632
|
+
const m = e < 0 ? d : l, f = n[m];
|
|
1633
|
+
O(
|
|
1595
1634
|
f,
|
|
1596
1635
|
`Panel constraints not found for index ${m}`
|
|
1597
1636
|
);
|
|
1598
|
-
const
|
|
1599
|
-
if (
|
|
1600
|
-
const
|
|
1601
|
-
if (
|
|
1602
|
-
const b =
|
|
1603
|
-
b > 0 || b === 0 && w ? e = e < 0 ? -
|
|
1637
|
+
const y = c2[m], { collapsedSize: h, collapsedThreshold: S, collapsible: z, minSize: x } = f;
|
|
1638
|
+
if (z && le(y, x) < 0) {
|
|
1639
|
+
const R = x - h, N = S ?? R / 2, $ = y + Math.abs(e);
|
|
1640
|
+
if (le($, x) < 0) {
|
|
1641
|
+
const b = le(Math.abs(e), N), w = S === void 0 && e < 0;
|
|
1642
|
+
b > 0 || b === 0 && w ? e = e < 0 ? -R : R : e = 0;
|
|
1604
1643
|
}
|
|
1605
1644
|
}
|
|
1606
1645
|
break;
|
|
@@ -1608,212 +1647,229 @@ function Fe({
|
|
|
1608
1647
|
}
|
|
1609
1648
|
{
|
|
1610
1649
|
const m = e < 0 ? 1 : -1;
|
|
1611
|
-
let f = e < 0 ? d :
|
|
1650
|
+
let f = e < 0 ? d : l, y = 0;
|
|
1612
1651
|
for (; ; ) {
|
|
1613
|
-
const
|
|
1614
|
-
|
|
1615
|
-
|
|
1652
|
+
const S = c2[f];
|
|
1653
|
+
O(
|
|
1654
|
+
S != null,
|
|
1616
1655
|
`Previous layout not found for panel index ${f}`
|
|
1617
1656
|
);
|
|
1618
|
-
const x =
|
|
1657
|
+
const x = Me({
|
|
1619
1658
|
overrideDisabledItems: s,
|
|
1620
1659
|
itemConstraints: n[f],
|
|
1621
|
-
prevSize:
|
|
1660
|
+
prevSize: S,
|
|
1622
1661
|
size: 100
|
|
1623
|
-
}) -
|
|
1624
|
-
if (
|
|
1662
|
+
}) - S;
|
|
1663
|
+
if (y += x, f += m, f < 0 || f >= n.length)
|
|
1625
1664
|
break;
|
|
1626
1665
|
}
|
|
1627
|
-
const h = Math.min(Math.abs(e), Math.abs(
|
|
1666
|
+
const h = Math.min(Math.abs(e), Math.abs(y));
|
|
1628
1667
|
e = e < 0 ? 0 - h : h;
|
|
1629
1668
|
}
|
|
1630
1669
|
{
|
|
1631
|
-
let f = e < 0 ?
|
|
1670
|
+
let f = e < 0 ? l : d;
|
|
1632
1671
|
for (; f >= 0 && f < n.length; ) {
|
|
1633
|
-
const
|
|
1634
|
-
|
|
1672
|
+
const y = Math.abs(e) - Math.abs(g), h = c2[f];
|
|
1673
|
+
O(
|
|
1635
1674
|
h != null,
|
|
1636
1675
|
`Previous layout not found for panel index ${f}`
|
|
1637
1676
|
);
|
|
1638
|
-
const
|
|
1677
|
+
const S = h - y, z = Me({
|
|
1639
1678
|
overrideDisabledItems: s,
|
|
1640
1679
|
itemConstraints: n[f],
|
|
1641
1680
|
prevSize: h,
|
|
1642
|
-
size:
|
|
1681
|
+
size: S
|
|
1643
1682
|
});
|
|
1644
|
-
if (!Y(h,
|
|
1683
|
+
if (!Y(h, z) && (g += h - z, u[f] = z, g.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
1645
1684
|
numeric: true
|
|
1646
1685
|
}) >= 0))
|
|
1647
1686
|
break;
|
|
1648
1687
|
e < 0 ? f-- : f++;
|
|
1649
1688
|
}
|
|
1650
1689
|
}
|
|
1651
|
-
if (
|
|
1690
|
+
if (Kn(a, u))
|
|
1652
1691
|
return r;
|
|
1653
1692
|
{
|
|
1654
|
-
const m = e < 0 ? d :
|
|
1655
|
-
|
|
1693
|
+
const m = e < 0 ? d : l, f = c2[m];
|
|
1694
|
+
O(
|
|
1656
1695
|
f != null,
|
|
1657
1696
|
`Previous layout not found for panel index ${m}`
|
|
1658
1697
|
);
|
|
1659
|
-
const
|
|
1698
|
+
const y = f + g, h = Me({
|
|
1660
1699
|
overrideDisabledItems: s,
|
|
1661
1700
|
itemConstraints: n[m],
|
|
1662
1701
|
prevSize: f,
|
|
1663
|
-
size:
|
|
1702
|
+
size: y
|
|
1664
1703
|
});
|
|
1665
|
-
if (
|
|
1666
|
-
let
|
|
1704
|
+
if (u[m] = h, !Y(h, y)) {
|
|
1705
|
+
let S = y - h, x = e < 0 ? d : l;
|
|
1667
1706
|
for (; x >= 0 && x < n.length; ) {
|
|
1668
|
-
const
|
|
1669
|
-
|
|
1670
|
-
|
|
1707
|
+
const R = u[x];
|
|
1708
|
+
O(
|
|
1709
|
+
R != null,
|
|
1671
1710
|
`Previous layout not found for panel index ${x}`
|
|
1672
1711
|
);
|
|
1673
|
-
const
|
|
1712
|
+
const N = R + S, $ = Me({
|
|
1674
1713
|
overrideDisabledItems: s,
|
|
1675
1714
|
itemConstraints: n[x],
|
|
1676
|
-
prevSize:
|
|
1677
|
-
size:
|
|
1715
|
+
prevSize: R,
|
|
1716
|
+
size: N
|
|
1678
1717
|
});
|
|
1679
|
-
if (Y(
|
|
1718
|
+
if (Y(R, $) || (S -= $ - R, u[x] = $), Y(S, 0))
|
|
1680
1719
|
break;
|
|
1681
1720
|
e > 0 ? x-- : x++;
|
|
1682
1721
|
}
|
|
1683
1722
|
}
|
|
1684
1723
|
}
|
|
1685
|
-
const
|
|
1724
|
+
const p = Object.values(u).reduce(
|
|
1686
1725
|
(m, f) => f + m,
|
|
1687
1726
|
0
|
|
1688
1727
|
);
|
|
1689
|
-
return Y(
|
|
1728
|
+
return Y(p, 100, 0.1) ? u.reduce((m, f, y) => (m[n[y].itemId] = f, m), {}) : r;
|
|
1690
1729
|
}
|
|
1691
|
-
function
|
|
1730
|
+
function se(e, t) {
|
|
1692
1731
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1693
1732
|
return false;
|
|
1694
1733
|
for (const n in e)
|
|
1695
|
-
if (t[n] === void 0 ||
|
|
1734
|
+
if (t[n] === void 0 || le(e[n], t[n]) !== 0)
|
|
1696
1735
|
return false;
|
|
1697
1736
|
return true;
|
|
1698
1737
|
}
|
|
1699
|
-
function
|
|
1738
|
+
function vt(e) {
|
|
1739
|
+
et();
|
|
1740
|
+
try {
|
|
1741
|
+
Jn(e);
|
|
1742
|
+
} finally {
|
|
1743
|
+
tt();
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
function Jn({
|
|
1700
1747
|
commit: e,
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
prevCursorFlags: l
|
|
1748
|
+
event: t,
|
|
1749
|
+
hitRegions: n,
|
|
1750
|
+
initialLayoutMap: o,
|
|
1751
|
+
mountedAxes: r,
|
|
1752
|
+
pointerDownAtPoint: i,
|
|
1753
|
+
prevCursorFlags: s
|
|
1708
1754
|
}) {
|
|
1709
|
-
let
|
|
1710
|
-
const
|
|
1711
|
-
let u =
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1755
|
+
let c2 = 0;
|
|
1756
|
+
const a = ie();
|
|
1757
|
+
let u = a.state === "active" ? a.previews : [];
|
|
1758
|
+
const l = new Map(
|
|
1759
|
+
a.state === "active" ? a.previewLayoutMap : void 0
|
|
1714
1760
|
);
|
|
1715
|
-
|
|
1716
|
-
const { axis:
|
|
1717
|
-
if (e &&
|
|
1761
|
+
n.forEach((p) => {
|
|
1762
|
+
const { axis: m, axisSize: f } = p, { orientation: y, items: h } = m;
|
|
1763
|
+
if (e && m.resizePreviewMode !== "separator")
|
|
1718
1764
|
return;
|
|
1719
|
-
const { disableCursor:
|
|
1720
|
-
let
|
|
1721
|
-
|
|
1722
|
-
const
|
|
1723
|
-
if (!
|
|
1765
|
+
const { disableCursor: S } = m.mutableState;
|
|
1766
|
+
let z = 0;
|
|
1767
|
+
i ? y === "horizontal" ? z = (t.clientX - i.x) / f * 100 : z = (t.clientY - i.y) / f * 100 : y === "horizontal" ? z = t.clientX < 0 ? -100 : 100 : z = t.clientY < 0 ? -100 : 100;
|
|
1768
|
+
const x = o.get(m), R = r.get(m);
|
|
1769
|
+
if (!x || !R)
|
|
1724
1770
|
return;
|
|
1725
1771
|
const {
|
|
1726
1772
|
defaultLayoutDeferred: N,
|
|
1727
|
-
derivedItemConstraints:
|
|
1728
|
-
axisSize:
|
|
1729
|
-
layout:
|
|
1730
|
-
separatorToItems:
|
|
1731
|
-
} =
|
|
1732
|
-
if (
|
|
1733
|
-
const
|
|
1734
|
-
delta:
|
|
1735
|
-
initialLayout:
|
|
1736
|
-
itemConstraints:
|
|
1737
|
-
pivotIndices:
|
|
1738
|
-
prevLayout:
|
|
1773
|
+
derivedItemConstraints: $,
|
|
1774
|
+
axisSize: b,
|
|
1775
|
+
layout: w,
|
|
1776
|
+
separatorToItems: v
|
|
1777
|
+
} = R;
|
|
1778
|
+
if ($ && w && v) {
|
|
1779
|
+
const T = m.resizePreviewMode === "separator" ? l.get(m) ?? w : w, A = qe({
|
|
1780
|
+
delta: z,
|
|
1781
|
+
initialLayout: x,
|
|
1782
|
+
itemConstraints: $,
|
|
1783
|
+
pivotIndices: p.items.map((E) => h.indexOf(E)),
|
|
1784
|
+
prevLayout: T,
|
|
1739
1785
|
trigger: "mouse-or-touch"
|
|
1740
1786
|
});
|
|
1741
|
-
if (
|
|
1742
|
-
|
|
1787
|
+
if (m.resizePreviewMode === "separator" && !e && !se(A, T)) {
|
|
1788
|
+
l.set(m, A);
|
|
1743
1789
|
let E = 0;
|
|
1744
|
-
const
|
|
1745
|
-
u = u.map((
|
|
1746
|
-
if (
|
|
1747
|
-
return
|
|
1748
|
-
const
|
|
1749
|
-
return
|
|
1790
|
+
const D = h.map((C) => (E += A[C.id] - x[C.id], E * (f / 100)));
|
|
1791
|
+
u = u.map((C) => {
|
|
1792
|
+
if (C.axis !== m)
|
|
1793
|
+
return C;
|
|
1794
|
+
const I = D[C.itemIndex];
|
|
1795
|
+
return I === C.offset ? C : { ...C, offset: I };
|
|
1750
1796
|
});
|
|
1751
1797
|
}
|
|
1752
|
-
if (
|
|
1753
|
-
switch (
|
|
1798
|
+
if (se(A, T) && z !== 0 && !S)
|
|
1799
|
+
switch (y) {
|
|
1754
1800
|
case "horizontal": {
|
|
1755
|
-
|
|
1801
|
+
c2 |= z < 0 ? cn : ln;
|
|
1756
1802
|
break;
|
|
1757
1803
|
}
|
|
1758
1804
|
case "vertical": {
|
|
1759
|
-
|
|
1805
|
+
c2 |= z < 0 ? un : dn;
|
|
1760
1806
|
break;
|
|
1761
1807
|
}
|
|
1762
1808
|
}
|
|
1763
|
-
(
|
|
1809
|
+
(m.resizePreviewMode !== "separator" || e) && !se(A, w) && fe(p.axis, {
|
|
1764
1810
|
defaultLayoutDeferred: N,
|
|
1765
|
-
derivedItemConstraints:
|
|
1766
|
-
axisSize:
|
|
1767
|
-
layout:
|
|
1768
|
-
requestedAxisSize:
|
|
1769
|
-
requestedLayout:
|
|
1770
|
-
separatorToItems:
|
|
1811
|
+
derivedItemConstraints: $,
|
|
1812
|
+
axisSize: b,
|
|
1813
|
+
layout: A,
|
|
1814
|
+
requestedAxisSize: b,
|
|
1815
|
+
requestedLayout: A,
|
|
1816
|
+
separatorToItems: v
|
|
1771
1817
|
});
|
|
1772
1818
|
}
|
|
1773
1819
|
});
|
|
1774
|
-
let
|
|
1775
|
-
|
|
1776
|
-
const
|
|
1777
|
-
|
|
1778
|
-
}
|
|
1779
|
-
function
|
|
1780
|
-
const n =
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
})
|
|
1820
|
+
let d = 0;
|
|
1821
|
+
t.movementX === 0 ? d |= s & Lt$1 : d |= c2 & Lt$1, t.movementY === 0 ? d |= s & Ct$1 : d |= c2 & Ct$1;
|
|
1822
|
+
const g = a.state === "active" && (t.clientX !== a.pointerDownAtPoint.x || t.clientY !== a.pointerDownAtPoint.y);
|
|
1823
|
+
On(d, u, l, g);
|
|
1824
|
+
}
|
|
1825
|
+
function pn(e, t) {
|
|
1826
|
+
const n = ie();
|
|
1827
|
+
if (n.state !== "active" || !nt$1(n, e, t))
|
|
1828
|
+
return;
|
|
1829
|
+
const o = ge();
|
|
1830
|
+
et();
|
|
1831
|
+
try {
|
|
1832
|
+
vt({
|
|
1833
|
+
commit: true,
|
|
1834
|
+
event: t,
|
|
1835
|
+
hitRegions: n.hitRegions,
|
|
1836
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
1837
|
+
mountedAxes: o,
|
|
1838
|
+
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
1839
|
+
prevCursorFlags: n.cursorFlags
|
|
1840
|
+
}), St$1(), de({
|
|
1841
|
+
cursorFlags: 0,
|
|
1842
|
+
state: "inactive"
|
|
1843
|
+
}), n.hitRegions.length > 0 && (t.preventDefault?.(), n.hitRegions.forEach((r) => {
|
|
1844
|
+
if (!o.has(r.axis))
|
|
1845
|
+
return;
|
|
1846
|
+
const i = ae(r.axis.id, true);
|
|
1847
|
+
fe(r.axis, i, {
|
|
1848
|
+
isUserInteraction: true
|
|
1849
|
+
});
|
|
1850
|
+
}));
|
|
1851
|
+
} finally {
|
|
1852
|
+
tt();
|
|
1804
1853
|
}
|
|
1805
|
-
return r;
|
|
1806
1854
|
}
|
|
1807
|
-
function
|
|
1808
|
-
|
|
1855
|
+
function Tt$1(e) {
|
|
1856
|
+
if (e.defaultPrevented)
|
|
1857
|
+
return;
|
|
1858
|
+
const { clientX: t, clientY: n, movementX: o, movementY: r } = e;
|
|
1859
|
+
pn(e.currentTarget, {
|
|
1860
|
+
clientX: t,
|
|
1861
|
+
clientY: n,
|
|
1862
|
+
movementX: o,
|
|
1863
|
+
movementY: r
|
|
1864
|
+
});
|
|
1809
1865
|
}
|
|
1810
|
-
function
|
|
1866
|
+
function Zn(e, t, n) {
|
|
1811
1867
|
let o, r = {
|
|
1812
1868
|
x: 1 / 0,
|
|
1813
1869
|
y: 1 / 0
|
|
1814
1870
|
};
|
|
1815
1871
|
for (const i of t) {
|
|
1816
|
-
const s =
|
|
1872
|
+
const s = fn(n, i.rect);
|
|
1817
1873
|
switch (e) {
|
|
1818
1874
|
case "horizontal": {
|
|
1819
1875
|
(s.x < r.x || s.x === r.x && s.y <= r.y) && (o = i, r = s);
|
|
@@ -1830,126 +1886,126 @@ function _n(e, t, n) {
|
|
|
1830
1886
|
hitRegion: o
|
|
1831
1887
|
} : void 0;
|
|
1832
1888
|
}
|
|
1833
|
-
function
|
|
1889
|
+
function Qn(e) {
|
|
1834
1890
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
1835
1891
|
}
|
|
1836
|
-
function
|
|
1892
|
+
function eo(e, t) {
|
|
1837
1893
|
if (e === t) throw new Error("Cannot compare node with itself");
|
|
1838
1894
|
const n = {
|
|
1839
|
-
a:
|
|
1840
|
-
b:
|
|
1895
|
+
a: At(e),
|
|
1896
|
+
b: At(t)
|
|
1841
1897
|
};
|
|
1842
1898
|
let o;
|
|
1843
1899
|
for (; n.a.at(-1) === n.b.at(-1); )
|
|
1844
1900
|
o = n.a.pop(), n.b.pop();
|
|
1845
|
-
|
|
1901
|
+
O(
|
|
1846
1902
|
o,
|
|
1847
1903
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
1848
1904
|
);
|
|
1849
1905
|
const r = {
|
|
1850
|
-
a:
|
|
1851
|
-
b:
|
|
1906
|
+
a: kt$1(Dt(n.a)),
|
|
1907
|
+
b: kt$1(Dt(n.b))
|
|
1852
1908
|
};
|
|
1853
1909
|
if (r.a === r.b) {
|
|
1854
1910
|
const i = o.childNodes, s = {
|
|
1855
1911
|
a: n.a.at(-1),
|
|
1856
1912
|
b: n.b.at(-1)
|
|
1857
1913
|
};
|
|
1858
|
-
let
|
|
1859
|
-
for (;
|
|
1860
|
-
const a = i[
|
|
1914
|
+
let c2 = i.length;
|
|
1915
|
+
for (; c2--; ) {
|
|
1916
|
+
const a = i[c2];
|
|
1861
1917
|
if (a === s.a) return 1;
|
|
1862
1918
|
if (a === s.b) return -1;
|
|
1863
1919
|
}
|
|
1864
1920
|
}
|
|
1865
1921
|
return Math.sign(r.a - r.b);
|
|
1866
1922
|
}
|
|
1867
|
-
const
|
|
1868
|
-
function
|
|
1869
|
-
const t = getComputedStyle(
|
|
1923
|
+
const to = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
1924
|
+
function no(e) {
|
|
1925
|
+
const t = getComputedStyle(hn(e) ?? e).display;
|
|
1870
1926
|
return t === "flex" || t === "inline-flex";
|
|
1871
1927
|
}
|
|
1872
|
-
function
|
|
1928
|
+
function oo(e) {
|
|
1873
1929
|
const t = getComputedStyle(e);
|
|
1874
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
1930
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || no(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || to.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
1875
1931
|
}
|
|
1876
|
-
function
|
|
1932
|
+
function Dt(e) {
|
|
1877
1933
|
let t = e.length;
|
|
1878
1934
|
for (; t--; ) {
|
|
1879
1935
|
const n = e[t];
|
|
1880
|
-
if (
|
|
1936
|
+
if (O(n, "Missing node"), oo(n)) return n;
|
|
1881
1937
|
}
|
|
1882
1938
|
return null;
|
|
1883
1939
|
}
|
|
1884
|
-
function
|
|
1940
|
+
function kt$1(e) {
|
|
1885
1941
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
1886
1942
|
}
|
|
1887
|
-
function
|
|
1943
|
+
function At(e) {
|
|
1888
1944
|
const t = [];
|
|
1889
1945
|
for (; e; )
|
|
1890
|
-
t.push(e), e =
|
|
1946
|
+
t.push(e), e = hn(e);
|
|
1891
1947
|
return t;
|
|
1892
1948
|
}
|
|
1893
|
-
function
|
|
1949
|
+
function hn(e) {
|
|
1894
1950
|
const { parentNode: t } = e;
|
|
1895
|
-
return
|
|
1951
|
+
return Qn(t) ? t.host : t;
|
|
1896
1952
|
}
|
|
1897
|
-
function
|
|
1953
|
+
function ro(e, t) {
|
|
1898
1954
|
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
1899
1955
|
}
|
|
1900
|
-
function
|
|
1956
|
+
function io(e) {
|
|
1901
1957
|
try {
|
|
1902
1958
|
return e.matches(":modal");
|
|
1903
1959
|
} catch {
|
|
1904
1960
|
return false;
|
|
1905
1961
|
}
|
|
1906
1962
|
}
|
|
1907
|
-
function
|
|
1963
|
+
function so({
|
|
1908
1964
|
axisElement: e,
|
|
1909
1965
|
hitRegion: t,
|
|
1910
1966
|
pointerEventTarget: n
|
|
1911
1967
|
}) {
|
|
1912
|
-
if (
|
|
1968
|
+
if (lt(n)) {
|
|
1913
1969
|
const o = n.closest("dialog");
|
|
1914
|
-
if (o && !o.contains(e) &&
|
|
1970
|
+
if (o && !o.contains(e) && io(o))
|
|
1915
1971
|
return false;
|
|
1916
1972
|
}
|
|
1917
|
-
if (!
|
|
1973
|
+
if (!lt(n) || n.contains(e) || e.contains(n))
|
|
1918
1974
|
return true;
|
|
1919
|
-
if (
|
|
1975
|
+
if (eo(n, e) > 0) {
|
|
1920
1976
|
let o = n;
|
|
1921
1977
|
for (; o; ) {
|
|
1922
1978
|
if (o.contains(e))
|
|
1923
1979
|
return true;
|
|
1924
|
-
if (
|
|
1980
|
+
if (ro(o.getBoundingClientRect(), t))
|
|
1925
1981
|
return false;
|
|
1926
1982
|
o = o.parentElement;
|
|
1927
1983
|
}
|
|
1928
1984
|
}
|
|
1929
1985
|
return true;
|
|
1930
1986
|
}
|
|
1931
|
-
function
|
|
1932
|
-
const
|
|
1933
|
-
return t.forEach((
|
|
1934
|
-
if (
|
|
1987
|
+
function bt$1(e, t, n) {
|
|
1988
|
+
const o = [];
|
|
1989
|
+
return t.forEach((r, i) => {
|
|
1990
|
+
if (i.disabled || i.element.ownerDocument !== n)
|
|
1935
1991
|
return;
|
|
1936
|
-
const
|
|
1992
|
+
const s = gt({ axis: i }), c2 = Zn(i.orientation, s, {
|
|
1937
1993
|
x: e.clientX,
|
|
1938
1994
|
y: e.clientY
|
|
1939
1995
|
});
|
|
1940
|
-
|
|
1941
|
-
axisElement:
|
|
1942
|
-
hitRegion:
|
|
1996
|
+
c2 && c2.distance.x <= 0 && c2.distance.y <= 0 && so({
|
|
1997
|
+
axisElement: i.element,
|
|
1998
|
+
hitRegion: c2.hitRegion.rect,
|
|
1943
1999
|
pointerEventTarget: e.target
|
|
1944
|
-
}) &&
|
|
1945
|
-
}),
|
|
2000
|
+
}) && o.push(c2.hitRegion);
|
|
2001
|
+
}), o;
|
|
1946
2002
|
}
|
|
1947
|
-
function
|
|
2003
|
+
function Se({
|
|
1948
2004
|
layout: e,
|
|
1949
2005
|
itemConstraints: t
|
|
1950
2006
|
}) {
|
|
1951
2007
|
const n = t.map(({ itemId: s }) => e[s]), o = [...n], r = o.reduce(
|
|
1952
|
-
(s,
|
|
2008
|
+
(s, c2) => s + c2,
|
|
1953
2009
|
0
|
|
1954
2010
|
);
|
|
1955
2011
|
if (Object.keys(e).length !== t.length)
|
|
@@ -1958,75 +2014,75 @@ function ye({
|
|
|
1958
2014
|
);
|
|
1959
2015
|
if (!Y(r, 100) && o.length > 0)
|
|
1960
2016
|
for (let s = 0; s < t.length; s++) {
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1963
|
-
const a = 100 / r *
|
|
2017
|
+
const c2 = o[s];
|
|
2018
|
+
O(c2 != null, `No layout data found for index ${s}`);
|
|
2019
|
+
const a = 100 / r * c2;
|
|
1964
2020
|
o[s] = a;
|
|
1965
2021
|
}
|
|
1966
2022
|
let i = 0;
|
|
1967
2023
|
for (let s = 0; s < t.length; s++) {
|
|
1968
|
-
const
|
|
1969
|
-
|
|
2024
|
+
const c2 = n[s];
|
|
2025
|
+
O(c2 != null, `No layout data found for index ${s}`);
|
|
1970
2026
|
const a = o[s];
|
|
1971
|
-
|
|
1972
|
-
const
|
|
2027
|
+
O(a != null, `No layout data found for index ${s}`);
|
|
2028
|
+
const u = Me({
|
|
1973
2029
|
overrideDisabledItems: true,
|
|
1974
2030
|
itemConstraints: t[s],
|
|
1975
|
-
prevSize:
|
|
2031
|
+
prevSize: c2,
|
|
1976
2032
|
size: a
|
|
1977
2033
|
});
|
|
1978
|
-
a !=
|
|
2034
|
+
a != u && (i += a - u, o[s] = u);
|
|
1979
2035
|
}
|
|
1980
2036
|
if (!Y(i, 0))
|
|
1981
2037
|
for (let s = 0; s < t.length; s++) {
|
|
1982
|
-
const
|
|
1983
|
-
|
|
1984
|
-
const a =
|
|
2038
|
+
const c2 = o[s];
|
|
2039
|
+
O(c2 != null, `No layout data found for index ${s}`);
|
|
2040
|
+
const a = c2 + i, u = Me({
|
|
1985
2041
|
overrideDisabledItems: true,
|
|
1986
2042
|
itemConstraints: t[s],
|
|
1987
|
-
prevSize:
|
|
2043
|
+
prevSize: c2,
|
|
1988
2044
|
size: a
|
|
1989
2045
|
});
|
|
1990
|
-
if (
|
|
2046
|
+
if (c2 !== u && (i -= u - c2, o[s] = u, Y(i, 0)))
|
|
1991
2047
|
break;
|
|
1992
2048
|
}
|
|
1993
|
-
return o.reduce((s,
|
|
2049
|
+
return o.reduce((s, c2, a) => (s[t[a].itemId] = c2, s), {});
|
|
1994
2050
|
}
|
|
1995
|
-
function
|
|
2051
|
+
function xt$1({
|
|
1996
2052
|
axisId: e,
|
|
1997
2053
|
itemId: t
|
|
1998
2054
|
}) {
|
|
1999
2055
|
const n = () => {
|
|
2000
|
-
const a =
|
|
2056
|
+
const a = ge();
|
|
2001
2057
|
for (const [
|
|
2002
|
-
|
|
2058
|
+
u,
|
|
2003
2059
|
{
|
|
2004
|
-
defaultLayoutDeferred:
|
|
2060
|
+
defaultLayoutDeferred: l,
|
|
2005
2061
|
derivedItemConstraints: d,
|
|
2006
|
-
layout:
|
|
2007
|
-
axisSize:
|
|
2062
|
+
layout: g,
|
|
2063
|
+
axisSize: p,
|
|
2008
2064
|
separatorToItems: m
|
|
2009
2065
|
}
|
|
2010
2066
|
] of a)
|
|
2011
|
-
if (
|
|
2067
|
+
if (u.id === e)
|
|
2012
2068
|
return {
|
|
2013
|
-
defaultLayoutDeferred:
|
|
2069
|
+
defaultLayoutDeferred: l,
|
|
2014
2070
|
derivedItemConstraints: d,
|
|
2015
|
-
axis:
|
|
2016
|
-
axisSize:
|
|
2017
|
-
layout:
|
|
2071
|
+
axis: u,
|
|
2072
|
+
axisSize: p,
|
|
2073
|
+
layout: g,
|
|
2018
2074
|
separatorToItems: m
|
|
2019
2075
|
};
|
|
2020
2076
|
throw Error(`Group ${e} not found`);
|
|
2021
2077
|
}, o = () => {
|
|
2022
2078
|
const a = n().derivedItemConstraints.find(
|
|
2023
|
-
(
|
|
2079
|
+
(u) => u.itemId === t
|
|
2024
2080
|
);
|
|
2025
2081
|
if (a !== void 0)
|
|
2026
2082
|
return a;
|
|
2027
2083
|
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
2028
2084
|
}, r = () => {
|
|
2029
|
-
const a = n().axis.items.find((
|
|
2085
|
+
const a = n().axis.items.find((u) => u.id === t);
|
|
2030
2086
|
if (a !== void 0)
|
|
2031
2087
|
return a;
|
|
2032
2088
|
throw Error(`Layout not found for Panel ${t}`);
|
|
@@ -2037,103 +2093,107 @@ function mt({
|
|
|
2037
2093
|
throw Error(`Layout not found for Panel ${t}`);
|
|
2038
2094
|
}, s = ({
|
|
2039
2095
|
nextSize: a,
|
|
2040
|
-
items:
|
|
2041
|
-
prevLayout:
|
|
2096
|
+
items: u,
|
|
2097
|
+
prevLayout: l,
|
|
2042
2098
|
derivedItemConstraints: d
|
|
2043
2099
|
}) => {
|
|
2044
|
-
const
|
|
2045
|
-
if (f && a <
|
|
2046
|
-
const
|
|
2047
|
-
return
|
|
2100
|
+
const g = i(), p = u.findIndex((h) => h.id === t), m = p === 0, f = p === u.length - 1;
|
|
2101
|
+
if (f && a < g && (m || u.slice(0, p).every((h, S) => {
|
|
2102
|
+
const z = d[S];
|
|
2103
|
+
return z?.collapsible && Y(z.collapsedSize, l[z.itemId]);
|
|
2048
2104
|
}))) {
|
|
2049
|
-
const h =
|
|
2105
|
+
const h = u.slice(0, p).reduce((S, z) => S + l[z.id], 0);
|
|
2050
2106
|
return {
|
|
2051
|
-
...
|
|
2052
|
-
[t]:
|
|
2107
|
+
...l,
|
|
2108
|
+
[t]: K(100 - h)
|
|
2053
2109
|
};
|
|
2054
2110
|
}
|
|
2055
|
-
return
|
|
2056
|
-
delta: f ?
|
|
2057
|
-
initialLayout:
|
|
2111
|
+
return qe({
|
|
2112
|
+
delta: f ? g - a : a - g,
|
|
2113
|
+
initialLayout: l,
|
|
2058
2114
|
itemConstraints: d,
|
|
2059
|
-
pivotIndices: f ? [
|
|
2060
|
-
prevLayout:
|
|
2115
|
+
pivotIndices: f ? [p - 1, p] : [p, p + 1],
|
|
2116
|
+
prevLayout: l,
|
|
2061
2117
|
trigger: "imperative-api"
|
|
2062
2118
|
});
|
|
2063
|
-
},
|
|
2064
|
-
const
|
|
2065
|
-
if (a ===
|
|
2119
|
+
}, c2 = (a) => {
|
|
2120
|
+
const u = i();
|
|
2121
|
+
if (a === u)
|
|
2066
2122
|
return;
|
|
2067
2123
|
const {
|
|
2068
|
-
defaultLayoutDeferred:
|
|
2124
|
+
defaultLayoutDeferred: l,
|
|
2069
2125
|
derivedItemConstraints: d,
|
|
2070
|
-
axis:
|
|
2071
|
-
axisSize:
|
|
2126
|
+
axis: g,
|
|
2127
|
+
axisSize: p,
|
|
2072
2128
|
layout: m,
|
|
2073
2129
|
separatorToItems: f
|
|
2074
|
-
} = n(),
|
|
2130
|
+
} = n(), y = s({
|
|
2075
2131
|
nextSize: a,
|
|
2076
|
-
items:
|
|
2132
|
+
items: g.items,
|
|
2077
2133
|
prevLayout: m,
|
|
2078
2134
|
derivedItemConstraints: d
|
|
2079
|
-
}), h =
|
|
2080
|
-
layout:
|
|
2135
|
+
}), h = Se({
|
|
2136
|
+
layout: y,
|
|
2081
2137
|
itemConstraints: d
|
|
2082
2138
|
});
|
|
2083
|
-
|
|
2084
|
-
defaultLayoutDeferred:
|
|
2139
|
+
se(m, h) || fe(g, {
|
|
2140
|
+
defaultLayoutDeferred: l,
|
|
2085
2141
|
derivedItemConstraints: d,
|
|
2086
|
-
axisSize:
|
|
2142
|
+
axisSize: p,
|
|
2087
2143
|
layout: h,
|
|
2088
|
-
requestedAxisSize:
|
|
2144
|
+
requestedAxisSize: p,
|
|
2089
2145
|
requestedLayout: h,
|
|
2090
2146
|
separatorToItems: f
|
|
2091
2147
|
});
|
|
2092
2148
|
};
|
|
2093
2149
|
return {
|
|
2094
2150
|
collapse: () => {
|
|
2095
|
-
const { collapsible: a, collapsedSize:
|
|
2096
|
-
a && d !==
|
|
2151
|
+
const { collapsible: a, collapsedSize: u } = o(), { mutableValues: l } = r(), d = i();
|
|
2152
|
+
a && d !== u && (l.expandToSize = d, c2(u));
|
|
2097
2153
|
},
|
|
2098
2154
|
expand: () => {
|
|
2099
|
-
const { collapsible: a, collapsedSize:
|
|
2100
|
-
if (a &&
|
|
2101
|
-
let
|
|
2102
|
-
|
|
2155
|
+
const { collapsible: a, collapsedSize: u, minSize: l } = o(), { mutableValues: d } = r(), g = i();
|
|
2156
|
+
if (a && g === u) {
|
|
2157
|
+
let p = d.expandToSize ?? l;
|
|
2158
|
+
p === 0 && (p = 1), c2(p);
|
|
2103
2159
|
}
|
|
2104
2160
|
},
|
|
2105
2161
|
getSize: () => {
|
|
2106
|
-
const { axis: a } = n(),
|
|
2162
|
+
const { axis: a } = n(), u = i(), { element: l } = r(), d = a.layoutStrategy ? a.layoutStrategy.getItemSizeInPixels(t) : a.orientation === "horizontal" ? l.offsetWidth : l.offsetHeight;
|
|
2107
2163
|
return {
|
|
2108
|
-
asPercentage:
|
|
2164
|
+
asPercentage: u,
|
|
2109
2165
|
inPixels: d
|
|
2110
2166
|
};
|
|
2111
2167
|
},
|
|
2112
2168
|
isCollapsed: () => {
|
|
2113
|
-
const { collapsible: a, collapsedSize:
|
|
2114
|
-
return a && Y(
|
|
2169
|
+
const { collapsible: a, collapsedSize: u } = o(), l = i();
|
|
2170
|
+
return a && Y(u, l);
|
|
2115
2171
|
},
|
|
2116
2172
|
resize: (a) => {
|
|
2117
|
-
const { axis:
|
|
2173
|
+
const { axis: u } = n(), { element: l } = r(), d = Te({ axis: u }), g = Ce({
|
|
2118
2174
|
axisSize: d,
|
|
2119
|
-
itemElement:
|
|
2175
|
+
itemElement: l,
|
|
2120
2176
|
styleProp: a
|
|
2121
|
-
}),
|
|
2122
|
-
|
|
2177
|
+
}), p = K(g / d * 100);
|
|
2178
|
+
c2(p);
|
|
2123
2179
|
}
|
|
2124
2180
|
};
|
|
2125
2181
|
}
|
|
2126
|
-
function
|
|
2182
|
+
function $t$1(e) {
|
|
2127
2183
|
if (e.defaultPrevented)
|
|
2128
2184
|
return;
|
|
2129
|
-
const t =
|
|
2130
|
-
|
|
2185
|
+
const t = ge();
|
|
2186
|
+
bt$1(
|
|
2187
|
+
e,
|
|
2188
|
+
t,
|
|
2189
|
+
e.currentTarget
|
|
2190
|
+
).forEach((o) => {
|
|
2131
2191
|
if (o.separator && !o.separator.disableDoubleClick) {
|
|
2132
2192
|
const r = o.items.find(
|
|
2133
2193
|
(i) => i.constraintProps.defaultSize !== void 0
|
|
2134
2194
|
);
|
|
2135
2195
|
if (r) {
|
|
2136
|
-
const i = r.constraintProps.defaultSize, s =
|
|
2196
|
+
const i = r.constraintProps.defaultSize, s = xt$1({
|
|
2137
2197
|
axisId: o.axis.id,
|
|
2138
2198
|
itemId: r.id
|
|
2139
2199
|
});
|
|
@@ -2142,8 +2202,8 @@ function Lt$1(e) {
|
|
|
2142
2202
|
}
|
|
2143
2203
|
});
|
|
2144
2204
|
}
|
|
2145
|
-
function
|
|
2146
|
-
const t =
|
|
2205
|
+
function gn(e) {
|
|
2206
|
+
const t = ge();
|
|
2147
2207
|
for (const [n] of t)
|
|
2148
2208
|
if (n.separators.some(
|
|
2149
2209
|
(o) => o.element === e
|
|
@@ -2151,11 +2211,11 @@ function rn(e) {
|
|
|
2151
2211
|
return n;
|
|
2152
2212
|
throw Error("Could not find parent Group for separator element");
|
|
2153
2213
|
}
|
|
2154
|
-
function
|
|
2214
|
+
function _e({
|
|
2155
2215
|
axisId: e
|
|
2156
2216
|
}) {
|
|
2157
2217
|
const t = () => {
|
|
2158
|
-
const n =
|
|
2218
|
+
const n = ge();
|
|
2159
2219
|
for (const [o, r] of n)
|
|
2160
2220
|
if (o.id === e)
|
|
2161
2221
|
return { axis: o, ...r };
|
|
@@ -2172,51 +2232,51 @@ function Ge({
|
|
|
2172
2232
|
derivedItemConstraints: r,
|
|
2173
2233
|
axis: i,
|
|
2174
2234
|
axisSize: s,
|
|
2175
|
-
layout:
|
|
2235
|
+
layout: c2,
|
|
2176
2236
|
separatorToItems: a
|
|
2177
|
-
} = t(),
|
|
2237
|
+
} = t(), u = Se({
|
|
2178
2238
|
layout: n,
|
|
2179
2239
|
itemConstraints: r
|
|
2180
2240
|
});
|
|
2181
|
-
return o ?
|
|
2241
|
+
return o ? c2 : (se(c2, u) || fe(i, {
|
|
2182
2242
|
defaultLayoutDeferred: o,
|
|
2183
2243
|
derivedItemConstraints: r,
|
|
2184
2244
|
axisSize: s,
|
|
2185
|
-
layout:
|
|
2245
|
+
layout: u,
|
|
2186
2246
|
requestedAxisSize: s,
|
|
2187
|
-
requestedLayout:
|
|
2247
|
+
requestedLayout: u,
|
|
2188
2248
|
separatorToItems: a
|
|
2189
|
-
}),
|
|
2249
|
+
}), u);
|
|
2190
2250
|
}
|
|
2191
2251
|
};
|
|
2192
2252
|
}
|
|
2193
2253
|
function we(e, t) {
|
|
2194
|
-
const n =
|
|
2254
|
+
const n = gn(e), o = ae(n.id, true), r = n.separators.find(
|
|
2195
2255
|
(d) => d.element === e
|
|
2196
2256
|
);
|
|
2197
|
-
|
|
2257
|
+
O(r, "Matching separator not found");
|
|
2198
2258
|
const i = o.separatorToItems.get(r);
|
|
2199
|
-
|
|
2200
|
-
const s = i.map((d) => n.items.indexOf(d)), a =
|
|
2259
|
+
O(i, "Matching panels not found");
|
|
2260
|
+
const s = i.map((d) => n.items.indexOf(d)), a = _e({ axisId: n.id }).getLayout(), u = qe({
|
|
2201
2261
|
delta: t,
|
|
2202
2262
|
initialLayout: a,
|
|
2203
2263
|
itemConstraints: o.derivedItemConstraints,
|
|
2204
2264
|
pivotIndices: s,
|
|
2205
2265
|
prevLayout: a,
|
|
2206
2266
|
trigger: "keyboard"
|
|
2207
|
-
}),
|
|
2208
|
-
layout:
|
|
2267
|
+
}), l = Se({
|
|
2268
|
+
layout: u,
|
|
2209
2269
|
itemConstraints: o.derivedItemConstraints
|
|
2210
2270
|
});
|
|
2211
|
-
|
|
2271
|
+
se(a, l) || fe(
|
|
2212
2272
|
n,
|
|
2213
2273
|
{
|
|
2214
2274
|
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
2215
2275
|
derivedItemConstraints: o.derivedItemConstraints,
|
|
2216
2276
|
axisSize: o.axisSize,
|
|
2217
|
-
layout:
|
|
2277
|
+
layout: l,
|
|
2218
2278
|
requestedAxisSize: o.axisSize,
|
|
2219
|
-
requestedLayout:
|
|
2279
|
+
requestedLayout: l,
|
|
2220
2280
|
separatorToItems: o.separatorToItems
|
|
2221
2281
|
},
|
|
2222
2282
|
// Keyboard resizes (arrow keys, Home/End, Enter collapse/expand) originate
|
|
@@ -2226,10 +2286,10 @@ function we(e, t) {
|
|
|
2226
2286
|
{ isUserInteraction: true }
|
|
2227
2287
|
);
|
|
2228
2288
|
}
|
|
2229
|
-
function
|
|
2289
|
+
function Ot$1(e) {
|
|
2230
2290
|
if (e.defaultPrevented)
|
|
2231
2291
|
return;
|
|
2232
|
-
const t = e.currentTarget, n =
|
|
2292
|
+
const t = e.currentTarget, n = gn(t);
|
|
2233
2293
|
if (!(n.disabled || n.separators.find(
|
|
2234
2294
|
(r) => r.element === t
|
|
2235
2295
|
)?.disabled))
|
|
@@ -2256,18 +2316,18 @@ function Ct$1(e) {
|
|
|
2256
2316
|
}
|
|
2257
2317
|
case "Enter": {
|
|
2258
2318
|
e.preventDefault();
|
|
2259
|
-
const r = ae(n.id, true), { derivedItemConstraints: i, layout: s, separatorToItems:
|
|
2260
|
-
(
|
|
2319
|
+
const r = ae(n.id, true), { derivedItemConstraints: i, layout: s, separatorToItems: c2 } = r, a = n.separators.find(
|
|
2320
|
+
(g) => g.element === t
|
|
2261
2321
|
);
|
|
2262
|
-
|
|
2263
|
-
const
|
|
2264
|
-
|
|
2265
|
-
const
|
|
2266
|
-
(
|
|
2322
|
+
O(a, "Matching separator not found");
|
|
2323
|
+
const u = c2.get(a);
|
|
2324
|
+
O(u, "Matching panels not found");
|
|
2325
|
+
const l = u[0], d = i.find(
|
|
2326
|
+
(g) => g.itemId === l.id
|
|
2267
2327
|
);
|
|
2268
|
-
if (
|
|
2269
|
-
const
|
|
2270
|
-
we(t,
|
|
2328
|
+
if (O(d, "Panel metadata not found"), d.collapsible) {
|
|
2329
|
+
const g = s[l.id], p = d.collapsedSize === g ? n.mutableState.expandedItemSizes[l.id] ?? d.minSize : d.collapsedSize;
|
|
2330
|
+
we(t, p - g);
|
|
2271
2331
|
}
|
|
2272
2332
|
break;
|
|
2273
2333
|
}
|
|
@@ -2278,7 +2338,7 @@ function Ct$1(e) {
|
|
|
2278
2338
|
), i = Array.from(r).findIndex(
|
|
2279
2339
|
(a) => a === e.currentTarget
|
|
2280
2340
|
);
|
|
2281
|
-
|
|
2341
|
+
O(i !== null, "Index not found");
|
|
2282
2342
|
const s = e.shiftKey ? i > 0 ? i - 1 : r.length - 1 : i + 1 < r.length ? i + 1 : 0;
|
|
2283
2343
|
r[s].focus({
|
|
2284
2344
|
preventScroll: true
|
|
@@ -2291,33 +2351,39 @@ function Ct$1(e) {
|
|
|
2291
2351
|
}
|
|
2292
2352
|
}
|
|
2293
2353
|
}
|
|
2294
|
-
function
|
|
2295
|
-
const
|
|
2296
|
-
if (
|
|
2354
|
+
function ke(e, t) {
|
|
2355
|
+
const n = ie();
|
|
2356
|
+
if (n.state !== "active" || !nt$1(n, e, t))
|
|
2297
2357
|
return false;
|
|
2298
|
-
const
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
layout
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2358
|
+
const o = ge();
|
|
2359
|
+
et();
|
|
2360
|
+
try {
|
|
2361
|
+
n.previewLayoutMap.forEach((r, i) => {
|
|
2362
|
+
const s = o.get(i);
|
|
2363
|
+
i.resizePreviewMode === "separator" && s && !se(r, s.layout) && fe(i, {
|
|
2364
|
+
...s,
|
|
2365
|
+
layout: r,
|
|
2366
|
+
requestedAxisSize: s.axisSize,
|
|
2367
|
+
requestedLayout: r
|
|
2368
|
+
});
|
|
2369
|
+
}), St$1(), de({
|
|
2370
|
+
cursorFlags: 0,
|
|
2371
|
+
state: "inactive"
|
|
2372
|
+
}), n.hitRegions.forEach((r) => {
|
|
2373
|
+
if (!o.has(r.axis))
|
|
2374
|
+
return;
|
|
2375
|
+
const i = ae(r.axis.id, true);
|
|
2376
|
+
fe(r.axis, i, {
|
|
2377
|
+
isUserInteraction: true
|
|
2378
|
+
});
|
|
2316
2379
|
});
|
|
2317
|
-
}
|
|
2380
|
+
} finally {
|
|
2381
|
+
tt();
|
|
2382
|
+
}
|
|
2383
|
+
return true;
|
|
2318
2384
|
}
|
|
2319
|
-
function
|
|
2320
|
-
const t =
|
|
2385
|
+
function Nt$1(e) {
|
|
2386
|
+
const t = ie();
|
|
2321
2387
|
if (t.state !== "active")
|
|
2322
2388
|
return;
|
|
2323
2389
|
const n = t.hitRegions.flatMap(
|
|
@@ -2325,176 +2391,197 @@ function Rt(e) {
|
|
|
2325
2391
|
);
|
|
2326
2392
|
!n.some((o) => o === e.target) || n.some(
|
|
2327
2393
|
(o) => o.hasPointerCapture?.(e.pointerId)
|
|
2328
|
-
) ||
|
|
2394
|
+
) || ke(e.currentTarget, e);
|
|
2329
2395
|
}
|
|
2330
|
-
function
|
|
2331
|
-
|
|
2396
|
+
function Gt$1(e) {
|
|
2397
|
+
ke(e.currentTarget, e);
|
|
2332
2398
|
}
|
|
2333
|
-
function
|
|
2399
|
+
function ao(e, t) {
|
|
2334
2400
|
const { element: n, orientation: o, items: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
|
|
2335
|
-
return
|
|
2401
|
+
return gt({
|
|
2336
2402
|
expandHitTargets: false,
|
|
2337
2403
|
axis: e,
|
|
2338
2404
|
includeDisabled: true
|
|
2339
|
-
}).map(({ items: a, rect:
|
|
2340
|
-
const
|
|
2405
|
+
}).map(({ items: a, rect: u, separator: l }, d) => {
|
|
2406
|
+
const g = r.indexOf(a[0]), p = s ? u.left + u.width / 2 : u.top + u.height / 2;
|
|
2341
2407
|
return {
|
|
2342
2408
|
active: t.some((f) => {
|
|
2343
2409
|
if (f.axis !== e || f.items[0] !== a[0])
|
|
2344
2410
|
return false;
|
|
2345
|
-
if (
|
|
2346
|
-
return f.separator ===
|
|
2347
|
-
const
|
|
2348
|
-
return Y(
|
|
2411
|
+
if (l || f.separator)
|
|
2412
|
+
return f.separator === l;
|
|
2413
|
+
const y = s ? f.rect.left + f.rect.width / 2 : f.rect.top + f.rect.height / 2;
|
|
2414
|
+
return Y(p, y);
|
|
2349
2415
|
}),
|
|
2350
2416
|
axis: e,
|
|
2351
|
-
key:
|
|
2417
|
+
key: l ? `separator-${l.id}` : `panel-${a[0].id}-${d}`,
|
|
2352
2418
|
offset: 0,
|
|
2353
|
-
itemIndex:
|
|
2419
|
+
itemIndex: g,
|
|
2354
2420
|
rect: new DOMRect(
|
|
2355
|
-
(s && !
|
|
2356
|
-
(!s && !
|
|
2357
|
-
s && !
|
|
2358
|
-
!s && !
|
|
2421
|
+
(s && !l ? p : u.left) - i.left - n.clientLeft + n.scrollLeft,
|
|
2422
|
+
(!s && !l ? p : u.top) - i.top - n.clientTop + n.scrollTop,
|
|
2423
|
+
s && !l ? 0 : u.width,
|
|
2424
|
+
!s && !l ? 0 : u.height
|
|
2359
2425
|
),
|
|
2360
|
-
separator:
|
|
2426
|
+
separator: l
|
|
2361
2427
|
};
|
|
2362
2428
|
});
|
|
2363
2429
|
}
|
|
2364
|
-
function
|
|
2430
|
+
function Ft$1(e) {
|
|
2365
2431
|
if (e.defaultPrevented)
|
|
2366
2432
|
return;
|
|
2367
2433
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
2368
2434
|
return;
|
|
2369
|
-
const t =
|
|
2370
|
-
if (
|
|
2435
|
+
const t = ie();
|
|
2436
|
+
if (t.state === "active") {
|
|
2437
|
+
mn(t, e) && ke(
|
|
2438
|
+
t.ownerDocument,
|
|
2439
|
+
t
|
|
2440
|
+
);
|
|
2441
|
+
return;
|
|
2442
|
+
}
|
|
2443
|
+
const n = ge(), o = bt$1(
|
|
2444
|
+
e,
|
|
2445
|
+
n,
|
|
2446
|
+
e.currentTarget
|
|
2447
|
+
);
|
|
2448
|
+
if (o.length === 0)
|
|
2371
2449
|
return;
|
|
2372
|
-
const
|
|
2373
|
-
let
|
|
2374
|
-
|
|
2375
|
-
|
|
2450
|
+
const r = /* @__PURE__ */ new Map();
|
|
2451
|
+
let i = false;
|
|
2452
|
+
o.forEach((c2) => {
|
|
2453
|
+
c2.separator && (i || (i = true, c2.separator.element.focus({
|
|
2376
2454
|
// @ts-expect-error https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#browser_compatibility
|
|
2377
2455
|
focusVisible: false,
|
|
2378
2456
|
preventScroll: true
|
|
2379
2457
|
})));
|
|
2380
|
-
const
|
|
2381
|
-
|
|
2458
|
+
const a = n.get(c2.axis);
|
|
2459
|
+
a && r.set(c2.axis, a.layout);
|
|
2382
2460
|
});
|
|
2383
|
-
const
|
|
2384
|
-
(
|
|
2461
|
+
const s = Array.from(r.keys()).flatMap(
|
|
2462
|
+
(c2) => c2.resizePreviewMode === "separator" ? ao(c2, o) : []
|
|
2385
2463
|
);
|
|
2386
2464
|
de({
|
|
2387
2465
|
cursorFlags: 0,
|
|
2388
2466
|
didPointerMove: false,
|
|
2389
|
-
hitRegions:
|
|
2390
|
-
initialLayoutMap:
|
|
2467
|
+
hitRegions: o,
|
|
2468
|
+
initialLayoutMap: r,
|
|
2469
|
+
ownerDocument: e.currentTarget,
|
|
2391
2470
|
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
2392
|
-
|
|
2393
|
-
|
|
2471
|
+
pointerId: e.pointerId,
|
|
2472
|
+
pointerType: e.pointerType,
|
|
2473
|
+
previewLayoutMap: new Map(r),
|
|
2474
|
+
previews: s,
|
|
2394
2475
|
state: "active"
|
|
2395
2476
|
}), e.preventDefault();
|
|
2396
2477
|
}
|
|
2397
|
-
function
|
|
2398
|
-
const t =
|
|
2399
|
-
switch (
|
|
2400
|
-
case "active":
|
|
2401
|
-
|
|
2478
|
+
function _t$1(e) {
|
|
2479
|
+
const t = e.currentTarget, n = ge(), o = ie();
|
|
2480
|
+
switch (o.state) {
|
|
2481
|
+
case "active": {
|
|
2482
|
+
if (!nt$1(o, t, e))
|
|
2483
|
+
return;
|
|
2484
|
+
vt({
|
|
2402
2485
|
commit: false,
|
|
2403
|
-
document: e.currentTarget,
|
|
2404
2486
|
event: e,
|
|
2405
|
-
hitRegions:
|
|
2406
|
-
initialLayoutMap:
|
|
2407
|
-
mountedAxes:
|
|
2408
|
-
prevCursorFlags:
|
|
2487
|
+
hitRegions: o.hitRegions,
|
|
2488
|
+
initialLayoutMap: o.initialLayoutMap,
|
|
2489
|
+
mountedAxes: n,
|
|
2490
|
+
prevCursorFlags: o.cursorFlags
|
|
2409
2491
|
});
|
|
2492
|
+
}
|
|
2410
2493
|
}
|
|
2411
2494
|
}
|
|
2412
|
-
function
|
|
2495
|
+
function Bt(e) {
|
|
2413
2496
|
if (e.defaultPrevented)
|
|
2414
2497
|
return;
|
|
2415
|
-
const t =
|
|
2416
|
-
switch (
|
|
2498
|
+
const t = e.currentTarget, n = ie(), o = ge();
|
|
2499
|
+
switch (n.state) {
|
|
2417
2500
|
case "active": {
|
|
2501
|
+
if (!nt$1(n, t, e))
|
|
2502
|
+
return;
|
|
2418
2503
|
if (
|
|
2419
2504
|
// Skip this check for "pointerleave" events, else Firefox triggers a false positive (see #514)
|
|
2420
2505
|
e.buttons === 0
|
|
2421
2506
|
) {
|
|
2422
|
-
|
|
2507
|
+
ke(t, e);
|
|
2423
2508
|
return;
|
|
2424
2509
|
}
|
|
2425
|
-
for (const
|
|
2426
|
-
if (
|
|
2427
|
-
const { element:
|
|
2428
|
-
|
|
2510
|
+
for (const r of n.hitRegions)
|
|
2511
|
+
if (r.separator) {
|
|
2512
|
+
const { element: i } = r.separator;
|
|
2513
|
+
i.isConnected && !i.hasPointerCapture?.(e.pointerId) && i.setPointerCapture?.(e.pointerId);
|
|
2429
2514
|
}
|
|
2430
|
-
|
|
2515
|
+
vt({
|
|
2431
2516
|
commit: false,
|
|
2432
|
-
document: e.currentTarget,
|
|
2433
2517
|
event: e,
|
|
2434
|
-
hitRegions:
|
|
2435
|
-
initialLayoutMap:
|
|
2436
|
-
mountedAxes:
|
|
2437
|
-
pointerDownAtPoint:
|
|
2438
|
-
prevCursorFlags:
|
|
2518
|
+
hitRegions: n.hitRegions,
|
|
2519
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
2520
|
+
mountedAxes: o,
|
|
2521
|
+
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
2522
|
+
prevCursorFlags: n.cursorFlags
|
|
2439
2523
|
});
|
|
2440
2524
|
break;
|
|
2441
2525
|
}
|
|
2442
2526
|
default: {
|
|
2443
|
-
const
|
|
2444
|
-
|
|
2527
|
+
const r = bt$1(
|
|
2528
|
+
e,
|
|
2529
|
+
o,
|
|
2530
|
+
t
|
|
2531
|
+
);
|
|
2532
|
+
r.length === 0 ? n.state !== "inactive" && de({
|
|
2445
2533
|
cursorFlags: 0,
|
|
2446
2534
|
state: "inactive"
|
|
2447
2535
|
}) : de({
|
|
2448
2536
|
cursorFlags: 0,
|
|
2449
|
-
hitRegions:
|
|
2537
|
+
hitRegions: r,
|
|
2538
|
+
ownerDocument: t,
|
|
2450
2539
|
state: "hover"
|
|
2451
|
-
})
|
|
2540
|
+
});
|
|
2452
2541
|
break;
|
|
2453
2542
|
}
|
|
2454
2543
|
}
|
|
2455
2544
|
}
|
|
2456
|
-
function
|
|
2457
|
-
if (e.relatedTarget instanceof HTMLIFrameElement)
|
|
2458
|
-
|
|
2545
|
+
function qt(e) {
|
|
2546
|
+
if (e.relatedTarget instanceof HTMLIFrameElement) {
|
|
2547
|
+
const t = ie();
|
|
2548
|
+
switch (t.state) {
|
|
2459
2549
|
case "hover":
|
|
2460
|
-
de({
|
|
2550
|
+
t.ownerDocument === e.currentTarget && de({
|
|
2461
2551
|
cursorFlags: 0,
|
|
2462
2552
|
state: "inactive"
|
|
2463
2553
|
});
|
|
2464
2554
|
}
|
|
2555
|
+
}
|
|
2465
2556
|
}
|
|
2466
|
-
function
|
|
2467
|
-
|
|
2468
|
-
return;
|
|
2469
|
-
if (e.pointerType === "mouse" && e.button > 0)
|
|
2470
|
-
return;
|
|
2471
|
-
nn(
|
|
2472
|
-
e.currentTarget,
|
|
2473
|
-
e
|
|
2474
|
-
) && e.preventDefault();
|
|
2557
|
+
function Ht(e) {
|
|
2558
|
+
e.defaultPrevented || e.pointerType === "mouse" && e.button > 0 || pn(e.currentTarget, e);
|
|
2475
2559
|
}
|
|
2476
|
-
function
|
|
2477
|
-
e.target === e.currentTarget &&
|
|
2560
|
+
function Vt(e) {
|
|
2561
|
+
e.target === e.currentTarget && ke(e.currentTarget.document);
|
|
2562
|
+
}
|
|
2563
|
+
function jt$1(e) {
|
|
2564
|
+
ke(e.currentTarget.document);
|
|
2478
2565
|
}
|
|
2479
|
-
function
|
|
2566
|
+
function co(e) {
|
|
2480
2567
|
let t = 0, n = 0;
|
|
2481
2568
|
const o = {};
|
|
2482
2569
|
for (const i of e)
|
|
2483
2570
|
if (i.defaultSize !== void 0) {
|
|
2484
2571
|
t++;
|
|
2485
|
-
const s =
|
|
2572
|
+
const s = K(i.defaultSize);
|
|
2486
2573
|
n += s, o[i.itemId] = s;
|
|
2487
2574
|
} else
|
|
2488
2575
|
o[i.itemId] = void 0;
|
|
2489
2576
|
const r = e.length - t;
|
|
2490
2577
|
if (r !== 0) {
|
|
2491
|
-
const i =
|
|
2578
|
+
const i = K((100 - n) / r);
|
|
2492
2579
|
for (const s of e)
|
|
2493
2580
|
s.defaultSize === void 0 && (o[s.itemId] = i);
|
|
2494
2581
|
}
|
|
2495
2582
|
return o;
|
|
2496
2583
|
}
|
|
2497
|
-
function
|
|
2584
|
+
function lo(e, t) {
|
|
2498
2585
|
const n = e.map((r) => r.id), o = Object.keys(t);
|
|
2499
2586
|
if (n.length !== o.length)
|
|
2500
2587
|
return false;
|
|
@@ -2503,18 +2590,18 @@ function Xn(e, t) {
|
|
|
2503
2590
|
return false;
|
|
2504
2591
|
return true;
|
|
2505
2592
|
}
|
|
2506
|
-
function
|
|
2593
|
+
function Ut({
|
|
2507
2594
|
axis: e,
|
|
2508
2595
|
itemConstraints: t
|
|
2509
2596
|
}) {
|
|
2510
2597
|
const n = e.items.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
|
|
2511
|
-
return e.mutableState.layouts[n] ?? (o &&
|
|
2598
|
+
return e.mutableState.layouts[n] ?? (o && lo(e.items, o) ? o : co(t));
|
|
2512
2599
|
}
|
|
2513
|
-
function
|
|
2600
|
+
function Wt({
|
|
2514
2601
|
itemIds: e,
|
|
2515
2602
|
layout: t
|
|
2516
2603
|
}) {
|
|
2517
|
-
return
|
|
2604
|
+
return Se({
|
|
2518
2605
|
layout: t,
|
|
2519
2606
|
itemConstraints: e.map((n) => ({
|
|
2520
2607
|
collapsedSize: 0,
|
|
@@ -2527,19 +2614,19 @@ function Ot$1({
|
|
|
2527
2614
|
}))
|
|
2528
2615
|
});
|
|
2529
2616
|
}
|
|
2530
|
-
function
|
|
2617
|
+
function uo(e, t, n) {
|
|
2531
2618
|
if (!n[0])
|
|
2532
2619
|
return;
|
|
2533
|
-
const r = e.items.find((
|
|
2620
|
+
const r = e.items.find((u) => u.element === t);
|
|
2534
2621
|
if (!r || !r.onResize)
|
|
2535
2622
|
return;
|
|
2536
|
-
const i =
|
|
2537
|
-
asPercentage:
|
|
2623
|
+
const i = Te({ axis: e }), s = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, c2 = r.mutableValues.prevSize, a = {
|
|
2624
|
+
asPercentage: K(s / i * 100),
|
|
2538
2625
|
inPixels: s
|
|
2539
2626
|
};
|
|
2540
|
-
r.mutableValues.prevSize = a, r.onResize(a, r.id,
|
|
2627
|
+
r.mutableValues.prevSize = a, r.onResize(a, r.id, c2);
|
|
2541
2628
|
}
|
|
2542
|
-
function
|
|
2629
|
+
function yn(e, t) {
|
|
2543
2630
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
2544
2631
|
return false;
|
|
2545
2632
|
for (const o in e)
|
|
@@ -2547,10 +2634,10 @@ function sn(e, t) {
|
|
|
2547
2634
|
return false;
|
|
2548
2635
|
return true;
|
|
2549
2636
|
}
|
|
2550
|
-
function
|
|
2551
|
-
return e.length !== t.length ? false : e.every((n, o) =>
|
|
2637
|
+
function fo(e, t) {
|
|
2638
|
+
return e.length !== t.length ? false : e.every((n, o) => yn(n, t[o]));
|
|
2552
2639
|
}
|
|
2553
|
-
function
|
|
2640
|
+
function mo({
|
|
2554
2641
|
axis: e,
|
|
2555
2642
|
nextAxisSize: t,
|
|
2556
2643
|
prevAxisSize: n,
|
|
@@ -2559,173 +2646,186 @@ function Qn({
|
|
|
2559
2646
|
if (n <= 0 || t <= 0 || n === t)
|
|
2560
2647
|
return o;
|
|
2561
2648
|
let r = 0, i = 0, s = false;
|
|
2562
|
-
const
|
|
2649
|
+
const c2 = /* @__PURE__ */ new Map(), a = [];
|
|
2563
2650
|
for (const d of e.items) {
|
|
2564
|
-
const
|
|
2651
|
+
const g = o[d.id] ?? 0;
|
|
2565
2652
|
switch (d.constraintProps.groupResizeBehavior) {
|
|
2566
2653
|
case "preserve-pixel-size": {
|
|
2567
2654
|
s = true;
|
|
2568
|
-
const
|
|
2569
|
-
|
|
2655
|
+
const p = g / 100 * n, m = K(
|
|
2656
|
+
p / t * 100
|
|
2570
2657
|
);
|
|
2571
|
-
|
|
2658
|
+
c2.set(d.id, m), r += m;
|
|
2572
2659
|
break;
|
|
2573
2660
|
}
|
|
2574
2661
|
case "preserve-relative-size":
|
|
2575
2662
|
default: {
|
|
2576
|
-
a.push(d.id), i +=
|
|
2663
|
+
a.push(d.id), i += g;
|
|
2577
2664
|
break;
|
|
2578
2665
|
}
|
|
2579
2666
|
}
|
|
2580
2667
|
}
|
|
2581
2668
|
if (!s || a.length === 0)
|
|
2582
2669
|
return o;
|
|
2583
|
-
const
|
|
2584
|
-
if (
|
|
2585
|
-
|
|
2670
|
+
const u = 100 - r, l = { ...o };
|
|
2671
|
+
if (c2.forEach((d, g) => {
|
|
2672
|
+
l[g] = d;
|
|
2586
2673
|
}), i > 0)
|
|
2587
2674
|
for (const d of a) {
|
|
2588
|
-
const
|
|
2589
|
-
|
|
2590
|
-
|
|
2675
|
+
const g = o[d] ?? 0;
|
|
2676
|
+
l[d] = K(
|
|
2677
|
+
g / i * u
|
|
2591
2678
|
);
|
|
2592
2679
|
}
|
|
2593
2680
|
else {
|
|
2594
|
-
const d =
|
|
2595
|
-
for (const
|
|
2596
|
-
|
|
2681
|
+
const d = K(u / a.length);
|
|
2682
|
+
for (const g of a)
|
|
2683
|
+
l[g] = d;
|
|
2597
2684
|
}
|
|
2598
|
-
return
|
|
2685
|
+
return l;
|
|
2599
2686
|
}
|
|
2600
2687
|
const Le = /* @__PURE__ */ new Map();
|
|
2601
|
-
|
|
2688
|
+
let Yt = false;
|
|
2689
|
+
function Sn(e) {
|
|
2602
2690
|
let t = true;
|
|
2603
|
-
|
|
2691
|
+
O(
|
|
2604
2692
|
e.element.ownerDocument.defaultView,
|
|
2605
2693
|
"Cannot register an unmounted Group"
|
|
2606
2694
|
);
|
|
2607
2695
|
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = new n((m) => {
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2696
|
+
let f;
|
|
2697
|
+
et();
|
|
2698
|
+
try {
|
|
2699
|
+
for (const y of m) {
|
|
2700
|
+
const { borderBoxSize: h, target: S } = y;
|
|
2701
|
+
if (S === e.element) {
|
|
2702
|
+
if (t) {
|
|
2703
|
+
const z = Te({ axis: e });
|
|
2704
|
+
if (z === 0)
|
|
2705
|
+
break;
|
|
2706
|
+
const x = ae(e.id);
|
|
2707
|
+
if (!x)
|
|
2708
|
+
break;
|
|
2709
|
+
const R = ut(e);
|
|
2710
|
+
let N = x.requestedAxisSize, $ = x.requestedLayout;
|
|
2711
|
+
x.defaultLayoutDeferred && (N = z, $ = Wt({
|
|
2712
|
+
itemIds: e.items.map(({ id: v }) => v),
|
|
2713
|
+
layout: Ut({
|
|
2714
|
+
axis: e,
|
|
2715
|
+
itemConstraints: R
|
|
2716
|
+
})
|
|
2717
|
+
}));
|
|
2718
|
+
const b = mo({
|
|
2623
2719
|
axis: e,
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
})
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2720
|
+
nextAxisSize: z,
|
|
2721
|
+
prevAxisSize: N,
|
|
2722
|
+
prevLayout: $
|
|
2723
|
+
}), w = Se({
|
|
2724
|
+
layout: b,
|
|
2725
|
+
itemConstraints: R
|
|
2726
|
+
});
|
|
2727
|
+
if (!x.defaultLayoutDeferred && se(x.layout, w) && fo(
|
|
2728
|
+
x.derivedItemConstraints,
|
|
2729
|
+
R
|
|
2730
|
+
) && x.axisSize === z)
|
|
2731
|
+
continue;
|
|
2732
|
+
fe(e, {
|
|
2733
|
+
defaultLayoutDeferred: false,
|
|
2734
|
+
derivedItemConstraints: R,
|
|
2735
|
+
axisSize: z,
|
|
2736
|
+
layout: w,
|
|
2737
|
+
requestedAxisSize: N,
|
|
2738
|
+
requestedLayout: $,
|
|
2739
|
+
separatorToItems: x.separatorToItems
|
|
2740
|
+
});
|
|
2741
|
+
}
|
|
2742
|
+
} else
|
|
2743
|
+
try {
|
|
2744
|
+
uo(e, S, h);
|
|
2745
|
+
} catch (z) {
|
|
2746
|
+
f ??= { error: z };
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
} finally {
|
|
2750
|
+
tt();
|
|
2653
2751
|
}
|
|
2752
|
+
if (f)
|
|
2753
|
+
throw f.error;
|
|
2654
2754
|
});
|
|
2655
2755
|
i.observe(e.element), e.items.forEach((m) => {
|
|
2656
|
-
|
|
2756
|
+
O(
|
|
2657
2757
|
!o.has(m.id),
|
|
2658
2758
|
`Panel ids must be unique; id "${m.id}" was used more than once`
|
|
2659
2759
|
), o.add(m.id), m.onResize && i.observe(m.element);
|
|
2660
2760
|
});
|
|
2661
|
-
const s =
|
|
2761
|
+
const s = Te({ axis: e }), c2 = ut(e), a = Ut({
|
|
2662
2762
|
axis: e,
|
|
2663
|
-
itemConstraints:
|
|
2664
|
-
}),
|
|
2763
|
+
itemConstraints: c2
|
|
2764
|
+
}), u = Se({
|
|
2665
2765
|
layout: a,
|
|
2666
|
-
itemConstraints:
|
|
2667
|
-
}),
|
|
2766
|
+
itemConstraints: c2
|
|
2767
|
+
}), l = e.element.ownerDocument, d = l.defaultView;
|
|
2668
2768
|
Le.set(
|
|
2669
|
-
|
|
2670
|
-
(Le.get(
|
|
2769
|
+
l,
|
|
2770
|
+
(Le.get(l) ?? 0) + 1
|
|
2671
2771
|
);
|
|
2672
|
-
const
|
|
2673
|
-
return
|
|
2674
|
-
m.separator &&
|
|
2772
|
+
const g = /* @__PURE__ */ new Map();
|
|
2773
|
+
return gt({ axis: e, includeDisabled: true }).forEach((m) => {
|
|
2774
|
+
m.separator && g.set(m.separator, m.items);
|
|
2675
2775
|
}), fe(e, {
|
|
2676
2776
|
defaultLayoutDeferred: s === 0,
|
|
2677
|
-
derivedItemConstraints:
|
|
2777
|
+
derivedItemConstraints: c2,
|
|
2678
2778
|
axisSize: s,
|
|
2679
|
-
layout:
|
|
2779
|
+
layout: u,
|
|
2680
2780
|
requestedAxisSize: s,
|
|
2681
|
-
requestedLayout:
|
|
2781
|
+
requestedLayout: Wt({
|
|
2682
2782
|
itemIds: e.items.map(({ id: m }) => m),
|
|
2683
2783
|
layout: a
|
|
2684
2784
|
}),
|
|
2685
|
-
separatorToItems:
|
|
2785
|
+
separatorToItems: g
|
|
2686
2786
|
}), e.separators.forEach((m) => {
|
|
2687
|
-
|
|
2787
|
+
O(
|
|
2688
2788
|
!r.has(m.id),
|
|
2689
2789
|
`Separator ids must be unique; id "${m.id}" was used more than once`
|
|
2690
|
-
), r.add(m.id), m.element.addEventListener("keydown",
|
|
2691
|
-
}), Le.get(
|
|
2790
|
+
), r.add(m.id), m.element.addEventListener("keydown", Ot$1);
|
|
2791
|
+
}), Yt || (Yt = true, pt(Bn)), Le.get(l) === 1 && (l.addEventListener("contextmenu", Tt$1, true), l.addEventListener("dblclick", $t$1, true), l.addEventListener(
|
|
2692
2792
|
"lostpointercapture",
|
|
2693
|
-
|
|
2793
|
+
Nt$1,
|
|
2694
2794
|
true
|
|
2695
|
-
),
|
|
2795
|
+
), l.addEventListener(
|
|
2696
2796
|
"pointercancel",
|
|
2697
|
-
|
|
2797
|
+
Gt$1,
|
|
2698
2798
|
true
|
|
2699
|
-
),
|
|
2799
|
+
), l.addEventListener("pointerdown", Ft$1, true), l.addEventListener("pointerleave", _t$1), l.addEventListener("pointermove", Bt), l.addEventListener("pointerout", qt), l.addEventListener("pointerup", Ht, true), d?.addEventListener("blur", Vt), d?.addEventListener("pagehide", jt$1)), function() {
|
|
2700
2800
|
t = false, Le.set(
|
|
2701
|
-
|
|
2702
|
-
Math.max(0, (Le.get(
|
|
2703
|
-
),
|
|
2704
|
-
f.element.removeEventListener("keydown",
|
|
2705
|
-
}), Le.get(
|
|
2801
|
+
l,
|
|
2802
|
+
Math.max(0, (Le.get(l) ?? 0) - 1)
|
|
2803
|
+
), Xn(e), Gn(e), e.separators.forEach((f) => {
|
|
2804
|
+
f.element.removeEventListener("keydown", Ot$1);
|
|
2805
|
+
}), Le.get(l) || (l.removeEventListener(
|
|
2706
2806
|
"contextmenu",
|
|
2707
|
-
|
|
2807
|
+
Tt$1,
|
|
2708
2808
|
true
|
|
2709
|
-
),
|
|
2809
|
+
), l.removeEventListener(
|
|
2710
2810
|
"dblclick",
|
|
2711
|
-
|
|
2811
|
+
$t$1,
|
|
2712
2812
|
true
|
|
2713
|
-
),
|
|
2813
|
+
), l.removeEventListener(
|
|
2714
2814
|
"lostpointercapture",
|
|
2715
|
-
|
|
2815
|
+
Nt$1,
|
|
2716
2816
|
true
|
|
2717
|
-
),
|
|
2817
|
+
), l.removeEventListener(
|
|
2718
2818
|
"pointercancel",
|
|
2719
|
-
|
|
2819
|
+
Gt$1,
|
|
2720
2820
|
true
|
|
2721
|
-
),
|
|
2821
|
+
), l.removeEventListener(
|
|
2722
2822
|
"pointerdown",
|
|
2723
|
-
|
|
2823
|
+
Ft$1,
|
|
2724
2824
|
true
|
|
2725
|
-
),
|
|
2825
|
+
), l.removeEventListener("pointerleave", _t$1), l.removeEventListener("pointermove", Bt), l.removeEventListener("pointerout", qt), l.removeEventListener("pointerup", Ht, true), d?.removeEventListener("blur", Vt), d?.removeEventListener("pagehide", jt$1)), i.disconnect();
|
|
2726
2826
|
};
|
|
2727
2827
|
}
|
|
2728
|
-
function
|
|
2828
|
+
function vn({
|
|
2729
2829
|
derivedItemConstraints: e,
|
|
2730
2830
|
axis: t,
|
|
2731
2831
|
layout: n,
|
|
@@ -2735,56 +2835,56 @@ function ln({
|
|
|
2735
2835
|
const i = t.items.map(({ id: s }) => s).join(",");
|
|
2736
2836
|
t.mutableState.layouts[i] = r, o && e.forEach((s) => {
|
|
2737
2837
|
if (s.collapsible) {
|
|
2738
|
-
const
|
|
2838
|
+
const c2 = Y(
|
|
2739
2839
|
s.collapsedSize,
|
|
2740
2840
|
n[s.itemId]
|
|
2741
2841
|
), a = Y(
|
|
2742
2842
|
s.collapsedSize,
|
|
2743
2843
|
o[s.itemId]
|
|
2744
2844
|
);
|
|
2745
|
-
|
|
2845
|
+
c2 && !a && (t.mutableState.expandedItemSizes[s.itemId] = o[s.itemId]);
|
|
2746
2846
|
}
|
|
2747
2847
|
});
|
|
2748
2848
|
}
|
|
2749
|
-
function
|
|
2849
|
+
function bn() {
|
|
2750
2850
|
const [e, t] = useState({}), n = useCallback(() => t({}), []);
|
|
2751
2851
|
return [e, n];
|
|
2752
2852
|
}
|
|
2753
|
-
function
|
|
2853
|
+
function ot(e) {
|
|
2754
2854
|
const t = useRef({ ...e });
|
|
2755
2855
|
return ne(() => {
|
|
2756
2856
|
for (const n in e)
|
|
2757
2857
|
t.current[n] = e[n];
|
|
2758
2858
|
}, [e]), t.current;
|
|
2759
2859
|
}
|
|
2760
|
-
const
|
|
2761
|
-
function
|
|
2860
|
+
const wt$1 = createContext(null);
|
|
2861
|
+
function po({
|
|
2762
2862
|
layout: e,
|
|
2763
2863
|
itemConstraints: t,
|
|
2764
2864
|
itemId: n,
|
|
2765
2865
|
itemIndex: o
|
|
2766
2866
|
}) {
|
|
2767
2867
|
let r, i;
|
|
2768
|
-
const s = e[n],
|
|
2868
|
+
const s = e[n], c2 = t.find(
|
|
2769
2869
|
(a) => a.itemId === n
|
|
2770
2870
|
);
|
|
2771
|
-
if (
|
|
2772
|
-
const a =
|
|
2773
|
-
i =
|
|
2774
|
-
layout:
|
|
2775
|
-
delta:
|
|
2871
|
+
if (c2) {
|
|
2872
|
+
const a = c2.maxSize, u = c2.collapsible ? c2.collapsedSize : c2.minSize, l = [o, o + 1];
|
|
2873
|
+
i = Se({
|
|
2874
|
+
layout: qe({
|
|
2875
|
+
delta: u - s,
|
|
2776
2876
|
initialLayout: e,
|
|
2777
2877
|
itemConstraints: t,
|
|
2778
|
-
pivotIndices:
|
|
2878
|
+
pivotIndices: l,
|
|
2779
2879
|
prevLayout: e
|
|
2780
2880
|
}),
|
|
2781
2881
|
itemConstraints: t
|
|
2782
|
-
})[n], r =
|
|
2783
|
-
layout:
|
|
2882
|
+
})[n], r = Se({
|
|
2883
|
+
layout: qe({
|
|
2784
2884
|
delta: a - s,
|
|
2785
2885
|
initialLayout: e,
|
|
2786
2886
|
itemConstraints: t,
|
|
2787
|
-
pivotIndices:
|
|
2887
|
+
pivotIndices: l,
|
|
2788
2888
|
prevLayout: e
|
|
2789
2889
|
}),
|
|
2790
2890
|
itemConstraints: t
|
|
@@ -2797,7 +2897,7 @@ function eo({
|
|
|
2797
2897
|
valueNow: s
|
|
2798
2898
|
};
|
|
2799
2899
|
}
|
|
2800
|
-
function
|
|
2900
|
+
function xn({
|
|
2801
2901
|
attributes: e,
|
|
2802
2902
|
axisId: t,
|
|
2803
2903
|
axisOrientation: n,
|
|
@@ -2805,75 +2905,75 @@ function un({
|
|
|
2805
2905
|
className: r,
|
|
2806
2906
|
disableCursor: i,
|
|
2807
2907
|
disabled: s,
|
|
2808
|
-
disableDoubleClick:
|
|
2908
|
+
disableDoubleClick: c2,
|
|
2809
2909
|
elementRef: a,
|
|
2810
|
-
id:
|
|
2811
|
-
isSharedHitRegion:
|
|
2910
|
+
id: u,
|
|
2911
|
+
isSharedHitRegion: l,
|
|
2812
2912
|
preview: d,
|
|
2813
|
-
registerSeparator:
|
|
2814
|
-
requiredStyle:
|
|
2913
|
+
registerSeparator: g,
|
|
2914
|
+
requiredStyle: p,
|
|
2815
2915
|
style: m,
|
|
2816
2916
|
styleDefaults: f,
|
|
2817
|
-
tabIndex:
|
|
2917
|
+
tabIndex: y = 0,
|
|
2818
2918
|
updateSeparatorProps: h
|
|
2819
2919
|
}) {
|
|
2820
|
-
const
|
|
2920
|
+
const S = ot({
|
|
2821
2921
|
disabled: s,
|
|
2822
|
-
disableDoubleClick:
|
|
2922
|
+
disableDoubleClick: c2,
|
|
2823
2923
|
children: o,
|
|
2824
2924
|
className: r,
|
|
2825
2925
|
preview: d,
|
|
2826
2926
|
style: m
|
|
2827
|
-
}), [
|
|
2927
|
+
}), [z, x] = useState({}), [R, N] = useState("inactive"), [$, b] = useState(false), w = useRef(null), v = useRef(null), T = Ve(w, a), A = n === "horizontal" ? "vertical" : "horizontal";
|
|
2828
2928
|
ne(() => {
|
|
2829
|
-
const
|
|
2830
|
-
if (
|
|
2831
|
-
const
|
|
2832
|
-
disabled:
|
|
2833
|
-
disableDoubleClick:
|
|
2834
|
-
element:
|
|
2835
|
-
id:
|
|
2929
|
+
const C = w.current;
|
|
2930
|
+
if (C !== null) {
|
|
2931
|
+
const I = {
|
|
2932
|
+
disabled: S.disabled,
|
|
2933
|
+
disableDoubleClick: S.disableDoubleClick,
|
|
2934
|
+
element: C,
|
|
2935
|
+
id: u,
|
|
2836
2936
|
get children() {
|
|
2837
|
-
return
|
|
2937
|
+
return S.children;
|
|
2838
2938
|
},
|
|
2839
2939
|
get className() {
|
|
2840
|
-
return
|
|
2940
|
+
return S.className;
|
|
2841
2941
|
},
|
|
2842
2942
|
get preview() {
|
|
2843
|
-
return
|
|
2943
|
+
return S.preview;
|
|
2844
2944
|
},
|
|
2845
2945
|
get style() {
|
|
2846
|
-
return
|
|
2946
|
+
return S.style;
|
|
2847
2947
|
}
|
|
2848
2948
|
};
|
|
2849
|
-
v.current =
|
|
2850
|
-
const M =
|
|
2949
|
+
v.current = I;
|
|
2950
|
+
const M = g(I), q = pt(
|
|
2851
2951
|
(H) => {
|
|
2852
|
-
|
|
2952
|
+
N(
|
|
2853
2953
|
H.next.state !== "inactive" && H.next.hitRegions.some(
|
|
2854
|
-
(Z) => Z.separator ===
|
|
2954
|
+
(Z) => Z.separator === I || (l?.(Z) ?? false)
|
|
2855
2955
|
) ? H.next.state : "inactive"
|
|
2856
2956
|
);
|
|
2857
2957
|
}
|
|
2858
|
-
), J =
|
|
2958
|
+
), J = Be(
|
|
2859
2959
|
t,
|
|
2860
2960
|
(H) => {
|
|
2861
|
-
const { derivedItemConstraints: Z, layout:
|
|
2961
|
+
const { derivedItemConstraints: Z, layout: ve, separatorToItems: ze } = H.next, Ie = ze.get(I);
|
|
2862
2962
|
if (Ie) {
|
|
2863
|
-
const
|
|
2864
|
-
(
|
|
2865
|
-
), { layoutStrategy:
|
|
2963
|
+
const be = Ie[0], L = Z.findIndex(
|
|
2964
|
+
(F2) => F2.itemId === be.id
|
|
2965
|
+
), { layoutStrategy: P } = H.axis;
|
|
2866
2966
|
x({
|
|
2867
|
-
...
|
|
2868
|
-
layout:
|
|
2967
|
+
...po({
|
|
2968
|
+
layout: ve,
|
|
2869
2969
|
itemConstraints: Z,
|
|
2870
|
-
itemId:
|
|
2970
|
+
itemId: be.id,
|
|
2871
2971
|
itemIndex: L
|
|
2872
2972
|
}),
|
|
2873
2973
|
// Items without DOM elements of their own (e.g. Grid tracks) control other elements
|
|
2874
|
-
...
|
|
2875
|
-
valueControls:
|
|
2876
|
-
|
|
2974
|
+
...P?.getItemAriaControls && {
|
|
2975
|
+
valueControls: P.getItemAriaControls(
|
|
2976
|
+
be.id
|
|
2877
2977
|
)
|
|
2878
2978
|
}
|
|
2879
2979
|
});
|
|
@@ -2884,83 +2984,83 @@ function un({
|
|
|
2884
2984
|
v.current = null, q(), J(), M();
|
|
2885
2985
|
};
|
|
2886
2986
|
}
|
|
2887
|
-
}, [t,
|
|
2888
|
-
const
|
|
2889
|
-
|
|
2987
|
+
}, [t, u, l, g, S]), ne(() => {
|
|
2988
|
+
const C = v.current;
|
|
2989
|
+
C && Nn(C);
|
|
2890
2990
|
}, [d]), useEffect(() => {
|
|
2891
|
-
h(
|
|
2892
|
-
}, [s,
|
|
2893
|
-
let R;
|
|
2894
|
-
s && !i && (R = "not-allowed");
|
|
2991
|
+
h(u, { disabled: s, disableDoubleClick: c2 });
|
|
2992
|
+
}, [s, c2, u, h]);
|
|
2895
2993
|
let E;
|
|
2994
|
+
s && !i && (E = "not-allowed");
|
|
2995
|
+
let D;
|
|
2896
2996
|
if (s)
|
|
2897
|
-
|
|
2997
|
+
D = "disabled";
|
|
2898
2998
|
else
|
|
2899
|
-
switch (
|
|
2999
|
+
switch (R) {
|
|
2900
3000
|
case "active": {
|
|
2901
|
-
|
|
3001
|
+
D = "active";
|
|
2902
3002
|
break;
|
|
2903
3003
|
}
|
|
2904
3004
|
default:
|
|
2905
|
-
|
|
3005
|
+
$ ? D = "focus" : D = R;
|
|
2906
3006
|
}
|
|
2907
3007
|
return /* @__PURE__ */ jsx(
|
|
2908
3008
|
"div",
|
|
2909
3009
|
{
|
|
2910
3010
|
...e,
|
|
2911
|
-
"aria-controls":
|
|
3011
|
+
"aria-controls": z.valueControls,
|
|
2912
3012
|
"aria-disabled": s || void 0,
|
|
2913
|
-
"aria-orientation":
|
|
2914
|
-
"aria-valuemax":
|
|
2915
|
-
"aria-valuemin":
|
|
2916
|
-
"aria-valuenow":
|
|
3013
|
+
"aria-orientation": A,
|
|
3014
|
+
"aria-valuemax": z.valueMax,
|
|
3015
|
+
"aria-valuemin": z.valueMin,
|
|
3016
|
+
"aria-valuenow": z.valueNow,
|
|
2917
3017
|
children: o,
|
|
2918
3018
|
className: r,
|
|
2919
|
-
"data-separator":
|
|
2920
|
-
"data-testid":
|
|
2921
|
-
id:
|
|
3019
|
+
"data-separator": D,
|
|
3020
|
+
"data-testid": u,
|
|
3021
|
+
id: u,
|
|
2922
3022
|
onBlur: () => b(false),
|
|
2923
3023
|
onFocus: () => b(true),
|
|
2924
3024
|
ref: T,
|
|
2925
3025
|
role: "separator",
|
|
2926
3026
|
style: {
|
|
2927
3027
|
...f,
|
|
2928
|
-
cursor:
|
|
3028
|
+
cursor: E,
|
|
2929
3029
|
...m,
|
|
2930
|
-
...
|
|
3030
|
+
...p,
|
|
2931
3031
|
// Inform the browser that the library is handling touch events for this element
|
|
2932
3032
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
2933
3033
|
touchAction: "none"
|
|
2934
3034
|
},
|
|
2935
|
-
tabIndex: s ? void 0 :
|
|
3035
|
+
tabIndex: s ? void 0 : y
|
|
2936
3036
|
}
|
|
2937
3037
|
);
|
|
2938
3038
|
}
|
|
2939
|
-
function
|
|
3039
|
+
function vo(e) {
|
|
2940
3040
|
for (let t = 1; t < e.length; t++)
|
|
2941
|
-
if (
|
|
3041
|
+
if (ht$1(e[t - 1], e[t]) > 0)
|
|
2942
3042
|
return false;
|
|
2943
3043
|
return true;
|
|
2944
3044
|
}
|
|
2945
|
-
function
|
|
3045
|
+
function bo({
|
|
2946
3046
|
separator: e
|
|
2947
3047
|
}) {
|
|
2948
3048
|
const { element: t } = e, n = useRef(null);
|
|
2949
3049
|
return ne(() => {
|
|
2950
3050
|
const o = t.cloneNode(true), r = [t, ...t.querySelectorAll("*")], i = [o, ...o.querySelectorAll("*")], s = t.ownerDocument.defaultView;
|
|
2951
|
-
return r.forEach((
|
|
2952
|
-
const
|
|
2953
|
-
if (
|
|
2954
|
-
const
|
|
2955
|
-
for (let d = 0; d <
|
|
2956
|
-
const
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
3051
|
+
return r.forEach((c2, a) => {
|
|
3052
|
+
const u = i[a];
|
|
3053
|
+
if (u instanceof s.HTMLElement || u instanceof s.SVGElement) {
|
|
3054
|
+
const l = s.getComputedStyle(c2);
|
|
3055
|
+
for (let d = 0; d < l.length; d++) {
|
|
3056
|
+
const g = l.item(d);
|
|
3057
|
+
u.style.setProperty(
|
|
3058
|
+
g,
|
|
3059
|
+
l.getPropertyValue(g)
|
|
2960
3060
|
);
|
|
2961
3061
|
}
|
|
2962
3062
|
}
|
|
2963
|
-
|
|
3063
|
+
u.removeAttribute("data-testid"), u.removeAttribute("id");
|
|
2964
3064
|
}), Object.assign(o.style, {
|
|
2965
3065
|
boxSizing: "border-box",
|
|
2966
3066
|
height: "100%",
|
|
@@ -2982,24 +3082,24 @@ function so({
|
|
|
2982
3082
|
}
|
|
2983
3083
|
);
|
|
2984
3084
|
}
|
|
2985
|
-
function
|
|
2986
|
-
const e = useContext(
|
|
2987
|
-
return
|
|
3085
|
+
function rt() {
|
|
3086
|
+
const e = useContext(wt$1);
|
|
3087
|
+
return O(
|
|
2988
3088
|
e,
|
|
2989
3089
|
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
2990
3090
|
), e;
|
|
2991
3091
|
}
|
|
2992
|
-
function
|
|
2993
|
-
const { registerOverlay: t } =
|
|
2994
|
-
|
|
3092
|
+
function In(e) {
|
|
3093
|
+
const { registerOverlay: t } = rt(), n = useRef(e);
|
|
3094
|
+
yn(n.current, e) || (n.current = e);
|
|
2995
3095
|
const o = n.current;
|
|
2996
3096
|
return ne(
|
|
2997
3097
|
() => t(o),
|
|
2998
3098
|
[t, o]
|
|
2999
3099
|
), null;
|
|
3000
3100
|
}
|
|
3001
|
-
|
|
3002
|
-
function
|
|
3101
|
+
In.displayName = "SeparatorOverlay";
|
|
3102
|
+
function xo({
|
|
3003
3103
|
active: e,
|
|
3004
3104
|
orientation: t,
|
|
3005
3105
|
style: n,
|
|
@@ -3036,20 +3136,20 @@ function ao({
|
|
|
3036
3136
|
}
|
|
3037
3137
|
);
|
|
3038
3138
|
}
|
|
3039
|
-
function
|
|
3139
|
+
function wo({
|
|
3040
3140
|
overlay: e,
|
|
3041
3141
|
preview: t
|
|
3042
3142
|
}) {
|
|
3043
3143
|
const { axis: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
|
|
3044
|
-
let
|
|
3045
|
-
return isValidElement(
|
|
3046
|
-
|
|
3144
|
+
let c2 = i?.preview, a = e;
|
|
3145
|
+
return isValidElement(c2) && c2.type === In && (a = c2.props, c2 = void 0), c2 == null && (a ? c2 = /* @__PURE__ */ jsx(
|
|
3146
|
+
xo,
|
|
3047
3147
|
{
|
|
3048
3148
|
...a,
|
|
3049
3149
|
active: t.active,
|
|
3050
3150
|
orientation: n.orientation
|
|
3051
3151
|
}
|
|
3052
|
-
) : i && (
|
|
3152
|
+
) : i && (c2 = /* @__PURE__ */ jsx(bo, { separator: i }))), /* @__PURE__ */ jsx(
|
|
3053
3153
|
"div",
|
|
3054
3154
|
{
|
|
3055
3155
|
"aria-hidden": "true",
|
|
@@ -3064,50 +3164,50 @@ function lo({
|
|
|
3064
3164
|
transform: s ? `translateX(${o}px)` : `translateY(${o}px)`,
|
|
3065
3165
|
width: r.width
|
|
3066
3166
|
},
|
|
3067
|
-
children:
|
|
3167
|
+
children: c2
|
|
3068
3168
|
}
|
|
3069
3169
|
);
|
|
3070
3170
|
}
|
|
3071
|
-
function
|
|
3072
|
-
return Array.from(e).sort(
|
|
3171
|
+
function zo(e) {
|
|
3172
|
+
return Array.from(e).sort(ht$1);
|
|
3073
3173
|
}
|
|
3074
|
-
function
|
|
3174
|
+
function Io(e, t) {
|
|
3075
3175
|
const n = useRef({
|
|
3076
3176
|
getLayout: () => ({}),
|
|
3077
|
-
setLayout:
|
|
3177
|
+
setLayout: Fn
|
|
3078
3178
|
});
|
|
3079
3179
|
useImperativeHandle(t, () => n.current, []), ne(() => {
|
|
3080
3180
|
Object.assign(
|
|
3081
3181
|
n.current,
|
|
3082
|
-
|
|
3182
|
+
_e({ axisId: e })
|
|
3083
3183
|
);
|
|
3084
3184
|
});
|
|
3085
3185
|
}
|
|
3086
|
-
function
|
|
3186
|
+
function Lo({
|
|
3087
3187
|
groupId: e,
|
|
3088
3188
|
resizePreviewMode: t
|
|
3089
3189
|
}) {
|
|
3090
3190
|
const [n, o] = useState([]), r = useRef(n);
|
|
3091
3191
|
return ne(() => {
|
|
3092
|
-
const i = (
|
|
3093
|
-
const a =
|
|
3192
|
+
const i = (c2) => {
|
|
3193
|
+
const a = Ee(e), u = t === "separator" && c2.state === "active" ? c2.previews.filter(
|
|
3094
3194
|
(d) => d.axis === a && (d.active || !Y(d.offset, 0))
|
|
3095
|
-
) : [],
|
|
3096
|
-
|
|
3097
|
-
(d,
|
|
3098
|
-
) || (r.current =
|
|
3195
|
+
) : [], l = r.current;
|
|
3196
|
+
l.length === u.length && u.every(
|
|
3197
|
+
(d, g) => d === l[g]
|
|
3198
|
+
) || (r.current = u, o(u));
|
|
3099
3199
|
};
|
|
3100
3200
|
if (t !== "separator") {
|
|
3101
|
-
i(
|
|
3201
|
+
i(ie());
|
|
3102
3202
|
return;
|
|
3103
3203
|
}
|
|
3104
|
-
const s =
|
|
3105
|
-
({ next:
|
|
3204
|
+
const s = pt(
|
|
3205
|
+
({ next: c2 }) => i(c2)
|
|
3106
3206
|
);
|
|
3107
|
-
return i(
|
|
3207
|
+
return i(ie()), s;
|
|
3108
3208
|
}, [e, t]), n;
|
|
3109
3209
|
}
|
|
3110
|
-
function
|
|
3210
|
+
function Co({
|
|
3111
3211
|
children: e,
|
|
3112
3212
|
className: t,
|
|
3113
3213
|
defaultLayout: n,
|
|
@@ -3115,40 +3215,40 @@ function mo({
|
|
|
3115
3215
|
disabled: r,
|
|
3116
3216
|
elementRef: i,
|
|
3117
3217
|
groupRef: s,
|
|
3118
|
-
id:
|
|
3218
|
+
id: c2,
|
|
3119
3219
|
onLayoutChange: a,
|
|
3120
|
-
onLayoutChanged:
|
|
3121
|
-
orientation:
|
|
3220
|
+
onLayoutChanged: u,
|
|
3221
|
+
orientation: l = "horizontal",
|
|
3122
3222
|
resizePreviewMode: d = "panel",
|
|
3123
|
-
resizeTargetMinimumSize:
|
|
3223
|
+
resizeTargetMinimumSize: g = {
|
|
3124
3224
|
coarse: 20,
|
|
3125
3225
|
fine: 10
|
|
3126
3226
|
},
|
|
3127
|
-
style:
|
|
3227
|
+
style: p,
|
|
3128
3228
|
...m
|
|
3129
3229
|
}) {
|
|
3130
3230
|
const f = useRef({
|
|
3131
3231
|
onLayoutChange: {},
|
|
3132
3232
|
onLayoutChanged: {}
|
|
3133
|
-
}),
|
|
3134
|
-
|
|
3135
|
-
}), h =
|
|
3136
|
-
(
|
|
3137
|
-
|
|
3138
|
-
}
|
|
3139
|
-
),
|
|
3140
|
-
groupId:
|
|
3233
|
+
}), y = ye((I) => {
|
|
3234
|
+
se(f.current.onLayoutChange, I) || (f.current.onLayoutChange = I, a?.(I));
|
|
3235
|
+
}), h = ye(
|
|
3236
|
+
(I, M, q) => {
|
|
3237
|
+
se(f.current.onLayoutChanged, I) || (f.current.onLayoutChanged = I, u?.(I, { isUserInteraction: M, requestedLayout: q }));
|
|
3238
|
+
}
|
|
3239
|
+
), S = De(c2), [z, x] = useState(), R = Lo({
|
|
3240
|
+
groupId: S,
|
|
3141
3241
|
resizePreviewMode: d
|
|
3142
|
-
}),
|
|
3242
|
+
}), N = useRef(null), [$, b] = bn(), w = useRef([]), v = useRef({
|
|
3143
3243
|
lastExpandedPanelSizes: {},
|
|
3144
3244
|
layouts: {},
|
|
3145
3245
|
panels: [],
|
|
3146
3246
|
separators: []
|
|
3147
|
-
}), T =
|
|
3148
|
-
|
|
3149
|
-
const
|
|
3150
|
-
(
|
|
3151
|
-
const q = ae(
|
|
3247
|
+
}), T = Ve(N, i);
|
|
3248
|
+
Io(S, s);
|
|
3249
|
+
const A = ye(
|
|
3250
|
+
(I, M) => {
|
|
3251
|
+
const q = ae(I);
|
|
3152
3252
|
if (q)
|
|
3153
3253
|
return {
|
|
3154
3254
|
flexGrow: q.layout[M] ?? 1
|
|
@@ -3158,209 +3258,226 @@ function mo({
|
|
|
3158
3258
|
flexGrow: n?.[M]
|
|
3159
3259
|
};
|
|
3160
3260
|
}
|
|
3161
|
-
),
|
|
3261
|
+
), E = ot({
|
|
3162
3262
|
defaultLayout: n,
|
|
3163
3263
|
disableCursor: o,
|
|
3164
|
-
resizeTargetMinimumSize:
|
|
3165
|
-
}),
|
|
3264
|
+
resizeTargetMinimumSize: g
|
|
3265
|
+
}), D = useMemo(
|
|
3166
3266
|
() => ({
|
|
3167
3267
|
get disableCursor() {
|
|
3168
|
-
return !!
|
|
3268
|
+
return !!E.disableCursor;
|
|
3169
3269
|
},
|
|
3170
|
-
getPanelStyles:
|
|
3171
|
-
id:
|
|
3172
|
-
orientation:
|
|
3173
|
-
registerPanel: (
|
|
3270
|
+
getPanelStyles: A,
|
|
3271
|
+
id: S,
|
|
3272
|
+
orientation: l,
|
|
3273
|
+
registerPanel: (I) => {
|
|
3174
3274
|
const M = v.current;
|
|
3175
|
-
return M.panels =
|
|
3275
|
+
return M.panels = Ge(l, [
|
|
3176
3276
|
...M.panels,
|
|
3177
|
-
|
|
3277
|
+
I
|
|
3178
3278
|
]), b(), () => {
|
|
3179
3279
|
M.panels = M.panels.filter(
|
|
3180
|
-
(q) => q !==
|
|
3280
|
+
(q) => q !== I
|
|
3181
3281
|
), b();
|
|
3182
3282
|
};
|
|
3183
3283
|
},
|
|
3184
|
-
registerOverlay: (
|
|
3284
|
+
registerOverlay: (I) => (x(I), () => {
|
|
3185
3285
|
x(void 0);
|
|
3186
3286
|
}),
|
|
3187
|
-
registerSeparator: (
|
|
3287
|
+
registerSeparator: (I) => {
|
|
3188
3288
|
const M = v.current;
|
|
3189
|
-
return M.separators =
|
|
3289
|
+
return M.separators = Ge(l, [
|
|
3190
3290
|
...M.separators,
|
|
3191
|
-
|
|
3291
|
+
I
|
|
3192
3292
|
]), b(), () => {
|
|
3193
3293
|
M.separators = M.separators.filter(
|
|
3194
|
-
(q) => q !==
|
|
3294
|
+
(q) => q !== I
|
|
3195
3295
|
), b();
|
|
3196
3296
|
};
|
|
3197
3297
|
},
|
|
3198
|
-
updatePanelProps: (
|
|
3298
|
+
updatePanelProps: (I, { disabled: M }) => {
|
|
3199
3299
|
const J = v.current.panels.find(
|
|
3200
|
-
(
|
|
3300
|
+
(ve) => ve.id === I
|
|
3201
3301
|
);
|
|
3202
3302
|
J && (J.constraintProps.disabled = M);
|
|
3203
|
-
const H =
|
|
3303
|
+
const H = Ee(S), Z = ae(S);
|
|
3204
3304
|
H && Z && fe(H, {
|
|
3205
3305
|
...Z,
|
|
3206
|
-
derivedItemConstraints:
|
|
3306
|
+
derivedItemConstraints: ut(H)
|
|
3207
3307
|
});
|
|
3208
3308
|
},
|
|
3209
|
-
updateSeparatorProps: (
|
|
3309
|
+
updateSeparatorProps: (I, {
|
|
3210
3310
|
disabled: M,
|
|
3211
3311
|
disableDoubleClick: q
|
|
3212
3312
|
}) => {
|
|
3213
3313
|
const H = v.current.separators.find(
|
|
3214
|
-
(Z) => Z.id ===
|
|
3314
|
+
(Z) => Z.id === I
|
|
3215
3315
|
);
|
|
3216
3316
|
H && (H.disabled = M, H.disableDoubleClick = q);
|
|
3217
3317
|
}
|
|
3218
3318
|
}),
|
|
3219
|
-
[
|
|
3220
|
-
),
|
|
3319
|
+
[A, S, b, l, E]
|
|
3320
|
+
), C = useRef(null);
|
|
3221
3321
|
return ne(() => {
|
|
3222
|
-
const
|
|
3223
|
-
if (
|
|
3322
|
+
const I = N.current;
|
|
3323
|
+
if (I === null)
|
|
3224
3324
|
return;
|
|
3225
3325
|
const M = v.current;
|
|
3226
|
-
M.panels =
|
|
3227
|
-
|
|
3326
|
+
M.panels = Ge(
|
|
3327
|
+
l,
|
|
3228
3328
|
M.panels
|
|
3229
|
-
), M.separators =
|
|
3230
|
-
|
|
3329
|
+
), M.separators = Ge(
|
|
3330
|
+
l,
|
|
3231
3331
|
M.separators
|
|
3232
|
-
), w.current =
|
|
3332
|
+
), w.current = zo([
|
|
3233
3333
|
...M.panels.map(({ element: L }) => L),
|
|
3234
3334
|
...M.separators.map(({ element: L }) => L)
|
|
3235
3335
|
]);
|
|
3236
3336
|
let q;
|
|
3237
|
-
if (
|
|
3337
|
+
if (E.defaultLayout !== void 0 && Object.keys(E.defaultLayout).length === M.panels.length) {
|
|
3238
3338
|
q = {};
|
|
3239
3339
|
for (const L of M.panels) {
|
|
3240
|
-
const
|
|
3241
|
-
|
|
3340
|
+
const P = E.defaultLayout[L.id];
|
|
3341
|
+
P !== void 0 && (q[L.id] = P);
|
|
3242
3342
|
}
|
|
3243
3343
|
}
|
|
3244
3344
|
const J = {
|
|
3245
3345
|
disabled: !!r,
|
|
3246
|
-
element:
|
|
3247
|
-
id:
|
|
3346
|
+
element: I,
|
|
3347
|
+
id: S,
|
|
3248
3348
|
mutableState: {
|
|
3249
3349
|
defaultLayout: q,
|
|
3250
|
-
disableCursor: !!
|
|
3350
|
+
disableCursor: !!E.disableCursor,
|
|
3251
3351
|
expandedItemSizes: v.current.lastExpandedPanelSizes,
|
|
3252
3352
|
layouts: v.current.layouts
|
|
3253
3353
|
},
|
|
3254
|
-
orientation:
|
|
3354
|
+
orientation: l,
|
|
3255
3355
|
items: M.panels,
|
|
3256
3356
|
resizePreviewMode: d,
|
|
3257
3357
|
get resizeTargetMinimumSize() {
|
|
3258
|
-
return
|
|
3358
|
+
return E.resizeTargetMinimumSize;
|
|
3259
3359
|
},
|
|
3260
3360
|
separators: M.separators
|
|
3261
3361
|
};
|
|
3262
|
-
|
|
3263
|
-
const H =
|
|
3362
|
+
C.current = J;
|
|
3363
|
+
const H = Sn(J), {
|
|
3264
3364
|
defaultLayoutDeferred: Z,
|
|
3265
|
-
derivedItemConstraints:
|
|
3365
|
+
derivedItemConstraints: ve,
|
|
3266
3366
|
layout: ze,
|
|
3267
3367
|
requestedLayout: Ie
|
|
3268
3368
|
} = ae(J.id, true);
|
|
3269
|
-
!Z &&
|
|
3270
|
-
|
|
3369
|
+
if (!Z && ve.length > 0)
|
|
3370
|
+
try {
|
|
3371
|
+
try {
|
|
3372
|
+
y(ze);
|
|
3373
|
+
} finally {
|
|
3374
|
+
h(ze, false, Ie);
|
|
3375
|
+
}
|
|
3376
|
+
} catch (L) {
|
|
3377
|
+
throw C.current = null, H(), L;
|
|
3378
|
+
}
|
|
3379
|
+
const be = Be(S, (L) => {
|
|
3271
3380
|
const {
|
|
3272
|
-
defaultLayoutDeferred:
|
|
3273
|
-
derivedItemConstraints:
|
|
3381
|
+
defaultLayoutDeferred: P,
|
|
3382
|
+
derivedItemConstraints: F2,
|
|
3274
3383
|
layout: G,
|
|
3275
|
-
requestedLayout:
|
|
3384
|
+
requestedLayout: _
|
|
3276
3385
|
} = L.next;
|
|
3277
|
-
if (
|
|
3386
|
+
if (P || F2.length === 0)
|
|
3278
3387
|
return;
|
|
3279
|
-
|
|
3280
|
-
derivedItemConstraints:
|
|
3388
|
+
vn({
|
|
3389
|
+
derivedItemConstraints: F2,
|
|
3281
3390
|
axis: J,
|
|
3282
3391
|
layout: G,
|
|
3283
3392
|
prevLayout: L.prev?.layout,
|
|
3284
|
-
requestedLayout:
|
|
3393
|
+
requestedLayout: _
|
|
3285
3394
|
});
|
|
3286
|
-
const j =
|
|
3287
|
-
|
|
3395
|
+
const j = ie(), U2 = j.state !== "active" || !j.hitRegions.some((te) => te.axis === J);
|
|
3396
|
+
try {
|
|
3397
|
+
y(G);
|
|
3398
|
+
} finally {
|
|
3399
|
+
U2 && h(
|
|
3400
|
+
G,
|
|
3401
|
+
L.isUserInteraction,
|
|
3402
|
+
_
|
|
3403
|
+
);
|
|
3404
|
+
}
|
|
3288
3405
|
});
|
|
3289
3406
|
return () => {
|
|
3290
|
-
|
|
3407
|
+
C.current = null, H(), be();
|
|
3291
3408
|
};
|
|
3292
3409
|
}, [
|
|
3293
3410
|
r,
|
|
3294
|
-
g,
|
|
3295
|
-
h,
|
|
3296
3411
|
S,
|
|
3297
|
-
|
|
3298
|
-
|
|
3412
|
+
h,
|
|
3413
|
+
y,
|
|
3414
|
+
l,
|
|
3415
|
+
$,
|
|
3299
3416
|
d,
|
|
3300
|
-
|
|
3417
|
+
E
|
|
3301
3418
|
]), ne(() => {
|
|
3302
|
-
|
|
3419
|
+
vo(w.current) || b();
|
|
3303
3420
|
}), useEffect(() => {
|
|
3304
|
-
const
|
|
3305
|
-
|
|
3306
|
-
}), /* @__PURE__ */ jsx(
|
|
3421
|
+
const I = C.current;
|
|
3422
|
+
I && (I.mutableState.defaultLayout = n, I.mutableState.disableCursor = !!o);
|
|
3423
|
+
}), /* @__PURE__ */ jsx(wt$1.Provider, { value: D, children: /* @__PURE__ */ jsxs(
|
|
3307
3424
|
"div",
|
|
3308
3425
|
{
|
|
3309
3426
|
...m,
|
|
3310
3427
|
className: t,
|
|
3311
3428
|
"data-group": true,
|
|
3312
|
-
"data-testid":
|
|
3313
|
-
id:
|
|
3429
|
+
"data-testid": S,
|
|
3430
|
+
id: S,
|
|
3314
3431
|
ref: T,
|
|
3315
3432
|
style: {
|
|
3316
3433
|
height: "100%",
|
|
3317
3434
|
width: "100%",
|
|
3318
3435
|
overflow: "hidden",
|
|
3319
3436
|
position: d === "separator" ? "relative" : void 0,
|
|
3320
|
-
...
|
|
3437
|
+
...p,
|
|
3321
3438
|
display: "flex",
|
|
3322
|
-
flexDirection:
|
|
3439
|
+
flexDirection: l === "horizontal" ? "row" : "column",
|
|
3323
3440
|
flexWrap: "nowrap",
|
|
3324
3441
|
// Inform the browser that the library is handling touch events for this element
|
|
3325
3442
|
// but still allow users to scroll content within panels in the non-resizing direction
|
|
3326
3443
|
// NOTE This is not an inherited style
|
|
3327
3444
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
3328
|
-
touchAction:
|
|
3445
|
+
touchAction: l === "horizontal" ? "pan-y" : "pan-x"
|
|
3329
3446
|
},
|
|
3330
3447
|
children: [
|
|
3331
3448
|
e,
|
|
3332
|
-
|
|
3333
|
-
|
|
3449
|
+
R.map((I) => /* @__PURE__ */ jsx(
|
|
3450
|
+
wo,
|
|
3334
3451
|
{
|
|
3335
|
-
overlay:
|
|
3336
|
-
preview:
|
|
3452
|
+
overlay: z,
|
|
3453
|
+
preview: I
|
|
3337
3454
|
},
|
|
3338
|
-
|
|
3455
|
+
I.key
|
|
3339
3456
|
))
|
|
3340
3457
|
]
|
|
3341
3458
|
}
|
|
3342
3459
|
) });
|
|
3343
3460
|
}
|
|
3344
|
-
|
|
3345
|
-
function
|
|
3346
|
-
const { id: n } =
|
|
3347
|
-
collapse:
|
|
3348
|
-
expand:
|
|
3461
|
+
Co.displayName = "Group";
|
|
3462
|
+
function Mo(e, t) {
|
|
3463
|
+
const { id: n } = rt(), o = useRef({
|
|
3464
|
+
collapse: st,
|
|
3465
|
+
expand: st,
|
|
3349
3466
|
getSize: () => ({
|
|
3350
3467
|
asPercentage: 0,
|
|
3351
3468
|
inPixels: 0
|
|
3352
3469
|
}),
|
|
3353
3470
|
isCollapsed: () => false,
|
|
3354
|
-
resize:
|
|
3471
|
+
resize: st
|
|
3355
3472
|
});
|
|
3356
3473
|
useImperativeHandle(t, () => o.current, []), ne(() => {
|
|
3357
3474
|
Object.assign(
|
|
3358
3475
|
o.current,
|
|
3359
|
-
|
|
3476
|
+
xt$1({ axisId: n, itemId: e })
|
|
3360
3477
|
);
|
|
3361
3478
|
});
|
|
3362
3479
|
}
|
|
3363
|
-
function
|
|
3480
|
+
function Po({
|
|
3364
3481
|
children: e,
|
|
3365
3482
|
className: t,
|
|
3366
3483
|
collapsedSize: n = "0%",
|
|
@@ -3368,36 +3485,36 @@ function yo({
|
|
|
3368
3485
|
collapsible: r = false,
|
|
3369
3486
|
defaultSize: i,
|
|
3370
3487
|
disabled: s,
|
|
3371
|
-
elementRef:
|
|
3488
|
+
elementRef: c2,
|
|
3372
3489
|
groupResizeBehavior: a = "preserve-relative-size",
|
|
3373
|
-
id:
|
|
3374
|
-
maxSize:
|
|
3490
|
+
id: u,
|
|
3491
|
+
maxSize: l = "100%",
|
|
3375
3492
|
minSize: d = "0%",
|
|
3376
|
-
onResize:
|
|
3377
|
-
panelRef:
|
|
3493
|
+
onResize: g,
|
|
3494
|
+
panelRef: p,
|
|
3378
3495
|
style: m,
|
|
3379
3496
|
...f
|
|
3380
3497
|
}) {
|
|
3381
|
-
const
|
|
3498
|
+
const y = !!u, h = De(u), S = ot({
|
|
3382
3499
|
disabled: s
|
|
3383
|
-
}),
|
|
3384
|
-
getPanelStyles:
|
|
3385
|
-
id:
|
|
3386
|
-
orientation:
|
|
3500
|
+
}), z = useRef(null), x = Ve(z, c2), {
|
|
3501
|
+
getPanelStyles: R,
|
|
3502
|
+
id: N,
|
|
3503
|
+
orientation: $,
|
|
3387
3504
|
registerPanel: b,
|
|
3388
3505
|
updatePanelProps: w
|
|
3389
|
-
} =
|
|
3390
|
-
(
|
|
3391
|
-
|
|
3506
|
+
} = rt(), v = g !== null, T = ye(
|
|
3507
|
+
(C, I, M) => {
|
|
3508
|
+
g?.(C, u, M);
|
|
3392
3509
|
}
|
|
3393
3510
|
);
|
|
3394
3511
|
ne(() => {
|
|
3395
|
-
const
|
|
3396
|
-
if (
|
|
3397
|
-
const
|
|
3398
|
-
element:
|
|
3512
|
+
const C = z.current;
|
|
3513
|
+
if (C !== null) {
|
|
3514
|
+
const I = {
|
|
3515
|
+
element: C,
|
|
3399
3516
|
id: h,
|
|
3400
|
-
idIsStable:
|
|
3517
|
+
idIsStable: y,
|
|
3401
3518
|
mutableValues: {
|
|
3402
3519
|
expandToSize: void 0,
|
|
3403
3520
|
prevSize: void 0
|
|
@@ -3409,12 +3526,12 @@ function yo({
|
|
|
3409
3526
|
collapsedThreshold: o,
|
|
3410
3527
|
collapsible: r,
|
|
3411
3528
|
defaultSize: i,
|
|
3412
|
-
disabled:
|
|
3413
|
-
maxSize:
|
|
3529
|
+
disabled: S.disabled,
|
|
3530
|
+
maxSize: l,
|
|
3414
3531
|
minSize: d
|
|
3415
3532
|
}
|
|
3416
3533
|
};
|
|
3417
|
-
return b(
|
|
3534
|
+
return b(I);
|
|
3418
3535
|
}
|
|
3419
3536
|
}, [
|
|
3420
3537
|
a,
|
|
@@ -3424,30 +3541,30 @@ function yo({
|
|
|
3424
3541
|
i,
|
|
3425
3542
|
v,
|
|
3426
3543
|
h,
|
|
3427
|
-
|
|
3428
|
-
|
|
3544
|
+
y,
|
|
3545
|
+
l,
|
|
3429
3546
|
d,
|
|
3430
3547
|
T,
|
|
3431
3548
|
b,
|
|
3432
|
-
|
|
3549
|
+
S
|
|
3433
3550
|
]), useEffect(() => {
|
|
3434
3551
|
w(h, { disabled: s });
|
|
3435
|
-
}, [s, h, w]),
|
|
3436
|
-
const
|
|
3437
|
-
const
|
|
3438
|
-
if (
|
|
3439
|
-
return JSON.stringify(
|
|
3440
|
-
},
|
|
3441
|
-
(
|
|
3442
|
-
|
|
3443
|
-
|
|
3552
|
+
}, [s, h, w]), Mo(h, p);
|
|
3553
|
+
const A = () => {
|
|
3554
|
+
const C = R(N, h);
|
|
3555
|
+
if (C)
|
|
3556
|
+
return JSON.stringify(C);
|
|
3557
|
+
}, E = useSyncExternalStore(
|
|
3558
|
+
(C) => Be(N, C),
|
|
3559
|
+
A,
|
|
3560
|
+
A
|
|
3444
3561
|
);
|
|
3445
|
-
let
|
|
3446
|
-
return
|
|
3562
|
+
let D;
|
|
3563
|
+
return E ? D = JSON.parse(E) : i !== void 0 ? D = {
|
|
3447
3564
|
flexGrow: void 0,
|
|
3448
3565
|
flexShrink: void 0,
|
|
3449
3566
|
flexBasis: i
|
|
3450
|
-
} :
|
|
3567
|
+
} : D = { flexGrow: 1 }, /* @__PURE__ */ jsx(
|
|
3451
3568
|
"div",
|
|
3452
3569
|
{
|
|
3453
3570
|
...f,
|
|
@@ -3457,12 +3574,12 @@ function yo({
|
|
|
3457
3574
|
id: h,
|
|
3458
3575
|
ref: x,
|
|
3459
3576
|
style: {
|
|
3460
|
-
...
|
|
3577
|
+
...To,
|
|
3461
3578
|
display: "flex",
|
|
3462
3579
|
flexBasis: 0,
|
|
3463
3580
|
flexShrink: 1,
|
|
3464
3581
|
overflow: "visible",
|
|
3465
|
-
...
|
|
3582
|
+
...D
|
|
3466
3583
|
},
|
|
3467
3584
|
children: /* @__PURE__ */ jsx(
|
|
3468
3585
|
"div",
|
|
@@ -3478,7 +3595,7 @@ function yo({
|
|
|
3478
3595
|
// but still allow users to scroll content within panels in the non-resizing direction
|
|
3479
3596
|
// NOTE This is not an inherited style
|
|
3480
3597
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
3481
|
-
touchAction:
|
|
3598
|
+
touchAction: $ === "horizontal" ? "pan-y" : "pan-x"
|
|
3482
3599
|
},
|
|
3483
3600
|
children: e
|
|
3484
3601
|
}
|
|
@@ -3486,8 +3603,8 @@ function yo({
|
|
|
3486
3603
|
}
|
|
3487
3604
|
);
|
|
3488
3605
|
}
|
|
3489
|
-
|
|
3490
|
-
const
|
|
3606
|
+
Po.displayName = "Panel";
|
|
3607
|
+
const To = {
|
|
3491
3608
|
minHeight: 0,
|
|
3492
3609
|
maxHeight: "100%",
|
|
3493
3610
|
height: "auto",
|
|
@@ -3499,8 +3616,8 @@ const So = {
|
|
|
3499
3616
|
padding: 0,
|
|
3500
3617
|
margin: 0
|
|
3501
3618
|
};
|
|
3502
|
-
const
|
|
3503
|
-
function
|
|
3619
|
+
const Do = { flexBasis: "auto" }, ko = { flexGrow: 0, flexShrink: 0 };
|
|
3620
|
+
function Ao({
|
|
3504
3621
|
children: e,
|
|
3505
3622
|
className: t,
|
|
3506
3623
|
disabled: n,
|
|
@@ -3508,39 +3625,39 @@ function xo({
|
|
|
3508
3625
|
elementRef: r,
|
|
3509
3626
|
id: i,
|
|
3510
3627
|
preview: s,
|
|
3511
|
-
style:
|
|
3628
|
+
style: c2,
|
|
3512
3629
|
...a
|
|
3513
3630
|
}) {
|
|
3514
|
-
const
|
|
3515
|
-
disableCursor:
|
|
3631
|
+
const u = De(i), {
|
|
3632
|
+
disableCursor: l,
|
|
3516
3633
|
id: d,
|
|
3517
|
-
orientation:
|
|
3518
|
-
registerSeparator:
|
|
3634
|
+
orientation: g,
|
|
3635
|
+
registerSeparator: p,
|
|
3519
3636
|
updateSeparatorProps: m
|
|
3520
|
-
} =
|
|
3637
|
+
} = rt();
|
|
3521
3638
|
return /* @__PURE__ */ jsx(
|
|
3522
|
-
|
|
3639
|
+
xn,
|
|
3523
3640
|
{
|
|
3524
3641
|
attributes: a,
|
|
3525
3642
|
axisId: d,
|
|
3526
|
-
axisOrientation:
|
|
3643
|
+
axisOrientation: g,
|
|
3527
3644
|
className: t,
|
|
3528
|
-
disableCursor:
|
|
3645
|
+
disableCursor: l,
|
|
3529
3646
|
disabled: n,
|
|
3530
3647
|
disableDoubleClick: o,
|
|
3531
3648
|
elementRef: r,
|
|
3532
|
-
id:
|
|
3649
|
+
id: u,
|
|
3533
3650
|
preview: s,
|
|
3534
|
-
registerSeparator:
|
|
3535
|
-
requiredStyle:
|
|
3536
|
-
style:
|
|
3537
|
-
styleDefaults:
|
|
3651
|
+
registerSeparator: p,
|
|
3652
|
+
requiredStyle: ko,
|
|
3653
|
+
style: c2,
|
|
3654
|
+
styleDefaults: Do,
|
|
3538
3655
|
updateSeparatorProps: m,
|
|
3539
3656
|
children: e
|
|
3540
3657
|
}
|
|
3541
3658
|
);
|
|
3542
3659
|
}
|
|
3543
|
-
|
|
3660
|
+
Ao.displayName = "Separator";
|
|
3544
3661
|
var kt = Object.defineProperty, xt = Object.defineProperties;
|
|
3545
3662
|
var Gt = Object.getOwnPropertyDescriptors;
|
|
3546
3663
|
var U = Object.getOwnPropertySymbols;
|
|
@@ -3580,8 +3697,8 @@ function Mt({ containerRef: o, inputRef: r, pushPasswordManagerStrategy: t, isFo
|
|
|
3580
3697
|
let [w, T] = React.useState(false), [x, M] = React.useState(false), [V2, I] = React.useState(false), q = React.useMemo(() => t === "none" ? false : (t === "increase-width" || t === "experimental-no-flickering") && w && x, [w, x, t]), y = React.useCallback(() => {
|
|
3581
3698
|
let m = o.current, S = r.current;
|
|
3582
3699
|
if (!m || !S || V2 || t === "none") return;
|
|
3583
|
-
let R = m, i = R.getBoundingClientRect().left + R.offsetWidth, G = R.getBoundingClientRect().top + R.offsetHeight / 2, ot2 = i - Ot,
|
|
3584
|
-
document.querySelectorAll(jt).length === 0 && document.elementFromPoint(ot2,
|
|
3700
|
+
let R = m, i = R.getBoundingClientRect().left + R.offsetWidth, G = R.getBoundingClientRect().top + R.offsetHeight / 2, ot2 = i - Ot, X = G;
|
|
3701
|
+
document.querySelectorAll(jt).length === 0 && document.elementFromPoint(ot2, X) === m || (M(Ct(m) >= nt), T(true), I(true));
|
|
3585
3702
|
}, [o, r, V2, t]);
|
|
3586
3703
|
return React.useEffect(() => {
|
|
3587
3704
|
let m = o.current;
|
|
@@ -3606,13 +3723,13 @@ function Mt({ containerRef: o, inputRef: r, pushPasswordManagerStrategy: t, isFo
|
|
|
3606
3723
|
}, [r, u, t, y]), { hasPWMBadge: w, willPushPWMBadge: q, PWM_BADGE_SPACE_WIDTH: Lt };
|
|
3607
3724
|
}
|
|
3608
3725
|
var Nt = React.createContext({}), $t = React.forwardRef((ot2, G) => {
|
|
3609
|
-
var
|
|
3610
|
-
var z,
|
|
3611
|
-
let [rt2, at] = React.useState(typeof i.defaultValue == "string" ? i.defaultValue : ""), l = o != null ? o : rt2,
|
|
3726
|
+
var X = ot2, { value: o, onChange: r, maxLength: t, textAlign: u = "left", pattern: w, placeholder: T, inputMode: x = "numeric", onComplete: M, pushPasswordManagerStrategy: V2 = "increase-width", pasteTransformer: I, containerClassName: q, noScriptCSSFallback: y = Ft, nonce: m, render: S, children: R } = X, i = wt(X, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "nonce", "render", "children"]);
|
|
3727
|
+
var z, ft, mt2, pt2, Rt2;
|
|
3728
|
+
let [rt2, at] = React.useState(typeof i.defaultValue == "string" ? i.defaultValue : ""), l = o != null ? o : rt2, D = Tt(l), O2 = React.useCallback((a) => {
|
|
3612
3729
|
r == null || r(a), at(a);
|
|
3613
|
-
}, [r]), p = React.useMemo(() => w ? typeof w == "string" ? new RegExp(w) : w : null, [w]), d = React.useRef(null),
|
|
3730
|
+
}, [r]), p = React.useMemo(() => w ? typeof w == "string" ? new RegExp(w) : w : null, [w]), d = React.useRef(null), K2 = React.useRef(null), J = React.useRef({ value: l, onChange: O2, isIOS: typeof window != "undefined" && ((ft = (z = window == null ? void 0 : window.CSS) == null ? void 0 : z.supports) == null ? void 0 : ft.call(z, "-webkit-touch-callout", "none")) }), Y2 = React.useRef({ prev: [(mt2 = d.current) == null ? void 0 : mt2.selectionStart, (pt2 = d.current) == null ? void 0 : pt2.selectionEnd, (Rt2 = d.current) == null ? void 0 : Rt2.selectionDirection] });
|
|
3614
3731
|
React.useImperativeHandle(G, () => d.current, []), React.useEffect(() => {
|
|
3615
|
-
let a = d.current, n =
|
|
3732
|
+
let a = d.current, n = K2.current;
|
|
3616
3733
|
if (!a || !n) return;
|
|
3617
3734
|
J.current.value !== a.value && J.current.onChange(a.value), Y2.current.prev = [a.selectionStart, a.selectionEnd, a.selectionDirection];
|
|
3618
3735
|
function c2() {
|
|
@@ -3622,25 +3739,25 @@ var Nt = React.createContext({}), $t = React.forwardRef((ot2, G) => {
|
|
|
3622
3739
|
}
|
|
3623
3740
|
let s = a.selectionStart, P = a.selectionEnd, $ = a.selectionDirection, v = a.maxLength, B = a.value, _ = Y2.current.prev, g = -1, E = -1, C;
|
|
3624
3741
|
if (B.length !== 0 && s !== null && P !== null) {
|
|
3625
|
-
let
|
|
3626
|
-
if (
|
|
3742
|
+
let Bt2 = s === P, Wt2 = s === B.length && B.length < v;
|
|
3743
|
+
if (Bt2 && !Wt2) {
|
|
3627
3744
|
let W = s;
|
|
3628
3745
|
if (W === 0) g = 0, E = 1, C = "forward";
|
|
3629
3746
|
else if (W === v) g = W - 1, E = W, C = "backward";
|
|
3630
3747
|
else if (v > 1 && B.length > 1) {
|
|
3631
|
-
let
|
|
3748
|
+
let et2 = 0;
|
|
3632
3749
|
if (_[0] !== null && _[1] !== null) {
|
|
3633
3750
|
C = W < _[1] ? "backward" : "forward";
|
|
3634
3751
|
let At2 = _[0] === _[1] && _[0] < v;
|
|
3635
|
-
C === "backward" && !At2 && (
|
|
3752
|
+
C === "backward" && !At2 && (et2 = -1);
|
|
3636
3753
|
}
|
|
3637
|
-
g =
|
|
3754
|
+
g = et2 + W, E = et2 + W + 1;
|
|
3638
3755
|
}
|
|
3639
3756
|
}
|
|
3640
3757
|
g !== -1 && E !== -1 && g !== E && a.setSelectionRange(g, E, C);
|
|
3641
3758
|
}
|
|
3642
|
-
let vt2 = g !== -1 ? g : s,
|
|
3643
|
-
j(vt2), N(
|
|
3759
|
+
let vt2 = g !== -1 ? g : s, gt2 = E !== -1 ? E : P, Ht2 = C != null ? C : $;
|
|
3760
|
+
j(vt2), N(gt2), Y2.current.prev = [vt2, gt2, Ht2];
|
|
3644
3761
|
}
|
|
3645
3762
|
if (document.addEventListener("selectionchange", c2, { capture: true }), c2(), document.activeElement === a && Q(true), !document.getElementById("input-otp-style")) {
|
|
3646
3763
|
let s = document.createElement("style");
|
|
@@ -3658,7 +3775,7 @@ var Nt = React.createContext({}), $t = React.forwardRef((ot2, G) => {
|
|
|
3658
3775
|
document.removeEventListener("selectionchange", c2, { capture: true }), f == null || f.disconnect();
|
|
3659
3776
|
};
|
|
3660
3777
|
}, []);
|
|
3661
|
-
let [ct2,
|
|
3778
|
+
let [ct2, it] = React.useState(false), [L, Q] = React.useState(false), [H, j] = React.useState(null), [A, N] = React.useState(null);
|
|
3662
3779
|
React.useEffect(() => {
|
|
3663
3780
|
let a = _t(() => {
|
|
3664
3781
|
var f, s, P, $;
|
|
@@ -3670,16 +3787,16 @@ var Nt = React.createContext({}), $t = React.forwardRef((ot2, G) => {
|
|
|
3670
3787
|
a.forEach((n) => clearTimeout(n));
|
|
3671
3788
|
};
|
|
3672
3789
|
}, [l, L]), React.useEffect(() => {
|
|
3673
|
-
|
|
3674
|
-
}, [t, M,
|
|
3675
|
-
let k = Mt({ containerRef:
|
|
3790
|
+
D !== void 0 && l !== D && D.length < t && l.length === t && (M == null || M(l));
|
|
3791
|
+
}, [t, M, D, l]);
|
|
3792
|
+
let k = Mt({ containerRef: K2, inputRef: d, pushPasswordManagerStrategy: V2, isFocused: L }), st2 = React.useCallback((a) => {
|
|
3676
3793
|
let n = a.currentTarget.value.slice(0, t);
|
|
3677
3794
|
if (n.length > 0 && p && !p.test(n)) {
|
|
3678
3795
|
a.preventDefault();
|
|
3679
3796
|
return;
|
|
3680
3797
|
}
|
|
3681
|
-
typeof
|
|
3682
|
-
}, [t,
|
|
3798
|
+
typeof D == "string" && n.length < D.length && document.dispatchEvent(new Event("selectionchange")), O2(n);
|
|
3799
|
+
}, [t, O2, D, p]), lt2 = React.useCallback(() => {
|
|
3683
3800
|
var a;
|
|
3684
3801
|
if (d.current) {
|
|
3685
3802
|
let n = Math.min(d.current.value.length, t - 1), c2 = d.current.value.length;
|
|
@@ -3694,20 +3811,20 @@ var Nt = React.createContext({}), $t = React.forwardRef((ot2, G) => {
|
|
|
3694
3811
|
a.preventDefault();
|
|
3695
3812
|
let f = (g = d.current) == null ? void 0 : g.selectionStart, s = (E = d.current) == null ? void 0 : E.selectionEnd, v = (f !== s ? l.slice(0, f) + b + l.slice(s) : l.slice(0, f) + b + l.slice(f)).slice(0, t);
|
|
3696
3813
|
if (v.length > 0 && p && !p.test(v)) return;
|
|
3697
|
-
n.value = v,
|
|
3814
|
+
n.value = v, O2(v);
|
|
3698
3815
|
let B = Math.min(v.length, t - 1), _ = v.length;
|
|
3699
3816
|
n.setSelectionRange(B, _), j(B), N(_);
|
|
3700
|
-
}, [t,
|
|
3817
|
+
}, [t, O2, I, p, l]), It = React.useMemo(() => ({ position: "relative", cursor: i.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [i.disabled]), dt = React.useMemo(() => ({ position: "absolute", inset: 0, width: k.willPushPWMBadge ? `calc(100% + ${k.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: k.willPushPWMBadge ? `inset(0 ${k.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: u, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height, 16px)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [k.PWM_BADGE_SPACE_WIDTH, k.willPushPWMBadge, u]), yt2 = React.useMemo(() => {
|
|
3701
3818
|
var a;
|
|
3702
|
-
return React.createElement("input", Pt(bt({ autoComplete: i.autoComplete || "one-time-code" }, i), { "data-input-otp": true, "data-input-otp-placeholder-shown": l.length === 0 || void 0, "data-input-otp-mss": H, "data-input-otp-mse": A, inputMode: x, pattern: p == null ? void 0 : p.source, "aria-placeholder": T, style:
|
|
3819
|
+
return React.createElement("input", Pt(bt({ autoComplete: i.autoComplete || "one-time-code" }, i), { "data-input-otp": true, "data-input-otp-placeholder-shown": l.length === 0 || void 0, "data-input-otp-mss": H, "data-input-otp-mse": A, inputMode: x, pattern: p == null ? void 0 : p.source, "aria-placeholder": T, style: dt, maxLength: t, value: l, ref: d, spellCheck: (a = i.spellCheck) != null ? a : false, onPaste: (n) => {
|
|
3703
3820
|
var c2;
|
|
3704
3821
|
ut2(n), (c2 = i.onPaste) == null || c2.call(i, n);
|
|
3705
|
-
}, onChange:
|
|
3822
|
+
}, onChange: st2, onMouseOver: (n) => {
|
|
3706
3823
|
var c2;
|
|
3707
|
-
|
|
3824
|
+
it(true), (c2 = i.onMouseOver) == null || c2.call(i, n);
|
|
3708
3825
|
}, onMouseLeave: (n) => {
|
|
3709
3826
|
var c2;
|
|
3710
|
-
|
|
3827
|
+
it(false), (c2 = i.onMouseLeave) == null || c2.call(i, n);
|
|
3711
3828
|
}, onFocus: (n) => {
|
|
3712
3829
|
var c2;
|
|
3713
3830
|
lt2(), (c2 = i.onFocus) == null || c2.call(i, n);
|
|
@@ -3715,12 +3832,12 @@ var Nt = React.createContext({}), $t = React.forwardRef((ot2, G) => {
|
|
|
3715
3832
|
var c2;
|
|
3716
3833
|
Q(false), (c2 = i.onBlur) == null || c2.call(i, n);
|
|
3717
3834
|
} }));
|
|
3718
|
-
}, [
|
|
3835
|
+
}, [st2, lt2, ut2, x, dt, t, A, H, T, i, p == null ? void 0 : p.source, l]), tt2 = React.useMemo(() => ({ slots: Array.from({ length: t }).map((a, n) => {
|
|
3719
3836
|
var s;
|
|
3720
3837
|
let c2 = L && H !== null && A !== null && (H === A && n === H || n >= H && n < A), b = l[n] !== void 0 ? l[n] : null, f = l[0] !== void 0 ? null : (s = T == null ? void 0 : T[n]) != null ? s : null;
|
|
3721
3838
|
return { char: b, placeholderChar: f, isActive: c2, hasFakeCaret: c2 && b === null };
|
|
3722
3839
|
}), isFocused: L, isHovering: !i.disabled && ct2 }), [L, ct2, t, A, H, T, i.disabled, l]), Dt2 = React.useMemo(() => S ? S(tt2) : React.createElement(Nt.Provider, { value: tt2 }, R), [R, tt2, S]);
|
|
3723
|
-
return React.createElement(React.Fragment, null, y !== null && React.createElement("noscript", null, React.createElement("style", null, y)), React.createElement("div", { ref:
|
|
3840
|
+
return React.createElement(React.Fragment, null, y !== null && React.createElement("noscript", null, React.createElement("style", null, y)), React.createElement("div", { ref: K2, "data-input-otp-container": true, translate: "no", style: It, className: q }, Dt2, React.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, yt2)));
|
|
3724
3841
|
});
|
|
3725
3842
|
$t.displayName = "Input";
|
|
3726
3843
|
function F(o, r) {
|
|
@@ -4005,12 +4122,12 @@ const Textarea = React.forwardRef((t0, ref) => {
|
|
|
4005
4122
|
Textarea.displayName = "Textarea";
|
|
4006
4123
|
export {
|
|
4007
4124
|
$t as $,
|
|
4125
|
+
Ao as A,
|
|
4008
4126
|
Badge as B,
|
|
4127
|
+
Co as C,
|
|
4009
4128
|
Nt as N,
|
|
4129
|
+
Po as P,
|
|
4010
4130
|
Switch as S,
|
|
4011
|
-
Textarea as T
|
|
4012
|
-
mo as m,
|
|
4013
|
-
xo as x,
|
|
4014
|
-
yo as y
|
|
4131
|
+
Textarea as T
|
|
4015
4132
|
};
|
|
4016
|
-
//# sourceMappingURL=textarea-
|
|
4133
|
+
//# sourceMappingURL=textarea-DUJqX13u.js.map
|