@archbase/layout 4.0.25 → 4.0.26

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.
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- import { Menu as at, useMantineTheme as Qt, useComputedColorScheme as te, Box as ee, ActionIcon as ie, useMantineColorScheme as oe } from "@mantine/core";
2
- import { Card as $i, Container as Mi, Group as ji, Stack as Bi } from "@mantine/core";
1
+ import { Menu as dt, Loader as te, useMantineTheme as ee, useComputedColorScheme as ie, Box as oe, ActionIcon as ne, useMantineColorScheme as re } from "@mantine/core";
2
+ import { Card as Mi, Container as Bi, Group as Ii, Stack as Oi } from "@mantine/core";
3
3
  import { jsx as a, jsxs as F, Fragment as Et } from "react/jsx-runtime";
4
4
  import * as h from "prop-types";
5
5
  import * as O from "react";
6
- import W, { useRef as it, useState as U, useEffect as et, useCallback as kt, useMemo as Ht } from "react";
7
- import { ResizeSensor as ne } from "css-element-queries";
8
- import { useWindowSize as re } from "usehooks-ts";
6
+ import W, { useRef as ot, useState as U, useEffect as it, useCallback as kt, useMemo as Ht } from "react";
7
+ import { ResizeSensor as se } from "css-element-queries";
8
+ import { useWindowSize as le } from "usehooks-ts";
9
9
  import { useArchbaseTranslation as Wt } from "@archbase/core";
10
- import { useElementSize as se } from "@mantine/hooks";
11
- import { PanelGroup as Ft, Panel as Mt, PanelResizeHandle as Vt } from "react-resizable-panels";
12
- import { IconPinnedOff as le, IconPinned as ae } from "@tabler/icons-react";
13
- import { MosaicWindow as de, Mosaic as ce } from "react-mosaic-component";
10
+ import { useElementSize as ae } from "@mantine/hooks";
11
+ import { PanelGroup as Ft, Panel as jt, PanelResizeHandle as Vt } from "react-resizable-panels";
12
+ import { IconPinnedOff as de, IconPinned as ce } from "@tabler/icons-react";
13
+ import { MosaicWindow as he, Mosaic as ue } from "react-mosaic-component";
14
14
  import "react-mosaic-component/react-mosaic-component.css";
