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