etudes 22.3.0 → 23.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/etudes.js CHANGED
@@ -7,7 +7,7 @@ var xo;
7
7
  function Xs() {
8
8
  if (xo) return St;
9
9
  xo = 1;
10
- var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
10
+ var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.fragment");
11
11
  function i(a, c, u) {
12
12
  var d = null;
13
13
  if (u !== void 0 && (d = "" + u), c.key !== void 0 && (d = "" + c.key), "key" in c) {
@@ -39,13 +39,13 @@ function Us() {
39
39
  return "Fragment";
40
40
  case W:
41
41
  return "Profiler";
42
- case q:
42
+ case K:
43
43
  return "StrictMode";
44
44
  case P:
45
45
  return "Suspense";
46
46
  case E:
47
47
  return "SuspenseList";
48
- case K:
48
+ case G:
49
49
  return "Activity";
50
50
  }
51
51
  if (typeof k == "object")
@@ -83,11 +83,11 @@ function Us() {
83
83
  }
84
84
  if (U) {
85
85
  U = console;
86
- var Z = U.error, G = typeof Symbol == "function" && Symbol.toStringTag && k[Symbol.toStringTag] || k.constructor.name || "Object";
86
+ var Z = U.error, q = typeof Symbol == "function" && Symbol.toStringTag && k[Symbol.toStringTag] || k.constructor.name || "Object";
87
87
  return Z.call(
88
88
  U,
89
89
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
90
- G
90
+ q
91
91
  ), r(k);
92
92
  }
93
93
  }
@@ -134,14 +134,14 @@ function Us() {
134
134
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
135
135
  )), k = this.props.ref, k !== void 0 ? k : null;
136
136
  }
137
- function b(k, U, Z, G, fe, ge) {
137
+ function b(k, U, Z, q, fe, ge) {
138
138
  var ue = Z.ref;
139
139
  return k = {
140
140
  $$typeof: A,
141
141
  type: k,
142
142
  key: U,
143
143
  props: Z,
144
- _owner: G
144
+ _owner: q
145
145
  }, (ue !== void 0 ? ue : null) !== null ? Object.defineProperty(k, "ref", {
146
146
  enumerable: !1,
147
147
  get: m
@@ -167,13 +167,13 @@ function Us() {
167
167
  value: ge
168
168
  }), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
169
169
  }
170
- function T(k, U, Z, G, fe, ge) {
170
+ function T(k, U, Z, q, fe, ge) {
171
171
  var ue = U.children;
172
172
  if (ue !== void 0)
173
- if (G)
173
+ if (q)
174
174
  if (D(ue)) {
175
- for (G = 0; G < ue.length; G++)
176
- _(ue[G]);
175
+ for (q = 0; q < ue.length; q++)
176
+ _(ue[q]);
177
177
  Object.freeze && Object.freeze(ue);
178
178
  } else
179
179
  console.error(
@@ -185,18 +185,18 @@ function Us() {
185
185
  var Ne = Object.keys(U).filter(function(Be) {
186
186
  return Be !== "key";
187
187
  });
188
- G = 0 < Ne.length ? "{key: someKey, " + Ne.join(": ..., ") + ": ...}" : "{key: someKey}", R[ue + G] || (Ne = 0 < Ne.length ? "{" + Ne.join(": ..., ") + ": ...}" : "{}", console.error(
188
+ q = 0 < Ne.length ? "{key: someKey, " + Ne.join(": ..., ") + ": ...}" : "{key: someKey}", R[ue + q] || (Ne = 0 < Ne.length ? "{" + Ne.join(": ..., ") + ": ...}" : "{}", console.error(
189
189
  `A props object containing a "key" prop is being spread into JSX:
190
190
  let props = %s;
191
191
  <%s {...props} />
192
192
  React keys must be passed directly to JSX without using spread:
193
193
  let props = %s;
194
194
  <%s key={someKey} {...props} />`,
195
- G,
195
+ q,
196
196
  ue,
197
197
  Ne,
198
198
  ue
199
- ), R[ue + G] = !0);
199
+ ), R[ue + q] = !0);
200
200
  }
201
201
  if (ue = null, Z !== void 0 && (i(Z), ue = "" + Z), d(U) && (i(U.key), ue = "" + U.key), "key" in U) {
202
202
  Z = {};
@@ -221,7 +221,7 @@ React keys must be passed directly to JSX without using spread:
221
221
  function I(k) {
222
222
  return typeof k == "object" && k !== null && k.$$typeof === A;
223
223
  }
224
- var $ = Bs, A = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), Y = Symbol.for("react.consumer"), J = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), K = Symbol.for("react.activity"), oe = Symbol.for("react.client.reference"), Q = $.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, D = Array.isArray, z = console.createTask ? console.createTask : function() {
224
+ var $ = Bs, A = /* @__PURE__ */ Symbol.for("react.transitional.element"), S = /* @__PURE__ */ Symbol.for("react.portal"), C = /* @__PURE__ */ Symbol.for("react.fragment"), K = /* @__PURE__ */ Symbol.for("react.strict_mode"), W = /* @__PURE__ */ Symbol.for("react.profiler"), Y = /* @__PURE__ */ Symbol.for("react.consumer"), J = /* @__PURE__ */ Symbol.for("react.context"), x = /* @__PURE__ */ Symbol.for("react.forward_ref"), P = /* @__PURE__ */ Symbol.for("react.suspense"), E = /* @__PURE__ */ Symbol.for("react.suspense_list"), M = /* @__PURE__ */ Symbol.for("react.memo"), B = /* @__PURE__ */ Symbol.for("react.lazy"), G = /* @__PURE__ */ Symbol.for("react.activity"), oe = /* @__PURE__ */ Symbol.for("react.client.reference"), Q = $.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, D = Array.isArray, z = console.createTask ? console.createTask : function() {
225
225
  return null;
226
226
  };
227
227
  $ = {
@@ -234,24 +234,24 @@ React keys must be passed directly to JSX without using spread:
234
234
  u
235
235
  )(), F = z(a(u)), R = {};
236
236
  _t.Fragment = C, _t.jsx = function(k, U, Z) {
237
- var G = 1e4 > Q.recentlyCreatedOwnerStacks++;
237
+ var q = 1e4 > Q.recentlyCreatedOwnerStacks++;
238
238
  return T(
239
239
  k,
240
240
  U,
241
241
  Z,
242
242
  !1,
243
- G ? Error("react-stack-top-frame") : ae,
244
- G ? z(a(k)) : F
243
+ q ? Error("react-stack-top-frame") : ae,
244
+ q ? z(a(k)) : F
245
245
  );
246
246
  }, _t.jsxs = function(k, U, Z) {
247
- var G = 1e4 > Q.recentlyCreatedOwnerStacks++;
247
+ var q = 1e4 > Q.recentlyCreatedOwnerStacks++;
248
248
  return T(
249
249
  k,
250
250
  U,
251
251
  Z,
252
252
  !0,
253
- G ? Error("react-stack-top-frame") : ae,
254
- G ? z(a(k)) : F
253
+ q ? Error("react-stack-top-frame") : ae,
254
+ q ? z(a(k)) : F
255
255
  );
256
256
  };
257
257
  })()), _t;
@@ -371,15 +371,7 @@ const Yo = /* @__PURE__ */ Te(({
371
371
  "aria-hidden": !0,
372
372
  className: se(b.bar),
373
373
  element: m.bar ?? /* @__PURE__ */ w.jsx(rn, {}),
374
- style: (() => {
375
- switch (u) {
376
- case 2:
377
- return ce(T.bar, T[`bar${_}${I === 0 ? 0 : 2}`]);
378
- case 3:
379
- default:
380
- return ce(T.bar, T[`bar${_}${I}`]);
381
- }
382
- })()
374
+ style: u === 2 ? ce(T.bar, T[`bar${_}${I === 0 ? 0 : 2}`]) : ce(T.bar, T[`bar${_}${I}`])
383
375
  }
384
376
  ) }) }) })
385
377
  }
@@ -732,24 +724,24 @@ var be;
732
724
  e.zero = r();