15
- import { DockviewReact as he } from "dockview-react";
16
- function bi({ children: t }) {
15
+ import { DockviewReact as fe } from "dockview-react";
16
+ function zi({ children: t }) {
17
17
  return /* @__PURE__ */ a("form", { children: t });
18
18
  }
19
19
  var A = /* @__PURE__ */ ((t) => (t.ViewPort = "viewport", t.Fixed = "fixed", t.Fill = "fill", t.Positioned = "positioned", t.Anchored = "anchored", t.Custom = "custom", t))(A || {}), C = /* @__PURE__ */ ((t) => (t.Left = "anchor-left", t.Right = "anchor-right", t.Top = "anchor-top", t.Bottom = "anchor-bottom", t))(C || {}), mt = /* @__PURE__ */ ((t) => (t[t.Horizontal = 0] = "Horizontal", t[t.Vertical = 1] = "Vertical", t))(mt || {}), y = /* @__PURE__ */ ((t) => (t.All = "resize-all", t.Left = "resize-left", t.Right = "resize-right", t.Top = "resize-top", t.Bottom = "resize-bottom", t.TopLeft = "resize-topleft", t.TopRight = "resize-topright", t.BottomLeft = "resize-bottomleft", t.BottomRight = "resize-bottomright", t))(y || {}), rt = /* @__PURE__ */ ((t) => (t.OverlayInside = "overlay-inside", t.Inside = "inside", t.OverlayBoundary = "overlay-boundary", t))(rt || {}), st = /* @__PURE__ */ ((t) => (t.None = "none", t.Vertical = "vertical", t.HorizontalVertical = "horizontalVertical", t))(st || {}), zt = /* @__PURE__ */ ((t) => (t.Mouse = "mousemove", t.Touch = "touchmove", t))(zt || {}), wt = /* @__PURE__ */ ((t) => (t.Mouse = "mouseup", t.Touch = "touchend", t))(wt || {});
20
- function ue(t, ...i) {
20
+ function me(t, ...i) {
21
21
  const o = /* @__PURE__ */ Object.create(null);
22
22
  i.forEach((u) => {
23
23
  o[u] = !0;
@@ -27,7 +27,7 @@ function ue(t, ...i) {
27
27
  o[u] || (n[u] = t[u]);
28
28
  }), n;
29
29
  }
30
- function fe() {
30
+ function ge() {
31
31
  let t = Math.random() * 46656 | 0, i = Math.random() * 46656 | 0;
32
32
  return ("000" + t.toString(36)).slice(-3) + ("000" + i.toString(36)).slice(-3);
33
33
  }
@@ -41,7 +41,7 @@ function v(t, i) {
41
41
  if (t.size !== void 0 && o.push($t(t.size)), t.adjusted.forEach((n) => o.push($t(n))), t.resized !== 0 && o.push($t(t.resized)), o.length !== 0)
42
42
  return o.length === 1 ? o[0] : i ? o.join(" + ") : `calc(${o.join(" + ")})`;
43
43
  }
44
- function Z(...t) {
44
+ function J(...t) {
45
45
  return t.find((i) => i != null);
46
46
  }
47
47
  function Ct(t, i) {
@@ -52,7 +52,7 @@ function Ct(t, i) {
52
52
  return !1;
53
53
  return !0;
54
54
  }
55
- function me(t, i) {
55
+ function be(t, i) {
56
56
  var o = !1;
57
57
  return function(...n) {
58
58
  o || (t(...n), o = !0, setTimeout(function() {
@@ -60,7 +60,7 @@ function me(t, i) {
60
60
  }, i));
61
61
  };
62
62
  }
63
- function ge(t) {
63
+ function pe(t) {
64
64
  const i = [], o = {
65
65
  position: t.position,
66
66
  left: v(t.left),
@@ -84,8 +84,8 @@ function ge(t) {
84
84
  break;
85
85
  }
86
86
  const e = `${u}px`, l = (s, f) => {
87
- const g = [];
88
- f.left && g.push(`left: ${f.left}`), f.top && g.push(`top: ${f.top}`), f.right && g.push(`right: ${f.right}`), f.bottom && g.push(`bottom: ${f.bottom}`), f.width && g.push(`width: ${f.width}`), f.height && g.push(`height: ${f.height}`), i.push(`#${t.id}-${s} { ${g.join("; ")}}`);
87
+ const m = [];
88
+ f.left && m.push(`left: ${f.left}`), f.top && m.push(`top: ${f.top}`), f.right && m.push(`right: ${f.right}`), f.bottom && m.push(`bottom: ${f.bottom}`), f.width && m.push(`width: ${f.width}`), f.height && m.push(`height: ${f.height}`), i.push(`#${t.id}-${s} { ${m.join("; ")}}`);
89
89
  }, p = () => t.type === A.Positioned ? t.width.size && t.height.size : t.orientation == mt.Horizontal ? t.width.size : t.height.size;
90
90
  return t.canResizeLeft && (t.anchor ? l("ml", {
91
91
  right: `calc(${v(t.right, !0)} + ${v(t.width)} - ${e})`,
@@ -224,7 +224,7 @@ function ge(t) {
224
224
  })), i.join(" ");
225
225
  }
226
226
  function yt(t) {
227
- const i = ge(t);
227
+ const i = pe(t);
228
228
  if (qt())
229
229
  t.ssrStyle = i;
230
230
  else {
@@ -237,7 +237,7 @@ function yt(t) {
237
237
  }
238
238
  }
239
239
  }
240
- function be(t) {
240
+ function ze(t) {
241
241
  const i = document.getElementById(`style_${t.id}`);
242
242
  i && document.head.removeChild(i);
243
243
  }
@@ -248,13 +248,13 @@ function Rt(t) {
248
248
  return t === y.Left || t === y.Right;
249
249
  }
250
250
  function Q(t, i, o, n, u, d) {
251
- const r = i === y.Right || i === y.Bottom ? (g) => -g : (g) => g, b = Rt(i) ? n.width : n.height, e = o.resized, l = b.resized, p = Rt(i) ? t.width : t.height, s = Z(n.minimumSize, 20) - p + 0, f = n.maximumSize ? n.maximumSize - p + 0 : void 0;
252
- return (g, z) => {
253
- let c = (Rt(i) ? u : d) - (Rt(i) ? g : z), m = r(c);
254
- n.type !== A.Positioned && (m = Math.max(r(c), s), m < s && (m = s), typeof f == "number" && m > f && (m = f)), o.size !== void 0 ? (o.resized = r(-c) + e, b.size && (b.resized = r(c) + l)) : b.resized = m + l;
251
+ const r = i === y.Right || i === y.Bottom ? (m) => -m : (m) => m, b = Rt(i) ? n.width : n.height, e = o.resized, l = b.resized, p = Rt(i) ? t.width : t.height, s = J(n.minimumSize, 20) - p + 0, f = n.maximumSize ? n.maximumSize - p + 0 : void 0;
252
+ return (m, z) => {
253
+ let c = (Rt(i) ? u : d) - (Rt(i) ? m : z), g = r(c);
254
+ n.type !== A.Positioned && (g = Math.max(r(c), s), g < s && (g = s), typeof f == "number" && g > f && (g = f)), o.size !== void 0 ? (o.resized = r(-c) + e, b.size && (b.resized = r(c) + l)) : b.resized = g + l;
255
255
  };
256
256
  }
257
- function pe(t, i, o, n) {
257
+ function we(t, i, o, n) {
258
258
  const u = i.element.getBoundingClientRect();
259
259
  switch (t) {
260
260
  case y.Left:
@@ -267,60 +267,60 @@ function pe(t, i, o, n) {
267
267
  return Q(u, t, i.top, i, o, n);
268
268
  case y.TopLeft:
269
269
  const d = Q(u, y.Top, i.top, i, o, n), r = Q(u, y.Left, i.left, i, o, n);
270
- return (g, z) => {
271
- d(g, z), r(g, z);
270
+ return (m, z) => {
271
+ d(m, z), r(m, z);
272
272
  };
273
273
  case y.TopRight:
274
274
  const b = Q(u, y.Top, i.top, i, o, n), e = Q(u, y.Right, i.right, i, o, n);
275
- return (g, z) => {
276
- b(g, z), e(g, z);
275
+ return (m, z) => {
276
+ b(m, z), e(m, z);
277
277
  };
278
278
  case y.BottomLeft:
279
279
  const l = Q(u, y.Bottom, i.bottom, i, o, n), p = Q(u, y.Left, i.left, i, o, n);
280
- return (g, z) => {
281
- l(g, z), p(g, z);
280
+ return (m, z) => {
281
+ l(m, z), p(m, z);
282
282
  };
283
283
  case y.BottomRight:
284
284
  const s = Q(u, y.Bottom, i.bottom, i, o, n), f = Q(u, y.Right, i.right, i, o, n);
285
- return (g, z) => {
286
- s(g, z), f(g, z);
285
+ return (m, z) => {
286
+ s(m, z), f(m, z);
287
287
  };
288
288
  default:
289
289
  throw `Resize type ${t} not supported`;
290
290
  }
291
291
  }
292
- function ze(t) {
292
+ function ye(t) {
293
293
  return {
294
294
  startResize(i, o, n, u, d, r, b) {
295
295
  if (n.onResizeStart) {
296
- const m = n.onResizeStart(o);
297
- if (typeof m == "boolean" && !m)
296
+ const g = n.onResizeStart(o);
297
+ if (typeof g == "boolean" && !g)
298
298
  return;
299
299
  }
300
- const e = r(i), l = pe(o, n, e.x, e.y);
300
+ const e = r(i), l = we(o, n, e.x, e.y);
301
301
  n.resizing = !0, n.updateParent();
302
302
  let p = 0, s = 0, f = !1;
303
- const g = (m, R) => {
304
- l(m, R), t.updateStyles(n);
305
- }, z = (m) => {
303
+ const m = (g, R) => {
304
+ l(g, R), t.updateStyles(n);
305
+ }, z = (g) => {
306
306
  f = !0;
307
- const R = r(m);
308
- p = R.x, s = R.y, m.preventDefault(), window.requestAnimationFrame(() => {
309
- n.resizing && g(p, s);
307
+ const R = r(g);
308
+ p = R.x, s = R.y, g.preventDefault(), window.requestAnimationFrame(() => {
309
+ n.resizing && m(p, s);
310
310
  });
311
311
  }, c = () => {
312
- n.resizing = !1, f && g(p, s), window.removeEventListener(d, z), window.removeEventListener(u, c), n.updateParent();
313
- const m = b || n.onResizeEnd;
314
- if (m) {
312
+ n.resizing = !1, f && m(p, s), window.removeEventListener(d, z), window.removeEventListener(u, c), n.updateParent();
313
+ const g = b || n.onResizeEnd;
314
+ if (g) {
315
315
  const R = n.element.getBoundingClientRect();
316
- m(Math.floor(Rt(o) ? R.width : R.height), R, o);
316
+ g(Math.floor(Rt(o) ? R.width : R.height), R, o);
317
317
  }
318
318
  };
319
319
  window.addEventListener(d, z), window.addEventListener(u, c);
320
320
  }
321
321
  };
322
322
  }
323
- function we(t) {
323
+ function Re(t) {
324
324
  function i(o, n, u, d, r) {
325
325
  const b = -(n - d), e = -(u - r);
326
326
  o.left.adjusted = [b], o.top.adjusted = [e], o.right.size && (o.right.adjusted = [-b]), o.bottom.size && (o.bottom.adjusted = [-e]), t.updateStyles(o);
@@ -329,24 +329,24 @@ function we(t) {
329
329
  startDrag(o, n, u, d, r, b) {
330
330
  if (n.element) {
331
331
  const e = r(o), l = n.left.adjusted.length === 0 ? 0 : n.left.adjusted[0], p = n.top.adjusted.length === 0 ? 0 : n.top.adjusted[0], s = e.x - l, f = e.y - p;
332
- let g = 0, z = 0, c = !1;
333
- const m = (I, M) => i(n, s, f, I, M), R = me(m, 5), S = (I) => {
332
+ let m = 0, z = 0, c = !1;
333
+ const g = (I, L) => i(n, s, f, I, L), R = be(g, 5), S = (I) => {
334
334
  c = !0;
335
- const M = r(I);
336
- g = M.x, z = M.y, I.preventDefault(), R(g, z);
335
+ const L = r(I);
336
+ m = L.x, z = L.y, I.preventDefault(), R(m, z);
337
337
  }, w = () => {
338
- if (c && m(g, z), window.removeEventListener(d, S), window.removeEventListener(u, w), b) {
338
+ if (c && g(m, z), window.removeEventListener(d, S), window.removeEventListener(u, w), b) {
339
339
  const I = n.parentId && t.getSpace(n.parentId)?.element.getBoundingClientRect() || {
340
340
  left: 0,
341
341
  top: 0
342
- }, M = (({ left: N, top: x, right: T, bottom: P, width: k, height: E }) => ({ left: N, top: x, right: T, bottom: P, width: k, height: E }))(
342
+ }, L = (({ left: N, top: x, right: T, bottom: P, width: k, height: E }) => ({ left: N, top: x, right: T, bottom: P, width: k, height: E }))(
343
343
  n.element.getBoundingClientRect()
344
344
  );
345
345
  b(
346
346
  {
347
- ...M,
348
- left: M.left - I.left,
349
- top: M.top - I.top
347
+ ...L,
348
+ left: L.left - I.left,
349
+ top: L.top - I.top
350
350
  },
351
351
  c
352
352
  );
@@ -374,14 +374,14 @@ const bt = {
374
374
  adjustBottom: () => !1,
375
375
  adjustEdge: () => !1,
376
376
  anchoredChildren: () => []
377
- }, ye = [C.Left, C.Top, C.Right, C.Bottom];
377
+ }, ve = [C.Left, C.Top, C.Right, C.Bottom];
378
378
  function _t(t) {
379
379
  return t === A.ViewPort ? "fixed" : t === A.Fixed ? "relative" : "absolute";
380
380
  }
381
381
  function Nt(t) {
382
382
  return t === C.Bottom || t === C.Top ? mt.Vertical : mt.Horizontal;
383
383
  }
384
- function Re(t) {
384
+ function Se(t) {
385
385
  return [
386
386
  {
387
387
  anchor: C.Left,
@@ -404,37 +404,37 @@ function Re(t) {
404
404
  function ut(t) {
405
405
  return { size: t, adjusted: [], resized: 0 };
406
406
  }
407
- function ve() {
407
+ function Te() {
408
408
  let t = [];
409
409
  const i = (e) => {
410
410
  t = e;
411
411
  }, o = (e) => n().find((l) => l.id === e), n = () => t, u = (e) => {
412
- const l = (z, c, m) => m.indexOf(z) === c, s = ((z) => {
412
+ const l = (z, c, g) => g.indexOf(z) === c, s = ((z) => {
413
413
  let c = [];
414
- return ye.forEach((m) => {
415
- const R = z.filter((w) => w.anchor !== void 0 && w.anchor === m);
414
+ return ve.forEach((g) => {
415
+ const R = z.filter((w) => w.anchor !== void 0 && w.anchor === g);
416
416
  R.map((w) => w.zIndex).filter(l).forEach((w) => {
417
- const I = R.filter((T) => T.zIndex === w), M = I.filter((T) => T.order !== void 0), N = I.filter((T) => T.order === void 0);
418
- var x = M.length > 0 ? M.map((T) => T.order).reduce((T, P) => Math.max(T, P)) : 0;
419
- c = [...c, ...M, ...N.map((T, P) => ({ ...T, order: x + P + 1 }))];
417
+ const I = R.filter((T) => T.zIndex === w), L = I.filter((T) => T.order !== void 0), N = I.filter((T) => T.order === void 0);
418
+ var x = L.length > 0 ? L.map((T) => T.order).reduce((T, P) => Math.max(T, P)) : 0;
419
+ c = [...c, ...L, ...N.map((T, P) => ({ ...T, order: x + P + 1 }))];
420
420
  });
421
- }), [...c, ...z.filter((m) => m.anchor === void 0)];
421
+ }), [...c, ...z.filter((g) => g.anchor === void 0)];
422
422
  })(e.children);
423
- for (var f = 0, g = s.length; f < g; f++) {
423
+ for (var f = 0, m = s.length; f < m; f++) {
424
424
  const z = s[f];
425
425
  let c = !1;
426
426
  if (z.type === A.Fill)
427
- Re(z).forEach((m) => {
427
+ Se(z).forEach((g) => {
428
428
  const R = [];
429
- e.anchoredChildren(s, m.anchor, z.zIndex).forEach((w) => {
429
+ e.anchoredChildren(s, g.anchor, z.zIndex).forEach((w) => {
430
430
  w.orientation === mt.Vertical ? (w.height.size && R.push(w.height.size), w.height.resized && R.push(w.height.resized)) : (w.width.size && R.push(w.width.size), w.width.resized && R.push(w.width.resized));
431
- }), m.update(R) && (c = !0);
431
+ }), g.update(R) && (c = !0);
432
432
  });
433
433
  else if (z.type === A.Anchored) {
434
- const m = [];
434
+ const g = [];
435
435
  e.anchoredChildren(s, z.anchor, z.zIndex).filter((S) => S.id !== z.id && S.order <= z.order).forEach((S) => {
436
- S.orientation === mt.Vertical ? (S.height.size && m.push(S.height.size), S.height.resized && m.push(S.height.resized)) : (S.width.size && m.push(S.width.size), S.width.resized && m.push(S.width.resized));
437
- }), z.adjustEdge(m) && (c = !0);
436
+ S.orientation === mt.Vertical ? (S.height.size && g.push(S.height.size), S.height.resized && g.push(S.height.resized)) : (S.width.size && g.push(S.width.size), S.width.resized && g.push(S.width.resized));
437
+ }), z.adjustEdge(g) && (c = !0);
438
438
  }
439
439
  c && yt(z);
440
440
  }
@@ -453,7 +453,7 @@ function ve() {
453
453
  const l = o(e.parentId);
454
454
  l && (l.children = l.children.filter((p) => p.id !== e.id), u(l));
455
455
  }
456
- be(e);
456
+ ze(e);
457
457
  },
458
458
  updateStyles: (e) => {
459
459
  if (e.parentId) {
@@ -467,22 +467,22 @@ function ve() {
467
467
  type: p,
468
468
  anchor: s,
469
469
  order: f,
470
- zIndex: g,
470
+ zIndex: m,
471
471
  scrollable: z,
472
472
  position: c,
473
- centerContent: m,
473
+ centerContent: g,
474
474
  minimumSize: R,
475
475
  maximumSize: S,
476
476
  handleSize: w,
477
477
  touchHandleSize: I,
478
- handlePlacement: M,
478
+ handlePlacement: L,
479
479
  allowOverflow: N
480
- } = l, x = c && c.leftResizable || !1, T = c && c.rightResizable || !1, P = c && c.topResizable || !1, k = c && c.bottomResizable || !1, E = c && c.topLeftResizable || !1, X = c && c.topRightResizable || !1, D = c && c.bottomLeftResizable || !1, ot = c && c.bottomRightResizable || !1;
481
- let L = !1;
482
- if (e.type !== p && (e.type = p, e.position = _t(p), L = !0), e.anchor !== s && (e.anchor = s, e.orientation = Nt(s), L = !0, p === A.Anchored && (s === C.Left ? e.adjustEdge = e.adjustLeft : s === C.Top ? e.adjustEdge = e.adjustTop : s === C.Right ? e.adjustEdge = e.adjustRight : s === C.Bottom && (e.adjustEdge = e.adjustBottom))), e.left.size !== (c && c.left) && (e.left.size = c && c.left, e.left.resized = 0, e.left.adjusted = [], L = !0), e.right.size !== (c && c.right) && (e.right.size = c && c.right, e.right.resized = 0, e.right.adjusted = [], L = !0), e.top.size !== (c && c.top) && (e.top.size = c && c.top, e.top.resized = 0, e.top.adjusted = [], L = !0), e.bottom.size !== (c && c.bottom) && (e.bottom.size = c && c.bottom, e.bottom.resized = 0, e.bottom.adjusted = [], L = !0), e.width.size !== (c && c.width) && (e.width.size = c && c.width, e.width.resized = 0, e.width.adjusted = [], L = !0), e.height.size !== (c && c.height) && (e.height.size = c && c.height, e.height.resized = 0, e.height.adjusted = [], L = !0), Z(e.order, 0) !== Z(f, 0) && (e.order = Z(f, 0), L = !0), Z(e.zIndex, 0) !== Z(g, 0) && (e.zIndex = Z(g, 0), L = !0), Z(e.scrollable, !1) !== Z(z, !1) && (e.scrollable = Z(z, !1), L = !0), e.minimumSize !== R && (e.minimumSize = R, L = !0), e.maximumSize !== S && (e.maximumSize = S, L = !0), Z(e.centerContent, st.None) !== Z(m, st.None) && (e.centerContent = Z(m, st.None), L = !0), e.handleSize !== w && (e.handleSize = w || bt.handleSize, L = !0), e.touchHandleSize !== I && (e.touchHandleSize = I || bt.touchHandleSize, L = !0), e.handlePlacement !== M && (e.handlePlacement = M || bt.handlePlacement, L = !0), e.canResizeBottom !== k && (e.canResizeBottom = k, L = !0), e.canResizeTop !== P && (e.canResizeTop = P, L = !0), e.canResizeLeft !== x && (e.canResizeLeft = x, L = !0), e.canResizeRight !== T && (e.canResizeRight = T, L = !0), e.canResizeTopLeft !== E && (e.canResizeTopLeft = E, L = !0), e.canResizeTopRight !== X && (e.canResizeTopRight = X, L = !0), e.canResizeBottomLeft !== D && (e.canResizeBottomLeft = D, L = !0), e.canResizeBottomRight !== ot && (e.canResizeBottomRight = ot, L = !0), e.allowOverflow !== N && (e.allowOverflow = N || bt.allowOverflow, L = !0), L) {
480
+ } = l, x = c && c.leftResizable || !1, T = c && c.rightResizable || !1, P = c && c.topResizable || !1, k = c && c.bottomResizable || !1, E = c && c.topLeftResizable || !1, K = c && c.topRightResizable || !1, _ = c && c.bottomLeftResizable || !1, tt = c && c.bottomRightResizable || !1;
481
+ let $ = !1;
482
+ if (e.type !== p && (e.type = p, e.position = _t(p), $ = !0), e.anchor !== s && (e.anchor = s, e.orientation = Nt(s), $ = !0, p === A.Anchored && (s === C.Left ? e.adjustEdge = e.adjustLeft : s === C.Top ? e.adjustEdge = e.adjustTop : s === C.Right ? e.adjustEdge = e.adjustRight : s === C.Bottom && (e.adjustEdge = e.adjustBottom))), e.left.size !== (c && c.left) && (e.left.size = c && c.left, e.left.resized = 0, e.left.adjusted = [], $ = !0), e.right.size !== (c && c.right) && (e.right.size = c && c.right, e.right.resized = 0, e.right.adjusted = [], $ = !0), e.top.size !== (c && c.top) && (e.top.size = c && c.top, e.top.resized = 0, e.top.adjusted = [], $ = !0), e.bottom.size !== (c && c.bottom) && (e.bottom.size = c && c.bottom, e.bottom.resized = 0, e.bottom.adjusted = [], $ = !0), e.width.size !== (c && c.width) && (e.width.size = c && c.width, e.width.resized = 0, e.width.adjusted = [], $ = !0), e.height.size !== (c && c.height) && (e.height.size = c && c.height, e.height.resized = 0, e.height.adjusted = [], $ = !0), J(e.order, 0) !== J(f, 0) && (e.order = J(f, 0), $ = !0), J(e.zIndex, 0) !== J(m, 0) && (e.zIndex = J(m, 0), $ = !0), J(e.scrollable, !1) !== J(z, !1) && (e.scrollable = J(z, !1), $ = !0), e.minimumSize !== R && (e.minimumSize = R, $ = !0), e.maximumSize !== S && (e.maximumSize = S, $ = !0), J(e.centerContent, st.None) !== J(g, st.None) && (e.centerContent = J(g, st.None), $ = !0), e.handleSize !== w && (e.handleSize = w || bt.handleSize, $ = !0), e.touchHandleSize !== I && (e.touchHandleSize = I || bt.touchHandleSize, $ = !0), e.handlePlacement !== L && (e.handlePlacement = L || bt.handlePlacement, $ = !0), e.canResizeBottom !== k && (e.canResizeBottom = k, $ = !0), e.canResizeTop !== P && (e.canResizeTop = P, $ = !0), e.canResizeLeft !== x && (e.canResizeLeft = x, $ = !0), e.canResizeRight !== T && (e.canResizeRight = T, $ = !0), e.canResizeTopLeft !== E && (e.canResizeTopLeft = E, $ = !0), e.canResizeTopRight !== K && (e.canResizeTopRight = K, $ = !0), e.canResizeBottomLeft !== _ && (e.canResizeBottomLeft = _, $ = !0), e.canResizeBottomRight !== tt && (e.canResizeBottomRight = tt, $ = !0), e.allowOverflow !== N && (e.allowOverflow = N || bt.allowOverflow, $ = !0), $) {
483
483
  if (e.parentId) {
484
- const q = o(e.parentId);
485
- q && u(q);
484
+ const V = o(e.parentId);
485
+ V && u(V);
486
486
  }
487
487
  yt(e);
488
488
  }
@@ -492,9 +492,9 @@ function ve() {
492
492
  startTouchResize: () => null,
493
493
  startMouseDrag: () => null,
494
494
  startTouchDrag: () => null
495
- }, r = ze(d), b = we(d);
495
+ }, r = ye(d), b = Re(d);
496
496
  return d.createSpace = (e, l, p) => {
497
- const { position: s, anchor: f, type: g, ...z } = l, c = s && s.rightResizable || !1, m = s && s.leftResizable || !1, R = s && s.bottomResizable || !1, S = s && s.topResizable || !1, w = s && s.topLeftResizable || !1, I = s && s.topRightResizable || !1, M = s && s.bottomLeftResizable || !1, N = s && s.bottomRightResizable || !1, x = {
497
+ const { position: s, anchor: f, type: m, ...z } = l, c = s && s.rightResizable || !1, g = s && s.leftResizable || !1, R = s && s.bottomResizable || !1, S = s && s.topResizable || !1, w = s && s.topLeftResizable || !1, I = s && s.topRightResizable || !1, L = s && s.bottomLeftResizable || !1, N = s && s.bottomRightResizable || !1, x = {
498
498
  ...bt,
499
499
  ...z,
500
500
  store: d,
@@ -508,9 +508,9 @@ function ve() {
508
508
  parentId: e,
509
509
  children: [],
510
510
  anchor: f,
511
- type: g,
511
+ type: m,
512
512
  orientation: Nt(f),
513
- position: _t(g),
513
+ position: _t(m),
514
514
  left: ut(s && s.left),
515
515
  right: ut(s && s.right),
516
516
  top: ut(s && s.top),
@@ -518,15 +518,15 @@ function ve() {
518
518
  width: ut(s && s.width),
519
519
  height: ut(s && s.height),
520
520
  canResizeLeft: c,
521
- canResizeRight: m,
521
+ canResizeRight: g,
522
522
  canResizeTop: R,
523
523
  canResizeBottom: S,
524
524
  canResizeTopLeft: w,
525
525
  canResizeTopRight: I,
526
- canResizeBottomLeft: M,
526
+ canResizeBottomLeft: L,
527
527
  canResizeBottomRight: N
528
528
  };
529
- return x.anchoredChildren = (T, P, k) => T.filter((E) => E.type === A.Anchored && E.anchor === P && E.zIndex === k), x.adjustLeft = (T) => Ct(x.left.adjusted, T) ? !1 : (x.left.adjusted = T, !0), x.adjustRight = (T) => Ct(x.right.adjusted, T) ? !1 : (x.right.adjusted = T, !0), x.adjustTop = (T) => Ct(x.top.adjusted, T) ? !1 : (x.top.adjusted = T, !0), x.adjustBottom = (T) => Ct(x.bottom.adjusted, T) ? !1 : (x.bottom.adjusted = T, !0), g === A.Anchored && (f === C.Left ? x.adjustEdge = x.adjustLeft : f === C.Top ? x.adjustEdge = x.adjustTop : f === C.Right ? x.adjustEdge = x.adjustRight : f === C.Bottom && (x.adjustEdge = x.adjustBottom)), x;
529
+ return x.anchoredChildren = (T, P, k) => T.filter((E) => E.type === A.Anchored && E.anchor === P && E.zIndex === k), x.adjustLeft = (T) => Ct(x.left.adjusted, T) ? !1 : (x.left.adjusted = T, !0), x.adjustRight = (T) => Ct(x.right.adjusted, T) ? !1 : (x.right.adjusted = T, !0), x.adjustTop = (T) => Ct(x.top.adjusted, T) ? !1 : (x.top.adjusted = T, !0), x.adjustBottom = (T) => Ct(x.bottom.adjusted, T) ? !1 : (x.bottom.adjusted = T, !0), m === A.Anchored && (f === C.Left ? x.adjustEdge = x.adjustLeft : f === C.Top ? x.adjustEdge = x.adjustTop : f === C.Right ? x.adjustEdge = x.adjustRight : f === C.Bottom && (x.adjustEdge = x.adjustBottom)), x;
530
530
  }, d.startMouseResize = (e, l, p, s) => {
531
531
  r.startResize(
532
532
  p,
@@ -580,11 +580,11 @@ function ve() {
580
580
  }, d;
581
581
  }
582
582
  const Ut = (t) => {
583
- const i = it(void 0), o = it(!1), n = it(!1), [u, d] = U(0);
584
- o.current && (n.current = !0), et(() => (o.current || (i.current = t(), o.current = !0), d((r) => r + 1), () => {
583
+ const i = ot(void 0), o = ot(!1), n = ot(!1), [u, d] = U(0);
584
+ o.current && (n.current = !0), it(() => (o.current || (i.current = t(), o.current = !0), d((r) => r + 1), () => {
585
585
  n.current && i.current && i.current();
586
586
  }), []);
587
- }, jt = O.createContext(void 0), Bt = O.createContext(void 0), At = O.createContext(void 0), Xt = O.createContext({}), Gt = ve(), vt = {
587
+ }, Mt = O.createContext(void 0), Bt = O.createContext(void 0), At = O.createContext(void 0), Xt = O.createContext({}), Gt = Te(), vt = {
588
588
  id: h.string,
589
589
  className: h.string,
590
590
  style: h.oneOfType([h.object, h.array]),
@@ -605,7 +605,7 @@ const Ut = (t) => {
605
605
  onTouchMove: h.func,
606
606
  onTouchEnd: h.func
607
607
  };
608
- function Se() {
608
+ function xe() {
609
609
  const [, t] = O.useState(0);
610
610
  return O.useCallback(() => {
611
611
  t((i) => i + 1);
@@ -618,19 +618,19 @@ function Jt() {
618
618
  if (typeof O.useId == "function")
619
619
  return `s${O.useId().replace(/\:/g, "")}`;
620
620
  }
621
- return `s${fe()}`;
621
+ return `s${ge()}`;
622
622
  }
623
- function Te(t) {
624
- const i = Gt, o = Se(), n = O.useContext(jt), u = O.useContext(At), { debug: d } = O.useContext(Xt), r = Jt(), [b] = O.useState(t.id || r), e = O.useRef(null), l = O.useRef(void 0), [p, s] = O.useState();
623
+ function Ce(t) {
624
+ const i = Gt, o = xe(), n = O.useContext(Mt), u = O.useContext(At), { debug: d } = O.useContext(Xt), r = Jt(), [b] = O.useState(t.id || r), e = O.useRef(null), l = O.useRef(void 0), [p, s] = O.useState();
625
625
  let f = i.getSpace(b);
626
626
  d && console.table(i.getSpaces());
627
- const g = {
627
+ const m = {
628
628
  ...t,
629
629
  id: b,
630
- zIndex: Z(t.zIndex, u)
630
+ zIndex: J(t.zIndex, u)
631
631
  };
632
- f ? i.updateSpace(f, g) : (f = i.createSpace(n, g, o), i.addSpace(f));
633
- const z = Ce(i, f);
632
+ f ? i.updateSpace(f, m) : (f = i.createSpace(n, m, o), i.addSpace(f));
633
+ const z = Le(i, f);
634
634
  return Ut(() => {
635
635
  const c = e.current ? e.current.getBoundingClientRect() : new DOMRect();
636
636
  return f.dimension = {
@@ -643,18 +643,18 @@ function Te(t) {
643
643
  height: Math.floor(c.height),
644
644
  x: Math.floor(c.x),
645
645
  y: Math.floor(c.y)
646
- }, s(f.dimension), t.trackSize && (l.current = new ne(e.current, (m) => {
646
+ }, s(f.dimension), t.trackSize && (l.current = new se(e.current, (g) => {
647
647
  f.dimension = {
648
648
  ...c,
649
- width: Math.floor(m.width),
650
- height: Math.floor(m.height)
649
+ width: Math.floor(g.width),
650
+ height: Math.floor(g.height)
651
651
  }, s(f.dimension);
652
652
  })), () => {
653
653
  l.current && l.current.detach(), i.removeSpace(f);
654
654
  };
655
655
  }), { space: f, resizeHandles: z, domRect: p, elementRef: e };
656
656
  }
657
- const xe = [
657
+ const Ae = [
658
658
  { id: "ml", className: "resize-left", resizeType: y.Left, condition: (t) => t.canResizeLeft },
659
659
  { id: "mr", className: "resize-right", resizeType: y.Right, condition: (t) => t.canResizeRight },
660
660
  { id: "mt", className: "resize-top", resizeType: y.Top, condition: (t) => t.canResizeTop },
@@ -674,7 +674,7 @@ const xe = [
674
674
  condition: (t) => t.canResizeBottomRight
675
675
  }
676
676
  ];
677
- function Ce(t, i) {
677
+ function Le(t, i) {
678
678
  const o = [], n = (u, d, r) => {
679
679
  o.push({
680
680
  id: `${i.id}-${u}`,
@@ -684,14 +684,14 @@ function Ce(t, i) {
684
684
  onTouchStart: (b) => t.startTouchResize(r, i, b)
685
685
  });
686
686
  };
687
- return xe.forEach((u) => {
687
+ return Ae.forEach((u) => {
688
688
  u.condition(i) && n(u.id, u.className, u.resizeType);
689
689
  }), {
690
690
  mouseHandles: o
691
691
  };
692
692
  }
693
- function pi() {
694
- const t = Gt, i = O.useContext(jt), o = i ? t.getSpace(i) : void 0, n = O.useContext(Bt), u = O.useContext(At), d = O.useCallback(
693
+ function wi() {
694
+ const t = Gt, i = O.useContext(Mt), o = i ? t.getSpace(i) : void 0, n = O.useContext(Bt), u = O.useContext(At), d = O.useCallback(
695
695
  (p, s) => o ? t.startMouseDrag(o, p, s) : null,
696
696
  [i]
697
697
  ), r = O.useCallback(
@@ -710,26 +710,26 @@ function pi() {
710
710
  };
711
711
  }
712
712
  let ft = !1;
713
- function zi() {
713
+ function yi() {
714
714
  ft = !0;
715
715
  }
716
- const Ae = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered", children: t.children }), Le = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered-vertically", children: t.children });
717
- function $e(t, i) {
716
+ const $e = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered", children: t.children }), je = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered-vertically", children: t.children });
717
+ function Me(t, i) {
718
718
  switch (i) {
719
719
  case st.Vertical:
720
- return /* @__PURE__ */ a(Le, { children: t });
720
+ return /* @__PURE__ */ a(je, { children: t });
721
721
  case st.HorizontalVertical:
722
- return /* @__PURE__ */ a(Ae, { children: t });
722
+ return /* @__PURE__ */ a($e, { children: t });
723
723
  }
724
724
  return t;
725
725
  }
726
- class K extends O.Component {
726
+ class Y extends O.Component {
727
727
  _react_spaces_uniqueid;
728
728
  render() {
729
- return /* @__PURE__ */ a(Me, { ...this.props, wrapperInstance: this });
729
+ return /* @__PURE__ */ a(Be, { ...this.props, wrapperInstance: this });
730
730
  }
731
731
  }
732
- const Me = (t) => {
732
+ const Be = (t) => {
733
733
  let i = t.id ?? t.wrapperInstance._react_spaces_uniqueid;
734
734
  const [o, n] = O.useState(!!ft), u = Jt();
735
735
  i || (t.wrapperInstance._react_spaces_uniqueid = u, i = t.wrapperInstance._react_spaces_uniqueid);
@@ -742,10 +742,10 @@ const Me = (t) => {
742
742
  onMouseEnter: p,
743
743
  onMouseLeave: s,
744
744
  onMouseMove: f,
745
- onTouchStart: g,
745
+ onTouchStart: m,
746
746
  onTouchMove: z,
747
747
  onTouchEnd: c,
748
- children: m,
748
+ children: g,
749
749
  handleRender: R
750
750
  } = t, S = {
751
751
  onClick: b,
@@ -754,27 +754,27 @@ const Me = (t) => {
754
754
  onMouseEnter: p,
755
755
  onMouseLeave: s,
756
756
  onMouseMove: f,
757
- onTouchStart: g,
757
+ onTouchStart: m,
758
758
  onTouchMove: z,
759
759
  onTouchEnd: c
760
- }, { space: w, domRect: I, elementRef: M, resizeHandles: N } = Te({
760
+ }, { space: w, domRect: I, elementRef: L, resizeHandles: N } = Ce({
761
761
  ...t,
762
762
  id: i
763
763
  });
764
764
  if (ft && !qt()) {
765
- const D = document.getElementById(`style_${i}_ssr`);
766
- D && (w.ssrStyle = D.innerHTML), yt(w);
765
+ const _ = document.getElementById(`style_${i}_ssr`);
766
+ _ && (w.ssrStyle = _.innerHTML), yt(w);
767
767
  }
768
768
  Ut(() => {
769
- w.element = M.current, ft && o && n(!1);
769
+ w.element = L.current, ft && o && n(!1);
770
770
  });
771
- const x = r ? r.split(" ").map((D) => D.trim()) : [], T = [
771
+ const x = r ? r.split(" ").map((_) => _.trim()) : [], T = [
772
772
  "spaces-space",
773
- w.children.find((D) => D.resizing) ? "spaces-resizing" : void 0,
773
+ w.children.find((_) => _.resizing) ? "spaces-resizing" : void 0,
774
774
  w.type === A.Fixed ? "spaces-fixedsize-layout" : void 0,
775
775
  w.type === A.ViewPort ? "spaces-fullpage-layout" : void 0,
776
- ...x.map((D) => `${D}-container`)
777
- ].filter((D) => D), P = ["spaces-space-inner", ...x];
776
+ ...x.map((_) => `${_}-container`)
777
+ ].filter((_) => _), P = ["spaces-space-inner", ...x];
778
778
  let k = d;
779
779
  w.handlePlacement === rt.Inside && (k = {
780
780
  ...d,
@@ -783,19 +783,19 @@ const Me = (t) => {
783
783
  top: w.anchor === C.Bottom ? w.handleSize : void 0,
784
784
  bottom: w.anchor === C.Top ? w.handleSize : void 0
785
785
  });
786
- const E = $e(m, t.centerContent), X = {
786
+ const E = Me(g, t.centerContent), K = {
787
787
  id: w.id,
788
- ref: M,
788
+ ref: L,
789
789
  className: T.join(" "),
790
790
  ...S
791
791
  };
792
792
  return /* @__PURE__ */ F(Et, { children: [
793
- N.mouseHandles.map((D) => R?.(D) || /* @__PURE__ */ a("div", { ...D })),
793
+ N.mouseHandles.map((_) => R?.(_) || /* @__PURE__ */ a("div", { ..._ })),
794
794
  ft && w.ssrStyle && o && /* @__PURE__ */ a("style", { id: `style_${w.id}_ssr`, children: w.ssrStyle }),
795
795
  O.createElement(
796
796
  t.as || "div",
797
- X,
798
- /* @__PURE__ */ a("div", { className: P.join(" "), style: k, children: /* @__PURE__ */ a(jt.Provider, { value: w.id, children: /* @__PURE__ */ a(At.Provider, { value: void 0, children: /* @__PURE__ */ a(Bt.Provider, { value: I, children: E }) }) }) })
797
+ K,
798
+ /* @__PURE__ */ a("div", { className: P.join(" "), style: k, children: /* @__PURE__ */ a(Mt.Provider, { value: w.id, children: /* @__PURE__ */ a(At.Provider, { value: void 0, children: /* @__PURE__ */ a(Bt.Provider, { value: I, children: E }) }) }) })
799
799
  )
800
800
  ] });
801
801
  }, St = {
@@ -817,8 +817,8 @@ const Me = (t) => {
817
817
  }, Tt = {
818
818
  ...St,
819
819
  resizable: h.bool
820
- }, je = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
821
- K,
820
+ }, Ie = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
821
+ Y,
822
822
  {
823
823
  ...o,
824
824
  type: A.Anchored,
@@ -827,9 +827,9 @@ const Me = (t) => {
827
827
  children: t
828
828
  }
829
829
  );
830
- je.propTypes = St;
831
- const Be = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
832
- K,
830
+ Ie.propTypes = St;
831
+ const Oe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
832
+ Y,
833
833
  {
834
834
  ...n,
835
835
  type: A.Anchored,
@@ -838,9 +838,9 @@ const Be = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
838
838
  children: i
839
839
  }
840
840
  );
841
- Be.propTypes = Tt;
842
- const Ie = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
843
- K,
841
+ Oe.propTypes = Tt;
842
+ const De = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
843
+ Y,
844
844
  {
845
845
  ...o,
846
846
  type: A.Anchored,
@@ -849,9 +849,9 @@ const Ie = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
849
849
  children: t
850
850
  }
851
851
  );
852
- Ie.propTypes = St;
853
- const Oe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
854
- K,
852
+ De.propTypes = St;
853
+ const _e = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
854
+ Y,
855
855
  {
856
856
  ...n,
857
857
  type: A.Anchored,
@@ -860,9 +860,9 @@ const Oe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
860
860
  children: i
861
861
  }
862
862
  );
863
- Oe.propTypes = Tt;
864
- const De = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
865
- K,
863
+ _e.propTypes = Tt;
864
+ const Ne = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
865
+ Y,
866
866
  {
867
867
  ...o,
868
868
  type: A.Anchored,
@@ -871,9 +871,9 @@ const De = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
871
871
  children: t
872
872
  }
873
873
  );
874
- De.propTypes = St;
875
- const _e = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
876
- K,
874
+ Ne.propTypes = St;
875
+ const Pe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
876
+ Y,
877
877
  {
878
878
  ...n,
879
879
  type: A.Anchored,
@@ -882,9 +882,9 @@ const _e = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
882
882
  children: i
883
883
  }
884
884
  );
885
- _e.propTypes = Tt;
886
- const Ne = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
887
- K,
885
+ Pe.propTypes = Tt;
886
+ const Ee = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
887
+ Y,
888
888
  {
889
889
  ...o,
890
890
  type: A.Anchored,
@@ -893,9 +893,9 @@ const Ne = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
893
893
  children: t
894
894
  }
895
895
  );
896
- Ne.propTypes = St;
897
- const Pe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
898
- K,
896
+ Ee.propTypes = St;
897
+ const ke = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
898
+ Y,
899
899
  {
900
900
  ...n,
901
901
  type: A.Anchored,
@@ -904,8 +904,8 @@ const Pe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
904
904
  children: i
905
905
  }
906
906
  );
907
- Pe.propTypes = Tt;
908
- const Ee = ue(
907
+ ke.propTypes = Tt;
908
+ const He = me(
909
909
  {
910
910
  ...Tt,
911
911
  type: h.oneOf([A.Positioned, A.Fill, A.Anchored]),
@@ -920,7 +920,7 @@ const Ee = ue(
920
920
  resizeTypes: h.array
921
921
  },
922
922
  "size"
923
- ), ke = ({
923
+ ), We = ({
924
924
  children: t,
925
925
  type: i,
926
926
  left: o,
@@ -935,8 +935,8 @@ const Ee = ue(
935
935
  resizeTypes: s,
936
936
  ...f
937
937
  }) => {
938
- let g;
939
- return i = i || A.Fill, i === A.Positioned ? g = {
938
+ let m;
939
+ return i = i || A.Fill, i === A.Positioned ? m = {
940
940
  left: o,
941
941
  top: n,
942
942
  right: u,
@@ -951,30 +951,30 @@ const Ee = ue(
951
951
  topRightResizable: s && (s.includes(y.TopRight) || s.includes(y.All)),
952
952
  bottomLeftResizable: s && (s.includes(y.BottomLeft) || s.includes(y.All)),
953
953
  bottomRightResizable: s && (s.includes(y.BottomRight) || s.includes(y.All))
954
- } : l === C.Left ? (g = { left: 0, top: 0, bottom: 0, width: e, rightResizable: p }, i = A.Anchored) : l === C.Right ? (g = { right: 0, top: 0, bottom: 0, width: e, leftResizable: p }, i = A.Anchored) : l === C.Top ? (g = { left: 0, top: 0, right: 0, height: e, bottomResizable: p }, i = A.Anchored) : l === C.Bottom ? (g = { left: 0, bottom: 0, right: 0, height: e, topResizable: p }, i = A.Anchored) : (g = {
954
+ } : l === C.Left ? (m = { left: 0, top: 0, bottom: 0, width: e, rightResizable: p }, i = A.Anchored) : l === C.Right ? (m = { right: 0, top: 0, bottom: 0, width: e, leftResizable: p }, i = A.Anchored) : l === C.Top ? (m = { left: 0, top: 0, right: 0, height: e, bottomResizable: p }, i = A.Anchored) : l === C.Bottom ? (m = { left: 0, bottom: 0, right: 0, height: e, topResizable: p }, i = A.Anchored) : (m = {
955
955
  left: 0,
956
956
  top: 0,
957
957
  bottom: 0,
958
958
  right: 0
959
- }, i = A.Fill), /* @__PURE__ */ a(K, { ...f, type: i, anchor: l, position: g, children: t });
959
+ }, i = A.Fill), /* @__PURE__ */ a(Y, { ...f, type: i, anchor: l, position: m, children: t });
960
960
  };
961
- ke.propTypes = Ee;
962
- const He = (t) => /* @__PURE__ */ a(K, { ...t, type: A.Fill, position: { left: 0, top: 0, right: 0, bottom: 0 }, children: t.children });
963
- He.propTypes = vt;
964
- const We = ({ width: t, height: i, children: o, ...n }) => /* @__PURE__ */ a(K, { ...n, type: A.Fixed, position: { width: t, height: i }, children: o });
965
- We.propTypes = {
961
+ We.propTypes = He;
962
+ const Fe = (t) => /* @__PURE__ */ a(Y, { ...t, type: A.Fill, position: { left: 0, top: 0, right: 0, bottom: 0 }, children: t.children });
963
+ Fe.propTypes = vt;
964
+ const Ve = ({ width: t, height: i, children: o, ...n }) => /* @__PURE__ */ a(Y, { ...n, type: A.Fixed, position: { width: t, height: i }, children: o });
965
+ Ve.propTypes = {
966
966
  ...vt,
967
967
  width: h.oneOfType([h.string, h.number]),
968
968
  height: h.oneOfType([h.string, h.number]).isRequired
969
969
  };
970
- const Fe = (t) => /* @__PURE__ */ a(At.Provider, { value: t.zIndex, children: t.children });
971
- Fe.propTypes = {
970
+ const qe = (t) => /* @__PURE__ */ a(At.Provider, { value: t.zIndex, children: t.children });
971
+ qe.propTypes = {
972
972
  zIndex: h.number.isRequired
973
973
  };
974
- const Ve = ({ left: t, top: i, right: o, bottom: n, width: u, height: d, resizable: r, ...b }) => {
974
+ const Ue = ({ left: t, top: i, right: o, bottom: n, width: u, height: d, resizable: r, ...b }) => {
975
975
  const e = r || [];
976
976
  return /* @__PURE__ */ a(
977
- K,
977
+ Y,
978
978
  {
979
979
  ...b,
980
980
  type: A.Positioned,
@@ -998,7 +998,7 @@ const Ve = ({ left: t, top: i, right: o, bottom: n, width: u, height: d, resizab
998
998
  }
999
999
  );
1000
1000
  };
1001
- Ve.propTypes = {
1001
+ Ue.propTypes = {
1002
1002
  ...vt,
1003
1003
  left: h.oneOfType([h.string, h.number]),
1004
1004
  top: h.oneOfType([h.string, h.number]),
@@ -1008,18 +1008,18 @@ Ve.propTypes = {
1008
1008
  height: h.oneOfType([h.string, h.number]),
1009
1009
  resizable: h.array
1010
1010
  };
1011
- const wi = (t) => {
1011
+ const Ri = (t) => {
1012
1012
  const i = O.useContext(Bt);
1013
1013
  return i ? t.children(i) : t.children({ left: 0, top: 0, right: 0, bottom: 0, width: 0, height: 0, x: 0, y: 0, toJSON: () => "" });
1014
- }, qe = ({ left: t, top: i, right: o, bottom: n, children: u, ...d }) => /* @__PURE__ */ a(K, { ...d, type: A.ViewPort, position: { left: t || 0, top: i || 0, right: o || 0, bottom: n || 0 }, children: u });
1015
- qe.propTypes = {
1014
+ }, Xe = ({ left: t, top: i, right: o, bottom: n, children: u, ...d }) => /* @__PURE__ */ a(Y, { ...d, type: A.ViewPort, position: { left: t || 0, top: i || 0, right: o || 0, bottom: n || 0 }, children: u });
1015
+ Xe.propTypes = {
1016
1016
  ...vt,
1017
1017
  left: h.oneOfType([h.string, h.number]),
1018
1018
  top: h.oneOfType([h.string, h.number]),
1019
1019
  right: h.oneOfType([h.string, h.number]),
1020
1020
  bottom: h.oneOfType([h.string, h.number])
1021
1021
  };
1022
- const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i, children: t }), Ue = (t) => {
1022
+ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i, children: t }), Ge = (t) => {
1023
1023
  const {
1024
1024
  favicon: i,
1025
1025
  title: o,
@@ -1033,60 +1033,61 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1033
1033
  tabsContentWidth: p,
1034
1034
  animateTabMove: s,
1035
1035
  isDragging: f,
1036
- index: g,
1036
+ index: m,
1037
1037
  sorting: z,
1038
1038
  showButtonClose: c,
1039
- onCloseAllTabs: m,
1040
- onCloseLeftTabs: R,
1041
- onCloseRightTabs: S,
1042
- onCloseOtherTabs: w,
1043
- totalTabs: I
1044
- } = t, { t: M } = Wt("archbase"), [N, x] = U(0), [T, P] = U(!1), [k, E] = U(null), [X, D] = U(null), [ot, L] = U(!1), [q, tt] = U(0), [nt, G] = U(!1), lt = it(null), $ = 9, _ = 84, H = 60, V = 48;
1045
- et(() => (document.addEventListener("mousemove", j), document.addEventListener("mouseup", B), () => {
1046
- document.removeEventListener("mousemove", j), document.removeEventListener("mouseup", B);
1047
- })), et(() => {
1048
- T || setTimeout(() => P(!0), 500);
1049
- }, [T]), et(() => {
1050
- x(r + 2 * $);
1039
+ closing: g,
1040
+ onCloseAllTabs: R,
1041
+ onCloseLeftTabs: S,
1042
+ onCloseRightTabs: w,
1043
+ onCloseOtherTabs: I,
1044
+ totalTabs: L
1045
+ } = t, { t: N } = Wt("archbase"), [x, T] = U(0), [P, k] = U(!1), [E, K] = U(null), [_, tt] = U(null), [$, V] = U(!1), [et, lt] = U(0), [nt, X] = U(!1), j = ot(null), D = 9, H = 84, q = 60, G = 48;
1046
+ it(() => (document.addEventListener("mousemove", B), document.addEventListener("mouseup", at), () => {
1047
+ document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", at);
1048
+ })), it(() => {
1049
+ P || setTimeout(() => k(!0), 500);
1050
+ }, [P]), it(() => {
1051
+ T(r + 2 * D);
1051
1052
  }, [r]);
1052
- const J = (Y) => {
1053
- Y.button === 0 && (l(!0), D(Y.pageX), L(!1), tt(d));
1054
- }, j = (Y) => {
1055
- if (X != null && f) {
1056
- let ht = q - $ + (Y.pageX - X);
1057
- ht < 0 && (ht = 0), ht > p - N && (ht = p - N), E(ht), !z && s(ht);
1053
+ const M = (Z) => {
1054
+ Z.button === 0 && (l(!0), tt(Z.pageX), V(!1), lt(d));
1055
+ }, B = (Z) => {
1056
+ if (_ != null && f) {
1057
+ let ht = et - D + (Z.pageX - _);
1058
+ ht < 0 && (ht = 0), ht > p - x && (ht = p - x), K(ht), !z && s(ht);
1058
1059
  }
1059
- }, B = (Y) => {
1060
- X != null && f && (D(null), E(null), l(!1), L(!0));
1061
- }, [dt, ct] = U(d - $);
1062
- et(() => {
1063
- ct(d ? d - $ : 0);
1064
- }, [g, d]);
1065
- const gt = () => {
1066
- w && w(t.id), G(!1);
1067
- }, xt = () => {
1068
- R && R(t.id), G(!1);
1060
+ }, at = (Z) => {
1061
+ _ != null && f && (tt(null), K(null), l(!1), V(!0));
1062
+ }, [ct, gt] = U(d - D);
1063
+ it(() => {
1064
+ gt(d ? d - D : 0);
1065
+ }, [m, d]);
1066
+ const xt = () => {
1067
+ I && I(t.id), X(!1);
1069
1068
  }, Lt = () => {
1070
- S && S(t.id), G(!1);
1069
+ S && S(t.id), X(!1);
1071
1070
  }, Yt = () => {
1072
- m && m(), G(!1);
1073
- }, Kt = (Y) => {
1074
- Y.preventDefault(), G(!0);
1075
- }, It = g > 0, Ot = I !== void 0 && g < I - 1, Dt = (I || 0) > 1;
1071
+ w && w(t.id), X(!1);
1072
+ }, Kt = () => {
1073
+ R && R(), X(!1);
1074
+ }, Qt = (Z) => {
1075
+ Z.preventDefault(), X(!0);
1076
+ }, It = m > 0, Ot = L !== void 0 && m < L - 1, Dt = (L || 0) > 1;
1076
1077
  return /* @__PURE__ */ F(
1077
1078
  "div",
1078
1079
  {
1079
- className: `archbase_tab ${T ? "" : " archbase_tab-was-just-added"}${X == null && !u ? " archbase_tab-was-just-dragged" : ""}`,
1080
+ className: `archbase_tab ${P ? "" : " archbase_tab-was-just-added"}${_ == null && !u ? " archbase_tab-was-just-dragged" : ""}`,
1080
1081
  style: {
1081
- transform: `translate3d(${k ?? dt}px, 0, 0)`,
1082
- width: `${N}px`
1082
+ transform: `translate3d(${E ?? ct}px, 0, 0)`,
1083
+ width: `${x}px`
1083
1084
  },
1084
1085
  "tab-active": u !== !1 ? "" : null,
1085
- "is-small": r < _ ? "" : null,
1086
- "is-smaller": r < H ? "" : null,
1087
- "is-mini": r < V ? "" : null,
1088
- ref: lt,
1089
- onContextMenu: Kt,
1086
+ "is-small": r < H ? "" : null,
1087
+ "is-smaller": r < q ? "" : null,
1088
+ "is-mini": r < G ? "" : null,
1089
+ ref: j,
1090
+ onContextMenu: Qt,
1090
1091
  children: [
1091
1092
  /* @__PURE__ */ a("div", { className: "archbase_tab-dividers" }),
1092
1093
  /* @__PURE__ */ a("div", { className: "archbase_tab-background", children: /* @__PURE__ */ F("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: [
@@ -1101,98 +1102,107 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1101
1102
  /* @__PURE__ */ F("div", { className: "archbase_tab-content", children: [
1102
1103
  !!i && /* @__PURE__ */ a("div", { className: "archbase_tab-favicon", style: { backgroundImage: `url(${i})` } }),
1103
1104
  /* @__PURE__ */ a("div", { className: "archbase_tab-title", children: n ?? o }),
1104
- /* @__PURE__ */ a("div", { className: "archbase_tab-drag-handle", title: n ?? o, onClick: b, onPointerDown: (Y) => b(Y), onMouseUp: B, onMouseMove: j, onMouseDown: J }),
1105
- (m || R || S || w) && /* @__PURE__ */ F(at, { shadow: "md", width: 200, opened: nt, onChange: G, position: "bottom-end", children: [
1106
- /* @__PURE__ */ a(at.Target, { children: /* @__PURE__ */ a("div", { className: "archbase_tab-dropdown", onClick: (Y) => {
1107
- Y.stopPropagation(), G(!nt);
1105
+ /* @__PURE__ */ a("div", { className: "archbase_tab-drag-handle", title: n ?? o, onClick: b, onPointerDown: (Z) => b(Z), onMouseUp: at, onMouseMove: B, onMouseDown: M }),
1106
+ (R || S || w || I) && /* @__PURE__ */ F(dt, { shadow: "md", width: 200, opened: nt, onChange: X, position: "bottom-end", children: [
1107
+ /* @__PURE__ */ a(dt.Target, { children: /* @__PURE__ */ a("div", { className: "archbase_tab-dropdown", onClick: (Z) => {
1108
+ Z.stopPropagation(), X(!nt);
1108
1109
  } }) }),
1109
- /* @__PURE__ */ F(at.Dropdown, { children: [
1110
- Dt && /* @__PURE__ */ a(at.Item, { onClick: gt, children: String(M("tabs.closeOthers")) }),
1111
- It && /* @__PURE__ */ a(at.Item, { onClick: xt, children: String(M("tabs.closeLeft")) }),
1112
- Ot && /* @__PURE__ */ a(at.Item, { onClick: Lt, children: String(M("tabs.closeRight")) }),
1113
- (Dt || It || Ot) && /* @__PURE__ */ a(at.Divider, {}),
1114
- /* @__PURE__ */ a(at.Item, { onClick: Yt, children: String(M("tabs.closeAll")) })
1110
+ /* @__PURE__ */ F(dt.Dropdown, { children: [
1111
+ Dt && /* @__PURE__ */ a(dt.Item, { onClick: xt, children: String(N("tabs.closeOthers")) }),
1112
+ It && /* @__PURE__ */ a(dt.Item, { onClick: Lt, children: String(N("tabs.closeLeft")) }),
1113
+ Ot && /* @__PURE__ */ a(dt.Item, { onClick: Yt, children: String(N("tabs.closeRight")) }),
1114
+ (Dt || It || Ot) && /* @__PURE__ */ a(dt.Divider, {}),
1115
+ /* @__PURE__ */ a(dt.Item, { onClick: Kt, children: String(N("tabs.closeAll")) })
1115
1116
  ] })
1116
1117
  ] }),
1117
- c ? /* @__PURE__ */ a("div", { className: "archbase_tab-close", onClick: (Y) => {
1118
- e(Y);
1118
+ c ? g ? /* @__PURE__ */ a(
1119
+ "div",
1120
+ {
1121
+ className: "archbase_tab-close",
1122
+ style: { display: "flex", alignItems: "center", justifyContent: "center", cursor: "wait" },
1123
+ "aria-label": "closing",
1124
+ children: /* @__PURE__ */ a(te, { size: 12 })
1125
+ }
1126
+ ) : /* @__PURE__ */ a("div", { className: "archbase_tab-close", onClick: (Z) => {
1127
+ e(Z);
1119
1128
  } }) : null
1120
1129
  ] })
1121
1130
  ]
1122
1131
  }
1123
1132
  );
1124
- }, Ri = (t) => {
1125
- const { currentTabs: i, onTabChange: o, activeTab: n, onTabClose: u, className: d, style: r, dark: b, onClick: e, buttonCloseOnlyActiveTab: l = !1, onCloseAllTabs: p, onCloseLeftTabs: s, onCloseRightTabs: f, onCloseOtherTabs: g } = t, [z, c] = U([]), [m, R] = U([]), [S, w] = U(i || []), [I, M] = U(!1), [N, x] = U(!1), T = it(null), { width: P, height: k } = re(), E = 9, X = 1, D = 24, ot = 240;
1126
- et(() => {
1127
- c(q()), R(tt(q()));
1128
- }, []), et(() => {
1129
- L();
1130
- }, [JSON.stringify(S), P, k]), et(() => {
1133
+ }, Si = (t) => {
1134
+ const { currentTabs: i, onTabChange: o, activeTab: n, onTabClose: u, className: d, style: r, dark: b, onClick: e, buttonCloseOnlyActiveTab: l = !1, onCloseAllTabs: p, onCloseLeftTabs: s, onCloseRightTabs: f, onCloseOtherTabs: m } = t, [z, c] = U([]), [g, R] = U([]), [S, w] = U(i || []), [I, L] = U(!1), [N, x] = U(!1), T = ot(null), { width: P, height: k } = le(), E = 9, K = 1, _ = 24, tt = 240;
1135
+ it(() => {
1136
+ c(V()), R(et(V()));
1137
+ }, []), it(() => {
1138
+ $();
1139
+ }, [JSON.stringify(S), P, k]), it(() => {
1131
1140
  i && w(i);
1132
1141
  }, [JSON.stringify(i)]);
1133
- const L = () => {
1134
- const $ = q();
1135
- $ && (c($), R(tt($)));
1136
- }, q = () => {
1137
- const $ = [];
1142
+ const $ = () => {
1143
+ const j = V();
1144
+ j && (c(j), R(et(j)));
1145
+ }, V = () => {
1146
+ const j = [];
1138
1147
  if (T.current) {
1139
- const _ = S.length, H = T.current.clientWidth, V = (_ - 1) * X, J = (H - 2 * E + V) / _, j = Math.max(D, Math.min(ot, J)), B = Math.floor(j), dt = B * _ + 2 * E - V;
1140
- let gt = H - dt;
1141
- for (let xt = 0; xt < _; xt += 1) {
1142
- const Lt = B < ot && gt > 0 ? 1 : 0;
1143
- $.push(B + Lt), gt > 0 && (gt -= 1);
1148
+ const D = S.length, H = T.current.clientWidth, q = (D - 1) * K, G = (H - 2 * E + q) / D, M = Math.max(_, Math.min(tt, G)), B = Math.floor(M), at = B * D + 2 * E - q;
1149
+ let gt = H - at;
1150
+ for (let xt = 0; xt < D; xt += 1) {
1151
+ const Lt = B < tt && gt > 0 ? 1 : 0;
1152
+ j.push(B + Lt), gt > 0 && (gt -= 1);
1144
1153
  }
1145
1154
  }
1146
- return $;
1147
- }, tt = ($) => {
1148
- const _ = [], H = $ || z;
1149
- let V = E;
1150
- return H.forEach((J, j) => {
1151
- const B = j * X;
1152
- _.push(V - B), V += J;
1153
- }), _;
1154
- }, nt = ($, _) => {
1155
- M(!0);
1156
- let H = 1 / 0, V = -1, J = [];
1157
- m.forEach((j, B) => {
1158
- Math.abs($ - j) < H && (H = Math.abs($ - j), V = B);
1159
- }), V = Math.max(0, Math.min(m.length, V)), _ != V && (m.forEach((j, B) => {
1160
- B == _ ? J[B] = S[V > _ ? B + 1 : B - 1] : _ > B && B >= V ? J[B] = S[B + 1] : _ < B && B <= V ? J[B] = S[B - 1] : J[B] = S[B];
1161
- }), G(J) && o(J)), M(!1);
1162
- }, G = ($) => new Set($).size === $.length, lt = ($) => {
1163
- u ? u($) : o(S.filter((_, H) => H != $));
1155
+ return j;
1156
+ }, et = (j) => {
1157
+ const D = [], H = j || z;
1158
+ let q = E;
1159
+ return H.forEach((G, M) => {
1160
+ const B = M * K;
1161
+ D.push(q - B), q += G;
1162
+ }), D;
1163
+ }, lt = (j, D) => {
1164
+ L(!0);
1165
+ let H = 1 / 0, q = -1, G = [];
1166
+ g.forEach((M, B) => {
1167
+ Math.abs(j - M) < H && (H = Math.abs(j - M), q = B);
1168
+ }), q = Math.max(0, Math.min(g.length, q)), D != q && (g.forEach((M, B) => {
1169
+ B == D ? G[B] = S[q > D ? B + 1 : B - 1] : D > B && B >= q ? G[B] = S[B + 1] : D < B && B <= q ? G[B] = S[B - 1] : G[B] = S[B];
1170
+ }), nt(G) && o(G)), L(!1);
1171
+ }, nt = (j) => new Set(j).size === j.length, X = (j) => {
1172
+ u ? u(j) : o(S.filter((D, H) => H != j));
1164
1173
  };
1165
1174
  return /* @__PURE__ */ a("div", { className: d, style: r, children: /* @__PURE__ */ F(
1166
1175
  "div",
1167
1176
  {
1168
1177
  className: `archbase_tabs${b ? " archbase_tabs-dark-theme" : ""}${N ? "" : " archbase_tabs-is-sorting"}`,
1169
1178
  children: [
1170
- /* @__PURE__ */ a("div", { className: "archbase_tabs_content", ref: T, children: !!S && S.map(($, _) => !!m[_] && /* @__PURE__ */ a(
1171
- Ue,
1179
+ /* @__PURE__ */ a("div", { className: "archbase_tabs_content", ref: T, children: !!S && S.map((j, D) => !!g[D] && /* @__PURE__ */ a(
1180
+ Ge,
1172
1181
  {
1173
- favicon: $.favicon,
1174
- title: $.title,
1175
- customTitle: $.customTitle,
1176
- activeTab: n === $.key,
1177
- position: m[_],
1178
- contentWidth: z[_],
1179
- onClick: (H) => e($.key),
1180
- onClose: (H) => lt($.key),
1182
+ favicon: j.favicon,
1183
+ title: j.title,
1184
+ customTitle: j.customTitle,
1185
+ activeTab: n === j.key,
1186
+ position: g[D],
1187
+ contentWidth: z[D],
1188
+ onClick: (H) => e(j.key),
1189
+ onClose: (H) => X(j.key),
1181
1190
  setDragging: x,
1182
- showButtonClose: l ? n === $.key : !0,
1191
+ showButtonClose: l ? n === j.key : !0,
1192
+ closing: j.closing,
1183
1193
  tabsContentWidth: T.current && T.current.clientWidth,
1184
- animateTabMove: (H) => nt(H, _),
1194
+ animateTabMove: (H) => lt(H, D),
1185
1195
  isDragging: N,
1186
- id: $.key,
1187
- index: _,
1196
+ id: j.key,
1197
+ index: D,
1188
1198
  sorting: I,
1189
1199
  onCloseAllTabs: p,
1190
1200
  onCloseLeftTabs: s,
1191
1201
  onCloseRightTabs: f,
1192
- onCloseOtherTabs: g,
1202
+ onCloseOtherTabs: m,
1193
1203
  totalTabs: S.length
1194
1204
  },
1195
- $.key
1205
+ j.key
1196
1206
  )) }),
1197
1207
  /* @__PURE__ */ a("div", { className: "archbase_tabs-bottom-bar" })
1198
1208
  ]
@@ -1204,7 +1214,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1204
1214
  const n = parseInt(o.style.zIndex);
1205
1215
  t = Math.max(isNaN(n) ? 0 : n, t);
1206
1216
  }), t + 1;
1207
- }, vi = (t) => {
1217
+ }, Ti = (t) => {
1208
1218
  const i = Object.assign(
1209
1219
  {
1210
1220
  id: t.id && t.id.length ? t.id : Date.now().toString(),
@@ -1234,42 +1244,42 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1234
1244
  t
1235
1245
  );
1236
1246
  i.id || (i.id = Date.now().toString()), Object.freeze(i);
1237
- const [o, n] = W.useState(i.height), [u, d] = W.useState(i.width), [r, b] = W.useState(i.top || 0), [e, l] = W.useState(i.left || 0), [p, s] = W.useState(0), [f, g] = W.useState(0), [z, c] = W.useState(!1), [m, R] = W.useState(!1), [S, w] = W.useState("▁"), [I, M] = W.useState("□"), [N, x] = W.useState(""), [T, P] = W.useState(pt()), [k, E] = W.useState(1), { ref: X, width: D, height: ot } = se(), L = W.useRef(null), q = it(o), tt = it(u), nt = it(r), G = it(e), lt = 500, $ = (j) => {
1238
- g(j.clientY - r), s(j.clientX - e), P(pt()), E(0.5);
1239
- }, _ = (j) => {
1240
- l((j.clientX || j.screenX || e + p) - p), b((j.clientY || j.screenY || r + f) - f);
1241
- }, H = (j) => {
1242
- l((j.clientX || j.screenX) - p), b((j.clientY || j.screenY) - f), E(1);
1243
- }, V = () => {
1244
- if (x(`${lt}ms ease-in-out`), z)
1245
- q.current = o, b(nt.current || 0), l(G.current || 0), c(!1), w("▁"), R(!1);
1247
+ const [o, n] = W.useState(i.height), [u, d] = W.useState(i.width), [r, b] = W.useState(i.top || 0), [e, l] = W.useState(i.left || 0), [p, s] = W.useState(0), [f, m] = W.useState(0), [z, c] = W.useState(!1), [g, R] = W.useState(!1), [S, w] = W.useState("▁"), [I, L] = W.useState("□"), [N, x] = W.useState(""), [T, P] = W.useState(pt()), [k, E] = W.useState(1), { ref: K, width: _, height: tt } = ae(), $ = W.useRef(null), V = ot(o), et = ot(u), lt = ot(r), nt = ot(e), X = 500, j = (M) => {
1248
+ m(M.clientY - r), s(M.clientX - e), P(pt()), E(0.5);
1249
+ }, D = (M) => {
1250
+ l((M.clientX || M.screenX || e + p) - p), b((M.clientY || M.screenY || r + f) - f);
1251
+ }, H = (M) => {
1252
+ l((M.clientX || M.screenX) - p), b((M.clientY || M.screenY) - f), E(1);
1253
+ }, q = () => {
1254
+ if (x(`${X}ms ease-in-out`), z)
1255
+ V.current = o, b(lt.current || 0), l(nt.current || 0), c(!1), w("▁"), R(!1);
1246
1256
  else {
1247
- q.current = 32, m || (G.current = e, nt.current = r);
1248
- const j = document.getElementById(i.id)?.parentElement;
1249
- tt.current = u;
1250
- let B = (j?.clientHeight || window.innerHeight) - q.current - 4;
1251
- const dt = (j?.clientWidth || window.innerWidth) - tt.current - 4, ct = document.elementFromPoint(
1252
- dt + tt.current / 2,
1253
- B + q.current / 2
1257
+ V.current = 32, g || (nt.current = e, lt.current = r);
1258
+ const M = document.getElementById(i.id)?.parentElement;
1259
+ et.current = u;
1260
+ let B = (M?.clientHeight || window.innerHeight) - V.current - 4;
1261
+ const at = (M?.clientWidth || window.innerWidth) - et.current - 4, ct = document.elementFromPoint(
1262
+ at + et.current / 2,
1263
+ B + V.current / 2
1254
1264
  );
1255
- ct && ["archbase-window-container", "windowTitle"].includes(ct?.className || "") && (B -= ct?.clientHeight + 4), b(B), l(dt), c(!0), w("◰"), R(!1);
1265
+ ct && ["archbase-window-container", "windowTitle"].includes(ct?.className || "") && (B -= ct?.clientHeight + 4), b(B), l(at), c(!0), w("◰"), R(!1);
1256
1266
  }
1257
- P(pt()), setTimeout(x, lt + 1, "");
1258
- }, J = () => {
1259
- x(`${lt}ms ease-in-out`);
1260
- const j = document.getElementById(i.id)?.parentElement;
1261
- m ? (q.current = o, tt.current = u, b(nt.current || 0), l(G.current || 0), R(!1), M("□"), c(!1), w("▁")) : (q.current = j?.clientHeight || window.innerHeight, tt.current = j?.clientWidth || window.innerWidth, z || (G.current = e, nt.current = r), b(j?.offsetTop || 0), l(j?.offsetLeft || 0), R(!0), M("❐"), c(!1), w("▁")), P(pt()), setTimeout(x, lt + 1, "");
1267
+ P(pt()), setTimeout(x, X + 1, "");
1268
+ }, G = () => {
1269
+ x(`${X}ms ease-in-out`);
1270
+ const M = document.getElementById(i.id)?.parentElement;
1271
+ g ? (V.current = o, et.current = u, b(lt.current || 0), l(nt.current || 0), R(!1), L("□"), c(!1), w("▁")) : (V.current = M?.clientHeight || window.innerHeight, et.current = M?.clientWidth || window.innerWidth, z || (nt.current = e, lt.current = r), b(M?.offsetTop || 0), l(M?.offsetLeft || 0), R(!0), L("❐"), c(!1), w("▁")), P(pt()), setTimeout(x, X + 1, "");
1262
1272
  };
1263
- return et(() => {
1264
- !m && !z && (d(D), n(ot));
1265
- }, [D, ot, m, z]), /* @__PURE__ */ F(
1273
+ return it(() => {
1274
+ !g && !z && (d(_), n(tt));
1275
+ }, [_, tt, g, z]), /* @__PURE__ */ F(
1266
1276
  "div",
1267
1277
  {
1268
1278
  id: i.id,
1269
1279
  className: "archbase-window-container",
1270
1280
  style: {
1271
- height: q.current,
1272
- width: tt.current,
1281
+ height: V.current,
1282
+ width: et.current,
1273
1283
  top: r,
1274
1284
  left: e,
1275
1285
  resize: i.resizable ? "both" : "none",
@@ -1277,7 +1287,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1277
1287
  zIndex: T,
1278
1288
  opacity: k
1279
1289
  },
1280
- ref: X,
1290
+ ref: K,
1281
1291
  onClick: () => {
1282
1292
  P(pt());
1283
1293
  },
@@ -1297,17 +1307,17 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1297
1307
  {
1298
1308
  className: "windowTitle",
1299
1309
  draggable: !0,
1300
- onDragStart: $,
1301
- onDrag: _,
1310
+ onDragStart: j,
1311
+ onDrag: D,
1302
1312
  onDragEnd: H,
1303
1313
  style: { opacity: Math.floor(k) },
1304
- ref: L,
1314
+ ref: $,
1305
1315
  children: i.titleBar.title
1306
1316
  }
1307
1317
  ),
1308
1318
  i.titleBar.buttons && /* @__PURE__ */ F("span", { className: "buttonContainer", children: [
1309
- i.titleBar.buttons.minimize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: V, children: S }),
1310
- i.titleBar.buttons.maximize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: J, children: I }),
1319
+ i.titleBar.buttons.minimize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: q, children: S }),
1320
+ i.titleBar.buttons.maximize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: G, children: I }),
1311
1321
  !!i.titleBar.buttons.close && /* @__PURE__ */ a("span", { className: "windowButton", onClick: i.titleBar.buttons.close, children: "⨯" })
1312
1322
  ] })
1313
1323
  ]
@@ -1330,7 +1340,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1330
1340
  ]
1331
1341
  }
1332
1342
  );
1333
- }, Si = ({
1343
+ }, xi = ({
1334
1344
  children: t,
1335
1345
  direction: i = "row",
1336
1346
  splitterSize: o,
@@ -1348,7 +1358,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1348
1358
  autoSaveId: b,
1349
1359
  style: { height: "100%", ...d },
1350
1360
  className: r,
1351
- children: W.Children.map(t, (l) => W.isValidElement(l) && l.type === Xe ? W.cloneElement(l, {
1361
+ children: W.Children.map(t, (l) => W.isValidElement(l) && l.type === Je ? W.cloneElement(l, {
1352
1362
  _splitterSize: o,
1353
1363
  _splitterColor: n,
1354
1364
  _splitterHoverColor: u,
@@ -1356,7 +1366,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1356
1366
  }) : l)
1357
1367
  }
1358
1368
  );
1359
- }, Ti = ({
1369
+ }, Ci = ({
1360
1370
  children: t,
1361
1371
  minSize: i,
1362
1372
  maxSize: o,
@@ -1370,7 +1380,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1370
1380
  return typeof e == "string" ? parseFloat(e) : e;
1371
1381
  };
1372
1382
  return /* @__PURE__ */ a(
1373
- Mt,
1383
+ jt,
1374
1384
  {
1375
1385
  defaultSize: b(n),
1376
1386
  minSize: b(i),
@@ -1381,12 +1391,12 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1381
1391
  children: t
1382
1392
  }
1383
1393
  );
1384
- }, Xe = ({
1394
+ }, Je = ({
1385
1395
  style: t,
1386
1396
  className: i,
1387
1397
  ...o
1388
1398
  }) => {
1389
- const n = Qt(), d = te() === "dark", r = o._splitterSize ?? 4, b = o._splitterColor ?? (d ? n.colors.dark[4] : n.colors.gray[3]);
1399
+ const n = ee(), d = ie() === "dark", r = o._splitterSize ?? 4, b = o._splitterColor ?? (d ? n.colors.dark[4] : n.colors.gray[3]);
1390
1400
  o._splitterHoverColor ?? n.colors.blue[5];
1391
1401
  const l = (o._direction ?? "horizontal") === "horizontal";
1392
1402
  return /* @__PURE__ */ a(
@@ -1405,7 +1415,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1405
1415
  onDragging: () => {
1406
1416
  },
1407
1417
  children: /* @__PURE__ */ a(
1408
- ee,
1418
+ oe,
1409
1419
  {
1410
1420
  style: {
1411
1421
  ...l ? { width: 2, height: 20, borderRadius: 1 } : { width: 20, height: 2, borderRadius: 1 },
@@ -1415,7 +1425,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1415
1425
  )
1416
1426
  }
1417
1427
  );
1418
- }, xi = ({
1428
+ }, Ai = ({
1419
1429
  children: t,
1420
1430
  title: i,
1421
1431
  reducedTitle: o,
@@ -1430,12 +1440,12 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1430
1440
  defaultIsDocked: s = !1,
1431
1441
  defaultIsVisible: f = !1
1432
1442
  }) => {
1433
- const [g, z] = U(s), [c, m] = U(f), R = () => z(!g), S = () => {
1434
- !g && !c && (m(!0), l && l());
1443
+ const [m, z] = U(s), [c, g] = U(f), R = () => z(!m), S = () => {
1444
+ !m && !c && (g(!0), l && l());
1435
1445
  }, w = () => {
1436
- !g && c && (m(!1), p && p());
1446
+ !m && c && (g(!1), p && p());
1437
1447
  };
1438
- et(() => {
1448
+ it(() => {
1439
1449
  f ? S() : w();
1440
1450
  }, [f]);
1441
1451
  const I = {
@@ -1444,7 +1454,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1444
1454
  margin: "10px 0",
1445
1455
  alignSelf: "flex-center",
1446
1456
  cursor: "pointer"
1447
- }, M = {
1457
+ }, L = {
1448
1458
  writingMode: "vertical-rl",
1449
1459
  transform: "rotate(180deg)",
1450
1460
  margin: "10px 0",
@@ -1468,7 +1478,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1468
1478
  {
1469
1479
  onMouseOver: S,
1470
1480
  style: {
1471
- width: c || g ? "0px" : b,
1481
+ width: c || m ? "0px" : b,
1472
1482
  height: "100%",
1473
1483
  backgroundColor: d,
1474
1484
  cursor: "pointer",
@@ -1478,8 +1488,8 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1478
1488
  justifyContent: "flex-start",
1479
1489
  alignItems: "center"
1480
1490
  },
1481
- children: !c && !g && // @ts-ignore
1482
- /* @__PURE__ */ a("span", { style: e === "right" ? I : M, children: o })
1491
+ children: !c && !m && // @ts-ignore
1492
+ /* @__PURE__ */ a("span", { style: e === "right" ? I : L, children: o })
1483
1493
  }
1484
1494
  ),
1485
1495
  /* @__PURE__ */ a(
@@ -1487,15 +1497,15 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1487
1497
  {
1488
1498
  onMouseLeave: w,
1489
1499
  style: {
1490
- width: c || g ? n : "0px",
1500
+ width: c || m ? n : "0px",
1491
1501
  height: "100%",
1492
1502
  overflow: "hidden",
1493
1503
  transition: "width 0.3s ease-in-out",
1494
1504
  backgroundColor: u,
1495
- padding: c || g ? "10px" : "0px",
1496
- border: c || g ? N : 0
1505
+ padding: c || m ? "10px" : "0px",
1506
+ border: c || m ? N : 0
1497
1507
  },
1498
- children: c || g ? /* @__PURE__ */ F(Et, { children: [
1508
+ children: c || m ? /* @__PURE__ */ F(Et, { children: [
1499
1509
  /* @__PURE__ */ F(
1500
1510
  "div",
1501
1511
  {
@@ -1507,7 +1517,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1507
1517
  },
1508
1518
  children: [
1509
1519
  /* @__PURE__ */ a("span", { children: i }),
1510
- /* @__PURE__ */ a(ie, { onClick: R, children: g ? /* @__PURE__ */ a(le, { size: 16 }) : /* @__PURE__ */ a(ae, { size: 16 }) })
1520
+ /* @__PURE__ */ a(ne, { onClick: R, children: m ? /* @__PURE__ */ a(de, { size: 16 }) : /* @__PURE__ */ a(ce, { size: 16 }) })
1511
1521
  ]
1512
1522
  }
1513
1523
  ),
@@ -1518,7 +1528,7 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1518
1528
  ]
1519
1529
  }
1520
1530
  );
1521
- }, Ge = ({
1531
+ }, Ze = ({
1522
1532
  panels: t,
1523
1533
  initialLayout: i,
1524
1534
  onChange: o,
@@ -1530,19 +1540,19 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1530
1540
  height: e,
1531
1541
  width: l
1532
1542
  }) => {
1533
- const { colorScheme: p } = oe(), s = p === "dark", f = kt(
1543
+ const { colorScheme: p } = re(), s = p === "dark", f = kt(
1534
1544
  (z, c) => {
1535
- const m = t[z];
1536
- if (!m)
1545
+ const g = t[z];
1546
+ if (!g)
1537
1547
  return /* @__PURE__ */ F("div", { children: [
1538
1548
  "Panel not found: ",
1539
1549
  z
1540
1550
  ] });
1541
- const R = m.closable !== !1, S = /* @__PURE__ */ F("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
1542
- m.icon && /* @__PURE__ */ a("span", { style: { display: "inline-flex" }, children: m.icon }),
1543
- /* @__PURE__ */ a("span", { children: m.title })
1551
+ const R = g.closable !== !1, S = /* @__PURE__ */ F("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
1552
+ g.icon && /* @__PURE__ */ a("span", { style: { display: "inline-flex" }, children: g.icon }),
1553
+ /* @__PURE__ */ a("span", { children: g.title })
1544
1554
  ] }), w = [];
1545
- m.toolbarControls && w.push(...m.toolbarControls), R && w.push(
1555
+ g.toolbarControls && w.push(...g.toolbarControls), R && w.push(
1546
1556
  /* @__PURE__ */ a(
1547
1557
  "button",
1548
1558
  {
@@ -1562,9 +1572,9 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1562
1572
  "close"
1563
1573
  )
1564
1574
  );
1565
- const I = typeof m.component == "function" ? m.component() : m.component;
1575
+ const I = typeof g.component == "function" ? g.component() : g.component;
1566
1576
  return /* @__PURE__ */ a(
1567
- de,
1577
+ he,
1568
1578
  {
1569
1579
  path: c,
1570
1580
  title: S,
@@ -1574,14 +1584,14 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1574
1584
  );
1575
1585
  },
1576
1586
  [t, n]
1577
- ), g = {
1587
+ ), m = {
1578
1588
  position: "relative",
1579
1589
  height: e ?? "100%",
1580
1590
  width: l ?? "100%",
1581
1591
  ...r
1582
1592
  };
1583
- return /* @__PURE__ */ a("div", { style: g, className: b, children: /* @__PURE__ */ a(
1584
- ce,
1593
+ return /* @__PURE__ */ a("div", { style: m, className: b, children: /* @__PURE__ */ a(
1594
+ ue,
1585
1595
  {
1586
1596
  renderTile: f,
1587
1597
  value: i,
@@ -1592,8 +1602,8 @@ const yi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1592
1602
  }
1593
1603
  ) });
1594
1604
  };
1595
- Ge.displayName = "ArchbaseMosaicLayout";
1596
- const Je = ({
1605
+ Ze.displayName = "ArchbaseMosaicLayout";
1606
+ const Ye = ({
1597
1607
  children: t,
1598
1608
  id: i,
1599
1609
  defaultSize: o,
@@ -1605,7 +1615,7 @@ const Je = ({
1605
1615
  style: e,
1606
1616
  className: l
1607
1617
  }) => /* @__PURE__ */ a(
1608
- Mt,
1618
+ jt,
1609
1619
  {
1610
1620
  id: i,
1611
1621
  defaultSize: o,
@@ -1619,7 +1629,7 @@ const Je = ({
1619
1629
  children: t
1620
1630
  }
1621
1631
  );
1622
- Je.displayName = "ArchbaseResizablePanel";
1632
+ Ye.displayName = "ArchbaseResizablePanel";
1623
1633
  const Zt = ({
1624
1634
  direction: t = "horizontal",
1625
1635
  size: i = 4,
@@ -1660,7 +1670,7 @@ const Zt = ({
1660
1670
  );
1661
1671
  };
1662
1672
  Zt.displayName = "ArchbaseResizableHandle";
1663
- const Ze = ({
1673
+ const Ke = ({
1664
1674
  direction: t = "horizontal",
1665
1675
  panels: i,
1666
1676
  onLayout: o,
@@ -1686,9 +1696,9 @@ const Ze = ({
1686
1696
  autoSaveId: n,
1687
1697
  style: s,
1688
1698
  className: e,
1689
- children: i.map((f, g) => /* @__PURE__ */ F(W.Fragment, { children: [
1699
+ children: i.map((f, m) => /* @__PURE__ */ F(W.Fragment, { children: [
1690
1700
  /* @__PURE__ */ a(
1691
- Mt,
1701
+ jt,
1692
1702
  {
1693
1703
  id: f.id,
1694
1704
  defaultSize: f.defaultSize,
@@ -1700,7 +1710,7 @@ const Ze = ({
1700
1710
  children: f.children
1701
1711
  }
1702
1712
  ),
1703
- g < i.length - 1 && /* @__PURE__ */ a(
1713
+ m < i.length - 1 && /* @__PURE__ */ a(
1704
1714
  Zt,
1705
1715
  {
1706
1716
  direction: t,
@@ -1713,8 +1723,8 @@ const Ze = ({
1713
1723
  }
1714
1724
  );
1715
1725
  };
1716
- Ze.displayName = "ArchbaseResizableLayout";
1717
- function Ye({
1726
+ Ke.displayName = "ArchbaseResizableLayout";
1727
+ function Qe({
1718
1728
  components: t,
1719
1729
  defaultLayout: i,
1720
1730
  watermark: o,
@@ -1728,29 +1738,29 @@ function Ye({
1728
1738
  height: p = "600px",
1729
1739
  disabled: s = !1
1730
1740
  }) {
1731
- const { t: f } = Wt(), g = it(null), z = Ht(() => {
1732
- const m = {};
1741
+ const { t: f } = Wt(), m = ot(null), z = Ht(() => {
1742
+ const g = {};
1733
1743
  for (const R of Object.values(t))
1734
- m[R.id] = (S) => /* @__PURE__ */ a(
1735
- Ke,
1744
+ g[R.id] = (S) => /* @__PURE__ */ a(
1745
+ ti,
1736
1746
  {
1737
1747
  component: R,
1738
1748
  api: S.api,
1739
1749
  onClose: () => r?.(R.id)
1740
1750
  }
1741
1751
  );
1742
- return m;
1743
- }, [t, r]), c = kt((m) => {
1744
- if (g.current = m.api, i && typeof i != "string")
1752
+ return g;
1753
+ }, [t, r]), c = kt((g) => {
1754
+ if (m.current = g.api, i && typeof i != "string")
1745
1755
  try {
1746
- m.api.fromJSON(i);
1756
+ g.api.fromJSON(i);
1747
1757
  } catch (R) {
1748
1758
  console.warn("Failed to load default layout:", R);
1749
1759
  }
1750
1760
  if (!i && Object.keys(t).length > 0) {
1751
1761
  const R = Object.values(t)[0];
1752
1762
  try {
1753
- m.api.addPanel({
1763
+ g.api.addPanel({
1754
1764
  id: R.id,
1755
1765
  component: R.id,
1756
1766
  title: R.title
@@ -1760,24 +1770,24 @@ function Ye({
1760
1770
  }
1761
1771
  }
1762
1772
  }, [i, t]);
1763
- return et(() => {
1764
- if (!g.current)
1773
+ return it(() => {
1774
+ if (!m.current)
1765
1775
  return;
1766
- const m = [];
1776
+ const g = [];
1767
1777
  if (d) {
1768
- const R = g.current.onDidLayoutChange(() => {
1769
- d(g.current.toJSON());
1778
+ const R = m.current.onDidLayoutChange(() => {
1779
+ d(m.current.toJSON());
1770
1780
  });
1771
- m.push(R);
1781
+ g.push(R);
1772
1782
  }
1773
1783
  if (r) {
1774
- const R = g.current.onDidRemovePanel((S) => {
1784
+ const R = m.current.onDidRemovePanel((S) => {
1775
1785
  r(S.panel.id);
1776
1786
  });
1777
- m.push(R);
1787
+ g.push(R);
1778
1788
  }
1779
1789
  return () => {
1780
- m.forEach((R) => R.dispose());
1790
+ g.forEach((R) => R.dispose());
1781
1791
  };
1782
1792
  }, [d, r]), /* @__PURE__ */ a(
1783
1793
  "div",
@@ -1789,7 +1799,7 @@ function Ye({
1789
1799
  },
1790
1800
  className: l,
1791
1801
  children: /* @__PURE__ */ a(
1792
- he,
1802
+ fe,
1793
1803
  {
1794
1804
  components: z,
1795
1805
  onReady: c,
@@ -1808,7 +1818,7 @@ function Ye({
1808
1818
  }
1809
1819
  );
1810
1820
  }
1811
- function Ke({ component: t, api: i, onClose: o }) {
1821
+ function ti({ component: t, api: i, onClose: o }) {
1812
1822
  const n = t.component;
1813
1823
  return /* @__PURE__ */ a("div", { style: { height: "100%", overflow: "auto" }, children: /* @__PURE__ */ a(
1814
1824
  n,
@@ -1819,7 +1829,7 @@ function Ke({ component: t, api: i, onClose: o }) {
1819
1829
  }
1820
1830
  ) });
1821
1831
  }
1822
- function Ci({
1832
+ function Li({
1823
1833
  preset: t,
1824
1834
  components: i = {},
1825
1835
  onPanelClose: o,
@@ -1828,9 +1838,9 @@ function Ci({
1828
1838
  className: d,
1829
1839
  height: r
1830
1840
  }) {
1831
- const { layout: b, components: e } = Ht(() => Qe(t, i), [t, i]);
1841
+ const { layout: b, components: e } = Ht(() => ei(t, i), [t, i]);
1832
1842
  return /* @__PURE__ */ a(
1833
- Ye,
1843
+ Qe,
1834
1844
  {
1835
1845
  components: e,
1836
1846
  defaultLayout: b,
@@ -1842,9 +1852,9 @@ function Ci({
1842
1852
  }
1843
1853
  );
1844
1854
  }
1845
- function Qe(t, i) {
1855
+ function ei(t, i) {
1846
1856
  const o = {
1847
- ...ti(),
1857
+ ...ii(),
1848
1858
  ...i
1849
1859
  };
1850
1860
  let n;
@@ -1853,20 +1863,20 @@ function Qe(t, i) {
1853
1863
  n = Pt(o);
1854
1864
  break;
1855
1865
  case "ide":
1856
- n = ei(o);
1866
+ n = oi(o);
1857
1867
  break;
1858
1868
  case "explorer":
1859
- n = ii(o);
1869
+ n = ni(o);
1860
1870
  break;
1861
1871
  case "analytics":
1862
- n = oi(o);
1872
+ n = ri(o);
1863
1873
  break;
1864
1874
  default:
1865
1875
  n = Pt(o);
1866
1876
  }
1867
1877
  return { layout: n, components: o };
1868
1878
  }
1869
- function ti() {
1879
+ function ii() {
1870
1880
  return {
1871
1881
  // Dashboard
1872
1882
  overview: {
@@ -2002,7 +2012,7 @@ function Pt(t) {
2002
2012
  }
2003
2013
  };
2004
2014
  }
2005
- function ei(t) {
2015
+ function oi(t) {
2006
2016
  return {
2007
2017
  root: {
2008
2018
  type: "branch",
@@ -2083,7 +2093,7 @@ function ei(t) {
2083
2093
  }
2084
2094
  };
2085
2095
  }
2086
- function ii(t) {
2096
+ function ni(t) {
2087
2097
  return {
2088
2098
  root: {
2089
2099
  type: "branch",
@@ -2114,7 +2124,7 @@ function ii(t) {
2114
2124
  }
2115
2125
  };
2116
2126
  }
2117
- function oi(t) {
2127
+ function ri(t) {
2118
2128
  return {
2119
2129
  root: {
2120
2130
  type: "branch",
@@ -2169,47 +2179,47 @@ function oi(t) {
2169
2179
  }
2170
2180
  export {
2171
2181
  C as AnchorType,
2172
- Ri as ArchbaseAdvancedTabs,
2173
- $i as ArchbaseCard,
2174
- Mi as ArchbaseContainer,
2175
- Ye as ArchbaseDockLayout,
2176
- Ci as ArchbaseDockLayoutPreset,
2177
- xi as ArchbaseDockableContainer,
2178
- vi as ArchbaseFloatingWindow,
2179
- bi as ArchbaseForm,
2180
- ji as ArchbaseGroup,
2181
- Ge as ArchbaseMosaicLayout,
2182
+ Si as ArchbaseAdvancedTabs,
2183
+ Mi as ArchbaseCard,
2184
+ Bi as ArchbaseContainer,
2185
+ Qe as ArchbaseDockLayout,
2186
+ Li as ArchbaseDockLayoutPreset,
2187
+ Ai as ArchbaseDockableContainer,
2188
+ Ti as ArchbaseFloatingWindow,
2189
+ zi as ArchbaseForm,
2190
+ Ii as ArchbaseGroup,
2191
+ Ze as ArchbaseMosaicLayout,
2182
2192
  Zt as ArchbaseResizableHandle,
2183
- Ze as ArchbaseResizableLayout,
2184
- Je as ArchbaseResizablePanel,
2185
- Pe as ArchbaseSpaceBottom,
2186
- Ne as ArchbaseSpaceBottomResizable,
2187
- Ae as ArchbaseSpaceCentered,
2188
- Le as ArchbaseSpaceCenteredVertically,
2189
- ke as ArchbaseSpaceCustom,
2190
- He as ArchbaseSpaceFill,
2191
- We as ArchbaseSpaceFixed,
2192
- wi as ArchbaseSpaceInfo,
2193
- Fe as ArchbaseSpaceLayer,
2194
- Be as ArchbaseSpaceLeft,
2195
- je as ArchbaseSpaceLeftResizable,
2196
- yi as ArchbaseSpaceOptions,
2197
- Ve as ArchbaseSpacePositioned,
2198
- _e as ArchbaseSpaceRight,
2199
- De as ArchbaseSpaceRightResizable,
2200
- Oe as ArchbaseSpaceTop,
2201
- Ie as ArchbaseSpaceTopResizable,
2202
- qe as ArchbaseSpaceViewPort,
2203
- Si as ArchbaseSplitPane,
2204
- Ti as ArchbaseSplitPanePane,
2205
- Xe as ArchbaseSplitPaneResizer,
2206
- Bi as ArchbaseStack,
2193
+ Ke as ArchbaseResizableLayout,
2194
+ Ye as ArchbaseResizablePanel,
2195
+ ke as ArchbaseSpaceBottom,
2196
+ Ee as ArchbaseSpaceBottomResizable,
2197
+ $e as ArchbaseSpaceCentered,
2198
+ je as ArchbaseSpaceCenteredVertically,
2199
+ We as ArchbaseSpaceCustom,
2200
+ Fe as ArchbaseSpaceFill,
2201
+ Ve as ArchbaseSpaceFixed,
2202
+ Ri as ArchbaseSpaceInfo,
2203
+ qe as ArchbaseSpaceLayer,
2204
+ Oe as ArchbaseSpaceLeft,
2205
+ Ie as ArchbaseSpaceLeftResizable,
2206
+ vi as ArchbaseSpaceOptions,
2207
+ Ue as ArchbaseSpacePositioned,
2208
+ Pe as ArchbaseSpaceRight,
2209
+ Ne as ArchbaseSpaceRightResizable,
2210
+ _e as ArchbaseSpaceTop,
2211
+ De as ArchbaseSpaceTopResizable,
2212
+ Xe as ArchbaseSpaceViewPort,
2213
+ xi as ArchbaseSplitPane,
2214
+ Ci as ArchbaseSplitPanePane,
2215
+ Je as ArchbaseSplitPaneResizer,
2216
+ Oi as ArchbaseStack,
2207
2217
  st as CenterType,
2208
2218
  rt as ResizeHandlePlacement,
2209
2219
  y as ResizeType,
2210
2220
  A as Type,
2211
2221
  Tt as anchoredProps,
2212
- zi as enabledSsrSupport,
2222
+ yi as enabledSsrSupport,
2213
2223
  St as resizableProps,
2214
- pi as useArchbaseCurrentSpace
2224
+ wi as useArchbaseCurrentSpace
2215
2225
  };