react-resizable-panels 4.15.0 → 4.15.2

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