@sheetxl/utils-react 0.7.10 → 0.7.12

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,39 +1,39 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(":root{--scrollbar-track-color: rgba(0,0,0,.06);--scrollbar-thumb-color: rgba(0,0,0,.35);--scrollbar-button-color: var(--scrollbar-thumb-color);--scrollbar-active-color: rgba(0,0,0,.55);--scrollbar-corner-color: transparent;--scrollbar-border-color: transparent;--scrollbar-size: 13px;--scrollbar-width: var(--scrollbar-size);--scrollbar-height: var(--scrollbar-size);--scrollbar-border-radius: 9999px;--scrollbar-border-width: 2px;--scrollbar-min-thumb-size: 24px}._scrollbar_1v478_17 ::-webkit-scrollbar-button{background:transparent}._scrollbar_1v478_17{display:flex;overflow:hidden;border-radius:var(--scrollbar-border-radius);align-items:center;border:var(--scrollbar-border-width) solid transparent}._scrollbar_1v478_17 ._vsb-track_1v478_27{background:var(--scrollbar-track-color);border-radius:var(--scrollbar-border-radius);position:relative;flex:1 1 100%;border:var(--scrollbar-border-width) solid transparent;touch-action:none;box-sizing:border-box;overflow:hidden}._scrollbar_1v478_17 ._vsb-thumb_1v478_39{background:var(--scrollbar-thumb-color);border-radius:var(--scrollbar-border-radius);transition:background .12s;touch-action:none}._scrollbar_1v478_17 ._vsb-thumb_1v478_39:hover{background:var(--scrollbar-active-color)}._scrollbar_1v478_17.vertical{flex-direction:column;min-width:var(--scrollbar-width, 0px)}._scrollbar_1v478_17.vertical ._vsb-thumb_1v478_39{min-height:var(--scrollbar-min-thumb-size)}._scrollbar_1v478_17.vertical ._vsb-track_1v478_27{width:100%}._scrollbar_1v478_17.horizontal{flex-direction:row;min-height:var(--scrollbar-height, 0px)}._scrollbar_1v478_17.horizontal ._vsb-thumb_1v478_39{min-width:var(--scrollbar-min-thumb-size)}._scrollbar_1v478_17.horizontal ._vsb-track_1v478_27{height:100%}._scrollbar_1v478_17.dragging ._vsb-thumb_1v478_39{background:var(--scrollbar-active-color)}._scrollbar-button_1v478_80{display:flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0}._scrollbar-button_1v478_80>*{fill:var(--scrollbar-button-color);transition:fill .12s ease}._scrollbar-button_1v478_80:hover:not([disabled])>*{fill:var(--scrollbar-active-color)}._scrollbar-button_1v478_80[disabled]>*{fill:var(--scrollbar-button-color);opacity:.5}._scrollbar-button_1v478_80.vertical{width:var(--scrollbar-width)}._scrollbar-button_1v478_80.horizontal{height:var(--scrollbar-height)}._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(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { jsx as C, Fragment as Ce, jsxs as Me } from "react/jsx-runtime";
3
- import se, { version as an, useLayoutEffect as pt, useEffect as I, useState as Y, useMemo as K, createContext as cn, useContext as hn, useCallback as V, useRef as O, createElement as un, useReducer as dn, useImperativeHandle as pn, memo as ve, forwardRef as Pe, Component as fn } from "react";
4
- import { unstable_batchedUpdates as _n, createPortal as mn } from "react-dom";
5
- import { DefaultNotifier as gn, Notifier as ye, CommonUtils as q, InternalClipboard as Ge, ClipboardUtils as tt, MimeType as nt } from "@sheetxl/utils";
6
- import { createRoot as yn } from "react-dom/client";
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(":root{--scrollbar-track-color: rgba(0,0,0,.06);--scrollbar-thumb-color: rgba(0,0,0,.35);--scrollbar-button-color: var(--scrollbar-thumb-color);--scrollbar-active-color: rgba(0,0,0,.55);--scrollbar-corner-color: transparent;--scrollbar-border-color: transparent;--scrollbar-size: 13px;--scrollbar-width: var(--scrollbar-size);--scrollbar-height: var(--scrollbar-size);--scrollbar-border-radius: 9999px;--scrollbar-border-width: 2px;--scrollbar-min-thumb-size: 24px}._scrollbar_1v478_17 ::-webkit-scrollbar-button{background:transparent}._scrollbar_1v478_17{display:flex;overflow:hidden;border-radius:var(--scrollbar-border-radius);align-items:center;border:var(--scrollbar-border-width) solid transparent}._scrollbar_1v478_17 ._vsb-track_1v478_27{background:var(--scrollbar-track-color);border-radius:var(--scrollbar-border-radius);position:relative;flex:1 1 100%;border:var(--scrollbar-border-width) solid transparent;touch-action:none;box-sizing:border-box;overflow:hidden}._scrollbar_1v478_17 ._vsb-thumb_1v478_39{background:var(--scrollbar-thumb-color);border-radius:var(--scrollbar-border-radius);transition:background .12s;touch-action:none}._scrollbar_1v478_17 ._vsb-thumb_1v478_39:hover{background:var(--scrollbar-active-color)}._scrollbar_1v478_17.vertical{flex-direction:column;min-width:var(--scrollbar-width, 0px)}._scrollbar_1v478_17.vertical ._vsb-thumb_1v478_39{min-height:var(--scrollbar-min-thumb-size)}._scrollbar_1v478_17.vertical ._vsb-track_1v478_27{width:100%}._scrollbar_1v478_17.horizontal{flex-direction:row;min-height:var(--scrollbar-height, 0px)}._scrollbar_1v478_17.horizontal ._vsb-thumb_1v478_39{min-width:var(--scrollbar-min-thumb-size)}._scrollbar_1v478_17.horizontal ._vsb-track_1v478_27{height:100%}._scrollbar_1v478_17.dragging ._vsb-thumb_1v478_39{background:var(--scrollbar-active-color)}._scrollbar-button_1v478_80{display:flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0}._scrollbar-button_1v478_80>*{fill:var(--scrollbar-button-color);transition:fill .12s ease}._scrollbar-button_1v478_80:hover:not([disabled])>*{fill:var(--scrollbar-active-color)}._scrollbar-button_1v478_80[disabled]>*{fill:var(--scrollbar-button-color);opacity:.5}._scrollbar-button_1v478_80.vertical{width:var(--scrollbar-width)}._scrollbar-button_1v478_80.horizontal{height:var(--scrollbar-height)}._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_1ld90_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_1ld90_10 .sm{--font-size: var(--icon-size-sm)}._Icon_1ld90_10 .md{--font-size: var(--icon-size-md)}._Icon_1ld90_10 .lg{--font-size: var(--icon-size-lg)}._Icon_1ld90_10 .xl{--font-size: var(--icon-size-xl)}._Icon_1ld90_10>svg{width:var(--icon-size);height:var(--icon-size)}._Icon_1ld90_10>img{aspect-ratio:1 / 1;display:block;line-height:1}._Icon_1ld90_10 .fill,._Icon_1ld90_10 .line{--layer-color: var(--icon-color);--layer-opacity: var(--icon-main-opacity)}._Icon_1ld90_10 .secondary{--layer-color: var(--icon-secondary-color)}._Icon_1ld90_10 .tertiary{--layer-color: var(--icon-tertiary-color)}._Icon_1ld90_10 .primary{--layer-color: var(--sxl-app-color-primary, var(--icon-primary, #595b5e))}._Icon_1ld90_10 .secondary{--layer-color: var(--sxl-app-color-secondary, #9c27b0)}._Icon_1ld90_10 .secondary.light{--layer-color: var(--sxl-app-color-secondary-light, #a060ac)}._Icon_1ld90_10 .success{--layer-color: var(--sxl-app-color-success, #22c55e)}._Icon_1ld90_10 .success.light{--layer-color: var(--sxl-app-color-success-light, #22c55e)}._Icon_1ld90_10 .info{--layer-color: var(--sxl-app-color-info, #3b82f6)}._Icon_1ld90_10 .warn{--layer-color: var(--sxl-app-color-warn, #f59e0b)}._Icon_1ld90_10 .error{--layer-color: var(--sxl-app-color-error, #ef4444)}._Icon_1ld90_10 .error.light{--layer-color: var(--sxl-app-color-error-light, #f87171)}._Icon_1ld90_10 .grey{--layer-color: var(--sxl-app-color-grey, #cccccc)}._Icon_1ld90_10 .shadow{--layer-color: var(--sxl-app-color-shadow, #cccccc)}._Icon_1ld90_10 .fill:not(.fixed):not([fill]){fill:var(--layer-color);opacity:var(--layer-opacity);stroke:none}._Icon_1ld90_10 .line:not(.fixed):not([stroke]){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_1ld90_10 .invert-dark{filter:invert(1) hue-rotate(180deg)}}._Icon_1ld90_10 .muted{opacity:calc(var(--layer-opacity, 1) * .6)}@keyframes _sxl-walk_1ld90_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_1ld90_1 var(--walk-duration, .96s) linear infinite;will-change:stroke-dashoffset}")),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { jsx as C, Fragment as Me, jsxs as Ce } from "react/jsx-runtime";
3
+ import re, { version as hn, useLayoutEffect as _t, useEffect as N, useState as F, useMemo as R, createContext as un, useContext as dn, useRef as O, useReducer as Ht, useCallback as V, createElement as pn, useImperativeHandle as fn, memo as we, forwardRef as ke, Component as mn } from "react";
4
+ import { unstable_batchedUpdates as _n, createPortal as gn } from "react-dom";
5
+ import { DefaultNotifier as yn, Notifier as ye, CommonUtils as q, InternalClipboard as Ze, ClipboardUtils as ot, MimeType as it } from "@sheetxl/utils";
6
+ import { createRoot as vn } from "react-dom/client";
7
7
  /**
8
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.10
8
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.12
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 So = { General: "general", Left: "left", Right: "right", Center: "center", Justify: "justify", Fill: "fill", Distributed: "distributed", CenterContinuous: "centerContinuous" }, U = { Shift: "shift", Alt: "alt", Ctrl: "ctrl", Meta: "meta" }, Eo = { 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 }, Lo = { Left: 1, Middle: 2, Right: 3 }, ae = { Horizontal: "horizontal", Vertical: "vertical" };
14
- function Rt(i) {
13
+ const To = { General: "general", Left: "left", Right: "right", Center: "center", Justify: "justify", Fill: "fill", Distributed: "distributed", CenterContinuous: "centerContinuous" }, Y = { Shift: "shift", Alt: "alt", Ctrl: "ctrl", Meta: "meta" }, ko = { 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 }, Po = { Left: 1, Middle: 2, Right: 3 }, ae = { Horizontal: "horizontal", Vertical: "vertical" };
14
+ function It(i) {
15
15
  var e, t, 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 = Rt(i[e])) && (n && (n += " "), n += t);
19
+ for (e = 0; e < o; e++) i[e] && (t = It(i[e])) && (n && (n += " "), n += t);
20
20
  } else for (t in i) i[t] && (n && (n += " "), n += t);
21
21
  return n;
22
22
  }
23
23
  function le() {
24
- for (var i, e, t = 0, n = "", o = arguments.length; t < o; t++) (i = arguments[t]) && (e = Rt(i)) && (n && (n += " "), n += e);
24
+ for (var i, e, t = 0, n = "", o = arguments.length; t < o; t++) (i = arguments[t]) && (e = It(i)) && (n && (n += " "), n += e);
25
25
  return n;
26
26
  }
27
- function ot(i, e) {
27
+ function rt(i, e) {
28
28
  if (typeof i == "function") return i(e);
29
29
  i && (i.current = e);
30
30
  }
31
- var Oe = parseInt(an.split(".")[0], 10) >= 19 ? function(i) {
31
+ var $e = parseInt(hn.split(".")[0], 10) >= 19 ? function(i) {
32
32
  return (e) => {
33
33
  const t = [];
34
34
  for (const n of i) {
35
- const o = ot(n, e), r = typeof o == "function";
36
- t.push(r ? o : () => ot(n, null));
35
+ const o = rt(n, e), r = typeof o == "function";
36
+ t.push(r ? o : () => rt(n, null));
37
37
  }
38
38
  return () => {
39
39
  for (const n of t) n();
@@ -41,28 +41,28 @@ var Oe = parseInt(an.split(".")[0], 10) >= 19 ? function(i) {
41
41
  };
42
42
  } : function(i) {
43
43
  return (e) => {
44
- for (const t of i) ot(t, e);
44
+ for (const t of i) rt(t, e);
45
45
  };
46
- }, vn = function() {
47
- }, It = typeof window < "u", wn = It ? pt : I, xt = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
48
- const Te = It && window.ResizeObserver !== void 0 ? function() {
49
- var i = Y(null), e = i[0], t = i[1], n = Y(xt), o = n[0], r = n[1], a = K(function() {
46
+ }, wn = function() {
47
+ }, Vt = typeof window < "u", bn = Vt ? _t : N, Et = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
48
+ const ve = Vt && window.ResizeObserver !== void 0 ? function() {
49
+ var i = F(null), e = i[0], t = i[1], n = F(Et), o = n[0], r = n[1], a = R(function() {
50
50
  return new window.ResizeObserver(function(h) {
51
51
  if (h[0]) {
52
- var s = h[0].contentRect, l = s.x, c = s.y, u = s.width, d = s.height, f = s.top, b = s.left, _ = s.bottom, k = s.right;
53
- r({ x: l, y: c, width: u, height: d, top: f, left: b, bottom: _, right: k });
52
+ var s = h[0].contentRect, l = s.x, c = s.y, u = s.width, d = s.height, f = s.top, _ = s.left, g = s.bottom, M = s.right;
53
+ r({ x: l, y: c, width: u, height: d, top: f, left: _, bottom: g, right: M });
54
54
  }
55
55
  });
56
56
  }, []);
57
- return wn(function() {
57
+ return bn(function() {
58
58
  if (e) return a.observe(e), function() {
59
59
  a.disconnect();
60
60
  };
61
61
  }, [e]), [t, o];
62
62
  } : function() {
63
- return [vn, xt];
64
- }, St = { Default: "default", Error: "error", Success: "success", Warning: "warning", Info: "info" };
65
- class bn extends gn {
63
+ return [wn, Et];
64
+ }, Lt = { Default: "default", Error: "error", Success: "success", Warning: "warning", Info: "info" };
65
+ class xn extends yn {
66
66
  setOverrides(e) {
67
67
  super.setOverrides(e);
68
68
  }
@@ -72,7 +72,7 @@ class bn extends gn {
72
72
  showMessage(e, t) {
73
73
  const n = this.getDelegate();
74
74
  if (n?.showMessage) return n.showMessage(e, t);
75
- t?.type !== St.Warning ? t?.type !== St.Error ? ye.log(e) : ye.error(e) : ye.warn(e);
75
+ t?.type !== Lt.Warning ? t?.type !== Lt.Error ? ye.log(e) : ye.error(e) : ye.warn(e);
76
76
  }
77
77
  showBusy(e, t) {
78
78
  const n = this.getDelegate();
@@ -98,20 +98,52 @@ class bn extends gn {
98
98
  return t?.showInputOptions ? t.showInputOptions(e) : Promise.resolve({ input: "", option: "" });
99
99
  }
100
100
  }
101
- const Ht = cn(new bn()), Co = ({ children: i, notifier: e }) => (se.useEffect(() => {
101
+ const Wt = un(new xn()), Do = ({ children: i, notifier: e }) => (re.useEffect(() => {
102
102
  const t = ye.getOverrides();
103
103
  return ye.setOverrides(e), () => {
104
104
  ye.setOverrides(t);
105
105
  };
106
- }, [e]), se.createElement(Ht.Provider, { value: e }, i)), qe = () => hn(Ht), M = (i, e) => {
106
+ }, [e]), re.createElement(Wt.Provider, { value: e }, i)), Qe = () => dn(Wt), Sn = 3, En = 0.5, Ln = 50, st = (i) => ({ x: i.x, y: i.y, width: i.width, height: i.height, top: i.top, left: i.left, right: i.right, bottom: i.bottom });
107
+ function Ao(i = {}) {
108
+ const { threshold: e = En, stillnessThreshold: t = Sn, maxHierarchyDepth: n = Ln } = i, [o, r] = ve(), a = O(null), [h, s] = Ht((_) => _ + 1, 0), l = O(void 0), c = O({ x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0 }), u = V((_) => {
109
+ a.current = _, typeof o == "function" && o(_);
110
+ }, [o]), [d, f] = F(r);
111
+ return N(() => {
112
+ r && !d && f(r);
113
+ }, [r, d]), N(() => {
114
+ const _ = a.current;
115
+ if (!_) return;
116
+ let g = !1, M = 0;
117
+ const P = () => {
118
+ if (!_) return;
119
+ const S = _.getBoundingClientRect(), T = c.current;
120
+ Math.abs(S.x - T.x) > e || Math.abs(S.y - T.y) > e || Math.abs(S.width - T.width) > e || Math.abs(S.height - T.height) > e ? (g || (g = !0, f(st(S)), s()), M = 0) : M++, g && M >= t && (g = !1, f(st(S)), s()), c.current = st(S), l.current = requestAnimationFrame(P);
121
+ };
122
+ l.current = requestAnimationFrame(P);
123
+ const y = (S) => {
124
+ g = !0, s();
125
+ }, w = (S) => {
126
+ g = !1, M = t, s();
127
+ };
128
+ let m = _;
129
+ const A = [];
130
+ for (; m && m !== document.documentElement && (m.addEventListener("animationstart", y, !0), m.addEventListener("animationend", w, !0), m.addEventListener("transitionstart", y, !0), m.addEventListener("transitionend", w, !0), A.push(m), m = m.parentElement, !(A.length > n)); ) ;
131
+ return () => {
132
+ l.current && cancelAnimationFrame(l.current), A.forEach((S) => {
133
+ S.removeEventListener("animationstart", y, !0), S.removeEventListener("animationend", w, !0), S.removeEventListener("transitionstart", y, !0), S.removeEventListener("transitionend", w, !0);
134
+ });
135
+ };
136
+ }, [h, r, e, t, n]), [u, d];
137
+ }
138
+ const k = (i, e) => {
107
139
  const t = V((...r) => i?.(...r), e), n = O(null);
108
140
  n.current = t;
109
141
  const o = V((...r) => n.current?.(...r), []);
110
142
  if (n.current) return o;
111
143
  };
112
- function Mo(i) {
113
- const [e, t] = Y(typeof window < "u" ? window.devicePixelRatio : 1), n = O(null);
114
- return I(() => {
144
+ function zo(i) {
145
+ const [e, t] = F(typeof window < "u" ? window.devicePixelRatio : 1), n = O(null);
146
+ return N(() => {
115
147
  if (!(typeof window < "u" && "matchMedia" in window)) return;
116
148
  const o = () => {
117
149
  const r = window.matchMedia(`screen and (resolution: ${window.devicePixelRatio}dppx)`);
@@ -122,14 +154,14 @@ function Mo(i) {
122
154
  };
123
155
  }, [i]), e;
124
156
  }
125
- function To(i) {
157
+ function Bo(i) {
126
158
  if (typeof window > "u") return 1;
127
159
  const { defaultDpr: e = 1, maxDpr: t = 3, round: n = !0 } = i || {}, o = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : e;
128
160
  return Math.min(Math.max(1, n ? Math.floor(o) : o), t);
129
161
  }
130
- function ko(i, e, t) {
131
- const n = M(e, [e]);
132
- I(() => {
162
+ function Oo(i, e, t) {
163
+ const n = k(e, [e]);
164
+ N(() => {
133
165
  const o = (r) => {
134
166
  i.current && !i.current.contains(r.target) && n(r);
135
167
  };
@@ -138,108 +170,108 @@ function ko(i, e, t) {
138
170
  };
139
171
  }, [i]);
140
172
  }
141
- function xn(i) {
173
+ function Mn(i) {
142
174
  if (!i) throw new Error("must have a PointerHandlerOptions");
143
- 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), b = O(null), _ = O(null), k = V(() => {
144
- _.current && (clearTimeout(_.current), _.current = null);
145
- }, []), T = V((g) => {
146
- _.current = setTimeout(() => {
175
+ const { onPointerDown: e, onPointerUp: t, onPointerMoveOrWait: n, processTouch: o = !1, consumeTouch: r = !0 } = i, a = k(e, [e]), h = k(t, [t]), s = k(n, [n]), l = O(!1), c = i?.timerInitial ?? 230, u = i?.timerContinuous ?? c / 2, d = O(null), f = O(null), _ = O(null), g = O(null), M = V(() => {
176
+ g.current && (clearTimeout(g.current), g.current = null);
177
+ }, []), P = V((E) => {
178
+ g.current = setTimeout(() => {
147
179
  window.requestAnimationFrame(() => {
148
- l.current !== !1 && s?.(f.current, b.current, d.current);
149
- }), T(u);
150
- }, g ?? c);
180
+ l.current !== !1 && s?.(f.current, _.current, d.current);
181
+ }), P(u);
182
+ }, E ?? c);
151
183
  }, []);
152
- I(() => () => k(), []);
153
- const m = o ? "pointer" : "mouse", v = V((g) => {
154
- g.stopPropagation(), g.stopImmediatePropagation(), g.preventDefault();
155
- }, []), w = M((g) => {
156
- document.removeEventListener(`${m}move`, H), document.removeEventListener(`${m}up`, w), document.removeEventListener("keydown", N), document.removeEventListener("keyup", S), document.removeEventListener("touchstart", v, { capture: !0 }), document.removeEventListener("touchmove", v, { capture: !0 }), window.removeEventListener("blur", D), k(), window.requestAnimationFrame(() => {
157
- l.current !== !1 && (l.current = !1, h?.(g, b.current, d.current), b.current = null);
184
+ N(() => () => M(), []);
185
+ const y = o ? "pointer" : "mouse", w = V((E) => {
186
+ E.stopPropagation(), E.stopImmediatePropagation(), E.preventDefault();
187
+ }, []), m = k((E) => {
188
+ document.removeEventListener(`${y}move`, T), document.removeEventListener(`${y}up`, m), document.removeEventListener("keydown", I), document.removeEventListener("keyup", x), document.removeEventListener("touchstart", w, { capture: !0 }), document.removeEventListener("touchmove", w, { capture: !0 }), window.removeEventListener("blur", A), M(), window.requestAnimationFrame(() => {
189
+ l.current !== !1 && (l.current = !1, h?.(E, _.current, d.current), _.current = null);
158
190
  });
159
- }, []), D = V(() => {
160
- l.current !== !1 && (l.current = !1, w(f.current));
161
- }, []), E = M(() => {
162
- k(), T(u), window.requestAnimationFrame(() => {
163
- l.current !== !1 && s?.(f.current, b.current, d.current);
191
+ }, []), A = V(() => {
192
+ l.current !== !1 && (l.current = !1, m(f.current));
193
+ }, []), S = k(() => {
194
+ M(), P(u), window.requestAnimationFrame(() => {
195
+ l.current !== !1 && s?.(f.current, _.current, d.current);
164
196
  });
165
- }, [u]), H = M((g) => {
166
- f.current = g, E();
167
- }, []), N = M((g) => {
168
- b.current = { ctrlKey: g.ctrlKey, shiftKey: g.shiftKey, altKey: g.altKey, metaKey: g.metaKey }, E();
169
- }, []), S = M((g) => {
170
- b.current = { ctrlKey: g.ctrlKey, shiftKey: g.shiftKey, altKey: g.altKey, metaKey: g.metaKey }, E();
197
+ }, [u]), T = k((E) => {
198
+ f.current = E, S();
199
+ }, []), I = k((E) => {
200
+ _.current = { ctrlKey: E.ctrlKey, shiftKey: E.shiftKey, altKey: E.altKey, metaKey: E.metaKey }, S();
201
+ }, []), x = k((E) => {
202
+ _.current = { ctrlKey: E.ctrlKey, shiftKey: E.shiftKey, altKey: E.altKey, metaKey: E.metaKey }, S();
171
203
  }, [u]);
172
- return M((g) => {
173
- g.isDefaultPrevented() || (b.current = { ctrlKey: g.ctrlKey, shiftKey: g.shiftKey, altKey: g.altKey, metaKey: g.metaKey }, a(g, b.current) !== !1 && (d.current = g, f.current = g.nativeEvent, document.addEventListener(`${m}up`, w, { passive: !1 }), document.addEventListener(`${m}move`, H, { passive: !1 }), document.addEventListener("keydown", N, { passive: !1 }), document.addEventListener("keyup", S, { passive: !1 }), window.addEventListener("blur", D, { passive: !0 }), o && r && (document.addEventListener("touchstart", v, { passive: !1, capture: !0 }), document.addEventListener("touchmove", v, { passive: !1, capture: !0 })), l.current = !0, T(c)));
204
+ return k((E) => {
205
+ E.isDefaultPrevented() || (_.current = { ctrlKey: E.ctrlKey, shiftKey: E.shiftKey, altKey: E.altKey, metaKey: E.metaKey }, a(E, _.current) !== !1 && (d.current = E, f.current = E.nativeEvent, document.addEventListener(`${y}up`, m, { passive: !1 }), document.addEventListener(`${y}move`, T, { passive: !1 }), document.addEventListener("keydown", I, { passive: !1 }), document.addEventListener("keyup", x, { 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, P(c)));
174
206
  }, [c, o]);
175
207
  }
176
- function Po(i, e) {
177
- return xn({ onPointerDown: i, onPointerMoveOrWait: (t, n, o) => {
208
+ function $o(i, e) {
209
+ return Mn({ onPointerDown: i, onPointerMoveOrWait: (t, n, o) => {
178
210
  i?.(o);
179
211
  }, ...e });
180
212
  }
181
- const Sn = ({ initValue: i, useHookBody: e, applyStateChange: t }) => {
213
+ const Cn = ({ initValue: i, useHookBody: e, applyStateChange: t }) => {
182
214
  const n = O(i);
183
215
  if (typeof e != "function") throw new Error("function expected as hook body parameter. got " + typeof e);
184
216
  const o = e();
185
- return pt(() => {
217
+ return _t(() => {
186
218
  n.current !== o && (n.current = o, t(o));
187
219
  }, [t, o]), null;
188
- }, lt = (i) => {
220
+ }, ht = (i) => {
189
221
  console && console.warn && console.warn(i);
190
- }, it = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || void 0;
191
- let En = 1, at = !1, Nt = !1;
192
- const Ye = [], Le = [], Ze = () => {
222
+ }, lt = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || void 0;
223
+ let Tn = 1, ut = !1, Ft = !1;
224
+ const Ye = [], Le = [], qe = () => {
193
225
  Le.forEach((i) => i());
194
- }, Ln = ({ automaticContainerInternalUseOnly: i }) => {
195
- const [e, t] = Y([]), n = O([]);
196
- return n.current = e, i || at !== !1 || (Nt = !0), I(() => {
226
+ }, kn = ({ automaticContainerInternalUseOnly: i }) => {
227
+ const [e, t] = F([]), n = O([]);
228
+ return n.current = e, i || ut !== !1 || (Ft = !0), N(() => {
197
229
  let o = !0;
198
230
  function r() {
199
- if (o) return Le[0] !== r ? (i || at !== !0 || lt("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([...Ye]);
231
+ if (o) return Le[0] !== r ? (i || ut !== !0 || ht("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([...Ye]);
200
232
  }
201
- return Le.push(r), Ze(), () => {
202
- o = !1, n.current?.length > 0 && lt("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), Le.splice(Le.indexOf(r), 1), Ze();
233
+ return Le.push(r), qe(), () => {
234
+ o = !1, n.current?.length > 0 && ht("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), Le.splice(Le.indexOf(r), 1), qe();
203
235
  };
204
- }, [i]), C(Ce, { children: e.map(({ hook: o, key: r }) => un(Sn, { ...o, key: r })) });
205
- }, Cn = (i) => {
206
- const e = En++;
207
- return Ye.push({ hook: i, key: e }), Le.length === 0 && Nt === !1 && (at = !0, ((t) => {
208
- if (it.document && it.document.createElement) {
209
- const n = it.document.createElement("div");
210
- yn(n).render(C(t, { automaticContainerInternalUseOnly: !0 }));
211
- } else lt("Can not mount SingletonHooksContainer on server side. Did you manage to run useEffect on server? Please mount SingletonHooksContainer into your components tree manually.");
212
- })(Ln)), Ze(), () => {
213
- Ye.splice(Ye.findIndex((t) => t.key === e), 1), Ze();
236
+ }, [i]), C(Me, { children: e.map(({ hook: o, key: r }) => pn(Cn, { ...o, key: r })) });
237
+ }, Pn = (i) => {
238
+ const e = Tn++;
239
+ return Ye.push({ hook: i, key: e }), Le.length === 0 && Ft === !1 && (ut = !0, ((t) => {
240
+ if (lt.document && lt.document.createElement) {
241
+ const n = lt.document.createElement("div");
242
+ vn(n).render(C(t, { automaticContainerInternalUseOnly: !0 }));
243
+ } else ht("Can not mount SingletonHooksContainer on server side. Did you manage to run useEffect on server? Please mount SingletonHooksContainer into your components tree manually.");
244
+ })(kn)), qe(), () => {
245
+ Ye.splice(Ye.findIndex((t) => t.key === e), 1), qe();
214
246
  };
215
247
  };
216
- let ct = null;
217
- ct || (ct = (i, e, t = {}) => {
248
+ let dt = null;
249
+ dt || (dt = (i, e, t = {}) => {
218
250
  let n, o, r = !1, a = !1, h = [], { unmountIfNoConsumers: s = !1 } = t;
219
251
  const l = (u) => {
220
252
  o = u, _n(() => h.forEach((d) => d(u)));
221
253
  }, c = () => (a || (o = typeof i == "function" ? i() : i, a = !0), o);
222
254
  return () => {
223
- const [u, d] = Y(c);
224
- return I(() => (r || (r = !0, n = Cn({ initValue: i, useHookBody: e, applyStateChange: l })), h.push(d), o !== u && d(o), () => {
255
+ const [u, d] = F(c);
256
+ return N(() => (r || (r = !0, n = Pn({ initValue: i, useHookBody: e, applyStateChange: l })), h.push(d), o !== u && d(o), () => {
225
257
  h.splice(h.indexOf(d), 1), h.length === 0 && s && (n(), r = !1);
226
258
  }), []), u;
227
259
  };
228
260
  });
229
- const Wt = ct;
230
- let Vt = () => {
261
+ const jt = dt;
262
+ let Ut = () => {
231
263
  console.warn("You must call useEditMode before setting its state.");
232
264
  };
233
- const Mn = Wt(null, () => {
234
- const [i, e] = Y(null);
235
- return Vt = e, i;
236
- }), Do = () => {
237
- const i = Mn();
238
- return K(() => ({ setMode: (e) => {
239
- Vt((t) => (typeof e == "function" && (e = e(t)), e?.onModeChange?.(e ?? null), e));
265
+ const Dn = jt(null, () => {
266
+ const [i, e] = F(null);
267
+ return Ut = e, i;
268
+ }), Ko = () => {
269
+ const i = Dn();
270
+ return R(() => ({ setMode: (e) => {
271
+ Ut((t) => (typeof e == "function" && (e = e(t)), e?.onModeChange?.(e ?? null), e));
240
272
  }, getMode: () => i }), [i]);
241
273
  };
242
- class ht {
274
+ class pt {
243
275
  constructor(e, t, n, o) {
244
276
  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 = () => {
245
277
  console.log(`implement: ${this.label()} : ${this.description()}`);
@@ -350,21 +382,21 @@ class ht {
350
382
  }), t;
351
383
  }
352
384
  }
353
- class rt extends ht {
385
+ class at extends pt {
354
386
  }
355
- var ee = typeof window < "u" ? window : { screen: {}, navigator: {} }, ke = (ee.matchMedia || function() {
387
+ var te = typeof window < "u" ? window : { screen: {}, navigator: {} }, Te = (te.matchMedia || function() {
356
388
  return { matches: !1 };
357
- }).bind(ee), Ft = !1, Tn = { get passive() {
358
- return Ft = !0;
359
- } }, Et = function() {
389
+ }).bind(te), Xt = !1, An = { get passive() {
390
+ return Xt = !0;
391
+ } }, Mt = function() {
360
392
  };
361
- ee.addEventListener && ee.addEventListener("p", Et, Tn), ee.removeEventListener && ee.removeEventListener("p", Et, !1);
362
- var kn = Ft, Pn = "PointerEvent" in ee, ft = "ontouchstart" in ee, jt = ft || "TouchEvent" in ee && ke("(any-pointer: coarse)").matches, Lt = (ee.navigator.maxTouchPoints || 0) > 0 || jt, Ut = ee.navigator.userAgent || "", Dn = ke("(pointer: coarse)").matches && /iPad|Macintosh/.test(Ut) && Math.min(ee.screen.width || 0, ee.screen.height || 0) >= 768, Yt = (ke("(pointer: coarse)").matches || !ke("(pointer: fine)").matches && ft) && !/Windows.*Firefox/.test(Ut), An = ke("(any-pointer: fine)").matches || ke("(any-hover: hover)").matches || Dn || !ft, ut = !Lt || !An && Yt ? Lt ? "touchOnly" : "mouseOnly" : "hybrid", zn = ut === "mouseOnly" ? "mouse" : ut === "touchOnly" || Yt ? "touch" : "mouse";
363
- const Bn = Object.freeze(Object.defineProperty({ __proto__: null, deviceType: ut, primaryInput: zn, supportsPassiveEvents: kn, supportsPointerEvents: Pn, supportsTouchEvents: jt }, Symbol.toStringTag, { value: "Module" })), On = /* @__PURE__ */ new Set(["INPUT", "TEXTAREA", "SELECT"]), Xt = {};
364
- function dt() {
365
- return Bn;
393
+ te.addEventListener && te.addEventListener("p", Mt, An), te.removeEventListener && te.removeEventListener("p", Mt, !1);
394
+ var zn = Xt, Bn = "PointerEvent" in te, gt = "ontouchstart" in te, Yt = gt || "TouchEvent" in te && Te("(any-pointer: coarse)").matches, Ct = (te.navigator.maxTouchPoints || 0) > 0 || Yt, Gt = te.navigator.userAgent || "", On = Te("(pointer: coarse)").matches && /iPad|Macintosh/.test(Gt) && Math.min(te.screen.width || 0, te.screen.height || 0) >= 768, Zt = (Te("(pointer: coarse)").matches || !Te("(pointer: fine)").matches && gt) && !/Windows.*Firefox/.test(Gt), $n = Te("(any-pointer: fine)").matches || Te("(any-hover: hover)").matches || On || !gt, ft = !Ct || !$n && Zt ? Ct ? "touchOnly" : "mouseOnly" : "hybrid", Kn = ft === "mouseOnly" ? "mouse" : ft === "touchOnly" || Zt ? "touch" : "mouse";
395
+ const Rn = Object.freeze(Object.defineProperty({ __proto__: null, deviceType: ft, primaryInput: Kn, supportsPassiveEvents: zn, supportsPointerEvents: Bn, supportsTouchEvents: Yt }, Symbol.toStringTag, { value: "Module" })), Nn = /* @__PURE__ */ new Set(["INPUT", "TEXTAREA", "SELECT"]), qt = {};
396
+ function mt() {
397
+ return Rn;
366
398
  }
367
- const Gt = (i) => i === "BracketLeft" ? "[" : i === "BracketRight" ? "]" : q.camelToPrettyCase(i), Ao = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: Xt, boundPixel: function(i, e = !1, t = 0) {
399
+ const Qt = (i) => i === "BracketLeft" ? "[" : i === "BracketRight" ? "]" : q.camelToPrettyCase(i), Ro = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: qt, boundPixel: function(i, e = !1, t = 0) {
368
400
  return i;
369
401
  }, createSyntheticEvent: (i) => {
370
402
  let e = !1, t = !1;
@@ -374,8 +406,8 @@ const Gt = (i) => i === "BracketLeft" ? "[" : i === "BracketRight" ? "]" : q.cam
374
406
  t = !0, i.stopPropagation();
375
407
  }, isPropagationStopped: () => t, persist: () => {
376
408
  }, timeStamp: i.timeStamp, type: i.type };
377
- }, detectIt: dt, focusableNodeNames: On, toPrettyKeyCode: Gt }, Symbol.toStringTag, { value: "Module" }));
378
- class Zt {
409
+ }, detectIt: mt, focusableNodeNames: Nn, toPrettyKeyCode: Qt }, Symbol.toStringTag, { value: "Module" }));
410
+ class Jt {
379
411
  constructor(e, t) {
380
412
  this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = q.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();
381
413
  const n = this;
@@ -402,7 +434,7 @@ class Zt {
402
434
  s && (o = s), h = h._parent;
403
435
  }
404
436
  }
405
- o || (o = new Zt(e, t), o._parent = this, o._root = this._root, o._unListenersByCommand = null, o._listenersByKey = null, o._commandsPropertyListener = null);
437
+ o || (o = new Jt(e, t), o._parent = this, o._root = this._root, o._unListenersByCommand = null, o._listenersByKey = null, o._commandsPropertyListener = null);
406
438
  const r = (h, s) => {
407
439
  !h.has(t) || n ? h.set(t, s) : n === void 0 && console.warn("commandGroup already registered", t);
408
440
  };
@@ -433,9 +465,9 @@ class Zt {
433
465
  const d = s.shortcut();
434
466
  if (!d) continue;
435
467
  const f = Array.isArray(d) ? d : [d];
436
- for (let b = 0; b < f.length; b++) {
437
- const _ = ze(f[b]), k = o.get(_);
438
- k && !t && t === void 0 && console.warn(`Shortcut already registered: ${_}, ${l}, ${k}.`), o.set(_, l);
468
+ for (let _ = 0; _ < f.length; _++) {
469
+ const g = Be(f[_]), M = o.get(g);
470
+ M && !t && t === void 0 && console.warn(`Shortcut already registered: ${g}, ${l}, ${M}.`), o.set(g, l);
439
471
  }
440
472
  }
441
473
  }
@@ -468,11 +500,11 @@ class Zt {
468
500
  }
469
501
  findCommandByEvent(e) {
470
502
  const t = [];
471
- e.altKey && t.push(U.Alt), e.shiftKey && t.push(U.Shift), e.ctrlKey && t.push(U.Ctrl), e.metaKey && t.push(U.Meta);
472
- let n = ze({ key: e.code, modifiers: t });
503
+ e.altKey && t.push(Y.Alt), e.shiftKey && t.push(Y.Shift), e.ctrlKey && t.push(Y.Ctrl), e.metaKey && t.push(Y.Meta);
504
+ let n = Be({ key: e.code, modifiers: t });
473
505
  const o = this._commandsByShortcut;
474
506
  let r = o.get(n);
475
- r || (n = ze({ key: e.key, modifiers: t }), r = o.get(n)), !r && e.code.startsWith("Digit") && (n = ze({ key: e.code.substring(5, e.code.length), modifiers: t }), r = this._commandsByShortcut.get(n)), !r && e.code.startsWith("Key") && (r = ze({ key: e.code.substring(3, e.code.length), modifiers: t }), r = o.get(n));
507
+ r || (n = Be({ key: e.key, modifiers: t }), r = o.get(n)), !r && e.code.startsWith("Digit") && (n = Be({ key: e.code.substring(5, e.code.length), modifiers: t }), r = this._commandsByShortcut.get(n)), !r && e.code.startsWith("Key") && (r = Be({ key: e.code.substring(3, e.code.length), modifiers: t }), r = o.get(n));
476
508
  let a = null;
477
509
  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);
478
510
  }
