react-resizable-panels 4.14.0 → 4.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,81 +1,81 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useId as
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
return `${e ??
|
|
7
|
-
}
|
|
8
|
-
const ne = typeof window < "u" ?
|
|
9
|
-
function
|
|
10
|
-
const
|
|
2
|
+
import { jsx as K, jsxs as dn } from "react/jsx-runtime";
|
|
3
|
+
import { useId as fn, useLayoutEffect as Nt, useEffect as Be, useRef as q, useCallback as re, createContext as Gt, useContext as _t, useState as pe, useMemo as Pe, useImperativeHandle as it, useSyncExternalStore as Xe, Children as mn, isValidElement as Ft } from "react";
|
|
4
|
+
function $e(e) {
|
|
5
|
+
const t = fn();
|
|
6
|
+
return `${e ?? t}`;
|
|
7
|
+
}
|
|
8
|
+
const ne = typeof window < "u" ? Nt : Be;
|
|
9
|
+
function he(e) {
|
|
10
|
+
const t = q(e);
|
|
11
11
|
return ne(() => {
|
|
12
|
-
|
|
13
|
-
}, [e]),
|
|
14
|
-
(...
|
|
15
|
-
[
|
|
12
|
+
t.current = e;
|
|
13
|
+
}, [e]), re(
|
|
14
|
+
(...n) => t.current?.(...n),
|
|
15
|
+
[t]
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
function Ve(...e) {
|
|
19
|
-
return
|
|
20
|
-
e.forEach((
|
|
21
|
-
if (
|
|
22
|
-
switch (typeof
|
|
19
|
+
return he((t) => {
|
|
20
|
+
e.forEach((n) => {
|
|
21
|
+
if (n)
|
|
22
|
+
switch (typeof n) {
|
|
23
23
|
case "function": {
|
|
24
|
-
t
|
|
24
|
+
n(t);
|
|
25
25
|
break;
|
|
26
26
|
}
|
|
27
27
|
case "object": {
|
|
28
|
-
|
|
28
|
+
n.current = t;
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function tt(e, t) {
|
|
36
|
+
return t ? e * 2 + 1 : e + 1;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
38
|
+
function pn(e, t) {
|
|
39
|
+
return t ? e * 2 - 1 : e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const o =
|
|
43
|
-
return
|
|
41
|
+
function pt(e, t, n) {
|
|
42
|
+
const o = tt(e, n);
|
|
43
|
+
return t === void 0 ? `${o} / -1` : `${o} / span ${pn(t, n)}`;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function hn(e) {
|
|
46
46
|
return `${e * 2} / span 1`;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function gn({
|
|
49
49
|
crossCount: e,
|
|
50
|
-
crossSpan:
|
|
51
|
-
crossStart:
|
|
50
|
+
crossSpan: t,
|
|
51
|
+
crossStart: n,
|
|
52
52
|
hasGutters: o
|
|
53
53
|
}) {
|
|
54
|
-
const r =
|
|
55
|
-
if (
|
|
54
|
+
const r = t === void 0 ? e : n + t;
|
|
55
|
+
if (n === 0 && r === e)
|
|
56
56
|
return "1 / -1";
|
|
57
|
-
let i =
|
|
58
|
-
return o && (
|
|
57
|
+
let i = tt(n, o), s = tt(r - 1, o) + 1;
|
|
58
|
+
return o && (n > 0 && i--, r < e && s++), `${i} / ${s}`;
|
|
59
59
|
}
|
|
60
|
-
function st(e,
|
|
61
|
-
return Number.isInteger(e) && e >= 1 && e <
|
|
60
|
+
function st(e, t) {
|
|
61
|
+
return Number.isInteger(e) && e >= 1 && e < t;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function T(e, t = "Assertion error") {
|
|
64
64
|
if (!e)
|
|
65
|
-
throw Error(
|
|
65
|
+
throw Error(t);
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
function
|
|
69
|
-
const e =
|
|
70
|
-
return
|
|
67
|
+
const qt = Gt(null);
|
|
68
|
+
function Bt() {
|
|
69
|
+
const e = _t(qt);
|
|
70
|
+
return T(
|
|
71
71
|
e,
|
|
72
72
|
"Grid Context not found; did you render a Cell or Gridline outside of a Grid?"
|
|
73
73
|
), e;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function yn({
|
|
76
76
|
children: e,
|
|
77
|
-
className:
|
|
78
|
-
column:
|
|
77
|
+
className: t,
|
|
78
|
+
column: n,
|
|
79
79
|
columnSpan: o = 1,
|
|
80
80
|
elementRef: r,
|
|
81
81
|
id: i,
|
|
@@ -84,23 +84,23 @@ function hn({
|
|
|
84
84
|
style: a,
|
|
85
85
|
...c
|
|
86
86
|
}) {
|
|
87
|
-
const u =
|
|
87
|
+
const u = $e(i), { gutters: d, registerCell: g } = Bt(), m = q(null), y = Ve(m, r);
|
|
88
88
|
return ne(() => {
|
|
89
89
|
const f = m.current;
|
|
90
90
|
if (f !== null)
|
|
91
91
|
return g({
|
|
92
|
-
column:
|
|
92
|
+
column: n,
|
|
93
93
|
columnSpan: o,
|
|
94
94
|
element: f,
|
|
95
95
|
id: u,
|
|
96
96
|
row: s,
|
|
97
97
|
rowSpan: l
|
|
98
98
|
});
|
|
99
|
-
}, [
|
|
99
|
+
}, [n, o, u, g, s, l]), /* @__PURE__ */ K(
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
102
102
|
...c,
|
|
103
|
-
className:
|
|
103
|
+
className: t,
|
|
104
104
|
"data-cell": !0,
|
|
105
105
|
"data-testid": u,
|
|
106
106
|
id: u,
|
|
@@ -111,63 +111,63 @@ function hn({
|
|
|
111
111
|
// Allow cells to shrink smaller than their content
|
|
112
112
|
minHeight: 0,
|
|
113
113
|
minWidth: 0,
|
|
114
|
-
gridColumn:
|
|
115
|
-
gridRow:
|
|
114
|
+
gridColumn: pt(n, o, d.column),
|
|
115
|
+
gridRow: pt(s, l, d.row)
|
|
116
116
|
},
|
|
117
117
|
children: e
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
|
-
|
|
122
|
-
let
|
|
123
|
-
function
|
|
124
|
-
return
|
|
121
|
+
yn.displayName = "Cell";
|
|
122
|
+
let We;
|
|
123
|
+
function Sn() {
|
|
124
|
+
return We === void 0 && (typeof matchMedia == "function" ? We = !!matchMedia("(pointer:coarse)").matches : We = !1), We;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function nt({
|
|
127
127
|
expandHitTargets: e,
|
|
128
|
-
axis:
|
|
129
|
-
rect:
|
|
128
|
+
axis: t,
|
|
129
|
+
rect: n
|
|
130
130
|
}) {
|
|
131
|
-
const o = e ?
|
|
132
|
-
if (
|
|
133
|
-
const r = o -
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
const o = e ? Sn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
|
|
132
|
+
if (n.width < o) {
|
|
133
|
+
const r = o - n.width;
|
|
134
|
+
n = new DOMRect(
|
|
135
|
+
n.x - r / 2,
|
|
136
|
+
n.y,
|
|
137
|
+
n.width + r,
|
|
138
|
+
n.height
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
|
-
if (
|
|
142
|
-
const r = o -
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
if (n.height < o) {
|
|
142
|
+
const r = o - n.height;
|
|
143
|
+
n = new DOMRect(
|
|
144
|
+
n.x,
|
|
145
|
+
n.y - r / 2,
|
|
146
|
+
n.width,
|
|
147
|
+
n.height + r
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
|
-
return
|
|
150
|
+
return n;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function ht({
|
|
153
153
|
axis: e,
|
|
154
|
-
cells:
|
|
155
|
-
index:
|
|
154
|
+
cells: t,
|
|
155
|
+
index: n,
|
|
156
156
|
rect: o
|
|
157
157
|
}) {
|
|
158
158
|
let r = [o];
|
|
159
|
-
for (const i of
|
|
159
|
+
for (const i of t) {
|
|
160
160
|
const s = e === "column" ? i.column : i.row, l = e === "column" ? i.columnSpan : i.rowSpan;
|
|
161
|
-
if (s >=
|
|
161
|
+
if (s >= n || s + l <= n)
|
|
162
162
|
continue;
|
|
163
163
|
const a = i.element.getBoundingClientRect(), c = e === "column" ? a.top : a.left, u = e === "column" ? a.bottom : a.right;
|
|
164
164
|
u <= c || (r = r.flatMap((d) => {
|
|
165
165
|
const g = e === "column" ? d.top : d.left, m = e === "column" ? d.bottom : d.right;
|
|
166
166
|
if (c >= m || u <= g)
|
|
167
167
|
return [d];
|
|
168
|
-
const y = [], f = (S,
|
|
168
|
+
const y = [], f = (S, p) => {
|
|
169
169
|
y.push(
|
|
170
|
-
e === "column" ? new DOMRect(d.x, S, d.width,
|
|
170
|
+
e === "column" ? new DOMRect(d.x, S, d.width, p - S) : new DOMRect(S, d.y, p - S, d.height)
|
|
171
171
|
);
|
|
172
172
|
};
|
|
173
173
|
return g < c && f(g, c), m > u && f(u, m), y;
|
|
@@ -175,10 +175,10 @@ function pt({
|
|
|
175
175
|
}
|
|
176
176
|
return r;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function vn({
|
|
179
179
|
axis: e,
|
|
180
|
-
cells:
|
|
181
|
-
crossTrackCount:
|
|
180
|
+
cells: t,
|
|
181
|
+
crossTrackCount: n,
|
|
182
182
|
expandHitTargets: o,
|
|
183
183
|
resizeAxis: r,
|
|
184
184
|
axisSize: i,
|
|
@@ -187,81 +187,81 @@ function yn({
|
|
|
187
187
|
}) {
|
|
188
188
|
const { items: a, separators: c } = r, u = a.length;
|
|
189
189
|
let d = -1, g = -1, m = 0;
|
|
190
|
-
if (a.forEach((b,
|
|
191
|
-
b.constraintProps.disabled || (m++, d === -1 && (d =
|
|
190
|
+
if (a.forEach((b, w) => {
|
|
191
|
+
b.constraintProps.disabled || (m++, d === -1 && (d = w), g = w);
|
|
192
192
|
}), !s && m < 2)
|
|
193
193
|
return [];
|
|
194
|
-
const y = (b) => s || b > d && b <= g, f = [], S = (b,
|
|
194
|
+
const y = (b) => s || b > d && b <= g, f = [], S = (b, w, v) => ({
|
|
195
195
|
axis: r,
|
|
196
196
|
axisSize: i,
|
|
197
197
|
items: [a[b - 1], a[b]],
|
|
198
|
-
rect:
|
|
198
|
+
rect: w,
|
|
199
199
|
separator: v
|
|
200
|
-
}),
|
|
200
|
+
}), p = (b, w) => {
|
|
201
201
|
let v;
|
|
202
|
-
for (const
|
|
203
|
-
const
|
|
204
|
-
if (
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
const
|
|
208
|
-
v = v === void 0 ?
|
|
202
|
+
for (const $ of t) {
|
|
203
|
+
const O = e === "column" ? $.row : $.column, R = e === "column" ? $.rowSpan : $.columnSpan;
|
|
204
|
+
if (w === "start" ? O === b : O + R - 1 === b) {
|
|
205
|
+
const E = $.element.getBoundingClientRect();
|
|
206
|
+
if (w === "start") {
|
|
207
|
+
const P = e === "column" ? E.top : E.left;
|
|
208
|
+
v = v === void 0 ? P : Math.min(v, P);
|
|
209
209
|
} else {
|
|
210
|
-
const
|
|
211
|
-
v = v === void 0 ?
|
|
210
|
+
const P = e === "column" ? E.bottom : E.right;
|
|
211
|
+
v = v === void 0 ? P : Math.max(v, P);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
return v;
|
|
216
|
-
},
|
|
216
|
+
}, h = /* @__PURE__ */ new Set();
|
|
217
217
|
for (const b of c) {
|
|
218
|
-
const
|
|
219
|
-
if (!
|
|
218
|
+
const w = l.get(b);
|
|
219
|
+
if (!w || w.index < 1 || w.index >= u || (h.add(w.index), !s && (b.disabled || b.element.hasAttribute("aria-disabled"))) || !y(w.index))
|
|
220
220
|
continue;
|
|
221
221
|
let v = b.element.getBoundingClientRect();
|
|
222
|
-
const { crossSpan:
|
|
223
|
-
let
|
|
224
|
-
if (
|
|
225
|
-
const
|
|
226
|
-
|
|
222
|
+
const { crossSpan: $, crossStart: O } = w, R = $ === void 0 ? n : O + $;
|
|
223
|
+
let E = e === "column" ? v.top : v.left, P = e === "column" ? v.bottom : v.right;
|
|
224
|
+
if (O > 0) {
|
|
225
|
+
const z = p(O - 1, "end");
|
|
226
|
+
z !== void 0 && z < E && (E = z);
|
|
227
227
|
}
|
|
228
|
-
if (
|
|
229
|
-
const
|
|
230
|
-
|
|
228
|
+
if (R < n) {
|
|
229
|
+
const z = p(R, "start");
|
|
230
|
+
z !== void 0 && z > P && (P = z);
|
|
231
231
|
}
|
|
232
|
-
v = e === "column" ? new DOMRect(v.x,
|
|
232
|
+
v = e === "column" ? new DOMRect(v.x, E, v.width, P - E) : new DOMRect(E, v.y, P - E, v.height), v = nt({ expandHitTargets: o, axis: r, rect: v }), s ? f.push(S(w.index, v, b)) : ht({
|
|
233
233
|
axis: e,
|
|
234
|
-
cells:
|
|
235
|
-
index:
|
|
234
|
+
cells: t,
|
|
235
|
+
index: w.index,
|
|
236
236
|
rect: v
|
|
237
|
-
}).forEach((
|
|
238
|
-
f.push(S(
|
|
237
|
+
}).forEach((z) => {
|
|
238
|
+
f.push(S(w.index, z, b));
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
const
|
|
242
|
-
|
|
241
|
+
const I = (b, w) => {
|
|
242
|
+
ht({
|
|
243
243
|
axis: e,
|
|
244
|
-
cells:
|
|
244
|
+
cells: t,
|
|
245
245
|
index: b,
|
|
246
|
-
rect:
|
|
246
|
+
rect: nt({ expandHitTargets: o, axis: r, rect: w })
|
|
247
247
|
}).forEach((v) => {
|
|
248
248
|
f.push(S(b, v));
|
|
249
249
|
});
|
|
250
|
-
},
|
|
251
|
-
{ length:
|
|
250
|
+
}, x = Array.from(
|
|
251
|
+
{ length: n },
|
|
252
252
|
() => new Array(u)
|
|
253
253
|
);
|
|
254
|
-
for (const b of
|
|
255
|
-
const [
|
|
256
|
-
for (let
|
|
257
|
-
for (let
|
|
258
|
-
|
|
254
|
+
for (const b of t) {
|
|
255
|
+
const [w, v, $, O] = e === "column" ? [b.column, b.columnSpan, b.row, b.rowSpan] : [b.row, b.rowSpan, b.column, b.columnSpan];
|
|
256
|
+
for (let R = Math.max(0, $); R < Math.min(n, $ + O); R++)
|
|
257
|
+
for (let E = Math.max(0, w); E < Math.min(u, w + v); E++)
|
|
258
|
+
x[R][E] ??= b;
|
|
259
259
|
}
|
|
260
|
-
const
|
|
261
|
-
let
|
|
262
|
-
if (!
|
|
260
|
+
const C = /* @__PURE__ */ new Map(), N = (b) => {
|
|
261
|
+
let w = C.get(b);
|
|
262
|
+
if (!w) {
|
|
263
263
|
const v = b.element.getBoundingClientRect();
|
|
264
|
-
|
|
264
|
+
w = e === "column" ? {
|
|
265
265
|
crossEnd: v.bottom,
|
|
266
266
|
crossStart: v.top,
|
|
267
267
|
end: v.right,
|
|
@@ -271,69 +271,69 @@ function yn({
|
|
|
271
271
|
crossStart: v.left,
|
|
272
272
|
end: v.bottom,
|
|
273
273
|
start: v.top
|
|
274
|
-
},
|
|
274
|
+
}, C.set(b, w);
|
|
275
275
|
}
|
|
276
|
-
return
|
|
277
|
-
},
|
|
276
|
+
return w;
|
|
277
|
+
}, D = ({ crossEnd: b, crossStart: w, end: v, start: $ }) => e === "column" ? new DOMRect($, w, v - $, b - w) : new DOMRect(w, $, b - w, v - $);
|
|
278
278
|
for (let b = 1; b < u; b++) {
|
|
279
|
-
if (
|
|
279
|
+
if (h.has(b) || !y(b))
|
|
280
280
|
continue;
|
|
281
|
-
let
|
|
282
|
-
for (let v = 0; v <
|
|
283
|
-
const
|
|
284
|
-
let
|
|
285
|
-
if ((
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
281
|
+
let w;
|
|
282
|
+
for (let v = 0; v < n; v++) {
|
|
283
|
+
const $ = x[v][b - 1], O = x[v][b];
|
|
284
|
+
let R;
|
|
285
|
+
if (($ || O) && $ !== O) {
|
|
286
|
+
const E = $ ? N($) : void 0, P = O ? N(O) : void 0, z = E?.end ?? P.start, M = P?.start ?? E.end, B = Math.max(
|
|
287
|
+
E?.crossStart ?? -1 / 0,
|
|
288
|
+
P?.crossStart ?? -1 / 0
|
|
289
289
|
), J = Math.min(
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
E?.crossEnd ?? 1 / 0,
|
|
291
|
+
P?.crossEnd ?? 1 / 0
|
|
292
292
|
);
|
|
293
|
-
|
|
294
|
-
crossEnd: Math.max(
|
|
295
|
-
crossStart:
|
|
296
|
-
end: Math.max(
|
|
297
|
-
start: Math.min(
|
|
293
|
+
R = {
|
|
294
|
+
crossEnd: Math.max(B, J),
|
|
295
|
+
crossStart: B,
|
|
296
|
+
end: Math.max(z, M),
|
|
297
|
+
start: Math.min(z, M)
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
|
-
|
|
301
|
-
crossEnd: Math.max(
|
|
302
|
-
crossStart: Math.min(
|
|
303
|
-
end: Math.max(
|
|
304
|
-
start: Math.min(
|
|
305
|
-
} :
|
|
306
|
-
}
|
|
307
|
-
|
|
300
|
+
R ? w = w ? {
|
|
301
|
+
crossEnd: Math.max(w.crossEnd, R.crossEnd),
|
|
302
|
+
crossStart: Math.min(w.crossStart, R.crossStart),
|
|
303
|
+
end: Math.max(w.end, R.end),
|
|
304
|
+
start: Math.min(w.start, R.start)
|
|
305
|
+
} : R : w && (I(b, D(w)), w = void 0);
|
|
306
|
+
}
|
|
307
|
+
w && I(b, D(w));
|
|
308
308
|
}
|
|
309
309
|
return f;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
const
|
|
313
|
-
return Number.isFinite(
|
|
311
|
+
function ae(e) {
|
|
312
|
+
const t = parseFloat(e ?? "");
|
|
313
|
+
return Number.isFinite(t) ? t : 0;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function bn({
|
|
316
316
|
axis: e,
|
|
317
|
-
element:
|
|
318
|
-
gutterSizes:
|
|
317
|
+
element: t,
|
|
318
|
+
gutterSizes: n,
|
|
319
319
|
hasGutters: o,
|
|
320
320
|
layout: r,
|
|
321
321
|
trackIds: i
|
|
322
322
|
}) {
|
|
323
|
-
const s = i.length, l = o ? s * 2 - 1 : s, a =
|
|
323
|
+
const s = i.length, l = o ? s * 2 - 1 : s, a = t.ownerDocument.defaultView?.getComputedStyle(t), c = e === "column" ? a?.gridTemplateColumns : a?.gridTemplateRows;
|
|
324
324
|
if (c) {
|
|
325
325
|
const f = c.trim().split(/\s+/);
|
|
326
326
|
if (f.length === l && f.every((S) => /^-?[\d.]+px$/.test(S))) {
|
|
327
327
|
const S = i.map(
|
|
328
|
-
(
|
|
328
|
+
(p, h) => ae(f[o ? h * 2 : h])
|
|
329
329
|
);
|
|
330
330
|
return {
|
|
331
|
-
availableSize: S.reduce((
|
|
331
|
+
availableSize: S.reduce((p, h) => p + h, 0),
|
|
332
332
|
trackSizes: S
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
const u = e === "column" ?
|
|
336
|
+
const u = e === "column" ? t.offsetWidth : t.offsetHeight, d = e === "column" ? ae(a?.paddingLeft) + ae(a?.paddingRight) + ae(a?.borderLeftWidth) + ae(a?.borderRightWidth) : ae(a?.paddingTop) + ae(a?.paddingBottom) + ae(a?.borderTopWidth) + ae(a?.borderBottomWidth), g = ae(e === "column" ? a?.columnGap : a?.rowGap), m = n.reduce((f, S) => f + S, 0), y = Math.max(
|
|
337
337
|
0,
|
|
338
338
|
u - d - g * Math.max(0, l - 1) - m
|
|
339
339
|
);
|
|
@@ -344,36 +344,36 @@ function Sn({
|
|
|
344
344
|
)
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Vt(e) {
|
|
348
348
|
switch (typeof e) {
|
|
349
349
|
case "number":
|
|
350
350
|
return [e, "px"];
|
|
351
351
|
case "string": {
|
|
352
|
-
const
|
|
353
|
-
return e.endsWith("%") ? [
|
|
352
|
+
const t = parseFloat(e);
|
|
353
|
+
return e.endsWith("%") ? [t, "%"] : e.endsWith("px") ? [t, "px"] : e.endsWith("rem") ? [t, "rem"] : e.endsWith("em") ? [t, "em"] : e.endsWith("vh") ? [t, "vh"] : e.endsWith("vw") ? [t, "vw"] : [t, "%"];
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
class
|
|
357
|
+
class Ht {
|
|
358
358
|
#e = {};
|
|
359
|
-
addListener(
|
|
360
|
-
const o = this.#e[
|
|
361
|
-
return o === void 0 ? this.#e[
|
|
362
|
-
this.removeListener(
|
|
359
|
+
addListener(t, n) {
|
|
360
|
+
const o = this.#e[t];
|
|
361
|
+
return o === void 0 ? this.#e[t] = [n] : o.includes(n) || o.push(n), () => {
|
|
362
|
+
this.removeListener(t, n);
|
|
363
363
|
};
|
|
364
364
|
}
|
|
365
|
-
emit(
|
|
366
|
-
const o = this.#e[
|
|
365
|
+
emit(t, n) {
|
|
366
|
+
const o = this.#e[t];
|
|
367
367
|
if (o !== void 0)
|
|
368
368
|
if (o.length === 1)
|
|
369
|
-
o[0].call(null,
|
|
369
|
+
o[0].call(null, n);
|
|
370
370
|
else {
|
|
371
371
|
let r = !1, i = null;
|
|
372
372
|
const s = Array.from(o);
|
|
373
373
|
for (let l = 0; l < s.length; l++) {
|
|
374
374
|
const a = s[l];
|
|
375
375
|
try {
|
|
376
|
-
a.call(null,
|
|
376
|
+
a.call(null, n);
|
|
377
377
|
} catch (c) {
|
|
378
378
|
i === null && (r = !0, i = c);
|
|
379
379
|
}
|
|
@@ -385,10 +385,10 @@ class Vt {
|
|
|
385
385
|
removeAllListeners() {
|
|
386
386
|
this.#e = {};
|
|
387
387
|
}
|
|
388
|
-
removeListener(
|
|
389
|
-
const o = this.#e[
|
|
388
|
+
removeListener(t, n) {
|
|
389
|
+
const o = this.#e[t];
|
|
390
390
|
if (o !== void 0) {
|
|
391
|
-
const r = o.indexOf(
|
|
391
|
+
const r = o.indexOf(n);
|
|
392
392
|
r >= 0 && o.splice(r, 1);
|
|
393
393
|
}
|
|
394
394
|
}
|
|
@@ -397,75 +397,75 @@ let V = {
|
|
|
397
397
|
cursorFlags: 0,
|
|
398
398
|
state: "inactive"
|
|
399
399
|
};
|
|
400
|
-
const at = new
|
|
401
|
-
function
|
|
400
|
+
const at = new Ht();
|
|
401
|
+
function de() {
|
|
402
402
|
return V;
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function jt(e) {
|
|
405
405
|
return at.addListener("change", e);
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function xn(e, t = [], n, o = !1) {
|
|
408
408
|
const r = V, i = { ...V };
|
|
409
|
-
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews =
|
|
409
|
+
i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), V = i, at.emit("change", {
|
|
410
410
|
prev: r,
|
|
411
411
|
next: i
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
-
function
|
|
415
|
-
const
|
|
416
|
-
V = e,
|
|
417
|
-
|
|
414
|
+
function ue(e) {
|
|
415
|
+
const t = V;
|
|
416
|
+
V = e, t.state === "active" && e.state !== "active" && t.didPointerMove && t.hitRegions.forEach(({ separator: n }) => {
|
|
417
|
+
n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
|
|
418
418
|
}), at.emit("change", {
|
|
419
|
-
prev:
|
|
419
|
+
prev: t,
|
|
420
420
|
next: e
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
V.state !== "active" || !V.previews.some((
|
|
423
|
+
function wn(e) {
|
|
424
|
+
V.state !== "active" || !V.previews.some((t) => t.separator === e) || ue({
|
|
425
425
|
...V,
|
|
426
426
|
previews: V.previews.map(
|
|
427
|
-
(
|
|
427
|
+
(t) => t.separator === e ? { ...t } : t
|
|
428
428
|
)
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function zn(e) {
|
|
432
432
|
if (V.state === "inactive")
|
|
433
433
|
return !1;
|
|
434
|
-
const
|
|
435
|
-
if (
|
|
434
|
+
const t = V.hitRegions.filter((o) => o.axis !== e), n = V.state === "active" && V.previews.some((o) => o.axis === e);
|
|
435
|
+
if (t.length === V.hitRegions.length && !n)
|
|
436
436
|
return !1;
|
|
437
|
-
if (
|
|
438
|
-
|
|
437
|
+
if (t.length === 0)
|
|
438
|
+
ue({ cursorFlags: 0, state: "inactive" });
|
|
439
439
|
else if (V.state === "active") {
|
|
440
440
|
const o = new Map(V.initialLayoutMap), r = new Map(V.previewLayoutMap);
|
|
441
|
-
o.delete(e), r.delete(e),
|
|
441
|
+
o.delete(e), r.delete(e), ue({
|
|
442
442
|
...V,
|
|
443
443
|
cursorFlags: 0,
|
|
444
|
-
hitRegions:
|
|
444
|
+
hitRegions: t,
|
|
445
445
|
initialLayoutMap: o,
|
|
446
446
|
previewLayoutMap: r,
|
|
447
447
|
previews: V.previews.filter((i) => i.axis !== e)
|
|
448
448
|
});
|
|
449
449
|
} else
|
|
450
|
-
|
|
450
|
+
ue({ ...V, hitRegions: t });
|
|
451
451
|
return !0;
|
|
452
452
|
}
|
|
453
|
-
const
|
|
454
|
-
},
|
|
455
|
-
let
|
|
456
|
-
function
|
|
457
|
-
return
|
|
453
|
+
const In = (e) => e, et = () => {
|
|
454
|
+
}, Ut = 1, Wt = 2, Yt = 4, Kt = 8, gt = 3, yt = 12;
|
|
455
|
+
let Ye;
|
|
456
|
+
function St() {
|
|
457
|
+
return Ye === void 0 && (Ye = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (Ye = !0)), Ye;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Ln({
|
|
460
460
|
cursorFlags: e,
|
|
461
|
-
axes:
|
|
462
|
-
state:
|
|
461
|
+
axes: t,
|
|
462
|
+
state: n
|
|
463
463
|
}) {
|
|
464
464
|
let o = 0, r = 0;
|
|
465
|
-
switch (
|
|
465
|
+
switch (n) {
|
|
466
466
|
case "active":
|
|
467
467
|
case "hover":
|
|
468
|
-
|
|
468
|
+
t.forEach((i) => {
|
|
469
469
|
if (!i.mutableState.disableCursor)
|
|
470
470
|
switch (i.orientation) {
|
|
471
471
|
case "horizontal": {
|
|
@@ -480,10 +480,10 @@ function zn({
|
|
|
480
480
|
});
|
|
481
481
|
}
|
|
482
482
|
if (!(o === 0 && r === 0)) {
|
|
483
|
-
switch (
|
|
483
|
+
switch (n) {
|
|
484
484
|
case "active": {
|
|
485
|
-
if (e &&
|
|
486
|
-
const i = (e &
|
|
485
|
+
if (e && St()) {
|
|
486
|
+
const i = (e & Ut) !== 0, s = (e & Wt) !== 0, l = (e & Yt) !== 0, a = (e & Kt) !== 0;
|
|
487
487
|
if (i)
|
|
488
488
|
return l ? "se-resize" : a ? "ne-resize" : "e-resize";
|
|
489
489
|
if (s)
|
|
@@ -496,229 +496,230 @@ function zn({
|
|
|
496
496
|
break;
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
return
|
|
499
|
+
return St() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
502
|
+
const vt = /* @__PURE__ */ new WeakMap();
|
|
503
|
+
function _e(e) {
|
|
504
504
|
if (!e.defaultView || !e.adoptedStyleSheets)
|
|
505
505
|
return;
|
|
506
|
-
let { prevStyle:
|
|
507
|
-
|
|
506
|
+
let { prevStyle: t, styleSheet: n } = vt.get(e) ?? {};
|
|
507
|
+
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
|
|
508
508
|
...e.adoptedStyleSheets,
|
|
509
|
-
|
|
509
|
+
n
|
|
510
510
|
]));
|
|
511
|
-
const o =
|
|
511
|
+
const o = de();
|
|
512
512
|
switch (o.state) {
|
|
513
513
|
case "active":
|
|
514
514
|
case "hover": {
|
|
515
|
-
const r =
|
|
515
|
+
const r = Ln({
|
|
516
516
|
cursorFlags: o.cursorFlags,
|
|
517
517
|
axes: o.hitRegions.map((s) => s.axis),
|
|
518
518
|
state: o.state
|
|
519
519
|
}), i = `*, *:hover {cursor: ${r} !important; }`;
|
|
520
|
-
if (
|
|
520
|
+
if (t === i)
|
|
521
521
|
return;
|
|
522
|
-
|
|
522
|
+
t = i, r ? n.cssRules.length === 0 ? n.insertRule(i) : n.replaceSync(i) : n.cssRules.length === 1 && n.deleteRule(0);
|
|
523
523
|
break;
|
|
524
524
|
}
|
|
525
525
|
case "inactive": {
|
|
526
|
-
|
|
526
|
+
t = void 0, n.cssRules.length === 1 && n.deleteRule(0);
|
|
527
527
|
break;
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
|
|
531
|
-
prevStyle:
|
|
532
|
-
styleSheet:
|
|
530
|
+
vt.set(e, {
|
|
531
|
+
prevStyle: t,
|
|
532
|
+
styleSheet: n
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function ke({
|
|
536
536
|
axis: e
|
|
537
537
|
}) {
|
|
538
|
-
const { layoutStrategy:
|
|
539
|
-
return
|
|
540
|
-
}
|
|
541
|
-
function
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
538
|
+
const { layoutStrategy: t, orientation: n, items: o } = e;
|
|
539
|
+
return t ? t.calculateAvailableSize() : o.reduce((r, i) => (r += n === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r), 0);
|
|
540
|
+
}
|
|
541
|
+
function lt(e, t) {
|
|
542
|
+
const n = e.compareDocumentPosition(t);
|
|
543
|
+
return n & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
544
|
+
}
|
|
545
|
+
function Ne(e, t) {
|
|
546
|
+
return Array.from(t).sort((n, o) => {
|
|
547
|
+
const r = e === "horizontal" ? Cn(n, o) : Rn(n, o);
|
|
548
|
+
return r !== 0 ? r : lt(n.element, o.element);
|
|
548
549
|
});
|
|
549
550
|
}
|
|
550
|
-
function
|
|
551
|
-
const
|
|
552
|
-
return
|
|
551
|
+
function Cn(e, t) {
|
|
552
|
+
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
553
|
+
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
553
554
|
}
|
|
554
|
-
function
|
|
555
|
-
const
|
|
556
|
-
return
|
|
555
|
+
function Rn(e, t) {
|
|
556
|
+
const n = e.element.offsetTop - t.element.offsetTop;
|
|
557
|
+
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
557
558
|
}
|
|
558
559
|
function ot(e) {
|
|
559
560
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
560
561
|
}
|
|
561
|
-
function
|
|
562
|
+
function Xt(e, t) {
|
|
562
563
|
return {
|
|
563
|
-
x: e.x >=
|
|
564
|
-
Math.abs(e.x -
|
|
565
|
-
Math.abs(e.x -
|
|
564
|
+
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
|
|
565
|
+
Math.abs(e.x - t.left),
|
|
566
|
+
Math.abs(e.x - t.right)
|
|
566
567
|
),
|
|
567
|
-
y: e.y >=
|
|
568
|
-
Math.abs(e.y -
|
|
569
|
-
Math.abs(e.y -
|
|
568
|
+
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(
|
|
569
|
+
Math.abs(e.y - t.top),
|
|
570
|
+
Math.abs(e.y - t.bottom)
|
|
570
571
|
)
|
|
571
572
|
};
|
|
572
573
|
}
|
|
573
|
-
function
|
|
574
|
+
function Mn({
|
|
574
575
|
orientation: e,
|
|
575
|
-
rects:
|
|
576
|
-
targetRect:
|
|
576
|
+
rects: t,
|
|
577
|
+
targetRect: n
|
|
577
578
|
}) {
|
|
578
579
|
const o = {
|
|
579
|
-
x:
|
|
580
|
-
y:
|
|
580
|
+
x: n.x + n.width / 2,
|
|
581
|
+
y: n.y + n.height / 2
|
|
581
582
|
};
|
|
582
583
|
let r, i = Number.MAX_VALUE;
|
|
583
|
-
for (const s of
|
|
584
|
-
const { x: l, y: a } =
|
|
584
|
+
for (const s of t) {
|
|
585
|
+
const { x: l, y: a } = Xt(o, s), c = e === "horizontal" ? l : a;
|
|
585
586
|
c < i && (i = c, r = s);
|
|
586
587
|
}
|
|
587
|
-
return
|
|
588
|
+
return T(r, "No rect found"), r;
|
|
588
589
|
}
|
|
589
|
-
function
|
|
590
|
+
function ct({
|
|
590
591
|
expandHitTargets: e = !0,
|
|
591
|
-
axis:
|
|
592
|
-
includeDisabled:
|
|
592
|
+
axis: t,
|
|
593
|
+
includeDisabled: n = !1
|
|
593
594
|
}) {
|
|
594
|
-
if (
|
|
595
|
-
return
|
|
595
|
+
if (t.layoutStrategy)
|
|
596
|
+
return t.layoutStrategy.calculateHitRegions({
|
|
596
597
|
expandHitTargets: e,
|
|
597
|
-
axis:
|
|
598
|
-
includeDisabled:
|
|
598
|
+
axis: t,
|
|
599
|
+
includeDisabled: n
|
|
599
600
|
});
|
|
600
|
-
const { element: o, orientation: r, items: i, separators: s } =
|
|
601
|
+
const { element: o, orientation: r, items: i, separators: s } = t, l = Ne(
|
|
601
602
|
r,
|
|
602
|
-
Array.from(o.children).filter(ot).filter((
|
|
603
|
-
).map(({ element:
|
|
603
|
+
Array.from(o.children).filter(ot).filter((p) => !p.hasAttribute("data-resize-preview")).map((p) => ({ element: p }))
|
|
604
|
+
).map(({ element: p }) => p), a = [];
|
|
604
605
|
let c = !1, u = !1, d = -1, g, m = -1, y = 0, f, S = [];
|
|
605
606
|
{
|
|
606
|
-
let
|
|
607
|
-
for (const
|
|
608
|
-
|
|
607
|
+
let p = -1;
|
|
608
|
+
for (const h of l)
|
|
609
|
+
h.hasAttribute("data-panel") && (p++, h.hasAttribute("data-disabled") || (y++, d === -1 && (d = p), m = p));
|
|
609
610
|
}
|
|
610
|
-
if (
|
|
611
|
-
let
|
|
612
|
-
for (const
|
|
613
|
-
if (
|
|
614
|
-
|
|
615
|
-
const
|
|
616
|
-
(
|
|
611
|
+
if (n || y > 1) {
|
|
612
|
+
let p = -1;
|
|
613
|
+
for (const h of l)
|
|
614
|
+
if (h.hasAttribute("data-panel")) {
|
|
615
|
+
p++;
|
|
616
|
+
const I = i.find(
|
|
617
|
+
(x) => x.element === h
|
|
617
618
|
);
|
|
618
|
-
if (
|
|
619
|
+
if (I) {
|
|
619
620
|
if (f) {
|
|
620
|
-
const
|
|
621
|
-
let
|
|
621
|
+
const x = f.element.getBoundingClientRect(), C = h.getBoundingClientRect();
|
|
622
|
+
let N;
|
|
622
623
|
if (u) {
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
|
|
624
|
+
const D = r === "horizontal" ? new DOMRect(
|
|
625
|
+
x.right,
|
|
626
|
+
x.top,
|
|
626
627
|
0,
|
|
627
|
-
|
|
628
|
+
x.height
|
|
628
629
|
) : new DOMRect(
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
630
|
+
x.left,
|
|
631
|
+
x.bottom,
|
|
632
|
+
x.width,
|
|
632
633
|
0
|
|
633
|
-
), b = r === "horizontal" ? new DOMRect(
|
|
634
|
+
), b = r === "horizontal" ? new DOMRect(C.left, C.top, 0, C.height) : new DOMRect(C.left, C.top, C.width, 0);
|
|
634
635
|
switch (S.length) {
|
|
635
636
|
case 0: {
|
|
636
|
-
|
|
637
|
-
|
|
637
|
+
N = [
|
|
638
|
+
D,
|
|
638
639
|
b
|
|
639
640
|
];
|
|
640
641
|
break;
|
|
641
642
|
}
|
|
642
643
|
case 1: {
|
|
643
|
-
const
|
|
644
|
+
const w = S[0], v = Mn({
|
|
644
645
|
orientation: r,
|
|
645
|
-
rects: [
|
|
646
|
-
targetRect:
|
|
646
|
+
rects: [x, C],
|
|
647
|
+
targetRect: w.element.getBoundingClientRect()
|
|
647
648
|
});
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
v ===
|
|
649
|
+
N = [
|
|
650
|
+
w,
|
|
651
|
+
v === x ? b : D
|
|
651
652
|
];
|
|
652
653
|
break;
|
|
653
654
|
}
|
|
654
655
|
default: {
|
|
655
|
-
|
|
656
|
+
N = S;
|
|
656
657
|
break;
|
|
657
658
|
}
|
|
658
659
|
}
|
|
659
660
|
} else
|
|
660
|
-
S.length ?
|
|
661
|
+
S.length ? N = S : N = [
|
|
661
662
|
r === "horizontal" ? new DOMRect(
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
663
|
+
x.right,
|
|
664
|
+
C.top,
|
|
665
|
+
C.left - x.right,
|
|
666
|
+
C.height
|
|
666
667
|
) : new DOMRect(
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
668
|
+
C.left,
|
|
669
|
+
x.bottom,
|
|
670
|
+
C.width,
|
|
671
|
+
C.top - x.bottom
|
|
671
672
|
)
|
|
672
673
|
];
|
|
673
|
-
for (const
|
|
674
|
-
const b =
|
|
674
|
+
for (const D of N) {
|
|
675
|
+
const b = nt({
|
|
675
676
|
expandHitTargets: e,
|
|
676
|
-
axis:
|
|
677
|
-
rect: "width" in
|
|
678
|
-
}),
|
|
679
|
-
(
|
|
680
|
-
axis:
|
|
677
|
+
axis: t,
|
|
678
|
+
rect: "width" in D ? D : D.element.getBoundingClientRect()
|
|
679
|
+
}), w = p <= d || p > m;
|
|
680
|
+
(n || !c && !w) && (g ??= ke({ axis: t }), a.push({
|
|
681
|
+
axis: t,
|
|
681
682
|
axisSize: g,
|
|
682
|
-
items: [f,
|
|
683
|
-
separator: "width" in
|
|
683
|
+
items: [f, I],
|
|
684
|
+
separator: "width" in D ? void 0 : D,
|
|
684
685
|
rect: b
|
|
685
686
|
})), c = !1;
|
|
686
687
|
}
|
|
687
688
|
}
|
|
688
|
-
u = !1, f =
|
|
689
|
+
u = !1, f = I, S = [];
|
|
689
690
|
}
|
|
690
|
-
} else if (
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
(
|
|
691
|
+
} else if (h.hasAttribute("data-separator")) {
|
|
692
|
+
h.ariaDisabled !== null && (c = !0);
|
|
693
|
+
const I = s.find(
|
|
694
|
+
(x) => x.element === h
|
|
694
695
|
);
|
|
695
|
-
|
|
696
|
+
I ? S.push(I) : (f = void 0, S = []);
|
|
696
697
|
} else
|
|
697
698
|
u = !0;
|
|
698
699
|
}
|
|
699
700
|
return a;
|
|
700
701
|
}
|
|
701
|
-
function
|
|
702
|
-
const
|
|
703
|
-
return
|
|
702
|
+
function En(e, t) {
|
|
703
|
+
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
704
|
+
return t * o;
|
|
704
705
|
}
|
|
705
|
-
function
|
|
706
|
-
const
|
|
707
|
-
return
|
|
706
|
+
function Pn(e, t) {
|
|
707
|
+
const n = getComputedStyle(e.ownerDocument.documentElement), o = parseFloat(n.fontSize);
|
|
708
|
+
return t * o;
|
|
708
709
|
}
|
|
709
|
-
function
|
|
710
|
+
function kn(e) {
|
|
710
711
|
return e / 100 * window.innerHeight;
|
|
711
712
|
}
|
|
712
|
-
function
|
|
713
|
+
function $n(e) {
|
|
713
714
|
return e / 100 * window.innerWidth;
|
|
714
715
|
}
|
|
715
716
|
function Ce({
|
|
716
717
|
axisSize: e,
|
|
717
|
-
itemElement:
|
|
718
|
-
styleProp:
|
|
718
|
+
itemElement: t,
|
|
719
|
+
styleProp: n
|
|
719
720
|
}) {
|
|
720
721
|
let o;
|
|
721
|
-
const [r, i] =
|
|
722
|
+
const [r, i] = Vt(n);
|
|
722
723
|
switch (i) {
|
|
723
724
|
case "%": {
|
|
724
725
|
o = r / 100 * e;
|
|
@@ -729,19 +730,19 @@ function Ce({
|
|
|
729
730
|
break;
|
|
730
731
|
}
|
|
731
732
|
case "rem": {
|
|
732
|
-
o =
|
|
733
|
+
o = Pn(t, r);
|
|
733
734
|
break;
|
|
734
735
|
}
|
|
735
736
|
case "em": {
|
|
736
|
-
o =
|
|
737
|
+
o = En(t, r);
|
|
737
738
|
break;
|
|
738
739
|
}
|
|
739
740
|
case "vh": {
|
|
740
|
-
o =
|
|
741
|
+
o = kn(r);
|
|
741
742
|
break;
|
|
742
743
|
}
|
|
743
744
|
case "vw": {
|
|
744
|
-
o =
|
|
745
|
+
o = $n(r);
|
|
745
746
|
break;
|
|
746
747
|
}
|
|
747
748
|
}
|
|
@@ -751,8 +752,8 @@ function X(e) {
|
|
|
751
752
|
return parseFloat(e.toFixed(3));
|
|
752
753
|
}
|
|
753
754
|
function rt(e) {
|
|
754
|
-
const { items:
|
|
755
|
-
return
|
|
755
|
+
const { items: t } = e, n = ke({ axis: e });
|
|
756
|
+
return n === 0 ? t.map((o) => ({
|
|
756
757
|
groupResizeBehavior: o.constraintProps.groupResizeBehavior,
|
|
757
758
|
collapsedSize: 0,
|
|
758
759
|
collapsible: o.constraintProps.collapsible === !0,
|
|
@@ -761,52 +762,52 @@ function rt(e) {
|
|
|
761
762
|
minSize: 0,
|
|
762
763
|
maxSize: 100,
|
|
763
764
|
itemId: o.id
|
|
764
|
-
})) :
|
|
765
|
+
})) : t.map((o) => {
|
|
765
766
|
const { element: r, constraintProps: i } = o;
|
|
766
767
|
let s = 0;
|
|
767
768
|
if (i.collapsedSize !== void 0) {
|
|
768
769
|
const d = Ce({
|
|
769
|
-
axisSize:
|
|
770
|
+
axisSize: n,
|
|
770
771
|
itemElement: r,
|
|
771
772
|
styleProp: i.collapsedSize
|
|
772
773
|
});
|
|
773
|
-
s = X(d /
|
|
774
|
+
s = X(d / n * 100);
|
|
774
775
|
}
|
|
775
776
|
let l;
|
|
776
777
|
if (i.collapsedThreshold !== void 0) {
|
|
777
778
|
const d = Ce({
|
|
778
|
-
axisSize:
|
|
779
|
+
axisSize: n,
|
|
779
780
|
itemElement: r,
|
|
780
781
|
styleProp: i.collapsedThreshold
|
|
781
782
|
});
|
|
782
|
-
l = X(d /
|
|
783
|
+
l = X(d / n * 100);
|
|
783
784
|
}
|
|
784
785
|
let a;
|
|
785
786
|
if (i.defaultSize !== void 0) {
|
|
786
787
|
const d = Ce({
|
|
787
|
-
axisSize:
|
|
788
|
+
axisSize: n,
|
|
788
789
|
itemElement: r,
|
|
789
790
|
styleProp: i.defaultSize
|
|
790
791
|
});
|
|
791
|
-
a = X(d /
|
|
792
|
+
a = X(d / n * 100);
|
|
792
793
|
}
|
|
793
794
|
let c = 0;
|
|
794
795
|
if (i.minSize !== void 0) {
|
|
795
796
|
const d = Ce({
|
|
796
|
-
axisSize:
|
|
797
|
+
axisSize: n,
|
|
797
798
|
itemElement: r,
|
|
798
799
|
styleProp: i.minSize
|
|
799
800
|
});
|
|
800
|
-
c = X(d /
|
|
801
|
+
c = X(d / n * 100);
|
|
801
802
|
}
|
|
802
803
|
let u = 100;
|
|
803
804
|
if (i.maxSize !== void 0) {
|
|
804
805
|
const d = Ce({
|
|
805
|
-
axisSize:
|
|
806
|
+
axisSize: n,
|
|
806
807
|
itemElement: r,
|
|
807
808
|
styleProp: i.maxSize
|
|
808
809
|
});
|
|
809
|
-
u = X(d /
|
|
810
|
+
u = X(d / n * 100);
|
|
810
811
|
}
|
|
811
812
|
return {
|
|
812
813
|
groupResizeBehavior: i.groupResizeBehavior,
|
|
@@ -821,58 +822,58 @@ function rt(e) {
|
|
|
821
822
|
};
|
|
822
823
|
});
|
|
823
824
|
}
|
|
824
|
-
let
|
|
825
|
-
const
|
|
826
|
-
function
|
|
827
|
-
|
|
825
|
+
let ce = /* @__PURE__ */ new Map();
|
|
826
|
+
const Jt = new Ht();
|
|
827
|
+
function An(e) {
|
|
828
|
+
ce = new Map(ce), ce.delete(e);
|
|
828
829
|
}
|
|
829
|
-
function
|
|
830
|
-
for (const [
|
|
831
|
-
if (
|
|
832
|
-
return
|
|
830
|
+
function Me(e, t) {
|
|
831
|
+
for (const [n] of ce)
|
|
832
|
+
if (n.id === e)
|
|
833
|
+
return n;
|
|
833
834
|
}
|
|
834
|
-
function
|
|
835
|
-
for (const [
|
|
836
|
-
if (
|
|
835
|
+
function se(e, t) {
|
|
836
|
+
for (const [n, o] of ce)
|
|
837
|
+
if (n.id === e)
|
|
837
838
|
return o;
|
|
838
|
-
if (
|
|
839
|
+
if (t)
|
|
839
840
|
throw Error(`Could not find data for Group with id ${e}`);
|
|
840
841
|
}
|
|
841
|
-
function
|
|
842
|
-
return
|
|
842
|
+
function ye() {
|
|
843
|
+
return ce;
|
|
843
844
|
}
|
|
844
|
-
function
|
|
845
|
-
return
|
|
846
|
-
|
|
845
|
+
function Fe(e, t) {
|
|
846
|
+
return Jt.addListener("axisChange", (n) => {
|
|
847
|
+
n.axis.id === e && t(n);
|
|
847
848
|
});
|
|
848
849
|
}
|
|
849
|
-
function
|
|
850
|
-
const o =
|
|
851
|
-
|
|
850
|
+
function fe(e, t, n) {
|
|
851
|
+
const o = ce.get(e);
|
|
852
|
+
ce = new Map(ce), ce.set(e, t), Jt.emit("axisChange", {
|
|
852
853
|
axis: e,
|
|
853
|
-
isUserInteraction:
|
|
854
|
+
isUserInteraction: n?.isUserInteraction === !0,
|
|
854
855
|
prev: o,
|
|
855
|
-
next:
|
|
856
|
+
next: t
|
|
856
857
|
});
|
|
857
858
|
}
|
|
858
|
-
function
|
|
859
|
-
if (e.length !==
|
|
859
|
+
function Tn(e, t) {
|
|
860
|
+
if (e.length !== t.length)
|
|
860
861
|
return !1;
|
|
861
|
-
for (let
|
|
862
|
-
if (e[
|
|
862
|
+
for (let n = 0; n < e.length; n++)
|
|
863
|
+
if (e[n] != t[n])
|
|
863
864
|
return !1;
|
|
864
865
|
return !0;
|
|
865
866
|
}
|
|
866
|
-
function
|
|
867
|
-
return Math.abs(X(e) - X(
|
|
867
|
+
function Y(e, t, n = 0) {
|
|
868
|
+
return Math.abs(X(e) - X(t)) <= n;
|
|
868
869
|
}
|
|
869
|
-
function
|
|
870
|
-
return
|
|
870
|
+
function le(e, t) {
|
|
871
|
+
return Y(e, t) ? 0 : e > t ? 1 : -1;
|
|
871
872
|
}
|
|
872
|
-
function
|
|
873
|
+
function Ee({
|
|
873
874
|
overrideDisabledItems: e,
|
|
874
|
-
itemConstraints:
|
|
875
|
-
prevSize:
|
|
875
|
+
itemConstraints: t,
|
|
876
|
+
prevSize: n,
|
|
876
877
|
size: o
|
|
877
878
|
}) {
|
|
878
879
|
const {
|
|
@@ -882,94 +883,94 @@ function Me({
|
|
|
882
883
|
disabled: l,
|
|
883
884
|
maxSize: a = 100,
|
|
884
885
|
minSize: c = 0
|
|
885
|
-
} =
|
|
886
|
+
} = t;
|
|
886
887
|
if (l && !e)
|
|
887
|
-
return
|
|
888
|
-
if (
|
|
888
|
+
return n;
|
|
889
|
+
if (le(o, c) < 0)
|
|
889
890
|
if (s) {
|
|
890
|
-
const u = i ?? (c - r) / 2, d =
|
|
891
|
-
|
|
891
|
+
const u = i ?? (c - r) / 2, d = le(n, r) <= 0, g = d ? r + u : c - u, m = le(o, g);
|
|
892
|
+
le(o, r) <= 0 || m < 0 || i !== void 0 && d && m === 0 ? o = r : o = c;
|
|
892
893
|
} else
|
|
893
894
|
o = c;
|
|
894
895
|
return o = Math.min(a, o), o = X(o), o;
|
|
895
896
|
}
|
|
896
|
-
function
|
|
897
|
+
function qe({
|
|
897
898
|
delta: e,
|
|
898
|
-
initialLayout:
|
|
899
|
-
itemConstraints:
|
|
899
|
+
initialLayout: t,
|
|
900
|
+
itemConstraints: n,
|
|
900
901
|
pivotIndices: o,
|
|
901
902
|
prevLayout: r,
|
|
902
903
|
trigger: i
|
|
903
904
|
}) {
|
|
904
|
-
if (
|
|
905
|
-
return
|
|
906
|
-
const s = i === "imperative-api", l =
|
|
907
|
-
({ itemId: y }) =>
|
|
908
|
-
), a =
|
|
905
|
+
if (Y(e, 0))
|
|
906
|
+
return t;
|
|
907
|
+
const s = i === "imperative-api", l = n.map(
|
|
908
|
+
({ itemId: y }) => t[y]
|
|
909
|
+
), a = n.map(
|
|
909
910
|
({ itemId: y }) => r[y]
|
|
910
911
|
), c = [...l], [u, d] = o;
|
|
911
|
-
|
|
912
|
+
T(u != null, "Invalid first pivot index"), T(d != null, "Invalid second pivot index");
|
|
912
913
|
let g = 0;
|
|
913
914
|
switch (i) {
|
|
914
915
|
case "keyboard": {
|
|
915
916
|
{
|
|
916
|
-
const y = e < 0 ? d : u, f =
|
|
917
|
-
|
|
917
|
+
const y = e < 0 ? d : u, f = n[y];
|
|
918
|
+
T(
|
|
918
919
|
f,
|
|
919
920
|
`Panel constraints not found for index ${y}`
|
|
920
921
|
);
|
|
921
922
|
const {
|
|
922
923
|
collapsedSize: S = 0,
|
|
923
|
-
collapsible:
|
|
924
|
-
minSize:
|
|
924
|
+
collapsible: p,
|
|
925
|
+
minSize: h = 0
|
|
925
926
|
} = f;
|
|
926
|
-
if (
|
|
927
|
-
const
|
|
928
|
-
if (
|
|
929
|
-
|
|
927
|
+
if (p) {
|
|
928
|
+
const I = l[y];
|
|
929
|
+
if (T(
|
|
930
|
+
I != null,
|
|
930
931
|
`Previous layout not found for panel index ${y}`
|
|
931
|
-
),
|
|
932
|
-
const
|
|
933
|
-
|
|
932
|
+
), Y(I, S)) {
|
|
933
|
+
const x = h - I;
|
|
934
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
934
935
|
}
|
|
935
936
|
}
|
|
936
937
|
}
|
|
937
938
|
{
|
|
938
|
-
const y = e < 0 ? u : d, f =
|
|
939
|
-
|
|
939
|
+
const y = e < 0 ? u : d, f = n[y];
|
|
940
|
+
T(
|
|
940
941
|
f,
|
|
941
942
|
`No panel constraints found for index ${y}`
|
|
942
943
|
);
|
|
943
944
|
const {
|
|
944
945
|
collapsedSize: S = 0,
|
|
945
|
-
collapsible:
|
|
946
|
-
minSize:
|
|
946
|
+
collapsible: p,
|
|
947
|
+
minSize: h = 0
|
|
947
948
|
} = f;
|
|
948
|
-
if (
|
|
949
|
-
const
|
|
950
|
-
if (
|
|
951
|
-
|
|
949
|
+
if (p) {
|
|
950
|
+
const I = l[y];
|
|
951
|
+
if (T(
|
|
952
|
+
I != null,
|
|
952
953
|
`Previous layout not found for panel index ${y}`
|
|
953
|
-
),
|
|
954
|
-
const
|
|
955
|
-
|
|
954
|
+
), Y(I, h)) {
|
|
955
|
+
const x = I - S;
|
|
956
|
+
le(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
|
|
956
957
|
}
|
|
957
958
|
}
|
|
958
959
|
}
|
|
959
960
|
break;
|
|
960
961
|
}
|
|
961
962
|
default: {
|
|
962
|
-
const y = e < 0 ? d : u, f =
|
|
963
|
-
|
|
963
|
+
const y = e < 0 ? d : u, f = n[y];
|
|
964
|
+
T(
|
|
964
965
|
f,
|
|
965
966
|
`Panel constraints not found for index ${y}`
|
|
966
967
|
);
|
|
967
|
-
const S = l[y], { collapsedSize:
|
|
968
|
-
if (
|
|
969
|
-
const
|
|
970
|
-
if (
|
|
971
|
-
const b =
|
|
972
|
-
b > 0 || b === 0 &&
|
|
968
|
+
const S = l[y], { collapsedSize: p, collapsedThreshold: h, collapsible: I, minSize: x } = f;
|
|
969
|
+
if (I && le(S, x) < 0) {
|
|
970
|
+
const C = x - p, N = h ?? C / 2, D = S + Math.abs(e);
|
|
971
|
+
if (le(D, x) < 0) {
|
|
972
|
+
const b = le(Math.abs(e), N), w = h === void 0 && e < 0;
|
|
973
|
+
b > 0 || b === 0 && w ? e = e < 0 ? -C : C : e = 0;
|
|
973
974
|
}
|
|
974
975
|
}
|
|
975
976
|
break;
|
|
@@ -979,75 +980,75 @@ function Fe({
|
|
|
979
980
|
const y = e < 0 ? 1 : -1;
|
|
980
981
|
let f = e < 0 ? d : u, S = 0;
|
|
981
982
|
for (; ; ) {
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
|
|
983
|
+
const h = l[f];
|
|
984
|
+
T(
|
|
985
|
+
h != null,
|
|
985
986
|
`Previous layout not found for panel index ${f}`
|
|
986
987
|
);
|
|
987
|
-
const
|
|
988
|
+
const x = Ee({
|
|
988
989
|
overrideDisabledItems: s,
|
|
989
|
-
itemConstraints:
|
|
990
|
-
prevSize:
|
|
990
|
+
itemConstraints: n[f],
|
|
991
|
+
prevSize: h,
|
|
991
992
|
size: 100
|
|
992
|
-
}) -
|
|
993
|
-
if (S +=
|
|
993
|
+
}) - h;
|
|
994
|
+
if (S += x, f += y, f < 0 || f >= n.length)
|
|
994
995
|
break;
|
|
995
996
|
}
|
|
996
|
-
const
|
|
997
|
-
e = e < 0 ? 0 -
|
|
997
|
+
const p = Math.min(Math.abs(e), Math.abs(S));
|
|
998
|
+
e = e < 0 ? 0 - p : p;
|
|
998
999
|
}
|
|
999
1000
|
{
|
|
1000
1001
|
let f = e < 0 ? u : d;
|
|
1001
|
-
for (; f >= 0 && f <
|
|
1002
|
-
const S = Math.abs(e) - Math.abs(g),
|
|
1003
|
-
|
|
1004
|
-
|
|
1002
|
+
for (; f >= 0 && f < n.length; ) {
|
|
1003
|
+
const S = Math.abs(e) - Math.abs(g), p = l[f];
|
|
1004
|
+
T(
|
|
1005
|
+
p != null,
|
|
1005
1006
|
`Previous layout not found for panel index ${f}`
|
|
1006
1007
|
);
|
|
1007
|
-
const
|
|
1008
|
+
const h = p - S, I = Ee({
|
|
1008
1009
|
overrideDisabledItems: s,
|
|
1009
|
-
itemConstraints:
|
|
1010
|
-
prevSize:
|
|
1011
|
-
size:
|
|
1010
|
+
itemConstraints: n[f],
|
|
1011
|
+
prevSize: p,
|
|
1012
|
+
size: h
|
|
1012
1013
|
});
|
|
1013
|
-
if (!
|
|
1014
|
+
if (!Y(p, I) && (g += p - I, c[f] = I, g.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
|
|
1014
1015
|
numeric: !0
|
|
1015
1016
|
}) >= 0))
|
|
1016
1017
|
break;
|
|
1017
1018
|
e < 0 ? f-- : f++;
|
|
1018
1019
|
}
|
|
1019
1020
|
}
|
|
1020
|
-
if (
|
|
1021
|
+
if (Tn(a, c))
|
|
1021
1022
|
return r;
|
|
1022
1023
|
{
|
|
1023
1024
|
const y = e < 0 ? d : u, f = l[y];
|
|
1024
|
-
|
|
1025
|
+
T(
|
|
1025
1026
|
f != null,
|
|
1026
1027
|
`Previous layout not found for panel index ${y}`
|
|
1027
1028
|
);
|
|
1028
|
-
const S = f + g,
|
|
1029
|
+
const S = f + g, p = Ee({
|
|
1029
1030
|
overrideDisabledItems: s,
|
|
1030
|
-
itemConstraints:
|
|
1031
|
+
itemConstraints: n[y],
|
|
1031
1032
|
prevSize: f,
|
|
1032
1033
|
size: S
|
|
1033
1034
|
});
|
|
1034
|
-
if (c[y] =
|
|
1035
|
-
let
|
|
1036
|
-
for (;
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
`Previous layout not found for panel index ${
|
|
1035
|
+
if (c[y] = p, !Y(p, S)) {
|
|
1036
|
+
let h = S - p, x = e < 0 ? d : u;
|
|
1037
|
+
for (; x >= 0 && x < n.length; ) {
|
|
1038
|
+
const C = c[x];
|
|
1039
|
+
T(
|
|
1040
|
+
C != null,
|
|
1041
|
+
`Previous layout not found for panel index ${x}`
|
|
1041
1042
|
);
|
|
1042
|
-
const
|
|
1043
|
+
const N = C + h, D = Ee({
|
|
1043
1044
|
overrideDisabledItems: s,
|
|
1044
|
-
itemConstraints:
|
|
1045
|
-
prevSize:
|
|
1046
|
-
size:
|
|
1045
|
+
itemConstraints: n[x],
|
|
1046
|
+
prevSize: C,
|
|
1047
|
+
size: N
|
|
1047
1048
|
});
|
|
1048
|
-
if (
|
|
1049
|
+
if (Y(C, D) || (h -= D - C, c[x] = D), Y(h, 0))
|
|
1049
1050
|
break;
|
|
1050
|
-
e > 0 ?
|
|
1051
|
+
e > 0 ? x-- : x++;
|
|
1051
1052
|
}
|
|
1052
1053
|
}
|
|
1053
1054
|
}
|
|
@@ -1055,20 +1056,20 @@ function Fe({
|
|
|
1055
1056
|
(y, f) => f + y,
|
|
1056
1057
|
0
|
|
1057
1058
|
);
|
|
1058
|
-
return
|
|
1059
|
+
return Y(m, 100, 0.1) ? c.reduce((y, f, S) => (y[n[S].itemId] = f, y), {}) : r;
|
|
1059
1060
|
}
|
|
1060
|
-
function ie(e,
|
|
1061
|
-
if (Object.keys(e).length !== Object.keys(
|
|
1061
|
+
function ie(e, t) {
|
|
1062
|
+
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1062
1063
|
return !1;
|
|
1063
|
-
for (const
|
|
1064
|
-
if (n
|
|
1064
|
+
for (const n in e)
|
|
1065
|
+
if (t[n] === void 0 || le(e[n], t[n]) !== 0)
|
|
1065
1066
|
return !1;
|
|
1066
1067
|
return !0;
|
|
1067
1068
|
}
|
|
1068
|
-
function
|
|
1069
|
+
function ut({
|
|
1069
1070
|
commit: e,
|
|
1070
|
-
document:
|
|
1071
|
-
event:
|
|
1071
|
+
document: t,
|
|
1072
|
+
event: n,
|
|
1072
1073
|
hitRegions: o,
|
|
1073
1074
|
initialLayoutMap: r,
|
|
1074
1075
|
mountedAxes: i,
|
|
@@ -1076,111 +1077,113 @@ function ct({
|
|
|
1076
1077
|
prevCursorFlags: l
|
|
1077
1078
|
}) {
|
|
1078
1079
|
let a = 0;
|
|
1079
|
-
const c =
|
|
1080
|
+
const c = de();
|
|
1080
1081
|
let u = c.state === "active" ? c.previews : [];
|
|
1081
1082
|
const d = new Map(
|
|
1082
1083
|
c.state === "active" ? c.previewLayoutMap : void 0
|
|
1083
1084
|
);
|
|
1084
1085
|
o.forEach((y) => {
|
|
1085
|
-
const { axis: f, axisSize: S } = y, { orientation:
|
|
1086
|
+
const { axis: f, axisSize: S } = y, { orientation: p, items: h } = f;
|
|
1086
1087
|
if (e && f.resizePreviewMode !== "separator")
|
|
1087
1088
|
return;
|
|
1088
|
-
const { disableCursor:
|
|
1089
|
-
let
|
|
1090
|
-
s ?
|
|
1091
|
-
const
|
|
1092
|
-
if (!
|
|
1089
|
+
const { disableCursor: I } = f.mutableState;
|
|
1090
|
+
let x = 0;
|
|
1091
|
+
s ? p === "horizontal" ? x = (n.clientX - s.x) / S * 100 : x = (n.clientY - s.y) / S * 100 : p === "horizontal" ? x = n.clientX < 0 ? -100 : 100 : x = n.clientY < 0 ? -100 : 100;
|
|
1092
|
+
const C = r.get(f), N = i.get(f);
|
|
1093
|
+
if (!C || !N)
|
|
1093
1094
|
return;
|
|
1094
1095
|
const {
|
|
1095
|
-
defaultLayoutDeferred:
|
|
1096
|
+
defaultLayoutDeferred: D,
|
|
1096
1097
|
derivedItemConstraints: b,
|
|
1097
|
-
axisSize:
|
|
1098
|
+
axisSize: w,
|
|
1098
1099
|
layout: v,
|
|
1099
|
-
separatorToItems:
|
|
1100
|
-
} =
|
|
1101
|
-
if (b && v &&
|
|
1102
|
-
const
|
|
1103
|
-
delta:
|
|
1104
|
-
initialLayout:
|
|
1100
|
+
separatorToItems: $
|
|
1101
|
+
} = N;
|
|
1102
|
+
if (b && v && $) {
|
|
1103
|
+
const O = f.resizePreviewMode === "separator" ? d.get(f) ?? v : v, R = qe({
|
|
1104
|
+
delta: x,
|
|
1105
|
+
initialLayout: C,
|
|
1105
1106
|
itemConstraints: b,
|
|
1106
|
-
pivotIndices: y.items.map((
|
|
1107
|
-
prevLayout:
|
|
1107
|
+
pivotIndices: y.items.map((E) => h.indexOf(E)),
|
|
1108
|
+
prevLayout: O,
|
|
1108
1109
|
trigger: "mouse-or-touch"
|
|
1109
1110
|
});
|
|
1110
|
-
if (f.resizePreviewMode === "separator" && !e && !ie(
|
|
1111
|
-
d.set(f,
|
|
1112
|
-
let
|
|
1113
|
-
const
|
|
1114
|
-
u = u.map((
|
|
1115
|
-
if (
|
|
1116
|
-
return
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1111
|
+
if (f.resizePreviewMode === "separator" && !e && !ie(R, O)) {
|
|
1112
|
+
d.set(f, R);
|
|
1113
|
+
let E = 0;
|
|
1114
|
+
const P = h.map((z) => (E += R[z.id] - C[z.id], E * (S / 100)));
|
|
1115
|
+
u = u.map((z) => {
|
|
1116
|
+
if (z.axis !== f)
|
|
1117
|
+
return z;
|
|
1118
|
+
const M = P[z.itemIndex];
|
|
1119
|
+
return M === z.offset ? z : { ...z, offset: M };
|
|
1119
1120
|
});
|
|
1120
1121
|
}
|
|
1121
|
-
if (ie(
|
|
1122
|
-
switch (
|
|
1122
|
+
if (ie(R, O) && x !== 0 && !I)
|
|
1123
|
+
switch (p) {
|
|
1123
1124
|
case "horizontal": {
|
|
1124
|
-
a |=
|
|
1125
|
+
a |= x < 0 ? Ut : Wt;
|
|
1125
1126
|
break;
|
|
1126
1127
|
}
|
|
1127
1128
|
case "vertical": {
|
|
1128
|
-
a |=
|
|
1129
|
+
a |= x < 0 ? Yt : Kt;
|
|
1129
1130
|
break;
|
|
1130
1131
|
}
|
|
1131
1132
|
}
|
|
1132
|
-
(f.resizePreviewMode !== "separator" || e) && !ie(
|
|
1133
|
-
defaultLayoutDeferred:
|
|
1133
|
+
(f.resizePreviewMode !== "separator" || e) && !ie(R, v) && fe(y.axis, {
|
|
1134
|
+
defaultLayoutDeferred: D,
|
|
1134
1135
|
derivedItemConstraints: b,
|
|
1135
|
-
axisSize:
|
|
1136
|
-
layout:
|
|
1137
|
-
|
|
1136
|
+
axisSize: w,
|
|
1137
|
+
layout: R,
|
|
1138
|
+
requestedAxisSize: w,
|
|
1139
|
+
requestedLayout: R,
|
|
1140
|
+
separatorToItems: $
|
|
1138
1141
|
});
|
|
1139
1142
|
}
|
|
1140
1143
|
});
|
|
1141
1144
|
let g = 0;
|
|
1142
|
-
|
|
1143
|
-
const m = c.state === "active" && (
|
|
1144
|
-
|
|
1145
|
+
n.movementX === 0 ? g |= l & gt : g |= a & gt, n.movementY === 0 ? g |= l & yt : g |= a & yt;
|
|
1146
|
+
const m = c.state === "active" && (n.clientX !== c.pointerDownAtPoint.x || n.clientY !== c.pointerDownAtPoint.y);
|
|
1147
|
+
xn(g, u, d, m), _e(t);
|
|
1145
1148
|
}
|
|
1146
|
-
function
|
|
1147
|
-
const
|
|
1149
|
+
function Zt(e, t) {
|
|
1150
|
+
const n = de(), o = ye();
|
|
1148
1151
|
let r = !1;
|
|
1149
|
-
switch (
|
|
1152
|
+
switch (n.state) {
|
|
1150
1153
|
case "active":
|
|
1151
|
-
|
|
1154
|
+
ut({
|
|
1152
1155
|
commit: !0,
|
|
1153
1156
|
document: e,
|
|
1154
|
-
event:
|
|
1155
|
-
hitRegions:
|
|
1156
|
-
initialLayoutMap:
|
|
1157
|
+
event: t,
|
|
1158
|
+
hitRegions: n.hitRegions,
|
|
1159
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
1157
1160
|
mountedAxes: o,
|
|
1158
|
-
pointerDownAtPoint:
|
|
1159
|
-
prevCursorFlags:
|
|
1160
|
-
}),
|
|
1161
|
+
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
1162
|
+
prevCursorFlags: n.cursorFlags
|
|
1163
|
+
}), ue({
|
|
1161
1164
|
cursorFlags: 0,
|
|
1162
1165
|
state: "inactive"
|
|
1163
|
-
}),
|
|
1166
|
+
}), n.hitRegions.length > 0 && (_e(e), r = !0, n.hitRegions.forEach((i) => {
|
|
1164
1167
|
if (!o.has(i.axis))
|
|
1165
1168
|
return;
|
|
1166
|
-
const s =
|
|
1167
|
-
|
|
1169
|
+
const s = se(i.axis.id, !0);
|
|
1170
|
+
fe(i.axis, s, {
|
|
1168
1171
|
isUserInteraction: !0
|
|
1169
1172
|
});
|
|
1170
1173
|
}));
|
|
1171
1174
|
}
|
|
1172
1175
|
return r;
|
|
1173
1176
|
}
|
|
1174
|
-
function
|
|
1175
|
-
e.defaultPrevented ||
|
|
1177
|
+
function bt(e) {
|
|
1178
|
+
e.defaultPrevented || Zt(e.currentTarget, e);
|
|
1176
1179
|
}
|
|
1177
|
-
function
|
|
1180
|
+
function Dn(e, t, n) {
|
|
1178
1181
|
let o, r = {
|
|
1179
1182
|
x: 1 / 0,
|
|
1180
1183
|
y: 1 / 0
|
|
1181
1184
|
};
|
|
1182
|
-
for (const i of
|
|
1183
|
-
const s =
|
|
1185
|
+
for (const i of t) {
|
|
1186
|
+
const s = Xt(n, i.rect);
|
|
1184
1187
|
switch (e) {
|
|
1185
1188
|
case "horizontal": {
|
|
1186
1189
|
(s.x < r.x || s.x === r.x && s.y <= r.y) && (o = i, r = s);
|
|
@@ -1197,30 +1200,30 @@ function Tn(e, n, t) {
|
|
|
1197
1200
|
hitRegion: o
|
|
1198
1201
|
} : void 0;
|
|
1199
1202
|
}
|
|
1200
|
-
function
|
|
1203
|
+
function On(e) {
|
|
1201
1204
|
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
1202
1205
|
}
|
|
1203
|
-
function
|
|
1204
|
-
if (e ===
|
|
1205
|
-
const
|
|
1206
|
-
a:
|
|
1207
|
-
b:
|
|
1206
|
+
function Nn(e, t) {
|
|
1207
|
+
if (e === t) throw new Error("Cannot compare node with itself");
|
|
1208
|
+
const n = {
|
|
1209
|
+
a: zt(e),
|
|
1210
|
+
b: zt(t)
|
|
1208
1211
|
};
|
|
1209
1212
|
let o;
|
|
1210
|
-
for (;
|
|
1211
|
-
o =
|
|
1212
|
-
|
|
1213
|
+
for (; n.a.at(-1) === n.b.at(-1); )
|
|
1214
|
+
o = n.a.pop(), n.b.pop();
|
|
1215
|
+
T(
|
|
1213
1216
|
o,
|
|
1214
1217
|
"Stacking order can only be calculated for elements with a common ancestor"
|
|
1215
1218
|
);
|
|
1216
1219
|
const r = {
|
|
1217
|
-
a: xt(
|
|
1218
|
-
b: xt(
|
|
1220
|
+
a: wt(xt(n.a)),
|
|
1221
|
+
b: wt(xt(n.b))
|
|
1219
1222
|
};
|
|
1220
1223
|
if (r.a === r.b) {
|
|
1221
1224
|
const i = o.childNodes, s = {
|
|
1222
|
-
a:
|
|
1223
|
-
b:
|
|
1225
|
+
a: n.a.at(-1),
|
|
1226
|
+
b: n.b.at(-1)
|
|
1224
1227
|
};
|
|
1225
1228
|
let l = i.length;
|
|
1226
1229
|
for (; l--; ) {
|
|
@@ -1231,140 +1234,140 @@ function On(e, n) {
|
|
|
1231
1234
|
}
|
|
1232
1235
|
return Math.sign(r.a - r.b);
|
|
1233
1236
|
}
|
|
1234
|
-
const
|
|
1235
|
-
function
|
|
1236
|
-
const
|
|
1237
|
-
return
|
|
1237
|
+
const Gn = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
1238
|
+
function _n(e) {
|
|
1239
|
+
const t = getComputedStyle(Qt(e) ?? e).display;
|
|
1240
|
+
return t === "flex" || t === "inline-flex";
|
|
1238
1241
|
}
|
|
1239
|
-
function
|
|
1240
|
-
const
|
|
1241
|
-
return !!(
|
|
1242
|
+
function Fn(e) {
|
|
1243
|
+
const t = getComputedStyle(e);
|
|
1244
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || _n(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" || Gn.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
1242
1245
|
}
|
|
1243
|
-
function
|
|
1244
|
-
let
|
|
1245
|
-
for (;
|
|
1246
|
-
const
|
|
1247
|
-
if (
|
|
1246
|
+
function xt(e) {
|
|
1247
|
+
let t = e.length;
|
|
1248
|
+
for (; t--; ) {
|
|
1249
|
+
const n = e[t];
|
|
1250
|
+
if (T(n, "Missing node"), Fn(n)) return n;
|
|
1248
1251
|
}
|
|
1249
1252
|
return null;
|
|
1250
1253
|
}
|
|
1251
|
-
function
|
|
1254
|
+
function wt(e) {
|
|
1252
1255
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
1253
1256
|
}
|
|
1254
|
-
function
|
|
1255
|
-
const
|
|
1257
|
+
function zt(e) {
|
|
1258
|
+
const t = [];
|
|
1256
1259
|
for (; e; )
|
|
1257
|
-
|
|
1258
|
-
return
|
|
1260
|
+
t.push(e), e = Qt(e);
|
|
1261
|
+
return t;
|
|
1259
1262
|
}
|
|
1260
|
-
function
|
|
1261
|
-
const { parentNode:
|
|
1262
|
-
return
|
|
1263
|
+
function Qt(e) {
|
|
1264
|
+
const { parentNode: t } = e;
|
|
1265
|
+
return On(t) ? t.host : t;
|
|
1263
1266
|
}
|
|
1264
|
-
function
|
|
1265
|
-
return e.x <
|
|
1267
|
+
function qn(e, t) {
|
|
1268
|
+
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;
|
|
1266
1269
|
}
|
|
1267
|
-
function
|
|
1270
|
+
function Bn(e) {
|
|
1268
1271
|
try {
|
|
1269
1272
|
return e.matches(":modal");
|
|
1270
1273
|
} catch {
|
|
1271
1274
|
return !1;
|
|
1272
1275
|
}
|
|
1273
1276
|
}
|
|
1274
|
-
function
|
|
1277
|
+
function Vn({
|
|
1275
1278
|
axisElement: e,
|
|
1276
|
-
hitRegion:
|
|
1277
|
-
pointerEventTarget:
|
|
1279
|
+
hitRegion: t,
|
|
1280
|
+
pointerEventTarget: n
|
|
1278
1281
|
}) {
|
|
1279
|
-
if (ot(
|
|
1280
|
-
const o =
|
|
1281
|
-
if (o && !o.contains(e) &&
|
|
1282
|
+
if (ot(n)) {
|
|
1283
|
+
const o = n.closest("dialog");
|
|
1284
|
+
if (o && !o.contains(e) && Bn(o))
|
|
1282
1285
|
return !1;
|
|
1283
1286
|
}
|
|
1284
|
-
if (!ot(
|
|
1287
|
+
if (!ot(n) || n.contains(e) || e.contains(n))
|
|
1285
1288
|
return !0;
|
|
1286
|
-
if (
|
|
1287
|
-
let o =
|
|
1289
|
+
if (Nn(n, e) > 0) {
|
|
1290
|
+
let o = n;
|
|
1288
1291
|
for (; o; ) {
|
|
1289
1292
|
if (o.contains(e))
|
|
1290
1293
|
return !0;
|
|
1291
|
-
if (
|
|
1294
|
+
if (qn(o.getBoundingClientRect(), t))
|
|
1292
1295
|
return !1;
|
|
1293
1296
|
o = o.parentElement;
|
|
1294
1297
|
}
|
|
1295
1298
|
}
|
|
1296
1299
|
return !0;
|
|
1297
1300
|
}
|
|
1298
|
-
function
|
|
1299
|
-
const
|
|
1300
|
-
return
|
|
1301
|
+
function dt(e, t) {
|
|
1302
|
+
const n = [];
|
|
1303
|
+
return t.forEach((o, r) => {
|
|
1301
1304
|
if (r.disabled)
|
|
1302
1305
|
return;
|
|
1303
|
-
const i =
|
|
1306
|
+
const i = ct({ axis: r }), s = Dn(r.orientation, i, {
|
|
1304
1307
|
x: e.clientX,
|
|
1305
1308
|
y: e.clientY
|
|
1306
1309
|
});
|
|
1307
|
-
s && s.distance.x <= 0 && s.distance.y <= 0 &&
|
|
1310
|
+
s && s.distance.x <= 0 && s.distance.y <= 0 && Vn({
|
|
1308
1311
|
axisElement: r.element,
|
|
1309
1312
|
hitRegion: s.hitRegion.rect,
|
|
1310
1313
|
pointerEventTarget: e.target
|
|
1311
|
-
}) &&
|
|
1312
|
-
}),
|
|
1314
|
+
}) && n.push(s.hitRegion);
|
|
1315
|
+
}), n;
|
|
1313
1316
|
}
|
|
1314
|
-
function
|
|
1317
|
+
function ge({
|
|
1315
1318
|
layout: e,
|
|
1316
|
-
itemConstraints:
|
|
1319
|
+
itemConstraints: t
|
|
1317
1320
|
}) {
|
|
1318
|
-
const
|
|
1321
|
+
const n = t.map(({ itemId: s }) => e[s]), o = [...n], r = o.reduce(
|
|
1319
1322
|
(s, l) => s + l,
|
|
1320
1323
|
0
|
|
1321
1324
|
);
|
|
1322
|
-
if (Object.keys(e).length !==
|
|
1325
|
+
if (Object.keys(e).length !== t.length)
|
|
1323
1326
|
throw Error(
|
|
1324
|
-
`Invalid ${
|
|
1327
|
+
`Invalid ${t.length} panel layout: ${Object.values(e).map((s) => `${s}%`).join(", ")}`
|
|
1325
1328
|
);
|
|
1326
|
-
if (!
|
|
1327
|
-
for (let s = 0; s <
|
|
1329
|
+
if (!Y(r, 100) && o.length > 0)
|
|
1330
|
+
for (let s = 0; s < t.length; s++) {
|
|
1328
1331
|
const l = o[s];
|
|
1329
|
-
|
|
1332
|
+
T(l != null, `No layout data found for index ${s}`);
|
|
1330
1333
|
const a = 100 / r * l;
|
|
1331
1334
|
o[s] = a;
|
|
1332
1335
|
}
|
|
1333
1336
|
let i = 0;
|
|
1334
|
-
for (let s = 0; s <
|
|
1335
|
-
const l =
|
|
1336
|
-
|
|
1337
|
+
for (let s = 0; s < t.length; s++) {
|
|
1338
|
+
const l = n[s];
|
|
1339
|
+
T(l != null, `No layout data found for index ${s}`);
|
|
1337
1340
|
const a = o[s];
|
|
1338
|
-
|
|
1339
|
-
const c =
|
|
1341
|
+
T(a != null, `No layout data found for index ${s}`);
|
|
1342
|
+
const c = Ee({
|
|
1340
1343
|
overrideDisabledItems: !0,
|
|
1341
|
-
itemConstraints:
|
|
1344
|
+
itemConstraints: t[s],
|
|
1342
1345
|
prevSize: l,
|
|
1343
1346
|
size: a
|
|
1344
1347
|
});
|
|
1345
1348
|
a != c && (i += a - c, o[s] = c);
|
|
1346
1349
|
}
|
|
1347
|
-
if (!
|
|
1348
|
-
for (let s = 0; s <
|
|
1350
|
+
if (!Y(i, 0))
|
|
1351
|
+
for (let s = 0; s < t.length; s++) {
|
|
1349
1352
|
const l = o[s];
|
|
1350
|
-
|
|
1351
|
-
const a = l + i, c =
|
|
1353
|
+
T(l != null, `No layout data found for index ${s}`);
|
|
1354
|
+
const a = l + i, c = Ee({
|
|
1352
1355
|
overrideDisabledItems: !0,
|
|
1353
|
-
itemConstraints:
|
|
1356
|
+
itemConstraints: t[s],
|
|
1354
1357
|
prevSize: l,
|
|
1355
1358
|
size: a
|
|
1356
1359
|
});
|
|
1357
|
-
if (l !== c && (i -= c - l, o[s] = c,
|
|
1360
|
+
if (l !== c && (i -= c - l, o[s] = c, Y(i, 0)))
|
|
1358
1361
|
break;
|
|
1359
1362
|
}
|
|
1360
|
-
return o.reduce((s, l, a) => (s[
|
|
1363
|
+
return o.reduce((s, l, a) => (s[t[a].itemId] = l, s), {});
|
|
1361
1364
|
}
|
|
1362
|
-
function
|
|
1365
|
+
function ft({
|
|
1363
1366
|
axisId: e,
|
|
1364
|
-
itemId:
|
|
1367
|
+
itemId: t
|
|
1365
1368
|
}) {
|
|
1366
|
-
const
|
|
1367
|
-
const a =
|
|
1369
|
+
const n = () => {
|
|
1370
|
+
const a = ye();
|
|
1368
1371
|
for (const [
|
|
1369
1372
|
c,
|
|
1370
1373
|
{
|
|
@@ -1386,40 +1389,40 @@ function dt({
|
|
|
1386
1389
|
};
|
|
1387
1390
|
throw Error(`Group ${e} not found`);
|
|
1388
1391
|
}, o = () => {
|
|
1389
|
-
const a =
|
|
1390
|
-
(c) => c.itemId ===
|
|
1392
|
+
const a = n().derivedItemConstraints.find(
|
|
1393
|
+
(c) => c.itemId === t
|
|
1391
1394
|
);
|
|
1392
1395
|
if (a !== void 0)
|
|
1393
1396
|
return a;
|
|
1394
|
-
throw Error(`Panel constraints not found for Panel ${
|
|
1397
|
+
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
1395
1398
|
}, r = () => {
|
|
1396
|
-
const a =
|
|
1399
|
+
const a = n().axis.items.find((c) => c.id === t);
|
|
1397
1400
|
if (a !== void 0)
|
|
1398
1401
|
return a;
|
|
1399
|
-
throw Error(`Layout not found for Panel ${
|
|
1402
|
+
throw Error(`Layout not found for Panel ${t}`);
|
|
1400
1403
|
}, i = () => {
|
|
1401
|
-
const a =
|
|
1404
|
+
const a = n().layout[t];
|
|
1402
1405
|
if (a !== void 0)
|
|
1403
1406
|
return a;
|
|
1404
|
-
throw Error(`Layout not found for Panel ${
|
|
1407
|
+
throw Error(`Layout not found for Panel ${t}`);
|
|
1405
1408
|
}, s = ({
|
|
1406
1409
|
nextSize: a,
|
|
1407
1410
|
items: c,
|
|
1408
1411
|
prevLayout: u,
|
|
1409
1412
|
derivedItemConstraints: d
|
|
1410
1413
|
}) => {
|
|
1411
|
-
const g = i(), m = c.findIndex((
|
|
1412
|
-
if (f && a < g && (y || c.slice(0, m).every((
|
|
1413
|
-
const
|
|
1414
|
-
return
|
|
1414
|
+
const g = i(), m = c.findIndex((p) => p.id === t), y = m === 0, f = m === c.length - 1;
|
|
1415
|
+
if (f && a < g && (y || c.slice(0, m).every((p, h) => {
|
|
1416
|
+
const I = d[h];
|
|
1417
|
+
return I?.collapsible && Y(I.collapsedSize, u[I.itemId]);
|
|
1415
1418
|
}))) {
|
|
1416
|
-
const
|
|
1419
|
+
const p = c.slice(0, m).reduce((h, I) => h + u[I.id], 0);
|
|
1417
1420
|
return {
|
|
1418
1421
|
...u,
|
|
1419
|
-
[
|
|
1422
|
+
[t]: X(100 - p)
|
|
1420
1423
|
};
|
|
1421
1424
|
}
|
|
1422
|
-
return
|
|
1425
|
+
return qe({
|
|
1423
1426
|
delta: f ? g - a : a - g,
|
|
1424
1427
|
initialLayout: u,
|
|
1425
1428
|
itemConstraints: d,
|
|
@@ -1438,20 +1441,22 @@ function dt({
|
|
|
1438
1441
|
axisSize: m,
|
|
1439
1442
|
layout: y,
|
|
1440
1443
|
separatorToItems: f
|
|
1441
|
-
} =
|
|
1444
|
+
} = n(), S = s({
|
|
1442
1445
|
nextSize: a,
|
|
1443
1446
|
items: g.items,
|
|
1444
1447
|
prevLayout: y,
|
|
1445
1448
|
derivedItemConstraints: d
|
|
1446
|
-
}),
|
|
1449
|
+
}), p = ge({
|
|
1447
1450
|
layout: S,
|
|
1448
1451
|
itemConstraints: d
|
|
1449
1452
|
});
|
|
1450
|
-
ie(y,
|
|
1453
|
+
ie(y, p) || fe(g, {
|
|
1451
1454
|
defaultLayoutDeferred: u,
|
|
1452
1455
|
derivedItemConstraints: d,
|
|
1453
1456
|
axisSize: m,
|
|
1454
|
-
layout:
|
|
1457
|
+
layout: p,
|
|
1458
|
+
requestedAxisSize: m,
|
|
1459
|
+
requestedLayout: p,
|
|
1455
1460
|
separatorToItems: f
|
|
1456
1461
|
});
|
|
1457
1462
|
};
|
|
@@ -1468,7 +1473,7 @@ function dt({
|
|
|
1468
1473
|
}
|
|
1469
1474
|
},
|
|
1470
1475
|
getSize: () => {
|
|
1471
|
-
const { axis: a } =
|
|
1476
|
+
const { axis: a } = n(), c = i(), { element: u } = r(), d = a.layoutStrategy ? a.layoutStrategy.getItemSizeInPixels(t) : a.orientation === "horizontal" ? u.offsetWidth : u.offsetHeight;
|
|
1472
1477
|
return {
|
|
1473
1478
|
asPercentage: c,
|
|
1474
1479
|
inPixels: d
|
|
@@ -1476,10 +1481,10 @@ function dt({
|
|
|
1476
1481
|
},
|
|
1477
1482
|
isCollapsed: () => {
|
|
1478
1483
|
const { collapsible: a, collapsedSize: c } = o(), u = i();
|
|
1479
|
-
return a &&
|
|
1484
|
+
return a && Y(c, u);
|
|
1480
1485
|
},
|
|
1481
1486
|
resize: (a) => {
|
|
1482
|
-
const { axis: c } =
|
|
1487
|
+
const { axis: c } = n(), { element: u } = r(), d = ke({ axis: c }), g = Ce({
|
|
1483
1488
|
axisSize: d,
|
|
1484
1489
|
itemElement: u,
|
|
1485
1490
|
styleProp: a
|
|
@@ -1488,17 +1493,17 @@ function dt({
|
|
|
1488
1493
|
}
|
|
1489
1494
|
};
|
|
1490
1495
|
}
|
|
1491
|
-
function
|
|
1496
|
+
function It(e) {
|
|
1492
1497
|
if (e.defaultPrevented)
|
|
1493
1498
|
return;
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1499
|
+
const t = ye();
|
|
1500
|
+
dt(e, t).forEach((o) => {
|
|
1496
1501
|
if (o.separator && !o.separator.disableDoubleClick) {
|
|
1497
1502
|
const r = o.items.find(
|
|
1498
1503
|
(i) => i.constraintProps.defaultSize !== void 0
|
|
1499
1504
|
);
|
|
1500
1505
|
if (r) {
|
|
1501
|
-
const i = r.constraintProps.defaultSize, s =
|
|
1506
|
+
const i = r.constraintProps.defaultSize, s = ft({
|
|
1502
1507
|
axisId: o.axis.id,
|
|
1503
1508
|
itemId: r.id
|
|
1504
1509
|
});
|
|
@@ -1507,31 +1512,31 @@ function zt(e) {
|
|
|
1507
1512
|
}
|
|
1508
1513
|
});
|
|
1509
1514
|
}
|
|
1510
|
-
function
|
|
1511
|
-
const
|
|
1512
|
-
for (const [
|
|
1513
|
-
if (
|
|
1515
|
+
function en(e) {
|
|
1516
|
+
const t = ye();
|
|
1517
|
+
for (const [n] of t)
|
|
1518
|
+
if (n.separators.some(
|
|
1514
1519
|
(o) => o.element === e
|
|
1515
1520
|
))
|
|
1516
|
-
return
|
|
1521
|
+
return n;
|
|
1517
1522
|
throw Error("Could not find parent Group for separator element");
|
|
1518
1523
|
}
|
|
1519
|
-
function
|
|
1524
|
+
function Ge({
|
|
1520
1525
|
axisId: e
|
|
1521
1526
|
}) {
|
|
1522
|
-
const
|
|
1523
|
-
const
|
|
1524
|
-
for (const [o, r] of
|
|
1527
|
+
const t = () => {
|
|
1528
|
+
const n = ye();
|
|
1529
|
+
for (const [o, r] of n)
|
|
1525
1530
|
if (o.id === e)
|
|
1526
1531
|
return { axis: o, ...r };
|
|
1527
1532
|
throw Error(`Could not find Group with id "${e}"`);
|
|
1528
1533
|
};
|
|
1529
1534
|
return {
|
|
1530
1535
|
getLayout() {
|
|
1531
|
-
const { defaultLayoutDeferred:
|
|
1532
|
-
return
|
|
1536
|
+
const { defaultLayoutDeferred: n, layout: o } = t();
|
|
1537
|
+
return n ? {} : o;
|
|
1533
1538
|
},
|
|
1534
|
-
setLayout(
|
|
1539
|
+
setLayout(n) {
|
|
1535
1540
|
const {
|
|
1536
1541
|
defaultLayoutDeferred: o,
|
|
1537
1542
|
derivedItemConstraints: r,
|
|
@@ -1539,45 +1544,49 @@ function Ne({
|
|
|
1539
1544
|
axisSize: s,
|
|
1540
1545
|
layout: l,
|
|
1541
1546
|
separatorToItems: a
|
|
1542
|
-
} =
|
|
1543
|
-
layout:
|
|
1547
|
+
} = t(), c = ge({
|
|
1548
|
+
layout: n,
|
|
1544
1549
|
itemConstraints: r
|
|
1545
1550
|
});
|
|
1546
|
-
return o ? l : (ie(l, c) ||
|
|
1551
|
+
return o ? l : (ie(l, c) || fe(i, {
|
|
1547
1552
|
defaultLayoutDeferred: o,
|
|
1548
1553
|
derivedItemConstraints: r,
|
|
1549
1554
|
axisSize: s,
|
|
1550
1555
|
layout: c,
|
|
1556
|
+
requestedAxisSize: s,
|
|
1557
|
+
requestedLayout: c,
|
|
1551
1558
|
separatorToItems: a
|
|
1552
1559
|
}), c);
|
|
1553
1560
|
}
|
|
1554
1561
|
};
|
|
1555
1562
|
}
|
|
1556
|
-
function
|
|
1557
|
-
const
|
|
1563
|
+
function we(e, t) {
|
|
1564
|
+
const n = en(e), o = se(n.id, !0), r = n.separators.find(
|
|
1558
1565
|
(d) => d.element === e
|
|
1559
1566
|
);
|
|
1560
|
-
|
|
1567
|
+
T(r, "Matching separator not found");
|
|
1561
1568
|
const i = o.separatorToItems.get(r);
|
|
1562
|
-
|
|
1563
|
-
const s = i.map((d) =>
|
|
1564
|
-
delta:
|
|
1569
|
+
T(i, "Matching panels not found");
|
|
1570
|
+
const s = i.map((d) => n.items.indexOf(d)), a = Ge({ axisId: n.id }).getLayout(), c = qe({
|
|
1571
|
+
delta: t,
|
|
1565
1572
|
initialLayout: a,
|
|
1566
1573
|
itemConstraints: o.derivedItemConstraints,
|
|
1567
1574
|
pivotIndices: s,
|
|
1568
1575
|
prevLayout: a,
|
|
1569
1576
|
trigger: "keyboard"
|
|
1570
|
-
}), u =
|
|
1577
|
+
}), u = ge({
|
|
1571
1578
|
layout: c,
|
|
1572
1579
|
itemConstraints: o.derivedItemConstraints
|
|
1573
1580
|
});
|
|
1574
|
-
ie(a, u) ||
|
|
1575
|
-
|
|
1581
|
+
ie(a, u) || fe(
|
|
1582
|
+
n,
|
|
1576
1583
|
{
|
|
1577
1584
|
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
1578
1585
|
derivedItemConstraints: o.derivedItemConstraints,
|
|
1579
1586
|
axisSize: o.axisSize,
|
|
1580
1587
|
layout: u,
|
|
1588
|
+
requestedAxisSize: o.axisSize,
|
|
1589
|
+
requestedLayout: u,
|
|
1581
1590
|
separatorToItems: o.separatorToItems
|
|
1582
1591
|
},
|
|
1583
1592
|
// Keyboard resizes (arrow keys, Home/End, Enter collapse/expand) originate
|
|
@@ -1587,59 +1596,59 @@ function be(e, n) {
|
|
|
1587
1596
|
{ isUserInteraction: !0 }
|
|
1588
1597
|
);
|
|
1589
1598
|
}
|
|
1590
|
-
function
|
|
1599
|
+
function Lt(e) {
|
|
1591
1600
|
if (e.defaultPrevented)
|
|
1592
1601
|
return;
|
|
1593
|
-
const
|
|
1594
|
-
if (!(
|
|
1595
|
-
(r) => r.element ===
|
|
1602
|
+
const t = e.currentTarget, n = en(t);
|
|
1603
|
+
if (!(n.disabled || n.separators.find(
|
|
1604
|
+
(r) => r.element === t
|
|
1596
1605
|
)?.disabled))
|
|
1597
1606
|
switch (e.key) {
|
|
1598
1607
|
case "ArrowDown": {
|
|
1599
|
-
e.preventDefault(),
|
|
1608
|
+
e.preventDefault(), n.orientation === "vertical" && we(t, 5);
|
|
1600
1609
|
break;
|
|
1601
1610
|
}
|
|
1602
1611
|
case "ArrowLeft": {
|
|
1603
|
-
e.preventDefault(),
|
|
1612
|
+
e.preventDefault(), n.orientation === "horizontal" && we(t, -5);
|
|
1604
1613
|
break;
|
|
1605
1614
|
}
|
|
1606
1615
|
case "ArrowRight": {
|
|
1607
|
-
e.preventDefault(),
|
|
1616
|
+
e.preventDefault(), n.orientation === "horizontal" && we(t, 5);
|
|
1608
1617
|
break;
|
|
1609
1618
|
}
|
|
1610
1619
|
case "ArrowUp": {
|
|
1611
|
-
e.preventDefault(),
|
|
1620
|
+
e.preventDefault(), n.orientation === "vertical" && we(t, -5);
|
|
1612
1621
|
break;
|
|
1613
1622
|
}
|
|
1614
1623
|
case "End": {
|
|
1615
|
-
e.preventDefault(),
|
|
1624
|
+
e.preventDefault(), we(t, 100);
|
|
1616
1625
|
break;
|
|
1617
1626
|
}
|
|
1618
1627
|
case "Enter": {
|
|
1619
1628
|
e.preventDefault();
|
|
1620
|
-
const r =
|
|
1621
|
-
(g) => g.element ===
|
|
1629
|
+
const r = se(n.id, !0), { derivedItemConstraints: i, layout: s, separatorToItems: l } = r, a = n.separators.find(
|
|
1630
|
+
(g) => g.element === t
|
|
1622
1631
|
);
|
|
1623
|
-
|
|
1632
|
+
T(a, "Matching separator not found");
|
|
1624
1633
|
const c = l.get(a);
|
|
1625
|
-
|
|
1634
|
+
T(c, "Matching panels not found");
|
|
1626
1635
|
const u = c[0], d = i.find(
|
|
1627
1636
|
(g) => g.itemId === u.id
|
|
1628
1637
|
);
|
|
1629
|
-
if (
|
|
1630
|
-
const g = s[u.id], m = d.collapsedSize === g ?
|
|
1631
|
-
|
|
1638
|
+
if (T(d, "Panel metadata not found"), d.collapsible) {
|
|
1639
|
+
const g = s[u.id], m = d.collapsedSize === g ? n.mutableState.expandedItemSizes[u.id] ?? d.minSize : d.collapsedSize;
|
|
1640
|
+
we(t, m - g);
|
|
1632
1641
|
}
|
|
1633
1642
|
break;
|
|
1634
1643
|
}
|
|
1635
1644
|
case "F6": {
|
|
1636
1645
|
e.preventDefault();
|
|
1637
|
-
const r =
|
|
1646
|
+
const r = n.separators.map(
|
|
1638
1647
|
(a) => a.element
|
|
1639
1648
|
), i = Array.from(r).findIndex(
|
|
1640
1649
|
(a) => a === e.currentTarget
|
|
1641
1650
|
);
|
|
1642
|
-
|
|
1651
|
+
T(i !== null, "Index not found");
|
|
1643
1652
|
const s = e.shiftKey ? i > 0 ? i - 1 : r.length - 1 : i + 1 < r.length ? i + 1 : 0;
|
|
1644
1653
|
r[s].focus({
|
|
1645
1654
|
preventScroll: !0
|
|
@@ -1647,35 +1656,35 @@ function It(e) {
|
|
|
1647
1656
|
break;
|
|
1648
1657
|
}
|
|
1649
1658
|
case "Home": {
|
|
1650
|
-
e.preventDefault(),
|
|
1659
|
+
e.preventDefault(), we(t, -100);
|
|
1651
1660
|
break;
|
|
1652
1661
|
}
|
|
1653
1662
|
}
|
|
1654
1663
|
}
|
|
1655
|
-
function
|
|
1656
|
-
const { element:
|
|
1657
|
-
return
|
|
1664
|
+
function Hn(e, t) {
|
|
1665
|
+
const { element: n, orientation: o, items: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
|
|
1666
|
+
return ct({
|
|
1658
1667
|
expandHitTargets: !1,
|
|
1659
1668
|
axis: e,
|
|
1660
1669
|
includeDisabled: !0
|
|
1661
1670
|
}).map(({ items: a, rect: c, separator: u }, d) => {
|
|
1662
1671
|
const g = r.indexOf(a[0]), m = s ? c.left + c.width / 2 : c.top + c.height / 2;
|
|
1663
1672
|
return {
|
|
1664
|
-
active:
|
|
1673
|
+
active: t.some((f) => {
|
|
1665
1674
|
if (f.axis !== e || f.items[0] !== a[0])
|
|
1666
1675
|
return !1;
|
|
1667
1676
|
if (u || f.separator)
|
|
1668
1677
|
return f.separator === u;
|
|
1669
1678
|
const S = s ? f.rect.left + f.rect.width / 2 : f.rect.top + f.rect.height / 2;
|
|
1670
|
-
return
|
|
1679
|
+
return Y(m, S);
|
|
1671
1680
|
}),
|
|
1672
1681
|
axis: e,
|
|
1673
1682
|
key: u ? `separator-${u.id}` : `panel-${a[0].id}-${d}`,
|
|
1674
1683
|
offset: 0,
|
|
1675
1684
|
itemIndex: g,
|
|
1676
1685
|
rect: new DOMRect(
|
|
1677
|
-
(s && !u ? m : c.left) - i.left -
|
|
1678
|
-
(!s && !u ? m : c.top) - i.top -
|
|
1686
|
+
(s && !u ? m : c.left) - i.left - n.clientLeft + n.scrollLeft,
|
|
1687
|
+
(!s && !u ? m : c.top) - i.top - n.clientTop + n.scrollTop,
|
|
1679
1688
|
s && !u ? 0 : c.width,
|
|
1680
1689
|
!s && !u ? 0 : c.height
|
|
1681
1690
|
),
|
|
@@ -1688,27 +1697,27 @@ function Ct(e) {
|
|
|
1688
1697
|
return;
|
|
1689
1698
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
1690
1699
|
return;
|
|
1691
|
-
const
|
|
1692
|
-
if (
|
|
1700
|
+
const t = ye(), n = dt(e, t);
|
|
1701
|
+
if (n.length === 0)
|
|
1693
1702
|
return;
|
|
1694
1703
|
const o = /* @__PURE__ */ new Map();
|
|
1695
1704
|
let r = !1;
|
|
1696
|
-
|
|
1705
|
+
n.forEach((s) => {
|
|
1697
1706
|
s.separator && (r || (r = !0, s.separator.element.focus({
|
|
1698
1707
|
// @ts-expect-error https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#browser_compatibility
|
|
1699
1708
|
focusVisible: !1,
|
|
1700
1709
|
preventScroll: !0
|
|
1701
1710
|
})));
|
|
1702
|
-
const l =
|
|
1711
|
+
const l = t.get(s.axis);
|
|
1703
1712
|
l && o.set(s.axis, l.layout);
|
|
1704
1713
|
});
|
|
1705
1714
|
const i = Array.from(o.keys()).flatMap(
|
|
1706
|
-
(s) => s.resizePreviewMode === "separator" ?
|
|
1715
|
+
(s) => s.resizePreviewMode === "separator" ? Hn(s, n) : []
|
|
1707
1716
|
);
|
|
1708
|
-
|
|
1717
|
+
ue({
|
|
1709
1718
|
cursorFlags: 0,
|
|
1710
1719
|
didPointerMove: !1,
|
|
1711
|
-
hitRegions:
|
|
1720
|
+
hitRegions: n,
|
|
1712
1721
|
initialLayoutMap: o,
|
|
1713
1722
|
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
1714
1723
|
previewLayoutMap: new Map(o),
|
|
@@ -1716,162 +1725,184 @@ function Ct(e) {
|
|
|
1716
1725
|
state: "active"
|
|
1717
1726
|
}), e.preventDefault();
|
|
1718
1727
|
}
|
|
1719
|
-
function
|
|
1720
|
-
const
|
|
1721
|
-
switch (
|
|
1728
|
+
function Rt(e) {
|
|
1729
|
+
const t = ye(), n = de();
|
|
1730
|
+
switch (n.state) {
|
|
1722
1731
|
case "active":
|
|
1723
|
-
|
|
1732
|
+
ut({
|
|
1724
1733
|
commit: !1,
|
|
1725
1734
|
document: e.currentTarget,
|
|
1726
1735
|
event: e,
|
|
1727
|
-
hitRegions:
|
|
1728
|
-
initialLayoutMap:
|
|
1729
|
-
mountedAxes:
|
|
1730
|
-
prevCursorFlags:
|
|
1736
|
+
hitRegions: n.hitRegions,
|
|
1737
|
+
initialLayoutMap: n.initialLayoutMap,
|
|
1738
|
+
mountedAxes: t,
|
|
1739
|
+
prevCursorFlags: n.cursorFlags
|
|
1731
1740
|
});
|
|
1732
1741
|
}
|
|
1733
1742
|
}
|
|
1734
|
-
function
|
|
1743
|
+
function Mt(e) {
|
|
1735
1744
|
if (e.defaultPrevented)
|
|
1736
1745
|
return;
|
|
1737
|
-
const
|
|
1738
|
-
switch (
|
|
1746
|
+
const t = de(), n = ye();
|
|
1747
|
+
switch (t.state) {
|
|
1739
1748
|
case "active": {
|
|
1740
1749
|
if (
|
|
1741
1750
|
// Skip this check for "pointerleave" events, else Firefox triggers a false positive (see #514)
|
|
1742
1751
|
e.buttons === 0
|
|
1743
1752
|
) {
|
|
1744
|
-
|
|
1745
|
-
const i =
|
|
1746
|
-
r.resizePreviewMode === "separator" && i && !ie(o, i.layout) &&
|
|
1747
|
-
|
|
1753
|
+
t.previewLayoutMap.forEach((o, r) => {
|
|
1754
|
+
const i = n.get(r);
|
|
1755
|
+
r.resizePreviewMode === "separator" && i && !ie(o, i.layout) && fe(r, {
|
|
1756
|
+
...i,
|
|
1757
|
+
layout: o,
|
|
1758
|
+
requestedAxisSize: i.axisSize,
|
|
1759
|
+
requestedLayout: o
|
|
1760
|
+
});
|
|
1761
|
+
}), ue({
|
|
1748
1762
|
cursorFlags: 0,
|
|
1749
1763
|
state: "inactive"
|
|
1750
|
-
}),
|
|
1751
|
-
if (!
|
|
1764
|
+
}), t.hitRegions.forEach((o) => {
|
|
1765
|
+
if (!n.has(o.axis))
|
|
1752
1766
|
return;
|
|
1753
|
-
const r =
|
|
1754
|
-
|
|
1767
|
+
const r = se(o.axis.id, !0);
|
|
1768
|
+
fe(o.axis, r, {
|
|
1755
1769
|
isUserInteraction: !0
|
|
1756
1770
|
});
|
|
1757
|
-
}),
|
|
1771
|
+
}), _e(e.currentTarget);
|
|
1758
1772
|
return;
|
|
1759
1773
|
}
|
|
1760
|
-
for (const o of
|
|
1774
|
+
for (const o of t.hitRegions)
|
|
1761
1775
|
if (o.separator) {
|
|
1762
1776
|
const { element: r } = o.separator;
|
|
1763
1777
|
r.isConnected && !r.hasPointerCapture?.(e.pointerId) && r.setPointerCapture?.(e.pointerId);
|
|
1764
1778
|
}
|
|
1765
|
-
|
|
1779
|
+
ut({
|
|
1766
1780
|
commit: !1,
|
|
1767
1781
|
document: e.currentTarget,
|
|
1768
1782
|
event: e,
|
|
1769
|
-
hitRegions:
|
|
1770
|
-
initialLayoutMap:
|
|
1771
|
-
mountedAxes:
|
|
1772
|
-
pointerDownAtPoint:
|
|
1773
|
-
prevCursorFlags:
|
|
1783
|
+
hitRegions: t.hitRegions,
|
|
1784
|
+
initialLayoutMap: t.initialLayoutMap,
|
|
1785
|
+
mountedAxes: n,
|
|
1786
|
+
pointerDownAtPoint: t.pointerDownAtPoint,
|
|
1787
|
+
prevCursorFlags: t.cursorFlags
|
|
1774
1788
|
});
|
|
1775
1789
|
break;
|
|
1776
1790
|
}
|
|
1777
1791
|
default: {
|
|
1778
|
-
const o =
|
|
1779
|
-
o.length === 0 ?
|
|
1792
|
+
const o = dt(e, n);
|
|
1793
|
+
o.length === 0 ? t.state !== "inactive" && ue({
|
|
1780
1794
|
cursorFlags: 0,
|
|
1781
1795
|
state: "inactive"
|
|
1782
|
-
}) :
|
|
1796
|
+
}) : ue({
|
|
1783
1797
|
cursorFlags: 0,
|
|
1784
1798
|
hitRegions: o,
|
|
1785
1799
|
state: "hover"
|
|
1786
|
-
}),
|
|
1800
|
+
}), _e(e.currentTarget);
|
|
1787
1801
|
break;
|
|
1788
1802
|
}
|
|
1789
1803
|
}
|
|
1790
1804
|
}
|
|
1791
|
-
function
|
|
1805
|
+
function Et(e) {
|
|
1792
1806
|
if (e.relatedTarget instanceof HTMLIFrameElement)
|
|
1793
|
-
switch (
|
|
1807
|
+
switch (de().state) {
|
|
1794
1808
|
case "hover":
|
|
1795
|
-
|
|
1809
|
+
ue({
|
|
1796
1810
|
cursorFlags: 0,
|
|
1797
1811
|
state: "inactive"
|
|
1798
1812
|
});
|
|
1799
1813
|
}
|
|
1800
1814
|
}
|
|
1801
|
-
function
|
|
1815
|
+
function Pt(e) {
|
|
1802
1816
|
if (e.defaultPrevented)
|
|
1803
1817
|
return;
|
|
1804
1818
|
if (e.pointerType === "mouse" && e.button > 0)
|
|
1805
1819
|
return;
|
|
1806
|
-
|
|
1820
|
+
Zt(
|
|
1807
1821
|
e.currentTarget,
|
|
1808
1822
|
e
|
|
1809
1823
|
) && e.preventDefault();
|
|
1810
1824
|
}
|
|
1811
|
-
function
|
|
1812
|
-
let
|
|
1825
|
+
function jn(e) {
|
|
1826
|
+
let t = 0, n = 0;
|
|
1813
1827
|
const o = {};
|
|
1814
1828
|
for (const i of e)
|
|
1815
1829
|
if (i.defaultSize !== void 0) {
|
|
1816
|
-
|
|
1830
|
+
t++;
|
|
1817
1831
|
const s = X(i.defaultSize);
|
|
1818
|
-
|
|
1832
|
+
n += s, o[i.itemId] = s;
|
|
1819
1833
|
} else
|
|
1820
1834
|
o[i.itemId] = void 0;
|
|
1821
|
-
const r = e.length -
|
|
1835
|
+
const r = e.length - t;
|
|
1822
1836
|
if (r !== 0) {
|
|
1823
|
-
const i = X((100 -
|
|
1837
|
+
const i = X((100 - n) / r);
|
|
1824
1838
|
for (const s of e)
|
|
1825
1839
|
s.defaultSize === void 0 && (o[s.itemId] = i);
|
|
1826
1840
|
}
|
|
1827
1841
|
return o;
|
|
1828
1842
|
}
|
|
1829
|
-
function
|
|
1830
|
-
const
|
|
1831
|
-
if (
|
|
1843
|
+
function Un(e, t) {
|
|
1844
|
+
const n = e.map((r) => r.id), o = Object.keys(t);
|
|
1845
|
+
if (n.length !== o.length)
|
|
1832
1846
|
return !1;
|
|
1833
|
-
for (const r of
|
|
1847
|
+
for (const r of n)
|
|
1834
1848
|
if (!o.includes(r))
|
|
1835
1849
|
return !1;
|
|
1836
1850
|
return !0;
|
|
1837
1851
|
}
|
|
1838
|
-
function
|
|
1852
|
+
function kt({
|
|
1839
1853
|
axis: e,
|
|
1840
|
-
itemConstraints:
|
|
1854
|
+
itemConstraints: t
|
|
1841
1855
|
}) {
|
|
1842
|
-
const
|
|
1843
|
-
return e.mutableState.layouts[
|
|
1856
|
+
const n = e.items.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
|
|
1857
|
+
return e.mutableState.layouts[n] ?? (o && Un(e.items, o) ? o : jn(t));
|
|
1844
1858
|
}
|
|
1845
|
-
function
|
|
1846
|
-
|
|
1859
|
+
function $t({
|
|
1860
|
+
itemIds: e,
|
|
1861
|
+
layout: t
|
|
1862
|
+
}) {
|
|
1863
|
+
return ge({
|
|
1864
|
+
layout: t,
|
|
1865
|
+
itemConstraints: e.map((n) => ({
|
|
1866
|
+
collapsedSize: 0,
|
|
1867
|
+
collapsible: !1,
|
|
1868
|
+
defaultSize: void 0,
|
|
1869
|
+
disabled: void 0,
|
|
1870
|
+
itemId: n,
|
|
1871
|
+
maxSize: 100,
|
|
1872
|
+
minSize: 0
|
|
1873
|
+
}))
|
|
1874
|
+
});
|
|
1875
|
+
}
|
|
1876
|
+
function Wn(e, t, n) {
|
|
1877
|
+
if (!n[0])
|
|
1847
1878
|
return;
|
|
1848
|
-
const r = e.items.find((c) => c.element ===
|
|
1879
|
+
const r = e.items.find((c) => c.element === t);
|
|
1849
1880
|
if (!r || !r.onResize)
|
|
1850
1881
|
return;
|
|
1851
|
-
const i =
|
|
1882
|
+
const i = ke({ axis: e }), s = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, l = r.mutableValues.prevSize, a = {
|
|
1852
1883
|
asPercentage: X(s / i * 100),
|
|
1853
1884
|
inPixels: s
|
|
1854
1885
|
};
|
|
1855
1886
|
r.mutableValues.prevSize = a, r.onResize(a, r.id, l);
|
|
1856
1887
|
}
|
|
1857
|
-
function
|
|
1858
|
-
if (Object.keys(e).length !== Object.keys(
|
|
1888
|
+
function tn(e, t) {
|
|
1889
|
+
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1859
1890
|
return !1;
|
|
1860
1891
|
for (const o in e)
|
|
1861
|
-
if (e[o] !==
|
|
1892
|
+
if (e[o] !== t[o])
|
|
1862
1893
|
return !1;
|
|
1863
1894
|
return !0;
|
|
1864
1895
|
}
|
|
1865
|
-
function
|
|
1866
|
-
return e.length !==
|
|
1896
|
+
function Yn(e, t) {
|
|
1897
|
+
return e.length !== t.length ? !1 : e.every((n, o) => tn(n, t[o]));
|
|
1867
1898
|
}
|
|
1868
|
-
function
|
|
1899
|
+
function Kn({
|
|
1869
1900
|
axis: e,
|
|
1870
|
-
nextAxisSize:
|
|
1871
|
-
prevAxisSize:
|
|
1901
|
+
nextAxisSize: t,
|
|
1902
|
+
prevAxisSize: n,
|
|
1872
1903
|
prevLayout: o
|
|
1873
1904
|
}) {
|
|
1874
|
-
if (
|
|
1905
|
+
if (n <= 0 || t <= 0 || n === t)
|
|
1875
1906
|
return o;
|
|
1876
1907
|
let r = 0, i = 0, s = !1;
|
|
1877
1908
|
const l = /* @__PURE__ */ new Map(), a = [];
|
|
@@ -1880,8 +1911,8 @@ function qn({
|
|
|
1880
1911
|
switch (d.constraintProps.groupResizeBehavior) {
|
|
1881
1912
|
case "preserve-pixel-size": {
|
|
1882
1913
|
s = !0;
|
|
1883
|
-
const m = g / 100 *
|
|
1884
|
-
m /
|
|
1914
|
+
const m = g / 100 * n, y = X(
|
|
1915
|
+
m / t * 100
|
|
1885
1916
|
);
|
|
1886
1917
|
l.set(d.id, y), r += y;
|
|
1887
1918
|
break;
|
|
@@ -1912,180 +1943,194 @@ function qn({
|
|
|
1912
1943
|
}
|
|
1913
1944
|
return u;
|
|
1914
1945
|
}
|
|
1915
|
-
const
|
|
1916
|
-
function
|
|
1917
|
-
let
|
|
1918
|
-
|
|
1946
|
+
const Le = /* @__PURE__ */ new Map();
|
|
1947
|
+
function nn(e) {
|
|
1948
|
+
let t = !0;
|
|
1949
|
+
T(
|
|
1919
1950
|
e.element.ownerDocument.defaultView,
|
|
1920
1951
|
"Cannot register an unmounted Group"
|
|
1921
1952
|
);
|
|
1922
|
-
const
|
|
1953
|
+
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = new n((m) => {
|
|
1923
1954
|
for (const y of m) {
|
|
1924
1955
|
const { borderBoxSize: f, target: S } = y;
|
|
1925
1956
|
if (S === e.element) {
|
|
1926
|
-
if (
|
|
1927
|
-
const
|
|
1928
|
-
if (
|
|
1957
|
+
if (t) {
|
|
1958
|
+
const p = ke({ axis: e });
|
|
1959
|
+
if (p === 0)
|
|
1929
1960
|
return;
|
|
1930
|
-
const
|
|
1931
|
-
if (!
|
|
1961
|
+
const h = se(e.id);
|
|
1962
|
+
if (!h)
|
|
1932
1963
|
return;
|
|
1933
|
-
const
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1964
|
+
const I = rt(e);
|
|
1965
|
+
let x = h.requestedAxisSize, C = h.requestedLayout;
|
|
1966
|
+
h.defaultLayoutDeferred && (x = p, C = $t({
|
|
1967
|
+
itemIds: e.items.map(({ id: b }) => b),
|
|
1968
|
+
layout: kt({
|
|
1969
|
+
axis: e,
|
|
1970
|
+
itemConstraints: I
|
|
1971
|
+
})
|
|
1972
|
+
}));
|
|
1973
|
+
const N = Kn({
|
|
1937
1974
|
axis: e,
|
|
1938
|
-
nextAxisSize:
|
|
1939
|
-
prevAxisSize:
|
|
1940
|
-
prevLayout:
|
|
1941
|
-
}),
|
|
1942
|
-
layout:
|
|
1943
|
-
itemConstraints:
|
|
1975
|
+
nextAxisSize: p,
|
|
1976
|
+
prevAxisSize: x,
|
|
1977
|
+
prevLayout: C
|
|
1978
|
+
}), D = ge({
|
|
1979
|
+
layout: N,
|
|
1980
|
+
itemConstraints: I
|
|
1944
1981
|
});
|
|
1945
|
-
if (!
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
) &&
|
|
1982
|
+
if (!h.defaultLayoutDeferred && ie(h.layout, D) && Yn(
|
|
1983
|
+
h.derivedItemConstraints,
|
|
1984
|
+
I
|
|
1985
|
+
) && h.axisSize === p)
|
|
1949
1986
|
continue;
|
|
1950
|
-
|
|
1987
|
+
fe(e, {
|
|
1951
1988
|
defaultLayoutDeferred: !1,
|
|
1952
|
-
derivedItemConstraints:
|
|
1953
|
-
axisSize:
|
|
1954
|
-
layout:
|
|
1955
|
-
|
|
1989
|
+
derivedItemConstraints: I,
|
|
1990
|
+
axisSize: p,
|
|
1991
|
+
layout: D,
|
|
1992
|
+
requestedAxisSize: x,
|
|
1993
|
+
requestedLayout: C,
|
|
1994
|
+
separatorToItems: h.separatorToItems
|
|
1956
1995
|
});
|
|
1957
1996
|
}
|
|
1958
1997
|
} else
|
|
1959
|
-
|
|
1998
|
+
Wn(e, S, f);
|
|
1960
1999
|
}
|
|
1961
2000
|
});
|
|
1962
2001
|
i.observe(e.element), e.items.forEach((m) => {
|
|
1963
|
-
|
|
2002
|
+
T(
|
|
1964
2003
|
!o.has(m.id),
|
|
1965
2004
|
`Panel ids must be unique; id "${m.id}" was used more than once`
|
|
1966
2005
|
), o.add(m.id), m.onResize && i.observe(m.element);
|
|
1967
2006
|
});
|
|
1968
|
-
const s =
|
|
2007
|
+
const s = ke({ axis: e }), l = rt(e), a = kt({
|
|
1969
2008
|
axis: e,
|
|
1970
2009
|
itemConstraints: l
|
|
1971
|
-
}), c =
|
|
2010
|
+
}), c = ge({
|
|
1972
2011
|
layout: a,
|
|
1973
2012
|
itemConstraints: l
|
|
1974
2013
|
}), u = e.element.ownerDocument;
|
|
1975
|
-
|
|
2014
|
+
Le.set(
|
|
1976
2015
|
u,
|
|
1977
|
-
(
|
|
2016
|
+
(Le.get(u) ?? 0) + 1
|
|
1978
2017
|
);
|
|
1979
2018
|
const d = /* @__PURE__ */ new Map();
|
|
1980
|
-
return
|
|
2019
|
+
return ct({ axis: e, includeDisabled: !0 }).forEach((m) => {
|
|
1981
2020
|
m.separator && d.set(m.separator, m.items);
|
|
1982
|
-
}),
|
|
2021
|
+
}), fe(e, {
|
|
1983
2022
|
defaultLayoutDeferred: s === 0,
|
|
1984
2023
|
derivedItemConstraints: l,
|
|
1985
2024
|
axisSize: s,
|
|
1986
2025
|
layout: c,
|
|
2026
|
+
requestedAxisSize: s,
|
|
2027
|
+
requestedLayout: $t({
|
|
2028
|
+
itemIds: e.items.map(({ id: m }) => m),
|
|
2029
|
+
layout: a
|
|
2030
|
+
}),
|
|
1987
2031
|
separatorToItems: d
|
|
1988
2032
|
}), e.separators.forEach((m) => {
|
|
1989
|
-
|
|
2033
|
+
T(
|
|
1990
2034
|
!r.has(m.id),
|
|
1991
2035
|
`Separator ids must be unique; id "${m.id}" was used more than once`
|
|
1992
|
-
), r.add(m.id), m.element.addEventListener("keydown",
|
|
1993
|
-
}),
|
|
1994
|
-
|
|
2036
|
+
), r.add(m.id), m.element.addEventListener("keydown", Lt);
|
|
2037
|
+
}), Le.get(u) === 1 && (u.addEventListener("contextmenu", bt, !0), u.addEventListener("dblclick", It, !0), u.addEventListener("pointerdown", Ct, !0), u.addEventListener("pointerleave", Rt), u.addEventListener("pointermove", Mt), u.addEventListener("pointerout", Et), u.addEventListener("pointerup", Pt, !0)), function() {
|
|
2038
|
+
t = !1, Le.set(
|
|
1995
2039
|
u,
|
|
1996
|
-
Math.max(0, (
|
|
1997
|
-
),
|
|
1998
|
-
y.element.removeEventListener("keydown",
|
|
1999
|
-
}),
|
|
2040
|
+
Math.max(0, (Le.get(u) ?? 0) - 1)
|
|
2041
|
+
), An(e), zn(e) && _e(u), e.separators.forEach((y) => {
|
|
2042
|
+
y.element.removeEventListener("keydown", Lt);
|
|
2043
|
+
}), Le.get(u) || (u.removeEventListener(
|
|
2000
2044
|
"contextmenu",
|
|
2001
|
-
|
|
2045
|
+
bt,
|
|
2002
2046
|
!0
|
|
2003
2047
|
), u.removeEventListener(
|
|
2004
2048
|
"dblclick",
|
|
2005
|
-
|
|
2049
|
+
It,
|
|
2006
2050
|
!0
|
|
2007
2051
|
), u.removeEventListener(
|
|
2008
2052
|
"pointerdown",
|
|
2009
2053
|
Ct,
|
|
2010
2054
|
!0
|
|
2011
|
-
), u.removeEventListener("pointerleave",
|
|
2055
|
+
), u.removeEventListener("pointerleave", Rt), u.removeEventListener("pointermove", Mt), u.removeEventListener("pointerout", Et), u.removeEventListener("pointerup", Pt, !0)), i.disconnect();
|
|
2012
2056
|
};
|
|
2013
2057
|
}
|
|
2014
|
-
function
|
|
2058
|
+
function on({
|
|
2015
2059
|
derivedItemConstraints: e,
|
|
2016
|
-
axis:
|
|
2017
|
-
layout:
|
|
2018
|
-
prevLayout: o
|
|
2060
|
+
axis: t,
|
|
2061
|
+
layout: n,
|
|
2062
|
+
prevLayout: o,
|
|
2063
|
+
requestedLayout: r
|
|
2019
2064
|
}) {
|
|
2020
|
-
const
|
|
2021
|
-
|
|
2022
|
-
if (
|
|
2023
|
-
const
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
),
|
|
2027
|
-
|
|
2028
|
-
o[
|
|
2065
|
+
const i = t.items.map(({ id: s }) => s).join(",");
|
|
2066
|
+
t.mutableState.layouts[i] = r, o && e.forEach((s) => {
|
|
2067
|
+
if (s.collapsible) {
|
|
2068
|
+
const l = Y(
|
|
2069
|
+
s.collapsedSize,
|
|
2070
|
+
n[s.itemId]
|
|
2071
|
+
), a = Y(
|
|
2072
|
+
s.collapsedSize,
|
|
2073
|
+
o[s.itemId]
|
|
2029
2074
|
);
|
|
2030
|
-
|
|
2075
|
+
l && !a && (t.mutableState.expandedItemSizes[s.itemId] = o[s.itemId]);
|
|
2031
2076
|
}
|
|
2032
2077
|
});
|
|
2033
2078
|
}
|
|
2034
|
-
function
|
|
2035
|
-
const [e,
|
|
2036
|
-
return [e,
|
|
2079
|
+
function rn() {
|
|
2080
|
+
const [e, t] = pe({}), n = re(() => t({}), []);
|
|
2081
|
+
return [e, n];
|
|
2037
2082
|
}
|
|
2038
|
-
function
|
|
2039
|
-
const
|
|
2083
|
+
function Je(e) {
|
|
2084
|
+
const t = q({ ...e });
|
|
2040
2085
|
return ne(() => {
|
|
2041
|
-
for (const
|
|
2042
|
-
|
|
2043
|
-
}, [e]),
|
|
2086
|
+
for (const n in e)
|
|
2087
|
+
t.current[n] = e[n];
|
|
2088
|
+
}, [e]), t.current;
|
|
2044
2089
|
}
|
|
2045
|
-
const
|
|
2046
|
-
function
|
|
2090
|
+
const mt = Gt(null);
|
|
2091
|
+
function Xn({
|
|
2047
2092
|
layout: e,
|
|
2048
|
-
itemConstraints:
|
|
2049
|
-
itemId:
|
|
2093
|
+
itemConstraints: t,
|
|
2094
|
+
itemId: n,
|
|
2050
2095
|
itemIndex: o
|
|
2051
2096
|
}) {
|
|
2052
2097
|
let r, i;
|
|
2053
|
-
const s = e[
|
|
2054
|
-
(a) => a.itemId ===
|
|
2098
|
+
const s = e[n], l = t.find(
|
|
2099
|
+
(a) => a.itemId === n
|
|
2055
2100
|
);
|
|
2056
2101
|
if (l) {
|
|
2057
2102
|
const a = l.maxSize, c = l.collapsible ? l.collapsedSize : l.minSize, u = [o, o + 1];
|
|
2058
|
-
i =
|
|
2059
|
-
layout:
|
|
2103
|
+
i = ge({
|
|
2104
|
+
layout: qe({
|
|
2060
2105
|
delta: c - s,
|
|
2061
2106
|
initialLayout: e,
|
|
2062
|
-
itemConstraints:
|
|
2107
|
+
itemConstraints: t,
|
|
2063
2108
|
pivotIndices: u,
|
|
2064
2109
|
prevLayout: e
|
|
2065
2110
|
}),
|
|
2066
|
-
itemConstraints:
|
|
2067
|
-
})[
|
|
2068
|
-
layout:
|
|
2111
|
+
itemConstraints: t
|
|
2112
|
+
})[n], r = ge({
|
|
2113
|
+
layout: qe({
|
|
2069
2114
|
delta: a - s,
|
|
2070
2115
|
initialLayout: e,
|
|
2071
|
-
itemConstraints:
|
|
2116
|
+
itemConstraints: t,
|
|
2072
2117
|
pivotIndices: u,
|
|
2073
2118
|
prevLayout: e
|
|
2074
2119
|
}),
|
|
2075
|
-
itemConstraints:
|
|
2076
|
-
})[
|
|
2120
|
+
itemConstraints: t
|
|
2121
|
+
})[n];
|
|
2077
2122
|
}
|
|
2078
2123
|
return {
|
|
2079
|
-
valueControls:
|
|
2124
|
+
valueControls: n,
|
|
2080
2125
|
valueMax: r,
|
|
2081
2126
|
valueMin: i,
|
|
2082
2127
|
valueNow: s
|
|
2083
2128
|
};
|
|
2084
2129
|
}
|
|
2085
|
-
function
|
|
2130
|
+
function sn({
|
|
2086
2131
|
attributes: e,
|
|
2087
|
-
axisId:
|
|
2088
|
-
axisOrientation:
|
|
2132
|
+
axisId: t,
|
|
2133
|
+
axisOrientation: n,
|
|
2089
2134
|
children: o,
|
|
2090
2135
|
className: r,
|
|
2091
2136
|
disableCursor: i,
|
|
@@ -2100,65 +2145,65 @@ function on({
|
|
|
2100
2145
|
style: y,
|
|
2101
2146
|
styleDefaults: f,
|
|
2102
2147
|
tabIndex: S = 0,
|
|
2103
|
-
updateSeparatorProps:
|
|
2148
|
+
updateSeparatorProps: p
|
|
2104
2149
|
}) {
|
|
2105
|
-
const
|
|
2150
|
+
const h = Je({
|
|
2106
2151
|
disabled: s,
|
|
2107
2152
|
disableDoubleClick: l,
|
|
2108
2153
|
children: o,
|
|
2109
2154
|
className: r,
|
|
2110
2155
|
preview: d,
|
|
2111
2156
|
style: y
|
|
2112
|
-
}), [
|
|
2157
|
+
}), [I, x] = pe({}), [C, N] = pe("inactive"), [D, b] = pe(!1), w = q(null), v = q(null), $ = Ve(w, a), O = n === "horizontal" ? "vertical" : "horizontal";
|
|
2113
2158
|
ne(() => {
|
|
2114
|
-
const
|
|
2115
|
-
if (
|
|
2116
|
-
const
|
|
2117
|
-
disabled:
|
|
2118
|
-
disableDoubleClick:
|
|
2119
|
-
element:
|
|
2159
|
+
const P = w.current;
|
|
2160
|
+
if (P !== null) {
|
|
2161
|
+
const z = {
|
|
2162
|
+
disabled: h.disabled,
|
|
2163
|
+
disableDoubleClick: h.disableDoubleClick,
|
|
2164
|
+
element: P,
|
|
2120
2165
|
id: c,
|
|
2121
2166
|
get children() {
|
|
2122
|
-
return
|
|
2167
|
+
return h.children;
|
|
2123
2168
|
},
|
|
2124
2169
|
get className() {
|
|
2125
|
-
return
|
|
2170
|
+
return h.className;
|
|
2126
2171
|
},
|
|
2127
2172
|
get preview() {
|
|
2128
|
-
return
|
|
2173
|
+
return h.preview;
|
|
2129
2174
|
},
|
|
2130
2175
|
get style() {
|
|
2131
|
-
return
|
|
2176
|
+
return h.style;
|
|
2132
2177
|
}
|
|
2133
2178
|
};
|
|
2134
|
-
v.current =
|
|
2135
|
-
const
|
|
2136
|
-
(
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
(
|
|
2140
|
-
) ?
|
|
2179
|
+
v.current = z;
|
|
2180
|
+
const M = g(z), B = jt(
|
|
2181
|
+
(H) => {
|
|
2182
|
+
N(
|
|
2183
|
+
H.next.state !== "inactive" && H.next.hitRegions.some(
|
|
2184
|
+
(Z) => Z.separator === z || (u?.(Z) ?? !1)
|
|
2185
|
+
) ? H.next.state : "inactive"
|
|
2141
2186
|
);
|
|
2142
2187
|
}
|
|
2143
|
-
), J =
|
|
2144
|
-
|
|
2145
|
-
(
|
|
2146
|
-
const { derivedItemConstraints:
|
|
2147
|
-
if (
|
|
2148
|
-
const
|
|
2149
|
-
(
|
|
2150
|
-
), { layoutStrategy: k } =
|
|
2151
|
-
|
|
2152
|
-
...
|
|
2153
|
-
layout:
|
|
2154
|
-
itemConstraints:
|
|
2155
|
-
itemId:
|
|
2156
|
-
itemIndex:
|
|
2188
|
+
), J = Fe(
|
|
2189
|
+
t,
|
|
2190
|
+
(H) => {
|
|
2191
|
+
const { derivedItemConstraints: Z, layout: Se, separatorToItems: ze } = H.next, Ie = ze.get(z);
|
|
2192
|
+
if (Ie) {
|
|
2193
|
+
const ve = Ie[0], L = Z.findIndex(
|
|
2194
|
+
(_) => _.itemId === ve.id
|
|
2195
|
+
), { layoutStrategy: k } = H.axis;
|
|
2196
|
+
x({
|
|
2197
|
+
...Xn({
|
|
2198
|
+
layout: Se,
|
|
2199
|
+
itemConstraints: Z,
|
|
2200
|
+
itemId: ve.id,
|
|
2201
|
+
itemIndex: L
|
|
2157
2202
|
}),
|
|
2158
2203
|
// Items without DOM elements of their own (e.g. Grid tracks) control other elements
|
|
2159
2204
|
...k?.getItemAriaControls && {
|
|
2160
2205
|
valueControls: k.getItemAriaControls(
|
|
2161
|
-
|
|
2206
|
+
ve.id
|
|
2162
2207
|
)
|
|
2163
2208
|
}
|
|
2164
2209
|
});
|
|
@@ -2166,51 +2211,51 @@ function on({
|
|
|
2166
2211
|
}
|
|
2167
2212
|
);
|
|
2168
2213
|
return () => {
|
|
2169
|
-
v.current = null,
|
|
2214
|
+
v.current = null, B(), J(), M();
|
|
2170
2215
|
};
|
|
2171
2216
|
}
|
|
2172
|
-
}, [
|
|
2173
|
-
const
|
|
2174
|
-
|
|
2217
|
+
}, [t, c, u, g, h]), ne(() => {
|
|
2218
|
+
const P = v.current;
|
|
2219
|
+
P && wn(P);
|
|
2175
2220
|
}, [d]), Be(() => {
|
|
2176
|
-
|
|
2177
|
-
}, [s, l, c,
|
|
2178
|
-
let
|
|
2179
|
-
s && !i && (
|
|
2180
|
-
let
|
|
2221
|
+
p(c, { disabled: s, disableDoubleClick: l });
|
|
2222
|
+
}, [s, l, c, p]);
|
|
2223
|
+
let R;
|
|
2224
|
+
s && !i && (R = "not-allowed");
|
|
2225
|
+
let E;
|
|
2181
2226
|
if (s)
|
|
2182
|
-
|
|
2227
|
+
E = "disabled";
|
|
2183
2228
|
else
|
|
2184
|
-
switch (
|
|
2229
|
+
switch (C) {
|
|
2185
2230
|
case "active": {
|
|
2186
|
-
|
|
2231
|
+
E = "active";
|
|
2187
2232
|
break;
|
|
2188
2233
|
}
|
|
2189
2234
|
default:
|
|
2190
|
-
|
|
2235
|
+
D ? E = "focus" : E = C;
|
|
2191
2236
|
}
|
|
2192
|
-
return /* @__PURE__ */
|
|
2237
|
+
return /* @__PURE__ */ K(
|
|
2193
2238
|
"div",
|
|
2194
2239
|
{
|
|
2195
2240
|
...e,
|
|
2196
|
-
"aria-controls":
|
|
2241
|
+
"aria-controls": I.valueControls,
|
|
2197
2242
|
"aria-disabled": s || void 0,
|
|
2198
|
-
"aria-orientation":
|
|
2199
|
-
"aria-valuemax":
|
|
2200
|
-
"aria-valuemin":
|
|
2201
|
-
"aria-valuenow":
|
|
2243
|
+
"aria-orientation": O,
|
|
2244
|
+
"aria-valuemax": I.valueMax,
|
|
2245
|
+
"aria-valuemin": I.valueMin,
|
|
2246
|
+
"aria-valuenow": I.valueNow,
|
|
2202
2247
|
children: o,
|
|
2203
2248
|
className: r,
|
|
2204
|
-
"data-separator":
|
|
2249
|
+
"data-separator": E,
|
|
2205
2250
|
"data-testid": c,
|
|
2206
2251
|
id: c,
|
|
2207
2252
|
onBlur: () => b(!1),
|
|
2208
2253
|
onFocus: () => b(!0),
|
|
2209
|
-
ref:
|
|
2254
|
+
ref: $,
|
|
2210
2255
|
role: "separator",
|
|
2211
2256
|
style: {
|
|
2212
2257
|
...f,
|
|
2213
|
-
cursor:
|
|
2258
|
+
cursor: R,
|
|
2214
2259
|
...y,
|
|
2215
2260
|
...m,
|
|
2216
2261
|
// Inform the browser that the library is handling touch events for this element
|
|
@@ -2221,10 +2266,10 @@ function on({
|
|
|
2221
2266
|
}
|
|
2222
2267
|
);
|
|
2223
2268
|
}
|
|
2224
|
-
function
|
|
2269
|
+
function At({
|
|
2225
2270
|
axis: e,
|
|
2226
|
-
children:
|
|
2227
|
-
className:
|
|
2271
|
+
children: t,
|
|
2272
|
+
className: n,
|
|
2228
2273
|
crossSpan: o,
|
|
2229
2274
|
crossStart: r,
|
|
2230
2275
|
disabled: i,
|
|
@@ -2232,7 +2277,7 @@ function kt({
|
|
|
2232
2277
|
index: l,
|
|
2233
2278
|
style: a
|
|
2234
2279
|
}) {
|
|
2235
|
-
const c =
|
|
2280
|
+
const c = $e(void 0), {
|
|
2236
2281
|
getDisableCursor: u,
|
|
2237
2282
|
getResizeAxisId: d,
|
|
2238
2283
|
gutters: g,
|
|
@@ -2240,17 +2285,17 @@ function kt({
|
|
|
2240
2285
|
separatorPlacements: y,
|
|
2241
2286
|
trackCounts: f,
|
|
2242
2287
|
updateSeparatorProps: S
|
|
2243
|
-
} =
|
|
2244
|
-
let
|
|
2288
|
+
} = Bt(), p = d(e), h = e === "column" ? "row" : "column", I = f[h], x = !!i || !st(l, f[e]);
|
|
2289
|
+
let C = !0;
|
|
2245
2290
|
for (const v of y.values())
|
|
2246
2291
|
if (v.axis === e && v.index === l && !v.disabled && v.crossStart < r) {
|
|
2247
|
-
|
|
2292
|
+
C = !1;
|
|
2248
2293
|
break;
|
|
2249
2294
|
}
|
|
2250
|
-
const
|
|
2251
|
-
(v) => v.axis.id ===
|
|
2252
|
-
[
|
|
2253
|
-
),
|
|
2295
|
+
const N = re(
|
|
2296
|
+
(v) => v.axis.id === p && v.axis.items.indexOf(v.items[1]) === l,
|
|
2297
|
+
[p, l]
|
|
2298
|
+
), D = re(
|
|
2254
2299
|
(v) => m(
|
|
2255
2300
|
{
|
|
2256
2301
|
axis: e,
|
|
@@ -2262,72 +2307,72 @@ function kt({
|
|
|
2262
2307
|
v
|
|
2263
2308
|
),
|
|
2264
2309
|
[e, o, r, i, l, m]
|
|
2265
|
-
), b =
|
|
2266
|
-
crossCount:
|
|
2310
|
+
), b = hn(l), w = gn({
|
|
2311
|
+
crossCount: I,
|
|
2267
2312
|
crossSpan: o,
|
|
2268
2313
|
crossStart: r,
|
|
2269
|
-
hasGutters: g[
|
|
2314
|
+
hasGutters: g[h]
|
|
2270
2315
|
});
|
|
2271
|
-
return /* @__PURE__ */
|
|
2272
|
-
|
|
2316
|
+
return /* @__PURE__ */ K(
|
|
2317
|
+
sn,
|
|
2273
2318
|
{
|
|
2274
|
-
axisId:
|
|
2319
|
+
axisId: p,
|
|
2275
2320
|
axisOrientation: e === "column" ? "horizontal" : "vertical",
|
|
2276
|
-
className:
|
|
2321
|
+
className: n,
|
|
2277
2322
|
disableCursor: u(),
|
|
2278
|
-
disabled:
|
|
2323
|
+
disabled: x,
|
|
2279
2324
|
disableDoubleClick: void 0,
|
|
2280
2325
|
elementRef: s,
|
|
2281
2326
|
id: c,
|
|
2282
|
-
isSharedHitRegion:
|
|
2283
|
-
registerSeparator:
|
|
2327
|
+
isSharedHitRegion: N,
|
|
2328
|
+
registerSeparator: D,
|
|
2284
2329
|
requiredStyle: {
|
|
2285
|
-
gridColumn: e === "column" ? b :
|
|
2286
|
-
gridRow: e === "row" ? b :
|
|
2330
|
+
gridColumn: e === "column" ? b : w,
|
|
2331
|
+
gridRow: e === "row" ? b : w
|
|
2287
2332
|
},
|
|
2288
2333
|
style: a,
|
|
2289
|
-
tabIndex:
|
|
2334
|
+
tabIndex: C ? 0 : -1,
|
|
2290
2335
|
updateSeparatorProps: S,
|
|
2291
|
-
children:
|
|
2336
|
+
children: t
|
|
2292
2337
|
}
|
|
2293
2338
|
);
|
|
2294
2339
|
}
|
|
2295
|
-
function
|
|
2296
|
-
const { children:
|
|
2297
|
-
return e.type === "column" ? /* @__PURE__ */
|
|
2298
|
-
|
|
2340
|
+
function an(e) {
|
|
2341
|
+
const { children: t, className: n, disabled: o, elementRef: r, style: i } = e;
|
|
2342
|
+
return e.type === "column" ? /* @__PURE__ */ K(
|
|
2343
|
+
At,
|
|
2299
2344
|
{
|
|
2300
2345
|
axis: "column",
|
|
2301
|
-
className:
|
|
2346
|
+
className: n,
|
|
2302
2347
|
crossSpan: e.rowSpan,
|
|
2303
2348
|
crossStart: e.row ?? 0,
|
|
2304
2349
|
disabled: o,
|
|
2305
2350
|
elementRef: r,
|
|
2306
2351
|
index: e.column,
|
|
2307
2352
|
style: i,
|
|
2308
|
-
children:
|
|
2353
|
+
children: t
|
|
2309
2354
|
}
|
|
2310
|
-
) : /* @__PURE__ */
|
|
2311
|
-
|
|
2355
|
+
) : /* @__PURE__ */ K(
|
|
2356
|
+
At,
|
|
2312
2357
|
{
|
|
2313
2358
|
axis: "row",
|
|
2314
|
-
className:
|
|
2359
|
+
className: n,
|
|
2315
2360
|
crossSpan: e.columnSpan,
|
|
2316
2361
|
crossStart: e.column ?? 0,
|
|
2317
2362
|
disabled: o,
|
|
2318
2363
|
elementRef: r,
|
|
2319
2364
|
index: e.row,
|
|
2320
2365
|
style: i,
|
|
2321
|
-
children:
|
|
2366
|
+
children: t
|
|
2322
2367
|
}
|
|
2323
2368
|
);
|
|
2324
2369
|
}
|
|
2325
|
-
|
|
2326
|
-
const
|
|
2327
|
-
function
|
|
2370
|
+
an.displayName = "Gridline";
|
|
2371
|
+
const Re = ["column", "row"], Tt = { columns: {}, rows: {} };
|
|
2372
|
+
function Jn({
|
|
2328
2373
|
children: e,
|
|
2329
|
-
className:
|
|
2330
|
-
columns:
|
|
2374
|
+
className: t,
|
|
2375
|
+
columns: n,
|
|
2331
2376
|
defaultLayout: o,
|
|
2332
2377
|
disableCursor: r,
|
|
2333
2378
|
disabled: i,
|
|
@@ -2344,312 +2389,328 @@ function Kn({
|
|
|
2344
2389
|
style: m,
|
|
2345
2390
|
...y
|
|
2346
2391
|
}) {
|
|
2347
|
-
const f =
|
|
2348
|
-
(
|
|
2392
|
+
const f = $e(a), S = re(
|
|
2393
|
+
(L) => L === "column" ? `${f}:columns` : `${f}:rows`,
|
|
2349
2394
|
[f]
|
|
2350
|
-
),
|
|
2351
|
-
onLayoutChange:
|
|
2352
|
-
onLayoutChanged:
|
|
2353
|
-
}),
|
|
2354
|
-
|
|
2355
|
-
}),
|
|
2356
|
-
(
|
|
2357
|
-
|
|
2358
|
-
}
|
|
2359
|
-
),
|
|
2395
|
+
), p = Dt(n, "columns"), h = Dt(g, "rows"), I = (L) => L === "column" ? p : h, x = q({
|
|
2396
|
+
onLayoutChange: Tt,
|
|
2397
|
+
onLayoutChanged: Tt
|
|
2398
|
+
}), C = he((L) => {
|
|
2399
|
+
Ot(x.current.onLayoutChange, L) || (x.current.onLayoutChange = L, c?.(L));
|
|
2400
|
+
}), N = he(
|
|
2401
|
+
(L, k, _) => {
|
|
2402
|
+
Ot(x.current.onLayoutChanged, L) || (x.current.onLayoutChanged = L, u?.(L, { isUserInteraction: k, requestedLayout: _ }));
|
|
2403
|
+
}
|
|
2404
|
+
), D = q(null), b = Ve(D, s), [w, v] = rn(), $ = q({
|
|
2360
2405
|
cells: [],
|
|
2361
2406
|
column: { expandedItemSizes: {}, layouts: {} },
|
|
2362
2407
|
loggedErrors: /* @__PURE__ */ new Set(),
|
|
2363
2408
|
row: { expandedItemSizes: {}, layouts: {} },
|
|
2364
2409
|
separators: /* @__PURE__ */ new Map()
|
|
2365
|
-
}),
|
|
2366
|
-
for (const
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
const
|
|
2410
|
+
}), O = { column: !1, row: !1 };
|
|
2411
|
+
for (const L of $.current.separators.values())
|
|
2412
|
+
O[L.axis] = !0;
|
|
2413
|
+
ln(e, O);
|
|
2414
|
+
const R = Je({
|
|
2370
2415
|
defaultLayout: o,
|
|
2371
2416
|
disableCursor: r,
|
|
2372
2417
|
resizeTargetMinimumSize: d
|
|
2373
|
-
}),
|
|
2374
|
-
(
|
|
2375
|
-
const k =
|
|
2376
|
-
return k.cells = [...k.cells,
|
|
2418
|
+
}), E = he(() => !!R.disableCursor), P = re(
|
|
2419
|
+
(L) => {
|
|
2420
|
+
const k = $.current;
|
|
2421
|
+
return k.cells = [...k.cells, L], v(), () => {
|
|
2377
2422
|
k.cells = k.cells.filter(
|
|
2378
|
-
(
|
|
2423
|
+
(_) => _ !== L
|
|
2379
2424
|
), v();
|
|
2380
2425
|
};
|
|
2381
2426
|
},
|
|
2382
2427
|
[v]
|
|
2383
|
-
),
|
|
2384
|
-
(
|
|
2385
|
-
const
|
|
2386
|
-
return
|
|
2387
|
-
|
|
2428
|
+
), z = re(
|
|
2429
|
+
(L, k) => {
|
|
2430
|
+
const _ = $.current;
|
|
2431
|
+
return _.separators = new Map(_.separators), _.separators.set(k, L), v(), () => {
|
|
2432
|
+
_.separators = new Map(_.separators), _.separators.delete(k), v();
|
|
2388
2433
|
};
|
|
2389
2434
|
},
|
|
2390
2435
|
[v]
|
|
2391
|
-
),
|
|
2392
|
-
(
|
|
2436
|
+
), M = re(
|
|
2437
|
+
(L, {
|
|
2393
2438
|
disabled: k,
|
|
2394
|
-
disableDoubleClick:
|
|
2439
|
+
disableDoubleClick: _
|
|
2395
2440
|
}) => {
|
|
2396
|
-
for (const
|
|
2397
|
-
|
|
2441
|
+
for (const G of $.current.separators.keys())
|
|
2442
|
+
G.id === L && (G.disabled = k, G.disableDoubleClick = _);
|
|
2398
2443
|
},
|
|
2399
2444
|
[]
|
|
2400
|
-
),
|
|
2445
|
+
), B = $.current.separators, J = Pe(
|
|
2401
2446
|
() => ({
|
|
2402
|
-
getDisableCursor:
|
|
2447
|
+
getDisableCursor: E,
|
|
2403
2448
|
getResizeAxisId: S,
|
|
2404
2449
|
gutters: {
|
|
2405
|
-
column:
|
|
2406
|
-
row:
|
|
2450
|
+
column: O.column,
|
|
2451
|
+
row: O.row
|
|
2407
2452
|
},
|
|
2408
2453
|
id: f,
|
|
2409
|
-
registerCell:
|
|
2410
|
-
registerSeparator:
|
|
2411
|
-
separatorPlacements:
|
|
2454
|
+
registerCell: P,
|
|
2455
|
+
registerSeparator: z,
|
|
2456
|
+
separatorPlacements: B,
|
|
2412
2457
|
trackCounts: {
|
|
2413
|
-
column:
|
|
2414
|
-
row:
|
|
2458
|
+
column: p.length,
|
|
2459
|
+
row: h.length
|
|
2415
2460
|
},
|
|
2416
|
-
updateSeparatorProps:
|
|
2461
|
+
updateSeparatorProps: M
|
|
2417
2462
|
}),
|
|
2418
2463
|
[
|
|
2419
|
-
|
|
2420
|
-
|
|
2464
|
+
p.length,
|
|
2465
|
+
E,
|
|
2421
2466
|
S,
|
|
2422
|
-
|
|
2423
|
-
|
|
2467
|
+
O.column,
|
|
2468
|
+
O.row,
|
|
2424
2469
|
f,
|
|
2470
|
+
P,
|
|
2425
2471
|
z,
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
_
|
|
2472
|
+
h.length,
|
|
2473
|
+
B,
|
|
2474
|
+
M
|
|
2430
2475
|
]
|
|
2431
|
-
),
|
|
2476
|
+
), H = q([]);
|
|
2432
2477
|
ne(() => {
|
|
2433
|
-
const
|
|
2434
|
-
if (
|
|
2478
|
+
const L = D.current;
|
|
2479
|
+
if (L === null)
|
|
2435
2480
|
return;
|
|
2436
|
-
const k =
|
|
2481
|
+
const k = $.current, _ = Qn({
|
|
2437
2482
|
cells: k.cells,
|
|
2438
2483
|
separatorPlacements: k.separators,
|
|
2439
|
-
trackCounts: { column:
|
|
2484
|
+
trackCounts: { column: p.length, row: h.length }
|
|
2440
2485
|
});
|
|
2441
|
-
|
|
2442
|
-
k.loggedErrors.has(
|
|
2443
|
-
}), k.loggedErrors = new Set(
|
|
2444
|
-
const
|
|
2445
|
-
const
|
|
2446
|
-
({ id:
|
|
2486
|
+
_.forEach((A) => {
|
|
2487
|
+
k.loggedErrors.has(A) || console.error(A);
|
|
2488
|
+
}), k.loggedErrors = new Set(_);
|
|
2489
|
+
const G = (A) => Array.from(k.separators.entries()).filter(([, W]) => W.axis === A).sort(([, W], [, be]) => W.index - be.index).map(([W]) => W), F = (A) => {
|
|
2490
|
+
const W = A === "column" ? p : h, be = A === "column" ? h : p, me = W.map((Q) => Q.id), He = S(A), je = G(A), xe = je.length > 0, Ue = W.map(
|
|
2491
|
+
({ id: Q, ...oe }, ee) => ({
|
|
2447
2492
|
// Tracks don't have DOM elements of their own;
|
|
2448
2493
|
// the Grid element is used to resolve relative size constraints (e.g. "em")
|
|
2449
|
-
element:
|
|
2450
|
-
id:
|
|
2494
|
+
element: L,
|
|
2495
|
+
id: me[ee],
|
|
2451
2496
|
idIsStable: !0,
|
|
2452
2497
|
mutableValues: {
|
|
2453
2498
|
expandToSize: void 0,
|
|
2454
2499
|
prevSize: void 0
|
|
2455
2500
|
},
|
|
2456
2501
|
onResize: void 0,
|
|
2457
|
-
constraintProps:
|
|
2502
|
+
constraintProps: oe
|
|
2458
2503
|
})
|
|
2459
|
-
),
|
|
2460
|
-
const
|
|
2461
|
-
if (
|
|
2462
|
-
for (const [
|
|
2463
|
-
if (
|
|
2464
|
-
const
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2504
|
+
), Te = () => {
|
|
2505
|
+
const Q = [];
|
|
2506
|
+
if (xe) {
|
|
2507
|
+
for (const [oe, ee] of k.separators)
|
|
2508
|
+
if (ee.axis === A && st(ee.index, W.length)) {
|
|
2509
|
+
const Oe = oe.element.getBoundingClientRect();
|
|
2510
|
+
Q[ee.index] = Math.max(
|
|
2511
|
+
Q[ee.index] ?? 0,
|
|
2512
|
+
A === "column" ? Oe.width : Oe.height
|
|
2468
2513
|
);
|
|
2469
2514
|
}
|
|
2470
2515
|
}
|
|
2471
|
-
return
|
|
2472
|
-
axis:
|
|
2473
|
-
element:
|
|
2474
|
-
gutterSizes:
|
|
2475
|
-
hasGutters:
|
|
2476
|
-
layout:
|
|
2477
|
-
trackIds:
|
|
2516
|
+
return bn({
|
|
2517
|
+
axis: A,
|
|
2518
|
+
element: L,
|
|
2519
|
+
gutterSizes: Q.filter((oe) => oe !== void 0),
|
|
2520
|
+
hasGutters: xe,
|
|
2521
|
+
layout: se(He)?.layout,
|
|
2522
|
+
trackIds: me
|
|
2478
2523
|
});
|
|
2479
2524
|
};
|
|
2480
|
-
let
|
|
2481
|
-
const
|
|
2482
|
-
if (
|
|
2483
|
-
|
|
2484
|
-
for (const
|
|
2485
|
-
const
|
|
2486
|
-
|
|
2525
|
+
let De;
|
|
2526
|
+
const Qe = R.defaultLayout?.[A === "column" ? "columns" : "rows"];
|
|
2527
|
+
if (Qe !== void 0 && Object.keys(Qe).length === me.length) {
|
|
2528
|
+
De = {};
|
|
2529
|
+
for (const Q of me) {
|
|
2530
|
+
const oe = Qe[Q];
|
|
2531
|
+
oe !== void 0 && (De[Q] = oe);
|
|
2487
2532
|
}
|
|
2488
2533
|
}
|
|
2489
2534
|
return {
|
|
2490
2535
|
disabled: !!i,
|
|
2491
|
-
element:
|
|
2536
|
+
element: L,
|
|
2492
2537
|
id: He,
|
|
2493
2538
|
layoutStrategy: {
|
|
2494
|
-
getItemAriaControls: (
|
|
2495
|
-
const
|
|
2496
|
-
return k.cells.filter((
|
|
2497
|
-
const
|
|
2498
|
-
return
|
|
2499
|
-
}).map((
|
|
2539
|
+
getItemAriaControls: (Q) => {
|
|
2540
|
+
const oe = me.indexOf(Q);
|
|
2541
|
+
return k.cells.filter((ee) => {
|
|
2542
|
+
const Oe = A === "column" ? ee.column : ee.row, un = A === "column" ? ee.columnSpan : ee.rowSpan;
|
|
2543
|
+
return Oe <= oe && oe < Oe + un;
|
|
2544
|
+
}).map((ee) => ee.element.id).filter(Boolean).join(" ") || void 0;
|
|
2500
2545
|
},
|
|
2501
|
-
calculateAvailableSize: () =>
|
|
2546
|
+
calculateAvailableSize: () => Te().availableSize,
|
|
2502
2547
|
calculateHitRegions: ({
|
|
2503
|
-
expandHitTargets:
|
|
2504
|
-
axis:
|
|
2505
|
-
includeDisabled:
|
|
2506
|
-
}) =>
|
|
2507
|
-
axis:
|
|
2548
|
+
expandHitTargets: Q,
|
|
2549
|
+
axis: oe,
|
|
2550
|
+
includeDisabled: ee
|
|
2551
|
+
}) => vn({
|
|
2552
|
+
axis: A,
|
|
2508
2553
|
cells: k.cells,
|
|
2509
|
-
crossTrackCount:
|
|
2510
|
-
expandHitTargets:
|
|
2511
|
-
resizeAxis:
|
|
2512
|
-
axisSize:
|
|
2513
|
-
includeDisabled:
|
|
2554
|
+
crossTrackCount: be.length,
|
|
2555
|
+
expandHitTargets: Q,
|
|
2556
|
+
resizeAxis: oe,
|
|
2557
|
+
axisSize: Te().availableSize,
|
|
2558
|
+
includeDisabled: ee,
|
|
2514
2559
|
separatorPlacements: k.separators
|
|
2515
2560
|
}),
|
|
2516
|
-
getItemSizeInPixels: (
|
|
2561
|
+
getItemSizeInPixels: (Q) => Te().trackSizes[me.indexOf(Q)] ?? 0
|
|
2517
2562
|
},
|
|
2518
2563
|
mutableState: {
|
|
2519
|
-
defaultLayout:
|
|
2520
|
-
disableCursor:
|
|
2521
|
-
expandedItemSizes: k[
|
|
2522
|
-
layouts: k[
|
|
2564
|
+
defaultLayout: De,
|
|
2565
|
+
disableCursor: !!R.disableCursor,
|
|
2566
|
+
expandedItemSizes: k[A].expandedItemSizes,
|
|
2567
|
+
layouts: k[A].layouts
|
|
2523
2568
|
},
|
|
2524
|
-
orientation:
|
|
2525
|
-
items:
|
|
2569
|
+
orientation: A === "column" ? "horizontal" : "vertical",
|
|
2570
|
+
items: Ue,
|
|
2526
2571
|
resizePreviewMode: "panel",
|
|
2527
2572
|
get resizeTargetMinimumSize() {
|
|
2528
|
-
return
|
|
2573
|
+
return R.resizeTargetMinimumSize;
|
|
2529
2574
|
},
|
|
2530
|
-
separators:
|
|
2575
|
+
separators: je
|
|
2531
2576
|
};
|
|
2532
|
-
},
|
|
2533
|
-
|
|
2534
|
-
const
|
|
2535
|
-
const [
|
|
2536
|
-
(
|
|
2577
|
+
}, j = Re.map(F);
|
|
2578
|
+
H.current = j;
|
|
2579
|
+
const U = j.map((A) => nn(A)), te = () => {
|
|
2580
|
+
const [A, W] = j.map(
|
|
2581
|
+
(be) => se(be.id)
|
|
2537
2582
|
);
|
|
2538
|
-
if (!(!
|
|
2539
|
-
return {
|
|
2583
|
+
if (!(!A || !W || A.defaultLayoutDeferred || W.defaultLayoutDeferred))
|
|
2584
|
+
return {
|
|
2585
|
+
layout: { columns: A.layout, rows: W.layout },
|
|
2586
|
+
requestedLayout: {
|
|
2587
|
+
columns: A.requestedLayout,
|
|
2588
|
+
rows: W.requestedLayout
|
|
2589
|
+
}
|
|
2590
|
+
};
|
|
2540
2591
|
};
|
|
2541
2592
|
{
|
|
2542
|
-
const
|
|
2543
|
-
|
|
2593
|
+
const A = te();
|
|
2594
|
+
A && (C(A.layout), N(A.layout, !1, A.requestedLayout));
|
|
2544
2595
|
}
|
|
2545
|
-
const
|
|
2546
|
-
(
|
|
2547
|
-
const {
|
|
2548
|
-
|
|
2596
|
+
const Ae = j.map(
|
|
2597
|
+
(A) => Fe(A.id, (W) => {
|
|
2598
|
+
const {
|
|
2599
|
+
defaultLayoutDeferred: be,
|
|
2600
|
+
derivedItemConstraints: me,
|
|
2601
|
+
layout: He,
|
|
2602
|
+
requestedLayout: je
|
|
2603
|
+
} = W.next;
|
|
2604
|
+
if (be || me.length === 0)
|
|
2549
2605
|
return;
|
|
2550
|
-
|
|
2551
|
-
derivedItemConstraints:
|
|
2552
|
-
axis:
|
|
2606
|
+
on({
|
|
2607
|
+
derivedItemConstraints: me,
|
|
2608
|
+
axis: A,
|
|
2553
2609
|
layout: He,
|
|
2554
|
-
prevLayout:
|
|
2610
|
+
prevLayout: W.prev?.layout,
|
|
2611
|
+
requestedLayout: je
|
|
2555
2612
|
});
|
|
2556
|
-
const
|
|
2557
|
-
if (
|
|
2558
|
-
const
|
|
2559
|
-
(
|
|
2613
|
+
const xe = te();
|
|
2614
|
+
if (xe) {
|
|
2615
|
+
const Ue = de(), Te = Ue.state !== "active" || !Ue.hitRegions.some(
|
|
2616
|
+
(De) => j.includes(De.axis)
|
|
2617
|
+
);
|
|
2618
|
+
C(xe.layout), Te && N(
|
|
2619
|
+
xe.layout,
|
|
2620
|
+
W.isUserInteraction,
|
|
2621
|
+
xe.requestedLayout
|
|
2560
2622
|
);
|
|
2561
|
-
L(ze), Xe && O(ze, K.isUserInteraction);
|
|
2562
2623
|
}
|
|
2563
2624
|
})
|
|
2564
2625
|
);
|
|
2565
2626
|
return () => {
|
|
2566
|
-
|
|
2627
|
+
H.current = [], U.forEach((A) => A()), Ae.forEach((A) => A());
|
|
2567
2628
|
};
|
|
2568
2629
|
}, [
|
|
2569
|
-
|
|
2630
|
+
p,
|
|
2570
2631
|
i,
|
|
2571
2632
|
S,
|
|
2572
2633
|
f,
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2634
|
+
N,
|
|
2635
|
+
C,
|
|
2636
|
+
h,
|
|
2637
|
+
w,
|
|
2638
|
+
R
|
|
2578
2639
|
]), Be(() => {
|
|
2579
|
-
|
|
2580
|
-
|
|
2640
|
+
H.current.forEach((L) => {
|
|
2641
|
+
L.mutableState.defaultLayout = o?.[L.orientation === "horizontal" ? "columns" : "rows"], L.mutableState.disableCursor = !!r;
|
|
2581
2642
|
});
|
|
2582
2643
|
}), it(l, () => {
|
|
2583
|
-
const
|
|
2584
|
-
const [
|
|
2585
|
-
return !
|
|
2586
|
-
columns:
|
|
2587
|
-
axisId:
|
|
2644
|
+
const L = () => {
|
|
2645
|
+
const [G, F] = Re.map(S);
|
|
2646
|
+
return !Me(G) || !Me(F) ? { columns: {}, rows: {} } : {
|
|
2647
|
+
columns: Ge({
|
|
2648
|
+
axisId: G
|
|
2588
2649
|
}).getLayout(),
|
|
2589
|
-
rows:
|
|
2650
|
+
rows: Ge({ axisId: F }).getLayout()
|
|
2590
2651
|
};
|
|
2591
|
-
}, k = (
|
|
2592
|
-
const
|
|
2593
|
-
const
|
|
2594
|
-
return
|
|
2595
|
-
|
|
2596
|
-
`Grid "${f}" no longer contains a ${
|
|
2597
|
-
),
|
|
2652
|
+
}, k = (G) => G.map((F) => `"${F}"`).join(", "), _ = (G, F) => {
|
|
2653
|
+
const j = S(G), U = () => {
|
|
2654
|
+
const te = Me(j);
|
|
2655
|
+
return T(te, `Grid "${f}" has not been mounted`), T(
|
|
2656
|
+
te.items.some((Ae) => Ae.id === F),
|
|
2657
|
+
`Grid "${f}" no longer contains a ${G} with id "${F}"; ${G} ids are ${k(te.items.map((Ae) => Ae.id))}`
|
|
2658
|
+
), ft({ axisId: j, itemId: F });
|
|
2598
2659
|
};
|
|
2599
2660
|
return {
|
|
2600
|
-
collapse: () =>
|
|
2601
|
-
expand: () =>
|
|
2602
|
-
getSize: () =>
|
|
2603
|
-
isCollapsed: () =>
|
|
2604
|
-
resize: (
|
|
2661
|
+
collapse: () => U().collapse(),
|
|
2662
|
+
expand: () => U().expand(),
|
|
2663
|
+
getSize: () => U().getSize(),
|
|
2664
|
+
isCollapsed: () => U().isCollapsed(),
|
|
2665
|
+
resize: (te) => U().resize(te)
|
|
2605
2666
|
};
|
|
2606
2667
|
};
|
|
2607
2668
|
return {
|
|
2608
|
-
getLayout:
|
|
2609
|
-
getTrackById: (
|
|
2610
|
-
const
|
|
2611
|
-
return
|
|
2612
|
-
|
|
2613
|
-
`Grid "${f}" does not contain a ${
|
|
2614
|
-
), G
|
|
2669
|
+
getLayout: L,
|
|
2670
|
+
getTrackById: (G, F) => {
|
|
2671
|
+
const j = G === "column" ? p : h, U = `${F}`;
|
|
2672
|
+
return T(
|
|
2673
|
+
j.some((te) => te.id === U),
|
|
2674
|
+
`Grid "${f}" does not contain a ${G} with id "${U}"; ${G} ids are ${k(j.map((te) => te.id))}`
|
|
2675
|
+
), _(G, U);
|
|
2615
2676
|
},
|
|
2616
|
-
getTrackByIndex: (
|
|
2617
|
-
const
|
|
2618
|
-
return
|
|
2619
|
-
|
|
2620
|
-
`Grid "${f}" does not contain a ${
|
|
2621
|
-
), G
|
|
2677
|
+
getTrackByIndex: (G, F) => {
|
|
2678
|
+
const j = G === "column" ? p : h, U = Number.isInteger(F) ? j[F] : void 0;
|
|
2679
|
+
return T(
|
|
2680
|
+
U,
|
|
2681
|
+
`Grid "${f}" does not contain a ${G} at index ${F}; it has ${j.length} ${G}s`
|
|
2682
|
+
), _(G, U.id);
|
|
2622
2683
|
},
|
|
2623
|
-
setLayout: (
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2626
|
-
}),
|
|
2684
|
+
setLayout: (G) => (Re.forEach((F) => {
|
|
2685
|
+
const j = G[F === "column" ? "columns" : "rows"], U = S(F);
|
|
2686
|
+
j && Me(U) && Ge({ axisId: U }).setLayout(j);
|
|
2687
|
+
}), L())
|
|
2627
2688
|
};
|
|
2628
|
-
}, [
|
|
2629
|
-
const
|
|
2630
|
-
const k =
|
|
2631
|
-
return (k && !k.defaultLayoutDeferred ?
|
|
2632
|
-
|
|
2633
|
-
o?.[
|
|
2634
|
-
)).join(
|
|
2635
|
-
}).join("|"),
|
|
2636
|
-
(
|
|
2637
|
-
const k =
|
|
2638
|
-
(
|
|
2689
|
+
}, [p, S, f, h]);
|
|
2690
|
+
const Z = () => Re.map((L) => {
|
|
2691
|
+
const k = se(S(L)), _ = I(L);
|
|
2692
|
+
return (k && !k.defaultLayoutDeferred ? _.map((F) => `minmax(0, ${k.layout[F.id] ?? 1}fr)`) : Zn(
|
|
2693
|
+
_,
|
|
2694
|
+
o?.[L === "column" ? "columns" : "rows"]
|
|
2695
|
+
)).join(O[L] ? " auto " : " ");
|
|
2696
|
+
}).join("|"), Se = re(
|
|
2697
|
+
(L) => {
|
|
2698
|
+
const k = Re.map(
|
|
2699
|
+
(_) => Fe(S(_), L)
|
|
2639
2700
|
);
|
|
2640
|
-
return () => k.forEach((
|
|
2701
|
+
return () => k.forEach((_) => _());
|
|
2641
2702
|
},
|
|
2642
2703
|
[S]
|
|
2643
|
-
),
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
), [
|
|
2648
|
-
return /* @__PURE__ */
|
|
2704
|
+
), ze = Xe(
|
|
2705
|
+
Se,
|
|
2706
|
+
Z,
|
|
2707
|
+
Z
|
|
2708
|
+
), [Ie, ve] = ze.split("|");
|
|
2709
|
+
return /* @__PURE__ */ K(qt.Provider, { value: J, children: /* @__PURE__ */ K(
|
|
2649
2710
|
"div",
|
|
2650
2711
|
{
|
|
2651
2712
|
...y,
|
|
2652
|
-
className:
|
|
2713
|
+
className: t,
|
|
2653
2714
|
"data-grid": !0,
|
|
2654
2715
|
"data-testid": f,
|
|
2655
2716
|
id: f,
|
|
@@ -2660,67 +2721,67 @@ function Kn({
|
|
|
2660
2721
|
overflow: "hidden",
|
|
2661
2722
|
...m,
|
|
2662
2723
|
display: "grid",
|
|
2663
|
-
gridTemplateColumns:
|
|
2664
|
-
gridTemplateRows:
|
|
2724
|
+
gridTemplateColumns: Ie,
|
|
2725
|
+
gridTemplateRows: ve,
|
|
2665
2726
|
// Inform the browser that the library is handling touch events for this element
|
|
2666
2727
|
// NOTE This is not an inherited style
|
|
2667
2728
|
touchAction: "none"
|
|
2668
2729
|
},
|
|
2669
|
-
children: /* @__PURE__ */
|
|
2730
|
+
children: /* @__PURE__ */ K(mt.Provider, { value: null, children: e })
|
|
2670
2731
|
}
|
|
2671
2732
|
) });
|
|
2672
2733
|
}
|
|
2673
|
-
|
|
2674
|
-
function
|
|
2675
|
-
const
|
|
2676
|
-
return
|
|
2734
|
+
Jn.displayName = "Grid";
|
|
2735
|
+
function Dt(e, t) {
|
|
2736
|
+
const n = JSON.stringify(e);
|
|
2737
|
+
return Pe(() => {
|
|
2677
2738
|
const o = typeof e == "number" ? Array.from({ length: e }, (r, i) => ({ id: `${i}` })) : e.map((r, i) => ({
|
|
2678
2739
|
...r,
|
|
2679
2740
|
id: `${r.id ?? i}`
|
|
2680
2741
|
}));
|
|
2681
|
-
return
|
|
2742
|
+
return T(
|
|
2682
2743
|
o.length > 0,
|
|
2683
|
-
`Grid must have at least one track; "${
|
|
2744
|
+
`Grid must have at least one track; "${t}" is ${n}`
|
|
2684
2745
|
), o;
|
|
2685
|
-
}, [
|
|
2686
|
-
}
|
|
2687
|
-
function
|
|
2688
|
-
|
|
2689
|
-
if (
|
|
2690
|
-
if (
|
|
2691
|
-
const { type: o } =
|
|
2692
|
-
o === "column" ?
|
|
2746
|
+
}, [n]);
|
|
2747
|
+
}
|
|
2748
|
+
function ln(e, t) {
|
|
2749
|
+
mn.forEach(e, (n) => {
|
|
2750
|
+
if (Ft(n))
|
|
2751
|
+
if (n.type === an) {
|
|
2752
|
+
const { type: o } = n.props;
|
|
2753
|
+
o === "column" ? t.column = !0 : o === "row" && (t.row = !0);
|
|
2693
2754
|
} else // Fragments
|
|
2694
|
-
typeof
|
|
2755
|
+
typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props && ln(n.props.children, t);
|
|
2695
2756
|
});
|
|
2696
2757
|
}
|
|
2697
|
-
function
|
|
2698
|
-
if (
|
|
2758
|
+
function Zn(e, t) {
|
|
2759
|
+
if (t)
|
|
2699
2760
|
return e.map(
|
|
2700
|
-
(i) => `minmax(0, ${
|
|
2761
|
+
(i) => `minmax(0, ${t[i.id] ?? 1}fr)`
|
|
2701
2762
|
);
|
|
2702
|
-
const
|
|
2703
|
-
(i) => i.defaultSize === void 0 ? void 0 :
|
|
2763
|
+
const n = e.map(
|
|
2764
|
+
(i) => i.defaultSize === void 0 ? void 0 : Vt(i.defaultSize)
|
|
2704
2765
|
);
|
|
2705
2766
|
let o = 100, r = 0;
|
|
2706
|
-
return
|
|
2767
|
+
return n.forEach((i) => {
|
|
2707
2768
|
i === void 0 ? r++ : i[1] === "%" && (o -= i[0]);
|
|
2708
|
-
}),
|
|
2769
|
+
}), n.map((i) => {
|
|
2709
2770
|
if (i === void 0)
|
|
2710
2771
|
return `minmax(0, ${Math.max(0, o) / Math.max(1, r)}fr)`;
|
|
2711
2772
|
const [s, l] = i;
|
|
2712
2773
|
return l === "%" ? `minmax(0, ${s}fr)` : `${s}${l}`;
|
|
2713
2774
|
});
|
|
2714
2775
|
}
|
|
2715
|
-
function
|
|
2776
|
+
function Qn({
|
|
2716
2777
|
cells: e,
|
|
2717
|
-
separatorPlacements:
|
|
2718
|
-
trackCounts:
|
|
2778
|
+
separatorPlacements: t,
|
|
2779
|
+
trackCounts: n
|
|
2719
2780
|
}) {
|
|
2720
2781
|
const o = [];
|
|
2721
2782
|
for (const l of e)
|
|
2722
|
-
|
|
2723
|
-
const [c, u] = a === "column" ? [l.column, l.columnSpan] : [l.row, l.rowSpan], d =
|
|
2783
|
+
Re.forEach((a) => {
|
|
2784
|
+
const [c, u] = a === "column" ? [l.column, l.columnSpan] : [l.row, l.rowSpan], d = n[a];
|
|
2724
2785
|
(!Number.isInteger(c) || !Number.isInteger(u) || c < 0 || u < 1 || c + u > d) && o.push(
|
|
2725
2786
|
`Invalid Cell ${a} placement (${a}: ${c}, ${a}Span: ${u}); Grid has ${d} ${a}s`
|
|
2726
2787
|
);
|
|
@@ -2735,9 +2796,9 @@ function Jn({
|
|
|
2735
2796
|
const g = l === "column" ? "row" : "column";
|
|
2736
2797
|
let m = `type="${l}" ${l}={${d}}`;
|
|
2737
2798
|
return (c !== 0 || a !== void 0) && (m += ` ${g}={${c}}`), a !== void 0 && (m += ` ${g}Span={${a}}`), u && (m += " disabled"), `<Gridline ${m} />`;
|
|
2738
|
-
}, i = Array.from(
|
|
2799
|
+
}, i = Array.from(t.values()).filter(
|
|
2739
2800
|
(l) => {
|
|
2740
|
-
const { axis: a, crossSpan: c, crossStart: u, index: d } = l, g = a === "column" ? "row" : "column", m =
|
|
2801
|
+
const { axis: a, crossSpan: c, crossStart: u, index: d } = l, g = a === "column" ? "row" : "column", m = n[a], y = n[g];
|
|
2741
2802
|
let f = !0;
|
|
2742
2803
|
return st(d, m) || (o.push(
|
|
2743
2804
|
`Invalid ${a} Gridline ${a} (${d}); must be between 1 and ${m - 1}`
|
|
@@ -2748,7 +2809,7 @@ function Jn({
|
|
|
2748
2809
|
), f = !1), f;
|
|
2749
2810
|
}
|
|
2750
2811
|
), s = (l) => {
|
|
2751
|
-
const a =
|
|
2812
|
+
const a = n[l.axis === "column" ? "row" : "column"];
|
|
2752
2813
|
return [
|
|
2753
2814
|
l.crossStart,
|
|
2754
2815
|
l.crossSpan === void 0 ? a : l.crossStart + l.crossSpan
|
|
@@ -2757,11 +2818,11 @@ function Jn({
|
|
|
2757
2818
|
return i.forEach((l, a) => {
|
|
2758
2819
|
const { axis: c, index: u } = l, [d, g] = s(l);
|
|
2759
2820
|
for (const m of e) {
|
|
2760
|
-
const [y, f, S,
|
|
2761
|
-
if (y < u && u < y + f && S < g && d < S +
|
|
2762
|
-
const
|
|
2821
|
+
const [y, f, S, p] = c === "column" ? [m.column, m.columnSpan, m.row, m.rowSpan] : [m.row, m.rowSpan, m.column, m.columnSpan];
|
|
2822
|
+
if (y < u && u < y + f && S < g && d < S + p) {
|
|
2823
|
+
const h = c === "column" ? "row" : "column";
|
|
2763
2824
|
o.push(
|
|
2764
|
-
`${r(l)} overlaps a Cell that spans across it (${c}: ${y}, ${c}Span: ${f}, ${
|
|
2825
|
+
`${r(l)} overlaps a Cell that spans across it (${c}: ${y}, ${c}Span: ${f}, ${h}: ${S}, ${h}Span: ${p}); use the ${h} and ${h}Span props to render gridlines beside the Cell instead`
|
|
2765
2826
|
);
|
|
2766
2827
|
}
|
|
2767
2828
|
}
|
|
@@ -2772,19 +2833,19 @@ function Jn({
|
|
|
2772
2833
|
}
|
|
2773
2834
|
}), o;
|
|
2774
2835
|
}
|
|
2775
|
-
function
|
|
2776
|
-
return ie(e.columns,
|
|
2836
|
+
function Ot(e, t) {
|
|
2837
|
+
return ie(e.columns, t.columns) && ie(e.rows, t.rows);
|
|
2777
2838
|
}
|
|
2778
|
-
function
|
|
2839
|
+
function bo({
|
|
2779
2840
|
id: e,
|
|
2780
|
-
onlySaveAfterUserInteractions:
|
|
2781
|
-
storage:
|
|
2841
|
+
onlySaveAfterUserInteractions: t,
|
|
2842
|
+
storage: n = localStorage
|
|
2782
2843
|
}) {
|
|
2783
|
-
const o = `react-resizable-panels:grid:${e}`, r =
|
|
2784
|
-
|
|
2785
|
-
() =>
|
|
2786
|
-
() =>
|
|
2787
|
-
), i =
|
|
2844
|
+
const o = `react-resizable-panels:grid:${e}`, r = Xe(
|
|
2845
|
+
eo,
|
|
2846
|
+
() => n.getItem(o),
|
|
2847
|
+
() => n.getItem(o)
|
|
2848
|
+
), i = Pe(() => {
|
|
2788
2849
|
if (r)
|
|
2789
2850
|
try {
|
|
2790
2851
|
const l = JSON.parse(r);
|
|
@@ -2792,16 +2853,19 @@ function go({
|
|
|
2792
2853
|
return l;
|
|
2793
2854
|
} catch {
|
|
2794
2855
|
}
|
|
2795
|
-
}, [r]), s =
|
|
2856
|
+
}, [r]), s = re(
|
|
2796
2857
|
(l, a) => {
|
|
2797
|
-
if (!(
|
|
2858
|
+
if (!(t && !a.isUserInteraction))
|
|
2798
2859
|
try {
|
|
2799
|
-
|
|
2860
|
+
n.setItem(
|
|
2861
|
+
o,
|
|
2862
|
+
JSON.stringify(a.requestedLayout ?? l)
|
|
2863
|
+
);
|
|
2800
2864
|
} catch (c) {
|
|
2801
2865
|
console.error(c);
|
|
2802
2866
|
}
|
|
2803
2867
|
},
|
|
2804
|
-
[
|
|
2868
|
+
[t, n, o]
|
|
2805
2869
|
);
|
|
2806
2870
|
return {
|
|
2807
2871
|
/**
|
|
@@ -2814,22 +2878,28 @@ function go({
|
|
|
2814
2878
|
onLayoutChanged: s
|
|
2815
2879
|
};
|
|
2816
2880
|
}
|
|
2817
|
-
function
|
|
2881
|
+
function eo() {
|
|
2818
2882
|
return function() {
|
|
2819
2883
|
};
|
|
2820
2884
|
}
|
|
2821
|
-
function
|
|
2822
|
-
return
|
|
2885
|
+
function xo() {
|
|
2886
|
+
return pe(null);
|
|
2823
2887
|
}
|
|
2824
|
-
function
|
|
2825
|
-
return
|
|
2888
|
+
function wo() {
|
|
2889
|
+
return q(null);
|
|
2826
2890
|
}
|
|
2827
|
-
function
|
|
2891
|
+
function to(e) {
|
|
2892
|
+
for (let t = 1; t < e.length; t++)
|
|
2893
|
+
if (lt(e[t - 1], e[t]) > 0)
|
|
2894
|
+
return !1;
|
|
2895
|
+
return !0;
|
|
2896
|
+
}
|
|
2897
|
+
function no({
|
|
2828
2898
|
separator: e
|
|
2829
2899
|
}) {
|
|
2830
|
-
const { element:
|
|
2900
|
+
const { element: t } = e, n = q(null);
|
|
2831
2901
|
return ne(() => {
|
|
2832
|
-
const o =
|
|
2902
|
+
const o = t.cloneNode(!0), r = [t, ...t.querySelectorAll("*")], i = [o, ...o.querySelectorAll("*")], s = t.ownerDocument.defaultView;
|
|
2833
2903
|
return r.forEach((l, a) => {
|
|
2834
2904
|
const c = i[a];
|
|
2835
2905
|
if (c instanceof s.HTMLElement || c instanceof s.SVGElement) {
|
|
@@ -2850,11 +2920,11 @@ function Qn({
|
|
|
2850
2920
|
position: "static",
|
|
2851
2921
|
transform: "none",
|
|
2852
2922
|
width: "100%"
|
|
2853
|
-
}),
|
|
2854
|
-
}, [
|
|
2923
|
+
}), n.current.appendChild(o), () => o.remove();
|
|
2924
|
+
}, [t]), /* @__PURE__ */ K(
|
|
2855
2925
|
"div",
|
|
2856
2926
|
{
|
|
2857
|
-
ref:
|
|
2927
|
+
ref: n,
|
|
2858
2928
|
style: {
|
|
2859
2929
|
height: "100%",
|
|
2860
2930
|
opacity: 0.65,
|
|
@@ -2864,31 +2934,31 @@ function Qn({
|
|
|
2864
2934
|
}
|
|
2865
2935
|
);
|
|
2866
2936
|
}
|
|
2867
|
-
function
|
|
2868
|
-
const e =
|
|
2869
|
-
return
|
|
2937
|
+
function Ze() {
|
|
2938
|
+
const e = _t(mt);
|
|
2939
|
+
return T(
|
|
2870
2940
|
e,
|
|
2871
2941
|
"Group Context not found; did you render a Panel or Separator outside of a Group?"
|
|
2872
2942
|
), e;
|
|
2873
2943
|
}
|
|
2874
|
-
function
|
|
2875
|
-
const { registerOverlay:
|
|
2876
|
-
|
|
2877
|
-
const o =
|
|
2944
|
+
function cn(e) {
|
|
2945
|
+
const { registerOverlay: t } = Ze(), n = q(e);
|
|
2946
|
+
tn(n.current, e) || (n.current = e);
|
|
2947
|
+
const o = n.current;
|
|
2878
2948
|
return ne(
|
|
2879
|
-
() =>
|
|
2880
|
-
[
|
|
2949
|
+
() => t(o),
|
|
2950
|
+
[t, o]
|
|
2881
2951
|
), null;
|
|
2882
2952
|
}
|
|
2883
|
-
|
|
2884
|
-
function
|
|
2953
|
+
cn.displayName = "SeparatorOverlay";
|
|
2954
|
+
function oo({
|
|
2885
2955
|
active: e,
|
|
2886
|
-
orientation:
|
|
2887
|
-
style:
|
|
2956
|
+
orientation: t,
|
|
2957
|
+
style: n,
|
|
2888
2958
|
...o
|
|
2889
2959
|
}) {
|
|
2890
2960
|
let r;
|
|
2891
|
-
switch (
|
|
2961
|
+
switch (t) {
|
|
2892
2962
|
case "horizontal": {
|
|
2893
2963
|
r = {
|
|
2894
2964
|
height: "100%",
|
|
@@ -2904,34 +2974,34 @@ function eo({
|
|
|
2904
2974
|
break;
|
|
2905
2975
|
}
|
|
2906
2976
|
}
|
|
2907
|
-
return /* @__PURE__ */
|
|
2977
|
+
return /* @__PURE__ */ K(
|
|
2908
2978
|
"div",
|
|
2909
2979
|
{
|
|
2910
2980
|
...o,
|
|
2911
2981
|
"data-separator-overlay": e ? "active" : "inactive",
|
|
2912
2982
|
style: {
|
|
2913
2983
|
...r,
|
|
2914
|
-
...
|
|
2984
|
+
...n,
|
|
2915
2985
|
flexShrink: 0,
|
|
2916
2986
|
pointerEvents: "none"
|
|
2917
2987
|
}
|
|
2918
2988
|
}
|
|
2919
2989
|
);
|
|
2920
2990
|
}
|
|
2921
|
-
function
|
|
2991
|
+
function ro({
|
|
2922
2992
|
overlay: e,
|
|
2923
|
-
preview:
|
|
2993
|
+
preview: t
|
|
2924
2994
|
}) {
|
|
2925
|
-
const { axis:
|
|
2995
|
+
const { axis: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
|
|
2926
2996
|
let l = i?.preview, a = e;
|
|
2927
|
-
return
|
|
2928
|
-
|
|
2997
|
+
return Ft(l) && l.type === cn && (a = l.props, l = void 0), l == null && (a ? l = /* @__PURE__ */ K(
|
|
2998
|
+
oo,
|
|
2929
2999
|
{
|
|
2930
3000
|
...a,
|
|
2931
|
-
active:
|
|
2932
|
-
orientation:
|
|
3001
|
+
active: t.active,
|
|
3002
|
+
orientation: n.orientation
|
|
2933
3003
|
}
|
|
2934
|
-
) : i && (l = /* @__PURE__ */
|
|
3004
|
+
) : i && (l = /* @__PURE__ */ K(no, { separator: i }))), /* @__PURE__ */ K(
|
|
2935
3005
|
"div",
|
|
2936
3006
|
{
|
|
2937
3007
|
"aria-hidden": "true",
|
|
@@ -2950,46 +3020,49 @@ function to({
|
|
|
2950
3020
|
}
|
|
2951
3021
|
);
|
|
2952
3022
|
}
|
|
2953
|
-
function
|
|
2954
|
-
|
|
3023
|
+
function io(e) {
|
|
3024
|
+
return Array.from(e).sort(lt);
|
|
3025
|
+
}
|
|
3026
|
+
function so(e, t) {
|
|
3027
|
+
const n = q({
|
|
2955
3028
|
getLayout: () => ({}),
|
|
2956
|
-
setLayout:
|
|
3029
|
+
setLayout: In
|
|
2957
3030
|
});
|
|
2958
|
-
it(
|
|
3031
|
+
it(t, () => n.current, []), ne(() => {
|
|
2959
3032
|
Object.assign(
|
|
2960
|
-
|
|
2961
|
-
|
|
3033
|
+
n.current,
|
|
3034
|
+
Ge({ axisId: e })
|
|
2962
3035
|
);
|
|
2963
3036
|
});
|
|
2964
3037
|
}
|
|
2965
|
-
function
|
|
3038
|
+
function ao({
|
|
2966
3039
|
groupId: e,
|
|
2967
|
-
resizePreviewMode:
|
|
3040
|
+
resizePreviewMode: t
|
|
2968
3041
|
}) {
|
|
2969
|
-
const [
|
|
3042
|
+
const [n, o] = pe([]), r = q(n);
|
|
2970
3043
|
return ne(() => {
|
|
2971
3044
|
const i = (l) => {
|
|
2972
|
-
const a =
|
|
2973
|
-
(d) => d.axis === a && (d.active || !
|
|
3045
|
+
const a = Me(e), c = t === "separator" && l.state === "active" ? l.previews.filter(
|
|
3046
|
+
(d) => d.axis === a && (d.active || !Y(d.offset, 0))
|
|
2974
3047
|
) : [], u = r.current;
|
|
2975
3048
|
u.length === c.length && c.every(
|
|
2976
3049
|
(d, g) => d === u[g]
|
|
2977
3050
|
) || (r.current = c, o(c));
|
|
2978
3051
|
};
|
|
2979
|
-
if (
|
|
2980
|
-
i(
|
|
3052
|
+
if (t !== "separator") {
|
|
3053
|
+
i(de());
|
|
2981
3054
|
return;
|
|
2982
3055
|
}
|
|
2983
|
-
const s =
|
|
3056
|
+
const s = jt(
|
|
2984
3057
|
({ next: l }) => i(l)
|
|
2985
3058
|
);
|
|
2986
|
-
return i(
|
|
2987
|
-
}, [e,
|
|
3059
|
+
return i(de()), s;
|
|
3060
|
+
}, [e, t]), n;
|
|
2988
3061
|
}
|
|
2989
|
-
function
|
|
3062
|
+
function lo({
|
|
2990
3063
|
children: e,
|
|
2991
|
-
className:
|
|
2992
|
-
defaultLayout:
|
|
3064
|
+
className: t,
|
|
3065
|
+
defaultLayout: n,
|
|
2993
3066
|
disableCursor: o,
|
|
2994
3067
|
disabled: r,
|
|
2995
3068
|
elementRef: i,
|
|
@@ -3006,176 +3079,191 @@ function ro({
|
|
|
3006
3079
|
style: m,
|
|
3007
3080
|
...y
|
|
3008
3081
|
}) {
|
|
3009
|
-
const f =
|
|
3082
|
+
const f = q({
|
|
3010
3083
|
onLayoutChange: {},
|
|
3011
3084
|
onLayoutChanged: {}
|
|
3012
|
-
}), S =
|
|
3085
|
+
}), S = he((z) => {
|
|
3013
3086
|
ie(f.current.onLayoutChange, z) || (f.current.onLayoutChange = z, a?.(z));
|
|
3014
|
-
}),
|
|
3015
|
-
(z,
|
|
3016
|
-
ie(f.current.onLayoutChanged, z) || (f.current.onLayoutChanged = z, c?.(z, { isUserInteraction:
|
|
3087
|
+
}), p = he(
|
|
3088
|
+
(z, M, B) => {
|
|
3089
|
+
ie(f.current.onLayoutChanged, z) || (f.current.onLayoutChanged = z, c?.(z, { isUserInteraction: M, requestedLayout: B }));
|
|
3017
3090
|
}
|
|
3018
|
-
),
|
|
3019
|
-
groupId:
|
|
3091
|
+
), h = $e(l), [I, x] = pe(), C = ao({
|
|
3092
|
+
groupId: h,
|
|
3020
3093
|
resizePreviewMode: d
|
|
3021
|
-
}),
|
|
3094
|
+
}), N = q(null), [D, b] = rn(), w = q([]), v = q({
|
|
3022
3095
|
lastExpandedPanelSizes: {},
|
|
3023
3096
|
layouts: {},
|
|
3024
3097
|
panels: [],
|
|
3025
3098
|
separators: []
|
|
3026
|
-
}),
|
|
3027
|
-
|
|
3028
|
-
const
|
|
3029
|
-
(z,
|
|
3030
|
-
const
|
|
3031
|
-
if (
|
|
3099
|
+
}), $ = Ve(N, i);
|
|
3100
|
+
so(h, s);
|
|
3101
|
+
const O = he(
|
|
3102
|
+
(z, M) => {
|
|
3103
|
+
const B = se(z);
|
|
3104
|
+
if (B)
|
|
3032
3105
|
return {
|
|
3033
|
-
flexGrow:
|
|
3106
|
+
flexGrow: B.layout[M] ?? 1
|
|
3034
3107
|
};
|
|
3035
|
-
if (
|
|
3108
|
+
if (n?.[M])
|
|
3036
3109
|
return {
|
|
3037
|
-
flexGrow:
|
|
3110
|
+
flexGrow: n?.[M]
|
|
3038
3111
|
};
|
|
3039
3112
|
}
|
|
3040
|
-
),
|
|
3041
|
-
defaultLayout:
|
|
3113
|
+
), R = Je({
|
|
3114
|
+
defaultLayout: n,
|
|
3042
3115
|
disableCursor: o,
|
|
3043
3116
|
resizeTargetMinimumSize: g
|
|
3044
|
-
}),
|
|
3117
|
+
}), E = Pe(
|
|
3045
3118
|
() => ({
|
|
3046
3119
|
get disableCursor() {
|
|
3047
|
-
return !!
|
|
3120
|
+
return !!R.disableCursor;
|
|
3048
3121
|
},
|
|
3049
|
-
getPanelStyles:
|
|
3050
|
-
id:
|
|
3122
|
+
getPanelStyles: O,
|
|
3123
|
+
id: h,
|
|
3051
3124
|
orientation: u,
|
|
3052
3125
|
registerPanel: (z) => {
|
|
3053
|
-
const
|
|
3054
|
-
return
|
|
3055
|
-
...
|
|
3126
|
+
const M = v.current;
|
|
3127
|
+
return M.panels = Ne(u, [
|
|
3128
|
+
...M.panels,
|
|
3056
3129
|
z
|
|
3057
3130
|
]), b(), () => {
|
|
3058
|
-
|
|
3059
|
-
(
|
|
3131
|
+
M.panels = M.panels.filter(
|
|
3132
|
+
(B) => B !== z
|
|
3060
3133
|
), b();
|
|
3061
3134
|
};
|
|
3062
3135
|
},
|
|
3063
|
-
registerOverlay: (z) => (
|
|
3064
|
-
|
|
3136
|
+
registerOverlay: (z) => (x(z), () => {
|
|
3137
|
+
x(void 0);
|
|
3065
3138
|
}),
|
|
3066
3139
|
registerSeparator: (z) => {
|
|
3067
|
-
const
|
|
3068
|
-
return
|
|
3069
|
-
...
|
|
3140
|
+
const M = v.current;
|
|
3141
|
+
return M.separators = Ne(u, [
|
|
3142
|
+
...M.separators,
|
|
3070
3143
|
z
|
|
3071
3144
|
]), b(), () => {
|
|
3072
|
-
|
|
3073
|
-
(
|
|
3145
|
+
M.separators = M.separators.filter(
|
|
3146
|
+
(B) => B !== z
|
|
3074
3147
|
), b();
|
|
3075
3148
|
};
|
|
3076
3149
|
},
|
|
3077
|
-
updatePanelProps: (z, { disabled:
|
|
3078
|
-
const
|
|
3079
|
-
(
|
|
3150
|
+
updatePanelProps: (z, { disabled: M }) => {
|
|
3151
|
+
const J = v.current.panels.find(
|
|
3152
|
+
(Se) => Se.id === z
|
|
3080
3153
|
);
|
|
3081
|
-
|
|
3082
|
-
const
|
|
3083
|
-
|
|
3084
|
-
...
|
|
3085
|
-
derivedItemConstraints: rt(
|
|
3154
|
+
J && (J.constraintProps.disabled = M);
|
|
3155
|
+
const H = Me(h), Z = se(h);
|
|
3156
|
+
H && Z && fe(H, {
|
|
3157
|
+
...Z,
|
|
3158
|
+
derivedItemConstraints: rt(H)
|
|
3086
3159
|
});
|
|
3087
3160
|
},
|
|
3088
3161
|
updateSeparatorProps: (z, {
|
|
3089
|
-
disabled:
|
|
3090
|
-
disableDoubleClick:
|
|
3162
|
+
disabled: M,
|
|
3163
|
+
disableDoubleClick: B
|
|
3091
3164
|
}) => {
|
|
3092
|
-
const
|
|
3093
|
-
(
|
|
3165
|
+
const H = v.current.separators.find(
|
|
3166
|
+
(Z) => Z.id === z
|
|
3094
3167
|
);
|
|
3095
|
-
|
|
3168
|
+
H && (H.disabled = M, H.disableDoubleClick = B);
|
|
3096
3169
|
}
|
|
3097
3170
|
}),
|
|
3098
|
-
[
|
|
3099
|
-
),
|
|
3171
|
+
[O, h, b, u, R]
|
|
3172
|
+
), P = q(null);
|
|
3100
3173
|
return ne(() => {
|
|
3101
|
-
const z =
|
|
3174
|
+
const z = N.current;
|
|
3102
3175
|
if (z === null)
|
|
3103
3176
|
return;
|
|
3104
|
-
const
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3177
|
+
const M = v.current;
|
|
3178
|
+
M.panels = Ne(
|
|
3179
|
+
u,
|
|
3180
|
+
M.panels
|
|
3181
|
+
), M.separators = Ne(
|
|
3182
|
+
u,
|
|
3183
|
+
M.separators
|
|
3184
|
+
), w.current = io([
|
|
3185
|
+
...M.panels.map(({ element: L }) => L),
|
|
3186
|
+
...M.separators.map(({ element: L }) => L)
|
|
3187
|
+
]);
|
|
3188
|
+
let B;
|
|
3189
|
+
if (R.defaultLayout !== void 0 && Object.keys(R.defaultLayout).length === M.panels.length) {
|
|
3190
|
+
B = {};
|
|
3191
|
+
for (const L of M.panels) {
|
|
3192
|
+
const k = R.defaultLayout[L.id];
|
|
3193
|
+
k !== void 0 && (B[L.id] = k);
|
|
3111
3194
|
}
|
|
3112
3195
|
}
|
|
3113
|
-
const
|
|
3196
|
+
const J = {
|
|
3114
3197
|
disabled: !!r,
|
|
3115
3198
|
element: z,
|
|
3116
|
-
id:
|
|
3199
|
+
id: h,
|
|
3117
3200
|
mutableState: {
|
|
3118
|
-
defaultLayout:
|
|
3119
|
-
disableCursor: !!
|
|
3120
|
-
expandedItemSizes:
|
|
3121
|
-
layouts:
|
|
3201
|
+
defaultLayout: B,
|
|
3202
|
+
disableCursor: !!R.disableCursor,
|
|
3203
|
+
expandedItemSizes: v.current.lastExpandedPanelSizes,
|
|
3204
|
+
layouts: v.current.layouts
|
|
3122
3205
|
},
|
|
3123
3206
|
orientation: u,
|
|
3124
|
-
items:
|
|
3207
|
+
items: M.panels,
|
|
3125
3208
|
resizePreviewMode: d,
|
|
3126
3209
|
get resizeTargetMinimumSize() {
|
|
3127
|
-
return
|
|
3210
|
+
return R.resizeTargetMinimumSize;
|
|
3128
3211
|
},
|
|
3129
|
-
separators:
|
|
3212
|
+
separators: M.separators
|
|
3130
3213
|
};
|
|
3131
|
-
|
|
3132
|
-
const
|
|
3133
|
-
defaultLayoutDeferred:
|
|
3134
|
-
derivedItemConstraints:
|
|
3135
|
-
layout:
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3214
|
+
P.current = J;
|
|
3215
|
+
const H = nn(J), {
|
|
3216
|
+
defaultLayoutDeferred: Z,
|
|
3217
|
+
derivedItemConstraints: Se,
|
|
3218
|
+
layout: ze,
|
|
3219
|
+
requestedLayout: Ie
|
|
3220
|
+
} = se(J.id, !0);
|
|
3221
|
+
!Z && Se.length > 0 && (S(ze), p(ze, !1, Ie));
|
|
3222
|
+
const ve = Fe(h, (L) => {
|
|
3139
3223
|
const {
|
|
3140
|
-
defaultLayoutDeferred:
|
|
3141
|
-
derivedItemConstraints:
|
|
3142
|
-
layout:
|
|
3143
|
-
|
|
3144
|
-
|
|
3224
|
+
defaultLayoutDeferred: k,
|
|
3225
|
+
derivedItemConstraints: _,
|
|
3226
|
+
layout: G,
|
|
3227
|
+
requestedLayout: F
|
|
3228
|
+
} = L.next;
|
|
3229
|
+
if (k || _.length === 0)
|
|
3145
3230
|
return;
|
|
3146
|
-
|
|
3147
|
-
derivedItemConstraints:
|
|
3148
|
-
axis:
|
|
3149
|
-
layout:
|
|
3150
|
-
prevLayout:
|
|
3231
|
+
on({
|
|
3232
|
+
derivedItemConstraints: _,
|
|
3233
|
+
axis: J,
|
|
3234
|
+
layout: G,
|
|
3235
|
+
prevLayout: L.prev?.layout,
|
|
3236
|
+
requestedLayout: F
|
|
3151
3237
|
});
|
|
3152
|
-
const
|
|
3153
|
-
S(
|
|
3238
|
+
const j = de(), U = j.state !== "active" || !j.hitRegions.some((te) => te.axis === J);
|
|
3239
|
+
S(G), U && p(G, L.isUserInteraction, F);
|
|
3154
3240
|
});
|
|
3155
3241
|
return () => {
|
|
3156
|
-
|
|
3242
|
+
P.current = null, H(), ve();
|
|
3157
3243
|
};
|
|
3158
3244
|
}, [
|
|
3159
3245
|
r,
|
|
3160
|
-
p,
|
|
3161
3246
|
h,
|
|
3247
|
+
p,
|
|
3162
3248
|
S,
|
|
3163
3249
|
u,
|
|
3164
|
-
|
|
3250
|
+
D,
|
|
3165
3251
|
d,
|
|
3166
|
-
|
|
3167
|
-
]),
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3252
|
+
R
|
|
3253
|
+
]), ne(() => {
|
|
3254
|
+
to(w.current) || b();
|
|
3255
|
+
}), Be(() => {
|
|
3256
|
+
const z = P.current;
|
|
3257
|
+
z && (z.mutableState.defaultLayout = n, z.mutableState.disableCursor = !!o);
|
|
3258
|
+
}), /* @__PURE__ */ K(mt.Provider, { value: E, children: /* @__PURE__ */ dn(
|
|
3171
3259
|
"div",
|
|
3172
3260
|
{
|
|
3173
3261
|
...y,
|
|
3174
|
-
className:
|
|
3262
|
+
className: t,
|
|
3175
3263
|
"data-group": !0,
|
|
3176
|
-
"data-testid":
|
|
3177
|
-
id:
|
|
3178
|
-
ref:
|
|
3264
|
+
"data-testid": h,
|
|
3265
|
+
id: h,
|
|
3266
|
+
ref: $,
|
|
3179
3267
|
style: {
|
|
3180
3268
|
height: "100%",
|
|
3181
3269
|
width: "100%",
|
|
@@ -3193,10 +3281,10 @@ function ro({
|
|
|
3193
3281
|
},
|
|
3194
3282
|
children: [
|
|
3195
3283
|
e,
|
|
3196
|
-
|
|
3197
|
-
|
|
3284
|
+
C.map((z) => /* @__PURE__ */ K(
|
|
3285
|
+
ro,
|
|
3198
3286
|
{
|
|
3199
|
-
overlay:
|
|
3287
|
+
overlay: I,
|
|
3200
3288
|
preview: z
|
|
3201
3289
|
},
|
|
3202
3290
|
z.key
|
|
@@ -3205,25 +3293,25 @@ function ro({
|
|
|
3205
3293
|
}
|
|
3206
3294
|
) });
|
|
3207
3295
|
}
|
|
3208
|
-
|
|
3209
|
-
function
|
|
3210
|
-
return `react-resizable-panels:${[e, ...
|
|
3296
|
+
lo.displayName = "Group";
|
|
3297
|
+
function Ke(e, t) {
|
|
3298
|
+
return `react-resizable-panels:${[e, ...t].join(":")}`;
|
|
3211
3299
|
}
|
|
3212
|
-
function
|
|
3300
|
+
function co({
|
|
3213
3301
|
id: e,
|
|
3214
|
-
panelIds:
|
|
3215
|
-
storage:
|
|
3302
|
+
panelIds: t,
|
|
3303
|
+
storage: n
|
|
3216
3304
|
}) {
|
|
3217
|
-
const o =
|
|
3305
|
+
const o = Ke(e, []), r = n.getItem(o);
|
|
3218
3306
|
if (r)
|
|
3219
3307
|
try {
|
|
3220
3308
|
const i = JSON.parse(r);
|
|
3221
|
-
if (
|
|
3222
|
-
const s =
|
|
3223
|
-
if (l && Array.isArray(l.layout) &&
|
|
3309
|
+
if (t) {
|
|
3310
|
+
const s = t.join(","), l = i[s];
|
|
3311
|
+
if (l && Array.isArray(l.layout) && t.length === l.layout.length) {
|
|
3224
3312
|
const a = {};
|
|
3225
|
-
for (let c = 0; c <
|
|
3226
|
-
a[
|
|
3313
|
+
for (let c = 0; c < t.length; c++)
|
|
3314
|
+
a[t[c]] = l.layout[c];
|
|
3227
3315
|
return a;
|
|
3228
3316
|
}
|
|
3229
3317
|
} else {
|
|
@@ -3244,63 +3332,64 @@ function io({
|
|
|
3244
3332
|
} catch {
|
|
3245
3333
|
}
|
|
3246
3334
|
}
|
|
3247
|
-
function
|
|
3335
|
+
function zo({
|
|
3248
3336
|
debounceSaveMs: e = 100,
|
|
3249
|
-
onlySaveAfterUserInteractions:
|
|
3250
|
-
panelIds:
|
|
3337
|
+
onlySaveAfterUserInteractions: t,
|
|
3338
|
+
panelIds: n,
|
|
3251
3339
|
storage: o = localStorage,
|
|
3252
3340
|
...r
|
|
3253
3341
|
}) {
|
|
3254
|
-
const i =
|
|
3255
|
-
|
|
3342
|
+
const i = n !== void 0, s = "id" in r ? r.id : r.groupId, l = Ke(s, n ?? []), a = Xe(
|
|
3343
|
+
uo,
|
|
3256
3344
|
() => o.getItem(l),
|
|
3257
3345
|
() => o.getItem(l)
|
|
3258
|
-
), c =
|
|
3346
|
+
), c = Pe(() => {
|
|
3259
3347
|
if (a) {
|
|
3260
|
-
const S = JSON.parse(a),
|
|
3261
|
-
if (Array.from(
|
|
3348
|
+
const S = JSON.parse(a), p = Object.values(S);
|
|
3349
|
+
if (Array.from(p).every((h) => typeof h == "number"))
|
|
3262
3350
|
return S;
|
|
3263
3351
|
}
|
|
3264
|
-
}, [a]), u =
|
|
3352
|
+
}, [a]), u = Pe(() => {
|
|
3265
3353
|
if (!c)
|
|
3266
|
-
return
|
|
3354
|
+
return co({
|
|
3267
3355
|
id: s,
|
|
3268
|
-
panelIds:
|
|
3356
|
+
panelIds: n,
|
|
3269
3357
|
storage: o
|
|
3270
3358
|
});
|
|
3271
|
-
}, [c, s,
|
|
3359
|
+
}, [c, s, n, o]), d = c ?? u, g = q(null), m = re(() => {
|
|
3272
3360
|
const S = g.current;
|
|
3273
3361
|
S && (g.current = null, clearTimeout(S));
|
|
3274
3362
|
}, []);
|
|
3275
|
-
|
|
3363
|
+
Nt(() => () => {
|
|
3276
3364
|
m();
|
|
3277
3365
|
}, [m]);
|
|
3278
|
-
const y =
|
|
3366
|
+
const y = re(
|
|
3279
3367
|
// The hook persists every layout commit -- including library-driven ones --
|
|
3280
3368
|
// because it owns its own storage and the goal is to remember whatever
|
|
3281
3369
|
// layout the user is currently looking at. Consumers that only want to
|
|
3282
3370
|
// persist on user interaction should branch on `isUserInteraction` in
|
|
3283
3371
|
// their own callback (see #716) rather than via this hook.
|
|
3284
|
-
(S,
|
|
3285
|
-
if (
|
|
3372
|
+
(S, p) => {
|
|
3373
|
+
if (t && !p.isUserInteraction)
|
|
3286
3374
|
return;
|
|
3287
3375
|
m();
|
|
3288
|
-
|
|
3289
|
-
|
|
3376
|
+
const h = p.requestedLayout ?? S;
|
|
3377
|
+
let I;
|
|
3378
|
+
i ? I = Ke(s, Object.keys(h)) : I = Ke(s, []);
|
|
3290
3379
|
try {
|
|
3291
|
-
o.setItem(
|
|
3292
|
-
} catch (
|
|
3293
|
-
console.error(
|
|
3380
|
+
o.setItem(I, JSON.stringify(h));
|
|
3381
|
+
} catch (x) {
|
|
3382
|
+
console.error(x);
|
|
3294
3383
|
}
|
|
3295
3384
|
},
|
|
3296
3385
|
[
|
|
3297
3386
|
m,
|
|
3298
3387
|
i,
|
|
3299
3388
|
s,
|
|
3300
|
-
|
|
3389
|
+
t,
|
|
3301
3390
|
o
|
|
3302
3391
|
]
|
|
3303
|
-
), f =
|
|
3392
|
+
), f = re(
|
|
3304
3393
|
(S) => {
|
|
3305
3394
|
m(), e === 0 ? y(S, { isUserInteraction: !1 }) : g.current = setTimeout(() => {
|
|
3306
3395
|
y(S, { isUserInteraction: !1 });
|
|
@@ -3325,38 +3414,38 @@ function vo({
|
|
|
3325
3414
|
onLayoutChanged: y
|
|
3326
3415
|
};
|
|
3327
3416
|
}
|
|
3328
|
-
function
|
|
3417
|
+
function uo() {
|
|
3329
3418
|
return function() {
|
|
3330
3419
|
};
|
|
3331
3420
|
}
|
|
3332
|
-
function
|
|
3333
|
-
return
|
|
3421
|
+
function Io() {
|
|
3422
|
+
return pe(null);
|
|
3334
3423
|
}
|
|
3335
|
-
function
|
|
3336
|
-
return
|
|
3424
|
+
function Lo() {
|
|
3425
|
+
return q(null);
|
|
3337
3426
|
}
|
|
3338
|
-
function
|
|
3339
|
-
const { id:
|
|
3340
|
-
collapse:
|
|
3341
|
-
expand:
|
|
3427
|
+
function fo(e, t) {
|
|
3428
|
+
const { id: n } = Ze(), o = q({
|
|
3429
|
+
collapse: et,
|
|
3430
|
+
expand: et,
|
|
3342
3431
|
getSize: () => ({
|
|
3343
3432
|
asPercentage: 0,
|
|
3344
3433
|
inPixels: 0
|
|
3345
3434
|
}),
|
|
3346
3435
|
isCollapsed: () => !1,
|
|
3347
|
-
resize:
|
|
3436
|
+
resize: et
|
|
3348
3437
|
});
|
|
3349
|
-
it(
|
|
3438
|
+
it(t, () => o.current, []), ne(() => {
|
|
3350
3439
|
Object.assign(
|
|
3351
3440
|
o.current,
|
|
3352
|
-
|
|
3441
|
+
ft({ axisId: n, itemId: e })
|
|
3353
3442
|
);
|
|
3354
3443
|
});
|
|
3355
3444
|
}
|
|
3356
|
-
function
|
|
3445
|
+
function mo({
|
|
3357
3446
|
children: e,
|
|
3358
|
-
className:
|
|
3359
|
-
collapsedSize:
|
|
3447
|
+
className: t,
|
|
3448
|
+
collapsedSize: n = "0%",
|
|
3360
3449
|
collapsedThreshold: o,
|
|
3361
3450
|
collapsible: r = !1,
|
|
3362
3451
|
defaultSize: i,
|
|
@@ -3371,96 +3460,96 @@ function lo({
|
|
|
3371
3460
|
style: y,
|
|
3372
3461
|
...f
|
|
3373
3462
|
}) {
|
|
3374
|
-
const S = !!c,
|
|
3463
|
+
const S = !!c, p = $e(c), h = Je({
|
|
3375
3464
|
disabled: s
|
|
3376
|
-
}),
|
|
3377
|
-
getPanelStyles:
|
|
3378
|
-
id:
|
|
3379
|
-
orientation:
|
|
3465
|
+
}), I = q(null), x = Ve(I, l), {
|
|
3466
|
+
getPanelStyles: C,
|
|
3467
|
+
id: N,
|
|
3468
|
+
orientation: D,
|
|
3380
3469
|
registerPanel: b,
|
|
3381
|
-
updatePanelProps:
|
|
3382
|
-
} =
|
|
3383
|
-
(
|
|
3384
|
-
g?.(
|
|
3470
|
+
updatePanelProps: w
|
|
3471
|
+
} = Ze(), v = g !== null, $ = he(
|
|
3472
|
+
(P, z, M) => {
|
|
3473
|
+
g?.(P, c, M);
|
|
3385
3474
|
}
|
|
3386
3475
|
);
|
|
3387
3476
|
ne(() => {
|
|
3388
|
-
const
|
|
3389
|
-
if (
|
|
3390
|
-
const
|
|
3391
|
-
element:
|
|
3392
|
-
id:
|
|
3477
|
+
const P = I.current;
|
|
3478
|
+
if (P !== null) {
|
|
3479
|
+
const z = {
|
|
3480
|
+
element: P,
|
|
3481
|
+
id: p,
|
|
3393
3482
|
idIsStable: S,
|
|
3394
3483
|
mutableValues: {
|
|
3395
3484
|
expandToSize: void 0,
|
|
3396
3485
|
prevSize: void 0
|
|
3397
3486
|
},
|
|
3398
|
-
onResize: v ?
|
|
3487
|
+
onResize: v ? $ : void 0,
|
|
3399
3488
|
constraintProps: {
|
|
3400
3489
|
groupResizeBehavior: a,
|
|
3401
|
-
collapsedSize:
|
|
3490
|
+
collapsedSize: n,
|
|
3402
3491
|
collapsedThreshold: o,
|
|
3403
3492
|
collapsible: r,
|
|
3404
3493
|
defaultSize: i,
|
|
3405
|
-
disabled:
|
|
3494
|
+
disabled: h.disabled,
|
|
3406
3495
|
maxSize: u,
|
|
3407
3496
|
minSize: d
|
|
3408
3497
|
}
|
|
3409
3498
|
};
|
|
3410
|
-
return b(
|
|
3499
|
+
return b(z);
|
|
3411
3500
|
}
|
|
3412
3501
|
}, [
|
|
3413
3502
|
a,
|
|
3414
|
-
|
|
3503
|
+
n,
|
|
3415
3504
|
o,
|
|
3416
3505
|
r,
|
|
3417
3506
|
i,
|
|
3418
3507
|
v,
|
|
3419
|
-
|
|
3508
|
+
p,
|
|
3420
3509
|
S,
|
|
3421
3510
|
u,
|
|
3422
3511
|
d,
|
|
3423
|
-
|
|
3512
|
+
$,
|
|
3424
3513
|
b,
|
|
3425
|
-
|
|
3514
|
+
h
|
|
3426
3515
|
]), Be(() => {
|
|
3427
|
-
|
|
3428
|
-
}, [s,
|
|
3429
|
-
const
|
|
3430
|
-
const
|
|
3431
|
-
if (
|
|
3432
|
-
return JSON.stringify(
|
|
3433
|
-
},
|
|
3434
|
-
(
|
|
3435
|
-
|
|
3436
|
-
|
|
3516
|
+
w(p, { disabled: s });
|
|
3517
|
+
}, [s, p, w]), fo(p, m);
|
|
3518
|
+
const O = () => {
|
|
3519
|
+
const P = C(N, p);
|
|
3520
|
+
if (P)
|
|
3521
|
+
return JSON.stringify(P);
|
|
3522
|
+
}, R = Xe(
|
|
3523
|
+
(P) => Fe(N, P),
|
|
3524
|
+
O,
|
|
3525
|
+
O
|
|
3437
3526
|
);
|
|
3438
|
-
let
|
|
3439
|
-
return
|
|
3527
|
+
let E;
|
|
3528
|
+
return R ? E = JSON.parse(R) : i !== void 0 ? E = {
|
|
3440
3529
|
flexGrow: void 0,
|
|
3441
3530
|
flexShrink: void 0,
|
|
3442
3531
|
flexBasis: i
|
|
3443
|
-
} :
|
|
3532
|
+
} : E = { flexGrow: 1 }, /* @__PURE__ */ K(
|
|
3444
3533
|
"div",
|
|
3445
3534
|
{
|
|
3446
3535
|
...f,
|
|
3447
3536
|
"data-disabled": s || void 0,
|
|
3448
3537
|
"data-panel": !0,
|
|
3449
|
-
"data-testid":
|
|
3450
|
-
id:
|
|
3451
|
-
ref:
|
|
3538
|
+
"data-testid": p,
|
|
3539
|
+
id: p,
|
|
3540
|
+
ref: x,
|
|
3452
3541
|
style: {
|
|
3453
|
-
...
|
|
3542
|
+
...po,
|
|
3454
3543
|
display: "flex",
|
|
3455
3544
|
flexBasis: 0,
|
|
3456
3545
|
flexShrink: 1,
|
|
3457
3546
|
overflow: "visible",
|
|
3458
|
-
...
|
|
3547
|
+
...E
|
|
3459
3548
|
},
|
|
3460
|
-
children: /* @__PURE__ */
|
|
3549
|
+
children: /* @__PURE__ */ K(
|
|
3461
3550
|
"div",
|
|
3462
3551
|
{
|
|
3463
|
-
className:
|
|
3552
|
+
className: t,
|
|
3464
3553
|
style: {
|
|
3465
3554
|
maxHeight: "100%",
|
|
3466
3555
|
maxWidth: "100%",
|
|
@@ -3471,7 +3560,7 @@ function lo({
|
|
|
3471
3560
|
// but still allow users to scroll content within panels in the non-resizing direction
|
|
3472
3561
|
// NOTE This is not an inherited style
|
|
3473
3562
|
// See github.com/bvaughn/react-resizable-panels/issues/662
|
|
3474
|
-
touchAction:
|
|
3563
|
+
touchAction: D === "horizontal" ? "pan-y" : "pan-x"
|
|
3475
3564
|
},
|
|
3476
3565
|
children: e
|
|
3477
3566
|
}
|
|
@@ -3479,8 +3568,8 @@ function lo({
|
|
|
3479
3568
|
}
|
|
3480
3569
|
);
|
|
3481
3570
|
}
|
|
3482
|
-
|
|
3483
|
-
const
|
|
3571
|
+
mo.displayName = "Panel";
|
|
3572
|
+
const po = {
|
|
3484
3573
|
minHeight: 0,
|
|
3485
3574
|
maxHeight: "100%",
|
|
3486
3575
|
height: "auto",
|
|
@@ -3492,17 +3581,17 @@ const co = {
|
|
|
3492
3581
|
padding: 0,
|
|
3493
3582
|
margin: 0
|
|
3494
3583
|
};
|
|
3495
|
-
function
|
|
3496
|
-
return
|
|
3584
|
+
function Co() {
|
|
3585
|
+
return pe(null);
|
|
3497
3586
|
}
|
|
3498
|
-
function
|
|
3499
|
-
return
|
|
3587
|
+
function Ro() {
|
|
3588
|
+
return q(null);
|
|
3500
3589
|
}
|
|
3501
|
-
const
|
|
3502
|
-
function
|
|
3590
|
+
const ho = { flexBasis: "auto" }, go = { flexGrow: 0, flexShrink: 0 };
|
|
3591
|
+
function yo({
|
|
3503
3592
|
children: e,
|
|
3504
|
-
className:
|
|
3505
|
-
disabled:
|
|
3593
|
+
className: t,
|
|
3594
|
+
disabled: n,
|
|
3506
3595
|
disableDoubleClick: o,
|
|
3507
3596
|
elementRef: r,
|
|
3508
3597
|
id: i,
|
|
@@ -3510,52 +3599,52 @@ function mo({
|
|
|
3510
3599
|
style: l,
|
|
3511
3600
|
...a
|
|
3512
3601
|
}) {
|
|
3513
|
-
const c =
|
|
3602
|
+
const c = $e(i), {
|
|
3514
3603
|
disableCursor: u,
|
|
3515
3604
|
id: d,
|
|
3516
3605
|
orientation: g,
|
|
3517
3606
|
registerSeparator: m,
|
|
3518
3607
|
updateSeparatorProps: y
|
|
3519
|
-
} =
|
|
3520
|
-
return /* @__PURE__ */
|
|
3521
|
-
|
|
3608
|
+
} = Ze();
|
|
3609
|
+
return /* @__PURE__ */ K(
|
|
3610
|
+
sn,
|
|
3522
3611
|
{
|
|
3523
3612
|
attributes: a,
|
|
3524
3613
|
axisId: d,
|
|
3525
3614
|
axisOrientation: g,
|
|
3526
|
-
className:
|
|
3615
|
+
className: t,
|
|
3527
3616
|
disableCursor: u,
|
|
3528
|
-
disabled:
|
|
3617
|
+
disabled: n,
|
|
3529
3618
|
disableDoubleClick: o,
|
|
3530
3619
|
elementRef: r,
|
|
3531
3620
|
id: c,
|
|
3532
3621
|
preview: s,
|
|
3533
3622
|
registerSeparator: m,
|
|
3534
|
-
requiredStyle:
|
|
3623
|
+
requiredStyle: go,
|
|
3535
3624
|
style: l,
|
|
3536
|
-
styleDefaults:
|
|
3625
|
+
styleDefaults: ho,
|
|
3537
3626
|
updateSeparatorProps: y,
|
|
3538
3627
|
children: e
|
|
3539
3628
|
}
|
|
3540
3629
|
);
|
|
3541
3630
|
}
|
|
3542
|
-
|
|
3631
|
+
yo.displayName = "Separator";
|
|
3543
3632
|
export {
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3633
|
+
yn as Cell,
|
|
3634
|
+
Jn as Grid,
|
|
3635
|
+
an as Gridline,
|
|
3636
|
+
lo as Group,
|
|
3637
|
+
mo as Panel,
|
|
3638
|
+
yo as Separator,
|
|
3639
|
+
cn as SeparatorOverlay,
|
|
3640
|
+
Sn as isCoarsePointer,
|
|
3641
|
+
bo as useDefaultGridLayout,
|
|
3642
|
+
zo as useDefaultLayout,
|
|
3643
|
+
xo as useGridCallbackRef,
|
|
3644
|
+
wo as useGridRef,
|
|
3645
|
+
Io as useGroupCallbackRef,
|
|
3646
|
+
Lo as useGroupRef,
|
|
3647
|
+
Co as usePanelCallbackRef,
|
|
3648
|
+
Ro as usePanelRef
|
|
3560
3649
|
};
|
|
3561
3650
|
//# sourceMappingURL=react-resizable-panels.js.map
|