@sheetxl/utils-react 0.7.21 → 0.7.22

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,11 +1,11 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("._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: calc(var(--icon-size, 1rem), * .875);--icon-size-md: var(--icon-size, 1rem);--icon-size-lg: calc(var(--icon-size, 1rem) * 1.25);--icon-size-xl: calc(var(--icon-size, 1rem) * 1.5)}._Icon_17dpm_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_17dpm_10 .sm{--font-size: var(--icon-size-sm)}._Icon_17dpm_10 .md{--font-size: var(--icon-size-md)}._Icon_17dpm_10 .lg{--font-size: var(--icon-size-lg)}._Icon_17dpm_10 .xl{--font-size: var(--icon-size-xl)}._Icon_17dpm_10>svg{width:var(--icon-size);height:var(--icon-size)}._Icon_17dpm_10>img{aspect-ratio:1 / 1;display:block;line-height:1}._Icon_17dpm_10 .fill,._Icon_17dpm_10 .line{--layer-color: var(--icon-color);--layer-opacity: var(--icon-main-opacity)}._Icon_17dpm_10 .secondary{--layer-color: var(--icon-secondary-color)}._Icon_17dpm_10 .tertiary{--layer-color: var(--icon-tertiary-color)}._Icon_17dpm_10 .primary{--layer-color: var(--sxl-app-color-primary, var(--icon-primary, #595b5e))}._Icon_17dpm_10 .secondary{--layer-color: var(--sxl-app-color-secondary, #9c27b0)}._Icon_17dpm_10 .secondary.light{--layer-color: var(--sxl-app-color-secondary-light, #a060ac)}._Icon_17dpm_10 .success{--layer-color: var(--sxl-app-color-success, #22c55e)}._Icon_17dpm_10 .success.light{--layer-color: var(--sxl-app-color-success-light, #22c55e)}._Icon_17dpm_10 .info{--layer-color: var(--sxl-app-color-info, #3b82f6)}._Icon_17dpm_10 .warn{--layer-color: var(--sxl-app-color-warn, #f59e0b)}._Icon_17dpm_10 .error{--layer-color: var(--sxl-app-color-error, #ef4444)}._Icon_17dpm_10 .error.light{--layer-color: var(--sxl-app-color-error-light, #f87171)}._Icon_17dpm_10 .grey{--layer-color: var(--sxl-app-color-grey, #cccccc)}._Icon_17dpm_10 .shadow{--layer-color: var(--sxl-app-color-shadow, #cccccc)}._Icon_17dpm_10 .fill:not(.fixed):not([fill]){fill:var(--layer-color);opacity:var(--layer-opacity);stroke:none}._Icon_17dpm_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_17dpm_10 .invert-dark{filter:invert(1) hue-rotate(180deg)}}._Icon_17dpm_10 .muted{opacity:calc(var(--layer-opacity, 1) * .6)}@keyframes _sxl-walk_17dpm_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_17dpm_1 var(--walk-duration, .96s) linear infinite;will-change:stroke-dashoffset}: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}:root .has-touch-thumb,:root .has-touch-thumb *{--scrollbar-size: 4px;--scrollbar-border-width: 0px;--scrollbar-width: var(--scrollbar-size);--scrollbar-height: var(--scrollbar-size)}:root{--scrollbar-width: var(--scrollbar-size);--scrollbar-height: var(--scrollbar-size);--scrollbar-border-radius: 9999px;--scrollbar-border-width: 2px;--scrollbar-min-thumb-size: 24px}._scrollbar_gqxsx_24 ::-webkit-scrollbar-button{background:transparent}._scrollbar_gqxsx_24{display:flex;flex:1 1 100%;overflow:hidden;border-radius:var(--scrollbar-border-radius);align-items:center;border:var(--scrollbar-border-width) solid transparent}._scrollbar_gqxsx_24 ._track_gqxsx_35{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_gqxsx_24 ._thumb_gqxsx_47{background:var(--scrollbar-thumb-color);border-radius:var(--scrollbar-border-radius);transition:background .12s;touch-action:none}._scrollbar_gqxsx_24 ._thumb_gqxsx_47:hover{background:var(--scrollbar-active-color)}._scrollbar_gqxsx_24.vertical{flex-direction:column;min-width:var(--scrollbar-width, 0px);max-width:var(--scrollbar-width, 100%)}._scrollbar_gqxsx_24.vertical ._thumb_gqxsx_47{min-height:var(--scrollbar-min-thumb-size)}._scrollbar_gqxsx_24.vertical ._track_gqxsx_35{width:100%}._scrollbar_gqxsx_24.horizontal{flex-direction:row;min-height:var(--scrollbar-height, 0px);max-height:var(--scrollbar-height, 100%)}._scrollbar_gqxsx_24.horizontal ._thumb_gqxsx_47{min-width:var(--scrollbar-min-thumb-size)}._scrollbar_gqxsx_24.horizontal ._track_gqxsx_35{height:100%}._scrollbar_gqxsx_24.dragging ._thumb_gqxsx_47{background:var(--scrollbar-active-color)}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89{display:flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89>*{fill:var(--scrollbar-button-color);transition:fill .12s ease}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89:hover:not([disabled])>*{fill:var(--scrollbar-active-color)}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89[disabled]>*{fill:var(--scrollbar-button-color);opacity:.5}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89.vertical{width:var(--scrollbar-width)}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89.horizontal{height:var(--scrollbar-height)}._touch-thumb_gqxsx_124{position:absolute;cursor:grab;pointer-events:all;transition-property:opacity;border-radius:9999px;will-change:opacity;opacity:.7}._touch-thumb_gqxsx_124:hover,._touch-thumb_gqxsx_124.dragging{opacity:1}._scrollpane_1fbi8_2{position:relative;display:flex}._vertical-container_1fbi8_7{display:flex;flex:0}._horizontal-corner-container_1fbi8_12{display:flex;flex:none;flex-direction:row;align-items:stretch;justify-content:center}._horizontal-container_1fbi8_20{display:flex;flex:1 1 100%;flex-direction:column}._scrollbar-sizer_1fbi8_26{display:flex;flex:1 1 100%;align-items:stretch;justify-content:stretch}._scrollpane-content_1fbi8_34{position:relative;width:100%;flex:1 1 100%;display:flex;flex-direction:column;box-sizing:border-box}._scrollpane-content-element_1fbi8_43{display:flex;flex:1 1 100%;overflow:hidden}")),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { CommonUtils as te, DefaultNotifier as vn, Notifier as xe, InternalClipboard as rt, ClipboardUtils as pt, MimeType as ft } from "@sheetxl/utils";
3
- import ae, { useRef as K, useReducer as Yt, useMemo as R, useEffect as W, useState as q, version as bn, memo as _e, forwardRef as Me, useCallback as U, useLayoutEffect as Lt, createContext as Gt, useContext as qt, createElement as wn, useImperativeHandle as xn, Component as Sn } from "react";
2
+ import ae, { useRef as K, useReducer as Yt, useMemo as R, useEffect as W, useState as q, version as vn, memo as _e, forwardRef as Le, useCallback as U, useLayoutEffect as Mt, createContext as Gt, useContext as qt, createElement as bn, useImperativeHandle as wn, Component as xn } from "react";
3
+ import { CommonUtils as te, DefaultNotifier as Sn, Notifier as xe, InternalClipboard as rt, ClipboardUtils as pt, MimeType as ft } from "@sheetxl/utils";
4
4
  import { jsx as P, jsxs as fe, Fragment as me } from "react/jsx-runtime";
5
5
  import { createRoot as En } from "react-dom/client";
6
- import { unstable_batchedUpdates as Mn, createPortal as Ln } from "react-dom";
6
+ import { unstable_batchedUpdates as Ln, createPortal as Mn } from "react-dom";
7
7
  /**
8
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.21
8
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.22
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.
@@ -14,10 +14,10 @@ const $o = { General: "general", Left: "left", Right: "right", Center: "center",
14
14
  class bt {
15
15
  constructor(e, t, n, r) {
16
16
  this._listenersProperties = /* @__PURE__ */ new Set(), this._listenersExecute = /* @__PURE__ */ new Set(), this._key = e, this._target = t, this._applyProps(n || {}), this._callback = r, r === void 0 && (this._callback = () => {
17
- console.log(`implement: ${this.label()} : ${this.description()}`);
17
+ console.log(`implement: ${this.getLabel()} : ${this.getDescription()}`);
18
18
  });
19
19
  }