733
725
  function r(x = 0, P = 0, E = 0, M = 0) {
734
726
  if (typeof x == "number" && typeof P == "number") {
735
- const B = x, K = P;
727
+ const B = x, G = P;
736
728
  return {
737
- top: K,
729
+ top: G,
738
730
  right: B + E,
739
- bottom: K + M,
731
+ bottom: G + M,
740
732
  left: B,
741
733
  width: E,
742
734
  height: M
743
735
  };
744
736
  } else if (_e.isPoint(x) && je.isSize(P)) {
745
- const B = x, K = P;
737
+ const B = x, G = P;
746
738
  return {
747
739
  top: B.y,
748
- right: B.x + K.width,
749
- bottom: B.y + K.height,
740
+ right: B.x + G.width,
741
+ bottom: B.y + G.height,
750
742
  left: B.x,
751
- width: K.width,
752
- height: K.height
743
+ width: G.width,
744
+ height: G.height
753
745
  };
754
746
  } else {
755
747
  const B = x;
@@ -784,13 +776,13 @@ var be;
784
776
  if (x == null) return;
785
777
  if (Y(x)) return x;
786
778
  if (Tt(x)) return c(document.documentElement || document.body.parentNode || document.body, P);
787
- const E = x instanceof Array ? x : [x], M = E.length, B = P.reference || window, K = u(), oe = Tt(B) ? K : c(P.reference);
788
- if (!K || !oe) return;
779
+ const E = x instanceof Array ? x : [x], M = E.length, B = P.reference || window, G = u(), oe = Tt(B) ? G : c(P.reference);
780
+ if (!G || !oe) return;
789
781
  let Q;
790
782
  for (let X = 0; X < M; X++) {
791
783
  const D = E[X], z = D.getBoundingClientRect(), te = r({
792
- x: z.left + K.left - (Tt(B) ? 0 : oe.left),
793
- y: z.top + K.top - (Tt(B) ? 0 : oe.top),
784
+ x: z.left + G.left - (Tt(B) ? 0 : oe.left),
785
+ y: z.top + G.top - (Tt(B) ? 0 : oe.top),
794
786
  width: P.overflow ? D.scrollWidth : D instanceof HTMLElement ? D.offsetWidth : z.width,
795
787
  height: P.overflow ? D.scrollHeight : D instanceof HTMLElement ? D.offsetHeight : z.height
796
788
  });
@@ -841,11 +833,11 @@ var be;
841
833
  try {
842
834
  const P = x.length, E = {};
843
835
  let M, B;
844
- for (let K = 0; K < P; K++) {
845
- if (M || (M = c(x[K])), K === 0 && K + 1 === P)
836
+ for (let G = 0; G < P; G++) {
837
+ if (M || (M = c(x[G])), G === 0 && G + 1 === P)
846
838
  B = u();
847
- else if (K + 1 < P)
848
- B = c(x[K + 1]);
839
+ else if (G + 1 < P)
840
+ B = c(x[G + 1]);
849
841
  else
850
842
  break;
851
843
  !M || !B || (E.width = Math.max(0, Math.min(M.right, B.right) - Math.max(M.left, B.left)), E.height = Math.max(0, Math.min(M.bottom, B.bottom) - Math.max(M.top, B.top)), E.y = Math.max(M.top, B.top), E.x = Math.max(M.left, B.left), E.width * E.height === 0 && (E.width = 0, E.height = 0, E.y = NaN, E.x = NaN), M = r(E));
@@ -896,7 +888,7 @@ var be;
896
888
  return `Rect(top=${x.top}, right=${x.right}, bottom=${x.bottom}, left=${x.left}, width=${x.width}, height=${x.height})`;
897
889
  }
898
890
  e.toString = C;
899
- function q(x) {
891
+ function K(x) {
900
892
  return Object.freeze({
901
893
  top: x.top,
902
894
  right: x.right,
@@ -906,7 +898,7 @@ var be;
906
898
  height: x.height
907
899
  });
908
900
  }
909
- e.toJSON = q;
901
+ e.toJSON = K;
910
902
  function W(x) {
911
903
  return !(typeof x.x != "number" || typeof x.y != "number" || typeof x.width != "number" || typeof x.height != "number");
912
904
  }
@@ -1166,9 +1158,9 @@ const Jo = /* @__PURE__ */ Te(({
1166
1158
  }, _) => {
1167
1159
  const I = (P) => {
1168
1160
  C(P ? P.width / P.height : NaN);
1169
- }, $ = we(null), A = _ ?? $, [S, C] = Oe(NaN), q = isNaN(i) ? S : i, W = nt(A), Y = W.width / W.height, J = je.make(
1170
- Y > 1 ? Math.max(W.width, W.height * q) : Math.max(W.width, Math.max(W.height, W.width / q) * q),
1171
- Y > 1 ? Math.max(W.height, Math.max(W.width, W.height * q) / q) : Math.max(W.height, W.width / q)
1161
+ }, $ = we(null), A = _ ?? $, [S, C] = Oe(NaN), K = isNaN(i) ? S : i, W = nt(A), Y = W.width / W.height, J = je.make(
1162
+ Y > 1 ? Math.max(W.width, W.height * K) : Math.max(W.width, Math.max(W.height, W.width / K) * K),
1163
+ Y > 1 ? Math.max(W.height, Math.max(W.width, W.height * K) / K) : Math.max(W.height, W.width / K)
1172
1164
  ), x = ze(e, {
1173
1165
  content: vr,
1174
1166
  viewport: yr
@@ -1289,7 +1281,7 @@ const Zo = /* @__PURE__ */ Te(({
1289
1281
  onPause: A,
1290
1282
  onPlay: S,
1291
1283
  onSizeChange: C,
1292
- onTimeUpdate: q,
1284
+ onTimeUpdate: K,
1293
1285
  ...W
1294
1286
  }, Y) => {
1295
1287
  const J = we(null), x = Y ?? J, P = ra(d, {
@@ -1321,13 +1313,13 @@ const Zo = /* @__PURE__ */ Te(({
1321
1313
  r && te.paused && X(), m?.();
1322
1314
  }, B = (z) => {
1323
1315
  S?.();
1324
- }, K = (z) => {
1316
+ }, G = (z) => {
1325
1317
  A?.();
1326
1318
  }, oe = (z) => {
1327
1319
  b?.();
1328
1320
  }, Q = (z) => {
1329
1321
  const te = z.currentTarget;
1330
- q?.(te.currentTime, te.duration);
1322
+ K?.(te.currentTime, te.duration);
1331
1323
  }, X = () => {
1332
1324
  x.current && x.current.play();
1333
1325
  }, D = () => {
@@ -1347,7 +1339,7 @@ const Zo = /* @__PURE__ */ Te(({
1347
1339
  style: { ...E.root, ...g },
1348
1340
  onCanPlay: M,
1349
1341
  onEnded: oe,
1350
- onPause: K,
1342
+ onPause: G,
1351
1343
  onPlay: B,
1352
1344
  onTimeUpdate: Q,
1353
1345
  children: /* @__PURE__ */ w.jsx("source", { src: d })
@@ -1380,14 +1372,14 @@ const Qo = /* @__PURE__ */ Te(({
1380
1372
  onLoadMetadata: A,
1381
1373
  onLoadMetadataComplete: S,
1382
1374
  onLoadMetadataError: C,
1383
- onPause: q,
1375
+ onPause: K,
1384
1376
  onPlay: W,
1385
1377
  onSizeChange: Y,
1386
1378
  ...J
1387
1379
  }, x) => {
1388
1380
  const P = (z) => {
1389
- K(z ? z.width / z.height : NaN), Y?.(z);
1390
- }, E = x ?? we(null), M = nt(E), [B, K] = Oe(NaN), oe = isNaN(a) ? B : a, Q = M.width / M.height, X = je.make(
1381
+ G(z ? z.width / z.height : NaN), Y?.(z);
1382
+ }, E = x ?? we(null), M = nt(E), [B, G] = Oe(NaN), oe = isNaN(a) ? B : a, Q = M.width / M.height, X = je.make(
1391
1383
  Q > 1 ? Math.max(M.width, M.height * oe) : Math.max(M.width, Math.max(M.height, M.width / oe) * oe),
1392
1384
  Q > 1 ? Math.max(M.height, Math.max(M.width, M.height * oe) / oe) : Math.max(M.height, M.width / oe)
1393
1385
  ), D = ze(r, {
@@ -1423,7 +1415,7 @@ const Qo = /* @__PURE__ */ Te(({
1423
1415
  onLoadMetadata: A,
1424
1416
  onLoadMetadataComplete: S,
1425
1417
  onLoadMetadataError: C,
1426
- onPause: q,
1418
+ onPause: K,
1427
1419
  onPlay: W,
1428
1420
  onSizeChange: (z) => P(z)
1429
1421
  }
@@ -1686,9 +1678,9 @@ function da() {
1686
1678
  }
1687
1679
  var C = function(n) {
1688
1680
  return !(!n || !n.Window) && n instanceof n.Window;
1689
- }, q = void 0, W = void 0;
1681
+ }, K = void 0, W = void 0;
1690
1682
  function Y(n) {
1691
- q = n;
1683
+ K = n;
1692
1684
  var t = n.document.createTextNode("");
1693
1685
  t.ownerDocument !== n.document && typeof n.wrap == "function" && n.wrap(t) === t && (n = n.wrap(n)), W = n;
1694
1686
  }
@@ -1736,9 +1728,9 @@ function da() {
1736
1728
  }
1737
1729
  }
1738
1730
  }
1739
- var K = { id: "actions/drag", install: function(n) {
1731
+ var G = { id: "actions/drag", install: function(n) {
1740
1732
  var t = n.actions, o = n.Interactable, s = n.defaults;
1741
- o.prototype.draggable = K.draggable, t.map.drag = K, t.methodDict.drag = "draggable", s.actions.drag = K.defaults;
1733
+ o.prototype.draggable = G.draggable, t.map.drag = G, t.methodDict.drag = "draggable", s.actions.drag = G.defaults;
1742
1734
  }, listeners: { "interactions:before-action-move": M, "interactions:action-resume": M, "interactions:action-move": B, "auto-start:check": function(n) {
1743
1735
  var t = n.interaction, o = n.interactable, s = n.buttons, l = o.options.drag;
1744
1736
  if (l && l.enabled && (!t.pointerIsDown || !/mouse|pointer/.test(t.pointerType) || (s & o.options.drag.mouseButtons) != 0)) return n.action = { name: "drag", axis: l.lockAxis === "start" ? l.startAxis : l.lockAxis }, !1;
@@ -1748,7 +1740,7 @@ function da() {
1748
1740
  return "move";
1749
1741
  }, filterEventType: function(n) {
1750
1742
  return n.search("drag") === 0;
1751
- } }, oe = K, Q = { init: function(n) {
1743
+ } }, oe = G, Q = { init: function(n) {
1752
1744
  var t = n;
1753
1745
  Q.document = t.document, Q.DocumentFragment = t.DocumentFragment || X, Q.SVGElement = t.SVGElement || X, Q.SVGSVGElement = t.SVGSVGElement || X, Q.SVGElementInstance = t.SVGElementInstance || X, Q.Element = t.Element || X, Q.HTMLElement = t.HTMLElement || Q.Element, Q.Event = t.Event, Q.Touch = t.Touch || X, Q.PointerEvent = t.PointerEvent || t.MSPointerEvent;
1754
1746
  }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
@@ -1782,7 +1774,7 @@ function da() {
1782
1774
  return t;
1783
1775
  }
1784
1776
  function R(n, t) {
1785
- return W !== q && (t = t.replace(/\/deep\//g, " ")), n[te.prefixedMatchesSelector](t);
1777
+ return W !== K && (t = t.replace(/\/deep\//g, " ")), n[te.prefixedMatchesSelector](t);
1786
1778
  }
1787
1779
  var k = function(n) {
1788
1780
  return n.parentNode || n.host;
@@ -1798,7 +1790,7 @@ function da() {
1798
1790
  }
1799
1791
  return !1;
1800
1792
  }
1801
- function G(n) {
1793
+ function q(n) {
1802
1794
  return n.correspondingUseElement || n;
1803
1795
  }
1804
1796
  function fe(n) {
@@ -1937,7 +1929,7 @@ function da() {
1937
1929
  }
1938
1930
  function Mr(n) {
1939
1931
  var t = E.func(n.composedPath) ? n.composedPath() : n.path;
1940
- return [G(t ? t[0] : n.target), G(n.currentTarget)];
1932
+ return [q(t ? t[0] : n.target), q(n.currentTarget)];
1941
1933
  }
1942
1934
  var Dt = (function() {
1943
1935
  function n(t) {
@@ -3884,8 +3876,8 @@ function ga(e, {
3884
3876
  d.current?.(I);
3885
3877
  },
3886
3878
  onmove: ({ client: _, clientX0: I, clientY0: $, dx: A, dy: S }) => {
3887
- const C = _e.make(I, $), q = _e.make(_), W = _e.make(A, S);
3888
- g.current?.(W, q, C);
3879
+ const C = _e.make(I, $), K = _e.make(_), W = _e.make(A, S);
3880
+ g.current?.(W, K, C);
3889
3881
  },
3890
3882
  onend: ({ client: _, clientX0: I, clientY0: $ }) => {
3891
3883
  const A = _e.make(I, $), S = _e.make(_);
@@ -3905,13 +3897,13 @@ function zt(e, {
3905
3897
  onDragEnd: u,
3906
3898
  ...d
3907
3899
  }) {
3908
- const g = we(r), [m, b] = Oe(!1), [T, _] = Oe(!1), [I, $] = Oe(r), A = Se(a), S = Se(c), C = Se(u), q = Se(i);
3900
+ const g = we(r), [m, b] = Oe(!1), [T, _] = Oe(!1), [I, $] = Oe(r), A = Se(a), S = Se(c), C = Se(u), K = Se(i);
3909
3901
  return ga(e, {
3910
3902
  onDragStart: (x) => {
3911
3903
  b(!0), _(!1), A.current?.(x);
3912
3904
  },
3913
3905
  onDragMove: (x, P, E) => {
3914
- const M = q.current(g.current, x.x, x.y);
3906
+ const M = K.current(g.current, x.x, x.y);
3915
3907
  _o(g, M) && $(M), b(!0), _(!1), S.current?.(x, P, E);
3916
3908
  },
3917
3909
  onDragEnd: (x, P) => {
@@ -3945,7 +3937,7 @@ const ti = /* @__PURE__ */ Te(({
3945
3937
  onImageSizeChange: _,
3946
3938
  ...I
3947
3939
  }, $) => {
3948
- const A = he((M, B, K) => M - B * r, [r]), S = we(null), C = nt(S), q = Go({ src: i }, {
3940
+ const A = he((M, B, G) => M - B * r, [r]), S = we(null), C = nt(S), K = Go({ src: i }, {
3949
3941
  onLoadStart: m,
3950
3942
  onLoadComplete: b,
3951
3943
  onLoadError: T
@@ -3956,18 +3948,18 @@ const ti = /* @__PURE__ */ Te(({
3956
3948
  onDragEnd: g
3957
3949
  });
3958
3950
  Ee(() => {
3959
- if (J || !q) return;
3960
- const M = va(e, q, be.size(C), a);
3951
+ if (J || !K) return;
3952
+ const M = va(e, K, be.size(C), a);
3961
3953
  M !== x && P(M), e !== W && Y(e);
3962
- }, [e, q, C.width, C.height, a]), Ee(() => {
3963
- if (!J || !q) return;
3964
- const M = ya(x, q, be.size(C), a);
3954
+ }, [e, K, C.width, C.height, a]), Ee(() => {
3955
+ if (!J || !K) return;
3956
+ const M = ya(x, K, be.size(C), a);
3965
3957
  W !== M && Y(M);
3966
- }, [x, q, C.width, C.height, a]), Ee(() => {
3958
+ }, [x, K, C.width, C.height, a]), Ee(() => {
3967
3959
  c?.(W, J), u?.(W / 360, J);
3968
3960
  }, [W]), Ee(() => {
3969
- _?.(q);
3970
- }, [q?.width, q?.height]);
3961
+ _?.(K);
3962
+ }, [K?.width, K?.height]);
3971
3963
  const E = ma({ src: i, displacement: x });
3972
3964
  return /* @__PURE__ */ w.jsx(
3973
3965
  "div",
@@ -4028,7 +4020,7 @@ const ri = /* @__PURE__ */ Te(({
4028
4020
  onLoadImageError: A,
4029
4021
  onLoadImageStart: S,
4030
4022
  onImageSizeChange: C,
4031
- onPositionChange: q,
4023
+ onPositionChange: K,
4032
4024
  ...W
4033
4025
  }, Y) => {
4034
4026
  const J = we(null), x = nt(J), [P, E] = Oe(), [M, B] = Oe(!1), oe = he(() => {
@@ -4071,7 +4063,7 @@ const ri = /* @__PURE__ */ Te(({
4071
4063
  onLoadImageComplete: $,
4072
4064
  onLoadImageError: A,
4073
4065
  onLoadImageStart: S,
4074
- onPositionChange: q
4066
+ onPositionChange: K
4075
4067
  }
4076
4068
  ),
4077
4069
  /* @__PURE__ */ w.jsx("div", { style: F.body, children: /* @__PURE__ */ w.jsxs("div", { style: F.controls, children: [
@@ -4179,12 +4171,7 @@ const xa = /* @__PURE__ */ Te(({
4179
4171
  });
4180
4172
  process.env.NODE_ENV === "development" && (xa.displayName = "SelectableButton");
4181
4173
  function wa({ children: e, if: r }) {
4182
- switch (typeof r) {
4183
- case "function":
4184
- return r() ? /* @__PURE__ */ w.jsx(w.Fragment, { children: e }) : /* @__PURE__ */ w.jsx(w.Fragment, {});
4185
- default:
4186
- return r ? /* @__PURE__ */ w.jsx(w.Fragment, { children: e }) : /* @__PURE__ */ w.jsx(w.Fragment, {});
4187
- }
4174
+ return typeof r === "function" ? r() ? /* @__PURE__ */ w.jsx(w.Fragment, { children: e }) : /* @__PURE__ */ w.jsx(w.Fragment, {}) : r ? /* @__PURE__ */ w.jsx(w.Fragment, { children: e }) : /* @__PURE__ */ w.jsx(w.Fragment, {});
4188
4175
  }
4189
4176
  process.env.NODE_ENV === "development" && (wa.displayName = "Conditional");
4190
4177
  function Mn({
@@ -4266,7 +4253,7 @@ function Na({
4266
4253
  const T = we(null), _ = we(void 0), I = nt(T), $ = he(() => {
4267
4254
  const C = window.document.createElement("span");
4268
4255
  C.className = se(r), C.innerHTML = g, C.role = "tooltip";
4269
- const q = a ?? (T.current ? _a(T.current, b) : "tl"), W = Sa(C), Y = Pa({ alignment: q, arrowSize: je.make(u, c), gap: d, maxDialogWidth: m, fullDialogWidth: W.width, targetWidth: I.width }), J = ce(i, Y.dialog);
4256
+ const K = a ?? (T.current ? _a(T.current, b) : "tl"), W = Sa(C), Y = Pa({ alignment: K, arrowSize: je.make(u, c), gap: d, maxDialogWidth: m, fullDialogWidth: W.width, targetWidth: I.width }), J = ce(i, Y.dialog);
4270
4257
  Object.keys(J).forEach((P) => C.style[P] = J[P]);
4271
4258
  const x = window.document.createElement("span");
4272
4259
  return Object.keys(Y.arrow).forEach((P) => x.style[P] = Y.arrow[P]), C.appendChild(x), C;
@@ -4471,26 +4458,7 @@ function Pa({ alignment: e, arrowSize: r, fullDialogWidth: i, gap: a, maxDialogW
4471
4458
  };
4472
4459
  }
4473
4460
  process.env.NODE_ENV === "development" && (Na.displayName = "WithTooltip");
4474
- function Dl() {
4475
- const e = navigator.userAgent || navigator.vendor || window.opera;
4476
- return pt(() => {
4477
- switch (!0) {
4478
- case /android/i.test(e):
4479
- return "android";
4480
- case (/iPad|iPhone|iPod/.test(e) && !window.MSStream):
4481
- return "ios";
4482
- case /win/i.test(e):
4483
- return "windows";
4484
- case /mac/i.test(e):
4485
- return "macos";
4486
- case /linux/i.test(e):
4487
- return "linux";
4488
- default:
4489
- return "unknown";
4490
- }
4491
- }, [e]);
4492
- }
4493
- function Bl(e, { element: r, isEnabled: i = !0 } = {}) {
4461
+ function Dl(e, { element: r, isEnabled: i = !0 } = {}) {
4494
4462
  $e(() => {
4495
4463
  if (!i) return;
4496
4464
  const a = r ?? window.document.documentElement, c = a.className;
@@ -4499,7 +4467,7 @@ function Bl(e, { element: r, isEnabled: i = !0 } = {}) {
4499
4467
  };
4500
4468
  }, [e, r, i]);
4501
4469
  }
4502
- function Hl(e, r) {
4470
+ function Bl(e, r) {
4503
4471
  const i = Se(r);
4504
4472
  $e(() => {
4505
4473
  const a = (c) => {
@@ -4521,7 +4489,7 @@ function Hl(e, r) {
4521
4489
  };
4522
4490
  }, []);
4523
4491
  }
4524
- function Yl() {
4492
+ function Hl() {
4525
4493
  return he(async (e) => {
4526
4494
  const r = e.type, i = new ClipboardItem({ [r]: e });
4527
4495
  try {
@@ -4531,7 +4499,7 @@ function Yl() {
4531
4499
  }
4532
4500
  }, []);
4533
4501
  }
4534
- function Xl() {
4502
+ function Yl() {
4535
4503
  return he((e, r) => {
4536
4504
  const i = URL.createObjectURL(e), a = document.createElement("a");
4537
4505
  a.href = i, a.download = r, document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(i);
@@ -4540,7 +4508,7 @@ function Xl() {
4540
4508
  function Ia() {
4541
4509
  return typeof window > "u" ? 1 : window.devicePixelRatio || 1;
4542
4510
  }
4543
- function Ul() {
4511
+ function Xl() {
4544
4512
  return pt(() => Ia(), []);
4545
4513
  }
4546
4514
  function ka(e, {
@@ -4557,8 +4525,8 @@ function ka(e, {
4557
4525
  }, []), I = he((A) => {
4558
4526
  const S = e.current;
4559
4527
  if (!S || !d.current) return;
4560
- const C = _e.make(A.clientX, A.clientY), q = _e.subtract(g.current ?? d.current, C);
4561
- T.current?.(C, q, d.current), d.current = void 0, g.current = void 0, S.removeEventListener("mousemove", _), S.removeEventListener("mouseup", I, { capture: !0 }), S.removeEventListener("mouseleave", I), i && (S.style.cursor = "grab");
4528
+ const C = _e.make(A.clientX, A.clientY), K = _e.subtract(g.current ?? d.current, C);
4529
+ T.current?.(C, K, d.current), d.current = void 0, g.current = void 0, S.removeEventListener("mousemove", _), S.removeEventListener("mouseup", I, { capture: !0 }), S.removeEventListener("mouseleave", I), i && (S.style.cursor = "grab");
4562
4530
  }, [i, _]), $ = he((A) => {
4563
4531
  const S = e.current;
4564
4532
  if (!S) return;
@@ -4581,7 +4549,7 @@ function ka(e, {
4581
4549
  };
4582
4550
  }, [r, _, I, $]);
4583
4551
  }
4584
- function Kl(e) {
4552
+ function Ul(e) {
4585
4553
  const [r, i] = Oe(!1), a = he((d) => {
4586
4554
  d.preventDefault(), d.stopPropagation(), i(!0);
4587
4555
  }, []), c = he((d) => {
@@ -4615,7 +4583,7 @@ function Ca(e, {
4615
4583
  }, [e, i, g]);
4616
4584
  return Ee(() => (r && e > 0 && m(), g), [r, e, m, g, ...c]), { start: m, stop: g };
4617
4585
  }
4618
- function Gl() {
4586
+ function Kl() {
4619
4587
  const [e, r] = Oe(!1);
4620
4588
  return Ee(() => (r(!0), () => {
4621
4589
  r(!1);
@@ -4627,31 +4595,32 @@ function $a() {
4627
4595
  function ja() {
4628
4596
  return pt(() => $a(), []);
4629
4597
  }
4630
- function ql(e, r, {
4631
- isEnabled: i = !0,
4632
- preventDefault: a = !0,
4633
- capture: c = !0,
4634
- target: u
4598
+ function Gl(e, r, {
4599
+ capture: i = !1,
4600
+ isEnabled: a = !0,
4601
+ preventsDefault: c = !0,
4602
+ stopsPropagation: u = !0,
4603
+ target: d
4635
4604
  } = {}) {
4636
- const d = Se(r), g = Array.isArray(e) ? e : [e], m = pt(() => g.map((b) => b.toLowerCase()).sort(), [g]);
4605
+ const g = Se(r), m = Array.isArray(e) ? e : [e], b = pt(() => m.map((T) => T.toLowerCase()).sort(), [m]);
4637
4606
  Ee(() => {
4638
- if (!i || m.length === 0) return;
4639
- const b = u && typeof u == "object" && "current" in u ? u.current : u || window;
4640
- if (!b) return;
4641
- const T = (_) => {
4642
- const I = new Set([
4643
- _.key.toLowerCase(),
4644
- _.ctrlKey && "control",
4645
- _.metaKey && "meta",
4646
- _.shiftKey && "shift",
4647
- _.altKey && "alt"
4607
+ if (!a || b.length === 0) return;
4608
+ const T = d && typeof d == "object" && "current" in d ? d.current : d || window;
4609
+ if (!T) return;
4610
+ const _ = (I) => {
4611
+ const $ = new Set([
4612
+ I.key.toLowerCase(),
4613
+ I.ctrlKey && "control",
4614
+ I.metaKey && "meta",
4615
+ I.shiftKey && "shift",
4616
+ I.altKey && "alt"
4648
4617
  ].filter(Boolean));
4649
- m.every((A) => I.has(A)) && I.size === m.length && (a && _.preventDefault(), d.current?.());
4618
+ b.every((S) => $.has(S)) && $.size === b.length && (c && I.preventDefault(), u && I.stopPropagation(), g.current?.());
4650
4619
  };
4651
- return b.addEventListener("keydown", T, { capture: c }), () => {
4652
- b.removeEventListener("keydown", T, { capture: c });
4620
+ return T.addEventListener("keydown", _, { capture: i }), () => {
4621
+ T.removeEventListener("keydown", _, { capture: i });
4653
4622
  };
4654
- }, [i, a, c, m.join(",")]);
4623
+ }, [a, c, i, b.join(",")]);
4655
4624
  }
4656
4625
  const Er = typeof window < "u" ? window.localStorage : void 0;
4657
4626
  function Aa({ defaultTTL: e = 300 } = {}) {
@@ -4687,9 +4656,28 @@ function za(e, r, i) {
4687
4656
  };
4688
4657
  return Er?.setItem(r, JSON.stringify(a)), e;
4689
4658
  }
4690
- function Wl(e) {
4659
+ function ql(e) {
4691
4660
  return pt(() => Aa({ defaultTTL: e }), [e]);
4692
4661
  }
4662
+ function Wl() {
4663
+ const e = navigator.userAgent || navigator.vendor || window.opera;
4664
+ return pt(() => {
4665
+ switch (!0) {
4666
+ case /android/i.test(e):
4667
+ return "android";
4668
+ case (/iPad|iPhone|iPod/.test(e) && !window.MSStream):
4669
+ return "ios";
4670
+ case /win/i.test(e):
4671
+ return "windows";
4672
+ case /mac/i.test(e):
4673
+ return "macos";
4674
+ case /linux/i.test(e):
4675
+ return "linux";
4676
+ default:
4677
+ return "unknown";
4678
+ }
4679
+ }, [e]);
4680
+ }
4693
4681
  function Jl(e, r = []) {
4694
4682
  const i = Se(e), a = we(void 0), c = we(!1);
4695
4683
  $e(() => {
@@ -4831,7 +4819,7 @@ const li = /* @__PURE__ */ Te(({
4831
4819
  onCustomEvent: A,
4832
4820
  onSelectAt: S,
4833
4821
  onSelectionChange: C,
4834
- ItemComponent: q,
4822
+ ItemComponent: K,
4835
4823
  ...W
4836
4824
  }, Y) => {
4837
4825
  const J = Ua(T ?? [], d), x = Ka({ itemLength: c, itemPadding: u, layout: g, numSegments: m, orientation: b }), P = (X) => J.indexOf(X) >= 0, E = (X) => {
@@ -4857,7 +4845,7 @@ const li = /* @__PURE__ */ Te(({
4857
4845
  if (!P(X)) return;
4858
4846
  const D = (ne) => ne.filter((ae) => ae !== X), z = J, te = D(J);
4859
4847
  oe(z, te);
4860
- }, K = (X) => {
4848
+ }, G = (X) => {
4861
4849
  I?.(X), _ !== "none" && (a ? E(X) : M(X));
4862
4850
  }, oe = (X, D) => {
4863
4851
  if (qe(X, D)) return;
@@ -4905,8 +4893,8 @@ const li = /* @__PURE__ */ Te(({
4905
4893
  } : {}
4906
4894
  }
4907
4895
  });
4908
- return q ? /* @__PURE__ */ w.jsx(
4909
- q,
4896
+ return K ? /* @__PURE__ */ w.jsx(
4897
+ K,
4910
4898
  {
4911
4899
  "aria-selected": te,
4912
4900
  className: se({ active: te }),
@@ -4916,7 +4904,7 @@ const li = /* @__PURE__ */ Te(({
4916
4904
  orientation: b,
4917
4905
  role: z,
4918
4906
  style: ne,
4919
- onClick: () => K(D),
4907
+ onClick: () => G(D),
4920
4908
  onCustomEvent: (ae, F) => A?.(D, ae, F)
4921
4909
  }
4922
4910
  ) : /* @__PURE__ */ w.jsx(
@@ -4929,7 +4917,7 @@ const li = /* @__PURE__ */ Te(({
4929
4917
  selectionMode: _,
4930
4918
  style: ne,
4931
4919
  onActivateAt: I,
4932
- onClick: () => K(D),
4920
+ onClick: () => G(D),
4933
4921
  children: `${X}`
4934
4922
  }
4935
4923
  );
@@ -5010,12 +4998,12 @@ const fi = /* @__PURE__ */ Te(({
5010
4998
  onHeaderCustomEvent: A,
5011
4999
  onItemCustomEvent: S,
5012
5000
  onSelectAt: C,
5013
- onSelectionChange: q,
5001
+ onSelectionChange: K,
5014
5002
  HeaderComponent: W,
5015
5003
  ItemComponent: Y,
5016
5004
  ...J
5017
5005
  }, x) => {
5018
- const P = Wa(g ?? {}, d), E = qa(a ?? [], d), M = Ja({ orientation: c }), B = d.map(() => we(null)), K = B.map((F) => ci(F)), oe = (F, R) => (P[R]?.indexOf(F) ?? -1) >= 0, Q = (F) => E.indexOf(F) >= 0, X = (F) => {
5006
+ const P = Wa(g ?? {}, d), E = qa(a ?? [], d), M = Ja({ orientation: c }), B = d.map(() => we(null)), G = B.map((F) => ci(F)), oe = (F, R) => (P[R]?.indexOf(F) ?? -1) >= 0, Q = (F) => E.indexOf(F) >= 0, X = (F) => {
5019
5007
  let R;
5020
5008
  Q(F) ? R = (k) => k.filter((U) => U !== F) : i ? R = (k) => [F] : R = (k) => [...k.filter((U) => U !== F), F], te(E, R(E));
5021
5009
  }, D = (F, R) => {
@@ -5025,7 +5013,7 @@ const fi = /* @__PURE__ */ Te(({
5025
5013
  case "multiple":
5026
5014
  k = (Z) => ({
5027
5015
  ...Z,
5028
- [R]: fn([...(Z[R] ?? []).filter((G) => G !== F), F])
5016
+ [R]: fn([...(Z[R] ?? []).filter((q) => q !== F), F])
5029
5017
  });
5030
5018
  break;
5031
5019
  case "single":
@@ -5042,7 +5030,7 @@ const fi = /* @__PURE__ */ Te(({
5042
5030
  if (!oe(F, R)) return;
5043
5031
  const U = ((Z) => ({
5044
5032
  ...Z,
5045
- [R]: (Z[R] ?? []).filter((G) => G !== F)
5033
+ [R]: (Z[R] ?? []).filter((q) => q !== F)
5046
5034
  }))(P);
5047
5035
  ne(P, U);
5048
5036
  }, te = (F, R) => {
@@ -5053,11 +5041,11 @@ const fi = /* @__PURE__ */ Te(({
5053
5041
  if (qe(F, R)) return;
5054
5042
  const k = d.length;
5055
5043
  let U = [], Z = [];
5056
- for (let G = 0; G < k; G++) {
5057
- const fe = F?.[G] ?? [], ge = R[G] ?? [], ue = fe.filter((ee) => ge.indexOf(ee) === -1), Ne = ge.filter((ee) => fe?.indexOf(ee) === -1);
5058
- U = [...U, ...ue.map((ee) => [ee, G])], Z = [...Z, ...Ne.map((ee) => [ee, G])];
5044
+ for (let q = 0; q < k; q++) {
5045
+ const fe = F?.[q] ?? [], ge = R[q] ?? [], ue = fe.filter((ee) => ge.indexOf(ee) === -1), Ne = ge.filter((ee) => fe?.indexOf(ee) === -1);
5046
+ U = [...U, ...ue.map((ee) => [ee, q])], Z = [...Z, ...Ne.map((ee) => [ee, q])];
5059
5047
  }
5060
- U.forEach((G) => _?.(G[0], G[1])), Z.forEach((G) => C?.(G[0], G[1])), q?.(R);
5048
+ U.forEach((q) => _?.(q[0], q[1])), Z.forEach((q) => C?.(q[0], q[1])), K?.(R);
5061
5049
  }, ae = ze(e, {
5062
5050
  collapseIcon: _r,
5063
5051
  expandIcon: Sr,
@@ -5066,7 +5054,7 @@ const fi = /* @__PURE__ */ Te(({
5066
5054
  section: dr
5067
5055
  });
5068
5056
  return /* @__PURE__ */ w.jsx("div", { ...J, ref: x, style: ce(r, M.root), children: /* @__PURE__ */ w.jsx(Mn, { in: d, children: (F, R) => {
5069
- const { collectionPadding: k = 0, items: U = [], itemLength: Z = 50, itemPadding: G = 0, isSelectionTogglable: fe, layout: ge = "list", maxVisible: ue = -1, numSegments: Ne = 1 } = F, ee = ge === "list" ? U.length : Math.ceil(U.length / Ne), Be = ue < 0 ? ee : Math.min(ee, ue), Ce = Z * Be + G * (Be - 1), Ie = !Q(R), He = K[R];
5057
+ const { collectionPadding: k = 0, items: U = [], itemLength: Z = 50, itemPadding: q = 0, isSelectionTogglable: fe, layout: ge = "list", maxVisible: ue = -1, numSegments: Ne = 1 } = F, ee = ge === "list" ? U.length : Math.ceil(U.length / Ne), Be = ue < 0 ? ee : Math.min(ee, ue), Ce = Z * Be + q * (Be - 1), Ie = !Q(R), He = G[R];
5070
5058
  return /* @__PURE__ */ w.jsxs(
5071
5059
  me,
5072
5060
  {
@@ -5153,7 +5141,7 @@ const fi = /* @__PURE__ */ Te(({
5153
5141
  isSelectionTogglable: fe,
5154
5142
  ItemComponent: Y,
5155
5143
  itemLength: Z,
5156
- itemPadding: G,
5144
+ itemPadding: q,
5157
5145
  items: U,
5158
5146
  layout: ge,
5159
5147
  numSegments: Ne,
@@ -5293,34 +5281,34 @@ const Za = /* @__PURE__ */ Te(({
5293
5281
  ItemComponent: b,
5294
5282
  ...T
5295
5283
  }, _) => {
5296
- const I = we(void 0), $ = we(null), A = we(void 0), S = we(void 0), C = we(void 0), q = 1e3, W = Se(d), Y = Se(g), J = Se(m), x = we(!1), P = we(!1), E = ja(), [M, B] = Oe(Oo($, c)), [K, oe] = Oe(!1), Q = tc({ scrollSnapEnabled: E || !K, orientation: c }), X = e > 0, D = he(() => {
5284
+ const I = we(void 0), $ = we(null), A = we(void 0), S = we(void 0), C = we(void 0), K = 1e3, W = Se(d), Y = Se(g), J = Se(m), x = we(!1), P = we(!1), E = ja(), [M, B] = Oe(Oo($, c)), [G, oe] = Oe(!1), Q = tc({ scrollSnapEnabled: E || !G, orientation: c }), X = e > 0, D = he(() => {
5297
5285
  C.current !== void 0 && (clearTimeout(C.current), C.current = void 0);
5298
5286
  }, []), z = he(() => {
5299
5287
  D(), C.current = setTimeout(() => {
5300
5288
  clearTimeout(C.current), C.current = void 0;
5301
- }, q);
5302
- }, [q, D]), te = he(() => {
5289
+ }, K);
5290
+ }, [K, D]), te = he(() => {
5303
5291
  Qa($, r, c), z();
5304
5292
  }, [r, c]), ne = he(() => {
5305
5293
  B(Oo($, c));
5306
- }, [c]), ae = he((G) => {
5307
- E || (A.current = _e.make(G.clientX, G.clientY), oe(!0));
5308
- }, [E]), F = he((G) => {
5309
- E || (S.current = _e.make(G.clientX, G.clientY), te(), oe(!1));
5310
- }, [E, te]), R = he((G) => {
5294
+ }, [c]), ae = he((q) => {
5295
+ E || (A.current = _e.make(q.clientX, q.clientY), oe(!0));
5296
+ }, [E]), F = he((q) => {
5297
+ E || (S.current = _e.make(q.clientX, q.clientY), te(), oe(!1));
5298
+ }, [E, te]), R = he((q) => {
5311
5299
  const fe = A.current, ge = S.current;
5312
5300
  if (!fe || !ge) return;
5313
5301
  const ue = 5, Ne = _e.subtract(fe, ge);
5314
- (Math.abs(Ne.x) > ue || Math.abs(Ne.y) > ue) && G.stopPropagation(), A.current = void 0, S.current = void 0;
5302
+ (Math.abs(Ne.x) > ue || Math.abs(Ne.y) > ue) && q.stopPropagation(), A.current = void 0, S.current = void 0;
5315
5303
  }, []), k = he(() => {
5316
- const G = (r + a.length + 1) % a.length;
5317
- J.current?.(G);
5318
- }, [K, r, a.length]), U = he(({ x: G, y: fe }) => {
5304
+ const q = (r + a.length + 1) % a.length;
5305
+ J.current?.(q);
5306
+ }, [G, r, a.length]), U = he(({ x: q, y: fe }) => {
5319
5307
  const ge = $.current;
5320
5308
  !ge || x.current || (D(), x.current = !0, requestAnimationFrame(() => {
5321
5309
  switch (c) {
5322
5310
  case "horizontal":
5323
- ge.scrollLeft -= G * 1.5;
5311
+ ge.scrollLeft -= q * 1.5;
5324
5312
  break;
5325
5313
  case "vertical":
5326
5314
  ge.scrollTop -= fe * 1.5;
@@ -5330,10 +5318,10 @@ const Za = /* @__PURE__ */ Te(({
5330
5318
  x.current = !1;
5331
5319
  }));
5332
5320
  }, [c]), Z = he(() => {
5333
- const G = $.current;
5334
- !G || P.current || (P.current = !0, requestAnimationFrame(() => {
5321
+ const q = $.current;
5322
+ !q || P.current || (P.current = !0, requestAnimationFrame(() => {
5335
5323
  if (u && ne(), !(C.current !== void 0)) {
5336
- const ge = Math.round(c === "horizontal" ? G.scrollLeft / G.clientWidth : G.scrollTop / G.clientHeight), ue = Math.max(0, Math.min(a.length - 1, ge));
5324
+ const ge = Math.round(c === "horizontal" ? q.scrollLeft / q.clientWidth : q.scrollTop / q.clientHeight), ue = Math.max(0, Math.min(a.length - 1, ge));
5337
5325
  ue !== r && (I.current = ue, J.current?.(ue));
5338
5326
  }
5339
5327
  P.current = !1;
@@ -5342,16 +5330,16 @@ const Za = /* @__PURE__ */ Te(({
5342
5330
  return ka($, {
5343
5331
  isEnabled: !E && i && a.length > 1,
5344
5332
  onDragMove: U
5345
- }), Ca(K || !X ? -1 : e, {
5333
+ }), Ca(G || !X ? -1 : e, {
5346
5334
  onInterval: k
5347
5335
  }, [r]), $e(() => {
5348
- !X || E || (K ? W.current?.() : Y.current?.());
5349
- }, [E, K, X]), $e(() => {
5350
- const G = $.current;
5351
- if (!G) return;
5336
+ !X || E || (G ? W.current?.() : Y.current?.());
5337
+ }, [E, G, X]), $e(() => {
5338
+ const q = $.current;
5339
+ if (!q) return;
5352
5340
  const fe = I.current === void 0, ge = I.current === r;
5353
- return G.addEventListener("scroll", Z), u && ne(), ge || (I.current = r, fe || (J.current?.(r), te())), () => {
5354
- G.removeEventListener("scroll", Z);
5341
+ return q.addEventListener("scroll", Z), u && ne(), ge || (I.current = r, fe || (J.current?.(r), te())), () => {
5342
+ q.removeEventListener("scroll", Z);
5355
5343
  };
5356
5344
  }, [r, u, te, Z, ne]), /* @__PURE__ */ w.jsx(
5357
5345
  "div",
@@ -5364,12 +5352,12 @@ const Za = /* @__PURE__ */ Te(({
5364
5352
  onPointerDown: ae,
5365
5353
  onPointerLeave: F,
5366
5354
  onPointerUp: F,
5367
- children: /* @__PURE__ */ w.jsx("div", { ref: $, style: ce(Q.viewport), children: /* @__PURE__ */ w.jsx(Mn, { in: a, children: ({ style: G, ...fe }, ge) => /* @__PURE__ */ w.jsx("div", { style: ce(Q.itemContainer), children: /* @__PURE__ */ w.jsx(
5355
+ children: /* @__PURE__ */ w.jsx("div", { ref: $, style: ce(Q.viewport), children: /* @__PURE__ */ w.jsx(Mn, { in: a, children: ({ style: q, ...fe }, ge) => /* @__PURE__ */ w.jsx("div", { style: ce(Q.itemContainer), children: /* @__PURE__ */ w.jsx(
5368
5356
  b,
5369
5357
  {
5370
5358
  "aria-hidden": ge !== r,
5371
5359
  exposure: u ? M?.[ge] : void 0,
5372
- style: ce(G, Q.item),
5360
+ style: ce(q, Q.item),
5373
5361
  ...fe
5374
5362
  }
5375
5363
  ) }) }) })
@@ -5457,29 +5445,29 @@ const pi = /* @__PURE__ */ Te(({
5457
5445
  }, I) => {
5458
5446
  const $ = rc(b, g), A = we([]), S = nc(), C = ze(e, {
5459
5447
  field: dn
5460
- }), q = (x) => {
5448
+ }), K = (x) => {
5461
5449
  x < 0 ? A.current[0]?.focus() : x >= g ? A.current[g - 1]?.focus() : A.current[x]?.focus();
5462
5450
  }, W = (x) => (P) => {
5463
5451
  const E = $[x], M = oc(P.target.value, E), B = Po($.slice(), M.split("").slice(0, g), x);
5464
5452
  T(B);
5465
- const K = Math.min(x + M.length, g - 1);
5466
- q(K);
5453
+ const G = Math.min(x + M.length, g - 1);
5454
+ K(G);
5467
5455
  }, Y = (x) => (P) => {
5468
5456
  switch (P.key) {
5469
5457
  case "Backspace": {
5470
5458
  if (P.preventDefault(), $[x]) {
5471
5459
  const E = $.slice();
5472
- E[x] = "", T(E), q(x - 1);
5460
+ E[x] = "", T(E), K(x - 1);
5473
5461
  } else
5474
- q(x - 1);
5462
+ K(x - 1);
5475
5463
  break;
5476
5464
  }
5477
5465
  case "ArrowLeft": {
5478
- P.preventDefault(), q(x - 1);
5466
+ P.preventDefault(), K(x - 1);
5479
5467
  break;
5480
5468
  }
5481
5469
  case "ArrowRight": {
5482
- P.preventDefault(), q(x + 1);
5470
+ P.preventDefault(), K(x + 1);
5483
5471
  break;
5484
5472
  }
5485
5473
  }
@@ -5488,12 +5476,12 @@ const pi = /* @__PURE__ */ Te(({
5488
5476
  const E = P.clipboardData.getData("text").trim(), M = Po($.slice(), E.split("").slice(0, g), x);
5489
5477
  T(M);
5490
5478
  const B = Math.min(x + E.length, g - 1);
5491
- q(B);
5479
+ K(B);
5492
5480
  };
5493
5481
  return Ee(() => {
5494
5482
  if (!i) return;
5495
5483
  const x = $.findIndex((P) => P === "");
5496
- x !== -1 && q(x);
5484
+ x !== -1 && K(x);
5497
5485
  }, [i]), /* @__PURE__ */ w.jsx("div", { ..._, ref: I, style: ce(m, S.root), children: /* @__PURE__ */ w.jsx(nn, { count: g, children: (x) => /* @__PURE__ */ w.jsx(
5498
5486
  me,
5499
5487
  {
@@ -5613,21 +5601,21 @@ const gi = /* @__PURE__ */ Te(({
5613
5601
  }, T = () => {
5614
5602
  d?.(S(u + 1));
5615
5603
  }, _ = (P) => {
5616
- q(P);
5604
+ K(P);
5617
5605
  }, I = (P) => {
5618
5606
  const E = A(P);
5619
- E !== u ? d?.(E) : q($(E));
5607
+ E !== u ? d?.(E) : K($(E));
5620
5608
  }, $ = (P) => P.toLocaleString(), A = (P) => {
5621
5609
  const E = parseInt(P, 10);
5622
5610
  return E.toString() !== P.replace(/^0+/, "") ? u : S(E);
5623
5611
  }, S = (P) => {
5624
5612
  let E = P;
5625
5613
  return isNaN(c) || (E = Math.max(c, E)), isNaN(a) || (E = Math.min(a, E)), E;
5626
- }, [C, q] = Oe($(u)), W = Fa(u), Y = !isNaN(a) && u + 1 > a, J = !isNaN(c) && u - 1 < c;
5614
+ }, [C, K] = Oe($(u)), W = Fa(u), Y = !isNaN(a) && u + 1 > a, J = !isNaN(c) && u - 1 < c;
5627
5615
  Ee(() => {
5628
5616
  if (W === void 0 || W === u) return;
5629
5617
  const P = S(u);
5630
- q($(P));
5618
+ K($(P));
5631
5619
  }, [u, c, a]);
5632
5620
  const x = ze(e, {
5633
5621
  textField: pn,
@@ -5820,7 +5808,7 @@ const mi = /* @__PURE__ */ Te(({
5820
5808
  numSegments: A = 1,
5821
5809
  orientation: S = "vertical",
5822
5810
  selection: C = [],
5823
- selectionMode: q = "single",
5811
+ selectionMode: K = "single",
5824
5812
  onActivateAt: W,
5825
5813
  onCollapse: Y,
5826
5814
  onDeselectAt: J,
@@ -5829,7 +5817,7 @@ const mi = /* @__PURE__ */ Te(({
5829
5817
  onSelectionChange: E,
5830
5818
  onToggleCustomEvent: M,
5831
5819
  ItemComponent: B,
5832
- ToggleComponent: K,
5820
+ ToggleComponent: G,
5833
5821
  ...oe
5834
5822
  }, Q) => {
5835
5823
  const X = we(null), D = nt(X), z = I.length, te = dc(I, $, A, m), ne = T ?? (S === "vertical" ? D.height : D.width), ae = ne * te + _ * (te - 1), F = uc(C, I), [R, k] = Oe(u ?? !0), U = pc({ isCollapsed: R, collectionPadding: c, isInverted: d, maxVisibleItems: $, menuLength: ae, numItems: z, orientation: S }), Z = ze(e, {
@@ -5838,14 +5826,14 @@ const mi = /* @__PURE__ */ Te(({
5838
5826
  expandIcon: Or,
5839
5827
  item: bn,
5840
5828
  toggle: xn
5841
- }), G = () => {
5829
+ }), q = () => {
5842
5830
  R && (k(!1), x?.());
5843
5831
  }, fe = () => {
5844
5832
  R || (k(!0), Y?.());
5845
5833
  }, ge = () => {
5846
- R ? G() : fe();
5834
+ R ? q() : fe();
5847
5835
  }, ue = (Ne) => {
5848
- P?.(Ne), q === "single" && a && fe();
5836
+ P?.(Ne), K === "single" && a && fe();
5849
5837
  };
5850
5838
  return Ee(() => {
5851
5839
  u !== void 0 && k(u);
@@ -5874,8 +5862,8 @@ const mi = /* @__PURE__ */ Te(({
5874
5862
  className: se(r, { collapsed: R, expanded: !R }),
5875
5863
  style: ce(i, U.root),
5876
5864
  children: /* @__PURE__ */ w.jsxs("div", { ref: X, style: ce(U.body), children: [
5877
- K ? /* @__PURE__ */ w.jsx(
5878
- K,
5865
+ G ? /* @__PURE__ */ w.jsx(
5866
+ G,
5879
5867
  {
5880
5868
  "aria-expanded": !R,
5881
5869
  "aria-haspopup": "listbox",
@@ -5919,7 +5907,7 @@ const mi = /* @__PURE__ */ Te(({
5919
5907
  numSegments: A,
5920
5908
  orientation: S,
5921
5909
  selection: F,
5922
- selectionMode: q,
5910
+ selectionMode: K,
5923
5911
  style: ce(U.collection),
5924
5912
  onActivateAt: W,
5925
5913
  onDeselectAt: J,
@@ -5964,14 +5952,11 @@ function fc(e) {
5964
5952
  }
5965
5953
  function dc(e, r, i, a) {
5966
5954
  const c = e.length;
5967
- switch (a) {
5968
- case "grid": {
5969
- const u = i < 1 ? c : Math.ceil(c / i);
5970
- return r < 0 ? u : Math.min(u, r);
5971
- }
5972
- default:
5973
- return r < 0 ? c : Math.min(c, r);
5974
- }
5955
+ if (a === "grid") {
5956
+ const u = i < 1 ? c : Math.ceil(c / i);
5957
+ return r < 0 ? u : Math.min(u, r);
5958
+ } else
5959
+ return r < 0 ? c : Math.min(c, r);
5975
5960
  }
5976
5961
  function pc({ isCollapsed: e = !0, isInverted: r = !1, collectionPadding: i = 0, maxVisibleItems: a = 0, menuLength: c = NaN, numItems: u = 0, orientation: d = "vertical" }) {
5977
5962
  return {
@@ -6336,7 +6321,7 @@ const Pc = {
6336
6321
  return Object.assign({}, Pc, e);
6337
6322
  };
6338
6323
  let wn;
6339
- typeof Symbol != "function" ? wn = "@@xmlMetadata" : wn = Symbol("XML Node Metadata");
6324
+ typeof Symbol != "function" ? wn = "@@xmlMetadata" : wn = /* @__PURE__ */ Symbol("XML Node Metadata");
6340
6325
  class ct {
6341
6326
  constructor(r) {
6342
6327
  this.tagname = r, this.child = [], this[":@"] = {};
@@ -6652,32 +6637,32 @@ function Bc(e) {
6652
6637
  return e;
6653
6638
  }
6654
6639
  const Hc = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
6655
- function Yc(e, r, i) {
6640
+ function Yc(e, r) {
6656
6641
  if (this.options.ignoreAttributes !== !0 && typeof e == "string") {
6657
- const a = yi(e, Hc), c = a.length, u = {};
6658
- for (let d = 0; d < c; d++) {
6659
- const g = this.resolveNameSpace(a[d][1]);
6660
- if (this.ignoreAttributesFn(g, r))
6642
+ const i = yi(e, Hc), a = i.length, c = {};
6643
+ for (let u = 0; u < a; u++) {
6644
+ const d = this.resolveNameSpace(i[u][1]);
6645
+ if (this.ignoreAttributesFn(d, r))
6661
6646
  continue;
6662
- let m = a[d][4], b = this.options.attributeNamePrefix + g;
6663
- if (g.length)
6664
- if (this.options.transformAttributeName && (b = this.options.transformAttributeName(b)), b === "__proto__" && (b = "#__proto__"), m !== void 0) {
6665
- this.options.trimValues && (m = m.trim()), m = this.replaceEntitiesValue(m);
6666
- const T = this.options.attributeValueProcessor(g, m, r);
6667
- T == null ? u[b] = m : typeof T != typeof m || T !== m ? u[b] = T : u[b] = hr(
6668
- m,
6647
+ let g = i[u][4], m = this.options.attributeNamePrefix + d;
6648
+ if (d.length)
6649
+ if (this.options.transformAttributeName && (m = this.options.transformAttributeName(m)), m === "__proto__" && (m = "#__proto__"), g !== void 0) {
6650
+ this.options.trimValues && (g = g.trim()), g = this.replaceEntitiesValue(g);
6651
+ const b = this.options.attributeValueProcessor(d, g, r);
6652
+ b == null ? c[m] = g : typeof b != typeof g || b !== g ? c[m] = b : c[m] = hr(
6653
+ g,
6669
6654
  this.options.parseAttributeValue,
6670
6655
  this.options.numberParseOptions
6671
6656
  );
6672
- } else this.options.allowBooleanAttributes && (u[b] = !0);
6657
+ } else this.options.allowBooleanAttributes && (c[m] = !0);
6673
6658
  }
6674
- if (!Object.keys(u).length)
6659
+ if (!Object.keys(c).length)
6675
6660
  return;
6676
6661
  if (this.options.attributesGroupName) {
6677
- const d = {};
6678
- return d[this.options.attributesGroupName] = u, d;
6662
+ const u = {};
6663
+ return u[this.options.attributesGroupName] = c, u;
6679
6664
  }
6680
- return u;
6665
+ return c;
6681
6666
  }
6682
6667
  }
6683
6668
  const Xc = function(e) {
@@ -6706,7 +6691,7 @@ const Xc = function(e) {
6706
6691
  if (!m) throw new Error("Pi Tag is not closed.");
6707
6692
  if (a = this.saveTextToParentTag(a, i, c), !(this.options.ignoreDeclaration && m.tagName === "?xml" || this.options.ignorePiTags)) {
6708
6693
  const b = new ct(m.tagName);
6709
- b.add(this.options.textNodeName, ""), m.tagName !== m.tagExp && m.attrExpPresent && (b[":@"] = this.buildAttributesMap(m.tagExp, c, m.tagName)), this.addChild(i, b, c, d);
6694
+ b.add(this.options.textNodeName, ""), m.tagName !== m.tagExp && m.attrExpPresent && (b[":@"] = this.buildAttributesMap(m.tagExp, c)), this.addChild(i, b, c, d);
6710
6695
  }
6711
6696
  d = m.closeIndex + 1;
6712
6697
  } else if (e.substr(d + 1, 3) === "!--") {
@@ -6728,7 +6713,11 @@ const Xc = function(e) {
6728
6713
  let m = pr(e, d, this.options.removeNSPrefix), b = m.tagName;
6729
6714
  const T = m.rawTagName;
6730
6715
  let _ = m.tagExp, I = m.attrExpPresent, $ = m.closeIndex;
6731
- this.options.transformTagName && (b = this.options.transformTagName(b)), i && a && i.tagname !== "!xml" && (a = this.saveTextToParentTag(a, i, c, !1));
6716
+ if (this.options.transformTagName) {
6717
+ const C = this.options.transformTagName(b);
6718
+ _ === b && (_ = C), b = C;
6719
+ }
6720
+ i && a && i.tagname !== "!xml" && (a = this.saveTextToParentTag(a, i, c, !1));
6732
6721
  const A = i;
6733
6722
  A && this.options.unpairedTags.indexOf(A.tagname) !== -1 && (i = this.tagsNodeStack.pop(), c = c.substring(0, c.lastIndexOf("."))), b !== r.tagname && (c += c ? "." + b : b);
6734
6723
  const S = d;
@@ -6743,16 +6732,22 @@ const Xc = function(e) {
6743
6732
  if (!W) throw new Error(`Unexpected end of ${T}`);
6744
6733
  d = W.i, C = W.tagContent;
6745
6734
  }
6746
- const q = new ct(b);
6747
- b !== _ && I && (q[":@"] = this.buildAttributesMap(_, c, b)), C && (C = this.parseTextData(C, b, c, !0, I, !0, !0)), c = c.substr(0, c.lastIndexOf(".")), q.add(this.options.textNodeName, C), this.addChild(i, q, c, S);
6735
+ const K = new ct(b);
6736
+ b !== _ && I && (K[":@"] = this.buildAttributesMap(
6737
+ _,
6738
+ c
6739
+ )), C && (C = this.parseTextData(C, b, c, !0, I, !0, !0)), c = c.substr(0, c.lastIndexOf(".")), K.add(this.options.textNodeName, C), this.addChild(i, K, c, S);
6748
6740
  } else {
6749
6741
  if (_.length > 0 && _.lastIndexOf("/") === _.length - 1) {
6750
- b[b.length - 1] === "/" ? (b = b.substr(0, b.length - 1), c = c.substr(0, c.length - 1), _ = b) : _ = _.substr(0, _.length - 1), this.options.transformTagName && (b = this.options.transformTagName(b));
6742
+ if (b[b.length - 1] === "/" ? (b = b.substr(0, b.length - 1), c = c.substr(0, c.length - 1), _ = b) : _ = _.substr(0, _.length - 1), this.options.transformTagName) {
6743
+ const K = this.options.transformTagName(b);
6744
+ _ === b && (_ = K), b = K;
6745
+ }
6751
6746
  const C = new ct(b);
6752
- b !== _ && I && (C[":@"] = this.buildAttributesMap(_, c, b)), this.addChild(i, C, c, S), c = c.substr(0, c.lastIndexOf("."));
6747
+ b !== _ && I && (C[":@"] = this.buildAttributesMap(_, c)), this.addChild(i, C, c, S), c = c.substr(0, c.lastIndexOf("."));
6753
6748
  } else {
6754
6749
  const C = new ct(b);
6755
- this.tagsNodeStack.push(i), b !== _ && I && (C[":@"] = this.buildAttributesMap(_, c, b)), this.addChild(i, C, c, S), i = C;
6750
+ this.tagsNodeStack.push(i), b !== _ && I && (C[":@"] = this.buildAttributesMap(_, c)), this.addChild(i, C, c, S), i = C;
6756
6751
  }
6757
6752
  a = "", d = $;
6758
6753
  }
@@ -7203,12 +7198,12 @@ const fl = /* @__PURE__ */ Te(({
7203
7198
  ignorePiTags: !0,
7204
7199
  removeNSPrefix: !0,
7205
7200
  trimValues: !0,
7206
- updateTag: (q, W, Y) => {
7207
- if (u && q.toLowerCase() === "style") return !1;
7201
+ updateTag: (K, W, Y) => {
7202
+ if (u && K.toLowerCase() === "style") return !1;
7208
7203
  const J = Object.keys(Y);
7209
7204
  for (const x of J)
7210
- q.toLowerCase() === "svg" && (c && I.includes(x.toLowerCase()) && delete Y[x], e !== "preserve" && (x.toLowerCase() === "@_width" && delete Y[x], x.toLowerCase() === "@_height" && delete Y[x])), a && b.includes(x.toLowerCase()) && delete Y[x], i && T.includes(x.toLowerCase()) && delete Y[x], u && _.includes(x.toLowerCase()) && delete Y[x];
7211
- if (q.toLowerCase() === "svg")
7205
+ K.toLowerCase() === "svg" && (c && I.includes(x.toLowerCase()) && delete Y[x], e !== "preserve" && (x.toLowerCase() === "@_width" && delete Y[x], x.toLowerCase() === "@_height" && delete Y[x])), a && b.includes(x.toLowerCase()) && delete Y[x], i && T.includes(x.toLowerCase()) && delete Y[x], u && _.includes(x.toLowerCase()) && delete Y[x];
7206
+ if (K.toLowerCase() === "svg")
7212
7207
  switch (e) {
7213
7208
  case "fill":
7214
7209
  Y["@_width"] = "100%", Y["@_height"] = "100%";
@@ -7220,7 +7215,7 @@ const fl = /* @__PURE__ */ Te(({
7220
7215
  Y["@_height"] = "100%";
7221
7216
  break;
7222
7217
  }
7223
- return q;
7218
+ return K;
7224
7219
  }
7225
7220
  }), S = new rt({
7226
7221
  attributeNamePrefix: "@_",
@@ -7265,17 +7260,17 @@ const Mo = "base-", pl = /* @__PURE__ */ Te(({
7265
7260
  verticalSpacing: g = 0,
7266
7261
  ...m
7267
7262
  }, b) => {
7268
- const T = we(null), [_, I] = Oe(NaN), [$, A] = Oe(NaN), [S, C] = Oe(NaN), [q, W] = Oe(NaN), Y = () => be.from(T.current)?.width ?? 0, J = () => be.from(T.current)?.height ?? 0, x = () => {
7263
+ const T = we(null), [_, I] = Oe(NaN), [$, A] = Oe(NaN), [S, C] = Oe(NaN), [K, W] = Oe(NaN), Y = () => be.from(T.current)?.width ?? 0, J = () => be.from(T.current)?.height ?? 0, x = () => {
7269
7264
  const B = T.current;
7270
7265
  if (!B) return;
7271
- const K = B.children, oe = d;
7266
+ const G = B.children, oe = d;
7272
7267
  if (oe <= 0) {
7273
7268
  console.error("[etudes::MasonryGrid] You must specify a minimum of 1 section(s) (a.k.a. row(s) for horizontal orientation, column(s) for vertical orientation) for a MasonryGrid instance");
7274
7269
  return;
7275
7270
  }
7276
7271
  if (u === "vertical") {
7277
7272
  const Q = [...new Array(oe)].map(() => 0);
7278
- for (const z of Array.from(K)) {
7273
+ for (const z of Array.from(G)) {
7279
7274
  if (!(z instanceof HTMLElement)) continue;
7280
7275
  const te = zo(z, d), [ne, ae] = Ro(Q, te);
7281
7276
  z.role = "gridcell", z.style.position = "absolute", z.style.width = `calc(${100 / oe * te}% - ${a * (oe - 1) / oe * te}px + ${a * (te - 1)}px)`, z.style.height = "", z.style.left = `calc(${100 / oe * ne}% - ${a * (oe - 1) / oe * ne}px + ${a * ne}px)`, z.style.top = `${ae + (ae === 0 ? 0 : g)}px`;
@@ -7289,11 +7284,11 @@ const Mo = "base-", pl = /* @__PURE__ */ Te(({
7289
7284
  }
7290
7285
  const X = Y(), D = kt(Q, oe);
7291
7286
  if (I(X), A(D), isNaN(D) || (B.style.height = `${D}px`), c)
7292
- for (const z of Array.from(K))
7287
+ for (const z of Array.from(G))
7293
7288
  z instanceof HTMLElement && (z.style.left = `calc(${X}px - ${z.style.left} - ${z.getBoundingClientRect().width}px)`);
7294
7289
  } else {
7295
7290
  const Q = [...new Array(oe)].map(() => 0);
7296
- for (const z of Array.from(K)) {
7291
+ for (const z of Array.from(G)) {
7297
7292
  if (!(z instanceof HTMLElement)) continue;
7298
7293
  const te = zo(z, d), [ne, ae] = Ro(Q, te);
7299
7294
  z.style.position = "absolute", z.style.width = "", z.style.height = `calc(${100 / oe * te}% - ${g * (oe - 1) / oe * te}px + ${g * (te - 1)}px)`, z.style.top = `calc(${100 / oe * ne}% - ${g * (oe - 1) / oe * ne}px + ${g * ne}px)`, z.style.left = `${ae + (ae === 0 ? 0 : a)}px`;
@@ -7307,20 +7302,20 @@ const Mo = "base-", pl = /* @__PURE__ */ Te(({
7307
7302
  }
7308
7303
  const X = J(), D = kt(Q, oe);
7309
7304
  if (A(X), I(D), isNaN(D) || (B.style.width = `${D}px`), c)
7310
- for (const z of Array.from(K))
7305
+ for (const z of Array.from(G))
7311
7306
  z instanceof HTMLElement && (z.style.top = `calc(${X}px - ${z.style.top} - ${z.getBoundingClientRect().height}px)`);
7312
7307
  }
7313
7308
  }, P = he((B) => {
7314
- const K = be.size(be.from(B) ?? be.zero), oe = Y(), Q = J();
7315
- (_ !== oe || $ !== Q || K.width !== S || K.height !== q) && (x(), C(K.width), W(K.height));
7309
+ const G = be.size(be.from(B) ?? be.zero), oe = Y(), Q = J();
7310
+ (_ !== oe || $ !== Q || G.width !== S || G.height !== K) && (x(), C(G.width), W(G.height));
7316
7311
  }, [e, a, c, d, g, u]);
7317
7312
  mr(T, {
7318
7313
  onResize: P
7319
7314
  }), Ee(() => {
7320
7315
  const B = ml(T.current?.innerHTML);
7321
7316
  if (B.length === 0) return x();
7322
- const K = B.length;
7323
- for (let oe = 0; oe < K; oe++) {
7317
+ const G = B.length;
7318
+ for (let oe = 0; oe < G; oe++) {
7324
7319
  const Q = B[oe], X = new Image();
7325
7320
  X.src = Q, X.onload = () => x();
7326
7321
  }
@@ -7404,21 +7399,21 @@ const Ni = /* @__PURE__ */ Te(({
7404
7399
  onChange: I,
7405
7400
  ...$
7406
7401
  }, A) => {
7407
- const S = we(null), C = nt(S), q = we(null), W = we(null), [Y, J] = Oe(T ?? [m, g]), x = Nl(m, g, _), [P, E] = Y.map((U) => at(U, m, g, b, C, d, c, a)), M = E - P, B = ze(e, {
7402
+ const S = we(null), C = nt(S), K = we(null), W = we(null), [Y, J] = Oe(T ?? [m, g]), x = Nl(m, g, _), [P, E] = Y.map((U) => at(U, m, g, b, C, d, c, a)), M = E - P, B = ze(e, {
7408
7403
  gutter: En,
7409
7404
  highlight: Nn,
7410
7405
  knob: jt,
7411
7406
  knobContainer: tn,
7412
7407
  label: $t
7413
- }), K = he((U, Z, G) => {
7414
- const fe = b === "horizontal" ? Z : G, ge = at(m, m, g, b, C, d, c, a), ue = at(Y[1], m, g, b, C, d, c, a), Ne = at(U, m, g, b, C, d, c, a) + fe;
7408
+ }), G = he((U, Z, q) => {
7409
+ const fe = b === "horizontal" ? Z : q, ge = at(m, m, g, b, C, d, c, a), ue = at(Y[1], m, g, b, C, d, c, a), Ne = at(U, m, g, b, C, d, c, a) + fe;
7415
7410
  return Lo(Math.max(ge, Math.min(ue, Ne)), m, g, b, C, d, c, a);
7416
- }, [d, c, a, m, g, b, Y[1], be.toString(C)]), oe = he((U, Z, G) => {
7417
- const fe = b === "horizontal" ? Z : G, ge = at(Y[0], m, g, b, C, d, c, a), ue = at(g, m, g, b, C, d, c, a), Ne = at(U, m, g, b, C, d, c, a) + fe;
7411
+ }, [d, c, a, m, g, b, Y[1], be.toString(C)]), oe = he((U, Z, q) => {
7412
+ const fe = b === "horizontal" ? Z : q, ge = at(Y[0], m, g, b, C, d, c, a), ue = at(g, m, g, b, C, d, c, a), Ne = at(U, m, g, b, C, d, c, a) + fe;
7418
7413
  return Lo(Math.max(ge, Math.min(ue, Ne)), m, g, b, C, d, c, a);
7419
- }, [d, c, a, m, g, b, Y[0], be.toString(C)]), { isDragging: Q, isReleasing: X, value: D, setValue: z } = zt(q, {
7414
+ }, [d, c, a, m, g, b, Y[0], be.toString(C)]), { isDragging: Q, isReleasing: X, value: D, setValue: z } = zt(K, {
7420
7415
  initialValue: T?.[0] ?? m,
7421
- transform: K
7416
+ transform: G
7422
7417
  }), { isDragging: te, isReleasing: ne, value: ae, setValue: F } = zt(W, {
7423
7418
  initialValue: T?.[1] ?? g,
7424
7419
  transform: oe
@@ -7448,7 +7443,7 @@ const Ni = /* @__PURE__ */ Te(({
7448
7443
  /* @__PURE__ */ w.jsx(
7449
7444
  me,
7450
7445
  {
7451
- ref: q,
7446
+ ref: K,
7452
7447
  className: R.startKnobContainer,
7453
7448
  disabled: qe([D, ae], [m, m]),
7454
7449
  element: B.knobContainer ?? /* @__PURE__ */ w.jsx(tn, {}),
@@ -7748,7 +7743,7 @@ const _i = /* @__PURE__ */ Te(({
7748
7743
  onDragStart: A,
7749
7744
  onChange: S,
7750
7745
  ...C
7751
- }, q) => {
7746
+ }, K) => {
7752
7747
  const W = we(null), Y = we(null), J = he((te, ne, ae) => {
7753
7748
  const F = be.from(W.current) ?? be.zero, R = a ? 1 - te : te;
7754
7749
  switch (b) {
@@ -7785,7 +7780,7 @@ const _i = /* @__PURE__ */ Te(({
7785
7780
  transform: J,
7786
7781
  onDragStart: A,
7787
7782
  onDragEnd: $
7788
- }), K = a ? 1 - M : M, X = Sl({ orientation: b, isAtEnd: a ? M === 0 : M === 1, isAtStart: a ? M === 1 : M === 0, isDragging: P, isReleasing: E }), D = _l({ orientation: b, isClipped: i, naturalPosition: K, knobPadding: d, knobHeight: u, knobWidth: g, isTrackInteractive: c });
7783
+ }), G = a ? 1 - M : M, X = Sl({ orientation: b, isAtEnd: a ? M === 0 : M === 1, isAtStart: a ? M === 1 : M === 0, isDragging: P, isReleasing: E }), D = _l({ orientation: b, isClipped: i, naturalPosition: G, knobPadding: d, knobHeight: u, knobWidth: g, isTrackInteractive: c });
7789
7784
  Ee(() => {
7790
7785
  P || T === M || B(T);
7791
7786
  }, [T]), Ee(() => {
@@ -7803,7 +7798,7 @@ const _i = /* @__PURE__ */ Te(({
7803
7798
  "div",
7804
7799
  {
7805
7800
  ...C,
7806
- ref: q,
7801
+ ref: K,
7807
7802
  "aria-orientation": b,
7808
7803
  "aria-valuenow": M,
7809
7804
  className: se(r, X.root),
@@ -7815,11 +7810,11 @@ const _i = /* @__PURE__ */ Te(({
7815
7810
  className: se(a ? "end" : "start", X.track),
7816
7811
  element: z.track ?? /* @__PURE__ */ w.jsx(Mt, {}),
7817
7812
  style: ce(D.track, b === "vertical" ? {
7818
- height: `calc(${K * 100}% - ${_ <= 0 ? 0 : u * 0.5}px - ${_}px)`,
7813
+ height: `calc(${G * 100}% - ${_ <= 0 ? 0 : u * 0.5}px - ${_}px)`,
7819
7814
  top: "0"
7820
7815
  } : {
7821
7816
  left: "0",
7822
- width: `calc(${K * 100}% - ${_ <= 0 ? 0 : g * 0.5}px - ${_}px)`
7817
+ width: `calc(${G * 100}% - ${_ <= 0 ? 0 : g * 0.5}px - ${_}px)`
7823
7818
  }),
7824
7819
  onClick: x,
7825
7820
  children: /* @__PURE__ */ w.jsx("div", { style: D.trackHitBox })
@@ -7832,10 +7827,10 @@ const _i = /* @__PURE__ */ Te(({
7832
7827
  element: z.track ?? /* @__PURE__ */ w.jsx(Mt, {}),
7833
7828
  style: ce(D.track, b === "vertical" ? {
7834
7829
  bottom: "0",
7835
- height: `calc(${(1 - K) * 100}% - ${_ <= 0 ? 0 : u * 0.5}px - ${_}px)`
7830
+ height: `calc(${(1 - G) * 100}% - ${_ <= 0 ? 0 : u * 0.5}px - ${_}px)`
7836
7831
  } : {
7837
7832
  right: "0",
7838
- width: `calc(${(1 - K) * 100}% - ${_ <= 0 ? 0 : g * 0.5}px - ${_}px)`
7833
+ width: `calc(${(1 - G) * 100}% - ${_ <= 0 ? 0 : g * 0.5}px - ${_}px)`
7839
7834
  }),
7840
7835
  onClick: x,
7841
7836
  children: /* @__PURE__ */ w.jsx("div", { style: D.trackHitBox })
@@ -7994,24 +7989,24 @@ const Ti = /* @__PURE__ */ Te(({
7994
7989
  onDragEnd: A,
7995
7990
  onDragStart: S,
7996
7991
  onIndexChange: C,
7997
- onPositionChange: q,
7992
+ onPositionChange: K,
7998
7993
  ...W
7999
7994
  }, Y) => {
8000
7995
  const J = we(null), x = we(null), P = nt(J), [E, M] = Oe(i), B = he((k, U, Z) => {
8001
- const G = c ? tt(k) : k;
7996
+ const q = c ? tt(k) : k;
8002
7997
  switch (_) {
8003
7998
  case "horizontal": {
8004
- const fe = a ? P.width - m : P.width, ge = G * fe + U, ue = Qt(ge / fe);
7999
+ const fe = a ? P.width - m : P.width, ge = q * fe + U, ue = Qt(ge / fe);
8005
8000
  return c ? tt(ue) : ue;
8006
8001
  }
8007
8002
  case "vertical": {
8008
- const fe = a ? P.height - d : P.height, ge = G * fe + Z, ue = Qt(ge / fe);
8003
+ const fe = a ? P.height - d : P.height, ge = q * fe + Z, ue = Qt(ge / fe);
8009
8004
  return c ? tt(ue) : ue;
8010
8005
  }
8011
8006
  default:
8012
8007
  return console.error(`[etudes::StepSlider] Invalid orientation: ${_}`), NaN;
8013
8008
  }
8014
- }, [P.width, P.height, a, c, m, d, _]), { isDragging: K, isReleasing: oe, value: Q, setValue: X } = zt(x, {
8009
+ }, [P.width, P.height, a, c, m, d, _]), { isDragging: G, isReleasing: oe, value: Q, setValue: X } = zt(x, {
8015
8010
  initialValue: dt(i, I),
8016
8011
  transform: B,
8017
8012
  onDragStart: S,
@@ -8021,18 +8016,18 @@ const Ti = /* @__PURE__ */ Te(({
8021
8016
  const U = be.fromViewport();
8022
8017
  switch (_) {
8023
8018
  case "horizontal": {
8024
- const Z = (k.clientX + U.left - P.left) / P.width, G = c ? tt(Z) : Z, fe = It(G, I);
8019
+ const Z = (k.clientX + U.left - P.left) / P.width, q = c ? tt(Z) : Z, fe = It(q, I);
8025
8020
  if (fe === E) {
8026
- const ge = G > Q ? fe + 1 : fe - 1;
8021
+ const ge = q > Q ? fe + 1 : fe - 1;
8027
8022
  M(Qt(ge, I.length - 1));
8028
8023
  } else
8029
8024
  M(fe);
8030
8025
  break;
8031
8026
  }
8032
8027
  case "vertical": {
8033
- const Z = (k.clientY + U.top - P.top) / P.height, G = c ? tt(Z) : Z, fe = It(G, I);
8028
+ const Z = (k.clientY + U.top - P.top) / P.height, q = c ? tt(Z) : Z, fe = It(q, I);
8034
8029
  if (fe === E) {
8035
- const ge = G > Q ? fe + 1 : fe - 1, ue = dt(ge, I);
8030
+ const ge = q > Q ? fe + 1 : fe - 1, ue = dt(ge, I);
8036
8031
  X(ue), M(Qt(ge, I.length - 1));
8037
8032
  } else {
8038
8033
  const ge = dt(fe, I);
@@ -8043,27 +8038,27 @@ const Ti = /* @__PURE__ */ Te(({
8043
8038
  default:
8044
8039
  console.error(`[etudes::StepSlider] Invalid orientation: ${_}`);
8045
8040
  }
8046
- }, [P.width, P.left, P.top, P.height, E, Q, c, u, _, We(I)]), z = c ? tt(Q) : Q, ae = Tl({ orientation: _, isAtEnd: c ? Q === 0 : Q === 1, isAtStart: c ? Q === 1 : Q === 0, isDragging: K, isReleasing: oe }), F = Ol({ orientation: _, naturalPosition: z, isClipped: a, knobPadding: g, knobHeight: d, knobWidth: m, isTrackInteractive: u }), R = ze(e, {
8041
+ }, [P.width, P.left, P.top, P.height, E, Q, c, u, _, We(I)]), z = c ? tt(Q) : Q, ae = Tl({ orientation: _, isAtEnd: c ? Q === 0 : Q === 1, isAtStart: c ? Q === 1 : Q === 0, isDragging: G, isReleasing: oe }), F = Ol({ orientation: _, naturalPosition: z, isClipped: a, knobPadding: g, knobHeight: d, knobWidth: m, isTrackInteractive: u }), R = ze(e, {
8047
8042
  knob: Pn,
8048
8043
  knobContainer: In,
8049
8044
  label: kn,
8050
8045
  track: Rt
8051
8046
  });
8052
8047
  return Ee(() => {
8053
- K || (X(dt(i, I)), M(i));
8054
- }, [i, K, We(I)]), Ee(() => {
8055
- if (K) {
8048
+ G || (X(dt(i, I)), M(i));
8049
+ }, [i, G, We(I)]), Ee(() => {
8050
+ if (G) {
8056
8051
  if (T) return;
8057
8052
  M(It(Q, I));
8058
8053
  } else {
8059
8054
  const k = It(Q, I), U = dt(k, I);
8060
8055
  X(U), M(k);
8061
8056
  }
8062
- }, [Q, K, T, We(I)]), Ee(() => {
8063
- q?.(Q, K);
8064
- }, [Q, K]), Ee(() => {
8065
- C?.(E, K);
8066
- }, [E, K]), /* @__PURE__ */ w.jsx(
8057
+ }, [Q, G, T, We(I)]), Ee(() => {
8058
+ K?.(Q, G);
8059
+ }, [Q, G]), Ee(() => {
8060
+ C?.(E, G);
8061
+ }, [E, G]), /* @__PURE__ */ w.jsx(
8067
8062
  "div",
8068
8063
  {
8069
8064
  ...W,
@@ -8293,11 +8288,11 @@ const Pl = /* @__PURE__ */ Te(({
8293
8288
  if (x === void 0) return;
8294
8289
  const P = x.x !== Y || x.y !== J, E = !isNaN($);
8295
8290
  P && (E || A(Date.now()), I(_e.make(Y, J)));
8296
- }, q = () => {
8291
+ }, K = () => {
8297
8292
  const Y = $, J = b, x = _;
8298
8293
  if (isNaN(Y) || J === void 0 || x === void 0) return;
8299
- const P = Date.now() - Y, E = x.x - J.x, M = x.y - J.y, B = E / P, K = M / P;
8300
- r && (Math.abs(B) >= i && Math.abs(B) > Math.abs(K) ? B > 0 ? u?.() : c?.() : Math.abs(K) >= i && Math.abs(K) > Math.abs(B) && (K > 0 ? a?.() : d?.())), W();
8294
+ const P = Date.now() - Y, E = x.x - J.x, M = x.y - J.y, B = E / P, G = M / P;
8295
+ r && (Math.abs(B) >= i && Math.abs(B) > Math.abs(G) ? B > 0 ? u?.() : c?.() : Math.abs(G) >= i && Math.abs(G) > Math.abs(B) && (G > 0 ? a?.() : d?.())), W();
8301
8296
  }, W = () => {
8302
8297
  T(void 0), I(void 0), A(NaN);
8303
8298
  };
@@ -8309,8 +8304,8 @@ const Pl = /* @__PURE__ */ Te(({
8309
8304
  onMouseDown: (Y) => S(Y.clientX, Y.clientY),
8310
8305
  onMouseLeave: () => W(),
8311
8306
  onMouseMove: (Y) => C(Y.clientX, Y.clientY),
8312
- onMouseUp: () => q(),
8313
- onTouchEnd: () => q(),
8307
+ onMouseUp: () => K(),
8308
+ onTouchEnd: () => K(),
8314
8309
  onTouchMove: (Y) => C(Y.targetTouches[0].clientX, Y.targetTouches[0].clientY),
8315
8310
  onTouchStart: (Y) => S(Y.targetTouches[0].clientX, Y.targetTouches[0].clientY),
8316
8311
  children: e
@@ -8436,7 +8431,10 @@ function $l({
8436
8431
  return /* @__PURE__ */ w.jsx(w.Fragment, { children: jn.map(e, (i) => An(i) ? gr(i, { ...r }) : i) });
8437
8432
  }
8438
8433
  process.env.NODE_ENV === "development" && ($l.displayName = "ExtractChildren");
8439
- function fu({
8434
+ function fu() {
8435
+ return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
8436
+ }
8437
+ function du({
8440
8438
  children: e,
8441
8439
  fallback: r = void 0
8442
8440
  }) {
@@ -8468,7 +8466,7 @@ export {
8468
8466
  qo as Image,
8469
8467
  on as ImageSource,
8470
8468
  pl as MasonryGrid,
8471
- fu as NoSSR,
8469
+ du as NoSSR,
8472
8470
  ca as OptionButton,
8473
8471
  ti as Panorama,
8474
8472
  Fl as PanoramaSlider,
@@ -8502,28 +8500,29 @@ export {
8502
8500
  Aa as createLocalCache,
8503
8501
  Va as createSessionCache,
8504
8502
  Ya as getStyle,
8503
+ fu as getSystemColorScheme,
8505
8504
  $a as isTouchDevice,
8506
8505
  To as setStyle,
8507
8506
  ce as styles,
8508
- Dl as useAgent,
8509
- Bl as useClassName,
8510
- Hl as useClickOutside,
8511
- Yl as useCopyBlobToClipboard,
8512
- Ul as useDPR,
8513
- Xl as useDownloadBlob,
8507
+ Dl as useClassName,
8508
+ Bl as useClickOutside,
8509
+ Hl as useCopyBlobToClipboard,
8510
+ Xl as useDPR,
8511
+ Yl as useDownloadBlob,
8514
8512
  ka as useDrag,
8515
- Kl as useDropzone,
8513
+ Ul as useDropzone,
8516
8514
  Qs as useImageLoader,
8517
8515
  Go as useImageSize,
8518
8516
  ga as useInertiaDrag,
8519
8517
  zt as useInertiaDragValue,
8520
8518
  Js as useIntersectionObserver,
8521
8519
  Ca as useInterval,
8522
- Gl as useIsMounted,
8520
+ Kl as useIsMounted,
8523
8521
  ja as useIsTouchDevice,
8524
- ql as useKeyboardShortcut,
8522
+ Gl as useKeyboardShortcut,
8525
8523
  Se as useLatest,
8526
- Wl as useLocalCache,
8524
+ ql as useLocalCache,
8525
+ Wl as useOS,
8527
8526
  Jl as usePosition,
8528
8527
  Fa as usePrevious,
8529
8528
  nt as useRect,