@sheetxl/utils-react 0.7.6 → 0.7.7

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,132 +1,132 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._sheetxl-scrollbar_eblx4_6 ::-webkit-scrollbar-button{background:transparent}._fullscreen-portal-root_1mjsr_4{pointer-events:none;position:absolute;inset:0;width:100%;height:100%;z-index:1200}._fullscreen-portal-root_1mjsr_4>*{pointer-events:auto}:root{--icon-size-sm: .875rem;--icon-size-md: 1rem;--icon-size-lg: 1.25rem;--icon-size-xl: 1.5rem}._Icon_1ipwo_10{font-size:var(--icon-size, var(--icon-size-md));min-width:var(--icon-size, var(--icon-size-md));min-height:var(--icon-size, var(--icon-size-md));--icon-stroke-em: .085em;--icon-color: currentColor;--icon-secondary-color: color-mix(in oklab, currentColor 65%, transparent);--icon-tertiary-color: color-mix(in oklab, currentColor 40%, transparent);--icon-line-color: currentColor;--icon-main-opacity: 1;--icon-secondary-opacity: .45;--icon-tertiary-opacity: .25;--icon-line-opacity: 1;--icon-filter: none;filter:var(--icon-filter);display:inline-flex;align-items:center;justify-content:center;line-height:1;vertical-align:middle;flex:0 0 auto}._Icon_1ipwo_10 .sm{--font-size: var(--icon-size-sm)}._Icon_1ipwo_10 .md{--font-size: var(--icon-size-md)}._Icon_1ipwo_10 .lg{--font-size: var(--icon-size-lg)}._Icon_1ipwo_10 .xl{--font-size: var(--icon-size-xl)}._Icon_1ipwo_10>svg{width:var(--icon-size);height:var(--icon-size)}._Icon_1ipwo_10>img{aspect-ratio:1 / 1;display:block;line-height:1}._Icon_1ipwo_10 .fill,._Icon_1ipwo_10 .line{--layer-color: var(--icon-color);--layer-opacity: var(--icon-main-opacity)}._Icon_1ipwo_10 .secondary{--layer-color: var(--icon-secondary-color)}._Icon_1ipwo_10 .tertiary{--layer-color: var(--icon-tertiary-color)}._Icon_1ipwo_10 .primary{--layer-color: var(--sxl-app-color-primary, var(--icon-primary, #595b5e))}._Icon_1ipwo_10 .secondary{--layer-color: var(--sxl-app-color-secondary, #9c27b0)}._Icon_1ipwo_10 .secondary.light{--layer-color: var(--sxl-app-color-secondary-light, #a060ac)}._Icon_1ipwo_10 .success{--layer-color: var(--sxl-app-color-success, #22c55e)}._Icon_1ipwo_10 .success.light{--layer-color: var(--sxl-app-color-success-light, #22c55e)}._Icon_1ipwo_10 .info{--layer-color: var(--sxl-app-color-info, #3b82f6)}._Icon_1ipwo_10 .warn{--layer-color: var(--sxl-app-color-warn, #f59e0b)}._Icon_1ipwo_10 .error{--layer-color: var(--sxl-app-color-error, #ef4444)}._Icon_1ipwo_10 .error.light{--layer-color: var(--sxl-app-color-error-light, #f87171)}._Icon_1ipwo_10 .grey{--layer-color: var(--sxl-app-color-grey, #cccccc)}._Icon_1ipwo_10 .shadow{--layer-color: var(--sxl-app-color-shadow, #cccccc)}._Icon_1ipwo_10 .fill:not(.fixed){fill:var(--layer-color);opacity:var(--layer-opacity);stroke:none}._Icon_1ipwo_10 .line:not(.fixed){fill:none;stroke:var(--layer-color, var(--icon-line-color));stroke-width:var(--icon-stroke-em);opacity:var(--layer-opacity, var(--icon-line-opacity));vector-effect:non-scaling-stroke;pointer-events:none;stroke-linecap:var(--icon-linecap, round);stroke-linejoin:var(--icon-linejoin, round);stroke-miterlimit:var(--icon-miter, 4)}@media (prefers-color-scheme: dark){._Icon_1ipwo_10 .invert-dark{filter:invert(1) hue-rotate(180deg)}}._Icon_1ipwo_10 .muted{opacity:calc(var(--layer-opacity, 1) * .6)}@keyframes _sxl-walk_1ipwo_1{to{stroke-dashoffset:0}}.icon.walking .walkable.line{stroke-dasharray:var(--walk-dash-length, 5px) var(--walk-dash-gap, 2px);stroke-dashoffset:calc(var(--walk-dash-length, 5px) + var(--walk-dash-gap, 2px));animation:_sxl-walk_1ipwo_1 var(--walk-duration, .96s) linear infinite;will-change:stroke-dashoffset}")),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- import { jsx as L, jsxs as Se, Fragment as ke } from "react/jsx-runtime";
3
- import ie, { useLayoutEffect as Ve, useEffect as V, useState as q, useMemo as N, useCallback as H, useRef as O, memo as ye, forwardRef as Ce, useImperativeHandle as cn, version as hn, createContext as un, useContext as dn, createElement as pn, useReducer as fn } from "react";
4
- import { CommonUtils as Z, DefaultNotifier as _n, Notifier as me, InternalClipboard as Ie, ClipboardUtils as Fe, MimeType as je } from "@sheetxl/utils";
5
- import { createRoot as mn } from "react-dom/client";
6
- import { unstable_batchedUpdates as gn } from "react-dom";
2
+ import { jsx as S, jsxs as bt, Fragment as St } from "react/jsx-runtime";
3
+ import it, { useLayoutEffect as ne, useEffect as V, useState as J, useMemo as K, useCallback as R, useRef as z, memo as gt, forwardRef as Lt, useImperativeHandle as ln, version as an, createContext as cn, useContext as hn, createElement as un, useReducer as dn, Component as pn } from "react";
4
+ import { CommonUtils as G, DefaultNotifier as fn, Notifier as _t, InternalClipboard as Rt, ClipboardUtils as Wt, MimeType as jt } from "@sheetxl/utils";
5
+ import { createRoot as _n } from "react-dom/client";
6
+ import { unstable_batchedUpdates as mn } from "react-dom";
7
7
  /**
8
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.6
8
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.7
9
9
  *
10
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
11
  * License: The license can be found at https://www.sheetxl.com/license.
12
12
  */
13
- const _o = { General: "general", Left: "left", Right: "right", Center: "center", Justify: "justify", Fill: "fill", Distributed: "distributed", CenterContinuous: "centerContinuous" }, G = { Shift: "shift", Alt: "alt", Ctrl: "ctrl", Meta: "meta" }, mo = { BackSpace: 8, Tab: 9, Clear: 12, Enter: 13, Shift: 16, Control: 17, Alt: 18, Pause: 19, CapsLock: 20, Escape: 27, Space: 32, PageUp: 33, PageDown: 34, End: 35, Home: 36, Left: 37, Up: 38, Right: 39, Down: 40, Insert: 45, Delete: 46, Digit_8: 56, Y: 89, Z: 90, Meta: 91, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, NumLock: 144, ScrollLock: 145, BackSlash: 220, Slash: 191, BracketRight: 221, BracketLeft: 219 }, go = { Left: 1, Middle: 2, Right: 3 }, se = { Horizontal: "horizontal", Vertical: "vertical" };
14
- function Pt(i) {
15
- var e, t, n = "";
13
+ const mo = { General: "general", Left: "left", Right: "right", Center: "center", Justify: "justify", Fill: "fill", Distributed: "distributed", CenterContinuous: "centerContinuous" }, X = { Shift: "shift", Alt: "alt", Ctrl: "ctrl", Meta: "meta" }, go = { BackSpace: 8, Tab: 9, Clear: 12, Enter: 13, Shift: 16, Control: 17, Alt: 18, Pause: 19, CapsLock: 20, Escape: 27, Space: 32, PageUp: 33, PageDown: 34, End: 35, Home: 36, Left: 37, Up: 38, Right: 39, Down: 40, Insert: 45, Delete: 46, Digit_8: 56, Y: 89, Z: 90, Meta: 91, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, NumLock: 144, ScrollLock: 145, BackSlash: 220, Slash: 191, BracketRight: 221, BracketLeft: 219 }, yo = { Left: 1, Middle: 2, Right: 3 }, st = { Horizontal: "horizontal", Vertical: "vertical" };
14
+ function Ae(i) {
15
+ var t, e, n = "";
16
16
  if (typeof i == "string" || typeof i == "number") n += i;
17
17
  else if (typeof i == "object") if (Array.isArray(i)) {
18
18
  var o = i.length;
19
- for (e = 0; e < o; e++) i[e] && (t = Pt(i[e])) && (n && (n += " "), n += t);
20
- } else for (t in i) i[t] && (n && (n += " "), n += t);
19
+ for (t = 0; t < o; t++) i[t] && (e = Ae(i[t])) && (n && (n += " "), n += e);
20
+ } else for (e in i) i[e] && (n && (n += " "), n += e);
21
21
  return n;
22
22
  }
23
- function we() {
24
- for (var i, e, t = 0, n = "", o = arguments.length; t < o; t++) (i = arguments[t]) && (e = Pt(i)) && (n && (n += " "), n += e);
23
+ function wt() {
24
+ for (var i, t, e = 0, n = "", o = arguments.length; e < o; e++) (i = arguments[e]) && (t = Ae(i)) && (n && (n += " "), n += t);
25
25
  return n;
26
26
  }
27
- var yn = function() {
28
- }, At = typeof window < "u", vn = At ? Ve : V, ft = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
29
- const ge = At && window.ResizeObserver !== void 0 ? function() {
30
- var i = q(null), e = i[0], t = i[1], n = q(ft), o = n[0], r = n[1], a = N(function() {
27
+ var gn = function() {
28
+ }, ze = typeof window < "u", yn = ze ? ne : V, _e = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
29
+ const mt = ze && window.ResizeObserver !== void 0 ? function() {
30
+ var i = J(null), t = i[0], e = i[1], n = J(_e), o = n[0], r = n[1], a = K(function() {
31
31
  return new window.ResizeObserver(function(h) {
32
32
  if (h[0]) {
33
- var s = h[0].contentRect, l = s.x, c = s.y, u = s.width, d = s.height, f = s.top, v = s.left, m = s.bottom, b = s.right;
34
- r({ x: l, y: c, width: u, height: d, top: f, left: v, bottom: m, right: b });
33
+ var s = h[0].contentRect, l = s.x, c = s.y, u = s.width, d = s.height, f = s.top, v = s.left, g = s.bottom, b = s.right;
34
+ r({ x: l, y: c, width: u, height: d, top: f, left: v, bottom: g, right: b });
35
35
  }
36
36
  });
37
37
  }, []);
38
- return vn(function() {
39
- if (e) return a.observe(e), function() {
38
+ return yn(function() {
39
+ if (t) return a.observe(t), function() {
40
40
  a.disconnect();
41
41
  };
42
- }, [e]), [t, o];
42
+ }, [t]), [e, o];
43
43
  } : function() {
44
- return [yn, ft];
45
- }, M = (i, e) => {
46
- const t = H((...r) => i?.(...r), e), n = O(null);
47
- n.current = t;
48
- const o = H((...r) => n.current?.(...r), []);
44
+ return [gn, _e];
45
+ }, D = (i, t) => {
46
+ const e = R((...r) => i?.(...r), t), n = z(null);
47
+ n.current = e;
48
+ const o = R((...r) => n.current?.(...r), []);
49
49
  if (n.current) return o;
50
- }, xn = (i) => {
51
- const { style: e, orientation: t = se.Vertical, ...n } = i, o = t === se.Vertical;
52
- return L("div", { style: { paddingBottom: "0px", paddingRight: "0px", paddingLeft: o ? "0px" : "3px", paddingTop: o ? "3px" : "0px", display: "flex", alignItems: "center", justifyContent: "center", ...e }, ...n, children: L("button", { style: { padding: "0", display: "flex", alignItems: "center", justifyContent: "center", border: "none" }, className: `scrollbar-button ${o ? "vertical" : "horizontal"} single-button start`, children: L("svg", { width: "9", height: "9", viewBox: "0 0 6 6", style: { opacity: "inherit" }, children: L("path", { d: o ? "m 3.7274761,0.68060577 1.11969,1.93863003 1.12075,1.93912 c 0.0895,0.155 0.12152,0.33658 0.0904,0.51283 -0.0311,0.17625 -0.12336,0.33591 -0.26054,0.45091 -0.13715,0.11495 -0.31044,0.17793 -0.4894,0.17781 H 0.83095614 c -0.20186,0 -0.39542,-0.0802 -0.53814,-0.2229 -0.14272,-0.14272 -0.22291,-0.33629 -0.22291,-0.53814 -3e-4,-0.13308 0.0347,-0.26385 0.10147,-0.379 l 1.11872996,-1.94066 1.11921,-1.93864003 c 0.13594,-0.23541 0.38717,-0.38047 0.65905,-0.38047 0.27188,0 0.52311,0.14506 0.65905,0.38047 z" : "m 0.75051,2.3424298 1.93863,-1.11969 1.93912,-1.12075 c 0.155,-0.0895 0.33658,-0.12152 0.51283,-0.0904 0.17625,0.0311 0.33591,0.12336 0.45091,0.26054 0.11495,0.13715 0.17793,0.31044 0.17781,0.4894 v 4.47742 c 0,0.20186 -0.0802,0.39542 -0.2229,0.53814 -0.14272,0.14272 -0.33629,0.22291 -0.53814,0.22291 -0.13308,3e-4 -0.26385,-0.0347 -0.379,-0.10147 L 2.68911,4.7797998 0.75047,3.6605898 C 0.51506,3.5246498 0.37,3.2734198 0.37,3.0015398 c 0,-0.27188 0.14506,-0.52311 0.38047,-0.65905 z" }) }) }) });
50
+ }, vn = (i) => {
51
+ const { style: t, orientation: e = st.Vertical, ...n } = i, o = e === st.Vertical;
52
+ return S("div", { style: { paddingBottom: "0px", paddingRight: "0px", paddingLeft: o ? "0px" : "3px", paddingTop: o ? "3px" : "0px", display: "flex", alignItems: "center", justifyContent: "center", ...t }, ...n, children: S("button", { style: { padding: "0", display: "flex", alignItems: "center", justifyContent: "center", border: "none" }, className: `scrollbar-button ${o ? "vertical" : "horizontal"} single-button start`, children: S("svg", { width: "9", height: "9", viewBox: "0 0 6 6", style: { opacity: "inherit" }, children: S("path", { d: o ? "m 3.7274761,0.68060577 1.11969,1.93863003 1.12075,1.93912 c 0.0895,0.155 0.12152,0.33658 0.0904,0.51283 -0.0311,0.17625 -0.12336,0.33591 -0.26054,0.45091 -0.13715,0.11495 -0.31044,0.17793 -0.4894,0.17781 H 0.83095614 c -0.20186,0 -0.39542,-0.0802 -0.53814,-0.2229 -0.14272,-0.14272 -0.22291,-0.33629 -0.22291,-0.53814 -3e-4,-0.13308 0.0347,-0.26385 0.10147,-0.379 l 1.11872996,-1.94066 1.11921,-1.93864003 c 0.13594,-0.23541 0.38717,-0.38047 0.65905,-0.38047 0.27188,0 0.52311,0.14506 0.65905,0.38047 z" : "m 0.75051,2.3424298 1.93863,-1.11969 1.93912,-1.12075 c 0.155,-0.0895 0.33658,-0.12152 0.51283,-0.0904 0.17625,0.0311 0.33591,0.12336 0.45091,0.26054 0.11495,0.13715 0.17793,0.31044 0.17781,0.4894 v 4.47742 c 0,0.20186 -0.0802,0.39542 -0.2229,0.53814 -0.14272,0.14272 -0.33629,0.22291 -0.53814,0.22291 -0.13308,3e-4 -0.26385,-0.0347 -0.379,-0.10147 L 2.68911,4.7797998 0.75047,3.6605898 C 0.51506,3.5246498 0.37,3.2734198 0.37,3.0015398 c 0,-0.27188 0.14506,-0.52311 0.38047,-0.65905 z" }) }) }) });
53
53
  }, wn = (i) => {
54
- const { style: e, orientation: t = se.Vertical, ...n } = i, o = t === se.Vertical;
55
- return L("div", { style: { paddingLeft: "0px", paddingTop: "0px", paddingRight: o ? "0px" : "3px", paddingBottom: o ? "3px" : "0px", display: "flex", alignItems: "center", justifyContent: "center", ...e }, ...n, children: L("button", { style: { padding: "0", display: "flex", alignItems: "center", justifyContent: "center", border: "none" }, className: `scrollbar-button ${o ? "vertical" : "horizontal"} single-button end`, children: L("svg", { width: "9", height: "9", viewBox: "0 0 6 6", style: { opacity: "inherit" }, children: L("path", { d: o ? "M 2.412334,5.319396 1.292644,3.3807659 0.17189405,1.4416459 c -0.0895,-0.155 -0.12152,-0.33658 -0.0904,-0.51282998 0.0311,-0.17625 0.12336,-0.33591 0.26054,-0.45091 0.13715,-0.11495 0.31044,-0.17793 0.4894,-0.17781 H 5.308854 c 0.20186,0 0.39542,0.0802 0.53814,0.2229 0.14272,0.14272 0.22291,0.33629 0.22291,0.53813998 3e-4,0.13308 -0.0347,0.26385 -0.10147,0.379 l -1.11873,1.94066 -1.11921,1.9386401 c -0.13594,0.23541 -0.38717,0.38047 -0.65905,0.38047 -0.27188,0 -0.52311,-0.14506 -0.65905,-0.38047 z" : "m 5.3893002,3.6575719 -1.9386301,1.11969 -1.93912,1.12075 c -0.155,0.0895 -0.33658,0.12152 -0.51282997,0.0904 -0.17625,-0.0311 -0.33591,-0.12336 -0.45091,-0.26054 -0.11495,-0.13715 -0.17793,-0.31044 -0.17781,-0.4894 V 0.76105195 c 0,-0.20186 0.0802,-0.39542 0.2229,-0.53814 C 0.73562013,0.08019195 0.92919013,1.9467784e-6 1.1310401,1.9467784e-6 1.2641201,-2.9805322e-4 1.3948901,0.03470195 1.5100401,0.10147195 l 1.94066,1.11872995 1.9386401,1.11921 c 0.23541,0.13594 0.38047,0.38717 0.38047,0.65905 0,0.27188 -0.14506,0.52311 -0.38047,0.65905 z" }) }) }) });
56
- }, yo = (i) => {
57
- const { style: e, orientation: t = se.Vertical, ...n } = i, o = t === se.Vertical;
58
- return L("div", { style: { display: "flex", justifyContent: "center", alignItems: "end", transition: "fill-opacity 1s", zIndex: 1, width: "24px", height: "24px", ...e }, className: `scrollbar-button ${o ? "vertical" : "horizontal"} edge`, ...n, children: L("svg", { width: "24", height: "24", viewBox: "0 0 24 24", transform: o ? "rotate(90) " : "", children: L("path", { style: { transition: "opacity 240ms ease 0s", opacity: i.disabled ? 0 : 1 }, d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }) }) });
59
- }, Ze = (i, e, t, n, o = 0) => {
60
- for (let r = 0; r < t.length; r++) {
61
- const a = t[r].getBoundingClientRect();
62
- let h = a.left - e, s = h + a.width;
54
+ const { style: t, orientation: e = st.Vertical, ...n } = i, o = e === st.Vertical;
55
+ return S("div", { style: { paddingLeft: "0px", paddingTop: "0px", paddingRight: o ? "0px" : "3px", paddingBottom: o ? "3px" : "0px", display: "flex", alignItems: "center", justifyContent: "center", ...t }, ...n, children: S("button", { style: { padding: "0", display: "flex", alignItems: "center", justifyContent: "center", border: "none" }, className: `scrollbar-button ${o ? "vertical" : "horizontal"} single-button end`, children: S("svg", { width: "9", height: "9", viewBox: "0 0 6 6", style: { opacity: "inherit" }, children: S("path", { d: o ? "M 2.412334,5.319396 1.292644,3.3807659 0.17189405,1.4416459 c -0.0895,-0.155 -0.12152,-0.33658 -0.0904,-0.51282998 0.0311,-0.17625 0.12336,-0.33591 0.26054,-0.45091 0.13715,-0.11495 0.31044,-0.17793 0.4894,-0.17781 H 5.308854 c 0.20186,0 0.39542,0.0802 0.53814,0.2229 0.14272,0.14272 0.22291,0.33629 0.22291,0.53813998 3e-4,0.13308 -0.0347,0.26385 -0.10147,0.379 l -1.11873,1.94066 -1.11921,1.9386401 c -0.13594,0.23541 -0.38717,0.38047 -0.65905,0.38047 -0.27188,0 -0.52311,-0.14506 -0.65905,-0.38047 z" : "m 5.3893002,3.6575719 -1.9386301,1.11969 -1.93912,1.12075 c -0.155,0.0895 -0.33658,0.12152 -0.51282997,0.0904 -0.17625,-0.0311 -0.33591,-0.12336 -0.45091,-0.26054 -0.11495,-0.13715 -0.17793,-0.31044 -0.17781,-0.4894 V 0.76105195 c 0,-0.20186 0.0802,-0.39542 0.2229,-0.53814 C 0.73562013,0.08019195 0.92919013,1.9467784e-6 1.1310401,1.9467784e-6 1.2641201,-2.9805322e-4 1.3948901,0.03470195 1.5100401,0.10147195 l 1.94066,1.11872995 1.9386401,1.11921 c 0.23541,0.13594 0.38047,0.38717 0.38047,0.65905 0,0.27188 -0.14506,0.52311 -0.38047,0.65905 z" }) }) }) });
56
+ }, vo = (i) => {
57
+ const { style: t, orientation: e = st.Vertical, ...n } = i, o = e === st.Vertical;
58
+ return S("div", { style: { display: "flex", justifyContent: "center", alignItems: "end", transition: "fill-opacity 1s", zIndex: 1, width: "24px", height: "24px", ...t }, className: `scrollbar-button ${o ? "vertical" : "horizontal"} edge`, ...n, children: S("svg", { width: "24", height: "24", viewBox: "0 0 24 24", transform: o ? "rotate(90) " : "", children: S("path", { style: { transition: "opacity 240ms ease 0s", opacity: i.disabled ? 0 : 1 }, d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }) }) });
59
+ }, Gt = (i, t, e, n, o = 0) => {
60
+ for (let r = 0; r < e.length; r++) {
61
+ const a = e[r].getBoundingClientRect();
62
+ let h = a.left - t, s = h + a.width;
63
63
  if (n) {
64
64
  if (h < i && s >= i) return h;
65
65
  } else if (Math.ceil(s) > Math.ceil(i) + 2) return s;
66
66
  }
67
67
  return o;
68
- }, vo = Object.freeze(Object.defineProperty({ __proto__: null, getScrollTo: Ze }, Symbol.toStringTag, { value: "Module" })), bn = "_sheetxl-scrollbar_eblx4_6", ot = ye(Ce((i, e) => {
69
- const { offset: t = 0, totalSize: n = 0, viewportSize: o = 0, style: r, className: a, orientation: h = se.Vertical, onScrollOffset: s, onScroll: l, showCustomScrollButtons: c = !1, scrollButtonIncrement: u = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: f = 120, createScrollStartButton: v = xn, createScrollEndButton: m = wn, ...b } = i, T = M(l, [l]), _ = O(null), [w, { width: x, height: A }] = ge(), [P, { width: B, height: K }] = ge(), y = h === se.Vertical, S = y ? "top" : "left", z = y ? "scrollTop" : "scrollLeft", p = y ? A : x, C = y ? K : B, [g, E] = q(null);
68
+ }, wo = Object.freeze(Object.defineProperty({ __proto__: null, getScrollTo: Gt }, Symbol.toStringTag, { value: "Module" })), xn = "_sheetxl-scrollbar_eblx4_6", oe = gt(Lt((i, t) => {
69
+ const { offset: e = 0, totalSize: n = 0, viewportSize: o = 0, style: r, className: a, orientation: h = st.Vertical, onScrollOffset: s, onScroll: l, showCustomScrollButtons: c = !1, scrollButtonIncrement: u = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: f = 120, createScrollStartButton: v = vn, createScrollEndButton: g = wn, ...b } = i, T = D(l, [l]), _ = z(null), [w, { width: x, height: A }] = mt(), [P, { width: I, height: O }] = mt(), y = h === st.Vertical, E = y ? "top" : "left", M = y ? "scrollTop" : "scrollLeft", p = y ? A : x, L = y ? O : I, [m, C] = J(null);
70
70
  V(() => {
71
- g !== null && _.current && _.current.scrollTo({ behavior: "smooth", [S]: g });
72
- }, [g, y]);
73
- const k = H((R, le = !1) => {
71
+ m !== null && _.current && _.current.scrollTo({ behavior: "smooth", [E]: m });
72
+ }, [m, y]);
73
+ const N = R(($, et = !1) => {
74
74
  if (!_.current) return 0;
75
- const re = _.current.querySelector(".scrollbar-viewport"), fe = re.getBoundingClientRect(), ae = re.children, he = le ? 0 : Ze(R, fe[S], ae, !0, Math.max(0, R - u));
76
- return E(he), Math.max(0, he);
77
- }, []), J = H((R, le = !1) => {
75
+ const rt = _.current.querySelector(".scrollbar-viewport"), pt = rt.getBoundingClientRect(), at = rt.children, ct = et ? 0 : Gt($, pt[E], at, !0, Math.max(0, $ - u));
76
+ return C(ct), Math.max(0, ct);
77
+ }, []), Q = R(($, et = !1) => {
78
78
  if (!_.current) return 0;
79
- const re = _.current.querySelector(".scrollbar-viewport"), fe = re.getBoundingClientRect(), ae = re.children, he = Math.ceil(C - p), Ee = le ? he : Ze(R, fe[S], ae, !1, Math.max(0, R + u));
80
- return E(Ee), Math.min(he, Ee);
81
- }, [C, p]), F = O(null), j = H((R) => {
82
- F.current = t;
83
- const le = R.target[z];
84
- s(le, o, n), T?.(R);
85
- }, [s, o, n, t]);
79
+ const rt = _.current.querySelector(".scrollbar-viewport"), pt = rt.getBoundingClientRect(), at = rt.children, ct = Math.ceil(L - p), Ct = et ? ct : Gt($, pt[E], at, !1, Math.max(0, $ + u));
80
+ return C(Ct), Math.min(ct, Ct);
81
+ }, [L, p]), j = z(null), tt = R(($) => {
82
+ if (j.current !== null) return void (j.current = null);
83
+ const et = $.target[M];
84
+ s(et, o, n), T?.($);
85
+ }, [s, o, n, e]);
86
86
  V(() => {
87
- const R = F.current;
88
- F.current = null, t !== R && (_.current[z] = t);
89
- }, [t, z]);
90
- const Y = O(null), $ = O(null), W = H(() => {
91
- Y.current && (clearTimeout(Y.current), Y.current = null, $.current = null);
92
- }, []), X = H((R, le, re, fe = d) => {
93
- $.current = R, Y.current = setTimeout(() => {
94
- const ae = re ? k($.current || R) : J($.current || R);
95
- ae !== $.current ? X(ae, !1, re, f) : W();
96
- }, le ? 0 : fe);
97
- }, [k, J, W]);
87
+ const $ = j.current;
88
+ e !== $ && _.current[M] !== e && (j.current = e, _.current[M] = e);
89
+ }, [e, M]);
90
+ const F = z(null), B = z(null), W = R(() => {
91
+ F.current && (clearTimeout(F.current), F.current = null, B.current = null);
92
+ }, []), Y = R(($, et, rt, pt = d) => {
93
+ B.current = $, F.current = setTimeout(() => {
94
+ const at = rt ? N(B.current || $) : Q(B.current || $);
95
+ at !== B.current ? Y(at, !1, rt, f) : W();
96
+ }, et ? 0 : pt);
97
+ }, [N, Q, W]);
98
98
  V(() => () => W(), [W]);
99
- const ne = t, ve = N(() => {
99
+ const yt = K(() => {
100
100
  if (!c) return null;
101
- const R = { orientation: h, disabled: Math.floor(ne) <= 0 || Math.floor(C - p) === 0, onMouseUp: W, onMouseLeave: W, onMouseDown: () => X(ne, !0, !0) };
102
- return v?.(R);
103
- }, [c, h, ne, g, C, p]), xe = N(() => {
101
+ const $ = { orientation: h, disabled: Math.floor(e) <= 0 || Math.floor(L - p) === 0, onMouseUp: W, onMouseLeave: W, onMouseDown: () => Y(e, !0, !0) };
102
+ return v?.($);
103
+ }, [c, h, e, m, L, p]), vt = K(() => {
104
104
  if (!c) return null;
105
- const R = { orientation: h, disabled: Math.floor(C - p) <= Math.ceil(ne), onMouseUp: W, onMouseLeave: W, onMouseDown: () => X(ne, !0, !1) };
106
- return m?.(R);
107
- }, [c, h, ne, g, C, p]);
108
- return Se("div", { ref: e, style: { display: "flex", flex: "1", flexDirection: y ? "column" : "row", padding: "0", ...r }, className: we(bn, a), ...b, children: [ve, L("div", { className: "pseudo-scrollbar", style: { flex: "1 1 100%", display: "flex", boxSizing: "content-box", flexDirection: y ? "column" : "row", justifyContent: "center", alignItems: "center" }, ref: w, children: L("div", { tabIndex: -1, style: { flex: "1 1 100%", overflowY: y ? "scroll" : "hidden", overflowX: y ? "hidden" : "scroll", position: "relative", willChange: "transform" }, onScroll: j, ref: _, children: L("div", { ref: P, style: { position: "absolute", height: y ? n - o + (A ?? 0) : 1, width: y ? 1 : n - o + (x ?? 0) }, className: "scrollbar-viewport" }) }) }), xe] });
105
+ const $ = { orientation: h, disabled: Math.floor(L - p) <= Math.ceil(e), onMouseUp: W, onMouseLeave: W, onMouseDown: () => Y(e, !0, !1) };
106
+ return g?.($);
107
+ }, [c, h, e, m, L, p]);
108
+ return bt("div", { ref: t, style: { display: "flex", flex: "1", flexDirection: y ? "column" : "row", padding: "0", ...r }, className: wt(xn, a), ...b, children: [yt, S("div", { className: "pseudo-scrollbar", style: { flex: "1 1 100%", display: "flex", boxSizing: "content-box", flexDirection: y ? "column" : "row", justifyContent: "center", alignItems: "center" }, ref: w, children: S("div", { tabIndex: -1, style: { flex: "1 1 100%", overflowY: y ? "scroll" : "hidden", overflowX: y ? "hidden" : "scroll", position: "relative", willChange: "transform" }, onScroll: tt, ref: _, children: S("div", { ref: P, style: { position: "absolute", height: y ? n - o + (A ?? 0) : 1, width: y ? 1 : n - o + (x ?? 0) }, className: "scrollbar-viewport" }) }) }), vt] });
109
109
  }));
110
- ot.displayName = "Scrollbar";
111
- let _t = Date.now, mt = 1e3, pe = {}, Sn = 1;
112
- const Te = (i) => {
113
- let e = pe[i] !== null;
114
- return e && (pe[i] = null), e;
115
- }, gt = (i, e, t, n = 0, o) => {
116
- let r = _t(), a = r, h = 0, s = 0, l = 0, c = Sn++;
110
+ oe.displayName = "Scrollbar";
111
+ let me = Date.now, ge = 1e3, dt = {}, bn = 1;
112
+ const Tt = (i) => {
113
+ let t = dt[i] !== null;
114
+ return t && (dt[i] = null), t;
115
+ }, ye = (i, t, e, n = 0, o) => {
116
+ let r = me(), a = r, h = 0, s = 0, l = 0, c = bn++;
117
117
  if (c % 20 == 0) {
118
118
  const d = {};
119
- for (let f in pe) d[f] = !0;
120
- pe = d;
119
+ for (let f in dt) d[f] = !0;
120
+ dt = d;
121
121
  }
122
122
  const u = function(d) {
123
- let f = d !== !0, v = _t(), m = !0;
123
+ let f = d !== !0, v = me(), g = !0;
124
124
  try {
125
- m = (!e || e(c)) ?? !0;
125
+ g = (!t || t(c)) ?? !0;
126
126
  } catch {
127
- m = !1;
127
+ g = !1;
128
128
  }
129
- if (!pe[c] || !m) return pe[c] = null, void t?.(60 - s / ((v - r) / mt), c, !1);
129
+ if (!dt[c] || !g) return dt[c] = null, void e?.(60 - s / ((v - r) / ge), c, !1);
130
130
  if (f) {
131
131
  l = Math.round((v - a) / 16.666666666666668) - 1;
132
132
  for (let _ = 0; _ < Math.min(l, 4); _++) u(!0), s++;
@@ -138,78 +138,78 @@ const Te = (i) => {
138
138
  } catch {
139
139
  T = !1;
140
140
  }
141
- T !== !1 && h !== 1 || !f ? f && (a = v, requestAnimationFrame(u)) : (pe[c] = null, t?.(60 - s / ((v - r) / mt), c, h === 1 || n == null));
141
+ T !== !1 && h !== 1 || !f ? f && (a = v, requestAnimationFrame(u)) : (dt[c] = null, e?.(60 - s / ((v - r) / ge), c, h === 1 || n == null));
142
142
  };
143
- return pe[c] = !0, requestAnimationFrame(u), c;
144
- }, Ln = function(i) {
143
+ return dt[c] = !0, requestAnimationFrame(u), c;
144
+ }, Sn = function(i) {
145
145
  return Math.pow(i - 1, 3) + 1;
146
- }, Cn = function(i) {
146
+ }, En = function(i) {
147
147
  return (i /= 0.5) < 1 ? 0.5 * Math.pow(i, 3) : 0.5 * (Math.pow(i - 2, 3) + 2);
148
148
  };
149
- class En {
150
- constructor(e, t) {
151
- this.__isSingleTouch = !1, this.__isTracking = !1, this.__didDecelerationComplete = !1, this.__isGesturing = !1, this.__isDragging = !1, this.__isDecelerating = 0, this.__isAnimating = 0, this.__interruptedAnimation = !1, this.__lastScale = 1, this.__enableScrollX = !0, this.__enableScrollY = !0, this.__clientLeft = 0, this.__clientTop = 0, this.__clientWidth = 0, this.__clientHeight = 0, this.__contentWidth = 0, this.__contentHeight = 0, this.__snapWidth = 100, this.__snapHeight = 100, this.__zoomLevel = 1, this.__scrollLeft = 0, this.__scrollTop = 0, this.__maxScrollLeft = 0, this.__maxScrollTop = 0, this.__scheduledLeft = 0, this.__scheduledTop = 0, this.__scheduledZoom = 0, this.__lastTouchLeft = 0, this.__lastTouchTop = 0, this.__lastTouchMove = 0, this.__positions = [], this.__initialTouchLeft = 0, this.__initialTouchTop = 0, this.__zoomLevelStart = 1, this.__minDecelerationScrollLeft = null, this.__minDecelerationScrollTop = null, this.__maxDecelerationScrollLeft = null, this.__maxDecelerationScrollTop = null, this.__decelerationVelocityX = null, this.__decelerationVelocityY = 0, this.__callback = e, this.options = { scrollingX: !0, scrollingY: !0, animating: !0, animationDuration: 250, bouncing: !0, locking: !0, paging: !1, snapping: !1, zooming: !1, minZoom: 0.5, maxZoom: 3, speedMultiplier: 1, scrollingComplete: void 0, penetrationDeceleration: 0.03, penetrationAcceleration: 0.08, ...t };
149
+ class Ln {
150
+ constructor(t, e) {
151
+ this.__isSingleTouch = !1, this.__isTracking = !1, this.__didDecelerationComplete = !1, this.__isGesturing = !1, this.__isDragging = !1, this.__isDecelerating = 0, this.__isAnimating = 0, this.__interruptedAnimation = !1, this.__lastScale = 1, this.__enableScrollX = !0, this.__enableScrollY = !0, this.__clientLeft = 0, this.__clientTop = 0, this.__clientWidth = 0, this.__clientHeight = 0, this.__contentWidth = 0, this.__contentHeight = 0, this.__snapWidth = 100, this.__snapHeight = 100, this.__zoomLevel = 1, this.__scrollLeft = 0, this.__scrollTop = 0, this.__maxScrollLeft = 0, this.__maxScrollTop = 0, this.__scheduledLeft = 0, this.__scheduledTop = 0, this.__scheduledZoom = 0, this.__lastTouchLeft = 0, this.__lastTouchTop = 0, this.__lastTouchMove = 0, this.__positions = [], this.__initialTouchLeft = 0, this.__initialTouchTop = 0, this.__zoomLevelStart = 1, this.__minDecelerationScrollLeft = null, this.__minDecelerationScrollTop = null, this.__maxDecelerationScrollLeft = null, this.__maxDecelerationScrollTop = null, this.__decelerationVelocityX = null, this.__decelerationVelocityY = 0, this.__callback = t, this.options = { scrollingX: !0, scrollingY: !0, animating: !0, animationDuration: 250, bouncing: !0, locking: !0, paging: !1, snapping: !1, zooming: !1, minZoom: 0.5, maxZoom: 3, speedMultiplier: 1, scrollingComplete: void 0, penetrationDeceleration: 0.03, penetrationAcceleration: 0.08, ...e };
152
152
  }
153
- setDimensions(e, t, n, o) {
154
- e !== null && (this.__clientWidth = e), t !== null && (this.__clientHeight = t), n !== null && (this.__contentWidth = n), o !== null && (this.__contentHeight = o), this.__computeScrollMax(), this.scrollTo(this.__scrollLeft, this.__scrollTop, !0);
153
+ setDimensions(t, e, n, o) {
154
+ t !== null && (this.__clientWidth = t), e !== null && (this.__clientHeight = e), n !== null && (this.__contentWidth = n), o !== null && (this.__contentHeight = o), this.__computeScrollMax(), this.scrollTo(this.__scrollLeft, this.__scrollTop, !0);
155
155
  }
156
- setPosition(e, t) {
157
- this.__clientLeft = e || 0, this.__clientTop = t || 0;
156
+ setPosition(t, e) {
157
+ this.__clientLeft = t || 0, this.__clientTop = e || 0;
158
158
  }
159
- setSnapSize(e, t) {
160
- this.__snapWidth = e, this.__snapHeight = t;
159
+ setSnapSize(t, e) {
160
+ this.__snapWidth = t, this.__snapHeight = e;
161
161
  }
162
162
  getValues() {
163
163
  return { left: this.__scrollLeft, top: this.__scrollTop, right: this.__scrollLeft + this.__clientWidth / this.__zoomLevel, bottom: this.__scrollTop + this.__clientHeight / this.__zoomLevel, zoom: this.__zoomLevel };
164
164
  }
165
- getPoint(e, t) {
165
+ getPoint(t, e) {
166
166
  const n = this.getValues();
167
- return { left: e / n.zoom, top: t / n.zoom };
167
+ return { left: t / n.zoom, top: e / n.zoom };
168
168
  }
169
169
  getScrollMax() {
170
170
  return { left: this.__maxScrollLeft, top: this.__maxScrollTop };
171
171
  }
172
- zoomTo(e, t = !1, n, o, r) {
172
+ zoomTo(t, e = !1, n, o, r) {
173
173
  if (!this.options.zooming) throw new Error("Zooming is not enabled!");
174
- r && (this.__zoomComplete = r), this.__isDecelerating && (Te(this.__isDecelerating), this.__isDecelerating = 0);
174
+ r && (this.__zoomComplete = r), this.__isDecelerating && (Tt(this.__isDecelerating), this.__isDecelerating = 0);
175
175
  const a = this.__zoomLevel;
176
- n === void 0 && (n = this.__clientWidth / 2), o === void 0 && (o = this.__clientHeight / 2), e = Math.max(Math.min(e, this.options.maxZoom), this.options.minZoom), this.__computeScrollMax(e);
177
- const h = e / a;
176
+ n === void 0 && (n = this.__clientWidth / 2), o === void 0 && (o = this.__clientHeight / 2), t = Math.max(Math.min(t, this.options.maxZoom), this.options.minZoom), this.__computeScrollMax(t);
177
+ const h = t / a;
178
178
  let s = h * (this.__scrollLeft + n) - n, l = h * (this.__scrollTop + o) - o;
179
- s > this.__maxScrollLeft ? s = this.__maxScrollLeft : s < 0 && (s = 0), l > this.__maxScrollTop ? l = this.__maxScrollTop : l < 0 && (l = 0), this.__publish(s, l, e, t);
179
+ s > this.__maxScrollLeft ? s = this.__maxScrollLeft : s < 0 && (s = 0), l > this.__maxScrollTop ? l = this.__maxScrollTop : l < 0 && (l = 0), this.__publish(s, l, t, e);
180
180
  }
181
- zoomBy(e, t = !1, n = 0, o = 0, r) {
182
- this.zoomTo(this.__zoomLevel * e, t, n, o, r);
181
+ zoomBy(t, e = !1, n = 0, o = 0, r) {
182
+ this.zoomTo(this.__zoomLevel * t, e, n, o, r);
183
183
  }
184
- scrollTo(e, t, n = !1, o = 1) {
185
- if (this.__isDecelerating && (Te(this.__isDecelerating), this.__isDecelerating = 0), o !== void 0 && o !== this.__zoomLevel) {
184
+ scrollTo(t, e, n = !1, o = 1) {
185
+ if (this.__isDecelerating && (Tt(this.__isDecelerating), this.__isDecelerating = 0), o !== void 0 && o !== this.__zoomLevel) {
186
186
  if (!this.options.zooming) throw new Error("Zooming is not enabled!");
187
- e *= o, t *= o, this.__computeScrollMax(o);
187
+ t *= o, e *= o, this.__computeScrollMax(o);
188
188
  } else o = this.__zoomLevel;
189
- this.options.scrollingX ? this.options.paging ? e = Math.round(e / this.__clientWidth) * this.__clientWidth : this.options.snapping && (e = Math.round(e / this.__snapWidth) * this.__snapWidth) : e = this.__scrollLeft, this.options.scrollingY ? this.options.paging ? t = Math.round(t / this.__clientHeight) * this.__clientHeight : this.options.snapping && (t = Math.round(t / this.__snapHeight) * this.__snapHeight) : t = this.__scrollTop, e = Math.max(Math.min(this.__maxScrollLeft, e), 0), t = Math.max(Math.min(this.__maxScrollTop, t), 0), e === this.__scrollLeft && t === this.__scrollTop && (n = !1), this.__publish(e, t, o, n);
189
+ this.options.scrollingX ? this.options.paging ? t = Math.round(t / this.__clientWidth) * this.__clientWidth : this.options.snapping && (t = Math.round(t / this.__snapWidth) * this.__snapWidth) : t = this.__scrollLeft, this.options.scrollingY ? this.options.paging ? e = Math.round(e / this.__clientHeight) * this.__clientHeight : this.options.snapping && (e = Math.round(e / this.__snapHeight) * this.__snapHeight) : e = this.__scrollTop, t = Math.max(Math.min(this.__maxScrollLeft, t), 0), e = Math.max(Math.min(this.__maxScrollTop, e), 0), t === this.__scrollLeft && e === this.__scrollTop && (n = !1), this.__publish(t, e, o, n);
190
190
  }
191
- scrollBy(e = 0, t = 0, n = !1) {
191
+ scrollBy(t = 0, e = 0, n = !1) {
192
192
  const o = this.__isAnimating ? this.__scheduledLeft : this.__scrollLeft, r = this.__isAnimating ? this.__scheduledTop : this.__scrollTop;
193
- this.scrollTo(o + (e || 0), r + (t || 0), n);
193
+ this.scrollTo(o + (t || 0), r + (e || 0), n);
194
194
  }
195
- doMouseZoom(e, t, n, o) {
196
- const r = e > 0 ? 0.97 : 1.03;
195
+ doMouseZoom(t, e, n, o) {
196
+ const r = t > 0 ? 0.97 : 1.03;
197
197
  return this.zoomTo(this.__zoomLevel * r, !1, n - this.__clientLeft, o - this.__clientTop);
198
198
  }
199
- doTouchStart(e, t) {
200
- if (e.length === void 0) throw new Error("Invalid touch list: " + e);
201
- if (t instanceof Date && (t = t.valueOf()), typeof t != "number") throw new Error("Invalid timestamp value: " + t);
199
+ doTouchStart(t, e) {
200
+ if (t.length === void 0) throw new Error("Invalid touch list: " + t);
201
+ if (e instanceof Date && (e = e.valueOf()), typeof e != "number") throw new Error("Invalid timestamp value: " + e);
202
202
  let n, o;
203
- this.__interruptedAnimation = !0, this.__isDecelerating && (Te(this.__isDecelerating), this.__isDecelerating = 0, this.__interruptedAnimation = !0), this.__isAnimating && (Te(this.__isAnimating), this.__isAnimating = 0, this.__interruptedAnimation = !0);
204
- let r = e.length === 1;
205
- r ? (n = e[0].pageX, o = e[0].pageY) : (n = Math.abs(e[0].pageX + e[1].pageX) / 2, o = Math.abs(e[0].pageY + e[1].pageY) / 2), this.__initialTouchLeft = n, this.__initialTouchTop = o, this.__zoomLevelStart = this.__zoomLevel, this.__lastTouchLeft = n, this.__lastTouchTop = o, this.__lastTouchMove = t, this.__lastScale = 1, this.__enableScrollX = !r && this.options.scrollingX, this.__enableScrollY = !r && this.options.scrollingY, this.__isTracking = !0, this.__didDecelerationComplete = !1, this.__isDragging = !r, this.__isSingleTouch = r, this.__positions = [];
203
+ this.__interruptedAnimation = !0, this.__isDecelerating && (Tt(this.__isDecelerating), this.__isDecelerating = 0, this.__interruptedAnimation = !0), this.__isAnimating && (Tt(this.__isAnimating), this.__isAnimating = 0, this.__interruptedAnimation = !0);
204
+ let r = t.length === 1;
205
+ r ? (n = t[0].pageX, o = t[0].pageY) : (n = Math.abs(t[0].pageX + t[1].pageX) / 2, o = Math.abs(t[0].pageY + t[1].pageY) / 2), this.__initialTouchLeft = n, this.__initialTouchTop = o, this.__zoomLevelStart = this.__zoomLevel, this.__lastTouchLeft = n, this.__lastTouchTop = o, this.__lastTouchMove = e, this.__lastScale = 1, this.__enableScrollX = !r && this.options.scrollingX, this.__enableScrollY = !r && this.options.scrollingY, this.__isTracking = !0, this.__didDecelerationComplete = !1, this.__isDragging = !r, this.__isSingleTouch = r, this.__positions = [];
206
206
  }
207
- doTouchMove(e, t, n = 1) {
208
- if (e.length === void 0) throw new Error("Invalid touch list: " + e);
209
- if (t instanceof Date && (t = t.valueOf()), typeof t != "number") throw new Error("Invalid timestamp value: " + t);
207
+ doTouchMove(t, e, n = 1) {
208
+ if (t.length === void 0) throw new Error("Invalid touch list: " + t);
209
+ if (e instanceof Date && (e = e.valueOf()), typeof e != "number") throw new Error("Invalid timestamp value: " + e);
210
210
  if (!this.__isTracking) return;
211
211
  let o, r;
212
- e.length === 2 ? (o = Math.abs(e[0].pageX + e[1].pageX) / 2, r = Math.abs(e[0].pageY + e[1].pageY) / 2) : (o = e[0].pageX, r = e[0].pageY);
212
+ t.length === 2 ? (o = Math.abs(t[0].pageX + t[1].pageX) / 2, r = Math.abs(t[0].pageY + t[1].pageY) / 2) : (o = t[0].pageX, r = t[0].pageY);
213
213
  let a = this.__positions;
214
214
  if (this.__isDragging) {
215
215
  let h = o - this.__lastTouchLeft, s = r - this.__lastTouchTop, l = this.__scrollLeft, c = this.__scrollTop, u = this.__zoomLevel;
@@ -230,52 +230,52 @@ class En {
230
230
  const d = this.__maxScrollTop;
231
231
  (c > d || c < 0) && (this.options.bouncing ? c += s / 2 * this.options.speedMultiplier : c = c > d ? d : 0);
232
232
  }
233
- a.length > 60 && a.splice(0, 30), a.push(l, c, t), this.__publish(l, c, u);
233
+ a.length > 60 && a.splice(0, 30), a.push(l, c, e), this.__publish(l, c, u);
234
234
  } else {
235
235
  let h = this.options.locking ? 3 : 0, s = 5, l = Math.abs(o - this.__initialTouchLeft), c = Math.abs(r - this.__initialTouchTop);
236
- this.__enableScrollX = this.options.scrollingX && l >= h, this.__enableScrollY = this.options.scrollingY && c >= h, a.push(this.__scrollLeft, this.__scrollTop, t), this.__isDragging = (this.__enableScrollX || this.__enableScrollY) && (l >= s || c >= s), this.__isDragging && (this.__interruptedAnimation = !1);
236
+ this.__enableScrollX = this.options.scrollingX && l >= h, this.__enableScrollY = this.options.scrollingY && c >= h, a.push(this.__scrollLeft, this.__scrollTop, e), this.__isDragging = (this.__enableScrollX || this.__enableScrollY) && (l >= s || c >= s), this.__isDragging && (this.__interruptedAnimation = !1);
237
237
  }
238
- this.__lastTouchLeft = o, this.__lastTouchTop = r, this.__lastTouchMove = t, this.__lastScale = n;
238
+ this.__lastTouchLeft = o, this.__lastTouchTop = r, this.__lastTouchMove = e, this.__lastScale = n;
239
239
  }
240
- doTouchEnd(e) {
241
- if (e instanceof Date && (e = e.valueOf()), typeof e != "number") throw new Error("Invalid timestamp value: " + e);
240
+ doTouchEnd(t) {
241
+ if (t instanceof Date && (t = t.valueOf()), typeof t != "number") throw new Error("Invalid timestamp value: " + t);
242
242
  if (this.__isTracking) {
243
- if (this.__isTracking = !1, this.__isDragging) if (this.__isDragging = !1, this.__isSingleTouch && this.options.animating && e - this.__lastTouchMove <= 100) {
244
- let t = this.__positions, n = t.length - 1, o = n;
245
- for (let r = n; r > 0 && t[r] > this.__lastTouchMove - 100; r -= 3) o = r;
243
+ if (this.__isTracking = !1, this.__isDragging) if (this.__isDragging = !1, this.__isSingleTouch && this.options.animating && t - this.__lastTouchMove <= 100) {
244
+ let e = this.__positions, n = e.length - 1, o = n;
245
+ for (let r = n; r > 0 && e[r] > this.__lastTouchMove - 100; r -= 3) o = r;
246
246
  if (o !== n) {
247
- const r = t[n] - t[o], a = this.__scrollLeft - t[o - 2], h = this.__scrollTop - t[o - 1];
247
+ const r = e[n] - e[o], a = this.__scrollLeft - e[o - 2], h = this.__scrollTop - e[o - 1];
248
248
  this.__decelerationVelocityX = a / r * (1e3 / 60), this.__decelerationVelocityY = h / r * (1e3 / 60);
249
249
  const s = this.options.paging || this.options.snapping ? 4 : 1;
250
- (Math.abs(this.__decelerationVelocityX) > s || Math.abs(this.__decelerationVelocityY) > s) && this.__startDeceleration(e);
250
+ (Math.abs(this.__decelerationVelocityX) > s || Math.abs(this.__decelerationVelocityY) > s) && this.__startDeceleration(t);
251
251
  } else this.options.scrollingComplete?.();
252
- } else e - this.__lastTouchMove > 100 && this.options.scrollingComplete?.();
252
+ } else t - this.__lastTouchMove > 100 && this.options.scrollingComplete?.();
253
253
  this.__isDecelerating || ((this.__interruptedAnimation || this.__isDragging) && this.options.scrollingComplete?.(), this.scrollTo(this.__scrollLeft, this.__scrollTop, !0, this.__zoomLevel)), this.__positions.length = 0;
254
254
  }
255
255
  }
256
- __publish(e, t, n, o = !1) {
256
+ __publish(t, e, n, o = !1) {
257
257
  const r = this.__isAnimating;
258
- if (r && (Te(r), this.__isAnimating = 0), o && this.options.animating) {
259
- this.__scheduledLeft = e, this.__scheduledTop = t, this.__scheduledZoom = n;
260
- const a = this.__scrollLeft, h = this.__scrollTop, s = this.__zoomLevel, l = e - a, c = t - h, u = n - s, d = function(m, b, T) {
261
- T && (this.__scrollLeft = a + l * m, this.__scrollTop = h + c * m, this.__zoomLevel = s + u * m, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
262
- }.bind(this), f = function(m) {
263
- return this.__isAnimating === m;
264
- }.bind(this), v = function(m, b, T) {
258
+ if (r && (Tt(r), this.__isAnimating = 0), o && this.options.animating) {
259
+ this.__scheduledLeft = t, this.__scheduledTop = e, this.__scheduledZoom = n;
260
+ const a = this.__scrollLeft, h = this.__scrollTop, s = this.__zoomLevel, l = t - a, c = e - h, u = n - s, d = function(g, b, T) {
261
+ T && (this.__scrollLeft = a + l * g, this.__scrollTop = h + c * g, this.__zoomLevel = s + u * g, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
262
+ }.bind(this), f = function(g) {
263
+ return this.__isAnimating === g;
264
+ }.bind(this), v = function(g, b, T) {
265
265
  b === this.__isAnimating && (this.__isAnimating = !1), (this.__didDecelerationComplete || T) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
266
266
  }.bind(this);
267
- this.__isAnimating = gt(d, f, v, this.options.animationDuration, r ? Ln : Cn);
268
- } else this.__scheduledLeft = this.__scrollLeft = e, this.__scheduledTop = this.__scrollTop = t, this.__scheduledZoom = this.__zoomLevel = n, this.__callback && this.__callback(e, t, n), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
267
+ this.__isAnimating = ye(d, f, v, this.options.animationDuration, r ? Sn : En);
268
+ } else this.__scheduledLeft = this.__scrollLeft = t, this.__scheduledTop = this.__scrollTop = e, this.__scheduledZoom = this.__zoomLevel = n, this.__callback && this.__callback(t, e, n), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
269
269
  }
270
- __computeScrollMax(e = this.__zoomLevel) {
271
- this.__maxScrollLeft = Math.max(this.__contentWidth * e - this.__clientWidth, 0), this.__maxScrollTop = Math.max(this.__contentHeight * e - this.__clientHeight, 0);
270
+ __computeScrollMax(t = this.__zoomLevel) {
271
+ this.__maxScrollLeft = Math.max(this.__contentWidth * t - this.__clientWidth, 0), this.__maxScrollTop = Math.max(this.__contentHeight * t - this.__clientHeight, 0);
272
272
  }
273
- __startDeceleration(e) {
273
+ __startDeceleration(t) {
274
274
  if (this.options.paging) {
275
275
  const a = Math.max(Math.min(this.__scrollLeft, this.__maxScrollLeft), 0), h = Math.max(Math.min(this.__scrollTop, this.__maxScrollTop), 0), s = this.__clientWidth, l = this.__clientHeight;
276
276
  this.__minDecelerationScrollLeft = Math.floor(a / s) * s, this.__minDecelerationScrollTop = Math.floor(h / l) * l, this.__maxDecelerationScrollLeft = Math.ceil(a / s) * s, this.__maxDecelerationScrollTop = Math.ceil(h / l) * l;
277
277
  } else this.__minDecelerationScrollLeft = 0, this.__minDecelerationScrollTop = 0, this.__maxDecelerationScrollLeft = this.__maxScrollLeft, this.__maxDecelerationScrollTop = this.__maxScrollTop;
278
- const t = function(a, h, s) {
278
+ const e = function(a, h, s) {
279
279
  this.__stepThroughDeceleration(s);
280
280
  }.bind(this), n = this.options.snapping ? 4 : 0.1, o = function() {
281
281
  const a = Math.abs(this.__decelerationVelocityX) >= n || Math.abs(this.__decelerationVelocityY) >= n;
@@ -283,50 +283,50 @@ class En {
283
283
  }.bind(this), r = function(a, h, s) {
284
284
  this.__isDecelerating = 0, this.__didDecelerationComplete && this.options.scrollingComplete?.(), this.scrollTo(this.__scrollLeft, this.__scrollTop, this.options.snapping);
285
285
  }.bind(this);
286
- this.__isDecelerating = gt(t, o, r);
286
+ this.__isDecelerating = ye(e, o, r);
287
287
  }
288
- __stepThroughDeceleration(e) {
289
- let t = this.__scrollLeft + this.__decelerationVelocityX, n = this.__scrollTop + this.__decelerationVelocityY;
288
+ __stepThroughDeceleration(t) {
289
+ let e = this.__scrollLeft + this.__decelerationVelocityX, n = this.__scrollTop + this.__decelerationVelocityY;
290
290
  if (!this.options.bouncing) {
291
- const o = Math.max(Math.min(this.__maxDecelerationScrollLeft, t), this.__minDecelerationScrollLeft);
292
- o !== t && (t = o, this.__decelerationVelocityX = 0);
291
+ const o = Math.max(Math.min(this.__maxDecelerationScrollLeft, e), this.__minDecelerationScrollLeft);
292
+ o !== e && (e = o, this.__decelerationVelocityX = 0);
293
293
  const r = Math.max(Math.min(this.__maxDecelerationScrollTop, n), this.__minDecelerationScrollTop);
294
294
  r !== n && (n = r, this.__decelerationVelocityY = 0);
295
295
  }
296
- if (e ? this.__publish(t, n, this.__zoomLevel) : (this.__scrollLeft = t, this.__scrollTop = n), !this.options.paging && (this.__decelerationVelocityX *= 0.95, this.__decelerationVelocityY *= 0.95), this.options.bouncing) {
296
+ if (t ? this.__publish(e, n, this.__zoomLevel) : (this.__scrollLeft = e, this.__scrollTop = n), !this.options.paging && (this.__decelerationVelocityX *= 0.95, this.__decelerationVelocityY *= 0.95), this.options.bouncing) {
297
297
  let o = 0, r = 0, a = this.options.penetrationDeceleration, h = this.options.penetrationAcceleration;
298
- t < this.__minDecelerationScrollLeft ? o = this.__minDecelerationScrollLeft - t : t > this.__maxDecelerationScrollLeft && (o = this.__maxDecelerationScrollLeft - t), n < this.__minDecelerationScrollTop ? r = this.__minDecelerationScrollTop - n : n > this.__maxDecelerationScrollTop && (r = this.__maxDecelerationScrollTop - n), o !== 0 && (o * this.__decelerationVelocityX <= 0 ? this.__decelerationVelocityX += o * a : this.__decelerationVelocityX = o * h), r !== 0 && (r * this.__decelerationVelocityY <= 0 ? this.__decelerationVelocityY += r * a : this.__decelerationVelocityY = r * h);
298
+ e < this.__minDecelerationScrollLeft ? o = this.__minDecelerationScrollLeft - e : e > this.__maxDecelerationScrollLeft && (o = this.__maxDecelerationScrollLeft - e), n < this.__minDecelerationScrollTop ? r = this.__minDecelerationScrollTop - n : n > this.__maxDecelerationScrollTop && (r = this.__maxDecelerationScrollTop - n), o !== 0 && (o * this.__decelerationVelocityX <= 0 ? this.__decelerationVelocityX += o * a : this.__decelerationVelocityX = o * h), r !== 0 && (r * this.__decelerationVelocityY <= 0 ? this.__decelerationVelocityY += r * a : this.__decelerationVelocityY = r * h);
299
299
  }
300
300
  }
301
301
  }
302
- var ee = typeof window < "u" ? window : { screen: {}, navigator: {} }, Le = (ee.matchMedia || function() {
302
+ var q = typeof window < "u" ? window : { screen: {}, navigator: {} }, Et = (q.matchMedia || function() {
303
303
  return { matches: !1 };
304
- }).bind(ee), zt = !1, Tn = { get passive() {
305
- return zt = !0;
306
- } }, yt = function() {
304
+ }).bind(q), Be = !1, Cn = { get passive() {
305
+ return Be = !0;
306
+ } }, ve = function() {
307
307
  };
308
- ee.addEventListener && ee.addEventListener("p", yt, Tn), ee.removeEventListener && ee.removeEventListener("p", yt, !1);
309
- var Mn = zt, kn = "PointerEvent" in ee, it = "ontouchstart" in ee, Bt = it || "TouchEvent" in ee && Le("(any-pointer: coarse)").matches, vt = (ee.navigator.maxTouchPoints || 0) > 0 || Bt, Ot = ee.navigator.userAgent || "", Dn = Le("(pointer: coarse)").matches && /iPad|Macintosh/.test(Ot) && Math.min(ee.screen.width || 0, ee.screen.height || 0) >= 768, $t = (Le("(pointer: coarse)").matches || !Le("(pointer: fine)").matches && it) && !/Windows.*Firefox/.test(Ot), Pn = Le("(any-pointer: fine)").matches || Le("(any-hover: hover)").matches || Dn || !it, qe = !vt || !Pn && $t ? vt ? "touchOnly" : "mouseOnly" : "hybrid", An = qe === "mouseOnly" ? "mouse" : qe === "touchOnly" || $t ? "touch" : "mouse";
310
- const zn = Object.freeze(Object.defineProperty({ __proto__: null, deviceType: qe, primaryInput: An, supportsPassiveEvents: Mn, supportsPointerEvents: kn, supportsTouchEvents: Bt }, Symbol.toStringTag, { value: "Module" })), Bn = /* @__PURE__ */ new Set(["INPUT", "TEXTAREA", "SELECT"]), Kt = {};
311
- function Je() {
312
- return zn;
308
+ q.addEventListener && q.addEventListener("p", ve, Cn), q.removeEventListener && q.removeEventListener("p", ve, !1);
309
+ var Tn = Be, Mn = "PointerEvent" in q, ie = "ontouchstart" in q, Oe = ie || "TouchEvent" in q && Et("(any-pointer: coarse)").matches, we = (q.navigator.maxTouchPoints || 0) > 0 || Oe, $e = q.navigator.userAgent || "", kn = Et("(pointer: coarse)").matches && /iPad|Macintosh/.test($e) && Math.min(q.screen.width || 0, q.screen.height || 0) >= 768, Ke = (Et("(pointer: coarse)").matches || !Et("(pointer: fine)").matches && ie) && !/Windows.*Firefox/.test($e), Dn = Et("(any-pointer: fine)").matches || Et("(any-hover: hover)").matches || kn || !ie, Zt = !we || !Dn && Ke ? we ? "touchOnly" : "mouseOnly" : "hybrid", Pn = Zt === "mouseOnly" ? "mouse" : Zt === "touchOnly" || Ke ? "touch" : "mouse";
310
+ const An = Object.freeze(Object.defineProperty({ __proto__: null, deviceType: Zt, primaryInput: Pn, supportsPassiveEvents: Tn, supportsPointerEvents: Mn, supportsTouchEvents: Oe }, Symbol.toStringTag, { value: "Module" })), zn = /* @__PURE__ */ new Set(["INPUT", "TEXTAREA", "SELECT"]), Re = {};
311
+ function qt() {
312
+ return An;
313
313
  }
314
- const Rt = (i) => i === "BracketLeft" ? "[" : i === "BracketRight" ? "]" : Z.camelToPrettyCase(i), xo = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: Kt, boundPixel: function(i, e = !1, t = 0) {
314
+ const Ie = (i) => i === "BracketLeft" ? "[" : i === "BracketRight" ? "]" : G.camelToPrettyCase(i), xo = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: Re, boundPixel: function(i, t = !1, e = 0) {
315
315
  return i;
316
316
  }, createSyntheticEvent: (i) => {
317
- let e = !1, t = !1;
317
+ let t = !1, e = !1;
318
318
  return { nativeEvent: i, currentTarget: i.currentTarget, target: i.target, bubbles: i.bubbles, cancelable: i.cancelable, defaultPrevented: i.defaultPrevented, eventPhase: i.eventPhase, isTrusted: i.isTrusted, preventDefault: () => {
319
- e = !0, i.preventDefault();
320
- }, isDefaultPrevented: () => e, stopPropagation: () => {
321
- t = !0, i.stopPropagation();
322
- }, isPropagationStopped: () => t, persist: () => {
319
+ t = !0, i.preventDefault();
320
+ }, isDefaultPrevented: () => t, stopPropagation: () => {
321
+ e = !0, i.stopPropagation();
322
+ }, isPropagationStopped: () => e, persist: () => {
323
323
  }, timeStamp: i.timeStamp, type: i.type };
324
- }, detectIt: Je, focusableNodeNames: Bn, toPrettyKeyCode: Rt }, Symbol.toStringTag, { value: "Module" })), On = [];
325
- function It(i, e, t = On) {
326
- const n = O(null);
327
- return cn(i, () => {
324
+ }, detectIt: qt, focusableNodeNames: zn, toPrettyKeyCode: Ie }, Symbol.toStringTag, { value: "Module" })), Bn = [];
325
+ function Ne(i, t, e = Bn) {
326
+ const n = z(null);
327
+ return ln(i, () => {
328
328
  if (!n.current) return;
329
- const o = n.current, r = e?.();
329
+ const o = n.current, r = t?.();
330
330
  if (!r || typeof r != "object") throw new Error("attributes must return a plain object of values");
331
331
  const a = Object.keys(r), h = a.length;
332
332
  for (let s = 0; s < h; s++) {
@@ -334,711 +334,387 @@ function It(i, e, t = On) {
334
334
  Object.defineProperty(o, l, { value: c, writable: !0, configurable: !0, enumerable: !0 });
335
335
  }
336
336
  return o;
337
- }, t), n;
337
+ }, e), n;
338
338
  }
339
- const xt = (i) => L(ot, { ...i }), $n = ({ width: i, height: e }) => L("div", { className: "corner", style: { minWidth: `${i}px`, width: `${i}px`, minHeight: `${e}px`, height: `${e}px` } }), Kn = ye(Ce((i, e) => {
340
- const { children: t, viewport: n, onScrollViewport: o, showHorizontalScrollbar: r = !0, showVerticalScrollbar: a = !0, createScrollCorner: h = $n, createHorizontalScrollbar: s = xt, createVerticalScrollbar: l = xt, style: c, touchElement: u, disableTouch: d, ...f } = i, v = M(o, [o]), m = It(e, () => ({ isScrollPane: () => !0 }), []), b = O(null);
339
+ const xe = (i) => S(oe, { ...i }), On = ({ width: i, height: t }) => S("div", { className: "corner", style: { minWidth: `${i}px`, width: `${i}px`, minHeight: `${t}px`, height: `${t}px` } }), $n = gt(Lt((i, t) => {
340
+ const { children: e, viewport: n, onScrollViewport: o, showHorizontalScrollbar: r = !0, showVerticalScrollbar: a = !0, createScrollCorner: h = On, createHorizontalScrollbar: s = xe, createVerticalScrollbar: l = xe, style: c, touchElement: u, disableTouch: d, ...f } = i, v = D(o, [o]), g = Ne(t, () => ({ isScrollPane: () => !0 }), []), b = z(null);
341
341
  V(() => {
342
342
  b.current && (b.current.__scrollTop === n?.top && b.current.__scrollLeft === n?.left || b.current.__isDecelerating || b.current?.scrollTo(n?.left, n?.top, !1));
343
343
  }, [n?.left, n?.top, u]);
344
- const T = H((p, C) => {
345
- v?.({ left: p, top: C });
346
- }, []), _ = H((p) => {
344
+ const T = R((p, L) => {
345
+ v?.({ left: p, top: L });
346
+ }, []), _ = R((p) => {
347
347
  b.current?.doTouchStart(p.touches, p.timeStamp);
348
- }, []), w = H((p) => {
348
+ }, []), w = R((p) => {
349
349
  p.preventDefault(), b.current?.doTouchMove(p.touches, p.timeStamp);
350
- }, []), x = H((p) => {
350
+ }, []), x = R((p) => {
351
351
  b.current?.doTouchEnd(p.timeStamp);
352
- }, []), A = H(({ containerWidth: p, containerHeight: C, totalWidth: g, totalHeight: E }) => {
353
- b.current.setDimensions(p, C, g, E);
352
+ }, []), A = R(({ containerWidth: p, containerHeight: L, totalWidth: m, totalHeight: C }) => {
353
+ b.current.setDimensions(p, L, m, C);
354
354
  }, []);
355
355
  V(() => {
356
- const p = u ?? m.current;
357
- if (!d && Je().supportsTouchEvents && p && n) {
356
+ const p = u ?? g.current;
357
+ if (!d && qt().supportsTouchEvents && p && n) {
358
358
  if (!b.current) {
359
- const C = { scrollingX: !0, scrollingY: !0, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
360
- b.current = new En(T, C);
359
+ const L = { scrollingX: !0, scrollingY: !0, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
360
+ b.current = new Ln(T, L);
361
361
  }
362
- Je().supportsTouchEvents && (p.addEventListener("touchstart", _), p.addEventListener("touchend", x), p.addEventListener("touchmove", w)), A({ containerWidth: n?.width, containerHeight: n?.height, totalWidth: n?.totalWidth, totalHeight: n?.totalHeight });
362
+ qt().supportsTouchEvents && (p.addEventListener("touchstart", _), p.addEventListener("touchend", x), p.addEventListener("touchmove", w)), A({ containerWidth: n?.width, containerHeight: n?.height, totalWidth: n?.totalWidth, totalHeight: n?.totalHeight });
363
363
  }
364
364
  return () => {
365
365
  p?.removeEventListener("touchstart", _), p?.removeEventListener("touchend", x), p?.removeEventListener("touchmove", w);
366
366
  };
367
367
  }, [n?.width, n?.height, n?.totalWidth, n?.totalHeight, d, u]);
368
- const [P, { width: B }] = ge(), [K, { height: y }] = ge(), S = N(() => {
369
- const p = l({ orientation: se.Vertical, offset: n?.top, viewportSize: n?.height, totalSize: n?.totalHeight, onScrollOffset: (C) => {
370
- v?.({ top: C });
368
+ const [P, { width: I }] = mt(), [O, { height: y }] = mt(), E = K(() => {
369
+ const p = l({ orientation: st.Vertical, offset: n?.top, viewportSize: n?.height, totalSize: n?.totalHeight, onScrollOffset: (L) => {
370
+ v?.({ top: L });
371
+ } });
372
+ return S("div", { style: { display: "flex", flex: "0" }, ref: P, children: p });
373
+ }, [l, n?.top, n?.height, n?.totalHeight]), M = K(() => {
374
+ const p = s({ orientation: st.Horizontal, offset: n?.left, viewportSize: n?.width, totalSize: n?.totalWidth, onScrollOffset: (L) => {
375
+ v?.({ left: L });
371
376
  } });
372
- return L("div", { style: { display: "flex", flex: "0" }, ref: P, children: p });
373
- }, [l, n?.top, n?.height, n?.totalHeight]), z = N(() => {
374
- const p = s({ orientation: se.Horizontal, offset: n?.left, viewportSize: n?.width, totalSize: n?.totalWidth, onScrollOffset: (C) => v?.({ left: C }) });
375
- return Se("div", { style: { display: "flex", flex: "none", flexDirection: "row", alignItems: "stretch", justifyContent: "center" }, children: [L("div", { style: { display: "flex", flex: "1 1 100%", flexDirection: "column", width: `calc(100% - ${B}px)` }, children: L("div", { ref: K, className: "sizer", children: p }) }), a ? h({ width: B, height: y }) : L(ke, {})] });
376
- }, [s, n?.left, n?.width, n?.totalWidth, a, h, B, y]);
377
- return L("div", { style: { position: "relative", display: "flex", minWidth: a ? `${B}px` : void 0, minHeight: r ? `${y}px` : void 0, ...c }, ...f, ref: m, children: Se("div", { style: { position: "relative", width: "100%", flex: "1 1 100%", display: "flex", flexDirection: "column", boxSizing: "border-box" }, children: [Se("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: [L("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: t }), a ? S : L(ke, {})] }), r ? z : L(ke, {})] }) });
377
+ return bt("div", { style: { display: "flex", flex: "none", flexDirection: "row", alignItems: "stretch", justifyContent: "center" }, children: [S("div", { style: { display: "flex", flex: "1 1 100%", flexDirection: "column", width: `calc(100% - ${I}px)` }, children: S("div", { ref: O, className: "sizer", children: p }) }), a ? h({ width: I, height: y }) : S(St, {})] });
378
+ }, [s, n?.left, n?.width, n?.totalWidth, a, h, I, y]);
379
+ return S("div", { style: { position: "relative", display: "flex", minWidth: a ? `${I}px` : void 0, minHeight: r ? `${y}px` : void 0, ...c }, ...f, ref: g, children: bt("div", { style: { position: "relative", width: "100%", flex: "1 1 100%", display: "flex", flexDirection: "column", boxSizing: "border-box" }, children: [bt("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: [S("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: e }), a ? E : S(St, {})] }), r ? M : S(St, {})] }) });
378
380
  }));
379
- Kn.displayName = "ScrollPane";
380
- let ze = 0;
381
- function wo() {
382
- const [i, e] = q(!!document.fullscreenElement), t = H(() => {
381
+ $n.displayName = "ScrollPane";
382
+ let At = 0;
383
+ function bo() {
384
+ const [i, t] = J(!!document.fullscreenElement), e = R(() => {
383
385
  const n = document.fullscreenElement;
384
386
  return n ? n.querySelector(".fullscreen-portal-root") || n : document.body;
385
387
  }, []);
386
388
  return V(() => {
387
389
  function n() {
388
390
  const o = document.fullscreenElement;
389
- if (e(!!o), !o) return;
391
+ if (t(!!o), !o) return;
390
392
  let r = o.querySelector(".fullscreen-portal-root");
391
393
  r || (r = document.createElement("div"), r.className = "fullscreen-portal-root _fullscreen-portal-root_1mjsr_4", o.appendChild(r));
392
394
  }
393
- return ze++, n(), document.addEventListener("fullscreenchange", n), () => {
394
- document.removeEventListener("fullscreenchange", n), ze--, ze <= 0 && (document.querySelectorAll(".fullscreen-portal-root").forEach((o) => {
395
+ return At++, n(), document.addEventListener("fullscreenchange", n), () => {
396
+ document.removeEventListener("fullscreenchange", n), At--, At <= 0 && (document.querySelectorAll(".fullscreen-portal-root").forEach((o) => {
395
397
  o.parentNode && o.parentNode.removeChild(o);
396
- }), ze = 0);
398
+ }), At = 0);
397
399
  };
398
- }, []), { getPortalContainer: t, isFullscreen: i };
400
+ }, []), { getPortalContainer: e, isFullscreen: i };
399
401
  }
400
- const Rn = 100, In = 100, Nn = 1e6, Hn = 100, Vn = 50, Wn = ye(Ce((i, e) => {
401
- const { offset: t = 0, viewportSize: n = 0, totalSize: o = 0, minSize: r = 0, endGap: a = Rn, endScrollIncrement: h = In, style: s = Kt, onMouseDown: l, onScrollOffset: c, onScroll: u, scaleLimit: d = Nn, scaleFactor: f = Hn, precisionFactor: v = Vn, ...m } = i;
402
+ const Kn = 100, Rn = 100, In = 1e6, Nn = 100, Hn = 50, Vn = gt(Lt((i, t) => {
403
+ const { offset: e = 0, viewportSize: n = 0, totalSize: o = 0, minSize: r = 0, endGap: a = Kn, endScrollIncrement: h = Rn, style: s = Re, onMouseDown: l, onScrollOffset: c, onScroll: u, scaleLimit: d = In, scaleFactor: f = Nn, precisionFactor: v = Hn, ...g } = i;
402
404
  u && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
403
- const b = M(l, [l]), T = () => ({ offset: t, totalSize: d === 0 ? o : Math.min(o ?? 0, Math.max(r ?? 0, (t ?? 0) + (n ?? 0)) + (a ?? 0)) }), [_, w] = q(T), x = d !== 0 && _.totalSize > d ? f : 1, A = x / v, P = Math.ceil(_.totalSize / x), B = Math.ceil(_.offset / x), K = Math.ceil(n / x), y = H((k) => {
404
- }, []), [S, z] = q(!1), p = O(null);
405
- Ve(() => {
406
- if (!S) {
407
- p.current = { propTotalSize: o, propViewportSize: n, propOffset: t };
408
- const k = T();
409
- w(k);
410
- }
411
- }, [o, n, t, S, r, a, h]);
412
- const C = M((k, J, F) => {
413
- const j = p.current;
414
- p.current = null, j && j.propTotalSize === o && j.propViewportSize === n && j.propOffset === t || (Math.abs(k - B) < A && (k = B), c?.(k * x, B, K));
415
- }, [c, x, A, B, K]), g = H((k) => {
416
- document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", g), z(!1);
417
- }, []), E = H((k) => {
418
- b?.(k), z(!0), document.addEventListener("mousemove", y, { passive: !0 }), document.addEventListener("mouseup", g, { passive: !0 });
419
- }, [y, g]);
420
- return L(ot, { ref: e, style: { ...s }, ...m, offset: B, totalSize: P, viewportSize: K, onMouseDown: E, onScrollOffset: C });
405
+ const b = D(l, [l]), [T, _] = J(!1), w = z(null), x = K(() => {
406
+ const M = d === 0 ? o : Math.min(o ?? 0, Math.max(r ?? 0, (e ?? 0) + (n ?? 0)) + (a ?? 0)), p = d !== 0 && M > d ? f : 1, L = Math.ceil(M / p), m = { offset: Math.ceil(e / p), totalSize: L, viewportSize: Math.ceil(n / p), scaledOffset: e, scaledTotalSize: o, scaledViewportSize: n };
407
+ return w.current = T ? null : m, m;
408
+ }, [e, o, n, T, r, a, h]), A = d !== 0 && x.totalSize > d ? f : 1, P = A / v, I = D((M, p, L) => {
409
+ const m = w.current;
410
+ if (w.current = null, m && m.scaledTotalSize === o && m.scaledViewportSize === n && m.scaledOffset === e) return;
411
+ const C = x.offset;
412
+ Math.abs(M - C) < P && (M = C), c?.(M * A, C, x.viewportSize);
413
+ }, [c, A, P, x]), O = R((M) => {
414
+ }, []), y = R((M) => {
415
+ document.removeEventListener("mousemove", O), document.removeEventListener("mouseup", y), _(!1);
416
+ }, []), E = R((M) => {
417
+ _(!0), b?.(M), document.addEventListener("mousemove", O, { passive: !0 }), document.addEventListener("mouseup", y, { passive: !0 });
418
+ }, [O, y]);
419
+ return S(oe, { ref: t, style: s, ...g, offset: x.offset, totalSize: x.totalSize, viewportSize: x.viewportSize, onMouseDown: E, onScrollOffset: I });
421
420
  }));
422
- Wn.displayName = "VirtualScrollbar";
423
- const bo = { BottomEnd: "bottom-end", BottomStart: "bottom-start", Bottom: "bottom", LeftEnd: "left-end", LeftStart: "left-start", Left: "left", RightEnd: "right-end", RightStart: "right-start", Right: "right", TopEnd: "top-end", TopStart: "top-start", Top: "top" };
424
- function Ye(i, e) {
425
- if (typeof i == "function") return i(e);
426
- i && (i.current = e);
421
+ Vn.displayName = "VirtualScrollbar";
422
+ const So = { BottomEnd: "bottom-end", BottomStart: "bottom-start", Bottom: "bottom", LeftEnd: "left-end", LeftStart: "left-start", Left: "left", RightEnd: "right-end", RightStart: "right-start", Right: "right", TopEnd: "top-end", TopStart: "top-start", Top: "top" };
423
+ function Ft(i, t) {
424
+ if (typeof i == "function") return i(t);
425
+ i && (i.current = t);
427
426
  }
428
- var Ne = parseInt(hn.split(".")[0], 10) >= 19 ? function(i) {
429
- return (e) => {
430
- const t = [];
427
+ var It = parseInt(an.split(".")[0], 10) >= 19 ? function(i) {
428
+ return (t) => {
429
+ const e = [];
431
430
  for (const n of i) {
432
- const o = Ye(n, e), r = typeof o == "function";
433
- t.push(r ? o : () => Ye(n, null));
431
+ const o = Ft(n, t), r = typeof o == "function";
432
+ e.push(r ? o : () => Ft(n, null));
434
433
  }
435
434
  return () => {
436
- for (const n of t) n();
435
+ for (const n of e) n();
437
436
  };
438
437
  };
439
438
  } : function(i) {
440
- return (e) => {
441
- for (const t of i) Ye(t, e);
439
+ return (t) => {
440
+ for (const e of i) Ft(e, t);
442
441
  };
443
442
  };
444
- const So = ye(Ce((i, e) => {
445
- const { refFocusStart: t, ...n } = i, o = O(null), r = H(() => {
446
- if (t) return void t?.current?.focus();
443
+ const Eo = gt(Lt((i, t) => {
444
+ const { refFocusStart: e, ...n } = i, o = z(null), r = R(() => {
445
+ if (e) return void e?.current?.focus();
447
446
  const a = o.current.parentElement.children;
448
447
  let h = [];
449
- for (let s = 0; s < a.length && a[s] !== o.current; s++) {
450
- const l = a[s].getAttribute("tabindex");
451
- if (l == null || l === "-1" || a[s].getAttribute("disabled") === "true") continue;
452
- const c = a[s];
453
- c.focus && h.push({ tabindex: parseInt(l), child: c });
448
+ const s = a.length;
449
+ for (let l = 0; l < s && a[l] !== o.current; l++) {
450
+ const c = a[l], u = c.getAttribute("tabindex");
451
+ u == null || u === "-1" || c.getAttribute("disabled") !== "true" && c.focus && h.push({ tabindex: parseInt(u), child: c });
454
452
  }
455
- h.length !== 0 && (h.sort(function(s, l) {
456
- return s.tabindex - l.tabindex;
453
+ h.length !== 0 && (h.sort(function(l, c) {
454
+ return l.tabindex - c.tabindex;
457
455
  }), h[0].child.focus());
458
- }, [t]);
459
- return L("div", { tabIndex: 0, ref: Ne([o, e]), onFocus: r, ...n });
460
- })), Lo = ye(Ce((i, e) => {
461
- const { className: t, style: n, children: o, radius: r = 4, strokeWidth: a = 1, strokeColor: h = "grey", ...s } = i, [l, { width: c, height: u }] = ge(), d = O(null), f = (T, _ = 0) => {
456
+ }, [e]);
457
+ return S("div", { tabIndex: 0, ref: It([o, t]), onFocus: r, ...n });
458
+ })), Lo = gt(Lt((i, t) => {
459
+ const { className: e, style: n, children: o, radius: r = 4, strokeWidth: a = 1, strokeColor: h = "grey", ...s } = i, [l, { width: c, height: u }] = mt(), d = z(null), f = (T, _ = 0) => {
462
460
  const w = T / 2, x = u - w + _;
463
- return (function(A, P, B = !1) {
461
+ return (function(A, P, I = !1) {
464
462
  if (P === 0) return A;
465
- function K(g, E, k) {
466
- let J = E.x - g.x, F = E.y - g.y, j = Math.sqrt(J * J + F * F);
467
- return y(g, E, Math.min(1, k / j));
463
+ function O(m, C, N) {
464
+ let Q = C.x - m.x, j = C.y - m.y, tt = Math.sqrt(Q * Q + j * j);
465
+ return y(m, C, Math.min(1, N / tt));
468
466
  }
469
- function y(g, E, k) {
470
- return { x: g.x + (E.x - g.x) * k, y: g.y + (E.y - g.y) * k };
467
+ function y(m, C, N) {
468
+ return { x: m.x + (C.x - m.x) * N, y: m.y + (C.y - m.y) * N };
471
469
  }
472
- function S(g, E) {
473
- g.length > 2 && (g[g.length - 2] = E.x, g[g.length - 1] = E.y);
470
+ function E(m, C) {
471
+ m.length > 2 && (m[m.length - 2] = C.x, m[m.length - 1] = C.y);
474
472
  }
475
- function z(g) {
476
- return { x: parseFloat(g[g.length - 2]), y: parseFloat(g[g.length - 1]) };
473
+ function M(m) {
474
+ return { x: parseFloat(m[m.length - 2]), y: parseFloat(m[m.length - 1]) };
477
475
  }
478
- let p = A.split(/[,\s]/).reduce(function(g, E) {
479
- let k = E.match("([a-zA-Z])(.+)");
480
- return k ? (g.push(k[1]), g.push(k[2])) : g.push(E), g;
481
- }, []).reduce(function(g, E) {
482
- return parseFloat(E) == E && g.length ? g[g.length - 1].push(E) : g.push([E]), g;
483
- }, []), C = [];
476
+ let p = A.split(/[,\s]/).reduce(function(m, C) {
477
+ let N = C.match("([a-zA-Z])(.+)");
478
+ return N ? (m.push(N[1]), m.push(N[2])) : m.push(C), m;
479
+ }, []).reduce(function(m, C) {
480
+ return parseFloat(C) == C && m.length ? m[m.length - 1].push(C) : m.push([C]), m;
481
+ }, []), L = [];
484
482
  if (p.length > 1) {
485
- let g = z(p[0]), E = null;
486
- p[p.length - 1][0] === "Z" && p[0].length > 2 && (E = ["L", g.x, g.y], p[p.length - 1] = E), C.push(p[0]);
487
- for (let k = 1; k < p.length; k++) {
488
- let J = C[C.length - 1], F = p[k], j = F === E ? p[1] : p[k + 1];
489
- if (j && J && J.length > 2 && F[0] === "L" && j.length > 2 && j[0] === "L") {
490
- let Y, $, W = z(J), X = z(F), ne = z(j);
491
- B ? (Y = y(X, J.origPoint || W, P), $ = y(X, j.origPoint || ne, P)) : (Y = K(X, W, P), $ = K(X, ne, P)), S(F, Y), F.origPoint = X, C.push(F);
492
- let ve = y(Y, X, 0.5), xe = y(X, $, 0.5), R = ["C", ve.x, ve.y, xe.x, xe.y, $.x, $.y];
493
- R.origPoint = X, C.push(R);
494
- } else C.push(F);
483
+ let m = M(p[0]), C = null;
484
+ p[p.length - 1][0] === "Z" && p[0].length > 2 && (C = ["L", m.x, m.y], p[p.length - 1] = C), L.push(p[0]);
485
+ for (let N = 1; N < p.length; N++) {
486
+ let Q = L[L.length - 1], j = p[N], tt = j === C ? p[1] : p[N + 1];
487
+ if (tt && Q && Q.length > 2 && j[0] === "L" && tt.length > 2 && tt[0] === "L") {
488
+ let F, B, W = M(Q), Y = M(j), yt = M(tt);
489
+ I ? (F = y(Y, Q.origPoint || W, P), B = y(Y, tt.origPoint || yt, P)) : (F = O(Y, W, P), B = O(Y, yt, P)), E(j, F), j.origPoint = Y, L.push(j);
490
+ let vt = y(F, Y, 0.5), $ = y(Y, B, 0.5), et = ["C", vt.x, vt.y, $.x, $.y, B.x, B.y];
491
+ et.origPoint = Y, L.push(et);
492
+ } else L.push(j);
495
493
  }
496
- if (E) {
497
- let k = z(C[C.length - 1]);
498
- C.push(["Z"]), S(C[0], k);
494
+ if (C) {
495
+ let N = M(L[L.length - 1]);
496
+ L.push(["Z"]), E(L[0], N);
499
497
  }
500
- } else C = p;
501
- return C.reduce(function(g, E) {
502
- return g + E.join(" ") + " ";
498
+ } else L = p;
499
+ return L.reduce(function(m, C) {
500
+ return m + C.join(" ") + " ";
503
501
  }, "");
504
502
  })(`${`M 0 ${w} L ${r - 0.5} ${w} L ${r - 0.5} ${x} L ${2 * r} ${x}`} ${`L ${c - 2 * r} ${x}`} ${`M ${c - 2 * r} ${x} L ${c - r} ${x} L ${c - r} ${w} L ${c} ${w}`}`, r);
505
- }, v = N(() => f(a), [c, u, r, a]), m = N(() => {
503
+ }, v = K(() => f(a), [c, u, r, a]), g = K(() => {
506
504
  if (r === 0) return;
507
505
  const T = r / 2;
508
506
  return f(r) + `L ${c} 0 L 0 0 L 0 ${T}`;
509
- }, [v, r, a]), b = N(() => ({ style: { clipPath: `path('${m}')` } }), [m]);
510
- return Se("div", { className: t, style: { display: "flex", flexDirection: "row", ...n }, ...s, ref: Ne([d, l, e]), children: [ie.isValidElement(o) ? ie.cloneElement(o, b) : L(ke, {}), L("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: c, height: u, viewBox: `0 0 ${c} ${u}`, children: L("path", { d: v, stroke: h, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: a }) })] });
511
- })), Fn = {}, jn = (i) => {
512
- const { onPointerDown: e, style: t, splitDirection: n, paddingBefore: o = 0, paddingAfter: r = 0, disabled: a, key: h, hitAreaProps: s = Fn, ...l } = i, c = n === "row", { style: u, className: d, ...f } = s;
513
- return L("div", { style: { ...t, position: "relative" }, ...l, children: L("div", { className: we("hit-box", d), style: { left: (c ? -o : 0) + "px", width: `calc(100% + ${c ? o + r : 0}px)`, top: (c ? 0 : -o) + "px", height: `calc(100% + ${c ? 0 : o + r}px)`, position: "absolute", ...u }, onPointerDown: a ? void 0 : e, ...f }) }, h);
514
- }, Be = {}, _e = (i, e, t = !0) => i === null ? null : i.pixels !== null ? t ? i.pixels : e - i.pixels : (t ? i.percent : 100 - i.percent) / 100 * e, Oe = (i, e = !0) => i?.percent ? `${e ? i.percent : 100 - i.percent}%` : i?.pixels ? `${i.pixels}px` : void 0, de = (i, e) => {
515
- if (i == null) return null;
516
- const t = { percent: null, pixels: null };
517
- let n = e;
518
- return typeof i == "string" && ((i = i.trim().toLowerCase()).endsWith("px") ? (i = i.substring(0, i.length - 2), n = !1) : i.endsWith("%") && (i = i.substring(0, i.length - 1), n = !0), i = parseFloat(i)), n ? t.percent = i : t.pixels = i, Object.freeze(t);
519
- }, Co = ye(Ce((i, e) => {
520
- const { elementBefore: t, elementAfter: n, splitDirection: o = "row", fixedPane: r = null, position: a, onPositionChange: h, minBefore: s, maxBefore: l, minAfter: c, maxAfter: u, children: d, className: f, style: v, disabled: m = !1, onDragStart: b, onDragResize: T, onDragFinish: _, resizerProps: w = Be, paneProps: x = Be, paneBeforeProps: A = Be, paneAfterProps: P = Be, createResizer: B = jn } = i;
521
- if (d) throw new Error("Use elementBefore and elementAfter instead of children.");
522
- const K = N(() => ie.isValidElement(n) && ie.isValidElement(t), [n, t]), y = N(() => {
523
- let D = null;
524
- r && (r === "before" ? D = 0 : r === "after" && (D = 1));
525
- const I = D === null;
526
- return { fixedPaneOffset: D, isPercent: I, minBefore: de(s, I), maxBefore: de(l, I), minAfter: de(c, I), maxAfter: de(u, I) };
527
- }, [s, l, c, u]), S = M(h, [h]), [z, p] = q(() => de(a, r === null));
528
- V(() => {
529
- p(de(a, r === null));
530
- }, [a, r]);
531
- const [C, { width: g, height: E }] = ge(), [k, { width: J, height: F }] = ge(), j = o === "row" ? J : F, Y = o === "row" ? g : E, $ = N(() => ((D, I, Q, U) => {
532
- const ce = [null, null], oe = [null, null];
533
- if (D || (D = { percent: U.fixedPaneOffset === null ? 50 : null, pixels: U.fixedPaneOffset === null ? null : 0 }), I === 0) return D?.pixels != null ? U.fixedPaneOffset !== 1 ? (ce[0] = D?.pixels, oe[1] = 100) : (ce[1] = D?.pixels - Q, oe[0] = 100) : D?.percent != null && (U.fixedPaneOffset !== 1 ? (oe[0] = D?.percent, oe[1] = 100 - D?.percent) : (oe[1] = D?.percent, oe[0] = 100 - D?.percent)), { percents: oe, pixels: ce, minBefore: Oe(U.minBefore, !0), maxBefore: Oe(U.maxBefore, !0), minAfter: Oe(U.minAfter), maxAfter: Oe(U.maxAfter) };
534
- let ue = _e(D, I, U.fixedPaneOffset !== 1), te = I - Q, ut = _e(U.minBefore, te, !0) ?? 0, ln = _e(U.maxBefore, te, !0) ?? te, Ae = 0, We = 0, dt = 0, pt = te;
535
- Ae = (_e(U.maxAfter, I, !1) ?? Q) - Q, We = _e(U.minAfter, I, !1) ?? I, dt = Math.max(ut, Ae), pt = Math.min(ln, We), ue = Math.max(dt, Math.min(ue, pt)), We = Math.min(te - ue, _e(U.maxAfter, te - ue, !0) ?? te), Ae = Math.min(te - ue, _e(U.minAfter, te - ue, !0) ?? te), ce[0] = ue, ce[1] = te - ce[0];
536
- const an = Math.max(0, Math.min(100, ue / te * 100));
537
- return oe[0] = an, oe[1] = 100 - oe[0], { percents: oe, pixels: ce, minBefore: `${ut}px`, minAfter: `${Ae}px`, maxBefore: `${ce[0]}px`, maxAfter: `${ce[1]}px` };
538
- })(z, Y, j, y), [y, z, Y, j, o]), [W, X] = q(!1), ne = M(b, [b]), ve = M(T, [T]), xe = M(_, [_]), R = O(null), le = O(null), re = O(null), { style: fe, className: ae, ...he } = x, Ee = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", display: "flex", overflow: "hidden", ...fe }, { className: Yt, style: Xt, ...Ut } = A, { className: Gt, style: Zt, ...qt } = P, Jt = { flex: "1 1 100%", width: "100%", ...v, flexDirection: o, display: "flex" }, { className: rt, style: st, onPointerDown: lt, ...at } = w, Qt = M((D) => {
539
- const I = de(D, r === null);
540
- p(I);
541
- }, [r]), De = M((D) => {
542
- if (m || !W) return;
543
- const I = ht.current?.getBoundingClientRect();
544
- let Q = 0;
545
- Q = o === "row" ? (D.clientX ?? D.touches?.[0]?.clientX) - I.x : (D.clientY ?? D.touches?.[0]?.clientY) - I.y, Q = Math.max(0, Math.min(Y, Q)), y.fixedPaneOffset === 1 && (Q = Y - Q), a && z.pixels === Q || p({ pixels: Q, percent: null }), ve?.(Q), D.stopPropagation(), D.preventDefault();
546
- }, [y, o, m, W, z, Y]), ct = M((D) => {
547
- if (document.removeEventListener("pointermove", De), document.removeEventListener("touchmove", De), document.removeEventListener("pointerup", ct), !!W && (X(!1), !!z)) {
548
- if (xe(z.pixels), !de(a, r === null) || z.pixels !== a) {
549
- const I = { ...z };
550
- I.percent === null && (I.percent = I.pixels / Y * 100), S(I);
551
- }
552
- D.stopPropagation(), D.preventDefault();
553
- }
554
- }, [z, W, a, r, Y]), en = M((D) => {
555
- lt?.(D), D.defaultPrevented || m || W || (X(!0), ne(), document.addEventListener("pointermove", De, { passive: !1 }), document.addEventListener("touchmove", De, { passive: !1 }), document.addEventListener("pointerup", ct, { passive: !1 }));
556
- }, [lt]), ht = It(e, () => ({ setPosition: Qt, isSplitPane: () => !0 }), []), tn = N(() => K ? B?.({ key: "resizer", ref: Ne([k, le]), className: we("resizer", rt), onPointerDownCapture: en, style: { cursor: m ? void 0 : o === "row" ? "ew-resize" : "ns-resize", minWidth: o === "row" ? "2px" : void 0, minHeight: o !== "row" ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...st }, splitDirection: o, disabled: m, ...at }) : null, [K, rt, at, o, st, m]), Pe = o === "row" ? "Width" : "Height", nn = { ...Ee, ...Xt, flex: y.fixedPaneOffset === 0 && $?.pixels[0] !== null ? `0 0 ${Math.round($?.pixels[0])}px` : `1 1 ${Math.round($?.percents[0] ?? 100)}%`, [`min${Pe}`]: $?.minBefore, [`max${Pe}`]: n ? $?.maxBefore : "100%" }, on = { ...Ee, ...Zt, flex: y.fixedPaneOffset === 1 && $?.pixels[1] !== null ? `0 0 ${Math.round($?.pixels[1])}px` : `1 1 ${Math.round($?.percents[1] ?? 100)}%`, [`min${Pe}`]: $?.minAfter, [`max${Pe}`]: t ? $?.maxAfter : "100%" }, rn = N(() => t ? L("div", { ref: R, className: we("before", ae, Yt), style: nn, ...he, ...Ut, children: t }, "before") : null, [t, x, A, y, $]), sn = N(() => n ? L("div", { ref: re, className: we("after", ae, Gt), style: on, ...he, ...qt, children: n }, "after") : null, [n, x, P, y, $]);
557
- return Se("div", { ref: Ne([C, ht]), className: we("splitPane", o === "row" ? "vertical" : "horizontal", { dragging: W }, f), style: Jt, children: [rn, tn, sn] });
558
- }));
559
- function Yn(i) {
560
- if (typeof i == "function") return i;
561
- if (typeof i == "string") {
562
- const e = i.trim();
563
- if (e.startsWith("data:image/svg+xml")) {
564
- const t = (function(n) {
565
- const o = /^data:image\/svg\+xml(;[^,]*)?,(.*)$/i.exec(n.trim());
566
- if (!o) return null;
567
- const r = o[1] || "", a = o[2] || "";
568
- try {
569
- if (/;base64/i.test(r)) {
570
- if (typeof atob < "u") {
571
- const h = atob(a);
572
- if (typeof TextDecoder < "u") {
573
- const l = new Uint8Array(h.length);
574
- for (let c = 0; c < h.length; c++) l[c] = h.charCodeAt(c);
575
- return new TextDecoder("utf-8").decode(l);
576
- }
577
- let s = "";
578
- for (let l = 0; l < h.length; l++)
579
- s += `%${h.charCodeAt(l).toString(16).padStart(2, "0")}`;
580
- return decodeURIComponent(s);
581
- }
582
- return (globalThis.Buffer ? globalThis.Buffer.from(a, "base64") : require("buffer").Buffer.from(a, "base64")).toString("utf-8");
583
- }
584
- try {
585
- return decodeURIComponent(a);
586
- } catch {
587
- return a;
588
- }
589
- } catch {
590
- return null;
591
- }
592
- })(e);
593
- if (t) return St(t);
594
- }
595
- if (e.startsWith("<")) {
596
- if (/^<\s*svg\b/i.test(e)) return St(e);
597
- if (/^<\s*path\b/i.test(e)) {
598
- const t = wt(e);
599
- if (t) return { paths: [{ d: t }] };
600
- }
601
- return { paths: [{ d: e }] };
602
- }
603
- return { paths: [{ d: e }] };
604
- }
605
- if (Array.isArray(i)) {
606
- const e = [];
607
- for (const t of i) if (typeof t == "string") {
608
- const n = String(t).trim();
609
- if (n.startsWith("<path")) {
610
- const o = wt(n);
611
- o && e.push({ d: o });
612
- } else e.push({ d: n });
613
- } else t && typeof t == "object" && "d" in t && typeof t.d == "string" && e.push({ ...t });
614
- return { paths: e };
615
- }
616
- return i;
617
- }
618
- function wt(i) {
619
- const e = /\bd\s*=\s*(?:"([^"]+)"|'([^']+)')/i.exec(i);
620
- return e ? e[1] ?? e[2] ?? null : null;
621
- }
622
- function bt(i) {
623
- if ("svg" in i) return { ...i, svg: Yn(i.svg) };
624
- if ("url" in i) {
625
- const e = typeof i.url == "string" ? { src: i.url } : i.url;
626
- return { ...i, url: e };
627
- }
628
- if ("emoji" in i) {
629
- const e = typeof i.emoji == "string" ? i.emoji : i.emoji.text;
630
- return { ...i, emoji: e };
631
- }
632
- return i;
633
- }
634
- function St(i) {
635
- try {
636
- if (typeof DOMParser < "u") {
637
- const a = new DOMParser().parseFromString(i, "image/svg+xml"), h = a.querySelector("svg"), s = h?.getAttribute("viewBox") ?? void 0, l = [];
638
- return a.querySelectorAll("path").forEach((c) => {
639
- const u = c.getAttribute("d");
640
- if (!u) return;
641
- const d = { d: u }, f = c.getAttribute("class");
642
- f && (d.className = f);
643
- const v = c.getAttribute("fill");
644
- v && v !== "none" && (d.fill = v);
645
- const m = c.getAttribute("stroke");
646
- m && (d.stroke = m);
647
- const b = c.getAttribute("opacity");
648
- b && (d.opacity = Number(b));
649
- const T = c.getAttribute("fill-rule");
650
- T && (d.fillRule = T);
651
- const _ = c.getAttribute("clip-rule");
652
- _ && (d.clipRule = _), l.push(d);
653
- }), { viewBox: s, paths: l };
654
- }
655
- } catch {
656
- }
657
- const e = i.match(/viewBox="([^"]+)"/i), t = e ? e[1] : void 0, n = [], o = /<path\b[^>]*\sd="([^"]+)"[^>]*>/gi;
658
- let r;
659
- for (; r = o.exec(i); ) n.push({ d: r[1] });
660
- return { viewBox: t, paths: n };
661
- }
662
- function Lt(i) {
663
- const e = {};
664
- for (const [r, a] of Object.entries(i.icons)) e[r] = bt(a);
665
- const t = { label: i.meta?.label ?? "Unnamed", version: i.meta?.version ?? "1.0.0", license: i.meta?.license ?? "MIT", defaultViewBox: "0 0 24 24", extends: i.meta?.extends ?? [] };
666
- t.extends.includes("base") || t.extends.push("base");
667
- const n = { meta: t, icons: e }, o = i.overrides;
668
- if (o) {
669
- const r = {};
670
- for (const [a, h] of Object.entries(o)) {
671
- const s = {};
672
- for (const [l, c] of Object.entries(h)) s[l] = bt(c);
673
- r[a] = s;
674
- }
675
- n.__overrides = r;
676
- }
677
- return n;
678
- }
679
- function Xn() {
680
- const i = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
681
- let t = "base", n = /* @__PURE__ */ new Map();
682
- async function o(s) {
683
- const l = i.get(s ?? t);
684
- if (!l) throw new Error(`Icon pack not registered: ${s}`);
685
- if (!l.pack) {
686
- if (!l.loading) {
687
- if (!l.loader) throw new Error(`No loader for icon pack: ${s}`);
688
- l.loading = l.loader().then((c) => {
689
- const u = c && typeof c == "object" && "default" in c ? c.default : c;
690
- l.pack = Lt(u);
691
- }).catch((c) => {
692
- throw l.loading = void 0, c;
693
- });
694
- }
695
- await l.loading;
696
- }
697
- }
698
- function r(s) {
699
- const l = s.indexOf(":");
700
- return l > 0 ? { ns: s.slice(0, l), key: s.slice(l + 1) } : { key: s };
701
- }
702
- function a(s, l) {
703
- const c = [s, ...i.get(s)?.pack?.meta.extends ?? []];
704
- for (const u of c) {
705
- const d = i.get(u);
706
- if (!d?.pack) continue;
707
- const { icons: f } = d.pack, v = f[e.get(u)?.get(l) ?? l] ?? f[l];
708
- if (v) return { glyph: v, pack: d.pack, packKey: u };
709
- }
710
- return null;
711
- }
712
- function h(s, l) {
713
- const c = l?.packKey ?? t;
714
- if (l?.packKey) return a(l.packKey, s);
715
- if (!s) return null;
716
- const { ns: u, key: d } = r(s);
717
- if (u) {
718
- const f = i.get(u)?.pack;
719
- if (f) {
720
- if (i.get(t)?.pack) {
721
- const m = f.__overrides, b = m?.[t]?.[d];
722
- if (b) return { glyph: b, pack: f, packKey: u };
723
- }
724
- const v = a(u, d);
725
- if (v) return v;
726
- }
727
- return null;
728
- }
729
- return a(c, s);
730
- }
731
- return { register: function(s, l) {
732
- const c = i.get(s) ?? {};
733
- typeof l == "function" ? c.loader = l : c.pack = Lt(l), i.set(s, c), t || (t = s);
734
- }, prefetch: async function(s = t) {
735
- const l = Array.isArray(s) ? s : [s];
736
- await Promise.all(l.map(o));
737
- }, setActive: function(s) {
738
- t = s;
739
- for (const l of n.keys()) try {
740
- l(s);
741
- } catch {
742
- }
743
- }, getActive: function() {
744
- return t;
745
- }, resolve: async function(s, l) {
746
- let c = h(s, l);
747
- if (c) return c;
748
- const u = l?.packKey ?? t, { ns: d } = r(s);
749
- if (l?.packKey) {
750
- if (await o(u), c = h(s, l), c) return c;
751
- const f = i.get(u)?.pack?.meta?.extends ?? [];
752
- if (f.length && (await Promise.all(f.map(o)), c = h(s, l), c)) return c;
753
- } else if (d) {
754
- if (await o(d), c = h(s, l), c) return c;
755
- const f = i.get(d)?.pack?.meta?.extends ?? [];
756
- if (f.length && (await Promise.all(f.map(o)), c = h(s, l), c)) return c;
757
- } else {
758
- if (await o(u), c = h(s, l), c) return c;
759
- const f = i.get(u)?.pack?.meta?.extends ?? [];
760
- if (f.length && (await Promise.all(f.map(o)), c = h(s, l), c)) return c;
761
- }
762
- return null;
763
- }, registerAlias: function(s, l, c) {
764
- e.has(s) || e.set(s, /* @__PURE__ */ new Map()), e.get(s).set(l, c);
765
- }, has: function(s, l) {
766
- return !!h(s, l);
767
- }, getPack: function(s) {
768
- return i.get(s ?? t)?.pack;
769
- }, hasPack: function(s) {
770
- return !!i.get(s)?.pack;
771
- }, listPacks: function() {
772
- return Array.from(i.keys());
773
- }, listIcons: function(s) {
774
- const l = i.get(s)?.pack;
775
- return l ? Object.keys(l.icons) : [];
776
- }, addActiveListener: function(s) {
777
- const l = n.get(s);
778
- if (l) return l;
779
- const c = () => {
780
- n.delete(s);
781
- };
782
- return n.set(s, c), c;
783
- } };
784
- }
785
- const Ke = Xn();
786
- Ke.register("base", () => import("./CxY-6HIFmPob67ga.mjs"));
787
- const Ct = (i) => L("svg", { ...i, children: L("path", {}) }), Un = { Icon: "_Icon_1ipwo_10" }, Gn = ye((i) => {
788
- const { iconKey: e, packKey: t, className: n, style: o, role: r, title: a, size: h, ariaHidden: s, sourceProps: l, children: c, ...u } = i, [d, f] = ie.useState(null);
789
- ie.useEffect(() => {
790
- let p = !0, C = t, g = e;
791
- if (!g) {
792
- const E = Ke.getPack(C);
793
- return void f({ glyph: E ? { svg: Z.EmptyArray } : void 0, pack: E ?? void 0, packKey: C ?? Ke.getActive() });
794
- }
795
- if (g.includes(":")) {
796
- const [E, k] = g.split(":");
797
- C = E, g = k;
798
- }
799
- return Ke.resolve(g, { packKey: C }).then((E) => {
800
- p && f(E);
801
- }), () => {
802
- p = !1;
803
- };
804
- }, [e, t]);
805
- const v = d?.pack, m = d?.glyph, b = d?.packKey;
806
- let T = m ? m.svg : void 0;
807
- const _ = m && !T ? m.url : void 0, w = !m || T || _ ? void 0 : m.emoji, x = h != null ? typeof h == "number" ? `${h}px` : h : void 0, A = N(() => [Un.Icon, "icon", n].filter(Boolean).join(" "), [n]), P = N(() => {
808
- const p = { ...o };
809
- return p["--icon-size"] = x, p;
810
- }, [o, x]), B = r ?? (a ? "img" : "presentation"), K = s ?? (!a || void 0), y = (p) => L("span", { className: A, style: P, role: B, "aria-hidden": K, title: a, "data-icon-glyph": e, "data-icon-pack": b, ...u, children: p });
811
- if (c) return y(c);
812
- if (w) return y(L("span", { children: typeof w == "string" ? w : w.text }));
813
- if (_) return y(L("img", { src: _.src, alt: a ?? "" }));
814
- if (m && "react" in m) {
815
- const p = m.react, C = { className: A, style: P, role: B, "aria-hidden": K, title: a, ...u, ...l };
816
- return y(L(p, { ...C }));
817
- }
818
- const S = { viewBox: T?.viewBox ?? v?.meta.defaultViewBox ?? "0 0 24 24" };
819
- if (typeof T == "function")
820
- return y(T(S) ?? L(Ct, { ...S }));
821
- if (!T) return y(L(Ct, { ...S }));
822
- const z = T.paths;
823
- return y(L("svg", { ...S, children: z ? z.map((p, C) => L("path", { d: p.d, className: p.className, fill: p.fill, stroke: p.stroke, opacity: p.opacity, fillRule: p.fillRule, clipRule: p.clipRule }, C)) : null }));
824
- });
825
- function Eo(i) {
826
- const { isWalking: e = !1, themedType: t = "info", speed: n = 120, dashGap: o = 3, dashLength: r = 5, iconKey: a, packKey: h, style: s, className: l, ...c } = i, u = N(() => {
827
- if (!e) return;
828
- const f = { "--walk-duration": `${n * (o + r)}ms`, "--walk-dash-length": `${r}px`, "--walk-dash-gap": `${o}px` };
829
- return t && t !== "accent" && (f["--icon-accent"] = `var(--icon-${t})`), f;
830
- }, [e, n, o, r, t]), d = N(() => e ? l + " walking" : l, [e, l]);
831
- return L(Gn, { iconKey: a, packKey: h, className: d, style: { ...s, ...u }, ...c });
832
- }
833
- const Et = { Default: "default", Error: "error", Success: "success", Warning: "warning", Info: "info" };
834
- class Zn extends _n {
835
- setOverrides(e) {
836
- super.setOverrides(e);
507
+ }, [v, r, a]), b = K(() => ({ style: { clipPath: `path('${g}')` } }), [g]);
508
+ return bt("div", { className: e, style: { display: "flex", flexDirection: "row", ...n }, ...s, ref: It([d, l, t]), children: [it.isValidElement(o) ? it.cloneElement(o, b) : S(St, {}), S("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: c, height: u, viewBox: `0 0 ${c} ${u}`, children: S("path", { d: v, stroke: h, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: a }) })] });
509
+ })), be = { Default: "default", Error: "error", Success: "success", Warning: "warning", Info: "info" };
510
+ class Wn extends fn {
511
+ setOverrides(t) {
512
+ super.setOverrides(t);
837
513
  }
838
514
  getDelegate() {
839
515
  return this._overrides;
840
516
  }
841
- showMessage(e, t) {
517
+ showMessage(t, e) {
842
518
  const n = this.getDelegate();
843
- if (n?.showMessage) return n.showMessage(e, t);
844
- t?.type !== Et.Warning ? t?.type !== Et.Error ? me.log(e) : me.error(e) : me.warn(e);
519
+ if (n?.showMessage) return n.showMessage(t, e);
520
+ e?.type !== be.Warning ? e?.type !== be.Error ? _t.log(t) : _t.error(t) : _t.warn(t);
845
521
  }
846
- showBusy(e, t) {
522
+ showBusy(t, e) {
847
523
  const n = this.getDelegate();
848
- return n?.showBusy ? n.showBusy(e, t) : new Promise((o) => {
524
+ return n?.showBusy ? n.showBusy(t, e) : new Promise((o) => {
849
525
  o(() => {
850
526
  });
851
527
  });
852
528
  }
853
- showWindow(e, t, n) {
529
+ showWindow(t, e, n) {
854
530
  const o = this.getDelegate();
855
- if (o?.showWindow) return o.showWindow(e, t, n);
531
+ if (o?.showWindow) return o.showWindow(t, e, n);
856
532
  }
857
- showError(e) {
858
- const t = this.getDelegate();
859
- t?.showError ? t.showError(e) : me.error(e);
533
+ showError(t) {
534
+ const e = this.getDelegate();
535
+ e?.showError ? e.showError(t) : _t.error(t);
860
536
  }
861
- showOptions(e) {
862
- const t = this.getDelegate();
863
- return t?.showOptions ? t.showOptions(e) : Promise.resolve("");
537
+ showOptions(t) {
538
+ const e = this.getDelegate();
539
+ return e?.showOptions ? e.showOptions(t) : Promise.resolve("");
864
540
  }
865
- showInputOptions(e) {
866
- const t = this.getDelegate();
867
- return t?.showInputOptions ? t.showInputOptions(e) : Promise.resolve({ input: "", option: "" });
541
+ showInputOptions(t) {
542
+ const e = this.getDelegate();
543
+ return e?.showInputOptions ? e.showInputOptions(t) : Promise.resolve({ input: "", option: "" });
868
544
  }
869
545
  }
870
- const Nt = un(new Zn()), To = ({ children: i, notifier: e }) => (ie.useEffect(() => {
871
- const t = me.getOverrides();
872
- return me.setOverrides(e), () => {
873
- me.setOverrides(t);
546
+ const He = cn(new Wn()), Co = ({ children: i, notifier: t }) => (it.useEffect(() => {
547
+ const e = _t.getOverrides();
548
+ return _t.setOverrides(t), () => {
549
+ _t.setOverrides(e);
874
550
  };
875
- }, [e]), ie.createElement(Nt.Provider, { value: e }, i)), Ht = () => dn(Nt);
876
- function Mo(i) {
877
- const [e, t] = q(typeof window < "u" ? window.devicePixelRatio : 1), n = O(null);
551
+ }, [t]), it.createElement(He.Provider, { value: t }, i)), Ht = () => hn(He);
552
+ function To(i) {
553
+ const [t, e] = J(typeof window < "u" ? window.devicePixelRatio : 1), n = z(null);
878
554
  return V(() => {
879
555
  if (!(typeof window < "u" && "matchMedia" in window)) return;
880
556
  const o = () => {
881
557
  const r = window.matchMedia(`screen and (resolution: ${window.devicePixelRatio}dppx)`);
882
- r.addEventListener("change", o, { once: !0, passive: !0 }), t(window.devicePixelRatio), n.current = { mediaMatcher: r, listener: o };
558
+ r.addEventListener("change", o, { once: !0, passive: !0 }), e(window.devicePixelRatio), n.current = { mediaMatcher: r, listener: o };
883
559
  };
884
560
  return o(), () => {
885
561
  n.current && n.current.mediaMatcher.removeEventListener("change", n.current.listener);
886
562
  };
887
- }, [i]), e;
563
+ }, [i]), t;
888
564
  }
889
- function ko(i) {
565
+ function Mo(i) {
890
566
  if (typeof window > "u") return 1;
891
- const { defaultDpr: e = 1, maxDpr: t = 3, round: n = !0 } = i || {}, o = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : e;
892
- return Math.min(Math.max(1, n ? Math.floor(o) : o), t);
567
+ const { defaultDpr: t = 1, maxDpr: e = 3, round: n = !0 } = i || {}, o = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : t;
568
+ return Math.min(Math.max(1, n ? Math.floor(o) : o), e);
893
569
  }
894
- function Do(i, e, t) {
895
- const n = M(e, [e]);
570
+ function ko(i, t, e) {
571
+ const n = D(t, [t]);
896
572
  V(() => {
897
573
  const o = (r) => {
898
574
  i.current && !i.current.contains(r.target) && n(r);
899
575
  };
900
- return t && t.mouseEvents === !1 || (document.addEventListener("mousedown", o), document.addEventListener("touchstart", o)), t && t.focusEvents === !1 || document.addEventListener("focus", o), () => {
576
+ return e && e.mouseEvents === !1 || (document.addEventListener("mousedown", o), document.addEventListener("touchstart", o)), e && e.focusEvents === !1 || document.addEventListener("focus", o), () => {
901
577
  document.removeEventListener("mousedown", o), document.removeEventListener("touchstart", o), document.removeEventListener("focus", o);
902
578
  };
903
579
  }, [i]);
904
580
  }
905
- function qn(i) {
581
+ function jn(i) {
906
582
  if (!i) throw new Error("must have a PointerHandlerOptions");
907
- const { onPointerDown: e, onPointerUp: t, onPointerMoveOrWait: n, processTouch: o = !1, consumeTouch: r = !0 } = i, a = M(e, [e]), h = M(t, [t]), s = M(n, [n]), l = O(!1), c = i?.timerInitial ?? 230, u = i?.timerContinuous ?? c / 2, d = O(null), f = O(null), v = O(null), m = O(null), b = H(() => {
908
- m.current && (clearTimeout(m.current), m.current = null);
909
- }, []), T = H((S) => {
910
- m.current = setTimeout(() => {
583
+ const { onPointerDown: t, onPointerUp: e, onPointerMoveOrWait: n, processTouch: o = !1, consumeTouch: r = !0 } = i, a = D(t, [t]), h = D(e, [e]), s = D(n, [n]), l = z(!1), c = i?.timerInitial ?? 230, u = i?.timerContinuous ?? c / 2, d = z(null), f = z(null), v = z(null), g = z(null), b = R(() => {
584
+ g.current && (clearTimeout(g.current), g.current = null);
585
+ }, []), T = R((E) => {
586
+ g.current = setTimeout(() => {
911
587
  window.requestAnimationFrame(() => {
912
588
  l.current !== !1 && s?.(f.current, v.current, d.current);
913
589
  }), T(u);
914
- }, S ?? c);
590
+ }, E ?? c);
915
591
  }, []);
916
592
  V(() => () => b(), []);
917
- const _ = o ? "pointer" : "mouse", w = H((S) => {
918
- S.stopPropagation(), S.stopImmediatePropagation(), S.preventDefault();
919
- }, []), x = M((S) => {
920
- document.removeEventListener(`${_}move`, B), document.removeEventListener(`${_}up`, x), document.removeEventListener("keydown", K), document.removeEventListener("keyup", y), document.removeEventListener("touchstart", w, { capture: !0 }), document.removeEventListener("touchmove", w, { capture: !0 }), window.removeEventListener("blur", A), b(), window.requestAnimationFrame(() => {
921
- l.current !== !1 && (l.current = !1, h?.(S, v.current, d.current), v.current = null);
593
+ const _ = o ? "pointer" : "mouse", w = R((E) => {
594
+ E.stopPropagation(), E.stopImmediatePropagation(), E.preventDefault();
595
+ }, []), x = D((E) => {
596
+ document.removeEventListener(`${_}move`, I), document.removeEventListener(`${_}up`, x), document.removeEventListener("keydown", O), document.removeEventListener("keyup", y), document.removeEventListener("touchstart", w, { capture: !0 }), document.removeEventListener("touchmove", w, { capture: !0 }), window.removeEventListener("blur", A), b(), window.requestAnimationFrame(() => {
597
+ l.current !== !1 && (l.current = !1, h?.(E, v.current, d.current), v.current = null);
922
598
  });
923
- }, []), A = H(() => {
599
+ }, []), A = R(() => {
924
600
  l.current !== !1 && (l.current = !1, x(f.current));
925
- }, []), P = M(() => {
601
+ }, []), P = D(() => {
926
602
  b(), T(u), window.requestAnimationFrame(() => {
927
603
  l.current !== !1 && s?.(f.current, v.current, d.current);
928
604
  });
929
- }, [u]), B = M((S) => {
930
- f.current = S, P();
931
- }, []), K = M((S) => {
932
- v.current = { ctrlKey: S.ctrlKey, shiftKey: S.shiftKey, altKey: S.altKey, metaKey: S.metaKey }, P();
933
- }, []), y = M((S) => {
934
- v.current = { ctrlKey: S.ctrlKey, shiftKey: S.shiftKey, altKey: S.altKey, metaKey: S.metaKey }, P();
605
+ }, [u]), I = D((E) => {
606
+ f.current = E, P();
607
+ }, []), O = D((E) => {
608
+ v.current = { ctrlKey: E.ctrlKey, shiftKey: E.shiftKey, altKey: E.altKey, metaKey: E.metaKey }, P();
609
+ }, []), y = D((E) => {
610
+ v.current = { ctrlKey: E.ctrlKey, shiftKey: E.shiftKey, altKey: E.altKey, metaKey: E.metaKey }, P();
935
611
  }, [u]);
936
- return M((S) => {
937
- S.isDefaultPrevented() || (v.current = { ctrlKey: S.ctrlKey, shiftKey: S.shiftKey, altKey: S.altKey, metaKey: S.metaKey }, a(S, v.current) !== !1 && (d.current = S, f.current = S.nativeEvent, document.addEventListener(`${_}up`, x, { passive: !1 }), document.addEventListener(`${_}move`, B, { passive: !1 }), document.addEventListener("keydown", K, { passive: !1 }), document.addEventListener("keyup", y, { passive: !1 }), window.addEventListener("blur", A, { passive: !0 }), o && r && (document.addEventListener("touchstart", w, { passive: !1, capture: !0 }), document.addEventListener("touchmove", w, { passive: !1, capture: !0 })), l.current = !0, T(c)));
612
+ return D((E) => {
613
+ E.isDefaultPrevented() || (v.current = { ctrlKey: E.ctrlKey, shiftKey: E.shiftKey, altKey: E.altKey, metaKey: E.metaKey }, a(E, v.current) !== !1 && (d.current = E, f.current = E.nativeEvent, document.addEventListener(`${_}up`, x, { passive: !1 }), document.addEventListener(`${_}move`, I, { passive: !1 }), document.addEventListener("keydown", O, { passive: !1 }), document.addEventListener("keyup", y, { passive: !1 }), window.addEventListener("blur", A, { passive: !0 }), o && r && (document.addEventListener("touchstart", w, { passive: !1, capture: !0 }), document.addEventListener("touchmove", w, { passive: !1, capture: !0 })), l.current = !0, T(c)));
938
614
  }, [c, o]);
939
615
  }
940
- function Po(i, e) {
941
- return qn({ onPointerDown: i, onPointerMoveOrWait: (t, n, o) => {
616
+ function Do(i, t) {
617
+ return jn({ onPointerDown: i, onPointerMoveOrWait: (e, n, o) => {
942
618
  i?.(o);
943
- }, ...e });
619
+ }, ...t });
944
620
  }
945
- const Jn = ({ initValue: i, useHookBody: e, applyStateChange: t }) => {
946
- const n = O(i);
947
- if (typeof e != "function") throw new Error("function expected as hook body parameter. got " + typeof e);
948
- const o = e();
949
- return Ve(() => {
950
- n.current !== o && (n.current = o, t(o));
951
- }, [t, o]), null;
952
- }, Qe = (i) => {
621
+ const Fn = ({ initValue: i, useHookBody: t, applyStateChange: e }) => {
622
+ const n = z(i);
623
+ if (typeof t != "function") throw new Error("function expected as hook body parameter. got " + typeof t);
624
+ const o = t();
625
+ return ne(() => {
626
+ n.current !== o && (n.current = o, e(o));
627
+ }, [e, o]), null;
628
+ }, Jt = (i) => {
953
629
  console && console.warn && console.warn(i);
954
- }, Xe = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || void 0;
955
- let Qn = 1, et = !1, Vt = !1;
956
- const Re = [], be = [], He = () => {
957
- be.forEach((i) => i());
958
- }, eo = ({ automaticContainerInternalUseOnly: i }) => {
959
- const [e, t] = q([]), n = O([]);
960
- return n.current = e, i || et !== !1 || (Vt = !0), V(() => {
630
+ }, Yt = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || void 0;
631
+ let Yn = 1, Qt = !1, Ve = !1;
632
+ const $t = [], xt = [], Nt = () => {
633
+ xt.forEach((i) => i());
634
+ }, Un = ({ automaticContainerInternalUseOnly: i }) => {
635
+ const [t, e] = J([]), n = z([]);
636
+ return n.current = t, i || Qt !== !1 || (Ve = !0), V(() => {
961
637
  let o = !0;
962
638
  function r() {
963
- if (o) return be[0] !== r ? (i || et !== !0 || Qe("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void t((a) => [])) : void t([...Re]);
639
+ if (o) return xt[0] !== r ? (i || Qt !== !0 || Jt("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void e((a) => [])) : void e([...$t]);
964
640
  }
965
- return be.push(r), He(), () => {
966
- o = !1, n.current?.length > 0 && Qe("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), be.splice(be.indexOf(r), 1), He();
641
+ return xt.push(r), Nt(), () => {
642
+ o = !1, n.current?.length > 0 && Jt("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), xt.splice(xt.indexOf(r), 1), Nt();
967
643
  };
968
- }, [i]), L(ke, { children: e.map(({ hook: o, key: r }) => pn(Jn, { ...o, key: r })) });
969
- }, to = (i) => {
970
- const e = Qn++;
971
- return Re.push({ hook: i, key: e }), be.length === 0 && Vt === !1 && (et = !0, ((t) => {
972
- if (Xe.document && Xe.document.createElement) {
973
- const n = Xe.document.createElement("div");
974
- mn(n).render(L(t, { automaticContainerInternalUseOnly: !0 }));
975
- } else Qe("Can not mount SingletonHooksContainer on server side. Did you manage to run useEffect on server? Please mount SingletonHooksContainer into your components tree manually.");
976
- })(eo)), He(), () => {
977
- Re.splice(Re.findIndex((t) => t.key === e), 1), He();
644
+ }, [i]), S(St, { children: t.map(({ hook: o, key: r }) => un(Fn, { ...o, key: r })) });
645
+ }, Xn = (i) => {
646
+ const t = Yn++;
647
+ return $t.push({ hook: i, key: t }), xt.length === 0 && Ve === !1 && (Qt = !0, ((e) => {
648
+ if (Yt.document && Yt.document.createElement) {
649
+ const n = Yt.document.createElement("div");
650
+ _n(n).render(S(e, { automaticContainerInternalUseOnly: !0 }));
651
+ } else Jt("Can not mount SingletonHooksContainer on server side. Did you manage to run useEffect on server? Please mount SingletonHooksContainer into your components tree manually.");
652
+ })(Un)), Nt(), () => {
653
+ $t.splice($t.findIndex((e) => e.key === t), 1), Nt();
978
654
  };
979
655
  };
980
- let tt = null;
981
- tt || (tt = (i, e, t = {}) => {
982
- let n, o, r = !1, a = !1, h = [], { unmountIfNoConsumers: s = !1 } = t;
656
+ let te = null;
657
+ te || (te = (i, t, e = {}) => {
658
+ let n, o, r = !1, a = !1, h = [], { unmountIfNoConsumers: s = !1 } = e;
983
659
  const l = (u) => {
984
- o = u, gn(() => h.forEach((d) => d(u)));
660
+ o = u, mn(() => h.forEach((d) => d(u)));
985
661
  }, c = () => (a || (o = typeof i == "function" ? i() : i, a = !0), o);
986
662
  return () => {
987
- const [u, d] = q(c);
988
- return V(() => (r || (r = !0, n = to({ initValue: i, useHookBody: e, applyStateChange: l })), h.push(d), o !== u && d(o), () => {
663
+ const [u, d] = J(c);
664
+ return V(() => (r || (r = !0, n = Xn({ initValue: i, useHookBody: t, applyStateChange: l })), h.push(d), o !== u && d(o), () => {
989
665
  h.splice(h.indexOf(d), 1), h.length === 0 && s && (n(), r = !1);
990
666
  }), []), u;
991
667
  };
992
668
  });
993
- const Wt = tt;
994
- let Ft = () => {
669
+ const We = te;
670
+ let je = () => {
995
671
  console.warn("You must call useEditMode before setting its state.");
996
672
  };
997
- const no = Wt(null, () => {
998
- const [i, e] = q(null);
999
- return Ft = e, i;
1000
- }), Ao = () => {
1001
- const i = no();
1002
- return N(() => ({ setMode: (e) => {
1003
- Ft((t) => (typeof e == "function" && (e = e(t)), e?.onModeChange?.(e ?? null), e));
673
+ const Gn = We(null, () => {
674
+ const [i, t] = J(null);
675
+ return je = t, i;
676
+ }), Po = () => {
677
+ const i = Gn();
678
+ return K(() => ({ setMode: (t) => {
679
+ je((e) => (typeof t == "function" && (t = t(e)), t?.onModeChange?.(t ?? null), t));
1004
680
  }, getMode: () => i }), [i]);
1005
681
  };
1006
- class nt {
1007
- constructor(e, t, n, o) {
1008
- this._listenersProperties = /* @__PURE__ */ new Set(), this._listenersExecute = /* @__PURE__ */ new Set(), this._key = e, this._target = t, this._applyProps(n || {}), this._callback = o, o === void 0 && (this._callback = () => {
682
+ class ee {
683
+ constructor(t, e, n, o) {
684
+ this._listenersProperties = /* @__PURE__ */ new Set(), this._listenersExecute = /* @__PURE__ */ new Set(), this._key = t, this._target = e, this._applyProps(n || {}), this._callback = o, o === void 0 && (this._callback = () => {
1009
685
  console.log(`implement: ${this.label()} : ${this.description()}`);
1010
686
  });
1011
687
  }
1012
688
  key() {
1013
689
  return this._key;
1014
690
  }
1015
- _resolve(e, t) {
1016
- if (typeof e == "function") {
1017
- const n = t ?? this._context;
1018
- return e(typeof n == "function" ? n() : n);
691
+ _resolve(t, e) {
692
+ if (typeof t == "function") {
693
+ const n = e ?? this._context;
694
+ return t(typeof n == "function" ? n() : n);
1019
695
  }
1020
- return e;
696
+ return t;
1021
697
  }
1022
698
  target() {
1023
699
  return typeof this._target == "function" ? this._target() : this._target;
1024
700
  }
1025
- label(e, t) {
1026
- const n = this._scopedLabels?.[e] || this._label;
701
+ label(t, e) {
702
+ const n = this._scopedLabels?.[t] || this._label;
1027
703
  let o = null;
1028
704
  if (typeof n == "function") {
1029
- const r = t ?? this._context;
705
+ const r = e ?? this._context;
1030
706
  o = n(typeof r == "function" ? r() : r);
1031
707
  } else o = n;
1032
708
  return o;
1033
709
  }
1034
- description(e) {
1035
- return this._resolve(this._description, e);
710
+ description(t) {
711
+ return this._resolve(this._description, t);
1036
712
  }
1037
- tags(e) {
1038
- return this._resolve(this._tags, e);
713
+ tags(t) {
714
+ return this._resolve(this._tags, t);
1039
715
  }
1040
- icon(e) {
1041
- return this._resolve(this._icon, e);
716
+ icon(t) {
717
+ return this._resolve(this._icon, t);
1042
718
  }
1043
719
  shortcut() {
1044
720
  return this._resolve(this._shortcut);
@@ -1052,118 +728,118 @@ class nt {
1052
728
  context() {
1053
729
  return typeof this._context == "function" ? this._context() : this._context;
1054
730
  }
1055
- async execute(e, t) {
731
+ async execute(t, e) {
1056
732
  if (!this.disabled() && this._callback) {
1057
733
  try {
1058
734
  let n = !0;
1059
- if (t?.beforeExecute && (n = t?.beforeExecute(this, e)), await Promise.resolve(n) === !1) return !1;
1060
- const o = this._callback.bind(this)(e, this);
735
+ if (e?.beforeExecute && (n = e?.beforeExecute(this, t)), await Promise.resolve(n) === !1) return !1;
736
+ const o = this._callback.bind(this)(t, this);
1061
737
  if (await Promise.resolve(o) === !1) return !1;
1062
- t?.onExecute?.(this, e), this._notifyExecute(e);
738
+ e?.onExecute?.(this, t), this._notifyExecute(t);
1063
739
  } catch (n) {
1064
- return console.warn(n), t?.onError(this, n, e), this._notifyError(e, n), !1;
740
+ return console.warn(n), e?.onError(this, n, t), this._notifyError(t, n), !1;
1065
741
  }
1066
742
  return !0;
1067
743
  }
1068
744
  }
1069
- addPropertyListener(e, t = !1) {
1070
- if (!e) throw new Error("listener must be specified");
745
+ addPropertyListener(t, e = !1) {
746
+ if (!t) throw new Error("listener must be specified");
1071
747
  const n = this._listenersProperties;
1072
- return n.add(e), t && e({}, this), () => {
1073
- n.delete(e);
748
+ return n.add(t), e && t({}, this), () => {
749
+ n.delete(t);
1074
750
  };
1075
751
  }
1076
- addExecuteListener(e) {
1077
- if (!e) throw new Error("listener must be specified");
1078
- const t = this._listenersExecute;
1079
- return t.add(e), function() {
1080
- t.delete(e);
752
+ addExecuteListener(t) {
753
+ if (!t) throw new Error("listener must be specified");
754
+ const e = this._listenersExecute;
755
+ return e.add(t), function() {
756
+ e.delete(t);
1081
757
  };
1082
758
  }
1083
- _notifyExecute(e) {
1084
- const t = this;
759
+ _notifyExecute(t) {
760
+ const e = this;
1085
761
  this._listenersExecute.forEach((n) => {
1086
- n.onExecute(t, e);
762
+ n.onExecute(e, t);
1087
763
  });
1088
764
  }
1089
- _notifyError(e, t) {
765
+ _notifyError(t, e) {
1090
766
  const n = this;
1091
767
  this._listenersExecute.forEach((o) => {
1092
- o.onError?.(n, e, t);
768
+ o.onError?.(n, t, e);
1093
769
  });
1094
770
  }
1095
- updateCallback(e) {
1096
- return this._callback = e || null, this;
771
+ updateCallback(t) {
772
+ return this._callback = t || null, this;
1097
773
  }
1098
- update(e) {
1099
- if (!e) return;
1100
- const t = this._applyProps(e);
1101
- return Object.keys(t).length > 0 && this._notifyPropertyChange(t), this;
774
+ update(t) {
775
+ if (!t) return;
776
+ const e = this._applyProps(t);
777
+ return Object.keys(e).length > 0 && this._notifyPropertyChange(e), this;
1102
778
  }
1103
- _notifyPropertyChange(e) {
1104
- const t = this;
779
+ _notifyPropertyChange(t) {
780
+ const e = this;
1105
781
  this._listenersProperties.forEach((n) => {
1106
- n(e, t);
782
+ n(t, e);
1107
783
  });
1108
784
  }
1109
- _applyProps(e) {
1110
- let t = {}, n = this;
1111
- return Object.keys(e).forEach((o) => {
1112
- let r = e[o];
1113
- n["_" + o] !== r && (n["_" + o] = t[o] = r);
1114
- }), t;
785
+ _applyProps(t) {
786
+ let e = {}, n = this;
787
+ return Object.keys(t).forEach((o) => {
788
+ let r = t[o];
789
+ n["_" + o] !== r && (n["_" + o] = e[o] = r);
790
+ }), e;
1115
791
  }
1116
792
  }
1117
- class Ue extends nt {
793
+ class Ut extends ee {
1118
794
  }
1119
- class jt {
1120
- constructor(e, t) {
1121
- this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = Z.uuidV4(), this._target = e, this._groupKey = t ?? null, this._root = this, this._nodes = /* @__PURE__ */ new Map(), this._nodes.set(t, this), this._children = /* @__PURE__ */ new Map(), this._listeners = /* @__PURE__ */ new Set(), this._commandsByKey = /* @__PURE__ */ new Map(), this._commandsByShortcut = /* @__PURE__ */ new Map();
795
+ class Fe {
796
+ constructor(t, e) {
797
+ this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = G.uuidV4(), this._target = t, this._groupKey = e ?? null, this._root = this, this._nodes = /* @__PURE__ */ new Map(), this._nodes.set(e, this), this._children = /* @__PURE__ */ new Map(), this._listeners = /* @__PURE__ */ new Set(), this._commandsByKey = /* @__PURE__ */ new Map(), this._commandsByShortcut = /* @__PURE__ */ new Map();
1122
798
  const n = this;
1123
799
  this._unListenersByCommand = /* @__PURE__ */ new Map(), this._listenersByKey = /* @__PURE__ */ new Map(), this._commandsPropertyListener = (o, r) => {
1124
800
  const a = n._root._listenersByKey, h = r.key(), s = a.get(h);
1125
801
  s && n._notifyCommands(s, "onCommandChange", r);
1126
802
  };
1127
803
  }
1128
- _getCommand(e) {
1129
- return this._commandsByKey.get(e) || (this._parent?._getCommand(e) ?? null);
804
+ _getCommand(t) {
805
+ return this._commandsByKey.get(t) || (this._parent?._getCommand(t) ?? null);
1130
806
  }
1131
- getCommand(e, t = !1) {
807
+ getCommand(t, e = !1) {
1132
808
  const n = this._root._focused;
1133
809
  let o = n, r = n === this;
1134
810
  for (; !r && o; ) o === this && (r = !0), o = o._parent;
1135
- return (r ? n : this)._getCommand(e);
811
+ return (r ? n : this)._getCommand(t);
1136
812
  }
1137
- createChildGroup(e, t, n) {
813
+ createChildGroup(t, e, n) {
1138
814
  let o;
1139
815
  if (!n) {
1140
816
  let h = this;
1141
817
  for (; h && !o; ) {
1142
- let s = h._nodes.get(t);
818
+ let s = h._nodes.get(e);
1143
819
  s && (o = s), h = h._parent;
1144
820
  }
1145
821
  }
1146
- o || (o = new jt(e, t), o._parent = this, o._root = this._root, o._unListenersByCommand = null, o._listenersByKey = null, o._commandsPropertyListener = null);
822
+ o || (o = new Fe(t, e), o._parent = this, o._root = this._root, o._unListenersByCommand = null, o._listenersByKey = null, o._commandsPropertyListener = null);
1147
823
  const r = (h, s) => {
1148
- !h.has(t) || n ? h.set(t, s) : n === void 0 && console.warn("commandGroup already registered", t);
824
+ !h.has(e) || n ? h.set(e, s) : n === void 0 && console.warn("commandGroup already registered", e);
1149
825
  };
1150
826
  r(this._root._nodes, o);
1151
827
  let a = this._parent;
1152
828
  for (; a; ) r(this._nodes, o), a = a._parent;
1153
- return this._children.set(t, o), this._notify("onGroupChange"), o;
829
+ return this._children.set(e, o), this._notify("onGroupChange"), o;
1154
830
  }
1155
831
  getKey() {
1156
832
  return this._groupKey;
1157
833
  }
1158
- getGroup(e) {
1159
- return this._nodes.get(e);
834
+ getGroup(t) {
835
+ return this._nodes.get(t);
1160
836
  }
1161
- _addCommands(e, t = void 0) {
837
+ _addCommands(t, e = void 0) {
1162
838
  const n = this._commandsByKey, o = this._commandsByShortcut, r = this._root._commandsPropertyListener, a = this._root._unListenersByCommand;
1163
- for (let h = 0; h < e.length; h++) {
1164
- const s = e[h], l = s.key();
1165
- if (n.has(l) && !t) {
1166
- t === void 0 && console.warn("command already registered", l);
839
+ for (let h = 0; h < t.length; h++) {
840
+ const s = t[h], l = s.key();
841
+ if (n.has(l) && !e) {
842
+ e === void 0 && console.warn("command already registered", l);
1167
843
  continue;
1168
844
  }
1169
845
  n.set(l, s);
@@ -1175,53 +851,53 @@ class jt {
1175
851
  if (!d) continue;
1176
852
  const f = Array.isArray(d) ? d : [d];
1177
853
  for (let v = 0; v < f.length; v++) {
1178
- const m = Me(f[v]), b = o.get(m);
1179
- b && !t && t === void 0 && console.warn(`Shortcut already registered: ${m}, ${l}, ${b}.`), o.set(m, l);
854
+ const g = Mt(f[v]), b = o.get(g);
855
+ b && !e && e === void 0 && console.warn(`Shortcut already registered: ${g}, ${l}, ${b}.`), o.set(g, l);
1180
856
  }
1181
857
  }
1182
858
  }
1183
859
  removeFromParent() {
1184
860
  if (!this._parent) return;
1185
- let e = this._parent, t = [];
861
+ let t = this._parent, e = [];
1186
862
  const n = this._groupKey;
1187
- for (; e; ) t.push(e._nodes), e._nodes.delete(n), e = e._parent;
1188
- e = this._parent;
863
+ for (; t; ) e.push(t._nodes), t._nodes.delete(n), t = t._parent;
864
+ t = this._parent;
1189
865
  const o = (r) => {
1190
866
  r._children.forEach((a) => {
1191
- for (let h = 0; h < t.length; h++) a._nodes.delete(t[h]);
867
+ for (let h = 0; h < e.length; h++) a._nodes.delete(e[h]);
1192
868
  o(a);
1193
869
  });
1194
870
  };
1195
871
  o(this), this._parent = null, this._notify("onGroupChange");
1196
872
  }
1197
- addCommands(e, t) {
1198
- this._addCommands(e, t), this._notify("onGroupChange");
873
+ addCommands(t, e) {
874
+ this._addCommands(t, e), this._notify("onGroupChange");
1199
875
  }
1200
876
  getActive() {
1201
877
  return this._root._focused ?? this._root;
1202
878
  }
1203
- activate(e) {
1204
- let t = this;
1205
- if (e && (t = this._nodes.get(e), !t)) return void console.warn("group not found", e);
879
+ activate(t) {
880
+ let e = this;
881
+ if (t && (e = this._nodes.get(t), !e)) return void console.warn("group not found", t);
1206
882
  let n = this._root._focused ?? this._root;
1207
883
  for (; n; ) n = n._parent;
1208
- this._root._focused !== t && (this._root._focused = t, this._notify("onGroupChange"), this._notify("onActiveChange"));
884
+ this._root._focused !== e && (this._root._focused = e, this._notify("onGroupChange"), this._notify("onActiveChange"));
1209
885
  }
1210
- findCommandByEvent(e) {
1211
- const t = [];
1212
- e.altKey && t.push(G.Alt), e.shiftKey && t.push(G.Shift), e.ctrlKey && t.push(G.Ctrl), e.metaKey && t.push(G.Meta);
1213
- let n = Me({ key: e.code, modifiers: t });
886
+ findCommandByEvent(t) {
887
+ const e = [];
888
+ t.altKey && e.push(X.Alt), t.shiftKey && e.push(X.Shift), t.ctrlKey && e.push(X.Ctrl), t.metaKey && e.push(X.Meta);
889
+ let n = Mt({ key: t.code, modifiers: e });
1214
890
  const o = this._commandsByShortcut;
1215
891
  let r = o.get(n);
1216
- r || (n = Me({ key: e.key, modifiers: t }), r = o.get(n)), !r && e.code.startsWith("Digit") && (n = Me({ key: e.code.substring(5, e.code.length), modifiers: t }), r = this._commandsByShortcut.get(n)), !r && e.code.startsWith("Key") && (r = Me({ key: e.code.substring(3, e.code.length), modifiers: t }), r = o.get(n));
892
+ r || (n = Mt({ key: t.key, modifiers: e }), r = o.get(n)), !r && t.code.startsWith("Digit") && (n = Mt({ key: t.code.substring(5, t.code.length), modifiers: e }), r = this._commandsByShortcut.get(n)), !r && t.code.startsWith("Key") && (r = Mt({ key: t.code.substring(3, t.code.length), modifiers: e }), r = o.get(n));
1217
893
  let a = null;
1218
- return r && (a = this._commandsByKey.get(r), a && a.disabled() && (a = null), !a || a.target() && a.target().contains(e.target) || (a = null)), a || (this._parent?.findCommandByEvent(e) ?? null);
894
+ return r && (a = this._commandsByKey.get(r), a && a.disabled() && (a = null), !a || a.target() && a.target().contains(t.target) || (a = null)), a || (this._parent?.findCommandByEvent(t) ?? null);
1219
895
  }
1220
- dispatchToFocusedCommand(e) {
1221
- const t = this.getActive();
1222
- if (!t || e.isDefaultPrevented()) return !1;
1223
- const n = t.findCommandByEvent?.(e);
1224
- return !!n && (n.execute(), e.preventDefault(), !0);
896
+ dispatchToFocusedCommand(t) {
897
+ const e = this.getActive();
898
+ if (!e || t.isDefaultPrevented()) return !1;
899
+ const n = e.findCommandByEvent?.(t);
900
+ return !!n && (n.execute(), t.preventDefault(), !0);
1225
901
  }
1226
902
  getRoot() {
1227
903
  return this._parent ? this._parent.getRoot() : this;
@@ -1229,70 +905,70 @@ class jt {
1229
905
  getParent() {
1230
906
  return this._parent;
1231
907
  }
1232
- addListener(e, t) {
1233
- const n = this._listeners, o = t?.keys, r = this._root._listenersByKey;
1234
- if (o && !e.onCommandChange) throw new Error("keys were provided but the listener does not contain 'onCommandChange'.");
908
+ addListener(t, e) {
909
+ const n = this._listeners, o = e?.keys, r = this._root._listenersByKey;
910
+ if (o && !t.onCommandChange) throw new Error("keys were provided but the listener does not contain 'onCommandChange'.");
1235
911
  let a = null;
1236
912
  if (o) for (let h = 0; h < o.length; h++) {
1237
913
  const s = o[h];
1238
914
  if (!s) continue;
1239
915
  let l = r.get(s);
1240
- l || (l = /* @__PURE__ */ new Set(), r.set(s, l)), a || (a = []), a.push(l), l.add(e);
916
+ l || (l = /* @__PURE__ */ new Set(), r.set(s, l)), a || (a = []), a.push(l), l.add(t);
1241
917
  }
1242
- return n.add(e), () => {
918
+ return n.add(t), () => {
1243
919
  if (a) for (let h = 0; h < a.length; h++)
1244
- a[h].delete(e);
1245
- n.delete(e);
920
+ a[h].delete(t);
921
+ n.delete(t);
1246
922
  };
1247
923
  }
1248
- _notifyCommands(e, t, n) {
924
+ _notifyCommands(t, e, n) {
1249
925
  const o = this;
1250
926
  setTimeout(() => {
1251
- e.forEach((r) => {
1252
- r[t]?.(o, n);
927
+ t.forEach((r) => {
928
+ r[e]?.(o, n);
1253
929
  });
1254
930
  }, 0);
1255
931
  }
1256
- _notify(e, t) {
932
+ _notify(t, e) {
1257
933
  const n = this;
1258
934
  setTimeout(() => {
1259
935
  n._listeners.forEach((o) => {
1260
- o[e]?.(n, t);
1261
- }), n._parent && n._parent._notify(e, t);
936
+ o[t]?.(n, e);
937
+ }), n._parent && n._parent._notify(t, e);
1262
938
  }, 0);
1263
939
  }
1264
940
  getAllCommands() {
1265
- const e = [], t = this._groupKey;
941
+ const t = [], e = this._groupKey;
1266
942
  return this._commandsByKey.forEach((n) => {
1267
- e.push({ command: n, groupKey: t });
943
+ t.push({ command: n, groupKey: e });
1268
944
  }), this._children.forEach((n) => {
1269
- e.push(...n.getAllCommands());
1270
- }), e;
945
+ t.push(...n.getAllCommands());
946
+ }), t;
1271
947
  }
1272
948
  }
1273
- const oo = Z.getOS() === Z.OSType.MacOS || Z.getOS() === Z.OSType.IOS ? "Cmd" : "Ctrl", io = Z.getOS() === Z.OSType.MacOS || Z.getOS() === Z.OSType.IOS ? "⌘" : "^", Me = (i, e = !1) => {
1274
- const t = {};
1275
- for (let o = 0; i.modifiers && o < i.modifiers.length; o++) t[i.modifiers[o]] = !0;
949
+ const Zn = G.getOS() === G.OSType.MacOS || G.getOS() === G.OSType.IOS ? "Cmd" : "Ctrl", qn = G.getOS() === G.OSType.MacOS || G.getOS() === G.OSType.IOS ? "⌘" : "^", Mt = (i, t = !1) => {
950
+ const e = {};
951
+ for (let o = 0; i.modifiers && o < i.modifiers.length; o++) e[i.modifiers[o]] = !0;
1276
952
  let n = "";
1277
- return (t?.[G.Ctrl] || t?.[G.Meta]) && (n += (n.length > 0 ? "+" : "") + (e ? io : oo)), t?.[G.Alt] && (n += e ? "⌥" : "Alt"), t?.[G.Shift] && (n += (n.length > 0 ? "+" : "") + (e ? "⇧" : "Shift")), n += (n.length > 0 ? "+" : "") + Rt(i.key), n;
953
+ return (e?.[X.Ctrl] || e?.[X.Meta]) && (n += (n.length > 0 ? "+" : "") + (t ? qn : Zn)), e?.[X.Alt] && (n += t ? "⌥" : "Alt"), e?.[X.Shift] && (n += (n.length > 0 ? "+" : "") + (t ? "⇧" : "Shift")), n += (n.length > 0 ? "+" : "") + Ie(i.key), n;
1278
954
  };
1279
- function zo(i, e = null) {
1280
- const t = O(e);
1281
- t.current = e;
1282
- const [n, o] = fn((a) => a + 1, 0), r = N(() => Array.isArray(i) ? i : [i], [i]);
955
+ function Ao(i, t = null) {
956
+ const e = z(t);
957
+ e.current = t;
958
+ const [n, o] = dn((a) => a + 1, 0), r = K(() => Array.isArray(i) ? i : [i], [i]);
1283
959
  return V(() => {
1284
960
  if (!r || r.length === 0) return;
1285
961
  const a = (l, c) => {
1286
- t.current?.onChange?.(c), o();
962
+ e.current?.onChange?.(c), o();
1287
963
  };
1288
964
  let h = null;
1289
- e && (h = { onExecute(l, c) {
1290
- t.current?.onExecute?.(l, c);
965
+ t && (h = { onExecute(l, c) {
966
+ e.current?.onExecute?.(l, c);
1291
967
  }, onError(l, c, u) {
1292
- t.current?.onError?.(l, c, u);
968
+ e.current?.onError?.(l, c, u);
1293
969
  } });
1294
970
  const s = /* @__PURE__ */ new Set();
1295
- for (let l = 0; l < r.length; l++) s.add(r[l]?.addPropertyListener(Z.debounce(a, 0), !0)), e && s.add(r[l]?.addExecuteListener(h));
971
+ for (let l = 0; l < r.length; l++) s.add(r[l]?.addPropertyListener(G.debounce(a, 0), !0)), t && s.add(r[l]?.addExecuteListener(h));
1296
972
  return () => {
1297
973
  s.forEach((l) => {
1298
974
  l?.();
@@ -1300,57 +976,57 @@ function zo(i, e = null) {
1300
976
  };
1301
977
  }, [i]), n;
1302
978
  }
1303
- const $e = (i, e) => {
1304
- if (!e || !i || e.length === 0) return Z.EmptyArray;
1305
- const t = e.length, n = new Array(t);
1306
- for (let o = 0; o < t; o++) {
1307
- const r = e[o], a = r ? i.getCommand(r) : null;
979
+ const zt = (i, t) => {
980
+ if (!t || !i || t.length === 0) return G.EmptyArray;
981
+ const e = t.length, n = new Array(e);
982
+ for (let o = 0; o < e; o++) {
983
+ const r = t[o], a = r ? i.getCommand(r) : null;
1308
984
  n[o] = a;
1309
985
  }
1310
986
  return n;
1311
987
  };
1312
- function Bo(i, e = null, t = null, n) {
1313
- const o = O(t);
1314
- o.current = t, e && !Array.isArray(e) && (e = [e]);
1315
- const [r, a] = q($e(i, e)), h = n ? [...n, i] : [i];
988
+ function zo(i, t = null, e = null, n) {
989
+ const o = z(e);
990
+ o.current = e, t && !Array.isArray(t) && (t = [t]);
991
+ const [r, a] = J(zt(i, t)), h = n ? [...n, i] : [i];
1316
992
  return V(() => {
1317
993
  const s = { onGroupChange: () => {
1318
- const d = $e(i, e);
994
+ const d = zt(i, t);
1319
995
  a(d), o.current?.onChange?.(this);
1320
996
  } };
1321
997
  let l;
1322
- e && e.length > 0 && (l = { keys: e }, s.onCommandChange = (d, f) => {
1323
- o.current?.onChange?.(i), a($e(i, e));
998
+ t && t.length > 0 && (l = { keys: t }, s.onCommandChange = (d, f) => {
999
+ o.current?.onChange?.(i), a(zt(i, t));
1324
1000
  });
1325
- const c = i?.addListener(s, l), u = $e(i, e);
1001
+ const c = i?.addListener(s, l), u = zt(i, t);
1326
1002
  return a(u), o.current?.onChange && o.current?.onChange(i), () => {
1327
1003
  c?.();
1328
1004
  };
1329
1005
  }, h), r;
1330
1006
  }
1331
- const Oo = { Toolbar: "toolbar", Menuitem: "menuitem" }, ro = Wt({ setClipboard: (i) => {
1007
+ const Bo = { Toolbar: "toolbar", Menuitem: "menuitem" }, Jn = We({ setClipboard: (i) => {
1332
1008
  throw new Error("This is only available via the useClipboard.");
1333
- }, getClipboard: () => Ie.Global, refNativeCopy: { current: null }, refNativeLastKey: { current: null } }, () => {
1334
- const [i, e] = q(Ie.Global);
1335
- return { setClipboard: (t) => e(t), getClipboard: () => i, refNativeCopy: O(null), refNativeLastKey: O(null) };
1336
- }), $o = (i) => {
1337
- const { source: e, target: t, onPaste: n, onClipboardUpdate: o, commands: r } = i, a = Ht(), h = M(o, [o]), s = M(n, [n]), { getClipboard: l, refNativeCopy: c } = ro(), u = l();
1338
- N(() => {
1339
- const _ = e?.element, w = t?.element ?? e?.element;
1009
+ }, getClipboard: () => Rt.Global, refNativeCopy: { current: null }, refNativeLastKey: { current: null } }, () => {
1010
+ const [i, t] = J(Rt.Global);
1011
+ return { setClipboard: (e) => t(e), getClipboard: () => i, refNativeCopy: z(null), refNativeLastKey: z(null) };
1012
+ }), Oo = (i) => {
1013
+ const { source: t, target: e, onPaste: n, onClipboardUpdate: o, commands: r } = i, a = Ht(), h = D(o, [o]), s = D(n, [n]), { getClipboard: l, refNativeCopy: c } = Jn(), u = l();
1014
+ K(() => {
1015
+ const _ = t?.element, w = e?.element ?? t?.element;
1340
1016
  if (!r) return;
1341
- const x = [new Ue("cut", _, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", icon: "cut", shortcut: { key: "X", modifiers: [G.Ctrl] } }), new Ue("copy", _, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", icon: "copy", shortcut: { key: "C", modifiers: [G.Ctrl] } }), new Ue("paste", w, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste", shortcut: [{ key: "V", modifiers: [G.Ctrl] }, { key: "F8", modifiers: [G.Ctrl] }] })];
1017
+ const x = [new Ut("cut", _, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", icon: "cut", shortcut: { key: "X", modifiers: [X.Ctrl] } }), new Ut("copy", _, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", icon: "copy", shortcut: { key: "C", modifiers: [X.Ctrl] } }), new Ut("paste", w, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste", shortcut: [{ key: "V", modifiers: [X.Ctrl] }, { key: "F8", modifiers: [X.Ctrl] }] })];
1342
1018
  r?.addCommands(x, !0);
1343
1019
  }, [r]);
1344
- const d = M(async (_) => {
1345
- if (!e?.element) return;
1020
+ const d = D(async (_) => {
1021
+ if (!t?.element) return;
1346
1022
  let w = null;
1347
1023
  try {
1348
- w = e.doCopy?.(_), typeof w == "string" ? await u.writeText(w) : await u.writeReference(w);
1024
+ w = t.doCopy?.(_), typeof w == "string" ? await u.writeText(w) : await u.writeReference(w);
1349
1025
  } catch (x) {
1350
1026
  throw x;
1351
1027
  }
1352
- }, [e, a]), f = M(async (_) => {
1353
- const w = e?.element?.();
1028
+ }, [t, a]), f = D(async (_) => {
1029
+ const w = t?.element?.();
1354
1030
  if (w) {
1355
1031
  c.current = { sourceElement: w, args: _ };
1356
1032
  try {
@@ -1359,173 +1035,547 @@ const Oo = { Toolbar: "toolbar", Menuitem: "menuitem" }, ro = Wt({ setClipboard:
1359
1035
  a.showError?.(x);
1360
1036
  }
1361
1037
  }
1362
- }, [e?.element, a]), v = H(() => {
1038
+ }, [t?.element, a]), v = R(() => {
1363
1039
  f({ isCut: !0 });
1364
- }, []), m = M(async (_, w, x) => {
1040
+ }, []), g = D(async (_, w, x) => {
1365
1041
  try {
1366
1042
  if (await _.doPaste(w, x) === !1) return;
1367
1043
  s?.(w, x);
1368
1044
  } catch (A) {
1369
1045
  a.showError?.(A);
1370
1046
  }
1371
- }, [s]), b = M(async (_, w, x) => {
1372
- const A = t?.element?.();
1373
- if (A && await Z.whenFocus(A), !_ && !w) return;
1047
+ }, [s]), b = D(async (_, w, x) => {
1048
+ const A = e?.element?.();
1049
+ if (A && await G.whenFocus(A), !_ && !w) return;
1374
1050
  const P = await a.showBusy?.("Pasting...");
1375
1051
  if (w) try {
1376
- return await m(t, w, x), void P?.();
1052
+ return await g(e, w, x), void P?.();
1377
1053
  } catch (y) {
1378
1054
  P?.(), a.showError?.(y);
1379
1055
  }
1380
- let B, K = t.importFromExternal;
1381
- K || (K = (y, S) => ({ getItemType: () => "text", toText: () => _.text, isClipboardItem: !0 }));
1056
+ let I, O = e.importFromExternal;
1057
+ O || (O = (y, E) => ({ getItemType: () => "text", toText: () => _.text, isClipboardItem: !0 }));
1382
1058
  try {
1383
- B = await K(_, { isCut: !1 });
1059
+ I = await O(_, { isCut: !1 });
1384
1060
  } catch (y) {
1385
1061
  P?.(), a.showError?.(y);
1386
1062
  }
1387
- if (B) try {
1388
- const y = await Promise.resolve(B);
1389
- await m(t, y, x), P?.();
1063
+ if (I) try {
1064
+ const y = await Promise.resolve(I);
1065
+ await g(e, y, x), P?.();
1390
1066
  } catch (y) {
1391
1067
  P?.(), a.showError?.(y);
1392
1068
  }
1393
1069
  else P?.();
1394
- }, [m, t, a]), T = M(async (_) => {
1395
- if (t?.element) try {
1070
+ }, [g, e, a]), T = D(async (_) => {
1071
+ if (e?.element) try {
1396
1072
  const w = await u.readReference();
1397
1073
  if (w) return void await b(null, w, _);
1398
1074
  const x = [];
1399
- x[0] = await Fe.readStringFromClipboard(u, je.plain), x[1] = await Fe.readHTMLFromClipboard(u, je.html), x[2] = await Fe.readBlobFromClipboard(u, je.png);
1075
+ x[0] = await Wt.readStringFromClipboard(u, jt.plain), x[1] = await Wt.readHTMLFromClipboard(u, jt.html), x[2] = await Wt.readBlobFromClipboard(u, jt.png);
1400
1076
  const A = { text: x[0] ?? null, html: x[1] ?? null, image: x[2] ?? null };
1401
1077
  await b(A, null, _);
1402
1078
  } catch (w) {
1403
1079
  if (w?.message === "Document is not focused.") return;
1404
1080
  a.showError?.(w);
1405
1081
  }
1406
- }, [b, t?.element, a]);
1407
- return M(async (_) => {
1408
- }, [e?.element]), M(async (_) => {
1409
- }, [t?.element, b, a]), V(() => {
1082
+ }, [b, e?.element, a]);
1083
+ return D(async (_) => {
1084
+ }, [t?.element]), D(async (_) => {
1085
+ }, [e?.element, b, a]), V(() => {
1410
1086
  if (!u) return;
1411
1087
  const _ = async (A) => {
1412
1088
  const P = await u.readReference();
1413
1089
  h?.(P);
1414
1090
  }, w = (A) => {
1415
- a.showMessage?.(Ie.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
1091
+ a.showMessage?.(Rt.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
1416
1092
  }, x = (A) => {
1417
- a.showMessage?.(Ie.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
1093
+ a.showMessage?.(Rt.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
1418
1094
  };
1419
1095
  return u.addEventListener("clipboardchange", _), u.addEventListener("clipboarderrorread", w), u.addEventListener("clipboarderrorwrite", x), () => {
1420
1096
  u.removeEventListener("clipboardchange", _), u.removeEventListener("clipboarderrorread", w), u.removeEventListener("clipboarderrorwrite", x);
1421
1097
  };
1422
1098
  }, [u, a]), V(() => {
1423
- }, [d, b, e, t]), V(() => {
1424
- r?.getCommand("cut")?.updateCallback(v).update({ disabled: !e || !t }), r?.getCommand("copy")?.updateCallback(f).update({ disabled: !e }), r?.getCommand("paste")?.updateCallback(T).update({ disabled: !t });
1425
- }, [e, t, r]), { paste: T, copy: f, clipboard: u };
1099
+ }, [d, b, t, e]), V(() => {
1100
+ r?.getCommand("cut")?.updateCallback(v).update({ disabled: !t || !e }), r?.getCommand("copy")?.updateCallback(f).update({ disabled: !t }), r?.getCommand("paste")?.updateCallback(T).update({ disabled: !e });
1101
+ }, [t, e, r]), { paste: T, copy: f, clipboard: u };
1426
1102
  };
1427
- function Ko(i, e = !0) {
1428
- const t = O(i);
1103
+ function $o(i, t = !0) {
1104
+ const e = z(i);
1429
1105
  V(() => {
1430
- if (e) {
1431
- const n = Object.entries(i).reduce((o, [r, a]) => (t.current[r] !== a && (o[r] = [t.current[r], a]), o), {});
1106
+ if (t) {
1107
+ const n = Object.entries(i).reduce((o, [r, a]) => (e.current[r] !== a && (o[r] = [e.current[r], a]), o), {});
1432
1108
  Object.keys(n).length > 0 && console.log("Changed props:", n);
1433
1109
  }
1434
- t.current = i;
1110
+ e.current = i;
1435
1111
  });
1436
1112
  }
1437
- let Ge = !1, so = 0;
1438
- var lo = typeof document < "u" ? Ve : V;
1439
- const Tt = () => "sheetxl-ui-" + so++, Mt = ie.useId, Ro = Mt ?? function() {
1440
- const [i, e] = ie.useState(() => Ge ? Tt() : void 0);
1441
- return lo(() => {
1442
- i == null && e(Tt());
1443
- }, []), ie.useEffect(() => {
1444
- Ge || (Ge = !0);
1113
+ let Xt = !1, Qn = 0;
1114
+ var to = typeof document < "u" ? ne : V;
1115
+ const Se = () => "sheetxl-ui-" + Qn++, Ee = it.useId, Ko = Ee ?? function() {
1116
+ const [i, t] = it.useState(() => Xt ? Se() : void 0);
1117
+ return to(() => {
1118
+ i == null && t(Se());
1119
+ }, []), it.useEffect(() => {
1120
+ Xt || (Xt = !0);
1445
1121
  }, []), i;
1446
- }, kt = "Undo the last action.", Dt = "Repeat the last action or undo the redo.", ao = (i) => `Redo ${i}`, Io = ({ manager: i, commands: e, disabled: t }) => {
1447
- const n = Ht(), o = M((a) => {
1122
+ }, Le = "Undo the last action.", Ce = "Repeat the last action or undo the redo.", eo = (i) => `Redo ${i}`, Ro = ({ manager: i, commands: t, disabled: e }) => {
1123
+ const n = Ht(), o = D((a) => {
1448
1124
  try {
1449
1125
  i?.undo(a);
1450
1126
  } catch (h) {
1451
1127
  n.error(h);
1452
1128
  }
1453
- }, [i]), r = M((a) => {
1129
+ }, [i]), r = D((a) => {
1454
1130
  try {
1455
1131
  i?.redo(a);
1456
1132
  } catch (h) {
1457
1133
  n.error(h);
1458
1134
  }
1459
1135
  }, [i]);
1460
- return N(() => {
1461
- if (!e) return;
1136
+ return K(() => {
1137
+ if (!t) return;
1462
1138
  const a = { contains: (s) => !0, focus() {
1463
- } }, h = [new nt("undo", a, { label: "Undo", description: kt, shortcut: { key: "z", modifiers: [G.Ctrl] }, disabled: !0 }, o), new nt("redo", a, { label: "Redo", description: Dt, shortcut: [{ key: "y", modifiers: [G.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [G.Alt] }], disabled: !0 }, r)];
1464
- e?.addCommands(h, !0);
1465
- }, [e]), V(() => {
1466
- if (!e) return;
1139
+ } }, h = [new ee("undo", a, { label: "Undo", description: Le, shortcut: { key: "z", modifiers: [X.Ctrl] }, disabled: !0 }, o), new ee("redo", a, { label: "Redo", description: Ce, shortcut: [{ key: "y", modifiers: [X.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [X.Alt] }], disabled: !0 }, r)];
1140
+ t?.addCommands(h, !0);
1141
+ }, [t]), V(() => {
1142
+ if (!t) return;
1467
1143
  const a = () => {
1468
1144
  const s = i?.getTopUndoDescription(), l = {};
1469
1145
  var c;
1470
- e.getCommand("undo").update({ disabled: t || !i || !i.hasUndo(), description: s ? (c = s, `Undo ${c}`) : kt, state: l, context: { undoManager: i } });
1146
+ t.getCommand("undo").update({ disabled: e || !i || !i.hasUndo(), description: s ? (c = s, `Undo ${c}`) : Le, state: l, context: { undoManager: i } });
1471
1147
  const u = i?.getTopRedoDescription();
1472
- e.getCommand("redo").update({ disabled: t || !i || !i.hasRedo(), description: u ? ao(u) : Dt, state: l, context: { undoManager: i } });
1148
+ t.getCommand("redo").update({ disabled: e || !i || !i.hasRedo(), description: u ? eo(u) : Ce, state: l, context: { undoManager: i } });
1473
1149
  };
1474
1150
  if (a(), !i) return;
1475
1151
  const h = i.addListener({ onStackChange() {
1476
1152
  a();
1477
1153
  } });
1478
1154
  return () => h?.();
1479
- }, [i, e, t]), { undo: o, redo: r };
1155
+ }, [i, t, e]), { undo: o, redo: r };
1156
+ };
1157
+ class no extends pn {
1158
+ static getDerivedStateFromError() {
1159
+ return { hasError: !0 };
1160
+ }
1161
+ componentDidCatch(t) {
1162
+ this.props.onError?.(t);
1163
+ }
1164
+ render() {
1165
+ return this.props.children;
1166
+ }
1167
+ }
1168
+ const Io = ({ children: i }) => {
1169
+ const t = Ht(), e = R((n) => {
1170
+ t.showError(n);
1171
+ }, [t]);
1172
+ return S(no, { onError: e, children: i });
1480
1173
  };
1174
+ class oo {
1175
+ constructor(t) {
1176
+ this.notifier = t, this.handleUnhandledRejection = (e) => {
1177
+ const n = e.reason;
1178
+ n instanceof DOMException && n.name === "AbortError" || this.notifier.showError(n);
1179
+ }, this.handleGlobalError = (e) => {
1180
+ this.notifier.showError(e.error);
1181
+ }, this.setupGlobalHandlers();
1182
+ }
1183
+ setupGlobalHandlers() {
1184
+ window.addEventListener("unhandledrejection", this.handleUnhandledRejection), window.addEventListener("error", this.handleGlobalError);
1185
+ }
1186
+ cleanup() {
1187
+ window.removeEventListener("unhandledrejection", this.handleUnhandledRejection), window.removeEventListener("error", this.handleGlobalError);
1188
+ }
1189
+ }
1190
+ const No = ({ children: i }) => {
1191
+ const t = Ht();
1192
+ return V(() => {
1193
+ const e = new oo(t);
1194
+ return () => {
1195
+ e.cleanup();
1196
+ };
1197
+ }, [t]), S(St, { children: i });
1198
+ }, Ho = () => null, io = {}, ro = (i) => {
1199
+ const { onPointerDown: t, style: e, splitDirection: n, paddingBefore: o = 0, paddingAfter: r = 0, disabled: a, key: h, hitAreaProps: s = io, ...l } = i, c = n === "row", { style: u, className: d, ...f } = s;
1200
+ return S("div", { style: { ...e, position: "relative" }, ...l, children: S("div", { className: wt("hit-box", d), style: { left: (c ? -o : 0) + "px", width: `calc(100% + ${c ? o + r : 0}px)`, top: (c ? 0 : -o) + "px", height: `calc(100% + ${c ? 0 : o + r}px)`, position: "absolute", ...u }, onPointerDown: a ? void 0 : t, ...f }) }, h);
1201
+ }, Bt = {}, ft = (i, t, e = !0) => i === null ? null : i.pixels !== null ? e ? i.pixels : t - i.pixels : (e ? i.percent : 100 - i.percent) / 100 * t, Ot = (i, t = !0) => i?.percent ? `${t ? i.percent : 100 - i.percent}%` : i?.pixels ? `${i.pixels}px` : void 0, ut = (i, t) => {
1202
+ if (i == null) return null;
1203
+ const e = { percent: null, pixels: null };
1204
+ let n = t;
1205
+ return typeof i == "string" && ((i = i.trim().toLowerCase()).endsWith("px") ? (i = i.substring(0, i.length - 2), n = !1) : i.endsWith("%") && (i = i.substring(0, i.length - 1), n = !0), i = parseFloat(i)), n ? e.percent = i : e.pixels = i, Object.freeze(e);
1206
+ }, Vo = gt(Lt((i, t) => {
1207
+ const { elementBefore: e, elementAfter: n, splitDirection: o = "row", fixedPane: r = null, position: a, onPositionChange: h, minBefore: s, maxBefore: l, minAfter: c, maxAfter: u, children: d, className: f, style: v, disabled: g = !1, onDragStart: b, onDragResize: T, onDragFinish: _, resizerProps: w = Bt, paneProps: x = Bt, paneBeforeProps: A = Bt, paneAfterProps: P = Bt, createResizer: I = ro } = i;
1208
+ if (d) throw new Error("Use elementBefore and elementAfter instead of children.");
1209
+ const O = K(() => it.isValidElement(n) && it.isValidElement(e), [n, e]), y = K(() => {
1210
+ let k = null;
1211
+ r && (r === "before" ? k = 0 : r === "after" && (k = 1));
1212
+ const H = k === null;
1213
+ return { fixedPaneOffset: k, isPercent: H, minBefore: ut(s, H), maxBefore: ut(l, H), minAfter: ut(c, H), maxAfter: ut(u, H) };
1214
+ }, [s, l, c, u]), E = D(h, [h]), [M, p] = J(() => ut(a, r === null));
1215
+ V(() => {
1216
+ p(ut(a, r === null));
1217
+ }, [a, r]);
1218
+ const [L, { width: m, height: C }] = mt(), [N, { width: Q, height: j }] = mt(), tt = o === "row" ? Q : j, F = o === "row" ? m : C, B = K(() => ((k, H, Z, U) => {
1219
+ const lt = [null, null], ot = [null, null];
1220
+ if (k || (k = { percent: U.fixedPaneOffset === null ? 50 : null, pixels: U.fixedPaneOffset === null ? null : 0 }), H === 0) return k?.pixels != null ? U.fixedPaneOffset !== 1 ? (lt[0] = k?.pixels, ot[1] = 100) : (lt[1] = k?.pixels - Z, ot[0] = 100) : k?.percent != null && (U.fixedPaneOffset !== 1 ? (ot[0] = k?.percent, ot[1] = 100 - k?.percent) : (ot[1] = k?.percent, ot[0] = 100 - k?.percent)), { percents: ot, pixels: lt, minBefore: Ot(U.minBefore, !0), maxBefore: Ot(U.maxBefore, !0), minAfter: Ot(U.minAfter), maxAfter: Ot(U.maxAfter) };
1221
+ let ht = ft(k, H, U.fixedPaneOffset !== 1), nt = H - Z, de = ft(U.minBefore, nt, !0) ?? 0, rn = ft(U.maxBefore, nt, !0) ?? nt, Pt = 0, Vt = 0, pe = 0, fe = nt;
1222
+ Pt = (ft(U.maxAfter, H, !1) ?? Z) - Z, Vt = ft(U.minAfter, H, !1) ?? H, pe = Math.max(de, Pt), fe = Math.min(rn, Vt), ht = Math.max(pe, Math.min(ht, fe)), Vt = Math.min(nt - ht, ft(U.maxAfter, nt - ht, !0) ?? nt), Pt = Math.min(nt - ht, ft(U.minAfter, nt - ht, !0) ?? nt), lt[0] = ht, lt[1] = nt - lt[0];
1223
+ const sn = Math.max(0, Math.min(100, ht / nt * 100));
1224
+ return ot[0] = sn, ot[1] = 100 - ot[0], { percents: ot, pixels: lt, minBefore: `${de}px`, minAfter: `${Pt}px`, maxBefore: `${lt[0]}px`, maxAfter: `${lt[1]}px` };
1225
+ })(M, F, tt, y), [y, M, F, tt, o]), [W, Y] = J(!1), yt = D(b, [b]), vt = D(T, [T]), $ = D(_, [_]), et = z(null), rt = z(null), pt = z(null), { style: at, className: ct, ...Ct } = x, re = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...at }, { className: Ye, style: Ue, ...Xe } = A, { className: Ge, style: Ze, ...qe } = P, Je = { flex: "1 1 100%", width: "100%", ...v, flexDirection: o, display: "flex" }, { className: se, style: le, onPointerDown: ae, ...ce } = w, Qe = D((k) => {
1226
+ const H = ut(k, r === null);
1227
+ p(H);
1228
+ }, [r]), kt = D((k) => {
1229
+ if (g || !W) return;
1230
+ const H = ue.current?.getBoundingClientRect();
1231
+ let Z = 0;
1232
+ Z = o === "row" ? (k.clientX ?? k.touches?.[0]?.clientX) - H.x : (k.clientY ?? k.touches?.[0]?.clientY) - H.y, Z = Math.max(0, Math.min(F, Z)), y.fixedPaneOffset === 1 && (Z = F - Z), a && M.pixels === Z || p({ pixels: Z, percent: null }), vt?.(Z), k.stopPropagation(), k.preventDefault();
1233
+ }, [y, o, g, W, M, F]), he = D((k) => {
1234
+ if (document.removeEventListener("pointermove", kt), document.removeEventListener("touchmove", kt), document.removeEventListener("pointerup", he), !!W && (Y(!1), !!M)) {
1235
+ if ($(M.pixels), !ut(a, r === null) || M.pixels !== a) {
1236
+ const H = { ...M };
1237
+ H.percent === null && (H.percent = H.pixels / F * 100), E(H);
1238
+ }
1239
+ k.stopPropagation(), k.preventDefault();
1240
+ }
1241
+ }, [M, W, a, r, F]), tn = D((k) => {
1242
+ ae?.(k), k.defaultPrevented || g || W || (Y(!0), yt(), document.addEventListener("pointermove", kt, { passive: !1 }), document.addEventListener("touchmove", kt, { passive: !1 }), document.addEventListener("pointerup", he, { passive: !1 }));
1243
+ }, [ae]), ue = Ne(t, () => ({ setPosition: Qe, isSplitPane: () => !0 }), []), en = K(() => O ? I?.({ key: "resizer", ref: It([N, rt]), className: wt("resizer", se), onPointerDownCapture: tn, style: { cursor: g ? void 0 : o === "row" ? "ew-resize" : "ns-resize", minWidth: o === "row" ? "2px" : void 0, minHeight: o !== "row" ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...le }, splitDirection: o, disabled: g, ...ce }) : null, [O, se, ce, o, le, g]), Dt = o === "row" ? "Width" : "Height", nn = K(() => {
1244
+ if (!e) return null;
1245
+ const k = { ...re, ...Ue, flex: y.fixedPaneOffset === 0 && B?.pixels[0] !== null ? `0 0 ${Math.round(B?.pixels[0])}px` : `1 1 ${Math.round(B?.percents[0] ?? 100)}%`, [`min${Dt}`]: B?.minBefore, [`max${Dt}`]: n ? B?.maxBefore : "100%" };
1246
+ return S("div", { ref: et, className: wt("before", ct, Ye), style: k, ...Ct, ...Xe, children: e }, "before");
1247
+ }, [e, x, A, y, B]), on = K(() => {
1248
+ if (!n) return null;
1249
+ const k = { ...re, ...Ze, flex: y.fixedPaneOffset === 1 && B?.pixels[1] !== null ? `0 0 ${Math.round(B?.pixels[1])}px` : `1 1 ${Math.round(B?.percents[1] ?? 100)}%`, [`min${Dt}`]: B?.minAfter, [`max${Dt}`]: e ? B?.maxAfter : "100%" };
1250
+ return S("div", { ref: pt, className: wt("after", ct, Ge), style: k, ...Ct, ...qe, children: n }, "after");
1251
+ }, [n, x, P, y, B]);
1252
+ return bt("div", { ref: It([L, ue]), className: wt("splitPane", o === "row" ? "vertical" : "horizontal", { dragging: W }, f), style: Je, children: [nn, en, on] });
1253
+ }));
1254
+ function so(i) {
1255
+ if (typeof i == "function") return i;
1256
+ if (typeof i == "string") {
1257
+ const t = i.trim();
1258
+ if (t.startsWith("data:image/svg+xml")) {
1259
+ const e = (function(n) {
1260
+ const o = /^data:image\/svg\+xml(;[^,]*)?,(.*)$/i.exec(n.trim());
1261
+ if (!o) return null;
1262
+ const r = o[1] || "", a = o[2] || "";
1263
+ try {
1264
+ if (/;base64/i.test(r)) {
1265
+ if (typeof atob < "u") {
1266
+ const h = atob(a);
1267
+ if (typeof TextDecoder < "u") {
1268
+ const l = new Uint8Array(h.length);
1269
+ for (let c = 0; c < h.length; c++) l[c] = h.charCodeAt(c);
1270
+ return new TextDecoder("utf-8").decode(l);
1271
+ }
1272
+ let s = "";
1273
+ for (let l = 0; l < h.length; l++)
1274
+ s += `%${h.charCodeAt(l).toString(16).padStart(2, "0")}`;
1275
+ return decodeURIComponent(s);
1276
+ }
1277
+ return (globalThis.Buffer ? globalThis.Buffer.from(a, "base64") : require("buffer").Buffer.from(a, "base64")).toString("utf-8");
1278
+ }
1279
+ try {
1280
+ return decodeURIComponent(a);
1281
+ } catch {
1282
+ return a;
1283
+ }
1284
+ } catch {
1285
+ return null;
1286
+ }
1287
+ })(t);
1288
+ if (e) return ke(e);
1289
+ }
1290
+ if (t.startsWith("<")) {
1291
+ if (/^<\s*svg\b/i.test(t)) return ke(t);
1292
+ if (/^<\s*path\b/i.test(t)) {
1293
+ const e = Te(t);
1294
+ if (e) return { paths: [{ d: e }] };
1295
+ }
1296
+ return { paths: [{ d: t }] };
1297
+ }
1298
+ return { paths: [{ d: t }] };
1299
+ }
1300
+ if (Array.isArray(i)) {
1301
+ const t = [];
1302
+ for (const e of i) if (typeof e == "string") {
1303
+ const n = String(e).trim();
1304
+ if (n.startsWith("<path")) {
1305
+ const o = Te(n);
1306
+ o && t.push({ d: o });
1307
+ } else t.push({ d: n });
1308
+ } else e && typeof e == "object" && "d" in e && typeof e.d == "string" && t.push({ ...e });
1309
+ return { paths: t };
1310
+ }
1311
+ return i;
1312
+ }
1313
+ function Te(i) {
1314
+ const t = /\bd\s*=\s*(?:"([^"]+)"|'([^']+)')/i.exec(i);
1315
+ return t ? t[1] ?? t[2] ?? null : null;
1316
+ }
1317
+ function Me(i) {
1318
+ if ("svg" in i) return { ...i, svg: so(i.svg) };
1319
+ if ("url" in i) {
1320
+ const t = typeof i.url == "string" ? { src: i.url } : i.url;
1321
+ return { ...i, url: t };
1322
+ }
1323
+ if ("emoji" in i) {
1324
+ const t = typeof i.emoji == "string" ? i.emoji : i.emoji.text;
1325
+ return { ...i, emoji: t };
1326
+ }
1327
+ return i;
1328
+ }
1329
+ function ke(i) {
1330
+ try {
1331
+ if (typeof DOMParser < "u") {
1332
+ const a = new DOMParser().parseFromString(i, "image/svg+xml"), h = a.querySelector("svg"), s = h?.getAttribute("viewBox") ?? void 0, l = [];
1333
+ return a.querySelectorAll("path").forEach((c) => {
1334
+ const u = c.getAttribute("d");
1335
+ if (!u) return;
1336
+ const d = { d: u }, f = c.getAttribute("class");
1337
+ f && (d.className = f);
1338
+ const v = c.getAttribute("fill");
1339
+ v && v !== "none" && (d.fill = v);
1340
+ const g = c.getAttribute("stroke");
1341
+ g && (d.stroke = g);
1342
+ const b = c.getAttribute("opacity");
1343
+ b && (d.opacity = Number(b));
1344
+ const T = c.getAttribute("fill-rule");
1345
+ T && (d.fillRule = T);
1346
+ const _ = c.getAttribute("clip-rule");
1347
+ _ && (d.clipRule = _), l.push(d);
1348
+ }), { viewBox: s, paths: l };
1349
+ }
1350
+ } catch {
1351
+ }
1352
+ const t = i.match(/viewBox="([^"]+)"/i), e = t ? t[1] : void 0, n = [], o = /<path\b[^>]*\sd="([^"]+)"[^>]*>/gi;
1353
+ let r;
1354
+ for (; r = o.exec(i); ) n.push({ d: r[1] });
1355
+ return { viewBox: e, paths: n };
1356
+ }
1357
+ function De(i) {
1358
+ const t = {};
1359
+ for (const [r, a] of Object.entries(i.icons)) t[r] = Me(a);
1360
+ const e = { label: i.meta?.label ?? "Unnamed", version: i.meta?.version ?? "1.0.0", license: i.meta?.license ?? "MIT", defaultViewBox: "0 0 24 24", extends: i.meta?.extends ?? [] };
1361
+ e.extends.includes("base") || e.extends.push("base");
1362
+ const n = { meta: e, icons: t }, o = i.overrides;
1363
+ if (o) {
1364
+ const r = {};
1365
+ for (const [a, h] of Object.entries(o)) {
1366
+ const s = {};
1367
+ for (const [l, c] of Object.entries(h)) s[l] = Me(c);
1368
+ r[a] = s;
1369
+ }
1370
+ n.__overrides = r;
1371
+ }
1372
+ return n;
1373
+ }
1374
+ function lo() {
1375
+ const i = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
1376
+ let e = "base", n = /* @__PURE__ */ new Map();
1377
+ async function o(s) {
1378
+ const l = i.get(s ?? e);
1379
+ if (!l) throw new Error(`Icon pack not registered: ${s}`);
1380
+ if (!l.pack) {
1381
+ if (!l.loading) {
1382
+ if (!l.loader) throw new Error(`No loader for icon pack: ${s}`);
1383
+ l.loading = l.loader().then((c) => {
1384
+ const u = c && typeof c == "object" && "default" in c ? c.default : c;
1385
+ l.pack = De(u);
1386
+ }).catch((c) => {
1387
+ throw l.loading = void 0, c;
1388
+ });
1389
+ }
1390
+ await l.loading;
1391
+ }
1392
+ }
1393
+ function r(s) {
1394
+ const l = s.indexOf(":");
1395
+ return l > 0 ? { ns: s.slice(0, l), key: s.slice(l + 1) } : { key: s };
1396
+ }
1397
+ function a(s, l) {
1398
+ const c = [s, ...i.get(s)?.pack?.meta.extends ?? []];
1399
+ for (const u of c) {
1400
+ const d = i.get(u);
1401
+ if (!d?.pack) continue;
1402
+ const { icons: f } = d.pack, v = f[t.get(u)?.get(l) ?? l] ?? f[l];
1403
+ if (v) return { glyph: v, pack: d.pack, packKey: u };
1404
+ }
1405
+ return null;
1406
+ }
1407
+ function h(s, l) {
1408
+ const c = l?.packKey ?? e;
1409
+ if (l?.packKey) return a(l.packKey, s);
1410
+ if (!s) return null;
1411
+ const { ns: u, key: d } = r(s);
1412
+ if (u) {
1413
+ const f = i.get(u)?.pack;
1414
+ if (f) {
1415
+ if (i.get(e)?.pack) {
1416
+ const g = f.__overrides, b = g?.[e]?.[d];
1417
+ if (b) return { glyph: b, pack: f, packKey: u };
1418
+ }
1419
+ const v = a(u, d);
1420
+ if (v) return v;
1421
+ }
1422
+ return null;
1423
+ }
1424
+ return a(c, s);
1425
+ }
1426
+ return { register: function(s, l) {
1427
+ const c = i.get(s) ?? {};
1428
+ typeof l == "function" ? c.loader = l : c.pack = De(l), i.set(s, c), e || (e = s);
1429
+ }, prefetch: async function(s = e) {
1430
+ const l = Array.isArray(s) ? s : [s];
1431
+ await Promise.all(l.map(o));
1432
+ }, setActive: function(s) {
1433
+ e = s;
1434
+ for (const l of n.keys()) try {
1435
+ l(s);
1436
+ } catch {
1437
+ }
1438
+ }, getActive: function() {
1439
+ return e;
1440
+ }, resolve: async function(s, l) {
1441
+ let c = h(s, l);
1442
+ if (c) return c;
1443
+ const u = l?.packKey ?? e, { ns: d } = r(s);
1444
+ if (l?.packKey) {
1445
+ if (await o(u), c = h(s, l), c) return c;
1446
+ const f = i.get(u)?.pack?.meta?.extends ?? [];
1447
+ if (f.length && (await Promise.all(f.map(o)), c = h(s, l), c)) return c;
1448
+ } else if (d) {
1449
+ if (await o(d), c = h(s, l), c) return c;
1450
+ const f = i.get(d)?.pack?.meta?.extends ?? [];
1451
+ if (f.length && (await Promise.all(f.map(o)), c = h(s, l), c)) return c;
1452
+ } else {
1453
+ if (await o(u), c = h(s, l), c) return c;
1454
+ const f = i.get(u)?.pack?.meta?.extends ?? [];
1455
+ if (f.length && (await Promise.all(f.map(o)), c = h(s, l), c)) return c;
1456
+ }
1457
+ return null;
1458
+ }, registerAlias: function(s, l, c) {
1459
+ t.has(s) || t.set(s, /* @__PURE__ */ new Map()), t.get(s).set(l, c);
1460
+ }, has: function(s, l) {
1461
+ return !!h(s, l);
1462
+ }, getPack: function(s) {
1463
+ return i.get(s ?? e)?.pack;
1464
+ }, hasPack: function(s) {
1465
+ return !!i.get(s)?.pack;
1466
+ }, listPacks: function() {
1467
+ return Array.from(i.keys());
1468
+ }, listIcons: function(s) {
1469
+ const l = i.get(s)?.pack;
1470
+ return l ? Object.keys(l.icons) : [];
1471
+ }, addActiveListener: function(s) {
1472
+ const l = n.get(s);
1473
+ if (l) return l;
1474
+ const c = () => {
1475
+ n.delete(s);
1476
+ };
1477
+ return n.set(s, c), c;
1478
+ } };
1479
+ }
1480
+ const Kt = lo();
1481
+ Kt.register("base", () => import("./DG6oB4sgLAgJaOve.mjs"));
1482
+ const Pe = (i) => S("svg", { ...i, children: S("path", {}) }), ao = { Icon: "_Icon_1ipwo_10" }, co = gt((i) => {
1483
+ const { iconKey: t, packKey: e, className: n, style: o, role: r, title: a, size: h, ariaHidden: s, sourceProps: l, children: c, ...u } = i, [d, f] = it.useState(null);
1484
+ it.useEffect(() => {
1485
+ let p = !0, L = e, m = t;
1486
+ if (!m) {
1487
+ const C = Kt.getPack(L);
1488
+ return void f({ glyph: C ? { svg: G.EmptyArray } : void 0, pack: C ?? void 0, packKey: L ?? Kt.getActive() });
1489
+ }
1490
+ if (m.includes(":")) {
1491
+ const [C, N] = m.split(":");
1492
+ L = C, m = N;
1493
+ }
1494
+ return Kt.resolve(m, { packKey: L }).then((C) => {
1495
+ p && f(C);
1496
+ }), () => {
1497
+ p = !1;
1498
+ };
1499
+ }, [t, e]);
1500
+ const v = d?.pack, g = d?.glyph, b = d?.packKey;
1501
+ let T = g ? g.svg : void 0;
1502
+ const _ = g && !T ? g.url : void 0, w = !g || T || _ ? void 0 : g.emoji, x = h != null ? typeof h == "number" ? `${h}px` : h : void 0, A = K(() => [ao.Icon, "icon", n].filter(Boolean).join(" "), [n]), P = K(() => {
1503
+ const p = { ...o };
1504
+ return p["--icon-size"] = x, p;
1505
+ }, [o, x]), I = r ?? (a ? "img" : "presentation"), O = s ?? (!a || void 0), y = (p) => S("span", { className: A, style: P, role: I, "aria-hidden": O, title: a, "data-icon-glyph": t, "data-icon-pack": b, ...u, children: p });
1506
+ if (c) return y(c);
1507
+ if (w) return y(S("span", { children: typeof w == "string" ? w : w.text }));
1508
+ if (_) return y(S("img", { src: _.src, alt: a ?? "" }));
1509
+ if (g && "react" in g) {
1510
+ const p = g.react, L = { className: A, style: P, role: I, "aria-hidden": O, title: a, ...u, ...l };
1511
+ return y(S(p, { ...L }));
1512
+ }
1513
+ const E = { viewBox: T?.viewBox ?? v?.meta.defaultViewBox ?? "0 0 24 24" };
1514
+ if (typeof T == "function")
1515
+ return y(T(E) ?? S(Pe, { ...E }));
1516
+ if (!T) return y(S(Pe, { ...E }));
1517
+ const M = T.paths;
1518
+ return y(S("svg", { ...E, children: M ? M.map((p, L) => S("path", { d: p.d, className: p.className, fill: p.fill, stroke: p.stroke, opacity: p.opacity, fillRule: p.fillRule, clipRule: p.clipRule }, L)) : null }));
1519
+ });
1520
+ function Wo(i) {
1521
+ const { isWalking: t = !1, themedType: e = "info", speed: n = 120, dashGap: o = 3, dashLength: r = 5, iconKey: a, packKey: h, style: s, className: l, ...c } = i, u = K(() => {
1522
+ if (!t) return;
1523
+ const f = { "--walk-duration": `${n * (o + r)}ms`, "--walk-dash-length": `${r}px`, "--walk-dash-gap": `${o}px` };
1524
+ return e && e !== "accent" && (f["--icon-accent"] = `var(--icon-${e})`), f;
1525
+ }, [t, n, o, r, e]), d = K(() => t ? l + " walking" : l, [t, l]);
1526
+ return S(co, { iconKey: a, packKey: h, className: d, style: { ...s, ...u }, ...c });
1527
+ }
1481
1528
  export {
1482
- nt as Command,
1483
- Oo as CommandButtonType,
1484
- jt as CommandGroup,
1485
- Ke as DefaultDynamicIconService,
1486
- Zn as DefaultReactNotifier,
1487
- Gn as DynamicIcon,
1488
- So as FocusKeyNavigation,
1489
- _o as HorizontalAlignment,
1490
- mo as KeyCodes,
1491
- G as KeyModifiers,
1492
- go as MouseButtonCodes,
1493
- To as NotifierProvider,
1494
- Et as NotifierType,
1529
+ ee as Command,
1530
+ Bo as CommandButtonType,
1531
+ Fe as CommandGroup,
1532
+ Kt as DefaultDynamicIconService,
1533
+ Wn as DefaultReactNotifier,
1534
+ co as DynamicIcon,
1535
+ Ho as ErrorTestPanel,
1536
+ Eo as FocusKeyNavigation,
1537
+ mo as HorizontalAlignment,
1538
+ go as KeyCodes,
1539
+ X as KeyModifiers,
1540
+ yo as MouseButtonCodes,
1541
+ Co as NotifierProvider,
1542
+ be as NotifierType,
1543
+ Io as ReactErrorBoundary,
1495
1544
  xo as ReactUtils,
1496
1545
  Lo as RoundedTab,
1497
- Kn as ScrollPane,
1498
- vo as ScrollUtils,
1499
- ot as Scrollbar,
1500
- se as ScrollbarOrientation,
1501
- Ue as SimpleCommand,
1502
- Co as SplitPane,
1503
- jn as SplitPaneResizer,
1504
- bo as ToolTipPlacement,
1505
- Wn as VirtualScrollbar,
1506
- Eo as WalkingIcon,
1507
- Xn as createDynamicIconService,
1508
- $n as defaultCreateScrollCorner,
1509
- yo as defaultCreateScrollEdgeButton,
1546
+ $n as ScrollPane,
1547
+ wo as ScrollUtils,
1548
+ oe as Scrollbar,
1549
+ st as ScrollbarOrientation,
1550
+ Ut as SimpleCommand,
1551
+ Vo as SplitPane,
1552
+ ro as SplitPaneResizer,
1553
+ So as ToolTipPlacement,
1554
+ No as UncaughtErrorBoundary,
1555
+ Vn as VirtualScrollbar,
1556
+ Wo as WalkingIcon,
1557
+ lo as createDynamicIconService,
1558
+ On as defaultCreateScrollCorner,
1559
+ vo as defaultCreateScrollEdgeButton,
1510
1560
  wn as defaultCreateScrollEndButton,
1511
- xn as defaultCreateScrollStartButton,
1512
- xt as defaultCreateScrollbar,
1513
- ko as getDevicePixelRatio,
1514
- Me as toShortcutString,
1515
- M as useCallbackRef,
1516
- zo as useCommand,
1517
- Bo as useCommands,
1518
- $o as useCopyPaste,
1519
- Mo as useDevicePixelRatio,
1520
- Ao as useEditMode,
1521
- wo as useFullscreenPortal,
1522
- ro as useGlobalClipboard,
1523
- Ro as useId,
1524
- It as useImperativeElement,
1525
- Po as useMouseDownAndHoldListener,
1561
+ vn as defaultCreateScrollStartButton,
1562
+ xe as defaultCreateScrollbar,
1563
+ Mo as getDevicePixelRatio,
1564
+ Mt as toShortcutString,
1565
+ D as useCallbackRef,
1566
+ Ao as useCommand,
1567
+ zo as useCommands,
1568
+ Oo as useCopyPaste,
1569
+ To as useDevicePixelRatio,
1570
+ Po as useEditMode,
1571
+ bo as useFullscreenPortal,
1572
+ Jn as useGlobalClipboard,
1573
+ Ko as useId,
1574
+ Ne as useImperativeElement,
1575
+ Do as useMouseDownAndHoldListener,
1526
1576
  Ht as useNotifier,
1527
- Do as useOnClickOrFocusAway,
1528
- qn as useSynchronizedPointerHandler,
1529
- Ko as useTraceUpdate,
1530
- Io as useUndoManager
1577
+ ko as useOnClickOrFocusAway,
1578
+ jn as useSynchronizedPointerHandler,
1579
+ $o as useTraceUpdate,
1580
+ Ro as useUndoManager
1531
1581
  };