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