@@ -529,17 +561,17 @@ class Zt {
529
561
  }), e;
530
562
  }
531
563
  }
532
- const $n = q.getOS() === q.OSType.MacOS || q.getOS() === q.OSType.IOS ? "Cmd" : "Ctrl", Kn = q.getOS() === q.OSType.MacOS || q.getOS() === q.OSType.IOS ? "⌘" : "^", ze = (i, e = !1) => {
564
+ const Hn = q.getOS() === q.OSType.MacOS || q.getOS() === q.OSType.IOS ? "Cmd" : "Ctrl", In = q.getOS() === q.OSType.MacOS || q.getOS() === q.OSType.IOS ? "⌘" : "^", Be = (i, e = !1) => {
533
565
  const t = {};
534
566
  for (let o = 0; i.modifiers && o < i.modifiers.length; o++) t[i.modifiers[o]] = !0;
535
567
  let n = "";
536
- return (t?.[U.Ctrl] || t?.[U.Meta]) && (n += (n.length > 0 ? "+" : "") + (e ? Kn : $n)), t?.[U.Alt] && (n += e ? "⌥" : "Alt"), t?.[U.Shift] && (n += (n.length > 0 ? "+" : "") + (e ? "⇧" : "Shift")), n += (n.length > 0 ? "+" : "") + Gt(i.key), n;
568
+ return (t?.[Y.Ctrl] || t?.[Y.Meta]) && (n += (n.length > 0 ? "+" : "") + (e ? In : Hn)), t?.[Y.Alt] && (n += e ? "⌥" : "Alt"), t?.[Y.Shift] && (n += (n.length > 0 ? "+" : "") + (e ? "⇧" : "Shift")), n += (n.length > 0 ? "+" : "") + Qt(i.key), n;
537
569
  };
538
- function zo(i, e = null) {
570
+ function No(i, e = null) {
539
571
  const t = O(e);
540
572
  t.current = e;
541
- const [n, o] = dn((a) => a + 1, 0), r = K(() => Array.isArray(i) ? i : [i], [i]);
542
- return I(() => {
573
+ const [n, o] = Ht((a) => a + 1, 0), r = R(() => Array.isArray(i) ? i : [i], [i]);
574
+ return N(() => {
543
575
  if (!r || r.length === 0) return;
544
576
  const a = (l, c) => {
545
577
  t.current?.onChange?.(c), o();
@@ -559,7 +591,7 @@ function zo(i, e = null) {
559
591
  };
560
592
  }, [i]), n;
561
593
  }
562
- const Ve = (i, e) => {
594
+ const Fe = (i, e) => {
563
595
  if (!e || !i || e.length === 0) return q.EmptyArray;
564
596
  const t = e.length, n = new Array(t);
565
597
  for (let o = 0; o < t; o++) {
@@ -568,124 +600,124 @@ const Ve = (i, e) => {
568
600
  }
569
601
  return n;
570
602
  };
571
- function Bo(i, e = null, t = null, n) {
603
+ function Ho(i, e = null, t = null, n) {
572
604
  const o = O(t);
573
605
  o.current = t, e && !Array.isArray(e) && (e = [e]);
574
- const [r, a] = Y(Ve(i, e)), h = n ? [...n, i] : [i];
575
- return I(() => {
606
+ const [r, a] = F(Fe(i, e)), h = n ? [...n, i] : [i];
607
+ return N(() => {
576
608
  const s = { onGroupChange: () => {
577
- const d = Ve(i, e);
609
+ const d = Fe(i, e);
578
610
  a(d), o.current?.onChange?.(this);
579
611
  } };
580
612
  let l;
581
613
  e && e.length > 0 && (l = { keys: e }, s.onCommandChange = (d, f) => {
582
- o.current?.onChange?.(i), a(Ve(i, e));
614
+ o.current?.onChange?.(i), a(Fe(i, e));
583
615
  });
584
- const c = i?.addListener(s, l), u = Ve(i, e);
616
+ const c = i?.addListener(s, l), u = Fe(i, e);
585
617
  return a(u), o.current?.onChange && o.current?.onChange(i), () => {
586
618
  c?.();
587
619
  };
588
620
  }, h), r;
589
621
  }
590
- const Oo = { Toolbar: "toolbar", Menuitem: "menuitem" }, Rn = Wt({ setClipboard: (i) => {
622
+ const Io = { Toolbar: "toolbar", Menuitem: "menuitem" }, Vn = jt({ setClipboard: (i) => {
591
623
  throw new Error("This is only available via the useClipboard.");
592
- }, getClipboard: () => Ge.Global, refNativeCopy: { current: null }, refNativeLastKey: { current: null } }, () => {
593
- const [i, e] = Y(Ge.Global);
624
+ }, getClipboard: () => Ze.Global, refNativeCopy: { current: null }, refNativeLastKey: { current: null } }, () => {
625
+ const [i, e] = F(Ze.Global);
594
626
  return { setClipboard: (t) => e(t), getClipboard: () => i, refNativeCopy: O(null), refNativeLastKey: O(null) };
595
- }), $o = (i) => {
596
- const { source: e, target: t, onPaste: n, onClipboardUpdate: o, commands: r } = i, a = qe(), h = M(o, [o]), s = M(n, [n]), { getClipboard: l, refNativeCopy: c } = Rn(), u = l();
597
- K(() => {
598
- const m = e?.element, v = t?.element ?? e?.element;
627
+ }), Vo = (i) => {
628
+ const { source: e, target: t, onPaste: n, onClipboardUpdate: o, commands: r } = i, a = Qe(), h = k(o, [o]), s = k(n, [n]), { getClipboard: l, refNativeCopy: c } = Vn(), u = l();
629
+ R(() => {
630
+ const y = e?.element, w = t?.element ?? e?.element;
599
631
  if (!r) return;
600
- const w = [new rt("cut", m, { 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: [U.Ctrl] } }), new rt("copy", m, { 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: [U.Ctrl] } }), new rt("paste", v, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste", shortcut: [{ key: "V", modifiers: [U.Ctrl] }, { key: "F8", modifiers: [U.Ctrl] }] })];
601
- r?.addCommands(w, !0);
632
+ const m = [new at("cut", y, { 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: [Y.Ctrl] } }), new at("copy", y, { 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: [Y.Ctrl] } }), new at("paste", w, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste.yellow", shortcut: [{ key: "V", modifiers: [Y.Ctrl] }, { key: "F8", modifiers: [Y.Ctrl] }] })];
633
+ r?.addCommands(m, !0);
602
634
  }, [r]);
603
- const d = M(async (m) => {
635
+ const d = k(async (y) => {
604
636
  if (!e?.element) return;
605
- let v = null;
637
+ let w = null;
606
638
  try {
607
- v = e.doCopy?.(m), typeof v == "string" ? await u.writeText(v) : await u.writeReference(v);
608
- } catch (w) {
609
- throw w;
639
+ w = e.doCopy?.(y), typeof w == "string" ? await u.writeText(w) : await u.writeReference(w);
640
+ } catch (m) {
641
+ throw m;
610
642
  }
611
- }, [e, a]), f = M(async (m) => {
612
- const v = e?.element?.();
613
- if (v) {
614
- c.current = { sourceElement: v, args: m };
643
+ }, [e, a]), f = k(async (y) => {
644
+ const w = e?.element?.();
645
+ if (w) {
646
+ c.current = { sourceElement: w, args: y };
615
647
  try {
616
- await d(m);
617
- } catch (w) {
618
- a.showError?.(w);
648
+ await d(y);
649
+ } catch (m) {
650
+ a.showError?.(m);
619
651
  }
620
652
  }
621
- }, [e?.element, a]), b = V(() => {
653
+ }, [e?.element, a]), _ = V(() => {
622
654
  f({ isCut: !0 });
623
- }, []), _ = M(async (m, v, w) => {
655
+ }, []), g = k(async (y, w, m) => {
624
656
  try {
625
- if (await m.doPaste(v, w) === !1) return;
626
- s?.(v, w);
627
- } catch (D) {
628
- a.showError?.(D);
657
+ if (await y.doPaste(w, m) === !1) return;
658
+ s?.(w, m);
659
+ } catch (A) {
660
+ a.showError?.(A);
629
661
  }
630
- }, [s]), k = M(async (m, v, w) => {
631
- const D = t?.element?.();
632
- if (D && await q.whenFocus(D), !m && !v) return;
633
- const E = await a.showBusy?.("Pasting...");
634
- if (v) try {
635
- return await _(t, v, w), void E?.();
636
- } catch (S) {
637
- E?.(), a.showError?.(S);
662
+ }, [s]), M = k(async (y, w, m) => {
663
+ const A = t?.element?.();
664
+ if (A && await q.whenFocus(A), !y && !w) return;
665
+ const S = await a.showBusy?.("Pasting...");
666
+ if (w) try {
667
+ return await g(t, w, m), void S?.();
668
+ } catch (x) {
669
+ S?.(), a.showError?.(x);
638
670
  }
639
- let H, N = t.importFromExternal;
640
- N || (N = (S, g) => ({ getItemType: () => "text", toText: () => m.text, isClipboardItem: !0 }));
671
+ let T, I = t.importFromExternal;
672
+ I || (I = (x, E) => ({ getItemType: () => "text", toText: () => y.text, isClipboardItem: !0 }));
641
673
  try {
642
- H = await N(m, { isCut: !1 });
643
- } catch (S) {
644
- E?.(), a.showError?.(S);
674
+ T = await I(y, { isCut: !1 });
675
+ } catch (x) {
676
+ S?.(), a.showError?.(x);
645
677
  }
646
- if (H) try {
647
- const S = await Promise.resolve(H);
648
- await _(t, S, w), E?.();
649
- } catch (S) {
650
- E?.(), a.showError?.(S);
678
+ if (T) try {
679
+ const x = await Promise.resolve(T);
680
+ await g(t, x, m), S?.();
681
+ } catch (x) {
682
+ S?.(), a.showError?.(x);
651
683
  }
652
- else E?.();
653
- }, [_, t, a]), T = M(async (m) => {
684
+ else S?.();
685
+ }, [g, t, a]), P = k(async (y) => {
654
686
  if (t?.element) try {
655
- const v = await u.readReference();
656
- if (v) return void await k(null, v, m);
657
- const w = [];
658
- w[0] = await tt.readStringFromClipboard(u, nt.plain), w[1] = await tt.readHTMLFromClipboard(u, nt.html), w[2] = await tt.readBlobFromClipboard(u, nt.png);
659
- const D = { text: w[0] ?? null, html: w[1] ?? null, image: w[2] ?? null };
660
- await k(D, null, m);
661
- } catch (v) {
662
- if (v?.message === "Document is not focused.") return;
663
- a.showError?.(v);
687
+ const w = await u.readReference();
688
+ if (w) return void await M(null, w, y);
689
+ const m = [];
690
+ m[0] = await ot.readStringFromClipboard(u, it.plain), m[1] = await ot.readHTMLFromClipboard(u, it.html), m[2] = await ot.readBlobFromClipboard(u, it.png);
691
+ const A = { text: m[0] ?? null, html: m[1] ?? null, image: m[2] ?? null };
692
+ await M(A, null, y);
693
+ } catch (w) {
694
+ if (w?.message === "Document is not focused.") return;
695
+ a.showError?.(w);
664
696
  }
665
- }, [k, t?.element, a]);
666
- return M(async (m) => {
667
- }, [e?.element]), M(async (m) => {
668
- }, [t?.element, k, a]), I(() => {
697
+ }, [M, t?.element, a]);
698
+ return k(async (y) => {
699
+ }, [e?.element]), k(async (y) => {
700
+ }, [t?.element, M, a]), N(() => {
669
701
  if (!u) return;
670
- const m = async (D) => {
671
- const E = await u.readReference();
672
- h?.(E);
673
- }, v = (D) => {
674
- a.showMessage?.(Ge.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
675
- }, w = (D) => {
676
- a.showMessage?.(Ge.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
702
+ const y = async (A) => {
703
+ const S = await u.readReference();
704
+ h?.(S);
705
+ }, w = (A) => {
706
+ a.showMessage?.(Ze.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
707
+ }, m = (A) => {
708
+ a.showMessage?.(Ze.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
677
709
  };
678
- return u.addEventListener("clipboardchange", m), u.addEventListener("clipboarderrorread", v), u.addEventListener("clipboarderrorwrite", w), () => {
679
- u.removeEventListener("clipboardchange", m), u.removeEventListener("clipboarderrorread", v), u.removeEventListener("clipboarderrorwrite", w);
710
+ return u.addEventListener("clipboardchange", y), u.addEventListener("clipboarderrorread", w), u.addEventListener("clipboarderrorwrite", m), () => {
711
+ u.removeEventListener("clipboardchange", y), u.removeEventListener("clipboarderrorread", w), u.removeEventListener("clipboarderrorwrite", m);
680
712
  };
681
- }, [u, a]), I(() => {
682
- }, [d, k, e, t]), I(() => {
683
- r?.getCommand("cut")?.updateCallback(b).update({ disabled: !e || !t }), r?.getCommand("copy")?.updateCallback(f).update({ disabled: !e }), r?.getCommand("paste")?.updateCallback(T).update({ disabled: !t });
684
- }, [e, t, r]), { paste: T, copy: f, clipboard: u };
713
+ }, [u, a]), N(() => {
714
+ }, [d, M, e, t]), N(() => {
715
+ r?.getCommand("cut")?.updateCallback(_).update({ disabled: !e || !t }), r?.getCommand("copy")?.updateCallback(f).update({ disabled: !e }), r?.getCommand("paste")?.updateCallback(P).update({ disabled: !t });
716
+ }, [e, t, r]), { paste: P, copy: f, clipboard: u };
685
717
  };
686
- function Ko(i, e = !0) {
718
+ function Wo(i, e = !0) {
687
719
  const t = O(i);
688
- I(() => {
720
+ N(() => {
689
721
  if (e) {
690
722
  const n = Object.entries(i).reduce((o, [r, a]) => (t.current[r] !== a && (o[r] = [t.current[r], a]), o), {});
691
723
  Object.keys(n).length > 0 && console.log("Changed props:", n);
@@ -693,19 +725,19 @@ function Ko(i, e = !0) {
693
725
  t.current = i;
694
726
  });
695
727
  }
696
- let st = !1, In = 0;
697
- var Hn = typeof document < "u" ? pt : I;
698
- const Ct = () => "sheetxl-ui-" + In++, Mt = se.useId, Ro = Mt ?? function() {
699
- const [i, e] = se.useState(() => st ? Ct() : void 0);
700
- return Hn(() => {
701
- i == null && e(Ct());
702
- }, []), se.useEffect(() => {
703
- st || (st = !0);
728
+ let ct = !1, Wn = 0;
729
+ var Fn = typeof document < "u" ? _t : N;
730
+ const Tt = () => "sheetxl-ui-" + Wn++, kt = re.useId, Fo = kt ?? function() {
731
+ const [i, e] = re.useState(() => ct ? Tt() : void 0);
732
+ return Fn(() => {
733
+ i == null && e(Tt());
734
+ }, []), re.useEffect(() => {
735
+ ct || (ct = !0);
704
736
  }, []), i;
705
- }, Nn = [];
706
- function _t(i, e, t = Nn) {
737
+ }, jn = [];
738
+ function yt(i, e, t = jn) {
707
739
  const n = O(null);
708
- return pn(i, () => {
740
+ return fn(i, () => {
709
741
  if (!n.current) return;
710
742
  const o = n.current, r = e?.();
711
743
  if (!r || typeof r != "object") throw new Error("attributes must return a plain object of values");
@@ -717,33 +749,33 @@ function _t(i, e, t = Nn) {
717
749
  return o;
718
750
  }, t), n;
719
751
  }
720
- const Tt = "Undo the last action.", kt = "Repeat the last action or undo the redo.", Wn = (i) => `Redo ${i}`, Io = ({ manager: i, commands: e, disabled: t }) => {
721
- const n = qe(), o = M((a) => {
752
+ const Pt = "Undo the last action.", Dt = "Repeat the last action or undo the redo.", Un = (i) => `Redo ${i}`, jo = ({ manager: i, commands: e, disabled: t }) => {
753
+ const n = Qe(), o = k((a) => {
722
754
  try {
723
755
  i?.undo(a);
724
756
  } catch (h) {
725
757
  n.error(h);
726
758
  }
727
- }, [i]), r = M((a) => {
759
+ }, [i]), r = k((a) => {
728
760
  try {
729
761
  i?.redo(a);
730
762
  } catch (h) {
731
763
  n.error(h);
732
764
  }
733
765
  }, [i]);
734
- return K(() => {
766
+ return R(() => {
735
767
  if (!e) return;
736
768
  const a = { contains: (s) => !0, focus() {
737
- } }, h = [new ht("undo", a, { label: "Undo", description: Tt, shortcut: { key: "z", modifiers: [U.Ctrl] }, disabled: !0 }, o), new ht("redo", a, { label: "Redo", description: kt, shortcut: [{ key: "y", modifiers: [U.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [U.Alt] }], disabled: !0 }, r)];
769
+ } }, h = [new pt("undo", a, { label: "Undo", description: Pt, shortcut: { key: "z", modifiers: [Y.Ctrl] }, disabled: !0 }, o), new pt("redo", a, { label: "Redo", description: Dt, shortcut: [{ key: "y", modifiers: [Y.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [Y.Alt] }], disabled: !0 }, r)];
738
770
  e?.addCommands(h, !0);
739
- }, [e]), I(() => {
771
+ }, [e]), N(() => {
740
772
  if (!e) return;
741
773
  const a = () => {
742
774
  const s = i?.getTopUndoDescription(), l = {};
743
775
  var c;
744
- e.getCommand("undo").update({ disabled: t || !i || !i.hasUndo(), description: s ? (c = s, `Undo ${c}`) : Tt, state: l, context: { undoManager: i } });
776
+ e.getCommand("undo").update({ disabled: t || !i || !i.hasUndo(), description: s ? (c = s, `Undo ${c}`) : Pt, state: l, context: { undoManager: i } });
745
777
  const u = i?.getTopRedoDescription();
746
- e.getCommand("redo").update({ disabled: t || !i || !i.hasRedo(), description: u ? Wn(u) : kt, state: l, context: { undoManager: i } });
778
+ e.getCommand("redo").update({ disabled: t || !i || !i.hasRedo(), description: u ? Un(u) : Dt, state: l, context: { undoManager: i } });
747
779
  };
748
780
  if (a(), !i) return;
749
781
  const h = i.addListener({ onStackChange() {
@@ -751,121 +783,142 @@ const Tt = "Undo the last action.", kt = "Repeat the last action or undo the red
751
783
  } });
752
784
  return () => h?.();
753
785
  }, [i, e, t]), { undo: o, redo: r };
754
- }, Vn = "_scrollbar_1v478_17", Fn = "_vsb-track_1v478_27", jn = "_vsb-thumb_1v478_39", qt = "_scrollbar-button_1v478_80", Jt = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", Qt = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", Un = { transform: "rotate(180deg)" }, Yn = (i) => {
755
- const { style: e, orientation: t = ae.Vertical, disabled: n, ...o } = i, r = t === ae.Vertical ? Jt : Qt;
756
- return C("button", { style: e, className: le(qt, t, "scroll-button"), disabled: n, ...o, children: C("svg", { width: "9", height: "9", viewBox: "0 0 9 9", children: C("path", { d: r }) }) });
757
- }, Xn = (i) => {
758
- const { style: e, orientation: t = ae.Vertical, disabled: n, ...o } = i, r = t === ae.Vertical ? Jt : Qt;
759
- return C("button", { style: e, className: le(qt, t, "scroll-button"), disabled: n, ...o, children: C("svg", { width: "9", height: "9", viewBox: "0 0 9 9", style: Un, children: C("path", { d: r }) }) });
760
- }, Ho = (i) => {
786
+ }, Xn = "_scrollbar_1v478_17", Yn = "_vsb-track_1v478_27", Gn = "_vsb-thumb_1v478_39", en = "_scrollbar-button_1v478_80", tn = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", nn = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", Zn = { transform: "rotate(180deg)" }, qn = (i) => {
787
+ const { style: e, orientation: t = ae.Vertical, disabled: n, ...o } = i, r = t === ae.Vertical ? tn : nn;
788
+ return C("button", { style: e, className: le(en, t, "scroll-button"), disabled: n, ...o, children: C("svg", { width: "9", height: "9", viewBox: "0 0 9 9", children: C("path", { d: r }) }) });
789
+ }, Qn = (i) => {
790
+ const { style: e, orientation: t = ae.Vertical, disabled: n, ...o } = i, r = t === ae.Vertical ? tn : nn;
791
+ return C("button", { style: e, className: le(en, t, "scroll-button"), disabled: n, ...o, children: C("svg", { width: "9", height: "9", viewBox: "0 0 9 9", style: Zn, children: C("path", { d: r }) }) });
792
+ }, Uo = (i) => {
761
793
  const { style: e, orientation: t = ae.Vertical, ...n } = i, o = t === ae.Vertical;
762
794
  return C("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: C("svg", { width: "24", height: "24", viewBox: "0 0 24 24", transform: o ? "rotate(90) " : "", children: C("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" }) }) });
763
- }, Gn = 24, Zn = ve(Pe((i, e) => {
764
- const { offset: t = 0, totalSize: n = 0, viewportSize: o = 0, style: r, className: a, orientation: h = ae.Vertical, onScrollOffset: s, onScroll: l, showCustomScrollButtons: c = !0, scrollButtonIncrement: u = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: f = 120, minThumbSize: b = Gn, createScrollStartButton: _ = Yn, createScrollEndButton: k = Xn, usePortal: T = !1, ...m } = i;
765
- M(l, [l]);
766
- const [v, w] = Y({ offset: 0, length: 0 }), D = O(-1), E = h === ae.Vertical, [H, { width: N, height: S }] = Te(), g = E ? S : N, A = M((x, B, Z) => {
767
- if (B === 0 || Z === 0) return void w({ offset: 0, length: b });
768
- const Ee = Z / g, me = B / Ee, Ae = Math.min(Math.max(b, me), g), Ie = x / Ee;
769
- return { offset: Math.min(Math.max(0, Ie), g - Ae), length: Ae };
770
- }, [g, b]), y = M((x) => {
771
- const B = n / g, Z = Math.round(x * B);
772
- w(A(Z, o, n)), s?.(Z, o, n), D.current = x;
773
- }, [s, o, n, g, v]), z = M((x) => {
774
- w(A(x, o, n)), s?.(x, o, n), D.current = x;
795
+ };
796
+ let je = 0;
797
+ function Xo() {
798
+ const [i, e] = F(!!document.fullscreenElement), t = V(() => {
799
+ const n = document.fullscreenElement;
800
+ return n ? n.querySelector(".fullscreen-portal-root") || n : document.body;
801
+ }, []);
802
+ return N(() => {
803
+ function n() {
804
+ const o = document.fullscreenElement;
805
+ if (e(!!o), !o) return;
806
+ let r = o.querySelector(".fullscreen-portal-root");
807
+ r || (r = document.createElement("div"), r.className = "fullscreen-portal-root _fullscreen-portal-root_1mjsr_4", o.appendChild(r));
808
+ }
809
+ return je++, n(), document.addEventListener("fullscreenchange", n), () => {
810
+ document.removeEventListener("fullscreenchange", n), je--, je <= 0 && (document.querySelectorAll(".fullscreen-portal-root").forEach((o) => {
811
+ o.parentNode && o.parentNode.removeChild(o);
812
+ }), je = 0);
813
+ };
814
+ }, []), { getPortalContainer: t, isFullscreen: i };
815
+ }
816
+ const Jn = 24, eo = we(ke((i, e) => {
817
+ const { offset: t = 0, totalSize: n = 0, viewportSize: o = 0, style: r, className: a, orientation: h = ae.Vertical, onScrollOffset: s, onScroll: l, showCustomScrollButtons: c = !0, scrollButtonIncrement: u = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: f = 120, minThumbSize: _ = Jn, maxThumbSize: g, createScrollStartButton: M = qn, createScrollEndButton: P = Qn, usePortal: y = !1, ...w } = i;
818
+ k(l, [l]);
819
+ const [m, A] = F({ offset: 0, length: 0 }), S = O(-1), T = h === ae.Vertical, [I, { width: x, height: E }] = ve(), z = T ? E : x, L = k((b, $, U) => {
820
+ if ($ === 0 || U === 0) return void A({ offset: 0, length: _ });
821
+ const me = U / z, _e = $ / me, ze = Math.min(Math.max(_, _e), Math.min(z, g ?? Number.MAX_SAFE_INTEGER)), tt = b / me;
822
+ return { offset: Math.min(Math.max(0, tt), z - ze), length: ze };
823
+ }, [z, _, g]), D = k((b) => {
824
+ const $ = n / z, U = Math.round(b * $);
825
+ A(L(U, o, n)), s?.(U, o, n), S.current = b;
826
+ }, [s, o, n, z, m]), p = k((b) => {
827
+ A(L(b, o, n)), s?.(b, o, n), S.current = b;
775
828
  }, [s, o, n]);
776
- I(() => {
777
- D.current !== t && g !== 0 && (D.current = -1, w(A(t, o, n)));
778
- }, [t]), I(() => {
779
- g !== 0 && w(A(t, o, n));
780
- }, [o, n, E, g]);
781
- const p = Math.max(0, n - o), [L, $] = Y(!1), X = O(0), F = O(0), te = _t(e, () => ({ isScrollbar: () => !0 }), []), G = M((x) => {
782
- x.currentTarget.setPointerCapture(x.pointerId), $(!0), X.current = E ? x.clientY : x.clientX, F.current = v.offset, x.preventDefault(), x.stopPropagation();
783
- }, [E, v]), W = M((x) => {
784
- if (!L) return;
785
- const B = (E ? x.clientY : x.clientX) - X.current, Z = F.current + B;
786
- y(Z);
787
- }, [L, E]), oe = M((x) => {
829
+ N(() => {
830
+ S.current !== t && z !== 0 && (S.current = -1, A(L(t, o, n)));
831
+ }, [t]), N(() => {
832
+ z !== 0 && A(L(t, o, n));
833
+ }, [o, n, T, z]);
834
+ const v = Math.max(0, n - o), [K, G] = F(!1), j = O(0), Q = O(0), Z = yt(e, () => ({ isScrollbar: () => !0 }), []), W = k((b) => {
835
+ b.currentTarget.setPointerCapture(b.pointerId), G(!0), j.current = T ? b.clientY : b.clientX, Q.current = m.offset, b.preventDefault(), b.stopPropagation();
836
+ }, [T, m]), oe = k((b) => {
837
+ if (!K) return;
838
+ const $ = (T ? b.clientY : b.clientX) - j.current, U = Q.current + $;
839
+ D(U);
840
+ }, [K, T]), J = k((b) => {
788
841
  try {
789
- x.currentTarget.releasePointerCapture(x.pointerId);
842
+ b.currentTarget.releasePointerCapture(b.pointerId);
790
843
  } catch {
791
844
  }
792
- $(!1);
793
- }, []), J = M((x) => {
794
- if (!x.currentTarget) return;
795
- const B = x.currentTarget.getBoundingClientRect(), Z = E ? x.clientY - B.top : x.clientX - B.left;
796
- y(Z);
797
- }, [E, v, o, n]), we = M((x) => {
798
- const B = Math.max(1, Math.floor(0.9 * o));
799
- E ? (x.key === "ArrowDown" && y(Math.min(p, t + 1)), x.key === "ArrowUp" && y(Math.max(0, t - 1)), x.key === "PageDown" && y(Math.min(p, t + B)), x.key === "PageUp" && y(Math.max(0, t - B)), x.key === "Home" && y(0), x.key === "End" && y(p)) : (x.key === "ArrowRight" && y(Math.min(p, t + 1)), x.key === "ArrowLeft" && y(Math.max(0, t - 1)), x.key === "PageDown" && y(Math.min(p, t + B)), x.key === "PageUp" && y(Math.max(0, t - B)), x.key === "Home" && y(0), x.key === "End" && y(p));
800
- }, [E, o, n, t, p]), pe = C("div", { className: le(jn), role: "slider", "aria-label": E ? "Rows" : "Columns", "aria-orientation": E ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": p, "aria-valuenow": t, tabIndex: 0, style: { position: T ? "fixed" : "relative", [E ? "height" : "width"]: `${v.length}px`, [E ? "width" : "height"]: "100%", transform: E ? `translateY(${v.offset}px)` : `translateX(${v.offset}px)` }, onPointerDown: G, onPointerMove: W, onPointerUp: oe }), [fe, _e] = Y(null), Ke = M(() => {
801
- let x;
802
- x = typeof u == "function" ? u(t, o, n) : t - u;
803
- const B = Math.max(0, x);
804
- return z(B), _e(B), B;
805
- }, [u, t, o, n]), Re = M(() => {
806
- let x;
807
- x = typeof u == "function" ? u(t, o, n) : t + u;
808
- const B = Math.min(p, x);
809
- return z(B), _e(B), B;
810
- }, [u, t, p, o, n]), be = O(null), xe = O(null), ie = V(() => {
811
- be.current && (clearTimeout(be.current), be.current = null, xe.current = null);
812
- }, []), Se = V((x, B, Z, Ee = d) => {
813
- xe.current = x, be.current = setTimeout(() => {
814
- const me = Z ? Ke() : Re();
815
- me !== xe.current ? Se(me, !1, Z, f) : ie();
816
- }, B ? 0 : Ee);
817
- }, [Ke, Re, ie]);
818
- I(() => () => ie(), [ie]);
819
- const Je = K(() => {
845
+ G(!1);
846
+ }, []), be = k((b) => {
847
+ if (!b.currentTarget) return;
848
+ const $ = b.currentTarget.getBoundingClientRect(), U = T ? b.clientY - $.top : b.clientX - $.left;
849
+ D(U);
850
+ }, [T, m, o, n]), xe = k((b) => {
851
+ const $ = Math.max(1, Math.floor(0.9 * o));
852
+ T ? (b.key === "ArrowDown" && D(Math.min(v, t + 1)), b.key === "ArrowUp" && D(Math.max(0, t - 1)), b.key === "PageDown" && D(Math.min(v, t + $)), b.key === "PageUp" && D(Math.max(0, t - $)), b.key === "Home" && D(0), b.key === "End" && D(v)) : (b.key === "ArrowRight" && D(Math.min(v, t + 1)), b.key === "ArrowLeft" && D(Math.max(0, t - 1)), b.key === "PageDown" && D(Math.min(v, t + $)), b.key === "PageUp" && D(Math.max(0, t - $)), b.key === "Home" && D(0), b.key === "End" && D(v));
853
+ }, [T, o, n, t, v]), Se = O(null), pe = R(() => C("div", { className: le(Gn), ref: Se, role: "slider", "aria-label": T ? "Rows" : "Columns", "aria-orientation": T ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": v, "aria-valuenow": t, tabIndex: 0, style: { position: y ? "fixed" : "relative", [T ? "height" : "width"]: `${m.length}px`, [T ? "width" : "height"]: "100%", transform: T ? `translateY(${m.offset}px)` : `translateX(${m.offset}px)`, [T ? "minHeight" : "minWidth"]: `${_}px` }, onPointerDown: W, onPointerMove: oe, onPointerUp: J }), [m, _, v, t, T, !1]), [Re, Ne] = F(null), He = k(() => {
854
+ let b;
855
+ b = typeof u == "function" ? u(t, o, n) : t - u;
856
+ const $ = Math.max(0, b);
857
+ return p($), Ne($), $;
858
+ }, [u, t, o, n]), Pe = k(() => {
859
+ let b;
860
+ b = typeof u == "function" ? u(t, o, n) : t + u;
861
+ const $ = Math.min(v, b);
862
+ return p($), Ne($), $;
863
+ }, [u, t, v, o, n]), fe = O(null), Ee = O(null), se = V(() => {
864
+ fe.current && (clearTimeout(fe.current), fe.current = null, Ee.current = null);
865
+ }, []), De = V((b, $, U, me = d) => {
866
+ Ee.current = b, fe.current = setTimeout(() => {
867
+ const _e = U ? He() : Pe();
868
+ _e !== Ee.current ? De(_e, !1, U, f) : se();
869
+ }, $ ? 0 : me);
870
+ }, [He, Pe, se]);
871
+ N(() => () => se(), [se]);
872
+ const Je = R(() => {
820
873
  if (!c) return null;
821
- const x = { orientation: h, disabled: t <= 0, onMouseUp: ie, onMouseLeave: ie, onMouseDown: () => Se(t, !0, !0) };
822
- return _?.(x);
823
- }, [c, h, t, fe]), Qe = K(() => {
874
+ const b = { orientation: h, disabled: t <= 0, onMouseUp: se, onMouseLeave: se, onMouseDown: () => De(t, !0, !0) };
875
+ return M?.(b);
876
+ }, [c, h, t, Re]), et = R(() => {
824
877
  if (!c) return null;
825
- const x = { orientation: h, disabled: t >= p, onMouseUp: ie, onMouseLeave: ie, onMouseDown: () => Se(t, !0, !1) };
826
- return k?.(x);
827
- }, [c, h, t, p, fe]), De = E ? "vertical" : "horizontal";
828
- return Me("div", { ref: Oe([te, e]), className: le(a, Vn, De, { dragging: L }), style: r, ...m, children: [Je, C("div", { ref: H, role: "scrollbar", "aria-orientation": De, "aria-valuemin": 0, "aria-valuemax": p, "aria-valuenow": t, tabIndex: 0, className: le(Fn, "track", De), onPointerDown: J, onKeyDown: we, children: T ? null : pe }), T ? mn(pe, document.body) : null, Qe] });
878
+ const b = { orientation: h, disabled: t >= v, onMouseUp: se, onMouseLeave: se, onMouseDown: () => De(t, !0, !1) };
879
+ return P?.(b);
880
+ }, [c, h, t, v, Re]), Ae = T ? "vertical" : "horizontal";
881
+ return Ce("div", { ref: $e([Z, e]), className: le(a, Xn, Ae, { dragging: K }), style: r, ...w, children: [Je, C("div", { ref: I, role: "scrollbar", "aria-orientation": Ae, "aria-valuemin": 0, "aria-valuemax": v, "aria-valuenow": t, tabIndex: 0, className: le(Yn, "track", Ae), onPointerDown: be, onKeyDown: xe, children: y ? null : pe }), y ? gn(pe, document.body) : null, et] });
829
882
  }));
830
- let Pt = Date.now, Dt = 1e3, de = {}, qn = 1;
831
- const Be = (i) => {
883
+ let At = Date.now, zt = 1e3, de = {}, to = 1;
884
+ const Oe = (i) => {
832
885
  let e = de[i] !== null;
833
886
  return e && (de[i] = null), e;
834
- }, At = (i, e, t, n = 0, o) => {
835
- let r = Pt(), a = r, h = 0, s = 0, l = 0, c = qn++;
887
+ }, Bt = (i, e, t, n = 0, o) => {
888
+ let r = At(), a = r, h = 0, s = 0, l = 0, c = to++;
836
889
  if (c % 20 == 0) {
837
890
  const d = {};
838
891
  for (let f in de) d[f] = !0;
839
892
  de = d;
840
893
  }
841
894
  const u = function(d) {
842
- let f = d !== !0, b = Pt(), _ = !0;
895
+ let f = d !== !0, _ = At(), g = !0;
843
896
  try {
844
- _ = (!e || e(c)) ?? !0;
897
+ g = (!e || e(c)) ?? !0;
845
898
  } catch {
846
- _ = !1;
899
+ g = !1;
847
900
  }
848
- if (!de[c] || !_) return de[c] = null, void t?.(60 - s / ((b - r) / Dt), c, !1);
901
+ if (!de[c] || !g) return de[c] = null, void t?.(60 - s / ((_ - r) / zt), c, !1);
849
902
  if (f) {
850
- l = Math.round((b - a) / 16.666666666666668) - 1;
851
- for (let m = 0; m < Math.min(l, 4); m++) u(!0), s++;
903
+ l = Math.round((_ - a) / 16.666666666666668) - 1;
904
+ for (let y = 0; y < Math.min(l, 4); y++) u(!0), s++;
852
905
  }
853
- n && (h = (b - r) / n, h > 1 && (h = 1));
854
- let k = o ? o(h) : h, T = !1;
906
+ n && (h = (_ - r) / n, h > 1 && (h = 1));
907
+ let M = o ? o(h) : h, P = !1;
855
908
  try {
856
- T = i(k, b, f);
909
+ P = i(M, _, f);
857
910
  } catch {
858
- T = !1;
911
+ P = !1;
859
912
  }
860
- T !== !1 && h !== 1 || !f ? f && (a = b, requestAnimationFrame(u)) : (de[c] = null, t?.(60 - s / ((b - r) / Dt), c, h === 1 || n == null));
913
+ P !== !1 && h !== 1 || !f ? f && (a = _, requestAnimationFrame(u)) : (de[c] = null, t?.(60 - s / ((_ - r) / zt), c, h === 1 || n == null));
861
914
  };
862
915
  return de[c] = !0, requestAnimationFrame(u), c;
863
- }, Jn = function(i) {
916
+ }, no = function(i) {
864
917
  return Math.pow(i - 1, 3) + 1;
865
- }, Qn = function(i) {
918
+ }, oo = function(i) {
866
919
  return (i /= 0.5) < 1 ? 0.5 * Math.pow(i, 3) : 0.5 * (Math.pow(i - 2, 3) + 2);
867
920
  };
868
- class eo {
921
+ class io {
869
922
  constructor(e, t) {
870
923
  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 };
871
924
  }
@@ -890,7 +943,7 @@ class eo {
890
943
  }
891
944
  zoomTo(e, t = !1, n, o, r) {
892
945
  if (!this.options.zooming) throw new Error("Zooming is not enabled!");
893
- r && (this.__zoomComplete = r), this.__isDecelerating && (Be(this.__isDecelerating), this.__isDecelerating = 0);
946
+ r && (this.__zoomComplete = r), this.__isDecelerating && (Oe(this.__isDecelerating), this.__isDecelerating = 0);
894
947
  const a = this.__zoomLevel;
895
948
  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);
896
949
  const h = e / a;
@@ -901,7 +954,7 @@ class eo {
901
954
  this.zoomTo(this.__zoomLevel * e, t, n, o, r);
902
955
  }
903
956
  scrollTo(e, t, n = !1, o = 1) {
904
- if (this.__isDecelerating && (Be(this.__isDecelerating), this.__isDecelerating = 0), o !== void 0 && o !== this.__zoomLevel) {
957
+ if (this.__isDecelerating && (Oe(this.__isDecelerating), this.__isDecelerating = 0), o !== void 0 && o !== this.__zoomLevel) {
905
958
  if (!this.options.zooming) throw new Error("Zooming is not enabled!");
906
959
  e *= o, t *= o, this.__computeScrollMax(o);
907
960
  } else o = this.__zoomLevel;
@@ -919,7 +972,7 @@ class eo {
919
972
  if (e.length === void 0) throw new Error("Invalid touch list: " + e);
920
973
  if (t instanceof Date && (t = t.valueOf()), typeof t != "number") throw new Error("Invalid timestamp value: " + t);
921
974
  let n, o;
922
- this.__interruptedAnimation = !0, this.__isDecelerating && (Be(this.__isDecelerating), this.__isDecelerating = 0, this.__interruptedAnimation = !0), this.__isAnimating && (Be(this.__isAnimating), this.__isAnimating = 0, this.__interruptedAnimation = !0);
975
+ this.__interruptedAnimation = !0, this.__isDecelerating && (Oe(this.__isDecelerating), this.__isDecelerating = 0, this.__interruptedAnimation = !0), this.__isAnimating && (Oe(this.__isAnimating), this.__isAnimating = 0, this.__interruptedAnimation = !0);
923
976
  let r = e.length === 1;
924
977
  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 = [];
925
978
  }
@@ -935,8 +988,8 @@ class eo {
935
988
  if (n !== void 0 && this.options.zooming) {
936
989
  let d = u;
937
990
  if (u = u / this.__lastScale * n, u = Math.max(Math.min(u, this.options.maxZoom), this.options.minZoom), d !== u) {
938
- let f = o - this.__clientLeft, b = r - this.__clientTop;
939
- l = (f + l) * u / d - f, c = (b + c) * u / d - b, this.__computeScrollMax(u);
991
+ let f = o - this.__clientLeft, _ = r - this.__clientTop;
992
+ l = (f + l) * u / d - f, c = (_ + c) * u / d - _, this.__computeScrollMax(u);
940
993
  }
941
994
  }
942
995
  if (this.__enableScrollX) {
@@ -974,16 +1027,16 @@ class eo {
974
1027
  }
975
1028
  __publish(e, t, n, o = !1) {
976
1029
  const r = this.__isAnimating;
977
- if (r && (Be(r), this.__isAnimating = 0), o && this.options.animating) {
1030
+ if (r && (Oe(r), this.__isAnimating = 0), o && this.options.animating) {
978
1031
  this.__scheduledLeft = e, this.__scheduledTop = t, this.__scheduledZoom = n;
979
- const a = this.__scrollLeft, h = this.__scrollTop, s = this.__zoomLevel, l = e - a, c = t - h, u = n - s, d = function(_, k, T) {
980
- T && (this.__scrollLeft = a + l * _, this.__scrollTop = h + c * _, this.__zoomLevel = s + u * _, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
981
- }.bind(this), f = function(_) {
982
- return this.__isAnimating === _;
983
- }.bind(this), b = function(_, k, T) {
984
- k === this.__isAnimating && (this.__isAnimating = !1), (this.__didDecelerationComplete || T) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
1032
+ const a = this.__scrollLeft, h = this.__scrollTop, s = this.__zoomLevel, l = e - a, c = t - h, u = n - s, d = function(g, M, P) {
1033
+ P && (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));
1034
+ }.bind(this), f = function(g) {
1035
+ return this.__isAnimating === g;
1036
+ }.bind(this), _ = function(g, M, P) {
1037
+ M === this.__isAnimating && (this.__isAnimating = !1), (this.__didDecelerationComplete || P) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
985
1038
  }.bind(this);
986
- this.__isAnimating = At(d, f, b, this.options.animationDuration, r ? Jn : Qn);
1039
+ this.__isAnimating = Bt(d, f, _, this.options.animationDuration, r ? no : oo);
987
1040
  } 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));
988
1041
  }
989
1042
  __computeScrollMax(e = this.__zoomLevel) {
@@ -1002,7 +1055,7 @@ class eo {
1002
1055
  }.bind(this), r = function(a, h, s) {
1003
1056
  this.__isDecelerating = 0, this.__didDecelerationComplete && this.options.scrollingComplete?.(), this.scrollTo(this.__scrollLeft, this.__scrollTop, this.options.snapping);
1004
1057
  }.bind(this);
1005
- this.__isDecelerating = At(t, o, r);
1058
+ this.__isDecelerating = Bt(t, o, r);
1006
1059
  }
1007
1060
  __stepThroughDeceleration(e) {
1008
1061
  let t = this.__scrollLeft + this.__decelerationVelocityX, n = this.__scrollTop + this.__decelerationVelocityY;
@@ -1018,7 +1071,7 @@ class eo {
1018
1071
  }
1019
1072
  }
1020
1073
  }
1021
- const $e = (i, e) => C(Zn, { ...i, ref: e }), No = Object.freeze(Object.defineProperty({ __proto__: null, defaultCreateScrollbar: $e, getScrollTo: (i, e, t, n, o = 0) => {
1074
+ const Ke = (i, e) => C(eo, { ...i, ref: e }), Yo = Object.freeze(Object.defineProperty({ __proto__: null, defaultCreateScrollbar: Ke, getScrollTo: (i, e, t, n, o = 0) => {
1022
1075
  for (let r = 0; r < t.length; r++) {
1023
1076
  const a = t[r].getBoundingClientRect();
1024
1077
  let h = a.left - e, s = h + a.width;
@@ -1027,90 +1080,70 @@ const $e = (i, e) => C(Zn, { ...i, ref: e }), No = Object.freeze(Object.definePr
1027
1080
  } else if (Math.ceil(s) > Math.ceil(i) + 2) return s;
1028
1081
  }
1029
1082
  return o;
1030
- } }, Symbol.toStringTag, { value: "Module" })), to = ({ width: i, height: e }) => C("div", { className: "corner", style: { minWidth: `${i}px`, width: `${i}px`, minHeight: `${e}px`, height: `${e}px` } }), no = ve(Pe((i, e) => {
1031
- const { children: t, viewport: n, onScrollViewport: o, showHorizontalScrollbar: r = !0, showVerticalScrollbar: a = !0, createScrollCorner: h = to, createHorizontalScrollbar: s = $e, createVerticalScrollbar: l = $e, style: c, touchElement: u, disableTouch: d, ...f } = i, b = r && s, _ = a && l, k = M(o, [o]), T = _t(e, () => ({ isScrollPane: () => !0 }), []), m = O(null);
1032
- I(() => {
1033
- m.current && (m.current.__scrollTop === n?.top && m.current.__scrollLeft === n?.left || m.current.__isDecelerating || m.current?.scrollTo(n?.left, n?.top, !1));
1083
+ } }, Symbol.toStringTag, { value: "Module" })), ro = ({ width: i, height: e }) => C("div", { className: "corner", style: { minWidth: `${i}px`, width: `${i}px`, minHeight: `${e}px`, height: `${e}px` } }), so = we(ke((i, e) => {
1084
+ const { children: t, viewport: n, onScrollViewport: o, showHorizontalScrollbar: r = !0, showVerticalScrollbar: a = !0, createScrollCorner: h = ro, createHorizontalScrollbar: s = Ke, createVerticalScrollbar: l = Ke, style: c, touchElement: u, disableTouch: d, ...f } = i, _ = r && s, g = a && l, M = k(o, [o]), P = yt(e, () => ({ isScrollPane: () => !0 }), []), y = O(null);
1085
+ N(() => {
1086
+ y.current && (y.current.__scrollTop === n?.top && y.current.__scrollLeft === n?.left || y.current.__isDecelerating || y.current?.scrollTo(n?.left, n?.top, !1));
1034
1087
  }, [n?.left, n?.top, u]);
1035
- const v = V((p, L) => {
1036
- k?.({ left: p, top: L });
1037
- }, []), w = V((p) => {
1038
- m.current?.doTouchStart(p.touches, p.timeStamp);
1039
- }, []), D = V((p) => {
1040
- p.preventDefault(), m.current?.doTouchMove(p.touches, p.timeStamp);
1041
- }, []), E = V((p) => {
1042
- m.current?.doTouchEnd(p.timeStamp);
1043
- }, []), H = V(({ containerWidth: p, containerHeight: L, totalWidth: $, totalHeight: X }) => {
1044
- m.current.setDimensions(p, L, $, X);
1088
+ const w = V((p, v) => {
1089
+ M?.({ left: p, top: v });
1090
+ }, []), m = V((p) => {
1091
+ y.current?.doTouchStart(p.touches, p.timeStamp);
1092
+ }, []), A = V((p) => {
1093
+ p.preventDefault(), y.current?.doTouchMove(p.touches, p.timeStamp);
1094
+ }, []), S = V((p) => {
1095
+ y.current?.doTouchEnd(p.timeStamp);
1096
+ }, []), T = V(({ containerWidth: p, containerHeight: v, totalWidth: K, totalHeight: G }) => {
1097
+ y.current.setDimensions(p, v, K, G);
1045
1098
  }, []);
1046
- I(() => {
1047
- const p = u ?? T.current;
1048
- if (!d && dt().supportsTouchEvents && p && n) {
1049
- if (!m.current) {
1050
- const L = { scrollingX: !0, scrollingY: !0, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
1051
- m.current = new eo(v, L);
1099
+ N(() => {
1100
+ const p = u ?? P.current;
1101
+ if (!d && mt().supportsTouchEvents && p && n) {
1102
+ if (!y.current) {
1103
+ const v = { scrollingX: !0, scrollingY: !0, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
1104
+ y.current = new io(w, v);
1052
1105
  }
1053
- dt().supportsTouchEvents && (p.addEventListener("touchstart", w), p.addEventListener("touchend", E), p.addEventListener("touchmove", D)), H({ containerWidth: n?.width, containerHeight: n?.height, totalWidth: n?.totalWidth, totalHeight: n?.totalHeight });
1106
+ mt().supportsTouchEvents && (p.addEventListener("touchstart", m), p.addEventListener("touchend", S), p.addEventListener("touchmove", A)), T({ containerWidth: n?.width, containerHeight: n?.height, totalWidth: n?.totalWidth, totalHeight: n?.totalHeight });
1054
1107
  }
1055
1108
  return () => {
1056
- p?.removeEventListener("touchstart", w), p?.removeEventListener("touchend", E), p?.removeEventListener("touchmove", D);
1109
+ p?.removeEventListener("touchstart", m), p?.removeEventListener("touchend", S), p?.removeEventListener("touchmove", A);
1057
1110
  };
1058
1111
  }, [n?.width, n?.height, n?.totalWidth, n?.totalHeight, d, u]);
1059
- const [N, { width: S }] = Te(), [g, { height: A }] = Te(), y = K(() => {
1060
- if (!_) return null;
1061
- const p = l({ orientation: ae.Vertical, offset: n?.top, viewportSize: n?.height, totalSize: n?.totalHeight, onScrollOffset: (L) => {
1062
- k?.({ top: L });
1112
+ const [I, { width: x }] = ve(), [E, { height: z }] = ve(), L = R(() => {
1113
+ if (!g) return null;
1114
+ const p = l({ orientation: ae.Vertical, offset: n?.top, viewportSize: n?.height, totalSize: n?.totalHeight, onScrollOffset: (v) => {
1115
+ M?.({ top: v });
1063
1116
  } });
1064
- return C("div", { style: { display: "flex", flex: "0" }, ref: N, children: p });
1065
- }, [l, n?.top, n?.height, n?.totalHeight]), z = K(() => {
1066
- if (!b) return null;
1067
- const p = s({ orientation: ae.Horizontal, offset: n?.left, viewportSize: n?.width, totalSize: n?.totalWidth, onScrollOffset: (L) => {
1068
- k?.({ left: L });
1117
+ return C("div", { style: { display: "flex", flex: "0" }, ref: I, children: p });
1118
+ }, [l, n?.top, n?.height, n?.totalHeight]), D = R(() => {
1119
+ if (!_) return null;
1120
+ const p = s({ orientation: ae.Horizontal, offset: n?.left, viewportSize: n?.width, totalSize: n?.totalWidth, onScrollOffset: (v) => {
1121
+ M?.({ left: v });
1069
1122
  } });
1070
- return Me("div", { style: { display: "flex", flex: "none", flexDirection: "row", alignItems: "stretch", justifyContent: "center" }, children: [C("div", { style: { display: "flex", flex: "1 1 100%", flexDirection: "column", width: `calc(100% - ${S}px)` }, children: C("div", { ref: g, className: "sizer", children: p }) }), _ ? h({ width: S, height: A }) : C(Ce, {})] });
1071
- }, [s, n?.left, n?.width, n?.totalWidth, _, h, S, A]);
1072
- return C("div", { style: { position: "relative", display: "flex", minWidth: _ ? `${S}px` : void 0, minHeight: b ? `${A}px` : void 0, ...c }, ...f, ref: T, children: Me("div", { style: { position: "relative", width: "100%", flex: "1 1 100%", display: "flex", flexDirection: "column", boxSizing: "border-box" }, children: [Me("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: [C("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: t }), _ ? y : C(Ce, {})] }), b ? z : C(Ce, {})] }) });
1123
+ return Ce("div", { style: { display: "flex", flex: "none", flexDirection: "row", alignItems: "stretch", justifyContent: "center" }, children: [C("div", { style: { display: "flex", flex: "1 1 100%", flexDirection: "column", width: `calc(100% - ${x}px)` }, children: C("div", { ref: E, className: "sizer", children: p }) }), g ? h({ width: x, height: z }) : C(Me, {})] });
1124
+ }, [s, n?.left, n?.width, n?.totalWidth, g, h, x, z]);
1125
+ return C("div", { style: { position: "relative", display: "flex", minWidth: g ? `${x}px` : void 0, minHeight: _ ? `${z}px` : void 0, ...c }, ...f, ref: P, children: Ce("div", { style: { position: "relative", width: "100%", flex: "1 1 100%", display: "flex", flexDirection: "column", boxSizing: "border-box" }, children: [Ce("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: [C("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: t }), g ? L : C(Me, {})] }), _ ? D : C(Me, {})] }) });
1073
1126
  }));
1074
- no.displayName = "ScrollPane";
1075
- let Fe = 0;
1076
- function Wo() {
1077
- const [i, e] = Y(!!document.fullscreenElement), t = V(() => {
1078
- const n = document.fullscreenElement;
1079
- return n ? n.querySelector(".fullscreen-portal-root") || n : document.body;
1080
- }, []);
1081
- return I(() => {
1082
- function n() {
1083
- const o = document.fullscreenElement;
1084
- if (e(!!o), !o) return;
1085
- let r = o.querySelector(".fullscreen-portal-root");
1086
- r || (r = document.createElement("div"), r.className = "fullscreen-portal-root _fullscreen-portal-root_1mjsr_4", o.appendChild(r));
1087
- }
1088
- return Fe++, n(), document.addEventListener("fullscreenchange", n), () => {
1089
- document.removeEventListener("fullscreenchange", n), Fe--, Fe <= 0 && (document.querySelectorAll(".fullscreen-portal-root").forEach((o) => {
1090
- o.parentNode && o.parentNode.removeChild(o);
1091
- }), Fe = 0);
1092
- };
1093
- }, []), { getPortalContainer: t, isFullscreen: i };
1094
- }
1095
- const oo = 300, io = 100, ro = 1e6, so = 100, lo = 50, ao = ve(Pe((i, e) => {
1096
- const { offset: t = 0, viewportSize: n = 0, totalSize: o = 0, minSize: r = 0, endGap: a = oo, endScrollIncrement: h = io, style: s = Xt, onMouseDown: l, onScrollOffset: c, onScroll: u, scaleLimit: d = ro, scaleFactor: f = so, precisionFactor: b = lo, createScrollbar: _ = $e, ...k } = i;
1127
+ so.displayName = "ScrollPane";
1128
+ const lo = 300, ao = 100, co = 1e6, ho = 100, uo = 50, po = we(ke((i, e) => {
1129
+ const { offset: t = 0, viewportSize: n = 0, totalSize: o = 0, minSize: r = 0, endGap: a = lo, endScrollIncrement: h = ao, style: s = qt, onMouseDown: l, onScrollOffset: c, onScroll: u, scaleLimit: d = co, scaleFactor: f = ho, precisionFactor: _ = uo, createScrollbar: g = Ke, ...M } = i;
1097
1130
  u && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
1098
- const T = M(l, [l]), [m, v] = Y(!1), w = K(() => {
1099
- const S = d === 0 ? o : Math.min(o ?? 0, Math.max(r ?? 0, (t ?? 0) + (n ?? 0)) + (a ?? 0)), g = d !== 0 && S > d ? f : 1, A = g / b, y = Math.ceil(S / g);
1100
- return { offset: Math.ceil(t / g), totalSize: y, viewportSize: Math.ceil(n / g), scaledOffset: t, scaledTotalSize: o, scaledViewportSize: n, factor: g, precision: A };
1101
- }, [t, o, n, m, r, a, h]), D = M((S, g, A) => {
1102
- const y = w.offset;
1103
- Math.abs(S - y) < w.precision && (S = y), c?.(S * w.factor, y, w.viewportSize);
1104
- }, [c, w]), E = V((S) => {
1105
- }, []), H = V((S) => {
1106
- document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", H), v(!1);
1107
- }, []), N = V((S) => {
1108
- v(!0), T?.(S), document.addEventListener("mousemove", E, { passive: !0 }), document.addEventListener("mouseup", H, { passive: !0 });
1109
- }, [E, H]);
1110
- return $e({ style: s, ...k, offset: w.offset, totalSize: w.totalSize, viewportSize: w.viewportSize, onMouseDown: N, onScrollOffset: D }, e);
1131
+ const P = k(l, [l]), [y, w] = F(!1), m = R(() => {
1132
+ const x = d === 0 ? o : Math.min(o ?? 0, Math.max(r ?? 0, (t ?? 0) + (n ?? 0)) + (a ?? 0)), E = d !== 0 && x > d ? f : 1, z = E / _, L = Math.ceil(x / E);
1133
+ return { offset: Math.ceil(t / E), totalSize: L, viewportSize: Math.ceil(n / E), scaledOffset: t, scaledTotalSize: o, scaledViewportSize: n, factor: E, precision: z };
1134
+ }, [t, o, n, y, r, a, h]), A = k((x, E, z) => {
1135
+ const L = m.offset;
1136
+ Math.abs(x - L) < m.precision && (x = L), c?.(x * m.factor, L, m.viewportSize);
1137
+ }, [c, m]), S = V((x) => {
1138
+ }, []), T = V((x) => {
1139
+ document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", T), w(!1);
1140
+ }, []), I = V((x) => {
1141
+ w(!0), P?.(x), document.addEventListener("mousemove", S, { passive: !0 }), document.addEventListener("mouseup", T, { passive: !0 });
1142
+ }, [S, T]);
1143
+ return Ke({ style: s, ...M, offset: m.offset, totalSize: m.totalSize, viewportSize: m.viewportSize, onMouseDown: I, onScrollOffset: A }, e);
1111
1144
  }));
1112
- ao.displayName = "VirtualScrollbar";
1113
- const Vo = { 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" }, Fo = ve(Pe((i, e) => {
1145
+ po.displayName = "VirtualScrollbar";
1146
+ const Go = { 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" }, Zo = we(ke((i, e) => {
1114
1147
  const { refFocusStart: t, ...n } = i, o = O(null), r = V(() => {
1115
1148
  if (t) return void t?.current?.focus();
1116
1149
  const a = o.current.parentElement.children;
@@ -1124,60 +1157,60 @@ const Vo = { BottomEnd: "bottom-end", BottomStart: "bottom-start", Bottom: "bott
1124
1157
  return l.tabindex - c.tabindex;
1125
1158
  }), h[0].child.focus());
1126
1159
  }, [t]);
1127
- return C("div", { tabIndex: 0, ref: Oe([o, e]), onFocus: r, ...n });
1128
- })), jo = ve(Pe((i, e) => {
1129
- const { className: t, style: n, children: o, radius: r = 4, strokeWidth: a = 1, strokeColor: h = "grey", ...s } = i, [l, { width: c, height: u }] = Te(), d = O(null), f = (T, m = 0) => {
1130
- const v = T / 2, w = u - v + m;
1131
- return (function(D, E, H = !1) {
1132
- if (E === 0) return D;
1133
- function N(p, L, $) {
1134
- let X = L.x - p.x, F = L.y - p.y, te = Math.sqrt(X * X + F * F);
1135
- return S(p, L, Math.min(1, $ / te));
1160
+ return C("div", { tabIndex: 0, ref: $e([o, e]), onFocus: r, ...n });
1161
+ })), qo = we(ke((i, e) => {
1162
+ const { className: t, style: n, children: o, radius: r = 4, strokeWidth: a = 1, strokeColor: h = "grey", ...s } = i, [l, { width: c, height: u }] = ve(), d = O(null), f = (P, y = 0) => {
1163
+ const w = P / 2, m = u - w + y;
1164
+ return (function(A, S, T = !1) {
1165
+ if (S === 0) return A;
1166
+ function I(p, v, K) {
1167
+ let G = v.x - p.x, j = v.y - p.y, Q = Math.sqrt(G * G + j * j);
1168
+ return x(p, v, Math.min(1, K / Q));
1136
1169
  }
1137
- function S(p, L, $) {
1138
- return { x: p.x + (L.x - p.x) * $, y: p.y + (L.y - p.y) * $ };
1170
+ function x(p, v, K) {
1171
+ return { x: p.x + (v.x - p.x) * K, y: p.y + (v.y - p.y) * K };
1139
1172
  }
1140
- function g(p, L) {
1141
- p.length > 2 && (p[p.length - 2] = L.x, p[p.length - 1] = L.y);
1173
+ function E(p, v) {
1174
+ p.length > 2 && (p[p.length - 2] = v.x, p[p.length - 1] = v.y);
1142
1175
  }
1143
- function A(p) {
1176
+ function z(p) {
1144
1177
  return { x: parseFloat(p[p.length - 2]), y: parseFloat(p[p.length - 1]) };
1145
1178
  }
1146
- let y = D.split(/[,\s]/).reduce(function(p, L) {
1147
- let $ = L.match("([a-zA-Z])(.+)");
1148
- return $ ? (p.push($[1]), p.push($[2])) : p.push(L), p;
1149
- }, []).reduce(function(p, L) {
1150
- return parseFloat(L) == L && p.length ? p[p.length - 1].push(L) : p.push([L]), p;
1151
- }, []), z = [];
1152
- if (y.length > 1) {
1153
- let p = A(y[0]), L = null;
1154
- y[y.length - 1][0] === "Z" && y[0].length > 2 && (L = ["L", p.x, p.y], y[y.length - 1] = L), z.push(y[0]);
1155
- for (let $ = 1; $ < y.length; $++) {
1156
- let X = z[z.length - 1], F = y[$], te = F === L ? y[1] : y[$ + 1];
1157
- if (te && X && X.length > 2 && F[0] === "L" && te.length > 2 && te[0] === "L") {
1158
- let G, W, oe = A(X), J = A(F), we = A(te);
1159
- H ? (G = S(J, X.origPoint || oe, E), W = S(J, te.origPoint || we, E)) : (G = N(J, oe, E), W = N(J, we, E)), g(F, G), F.origPoint = J, z.push(F);
1160
- let pe = S(G, J, 0.5), fe = S(J, W, 0.5), _e = ["C", pe.x, pe.y, fe.x, fe.y, W.x, W.y];
1161
- _e.origPoint = J, z.push(_e);
1162
- } else z.push(F);
1179
+ let L = A.split(/[,\s]/).reduce(function(p, v) {
1180
+ let K = v.match("([a-zA-Z])(.+)");
1181
+ return K ? (p.push(K[1]), p.push(K[2])) : p.push(v), p;
1182
+ }, []).reduce(function(p, v) {
1183
+ return parseFloat(v) == v && p.length ? p[p.length - 1].push(v) : p.push([v]), p;
1184
+ }, []), D = [];
1185
+ if (L.length > 1) {
1186
+ let p = z(L[0]), v = null;
1187
+ L[L.length - 1][0] === "Z" && L[0].length > 2 && (v = ["L", p.x, p.y], L[L.length - 1] = v), D.push(L[0]);
1188
+ for (let K = 1; K < L.length; K++) {
1189
+ let G = D[D.length - 1], j = L[K], Q = j === v ? L[1] : L[K + 1];
1190
+ if (Q && G && G.length > 2 && j[0] === "L" && Q.length > 2 && Q[0] === "L") {
1191
+ let Z, W, oe = z(G), J = z(j), be = z(Q);
1192
+ T ? (Z = x(J, G.origPoint || oe, S), W = x(J, Q.origPoint || be, S)) : (Z = I(J, oe, S), W = I(J, be, S)), E(j, Z), j.origPoint = J, D.push(j);
1193
+ let xe = x(Z, J, 0.5), Se = x(J, W, 0.5), pe = ["C", xe.x, xe.y, Se.x, Se.y, W.x, W.y];
1194
+ pe.origPoint = J, D.push(pe);
1195
+ } else D.push(j);
1163
1196
  }
1164
- if (L) {
1165
- let $ = A(z[z.length - 1]);
1166
- z.push(["Z"]), g(z[0], $);
1197
+ if (v) {
1198
+ let K = z(D[D.length - 1]);
1199
+ D.push(["Z"]), E(D[0], K);
1167
1200
  }
1168
- } else z = y;
1169
- return z.reduce(function(p, L) {
1170
- return p + L.join(" ") + " ";
1201
+ } else D = L;
1202
+ return D.reduce(function(p, v) {
1203
+ return p + v.join(" ") + " ";
1171
1204
  }, "");
1172
- })(`${`M 0 ${v} L ${r - 0.5} ${v} L ${r - 0.5} ${w} L ${2 * r} ${w}`} ${`L ${c - 2 * r} ${w}`} ${`M ${c - 2 * r} ${w} L ${c - r} ${w} L ${c - r} ${v} L ${c} ${v}`}`, r);
1173
- }, b = K(() => f(a), [c, u, r, a]), _ = K(() => {
1205
+ })(`${`M 0 ${w} L ${r - 0.5} ${w} L ${r - 0.5} ${m} L ${2 * r} ${m}`} ${`L ${c - 2 * r} ${m}`} ${`M ${c - 2 * r} ${m} L ${c - r} ${m} L ${c - r} ${w} L ${c} ${w}`}`, r);
1206
+ }, _ = R(() => f(a), [c, u, r, a]), g = R(() => {
1174
1207
  if (r === 0) return;
1175
- const T = r / 2;
1176
- return f(r) + `L ${c} 0 L 0 0 L 0 ${T}`;
1177
- }, [b, r, a]), k = K(() => ({ style: { clipPath: `path('${_}')` } }), [_]);
1178
- return Me("div", { className: t, style: { display: "flex", flexDirection: "row", ...n }, ...s, ref: Oe([d, l, e]), children: [se.isValidElement(o) ? se.cloneElement(o, k) : C(Ce, {}), C("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: c, height: u, viewBox: `0 0 ${c} ${u}`, children: C("path", { d: b, stroke: h, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: a }) })] });
1208
+ const P = r / 2;
1209
+ return f(r) + `L ${c} 0 L 0 0 L 0 ${P}`;
1210
+ }, [_, r, a]), M = R(() => ({ style: { clipPath: `path('${g}')` } }), [g]);
1211
+ return Ce("div", { className: t, style: { display: "flex", flexDirection: "row", ...n }, ...s, ref: $e([d, l, e]), children: [re.isValidElement(o) ? re.cloneElement(o, M) : C(Me, {}), C("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: c, height: u, viewBox: `0 0 ${c} ${u}`, children: C("path", { d: _, stroke: h, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: a }) })] });
1179
1212
  }));
1180
- class co extends fn {
1213
+ class fo extends mn {
1181
1214
  static getDerivedStateFromError() {
1182
1215
  return { hasError: !0 };
1183
1216
  }
@@ -1188,13 +1221,13 @@ class co extends fn {
1188
1221
  return this.props.children;
1189
1222
  }
1190
1223
  }
1191
- const Uo = ({ children: i }) => {
1192
- const e = qe(), t = V((n) => {
1224
+ const Qo = ({ children: i }) => {
1225
+ const e = Qe(), t = V((n) => {
1193
1226
  e.showError(n);
1194
1227
  }, [e]);
1195
- return C(co, { onError: t, children: i });
1228
+ return C(fo, { onError: t, children: i });
1196
1229
  };
1197
- class ho {
1230
+ class mo {
1198
1231
  constructor(e) {
1199
1232
  this.notifier = e, this.handleUnhandledRejection = (t) => {
1200
1233
  const n = t.reason;
@@ -1210,71 +1243,71 @@ class ho {
1210
1243
  window.removeEventListener("unhandledrejection", this.handleUnhandledRejection), window.removeEventListener("error", this.handleGlobalError);
1211
1244
  }
1212
1245
  }
1213
- const Yo = ({ children: i }) => {
1214
- const e = qe();
1215
- return I(() => {
1216
- const t = new ho(e);
1246
+ const Jo = ({ children: i }) => {
1247
+ const e = Qe();
1248
+ return N(() => {
1249
+ const t = new mo(e);
1217
1250
  return () => {
1218
1251
  t.cleanup();
1219
1252
  };
1220
- }, [e]), C(Ce, { children: i });
1221
- }, Xo = () => null, uo = {}, po = (i) => {
1222
- const { onPointerDown: e, style: t, splitDirection: n, paddingBefore: o = 0, paddingAfter: r = 0, disabled: a, key: h, hitAreaProps: s = uo, ...l } = i, c = n === "row", { style: u, className: d, ...f } = s;
1253
+ }, [e]), C(Me, { children: i });
1254
+ }, ei = () => null, _o = {}, go = (i) => {
1255
+ const { onPointerDown: e, style: t, splitDirection: n, paddingBefore: o = 0, paddingAfter: r = 0, disabled: a, key: h, hitAreaProps: s = _o, ...l } = i, c = n === "row", { style: u, className: d, ...f } = s;
1223
1256
  return C("div", { style: { ...t, position: "relative" }, ...l, children: C("div", { className: le("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);
1224
- }, je = {}, ge = (i, e, t = !0) => i === null ? null : i.pixels !== null ? t ? i.pixels : e - i.pixels : (t ? i.percent : 100 - i.percent) / 100 * e, Ue = (i, e = !0) => i?.percent ? `${e ? i.percent : 100 - i.percent}%` : i?.pixels ? `${i.pixels}px` : void 0, ue = (i, e) => {
1257
+ }, Ue = {}, ge = (i, e, t = !0) => i === null ? null : i.pixels !== null ? t ? i.pixels : e - i.pixels : (t ? i.percent : 100 - i.percent) / 100 * e, Xe = (i, e = !0) => i?.percent ? `${e ? i.percent : 100 - i.percent}%` : i?.pixels ? `${i.pixels}px` : void 0, ue = (i, e) => {
1225
1258
  if (i == null) return null;
1226
1259
  const t = { percent: null, pixels: null };
1227
1260
  let n = e;
1228
1261
  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);
1229
- }, Go = ve(Pe((i, e) => {
1230
- 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: b, disabled: _ = !1, onDragStart: k, onDragResize: T, onDragFinish: m, resizerProps: v = je, paneProps: w = je, paneBeforeProps: D = je, paneAfterProps: E = je, createResizer: H = po } = i;
1262
+ }, yo = we(ke((i, e) => {
1263
+ 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: _, disabled: g = !1, onDragStart: M, onDragResize: P, onDragFinish: y, resizerProps: w = Ue, paneProps: m = Ue, paneBeforeProps: A = Ue, paneAfterProps: S = Ue, createResizer: T = go } = i;
1231
1264
  if (d) throw new Error("Use elementBefore and elementAfter instead of children.");
1232
- const N = K(() => se.isValidElement(n) && se.isValidElement(t), [n, t]), S = K(() => {
1233
- let P = null;
1234
- r && (r === "before" ? P = 0 : r === "after" && (P = 1));
1235
- const R = P === null;
1236
- return { fixedPaneOffset: P, isPercent: R, minBefore: ue(s, R), maxBefore: ue(l, R), minAfter: ue(c, R), maxAfter: ue(u, R) };
1237
- }, [s, l, c, u]), g = M(h, [h]), [A, y] = Y(() => ue(a, r === null));
1238
- I(() => {
1239
- y(ue(a, r === null));
1265
+ const I = R(() => re.isValidElement(n) && re.isValidElement(t), [n, t]), x = R(() => {
1266
+ let B = null;
1267
+ r && (r === "before" ? B = 0 : r === "after" && (B = 1));
1268
+ const H = B === null;
1269
+ return { fixedPaneOffset: B, isPercent: H, minBefore: ue(s, H), maxBefore: ue(l, H), minAfter: ue(c, H), maxAfter: ue(u, H) };
1270
+ }, [s, l, c, u]), E = k(h, [h]), [z, L] = F(() => ue(a, r === null));
1271
+ N(() => {
1272
+ L(ue(a, r === null));
1240
1273
  }, [a, r]);
1241
- const [z, { width: p, height: L }] = Te(), [$, { width: X, height: F }] = Te(), te = o === "row" ? X : F, G = o === "row" ? p : L, W = K(() => ((P, R, Q, j) => {
1242
- const ce = [null, null], re = [null, null];
1243
- if (P || (P = { percent: j.fixedPaneOffset === null ? 50 : null, pixels: j.fixedPaneOffset === null ? null : 0 }), R === 0) return P?.pixels != null ? j.fixedPaneOffset !== 1 ? (ce[0] = P?.pixels, re[1] = 100) : (ce[1] = P?.pixels - Q, re[0] = 100) : P?.percent != null && (j.fixedPaneOffset !== 1 ? (re[0] = P?.percent, re[1] = 100 - P?.percent) : (re[1] = P?.percent, re[0] = 100 - P?.percent)), { percents: re, pixels: ce, minBefore: Ue(j.minBefore, !0), maxBefore: Ue(j.maxBefore, !0), minAfter: Ue(j.minAfter), maxAfter: Ue(j.maxAfter) };
1244
- let he = ge(P, R, j.fixedPaneOffset !== 1), ne = R - Q, vt = ge(j.minBefore, ne, !0) ?? 0, sn = ge(j.maxBefore, ne, !0) ?? ne, We = 0, et = 0, wt = 0, bt = ne;
1245
- We = (ge(j.maxAfter, R, !1) ?? Q) - Q, et = ge(j.minAfter, R, !1) ?? R, wt = Math.max(vt, We), bt = Math.min(sn, et), he = Math.max(wt, Math.min(he, bt)), et = Math.min(ne - he, ge(j.maxAfter, ne - he, !0) ?? ne), We = Math.min(ne - he, ge(j.minAfter, ne - he, !0) ?? ne), ce[0] = he, ce[1] = ne - ce[0];
1246
- const ln = Math.max(0, Math.min(100, he / ne * 100));
1247
- return re[0] = ln, re[1] = 100 - re[0], { percents: re, pixels: ce, minBefore: `${vt}px`, minAfter: `${We}px`, maxBefore: `${ce[0]}px`, maxAfter: `${ce[1]}px` };
1248
- })(A, G, te, S), [S, A, G, te, o]), [oe, J] = Y(!1), we = M(k, [k]), pe = M(T, [T]), fe = M(m, [m]), _e = O(null), Ke = O(null), Re = O(null), { style: be, className: xe, ...ie } = w, Se = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...be }, { className: Je, style: Qe, ...De } = D, { className: x, style: B, ...Z } = E, Ee = { flex: "1 1 100%", width: "100%", ...b, flexDirection: o, display: "flex" }, { className: me, style: Ae, onPointerDown: Ie, ...mt } = v, en = M((P) => {
1249
- const R = ue(P, r === null);
1250
- y(R);
1251
- }, [r]), He = M((P) => {
1252
- if (_ || !oe) return;
1253
- const R = yt.current?.getBoundingClientRect();
1254
- let Q = 0;
1255
- Q = o === "row" ? (P.clientX ?? P.touches?.[0]?.clientX) - R.x : (P.clientY ?? P.touches?.[0]?.clientY) - R.y, Q = Math.max(0, Math.min(G, Q)), S.fixedPaneOffset === 1 && (Q = G - Q), a && A.pixels === Q || y({ pixels: Q, percent: null }), pe?.(Q), P.stopPropagation(), P.preventDefault();
1256
- }, [S, o, _, oe, A, G]), gt = M((P) => {
1257
- if (document.removeEventListener("pointermove", He), document.removeEventListener("touchmove", He), document.removeEventListener("pointerup", gt), !!oe && (J(!1), !!A)) {
1258
- if (fe(A.pixels), !ue(a, r === null) || A.pixels !== a) {
1259
- const R = { ...A };
1260
- R.percent === null && (R.percent = R.pixels / G * 100), g(R);
1274
+ const [D, { width: p, height: v }] = ve(), [K, { width: G, height: j }] = ve(), Q = o === "row" ? G : j, Z = o === "row" ? p : v, W = R(() => ((B, H, ee, X) => {
1275
+ const ce = [null, null], ie = [null, null];
1276
+ if (B || (B = { percent: X.fixedPaneOffset === null ? 50 : null, pixels: X.fixedPaneOffset === null ? null : 0 }), H === 0) return B?.pixels != null ? X.fixedPaneOffset !== 1 ? (ce[0] = B?.pixels, ie[1] = 100) : (ce[1] = B?.pixels - ee, ie[0] = 100) : B?.percent != null && (X.fixedPaneOffset !== 1 ? (ie[0] = B?.percent, ie[1] = 100 - B?.percent) : (ie[1] = B?.percent, ie[0] = 100 - B?.percent)), { percents: ie, pixels: ce, minBefore: Xe(X.minBefore, !0), maxBefore: Xe(X.maxBefore, !0), minAfter: Xe(X.minAfter), maxAfter: Xe(X.maxAfter) };
1277
+ let he = ge(B, H, X.fixedPaneOffset !== 1), ne = H - ee, bt = ge(X.minBefore, ne, !0) ?? 0, an = ge(X.maxBefore, ne, !0) ?? ne, We = 0, nt = 0, xt = 0, St = ne;
1278
+ We = (ge(X.maxAfter, H, !1) ?? ee) - ee, nt = ge(X.minAfter, H, !1) ?? H, xt = Math.max(bt, We), St = Math.min(an, nt), he = Math.max(xt, Math.min(he, St)), nt = Math.min(ne - he, ge(X.maxAfter, ne - he, !0) ?? ne), We = Math.min(ne - he, ge(X.minAfter, ne - he, !0) ?? ne), ce[0] = he, ce[1] = ne - ce[0];
1279
+ const cn = Math.max(0, Math.min(100, he / ne * 100));
1280
+ return ie[0] = cn, ie[1] = 100 - ie[0], { percents: ie, pixels: ce, minBefore: `${bt}px`, minAfter: `${We}px`, maxBefore: `${ce[0]}px`, maxAfter: `${ce[1]}px` };
1281
+ })(z, Z, Q, x), [x, z, Z, Q, o]), [oe, J] = F(!1), be = k(M, [M]), xe = k(P, [P]), Se = k(y, [y]), pe = O(null), Re = O(null), Ne = O(null), { style: He, className: Pe, ...fe } = m, Ee = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...He }, { className: se, style: De, ...Je } = A, { className: et, style: Ae, ...b } = S, $ = { flex: "1 1 100%", width: "100%", ..._, flexDirection: o, display: "flex" }, { className: U, style: me, onPointerDown: _e, ...ze } = w, tt = k((B) => {
1282
+ const H = ue(B, r === null);
1283
+ L(H);
1284
+ }, [r]), Ie = k((B) => {
1285
+ if (g || !oe) return;
1286
+ const H = wt.current?.getBoundingClientRect();
1287
+ let ee = 0;
1288
+ ee = o === "row" ? (B.clientX ?? B.touches?.[0]?.clientX) - H.x : (B.clientY ?? B.touches?.[0]?.clientY) - H.y, ee = Math.max(0, Math.min(Z, ee)), x.fixedPaneOffset === 1 && (ee = Z - ee), a && z.pixels === ee || L({ pixels: ee, percent: null }), xe?.(ee), B.stopPropagation(), B.preventDefault();
1289
+ }, [x, o, g, oe, z, Z]), vt = k((B) => {
1290
+ if (document.removeEventListener("pointermove", Ie), document.removeEventListener("touchmove", Ie), document.removeEventListener("pointerup", vt), !!oe && (J(!1), !!z)) {
1291
+ if (Se(z.pixels), !ue(a, r === null) || z.pixels !== a) {
1292
+ const H = { ...z };
1293
+ H.percent === null && (H.percent = H.pixels / Z * 100), E(H);
1261
1294
  }
1262
- P.stopPropagation(), P.preventDefault();
1295
+ B.stopPropagation(), B.preventDefault();
1263
1296
  }
1264
- }, [A, oe, a, r, G]), tn = M((P) => {
1265
- Ie?.(P), P.defaultPrevented || _ || oe || (J(!0), we(), document.addEventListener("pointermove", He, { passive: !1 }), document.addEventListener("touchmove", He, { passive: !1 }), document.addEventListener("pointerup", gt, { passive: !1 }));
1266
- }, [Ie]), yt = _t(e, () => ({ setPosition: en, isSplitPane: () => !0 }), []), nn = K(() => N ? H?.({ key: "resizer", ref: Oe([$, Ke]), className: le("resizer", me), onPointerDownCapture: tn, style: { cursor: _ ? 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, ...Ae }, splitDirection: o, disabled: _, ...mt }) : null, [N, me, mt, o, Ae, _]), Ne = o === "row" ? "Width" : "Height", on = K(() => {
1297
+ }, [z, oe, a, r, Z]), on = k((B) => {
1298
+ _e?.(B), B.defaultPrevented || g || oe || (J(!0), be(), document.addEventListener("pointermove", Ie, { passive: !1 }), document.addEventListener("touchmove", Ie, { passive: !1 }), document.addEventListener("pointerup", vt, { passive: !1 }));
1299
+ }, [_e]), wt = yt(e, () => ({ setPosition: tt, isSplitPane: () => !0 }), []), rn = R(() => I ? T?.({ key: "resizer", ref: $e([K, Re]), className: le("resizer", U), onPointerDownCapture: on, 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, ...me }, splitDirection: o, disabled: g, ...ze }) : null, [I, U, ze, o, me, g]), Ve = o === "row" ? "Width" : "Height", sn = R(() => {
1267
1300
  if (!t) return null;
1268
- const P = { ...Se, ...Qe, flex: S.fixedPaneOffset === 0 && W?.pixels[0] !== null ? `0 0 ${Math.round(W?.pixels[0])}px` : `1 1 ${Math.round(W?.percents[0] ?? 100)}%`, [`min${Ne}`]: W?.minBefore, [`max${Ne}`]: n ? W?.maxBefore : "100%" };
1269
- return C("div", { ref: _e, className: le("before", xe, Je), style: P, ...ie, ...De, children: t }, "before");
1270
- }, [t, w, D, S, W]), rn = K(() => {
1301
+ const B = { ...Ee, ...De, flex: x.fixedPaneOffset === 0 && W?.pixels[0] !== null ? `0 0 ${Math.round(W?.pixels[0])}px` : `1 1 ${Math.round(W?.percents[0] ?? 100)}%`, [`min${Ve}`]: W?.minBefore, [`max${Ve}`]: n ? W?.maxBefore : "100%" };
1302
+ return C("div", { ref: pe, className: le("before", Pe, se), style: B, ...fe, ...Je, children: t }, "before");
1303
+ }, [t, m, A, x, W]), ln = R(() => {
1271
1304
  if (!n) return null;
1272
- const P = { ...Se, ...B, flex: S.fixedPaneOffset === 1 && W?.pixels[1] !== null ? `0 0 ${Math.round(W?.pixels[1])}px` : `1 1 ${Math.round(W?.percents[1] ?? 100)}%`, [`min${Ne}`]: W?.minAfter, [`max${Ne}`]: t ? W?.maxAfter : "100%" };
1273
- return C("div", { ref: Re, className: le("after", xe, x), style: P, ...ie, ...Z, children: n }, "after");
1274
- }, [n, w, E, S, W]);
1275
- return Me("div", { ref: Oe([z, yt]), className: le("splitPane", o === "row" ? "vertical" : "horizontal", { dragging: oe }, f), style: Ee, children: [on, nn, rn] });
1305
+ const B = { ...Ee, ...Ae, flex: x.fixedPaneOffset === 1 && W?.pixels[1] !== null ? `0 0 ${Math.round(W?.pixels[1])}px` : `1 1 ${Math.round(W?.percents[1] ?? 100)}%`, [`min${Ve}`]: W?.minAfter, [`max${Ve}`]: t ? W?.maxAfter : "100%" };
1306
+ return C("div", { ref: Ne, className: le("after", Pe, et), style: B, ...fe, ...b, children: n }, "after");
1307
+ }, [n, m, S, x, W]);
1308
+ return Ce("div", { ref: $e([D, wt]), className: le("splitPane", o === "row" ? "vertical" : "horizontal", { dragging: oe }, f), style: $, children: [sn, rn, ln] });
1276
1309
  }));
1277
- function fo(i) {
1310
+ function vo(i) {
1278
1311
  if (typeof i == "function") return i;
1279
1312
  if (typeof i == "string") {
1280
1313
  const e = i.trim();
@@ -1286,16 +1319,16 @@ function fo(i) {
1286
1319
  try {
1287
1320
  if (/;base64/i.test(r)) {
1288
1321
  if (typeof atob < "u") {
1289
- const h = atob(a);
1322
+ const h = atob(a), s = h.length;
1290
1323
  if (typeof TextDecoder < "u") {
1291
- const l = new Uint8Array(h.length);
1292
- for (let c = 0; c < h.length; c++) l[c] = h.charCodeAt(c);
1293
- return new TextDecoder("utf-8").decode(l);
1324
+ const c = new Uint8Array(s);
1325
+ for (let u = 0; u < s; u++) c[u] = h.charCodeAt(u);
1326
+ return new TextDecoder("utf-8").decode(c);
1294
1327
  }
1295
- let s = "";
1296
- for (let l = 0; l < h.length; l++)
1297
- s += `%${h.charCodeAt(l).toString(16).padStart(2, "0")}`;
1298
- return decodeURIComponent(s);
1328
+ let l = "";
1329
+ for (let c = 0; c < s; c++)
1330
+ l += `%${h.charCodeAt(c).toString(16).padStart(2, "0")}`;
1331
+ return decodeURIComponent(l);
1299
1332
  }
1300
1333
  return (globalThis.Buffer ? globalThis.Buffer.from(a, "base64") : require("buffer").Buffer.from(a, "base64")).toString("utf-8");
1301
1334
  }
@@ -1308,12 +1341,12 @@ function fo(i) {
1308
1341
  return null;
1309
1342
  }
1310
1343
  })(e);
1311
- if (t) return Ot(t);
1344
+ if (t) return Kt(t);
1312
1345
  }
1313
1346
  if (e.startsWith("<")) {
1314
- if (/^<\s*svg\b/i.test(e)) return Ot(e);
1347
+ if (/^<\s*svg\b/i.test(e)) return Kt(e);
1315
1348
  if (/^<\s*path\b/i.test(e)) {
1316
- const t = zt(e);
1349
+ const t = Ot(e);
1317
1350
  if (t) return { paths: [{ d: t }] };
1318
1351
  }
1319
1352
  return { paths: [{ d: e }] };
@@ -1325,7 +1358,7 @@ function fo(i) {
1325
1358
  for (const t of i) if (typeof t == "string") {
1326
1359
  const n = String(t).trim();
1327
1360
  if (n.startsWith("<path")) {
1328
- const o = zt(n);
1361
+ const o = Ot(n);
1329
1362
  o && e.push({ d: o });
1330
1363
  } else e.push({ d: n });
1331
1364
  } else t && typeof t == "object" && "d" in t && typeof t.d == "string" && e.push({ ...t });
@@ -1333,12 +1366,12 @@ function fo(i) {
1333
1366
  }
1334
1367
  return i;
1335
1368
  }
1336
- function zt(i) {
1369
+ function Ot(i) {
1337
1370
  const e = /\bd\s*=\s*(?:"([^"]+)"|'([^']+)')/i.exec(i);
1338
1371
  return e ? e[1] ?? e[2] ?? null : null;
1339
1372
  }
1340
- function Bt(i) {
1341
- if ("svg" in i) return { ...i, svg: fo(i.svg) };
1373
+ function $t(i) {
1374
+ if ("svg" in i) return { ...i, svg: vo(i.svg) };
1342
1375
  if ("url" in i) {
1343
1376
  const e = typeof i.url == "string" ? { src: i.url } : i.url;
1344
1377
  return { ...i, url: e };
@@ -1349,7 +1382,7 @@ function Bt(i) {
1349
1382
  }
1350
1383
  return i;
1351
1384
  }
1352
- function Ot(i) {
1385
+ function Kt(i) {
1353
1386
  try {
1354
1387
  if (typeof DOMParser < "u") {
1355
1388
  const a = new DOMParser().parseFromString(i, "image/svg+xml"), h = a.querySelector("svg"), s = h?.getAttribute("viewBox") ?? void 0, l = [];
@@ -1358,16 +1391,16 @@ function Ot(i) {
1358
1391
  if (!u) return;
1359
1392
  const d = { d: u }, f = c.getAttribute("class");
1360
1393
  f && (d.className = f);
1361
- const b = c.getAttribute("fill");
1362
- b && b !== "none" && (d.fill = b);
1363
- const _ = c.getAttribute("stroke");
1364
- _ && (d.stroke = _);
1365
- const k = c.getAttribute("opacity");
1366
- k && (d.opacity = Number(k));
1367
- const T = c.getAttribute("fill-rule");
1368
- T && (d.fillRule = T);
1369
- const m = c.getAttribute("clip-rule");
1370
- m && (d.clipRule = m), l.push(d);
1394
+ const _ = c.getAttribute("fill");
1395
+ _ && _ !== "none" && (d.fill = _);
1396
+ const g = c.getAttribute("stroke");
1397
+ g && (d.stroke = g);
1398
+ const M = c.getAttribute("opacity");
1399
+ M && (d.opacity = Number(M));
1400
+ const P = c.getAttribute("fill-rule");
1401
+ P && (d.fillRule = P);
1402
+ const y = c.getAttribute("clip-rule");
1403
+ y && (d.clipRule = y), l.push(d);
1371
1404
  }), { viewBox: s, paths: l };
1372
1405
  }
1373
1406
  } catch {
@@ -1377,9 +1410,9 @@ function Ot(i) {
1377
1410
  for (; r = o.exec(i); ) n.push({ d: r[1] });
1378
1411
  return { viewBox: t, paths: n };
1379
1412
  }
1380
- function $t(i) {
1413
+ function Rt(i) {
1381
1414
  const e = {};
1382
- for (const [r, a] of Object.entries(i.icons)) e[r] = Bt(a);
1415
+ for (const [r, a] of Object.entries(i.icons)) e[r] = $t(a);
1383
1416
  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 ?? [] };
1384
1417
  t.extends.includes("base") || t.extends.push("base");
1385
1418
  const n = { meta: t, icons: e }, o = i.overrides;
@@ -1387,14 +1420,14 @@ function $t(i) {
1387
1420
  const r = {};
1388
1421
  for (const [a, h] of Object.entries(o)) {
1389
1422
  const s = {};
1390
- for (const [l, c] of Object.entries(h)) s[l] = Bt(c);
1423
+ for (const [l, c] of Object.entries(h)) s[l] = $t(c);
1391
1424
  r[a] = s;
1392
1425
  }
1393
1426
  n.__overrides = r;
1394
1427
  }
1395
1428
  return n;
1396
1429
  }
1397
- function _o() {
1430
+ function wo() {
1398
1431
  const i = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
1399
1432
  let t = "base", n = /* @__PURE__ */ new Map();
1400
1433
  async function o(s) {
@@ -1405,7 +1438,7 @@ function _o() {
1405
1438
  if (!l.loader) throw new Error(`No loader for icon pack: ${s}`);
1406
1439
  l.loading = l.loader().then((c) => {
1407
1440
  const u = c && typeof c == "object" && "default" in c ? c.default : c;
1408
- l.pack = $t(u);
1441
+ l.pack = Rt(u);
1409
1442
  }).catch((c) => {
1410
1443
  throw l.loading = void 0, c;
1411
1444
  });
@@ -1422,8 +1455,8 @@ function _o() {
1422
1455
  for (const u of c) {
1423
1456
  const d = i.get(u);
1424
1457
  if (!d?.pack) continue;
1425
- const { icons: f } = d.pack, b = f[e.get(u)?.get(l) ?? l] ?? f[l];
1426
- if (b) return { glyph: b, pack: d.pack, packKey: u };
1458
+ const { icons: f } = d.pack, _ = f[e.get(u)?.get(l) ?? l] ?? f[l];
1459
+ if (_) return { glyph: _, pack: d.pack, packKey: u };
1427
1460
  }
1428
1461
  return null;
1429
1462
  }
@@ -1436,11 +1469,11 @@ function _o() {
1436
1469
  const f = i.get(u)?.pack;
1437
1470
  if (f) {
1438
1471
  if (i.get(t)?.pack) {
1439
- const _ = f.__overrides, k = _?.[t]?.[d];
1440
- if (k) return { glyph: k, pack: f, packKey: u };
1472
+ const g = f.__overrides, M = g?.[t]?.[d];
1473
+ if (M) return { glyph: M, pack: f, packKey: u };
1441
1474
  }
1442
- const b = a(u, d);
1443
- if (b) return b;
1475
+ const _ = a(u, d);
1476
+ if (_) return _;
1444
1477
  }
1445
1478
  return null;
1446
1479
  }
@@ -1448,7 +1481,7 @@ function _o() {
1448
1481
  }
1449
1482
  return { register: function(s, l) {
1450
1483
  const c = i.get(s) ?? {};
1451
- typeof l == "function" ? c.loader = l : c.pack = $t(l), i.set(s, c), t || (t = s);
1484
+ typeof l == "function" ? c.loader = l : c.pack = Rt(l), i.set(s, c), t || (t = s);
1452
1485
  }, prefetch: async function(s = t) {
1453
1486
  const l = Array.isArray(s) ? s : [s];
1454
1487
  await Promise.all(l.map(o));
@@ -1500,104 +1533,106 @@ function _o() {
1500
1533
  return n.set(s, c), c;
1501
1534
  } };
1502
1535
  }
1503
- const Xe = _o();
1504
- Xe.register("base", () => import("./DRyP2NC3cYmWNj79.mjs"));
1505
- const Kt = (i) => C("svg", { ...i, children: C("path", {}) }), mo = { Icon: "_Icon_1ipwo_10" }, go = ve((i) => {
1506
- 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] = se.useState(null);
1507
- se.useEffect(() => {
1508
- let y = !0, z = t, p = e;
1536
+ yo.displayName = "SplitPane";
1537
+ const Ge = wo();
1538
+ Ge.register("base", () => import("./CNTtjTL9eZe9TQw2.mjs"));
1539
+ const Nt = (i) => C("svg", { ...i, children: C("path", {}) }), bo = { Icon: "_Icon_1ld90_10" }, xo = we((i) => {
1540
+ 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] = re.useState(null);
1541
+ re.useEffect(() => {
1542
+ let L = !0, D = t, p = e;
1509
1543
  if (!p) {
1510
- const L = Xe.getPack(z);
1511
- return void f({ glyph: L ? { svg: q.EmptyArray } : void 0, pack: L ?? void 0, packKey: z ?? Xe.getActive() });
1544
+ const v = Ge.getPack(D);
1545
+ return void f({ glyph: v ? { svg: q.EmptyArray } : void 0, pack: v ?? void 0, packKey: D ?? Ge.getActive() });
1512
1546
  }
1513
1547
  if (p.includes(":")) {
1514
- const [L, $] = p.split(":");
1515
- z = L, p = $;
1548
+ const [v, K] = p.split(":");
1549
+ D = v, p = K;
1516
1550
  }
1517
- return Xe.resolve(p, { packKey: z }).then((L) => {
1518
- y && f(L);
1551
+ return Ge.resolve(p, { packKey: D }).then((v) => {
1552
+ L && f(v);
1519
1553
  }), () => {
1520
- y = !1;
1554
+ L = !1;
1521
1555
  };
1522
1556
  }, [e, t]);
1523
- const b = d?.pack, _ = d?.glyph, k = d?.packKey;
1524
- let T = _ ? _.svg : void 0;
1525
- const m = _ && !T ? _.url : void 0, v = !_ || T || m ? void 0 : _.emoji, w = h != null ? typeof h == "number" ? `${h}px` : h : void 0, D = K(() => [mo.Icon, "icon", n].filter(Boolean).join(" "), [n]), E = K(() => {
1526
- const y = { ...o };
1527
- return y["--icon-size"] = w, y;
1528
- }, [o, w]), H = r ?? (a ? "img" : "presentation"), N = s ?? (!a || void 0), S = (y) => C("span", { className: D, style: E, role: H, "aria-hidden": N, title: a, "data-icon-glyph": e, "data-icon-pack": k, ...u, children: y });
1529
- if (c) return S(c);
1530
- if (v) return S(C("span", { children: typeof v == "string" ? v : v.text }));
1531
- if (m) return S(C("img", { src: m.src, alt: a ?? "" }));
1532
- if (_ && "react" in _) {
1533
- const y = _.react, z = { className: D, style: E, role: H, "aria-hidden": N, title: a, ...u, ...l };
1534
- return S(C(y, { ...z }));
1535
- }
1536
- const g = { viewBox: T?.viewBox ?? b?.meta.defaultViewBox ?? "0 0 24 24" };
1537
- if (typeof T == "function")
1538
- return S(T(g) ?? C(Kt, { ...g }));
1539
- if (!T) return S(C(Kt, { ...g }));
1540
- const A = T.paths;
1541
- return S(C("svg", { ...g, children: A ? A.map((y, z) => C("path", { d: y.d, className: y.className, fill: y.fill, stroke: y.stroke, opacity: y.opacity, fillRule: y.fillRule, clipRule: y.clipRule }, z)) : null }));
1557
+ const _ = d?.pack, g = d?.glyph, M = d?.packKey;
1558
+ let P = g ? g.svg : void 0;
1559
+ const y = g && !P ? g.url : void 0, w = !g || P || y ? void 0 : g.emoji, m = h != null ? typeof h == "number" ? `${h}px` : h : void 0, A = R(() => [bo.Icon, "icon", n].filter(Boolean).join(" "), [n]), S = R(() => {
1560
+ const L = { ...o };
1561
+ return L["--icon-size"] = m, L;
1562
+ }, [o, m]), T = r ?? (a ? "img" : "presentation"), I = s ?? (!a || void 0), x = (L) => C("span", { className: A, style: S, role: T, "aria-hidden": I, title: a, "data-icon-glyph": e, "data-icon-pack": M, ...u, children: L });
1563
+ if (c) return x(c);
1564
+ if (w) return x(C("span", { children: typeof w == "string" ? w : w.text }));
1565
+ if (y) return x(C("img", { src: y.src, alt: a ?? "" }));
1566
+ if (g && "react" in g) {
1567
+ const L = g.react, D = { className: A, style: S, role: T, "aria-hidden": I, title: a, ...u, ...l };
1568
+ return x(C(L, { ...D }));
1569
+ }
1570
+ const E = { viewBox: P?.viewBox ?? _?.meta.defaultViewBox ?? "0 0 24 24" };
1571
+ if (typeof P == "function")
1572
+ return x(P(E) ?? C(Nt, { ...E }));
1573
+ if (!P) return x(C(Nt, { ...E }));
1574
+ const z = P.paths;
1575
+ return x(C("svg", { ...E, children: z ? z.map((L, D) => C("path", { d: L.d, className: L.className, fill: L.fill, stroke: L.stroke, opacity: L.opacity, fillRule: L.fillRule, clipRule: L.clipRule }, D)) : null }));
1542
1576
  });
1543
- function Zo(i) {
1544
- 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 = K(() => {
1577
+ function ti(i) {
1578
+ 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 = R(() => {
1545
1579
  if (!e) return;
1546
1580
  const f = { "--walk-duration": `${n * (o + r)}ms`, "--walk-dash-length": `${r}px`, "--walk-dash-gap": `${o}px` };
1547
1581
  return t && t !== "accent" && (f["--icon-accent"] = `var(--icon-${t})`), f;
1548
- }, [e, n, o, r, t]), d = K(() => e ? l + " walking" : l, [e, l]);
1549
- return C(go, { iconKey: a, packKey: h, className: d, style: { ...s, ...u }, ...c });
1582
+ }, [e, n, o, r, t]), d = R(() => e ? l + " walking" : l, [e, l]);
1583
+ return C(xo, { iconKey: a, packKey: h, className: d, style: { ...s, ...u }, ...c });
1550
1584
  }
1551
1585
  export {
1552
- ht as Command,
1553
- Oo as CommandButtonType,
1554
- Zt as CommandGroup,
1555
- Xe as DefaultDynamicIconService,
1556
- bn as DefaultReactNotifier,
1557
- go as DynamicIcon,
1558
- Xo as ErrorTestPanel,
1559
- Fo as FocusKeyNavigation,
1560
- So as HorizontalAlignment,
1561
- Eo as KeyCodes,
1562
- U as KeyModifiers,
1563
- Lo as MouseButtonCodes,
1564
- Co as NotifierProvider,
1565
- St as NotifierType,
1566
- Uo as ReactErrorBoundary,
1567
- Ao as ReactUtils,
1568
- jo as RoundedTab,
1569
- no as ScrollPane,
1570
- No as ScrollUtils,
1571
- Zn as Scrollbar,
1586
+ pt as Command,
1587
+ Io as CommandButtonType,
1588
+ Jt as CommandGroup,
1589
+ Ge as DefaultDynamicIconService,
1590
+ xn as DefaultReactNotifier,
1591
+ xo as DynamicIcon,
1592
+ ei as ErrorTestPanel,
1593
+ Zo as FocusKeyNavigation,
1594
+ To as HorizontalAlignment,
1595
+ ko as KeyCodes,
1596
+ Y as KeyModifiers,
1597
+ Po as MouseButtonCodes,
1598
+ Do as NotifierProvider,
1599
+ Lt as NotifierType,
1600
+ Qo as ReactErrorBoundary,
1601
+ Ro as ReactUtils,
1602
+ qo as RoundedTab,
1603
+ so as ScrollPane,
1604
+ Yo as ScrollUtils,
1605
+ eo as Scrollbar,
1572
1606
  ae as ScrollbarOrientation,
1573
- rt as SimpleCommand,
1574
- Go as SplitPane,
1575
- po as SplitPaneResizer,
1576
- Vo as ToolTipPlacement,
1577
- Yo as UncaughtErrorBoundary,
1578
- ao as VirtualScrollbar,
1579
- Zo as WalkingIcon,
1580
- _o as createDynamicIconService,
1581
- to as defaultCreateScrollCorner,
1582
- Ho as defaultCreateScrollEdgeButton,
1583
- Xn as defaultCreateScrollEndButton,
1584
- Yn as defaultCreateScrollStartButton,
1585
- To as getDevicePixelRatio,
1586
- ze as toShortcutString,
1587
- M as useCallbackRef,
1588
- zo as useCommand,
1589
- Bo as useCommands,
1590
- $o as useCopyPaste,
1591
- Mo as useDevicePixelRatio,
1592
- Do as useEditMode,
1593
- Wo as useFullscreenPortal,
1594
- Rn as useGlobalClipboard,
1595
- Ro as useId,
1596
- _t as useImperativeElement,
1597
- Po as useMouseDownAndHoldListener,
1598
- qe as useNotifier,
1599
- ko as useOnClickOrFocusAway,
1600
- xn as useSynchronizedPointerHandler,
1601
- Ko as useTraceUpdate,
1602
- Io as useUndoManager
1607
+ at as SimpleCommand,
1608
+ yo as SplitPane,
1609
+ go as SplitPaneResizer,
1610
+ Go as ToolTipPlacement,
1611
+ Jo as UncaughtErrorBoundary,
1612
+ po as VirtualScrollbar,
1613
+ ti as WalkingIcon,
1614
+ wo as createDynamicIconService,
1615
+ ro as defaultCreateScrollCorner,
1616
+ Uo as defaultCreateScrollEdgeButton,
1617
+ Qn as defaultCreateScrollEndButton,
1618
+ qn as defaultCreateScrollStartButton,
1619
+ Bo as getDevicePixelRatio,
1620
+ Be as toShortcutString,
1621
+ Ao as useAnimatedMeasure,
1622
+ k as useCallbackRef,
1623
+ No as useCommand,
1624
+ Ho as useCommands,
1625
+ Vo as useCopyPaste,
1626
+ zo as useDevicePixelRatio,
1627
+ Ko as useEditMode,
1628
+ Xo as useFullscreenPortal,
1629
+ Vn as useGlobalClipboard,
1630
+ Fo as useId,
1631
+ yt as useImperativeElement,
1632
+ $o as useMouseDownAndHoldListener,
1633
+ Qe as useNotifier,
1634
+ Oo as useOnClickOrFocusAway,
1635
+ Mn as useSynchronizedPointerHandler,
1636
+ Wo as useTraceUpdate,
1637
+ jo as useUndoManager
1603
1638
  };