react-resizable-panels 4.15.1 → 4.15.3

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,16 +1,16 @@
1
1
  "use client";
2
- import { jsx as X, jsxs as Gn } from "react/jsx-runtime";
3
- import { useId as Nn, useLayoutEffect as cn, useEffect as je, useRef as H, useCallback as se, createContext as Ue, useContext as We, useState as ve, useMemo as pe, useImperativeHandle as St, useSyncExternalStore as at, Children as Fn, isValidElement as ln } from "react";
2
+ import { jsx as X, jsxs as On } from "react/jsx-runtime";
3
+ import { useId as Gn, useLayoutEffect as ln, useEffect as Ve, useRef as j, useCallback as se, createContext as Ue, useContext as We, useState as ve, useMemo as pe, useImperativeHandle as St, useSyncExternalStore as at, Children as Nn, isValidElement as un } from "react";
4
4
  function it(e) {
5
5
  return (typeof e == "number" || typeof e == "string") && e !== "";
6
6
  }
7
7
  function Ae(e) {
8
- const t = Nn();
8
+ const t = Gn();
9
9
  return it(e) ? `${e}` : t;
10
10
  }
11
- const re = typeof window < "u" ? cn : je;
12
- function we(e) {
13
- const t = H(e);
11
+ const re = typeof window < "u" ? ln : Ve;
12
+ function xe(e) {
13
+ const t = j(e);
14
14
  return re(() => {
15
15
  t.current = e;
16
16
  }, [e]), se(
@@ -19,7 +19,7 @@ function we(e) {
19
19
  );
20
20
  }
21
21
  function Ye(...e) {
22
- return we((t) => {
22
+ return xe((t) => {
23
23
  e.forEach((n) => {
24
24
  if (n)
25
25
  switch (typeof n) {
@@ -42,17 +42,17 @@ function Xe(e, t) {
42
42
  function ht(e, t) {
43
43
  return t ? e * 2 + 1 : e + 1;
44
44
  }
45
- function _n(e, t) {
45
+ function Fn(e, t) {
46
46
  return t ? e * 2 - 1 : e;
47
47
  }
48
- function Tt(e, t, n) {
48
+ function At(e, t, n) {
49
49
  const o = ht(e, n);
50
- return t === void 0 ? `${o} / -1` : `${o} / span ${_n(t, n)}`;
50
+ return t === void 0 ? `${o} / -1` : `${o} / span ${Fn(t, n)}`;
51
51
  }
52
- function Bn(e) {
52
+ function _n(e) {
53
53
  return `${e * 2} / span 1`;
54
54
  }
55
- function Hn({
55
+ function Bn({
56
56
  crossCount: e,
57
57
  crossSpan: t,
58
58
  crossStart: n,
@@ -71,15 +71,15 @@ function F(e, t = "Assertion error") {
71
71
  if (!e)
72
72
  throw Error(t);
73
73
  }
74
- const un = Ue(null);
75
- function dn() {
76
- const e = We(un);
74
+ const dn = Ue(null);
75
+ function fn() {
76
+ const e = We(dn);
77
77
  return F(
78
78
  e,
79
79
  "Grid Context not found; did you render a Cell or Gridline outside of a Grid?"
80
80
  ), e;
81
81
  }
82
- function qn({
82
+ function jn({
83
83
  children: e,
84
84
  className: t,
85
85
  column: n,
@@ -91,7 +91,7 @@ function qn({
91
91
  style: u,
92
92
  ...l
93
93
  }) {
94
- const c = Ae(i), { gutters: d, registerCell: p } = dn(), g = H(null), m = Ye(g, r);
94
+ const c = Ae(i), { gutters: d, registerCell: p } = fn(), g = j(null), m = Ye(g, r);
95
95
  return re(() => {
96
96
  const f = g.current;
97
97
  if (f !== null)
@@ -118,16 +118,18 @@ function qn({
118
118
  // Allow cells to shrink smaller than their content
119
119
  minHeight: 0,
120
120
  minWidth: 0,
121
- gridColumn: Tt(n, o, d.column),
122
- gridRow: Tt(s, a, d.row)
121
+ gridColumn: At(n, o, d.column),
122
+ gridRow: At(s, a, d.row)
123
123
  },
124
124
  children: e
125
125
  }
126
126
  );
127
127
  }
128
- qn.displayName = "Cell";
128
+ const Qo = /* @__PURE__ */ Object.assign(jn, {
129
+ displayName: "Cell"
130
+ });
129
131
  let et;
130
- function Vn() {
132
+ function Hn() {
131
133
  return et === void 0 && (typeof matchMedia == "function" ? et = !!matchMedia("(pointer:coarse)").matches : et = !1), et;
132
134
  }
133
135
  function gt({
@@ -135,7 +137,7 @@ function gt({
135
137
  axis: t,
136
138
  rect: n
137
139
  }) {
138
- const o = e ? Vn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
140
+ const o = e ? Hn() ? t.resizeTargetMinimumSize.coarse : t.resizeTargetMinimumSize.fine : 0;
139
141
  if (n.width < o) {
140
142
  const r = o - n.width;
141
143
  n = new DOMRect(
@@ -156,7 +158,7 @@ function gt({
156
158
  }
157
159
  return n;
158
160
  }
159
- function At({
161
+ function Dt({
160
162
  axis: e,
161
163
  cells: t,
162
164
  index: n,
@@ -182,7 +184,7 @@ function At({
182
184
  }
183
185
  return r;
184
186
  }
185
- function jn({
187
+ function qn({
186
188
  axis: e,
187
189
  cells: t,
188
190
  crossTrackCount: n,
@@ -194,81 +196,81 @@ function jn({
194
196
  }) {
195
197
  const { items: u, separators: l } = r, c = u.length;
196
198
  let d = -1, p = -1, g = 0;
197
- if (u.forEach((b, w) => {
198
- b.constraintProps.disabled || (g++, d === -1 && (d = w), p = w);
199
+ if (u.forEach((b, x) => {
200
+ b.constraintProps.disabled || (g++, d === -1 && (d = x), p = x);
199
201
  }), !s && g < 2)
200
202
  return [];
201
- const m = (b) => s || b > d && b <= p, f = [], y = (b, w, h) => ({
203
+ const m = (b) => s || b > d && b <= p, f = [], y = (b, x, h) => ({
202
204
  axis: r,
203
205
  axisSize: i,
204
206
  items: [u[b - 1], u[b]],
205
- rect: w,
207
+ rect: x,
206
208
  separator: h
207
- }), S = (b, w) => {
209
+ }), S = (b, x) => {
208
210
  let h;
209
- for (const I of t) {
210
- const L = e === "column" ? I.row : I.column, M = e === "column" ? I.rowSpan : I.columnSpan;
211
- if (w === "start" ? L === b : L + M - 1 === b) {
212
- const T = I.element.getBoundingClientRect();
213
- if (w === "start") {
214
- const E = e === "column" ? T.top : T.left;
215
- h = h === void 0 ? E : Math.min(h, E);
211
+ for (const C of t) {
212
+ const L = e === "column" ? C.row : C.column, M = e === "column" ? C.rowSpan : C.columnSpan;
213
+ if (x === "start" ? L === b : L + M - 1 === b) {
214
+ const T = C.element.getBoundingClientRect();
215
+ if (x === "start") {
216
+ const P = e === "column" ? T.top : T.left;
217
+ h = h === void 0 ? P : Math.min(h, P);
216
218
  } else {
217
- const E = e === "column" ? T.bottom : T.right;
218
- h = h === void 0 ? E : Math.max(h, E);
219
+ const P = e === "column" ? T.bottom : T.right;
220
+ h = h === void 0 ? P : Math.max(h, P);
219
221
  }
220
222
  }
221
223
  }
222
224
  return h;
223
225
  }, v = /* @__PURE__ */ new Set();
224
226
  for (const b of l) {
225
- const w = a.get(b);
226
- if (!w || w.index < 1 || w.index >= c || (v.add(w.index), !s && (b.disabled || b.element.hasAttribute("aria-disabled"))) || !m(w.index))
227
+ const x = a.get(b);
228
+ if (!x || x.index < 1 || x.index >= c || (v.add(x.index), !s && (b.disabled || b.element.hasAttribute("aria-disabled"))) || !m(x.index))
227
229
  continue;
228
230
  let h = b.element.getBoundingClientRect();
229
- const { crossSpan: I, crossStart: L } = w, M = I === void 0 ? n : L + I;
230
- let T = e === "column" ? h.top : h.left, E = e === "column" ? h.bottom : h.right;
231
+ const { crossSpan: C, crossStart: L } = x, M = C === void 0 ? n : L + C;
232
+ let T = e === "column" ? h.top : h.left, P = e === "column" ? h.bottom : h.right;
231
233
  if (L > 0) {
232
234
  const G = S(L - 1, "end");
233
235
  G !== void 0 && G < T && (T = G);
234
236
  }
235
237
  if (M < n) {
236
238
  const G = S(M, "start");
237
- G !== void 0 && G > E && (E = G);
239
+ G !== void 0 && G > P && (P = G);
238
240
  }
239
- h = e === "column" ? new DOMRect(h.x, T, h.width, E - T) : new DOMRect(T, h.y, E - T, h.height), h = gt({ expandHitTargets: o, axis: r, rect: h }), s ? f.push(y(w.index, h, b)) : At({
241
+ h = e === "column" ? new DOMRect(h.x, T, h.width, P - T) : new DOMRect(T, h.y, P - T, h.height), h = gt({ expandHitTargets: o, axis: r, rect: h }), s ? f.push(y(x.index, h, b)) : Dt({
240
242
  axis: e,
241
243
  cells: t,
242
- index: w.index,
244
+ index: x.index,
243
245
  rect: h
244
246
  }).forEach((G) => {
245
- f.push(y(w.index, G, b));
247
+ f.push(y(x.index, G, b));
246
248
  });
247
249
  }
248
- const z = (b, w) => {
249
- At({
250
+ const z = (b, x) => {
251
+ Dt({
250
252
  axis: e,
251
253
  cells: t,
252
254
  index: b,
253
- rect: gt({ expandHitTargets: o, axis: r, rect: w })
255
+ rect: gt({ expandHitTargets: o, axis: r, rect: x })
254
256
  }).forEach((h) => {
255
257
  f.push(y(b, h));
256
258
  });
257
- }, x = Array.from(
259
+ }, w = Array.from(
258
260
  { length: n },
259
261
  () => new Array(c)
260
262
  );
261
263
  for (const b of t) {
262
- const [w, h, I, L] = e === "column" ? [b.column, b.columnSpan, b.row, b.rowSpan] : [b.row, b.rowSpan, b.column, b.columnSpan];
263
- for (let M = Math.max(0, I); M < Math.min(n, I + L); M++)
264
- for (let T = Math.max(0, w); T < Math.min(c, w + h); T++)
265
- x[M][T] ??= b;
264
+ const [x, h, C, L] = e === "column" ? [b.column, b.columnSpan, b.row, b.rowSpan] : [b.row, b.rowSpan, b.column, b.columnSpan];
265
+ for (let M = Math.max(0, C); M < Math.min(n, C + L); M++)
266
+ for (let T = Math.max(0, x); T < Math.min(c, x + h); T++)
267
+ w[M][T] ??= b;
266
268
  }
267
269
  const R = /* @__PURE__ */ new Map(), k = (b) => {
268
- let w = R.get(b);
269
- if (!w) {
270
+ let x = R.get(b);
271
+ if (!x) {
270
272
  const h = b.element.getBoundingClientRect();
271
- w = e === "column" ? {
273
+ x = e === "column" ? {
272
274
  crossEnd: h.bottom,
273
275
  crossStart: h.top,
274
276
  end: h.right,
@@ -278,40 +280,40 @@ function jn({
278
280
  crossStart: h.left,
279
281
  end: h.bottom,
280
282
  start: h.top
281
- }, R.set(b, w);
283
+ }, R.set(b, x);
282
284
  }
283
- return w;
284
- }, O = ({ crossEnd: b, crossStart: w, end: h, start: I }) => e === "column" ? new DOMRect(I, w, h - I, b - w) : new DOMRect(w, I, b - w, h - I);
285
+ return x;
286
+ }, O = ({ crossEnd: b, crossStart: x, end: h, start: C }) => e === "column" ? new DOMRect(C, x, h - C, b - x) : new DOMRect(x, C, b - x, h - C);
285
287
  for (let b = 1; b < c; b++) {
286
288
  if (v.has(b) || !m(b))
287
289
  continue;
288
- let w;
290
+ let x;
289
291
  for (let h = 0; h < n; h++) {
290
- const I = x[h][b - 1], L = x[h][b];
292
+ const C = w[h][b - 1], L = w[h][b];
291
293
  let M;
292
- if ((I || L) && I !== L) {
293
- const T = I ? k(I) : void 0, E = L ? k(L) : void 0, G = T?.end ?? E.start, N = E?.start ?? T.end, P = Math.max(
294
+ if ((C || L) && C !== L) {
295
+ const T = C ? k(C) : void 0, P = L ? k(L) : void 0, G = T?.end ?? P.start, N = P?.start ?? T.end, E = Math.max(
294
296
  T?.crossStart ?? -1 / 0,
295
- E?.crossStart ?? -1 / 0
297
+ P?.crossStart ?? -1 / 0
296
298
  ), A = Math.min(
297
299
  T?.crossEnd ?? 1 / 0,
298
- E?.crossEnd ?? 1 / 0
300
+ P?.crossEnd ?? 1 / 0
299
301
  );
300
302
  M = {
301
- crossEnd: Math.max(P, A),
302
- crossStart: P,
303
+ crossEnd: Math.max(E, A),
304
+ crossStart: E,
303
305
  end: Math.max(G, N),
304
306
  start: Math.min(G, N)
305
307
  };
306
308
  }
307
- M ? w = w ? {
308
- crossEnd: Math.max(w.crossEnd, M.crossEnd),
309
- crossStart: Math.min(w.crossStart, M.crossStart),
310
- end: Math.max(w.end, M.end),
311
- start: Math.min(w.start, M.start)
312
- } : M : w && (z(b, O(w)), w = void 0);
313
- }
314
- w && z(b, O(w));
309
+ M ? x = x ? {
310
+ crossEnd: Math.max(x.crossEnd, M.crossEnd),
311
+ crossStart: Math.min(x.crossStart, M.crossStart),
312
+ end: Math.max(x.end, M.end),
313
+ start: Math.min(x.start, M.start)
314
+ } : M : x && (z(b, O(x)), x = void 0);
315
+ }
316
+ x && z(b, O(x));
315
317
  }
316
318
  return f;
317
319
  }
@@ -319,7 +321,7 @@ function fe(e) {
319
321
  const t = parseFloat(e ?? "");
320
322
  return Number.isFinite(t) ? t : 0;
321
323
  }
322
- function Un({
324
+ function Vn({
323
325
  axis: e,
324
326
  element: t,
325
327
  gutterSizes: n,
@@ -351,7 +353,7 @@ function Un({
351
353
  )
352
354
  };
353
355
  }
354
- function fn(e) {
356
+ function mn(e) {
355
357
  switch (typeof e) {
356
358
  case "number":
357
359
  return [e, "px"];
@@ -361,7 +363,7 @@ function fn(e) {
361
363
  }
362
364
  }
363
365
  }
364
- class mn {
366
+ class pn {
365
367
  #e = {};
366
368
  addListener(t, n) {
367
369
  const o = this.#e[t];
@@ -401,7 +403,7 @@ class mn {
401
403
  }
402
404
  }
403
405
  }
404
- function Wn(e) {
406
+ function Un(e) {
405
407
  const t = (o) => {
406
408
  o.preventDefault(), o.stopPropagation(), n();
407
409
  }, n = () => {
@@ -413,14 +415,14 @@ let Y = {
413
415
  cursorFlags: 0,
414
416
  state: "inactive"
415
417
  };
416
- const bt = new mn();
418
+ const bt = new pn();
417
419
  function ae() {
418
420
  return Y;
419
421
  }
420
- function xt(e) {
422
+ function wt(e) {
421
423
  return bt.addListener("change", e);
422
424
  }
423
- function Yn(e, t = [], n, o = !1) {
425
+ function Wn(e, t = [], n, o = !1) {
424
426
  const r = Y, i = { ...Y };
425
427
  i.cursorFlags = e, i.state === "active" && (i.didPointerMove ||= o, i.previews = t, n && (i.previewLayoutMap = n)), Y = i, bt.emit("change", {
426
428
  prev: r,
@@ -431,12 +433,12 @@ function he(e) {
431
433
  const t = Y;
432
434
  Y = e, t.state === "active" && e.state !== "active" && t.didPointerMove && (t.hitRegions.forEach(({ separator: n }) => {
433
435
  n && n.element.ownerDocument.activeElement === n.element && n.element.blur();
434
- }), Wn(t.ownerDocument)), bt.emit("change", {
436
+ }), Un(t.ownerDocument)), bt.emit("change", {
435
437
  prev: t,
436
438
  next: e
437
439
  });
438
440
  }
439
- function Xn(e) {
441
+ function Yn(e) {
440
442
  Y.state !== "active" || !Y.previews.some((t) => t.separator === e) || he({
441
443
  ...Y,
442
444
  previews: Y.previews.map(
@@ -444,7 +446,7 @@ function Xn(e) {
444
446
  )
445
447
  });
446
448
  }
447
- function Kn(e) {
449
+ function Xn(e) {
448
450
  if (Y.state === "inactive")
449
451
  return;
450
452
  const t = Y.hitRegions.filter((o) => o.axis !== e), n = Y.state === "active" && Y.previews.some((o) => o.axis === e);
@@ -464,13 +466,13 @@ function Kn(e) {
464
466
  } else
465
467
  he({ ...Y, hitRegions: t });
466
468
  }
467
- const Jn = (e) => e, pt = () => {
468
- }, pn = 1, hn = 2, gn = 4, yn = 8, $t = 3, Dt = 12;
469
+ const Kn = (e) => e, pt = () => {
470
+ }, hn = 1, gn = 2, yn = 4, Sn = 8, $t = 3, Ot = 12;
469
471
  let tt;
470
- function Ot() {
472
+ function Gt() {
471
473
  return tt === void 0 && (tt = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (tt = !0)), tt;
472
474
  }
473
- function Zn({
475
+ function Jn({
474
476
  cursorFlags: e,
475
477
  axes: t,
476
478
  state: n
@@ -496,8 +498,8 @@ function Zn({
496
498
  if (!(o === 0 && r === 0)) {
497
499
  switch (n) {
498
500
  case "active": {
499
- if (e && Ot()) {
500
- const i = (e & pn) !== 0, s = (e & hn) !== 0, a = (e & gn) !== 0, u = (e & yn) !== 0;
501
+ if (e && Gt()) {
502
+ const i = (e & hn) !== 0, s = (e & gn) !== 0, a = (e & yn) !== 0, u = (e & Sn) !== 0;
501
503
  if (i)
502
504
  return a ? "se-resize" : u ? "ne-resize" : "e-resize";
503
505
  if (s)
@@ -510,14 +512,14 @@ function Zn({
510
512
  break;
511
513
  }
512
514
  }
513
- return Ot() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
515
+ return Gt() ? o > 0 && r > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && r > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
514
516
  }
515
517
  }
516
- const Gt = /* @__PURE__ */ new WeakMap();
517
- function Nt(e) {
518
+ const Nt = /* @__PURE__ */ new WeakMap();
519
+ function Ft(e) {
518
520
  if (!e.defaultView || !e.adoptedStyleSheets)
519
521
  return;
520
- let { prevStyle: t, styleSheet: n } = Gt.get(e) ?? {};
522
+ let { prevStyle: t, styleSheet: n } = Nt.get(e) ?? {};
521
523
  n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets && (Object.isExtensible(e.adoptedStyleSheets) ? e.adoptedStyleSheets.push(n) : e.adoptedStyleSheets = [
522
524
  ...e.adoptedStyleSheets,
523
525
  n
@@ -526,7 +528,7 @@ function Nt(e) {
526
528
  switch (o.state !== "inactive" && o.ownerDocument !== e && (o = { cursorFlags: 0, state: "inactive" }), o.state) {
527
529
  case "active":
528
530
  case "hover": {
529
- const r = Zn({
531
+ const r = Jn({
530
532
  cursorFlags: o.cursorFlags,
531
533
  axes: o.hitRegions.map((s) => s.axis),
532
534
  state: o.state
@@ -541,20 +543,20 @@ function Nt(e) {
541
543
  break;
542
544
  }
543
545
  }
544
- Gt.set(e, {
546
+ Nt.set(e, {
545
547
  prevStyle: t,
546
548
  styleSheet: n
547
549
  });
548
550
  }
549
- function Ft(e) {
551
+ function _t(e) {
550
552
  return e.state === "inactive" ? void 0 : e.ownerDocument;
551
553
  }
552
- function Qn({
554
+ function Zn({
553
555
  next: e,
554
556
  prev: t
555
557
  }) {
556
- const n = Ft(t), o = Ft(e);
557
- n && n !== o && Nt(n), o && Nt(o);
558
+ const n = _t(t), o = _t(e);
559
+ n && n !== o && Ft(n), o && Ft(o);
558
560
  }
559
561
  function Ke({
560
562
  axis: e
@@ -562,28 +564,28 @@ function Ke({
562
564
  const { layoutStrategy: t, orientation: n, items: o } = e;
563
565
  return t ? t.calculateAvailableSize() : o.reduce((r, i) => (r += n === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r), 0);
564
566
  }
565
- function wt(e, t) {
567
+ function xt(e, t) {
566
568
  const n = e.compareDocumentPosition(t);
567
569
  return n & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
568
570
  }
569
571
  function _e(e, t) {
570
572
  return Array.from(t).sort((n, o) => {
571
- const r = e === "horizontal" ? eo(n, o) : to(n, o);
572
- return r !== 0 ? r : wt(n.element, o.element);
573
+ const r = e === "horizontal" ? Qn(n, o) : eo(n, o);
574
+ return r !== 0 ? r : xt(n.element, o.element);
573
575
  });
574
576
  }
575
- function eo(e, t) {
577
+ function Qn(e, t) {
576
578
  const n = e.element.offsetLeft - t.element.offsetLeft;
577
579
  return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
578
580
  }
579
- function to(e, t) {
581
+ function eo(e, t) {
580
582
  const n = e.element.offsetTop - t.element.offsetTop;
581
583
  return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
582
584
  }
583
585
  function yt(e) {
584
586
  return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
585
587
  }
586
- function Sn(e, t) {
588
+ function vn(e, t) {
587
589
  return {
588
590
  x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
589
591
  Math.abs(e.x - t.left),
@@ -595,7 +597,7 @@ function Sn(e, t) {
595
597
  )
596
598
  };
597
599
  }
598
- function no({
600
+ function to({
599
601
  orientation: e,
600
602
  rects: t,
601
603
  targetRect: n
@@ -606,7 +608,7 @@ function no({
606
608
  };
607
609
  let r, i = Number.MAX_VALUE;
608
610
  for (const s of t) {
609
- const { x: a, y: u } = Sn(o, s), l = e === "horizontal" ? a : u;
611
+ const { x: a, y: u } = vn(o, s), l = e === "horizontal" ? a : u;
610
612
  l < i && (i = l, r = s);
611
613
  }
612
614
  return F(r, "No rect found"), r;
@@ -638,22 +640,22 @@ function zt({
638
640
  if (v.hasAttribute("data-panel")) {
639
641
  S++;
640
642
  const z = i.find(
641
- (x) => x.element === v
643
+ (w) => w.element === v
642
644
  );
643
645
  if (z) {
644
646
  if (f) {
645
- const x = f.element.getBoundingClientRect(), R = v.getBoundingClientRect();
647
+ const w = f.element.getBoundingClientRect(), R = v.getBoundingClientRect();
646
648
  let k;
647
649
  if (c) {
648
650
  const O = r === "horizontal" ? new DOMRect(
649
- x.right,
650
- x.top,
651
+ w.right,
652
+ w.top,
651
653
  0,
652
- x.height
654
+ w.height
653
655
  ) : new DOMRect(
654
- x.left,
655
- x.bottom,
656
- x.width,
656
+ w.left,
657
+ w.bottom,
658
+ w.width,
657
659
  0
658
660
  ), b = r === "horizontal" ? new DOMRect(R.left, R.top, 0, R.height) : new DOMRect(R.left, R.top, R.width, 0);
659
661
  switch (y.length) {
@@ -665,14 +667,14 @@ function zt({
665
667
  break;
666
668
  }
667
669
  case 1: {
668
- const w = y[0], h = no({
670
+ const x = y[0], h = to({
669
671
  orientation: r,
670
- rects: [x, R],
671
- targetRect: w.element.getBoundingClientRect()
672
+ rects: [w, R],
673
+ targetRect: x.element.getBoundingClientRect()
672
674
  });
673
675
  k = [
674
- w,
675
- h === x ? b : O
676
+ x,
677
+ h === w ? b : O
676
678
  ];
677
679
  break;
678
680
  }
@@ -684,15 +686,15 @@ function zt({
684
686
  } else
685
687
  y.length ? k = y : k = [
686
688
  r === "horizontal" ? new DOMRect(
687
- x.right,
689
+ w.right,
688
690
  R.top,
689
- R.left - x.right,
691
+ R.left - w.right,
690
692
  R.height
691
693
  ) : new DOMRect(
692
694
  R.left,
693
- x.bottom,
695
+ w.bottom,
694
696
  R.width,
695
- R.top - x.bottom
697
+ R.top - w.bottom
696
698
  )
697
699
  ];
698
700
  for (const O of k) {
@@ -700,8 +702,8 @@ function zt({
700
702
  expandHitTargets: e,
701
703
  axis: t,
702
704
  rect: "width" in O ? O : O.element.getBoundingClientRect()
703
- }), w = S <= d || S > g;
704
- (n || !l && !w) && (p ??= Ke({ axis: t }), u.push({
705
+ }), x = S <= d || S > g;
706
+ (n || !l && !x) && (p ??= Ke({ axis: t }), u.push({
705
707
  axis: t,
706
708
  axisSize: p,
707
709
  items: [f, z],
@@ -715,7 +717,7 @@ function zt({
715
717
  } else if (v.hasAttribute("data-separator")) {
716
718
  v.ariaDisabled !== null && (l = !0);
717
719
  const z = s.find(
718
- (x) => x.element === v
720
+ (w) => w.element === v
719
721
  );
720
722
  z ? y.push(z) : (f = void 0, y = []);
721
723
  } else
@@ -723,19 +725,22 @@ function zt({
723
725
  }
724
726
  return u;
725
727
  }
726
- function oo(e, t) {
727
- const n = getComputedStyle(e), o = parseFloat(n.fontSize);
728
+ function Lt(e) {
729
+ return e.ownerDocument.defaultView ?? window;
730
+ }
731
+ function no(e, t) {
732
+ const n = Lt(e).getComputedStyle(e), o = parseFloat(n.fontSize);
728
733
  return t * o;
729
734
  }
730
- function ro(e, t) {
735
+ function oo(e, t) {
731
736
  const n = getComputedStyle(e.ownerDocument.documentElement), o = parseFloat(n.fontSize);
732
737
  return t * o;
733
738
  }
734
- function io(e) {
735
- return e / 100 * window.innerHeight;
739
+ function ro(e, t) {
740
+ return t / 100 * Lt(e).innerHeight;
736
741
  }
737
- function so(e) {
738
- return e / 100 * window.innerWidth;
742
+ function io(e, t) {
743
+ return t / 100 * Lt(e).innerWidth;
739
744
  }
740
745
  function Me({
741
746
  axisSize: e,
@@ -743,7 +748,7 @@ function Me({
743
748
  styleProp: n
744
749
  }) {
745
750
  let o;
746
- const [r, i] = fn(n);
751
+ const [r, i] = mn(n);
747
752
  switch (i) {
748
753
  case "%": {
749
754
  o = r / 100 * e;
@@ -754,19 +759,19 @@ function Me({
754
759
  break;
755
760
  }
756
761
  case "rem": {
757
- o = ro(t, r);
762
+ o = oo(t, r);
758
763
  break;
759
764
  }
760
765
  case "em": {
761
- o = oo(t, r);
766
+ o = no(t, r);
762
767
  break;
763
768
  }
764
769
  case "vh": {
765
- o = io(r);
770
+ o = ro(t, r);
766
771
  break;
767
772
  }
768
773
  case "vw": {
769
- o = so(r);
774
+ o = io(t, r);
770
775
  break;
771
776
  }
772
777
  }
@@ -775,7 +780,7 @@ function Me({
775
780
  function Q(e) {
776
781
  return parseFloat(e.toFixed(3));
777
782
  }
778
- function Lt(e, t = Ke({ axis: e })) {
783
+ function Ct(e, t = Ke({ axis: e })) {
779
784
  const { items: n } = e;
780
785
  return t === 0 ? n.map((o) => ({
781
786
  groupResizeBehavior: o.constraintProps.groupResizeBehavior,
@@ -847,14 +852,14 @@ function Lt(e, t = Ke({ axis: e })) {
847
852
  });
848
853
  }
849
854
  let me = /* @__PURE__ */ new Map();
850
- const It = new mn();
855
+ const It = new pn();
851
856
  let Be = 0;
852
857
  const nt = [];
853
858
  let ot;
854
859
  function ct() {
855
860
  Be++;
856
861
  }
857
- function Ct() {
862
+ function Rt() {
858
863
  for (let e = 0; e < nt.length; e++)
859
864
  try {
860
865
  It.emit("axisChange", nt[e]);
@@ -864,12 +869,12 @@ function Ct() {
864
869
  nt.length = 0;
865
870
  }
866
871
  function lt() {
867
- if (Be === 1 && Ct(), Be--, Be === 0 && ot) {
872
+ if (Be === 1 && Rt(), Be--, Be === 0 && ot) {
868
873
  const { error: e } = ot;
869
874
  throw ot = void 0, e;
870
875
  }
871
876
  }
872
- function ao(e) {
877
+ function so(e) {
873
878
  me = new Map(me), me.delete(e);
874
879
  }
875
880
  function Te(e, t) {
@@ -887,7 +892,7 @@ function ue(e, t) {
887
892
  function be() {
888
893
  return me;
889
894
  }
890
- function qe(e, t) {
895
+ function He(e, t) {
891
896
  return It.addListener("axisChange", (n) => {
892
897
  n.axis.id === e && t(n);
893
898
  });
@@ -903,14 +908,14 @@ function ge(e, t, n) {
903
908
  };
904
909
  Be > 0 ? nt.push(r) : It.emit("axisChange", r);
905
910
  }
906
- function vn(e, { pointerId: t, pointerType: n }) {
911
+ function bn(e, { pointerId: t, pointerType: n }) {
907
912
  return t === e.pointerId || // There is only one pen, but it may be assigned a new pointerId each time it comes into range
908
913
  n === "pen" && e.pointerType === "pen";
909
914
  }
910
915
  function ut(e, t, n = {}) {
911
- return e.ownerDocument === t && (n.pointerId === void 0 || vn(e, n));
916
+ return e.ownerDocument === t && (n.pointerId === void 0 || bn(e, n));
912
917
  }
913
- function co(e, t) {
918
+ function ao(e, t) {
914
919
  if (e.length !== t.length)
915
920
  return !1;
916
921
  for (let n = 0; n < e.length; n++)
@@ -924,7 +929,7 @@ function W(e, t, n = 0) {
924
929
  function oe(e, t) {
925
930
  return W(e, t) ? 0 : e > t ? 1 : -1;
926
931
  }
927
- function Ee({
932
+ function Pe({
928
933
  overrideDisabledItems: e,
929
934
  itemConstraints: t,
930
935
  prevSize: n,
@@ -948,7 +953,7 @@ function Ee({
948
953
  o = l;
949
954
  return o = Math.min(u, o), o = Q(o), o;
950
955
  }
951
- function Ve({
956
+ function qe({
952
957
  delta: e,
953
958
  initialLayout: t,
954
959
  itemConstraints: n,
@@ -984,8 +989,8 @@ function Ve({
984
989
  z != null,
985
990
  `Previous layout not found for panel index ${m}`
986
991
  ), W(z, y)) {
987
- const x = v - z;
988
- oe(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
992
+ const w = v - z;
993
+ oe(w, Math.abs(e)) > 0 && (e = e < 0 ? 0 - w : w);
989
994
  }
990
995
  }
991
996
  }
@@ -1006,8 +1011,8 @@ function Ve({
1006
1011
  z != null,
1007
1012
  `Previous layout not found for panel index ${m}`
1008
1013
  ), W(z, v)) {
1009
- const x = z - y;
1010
- oe(x, Math.abs(e)) > 0 && (e = e < 0 ? 0 - x : x);
1014
+ const w = z - y;
1015
+ oe(w, Math.abs(e)) > 0 && (e = e < 0 ? 0 - w : w);
1011
1016
  }
1012
1017
  }
1013
1018
  }
@@ -1019,12 +1024,12 @@ function Ve({
1019
1024
  f,
1020
1025
  `Panel constraints not found for index ${m}`
1021
1026
  );
1022
- const y = a[m], { collapsedSize: S, collapsedThreshold: v, collapsible: z, minSize: x } = f;
1023
- if (z && oe(y, x) < 0) {
1024
- const R = x - S, k = v ?? R / 2, O = y + Math.abs(e);
1025
- if (oe(O, x) < 0) {
1026
- const b = oe(Math.abs(e), k), w = v === void 0 && e < 0;
1027
- b > 0 || b === 0 && w ? e = e < 0 ? -R : R : e = 0;
1027
+ const y = a[m], { collapsedSize: S, collapsedThreshold: v, collapsible: z, minSize: w } = f;
1028
+ if (z && oe(y, w) < 0) {
1029
+ const R = w - S, k = v ?? R / 2, O = y + Math.abs(e);
1030
+ if (oe(O, w) < 0) {
1031
+ const b = oe(Math.abs(e), k), x = v === void 0 && e < 0;
1032
+ b > 0 || b === 0 && x ? e = e < 0 ? -R : R : e = 0;
1028
1033
  }
1029
1034
  }
1030
1035
  break;
@@ -1039,13 +1044,13 @@ function Ve({
1039
1044
  v != null,
1040
1045
  `Previous layout not found for panel index ${f}`
1041
1046
  );
1042
- const x = Ee({
1047
+ const w = Pe({
1043
1048
  overrideDisabledItems: s,
1044
1049
  itemConstraints: n[f],
1045
1050
  prevSize: v,
1046
1051
  size: 100
1047
1052
  }) - v;
1048
- if (y += x, f += m, f < 0 || f >= n.length)
1053
+ if (y += w, f += m, f < 0 || f >= n.length)
1049
1054
  break;
1050
1055
  }
1051
1056
  const S = Math.min(Math.abs(e), Math.abs(y));
@@ -1059,7 +1064,7 @@ function Ve({
1059
1064
  S != null,
1060
1065
  `Previous layout not found for panel index ${f}`
1061
1066
  );
1062
- const v = S - y, z = Ee({
1067
+ const v = S - y, z = Pe({
1063
1068
  overrideDisabledItems: s,
1064
1069
  itemConstraints: n[f],
1065
1070
  prevSize: S,
@@ -1072,7 +1077,7 @@ function Ve({
1072
1077
  e < 0 ? f-- : f++;
1073
1078
  }
1074
1079
  }
1075
- if (co(u, l))
1080
+ if (ao(u, l))
1076
1081
  return r;
1077
1082
  {
1078
1083
  const m = e < 0 ? d : c, f = a[m];
@@ -1080,29 +1085,29 @@ function Ve({
1080
1085
  f != null,
1081
1086
  `Previous layout not found for panel index ${m}`
1082
1087
  );
1083
- const y = f + p, S = Ee({
1088
+ const y = f + p, S = Pe({
1084
1089
  overrideDisabledItems: s,
1085
1090
  itemConstraints: n[m],
1086
1091
  prevSize: f,
1087
1092
  size: y
1088
1093
  });
1089
1094
  if (l[m] = S, !W(S, y)) {
1090
- let v = y - S, x = e < 0 ? d : c;
1091
- for (; x >= 0 && x < n.length; ) {
1092
- const R = l[x];
1095
+ let v = y - S, w = e < 0 ? d : c;
1096
+ for (; w >= 0 && w < n.length; ) {
1097
+ const R = l[w];
1093
1098
  F(
1094
1099
  R != null,
1095
- `Previous layout not found for panel index ${x}`
1100
+ `Previous layout not found for panel index ${w}`
1096
1101
  );
1097
- const k = R + v, O = Ee({
1102
+ const k = R + v, O = Pe({
1098
1103
  overrideDisabledItems: s,
1099
- itemConstraints: n[x],
1104
+ itemConstraints: n[w],
1100
1105
  prevSize: R,
1101
1106
  size: k
1102
1107
  });
1103
- if (W(R, O) || (v -= O - R, l[x] = O), W(v, 0))
1108
+ if (W(R, O) || (v -= O - R, l[w] = O), W(v, 0))
1104
1109
  break;
1105
- e > 0 ? x-- : x++;
1110
+ e > 0 ? w-- : w++;
1106
1111
  }
1107
1112
  }
1108
1113
  }
@@ -1120,15 +1125,15 @@ function le(e, t) {
1120
1125
  return !1;
1121
1126
  return !0;
1122
1127
  }
1123
- function Rt(e) {
1128
+ function Pt(e) {
1124
1129
  ct();
1125
1130
  try {
1126
- lo(e);
1131
+ co(e);
1127
1132
  } finally {
1128
1133
  lt();
1129
1134
  }
1130
1135
  }
1131
- function lo({
1136
+ function co({
1132
1137
  commit: e,
1133
1138
  event: t,
1134
1139
  hitRegions: n,
@@ -1150,48 +1155,48 @@ function lo({
1150
1155
  const { disableCursor: v } = m.mutableState;
1151
1156
  let z = 0;
1152
1157
  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;
1153
- const x = o.get(m), R = r.get(m);
1154
- if (!x || !R)
1158
+ const w = o.get(m), R = r.get(m);
1159
+ if (!w || !R)
1155
1160
  return;
1156
1161
  const {
1157
1162
  defaultLayoutDeferred: k,
1158
1163
  derivedItemConstraints: O,
1159
1164
  axisSize: b,
1160
- layout: w,
1165
+ layout: x,
1161
1166
  separatorToItems: h
1162
1167
  } = R;
1163
- if (O && w && h) {
1164
- const I = m.resizePreviewMode === "separator" ? c.get(m) ?? w : w, L = Ve({
1168
+ if (O && x && h) {
1169
+ const C = m.resizePreviewMode === "separator" ? c.get(m) ?? x : x, L = qe({
1165
1170
  delta: z,
1166
- initialLayout: x,
1171
+ initialLayout: w,
1167
1172
  itemConstraints: O,
1168
1173
  pivotIndices: g.items.map((M) => S.indexOf(M)),
1169
- prevLayout: I,
1174
+ prevLayout: C,
1170
1175
  trigger: "mouse-or-touch"
1171
1176
  });
1172
- if (m.resizePreviewMode === "separator" && !e && !le(L, I)) {
1177
+ if (m.resizePreviewMode === "separator" && !e && !le(L, C)) {
1173
1178
  c.set(m, L);
1174
1179
  let M = 0;
1175
- const T = S.map((E) => (M += L[E.id] - x[E.id], M * (f / 100)));
1176
- l = l.map((E) => {
1177
- if (E.axis !== m)
1178
- return E;
1179
- const G = T[E.itemIndex];
1180
- return G === E.offset ? E : { ...E, offset: G };
1180
+ const T = S.map((P) => (M += L[P.id] - w[P.id], M * (f / 100)));
1181
+ l = l.map((P) => {
1182
+ if (P.axis !== m)
1183
+ return P;
1184
+ const G = T[P.itemIndex];
1185
+ return G === P.offset ? P : { ...P, offset: G };
1181
1186
  });
1182
1187
  }
1183
- if (le(L, I) && z !== 0 && !v)
1188
+ if (le(L, C) && z !== 0 && !v)
1184
1189
  switch (y) {
1185
1190
  case "horizontal": {
1186
- a |= z < 0 ? pn : hn;
1191
+ a |= z < 0 ? hn : gn;
1187
1192
  break;
1188
1193
  }
1189
1194
  case "vertical": {
1190
- a |= z < 0 ? gn : yn;
1195
+ a |= z < 0 ? yn : Sn;
1191
1196
  break;
1192
1197
  }
1193
1198
  }
1194
- (m.resizePreviewMode !== "separator" || e) && !le(L, w) && ge(g.axis, {
1199
+ (m.resizePreviewMode !== "separator" || e) && !le(L, x) && ge(g.axis, {
1195
1200
  defaultLayoutDeferred: k,
1196
1201
  derivedItemConstraints: O,
1197
1202
  axisSize: b,
@@ -1203,18 +1208,18 @@ function lo({
1203
1208
  }
1204
1209
  });
1205
1210
  let d = 0;
1206
- t.movementX === 0 ? d |= s & $t : d |= a & $t, t.movementY === 0 ? d |= s & Dt : d |= a & Dt;
1211
+ t.movementX === 0 ? d |= s & $t : d |= a & $t, t.movementY === 0 ? d |= s & Ot : d |= a & Ot;
1207
1212
  const p = u.state === "active" && (t.clientX !== u.pointerDownAtPoint.x || t.clientY !== u.pointerDownAtPoint.y);
1208
- Yn(d, l, c, p);
1213
+ Wn(d, l, c, p);
1209
1214
  }
1210
- function bn(e, t) {
1215
+ function wn(e, t) {
1211
1216
  const n = ae();
1212
1217
  if (n.state !== "active" || !ut(n, e, t))
1213
1218
  return;
1214
1219
  const o = be();
1215
1220
  ct();
1216
1221
  try {
1217
- Rt({
1222
+ Pt({
1218
1223
  commit: !0,
1219
1224
  event: t,
1220
1225
  hitRegions: n.hitRegions,
@@ -1222,7 +1227,7 @@ function bn(e, t) {
1222
1227
  mountedAxes: o,
1223
1228
  pointerDownAtPoint: n.pointerDownAtPoint,
1224
1229
  prevCursorFlags: n.cursorFlags
1225
- }), Ct(), he({
1230
+ }), Rt(), he({
1226
1231
  cursorFlags: 0,
1227
1232
  state: "inactive"
1228
1233
  }), n.hitRegions.length > 0 && (t.preventDefault?.(), n.hitRegions.forEach((r) => {
@@ -1237,24 +1242,24 @@ function bn(e, t) {
1237
1242
  lt();
1238
1243
  }
1239
1244
  }
1240
- function _t(e) {
1245
+ function Bt(e) {
1241
1246
  if (e.defaultPrevented)
1242
1247
  return;
1243
1248
  const { clientX: t, clientY: n, movementX: o, movementY: r } = e;
1244
- bn(e.currentTarget, {
1249
+ wn(e.currentTarget, {
1245
1250
  clientX: t,
1246
1251
  clientY: n,
1247
1252
  movementX: o,
1248
1253
  movementY: r
1249
1254
  });
1250
1255
  }
1251
- function uo(e, t, n) {
1256
+ function lo(e, t, n) {
1252
1257
  let o, r = {
1253
1258
  x: 1 / 0,
1254
1259
  y: 1 / 0
1255
1260
  };
1256
1261
  for (const i of t) {
1257
- const s = Sn(n, i.rect);
1262
+ const s = vn(n, i.rect);
1258
1263
  switch (e) {
1259
1264
  case "horizontal": {
1260
1265
  (s.x < r.x || s.x === r.x && s.y <= r.y) && (o = i, r = s);
@@ -1271,10 +1276,10 @@ function uo(e, t, n) {
1271
1276
  hitRegion: o
1272
1277
  } : void 0;
1273
1278
  }
1274
- function fo(e) {
1279
+ function uo(e) {
1275
1280
  return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
1276
1281
  }
1277
- function mo(e, t) {
1282
+ function fo(e, t) {
1278
1283
  if (e === t) throw new Error("Cannot compare node with itself");
1279
1284
  const n = {
1280
1285
  a: qt(e),
@@ -1288,8 +1293,8 @@ function mo(e, t) {
1288
1293
  "Stacking order can only be calculated for elements with a common ancestor"
1289
1294
  );
1290
1295
  const r = {
1291
- a: Ht(Bt(n.a)),
1292
- b: Ht(Bt(n.b))
1296
+ a: Ht(jt(n.a)),
1297
+ b: Ht(jt(n.b))
1293
1298
  };
1294
1299
  if (r.a === r.b) {
1295
1300
  const i = o.childNodes, s = {
@@ -1305,20 +1310,20 @@ function mo(e, t) {
1305
1310
  }
1306
1311
  return Math.sign(r.a - r.b);
1307
1312
  }
1308
- const po = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
1309
- function ho(e) {
1313
+ const mo = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
1314
+ function po(e) {
1310
1315
  const t = getComputedStyle(xn(e) ?? e).display;
1311
1316
  return t === "flex" || t === "inline-flex";
1312
1317
  }
1313
- function go(e) {
1318
+ function ho(e) {
1314
1319
  const t = getComputedStyle(e);
1315
- return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || ho(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" || po.test(t.willChange) || t.webkitOverflowScrolling === "touch");
1320
+ return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || po(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" || mo.test(t.willChange) || t.webkitOverflowScrolling === "touch");
1316
1321
  }
1317
- function Bt(e) {
1322
+ function jt(e) {
1318
1323
  let t = e.length;
1319
1324
  for (; t--; ) {
1320
1325
  const n = e[t];
1321
- if (F(n, "Missing node"), go(n)) return n;
1326
+ if (F(n, "Missing node"), ho(n)) return n;
1322
1327
  }
1323
1328
  return null;
1324
1329
  }
@@ -1333,36 +1338,36 @@ function qt(e) {
1333
1338
  }
1334
1339
  function xn(e) {
1335
1340
  const { parentNode: t } = e;
1336
- return fo(t) ? t.host : t;
1341
+ return uo(t) ? t.host : t;
1337
1342
  }
1338
- function yo(e, t) {
1343
+ function go(e, t) {
1339
1344
  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;
1340
1345
  }
1341
- function So(e) {
1346
+ function yo(e) {
1342
1347
  try {
1343
1348
  return e.matches(":modal");
1344
1349
  } catch {
1345
1350
  return !1;
1346
1351
  }
1347
1352
  }
1348
- function vo({
1353
+ function So({
1349
1354
  axisElement: e,
1350
1355
  hitRegion: t,
1351
1356
  pointerEventTarget: n
1352
1357
  }) {
1353
1358
  if (yt(n)) {
1354
1359
  const o = n.closest("dialog");
1355
- if (o && !o.contains(e) && So(o))
1360
+ if (o && !o.contains(e) && yo(o))
1356
1361
  return !1;
1357
1362
  }
1358
1363
  if (!yt(n) || n.contains(e) || e.contains(n) || !n.isConnected || !e.isConnected)
1359
1364
  return !0;
1360
- if (mo(n, e) > 0) {
1365
+ if (fo(n, e) > 0) {
1361
1366
  let o = n;
1362
1367
  for (; o; ) {
1363
1368
  if (o.contains(e))
1364
1369
  return !0;
1365
- if (yo(o.getBoundingClientRect(), t))
1370
+ if (go(o.getBoundingClientRect(), t))
1366
1371
  return !1;
1367
1372
  o = o.parentElement;
1368
1373
  }
@@ -1374,18 +1379,18 @@ function Et(e, t, n) {
1374
1379
  return t.forEach((r, i) => {
1375
1380
  if (i.disabled || i.element.ownerDocument !== n)
1376
1381
  return;
1377
- const s = zt({ axis: i }), a = uo(i.orientation, s, {
1382
+ const s = zt({ axis: i }), a = lo(i.orientation, s, {
1378
1383
  x: e.clientX,
1379
1384
  y: e.clientY
1380
1385
  });
1381
- a && a.distance.x <= 0 && a.distance.y <= 0 && vo({
1386
+ a && a.distance.x <= 0 && a.distance.y <= 0 && So({
1382
1387
  axisElement: i.element,
1383
1388
  hitRegion: a.hitRegion.rect,
1384
1389
  pointerEventTarget: e.target
1385
1390
  }) && o.push(a.hitRegion);
1386
1391
  }), o;
1387
1392
  }
1388
- function bo(e) {
1393
+ function vo(e) {
1389
1394
  let t = 0, n = 0;
1390
1395
  const o = {};
1391
1396
  for (const i of e)
@@ -1403,7 +1408,7 @@ function bo(e) {
1403
1408
  }
1404
1409
  return o;
1405
1410
  }
1406
- function xo(e, t) {
1411
+ function bo(e, t) {
1407
1412
  const n = e.map((r) => r.id), o = Object.keys(t);
1408
1413
  if (n.length !== o.length)
1409
1414
  return !1;
@@ -1412,14 +1417,14 @@ function xo(e, t) {
1412
1417
  return !1;
1413
1418
  return !0;
1414
1419
  }
1415
- function wn({
1420
+ function zn({
1416
1421
  axis: e,
1417
1422
  itemConstraints: t
1418
1423
  }) {
1419
1424
  const n = e.items.map(({ id: r }) => r).join(","), o = e.mutableState.defaultLayout;
1420
- return e.mutableState.layouts[n] ?? (o && xo(e.items, o) ? o : bo(t));
1425
+ return e.mutableState.layouts[n] ?? (o && bo(e.items, o) ? o : vo(t));
1421
1426
  }
1422
- function zn(e, t) {
1427
+ function Ln(e, t) {
1423
1428
  if (Object.keys(e).length !== Object.keys(t).length)
1424
1429
  return !1;
1425
1430
  for (const o in e)
@@ -1428,7 +1433,7 @@ function zn(e, t) {
1428
1433
  return !0;
1429
1434
  }
1430
1435
  function wo(e, t) {
1431
- return e.length !== t.length ? !1 : e.every((n, o) => zn(n, t[o]));
1436
+ return e.length !== t.length ? !1 : e.every((n, o) => Ln(n, t[o]));
1432
1437
  }
1433
1438
  function ze({
1434
1439
  layout: e,
@@ -1455,7 +1460,7 @@ function ze({
1455
1460
  F(a != null, `No layout data found for index ${s}`);
1456
1461
  const u = o[s];
1457
1462
  F(u != null, `No layout data found for index ${s}`);
1458
- const l = Ee({
1463
+ const l = Pe({
1459
1464
  overrideDisabledItems: !0,
1460
1465
  itemConstraints: t[s],
1461
1466
  prevSize: a,
@@ -1467,7 +1472,7 @@ function ze({
1467
1472
  for (let s = 0; s < t.length; s++) {
1468
1473
  const a = o[s];
1469
1474
  F(a != null, `No layout data found for index ${s}`);
1470
- const u = a + i, l = Ee({
1475
+ const u = a + i, l = Pe({
1471
1476
  overrideDisabledItems: !0,
1472
1477
  itemConstraints: t[s],
1473
1478
  prevSize: a,
@@ -1478,7 +1483,7 @@ function ze({
1478
1483
  }
1479
1484
  return o.reduce((s, a, u) => (s[t[u].itemId] = a, s), {});
1480
1485
  }
1481
- function Ln({
1486
+ function Cn({
1482
1487
  itemIds: e,
1483
1488
  layout: t
1484
1489
  }) {
@@ -1495,7 +1500,7 @@ function Ln({
1495
1500
  }))
1496
1501
  });
1497
1502
  }
1498
- function zo({
1503
+ function xo({
1499
1504
  axis: e,
1500
1505
  nextAxisSize: t,
1501
1506
  prevAxisSize: n,
@@ -1542,23 +1547,23 @@ function zo({
1542
1547
  }
1543
1548
  return c;
1544
1549
  }
1545
- function Pt({
1550
+ function Mt({
1546
1551
  axis: e,
1547
1552
  axisState: t
1548
1553
  }) {
1549
1554
  const n = Ke({ axis: e });
1550
1555
  if (n === 0)
1551
1556
  return;
1552
- const o = Lt(e, n);
1557
+ const o = Ct(e, n);
1553
1558
  let r = t.requestedAxisSize, i = t.requestedLayout;
1554
- t.defaultLayoutDeferred && (r = n, i = Ln({
1559
+ t.defaultLayoutDeferred && (r = n, i = Cn({
1555
1560
  itemIds: e.items.map(({ id: l }) => l),
1556
- layout: wn({
1561
+ layout: zn({
1557
1562
  axis: e,
1558
1563
  itemConstraints: o
1559
1564
  })
1560
1565
  }));
1561
- const s = zo({
1566
+ const s = xo({
1562
1567
  axis: e,
1563
1568
  nextAxisSize: n,
1564
1569
  prevAxisSize: r,
@@ -1583,7 +1588,7 @@ function Pt({
1583
1588
  }
1584
1589
  };
1585
1590
  }
1586
- function Mt({
1591
+ function kt({
1587
1592
  axisId: e,
1588
1593
  itemId: t
1589
1594
  }) {
@@ -1601,7 +1606,7 @@ function Mt({
1601
1606
  return l;
1602
1607
  throw Error(`Panel constraints not found for Panel ${t}`);
1603
1608
  }, r = () => {
1604
- const { axis: l, ...c } = n(), d = Pt({ axis: l, axisState: c }), p = d?.state ?? c, g = p.derivedItemConstraints.find(
1609
+ const { axis: l, ...c } = n(), d = Mt({ axis: l, axisState: c }), p = d?.state ?? c, g = p.derivedItemConstraints.find(
1605
1610
  (f) => f.itemId === t
1606
1611
  );
1607
1612
  if (g === void 0)
@@ -1634,49 +1639,49 @@ function Mt({
1634
1639
  derivedItemConstraints: g
1635
1640
  }) => {
1636
1641
  const m = p[t], f = d.findIndex((h) => h.id === t), y = f === 0, S = f === d.length - 1;
1637
- if (S && c < m && (y || d.slice(0, f).every((h, I) => {
1638
- const L = g[I];
1642
+ if (S && c < m && (y || d.slice(0, f).every((h, C) => {
1643
+ const L = g[C];
1639
1644
  return L?.collapsible && W(L.collapsedSize, p[L.itemId]);
1640
1645
  }))) {
1641
- const h = d.slice(0, f).reduce((I, L) => I + p[L.id], 0);
1646
+ const h = d.slice(0, f).reduce((C, L) => C + p[L.id], 0);
1642
1647
  return {
1643
1648
  ...p,
1644
1649
  [t]: Q(100 - h)
1645
1650
  };
1646
1651
  }
1647
- const z = g[f], x = Ee({
1652
+ const z = g[f], w = Pe({
1648
1653
  overrideDisabledItems: !0,
1649
1654
  itemConstraints: z,
1650
1655
  prevSize: m,
1651
1656
  size: c
1652
1657
  }), R = { ...p };
1653
- let k = x - m;
1658
+ let k = w - m;
1654
1659
  for (const h of y ? [1] : S ? [-1] : [1, -1])
1655
- for (let I = f + h; I >= 0 && I < d.length && !W(k, 0); I += h) {
1656
- const L = g[I], M = R[L.itemId];
1660
+ for (let C = f + h; C >= 0 && C < d.length && !W(k, 0); C += h) {
1661
+ const L = g[C], M = R[L.itemId];
1657
1662
  if (st(L, R) || (k > 0 ? oe(M, L.minSize) <= 0 : oe(M, L.maxSize) >= 0))
1658
1663
  continue;
1659
1664
  const T = k > 0 ? Math.max(L.minSize, M - k) : Math.min(L.maxSize, M - k);
1660
1665
  k -= M - T, R[L.itemId] = Q(T);
1661
1666
  }
1662
- if (R[t] = Q(x - k), W(k, 0) || l && oe(R[t], z.minSize) >= 0)
1667
+ if (R[t] = Q(w - k), W(k, 0) || l && oe(R[t], z.minSize) >= 0)
1663
1668
  return R;
1664
- const O = (h, I, L) => {
1669
+ const O = (h, C, L) => {
1665
1670
  const M = h === "after" ? 1 : -1, T = (G) => {
1666
1671
  for (let N = f + M; N >= 0 && N < d.length; N += M) {
1667
- const P = g[N];
1668
- if (!st(P, I) && G(P))
1672
+ const E = g[N];
1673
+ if (!st(E, C) && G(E))
1669
1674
  return N;
1670
1675
  }
1671
- }, E = T(
1672
- ({ itemId: G, maxSize: N, minSize: P }) => L > 0 ? oe(I[G], P) > 0 : oe(I[G], N) < 0
1676
+ }, P = T(
1677
+ ({ itemId: G, maxSize: N, minSize: E }) => L > 0 ? oe(C[G], E) > 0 : oe(C[G], N) < 0
1673
1678
  ) ?? T(() => !0) ?? f + M;
1674
- return Ve({
1679
+ return qe({
1675
1680
  delta: h === "after" ? L : -L,
1676
- initialLayout: I,
1681
+ initialLayout: C,
1677
1682
  itemConstraints: g,
1678
- pivotIndices: h === "after" ? [f, E] : [E, f],
1679
- prevLayout: I,
1683
+ pivotIndices: h === "after" ? [f, P] : [P, f],
1684
+ prevLayout: C,
1680
1685
  trigger: "imperative-api"
1681
1686
  });
1682
1687
  };
@@ -1687,17 +1692,17 @@ function Mt({
1687
1692
  c - m
1688
1693
  );
1689
1694
  const b = (h) => {
1690
- const I = O(h, p, c - m), L = c - I[t];
1691
- return W(L, 0) ? I : O(
1695
+ const C = O(h, p, c - m), L = c - C[t];
1696
+ return W(L, 0) ? C : O(
1692
1697
  h === "after" ? "before" : "after",
1693
- I,
1698
+ C,
1694
1699
  L
1695
1700
  );
1696
- }, w = b("after");
1701
+ }, x = b("after");
1697
1702
  if (Vt({
1698
1703
  itemConstraints: g,
1699
1704
  itemId: t,
1700
- nextLayout: w,
1705
+ nextLayout: x,
1701
1706
  prevLayout: p
1702
1707
  })) {
1703
1708
  const h = b("before");
@@ -1709,7 +1714,7 @@ function Mt({
1709
1714
  }))
1710
1715
  return h;
1711
1716
  }
1712
- return w;
1717
+ return x;
1713
1718
  }, u = (l, { axis: c, changed: d, itemSize: p, state: g }, { allowPartialSize: m = !1 } = {}) => {
1714
1719
  if (l === p)
1715
1720
  return;
@@ -1776,7 +1781,7 @@ function Vt({
1776
1781
  (r) => r.itemId !== t && st(r, o) !== st(r, n)
1777
1782
  );
1778
1783
  }
1779
- function jt(e) {
1784
+ function Ut(e) {
1780
1785
  if (e.defaultPrevented)
1781
1786
  return;
1782
1787
  const t = be();
@@ -1790,7 +1795,7 @@ function jt(e) {
1790
1795
  (i) => i.constraintProps.defaultSize !== void 0
1791
1796
  );
1792
1797
  if (r) {
1793
- const i = r.constraintProps.defaultSize, s = Mt({
1798
+ const i = r.constraintProps.defaultSize, s = kt({
1794
1799
  axisId: o.axis.id,
1795
1800
  itemId: r.id
1796
1801
  });
@@ -1808,7 +1813,7 @@ function In(e) {
1808
1813
  return n;
1809
1814
  throw Error("Could not find parent Group for separator element");
1810
1815
  }
1811
- function He({
1816
+ function je({
1812
1817
  axisId: e
1813
1818
  }) {
1814
1819
  const t = () => {
@@ -1824,7 +1829,7 @@ function He({
1824
1829
  return n ? {} : o;
1825
1830
  },
1826
1831
  setLayout(n) {
1827
- const { axis: o, ...r } = t(), i = Pt({ axis: o, axisState: r }), s = i?.state ?? r, {
1832
+ const { axis: o, ...r } = t(), i = Mt({ axis: o, axisState: r }), s = i?.state ?? r, {
1828
1833
  defaultLayoutDeferred: a,
1829
1834
  derivedItemConstraints: u,
1830
1835
  axisSize: l,
@@ -1849,7 +1854,7 @@ function Re(e, t) {
1849
1854
  F(r, "Matching separator not found");
1850
1855
  const i = o.separatorToItems.get(r);
1851
1856
  F(i, "Matching panels not found");
1852
- const s = i.map((d) => n.items.indexOf(d)), u = He({ axisId: n.id }).getLayout(), l = Ve({
1857
+ const s = i.map((d) => n.items.indexOf(d)), u = je({ axisId: n.id }).getLayout(), l = qe({
1853
1858
  delta: t,
1854
1859
  initialLayout: u,
1855
1860
  itemConstraints: o.derivedItemConstraints,
@@ -1878,10 +1883,10 @@ function Re(e, t) {
1878
1883
  { isUserInteraction: !0 }
1879
1884
  );
1880
1885
  }
1881
- function Lo(e) {
1886
+ function zo(e) {
1882
1887
  return e.separators.filter((t) => !t.disabled);
1883
1888
  }
1884
- function Ut(e) {
1889
+ function Wt(e) {
1885
1890
  if (e.defaultPrevented)
1886
1891
  return;
1887
1892
  const t = e.currentTarget, n = In(t);
@@ -1928,7 +1933,7 @@ function Ut(e) {
1928
1933
  }
1929
1934
  case "F6": {
1930
1935
  e.preventDefault();
1931
- const r = Lo(n).map(
1936
+ const r = zo(n).map(
1932
1937
  (u) => u.element
1933
1938
  ), i = r.findIndex(
1934
1939
  (u) => u === e.currentTarget
@@ -1946,7 +1951,7 @@ function Ut(e) {
1946
1951
  }
1947
1952
  }
1948
1953
  }
1949
- function $e(e, t) {
1954
+ function De(e, t) {
1950
1955
  const n = ae();
1951
1956
  if (n.state !== "active" || !ut(n, e, t))
1952
1957
  return !1;
@@ -1961,7 +1966,7 @@ function $e(e, t) {
1961
1966
  requestedAxisSize: s.axisSize,
1962
1967
  requestedLayout: r
1963
1968
  });
1964
- }), Ct(), he({
1969
+ }), Rt(), he({
1965
1970
  cursorFlags: 0,
1966
1971
  state: "inactive"
1967
1972
  }), n.hitRegions.forEach((r) => {
@@ -1977,7 +1982,7 @@ function $e(e, t) {
1977
1982
  }
1978
1983
  return !0;
1979
1984
  }
1980
- function Wt(e) {
1985
+ function Yt(e) {
1981
1986
  const t = ae();
1982
1987
  if (t.state !== "active")
1983
1988
  return;
@@ -1986,12 +1991,12 @@ function Wt(e) {
1986
1991
  );
1987
1992
  !n.some((o) => o === e.target) || n.some(
1988
1993
  (o) => o.hasPointerCapture?.(e.pointerId)
1989
- ) || $e(e.currentTarget, e);
1994
+ ) || De(e.currentTarget, e);
1990
1995
  }
1991
- function Yt(e) {
1992
- $e(e.currentTarget, e);
1996
+ function Xt(e) {
1997
+ De(e.currentTarget, e);
1993
1998
  }
1994
- function Io(e, t) {
1999
+ function Lo(e, t) {
1995
2000
  const { element: n, orientation: o, items: r } = e, i = n.getBoundingClientRect(), s = o === "horizontal";
1996
2001
  return zt({
1997
2002
  expandHitTargets: !1,
@@ -2022,14 +2027,14 @@ function Io(e, t) {
2022
2027
  };
2023
2028
  });
2024
2029
  }
2025
- function Xt(e) {
2030
+ function Kt(e) {
2026
2031
  if (e.defaultPrevented)
2027
2032
  return;
2028
2033
  if (e.pointerType === "mouse" && e.button > 0)
2029
2034
  return;
2030
2035
  const t = ae();
2031
2036
  if (t.state === "active") {
2032
- vn(t, e) && $e(
2037
+ bn(t, e) && De(
2033
2038
  t.ownerDocument,
2034
2039
  t
2035
2040
  );
@@ -2054,7 +2059,7 @@ function Xt(e) {
2054
2059
  u && r.set(a.axis, u.layout);
2055
2060
  });
2056
2061
  const s = Array.from(r.keys()).flatMap(
2057
- (a) => a.resizePreviewMode === "separator" ? Io(a, o) : []
2062
+ (a) => a.resizePreviewMode === "separator" ? Lo(a, o) : []
2058
2063
  );
2059
2064
  he({
2060
2065
  cursorFlags: 0,
@@ -2070,13 +2075,13 @@ function Xt(e) {
2070
2075
  state: "active"
2071
2076
  }), e.preventDefault();
2072
2077
  }
2073
- function Kt(e) {
2078
+ function Jt(e) {
2074
2079
  const t = e.currentTarget, n = be(), o = ae();
2075
2080
  switch (o.state) {
2076
2081
  case "active": {
2077
2082
  if (!ut(o, t, e))
2078
2083
  return;
2079
- Rt({
2084
+ Pt({
2080
2085
  commit: !1,
2081
2086
  event: e,
2082
2087
  hitRegions: o.hitRegions,
@@ -2087,7 +2092,7 @@ function Kt(e) {
2087
2092
  }
2088
2093
  }
2089
2094
  }
2090
- function Jt(e) {
2095
+ function Zt(e) {
2091
2096
  if (e.defaultPrevented)
2092
2097
  return;
2093
2098
  const t = e.currentTarget, n = ae(), o = be();
@@ -2099,7 +2104,7 @@ function Jt(e) {
2099
2104
  // Skip this check for "pointerleave" events, else Firefox triggers a false positive (see #514)
2100
2105
  e.buttons === 0
2101
2106
  ) {
2102
- $e(t, e);
2107
+ De(t, e);
2103
2108
  return;
2104
2109
  }
2105
2110
  for (const r of n.hitRegions)
@@ -2107,7 +2112,7 @@ function Jt(e) {
2107
2112
  const { element: i } = r.separator;
2108
2113
  i.isConnected && !i.hasPointerCapture?.(e.pointerId) && i.setPointerCapture?.(e.pointerId);
2109
2114
  }
2110
- Rt({
2115
+ Pt({
2111
2116
  commit: !1,
2112
2117
  event: e,
2113
2118
  hitRegions: n.hitRegions,
@@ -2137,7 +2142,7 @@ function Jt(e) {
2137
2142
  }
2138
2143
  }
2139
2144
  }
2140
- function Zt(e) {
2145
+ function Qt(e) {
2141
2146
  if (e.relatedTarget instanceof HTMLIFrameElement) {
2142
2147
  const t = ae();
2143
2148
  switch (t.state) {
@@ -2149,14 +2154,14 @@ function Zt(e) {
2149
2154
  }
2150
2155
  }
2151
2156
  }
2152
- function Qt(e) {
2153
- e.defaultPrevented || e.pointerType === "mouse" && e.button > 0 || bn(e.currentTarget, e);
2154
- }
2155
2157
  function en(e) {
2156
- e.target === e.currentTarget && $e(e.currentTarget.document);
2158
+ e.defaultPrevented || e.pointerType === "mouse" && e.button > 0 || wn(e.currentTarget, e);
2157
2159
  }
2158
2160
  function tn(e) {
2159
- $e(e.currentTarget.document);
2161
+ e.target === e.currentTarget && De(e.currentTarget.document);
2162
+ }
2163
+ function nn(e) {
2164
+ De(e.currentTarget.document);
2160
2165
  }
2161
2166
  function Co(e, t, n) {
2162
2167
  if (!n[0])
@@ -2170,9 +2175,9 @@ function Co(e, t, n) {
2170
2175
  };
2171
2176
  r.mutableValues.prevSize = u, r.onResize(u, r.id, a);
2172
2177
  }
2173
- const Pe = /* @__PURE__ */ new Map();
2174
- let nn = !1;
2175
- function Cn(e) {
2178
+ const Ee = /* @__PURE__ */ new Map();
2179
+ let on = !1;
2180
+ function Rn(e) {
2176
2181
  let t = !0;
2177
2182
  F(
2178
2183
  e.element.ownerDocument.defaultView,
@@ -2189,12 +2194,12 @@ function Cn(e) {
2189
2194
  const z = ue(e.id);
2190
2195
  if (!z)
2191
2196
  break;
2192
- const x = Pt({ axis: e, axisState: z });
2193
- if (!x)
2197
+ const w = Mt({ axis: e, axisState: z });
2198
+ if (!w)
2194
2199
  break;
2195
- if (!x.changed)
2200
+ if (!w.changed)
2196
2201
  continue;
2197
- ge(e, x.state);
2202
+ ge(e, w.state);
2198
2203
  }
2199
2204
  } else
2200
2205
  try {
@@ -2215,16 +2220,16 @@ function Cn(e) {
2215
2220
  `Panel ids must be unique; id "${m.id}" was used more than once`
2216
2221
  ), o.add(m.id), m.onResize && i.observe(m.element);
2217
2222
  });
2218
- const s = Ke({ axis: e }), a = Lt(e, s), u = wn({
2223
+ const s = Ke({ axis: e }), a = Ct(e, s), u = zn({
2219
2224
  axis: e,
2220
2225
  itemConstraints: a
2221
2226
  }), l = ze({
2222
2227
  layout: u,
2223
2228
  itemConstraints: a
2224
2229
  }), c = e.element.ownerDocument, d = c.defaultView;
2225
- Pe.set(
2230
+ Ee.set(
2226
2231
  c,
2227
- (Pe.get(c) ?? 0) + 1
2232
+ (Ee.get(c) ?? 0) + 1
2228
2233
  );
2229
2234
  const p = /* @__PURE__ */ new Map();
2230
2235
  return zt({ axis: e, includeDisabled: !0 }).forEach((m) => {
@@ -2235,7 +2240,7 @@ function Cn(e) {
2235
2240
  axisSize: s,
2236
2241
  layout: l,
2237
2242
  requestedAxisSize: s,
2238
- requestedLayout: Ln({
2243
+ requestedLayout: Cn({
2239
2244
  itemIds: e.items.map(({ id: m }) => m),
2240
2245
  layout: u
2241
2246
  }),
@@ -2244,45 +2249,45 @@ function Cn(e) {
2244
2249
  F(
2245
2250
  !r.has(m.id),
2246
2251
  `Separator ids must be unique; id "${m.id}" was used more than once`
2247
- ), r.add(m.id), m.element.addEventListener("keydown", Ut);
2248
- }), nn || (nn = !0, xt(Qn)), Pe.get(c) === 1 && (c.addEventListener("contextmenu", _t, !0), c.addEventListener("dblclick", jt, !0), c.addEventListener(
2252
+ ), r.add(m.id), m.element.addEventListener("keydown", Wt);
2253
+ }), on || (on = !0, wt(Zn)), Ee.get(c) === 1 && (c.addEventListener("contextmenu", Bt, !0), c.addEventListener("dblclick", Ut, !0), c.addEventListener(
2249
2254
  "lostpointercapture",
2250
- Wt,
2255
+ Yt,
2251
2256
  !0
2252
2257
  ), c.addEventListener(
2253
2258
  "pointercancel",
2254
- Yt,
2259
+ Xt,
2255
2260
  !0
2256
- ), c.addEventListener("pointerdown", Xt, !0), c.addEventListener("pointerleave", Kt), c.addEventListener("pointermove", Jt), c.addEventListener("pointerout", Zt), c.addEventListener("pointerup", Qt, !0), d?.addEventListener("blur", en), d?.addEventListener("pagehide", tn)), function() {
2257
- t = !1, Pe.set(
2261
+ ), c.addEventListener("pointerdown", Kt, !0), c.addEventListener("pointerleave", Jt), c.addEventListener("pointermove", Zt), c.addEventListener("pointerout", Qt), c.addEventListener("pointerup", en, !0), d?.addEventListener("blur", tn), d?.addEventListener("pagehide", nn)), function() {
2262
+ t = !1, Ee.set(
2258
2263
  c,
2259
- Math.max(0, (Pe.get(c) ?? 0) - 1)
2260
- ), ao(e), Kn(e), e.separators.forEach((f) => {
2261
- f.element.removeEventListener("keydown", Ut);
2262
- }), Pe.get(c) || (c.removeEventListener(
2264
+ Math.max(0, (Ee.get(c) ?? 0) - 1)
2265
+ ), so(e), Xn(e), e.separators.forEach((f) => {
2266
+ f.element.removeEventListener("keydown", Wt);
2267
+ }), Ee.get(c) || (c.removeEventListener(
2263
2268
  "contextmenu",
2264
- _t,
2269
+ Bt,
2265
2270
  !0
2266
2271
  ), c.removeEventListener(
2267
2272
  "dblclick",
2268
- jt,
2273
+ Ut,
2269
2274
  !0
2270
2275
  ), c.removeEventListener(
2271
2276
  "lostpointercapture",
2272
- Wt,
2277
+ Yt,
2273
2278
  !0
2274
2279
  ), c.removeEventListener(
2275
2280
  "pointercancel",
2276
- Yt,
2281
+ Xt,
2277
2282
  !0
2278
2283
  ), c.removeEventListener(
2279
2284
  "pointerdown",
2280
- Xt,
2285
+ Kt,
2281
2286
  !0
2282
- ), c.removeEventListener("pointerleave", Kt), c.removeEventListener("pointermove", Jt), c.removeEventListener("pointerout", Zt), c.removeEventListener("pointerup", Qt, !0), d?.removeEventListener("blur", en), d?.removeEventListener("pagehide", tn)), i.disconnect();
2287
+ ), c.removeEventListener("pointerleave", Jt), c.removeEventListener("pointermove", Zt), c.removeEventListener("pointerout", Qt), c.removeEventListener("pointerup", en, !0), d?.removeEventListener("blur", tn), d?.removeEventListener("pagehide", nn)), i.disconnect();
2283
2288
  };
2284
2289
  }
2285
- function Rn({
2290
+ function Pn({
2286
2291
  derivedItemConstraints: e,
2287
2292
  axis: t,
2288
2293
  layout: n,
@@ -2308,14 +2313,14 @@ function En() {
2308
2313
  return [e, n];
2309
2314
  }
2310
2315
  function dt(e) {
2311
- const t = H({ ...e });
2316
+ const t = j({ ...e });
2312
2317
  return re(() => {
2313
2318
  for (const n in e)
2314
2319
  t.current[n] = e[n];
2315
2320
  }, [e]), t.current;
2316
2321
  }
2317
- const kt = Ue(null), Pn = Ue(null);
2318
- function Ro({
2322
+ const Tt = Ue(null), Mn = Ue(null);
2323
+ function Io({
2319
2324
  layout: e,
2320
2325
  itemConstraints: t,
2321
2326
  itemId: n,
@@ -2328,7 +2333,7 @@ function Ro({
2328
2333
  if (a) {
2329
2334
  const u = a.maxSize, l = a.collapsible ? a.collapsedSize : a.minSize, c = [o, o + 1];
2330
2335
  i = ze({
2331
- layout: Ve({
2336
+ layout: qe({
2332
2337
  delta: l - s,
2333
2338
  initialLayout: e,
2334
2339
  itemConstraints: t,
@@ -2337,7 +2342,7 @@ function Ro({
2337
2342
  }),
2338
2343
  itemConstraints: t
2339
2344
  })[n], r = ze({
2340
- layout: Ve({
2345
+ layout: qe({
2341
2346
  delta: u - s,
2342
2347
  initialLayout: e,
2343
2348
  itemConstraints: t,
@@ -2354,7 +2359,7 @@ function Ro({
2354
2359
  valueNow: s
2355
2360
  };
2356
2361
  }
2357
- function Mn({
2362
+ function kn({
2358
2363
  attributes: e,
2359
2364
  axisId: t,
2360
2365
  axisOrientation: n,
@@ -2382,7 +2387,7 @@ function Mn({
2382
2387
  className: r,
2383
2388
  preview: p,
2384
2389
  style: f
2385
- }), [x, R] = ve({}), [k, O] = ve("inactive"), [b, w] = ve(!1), h = H(null), I = H(null), L = Ye(h, l), M = n === "horizontal" ? "vertical" : "horizontal";
2390
+ }), [w, R] = ve({}), [k, O] = ve("inactive"), [b, x] = ve(!1), h = j(null), C = j(null), L = Ye(h, l), M = n === "horizontal" ? "vertical" : "horizontal";
2386
2391
  re(() => {
2387
2392
  const G = h.current;
2388
2393
  if (G !== null) {
@@ -2404,34 +2409,34 @@ function Mn({
2404
2409
  return z.style;
2405
2410
  }
2406
2411
  };
2407
- I.current = N;
2408
- const P = g(N), A = xt(
2409
- (j) => {
2412
+ C.current = N;
2413
+ const E = g(N), A = wt(
2414
+ (V) => {
2410
2415
  O(
2411
- j.next.state !== "inactive" && j.next.hitRegions.some(
2416
+ V.next.state !== "inactive" && V.next.hitRegions.some(
2412
2417
  (U) => U.separator === N || (d?.(U) ?? !1)
2413
- ) ? j.next.state : "inactive"
2418
+ ) ? V.next.state : "inactive"
2414
2419
  );
2415
2420
  }
2416
- ), V = qe(
2421
+ ), q = He(
2417
2422
  t,
2418
- (j) => {
2419
- const { derivedItemConstraints: U, layout: de, separatorToItems: xe } = j.next, Le = xe.get(N);
2423
+ (V) => {
2424
+ const { derivedItemConstraints: U, layout: de, separatorToItems: we } = V.next, Le = we.get(N);
2420
2425
  if (Le) {
2421
- const Ie = Le[0], De = U.findIndex(
2422
- (C) => C.itemId === Ie.id
2423
- ), { layoutStrategy: ee } = j.axis;
2426
+ const Ce = Le[0], $e = U.findIndex(
2427
+ (I) => I.itemId === Ce.id
2428
+ ), { layoutStrategy: ee } = V.axis;
2424
2429
  R({
2425
- ...Ro({
2430
+ ...Io({
2426
2431
  layout: de,
2427
2432
  itemConstraints: U,
2428
- itemId: Ie.id,
2429
- itemIndex: De
2433
+ itemId: Ce.id,
2434
+ itemIndex: $e
2430
2435
  }),
2431
2436
  // Items without DOM elements of their own (e.g. Grid tracks) control other elements
2432
2437
  ...ee?.getItemAriaControls && {
2433
2438
  valueControls: ee.getItemAriaControls(
2434
- Ie.id
2439
+ Ce.id
2435
2440
  )
2436
2441
  }
2437
2442
  });
@@ -2439,46 +2444,46 @@ function Mn({
2439
2444
  }
2440
2445
  );
2441
2446
  return () => {
2442
- I.current = null, A(), V(), P();
2447
+ C.current = null, A(), q(), E();
2443
2448
  };
2444
2449
  }
2445
2450
  }, [t, c, d, g, z]), re(() => {
2446
- const G = I.current;
2447
- G && Xn(G);
2448
- }, [p]), je(() => {
2451
+ const G = C.current;
2452
+ G && Yn(G);
2453
+ }, [p]), Ve(() => {
2449
2454
  v(c, { disabled: a, disableDoubleClick: u });
2450
2455
  }, [a, u, c, v]);
2451
2456
  let T;
2452
2457
  a && !s && (T = "not-allowed");
2453
- let E;
2458
+ let P;
2454
2459
  if (a)
2455
- E = "disabled";
2460
+ P = "disabled";
2456
2461
  else
2457
2462
  switch (k) {
2458
2463
  case "active": {
2459
- E = "active";
2464
+ P = "active";
2460
2465
  break;
2461
2466
  }
2462
2467
  default:
2463
- b ? E = "focus" : E = k;
2468
+ b ? P = "focus" : P = k;
2464
2469
  }
2465
2470
  return /* @__PURE__ */ X(
2466
2471
  "div",
2467
2472
  {
2468
2473
  ...e,
2469
- "aria-controls": x.valueControls,
2474
+ "aria-controls": w.valueControls,
2470
2475
  "aria-disabled": a || void 0,
2471
2476
  "aria-orientation": M,
2472
- "aria-valuemax": x.valueMax,
2473
- "aria-valuemin": x.valueMin,
2474
- "aria-valuenow": x.valueNow,
2477
+ "aria-valuemax": w.valueMax,
2478
+ "aria-valuemin": w.valueMin,
2479
+ "aria-valuenow": w.valueNow,
2475
2480
  children: o,
2476
2481
  className: r,
2477
- "data-separator": E,
2482
+ "data-separator": P,
2478
2483
  "data-testid": i,
2479
2484
  id: c,
2480
- onBlur: () => w(!1),
2481
- onFocus: () => w(!0),
2485
+ onBlur: () => x(!1),
2486
+ onFocus: () => x(!0),
2482
2487
  ref: L,
2483
2488
  role: "separator",
2484
2489
  style: {
@@ -2494,7 +2499,7 @@ function Mn({
2494
2499
  }
2495
2500
  );
2496
2501
  }
2497
- function on({
2502
+ function rn({
2498
2503
  axis: e,
2499
2504
  children: t,
2500
2505
  className: n,
@@ -2513,7 +2518,7 @@ function on({
2513
2518
  separatorPlacements: m,
2514
2519
  trackCounts: f,
2515
2520
  updateSeparatorProps: y
2516
- } = dn(), S = d(e), v = e === "column" ? "row" : "column", z = f[v], x = !!i || !vt(a, f[e]);
2521
+ } = fn(), S = d(e), v = e === "column" ? "row" : "column", z = f[v], w = !!i || !vt(a, f[e]);
2517
2522
  let R = !0;
2518
2523
  for (const h of m.values())
2519
2524
  if (h.axis === e && h.index === a && !h.disabled && h.crossStart < r) {
@@ -2535,28 +2540,28 @@ function on({
2535
2540
  h
2536
2541
  ),
2537
2542
  [e, o, r, i, a, g]
2538
- ), b = Bn(a), w = Hn({
2543
+ ), b = _n(a), x = Bn({
2539
2544
  crossCount: z,
2540
2545
  crossSpan: o,
2541
2546
  crossStart: r,
2542
2547
  hasGutters: p[v]
2543
2548
  });
2544
2549
  return /* @__PURE__ */ X(
2545
- Mn,
2550
+ kn,
2546
2551
  {
2547
2552
  axisId: S,
2548
2553
  axisOrientation: e === "column" ? "horizontal" : "vertical",
2549
2554
  className: n,
2550
2555
  disableCursor: c(),
2551
- disabled: x,
2556
+ disabled: w,
2552
2557
  disableDoubleClick: void 0,
2553
2558
  elementRef: s,
2554
2559
  id: l,
2555
2560
  isSharedHitRegion: k,
2556
2561
  registerSeparator: O,
2557
2562
  requiredStyle: {
2558
- gridColumn: e === "column" ? b : w,
2559
- gridRow: e === "row" ? b : w
2563
+ gridColumn: e === "column" ? b : x,
2564
+ gridRow: e === "row" ? b : x
2560
2565
  },
2561
2566
  style: u,
2562
2567
  tabIndex: R ? 0 : -1,
@@ -2565,10 +2570,10 @@ function on({
2565
2570
  }
2566
2571
  );
2567
2572
  }
2568
- function kn(e) {
2573
+ function Ro(e) {
2569
2574
  const { children: t, className: n, disabled: o, elementRef: r, style: i } = e;
2570
2575
  return e.type === "column" ? /* @__PURE__ */ X(
2571
- on,
2576
+ rn,
2572
2577
  {
2573
2578
  axis: "column",
2574
2579
  className: n,
@@ -2581,7 +2586,7 @@ function kn(e) {
2581
2586
  children: t
2582
2587
  }
2583
2588
  ) : /* @__PURE__ */ X(
2584
- on,
2589
+ rn,
2585
2590
  {
2586
2591
  axis: "row",
2587
2592
  className: n,
@@ -2595,8 +2600,9 @@ function kn(e) {
2595
2600
  }
2596
2601
  );
2597
2602
  }
2598
- kn.displayName = "Gridline";
2599
- const ke = ["column", "row"], rn = { columns: {}, rows: {} };
2603
+ const Po = /* @__PURE__ */ Object.assign(Ro, {
2604
+ displayName: "Gridline"
2605
+ }), ke = ["column", "row"], sn = { columns: {}, rows: {} };
2600
2606
  function Eo({
2601
2607
  children: e,
2602
2608
  className: t,
@@ -2618,59 +2624,59 @@ function Eo({
2618
2624
  ...m
2619
2625
  }) {
2620
2626
  const f = Ae(u), y = se(
2621
- (C) => C === "column" ? `${f}:columns` : `${f}:rows`,
2627
+ (I) => I === "column" ? `${f}:columns` : `${f}:rows`,
2622
2628
  [f]
2623
- ), S = sn(n, "columns"), v = sn(p, "rows"), z = (C) => C === "column" ? S : v, x = H({
2624
- onLayoutChange: rn,
2625
- onLayoutChanged: rn
2626
- }), R = we((C) => {
2627
- an(x.current.onLayoutChange, C) || (x.current.onLayoutChange = C, l?.(C));
2628
- }), k = we(
2629
- (C, $, B) => {
2630
- an(x.current.onLayoutChanged, C) || (x.current.onLayoutChanged = C, c?.(C, { isUserInteraction: $, requestedLayout: B }));
2631
- }
2632
- ), O = H(null), b = Ye(O, s), [w, h] = En(), I = H({
2629
+ ), S = an(n, "columns"), v = an(p, "rows"), z = (I) => I === "column" ? S : v, w = j({
2630
+ onLayoutChange: sn,
2631
+ onLayoutChanged: sn
2632
+ }), R = xe((I) => {
2633
+ cn(w.current.onLayoutChange, I) || (w.current.onLayoutChange = I, l?.(I));
2634
+ }), k = xe(
2635
+ (I, D, B) => {
2636
+ cn(w.current.onLayoutChanged, I) || (w.current.onLayoutChanged = I, c?.(I, { isUserInteraction: D, requestedLayout: B }));
2637
+ }
2638
+ ), O = j(null), b = Ye(O, s), [x, h] = En(), C = j({
2633
2639
  cells: [],
2634
2640
  column: { expandedItemSizes: {}, layouts: {} },
2635
2641
  loggedErrors: /* @__PURE__ */ new Set(),
2636
2642
  row: { expandedItemSizes: {}, layouts: {} },
2637
2643
  separators: /* @__PURE__ */ new Map()
2638
2644
  }), L = { column: !1, row: !1 };
2639
- for (const C of I.current.separators.values())
2640
- L[C.axis] = !0;
2645
+ for (const I of C.current.separators.values())
2646
+ L[I.axis] = !0;
2641
2647
  Tn(e, L);
2642
2648
  const M = dt({
2643
2649
  defaultLayout: o,
2644
2650
  disableCursor: r,
2645
2651
  resizeTargetMinimumSize: d
2646
- }), T = we(() => !!M.disableCursor), E = se(
2647
- (C) => {
2648
- const $ = I.current;
2649
- return $.cells = [...$.cells, C], h(), () => {
2650
- $.cells = $.cells.filter(
2651
- (B) => B !== C
2652
+ }), T = xe(() => !!M.disableCursor), P = se(
2653
+ (I) => {
2654
+ const D = C.current;
2655
+ return D.cells = [...D.cells, I], h(), () => {
2656
+ D.cells = D.cells.filter(
2657
+ (B) => B !== I
2652
2658
  ), h();
2653
2659
  };
2654
2660
  },
2655
2661
  [h]
2656
2662
  ), G = se(
2657
- (C, $) => {
2658
- const B = I.current;
2659
- return B.separators = new Map(B.separators), B.separators.set($, C), h(), () => {
2660
- B.separators = new Map(B.separators), B.separators.delete($), h();
2663
+ (I, D) => {
2664
+ const B = C.current;
2665
+ return B.separators = new Map(B.separators), B.separators.set(D, I), h(), () => {
2666
+ B.separators = new Map(B.separators), B.separators.delete(D), h();
2661
2667
  };
2662
2668
  },
2663
2669
  [h]
2664
2670
  ), N = se(
2665
- (C, {
2666
- disabled: $,
2671
+ (I, {
2672
+ disabled: D,
2667
2673
  disableDoubleClick: B
2668
2674
  }) => {
2669
- for (const _ of I.current.separators.keys())
2670
- _.id === C && (_.disabled = $, _.disableDoubleClick = B);
2675
+ for (const _ of C.current.separators.keys())
2676
+ _.id === I && (_.disabled = D, _.disableDoubleClick = B);
2671
2677
  },
2672
2678
  []
2673
- ), P = I.current.separators, A = pe(
2679
+ ), E = C.current.separators, A = pe(
2674
2680
  () => ({
2675
2681
  getDisableCursor: T,
2676
2682
  getResizeAxisId: y,
@@ -2679,9 +2685,9 @@ function Eo({
2679
2685
  row: L.row
2680
2686
  },
2681
2687
  id: f,
2682
- registerCell: E,
2688
+ registerCell: P,
2683
2689
  registerSeparator: G,
2684
- separatorPlacements: P,
2690
+ separatorPlacements: E,
2685
2691
  trackCounts: {
2686
2692
  column: S.length,
2687
2693
  row: v.length
@@ -2695,31 +2701,31 @@ function Eo({
2695
2701
  L.column,
2696
2702
  L.row,
2697
2703
  f,
2698
- E,
2704
+ P,
2699
2705
  G,
2700
2706
  v.length,
2701
- P,
2707
+ E,
2702
2708
  N
2703
2709
  ]
2704
- ), V = H([]);
2710
+ ), q = j([]);
2705
2711
  re(() => {
2706
- const C = O.current;
2707
- if (C === null)
2712
+ const I = O.current;
2713
+ if (I === null)
2708
2714
  return;
2709
- const $ = I.current, B = Mo({
2710
- cells: $.cells,
2711
- separatorPlacements: $.separators,
2715
+ const D = C.current, B = ko({
2716
+ cells: D.cells,
2717
+ separatorPlacements: D.separators,
2712
2718
  trackCounts: { column: S.length, row: v.length }
2713
2719
  });
2714
- B.forEach((D) => {
2715
- $.loggedErrors.has(D) || console.error(D);
2716
- }), $.loggedErrors = new Set(B);
2717
- const _ = (D) => Array.from($.separators.entries()).filter(([, J]) => J.axis === D).sort(([, J], [, ye]) => J.index - ye.index).map(([J]) => J), q = (D) => {
2718
- const J = D === "column" ? S : v, ye = D === "column" ? v : S, Se = J.map((te) => te.id), Je = y(D), Ze = _(D), Ce = Ze.length > 0, Qe = J.map(
2720
+ B.forEach(($) => {
2721
+ D.loggedErrors.has($) || console.error($);
2722
+ }), D.loggedErrors = new Set(B);
2723
+ const _ = ($) => Array.from(D.separators.entries()).filter(([, J]) => J.axis === $).sort(([, J], [, ye]) => J.index - ye.index).map(([J]) => J), H = ($) => {
2724
+ const J = $ === "column" ? S : v, ye = $ === "column" ? v : S, Se = J.map((te) => te.id), Je = y($), Ze = _($), Ie = Ze.length > 0, Qe = J.map(
2719
2725
  ({ id: te, ...ie }, ne) => ({
2720
2726
  // Tracks don't have DOM elements of their own;
2721
2727
  // the Grid element is used to resolve relative size constraints (e.g. "em")
2722
- element: C,
2728
+ element: I,
2723
2729
  id: Se[ne],
2724
2730
  idIsStable: !0,
2725
2731
  mutableValues: {
@@ -2731,27 +2737,27 @@ function Eo({
2731
2737
  })
2732
2738
  ), Ge = () => {
2733
2739
  const te = [];
2734
- if (Ce) {
2735
- for (const [ie, ne] of $.separators)
2736
- if (ne.axis === D && vt(ne.index, J.length)) {
2740
+ if (Ie) {
2741
+ for (const [ie, ne] of D.separators)
2742
+ if (ne.axis === $ && vt(ne.index, J.length)) {
2737
2743
  const Fe = ie.element.getBoundingClientRect();
2738
2744
  te[ne.index] = Math.max(
2739
2745
  te[ne.index] ?? 0,
2740
- D === "column" ? Fe.width : Fe.height
2746
+ $ === "column" ? Fe.width : Fe.height
2741
2747
  );
2742
2748
  }
2743
2749
  }
2744
- return Un({
2745
- axis: D,
2746
- element: C,
2750
+ return Vn({
2751
+ axis: $,
2752
+ element: I,
2747
2753
  gutterSizes: te.filter((ie) => ie !== void 0),
2748
- hasGutters: Ce,
2754
+ hasGutters: Ie,
2749
2755
  layout: ue(Je)?.layout,
2750
2756
  trackIds: Se
2751
2757
  });
2752
2758
  };
2753
2759
  let Ne;
2754
- const mt = M.defaultLayout?.[D === "column" ? "columns" : "rows"];
2760
+ const mt = M.defaultLayout?.[$ === "column" ? "columns" : "rows"];
2755
2761
  if (mt !== void 0 && Object.keys(mt).length === Se.length) {
2756
2762
  Ne = {};
2757
2763
  for (const te of Se) {
@@ -2761,14 +2767,14 @@ function Eo({
2761
2767
  }
2762
2768
  return {
2763
2769
  disabled: !!i,
2764
- element: C,
2770
+ element: I,
2765
2771
  id: Je,
2766
2772
  layoutStrategy: {
2767
2773
  getItemAriaControls: (te) => {
2768
2774
  const ie = Se.indexOf(te);
2769
- return $.cells.filter((ne) => {
2770
- const Fe = D === "column" ? ne.column : ne.row, On = D === "column" ? ne.columnSpan : ne.rowSpan;
2771
- return Fe <= ie && ie < Fe + On;
2775
+ return D.cells.filter((ne) => {
2776
+ const Fe = $ === "column" ? ne.column : ne.row, $n = $ === "column" ? ne.columnSpan : ne.rowSpan;
2777
+ return Fe <= ie && ie < Fe + $n;
2772
2778
  }).map((ne) => ne.element.id).filter(Boolean).join(" ") || void 0;
2773
2779
  },
2774
2780
  calculateAvailableSize: () => Ge().availableSize,
@@ -2776,25 +2782,25 @@ function Eo({
2776
2782
  expandHitTargets: te,
2777
2783
  axis: ie,
2778
2784
  includeDisabled: ne
2779
- }) => jn({
2780
- axis: D,
2781
- cells: $.cells,
2785
+ }) => qn({
2786
+ axis: $,
2787
+ cells: D.cells,
2782
2788
  crossTrackCount: ye.length,
2783
2789
  expandHitTargets: te,
2784
2790
  resizeAxis: ie,
2785
2791
  axisSize: Ge().availableSize,
2786
2792
  includeDisabled: ne,
2787
- separatorPlacements: $.separators
2793
+ separatorPlacements: D.separators
2788
2794
  }),
2789
2795
  getItemSizeInPixels: (te) => Ge().trackSizes[Se.indexOf(te)] ?? 0
2790
2796
  },
2791
2797
  mutableState: {
2792
2798
  defaultLayout: Ne,
2793
2799
  disableCursor: !!M.disableCursor,
2794
- expandedItemSizes: $[D].expandedItemSizes,
2795
- layouts: $[D].layouts
2800
+ expandedItemSizes: D[$].expandedItemSizes,
2801
+ layouts: D[$].layouts
2796
2802
  },
2797
- orientation: D === "column" ? "horizontal" : "vertical",
2803
+ orientation: $ === "column" ? "horizontal" : "vertical",
2798
2804
  items: Qe,
2799
2805
  resizePreviewMode: "panel",
2800
2806
  get resizeTargetMinimumSize() {
@@ -2802,40 +2808,40 @@ function Eo({
2802
2808
  },
2803
2809
  separators: Ze
2804
2810
  };
2805
- }, Z = ke.map(q);
2806
- V.current = Z;
2807
- const K = Z.map((D) => Cn(D)), ce = () => {
2808
- const [D, J] = Z.map(
2811
+ }, Z = ke.map(H);
2812
+ q.current = Z;
2813
+ const K = Z.map(($) => Rn($)), ce = () => {
2814
+ const [$, J] = Z.map(
2809
2815
  (ye) => ue(ye.id)
2810
2816
  );
2811
- if (!(!D || !J || D.defaultLayoutDeferred || J.defaultLayoutDeferred))
2817
+ if (!(!$ || !J || $.defaultLayoutDeferred || J.defaultLayoutDeferred))
2812
2818
  return {
2813
- layout: { columns: D.layout, rows: J.layout },
2819
+ layout: { columns: $.layout, rows: J.layout },
2814
2820
  requestedLayout: {
2815
- columns: D.requestedLayout,
2821
+ columns: $.requestedLayout,
2816
2822
  rows: J.requestedLayout
2817
2823
  }
2818
2824
  };
2819
2825
  };
2820
2826
  {
2821
- const D = ce();
2822
- if (D)
2827
+ const $ = ce();
2828
+ if ($)
2823
2829
  try {
2824
2830
  try {
2825
- R(D.layout);
2831
+ R($.layout);
2826
2832
  } finally {
2827
2833
  k(
2828
- D.layout,
2834
+ $.layout,
2829
2835
  !1,
2830
- D.requestedLayout
2836
+ $.requestedLayout
2831
2837
  );
2832
2838
  }
2833
2839
  } catch (J) {
2834
- throw V.current = [], K.forEach((ye) => ye()), J;
2840
+ throw q.current = [], K.forEach((ye) => ye()), J;
2835
2841
  }
2836
2842
  }
2837
2843
  const Oe = Z.map(
2838
- (D) => qe(D.id, (J) => {
2844
+ ($) => He($.id, (J) => {
2839
2845
  const {
2840
2846
  defaultLayoutDeferred: ye,
2841
2847
  derivedItemConstraints: Se,
@@ -2844,32 +2850,32 @@ function Eo({
2844
2850
  } = J.next;
2845
2851
  if (ye || Se.length === 0)
2846
2852
  return;
2847
- Rn({
2853
+ Pn({
2848
2854
  derivedItemConstraints: Se,
2849
- axis: D,
2855
+ axis: $,
2850
2856
  layout: Je,
2851
2857
  prevLayout: J.prev?.layout,
2852
2858
  requestedLayout: Ze
2853
2859
  });
2854
- const Ce = ce();
2855
- if (Ce) {
2860
+ const Ie = ce();
2861
+ if (Ie) {
2856
2862
  const Qe = ae(), Ge = Qe.state !== "active" || !Qe.hitRegions.some(
2857
2863
  (Ne) => Z.includes(Ne.axis)
2858
2864
  );
2859
2865
  try {
2860
- R(Ce.layout);
2866
+ R(Ie.layout);
2861
2867
  } finally {
2862
2868
  Ge && k(
2863
- Ce.layout,
2869
+ Ie.layout,
2864
2870
  J.isUserInteraction,
2865
- Ce.requestedLayout
2871
+ Ie.requestedLayout
2866
2872
  );
2867
2873
  }
2868
2874
  }
2869
2875
  })
2870
2876
  );
2871
2877
  return () => {
2872
- V.current = [], K.forEach((D) => D()), Oe.forEach((D) => D());
2878
+ q.current = [], K.forEach(($) => $()), Oe.forEach(($) => $());
2873
2879
  };
2874
2880
  }, [
2875
2881
  S,
@@ -2879,29 +2885,29 @@ function Eo({
2879
2885
  k,
2880
2886
  R,
2881
2887
  v,
2882
- w,
2888
+ x,
2883
2889
  M
2884
- ]), je(() => {
2885
- V.current.forEach((C) => {
2886
- C.mutableState.defaultLayout = o?.[C.orientation === "horizontal" ? "columns" : "rows"], C.mutableState.disableCursor = !!r;
2890
+ ]), Ve(() => {
2891
+ q.current.forEach((I) => {
2892
+ I.mutableState.defaultLayout = o?.[I.orientation === "horizontal" ? "columns" : "rows"], I.mutableState.disableCursor = !!r;
2887
2893
  });
2888
2894
  });
2889
- const j = pe(() => {
2890
- const C = () => {
2891
- const [_, q] = ke.map(y);
2892
- return !Te(_) || !Te(q) ? { columns: {}, rows: {} } : {
2893
- columns: He({
2895
+ const V = pe(() => {
2896
+ const I = () => {
2897
+ const [_, H] = ke.map(y);
2898
+ return !Te(_) || !Te(H) ? { columns: {}, rows: {} } : {
2899
+ columns: je({
2894
2900
  axisId: _
2895
2901
  }).getLayout(),
2896
- rows: He({ axisId: q }).getLayout()
2902
+ rows: je({ axisId: H }).getLayout()
2897
2903
  };
2898
- }, $ = (_) => _.map((q) => `"${q}"`).join(", "), B = (_, q) => {
2904
+ }, D = (_) => _.map((H) => `"${H}"`).join(", "), B = (_, H) => {
2899
2905
  const Z = y(_), K = () => {
2900
2906
  const ce = Te(Z);
2901
2907
  return F(ce, `Grid "${f}" has not been mounted`), F(
2902
- ce.items.some((Oe) => Oe.id === q),
2903
- `Grid "${f}" no longer contains a ${_} with id "${q}"; ${_} ids are ${$(ce.items.map((Oe) => Oe.id))}`
2904
- ), Mt({ axisId: Z, itemId: q });
2908
+ ce.items.some((Oe) => Oe.id === H),
2909
+ `Grid "${f}" no longer contains a ${_} with id "${H}"; ${_} ids are ${D(ce.items.map((Oe) => Oe.id))}`
2910
+ ), kt({ axisId: Z, itemId: H });
2905
2911
  };
2906
2912
  return {
2907
2913
  collapse: () => K().collapse(),
@@ -2912,61 +2918,61 @@ function Eo({
2912
2918
  };
2913
2919
  };
2914
2920
  return {
2915
- getLayout: C,
2916
- getTrackById: (_, q) => {
2917
- const Z = _ === "column" ? S : v, K = `${q}`;
2921
+ getLayout: I,
2922
+ getTrackById: (_, H) => {
2923
+ const Z = _ === "column" ? S : v, K = `${H}`;
2918
2924
  return F(
2919
2925
  Z.some((ce) => ce.id === K),
2920
- `Grid "${f}" does not contain a ${_} with id "${K}"; ${_} ids are ${$(Z.map((ce) => ce.id))}`
2926
+ `Grid "${f}" does not contain a ${_} with id "${K}"; ${_} ids are ${D(Z.map((ce) => ce.id))}`
2921
2927
  ), B(_, K);
2922
2928
  },
2923
- getTrackByIndex: (_, q) => {
2924
- const Z = _ === "column" ? S : v, K = Number.isInteger(q) ? Z[q] : void 0;
2929
+ getTrackByIndex: (_, H) => {
2930
+ const Z = _ === "column" ? S : v, K = Number.isInteger(H) ? Z[H] : void 0;
2925
2931
  return F(
2926
2932
  K,
2927
- `Grid "${f}" does not contain a ${_} at index ${q}; it has ${Z.length} ${_}s`
2933
+ `Grid "${f}" does not contain a ${_} at index ${H}; it has ${Z.length} ${_}s`
2928
2934
  ), B(_, K.id);
2929
2935
  },
2930
- setLayout: (_) => (ke.forEach((q) => {
2931
- const Z = _[q === "column" ? "columns" : "rows"], K = y(q);
2932
- Z && Te(K) && He({ axisId: K }).setLayout(Z);
2933
- }), C())
2936
+ setLayout: (_) => (ke.forEach((H) => {
2937
+ const Z = _[H === "column" ? "columns" : "rows"], K = y(H);
2938
+ Z && Te(K) && je({ axisId: K }).setLayout(Z);
2939
+ }), I())
2934
2940
  };
2935
2941
  }, [S, y, f, v]);
2936
- St(a, () => j, [j]);
2937
- const U = H(j);
2942
+ St(a, () => V, [V]);
2943
+ const U = j(V);
2938
2944
  re(() => {
2939
- U.current = j;
2945
+ U.current = V;
2940
2946
  });
2941
2947
  const de = pe(
2942
2948
  () => ({
2943
2949
  getLayout: () => U.current.getLayout(),
2944
- getTrackById: (C, $) => U.current.getTrackById(C, $),
2945
- getTrackByIndex: (C, $) => U.current.getTrackByIndex(C, $),
2950
+ getTrackById: (I, D) => U.current.getTrackById(I, D),
2951
+ getTrackByIndex: (I, D) => U.current.getTrackByIndex(I, D),
2946
2952
  id: f,
2947
- setLayout: (C) => U.current.setLayout(C)
2953
+ setLayout: (I) => U.current.setLayout(I)
2948
2954
  }),
2949
2955
  [f]
2950
- ), xe = () => ke.map((C) => {
2951
- const $ = ue(y(C)), B = z(C);
2952
- return ($ && !$.defaultLayoutDeferred ? B.map((q) => `minmax(0, ${$.layout[q.id] ?? 1}fr)`) : Po(
2956
+ ), we = () => ke.map((I) => {
2957
+ const D = ue(y(I)), B = z(I);
2958
+ return (D && !D.defaultLayoutDeferred ? B.map((H) => `minmax(0, ${D.layout[H.id] ?? 1}fr)`) : Mo(
2953
2959
  B,
2954
- o?.[C === "column" ? "columns" : "rows"]
2955
- )).join(L[C] ? " auto " : " ");
2960
+ o?.[I === "column" ? "columns" : "rows"]
2961
+ )).join(L[I] ? " auto " : " ");
2956
2962
  }).join("|"), Le = se(
2957
- (C) => {
2958
- const $ = ke.map(
2959
- (B) => qe(y(B), C)
2963
+ (I) => {
2964
+ const D = ke.map(
2965
+ (B) => He(y(B), I)
2960
2966
  );
2961
- return () => $.forEach((B) => B());
2967
+ return () => D.forEach((B) => B());
2962
2968
  },
2963
2969
  [y]
2964
- ), Ie = at(
2970
+ ), Ce = at(
2965
2971
  Le,
2966
- xe,
2967
- xe
2968
- ), [De, ee] = Ie.split("|");
2969
- return /* @__PURE__ */ X(un.Provider, { value: A, children: /* @__PURE__ */ X(
2972
+ we,
2973
+ we
2974
+ ), [$e, ee] = Ce.split("|");
2975
+ return /* @__PURE__ */ X(dn.Provider, { value: A, children: /* @__PURE__ */ X(
2970
2976
  "div",
2971
2977
  {
2972
2978
  ...m,
@@ -2981,18 +2987,20 @@ function Eo({
2981
2987
  overflow: "hidden",
2982
2988
  ...g,
2983
2989
  display: "grid",
2984
- gridTemplateColumns: De,
2990
+ gridTemplateColumns: $e,
2985
2991
  gridTemplateRows: ee,
2986
2992
  // Inform the browser that the library is handling touch events for this element
2987
2993
  // NOTE This is not an inherited style
2988
2994
  touchAction: "none"
2989
2995
  },
2990
- children: /* @__PURE__ */ X(kt.Provider, { value: null, children: /* @__PURE__ */ X(Pn.Provider, { value: de, children: e }) })
2996
+ children: /* @__PURE__ */ X(Tt.Provider, { value: null, children: /* @__PURE__ */ X(Mn.Provider, { value: de, children: e }) })
2991
2997
  }
2992
2998
  ) });
2993
2999
  }
2994
- Eo.displayName = "Grid";
2995
- function sn(e, t) {
3000
+ const er = /* @__PURE__ */ Object.assign(Eo, {
3001
+ displayName: "Grid"
3002
+ });
3003
+ function an(e, t) {
2996
3004
  const n = JSON.stringify(e);
2997
3005
  return pe(() => {
2998
3006
  const o = typeof e == "number" ? Array.from({ length: e }, (r, i) => ({ id: `${i}` })) : e.map((r, i) => ({
@@ -3006,22 +3014,22 @@ function sn(e, t) {
3006
3014
  }, [n]);
3007
3015
  }
3008
3016
  function Tn(e, t) {
3009
- Fn.forEach(e, (n) => {
3010
- if (ln(n))
3011
- if (n.type === kn) {
3017
+ Nn.forEach(e, (n) => {
3018
+ if (un(n))
3019
+ if (n.type === Po) {
3012
3020
  const { type: o } = n.props;
3013
3021
  o === "column" ? t.column = !0 : o === "row" && (t.row = !0);
3014
3022
  } else // Fragments
3015
3023
  typeof n.type == "symbol" && n.props !== null && typeof n.props == "object" && "children" in n.props && Tn(n.props.children, t);
3016
3024
  });
3017
3025
  }
3018
- function Po(e, t) {
3026
+ function Mo(e, t) {
3019
3027
  if (t)
3020
3028
  return e.map(
3021
3029
  (i) => `minmax(0, ${t[i.id] ?? 1}fr)`
3022
3030
  );
3023
3031
  const n = e.map(
3024
- (i) => i.defaultSize === void 0 ? void 0 : fn(i.defaultSize)
3032
+ (i) => i.defaultSize === void 0 ? void 0 : mn(i.defaultSize)
3025
3033
  );
3026
3034
  let o = 100, r = 0;
3027
3035
  return n.forEach((i) => {
@@ -3033,7 +3041,7 @@ function Po(e, t) {
3033
3041
  return a === "%" ? `minmax(0, ${s}fr)` : `${s}${a}`;
3034
3042
  });
3035
3043
  }
3036
- function Mo({
3044
+ function ko({
3037
3045
  cells: e,
3038
3046
  separatorPlacements: t,
3039
3047
  trackCounts: n
@@ -3093,16 +3101,16 @@ function Mo({
3093
3101
  }
3094
3102
  }), o;
3095
3103
  }
3096
- function an(e, t) {
3104
+ function cn(e, t) {
3097
3105
  return le(e.columns, t.columns) && le(e.rows, t.rows);
3098
3106
  }
3099
- function Ko({
3107
+ function tr({
3100
3108
  id: e,
3101
3109
  onlySaveAfterUserInteractions: t,
3102
3110
  storage: n = localStorage
3103
3111
  }) {
3104
3112
  const o = `react-resizable-panels:grid:${e}`, r = at(
3105
- ko,
3113
+ To,
3106
3114
  () => n.getItem(o),
3107
3115
  () => n.getItem(o)
3108
3116
  ), i = pe(() => {
@@ -3138,29 +3146,29 @@ function Ko({
3138
3146
  onLayoutChanged: s
3139
3147
  };
3140
3148
  }
3141
- function ko() {
3149
+ function To() {
3142
3150
  return function() {
3143
3151
  };
3144
3152
  }
3145
- function Jo() {
3153
+ function nr() {
3146
3154
  return ve(null);
3147
3155
  }
3148
- function Zo() {
3149
- return H(null);
3156
+ function or() {
3157
+ return j(null);
3150
3158
  }
3151
- function Qo() {
3152
- return We(Pn);
3159
+ function rr() {
3160
+ return We(Mn);
3153
3161
  }
3154
- function To(e) {
3162
+ function Ao(e) {
3155
3163
  for (let t = 1; t < e.length; t++)
3156
- if (wt(e[t - 1], e[t]) > 0)
3164
+ if (xt(e[t - 1], e[t]) > 0)
3157
3165
  return !1;
3158
3166
  return !0;
3159
3167
  }
3160
- function Ao({
3168
+ function Do({
3161
3169
  separator: e
3162
3170
  }) {
3163
- const { element: t } = e, n = H(null);
3171
+ const { element: t } = e, n = j(null);
3164
3172
  return re(() => {
3165
3173
  const o = t.cloneNode(!0), r = [t, ...t.querySelectorAll("*")], i = [o, ...o.querySelectorAll("*")], s = t.ownerDocument.defaultView;
3166
3174
  return r.forEach((a, u) => {
@@ -3198,23 +3206,28 @@ function Ao({
3198
3206
  );
3199
3207
  }
3200
3208
  function ft() {
3201
- const e = We(kt);
3209
+ const e = We(Tt);
3202
3210
  return F(
3203
3211
  e,
3204
3212
  "Group Context not found; did you render a Panel or Separator outside of a Group?"
3205
3213
  ), e;
3206
3214
  }
3207
- function An(e) {
3208
- const { registerOverlay: t } = ft(), n = H(e);
3209
- zn(n.current, e) || (n.current = e);
3215
+ function $o(e) {
3216
+ const { registerOverlay: t } = ft(), n = j(e);
3217
+ Ln(n.current, e) || (n.current = e);
3210
3218
  const o = n.current;
3211
3219
  return re(
3212
3220
  () => t(o),
3213
3221
  [t, o]
3214
3222
  ), null;
3215
3223
  }
3216
- An.displayName = "SeparatorOverlay";
3217
- function $o({
3224
+ const Oo = /* @__PURE__ */ Object.assign(
3225
+ $o,
3226
+ {
3227
+ displayName: "SeparatorOverlay"
3228
+ }
3229
+ );
3230
+ function Go({
3218
3231
  active: e,
3219
3232
  orientation: t,
3220
3233
  style: n,
@@ -3251,20 +3264,20 @@ function $o({
3251
3264
  }
3252
3265
  );
3253
3266
  }
3254
- function Do({
3267
+ function No({
3255
3268
  overlay: e,
3256
3269
  preview: t
3257
3270
  }) {
3258
3271
  const { axis: n, offset: o, rect: r, separator: i } = t, s = n.orientation === "horizontal";
3259
3272
  let a = i?.preview, u = e;
3260
- return ln(a) && a.type === An && (u = a.props, a = void 0), a == null && (u ? a = /* @__PURE__ */ X(
3261
- $o,
3273
+ return un(a) && a.type === Oo && (u = a.props, a = void 0), a == null && (u ? a = /* @__PURE__ */ X(
3274
+ Go,
3262
3275
  {
3263
3276
  ...u,
3264
3277
  active: t.active,
3265
3278
  orientation: n.orientation
3266
3279
  }
3267
- ) : i && (a = /* @__PURE__ */ X(Ao, { separator: i }))), /* @__PURE__ */ X(
3280
+ ) : i && (a = /* @__PURE__ */ X(Do, { separator: i }))), /* @__PURE__ */ X(
3268
3281
  "div",
3269
3282
  {
3270
3283
  "aria-hidden": "true",
@@ -3283,27 +3296,27 @@ function Do({
3283
3296
  }
3284
3297
  );
3285
3298
  }
3286
- function Oo(e) {
3287
- return Array.from(e).sort(wt);
3299
+ function Fo(e) {
3300
+ return Array.from(e).sort(xt);
3288
3301
  }
3289
- const $n = Ue(null);
3290
- function Go(e, t) {
3291
- const n = H({
3302
+ const An = Ue(null);
3303
+ function _o(e, t) {
3304
+ const n = j({
3292
3305
  getLayout: () => ({}),
3293
- setLayout: Jn
3306
+ setLayout: Kn
3294
3307
  });
3295
3308
  return St(t, () => n.current, []), re(() => {
3296
3309
  Object.assign(
3297
3310
  n.current,
3298
- He({ axisId: e })
3311
+ je({ axisId: e })
3299
3312
  );
3300
3313
  }), n;
3301
3314
  }
3302
- function No({
3315
+ function Bo({
3303
3316
  groupId: e,
3304
3317
  resizePreviewMode: t
3305
3318
  }) {
3306
- const [n, o] = ve([]), r = H(n);
3319
+ const [n, o] = ve([]), r = j(n);
3307
3320
  return re(() => {
3308
3321
  const i = (a) => {
3309
3322
  const u = Te(e), l = t === "separator" && a.state === "active" ? a.previews.filter(
@@ -3317,13 +3330,13 @@ function No({
3317
3330
  i(ae());
3318
3331
  return;
3319
3332
  }
3320
- const s = xt(
3333
+ const s = wt(
3321
3334
  ({ next: a }) => i(a)
3322
3335
  );
3323
3336
  return i(ae()), s;
3324
3337
  }, [e, t]), n;
3325
3338
  }
3326
- function Fo({
3339
+ function jo({
3327
3340
  children: e,
3328
3341
  className: t,
3329
3342
  defaultLayout: n,
@@ -3343,108 +3356,108 @@ function Fo({
3343
3356
  style: g,
3344
3357
  ...m
3345
3358
  }) {
3346
- const f = H({
3359
+ const f = j({
3347
3360
  onLayoutChange: {},
3348
3361
  onLayoutChanged: {}
3349
- }), y = we((P) => {
3350
- le(f.current.onLayoutChange, P) || (f.current.onLayoutChange = P, u?.(P));
3351
- }), S = we(
3352
- (P, A, V) => {
3353
- le(f.current.onLayoutChanged, P) || (f.current.onLayoutChanged = P, l?.(P, { isUserInteraction: A, requestedLayout: V }));
3362
+ }), y = xe((E) => {
3363
+ le(f.current.onLayoutChange, E) || (f.current.onLayoutChange = E, u?.(E));
3364
+ }), S = xe(
3365
+ (E, A, q) => {
3366
+ le(f.current.onLayoutChanged, E) || (f.current.onLayoutChanged = E, l?.(E, { isUserInteraction: A, requestedLayout: q }));
3354
3367
  }
3355
- ), v = Ae(a), [z, x] = ve(), R = No({
3368
+ ), v = Ae(a), [z, w] = ve(), R = Bo({
3356
3369
  groupId: v,
3357
3370
  resizePreviewMode: d
3358
- }), k = H(null), [O, b] = En(), w = H([]), h = H({
3371
+ }), k = j(null), [O, b] = En(), x = j([]), h = j({
3359
3372
  lastExpandedPanelSizes: {},
3360
3373
  layouts: {},
3361
3374
  panels: [],
3362
3375
  separators: []
3363
- }), I = Ye(k, i), L = Go(v, s), M = pe(
3376
+ }), C = Ye(k, i), L = _o(v, s), M = pe(
3364
3377
  () => ({
3365
3378
  getLayout: () => L.current.getLayout(),
3366
3379
  id: v,
3367
3380
  orientation: c,
3368
- setLayout: (P) => L.current.setLayout(P)
3381
+ setLayout: (E) => L.current.setLayout(E)
3369
3382
  }),
3370
3383
  [v, L, c]
3371
- ), T = we(
3372
- (P, A) => {
3373
- const V = ue(P);
3374
- if (V)
3384
+ ), T = xe(
3385
+ (E, A) => {
3386
+ const q = ue(E);
3387
+ if (q)
3375
3388
  return {
3376
- flexGrow: V.layout[A] ?? 1
3389
+ flexGrow: q.layout[A] ?? 1
3377
3390
  };
3378
3391
  if (n?.[A])
3379
3392
  return {
3380
3393
  flexGrow: n?.[A]
3381
3394
  };
3382
3395
  }
3383
- ), E = dt({
3396
+ ), P = dt({
3384
3397
  defaultLayout: n,
3385
3398
  disableCursor: o,
3386
3399
  resizeTargetMinimumSize: p
3387
3400
  }), G = pe(
3388
3401
  () => ({
3389
3402
  get disableCursor() {
3390
- return !!E.disableCursor;
3403
+ return !!P.disableCursor;
3391
3404
  },
3392
3405
  getPanelStyles: T,
3393
3406
  id: v,
3394
3407
  orientation: c,
3395
- registerPanel: (P) => {
3408
+ registerPanel: (E) => {
3396
3409
  const A = h.current;
3397
3410
  return A.panels = _e(c, [
3398
3411
  ...A.panels,
3399
- P
3412
+ E
3400
3413
  ]), b(), () => {
3401
3414
  A.panels = A.panels.filter(
3402
- (V) => V !== P
3415
+ (q) => q !== E
3403
3416
  ), b();
3404
3417
  };
3405
3418
  },
3406
- registerOverlay: (P) => (x(P), () => {
3407
- x(void 0);
3419
+ registerOverlay: (E) => (w(E), () => {
3420
+ w(void 0);
3408
3421
  }),
3409
- registerSeparator: (P) => {
3422
+ registerSeparator: (E) => {
3410
3423
  const A = h.current;
3411
3424
  return A.separators = _e(c, [
3412
3425
  ...A.separators,
3413
- P
3426
+ E
3414
3427
  ]), b(), () => {
3415
3428
  A.separators = A.separators.filter(
3416
- (V) => V !== P
3429
+ (q) => q !== E
3417
3430
  ), b();
3418
3431
  };
3419
3432
  },
3420
- updatePanelProps: (P, { disabled: A }) => {
3421
- const j = h.current.panels.find(
3422
- (xe) => xe.id === P
3433
+ updatePanelProps: (E, { disabled: A }) => {
3434
+ const V = h.current.panels.find(
3435
+ (we) => we.id === E
3423
3436
  );
3424
- if (!j || j.constraintProps.disabled === A)
3437
+ if (!V || V.constraintProps.disabled === A)
3425
3438
  return;
3426
- j.constraintProps.disabled = A;
3439
+ V.constraintProps.disabled = A;
3427
3440
  const U = Te(v), de = ue(v);
3428
3441
  U && de && ge(U, {
3429
3442
  ...de,
3430
- derivedItemConstraints: Lt(U)
3443
+ derivedItemConstraints: Ct(U)
3431
3444
  });
3432
3445
  },
3433
- updateSeparatorProps: (P, {
3446
+ updateSeparatorProps: (E, {
3434
3447
  disabled: A,
3435
- disableDoubleClick: V
3448
+ disableDoubleClick: q
3436
3449
  }) => {
3437
3450
  const U = h.current.separators.find(
3438
- (de) => de.id === P
3451
+ (de) => de.id === E
3439
3452
  );
3440
- U && (U.disabled = A, U.disableDoubleClick = V);
3453
+ U && (U.disabled = A, U.disableDoubleClick = q);
3441
3454
  }
3442
3455
  }),
3443
- [T, v, b, c, E]
3444
- ), N = H(null);
3456
+ [T, v, b, c, P]
3457
+ ), N = j(null);
3445
3458
  return re(() => {
3446
- const P = k.current;
3447
- if (P === null)
3459
+ const E = k.current;
3460
+ if (E === null)
3448
3461
  return;
3449
3462
  const A = h.current;
3450
3463
  A.panels = _e(
@@ -3453,25 +3466,25 @@ function Fo({
3453
3466
  ), A.separators = _e(
3454
3467
  c,
3455
3468
  A.separators
3456
- ), w.current = Oo([
3469
+ ), x.current = Fo([
3457
3470
  ...A.panels.map(({ element: ee }) => ee),
3458
3471
  ...A.separators.map(({ element: ee }) => ee)
3459
3472
  ]);
3460
- let V;
3461
- if (E.defaultLayout !== void 0 && Object.keys(E.defaultLayout).length === A.panels.length) {
3462
- V = {};
3473
+ let q;
3474
+ if (P.defaultLayout !== void 0 && Object.keys(P.defaultLayout).length === A.panels.length) {
3475
+ q = {};
3463
3476
  for (const ee of A.panels) {
3464
- const C = E.defaultLayout[ee.id];
3465
- C !== void 0 && (V[ee.id] = C);
3477
+ const I = P.defaultLayout[ee.id];
3478
+ I !== void 0 && (q[ee.id] = I);
3466
3479
  }
3467
3480
  }
3468
- const j = {
3481
+ const V = {
3469
3482
  disabled: !!r,
3470
- element: P,
3483
+ element: E,
3471
3484
  id: v,
3472
3485
  mutableState: {
3473
- defaultLayout: V,
3474
- disableCursor: !!E.disableCursor,
3486
+ defaultLayout: q,
3487
+ disableCursor: !!P.disableCursor,
3475
3488
  expandedItemSizes: h.current.lastExpandedPanelSizes,
3476
3489
  layouts: h.current.layouts
3477
3490
  },
@@ -3479,44 +3492,44 @@ function Fo({
3479
3492
  items: A.panels,
3480
3493
  resizePreviewMode: d,
3481
3494
  get resizeTargetMinimumSize() {
3482
- return E.resizeTargetMinimumSize;
3495
+ return P.resizeTargetMinimumSize;
3483
3496
  },
3484
3497
  separators: A.separators
3485
3498
  };
3486
- N.current = j;
3487
- const U = Cn(j), {
3499
+ N.current = V;
3500
+ const U = Rn(V), {
3488
3501
  defaultLayoutDeferred: de,
3489
- derivedItemConstraints: xe,
3502
+ derivedItemConstraints: we,
3490
3503
  layout: Le,
3491
- requestedLayout: Ie
3492
- } = ue(j.id, !0);
3493
- if (!de && xe.length > 0)
3504
+ requestedLayout: Ce
3505
+ } = ue(V.id, !0);
3506
+ if (!de && we.length > 0)
3494
3507
  try {
3495
3508
  try {
3496
3509
  y(Le);
3497
3510
  } finally {
3498
- S(Le, !1, Ie);
3511
+ S(Le, !1, Ce);
3499
3512
  }
3500
3513
  } catch (ee) {
3501
3514
  throw N.current = null, U(), ee;
3502
3515
  }
3503
- const De = qe(v, (ee) => {
3516
+ const $e = He(v, (ee) => {
3504
3517
  const {
3505
- defaultLayoutDeferred: C,
3506
- derivedItemConstraints: $,
3518
+ defaultLayoutDeferred: I,
3519
+ derivedItemConstraints: D,
3507
3520
  layout: B,
3508
3521
  requestedLayout: _
3509
3522
  } = ee.next;
3510
- if (C || $.length === 0)
3523
+ if (I || D.length === 0)
3511
3524
  return;
3512
- Rn({
3513
- derivedItemConstraints: $,
3514
- axis: j,
3525
+ Pn({
3526
+ derivedItemConstraints: D,
3527
+ axis: V,
3515
3528
  layout: B,
3516
3529
  prevLayout: ee.prev?.layout,
3517
3530
  requestedLayout: _
3518
3531
  });
3519
- const q = ae(), Z = q.state !== "active" || !q.hitRegions.some((K) => K.axis === j);
3532
+ const H = ae(), Z = H.state !== "active" || !H.hitRegions.some((K) => K.axis === V);
3520
3533
  try {
3521
3534
  y(B);
3522
3535
  } finally {
@@ -3528,7 +3541,7 @@ function Fo({
3528
3541
  }
3529
3542
  });
3530
3543
  return () => {
3531
- N.current = null, U(), De();
3544
+ N.current = null, U(), $e();
3532
3545
  };
3533
3546
  }, [
3534
3547
  r,
@@ -3538,13 +3551,13 @@ function Fo({
3538
3551
  c,
3539
3552
  O,
3540
3553
  d,
3541
- E
3554
+ P
3542
3555
  ]), re(() => {
3543
- To(w.current) || b();
3544
- }), je(() => {
3545
- const P = N.current;
3546
- P && (P.mutableState.defaultLayout = n, P.mutableState.disableCursor = !!o);
3547
- }), /* @__PURE__ */ X($n.Provider, { value: M, children: /* @__PURE__ */ X(kt.Provider, { value: G, children: /* @__PURE__ */ Gn(
3556
+ Ao(x.current) || b();
3557
+ }), Ve(() => {
3558
+ const E = N.current;
3559
+ E && (E.mutableState.defaultLayout = n, E.mutableState.disableCursor = !!o);
3560
+ }), /* @__PURE__ */ X(An.Provider, { value: M, children: /* @__PURE__ */ X(Tt.Provider, { value: G, children: /* @__PURE__ */ On(
3548
3561
  "div",
3549
3562
  {
3550
3563
  ...m,
@@ -3552,7 +3565,7 @@ function Fo({
3552
3565
  "data-group": !0,
3553
3566
  "data-testid": Xe(m, a),
3554
3567
  id: v,
3555
- ref: I,
3568
+ ref: C,
3556
3569
  style: {
3557
3570
  height: "100%",
3558
3571
  width: "100%",
@@ -3570,23 +3583,25 @@ function Fo({
3570
3583
  },
3571
3584
  children: [
3572
3585
  e,
3573
- R.map((P) => /* @__PURE__ */ X(
3574
- Do,
3586
+ R.map((E) => /* @__PURE__ */ X(
3587
+ No,
3575
3588
  {
3576
3589
  overlay: z,
3577
- preview: P
3590
+ preview: E
3578
3591
  },
3579
- P.key
3592
+ E.key
3580
3593
  ))
3581
3594
  ]
3582
3595
  }
3583
3596
  ) }) });
3584
3597
  }
3585
- Fo.displayName = "Group";
3598
+ const ir = /* @__PURE__ */ Object.assign(jo, {
3599
+ displayName: "Group"
3600
+ });
3586
3601
  function rt(e, t) {
3587
3602
  return `react-resizable-panels:${[e, ...t].join(":")}`;
3588
3603
  }
3589
- function _o({
3604
+ function Ho({
3590
3605
  id: e,
3591
3606
  panelIds: t,
3592
3607
  storage: n
@@ -3621,7 +3636,7 @@ function _o({
3621
3636
  } catch {
3622
3637
  }
3623
3638
  }
3624
- function er({
3639
+ function sr({
3625
3640
  debounceSaveMs: e = 100,
3626
3641
  onlySaveAfterUserInteractions: t,
3627
3642
  panelIds: n,
@@ -3629,7 +3644,7 @@ function er({
3629
3644
  ...r
3630
3645
  }) {
3631
3646
  const i = n !== void 0, s = "id" in r ? r.id : r.groupId, a = rt(s, n ?? []), u = at(
3632
- Bo,
3647
+ qo,
3633
3648
  () => o.getItem(a),
3634
3649
  () => o.getItem(a)
3635
3650
  ), l = pe(() => {
@@ -3640,16 +3655,16 @@ function er({
3640
3655
  }
3641
3656
  }, [u]), c = pe(() => {
3642
3657
  if (!l)
3643
- return _o({
3658
+ return Ho({
3644
3659
  id: s,
3645
3660
  panelIds: n,
3646
3661
  storage: o
3647
3662
  });
3648
- }, [l, s, n, o]), d = l ?? c, p = H(null), g = se(() => {
3663
+ }, [l, s, n, o]), d = l ?? c, p = j(null), g = se(() => {
3649
3664
  const y = p.current;
3650
3665
  y && (p.current = null, clearTimeout(y));
3651
3666
  }, []);
3652
- cn(() => () => {
3667
+ ln(() => () => {
3653
3668
  g();
3654
3669
  }, [g]);
3655
3670
  const m = se(
@@ -3667,8 +3682,8 @@ function er({
3667
3682
  i ? z = rt(s, Object.keys(v)) : z = rt(s, []);
3668
3683
  try {
3669
3684
  o.setItem(z, JSON.stringify(v));
3670
- } catch (x) {
3671
- console.error(x);
3685
+ } catch (w) {
3686
+ console.error(w);
3672
3687
  }
3673
3688
  },
3674
3689
  [
@@ -3703,22 +3718,22 @@ function er({
3703
3718
  onLayoutChanged: m
3704
3719
  };
3705
3720
  }
3706
- function Bo() {
3721
+ function qo() {
3707
3722
  return function() {
3708
3723
  };
3709
3724
  }
3710
- function tr() {
3725
+ function ar() {
3711
3726
  return ve(null);
3712
3727
  }
3713
- function nr() {
3714
- return H(null);
3728
+ function cr() {
3729
+ return j(null);
3715
3730
  }
3716
- function or() {
3717
- return We($n);
3731
+ function lr() {
3732
+ return We(An);
3718
3733
  }
3719
3734
  const Dn = Ue(null);
3720
- function Ho(e, t) {
3721
- const { id: n } = ft(), o = H({
3735
+ function Vo(e, t) {
3736
+ const { id: n } = ft(), o = j({
3722
3737
  collapse: pt,
3723
3738
  expand: pt,
3724
3739
  getSize: () => ({
@@ -3731,11 +3746,11 @@ function Ho(e, t) {
3731
3746
  return St(t, () => o.current, []), re(() => {
3732
3747
  Object.assign(
3733
3748
  o.current,
3734
- Mt({ axisId: n, itemId: e })
3749
+ kt({ axisId: n, itemId: e })
3735
3750
  );
3736
3751
  }), o;
3737
3752
  }
3738
- function qo({
3753
+ function Uo({
3739
3754
  children: e,
3740
3755
  className: t,
3741
3756
  collapsedSize: n = "0%",
@@ -3755,21 +3770,21 @@ function qo({
3755
3770
  }) {
3756
3771
  const y = it(l), S = Ae(l), v = dt({
3757
3772
  disabled: s
3758
- }), z = H(null), x = Ye(z, a), {
3773
+ }), z = j(null), w = Ye(z, a), {
3759
3774
  getPanelStyles: R,
3760
3775
  id: k,
3761
3776
  orientation: O,
3762
3777
  registerPanel: b,
3763
- updatePanelProps: w
3764
- } = ft(), h = p !== null, I = we(
3765
- (N, P, A) => {
3778
+ updatePanelProps: x
3779
+ } = ft(), h = p !== null, C = xe(
3780
+ (N, E, A) => {
3766
3781
  p?.(N, l, A);
3767
3782
  }
3768
3783
  );
3769
3784
  re(() => {
3770
3785
  const N = z.current;
3771
3786
  if (N !== null) {
3772
- const P = {
3787
+ const E = {
3773
3788
  element: N,
3774
3789
  id: S,
3775
3790
  idIsStable: y,
@@ -3777,7 +3792,7 @@ function qo({
3777
3792
  expandToSize: void 0,
3778
3793
  prevSize: void 0
3779
3794
  },
3780
- onResize: h ? I : void 0,
3795
+ onResize: h ? C : void 0,
3781
3796
  constraintProps: {
3782
3797
  groupResizeBehavior: u,
3783
3798
  collapsedSize: n,
@@ -3789,7 +3804,7 @@ function qo({
3789
3804
  minSize: d
3790
3805
  }
3791
3806
  };
3792
- return b(P);
3807
+ return b(E);
3793
3808
  }
3794
3809
  }, [
3795
3810
  u,
@@ -3802,13 +3817,13 @@ function qo({
3802
3817
  y,
3803
3818
  c,
3804
3819
  d,
3805
- I,
3820
+ C,
3806
3821
  b,
3807
3822
  v
3808
- ]), je(() => {
3809
- w(S, { disabled: s });
3810
- }, [s, S, w]);
3811
- const L = Ho(S, g), M = pe(
3823
+ ]), Ve(() => {
3824
+ x(S, { disabled: s });
3825
+ }, [s, S, x]);
3826
+ const L = Vo(S, g), M = pe(
3812
3827
  () => ({
3813
3828
  collapse: () => L.current.collapse(),
3814
3829
  expand: () => L.current.expand(),
@@ -3823,13 +3838,13 @@ function qo({
3823
3838
  const N = R(k, S);
3824
3839
  if (N)
3825
3840
  return JSON.stringify(N);
3826
- }, E = at(
3827
- (N) => qe(k, N),
3841
+ }, P = at(
3842
+ (N) => He(k, N),
3828
3843
  T,
3829
3844
  T
3830
3845
  );
3831
3846
  let G;
3832
- return E ? G = JSON.parse(E) : i !== void 0 ? G = {
3847
+ return P ? G = JSON.parse(P) : i !== void 0 ? G = {
3833
3848
  flexGrow: void 0,
3834
3849
  flexShrink: void 0,
3835
3850
  flexBasis: i
@@ -3841,9 +3856,9 @@ function qo({
3841
3856
  "data-panel": !0,
3842
3857
  "data-testid": Xe(f, l),
3843
3858
  id: S,
3844
- ref: x,
3859
+ ref: w,
3845
3860
  style: {
3846
- ...Vo,
3861
+ ...Wo,
3847
3862
  display: "flex",
3848
3863
  flexBasis: 0,
3849
3864
  flexShrink: 1,
@@ -3872,8 +3887,9 @@ function qo({
3872
3887
  }
3873
3888
  );
3874
3889
  }
3875
- qo.displayName = "Panel";
3876
- const Vo = {
3890
+ const ur = /* @__PURE__ */ Object.assign(Uo, {
3891
+ displayName: "Panel"
3892
+ }), Wo = {
3877
3893
  minHeight: 0,
3878
3894
  maxHeight: "100%",
3879
3895
  height: "auto",
@@ -3885,17 +3901,17 @@ const Vo = {
3885
3901
  padding: 0,
3886
3902
  margin: 0
3887
3903
  };
3888
- function rr() {
3904
+ function dr() {
3889
3905
  return ve(null);
3890
3906
  }
3891
- function ir() {
3892
- return H(null);
3907
+ function fr() {
3908
+ return j(null);
3893
3909
  }
3894
- function sr() {
3910
+ function mr() {
3895
3911
  return We(Dn);
3896
3912
  }
3897
- const jo = { flexBasis: "auto" }, Uo = { flexGrow: 0, flexShrink: 0 };
3898
- function Wo({
3913
+ const Yo = { flexBasis: "auto" }, Xo = { flexGrow: 0, flexShrink: 0 };
3914
+ function Ko({
3899
3915
  children: e,
3900
3916
  className: t,
3901
3917
  disabled: n,
@@ -3914,7 +3930,7 @@ function Wo({
3914
3930
  updateSeparatorProps: m
3915
3931
  } = ft();
3916
3932
  return /* @__PURE__ */ X(
3917
- Mn,
3933
+ kn,
3918
3934
  {
3919
3935
  attributes: u,
3920
3936
  axisId: d,
@@ -3928,34 +3944,36 @@ function Wo({
3928
3944
  id: l,
3929
3945
  preview: s,
3930
3946
  registerSeparator: g,
3931
- requiredStyle: Uo,
3947
+ requiredStyle: Xo,
3932
3948
  style: a,
3933
- styleDefaults: jo,
3949
+ styleDefaults: Yo,
3934
3950
  updateSeparatorProps: m,
3935
3951
  children: e
3936
3952
  }
3937
3953
  );
3938
3954
  }
3939
- Wo.displayName = "Separator";
3955
+ const pr = /* @__PURE__ */ Object.assign(Ko, {
3956
+ displayName: "Separator"
3957
+ });
3940
3958
  export {
3941
- qn as Cell,
3942
- Eo as Grid,
3943
- kn as Gridline,
3944
- Fo as Group,
3945
- qo as Panel,
3946
- Wo as Separator,
3947
- An as SeparatorOverlay,
3948
- Vn as isCoarsePointer,
3949
- Ko as useDefaultGridLayout,
3950
- er as useDefaultLayout,
3951
- Jo as useGridCallbackRef,
3952
- Zo as useGridRef,
3953
- tr as useGroupCallbackRef,
3954
- nr as useGroupRef,
3955
- rr as usePanelCallbackRef,
3956
- ir as usePanelRef,
3957
- Qo as useParentGrid,
3958
- or as useParentGroup,
3959
- sr as useParentPanel
3959
+ Qo as Cell,
3960
+ er as Grid,
3961
+ Po as Gridline,
3962
+ ir as Group,
3963
+ ur as Panel,
3964
+ pr as Separator,
3965
+ Oo as SeparatorOverlay,
3966
+ Hn as isCoarsePointer,
3967
+ tr as useDefaultGridLayout,
3968
+ sr as useDefaultLayout,
3969
+ nr as useGridCallbackRef,
3970
+ or as useGridRef,
3971
+ ar as useGroupCallbackRef,
3972
+ cr as useGroupRef,
3973
+ dr as usePanelCallbackRef,
3974
+ fr as usePanelRef,
3975
+ rr as useParentGrid,
3976
+ lr as useParentGroup,
3977
+ mr as useParentPanel
3960
3978
  };
3961
3979
  //# sourceMappingURL=react-resizable-panels.js.map