20
- key() {
20
+ getKey() {
21
21
  return this._key;
22
22
  }
23
23
  _resolve(e, t) {
@@ -27,10 +27,10 @@ class bt {
27
27
  }
28
28
  return e;
29
29
  }
30
- target() {
30
+ getTarget() {
31
31
  return typeof this._target == "function" ? this._target() : this._target;
32
32
  }
33
- label(e, t) {
33
+ getLabel(e, t) {
34
34
  const n = this._scopedLabels?.[e] || this._label;
35
35
  let r = null;
36
36
  if (typeof n == "function") {
@@ -39,25 +39,25 @@ class bt {
39
39
  } else r = n;
40
40
  return r;
41
41
  }
42
- description(e) {
42
+ getDescription(e) {
43
43
  return this._resolve(this._description, e);
44
44
  }
45
- tags(e) {
45
+ getTags(e) {
46
46
  return this._resolve(this._tags, e);
47
47
  }
48
- icon(e) {
48
+ getIcon(e) {
49
49
  return this._resolve(this._icon, e);
50
50
  }
51
- shortcut() {
51
+ getShortcut() {
52
52
  return this._resolve(this._shortcut);
53
53
  }
54
54
  disabled() {
55
55
  return this._resolve(this._disabled) || !this._callback;
56
56
  }
57
- state() {
57
+ getState() {
58
58
  return this._resolve(this._state);
59
59
  }
60
- context() {
60
+ getContext() {
61
61
  return typeof this._context == "function" ? this._context() : this._context;
62
62
  }
63
63
  async execute(e, t) {
@@ -124,6 +124,34 @@ class bt {
124
124
  }
125
125
  class mt extends bt {
126
126
  }
127
+ function Ro(o, e = null) {
128
+ const t = K(e);
129
+ t.current = e;
130
+ const [n, r] = Yt((c) => c + 1, 0), i = R(() => Array.isArray(o) ? o : [o], [o]);
131
+ return W(() => {
132
+ const c = i ? i.length : 0;
133
+ if (c === 0) return;
134
+ const h = (a, u) => {
135
+ t.current?.onChange?.(u), r();
136
+ };
137
+ let s = null;
138
+ e && (s = { onExecute(a, u) {
139
+ t.current?.onExecute?.(a, u);
140
+ }, onError(a, u, d) {
141
+ t.current?.onError?.(a, u, d);
142
+ } });
143
+ const l = /* @__PURE__ */ new Set();
144
+ for (let a = 0; a < c; a++) {
145
+ const u = i[a];
146
+ u && (l.add(u.addPropertyListener(te.debounce(h, 0), !0)), e && l.add(u.addExecuteListener(s)));
147
+ }
148
+ return () => {
149
+ l.forEach((a) => {
150
+ a?.();
151
+ });
152
+ };
153
+ }, [o]), n;
154
+ }
127
155
  var re = typeof window < "u" ? window : { screen: {}, navigator: {} }, ze = (re.matchMedia || function() {
128
156
  return { matches: !1 };
129
157
  }).bind(re), Zt = !1, Cn = { get passive() {
@@ -146,7 +174,7 @@ const nn = (o) => o === "BracketLeft" ? "[" : o === "BracketRight" ? "]" : te.ca
146
174
  }, timeStamp: o.timeStamp, type: o.type };
147
175
  for (const i in o) i in r || typeof o[i] == "function" || (r[i] = o[i]);
148
176
  return r;
149
- }, Ro = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: tn, boundPixel: function(o, e = !1, t = 0) {
177
+ }, Ho = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: tn, boundPixel: function(o, e = !1, t = 0) {
150
178
  return o;
151
179
  }, createSyntheticEvent: tt, detectIt: Ke, focusableNodeNames: Bn, toPrettyKeyCode: nn }, Symbol.toStringTag, { value: "Module" }));
152
180
  class on {
@@ -154,8 +182,8 @@ class on {
154
182
  this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = te.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();
155
183
  const n = this;
156
184
  this._unListenersByCommand = /* @__PURE__ */ new Map(), this._listenersByKey = /* @__PURE__ */ new Map(), this._commandsPropertyListener = (r, i) => {
157
- const a = n._root._listenersByKey, u = i.key(), l = a.get(u);
158
- l && n._notifyCommands(l, "onCommandChange", i);
185
+ const c = n._root._listenersByKey, h = i.getKey(), s = c.get(h);
186
+ s && n._notifyCommands(s, "onCommandChange", i);
159
187
  };
160
188
  }
161
189
  _getCommand(e) {
@@ -170,19 +198,19 @@ class on {
170
198
  createChildGroup(e, t, n) {
171
199
  let r;
172
200
  if (!n) {
173
- let u = this;
174
- for (; u && !r; ) {
175
- let l = u._nodes.get(t);
176
- l && (r = l), u = u._parent;
201
+ let h = this;
202
+ for (; h && !r; ) {
203
+ let s = h._nodes.get(t);
204
+ s && (r = s), h = h._parent;
177
205
  }
178
206
  }
179
207
  r || (r = new on(e, t), r._parent = this, r._root = this._root, r._unListenersByCommand = null, r._listenersByKey = null, r._commandsPropertyListener = null);
180
- const i = (u, l) => {
181
- !u.has(t) || n ? u.set(t, l) : n === void 0 && console.warn("commandGroup already registered", t);
208
+ const i = (h, s) => {
209
+ !h.has(t) || n ? h.set(t, s) : n === void 0 && console.warn("commandGroup already registered", t);
182
210
  };
183
211
  i(this._root._nodes, r);
184
- let a = this._parent;
185
- for (; a; ) i(this._nodes, r), a = a._parent;
212
+ let c = this._parent;
213
+ for (; c; ) i(this._nodes, r), c = c._parent;
186
214
  return this._children.set(t, r), this._notify("onGroupChange"), r;
187
215
  }
188
216
  getKey() {
@@ -192,24 +220,24 @@ class on {
192
220
  return this._nodes.get(e);
193
221
  }
194
222
  _addCommands(e, t = void 0) {
195
- const n = this._commandsByKey, r = this._commandsByShortcut, i = this._root._commandsPropertyListener, a = this._root._unListenersByCommand;
196
- for (let u = 0; u < e.length; u++) {
197
- const l = e[u], s = l.key();
198
- if (n.has(s) && !t) {
199
- t === void 0 && console.warn("command already registered", s);
223
+ const n = this._commandsByKey, r = this._commandsByShortcut, i = this._root._commandsPropertyListener, c = this._root._unListenersByCommand, h = e.length;
224
+ for (let s = 0; s < h; s++) {
225
+ const l = e[s], a = l.getKey();
226
+ if (n.has(a) && !t) {
227
+ t === void 0 && console.warn("command already registered", a);
200
228
  continue;
201
229
  }
202
- n.set(s, l);
203
- let c = a.get(l);
204
- c && (c(), a.delete(l));
205
- const h = l.addPropertyListener(i);
206
- a.set(l, h);
207
- const d = l.shortcut();
208
- if (!d) continue;
209
- const f = Array.isArray(d) ? d : [d];
210
- for (let m = 0; m < f.length; m++) {
211
- const p = Ie(f[m]), x = r.get(p);
212
- x && !t && t === void 0 && console.warn(`Shortcut already registered: ${p}, ${s}, ${x}.`), r.set(p, s);
230
+ n.set(a, l);
231
+ let u = c.get(l);
232
+ u && (u(), c.delete(l));
233
+ const d = l.addPropertyListener(i);
234
+ c.set(l, d);
235
+ const p = l.getShortcut();
236
+ if (!p) continue;
237
+ const m = Array.isArray(p) ? p : [p], f = m.length;
238
+ for (let x = 0; x < f; x++) {
239
+ const S = Ie(m[x]), g = r.get(S);
240
+ g && !t && t === void 0 && console.warn(`Shortcut already registered: ${S}, ${a}, ${g}.`), r.set(S, a);
213
241
  }
214
242
  }
215
243
  }
@@ -220,9 +248,10 @@ class on {
220
248
  for (; e; ) t.push(e._nodes), e._nodes.delete(n), e = e._parent;
221
249
  e = this._parent;
222
250
  const r = (i) => {
223
- i._children.forEach((a) => {
224
- for (let u = 0; u < t.length; u++) a._nodes.delete(t[u]);
225
- r(a);
251
+ i._children.forEach((c) => {
252
+ const h = t.length, s = c._nodes;
253
+ for (let l = 0; l < h; l++) s.delete(t[l]);
254
+ r(c);
226
255
  });
227
256
  };
228
257
  r(this), this._parent = null, this._notify("onGroupChange");
@@ -247,8 +276,8 @@ class on {
247
276
  const r = this._commandsByShortcut;
248
277
  let i = r.get(n);
249
278
  i || (n = Ie({ key: e.key, modifiers: t }), i = r.get(n)), !i && e.code.startsWith("Digit") && (n = Ie({ key: e.code.substring(5, e.code.length), modifiers: t }), i = this._commandsByShortcut.get(n)), !i && e.code.startsWith("Key") && (i = Ie({ key: e.code.substring(3, e.code.length), modifiers: t }), i = r.get(n));
250
- let a = null;
251
- return i && (a = this._commandsByKey.get(i), a && a.disabled() && (a = null), !a || a.target() && a.target().contains(e.target) || (a = null)), a || (this._parent?.findCommandByEvent(e) ?? null);
279
+ let c = null;
280
+ return i && (c = this._commandsByKey.get(i), c && c.disabled() && (c = null), !c || c.getTarget() && c.getTarget().contains(e.target) || (c = null)), c || (this._parent?.findCommandByEvent(e) ?? null);
252
281
  }
253
282
  dispatchToFocusedCommand(e) {
254
283
  const t = this.getActive();
@@ -265,16 +294,22 @@ class on {
265
294
  addListener(e, t) {
266
295
  const n = this._listeners, r = t?.keys, i = this._root._listenersByKey;
267
296
  if (r && !e.onCommandChange) throw new Error("keys were provided but the listener does not contain 'onCommandChange'.");
268
- let a = null;
269
- if (r) for (let u = 0; u < r.length; u++) {
270
- const l = r[u];
271
- if (!l) continue;
272
- let s = i.get(l);
273
- s || (s = /* @__PURE__ */ new Set(), i.set(l, s)), a || (a = []), a.push(s), s.add(e);
297
+ let c = null;
298
+ if (r) {
299
+ const h = r.length;
300
+ for (let s = 0; s < h; s++) {
301
+ const l = r[s];
302
+ if (!l) continue;
303
+ let a = i.get(l);
304
+ a || (a = /* @__PURE__ */ new Set(), i.set(l, a)), c || (c = []), c.push(a), a.add(e);
305
+ }
274
306
  }
275
307
  return n.add(e), () => {
276
- if (a) for (let u = 0; u < a.length; u++)
277
- a[u].delete(e);
308
+ if (c) {
309
+ const h = c.length;
310
+ for (let s = 0; s < h; s++)
311
+ c[s].delete(e);
312
+ }
278
313
  n.delete(e);
279
314
  };
280
315
  }
@@ -308,65 +343,40 @@ const On = te.getOS() === te.OSType.MacOS || te.getOS() === te.OSType.IOS ? "Cmd
308
343
  for (let r = 0; o.modifiers && r < o.modifiers.length; r++) t[o.modifiers[r]] = !0;
309
344
  let n = "";
310
345
  return (t?.[Q.Ctrl] || t?.[Q.Meta]) && (n += (n.length > 0 ? "+" : "") + (e ? In : On)), t?.[Q.Alt] && (n += e ? "⌥" : "Alt"), t?.[Q.Shift] && (n += (n.length > 0 ? "+" : "") + (e ? "⇧" : "Shift")), n += (n.length > 0 ? "+" : "") + nn(o.key), n;
311
- };
312
- function Ho(o, e = null) {
313
- const t = K(e);
314
- t.current = e;
315
- const [n, r] = Yt((a) => a + 1, 0), i = R(() => Array.isArray(o) ? o : [o], [o]);
316
- return W(() => {
317
- if (!i || i.length === 0) return;
318
- const a = (s, c) => {
319
- t.current?.onChange?.(c), r();
320
- };
321
- let u = null;
322
- e && (u = { onExecute(s, c) {
323
- t.current?.onExecute?.(s, c);
324
- }, onError(s, c, h) {
325
- t.current?.onError?.(s, c, h);
326
- } });
327
- const l = /* @__PURE__ */ new Set();
328
- for (let s = 0; s < i.length; s++) l.add(i[s]?.addPropertyListener(te.debounce(a, 0), !0)), e && l.add(i[s]?.addExecuteListener(u));
329
- return () => {
330
- l.forEach((s) => {
331
- s?.();
332
- });
333
- };
334
- }, [o]), n;
335
- }
336
- const Ze = (o, e) => {
346
+ }, Ze = (o, e) => {
337
347
  if (!e || !o || e.length === 0) return te.EmptyArray;
338
348
  const t = e.length, n = new Array(t);
339
349
  for (let r = 0; r < t; r++) {
340
- const i = e[r], a = i ? o.getCommand(i) : null;
341
- n[r] = a;
350
+ const i = e[r], c = i ? o.getCommand(i) : null;
351
+ n[r] = c;
342
352
  }
343
353
  return n;
344
354
  };
345
355
  function Wo(o, e = null, t = null, n) {
346
356
  const r = K(t);
347
357
  r.current = t, e && !Array.isArray(e) && (e = [e]);
348
- const [i, a] = q(Ze(o, e)), u = n ? [...n, o] : [o];
358
+ const [i, c] = q(Ze(o, e)), h = n ? [...n, o] : [o];
349
359
  return W(() => {
350
- const l = { onGroupChange: () => {
360
+ const s = { onGroupChange: () => {
351
361
  const d = Ze(o, e);
352
- a(d), r.current?.onChange?.(this);
362
+ c(d), r.current?.onChange?.(this);
353
363
  } };
354
- let s;
355
- e && e.length > 0 && (s = { keys: e }, l.onCommandChange = (d, f) => {
356
- r.current?.onChange?.(o), a(Ze(o, e));
364
+ let l;
365
+ e && e.length > 0 && (l = { keys: e }, s.onCommandChange = (d, p) => {
366
+ r.current?.onChange?.(o), c(Ze(o, e));
357
367
  });
358
- const c = o?.addListener(l, s), h = Ze(o, e);
359
- return a(h), r.current?.onChange && r.current?.onChange(o), () => {
360
- c?.();
368
+ const a = o?.addListener(s, l), u = Ze(o, e);
369
+ return c(u), r.current?.onChange && r.current?.onChange(o), () => {
370
+ a?.();
361
371
  };
362
- }, u), i;
372
+ }, h), i;
363
373
  }
364
374
  const Vo = { Toolbar: "toolbar", Menuitem: "menuitem" }, Fo = { 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" };
365
375
  function _t(o, e) {
366
376
  if (typeof o == "function") return o(e);
367
377
  o && (o.current = e);
368
378
  }
369
- var Ae = parseInt(bn.split(".")[0], 10) >= 19 ? function(o) {
379
+ var Ae = parseInt(vn.split(".")[0], 10) >= 19 ? function(o) {
370
380
  return (e) => {
371
381
  const t = [];
372
382
  for (const n of o) {
@@ -382,93 +392,93 @@ var Ae = parseInt(bn.split(".")[0], 10) >= 19 ? function(o) {
382
392
  for (const t of o) _t(t, e);
383
393
  };
384
394
  };
385
- const jo = _e(Me((o, e) => {
395
+ const jo = _e(Le((o, e) => {
386
396
  const { refFocusStart: t, ...n } = o, r = K(null), i = U(() => {
387
397
  if (t) return void t?.current?.focus();
388
- const a = r.current.parentElement.children;
389
- let u = [];
390
- const l = a.length;
391
- for (let s = 0; s < l && a[s] !== r.current; s++) {
392
- const c = a[s], h = c.getAttribute("tabindex");
393
- h == null || h === "-1" || c.getAttribute("disabled") !== "true" && c.focus && u.push({ tabindex: parseInt(h), child: c });
398
+ const c = r.current.parentElement.children;
399
+ let h = [];
400
+ const s = c.length;
401
+ for (let l = 0; l < s && c[l] !== r.current; l++) {
402
+ const a = c[l], u = a.getAttribute("tabindex");
403
+ u == null || u === "-1" || a.getAttribute("disabled") !== "true" && a.focus && h.push({ tabindex: parseInt(u), child: a });
394
404
  }
395
- u.length !== 0 && (u.sort(function(s, c) {
396
- return s.tabindex - c.tabindex;
397
- }), u[0].child.focus());
405
+ h.length !== 0 && (h.sort(function(l, a) {
406
+ return l.tabindex - a.tabindex;
407
+ }), h[0].child.focus());
398
408
  }, [t]);
399
409
  return P("div", { tabIndex: 0, ref: Ae([r, e]), onFocus: i, ...n });
400
410
  }));
401
411
  var $n = function() {
402
- }, rn = typeof window < "u", Kn = rn ? Lt : W, Bt = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
412
+ }, rn = typeof window < "u", Kn = rn ? Mt : W, Bt = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
403
413
  const Ee = rn && window.ResizeObserver !== void 0 ? function() {
404
- var o = q(null), e = o[0], t = o[1], n = q(Bt), r = n[0], i = n[1], a = R(function() {
405
- return new window.ResizeObserver(function(u) {
406
- if (u[0]) {
407
- var l = u[0].contentRect, s = l.x, c = l.y, h = l.width, d = l.height, f = l.top, m = l.left, p = l.bottom, x = l.right;
408
- i({ x: s, y: c, width: h, height: d, top: f, left: m, bottom: p, right: x });
414
+ var o = q(null), e = o[0], t = o[1], n = q(Bt), r = n[0], i = n[1], c = R(function() {
415
+ return new window.ResizeObserver(function(h) {
416
+ if (h[0]) {
417
+ var s = h[0].contentRect, l = s.x, a = s.y, u = s.width, d = s.height, p = s.top, m = s.left, f = s.bottom, x = s.right;
418
+ i({ x: l, y: a, width: u, height: d, top: p, left: m, bottom: f, right: x });
409
419
  }
410
420
  });
411
421
  }, []);
412
422
  return Kn(function() {
413
- if (e) return a.observe(e), function() {
414
- a.disconnect();
423
+ if (e) return c.observe(e), function() {
424
+ c.disconnect();
415
425
  };
416
426
  }, [e]), [t, r];
417
427
  } : function() {
418
428
  return [$n, Bt];
419
- }, Uo = _e(Me((o, e) => {
420
- const { className: t, style: n, children: r, radius: i = 4, strokeWidth: a = 1, strokeColor: u = "grey", ...l } = o, [s, { width: c, height: h }] = Ee(), d = K(null), f = (L, y = 0) => {
421
- const _ = L / 2, v = h - _ + y;
422
- return (function(B, S, O = !1) {
423
- if (S === 0) return B;
424
- function I(T, g, z) {
425
- let H = g.x - T.x, X = g.y - T.y, D = Math.sqrt(H * H + X * X);
426
- return M(T, g, Math.min(1, z / D));
429
+ }, Uo = _e(Le((o, e) => {
430
+ const { className: t, style: n, children: r, radius: i = 4, strokeWidth: c = 1, strokeColor: h = "grey", ...s } = o, [l, { width: a, height: u }] = Ee(), d = K(null), p = (S, g = 0) => {
431
+ const _ = S / 2, v = u - _ + g;
432
+ return (function(B, E, O = !1) {
433
+ if (E === 0) return B;
434
+ function I(T, y, z) {
435
+ let H = y.x - T.x, X = y.y - T.y, D = Math.sqrt(H * H + X * X);
436
+ return M(T, y, Math.min(1, z / D));
427
437
  }
428
- function M(T, g, z) {
429
- return { x: T.x + (g.x - T.x) * z, y: T.y + (g.y - T.y) * z };
438
+ function M(T, y, z) {
439
+ return { x: T.x + (y.x - T.x) * z, y: T.y + (y.y - T.y) * z };
430
440
  }
431
- function b(T, g) {
432
- T.length > 2 && (T[T.length - 2] = g.x, T[T.length - 1] = g.y);
441
+ function b(T, y) {
442
+ T.length > 2 && (T[T.length - 2] = y.x, T[T.length - 1] = y.y);
433
443
  }
434
444
  function C(T) {
435
445
  return { x: parseFloat(T[T.length - 2]), y: parseFloat(T[T.length - 1]) };
436
446
  }
437
- let E = B.split(/[,\s]/).reduce(function(T, g) {
438
- let z = g.match("([a-zA-Z])(.+)");
439
- return z ? (T.push(z[1]), T.push(z[2])) : T.push(g), T;
440
- }, []).reduce(function(T, g) {
441
- return parseFloat(g) == g && T.length ? T[T.length - 1].push(g) : T.push([g]), T;
447
+ let L = B.split(/[,\s]/).reduce(function(T, y) {
448
+ let z = y.match("([a-zA-Z])(.+)");
449
+ return z ? (T.push(z[1]), T.push(z[2])) : T.push(y), T;
450
+ }, []).reduce(function(T, y) {
451
+ return parseFloat(y) == y && T.length ? T[T.length - 1].push(y) : T.push([y]), T;
442
452
  }, []), $ = [];
443
- if (E.length > 1) {
444
- let T = C(E[0]), g = null;
445
- E[E.length - 1][0] === "Z" && E[0].length > 2 && (g = ["L", T.x, T.y], E[E.length - 1] = g), $.push(E[0]);
446
- for (let z = 1; z < E.length; z++) {
447
- let H = $[$.length - 1], X = E[z], D = X === g ? E[1] : E[z + 1];
453
+ if (L.length > 1) {
454
+ let T = C(L[0]), y = null;
455
+ L[L.length - 1][0] === "Z" && L[0].length > 2 && (y = ["L", T.x, T.y], L[L.length - 1] = y), $.push(L[0]);
456
+ for (let z = 1; z < L.length; z++) {
457
+ let H = $[$.length - 1], X = L[z], D = X === y ? L[1] : L[z + 1];
448
458
  if (D && H && H.length > 2 && X[0] === "L" && D.length > 2 && D[0] === "L") {
449
- let F, V, Y = C(H), ee = C(X), Le = C(D);
450
- O ? (F = M(ee, H.origPoint || Y, S), V = M(ee, D.origPoint || Le, S)) : (F = I(ee, Y, S), V = I(ee, Le, S)), b(X, F), X.origPoint = ee, $.push(X);
459
+ let F, V, Y = C(H), ee = C(X), Me = C(D);
460
+ O ? (F = M(ee, H.origPoint || Y, E), V = M(ee, D.origPoint || Me, E)) : (F = I(ee, Y, E), V = I(ee, Me, E)), b(X, F), X.origPoint = ee, $.push(X);
451
461
  let ge = M(F, ee, 0.5), Ce = M(ee, V, 0.5), ye = ["C", ge.x, ge.y, Ce.x, Ce.y, V.x, V.y];
452
462
  ye.origPoint = ee, $.push(ye);
453
463
  } else $.push(X);
454
464
  }
455
- if (g) {
465
+ if (y) {
456
466
  let z = C($[$.length - 1]);
457
467
  $.push(["Z"]), b($[0], z);
458
468
  }
459
- } else $ = E;
460
- return $.reduce(function(T, g) {
461
- return T + g.join(" ") + " ";
469
+ } else $ = L;
470
+ return $.reduce(function(T, y) {
471
+ return T + y.join(" ") + " ";
462
472
  }, "");
463
- })(`${`M 0 ${_} L ${i - 0.5} ${_} L ${i - 0.5} ${v} L ${2 * i} ${v}`} ${`L ${c - 2 * i} ${v}`} ${`M ${c - 2 * i} ${v} L ${c - i} ${v} L ${c - i} ${_} L ${c} ${_}`}`, i);
464
- }, m = R(() => f(a), [c, h, i, a]), p = R(() => {
473
+ })(`${`M 0 ${_} L ${i - 0.5} ${_} L ${i - 0.5} ${v} L ${2 * i} ${v}`} ${`L ${a - 2 * i} ${v}`} ${`M ${a - 2 * i} ${v} L ${a - i} ${v} L ${a - i} ${_} L ${a} ${_}`}`, i);
474
+ }, m = R(() => p(c), [a, u, i, c]), f = R(() => {
465
475
  if (i === 0) return;
466
- const L = i / 2;
467
- return f(i) + `L ${c} 0 L 0 0 L 0 ${L}`;
468
- }, [m, i, a]), x = R(() => ({ style: { clipPath: `path('${p}')` } }), [p]);
469
- return fe("div", { className: t, style: { display: "flex", flexDirection: "row", ...n }, ...l, ref: Ae([d, s, e]), children: [ae.isValidElement(r) ? ae.cloneElement(r, x) : P(me, {}), P("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: c, height: h, viewBox: `0 0 ${c} ${h}`, children: P("path", { d: m, stroke: u, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: a }) })] });
476
+ const S = i / 2;
477
+ return p(i) + `L ${a} 0 L 0 0 L 0 ${S}`;
478
+ }, [m, i, c]), x = R(() => ({ style: { clipPath: `path('${f}')` } }), [f]);
479
+ return fe("div", { className: t, style: { display: "flex", flexDirection: "row", ...n }, ...s, ref: Ae([d, l, e]), children: [ae.isValidElement(r) ? ae.cloneElement(r, x) : P(me, {}), P("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: a, height: u, viewBox: `0 0 ${a} ${u}`, children: P("path", { d: m, stroke: h, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: c }) })] });
470
480
  })), Ot = { Default: "default", Error: "error", Success: "success", Warning: "warning", Info: "info" };
471
- class Nn extends vn {
481
+ class Nn extends Sn {
472
482
  setOverrides(e) {
473
483
  super.setOverrides(e);
474
484
  }
@@ -511,35 +521,35 @@ const sn = Gt(new Nn()), Xo = ({ children: o, notifier: e }) => (ae.useEffect(()
511
521
  };
512
522
  }, [e]), ae.createElement(sn.Provider, { value: e }, o)), lt = () => qt(sn), Rn = 3, Hn = 0.5, Wn = 50, gt = (o) => ({ x: o.x, y: o.y, width: o.width, height: o.height, top: o.top, left: o.left, right: o.right, bottom: o.bottom });
513
523
  function Vn(o = {}) {
514
- const { threshold: e = Hn, stillnessThreshold: t = Rn, maxHierarchyDepth: n = Wn } = o, [r, i] = Ee(), a = K(null), [u, l] = Yt((m) => m + 1, 0), s = K(void 0), c = K({ x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0 }), h = U((m) => {
515
- a.current = m, typeof r == "function" && r(m);
516
- }, [r]), [d, f] = q(i);
524
+ const { threshold: e = Hn, stillnessThreshold: t = Rn, maxHierarchyDepth: n = Wn } = o, [r, i] = Ee(), c = K(null), [h, s] = Yt((m) => m + 1, 0), l = K(void 0), a = K({ x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0 }), u = U((m) => {
525
+ c.current = m, typeof r == "function" && r(m);
526
+ }, [r]), [d, p] = q(i);
517
527
  return W(() => {
518
- i && !d && f(i);
528
+ i && !d && p(i);
519
529
  }, [i, d]), W(() => {
520
- const m = a.current;
530
+ const m = c.current;
521
531
  if (!m) return;
522
- let p = !1, x = 0;
523
- const L = () => {
532
+ let f = !1, x = 0;
533
+ const S = () => {
524
534
  if (!m) return;
525
- const S = m.getBoundingClientRect(), O = c.current;
526
- Math.abs(S.x - O.x) > e || Math.abs(S.y - O.y) > e || Math.abs(S.width - O.width) > e || Math.abs(S.height - O.height) > e ? (p || (p = !0, f(gt(S)), l()), x = 0) : x++, p && x >= t && (p = !1, f(gt(S)), l()), c.current = gt(S), s.current = requestAnimationFrame(L);
535
+ const E = m.getBoundingClientRect(), O = a.current;
536
+ Math.abs(E.x - O.x) > e || Math.abs(E.y - O.y) > e || Math.abs(E.width - O.width) > e || Math.abs(E.height - O.height) > e ? (f || (f = !0, p(gt(E)), s()), x = 0) : x++, f && x >= t && (f = !1, p(gt(E)), s()), a.current = gt(E), l.current = requestAnimationFrame(S);
527
537
  };
528
- s.current = requestAnimationFrame(L);
529
- const y = (S) => {
530
- p = !0, l();
531
- }, _ = (S) => {
532
- p = !1, x = t, l();
538
+ l.current = requestAnimationFrame(S);
539
+ const g = (E) => {
540
+ f = !0, s();
541
+ }, _ = (E) => {
542
+ f = !1, x = t, s();
533
543
  };
534
544
  let v = m;
535
545
  const B = [];
536
- for (; v && v !== document.documentElement && (v.addEventListener("animationstart", y, !0), v.addEventListener("animationend", _, !0), v.addEventListener("transitionstart", y, !0), v.addEventListener("transitionend", _, !0), B.push(v), v = v.parentElement, !(B.length > n)); ) ;
546
+ for (; v && v !== document.documentElement && (v.addEventListener("animationstart", g, !0), v.addEventListener("animationend", _, !0), v.addEventListener("transitionstart", g, !0), v.addEventListener("transitionend", _, !0), B.push(v), v = v.parentElement, !(B.length > n)); ) ;
537
547
  return () => {
538
- s.current && cancelAnimationFrame(s.current), B.forEach((S) => {
539
- S.removeEventListener("animationstart", y, !0), S.removeEventListener("animationend", _, !0), S.removeEventListener("transitionstart", y, !0), S.removeEventListener("transitionend", _, !0);
548
+ l.current && cancelAnimationFrame(l.current), B.forEach((E) => {
549
+ E.removeEventListener("animationstart", g, !0), E.removeEventListener("animationend", _, !0), E.removeEventListener("transitionstart", g, !0), E.removeEventListener("transitionend", _, !0);
540
550
  });
541
551
  };
542
- }, [u, i, e, t, n]), [h, d];
552
+ }, [h, i, e, t, n]), [u, d];
543
553
  }
544
554
  const k = (o, e) => {
545
555
  const t = U((...i) => o?.(...i), e), n = K(null);
@@ -598,45 +608,45 @@ function Fn() {
598
608
  }
599
609
  function ln(o) {
600
610
  if (!o) throw new Error("must have a PointerHandlerOptions");
601
- const { onPointerDown: e, onPointerUp: t, onPointerMoveOrWait: n, processTouch: r = !1, consumeTouch: i = !0 } = o, a = k(e, [e]), u = k(t, [t]), l = k(n, [n]), s = K(!1), c = o?.timerInitial ?? 230, h = o?.timerContinuous ?? c / 2, d = K(null), f = K(null), m = K(null), p = K(null), x = U(() => {
602
- p.current && (clearTimeout(p.current), p.current = null);
603
- }, []), L = U((b) => {
604
- p.current = setTimeout(() => {
611
+ const { onPointerDown: e, onPointerUp: t, onPointerMoveOrWait: n, processTouch: r = !1, consumeTouch: i = !0 } = o, c = k(e, [e]), h = k(t, [t]), s = k(n, [n]), l = K(!1), a = o?.timerInitial ?? 230, u = o?.timerContinuous ?? a / 2, d = K(null), p = K(null), m = K(null), f = K(null), x = U(() => {
612
+ f.current && (clearTimeout(f.current), f.current = null);
613
+ }, []), S = U((b) => {
614
+ f.current = setTimeout(() => {
605
615
  window.requestAnimationFrame(() => {
606
- if (s.current === !1) return;
607
- const C = f.current, E = d.current, $ = tt(C, E.currentTarget);
608
- l?.($, m.current, E);
609
- }), L(h);
610
- }, b ?? c);
616
+ if (l.current === !1) return;
617
+ const C = p.current, L = d.current, $ = tt(C, L.currentTarget);
618
+ s?.($, m.current, L);
619
+ }), S(u);
620
+ }, b ?? a);
611
621
  }, []);
612
622
  W(() => () => x(), []);
613
- const y = r ? "pointer" : "mouse", _ = U((b) => {
623
+ const g = r ? "pointer" : "mouse", _ = U((b) => {
614
624
  b.stopPropagation(), b.stopImmediatePropagation(), b.preventDefault();
615
625
  }, []), v = k((b) => {
616
- document.removeEventListener(`${y}move`, O), document.removeEventListener(`${y}up`, v), document.removeEventListener("keydown", I), document.removeEventListener("keyup", M), document.removeEventListener("touchstart", _, { capture: !0 }), document.removeEventListener("touchmove", _, { capture: !0 }), window.removeEventListener("blur", B), x(), window.requestAnimationFrame(() => {
617
- if (s.current === !1) return;
618
- s.current = !1;
619
- const C = b, E = d.current, $ = tt(C, E.currentTarget);
620
- u?.($, m.current, E), m.current = null;
626
+ document.removeEventListener(`${g}move`, O), document.removeEventListener(`${g}up`, v), document.removeEventListener("keydown", I), document.removeEventListener("keyup", M), document.removeEventListener("touchstart", _, { capture: !0 }), document.removeEventListener("touchmove", _, { capture: !0 }), window.removeEventListener("blur", B), x(), window.requestAnimationFrame(() => {
627
+ if (l.current === !1) return;
628
+ l.current = !1;
629
+ const C = b, L = d.current, $ = tt(C, L.currentTarget);
630
+ h?.($, m.current, L), m.current = null;
621
631
  });
622
632
  }, []), B = U(() => {
623
- s.current !== !1 && (s.current = !1, v(f.current));
624
- }, []), S = k(() => {
625
- x(), L(h), window.requestAnimationFrame(() => {
626
- if (s.current === !1) return;
627
- const b = f.current, C = d.current, E = tt(b, C.currentTarget);
628
- l?.(E, m.current, C);
633
+ l.current !== !1 && (l.current = !1, v(p.current));
634
+ }, []), E = k(() => {
635
+ x(), S(u), window.requestAnimationFrame(() => {
636
+ if (l.current === !1) return;
637
+ const b = p.current, C = d.current, L = tt(b, C.currentTarget);
638
+ s?.(L, m.current, C);
629
639
  });
630
- }, [h]), O = k((b) => {
631
- f.current = b, S();
640
+ }, [u]), O = k((b) => {
641
+ p.current = b, E();
632
642
  }, []), I = k((b) => {
633
- m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, S();
643
+ m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, E();
634
644
  }, []), M = k((b) => {
635
- m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, S();
636
- }, [h]);
645
+ m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, E();
646
+ }, [u]);
637
647
  return k((b) => {
638
- b.isDefaultPrevented() || (m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, a(b, m.current) !== !1 && (d.current = b, f.current = b.nativeEvent, document.addEventListener(`${y}up`, v, { passive: !1 }), document.addEventListener(`${y}move`, O, { passive: !1 }), document.addEventListener("keydown", I, { passive: !1 }), document.addEventListener("keyup", M, { passive: !1 }), window.addEventListener("blur", B, { passive: !0 }), r && i && (document.addEventListener("touchstart", _, { passive: !1, capture: !0 }), document.addEventListener("touchmove", _, { passive: !1, capture: !0 })), s.current = !0, L(c)));
639
- }, [c, r]);
648
+ b.isDefaultPrevented() || (m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, c(b, m.current) !== !1 && (d.current = b, p.current = b.nativeEvent, document.addEventListener(`${g}up`, v, { passive: !1 }), document.addEventListener(`${g}move`, O, { passive: !1 }), document.addEventListener("keydown", I, { passive: !1 }), document.addEventListener("keyup", M, { passive: !1 }), window.addEventListener("blur", B, { passive: !0 }), r && i && (document.addEventListener("touchstart", _, { passive: !1, capture: !0 }), document.addEventListener("touchmove", _, { passive: !1, capture: !0 })), l.current = !0, S(a)));
649
+ }, [a, r]);
640
650
  }
641
651
  function Zo(o, e) {
642
652
  return ln({ onPointerDown: o, onPointerMoveOrWait: (t, n, r) => {
@@ -647,7 +657,7 @@ const jn = ({ initValue: o, useHookBody: e, applyStateChange: t }) => {
647
657
  const n = K(o);
648
658
  if (typeof e != "function") throw new Error("function expected as hook body parameter. got " + typeof e);
649
659
  const r = e();
650
- return Lt(() => {
660
+ return Mt(() => {
651
661
  n.current !== r && (n.current = r, t(r));
652
662
  }, [t, r]), null;
653
663
  }, xt = (o) => {
@@ -661,12 +671,12 @@ const nt = [], De = [], it = () => {
661
671
  return n.current = e, o || St !== !1 || (an = !0), W(() => {
662
672
  let r = !0;
663
673
  function i() {
664
- if (r) return De[0] !== i ? (o || St !== !0 || xt("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([...nt]);
674
+ if (r) return De[0] !== i ? (o || St !== !0 || xt("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void t((c) => [])) : void t([...nt]);
665
675
  }
666
676
  return De.push(i), it(), () => {
667
677
  r = !1, n.current?.length > 0 && xt("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), De.splice(De.indexOf(i), 1), it();
668
678
  };
669
- }, [o]), P(me, { children: e.map(({ hook: r, key: i }) => wn(jn, { ...r, key: i })) });
679
+ }, [o]), P(me, { children: e.map(({ hook: r, key: i }) => bn(jn, { ...r, key: i })) });
670
680
  }, Yn = (o) => {
671
681
  const e = Un++;
672
682
  return nt.push({ hook: o, key: e }), De.length === 0 && an === !1 && (St = !0, ((t) => {
@@ -680,15 +690,15 @@ const nt = [], De = [], it = () => {
680
690
  };
681
691
  let Et = null;
682
692
  Et || (Et = (o, e, t = {}) => {
683
- let n, r, i = !1, a = !1, u = [], { unmountIfNoConsumers: l = !1 } = t;
684
- const s = (h) => {
685
- r = h, Mn(() => u.forEach((d) => d(h)));
686
- }, c = () => (a || (r = typeof o == "function" ? o() : o, a = !0), r);
693
+ let n, r, i = !1, c = !1, h = [], { unmountIfNoConsumers: s = !1 } = t;
694
+ const l = (u) => {
695
+ r = u, Ln(() => h.forEach((d) => d(u)));
696
+ }, a = () => (c || (r = typeof o == "function" ? o() : o, c = !0), r);
687
697
  return () => {
688
- const [h, d] = q(c);
689
- return W(() => (i || (i = !0, n = Yn({ initValue: o, useHookBody: e, applyStateChange: s })), u.push(d), r !== h && d(r), () => {
690
- u.splice(u.indexOf(d), 1), u.length === 0 && l && (n(), i = !1);
691
- }), []), h;
698
+ const [u, d] = q(a);
699
+ return W(() => (i || (i = !0, n = Yn({ initValue: o, useHookBody: e, applyStateChange: l })), h.push(d), r !== u && d(r), () => {
700
+ h.splice(h.indexOf(d), 1), h.length === 0 && s && (n(), i = !1);
701
+ }), []), u;
692
702
  };
693
703
  });
694
704
  const cn = Et;
@@ -709,108 +719,108 @@ const Gn = cn(null, () => {
709
719
  const [o, e] = q(rt.Global);
710
720
  return { setClipboard: (t) => e(t), getClipboard: () => o, refNativeCopy: K(null), refNativeLastKey: K(null) };
711
721
  }), Qo = (o) => {
712
- const { source: e, target: t, onPaste: n, onClipboardUpdate: r, commands: i } = o, a = lt(), u = k(r, [r]), l = k(n, [n]), { getClipboard: s, refNativeCopy: c } = qn(), h = s();
722
+ const { source: e, target: t, onPaste: n, onClipboardUpdate: r, commands: i } = o, c = lt(), h = k(r, [r]), s = k(n, [n]), { getClipboard: l, refNativeCopy: a } = qn(), u = l();
713
723
  R(() => {
714
- const y = e?.element, _ = t?.element ?? e?.element;
724
+ const g = e?.element, _ = t?.element ?? e?.element;
715
725
  if (!i) return;
716
- const v = [new mt("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: [Q.Ctrl] } }), new mt("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: [Q.Ctrl] } }), new mt("paste", _, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste.yellow", shortcut: [{ key: "V", modifiers: [Q.Ctrl] }, { key: "F8", modifiers: [Q.Ctrl] }] })];
726
+ const v = [new mt("cut", g, { 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: [Q.Ctrl] } }), new mt("copy", g, { 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: [Q.Ctrl] } }), new mt("paste", _, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste.yellow", shortcut: [{ key: "V", modifiers: [Q.Ctrl] }, { key: "F8", modifiers: [Q.Ctrl] }] })];
717
727
  i?.addCommands(v, !0);
718
728
  }, [i]);
719
- const d = k(async (y) => {
729
+ const d = k(async (g) => {
720
730
  if (!e?.element) return;
721
731
  let _ = null;
722
732
  try {
723
- _ = e.doCopy?.(y), typeof _ == "string" ? await h.writeText(_) : await h.writeReference(_);
733
+ _ = e.doCopy?.(g), typeof _ == "string" ? await u.writeText(_) : await u.writeReference(_);
724
734
  } catch (v) {
725
735
  throw v;
726
736
  }
727
- }, [e, a]), f = k(async (y) => {
737
+ }, [e, c]), p = k(async (g) => {
728
738
  const _ = e?.element?.();
729
739
  if (_) {
730
- c.current = { sourceElement: _, args: y };
740
+ a.current = { sourceElement: _, args: g };
731
741
  try {
732
- await d(y);
742
+ await d(g);
733
743
  } catch (v) {
734
- a.showError?.(v);
744
+ c.showError?.(v);
735
745
  }
736
746
  }
737
- }, [e?.element, a]), m = U(() => {
738
- f({ isCut: !0 });
739
- }, []), p = k(async (y, _, v) => {
747
+ }, [e?.element, c]), m = U(() => {
748
+ p({ isCut: !0 });
749
+ }, []), f = k(async (g, _, v) => {
740
750
  try {
741
- if (await y.doPaste(_, v) === !1) return;
742
- l?.(_, v);
751
+ if (await g.doPaste(_, v) === !1) return;
752
+ s?.(_, v);
743
753
  } catch (B) {
744
- a.showError?.(B);
754
+ c.showError?.(B);
745
755
  }
746
- }, [l]), x = k(async (y, _, v) => {
756
+ }, [s]), x = k(async (g, _, v) => {
747
757
  const B = t?.element?.();
748
- if (B && await te.whenFocus(B), !y && !_) return;
749
- const S = await a.showBusy?.("Pasting...");
758
+ if (B && await te.whenFocus(B), !g && !_) return;
759
+ const E = await c.showBusy?.("Pasting...");
750
760
  if (_) try {
751
- return await p(t, _, v), void S?.();
761
+ return await f(t, _, v), void E?.();
752
762
  } catch (M) {
753
- S?.(), a.showError?.(M);
763
+ E?.(), c.showError?.(M);
754
764
  }
755
765
  let O, I = t.importFromExternal;
756
- I || (I = (M, b) => ({ getItemType: () => "text", toText: () => y.text, isClipboardItem: !0 }));
766
+ I || (I = (M, b) => ({ getItemType: () => "text", toText: () => g.text, isClipboardItem: !0 }));
757
767
  try {
758
- O = await I(y, { isCut: !1 });
768
+ O = await I(g, { isCut: !1 });
759
769
  } catch (M) {
760
- S?.(), a.showError?.(M);
770
+ E?.(), c.showError?.(M);
761
771
  }
762
772
  if (O) try {
763
773
  const M = await Promise.resolve(O);
764
- await p(t, M, v), S?.();
774
+ await f(t, M, v), E?.();
765
775
  } catch (M) {
766
- S?.(), a.showError?.(M);
776
+ E?.(), c.showError?.(M);
767
777
  }
768
- else S?.();
769
- }, [p, t, a]), L = k(async (y) => {
778
+ else E?.();
779
+ }, [f, t, c]), S = k(async (g) => {
770
780
  if (t?.element) try {
771
- const _ = await h.readReference();
772
- if (_) return void await x(null, _, y);
781
+ const _ = await u.readReference();
782
+ if (_) return void await x(null, _, g);
773
783
  const v = [];
774
- v[0] = await pt.readStringFromClipboard(h, ft.plain), v[1] = await pt.readHTMLFromClipboard(h, ft.html), v[2] = await pt.readBlobFromClipboard(h, ft.png);
784
+ v[0] = await pt.readStringFromClipboard(u, ft.plain), v[1] = await pt.readHTMLFromClipboard(u, ft.html), v[2] = await pt.readBlobFromClipboard(u, ft.png);
775
785
  const B = { text: v[0] ?? null, html: v[1] ?? null, image: v[2] ?? null };
776
- await x(B, null, y);
786
+ await x(B, null, g);
777
787
  } catch (_) {
778
788
  if (_?.message === "Document is not focused.") return;
779
- a.showError?.(_);
789
+ c.showError?.(_);
780
790
  }
781
- }, [x, t?.element, a]);
782
- return k(async (y) => {
783
- }, [e?.element]), k(async (y) => {
784
- }, [t?.element, x, a]), W(() => {
785
- if (!h) return;
786
- const y = async (B) => {
787
- const S = await h.readReference();
788
- u?.(S);
791
+ }, [x, t?.element, c]);
792
+ return k(async (g) => {
793
+ }, [e?.element]), k(async (g) => {
794
+ }, [t?.element, x, c]), W(() => {
795
+ if (!u) return;
796
+ const g = async (B) => {
797
+ const E = await u.readReference();
798
+ h?.(E);
789
799
  }, _ = (B) => {
790
- a.showMessage?.(rt.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
800
+ c.showMessage?.(rt.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
791
801
  }, v = (B) => {
792
- a.showMessage?.(rt.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
802
+ c.showMessage?.(rt.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
793
803
  };
794
- return h.addEventListener("clipboardchange", y), h.addEventListener("clipboarderrorread", _), h.addEventListener("clipboarderrorwrite", v), () => {
795
- h.removeEventListener("clipboardchange", y), h.removeEventListener("clipboarderrorread", _), h.removeEventListener("clipboarderrorwrite", v);
804
+ return u.addEventListener("clipboardchange", g), u.addEventListener("clipboarderrorread", _), u.addEventListener("clipboarderrorwrite", v), () => {
805
+ u.removeEventListener("clipboardchange", g), u.removeEventListener("clipboarderrorread", _), u.removeEventListener("clipboarderrorwrite", v);
796
806
  };
797
- }, [h, a]), W(() => {
807
+ }, [u, c]), W(() => {
798
808
  }, [d, x, e, t]), W(() => {
799
- i?.getCommand("cut")?.updateCallback(m).update({ disabled: !e || !t }), i?.getCommand("copy")?.updateCallback(f).update({ disabled: !e }), i?.getCommand("paste")?.updateCallback(L).update({ disabled: !t });
800
- }, [e, t, i]), { paste: L, copy: f, clipboard: h };
809
+ i?.getCommand("cut")?.updateCallback(m).update({ disabled: !e || !t }), i?.getCommand("copy")?.updateCallback(p).update({ disabled: !e }), i?.getCommand("paste")?.updateCallback(S).update({ disabled: !t });
810
+ }, [e, t, i]), { paste: S, copy: p, clipboard: u };
801
811
  };
802
812
  function er(o, e = !0) {
803
813
  const t = K(o);
804
814
  W(() => {
805
815
  if (e) {
806
- const n = Object.entries(o).reduce((r, [i, a]) => (t.current[i] !== a && (r[i] = [t.current[i], a]), r), {});
816
+ const n = Object.entries(o).reduce((r, [i, c]) => (t.current[i] !== c && (r[i] = [t.current[i], c]), r), {});
807
817
  Object.keys(n).length > 0 && console.log("Changed props:", n);
808
818
  }
809
819
  t.current = o;
810
820
  });
811
821
  }
812
822
  let vt = !1, Zn = 0;
813
- var Jn = typeof document < "u" ? Lt : W;
823
+ var Jn = typeof document < "u" ? Mt : W;
814
824
  const It = () => "sheetxl-ui-" + Zn++, $t = ae.useId, tr = $t ?? function() {
815
825
  const [o, e] = ae.useState(() => vt ? It() : void 0);
816
826
  return Jn(() => {
@@ -821,54 +831,54 @@ const It = () => "sheetxl-ui-" + Zn++, $t = ae.useId, tr = $t ?? function() {
821
831
  }, Qn = [];
822
832
  function Tt(o, e, t = Qn) {
823
833
  const n = K(null);
824
- return xn(o, () => {
834
+ return wn(o, () => {
825
835
  if (!n.current) return;
826
836
  const r = n.current, i = e?.();
827
837
  if (!i || typeof i != "object") throw new Error("attributes must return a plain object of values");
828
- const a = Object.keys(i), u = a.length;
829
- for (let l = 0; l < u; l++) {
830
- const s = a[l], c = i[s];
831
- Object.defineProperty(r, s, { value: c, writable: !0, configurable: !0, enumerable: !0 });
838
+ const c = Object.keys(i), h = c.length;
839
+ for (let s = 0; s < h; s++) {
840
+ const l = c[s], a = i[l];
841
+ Object.defineProperty(r, l, { value: a, writable: !0, configurable: !0, enumerable: !0 });
832
842
  }
833
843
  return r;
834
844
  }, t), n;
835
845
  }
836
846
  const Kt = "Undo the last action.", Nt = "Repeat the last action or undo the redo.", eo = (o) => `Redo ${o}`, nr = ({ manager: o, commands: e, disabled: t }) => {
837
- const n = lt(), r = k((a) => {
847
+ const n = lt(), r = k((c) => {
838
848
  try {
839
- o?.undo(a);
840
- } catch (u) {
841
- n.error(u);
849
+ o?.undo(c);
850
+ } catch (h) {
851
+ n.error(h);
842
852
  }
843
- }, [o]), i = k((a) => {
853
+ }, [o]), i = k((c) => {
844
854
  try {
845
- o?.redo(a);
846
- } catch (u) {
847
- n.error(u);
855
+ o?.redo(c);
856
+ } catch (h) {
857
+ n.error(h);
848
858
  }
849
859
  }, [o]);
850
860
  return R(() => {
851
861
  if (!e) return;
852
- const a = { contains: (l) => !0, focus() {
853
- } }, u = [new bt("undo", a, { label: "Undo", description: Kt, shortcut: { key: "z", modifiers: [Q.Ctrl] }, disabled: !0 }, r), new bt("redo", a, { label: "Redo", description: Nt, shortcut: [{ key: "y", modifiers: [Q.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [Q.Alt] }], disabled: !0 }, i)];
854
- e?.addCommands(u, !0);
862
+ const c = { contains: (s) => !0, focus() {
863
+ } }, h = [new bt("undo", c, { label: "Undo", description: Kt, shortcut: { key: "z", modifiers: [Q.Ctrl] }, disabled: !0 }, r), new bt("redo", c, { label: "Redo", description: Nt, shortcut: [{ key: "y", modifiers: [Q.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [Q.Alt] }], disabled: !0 }, i)];
864
+ e?.addCommands(h, !0);
855
865
  }, [e]), W(() => {
856
866
  if (!e) return;
857
- const a = () => {
858
- const l = o?.getTopUndoDescription(), s = {};
859
- var c;
860
- e.getCommand("undo").update({ disabled: t || !o || !o.hasUndo(), description: l ? (c = l, `Undo ${c}`) : Kt, state: s, context: { undoManager: o } });
861
- const h = o?.getTopRedoDescription();
862
- e.getCommand("redo").update({ disabled: t || !o || !o.hasRedo(), description: h ? eo(h) : Nt, state: s, context: { undoManager: o } });
867
+ const c = () => {
868
+ const s = o?.getTopUndoDescription(), l = {};
869
+ var a;
870
+ e.getCommand("undo").update({ disabled: t || !o || !o.hasUndo(), description: s ? (a = s, `Undo ${a}`) : Kt, state: l, context: { undoManager: o } });
871
+ const u = o?.getTopRedoDescription();
872
+ e.getCommand("redo").update({ disabled: t || !o || !o.hasRedo(), description: u ? eo(u) : Nt, state: l, context: { undoManager: o } });
863
873
  };
864
- if (a(), !o) return;
865
- const u = o.addListener({ onStackChange() {
866
- a();
874
+ if (c(), !o) return;
875
+ const h = o.addListener({ onStackChange() {
876
+ c();
867
877
  } });
868
- return () => u?.();
878
+ return () => h?.();
869
879
  }, [o, e, t]), { undo: r, redo: i };
870
880
  };
871
- class to extends Sn {
881
+ class to extends xn {
872
882
  static getDerivedStateFromError() {
873
883
  return { hasError: !0 };
874
884
  }
@@ -924,51 +934,51 @@ function G() {
924
934
  return n;
925
935
  }
926
936
  const oo = {}, ro = (o) => {
927
- const { onPointerDown: e, style: t, splitDirection: n, paddingBefore: r = 0, paddingAfter: i = 0, disabled: a, key: u, propsHitArea: l = oo, ...s } = o, c = n === "row", { style: h, className: d, ...f } = l;
928
- return P("div", { style: { ...t, position: "relative" }, ...s, children: P("div", { className: G("hit-box", d), style: { left: (c ? -r : 0) + "px", width: `calc(100% + ${c ? r + i : 0}px)`, top: (c ? 0 : -r) + "px", height: `calc(100% + ${c ? 0 : r + i}px)`, position: "absolute", ...h }, onPointerDown: a ? void 0 : e, ...f }) }, u);
937
+ const { onPointerDown: e, style: t, splitDirection: n, paddingBefore: r = 0, paddingAfter: i = 0, disabled: c, key: h, propsHitArea: s = oo, ...l } = o, a = n === "row", { style: u, className: d, ...p } = s;
938
+ return P("div", { style: { ...t, position: "relative" }, ...l, children: P("div", { className: G("hit-box", d), style: { left: (a ? -r : 0) + "px", width: `calc(100% + ${a ? r + i : 0}px)`, top: (a ? 0 : -r) + "px", height: `calc(100% + ${a ? 0 : r + i}px)`, position: "absolute", ...u }, onPointerDown: c ? void 0 : e, ...p }) }, h);
929
939
  }, Qe = {}, we = (o, e, t = !0) => o === null ? null : o.pixels !== null ? t ? o.pixels : e - o.pixels : (t ? o.percent : 100 - o.percent) / 100 * e, et = (o, e = !0) => o?.percent ? `${e ? o.percent : 100 - o.percent}%` : o?.pixels ? `${o.pixels}px` : void 0, he = (o, e) => {
930
940
  if (o == null) return null;
931
941
  const t = { percent: null, pixels: null };
932
942
  let n = e;
933
943
  return typeof o == "string" && ((o = o.trim().toLowerCase()).endsWith("px") ? (o = o.substring(0, o.length - 2), n = !1) : o.endsWith("%") && (o = o.substring(0, o.length - 1), n = !0), o = parseFloat(o)), n ? t.percent = o : t.pixels = o, Object.freeze(t);
934
- }, io = _e(Me((o, e) => {
935
- const { elementBefore: t, elementAfter: n, splitDirection: r = "row", fixedPane: i = null, position: a, onPositionChange: u, minBefore: l, maxBefore: s, minAfter: c, maxAfter: h, children: d, className: f, style: m, disabled: p = !1, onDragStart: x, onDragResize: L, onDragFinish: y, propsResizer: _ = Qe, propsPane: v = Qe, propsPaneBefore: B = Qe, propsPaneAfter: S = Qe, renderResizer: O = ro } = o;
944
+ }, io = _e(Le((o, e) => {
945
+ const { elementBefore: t, elementAfter: n, splitDirection: r = "row", fixedPane: i = null, position: c, onPositionChange: h, minBefore: s, maxBefore: l, minAfter: a, maxAfter: u, children: d, className: p, style: m, disabled: f = !1, onDragStart: x, onDragResize: S, onDragFinish: g, propsResizer: _ = Qe, propsPane: v = Qe, propsPaneBefore: B = Qe, propsPaneAfter: E = Qe, renderResizer: O = ro } = o;
936
946
  if (d) throw new Error("Use elementBefore and elementAfter instead of children.");
937
947
  const I = R(() => ae.isValidElement(n) && ae.isValidElement(t), [n, t]), M = R(() => {
938
948
  let A = null;
939
949
  i && (i === "before" ? A = 0 : i === "after" && (A = 1));
940
950
  const j = A === null;
941
- return { fixedPaneOffset: A, isPercent: j, minBefore: he(l, j), maxBefore: he(s, j), minAfter: he(c, j), maxAfter: he(h, j) };
942
- }, [l, s, c, h]), b = k(u, [u]), [C, E] = q(() => he(a, i === null));
951
+ return { fixedPaneOffset: A, isPercent: j, minBefore: he(s, j), maxBefore: he(l, j), minAfter: he(a, j), maxAfter: he(u, j) };
952
+ }, [s, l, a, u]), b = k(h, [h]), [C, L] = q(() => he(c, i === null));
943
953
  W(() => {
944
- E(he(a, i === null));
945
- }, [a, i]);
946
- const [$, { width: T, height: g }] = Ee(), [z, { width: H, height: X }] = Ee(), D = r === "row" ? H : X, F = r === "row" ? T : g, V = R(() => ((A, j, oe, J) => {
954
+ L(he(c, i === null));
955
+ }, [c, i]);
956
+ const [$, { width: T, height: y }] = Ee(), [z, { width: H, height: X }] = Ee(), D = r === "row" ? H : X, F = r === "row" ? T : y, V = R(() => ((A, j, oe, J) => {
947
957
  const ce = [null, null], le = [null, null];
948
958
  if (A || (A = { percent: J.fixedPaneOffset === null ? 50 : null, pixels: J.fixedPaneOffset === null ? null : 0 }), j === 0) return A?.pixels != null ? J.fixedPaneOffset !== 1 ? (ce[0] = A?.pixels, le[1] = 100) : (ce[1] = A?.pixels - oe, le[0] = 100) : A?.percent != null && (J.fixedPaneOffset !== 1 ? (le[0] = A?.percent, le[1] = 100 - A?.percent) : (le[1] = A?.percent, le[0] = 100 - A?.percent)), { percents: le, pixels: ce, minBefore: et(J.minBefore, !0), maxBefore: et(J.maxBefore, !0), minAfter: et(J.minAfter), maxAfter: et(J.maxAfter) };
949
959
  let ue = we(A, j, J.fixedPaneOffset !== 1), ie = j - oe, kt = we(J.minBefore, ie, !0) ?? 0, gn = we(J.maxBefore, ie, !0) ?? ie, qe = 0, dt = 0, Pt = 0, Dt = ie;
950
960
  qe = (we(J.maxAfter, j, !1) ?? oe) - oe, dt = we(J.minAfter, j, !1) ?? j, Pt = Math.max(kt, qe), Dt = Math.min(gn, dt), ue = Math.max(Pt, Math.min(ue, Dt)), dt = Math.min(ie - ue, we(J.maxAfter, ie - ue, !0) ?? ie), qe = Math.min(ie - ue, we(J.minAfter, ie - ue, !0) ?? ie), ce[0] = ue, ce[1] = ie - ce[0];
951
961
  const yn = Math.max(0, Math.min(100, ue / ie * 100));
952
962
  return le[0] = yn, le[1] = 100 - le[0], { percents: le, pixels: ce, minBefore: `${kt}px`, minAfter: `${qe}px`, maxBefore: `${ce[0]}px`, maxAfter: `${ce[1]}px` };
953
- })(C, F, D, M), [M, C, F, D, r]), [Y, ee] = q(!1), Le = k(x, [x]), ge = k(L, [L]), Ce = k(y, [y]), ye = K(null), at = K(null), Ne = K(null), { style: ct, className: Re, ...He } = v, We = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...ct }, { className: ut, style: Ve, ...Fe } = B, { className: je, style: Ue, ...Te } = S, Be = { flex: "1 1 100%", width: "100%", ...m, flexDirection: r, display: "flex" }, { className: se, style: ke, onPointerDown: Xe, ...Ye } = _, Oe = k((A) => {
963
+ })(C, F, D, M), [M, C, F, D, r]), [Y, ee] = q(!1), Me = k(x, [x]), ge = k(S, [S]), Ce = k(g, [g]), ye = K(null), at = K(null), Ne = K(null), { style: ct, className: Re, ...He } = v, We = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...ct }, { className: ut, style: Ve, ...Fe } = B, { className: je, style: Ue, ...Te } = E, Be = { flex: "1 1 100%", width: "100%", ...m, flexDirection: r, display: "flex" }, { className: se, style: ke, onPointerDown: Xe, ...Ye } = _, Oe = k((A) => {
954
964
  const j = he(A, i === null);
955
- E(j);
965
+ L(j);
956
966
  }, [i]), w = k((A) => {
957
- if (p || !Y) return;
967
+ if (f || !Y) return;
958
968
  const j = ve.current?.getBoundingClientRect();
959
969
  let oe = 0;
960
- oe = r === "row" ? (A.clientX ?? A.touches?.[0]?.clientX) - j.x : (A.clientY ?? A.touches?.[0]?.clientY) - j.y, oe = Math.max(0, Math.min(F, oe)), M.fixedPaneOffset === 1 && (oe = F - oe), a && C.pixels === oe || E({ pixels: oe, percent: null }), ge?.(oe), A.stopPropagation(), A.preventDefault();
961
- }, [M, r, p, Y, C, F]), N = k((A) => {
970
+ oe = r === "row" ? (A.clientX ?? A.touches?.[0]?.clientX) - j.x : (A.clientY ?? A.touches?.[0]?.clientY) - j.y, oe = Math.max(0, Math.min(F, oe)), M.fixedPaneOffset === 1 && (oe = F - oe), c && C.pixels === oe || L({ pixels: oe, percent: null }), ge?.(oe), A.stopPropagation(), A.preventDefault();
971
+ }, [M, r, f, Y, C, F]), N = k((A) => {
962
972
  if (document.removeEventListener("pointermove", w), document.removeEventListener("touchmove", w), document.removeEventListener("pointerup", N), !!Y && (ee(!1), !!C)) {
963
- if (Ce(C.pixels), !he(a, i === null) || C.pixels !== a) {
973
+ if (Ce(C.pixels), !he(c, i === null) || C.pixels !== c) {
964
974
  const j = { ...C };
965
975
  j.percent === null && (j.percent = j.pixels / F * 100), b(j);
966
976
  }
967
977
  A.stopPropagation(), A.preventDefault();
968
978
  }
969
- }, [C, Y, a, i, F]), Z = k((A) => {
970
- Xe?.(A), A.defaultPrevented || p || Y || (ee(!0), Le(), document.addEventListener("pointermove", w, { passive: !1 }), document.addEventListener("touchmove", w, { passive: !1 }), document.addEventListener("pointerup", N, { passive: !1 }));
971
- }, [Xe]), ve = Tt(e, () => ({ setPosition: Oe, isSplitPane: () => !0 }), []), Pe = R(() => I ? O?.({ key: "resizer", ref: Ae([z, at]), className: G("resizer", se), onPointerDownCapture: Z, style: { cursor: p ? void 0 : r === "row" ? "ew-resize" : "ns-resize", minWidth: r === "row" ? "2px" : void 0, minHeight: r !== "row" ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...ke }, splitDirection: r, disabled: p, ...Ye }) : null, [I, se, Ye, r, ke, p]), be = r === "row" ? "Width" : "Height", ht = R(() => {
979
+ }, [C, Y, c, i, F]), Z = k((A) => {
980
+ Xe?.(A), A.defaultPrevented || f || Y || (ee(!0), Me(), document.addEventListener("pointermove", w, { passive: !1 }), document.addEventListener("touchmove", w, { passive: !1 }), document.addEventListener("pointerup", N, { passive: !1 }));
981
+ }, [Xe]), ve = Tt(e, () => ({ setPosition: Oe, isSplitPane: () => !0 }), []), Pe = R(() => I ? O?.({ key: "resizer", ref: Ae([z, at]), className: G("resizer", se), onPointerDownCapture: Z, style: { cursor: f ? void 0 : r === "row" ? "ew-resize" : "ns-resize", minWidth: r === "row" ? "2px" : void 0, minHeight: r !== "row" ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...ke }, splitDirection: r, disabled: f, ...Ye }) : null, [I, se, Ye, r, ke, f]), be = r === "row" ? "Width" : "Height", ht = R(() => {
972
982
  if (!t) return null;
973
983
  const A = { ...We, ...Ve, flex: M.fixedPaneOffset === 0 && V?.pixels[0] !== null ? `0 0 ${Math.round(V?.pixels[0])}px` : `1 1 ${Math.round(V?.percents[0] ?? 100)}%`, [`min${be}`]: V?.minBefore, [`max${be}`]: n ? V?.maxBefore : "100%" };
974
984
  return P("div", { ref: ye, className: G("before", Re, ut), style: A, ...He, ...Fe, children: t }, "before");
@@ -976,8 +986,8 @@ const oo = {}, ro = (o) => {
976
986
  if (!n) return null;
977
987
  const A = { ...We, ...Ue, flex: M.fixedPaneOffset === 1 && V?.pixels[1] !== null ? `0 0 ${Math.round(V?.pixels[1])}px` : `1 1 ${Math.round(V?.percents[1] ?? 100)}%`, [`min${be}`]: V?.minAfter, [`max${be}`]: t ? V?.maxAfter : "100%" };
978
988
  return P("div", { ref: Ne, className: G("after", Re, je), style: A, ...He, ...Te, children: n }, "after");
979
- }, [n, v, S, M, V]);
980
- return fe("div", { ref: Ae([$, ve]), className: G("splitPane", r === "row" ? "vertical" : "horizontal", { dragging: Y }, f), style: Be, children: [ht, Pe, Ge] });
989
+ }, [n, v, E, M, V]);
990
+ return fe("div", { ref: Ae([$, ve]), className: G("splitPane", r === "row" ? "vertical" : "horizontal", { dragging: Y }, p), style: Be, children: [ht, Pe, Ge] });
981
991
  }));
982
992
  function so(o) {
983
993
  if (typeof o == "function") return o;
@@ -987,27 +997,27 @@ function so(o) {
987
997
  const t = (function(n) {
988
998
  const r = /^data:image\/svg\+xml(;[^,]*)?,(.*)$/i.exec(n.trim());
989
999
  if (!r) return null;
990
- const i = r[1] || "", a = r[2] || "";
1000
+ const i = r[1] || "", c = r[2] || "";
991
1001
  try {
992
1002
  if (/;base64/i.test(i)) {
993
1003
  if (typeof atob < "u") {
994
- const u = atob(a), l = u.length;
1004
+ const h = atob(c), s = h.length;
995
1005
  if (typeof TextDecoder < "u") {
996
- const c = new Uint8Array(l);
997
- for (let h = 0; h < l; h++) c[h] = u.charCodeAt(h);
998
- return new TextDecoder("utf-8").decode(c);
1006
+ const a = new Uint8Array(s);
1007
+ for (let u = 0; u < s; u++) a[u] = h.charCodeAt(u);
1008
+ return new TextDecoder("utf-8").decode(a);
999
1009
  }
1000
- let s = "";
1001
- for (let c = 0; c < l; c++)
1002
- s += `%${u.charCodeAt(c).toString(16).padStart(2, "0")}`;
1003
- return decodeURIComponent(s);
1010
+ let l = "";
1011
+ for (let a = 0; a < s; a++)
1012
+ l += `%${h.charCodeAt(a).toString(16).padStart(2, "0")}`;
1013
+ return decodeURIComponent(l);
1004
1014
  }
1005
- return (globalThis.Buffer ? globalThis.Buffer.from(a, "base64") : require("buffer").Buffer.from(a, "base64")).toString("utf-8");
1015
+ return (globalThis.Buffer ? globalThis.Buffer.from(c, "base64") : require("buffer").Buffer.from(c, "base64")).toString("utf-8");
1006
1016
  }
1007
1017
  try {
1008
- return decodeURIComponent(a);
1018
+ return decodeURIComponent(c);
1009
1019
  } catch {
1010
- return a;
1020
+ return c;
1011
1021
  }
1012
1022
  } catch {
1013
1023
  return null;
@@ -1057,23 +1067,23 @@ function Ht(o) {
1057
1067
  function Wt(o) {
1058
1068
  try {
1059
1069
  if (typeof DOMParser < "u") {
1060
- const a = new DOMParser().parseFromString(o, "image/svg+xml"), u = a.querySelector("svg"), l = u?.getAttribute("viewBox") ?? void 0, s = [];
1061
- return a.querySelectorAll("path").forEach((c) => {
1062
- const h = c.getAttribute("d");
1063
- if (!h) return;
1064
- const d = { d: h }, f = c.getAttribute("class");
1065
- f && (d.className = f);
1066
- const m = c.getAttribute("fill");
1070
+ const c = new DOMParser().parseFromString(o, "image/svg+xml"), h = c.querySelector("svg"), s = h?.getAttribute("viewBox") ?? void 0, l = [];
1071
+ return c.querySelectorAll("path").forEach((a) => {
1072
+ const u = a.getAttribute("d");
1073
+ if (!u) return;
1074
+ const d = { d: u }, p = a.getAttribute("class");
1075
+ p && (d.className = p);
1076
+ const m = a.getAttribute("fill");
1067
1077
  m && m !== "none" && (d.fill = m);
1068
- const p = c.getAttribute("stroke");
1069
- p && (d.stroke = p);
1070
- const x = c.getAttribute("opacity");
1078
+ const f = a.getAttribute("stroke");
1079
+ f && (d.stroke = f);
1080
+ const x = a.getAttribute("opacity");
1071
1081
  x && (d.opacity = Number(x));
1072
- const L = c.getAttribute("fill-rule");
1073
- L && (d.fillRule = L);
1074
- const y = c.getAttribute("clip-rule");
1075
- y && (d.clipRule = y), s.push(d);
1076
- }), { viewBox: l, paths: s };
1082
+ const S = a.getAttribute("fill-rule");
1083
+ S && (d.fillRule = S);
1084
+ const g = a.getAttribute("clip-rule");
1085
+ g && (d.clipRule = g), l.push(d);
1086
+ }), { viewBox: s, paths: l };
1077
1087
  }
1078
1088
  } catch {
1079
1089
  }
@@ -1084,16 +1094,16 @@ function Wt(o) {
1084
1094
  }
1085
1095
  function Vt(o) {
1086
1096
  const e = {};
1087
- for (const [i, a] of Object.entries(o.icons)) e[i] = Ht(a);
1097
+ for (const [i, c] of Object.entries(o.icons)) e[i] = Ht(c);
1088
1098
  const t = { label: o.meta?.label ?? "Unnamed", version: o.meta?.version ?? "1.0.0", license: o.meta?.license ?? "MIT", defaultViewBox: "0 0 24 24", extends: o.meta?.extends ?? [] };
1089
1099
  t.extends.includes("base") || t.extends.push("base");
1090
1100
  const n = { meta: t, icons: e }, r = o.overrides;
1091
1101
  if (r) {
1092
1102
  const i = {};
1093
- for (const [a, u] of Object.entries(r)) {
1094
- const l = {};
1095
- for (const [s, c] of Object.entries(u)) l[s] = Ht(c);
1096
- i[a] = l;
1103
+ for (const [c, h] of Object.entries(r)) {
1104
+ const s = {};
1105
+ for (const [l, a] of Object.entries(h)) s[l] = Ht(a);
1106
+ i[c] = s;
1097
1107
  }
1098
1108
  n.__overrides = i;
1099
1109
  }
@@ -1102,159 +1112,159 @@ function Vt(o) {
1102
1112
  function lo() {
1103
1113
  const o = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
1104
1114
  let t = "base", n = /* @__PURE__ */ new Map();
1105
- async function r(l) {
1106
- const s = o.get(l ?? t);
1107
- if (!s) throw new Error(`Icon pack not registered: ${l}`);
1108
- if (!s.pack) {
1109
- if (!s.loading) {
1110
- if (!s.loader) throw new Error(`No loader for icon pack: ${l}`);
1111
- s.loading = s.loader().then((c) => {
1112
- const h = c && typeof c == "object" && "default" in c ? c.default : c;
1113
- s.pack = Vt(h);
1114
- }).catch((c) => {
1115
- throw s.loading = void 0, c;
1115
+ async function r(s) {
1116
+ const l = o.get(s ?? t);
1117
+ if (!l) throw new Error(`Icon pack not registered: ${s}`);
1118
+ if (!l.pack) {
1119
+ if (!l.loading) {
1120
+ if (!l.loader) throw new Error(`No loader for icon pack: ${s}`);
1121
+ l.loading = l.loader().then((a) => {
1122
+ const u = a && typeof a == "object" && "default" in a ? a.default : a;
1123
+ l.pack = Vt(u);
1124
+ }).catch((a) => {
1125
+ throw l.loading = void 0, a;
1116
1126
  });
1117
1127
  }
1118
- await s.loading;
1128
+ await l.loading;
1119
1129
  }
1120
1130
  }
1121
- function i(l) {
1122
- const s = l.indexOf(":");
1123
- return s > 0 ? { ns: l.slice(0, s), key: l.slice(s + 1) } : { key: l };
1131
+ function i(s) {
1132
+ const l = s.indexOf(":");
1133
+ return l > 0 ? { ns: s.slice(0, l), key: s.slice(l + 1) } : { key: s };
1124
1134
  }
1125
- function a(l, s) {
1126
- const c = [l, ...o.get(l)?.pack?.meta.extends ?? []];
1127
- for (const h of c) {
1128
- const d = o.get(h);
1135
+ function c(s, l) {
1136
+ const a = [s, ...o.get(s)?.pack?.meta.extends ?? []];
1137
+ for (const u of a) {
1138
+ const d = o.get(u);
1129
1139
  if (!d?.pack) continue;
1130
- const { icons: f } = d.pack, m = f[e.get(h)?.get(s) ?? s] ?? f[s];
1131
- if (m) return { glyph: m, pack: d.pack, packKey: h };
1140
+ const { icons: p } = d.pack, m = p[e.get(u)?.get(l) ?? l] ?? p[l];
1141
+ if (m) return { glyph: m, pack: d.pack, packKey: u };
1132
1142
  }
1133
1143
  return null;
1134
1144
  }
1135
- function u(l, s) {
1136
- const c = s?.packKey ?? t;
1137
- if (s?.packKey) return a(s.packKey, l);
1138
- if (!l) return null;
1139
- const { ns: h, key: d } = i(l);
1140
- if (h) {
1141
- const f = o.get(h)?.pack;
1142
- if (f) {
1145
+ function h(s, l) {
1146
+ const a = l?.packKey ?? t;
1147
+ if (l?.packKey) return c(l.packKey, s);
1148
+ if (!s) return null;
1149
+ const { ns: u, key: d } = i(s);
1150
+ if (u) {
1151
+ const p = o.get(u)?.pack;
1152
+ if (p) {
1143
1153
  if (o.get(t)?.pack) {
1144
- const p = f.__overrides, x = p?.[t]?.[d];
1145
- if (x) return { glyph: x, pack: f, packKey: h };
1154
+ const f = p.__overrides, x = f?.[t]?.[d];
1155
+ if (x) return { glyph: x, pack: p, packKey: u };
1146
1156
  }
1147
- const m = a(h, d);
1157
+ const m = c(u, d);
1148
1158
  if (m) return m;
1149
1159
  }
1150
1160
  return null;
1151
1161
  }
1152
- return a(c, l);
1153
- }
1154
- return { register: function(l, s) {
1155
- const c = o.get(l) ?? {};
1156
- typeof s == "function" ? c.loader = s : c.pack = Vt(s), o.set(l, c), t || (t = l);
1157
- }, prefetch: async function(l = t) {
1158
- const s = Array.isArray(l) ? l : [l];
1159
- await Promise.all(s.map(r));
1160
- }, setActive: function(l) {
1161
- t = l;
1162
- for (const s of n.keys()) try {
1163
- s(l);
1162
+ return c(a, s);
1163
+ }
1164
+ return { register: function(s, l) {
1165
+ const a = o.get(s) ?? {};
1166
+ typeof l == "function" ? a.loader = l : a.pack = Vt(l), o.set(s, a), t || (t = s);
1167
+ }, prefetch: async function(s = t) {
1168
+ const l = Array.isArray(s) ? s : [s];
1169
+ await Promise.all(l.map(r));
1170
+ }, setActive: function(s) {
1171
+ t = s;
1172
+ for (const l of n.keys()) try {
1173
+ l(s);
1164
1174
  } catch {
1165
1175
  }
1166
1176
  }, getActive: function() {
1167
1177
  return t;
1168
- }, resolve: async function(l, s) {
1169
- let c = u(l, s);
1170
- if (c) return c;
1171
- const h = s?.packKey ?? t, { ns: d } = i(l);
1172
- if (s?.packKey) {
1173
- if (await r(h), c = u(l, s), c) return c;
1174
- const f = o.get(h)?.pack?.meta?.extends ?? [];
1175
- if (f.length && (await Promise.all(f.map(r)), c = u(l, s), c)) return c;
1178
+ }, resolve: async function(s, l) {
1179
+ let a = h(s, l);
1180
+ if (a) return a;
1181
+ const u = l?.packKey ?? t, { ns: d } = i(s);
1182
+ if (l?.packKey) {
1183
+ if (await r(u), a = h(s, l), a) return a;
1184
+ const p = o.get(u)?.pack?.meta?.extends ?? [];
1185
+ if (p.length && (await Promise.all(p.map(r)), a = h(s, l), a)) return a;
1176
1186
  } else if (d) {
1177
- if (await r(d), c = u(l, s), c) return c;
1178
- const f = o.get(d)?.pack?.meta?.extends ?? [];
1179
- if (f.length && (await Promise.all(f.map(r)), c = u(l, s), c)) return c;
1187
+ if (await r(d), a = h(s, l), a) return a;
1188
+ const p = o.get(d)?.pack?.meta?.extends ?? [];
1189
+ if (p.length && (await Promise.all(p.map(r)), a = h(s, l), a)) return a;
1180
1190
  } else {
1181
- if (await r(h), c = u(l, s), c) return c;
1182
- const f = o.get(h)?.pack?.meta?.extends ?? [];
1183
- if (f.length && (await Promise.all(f.map(r)), c = u(l, s), c)) return c;
1191
+ if (await r(u), a = h(s, l), a) return a;
1192
+ const p = o.get(u)?.pack?.meta?.extends ?? [];
1193
+ if (p.length && (await Promise.all(p.map(r)), a = h(s, l), a)) return a;
1184
1194
  }
1185
1195
  return null;
1186
- }, registerAlias: function(l, s, c) {
1187
- e.has(l) || e.set(l, /* @__PURE__ */ new Map()), e.get(l).set(s, c);
1188
- }, has: function(l, s) {
1189
- return !!u(l, s);
1190
- }, getPack: function(l) {
1191
- return o.get(l ?? t)?.pack;
1192
- }, hasPack: function(l) {
1193
- return !!o.get(l)?.pack;
1196
+ }, registerAlias: function(s, l, a) {
1197
+ e.has(s) || e.set(s, /* @__PURE__ */ new Map()), e.get(s).set(l, a);
1198
+ }, has: function(s, l) {
1199
+ return !!h(s, l);
1200
+ }, getPack: function(s) {
1201
+ return o.get(s ?? t)?.pack;
1202
+ }, hasPack: function(s) {
1203
+ return !!o.get(s)?.pack;
1194
1204
  }, listPacks: function() {
1195
1205
  return Array.from(o.keys());
1196
- }, listIcons: function(l) {
1197
- const s = o.get(l)?.pack;
1198
- return s ? Object.keys(s.icons) : [];
1199
- }, addActiveListener: function(l) {
1200
- const s = n.get(l);
1201
- if (s) return s;
1202
- const c = () => {
1203
- n.delete(l);
1206
+ }, listIcons: function(s) {
1207
+ const l = o.get(s)?.pack;
1208
+ return l ? Object.keys(l.icons) : [];
1209
+ }, addActiveListener: function(s) {
1210
+ const l = n.get(s);
1211
+ if (l) return l;
1212
+ const a = () => {
1213
+ n.delete(s);
1204
1214
  };
1205
- return n.set(l, c), c;
1215
+ return n.set(s, a), a;
1206
1216
  } };
1207
1217
  }
1208
1218
  io.displayName = "SplitPane";
1209
1219
  const ot = lo();
1210
- ot.register("base", () => import("./DTq8GPy7DLZm2D6S.mjs"));
1220
+ ot.register("base", () => import("./r7vPXPCC6zFI-B4m.mjs"));
1211
1221
  const Ft = (o) => P("svg", { ...o, children: P("path", {}) }), ao = { Icon: "_Icon_17dpm_10" }, co = _e((o) => {
1212
- const { iconKey: e, packKey: t, className: n, style: r, role: i, title: a, size: u, ariaHidden: l, propsSource: s, children: c, ...h } = o, [d, f] = ae.useState(null);
1222
+ const { iconKey: e, packKey: t, className: n, style: r, role: i, title: c, size: h, ariaHidden: s, propsSource: l, children: a, ...u } = o, [d, p] = ae.useState(null);
1213
1223
  ae.useEffect(() => {
1214
- let E = !0, $ = t, T = e;
1224
+ let L = !0, $ = t, T = e;
1215
1225
  if (!T) {
1216
- const g = ot.getPack($);
1217
- return void f({ glyph: g ? { svg: te.EmptyArray } : void 0, pack: g ?? void 0, packKey: $ ?? ot.getActive() });
1226
+ const y = ot.getPack($);
1227
+ return void p({ glyph: y ? { svg: te.EmptyArray } : void 0, pack: y ?? void 0, packKey: $ ?? ot.getActive() });
1218
1228
  }
1219
1229
  if (T.includes(":")) {
1220
- const [g, z] = T.split(":");
1221
- $ = g, T = z;
1230
+ const [y, z] = T.split(":");
1231
+ $ = y, T = z;
1222
1232
  }
1223
- return ot.resolve(T, { packKey: $ }).then((g) => {
1224
- E && f(g);
1233
+ return ot.resolve(T, { packKey: $ }).then((y) => {
1234
+ L && p(y);
1225
1235
  }), () => {
1226
- E = !1;
1236
+ L = !1;
1227
1237
  };
1228
1238
  }, [e, t]);
1229
- const m = d?.pack, p = d?.glyph, x = d?.packKey;
1230
- let L = p ? p.svg : void 0;
1231
- const y = p && !L ? p.url : void 0, _ = !p || L || y ? void 0 : p.emoji, v = u != null ? typeof u == "number" ? `${u}px` : u : void 0, B = R(() => [ao.Icon, "icon", n].filter(Boolean).join(" "), [n]), S = R(() => {
1232
- const E = { ...r };
1233
- return E["--icon-size"] = v, E;
1234
- }, [r, v]), O = i ?? (a ? "img" : "presentation"), I = l ?? (!a || void 0), M = (E) => P("span", { className: B, style: S, role: O, "aria-hidden": I, title: a, "data-icon-glyph": e, "data-icon-pack": x, ...h, children: E });
1235
- if (c) return M(c);
1239
+ const m = d?.pack, f = d?.glyph, x = d?.packKey;
1240
+ let S = f ? f.svg : void 0;
1241
+ const g = f && !S ? f.url : void 0, _ = !f || S || g ? void 0 : f.emoji, v = h != null ? typeof h == "number" ? `${h}px` : h : void 0, B = R(() => [ao.Icon, "icon", n].filter(Boolean).join(" "), [n]), E = R(() => {
1242
+ const L = { ...r };
1243
+ return L["--icon-size"] = v, L;
1244
+ }, [r, v]), O = i ?? (c ? "img" : "presentation"), I = s ?? (!c || void 0), M = (L) => P("span", { className: B, style: E, role: O, "aria-hidden": I, title: c, "data-icon-glyph": e, "data-icon-pack": x, ...u, children: L });
1245
+ if (a) return M(a);
1236
1246
  if (_) return M(P("span", { children: typeof _ == "string" ? _ : _.text }));
1237
- if (y) return M(P("img", { src: y.src, alt: a ?? "" }));
1238
- if (p && "react" in p) {
1239
- const E = p.react, $ = { className: B, style: S, role: O, "aria-hidden": I, title: a, ...h, ...s };
1240
- return M(P(E, { ...$ }));
1241
- }
1242
- const b = { viewBox: L?.viewBox ?? m?.meta.defaultViewBox ?? "0 0 24 24" };
1243
- if (typeof L == "function")
1244
- return M(L(b) ?? P(Ft, { ...b }));
1245
- if (!L) return M(P(Ft, { ...b }));
1246
- const C = L.paths;
1247
- return M(P("svg", { ...b, children: C ? C.map((E, $) => P("path", { d: E.d, className: E.className, fill: E.fill, stroke: E.stroke, opacity: E.opacity, fillRule: E.fillRule, clipRule: E.clipRule }, $)) : null }));
1247
+ if (g) return M(P("img", { src: g.src, alt: c ?? "" }));
1248
+ if (f && "react" in f) {
1249
+ const L = f.react, $ = { className: B, style: E, role: O, "aria-hidden": I, title: c, ...u, ...l };
1250
+ return M(P(L, { ...$ }));
1251
+ }
1252
+ const b = { viewBox: S?.viewBox ?? m?.meta.defaultViewBox ?? "0 0 24 24" };
1253
+ if (typeof S == "function")
1254
+ return M(S(b) ?? P(Ft, { ...b }));
1255
+ if (!S) return M(P(Ft, { ...b }));
1256
+ const C = S.paths;
1257
+ return M(P("svg", { ...b, children: C ? C.map((L, $) => P("path", { d: L.d, className: L.className, fill: L.fill, stroke: L.stroke, opacity: L.opacity, fillRule: L.fillRule, clipRule: L.clipRule }, $)) : null }));
1248
1258
  });
1249
1259
  function sr(o) {
1250
- const { isWalking: e = !1, themedType: t = "info", speed: n = 120, dashGap: r = 3, dashLength: i = 5, iconKey: a, packKey: u, style: l, className: s, ...c } = o, h = R(() => {
1260
+ const { isWalking: e = !1, themedType: t = "info", speed: n = 120, dashGap: r = 3, dashLength: i = 5, iconKey: c, packKey: h, style: s, className: l, ...a } = o, u = R(() => {
1251
1261
  if (!e) return;
1252
- const f = { "--walk-duration": `${n * (r + i)}ms`, "--walk-dash-length": `${i}px`, "--walk-dash-gap": `${r}px` };
1253
- return t && t !== "accent" && (f["--icon-accent"] = `var(--icon-${t})`), f;
1254
- }, [e, n, r, i, t]), d = R(() => e ? s + " walking" : s, [e, s]);
1255
- return P(co, { iconKey: a, packKey: u, className: d, style: { ...l, ...h }, ...c });
1262
+ const p = { "--walk-duration": `${n * (r + i)}ms`, "--walk-dash-length": `${i}px`, "--walk-dash-gap": `${r}px` };
1263
+ return t && t !== "accent" && (p["--icon-accent"] = `var(--icon-${t})`), p;
1264
+ }, [e, n, r, i, t]), d = R(() => e ? l + " walking" : l, [e, l]);
1265
+ return P(co, { iconKey: c, packKey: h, className: d, style: { ...s, ...u }, ...a });
1256
1266
  }
1257
- class Mt {
1267
+ class Lt {
1258
1268
  constructor() {
1259
1269
  this.store = /* @__PURE__ */ new Map();
1260
1270
  }
@@ -1268,82 +1278,82 @@ class Mt {
1268
1278
  this.store.delete(e);
1269
1279
  }
1270
1280
  }
1271
- const dn = Gt(null), pn = { parse: (o) => o ? JSON.parse(o) : null, stringify: JSON.stringify }, uo = { store: new Mt(), namespace: "", serializer: pn, debounceMs: 0, crossTabSync: !1, notify: () => {
1281
+ const dn = Gt(null), pn = { parse: (o) => o ? JSON.parse(o) : null, stringify: JSON.stringify }, uo = { store: new Lt(), namespace: "", serializer: pn, debounceMs: 0, crossTabSync: !1, notify: () => {
1272
1282
  }, subscribeKey: () => () => {
1273
1283
  } };
1274
1284
  function lr(o, e, t = ho) {
1275
- const { store: n, namespace: r, serializer: i, debounceMs: a, subscribeKey: u } = qt(dn) || uo, l = t.serializer ?? i ?? pn, s = R(() => `${r}:${o}`, [r, o]), c = K(null), h = `${s}::v`, [d, f] = q(() => {
1276
- let p;
1285
+ const { store: n, namespace: r, serializer: i, debounceMs: c, subscribeKey: h } = qt(dn) || uo, s = t.serializer ?? i ?? pn, l = R(() => `${r}:${o}`, [r, o]), a = K(null), u = `${l}::v`, [d, p] = q(() => {
1286
+ let f;
1277
1287
  try {
1278
- if (typeof window < "u" && "localStorage" in window && s.startsWith(r)) {
1279
- const x = window.localStorage?.getItem(s) ?? null;
1280
- x != null && (p = l.parse(x));
1288
+ if (typeof window < "u" && "localStorage" in window && l.startsWith(r)) {
1289
+ const x = window.localStorage?.getItem(l) ?? null;
1290
+ x != null && (f = s.parse(x));
1281
1291
  }
1282
1292
  } catch {
1283
1293
  }
1284
- if (p === void 0) {
1294
+ if (f === void 0) {
1285
1295
  const x = e;
1286
1296
  return typeof x == "function" ? x() : x;
1287
1297
  }
1288
- return p;
1298
+ return f;
1289
1299
  });
1290
1300
  W(() => {
1291
- let p = !0;
1301
+ let f = !0;
1292
1302
  return (async () => {
1293
- const [x, L] = await Promise.all([n.getItem(s), n.getItem(h)]);
1294
- let y;
1303
+ const [x, S] = await Promise.all([n.getItem(l), n.getItem(u)]);
1304
+ let g;
1295
1305
  try {
1296
- y = x == null ? void 0 : l.parse(x);
1306
+ g = x == null ? void 0 : s.parse(x);
1297
1307
  } catch {
1298
1308
  }
1299
- const _ = L == null ? void 0 : Number.parseInt(L, 10);
1300
- y === void 0 ? !t.lazy && e !== void 0 && (y = typeof e == "function" ? e() : e, await n.setItem(s, l.stringify(y)), t.version != null && await n.setItem(h, String(t.version))) : t.version != null && _ !== void 0 && _ !== t.version && t.migrate && (y = t.migrate(y, _), await n.setItem(s, l.stringify(y)), await n.setItem(h, String(t.version))), p && y !== void 0 && f(y);
1309
+ const _ = S == null ? void 0 : Number.parseInt(S, 10);
1310
+ g === void 0 ? !t.lazy && e !== void 0 && (g = typeof e == "function" ? e() : e, await n.setItem(l, s.stringify(g)), t.version != null && await n.setItem(u, String(t.version))) : t.version != null && _ !== void 0 && _ !== t.version && t.migrate && (g = t.migrate(g, _), await n.setItem(l, s.stringify(g)), await n.setItem(u, String(t.version))), f && g !== void 0 && p(g);
1301
1311
  })(), () => {
1302
- p = !1;
1312
+ f = !1;
1303
1313
  };
1304
- }, [n, s, h, t.version, t.migrate, t.lazy]), W(() => u(o, async () => {
1305
- const p = await n.getItem(s);
1306
- if (p != null) try {
1307
- f(l.parse(p));
1314
+ }, [n, l, u, t.version, t.migrate, t.lazy]), W(() => h(o, async () => {
1315
+ const f = await n.getItem(l);
1316
+ if (f != null) try {
1317
+ p(s.parse(f));
1308
1318
  } catch {
1309
1319
  }
1310
- }), [n, s, u, o]);
1311
- const m = async (p) => {
1312
- await n.setItem(s, l.stringify(p)), t.version != null && await n.setItem(h, String(t.version));
1320
+ }), [n, l, h, o]);
1321
+ const m = async (f) => {
1322
+ await n.setItem(l, s.stringify(f)), t.version != null && await n.setItem(u, String(t.version));
1313
1323
  };
1314
- return [d, (p) => {
1315
- f((x) => {
1316
- const L = typeof p == "function" ? p(x) : p;
1317
- return c.current && clearTimeout(c.current), a > 0 ? c.current = setTimeout(() => {
1318
- m(L);
1319
- }, a) : m(L), L;
1324
+ return [d, (f) => {
1325
+ p((x) => {
1326
+ const S = typeof f == "function" ? f(x) : f;
1327
+ return a.current && clearTimeout(a.current), c > 0 ? a.current = setTimeout(() => {
1328
+ m(S);
1329
+ }, c) : m(S), S;
1320
1330
  });
1321
1331
  }, () => {
1322
- if (c.current && clearTimeout(c.current), n.removeItem(s), n.removeItem(h), e !== void 0) {
1323
- const p = typeof e == "function" ? e() : e;
1324
- f(p);
1325
- } else f(void 0);
1332
+ if (a.current && clearTimeout(a.current), n.removeItem(l), n.removeItem(u), e !== void 0) {
1333
+ const f = typeof e == "function" ? e() : e;
1334
+ p(f);
1335
+ } else p(void 0);
1326
1336
  }];
1327
1337
  }
1328
1338
  const ho = {};
1329
1339
  function ar(o) {
1330
- const { store: e, namespace: t = "", serializer: n = po, debounceMs: r = 0, crossTabSync: i = !0, children: a } = o, u = R(() => typeof window > "u" ? new Mt() : e ?? new Mt(), [e]), l = K(/* @__PURE__ */ new Map()), s = R(() => ({ store: u, namespace: t, serializer: n, debounceMs: r, crossTabSync: i, notify(c) {
1331
- const h = l.current.get(c);
1332
- h && h.forEach((d) => d());
1333
- }, subscribeKey(c, h) {
1334
- const d = l.current, f = d.get(c) ?? /* @__PURE__ */ new Set();
1335
- return f.add(h), d.set(c, f), () => {
1336
- const m = d.get(c);
1337
- m && (m.delete(h), m.size === 0 && d.delete(c));
1340
+ const { store: e, namespace: t = "", serializer: n = po, debounceMs: r = 0, crossTabSync: i = !0, children: c } = o, h = R(() => typeof window > "u" ? new Lt() : e ?? new Lt(), [e]), s = K(/* @__PURE__ */ new Map()), l = R(() => ({ store: h, namespace: t, serializer: n, debounceMs: r, crossTabSync: i, notify(a) {
1341
+ const u = s.current.get(a);
1342
+ u && u.forEach((d) => d());
1343
+ }, subscribeKey(a, u) {
1344
+ const d = s.current, p = d.get(a) ?? /* @__PURE__ */ new Set();
1345
+ return p.add(u), d.set(a, p), () => {
1346
+ const m = d.get(a);
1347
+ m && (m.delete(u), m.size === 0 && d.delete(a));
1338
1348
  };
1339
- } }), [u, t, n, r, i]);
1349
+ } }), [h, t, n, r, i]);
1340
1350
  return W(() => {
1341
- if (s.crossTabSync && s.store.subscribe) return s.store.subscribe((c) => {
1342
- if (!c.startsWith(s.namespace + ":")) return;
1343
- const h = c.slice(s.namespace.length + 1);
1344
- s.notify(h);
1351
+ if (l.crossTabSync && l.store.subscribe) return l.store.subscribe((a) => {
1352
+ if (!a.startsWith(l.namespace + ":")) return;
1353
+ const u = a.slice(l.namespace.length + 1);
1354
+ l.notify(u);
1345
1355
  });
1346
- }, [s]), P(dn.Provider, { value: s, children: a });
1356
+ }, [l]), P(dn.Provider, { value: l, children: c });
1347
1357
  }
1348
1358
  const po = { parse: (o) => o == null ? null : JSON.parse(o), stringify: JSON.stringify };
1349
1359
  class cr {
@@ -1385,51 +1395,51 @@ const ne = { Horizontal: "horizontal", Vertical: "vertical" }, Se = { scrollbar:
1385
1395
  }, ur = (o) => {
1386
1396
  const { style: e, orientation: t = ne.Vertical, ...n } = o, r = t === ne.Vertical;
1387
1397
  return P("div", { style: { display: "flex", justifyContent: "center", alignItems: "end", transition: "fill-opacity 1s", zIndex: 1, width: "24px", height: "24px", ...e }, className: `scrollbar-button ${r ? "vertical" : "horizontal"} edge`, ...n, children: P("svg", { width: "24", height: "24", viewBox: "0 0 24 24", transform: r ? "rotate(90) " : "", children: P("path", { style: { transition: "opacity 240ms ease 0s", opacity: o.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" }) }) });
1388
- }, go = Ke().supportsTouchEvents, _n = _e(Me((o, e) => {
1389
- const { borderColor: t = "var(--sxl-app-color-primary, rgb(33, 115, 70))", backgroundColor: n = "var(--sxl-app-color-background, white)", fillColor: r = "var(--sxl-app-color-grey, grey)", borderWidth: i = 3, size: a = 22, style: u, className: l, onPointerDown: s, onPointerMove: c, onPointerUp: h, orientation: d = ne.Vertical, offset: f = 0, currentTouchAnchor: m, elementParent: p, elementRoot: x, key: L, ...y } = o;
1398
+ }, go = Ke().supportsTouchEvents, _n = _e(Le((o, e) => {
1399
+ const { borderColor: t = "var(--sxl-app-color-primary, rgb(33, 115, 70))", backgroundColor: n = "var(--sxl-app-color-background, white)", fillColor: r = "var(--sxl-app-color-grey, grey)", borderWidth: i = 3, size: c = 22, style: h, className: s, onPointerDown: l, onPointerMove: a, onPointerUp: u, orientation: d = ne.Vertical, offset: p = 0, currentTouchAnchor: m, elementParent: f, elementRoot: x, key: S, ...g } = o;
1390
1400
  if (!go) return null;
1391
- const _ = k(s, [s]), v = k(c, [c]), B = k(h, [h]), S = d === ne.Vertical, [O, I] = q(!1), M = ln(R(() => ({ processTouch: !0, consumeTouch: !0, onPointerDown: (D, F) => {
1401
+ const _ = k(l, [l]), v = k(a, [a]), B = k(u, [u]), E = d === ne.Vertical, [O, I] = q(!1), M = ln(R(() => ({ processTouch: !0, consumeTouch: !0, onPointerDown: (D, F) => {
1392
1402
  I(!0), _?.(D), D.preventDefault(), D.stopPropagation();
1393
1403
  }, onPointerMoveOrWait: (D, F, V) => {
1394
1404
  v?.(D);
1395
1405
  }, onPointerUp: (D, F, V) => {
1396
1406
  I(!1), B?.(V), D.preventDefault(), D.stopPropagation();
1397
1407
  } }), [])), b = R(() => {
1398
- const D = a / 2 + i / 2 + 6;
1399
- return { x: S ? -D : f + a, y: S ? f + a : -D, width: 0, height: 0 };
1400
- }, [S, f, a]), [C, { y: E, x: $ }] = Vn(), T = K(null), { getPortalContainer: g, isFullscreen: z } = Fn(), [H, X] = q(null);
1408
+ const D = c / 2 + i / 2 + 6;
1409
+ return { x: E ? -D : p + c, y: E ? p + c : -D, width: 0, height: 0 };
1410
+ }, [E, p, c]), [C, { y: L, x: $ }] = Vn(), T = K(null), { getPortalContainer: y, isFullscreen: z } = Fn(), [H, X] = q(null);
1401
1411
  return W(() => {
1402
1412
  const D = T.current?.getBoundingClientRect();
1403
1413
  if (!D) return void X(null);
1404
- let F = 0, V = 0, Y = p;
1414
+ let F = 0, V = 0, Y = f;
1405
1415
  for (; Y; ) F += Y.scrollLeft, V += Y.scrollTop, Y = x && Y === x.parentElement ? null : Y.parentElement;
1406
- X(Ln(P("div", { className: G("touch-thumb", Se["touch-thumb"], l, Se, { dragging: O }), ref: e, style: { left: F + (D?.x ?? 0) - (a + i) / 2, top: V + (D?.y ?? 0) - (a + i) / 2, width: S ? a : 1.8 * a, height: S ? 1.8 * a : a, borderWidth: `${i}px`, boxShadow: O ? `${n} 0px 0px 0px 1.5px` : void 0, borderStyle: "solid", borderColor: t, backgroundColor: n, opacity: m ? 0 : void 0, transitionDuration: "160ms", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${r}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center center", ...u }, tabIndex: -1, onPointerDown: M, ...y }), x ?? g(), L));
1407
- }, [E, O, t, n, r, $, b?.x, b?.y, b?.width, b?.height, l, m, n, a, i, t, p, z, L]), b ? fe(me, { children: [P("div", { ref: Ae([C, T]), style: { position: "absolute", left: b.x, top: b.y, opacity: 0 } }), H] }) : null;
1416
+ X(Mn(P("div", { className: G("touch-thumb", Se["touch-thumb"], s, Se, { dragging: O }), ref: e, style: { left: F + (D?.x ?? 0) - (c + i) / 2, top: V + (D?.y ?? 0) - (c + i) / 2, width: E ? c : 1.8 * c, height: E ? 1.8 * c : c, borderWidth: `${i}px`, boxShadow: O ? `${n} 0px 0px 0px 1.5px` : void 0, borderStyle: "solid", borderColor: t, backgroundColor: n, opacity: m ? 0 : void 0, transitionDuration: "160ms", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${r}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center center", ...h }, tabIndex: -1, onPointerDown: M, ...g }), x ?? y(), S));
1417
+ }, [L, O, t, n, r, $, b?.x, b?.y, b?.width, b?.height, s, m, n, c, i, t, f, z, S]), b ? fe(me, { children: [P("div", { ref: Ae([C, T]), style: { position: "absolute", left: b.x, top: b.y, opacity: 0 } }), H] }) : null;
1408
1418
  }));
1409
1419
  _n.displayName = "TouchThumbHandle";
1410
- const yo = 24, vo = _e(Me((o, e) => {
1411
- const { offset: t = 0, totalSize: n = 0, viewportSize: r = 0, style: i, className: a, orientation: u = ne.Vertical, onScrollOffset: l, onScroll: s, showCustomScrollButtons: c, scrollButtonIncrement: h = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: f = 120, minThumbSize: m = yo, maxThumbSize: p, renderScrollButtonStart: x = mo, renderScrollButtonEnd: L = _o, propsTouchThumb: y, propsThumb: _, onMouseDown: v, ...B } = o, S = Ke().primaryInput === "touch", O = c ?? !S;
1412
- k(s, [s]);
1413
- const [I, M] = q({ offset: 0, length: 0, disabled: !1 }), b = K(-1), C = u === ne.Vertical, [E, { width: $, height: T }] = Ee(), g = C ? T : $, z = k((w, N, Z) => {
1420
+ const yo = 24, vo = _e(Le((o, e) => {
1421
+ const { offset: t = 0, totalSize: n = 0, viewportSize: r = 0, style: i, className: c, orientation: h = ne.Vertical, onScrollOffset: s, onScroll: l, showCustomScrollButtons: a, scrollButtonIncrement: u = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: p = 120, minThumbSize: m = yo, maxThumbSize: f, renderScrollButtonStart: x = mo, renderScrollButtonEnd: S = _o, propsTouchThumb: g, propsThumb: _, onMouseDown: v, ...B } = o, E = Ke().primaryInput === "touch", O = a ?? !E;
1422
+ k(l, [l]);
1423
+ const [I, M] = q({ offset: 0, length: 0, disabled: !1 }), b = K(-1), C = h === ne.Vertical, [L, { width: $, height: T }] = Ee(), y = C ? T : $, z = k((w, N, Z) => {
1414
1424
  if (N === 0 || Z === 0) {
1415
1425
  const Ge = { offset: 0, length: m, disabled: !0 };
1416
1426
  return M(Ge), Ge;
1417
1427
  }
1418
- if (N >= Z) return { offset: 0, length: g, disabled: !0 };
1419
- const ve = Z / g, Pe = N / ve, be = Math.min(Math.max(m, Pe), Math.min(g, p ?? Number.MAX_SAFE_INTEGER)), ht = w / ve;
1420
- return { offset: Math.min(Math.max(0, ht), g - be), length: be, disabled: !1 };
1421
- }, [g, m, p]), H = k((w) => {
1422
- const N = n / g, Z = Math.round(w * N);
1423
- M(z(Z, r, n)), l?.(Z, r, n), b.current = w;
1424
- }, [l, r, n, g, I]), X = k((w) => {
1425
- M(z(w, r, n)), l?.(w, r, n), b.current = w;
1426
- }, [l, r, n]);
1428
+ if (N >= Z) return { offset: 0, length: y, disabled: !0 };
1429
+ const ve = Z / y, Pe = N / ve, be = Math.min(Math.max(m, Pe), Math.min(y, f ?? Number.MAX_SAFE_INTEGER)), ht = w / ve;
1430
+ return { offset: Math.min(Math.max(0, ht), y - be), length: be, disabled: !1 };
1431
+ }, [y, m, f]), H = k((w) => {
1432
+ const N = n / y, Z = Math.round(w * N);
1433
+ M(z(Z, r, n)), s?.(Z, r, n), b.current = w;
1434
+ }, [s, r, n, y, I]), X = k((w) => {
1435
+ M(z(w, r, n)), s?.(w, r, n), b.current = w;
1436
+ }, [s, r, n]);
1427
1437
  W(() => {
1428
- b.current !== t && g !== 0 && (b.current = -1, M(z(t, r, n)));
1438
+ b.current !== t && y !== 0 && (b.current = -1, M(z(t, r, n)));
1429
1439
  }, [t]), W(() => {
1430
- g !== 0 && M(z(t, r, n));
1431
- }, [r, n, C, g]);
1432
- const D = Math.max(0, n - r), [F, V] = q(!1), Y = K(0), ee = K(0), Le = Tt(e, () => ({ isScrollbar: () => !0 }), []), ge = k((w) => {
1440
+ y !== 0 && M(z(t, r, n));
1441
+ }, [r, n, C, y]);
1442
+ const D = Math.max(0, n - r), [F, V] = q(!1), Y = K(0), ee = K(0), Me = Tt(e, () => ({ isScrollbar: () => !0 }), []), ge = k((w) => {
1433
1443
  V(!0), Y.current = C ? w.clientY : w.clientX, ee.current = I.offset;
1434
1444
  }, [C, I]), Ce = k((w) => {
1435
1445
  w.currentTarget.setPointerCapture(w.pointerId), ge(w), w.stopPropagation();
@@ -1458,70 +1468,70 @@ const yo = 24, vo = _e(Me((o, e) => {
1458
1468
  const w = I.disabled;
1459
1469
  if (w) return null;
1460
1470
  const N = P("div", { ..._, className: G(Se.thumb, { disabled: w }), ref: We, role: "slider", "aria-label": C ? "Rows" : "Columns", "aria-orientation": C ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": D, "aria-valuenow": t, tabIndex: 0, style: { ..._?.style, position: "relative", [C ? "height" : "width"]: `${I.length}px`, [C ? "width" : "height"]: "100%", transform: C ? `translateY(${I.offset}px)` : `translateX(${I.offset}px)`, [C ? "minHeight" : "minWidth"]: `${m}px` }, onMouseDown: v, onPointerDown: Ce, onPointerMove: at, onPointerUp: ct });
1461
- return !S || w ? N : fe(me, { children: [N, P(_n, { ...y, offset: I.offset, orientation: C ? ne.Vertical : ne.Horizontal, onPointerDown: ge, onPointerMove: ye, onPointerUp: Ne })] });
1462
- }, [I, m, D, t, C, S, v, y, _]), [Ve, Fe] = q(null), je = k(() => {
1471
+ return !E || w ? N : fe(me, { children: [N, P(_n, { ...g, offset: I.offset, orientation: C ? ne.Vertical : ne.Horizontal, onPointerDown: ge, onPointerMove: ye, onPointerUp: Ne })] });
1472
+ }, [I, m, D, t, C, E, v, g, _]), [Ve, Fe] = q(null), je = k(() => {
1463
1473
  let w;
1464
- w = typeof h == "function" ? h(t, r, n) : t - h;
1474
+ w = typeof u == "function" ? u(t, r, n) : t - u;
1465
1475
  const N = Math.max(0, w);
1466
1476
  return X(N), Fe(N), N;
1467
- }, [h, t, r, n]), Ue = k(() => {
1477
+ }, [u, t, r, n]), Ue = k(() => {
1468
1478
  let w;
1469
- w = typeof h == "function" ? h(t, r, n) : t + h;
1479
+ w = typeof u == "function" ? u(t, r, n) : t + u;
1470
1480
  const N = Math.min(D, w);
1471
1481
  return X(N), Fe(N), N;
1472
- }, [h, t, D, r, n]), Te = K(null), Be = K(null), se = U(() => {
1482
+ }, [u, t, D, r, n]), Te = K(null), Be = K(null), se = U(() => {
1473
1483
  Te.current && (clearTimeout(Te.current), Te.current = null, Be.current = null);
1474
1484
  }, []), ke = U((w, N, Z, ve = d) => {
1475
1485
  Be.current = w, Te.current = setTimeout(() => {
1476
1486
  const Pe = Z ? je() : Ue();
1477
- Pe !== Be.current ? ke(Pe, !1, Z, f) : se();
1487
+ Pe !== Be.current ? ke(Pe, !1, Z, p) : se();
1478
1488
  }, N ? 0 : ve);
1479
1489
  }, [je, Ue, se]);
1480
1490
  W(() => () => se(), [se]);
1481
1491
  const Xe = R(() => {
1482
1492
  if (!O) return null;
1483
- const w = { orientation: u, disabled: t <= 0, onMouseUp: se, onMouseLeave: se, onMouseDown: () => ke(t, !0, !0) };
1493
+ const w = { orientation: h, disabled: t <= 0, onMouseUp: se, onMouseLeave: se, onMouseDown: () => ke(t, !0, !0) };
1484
1494
  return x?.(w);
1485
- }, [O, u, t, Ve]), Ye = R(() => {
1495
+ }, [O, h, t, Ve]), Ye = R(() => {
1486
1496
  if (!O) return null;
1487
- const w = { orientation: u, disabled: t >= D, onMouseUp: se, onMouseLeave: se, onMouseDown: () => ke(t, !0, !1) };
1488
- return L?.(w);
1489
- }, [O, u, t, D, Ve]), Oe = C ? "vertical" : "horizontal";
1490
- return fe("div", { ref: Ae([Le, e]), className: G(a, Se.scrollbar, Oe, { dragging: F, "has-touch-thumb": S }), style: i, ...B, children: [Xe, P("div", { ref: E, role: "scrollbar", "aria-orientation": Oe, "aria-valuemin": 0, "aria-valuemax": D, "aria-valuenow": t, tabIndex: 0, className: G(Se.track, "track", Oe), onMouseDown: v, onPointerDown: Re, onKeyDown: He, children: ut }), Ye] });
1497
+ const w = { orientation: h, disabled: t >= D, onMouseUp: se, onMouseLeave: se, onMouseDown: () => ke(t, !0, !1) };
1498
+ return S?.(w);
1499
+ }, [O, h, t, D, Ve]), Oe = C ? "vertical" : "horizontal";
1500
+ return fe("div", { ref: Ae([Me, e]), className: G(c, Se.scrollbar, Oe, { dragging: F, "has-touch-thumb": E }), style: i, ...B, children: [Xe, P("div", { ref: L, role: "scrollbar", "aria-orientation": Oe, "aria-valuemin": 0, "aria-valuemax": D, "aria-valuenow": t, tabIndex: 0, className: G(Se.track, "track", Oe), onMouseDown: v, onPointerDown: Re, onKeyDown: He, children: ut }), Ye] });
1491
1501
  }));
1492
1502
  let jt = Date.now, Ut = 1e3, pe = {}, bo = 1;
1493
1503
  const $e = (o) => {
1494
1504
  let e = pe[o] !== null;
1495
1505
  return e && (pe[o] = null), e;
1496
1506
  }, Xt = (o, e, t, n = 0, r) => {
1497
- let i = jt(), a = i, u = 0, l = 0, s = 0, c = bo++;
1498
- if (c % 20 == 0) {
1507
+ let i = jt(), c = i, h = 0, s = 0, l = 0, a = bo++;
1508
+ if (a % 20 == 0) {
1499
1509
  const d = {};
1500
- for (let f in pe) d[f] = !0;
1510
+ for (let p in pe) d[p] = !0;
1501
1511
  pe = d;
1502
1512
  }
1503
- const h = function(d) {
1504
- let f = d !== !0, m = jt(), p = !0;
1513
+ const u = function(d) {
1514
+ let p = d !== !0, m = jt(), f = !0;
1505
1515
  try {
1506
- p = (!e || e(c)) ?? !0;
1516
+ f = (!e || e(a)) ?? !0;
1507
1517
  } catch {
1508
- p = !1;
1518
+ f = !1;
1509
1519
  }
1510
- if (!pe[c] || !p) return pe[c] = null, void t?.(60 - l / ((m - i) / Ut), c, !1);
1511
- if (f) {
1512
- s = Math.round((m - a) / 16.666666666666668) - 1;
1513
- for (let y = 0; y < Math.min(s, 4); y++) h(!0), l++;
1520
+ if (!pe[a] || !f) return pe[a] = null, void t?.(60 - s / ((m - i) / Ut), a, !1);
1521
+ if (p) {
1522
+ l = Math.round((m - c) / 16.666666666666668) - 1;
1523
+ for (let g = 0; g < Math.min(l, 4); g++) u(!0), s++;
1514
1524
  }
1515
- n && (u = (m - i) / n, u > 1 && (u = 1));
1516
- let x = r ? r(u) : u, L = !1;
1525
+ n && (h = (m - i) / n, h > 1 && (h = 1));
1526
+ let x = r ? r(h) : h, S = !1;
1517
1527
  try {
1518
- L = o(x, m, f);
1528
+ S = o(x, m, p);
1519
1529
  } catch {
1520
- L = !1;
1530
+ S = !1;
1521
1531
  }
1522
- L !== !1 && u !== 1 || !f ? f && (a = m, requestAnimationFrame(h)) : (pe[c] = null, t?.(60 - l / ((m - i) / Ut), c, u === 1 || n == null));
1532
+ S !== !1 && h !== 1 || !p ? p && (c = m, requestAnimationFrame(u)) : (pe[a] = null, t?.(60 - s / ((m - i) / Ut), a, h === 1 || n == null));
1523
1533
  };
1524
- return pe[c] = !0, requestAnimationFrame(h), c;
1534
+ return pe[a] = !0, requestAnimationFrame(u), a;
1525
1535
  }, wo = function(o) {
1526
1536
  return Math.pow(o - 1, 3) + 1;
1527
1537
  }, xo = function(o) {
@@ -1553,11 +1563,11 @@ class So {
1553
1563
  zoomTo(e, t = !1, n, r, i) {
1554
1564
  if (!this.options.zooming) throw new Error("Zooming is not enabled!");
1555
1565
  i && (this.__zoomComplete = i), this.__isDecelerating && ($e(this.__isDecelerating), this.__isDecelerating = 0);
1556
- const a = this.__zoomLevel;
1566
+ const c = this.__zoomLevel;
1557
1567
  n === void 0 && (n = this.__clientWidth / 2), r === void 0 && (r = this.__clientHeight / 2), e = Math.max(Math.min(e, this.options.maxZoom), this.options.minZoom), this.__computeScrollMax(e);
1558
- const u = e / a;
1559
- let l = u * (this.__scrollLeft + n) - n, s = u * (this.__scrollTop + r) - r;
1560
- l > this.__maxScrollLeft ? l = this.__maxScrollLeft : l < 0 && (l = 0), s > this.__maxScrollTop ? s = this.__maxScrollTop : s < 0 && (s = 0), this.__publish(l, s, e, t);
1568
+ const h = e / c;
1569
+ let s = h * (this.__scrollLeft + n) - n, l = h * (this.__scrollTop + r) - r;
1570
+ s > this.__maxScrollLeft ? s = this.__maxScrollLeft : s < 0 && (s = 0), l > this.__maxScrollTop ? l = this.__maxScrollTop : l < 0 && (l = 0), this.__publish(s, l, e, t);
1561
1571
  }
1562
1572
  zoomBy(e, t = !1, n = 0, r = 0, i) {
1563
1573
  this.zoomTo(this.__zoomLevel * e, t, n, r, i);
@@ -1591,30 +1601,30 @@ class So {
1591
1601
  if (!this.__isTracking) return;
1592
1602
  let r, i;
1593
1603
  e.length === 2 ? (r = Math.abs(e[0].pageX + e[1].pageX) / 2, i = Math.abs(e[0].pageY + e[1].pageY) / 2) : (r = e[0].pageX, i = e[0].pageY);
1594
- let a = this.__positions;
1604
+ let c = this.__positions;
1595
1605
  if (this.__isDragging) {
1596
- let u = r - this.__lastTouchLeft, l = i - this.__lastTouchTop, s = this.__scrollLeft, c = this.__scrollTop, h = this.__zoomLevel;
1606
+ let h = r - this.__lastTouchLeft, s = i - this.__lastTouchTop, l = this.__scrollLeft, a = this.__scrollTop, u = this.__zoomLevel;
1597
1607
  if (n !== void 0 && this.options.zooming) {
1598
- let d = h;
1599
- if (h = h / this.__lastScale * n, h = Math.max(Math.min(h, this.options.maxZoom), this.options.minZoom), d !== h) {
1600
- let f = r - this.__clientLeft, m = i - this.__clientTop;
1601
- s = (f + s) * h / d - f, c = (m + c) * h / d - m, this.__computeScrollMax(h);
1608
+ let d = u;
1609
+ if (u = u / this.__lastScale * n, u = Math.max(Math.min(u, this.options.maxZoom), this.options.minZoom), d !== u) {
1610
+ let p = r - this.__clientLeft, m = i - this.__clientTop;
1611
+ l = (p + l) * u / d - p, a = (m + a) * u / d - m, this.__computeScrollMax(u);
1602
1612
  }
1603
1613
  }
1604
1614
  if (this.__enableScrollX) {
1605
- s -= u * this.options.speedMultiplier;
1615
+ l -= h * this.options.speedMultiplier;
1606
1616
  let d = this.__maxScrollLeft;
1607
- (s > d || s < 0) && (this.options.bouncing ? s += u / 2 * this.options.speedMultiplier : s = s > d ? d : 0);
1617
+ (l > d || l < 0) && (this.options.bouncing ? l += h / 2 * this.options.speedMultiplier : l = l > d ? d : 0);
1608
1618
  }
1609
1619
  if (this.__enableScrollY) {
1610
- c -= l * this.options.speedMultiplier;
1620
+ a -= s * this.options.speedMultiplier;
1611
1621
  const d = this.__maxScrollTop;
1612
- (c > d || c < 0) && (this.options.bouncing ? c += l / 2 * this.options.speedMultiplier : c = c > d ? d : 0);
1622
+ (a > d || a < 0) && (this.options.bouncing ? a += s / 2 * this.options.speedMultiplier : a = a > d ? d : 0);
1613
1623
  }
1614
- a.length > 60 && a.splice(0, 30), a.push(s, c, t), this.__publish(s, c, h);
1624
+ c.length > 60 && c.splice(0, 30), c.push(l, a, t), this.__publish(l, a, u);
1615
1625
  } else {
1616
- let u = this.options.locking ? 3 : 0, l = 5, s = Math.abs(r - this.__initialTouchLeft), c = Math.abs(i - this.__initialTouchTop);
1617
- this.__enableScrollX = this.options.scrollingX && s >= u, this.__enableScrollY = this.options.scrollingY && c >= u, a.push(this.__scrollLeft, this.__scrollTop, t), this.__isDragging = (this.__enableScrollX || this.__enableScrollY) && (s >= l || c >= l), this.__isDragging && (this.__interruptedAnimation = !1);
1626
+ let h = this.options.locking ? 3 : 0, s = 5, l = Math.abs(r - this.__initialTouchLeft), a = Math.abs(i - this.__initialTouchTop);
1627
+ this.__enableScrollX = this.options.scrollingX && l >= h, this.__enableScrollY = this.options.scrollingY && a >= h, c.push(this.__scrollLeft, this.__scrollTop, t), this.__isDragging = (this.__enableScrollX || this.__enableScrollY) && (l >= s || a >= s), this.__isDragging && (this.__interruptedAnimation = !1);
1618
1628
  }
1619
1629
  this.__lastTouchLeft = r, this.__lastTouchTop = i, this.__lastTouchMove = t, this.__lastScale = n;
1620
1630
  }
@@ -1625,10 +1635,10 @@ class So {
1625
1635
  let t = this.__positions, n = t.length - 1, r = n;
1626
1636
  for (let i = n; i > 0 && t[i] > this.__lastTouchMove - 100; i -= 3) r = i;
1627
1637
  if (r !== n) {
1628
- const i = t[n] - t[r], a = this.__scrollLeft - t[r - 2], u = this.__scrollTop - t[r - 1];
1629
- this.__decelerationVelocityX = a / i * (1e3 / 60), this.__decelerationVelocityY = u / i * (1e3 / 60);
1630
- const l = this.options.paging || this.options.snapping ? 4 : 1;
1631
- (Math.abs(this.__decelerationVelocityX) > l || Math.abs(this.__decelerationVelocityY) > l) && this.__startDeceleration(e);
1638
+ const i = t[n] - t[r], c = this.__scrollLeft - t[r - 2], h = this.__scrollTop - t[r - 1];
1639
+ this.__decelerationVelocityX = c / i * (1e3 / 60), this.__decelerationVelocityY = h / i * (1e3 / 60);
1640
+ const s = this.options.paging || this.options.snapping ? 4 : 1;
1641
+ (Math.abs(this.__decelerationVelocityX) > s || Math.abs(this.__decelerationVelocityY) > s) && this.__startDeceleration(e);
1632
1642
  } else this.options.scrollingComplete?.();
1633
1643
  } else e - this.__lastTouchMove > 100 && this.options.scrollingComplete?.();
1634
1644
  this.__isDecelerating || ((this.__interruptedAnimation || this.__isDragging) && this.options.scrollingComplete?.(), this.scrollTo(this.__scrollLeft, this.__scrollTop, !0, this.__zoomLevel)), this.__positions.length = 0;
@@ -1638,14 +1648,14 @@ class So {
1638
1648
  const i = this.__isAnimating;
1639
1649
  if (i && ($e(i), this.__isAnimating = 0), r && this.options.animating) {
1640
1650
  this.__scheduledLeft = e, this.__scheduledTop = t, this.__scheduledZoom = n;
1641
- const a = this.__scrollLeft, u = this.__scrollTop, l = this.__zoomLevel, s = e - a, c = t - u, h = n - l, d = function(p, x, L) {
1642
- L && (this.__scrollLeft = a + s * p, this.__scrollTop = u + c * p, this.__zoomLevel = l + h * p, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
1643
- }.bind(this), f = function(p) {
1644
- return this.__isAnimating === p;
1645
- }.bind(this), m = function(p, x, L) {
1646
- x === this.__isAnimating && (this.__isAnimating = !1), (this.__didDecelerationComplete || L) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
1651
+ const c = this.__scrollLeft, h = this.__scrollTop, s = this.__zoomLevel, l = e - c, a = t - h, u = n - s, d = function(f, x, S) {
1652
+ S && (this.__scrollLeft = c + l * f, this.__scrollTop = h + a * f, this.__zoomLevel = s + u * f, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
1653
+ }.bind(this), p = function(f) {
1654
+ return this.__isAnimating === f;
1655
+ }.bind(this), m = function(f, x, S) {
1656
+ x === this.__isAnimating && (this.__isAnimating = !1), (this.__didDecelerationComplete || S) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
1647
1657
  }.bind(this);
1648
- this.__isAnimating = Xt(d, f, m, this.options.animationDuration, i ? wo : xo);
1658
+ this.__isAnimating = Xt(d, p, m, this.options.animationDuration, i ? wo : xo);
1649
1659
  } 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));
1650
1660
  }
1651
1661
  __computeScrollMax(e = this.__zoomLevel) {
@@ -1653,15 +1663,15 @@ class So {
1653
1663
  }
1654
1664
  __startDeceleration(e) {
1655
1665
  if (this.options.paging) {
1656
- const a = Math.max(Math.min(this.__scrollLeft, this.__maxScrollLeft), 0), u = Math.max(Math.min(this.__scrollTop, this.__maxScrollTop), 0), l = this.__clientWidth, s = this.__clientHeight;
1657
- this.__minDecelerationScrollLeft = Math.floor(a / l) * l, this.__minDecelerationScrollTop = Math.floor(u / s) * s, this.__maxDecelerationScrollLeft = Math.ceil(a / l) * l, this.__maxDecelerationScrollTop = Math.ceil(u / s) * s;
1666
+ const c = Math.max(Math.min(this.__scrollLeft, this.__maxScrollLeft), 0), h = Math.max(Math.min(this.__scrollTop, this.__maxScrollTop), 0), s = this.__clientWidth, l = this.__clientHeight;
1667
+ this.__minDecelerationScrollLeft = Math.floor(c / s) * s, this.__minDecelerationScrollTop = Math.floor(h / l) * l, this.__maxDecelerationScrollLeft = Math.ceil(c / s) * s, this.__maxDecelerationScrollTop = Math.ceil(h / l) * l;
1658
1668
  } else this.__minDecelerationScrollLeft = 0, this.__minDecelerationScrollTop = 0, this.__maxDecelerationScrollLeft = this.__maxScrollLeft, this.__maxDecelerationScrollTop = this.__maxScrollTop;
1659
- const t = function(a, u, l) {
1660
- this.__stepThroughDeceleration(l);
1669
+ const t = function(c, h, s) {
1670
+ this.__stepThroughDeceleration(s);
1661
1671
  }.bind(this), n = this.options.snapping ? 4 : 0.1, r = function() {
1662
- const a = Math.abs(this.__decelerationVelocityX) >= n || Math.abs(this.__decelerationVelocityY) >= n;
1663
- return a || (this.__didDecelerationComplete = !0), a;
1664
- }.bind(this), i = function(a, u, l) {
1672
+ const c = Math.abs(this.__decelerationVelocityX) >= n || Math.abs(this.__decelerationVelocityY) >= n;
1673
+ return c || (this.__didDecelerationComplete = !0), c;
1674
+ }.bind(this), i = function(c, h, s) {
1665
1675
  this.__isDecelerating = 0, this.__didDecelerationComplete && this.options.scrollingComplete?.(), this.scrollTo(this.__scrollLeft, this.__scrollTop, this.options.snapping);
1666
1676
  }.bind(this);
1667
1677
  this.__isDecelerating = Xt(t, r, i);
@@ -1675,84 +1685,84 @@ class So {
1675
1685
  i !== n && (n = i, this.__decelerationVelocityY = 0);
1676
1686
  }
1677
1687
  if (e ? this.__publish(t, n, this.__zoomLevel) : (this.__scrollLeft = t, this.__scrollTop = n), !this.options.paging && (this.__decelerationVelocityX *= 0.95, this.__decelerationVelocityY *= 0.95), this.options.bouncing) {
1678
- let r = 0, i = 0, a = this.options.penetrationDeceleration, u = this.options.penetrationAcceleration;
1679
- t < this.__minDecelerationScrollLeft ? r = this.__minDecelerationScrollLeft - t : t > this.__maxDecelerationScrollLeft && (r = this.__maxDecelerationScrollLeft - t), n < this.__minDecelerationScrollTop ? i = this.__minDecelerationScrollTop - n : n > this.__maxDecelerationScrollTop && (i = this.__maxDecelerationScrollTop - n), r !== 0 && (r * this.__decelerationVelocityX <= 0 ? this.__decelerationVelocityX += r * a : this.__decelerationVelocityX = r * u), i !== 0 && (i * this.__decelerationVelocityY <= 0 ? this.__decelerationVelocityY += i * a : this.__decelerationVelocityY = i * u);
1688
+ let r = 0, i = 0, c = this.options.penetrationDeceleration, h = this.options.penetrationAcceleration;
1689
+ t < this.__minDecelerationScrollLeft ? r = this.__minDecelerationScrollLeft - t : t > this.__maxDecelerationScrollLeft && (r = this.__maxDecelerationScrollLeft - t), n < this.__minDecelerationScrollTop ? i = this.__minDecelerationScrollTop - n : n > this.__maxDecelerationScrollTop && (i = this.__maxDecelerationScrollTop - n), r !== 0 && (r * this.__decelerationVelocityX <= 0 ? this.__decelerationVelocityX += r * c : this.__decelerationVelocityX = r * h), i !== 0 && (i * this.__decelerationVelocityY <= 0 ? this.__decelerationVelocityY += i * c : this.__decelerationVelocityY = i * h);
1680
1690
  }
1681
1691
  }
1682
1692
  }
1683
1693
  const st = (o) => P(vo, { ...o }), hr = Object.freeze(Object.defineProperty({ __proto__: null, defaultRenderScrollbar: st, getScrollTo: (o, e, t, n, r = 0) => {
1684
1694
  for (let i = 0; i < t.length; i++) {
1685
- const a = t[i].getBoundingClientRect();
1686
- let u = a.left - e, l = u + a.width;
1695
+ const c = t[i].getBoundingClientRect();
1696
+ let h = c.left - e, s = h + c.width;
1687
1697
  if (n) {
1688
- if (u < o && l >= o) return u;
1689
- } else if (Math.ceil(l) > Math.ceil(o) + 2) return l;
1698
+ if (h < o && s >= o) return h;
1699
+ } else if (Math.ceil(s) > Math.ceil(o) + 2) return s;
1690
1700
  }
1691
1701
  return r;
1692
1702
  } }, Symbol.toStringTag, { value: "Module" })), de = { scrollpane: "_scrollpane_1fbi8_2", "vertical-container": "_vertical-container_1fbi8_7", "horizontal-corner-container": "_horizontal-corner-container_1fbi8_12", "scrollbar-sizer": "_scrollbar-sizer_1fbi8_26", "scrollpane-content": "_scrollpane-content_1fbi8_34", "scrollpane-content-element": "_scrollpane-content-element_1fbi8_43" }, Eo = (o) => {
1693
1703
  const e = o?.width, t = o?.height;
1694
1704
  return P("div", { className: "corner", style: { minWidth: `${e}px`, width: `${e}px`, minHeight: `${t}px`, height: `${t}px` } });
1695
- }, Mo = _e(Me((o, e) => {
1696
- const { children: t, viewport: n, onScrollViewport: r, showHorizontalScrollbar: i = !0, showVerticalScrollbar: a = !0, createScrollCorner: u = Eo, renderScrollbarHorizontal: l = st, renderScrollbarVertical: s = st, style: c, className: h, touchElement: d, disableTouch: f, ...m } = o, p = i && l, x = a && s, L = k(r, [r]), y = Tt(e, () => ({ isScrollPane: () => !0 }), []), _ = K(null);
1705
+ }, Lo = _e(Le((o, e) => {
1706
+ const { children: t, viewport: n, onScrollViewport: r, showHorizontalScrollbar: i = !0, showVerticalScrollbar: c = !0, createScrollCorner: h = Eo, renderScrollbarHorizontal: s = st, renderScrollbarVertical: l = st, style: a, className: u, touchElement: d, disableTouch: p, ...m } = o, f = i && s, x = c && l, S = k(r, [r]), g = Tt(e, () => ({ isScrollPane: () => !0 }), []), _ = K(null);
1697
1707
  W(() => {
1698
1708
  _.current && (_.current.__scrollTop === n?.top && _.current.__scrollLeft === n?.left || _.current.__isDecelerating || _.current?.scrollTo(n?.left, n?.top, !1));
1699
1709
  }, [n?.left, n?.top, d]);
1700
- const v = U((g, z) => {
1701
- L?.({ left: g, top: z });
1702
- }, []), B = U((g) => {
1703
- _.current?.doTouchStart(g.touches, g.timeStamp);
1704
- }, []), S = U((g) => {
1705
- g.preventDefault(), _.current?.doTouchMove(g.touches, g.timeStamp);
1706
- }, []), O = U((g) => {
1707
- _.current?.doTouchEnd(g.timeStamp);
1708
- }, []), I = U(({ containerWidth: g, containerHeight: z, totalWidth: H, totalHeight: X }) => {
1709
- _.current.setDimensions(g, z, H, X);
1710
+ const v = U((y, z) => {
1711
+ S?.({ left: y, top: z });
1712
+ }, []), B = U((y) => {
1713
+ _.current?.doTouchStart(y.touches, y.timeStamp);
1714
+ }, []), E = U((y) => {
1715
+ y.preventDefault(), _.current?.doTouchMove(y.touches, y.timeStamp);
1716
+ }, []), O = U((y) => {
1717
+ _.current?.doTouchEnd(y.timeStamp);
1718
+ }, []), I = U(({ containerWidth: y, containerHeight: z, totalWidth: H, totalHeight: X }) => {
1719
+ _.current.setDimensions(y, z, H, X);
1710
1720
  }, []);
1711
1721
  W(() => {
1712
- const g = d ?? y.current;
1713
- if (!f && Ke().supportsTouchEvents && g && n) {
1722
+ const y = d ?? g.current;
1723
+ if (!p && Ke().supportsTouchEvents && y && n) {
1714
1724
  if (!_.current) {
1715
1725
  const z = { scrollingX: !0, scrollingY: !0, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
1716
1726
  _.current = new So(v, z);
1717
1727
  }
1718
- Ke().supportsTouchEvents && (g.addEventListener("touchstart", B), g.addEventListener("touchend", O), g.addEventListener("touchmove", S)), I({ containerWidth: n?.width, containerHeight: n?.height, totalWidth: n?.totalWidth, totalHeight: n?.totalHeight });
1728
+ Ke().supportsTouchEvents && (y.addEventListener("touchstart", B), y.addEventListener("touchend", O), y.addEventListener("touchmove", E)), I({ containerWidth: n?.width, containerHeight: n?.height, totalWidth: n?.totalWidth, totalHeight: n?.totalHeight });
1719
1729
  }
1720
1730
  return () => {
1721
- g?.removeEventListener("touchstart", B), g?.removeEventListener("touchend", O), g?.removeEventListener("touchmove", S);
1731
+ y?.removeEventListener("touchstart", B), y?.removeEventListener("touchend", O), y?.removeEventListener("touchmove", E);
1722
1732
  };
1723
- }, [n?.width, n?.height, n?.totalWidth, n?.totalHeight, f, d]);
1724
- const [M, { width: b }] = Ee(), [C, { height: E }] = Ee(), $ = R(() => {
1733
+ }, [n?.width, n?.height, n?.totalWidth, n?.totalHeight, p, d]);
1734
+ const [M, { width: b }] = Ee(), [C, { height: L }] = Ee(), $ = R(() => {
1725
1735
  if (!x) return null;
1726
- const g = s({ orientation: ne.Vertical, offset: n?.top, viewportSize: n?.height, totalSize: n?.totalHeight, onScrollOffset: (z) => {
1727
- L?.({ top: z });
1736
+ const y = l({ orientation: ne.Vertical, offset: n?.top, viewportSize: n?.height, totalSize: n?.totalHeight, onScrollOffset: (z) => {
1737
+ S?.({ top: z });
1728
1738
  } });
1729
- return P("div", { className: G("vertical-container", de["vertical-container"]), ref: M, children: g });
1730
- }, [s, n?.top, n?.height, n?.totalHeight]), T = R(() => {
1731
- if (!p) return null;
1732
- const g = l({ orientation: ne.Horizontal, offset: n?.left, viewportSize: n?.width, totalSize: n?.totalWidth, onScrollOffset: (z) => {
1733
- L?.({ left: z });
1739
+ return P("div", { className: G("vertical-container", de["vertical-container"]), ref: M, children: y });
1740
+ }, [l, n?.top, n?.height, n?.totalHeight]), T = R(() => {
1741
+ if (!f) return null;
1742
+ const y = s({ orientation: ne.Horizontal, offset: n?.left, viewportSize: n?.width, totalSize: n?.totalWidth, onScrollOffset: (z) => {
1743
+ S?.({ left: z });
1734
1744
  } });
1735
- return fe("div", { className: G("horizontal-corner-container", de["horizontal-corner-container"]), children: [P("div", { className: G("horizontal-sizer", de["horizontal-sizer"]), style: { width: `calc(100% - ${b}px)` }, children: P("div", { ref: C, className: G("scrollbar-sizer", de["scrollbar-sizer"]), children: g }) }), x ? u({ width: b, height: E }) : P(me, {})] });
1736
- }, [l, n?.left, n?.width, n?.totalWidth, x, u, b, E]);
1737
- return P("div", { className: G(h, "scrollpane", de.scrollpane), style: { minWidth: x ? `${b}px` : void 0, minHeight: p ? `${E}px` : void 0, ...c }, ...m, ref: y, children: fe("div", { className: G("scrollpane-content", de["scrollpane-content"]), children: [fe("div", { className: G("scrollpane-content-element", de["scrollpane-content-element"]), children: [P("div", { className: G("scrollpane-content-element", de["scrollpane-content-element"]), children: t }), x ? $ : P(me, {})] }), p ? T : P(me, {})] }) });
1745
+ return fe("div", { className: G("horizontal-corner-container", de["horizontal-corner-container"]), children: [P("div", { className: G("horizontal-sizer", de["horizontal-sizer"]), style: { width: `calc(100% - ${b}px)` }, children: P("div", { ref: C, className: G("scrollbar-sizer", de["scrollbar-sizer"]), children: y }) }), x ? h({ width: b, height: L }) : P(me, {})] });
1746
+ }, [s, n?.left, n?.width, n?.totalWidth, x, h, b, L]);
1747
+ return P("div", { className: G(u, "scrollpane", de.scrollpane), style: { minWidth: x ? `${b}px` : void 0, minHeight: f ? `${L}px` : void 0, ...a }, ...m, ref: g, children: fe("div", { className: G("scrollpane-content", de["scrollpane-content"]), children: [fe("div", { className: G("scrollpane-content-element", de["scrollpane-content-element"]), children: [P("div", { className: G("scrollpane-content-element", de["scrollpane-content-element"]), children: t }), x ? $ : P(me, {})] }), f ? T : P(me, {})] }) });
1738
1748
  }));
1739
- Mo.displayName = "ScrollPane";
1740
- const Lo = 300, Co = 100, To = 1e6, ko = 100, Po = 50, Do = _e(Me((o, e) => {
1741
- const { offset: t = 0, viewportSize: n = 0, totalSize: r = 0, minSize: i = 0, endGap: a = Lo, endScrollIncrement: u = Co, style: l = tn, onMouseDown: s, onScrollOffset: c, onScroll: h, scaleLimit: d = To, scaleFactor: f = ko, precisionFactor: m = Po, renderScrollbar: p = st, ...x } = o;
1742
- h && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
1743
- const L = k(s, [s]), [y, _] = q(!1), v = R(() => {
1744
- const M = d === 0 ? r : Math.min(r ?? 0, Math.max(i ?? 0, (t ?? 0) + (n ?? 0)) + (a ?? 0)), b = d !== 0 && M > d ? f : 1, C = b / m, E = Math.ceil(M / b);
1745
- return { offset: Math.ceil(t / b), totalSize: E, viewportSize: Math.ceil(n / b), scaledOffset: t, scaledTotalSize: r, scaledViewportSize: n, factor: b, precision: C };
1746
- }, [t, r, n, y, i, a, u]), B = k((M, b, C) => {
1747
- const E = v.offset;
1748
- Math.abs(M - E) < v.precision && (M = E), c?.(M * v.factor, E, v.viewportSize);
1749
- }, [c, v]), S = U((M) => {
1749
+ Lo.displayName = "ScrollPane";
1750
+ const Mo = 300, Co = 100, To = 1e6, ko = 100, Po = 50, Do = _e(Le((o, e) => {
1751
+ const { offset: t = 0, viewportSize: n = 0, totalSize: r = 0, minSize: i = 0, endGap: c = Mo, endScrollIncrement: h = Co, style: s = tn, onMouseDown: l, onScrollOffset: a, onScroll: u, scaleLimit: d = To, scaleFactor: p = ko, precisionFactor: m = Po, renderScrollbar: f = st, ...x } = o;
1752
+ u && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
1753
+ const S = k(l, [l]), [g, _] = q(!1), v = R(() => {
1754
+ const M = d === 0 ? r : Math.min(r ?? 0, Math.max(i ?? 0, (t ?? 0) + (n ?? 0)) + (c ?? 0)), b = d !== 0 && M > d ? p : 1, C = b / m, L = Math.ceil(M / b);
1755
+ return { offset: Math.ceil(t / b), totalSize: L, viewportSize: Math.ceil(n / b), scaledOffset: t, scaledTotalSize: r, scaledViewportSize: n, factor: b, precision: C };
1756
+ }, [t, r, n, g, i, c, h]), B = k((M, b, C) => {
1757
+ const L = v.offset;
1758
+ Math.abs(M - L) < v.precision && (M = L), a?.(M * v.factor, L, v.viewportSize);
1759
+ }, [a, v]), E = U((M) => {
1750
1760
  }, []), O = U((M) => {
1751
- document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", O), _(!1);
1761
+ document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", O), _(!1);
1752
1762
  }, []), I = U((M) => {
1753
- _(!0), L?.(M), document.addEventListener("mousemove", S, { passive: !0 }), document.addEventListener("mouseup", O, { passive: !0 });
1754
- }, [S, O]);
1755
- return p({ style: l, ...x, offset: v.offset, totalSize: v.totalSize, viewportSize: v.viewportSize, onMouseDown: I, onScrollOffset: B, ref: e });
1763
+ _(!0), S?.(M), document.addEventListener("mousemove", E, { passive: !0 }), document.addEventListener("mouseup", O, { passive: !0 });
1764
+ }, [E, O]);
1765
+ return f({ style: s, ...x, offset: v.offset, totalSize: v.totalSize, viewportSize: v.viewportSize, onMouseDown: I, onScrollOffset: B, ref: e });
1756
1766
  }));
1757
1767
  Do.displayName = "VirtualScrollbar";
1758
1768
  export {
@@ -1765,7 +1775,7 @@ export {
1765
1775
  ir as ErrorTestPanel,
1766
1776
  jo as FocusKeyNavigation,
1767
1777
  $o as HorizontalAlignment,
1768
- Mt as InMemoryStore,
1778
+ Lt as InMemoryStore,
1769
1779
  Ko as KeyCodes,
1770
1780
  Q as KeyModifiers,
1771
1781
  cr as LocalStorageStore,
@@ -1774,9 +1784,9 @@ export {
1774
1784
  Ot as NotifierType,
1775
1785
  ar as PersistenceStateProvider,
1776
1786
  or as ReactErrorBoundary,
1777
- Ro as ReactUtils,
1787
+ Ho as ReactUtils,
1778
1788
  Uo as RoundedTab,
1779
- Mo as ScrollPane,
1789
+ Lo as ScrollPane,
1780
1790
  hr as ScrollUtils,
1781
1791
  vo as Scrollbar,
1782
1792
  ne as ScrollbarOrientation,
@@ -1796,7 +1806,7 @@ export {
1796
1806
  Ie as toShortcutString,
1797
1807
  Vn as useAnimatedMeasure,
1798
1808
  k as useCallbackRef,
1799
- Ho as useCommand,
1809
+ Ro as useCommand,
1800
1810
  Wo as useCommands,
1801
1811
  Qo as useCopyPaste,
1802
1812
  Yo as useDevicePixelRatio,