@aiquants/virtualscroll 3.8.0 → 3.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsx as J, jsxs as Ut, Fragment as Qr } from "react/jsx-runtime";
2
- import kn, { memo as Hn, forwardRef as Or, useState as Ae, useRef as f, useCallback as b, useImperativeHandle as _r, useMemo as we, useLayoutEffect as Je, useEffect as q, useId as $n, createElement as Hr } from "react";
3
- import { twMerge as At } from "tailwind-merge";
4
- const Tn = ["en", "ja"], Wr = ["scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollToTop", "scrollToBottom", "noItems"], Xn = Object.freeze({
1
+ import { jsx as j, jsxs as Bt, Fragment as jr } from "react/jsx-runtime";
2
+ import Hn, { memo as $n, forwardRef as Ar, useState as Ce, useRef as f, useCallback as x, useImperativeHandle as Dr, useMemo as ve, useLayoutEffect as Qe, useEffect as $, useId as Xn, useSyncExternalStore as qn, createElement as _r } from "react";
3
+ import { twMerge as Ct } from "tailwind-merge";
4
+ const yn = ["en", "ja"], qr = ["scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollToTop", "scrollToBottom", "noItems"], Yn = Object.freeze({
5
5
  en: Object.freeze({
6
6
  scrollUp: "Scroll up",
7
7
  scrollDown: "Scroll down",
@@ -20,38 +20,38 @@ const Tn = ["en", "ja"], Wr = ["scrollUp", "scrollDown", "scrollLeft", "scrollRi
20
20
  scrollToBottom: "末尾へ",
21
21
  noItems: "項目がありません"
22
22
  })
23
- }), qn = (t) => Tn.includes(t), Ur = (t) => typeof t == "string" ? JSON.stringify(t) : t === null ? "null" : typeof t, Yn = (t) => {
23
+ }), Bn = (t) => yn.includes(t), Yr = (t) => typeof t == "string" ? JSON.stringify(t) : t === null ? "null" : typeof t, Wn = (t) => {
24
24
  if (t === void 0)
25
25
  return "en";
26
- if (qn(t))
26
+ if (Bn(t))
27
27
  return t;
28
- const e = Tn.map((r) => JSON.stringify(r)).join(", ");
29
- throw new RangeError(`[virtualscroll] locale must be one of ${e}; got ${Ur(t)}`);
30
- }, Bn = (t) => Wr.includes(t), Rn = (t, e) => {
31
- const r = Xn[Yn(t)];
28
+ const e = yn.map((r) => JSON.stringify(r)).join(", ");
29
+ throw new RangeError(`[virtualscroll] locale must be one of ${e}; got ${Yr(t)}`);
30
+ }, Un = (t) => qr.includes(t), In = (t, e) => {
31
+ const r = Yn[Wn(t)];
32
32
  if (e === void 0)
33
33
  return r;
34
34
  if (e === null || typeof e != "object")
35
- throw new RangeError(`[virtualscroll] labels must be an object; got ${Ur(e)}`);
35
+ throw new RangeError(`[virtualscroll] labels must be an object; got ${Yr(e)}`);
36
36
  const n = Object.getPrototypeOf(e);
37
37
  if (n !== Object.prototype && n !== null)
38
38
  throw new RangeError(`[virtualscroll] labels must be a plain object (prototype Object.prototype or null); got ${Array.isArray(e) ? "an array" : "an object with a non-plain prototype"}`);
39
39
  const i = new Set(Object.keys(e));
40
40
  for (const o of i)
41
- if (!Bn(o))
42
- throw new RangeError(`[virtualscroll] labels.${o} is not a known label key; expected one of ${Wr.join(", ")}`);
41
+ if (!Un(o))
42
+ throw new RangeError(`[virtualscroll] labels.${o} is not a known label key; expected one of ${qr.join(", ")}`);
43
43
  const s = { ...r };
44
- for (const o of Wr) {
44
+ for (const o of qr) {
45
45
  const l = i.has(o) ? e[o] : void 0;
46
46
  if (l !== void 0) {
47
47
  if (typeof l != "string" || l.trim() === "")
48
- throw new RangeError(`[virtualscroll] labels.${o} must be a non-blank string; got ${Ur(l)}`);
48
+ throw new RangeError(`[virtualscroll] labels.${o} must be a non-blank string; got ${Yr(l)}`);
49
49
  s[o] = l;
50
50
  }
51
51
  }
52
52
  return Object.freeze(s);
53
53
  };
54
- class A {
54
+ class C {
55
55
  level;
56
56
  prefix;
57
57
  impl;
@@ -64,7 +64,7 @@ class A {
64
64
  constructor(e = 2, r = "[virtualscroll]", n = console) {
65
65
  this.level = e, this.prefix = r, this.impl = n;
66
66
  }
67
- static instance = new A(2, "[virtualscroll]");
67
+ static instance = new C(2, "[virtualscroll]");
68
68
  /**
69
69
  * @method setLevel
70
70
  * @description Updates the current log level for the static instance.
@@ -72,7 +72,7 @@ class A {
72
72
  * @param {LogLevel} level - The new log level.
73
73
  */
74
74
  static setLevel(e) {
75
- A.instance.setLevel(e);
75
+ C.instance.setLevel(e);
76
76
  }
77
77
  /**
78
78
  * @method setLevel
@@ -90,7 +90,7 @@ class A {
90
90
  * @param {ILogger} impl - The new logger implementation.
91
91
  */
92
92
  static setImplementation(e) {
93
- A.instance.setImplementation(e);
93
+ C.instance.setImplementation(e);
94
94
  }
95
95
  /**
96
96
  * @method setImplementation
@@ -108,7 +108,7 @@ class A {
108
108
  * @param {string} prefix - The new prefix.
109
109
  */
110
110
  static setPrefix(e) {
111
- A.instance.setPrefix(e);
111
+ C.instance.setPrefix(e);
112
112
  }
113
113
  /**
114
114
  * @method setPrefix
@@ -127,7 +127,7 @@ class A {
127
127
  * @returns {boolean} True if a message at `level` would be emitted. / `level` のメッセージが出力されるなら true。
128
128
  */
129
129
  static isEnabled(e) {
130
- return A.instance.isEnabled(e);
130
+ return C.instance.isEnabled(e);
131
131
  }
132
132
  /**
133
133
  * @method isEnabled
@@ -172,51 +172,51 @@ class A {
172
172
  return typeof e == "string" ? [`${this.prefix} ${e}`] : [this.prefix, e];
173
173
  }
174
174
  static debug(e, ...r) {
175
- A.instance.debug(e, ...r);
175
+ C.instance.debug(e, ...r);
176
176
  }
177
177
  debug(e, ...r) {
178
- this.level <= 0 && this.impl.debug(...this.formatMessage(A.resolveLazy(e)), ...r.map(A.resolveLazy));
178
+ this.level <= 0 && this.impl.debug(...this.formatMessage(C.resolveLazy(e)), ...r.map(C.resolveLazy));
179
179
  }
180
180
  static info(e, ...r) {
181
- A.instance.info(e, ...r);
181
+ C.instance.info(e, ...r);
182
182
  }
183
183
  info(e, ...r) {
184
- this.level <= 1 && this.impl.info(...this.formatMessage(A.resolveLazy(e)), ...r.map(A.resolveLazy));
184
+ this.level <= 1 && this.impl.info(...this.formatMessage(C.resolveLazy(e)), ...r.map(C.resolveLazy));
185
185
  }
186
186
  static warn(e, ...r) {
187
- A.instance.warn(e, ...r);
187
+ C.instance.warn(e, ...r);
188
188
  }
189
189
  warn(e, ...r) {
190
- this.level <= 2 && this.impl.warn(...this.formatMessage(A.resolveLazy(e)), ...r.map(A.resolveLazy));
190
+ this.level <= 2 && this.impl.warn(...this.formatMessage(C.resolveLazy(e)), ...r.map(C.resolveLazy));
191
191
  }
192
192
  static error(e, ...r) {
193
- A.instance.error(e, ...r);
193
+ C.instance.error(e, ...r);
194
194
  }
195
195
  error(e, ...r) {
196
- this.level <= 3 && this.impl.error(...this.formatMessage(A.resolveLazy(e)), ...r.map(A.resolveLazy));
196
+ this.level <= 3 && this.impl.error(...this.formatMessage(C.resolveLazy(e)), ...r.map(C.resolveLazy));
197
197
  }
198
198
  }
199
- const Pn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePointerCapture == "function" && typeof t.hasPointerCapture == "function", En = (t, e) => Pn(t) && t.hasPointerCapture(e), yr = (t, e) => {
200
- if (!Pn(t))
199
+ const Tn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePointerCapture == "function" && typeof t.hasPointerCapture == "function", Rn = (t, e) => Tn(t) && t.hasPointerCapture(e), Sr = (t, e) => {
200
+ if (!Tn(t))
201
201
  return "unsupported";
202
202
  try {
203
203
  return t.setPointerCapture(e), "captured";
204
204
  } catch (r) {
205
205
  return (typeof r == "object" && r !== null && "name" in r ? r.name : void 0) === "NotFoundError" ? "inactive-pointer" : "rejected";
206
206
  }
207
- }, or = (t, e) => {
208
- En(t, e) && t.releasePointerCapture(e);
209
- }, ln = {
207
+ }, rr = (t, e) => {
208
+ Rn(t, e) && t.releasePointerCapture(e);
209
+ }, an = {
210
210
  active: !1,
211
211
  offsetX: 0,
212
212
  offsetY: 0,
213
213
  distance: 0,
214
214
  direction: 0,
215
215
  pointerId: null
216
- }, Ar = 6, Wn = 8, Un = ({ dragState: t, normalizedDistance: e }) => {
216
+ }, zr = 6, Gn = 8, jn = ({ dragState: t, normalizedDistance: e }) => {
217
217
  const r = 1 + e * 0.18, n = 0.16 + e * 0.24, i = 0.38 + e * 0.28, s = t.active ? "80ms ease-out" : "220ms ease";
218
- return /* @__PURE__ */ Ut(Qr, { children: [
219
- /* @__PURE__ */ J(
218
+ return /* @__PURE__ */ Bt(jr, { children: [
219
+ /* @__PURE__ */ j(
220
220
  "div",
221
221
  {
222
222
  className: "aqvs-tap-scroll-circle-visual-outer",
@@ -228,7 +228,7 @@ const Pn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePo
228
228
  }
229
229
  }
230
230
  ),
231
- /* @__PURE__ */ J(
231
+ /* @__PURE__ */ j(
232
232
  "div",
233
233
  {
234
234
  className: "aqvs-tap-scroll-circle-inner",
@@ -241,92 +241,92 @@ const Pn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePo
241
241
  }
242
242
  )
243
243
  ] });
244
- }, Jr = Hn(
245
- Or(({ onDragChange: t, className: e, maxVisualDistance: r = 160, size: n = 40, style: i, opacity: s = 1, renderVisual: o, axis: l = "y" }, d) => {
246
- const [m, v] = Ae(ln), M = f(null), y = f(null), w = f({ x: 0, y: 0 }), R = f(null), ne = f(0), Y = b(
244
+ }, Kr = $n(
245
+ Ar(({ onDragChange: t, className: e, maxVisualDistance: r = 160, size: n = 40, style: i, opacity: s = 1, renderVisual: o, axis: l = "y" }, d) => {
246
+ const [h, b] = Ce(an), M = f(null), I = f(null), w = f({ x: 0, y: 0 }), R = f(null), ne = f(0), X = x(
247
247
  (z) => {
248
- v(z), t(z);
248
+ b(z), t(z);
249
249
  },
250
250
  [t]
251
- ), pe = b(
252
- (z, W, ie = !1) => {
253
- const { x: tt, y: ce } = w.current, Me = z - tt, Ct = W - ce;
251
+ ), pe = x(
252
+ (z, Y, ie = !1) => {
253
+ const { x: et, y: ce } = w.current, Se = z - et, At = Y - ce;
254
254
  let ue, le;
255
255
  if (l === "xy")
256
- ue = Math.hypot(Me, Ct), le = ue < Ar ? 0 : 1;
256
+ ue = Math.hypot(Se, At), le = ue < zr ? 0 : 1;
257
257
  else {
258
- const _e = l === "x" ? Me : Ct;
259
- ue = Math.abs(_e), le = ue < Ar ? 0 : _e < 0 ? -1 : 1;
258
+ const _e = l === "x" ? Se : At;
259
+ ue = Math.abs(_e), le = ue < zr ? 0 : _e < 0 ? -1 : 1;
260
260
  }
261
261
  const vt = ne.current;
262
- let st = le;
263
- const lt = Ar + Wn;
264
- le === 0 ? vt !== 0 && ue < lt ? st = vt : (st = 0, ie || (ne.current = 0)) : le !== vt && vt !== 0 && ue < lt ? st = vt : ne.current = le, Y({
265
- active: ie || ue >= Ar,
266
- offsetX: Me,
267
- offsetY: Ct,
262
+ let it = le;
263
+ const ct = zr + Gn;
264
+ le === 0 ? vt !== 0 && ue < ct ? it = vt : (it = 0, ie || (ne.current = 0)) : le !== vt && vt !== 0 && ue < ct ? it = vt : ne.current = le, X({
265
+ active: ie || ue >= zr,
266
+ offsetX: Se,
267
+ offsetY: At,
268
268
  distance: ue,
269
- direction: st,
269
+ direction: it,
270
270
  pointerId: M.current
271
271
  });
272
272
  },
273
- [Y, l]
274
- ), Ce = b((z) => {
273
+ [X, l]
274
+ ), Ae = x((z) => {
275
275
  if (z === null)
276
276
  return;
277
- const W = R.current;
278
- W !== null && or(W, z);
279
- }, []), D = b(
277
+ const Y = R.current;
278
+ Y !== null && rr(Y, z);
279
+ }, []), D = x(
280
280
  (z = !1) => {
281
- z && Ce(M.current), M.current = null, y.current = null, ne.current = 0, Y(ln);
281
+ z && Ae(M.current), M.current = null, I.current = null, ne.current = 0, X(an);
282
282
  },
283
- [Y, Ce]
284
- ), H = b(
283
+ [X, Ae]
284
+ ), k = x(
285
285
  (z) => {
286
286
  if (M.current !== null && M.current !== z.pointerId) {
287
- y.current = { pointerId: z.pointerId, clientX: z.clientX, clientY: z.clientY }, z.preventDefault(), z.stopPropagation();
287
+ I.current = { pointerId: z.pointerId, clientX: z.clientX, clientY: z.clientY }, z.preventDefault(), z.stopPropagation();
288
288
  return;
289
289
  }
290
290
  z.preventDefault(), z.stopPropagation();
291
- const W = R.current ?? z.currentTarget, { left: ie, top: tt, width: ce, height: Me } = W.getBoundingClientRect();
292
- w.current = { x: ie + ce / 2, y: tt + Me / 2 }, M.current = z.pointerId, yr(W, z.pointerId), pe(z.clientX, z.clientY, !0);
291
+ const Y = R.current ?? z.currentTarget, { left: ie, top: et, width: ce, height: Se } = Y.getBoundingClientRect();
292
+ w.current = { x: ie + ce / 2, y: et + Se / 2 }, M.current = z.pointerId, Sr(Y, z.pointerId), pe(z.clientX, z.clientY, !0);
293
293
  },
294
294
  [pe]
295
- ), ae = b(
295
+ ), ae = x(
296
296
  (z) => {
297
297
  if (M.current !== z.pointerId) {
298
- y.current !== null && y.current.pointerId === z.pointerId && (y.current = { pointerId: z.pointerId, clientX: z.clientX, clientY: z.clientY });
298
+ I.current !== null && I.current.pointerId === z.pointerId && (I.current = { pointerId: z.pointerId, clientX: z.clientX, clientY: z.clientY });
299
299
  return;
300
300
  }
301
301
  z.preventDefault(), pe(z.clientX, z.clientY);
302
302
  },
303
303
  [pe]
304
- ), L = b(
304
+ ), L = x(
305
305
  (z) => {
306
306
  if (M.current !== z.pointerId) {
307
- y.current !== null && y.current.pointerId === z.pointerId && (y.current = null);
307
+ I.current !== null && I.current.pointerId === z.pointerId && (I.current = null);
308
308
  return;
309
309
  }
310
310
  z.preventDefault(), z.stopPropagation();
311
- const W = y.current;
312
- if (y.current = null, W !== null) {
313
- Ce(z.pointerId);
311
+ const Y = I.current;
312
+ if (I.current = null, Y !== null) {
313
+ Ae(z.pointerId);
314
314
  const ie = R.current;
315
- if (ie === null || yr(ie, W.pointerId) !== "inactive-pointer") {
316
- M.current = W.pointerId, pe(W.clientX, W.clientY, !0);
315
+ if (ie === null || Sr(ie, Y.pointerId) !== "inactive-pointer") {
316
+ M.current = Y.pointerId, pe(Y.clientX, Y.clientY, !0);
317
317
  return;
318
318
  }
319
319
  }
320
320
  D(!0);
321
321
  },
322
- [D, Ce, pe]
323
- ), N = b(
322
+ [D, Ae, pe]
323
+ ), N = x(
324
324
  (z) => {
325
325
  z.target === z.currentTarget && M.current === z.pointerId && D(!1);
326
326
  },
327
327
  [D]
328
328
  );
329
- _r(
329
+ Dr(
330
330
  d,
331
331
  () => ({
332
332
  reset: () => {
@@ -336,67 +336,67 @@ const Pn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePo
336
336
  }),
337
337
  [D]
338
338
  );
339
- const P = Math.min(Math.max(s, 0), 1), ee = n / 64, K = Math.min(m.distance, r) / r, B = m.direction * K * 10 * ee;
339
+ const P = Math.min(Math.max(s, 0), 1), J = n / 64, K = Math.min(h.distance, r) / r, q = h.direction * K * 10 * J;
340
340
  let oe;
341
341
  if (l === "xy") {
342
- const z = m.distance, W = z === 0 ? 0 : B * m.offsetX / z, ie = z === 0 ? 0 : B * m.offsetY / z;
343
- oe = `translate(${W}px, ${ie}px)`;
344
- } else l === "x" ? oe = `translateX(${B}px)` : oe = `translateY(${B}px)`;
345
- const te = o ?? Un, ge = {
346
- dragState: m,
342
+ const z = h.distance, Y = z === 0 ? 0 : q * h.offsetX / z, ie = z === 0 ? 0 : q * h.offsetY / z;
343
+ oe = `translate(${Y}px, ${ie}px)`;
344
+ } else l === "x" ? oe = `translateX(${q}px)` : oe = `translateY(${q}px)`;
345
+ const ee = o ?? jn, ge = {
346
+ dragState: h,
347
347
  normalizedDistance: K,
348
- sizeScale: ee,
348
+ sizeScale: J,
349
349
  size: n,
350
350
  opacity: P
351
- }, et = {
351
+ }, Je = {
352
352
  ...i,
353
353
  width: n,
354
354
  height: n,
355
355
  transform: oe
356
356
  };
357
- return et.opacity = P, /* @__PURE__ */ J(
357
+ return Je.opacity = P, /* @__PURE__ */ j(
358
358
  "div",
359
359
  {
360
360
  ref: R,
361
361
  "data-testid": "virtual-scroll-tap-circle",
362
- className: At("aqvs-tap-scroll-circle", e),
363
- style: et,
362
+ className: Ct("aqvs-tap-scroll-circle", e),
363
+ style: Je,
364
364
  tabIndex: -1,
365
- onPointerDown: H,
365
+ onPointerDown: k,
366
366
  onPointerMove: ae,
367
367
  onPointerUp: L,
368
368
  onPointerCancel: L,
369
369
  onLostPointerCapture: N,
370
370
  role: "presentation",
371
- children: te(ge)
371
+ children: ee(ge)
372
372
  }
373
373
  );
374
374
  })
375
375
  );
376
- Jr.displayName = "TapScrollCircle";
377
- const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
378
- const r = e === "x", n = t.getBoundingClientRect(), i = r ? n.width : n.height, s = (v) => {
379
- const M = Number.parseFloat(v);
376
+ Kr.displayName = "TapScrollCircle";
377
+ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Br = (t, e) => {
378
+ const r = e === "x", n = t.getBoundingClientRect(), i = r ? n.width : n.height, s = (b) => {
379
+ const M = Number.parseFloat(b);
380
380
  return Number.isFinite(M) ? M : 0;
381
- }, o = window.getComputedStyle(t), l = s(r ? o.width : o.height), d = l > 0 ? l + s(r ? o.paddingLeft : o.paddingTop) + s(r ? o.paddingRight : o.paddingBottom) + s(r ? o.borderLeftWidth : o.borderTopWidth) + s(r ? o.borderRightWidth : o.borderBottomWidth) : 0, m = d > 0 ? d : r ? t.offsetWidth : t.offsetHeight;
382
- return m <= 0 || i <= 0 ? 1 : i / m;
383
- }, Tr = "virtualscroll:tap-scroll-cancel", un = 20, Gn = 250, jn = 60, Kn = 20, Zn = 20, zn = {
381
+ }, o = window.getComputedStyle(t), l = s(r ? o.width : o.height), d = l > 0 ? l + s(r ? o.paddingLeft : o.paddingTop) + s(r ? o.paddingRight : o.paddingBottom) + s(r ? o.borderLeftWidth : o.borderTopWidth) + s(r ? o.borderRightWidth : o.borderBottomWidth) : 0, h = d > 0 ? d : r ? t.offsetWidth : t.offsetHeight;
382
+ return h <= 0 || i <= 0 ? 1 : i / h;
383
+ }, Mr = "virtualscroll:tap-scroll-cancel", cn = 20, Kn = 250, Zn = 60, Qn = 20, Jn = 20, Pn = {
384
384
  /** 速度が最大に達する引き距離 (px)。`maxVisualDistance` の既定値。 */
385
385
  maxDistance: 240,
386
386
  /** 最小速度倍率 (ビューポート比)。 */
387
387
  minSpeedMultiplier: 0.2
388
- }, Qn = zn.maxDistance, dn = { active: !1, offsetX: 0, offsetY: 0, distance: 0, direction: 0, pointerId: null }, $r = 2.2, Jn = 8, ei = 120, Nn = 1 / 10, Wt = {
388
+ }, ei = Pn.maxDistance, ln = { active: !1, offsetX: 0, offsetY: 0, distance: 0, direction: 0, pointerId: null }, Fr = 2.2, ti = 8, ri = 120, En = 1 / 10, Yt = {
389
389
  enabled: !0,
390
390
  size: 40,
391
391
  offsetX: -80,
392
392
  offsetY: 0,
393
393
  className: void 0,
394
- maxVisualDistance: Qn,
395
- minSpeedMultiplier: zn.minSpeedMultiplier,
394
+ maxVisualDistance: ei,
395
+ minSpeedMultiplier: Pn.minSpeedMultiplier,
396
396
  opacity: 0.9,
397
397
  renderVisual: void 0,
398
398
  maxSpeedCurve: void 0
399
- }, ti = (t) => t ? {
399
+ }, ni = (t) => t ? {
400
400
  mainSizeKey: "width",
401
401
  crossSizeKey: "height",
402
402
  positionKey: "left",
@@ -414,70 +414,70 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
414
414
  arrowIcons: ["▲", "▼"],
415
415
  directionClass: "aqvs-scrollbar-vertical",
416
416
  orientation: "vertical"
417
- }, jr = (t, e) => {
418
- const r = t?.maxSpeedMultiplier, n = typeof r == "number" ? r : si(e);
417
+ }, Wr = (t, e) => {
418
+ const r = t?.maxSpeedMultiplier, n = typeof r == "number" ? r : ai(e);
419
419
  return {
420
- enabled: t?.enabled ?? Wt.enabled,
421
- size: t?.size ?? Wt.size,
422
- offsetX: t?.offsetX ?? Wt.offsetX,
423
- offsetY: t?.offsetY ?? Wt.offsetY,
424
- className: t?.className ?? Wt.className,
425
- maxVisualDistance: t?.maxVisualDistance ?? Wt.maxVisualDistance,
420
+ enabled: t?.enabled ?? Yt.enabled,
421
+ size: t?.size ?? Yt.size,
422
+ offsetX: t?.offsetX ?? Yt.offsetX,
423
+ offsetY: t?.offsetY ?? Yt.offsetY,
424
+ className: t?.className ?? Yt.className,
425
+ maxVisualDistance: t?.maxVisualDistance ?? Yt.maxVisualDistance,
426
426
  maxSpeedMultiplier: n,
427
- minSpeedMultiplier: Math.max(t?.minSpeedMultiplier ?? Wt.minSpeedMultiplier, 0),
428
- opacity: se(t?.opacity ?? Wt.opacity, 0, 1),
429
- renderVisual: t?.renderVisual ?? Wt.renderVisual,
430
- maxSpeedCurve: t?.maxSpeedCurve ?? Wt.maxSpeedCurve
427
+ minSpeedMultiplier: Math.max(t?.minSpeedMultiplier ?? Yt.minSpeedMultiplier, 0),
428
+ opacity: se(t?.opacity ?? Yt.opacity, 0, 1),
429
+ renderVisual: t?.renderVisual ?? Yt.renderVisual,
430
+ maxSpeedCurve: t?.maxSpeedCurve ?? Yt.maxSpeedCurve
431
431
  };
432
- }, ri = ({ isDragging: t, isThumbHovered: e, enableThumbDrag: r }) => we(() => r ? t ? "dragging" : e ? "hover" : "idle" : "disabled", [r, t, e]), ni = ({ canUseArrowButtons: t, enableArrowButtons: e, resetTapScroll: r, scrollByStep: n }) => {
433
- const i = f(null), s = f(null), o = f(null), l = b(() => {
432
+ }, ii = ({ isDragging: t, isThumbHovered: e, enableThumbDrag: r }) => ve(() => r ? t ? "dragging" : e ? "hover" : "idle" : "disabled", [r, t, e]), si = ({ canUseArrowButtons: t, enableArrowButtons: e, resetTapScroll: r, scrollByStep: n }) => {
433
+ const i = f(null), s = f(null), o = f(null), l = x(() => {
434
434
  i.current !== null && (window.clearInterval(i.current), i.current = null), s.current !== null && (window.clearTimeout(s.current), s.current = null), o.current !== null && (window.removeEventListener("pointerup", o.current), window.removeEventListener("pointercancel", o.current), window.removeEventListener("blur", o.current), o.current = null);
435
- }, []), d = b(() => {
435
+ }, []), d = x(() => {
436
436
  l();
437
- }, [l]), m = b(
438
- (M) => (y) => {
437
+ }, [l]), h = x(
438
+ (M) => (I) => {
439
439
  if (!t)
440
440
  return;
441
- y.cancelable && y.preventDefault(), y.stopPropagation(), r(), l(), n(M), s.current = window.setTimeout(() => {
441
+ I.cancelable && I.preventDefault(), I.stopPropagation(), r(), l(), n(M), s.current = window.setTimeout(() => {
442
442
  i.current = window.setInterval(() => {
443
443
  n(M);
444
- }, jn);
445
- }, Gn);
444
+ }, Zn);
445
+ }, Kn);
446
446
  const w = () => l();
447
447
  o.current = w, window.addEventListener("pointerup", w), window.addEventListener("pointercancel", w), window.addEventListener("blur", w);
448
448
  },
449
449
  [t, l, r, n]
450
- ), v = b(
451
- (M) => (y) => {
452
- e && (y.key === "Enter" || y.key === " " || y.key === "Spacebar") && (y.preventDefault(), n(M));
450
+ ), b = x(
451
+ (M) => (I) => {
452
+ e && (I.key === "Enter" || I.key === " " || I.key === "Spacebar") && (I.preventDefault(), n(M));
453
453
  },
454
454
  [e, n]
455
455
  );
456
- return q(() => {
456
+ return $(() => {
457
457
  t || l();
458
- }, [t, l]), q(() => () => {
458
+ }, [t, l]), $(() => () => {
459
459
  l();
460
- }, [l]), { handleArrowPointerDown: m, handleArrowPointerUp: d, handleArrowKeyDown: v };
461
- }, ii = 700, sr = (t, e) => typeof t == "number" && Number.isFinite(t) ? t : e, Kr = ({ distance: t, maxDistance: e, viewportSize: r, minSpeedMultiplier: n, maxSpeedMultiplier: i, hasCustomMaxSpeedMultiplier: s, curve: o }) => {
462
- const l = Math.max(sr(t, 0), 0), d = sr(e, 0), m = d > 0 ? Math.min(l, d) / d : 1, v = Math.max(sr(r, 0), 0), M = Math.max(sr(n, 0), 0), y = Math.max(sr(i, 0), 0), w = Math.max(v * M, 40), R = s ? w : 1200, ne = Math.max(v * y, R), Y = o ? Math.max(sr(o.exponentialScale, y), 0) : 0, pe = o ? Math.min(ne, Math.max(v * Y, w)) : ne, Ce = Math.max(pe, w);
463
- let D = m ** 1.1;
460
+ }, [l]), { handleArrowPointerDown: h, handleArrowPointerUp: d, handleArrowKeyDown: b };
461
+ }, oi = 700, tr = (t, e) => typeof t == "number" && Number.isFinite(t) ? t : e, Ur = ({ distance: t, maxDistance: e, viewportSize: r, minSpeedMultiplier: n, maxSpeedMultiplier: i, hasCustomMaxSpeedMultiplier: s, curve: o }) => {
462
+ const l = Math.max(tr(t, 0), 0), d = tr(e, 0), h = d > 0 ? Math.min(l, d) / d : 1, b = Math.max(tr(r, 0), 0), M = Math.max(tr(n, 0), 0), I = Math.max(tr(i, 0), 0), w = Math.max(b * M, 40), R = s ? w : 1200, ne = Math.max(b * I, R), X = o ? Math.max(tr(o.exponentialScale, I), 0) : 0, pe = o ? Math.min(ne, Math.max(b * X, w)) : ne, Ae = Math.max(pe, w);
463
+ let D = h ** 1.1;
464
464
  if (o) {
465
- const ae = Math.min(Math.max(sr(o.exponentialSteepness, 0), 0), ii);
465
+ const ae = Math.min(Math.max(tr(o.exponentialSteepness, 0), 0), oi);
466
466
  if (ae === 0)
467
- D = m;
467
+ D = h;
468
468
  else {
469
469
  const L = Math.expm1(ae) || 1;
470
- D = Math.min(Math.max(Math.expm1(ae * m) / L, 0), 1);
470
+ D = Math.min(Math.max(Math.expm1(ae * h) / L, 0), 1);
471
471
  }
472
472
  }
473
- const H = Math.min(Math.max(sr(o?.easedOffset, 0), 0), 1);
474
- return w + (Ce - w) * (H + (1 - H) * D);
475
- }, si = (t) => {
473
+ const k = Math.min(Math.max(tr(o?.easedOffset, 0), 0), 1);
474
+ return w + (Ae - w) * (k + (1 - k) * D);
475
+ }, ai = (t) => {
476
476
  if (!t || t <= 0)
477
- return $r;
478
- const e = Math.max(1, t), r = Math.log10(e), n = $r + r * Jn;
479
- return se(n, $r, ei);
480
- }, Vn = ({
477
+ return Fr;
478
+ const e = Math.max(1, t), r = Math.log10(e), n = Fr + r * ti;
479
+ return se(n, Fr, ri);
480
+ }, zn = ({
481
481
  contentSize: t,
482
482
  viewportSize: e,
483
483
  scrollPosition: r,
@@ -487,82 +487,82 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
487
487
  enableArrowButtons: o = !0,
488
488
  enableArrowButtonTabStops: l = !0,
489
489
  horizontal: d = !1,
490
- enableHorizontalTapCircle: m = !1,
491
- stretchMainSize: v = !1,
490
+ enableHorizontalTapCircle: h = !1,
491
+ stretchMainSize: b = !1,
492
492
  scrollBarWidth: M = 12,
493
- className: y,
493
+ className: I,
494
494
  ariaControls: w,
495
495
  tapScrollCircleOptions: R,
496
496
  itemCount: ne,
497
- renderThumbOverlay: Y,
497
+ renderThumbOverlay: X,
498
498
  visibleStartIndex: pe,
499
- visibleEndIndex: Ce,
499
+ visibleEndIndex: Ae,
500
500
  locale: D,
501
- labels: H
501
+ labels: k
502
502
  }) => {
503
- const [ae, L] = Ae(!1), [N, P] = Ae(!1), [ee, K] = Ae(!1), B = f(null), oe = f({
503
+ const [ae, L] = Ce(!1), [N, P] = Ce(!1), [J, K] = Ce(!1), q = f(null), oe = f({
504
504
  pointerId: null,
505
505
  startThumbPosition: 0,
506
506
  startClientX: 0,
507
507
  startClientY: 0,
508
508
  scale: 1,
509
509
  captureTarget: null
510
- }), te = f({ pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1 }), ge = f(r), et = f(n), z = f(dn), W = f(null), ie = f(null), tt = f(null), ce = f(0), Me = f(0), Ct = we(() => jr(R, ne), [ne, R]), ue = we(() => ti(d), [d]), le = we(() => Rn(D, H), [D, H]), vt = d ? [le.scrollLeft, le.scrollRight] : [le.scrollUp, le.scrollDown], {
511
- enabled: st,
512
- size: lt,
510
+ }), ee = f({ pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1 }), ge = f(r), Je = f(n), z = f(ln), Y = f(null), ie = f(null), et = f(null), ce = f(0), Se = f(0), At = ve(() => Wr(R, ne), [ne, R]), ue = ve(() => ni(d), [d]), le = ve(() => In(D, k), [D, k]), vt = d ? [le.scrollLeft, le.scrollRight] : [le.scrollUp, le.scrollDown], {
511
+ enabled: it,
512
+ size: ct,
513
513
  offsetX: _e,
514
- offsetY: ot,
515
- className: rt,
516
- maxVisualDistance: nt,
514
+ offsetY: st,
515
+ className: tt,
516
+ maxVisualDistance: rt,
517
517
  maxSpeedMultiplier: fe,
518
518
  minSpeedMultiplier: ze,
519
519
  opacity: $e,
520
520
  renderVisual: F,
521
- maxSpeedCurve: qe
522
- } = Ct, Z = f({
521
+ maxSpeedCurve: Ye
522
+ } = At, Z = f({
523
523
  viewportSize: e,
524
524
  maxScrollPosition: Math.max(t - e, 0),
525
525
  scrollBarVisible: t > e,
526
- effectiveTapMaxDistance: Math.max(nt, 1),
526
+ effectiveTapMaxDistance: Math.max(rt, 1),
527
527
  tapCircleMaxSpeedMultiplier: fe,
528
528
  tapCircleMinSpeedMultiplier: ze,
529
- tapCircleMaxSpeedCurve: qe,
529
+ tapCircleMaxSpeedCurve: Ye,
530
530
  tapScrollCircleOptions: R,
531
531
  effectiveTrackLength: 0,
532
532
  onScroll: n,
533
533
  scrollPosition: r
534
- }), { mainSizeKey: gt, crossSizeKey: U, positionKey: E, selectDelta: ut, getPointerCoordinate: Pe, arrowIcons: C, directionClass: dt, orientation: It } = ue, Dt = Math.max(nt, 1), ft = e / t, p = Math.max(e - M * 2, 0), _ = ft * p, he = Math.min(Math.max(un, _ || 0), p || un), j = Math.max(t - e, 0), re = Math.max(p - he, 0), De = j <= 0 || re <= 0 ? 0 : se(r / j * re, 0, re), Ye = De + he / 2, ve = t > e || ae, Ge = ve && o;
535
- Je(() => {
534
+ }), { mainSizeKey: bt, crossSizeKey: B, positionKey: E, selectDelta: lt, getPointerCoordinate: Pe, arrowIcons: A, directionClass: ut, orientation: yt } = ue, Dt = Math.max(rt, 1), dt = e / t, p = Math.max(e - M * 2, 0), _ = dt * p, he = Math.min(Math.max(cn, _ || 0), p || cn), U = Math.max(t - e, 0), re = Math.max(p - he, 0), De = U <= 0 || re <= 0 ? 0 : se(r / U * re, 0, re), Be = De + he / 2, xe = t > e || ae, Ue = xe && o;
535
+ Qe(() => {
536
536
  Z.current = {
537
537
  viewportSize: e,
538
- maxScrollPosition: j,
539
- scrollBarVisible: ve,
538
+ maxScrollPosition: U,
539
+ scrollBarVisible: xe,
540
540
  effectiveTapMaxDistance: Dt,
541
541
  tapCircleMaxSpeedMultiplier: fe,
542
542
  tapCircleMinSpeedMultiplier: ze,
543
- tapCircleMaxSpeedCurve: qe,
543
+ tapCircleMaxSpeedCurve: Ye,
544
544
  tapScrollCircleOptions: R,
545
545
  effectiveTrackLength: re,
546
546
  onScroll: n,
547
547
  scrollPosition: r
548
548
  };
549
- }), Je(() => {
549
+ }), Qe(() => {
550
550
  ge.current = r;
551
- }, [r]), Je(() => {
552
- et.current = n;
553
- }, [n]), q(() => {
551
+ }, [r]), Qe(() => {
552
+ Je.current = n;
553
+ }, [n]), $(() => {
554
554
  i || P(!1);
555
555
  }, [i]);
556
- const Se = ri({ isDragging: ae, isThumbHovered: N, enableThumbDrag: i }), Le = b((u, V) => {
556
+ const we = ii({ isDragging: ae, isThumbHovered: N, enableThumbDrag: i }), Le = x((u, V) => {
557
557
  const O = Z.current, me = V ?? ge.current;
558
- if (et.current) {
559
- const Ze = et.current(u, me);
560
- if (typeof Ze == "number" && Number.isFinite(Ze))
561
- return ge.current = Ze, Ze;
558
+ if (Je.current) {
559
+ const Ke = Je.current(u, me);
560
+ if (typeof Ke == "number" && Number.isFinite(Ke))
561
+ return ge.current = Ke, Ke;
562
562
  }
563
- const ke = typeof u == "function" ? u(me) : u, He = Math.max(O.maxScrollPosition, 0), yt = O.scrollBarVisible ? se(ke, 0, He) : 0;
564
- return ge.current = yt, yt;
565
- }, []), ht = b(
563
+ const ke = typeof u == "function" ? u(me) : u, He = Math.max(O.maxScrollPosition, 0), It = O.scrollBarVisible ? se(ke, 0, He) : 0;
564
+ return ge.current = It, It;
565
+ }, []), ft = x(
566
566
  (u) => {
567
567
  const V = Z.current, O = ge.current;
568
568
  if (!V.scrollBarVisible || V.maxScrollPosition <= 0) {
@@ -571,24 +571,24 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
571
571
  }
572
572
  if (u === 0)
573
573
  return { nextPosition: O, actualDelta: 0, reachedBoundary: !1 };
574
- const ke = Le((Tt) => se(Tt + u, 0, V.maxScrollPosition), O), He = ke - O, yt = u < 0 && O + u <= 0, Ze = u > 0 && O + u >= V.maxScrollPosition, Ft = u < 0 && (ke <= 0 || yt && He === 0) || u > 0 && (ke >= V.maxScrollPosition || Ze && He === 0);
574
+ const ke = Le((Tt) => se(Tt + u, 0, V.maxScrollPosition), O), He = ke - O, It = u < 0 && O + u <= 0, Ke = u > 0 && O + u >= V.maxScrollPosition, Ft = u < 0 && (ke <= 0 || It && He === 0) || u > 0 && (ke >= V.maxScrollPosition || Ke && He === 0);
575
575
  return { nextPosition: ke, actualDelta: He, reachedBoundary: Ft };
576
576
  },
577
577
  [Le]
578
- ), at = b(
578
+ ), ot = x(
579
579
  (u, V) => {
580
580
  u.current += V;
581
581
  const O = Math.max(Z.current.maxScrollPosition, 0);
582
582
  O > 0 && (u.current = se(u.current, -O, O));
583
- const me = ht(u.current);
583
+ const me = ft(u.current);
584
584
  return u.current -= me.actualDelta, me.reachedBoundary && (u.current = 0), me;
585
585
  },
586
- [ht]
587
- ), Fe = b(() => {
588
- ie.current !== null && (window.cancelAnimationFrame(ie.current), ie.current = null), tt.current = null, ce.current = 0, Me.current = 0;
589
- }, []), je = b(() => {
590
- z.current = { ...dn }, K(!1), W.current?.reset(), Fe();
591
- }, [Fe]), xe = b(
586
+ [ft]
587
+ ), Fe = x(() => {
588
+ ie.current !== null && (window.cancelAnimationFrame(ie.current), ie.current = null), et.current = null, ce.current = 0, Se.current = 0;
589
+ }, []), Ge = x(() => {
590
+ z.current = { ...ln }, K(!1), Y.current?.reset(), Fe();
591
+ }, [Fe]), be = x(
592
592
  (u) => {
593
593
  const V = z.current, O = Z.current;
594
594
  if (!V.active || V.direction === 0) {
@@ -599,12 +599,12 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
599
599
  Fe();
600
600
  return;
601
601
  }
602
- const me = tt.current ?? u, ke = Math.max((u - me) / 1e3, 0), He = Math.min(ke, Nn);
603
- if (tt.current = u, He <= 0) {
604
- ie.current = window.requestAnimationFrame(xe);
602
+ const me = et.current ?? u, ke = Math.max((u - me) / 1e3, 0), He = Math.min(ke, En);
603
+ if (et.current = u, He <= 0) {
604
+ ie.current = window.requestAnimationFrame(be);
605
605
  return;
606
606
  }
607
- const yt = Kr({
607
+ const It = Ur({
608
608
  distance: V.distance,
609
609
  maxDistance: O.effectiveTapMaxDistance,
610
610
  viewportSize: O.viewportSize,
@@ -613,75 +613,75 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
613
613
  hasCustomMaxSpeedMultiplier: typeof O.tapScrollCircleOptions?.maxSpeedMultiplier == "number",
614
614
  curve: O.tapCircleMaxSpeedCurve
615
615
  });
616
- Me.current !== V.direction && (Me.current = V.direction, ce.current = 0);
617
- const { reachedBoundary: Ze } = at(ce, V.direction * yt * He);
618
- if (Ze) {
616
+ Se.current !== V.direction && (Se.current = V.direction, ce.current = 0);
617
+ const { reachedBoundary: Ke } = ot(ce, V.direction * It * He);
618
+ if (Ke) {
619
619
  Fe();
620
620
  return;
621
621
  }
622
- ie.current = window.requestAnimationFrame(xe);
622
+ ie.current = window.requestAnimationFrame(be);
623
623
  },
624
- [at, Fe]
625
- ), Ie = b(() => {
626
- ie.current === null && (tt.current = null, ce.current = 0, ie.current = window.requestAnimationFrame(xe));
627
- }, [xe]);
628
- q(() => {
624
+ [ot, Fe]
625
+ ), Me = x(() => {
626
+ ie.current === null && (et.current = null, ce.current = 0, ie.current = window.requestAnimationFrame(be));
627
+ }, [be]);
628
+ $(() => {
629
629
  const u = z.current;
630
- !u.active || u.direction === 0 || Ie();
631
- }, [t, e, Ie]), q(() => () => {
630
+ !u.active || u.direction === 0 || Me();
631
+ }, [t, e, Me]), $(() => () => {
632
632
  Fe();
633
633
  }, [Fe]);
634
- const Ke = b(
634
+ const je = x(
635
635
  (u) => {
636
- z.current = u, K(u.active), u.active && u.direction !== 0 ? Ie() : Fe();
636
+ z.current = u, K(u.active), u.active && u.direction !== 0 ? Me() : Fe();
637
637
  },
638
- [Ie, Fe]
638
+ [Me, Fe]
639
639
  );
640
- q(() => {
641
- st || je();
642
- }, [je, st]), q(() => {
640
+ $(() => {
641
+ it || Ge();
642
+ }, [Ge, it]), $(() => {
643
643
  const u = (V) => {
644
644
  const me = V.detail?.paneId;
645
- me && w && me !== w || je();
645
+ me && w && me !== w || Ge();
646
646
  };
647
- return window.addEventListener(Tr, u), () => {
648
- window.removeEventListener(Tr, u);
647
+ return window.addEventListener(Mr, u), () => {
648
+ window.removeEventListener(Mr, u);
649
649
  };
650
- }, [w, je]), q(() => {
651
- if (!st)
650
+ }, [w, Ge]), $(() => {
651
+ if (!it)
652
652
  return;
653
653
  const u = (V) => {
654
654
  if (!z.current.active || z.current.pointerId === V.pointerId)
655
655
  return;
656
656
  const O = V.target;
657
657
  if (!(O instanceof Node)) {
658
- je();
658
+ Ge();
659
659
  return;
660
660
  }
661
- W.current?.getElement()?.contains(O) || je();
661
+ Y.current?.getElement()?.contains(O) || Ge();
662
662
  };
663
663
  return document.addEventListener("pointerdown", u, !0), () => {
664
664
  document.removeEventListener("pointerdown", u, !0);
665
665
  };
666
- }, [je, st]);
666
+ }, [Ge, it]);
667
667
  const Ee = (u) => {
668
- if (!ve || re <= 0 || j <= 0)
668
+ if (!xe || re <= 0 || U <= 0)
669
669
  return 0;
670
670
  const V = se(u, 0, re);
671
- return se(V / re * j, 0, j);
672
- }, S = b((u) => {
671
+ return se(V / re * U, 0, U);
672
+ }, S = x((u) => {
673
673
  const { scrollBarVisible: V, effectiveTrackLength: O, maxScrollPosition: me } = Z.current;
674
- if (A.debug("[ScrollBar] calculateScrollPositionFromThumb", () => ({ thumbPos: u, trackLen: O, maxScroll: me })), O <= 0 || me <= 0)
674
+ if (C.debug("[ScrollBar] calculateScrollPositionFromThumb", () => ({ thumbPos: u, trackLen: O, maxScroll: me })), O <= 0 || me <= 0)
675
675
  return null;
676
676
  const ke = se(u, 0, O);
677
677
  return se(ke / O * me, 0, me);
678
- }, []), T = b((u) => Gr(u, d ? "x" : "y"), [d]), Ve = b(
678
+ }, []), T = x((u) => Br(u, d ? "x" : "y"), [d]), Ve = x(
679
679
  (u) => {
680
680
  const V = oe.current;
681
681
  if (V.pointerId !== u.pointerId)
682
682
  return;
683
- const O = u.clientX - V.startClientX, me = u.clientY - V.startClientY, ke = ut(O, me) / (V.scale || 1);
684
- A.debug("[ScrollBar] handleThumbPointerMove", () => ({
683
+ const O = u.clientX - V.startClientX, me = u.clientY - V.startClientY, ke = lt(O, me) / (V.scale || 1);
684
+ C.debug("[ScrollBar] handleThumbPointerMove", () => ({
685
685
  delta: ke,
686
686
  startThumbPosition: V.startThumbPosition,
687
687
  clientY: u.clientY,
@@ -691,35 +691,35 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
691
691
  const He = S(V.startThumbPosition + ke);
692
692
  He !== null && Le(He), u.cancelable && u.preventDefault();
693
693
  },
694
- [ut, S, Le]
695
- ), Xe = b(
694
+ [lt, S, Le]
695
+ ), Xe = x(
696
696
  (u) => {
697
697
  const V = oe.current;
698
698
  if (V.pointerId === u.pointerId)
699
- if (document.removeEventListener("pointermove", Ve), document.removeEventListener("pointerup", Xe), document.removeEventListener("pointercancel", Xe), V.captureTarget !== null && or(V.captureTarget, u.pointerId), oe.current = { pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1, captureTarget: null }, L(!1), B.current) {
700
- const O = B.current.getBoundingClientRect();
699
+ if (document.removeEventListener("pointermove", Ve), document.removeEventListener("pointerup", Xe), document.removeEventListener("pointercancel", Xe), V.captureTarget !== null && rr(V.captureTarget, u.pointerId), oe.current = { pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1, captureTarget: null }, L(!1), q.current) {
700
+ const O = q.current.getBoundingClientRect();
701
701
  u.clientX >= O.left && u.clientX <= O.right && u.clientY >= O.top && u.clientY <= O.bottom || P(!1);
702
702
  } else
703
703
  P(!1);
704
704
  },
705
705
  [Ve]
706
706
  );
707
- q(() => () => {
707
+ $(() => () => {
708
708
  document.removeEventListener("pointermove", Ve), document.removeEventListener("pointerup", Xe), document.removeEventListener("pointercancel", Xe);
709
709
  }, [Ve, Xe]);
710
- const Be = f(0), ct = f(0), mt = b(
710
+ const We = f(0), at = f(0), ht = x(
711
711
  (u) => {
712
- const V = Math.max(Math.round(Z.current.viewportSize / Zn), Kn);
713
- ct.current !== u && (ct.current = u, Be.current = 0), at(Be, u * V);
712
+ const V = Math.max(Math.round(Z.current.viewportSize / Jn), Qn);
713
+ at.current !== u && (at.current = u, We.current = 0), ot(We, u * V);
714
714
  },
715
- [at]
716
- ), { handleArrowPointerDown: ye, handleArrowPointerUp: Et, handleArrowKeyDown: tr } = ni({
717
- canUseArrowButtons: Ge,
715
+ [ot]
716
+ ), { handleArrowPointerDown: ye, handleArrowPointerUp: Pt, handleArrowKeyDown: Qt } = si({
717
+ canUseArrowButtons: Ue,
718
718
  enableArrowButtons: o,
719
- resetTapScroll: je,
720
- scrollByStep: mt
721
- }), dr = (u) => {
722
- if (!ve)
719
+ resetTapScroll: Ge,
720
+ scrollByStep: ht
721
+ }), lr = (u) => {
722
+ if (!xe)
723
723
  return;
724
724
  if (!i) {
725
725
  u.preventDefault(), u.stopPropagation();
@@ -727,8 +727,8 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
727
727
  }
728
728
  if (u.pointerType === "mouse" && u.button !== 0 || u.ctrlKey)
729
729
  return;
730
- je();
731
- const V = u.currentTarget, O = T(V), me = yr(V, u.pointerId) === "captured" ? V : null;
730
+ Ge();
731
+ const V = u.currentTarget, O = T(V), me = Sr(V, u.pointerId) === "captured" ? V : null;
732
732
  oe.current = {
733
733
  pointerId: u.pointerId,
734
734
  startThumbPosition: De,
@@ -737,8 +737,8 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
737
737
  scale: O,
738
738
  captureTarget: me
739
739
  }, document.addEventListener("pointermove", Ve), document.addEventListener("pointerup", Xe), document.addEventListener("pointercancel", Xe), L(!0), P(!0), u.preventDefault(), u.stopPropagation();
740
- }, Te = (u) => {
741
- if (!ve)
740
+ }, Ie = (u) => {
741
+ if (!xe)
742
742
  return;
743
743
  if (!s) {
744
744
  u.preventDefault(), u.stopPropagation();
@@ -747,150 +747,150 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
747
747
  if (u.pointerType === "mouse" && u.button !== 0 || u.ctrlKey)
748
748
  return;
749
749
  const V = u.currentTarget, O = V.getBoundingClientRect(), me = Pe(u), ke = T(V), He = (me - (d ? O.left : O.top)) / ke;
750
- je();
751
- const yt = He - he / 2, Ze = Ee(yt);
752
- Le(Ze), yr(V, u.pointerId), te.current = {
750
+ Ge();
751
+ const It = He - he / 2, Ke = Ee(It);
752
+ Le(Ke), Sr(V, u.pointerId), ee.current = {
753
753
  pointerId: u.pointerId,
754
- startThumbPosition: yt,
754
+ startThumbPosition: It,
755
755
  startClientX: u.clientX,
756
756
  startClientY: u.clientY,
757
757
  scale: ke
758
758
  }, u.preventDefault(), u.stopPropagation();
759
759
  }, wt = () => {
760
- te.current = { pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1 };
761
- }, ar = (u) => {
762
- const V = te.current;
760
+ ee.current = { pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1 };
761
+ }, nr = (u) => {
762
+ const V = ee.current;
763
763
  if (V.pointerId !== u.pointerId)
764
764
  return;
765
765
  if (u.pointerType === "mouse" && u.buttons === 0) {
766
766
  wt();
767
767
  return;
768
768
  }
769
- const O = u.clientX - V.startClientX, me = u.clientY - V.startClientY, ke = ut(O, me) / (V.scale || 1), He = Ee(V.startThumbPosition + ke);
769
+ const O = u.clientX - V.startClientX, me = u.clientY - V.startClientY, ke = lt(O, me) / (V.scale || 1), He = Ee(V.startThumbPosition + ke);
770
770
  Le(He), u.cancelable && u.preventDefault();
771
- }, rr = (u) => {
772
- te.current.pointerId === u.pointerId && (or(u.currentTarget, u.pointerId), wt(), u.preventDefault(), u.stopPropagation());
773
- }, Gt = (u) => {
774
- te.current.pointerId === u.pointerId && (or(u.currentTarget, u.pointerId), wt());
775
- }, Re = (u) => {
776
- u.target === u.currentTarget && te.current.pointerId === u.pointerId && wt();
777
- }, zt = we(() => se((ee ? 1 : 0.8) * $e, 0, 1), [ee, $e]), jt = we(() => {
778
- const V = `calc(50% - ${lt / 2}px + ${ot}px)`;
771
+ }, Jt = (u) => {
772
+ ee.current.pointerId === u.pointerId && (rr(u.currentTarget, u.pointerId), wt(), u.preventDefault(), u.stopPropagation());
773
+ }, Wt = (u) => {
774
+ ee.current.pointerId === u.pointerId && (rr(u.currentTarget, u.pointerId), wt());
775
+ }, Te = (u) => {
776
+ u.target === u.currentTarget && ee.current.pointerId === u.pointerId && wt();
777
+ }, Et = ve(() => se((J ? 1 : 0.8) * $e, 0, 1), [J, $e]), Ut = ve(() => {
778
+ const V = `calc(50% - ${ct / 2}px + ${st}px)`;
779
779
  return {
780
780
  left: _e,
781
781
  top: V
782
782
  };
783
- }, [_e, ot, lt]), cr = (u, V, O, me) => /* @__PURE__ */ J(
783
+ }, [_e, st, ct]), ir = (u, V, O, me) => /* @__PURE__ */ j(
784
784
  "button",
785
785
  {
786
786
  type: "button",
787
787
  tabIndex: l ? 0 : -1,
788
788
  className: "aqvs-scrollbar-arrow-button",
789
789
  style: {
790
- [gt]: M,
791
- [U]: M
790
+ [bt]: M,
791
+ [B]: M
792
792
  },
793
793
  "aria-label": V,
794
794
  onPointerDown: ye(u),
795
- onPointerUp: Et,
796
- onPointerLeave: Et,
797
- onPointerCancel: Et,
798
- onKeyDown: tr(u),
795
+ onPointerUp: Pt,
796
+ onPointerLeave: Pt,
797
+ onPointerCancel: Pt,
798
+ onKeyDown: Qt(u),
799
799
  "aria-disabled": !o,
800
- disabled: !Ge,
801
- children: /* @__PURE__ */ J("span", { "aria-hidden": "true", children: O })
800
+ disabled: !Ue,
801
+ children: /* @__PURE__ */ j("span", { "aria-hidden": "true", children: O })
802
802
  },
803
803
  me
804
- ), St = Y && ve ? {
805
- orientation: It,
804
+ ), St = X && xe ? {
805
+ orientation: yt,
806
806
  scrollPosition: r,
807
- maxScrollPosition: j,
807
+ maxScrollPosition: U,
808
808
  contentSize: t,
809
809
  viewportSize: e,
810
810
  thumbSize: he,
811
811
  thumbPosition: De,
812
- thumbCenter: Ye,
812
+ thumbCenter: Be,
813
813
  trackSize: p,
814
814
  isDragging: ae,
815
- isTapScrollActive: ee,
815
+ isTapScrollActive: J,
816
816
  visibleStartIndex: pe,
817
- visibleEndIndex: Ce
817
+ visibleEndIndex: Ae
818
818
  } : null;
819
- return /* @__PURE__ */ Ut(
819
+ return /* @__PURE__ */ Bt(
820
820
  "div",
821
821
  {
822
- className: At("aqvs-scrollbar", dt, y),
822
+ className: Ct("aqvs-scrollbar", ut, I),
823
823
  style: {
824
824
  // 自己計測ペインの縦バーはインライン主軸寸を書かない (ラチェット遮断 — ペイン仕様 §2.5)。
825
825
  // 横バーは stretch が主軸を寸法決めできないため常に書く
826
- ...v && !d ? {} : { [gt]: e },
827
- [U]: M
826
+ ...b && !d ? {} : { [bt]: e },
827
+ [B]: M
828
828
  },
829
- "data-visible": ve ? "true" : "false",
829
+ "data-visible": xe ? "true" : "false",
830
830
  role: "scrollbar",
831
831
  tabIndex: -1,
832
832
  "aria-controls": w,
833
833
  "aria-valuenow": r,
834
834
  "aria-valuemin": 0,
835
- "aria-valuemax": j,
835
+ "aria-valuemax": U,
836
836
  "aria-orientation": d ? "horizontal" : "vertical",
837
837
  children: [
838
- (!d || m) && ve && st && /* @__PURE__ */ J(
839
- Jr,
838
+ (!d || h) && xe && it && /* @__PURE__ */ j(
839
+ Kr,
840
840
  {
841
841
  axis: d ? "x" : "y",
842
- ref: W,
843
- className: At("aqvs-scrollbar-tap-circle-wrapper", rt),
844
- size: lt,
842
+ ref: Y,
843
+ className: Ct("aqvs-scrollbar-tap-circle-wrapper", tt),
844
+ size: ct,
845
845
  maxVisualDistance: Dt,
846
- style: jt,
847
- opacity: zt,
846
+ style: Ut,
847
+ opacity: Et,
848
848
  renderVisual: F,
849
- onDragChange: Ke
849
+ onDragChange: je
850
850
  },
851
851
  "tap-circle"
852
852
  ),
853
- cr(-1, vt[0], C[0], "arrow-start"),
854
- /* @__PURE__ */ Ut(
853
+ ir(-1, vt[0], A[0], "arrow-start"),
854
+ /* @__PURE__ */ Bt(
855
855
  "div",
856
856
  {
857
857
  className: "aqvs-scrollbar-track",
858
858
  style: {
859
859
  borderRadius: M / 2
860
860
  },
861
- onPointerDown: Te,
862
- onPointerMove: ar,
863
- onPointerUp: rr,
864
- onPointerCancel: Gt,
865
- onLostPointerCapture: Re,
861
+ onPointerDown: Ie,
862
+ onPointerMove: nr,
863
+ onPointerUp: Jt,
864
+ onPointerCancel: Wt,
865
+ onLostPointerCapture: Te,
866
866
  "aria-disabled": !s,
867
867
  children: [
868
- St && /* @__PURE__ */ J("div", { className: "aqvs-scrollbar-overlay", "aria-hidden": !0, children: Y?.(St) }, "overlay"),
869
- /* @__PURE__ */ J(
868
+ St && /* @__PURE__ */ j("div", { className: "aqvs-scrollbar-overlay", "aria-hidden": !0, children: X?.(St) }, "overlay"),
869
+ /* @__PURE__ */ j(
870
870
  "div",
871
871
  {
872
872
  className: "aqvs-scrollbar-thumb-wrapper",
873
873
  style: {
874
- [gt]: he,
874
+ [bt]: he,
875
875
  [E]: De,
876
876
  ...d ? { top: 0, bottom: 0 } : { left: 0, right: 0 }
877
877
  },
878
- "data-visible": ve || ae ? "true" : "false",
879
- onPointerDown: dr,
878
+ "data-visible": xe || ae ? "true" : "false",
879
+ onPointerDown: lr,
880
880
  role: "slider",
881
881
  "aria-orientation": d ? "horizontal" : "vertical",
882
882
  "aria-valuenow": r,
883
883
  "aria-valuemin": 0,
884
- "aria-valuemax": j,
884
+ "aria-valuemax": U,
885
885
  "aria-disabled": !i,
886
886
  tabIndex: -1,
887
- children: /* @__PURE__ */ J(
887
+ children: /* @__PURE__ */ j(
888
888
  "div",
889
889
  {
890
- ref: B,
891
- className: At("aqvs-scrollbar-thumb", d ? "aqvs-scrollbar-thumb-horizontal" : "aqvs-scrollbar-thumb-vertical"),
890
+ ref: q,
891
+ className: Ct("aqvs-scrollbar-thumb", d ? "aqvs-scrollbar-thumb-horizontal" : "aqvs-scrollbar-thumb-vertical"),
892
892
  "data-testid": "aqvs-scrollbar-thumb",
893
- "data-thumb-state": Se,
893
+ "data-thumb-state": we,
894
894
  style: {
895
895
  borderRadius: M - 1,
896
896
  cursor: i ? "pointer" : "default"
@@ -911,15 +911,15 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
911
911
  },
912
912
  "track"
913
913
  ),
914
- cr(1, vt[1], C[1], "arrow-end")
914
+ ir(1, vt[1], A[1], "arrow-end")
915
915
  ]
916
916
  }
917
917
  );
918
- }, oi = ({ offsetX: t, offsetY: e, maxDistance: r, x: n, y: i }) => {
918
+ }, ci = ({ offsetX: t, offsetY: e, maxDistance: r, x: n, y: i }) => {
919
919
  const s = Number.isFinite(t) ? t : 0, o = Number.isFinite(e) ? e : 0, l = Math.hypot(s, o);
920
920
  if (l === 0)
921
921
  return { x: 0, y: 0 };
922
- const d = Kr({
922
+ const d = Ur({
923
923
  distance: l,
924
924
  maxDistance: r,
925
925
  viewportSize: n.viewportSize,
@@ -927,7 +927,7 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
927
927
  maxSpeedMultiplier: n.maxSpeedMultiplier,
928
928
  hasCustomMaxSpeedMultiplier: n.hasCustomMaxSpeedMultiplier,
929
929
  curve: n.curve
930
- }), m = Kr({
930
+ }), h = Ur({
931
931
  distance: l,
932
932
  maxDistance: r,
933
933
  viewportSize: i.viewportSize,
@@ -936,8 +936,8 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
936
936
  hasCustomMaxSpeedMultiplier: i.hasCustomMaxSpeedMultiplier,
937
937
  curve: i.curve
938
938
  });
939
- return { x: d * s / l, y: m * o / l };
940
- }, Fi = (t) => {
939
+ return { x: d * s / l, y: h * o / l };
940
+ }, Yi = (t) => {
941
941
  const { quantum: e, resetOnDirectionChange: r = !0 } = t;
942
942
  if (!(Number.isFinite(e) && e > 0))
943
943
  throw new TypeError(`[createResidualQuantizer] quantum must be a finite positive number, received ${e}`);
@@ -955,7 +955,7 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
955
955
  n = 0;
956
956
  }
957
957
  };
958
- }, ai = 16, fn = (t, e, r) => e === 1 ? t * ai : e === 2 ? t * r : t, ci = (t, e) => {
958
+ }, li = 16, un = (t, e, r) => e === 1 ? t * li : e === 2 ? t * r : t, ui = (t, e) => {
959
959
  const r = t.shiftKey && t.deltaX === 0, n = r ? t.deltaY : t.deltaX, i = r ? 0 : t.deltaY, s = n !== 0 && Math.abs(n) >= Math.abs(i);
960
960
  return {
961
961
  // ❗ ズームでもデルタは潰さない。ここは**事実だけ**を報告し、「横取りしない」という
@@ -964,21 +964,21 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
964
964
  // どのテストも検出できなくなる (変異解析で実証済み)。
965
965
  isZoomGesture: t.ctrlKey,
966
966
  isHorizontalDominant: s,
967
- horizontalDelta: fn(n, t.deltaMode, e),
968
- verticalDelta: fn(i, t.deltaMode, e)
967
+ horizontalDelta: un(n, t.deltaMode, e),
968
+ verticalDelta: un(i, t.deltaMode, e)
969
969
  };
970
- }, An = /* @__PURE__ */ new WeakSet(), hn = (t) => {
971
- An.add(t);
972
- }, li = (t) => An.has(t), ui = ["mouse", "pen", "touch"], Xr = (t, e) => !(t === "mouse" || t === "pen" || t === "touch") || e.includes(t), di = (t) => t === "mouse" || t === "pen", Sr = {
970
+ }, Nn = /* @__PURE__ */ new WeakSet(), dn = (t) => {
971
+ Nn.add(t);
972
+ }, di = (t) => Nn.has(t), fi = ["mouse", "pen", "touch"], kr = (t, e) => !(t === "mouse" || t === "pen" || t === "touch") || e.includes(t), hi = (t) => t === "mouse" || t === "pen", xr = {
973
973
  maxVelocity: 6,
974
974
  minVelocity: 0.02,
975
975
  deceleration: 25e-4,
976
976
  velocitySampleWindow: 90,
977
977
  startVelocityThreshold: 0.04
978
- }, Cr = (t, e, r) => {
978
+ }, Nr = (t, e, r) => {
979
979
  for (const [n, i, s] of e)
980
980
  r === "add" ? t.addEventListener(n, i, s) : t.removeEventListener(n, i, s);
981
- }, fi = Or(
981
+ }, mi = Ar(
982
982
  ({
983
983
  children: t,
984
984
  contentSize: e,
@@ -989,44 +989,44 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
989
989
  enableTrackClick: o = !0,
990
990
  enableArrowButtons: l = !0,
991
991
  enableArrowButtonTabStops: d = !0,
992
- enablePointerDrag: m = !0,
993
- pointerDragInputs: v = ui,
992
+ enablePointerDrag: h = !0,
993
+ pointerDragInputs: b = fi,
994
994
  onScroll: M,
995
- className: y,
995
+ className: I,
996
996
  testId: w,
997
997
  style: R,
998
998
  background: ne,
999
- tapScrollCircleOptions: Y,
999
+ tapScrollCircleOptions: X,
1000
1000
  inertiaOptions: pe,
1001
- itemCount: Ce,
1001
+ itemCount: Ae,
1002
1002
  renderThumbOverlay: D,
1003
- wheelSpeedMultiplier: H = 1,
1003
+ wheelSpeedMultiplier: k = 1,
1004
1004
  overscrollBehavior: ae = "auto",
1005
1005
  onWheelHorizontal: L,
1006
1006
  onPanHorizontal: N,
1007
1007
  contentInsets: P,
1008
- visibleStartIndex: ee,
1008
+ visibleStartIndex: J,
1009
1009
  visibleEndIndex: K,
1010
- renderOverlay: B,
1010
+ renderOverlay: q,
1011
1011
  initialScrollPosition: oe = 0,
1012
- contentProps: te,
1012
+ contentProps: ee,
1013
1013
  locale: ge,
1014
- labels: et
1014
+ labels: Je
1015
1015
  }, z) => {
1016
- const W = f(Number.isFinite(oe) ? Math.max(0, oe) : 0), ie = f(null), tt = f(null), ce = r === void 0, [Me, Ct] = Ae(0), ue = r ?? Me, le = f(null);
1017
- Je(() => {
1016
+ const Y = f(Number.isFinite(oe) ? Math.max(0, oe) : 0), ie = f(null), et = f(null), ce = r === void 0, [Se, At] = Ce(0), ue = r ?? Se, le = f(null);
1017
+ Qe(() => {
1018
1018
  if (!ce)
1019
1019
  return;
1020
- const p = tt.current;
1020
+ const p = et.current;
1021
1021
  if (!p)
1022
1022
  return;
1023
1023
  const _ = () => {
1024
- const j = p.offsetHeight;
1025
- if (j > 0) {
1026
- Ct((re) => re === j ? re : j);
1024
+ const U = p.offsetHeight;
1025
+ if (U > 0) {
1026
+ At((re) => re === U ? re : U);
1027
1027
  return;
1028
1028
  }
1029
- p.offsetParent !== null && e > 0 && le.current !== "zero" && (le.current = "zero", A.warn("[ScrollPane] The self-measured viewport is 0px. Give the scroll pane's host element a definite height (e.g. h-full, flex-1 + min-h-0, an explicit px height), or pass viewportSize explicitly."));
1029
+ p.offsetParent !== null && e > 0 && le.current !== "zero" && (le.current = "zero", C.warn("[ScrollPane] The self-measured viewport is 0px. Give the scroll pane's host element a definite height (e.g. h-full, flex-1 + min-h-0, an explicit px height), or pass viewportSize explicitly."));
1030
1030
  };
1031
1031
  if (_(), typeof ResizeObserver != "function")
1032
1032
  return;
@@ -1034,21 +1034,21 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1034
1034
  return he.observe(p), () => {
1035
1035
  he.disconnect();
1036
1036
  };
1037
- }, [e, ce]), Je(() => {
1038
- ce && n?.(Me);
1039
- }, [ce, Me, n]), Je(() => {
1037
+ }, [e, ce]), Qe(() => {
1038
+ ce && n?.(Se);
1039
+ }, [ce, Se, n]), Qe(() => {
1040
1040
  if (ce)
1041
1041
  return;
1042
1042
  const p = ie.current;
1043
1043
  if (!p)
1044
1044
  return;
1045
1045
  const _ = () => {
1046
- const j = p.clientHeight;
1047
- if (j <= 0 || Math.abs(j - ue) <= 1)
1046
+ const U = p.clientHeight;
1047
+ if (U <= 0 || Math.abs(U - ue) <= 1)
1048
1048
  return;
1049
- const re = `${ue}/${j}`;
1050
- le.current !== re && (le.current = re, A.warn(
1051
- `[ScrollPane] viewportSize=${ue} but the host band is ${j}px. The clip window, max scroll position, thumb mapping, rendered row count and scrollability all derive from viewportSize, so they are now wrong. Omit viewportSize to let the pane measure itself.`
1049
+ const re = `${ue}/${U}`;
1050
+ le.current !== re && (le.current = re, C.warn(
1051
+ `[ScrollPane] viewportSize=${ue} but the host band is ${U}px. The clip window, max scroll position, thumb mapping, rendered row count and scrollability all derive from viewportSize, so they are now wrong. Omit viewportSize to let the pane measure itself.`
1052
1052
  ));
1053
1053
  };
1054
1054
  if (_(), typeof ResizeObserver != "function")
@@ -1059,175 +1059,175 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1059
1059
  };
1060
1060
  }, [ce, ue]);
1061
1061
  const vt = f(L);
1062
- q(() => {
1062
+ $(() => {
1063
1063
  vt.current = L;
1064
1064
  }, [L]);
1065
- const st = f(N);
1066
- q(() => {
1067
- st.current = N;
1065
+ const it = f(N);
1066
+ $(() => {
1067
+ it.current = N;
1068
1068
  }, [N]);
1069
- const lt = f({
1069
+ const ct = f({
1070
1070
  frame: null,
1071
1071
  velocity: 0,
1072
1072
  lastTimestamp: null,
1073
1073
  generation: 0
1074
- }), _e = we(
1074
+ }), _e = ve(
1075
1075
  () => ({
1076
- maxVelocity: pe?.maxVelocity ?? Sr.maxVelocity,
1077
- minVelocity: pe?.minVelocity ?? Sr.minVelocity,
1078
- deceleration: pe?.deceleration ?? Sr.deceleration,
1079
- velocitySampleWindow: pe?.velocitySampleWindow ?? Sr.velocitySampleWindow,
1080
- startVelocityThreshold: pe?.startVelocityThreshold ?? Sr.startVelocityThreshold
1076
+ maxVelocity: pe?.maxVelocity ?? xr.maxVelocity,
1077
+ minVelocity: pe?.minVelocity ?? xr.minVelocity,
1078
+ deceleration: pe?.deceleration ?? xr.deceleration,
1079
+ velocitySampleWindow: pe?.velocitySampleWindow ?? xr.velocitySampleWindow,
1080
+ startVelocityThreshold: pe?.startVelocityThreshold ?? xr.startVelocityThreshold
1081
1081
  }),
1082
1082
  [pe]
1083
- ), ot = we(() => ({
1083
+ ), st = ve(() => ({
1084
1084
  top: Math.max(0, P?.top ?? 0),
1085
1085
  bottom: Math.max(0, P?.bottom ?? 0)
1086
1086
  }), [P]);
1087
- A.debug("[ScrollPane] ScrollPane rendered", () => ({
1087
+ C.debug("[ScrollPane] ScrollPane rendered", () => ({
1088
1088
  contentSize: e,
1089
1089
  viewportSize: ue,
1090
1090
  scrollBarWidth: i,
1091
- className: y,
1091
+ className: I,
1092
1092
  style: R,
1093
- tapScrollCircleOptions: Y,
1093
+ tapScrollCircleOptions: X,
1094
1094
  inertiaOptions: pe,
1095
- enablePointerDrag: m,
1096
- contentInsets: ot
1095
+ enablePointerDrag: h,
1096
+ contentInsets: st
1097
1097
  }));
1098
- const rt = f({ contentSize: e, viewportSize: ue }), nt = we(() => e > ue, [e, ue]), fe = b(
1098
+ const tt = f({ contentSize: e, viewportSize: ue }), rt = ve(() => e > ue, [e, ue]), fe = x(
1099
1099
  (p, _) => {
1100
- let he = _ ?? rt.current;
1101
- _ && !(Number.isFinite(_.contentSize) && Number.isFinite(_.viewportSize)) && (A.warn("[ScrollPane] scrollTo received non-finite dimsOverride; falling back to the committed dims", { dimsOverride: _ }), he = rt.current);
1102
- const { contentSize: j, viewportSize: re } = he, De = j > re, Ye = W.current;
1103
- if (A.debug("[ScrollPane] scrollTo called", () => ({ newPosition: p, contentSize: j, viewportSize: re, currentIsScrollable: De, prevPosition: Ye })), !De)
1104
- return W.current !== 0 && (W.current = 0, M?.(0, Ye)), W.current;
1105
- const ve = typeof p == "function" ? p(W.current) : p;
1106
- if (!Number.isFinite(ve))
1107
- return A.warn("[ScrollPane] scrollTo received a non-finite position; keeping the current position", { nextPosition: ve }), W.current;
1108
- const Ge = Math.max(j - re, 0), Se = se(ve, 0, Ge);
1109
- return W.current !== Se && (W.current = Se, M?.(Se, Ye)), W.current;
1100
+ let he = _ ?? tt.current;
1101
+ _ && !(Number.isFinite(_.contentSize) && Number.isFinite(_.viewportSize)) && (C.warn("[ScrollPane] scrollTo received non-finite dimsOverride; falling back to the committed dims", { dimsOverride: _ }), he = tt.current);
1102
+ const { contentSize: U, viewportSize: re } = he, De = U > re, Be = Y.current;
1103
+ if (C.debug("[ScrollPane] scrollTo called", () => ({ newPosition: p, contentSize: U, viewportSize: re, currentIsScrollable: De, prevPosition: Be })), !De)
1104
+ return Y.current !== 0 && (Y.current = 0, M?.(0, Be)), Y.current;
1105
+ const xe = typeof p == "function" ? p(Y.current) : p;
1106
+ if (!Number.isFinite(xe))
1107
+ return C.warn("[ScrollPane] scrollTo received a non-finite position; keeping the current position", { nextPosition: xe }), Y.current;
1108
+ const Ue = Math.max(U - re, 0), we = se(xe, 0, Ue);
1109
+ return Y.current !== we && (Y.current = we, M?.(we, Be)), Y.current;
1110
1110
  },
1111
1111
  [M]
1112
1112
  ), ze = f(fe);
1113
- q(() => {
1113
+ $(() => {
1114
1114
  ze.current = fe;
1115
1115
  }, [fe]);
1116
- const $e = b(() => {
1117
- const p = lt.current;
1116
+ const $e = x(() => {
1117
+ const p = ct.current;
1118
1118
  p.generation += 1, p.frame !== null && cancelAnimationFrame(p.frame), p.frame = null, p.velocity = 0, p.lastTimestamp = null;
1119
1119
  }, []), F = f($e);
1120
- q(() => {
1120
+ $(() => {
1121
1121
  F.current = $e;
1122
- }, [$e]), q(() => () => {
1122
+ }, [$e]), $(() => () => {
1123
1123
  F.current();
1124
1124
  }, []);
1125
- const qe = b(
1125
+ const Ye = x(
1126
1126
  (p) => {
1127
- if (!nt)
1127
+ if (!rt)
1128
1128
  return;
1129
- const { maxVelocity: _, minVelocity: he, deceleration: j, startVelocityThreshold: re } = _e, De = se(p, -_, _);
1129
+ const { maxVelocity: _, minVelocity: he, deceleration: U, startVelocityThreshold: re } = _e, De = se(p, -_, _);
1130
1130
  if (Math.abs(De) < re)
1131
1131
  return;
1132
- $e(), lt.current.velocity = De, lt.current.lastTimestamp = null;
1133
- const Ye = lt.current.generation, ve = (Ge) => {
1134
- const Se = lt.current;
1135
- if (Se.generation !== Ye)
1132
+ $e(), ct.current.velocity = De, ct.current.lastTimestamp = null;
1133
+ const Be = ct.current.generation, xe = (Ue) => {
1134
+ const we = ct.current;
1135
+ if (we.generation !== Be)
1136
1136
  return;
1137
- if (Se.lastTimestamp === null) {
1138
- Se.lastTimestamp = Ge, Se.frame = requestAnimationFrame(ve);
1137
+ if (we.lastTimestamp === null) {
1138
+ we.lastTimestamp = Ue, we.frame = requestAnimationFrame(xe);
1139
1139
  return;
1140
1140
  }
1141
- const Le = Ge - Se.lastTimestamp;
1142
- if (Se.lastTimestamp = Ge, Le <= 0) {
1143
- Se.frame = requestAnimationFrame(ve);
1141
+ const Le = Ue - we.lastTimestamp;
1142
+ if (we.lastTimestamp = Ue, Le <= 0) {
1143
+ we.frame = requestAnimationFrame(xe);
1144
1144
  return;
1145
1145
  }
1146
- const ht = Se.velocity;
1147
- let at = ht;
1148
- const Fe = j * Le;
1149
- ht > 0 ? at = Math.max(0, ht - Fe) : ht < 0 && (at = Math.min(0, ht + Fe));
1150
- const xe = (ht + at) / 2 * Le, Ie = W.current;
1151
- if (xe !== 0 && ze.current((Xe) => Xe + xe), lt.current.generation !== Ye)
1146
+ const ft = we.velocity;
1147
+ let ot = ft;
1148
+ const Fe = U * Le;
1149
+ ft > 0 ? ot = Math.max(0, ft - Fe) : ft < 0 && (ot = Math.min(0, ft + Fe));
1150
+ const be = (ft + ot) / 2 * Le, Me = Y.current;
1151
+ if (be !== 0 && ze.current((Xe) => Xe + be), ct.current.generation !== Be)
1152
1152
  return;
1153
- const Ke = W.current, { contentSize: Ee, viewportSize: S } = rt.current, T = Math.max(Ee - S, 0);
1154
- Se.velocity = at;
1155
- const Ve = Ke === Ie || Ke <= 0 && at <= 0 || Ke >= T && at >= 0;
1156
- if (Math.abs(at) < he || Ve) {
1153
+ const je = Y.current, { contentSize: Ee, viewportSize: S } = tt.current, T = Math.max(Ee - S, 0);
1154
+ we.velocity = ot;
1155
+ const Ve = je === Me || je <= 0 && ot <= 0 || je >= T && ot >= 0;
1156
+ if (Math.abs(ot) < he || Ve) {
1157
1157
  $e();
1158
1158
  return;
1159
1159
  }
1160
- Se.frame = requestAnimationFrame(ve);
1160
+ we.frame = requestAnimationFrame(xe);
1161
1161
  };
1162
- lt.current.frame = requestAnimationFrame(ve);
1162
+ ct.current.frame = requestAnimationFrame(xe);
1163
1163
  },
1164
- [nt, _e, $e]
1165
- ), Z = f(qe);
1166
- q(() => {
1167
- Z.current = qe;
1168
- }, [qe]), Je(() => {
1169
- rt.current = { contentSize: e, viewportSize: ue };
1170
- }, [e, ue]), Je(() => {
1171
- const p = tt.current;
1164
+ [rt, _e, $e]
1165
+ ), Z = f(Ye);
1166
+ $(() => {
1167
+ Z.current = Ye;
1168
+ }, [Ye]), Qe(() => {
1169
+ tt.current = { contentSize: e, viewportSize: ue };
1170
+ }, [e, ue]), Qe(() => {
1171
+ const p = et.current;
1172
1172
  if (!p) return;
1173
1173
  const _ = () => {
1174
- p.scrollTop !== 0 && (A.debug("[ScrollPane] Native scroll detected, resetting to 0", () => ({ scrollTop: p.scrollTop })), p.scrollTop = 0), p.scrollLeft !== 0 && (p.scrollLeft = 0);
1174
+ p.scrollTop !== 0 && (C.debug("[ScrollPane] Native scroll detected, resetting to 0", () => ({ scrollTop: p.scrollTop })), p.scrollTop = 0), p.scrollLeft !== 0 && (p.scrollLeft = 0);
1175
1175
  };
1176
1176
  return p.addEventListener("scroll", _), () => p.removeEventListener("scroll", _);
1177
- }, []), Je(() => {
1178
- if (nt) {
1179
- A.debug("[ScrollPane] Adjusting scroll position due to content or viewport size change", () => ({ contentSize: e, viewportSize: ue, scrollPosition: W.current }));
1177
+ }, []), Qe(() => {
1178
+ if (rt) {
1179
+ C.debug("[ScrollPane] Adjusting scroll position due to content or viewport size change", () => ({ contentSize: e, viewportSize: ue, scrollPosition: Y.current }));
1180
1180
  const p = se(e - ue, 0, e);
1181
- W.current > p && fe(p);
1181
+ Y.current > p && fe(p);
1182
1182
  } else
1183
1183
  fe(0);
1184
- }, [nt, fe, e, ue]);
1185
- const gt = f({ isScrollable: nt, viewportSize: ue, wheelSpeedMultiplier: H, overscrollBehavior: ae });
1186
- Je(() => {
1187
- gt.current = { isScrollable: nt, viewportSize: ue, wheelSpeedMultiplier: H, overscrollBehavior: ae };
1188
- }, [nt, ue, H, ae]);
1189
- const U = b(
1184
+ }, [rt, fe, e, ue]);
1185
+ const bt = f({ isScrollable: rt, viewportSize: ue, wheelSpeedMultiplier: k, overscrollBehavior: ae });
1186
+ Qe(() => {
1187
+ bt.current = { isScrollable: rt, viewportSize: ue, wheelSpeedMultiplier: k, overscrollBehavior: ae };
1188
+ }, [rt, ue, k, ae]);
1189
+ const B = x(
1190
1190
  (p) => {
1191
- if (li(p))
1191
+ if (di(p))
1192
1192
  return !1;
1193
- const { isScrollable: _, viewportSize: he, wheelSpeedMultiplier: j, overscrollBehavior: re } = gt.current, De = ci(p, he);
1193
+ const { isScrollable: _, viewportSize: he, wheelSpeedMultiplier: U, overscrollBehavior: re } = bt.current, De = ui(p, he);
1194
1194
  if (De.isZoomGesture)
1195
1195
  return !1;
1196
1196
  if (De.isHorizontalDominant)
1197
- return vt.current ? (hn(p), p.preventDefault(), $e(), vt.current(De.horizontalDelta), !0) : !1;
1197
+ return vt.current ? (dn(p), p.preventDefault(), $e(), vt.current(De.horizontalDelta), !0) : !1;
1198
1198
  if (!_ || De.verticalDelta === 0)
1199
1199
  return !1;
1200
- let Ye = De.verticalDelta;
1201
- if (j !== 1 && (Ye *= j), re !== "contain") {
1202
- const ve = W.current, Ge = Math.max(rt.current.contentSize - he, 0);
1203
- if (Ye > 0 && ve >= Ge || Ye < 0 && ve <= 0)
1200
+ let Be = De.verticalDelta;
1201
+ if (U !== 1 && (Be *= U), re !== "contain") {
1202
+ const xe = Y.current, Ue = Math.max(tt.current.contentSize - he, 0);
1203
+ if (Be > 0 && xe >= Ue || Be < 0 && xe <= 0)
1204
1204
  return !1;
1205
1205
  }
1206
- return hn(p), p.preventDefault(), $e(), A.debug("[ScrollPane] wheel event", () => ({ deltaY: Ye, scrollPosition: W.current, wheelSpeedMultiplier: j, deltaMode: p.deltaMode, scrollTop: tt.current?.scrollTop })), fe((ve) => ve + Ye), !0;
1206
+ return dn(p), p.preventDefault(), $e(), C.debug("[ScrollPane] wheel event", () => ({ deltaY: Be, scrollPosition: Y.current, wheelSpeedMultiplier: U, deltaMode: p.deltaMode, scrollTop: et.current?.scrollTop })), fe((xe) => xe + Be), !0;
1207
1207
  },
1208
1208
  [fe, $e]
1209
1209
  );
1210
- q(() => {
1211
- const p = (j) => {
1212
- U(j);
1210
+ $(() => {
1211
+ const p = (U) => {
1212
+ B(U);
1213
1213
  }, _ = () => {
1214
1214
  $e();
1215
1215
  }, he = ie.current;
1216
1216
  return he && (he.addEventListener("wheel", p, { passive: !1 }), he.addEventListener("pointerdown", _, { capture: !0, passive: !0 })), () => {
1217
1217
  he && (he.removeEventListener("wheel", p), he.removeEventListener("pointerdown", _, { capture: !0 }));
1218
1218
  };
1219
- }, [U, $e]), _r(
1219
+ }, [B, $e]), Dr(
1220
1220
  z,
1221
1221
  () => ({
1222
1222
  scrollTo: (p, _) => ($e(), fe(p, _)),
1223
- getScrollPosition: () => W.current,
1223
+ getScrollPosition: () => Y.current,
1224
1224
  getContentSize: () => e,
1225
1225
  getViewportSize: () => ue,
1226
- applyWheel: U
1226
+ applyWheel: B
1227
1227
  }),
1228
- [fe, e, ue, $e, U]
1228
+ [fe, e, ue, $e, B]
1229
1229
  );
1230
- const E = $n(), ut = te?.id ?? E, Pe = f({
1230
+ const E = Xn(), lt = ee?.id ?? E, Pe = f({
1231
1231
  pointerType: "",
1232
1232
  pointerId: null,
1233
1233
  startClientY: 0,
@@ -1240,32 +1240,32 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1240
1240
  velocitySamples: [],
1241
1241
  scale: 1,
1242
1242
  scaleX: 1
1243
- }), C = f(m), dt = f(v);
1244
- q(() => {
1245
- C.current = m;
1246
- }, [m]), q(() => {
1247
- dt.current = v;
1248
- }, [v]);
1249
- const It = f(nt);
1250
- q(() => {
1251
- It.current = nt;
1252
- }, [nt]);
1243
+ }), A = f(h), ut = f(b);
1244
+ $(() => {
1245
+ A.current = h;
1246
+ }, [h]), $(() => {
1247
+ ut.current = b;
1248
+ }, [b]);
1249
+ const yt = f(rt);
1250
+ $(() => {
1251
+ yt.current = rt;
1252
+ }, [rt]);
1253
1253
  const Dt = f(_e);
1254
- q(() => {
1254
+ $(() => {
1255
1255
  Dt.current = _e;
1256
- }, [_e]), q(() => {
1256
+ }, [_e]), $(() => {
1257
1257
  const p = Pe.current;
1258
- if (m && nt && (p.pointerId === null || Xr(p.pointerType, v)) || p.pointerId === null)
1258
+ if (h && rt && (p.pointerId === null || kr(p.pointerType, b)) || p.pointerId === null)
1259
1259
  return;
1260
- const _ = tt.current;
1260
+ const _ = et.current;
1261
1261
  p.clickResetTimer !== null && (window.clearTimeout(p.clickResetTimer), p.clickResetTimer = null);
1262
- const he = p.isDragging && p.shouldCancelNextClick, j = p.pointerId;
1263
- p.pointerId = null, p.pointerType = "", p.startClientY = 0, p.startScroll = 0, p.isDragging = !1, p.shouldCancelNextClick = he, p.velocitySamples = [], p.scale = 1, _ !== null && or(_, j);
1264
- }, [m, v, nt]), q(() => {
1265
- const p = tt.current;
1262
+ const he = p.isDragging && p.shouldCancelNextClick, U = p.pointerId;
1263
+ p.pointerId = null, p.pointerType = "", p.startClientY = 0, p.startScroll = 0, p.isDragging = !1, p.shouldCancelNextClick = he, p.velocitySamples = [], p.scale = 1, _ !== null && rr(_, U);
1264
+ }, [h, b, rt]), $(() => {
1265
+ const p = et.current;
1266
1266
  if (!p)
1267
1267
  return;
1268
- const _ = 6, he = () => typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now(), j = () => {
1268
+ const _ = 6, he = () => typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now(), U = () => {
1269
1269
  const S = Pe.current;
1270
1270
  S.pointerId = null, S.pointerType = "", S.startClientY = 0, S.startScroll = 0, S.isDragging = !1, S.velocitySamples = [], S.scale = 1;
1271
1271
  }, re = () => {
@@ -1275,41 +1275,41 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1275
1275
  const T = Pe.current, Ve = he();
1276
1276
  T.velocitySamples.push({ clientY: S, time: Ve });
1277
1277
  const Xe = Dt.current.velocitySampleWindow;
1278
- T.velocitySamples = T.velocitySamples.filter((Be) => Ve - Be.time <= Xe);
1279
- }, Ye = (S) => S instanceof HTMLElement && S.closest("[data-scrollpane-ignore-drag='true']") !== null, ve = (S) => {
1278
+ T.velocitySamples = T.velocitySamples.filter((We) => Ve - We.time <= Xe);
1279
+ }, Be = (S) => S instanceof HTMLElement && S.closest("[data-scrollpane-ignore-drag='true']") !== null, xe = (S) => {
1280
1280
  const T = Pe.current;
1281
1281
  T.shouldCancelNextClick && (S.preventDefault(), S.stopPropagation(), T.shouldCancelNextClick = !1);
1282
- }, Ge = (S) => {
1282
+ }, Ue = (S) => {
1283
1283
  const T = Pe.current;
1284
- T.isDragging || (T.isDragging = !0, T.shouldCancelNextClick = !0, En(p, S.pointerId) || yr(p, S.pointerId), De(S.clientY));
1285
- }, Se = (S) => S.isTrusted || S.target === p, Le = (S) => {
1284
+ T.isDragging || (T.isDragging = !0, T.shouldCancelNextClick = !0, Rn(p, S.pointerId) || Sr(p, S.pointerId), De(S.clientY));
1285
+ }, we = (S) => S.isTrusted || S.target === p, Le = (S) => {
1286
1286
  const T = Pe.current;
1287
- or(p, S), T.shouldCancelNextClick = !1, re(), j();
1288
- }, ht = (S) => {
1287
+ rr(p, S), T.shouldCancelNextClick = !1, re(), U();
1288
+ }, ft = (S) => {
1289
1289
  const T = Pe.current;
1290
1290
  if (T.pointerId !== S.pointerId)
1291
1291
  return;
1292
- if (S.buttons === 0 && di(S.pointerType)) {
1292
+ if (S.buttons === 0 && hi(S.pointerType)) {
1293
1293
  Le(S.pointerId);
1294
1294
  return;
1295
1295
  }
1296
- if (!(C.current && It.current) || !Xr(S.pointerType, dt.current))
1296
+ if (!(A.current && yt.current) || !kr(S.pointerType, ut.current))
1297
1297
  return;
1298
1298
  if (!T.isDragging) {
1299
- const ct = Math.abs(S.clientY - T.startClientY), mt = st.current ? Math.abs(S.clientX - T.startClientX) : 0;
1300
- if (Math.max(ct, mt) < _ || (Ge(S), !T.isDragging))
1299
+ const at = Math.abs(S.clientY - T.startClientY), ht = it.current ? Math.abs(S.clientX - T.startClientX) : 0;
1300
+ if (Math.max(at, ht) < _ || (Ue(S), !T.isDragging))
1301
1301
  return;
1302
1302
  }
1303
1303
  De(S.clientY);
1304
1304
  const Ve = (S.clientY - T.startClientY) / (T.scale || 1), Xe = T.startScroll - Ve;
1305
1305
  ze.current(Xe);
1306
- const Be = st.current;
1307
- if (Be) {
1308
- const ct = S.clientX - T.lastPanClientX;
1309
- T.lastPanClientX = S.clientX, ct !== 0 && Be(-ct / (T.scaleX || 1));
1306
+ const We = it.current;
1307
+ if (We) {
1308
+ const at = S.clientX - T.lastPanClientX;
1309
+ T.lastPanClientX = S.clientX, at !== 0 && We(-at / (T.scaleX || 1));
1310
1310
  }
1311
1311
  S.cancelable && S.preventDefault();
1312
- }, at = () => {
1312
+ }, ot = () => {
1313
1313
  const S = Pe.current;
1314
1314
  return S.pointerId !== null || !S.shouldCancelNextClick ? !1 : (re(), S.clickResetTimer = window.setTimeout(() => {
1315
1315
  const T = Pe.current;
@@ -1318,68 +1318,68 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1318
1318
  }, Fe = (S) => {
1319
1319
  const T = Pe.current;
1320
1320
  if (T.pointerId !== S.pointerId) {
1321
- at();
1321
+ ot();
1322
1322
  return;
1323
1323
  }
1324
1324
  T.isDragging && T.shouldCancelNextClick && S.cancelable && (S.preventDefault(), S.stopPropagation()), T.isDragging && De(S.clientY);
1325
1325
  let Ve = 0;
1326
1326
  if (T.isDragging && T.velocitySamples.length >= 2) {
1327
- const Be = T.velocitySamples, ct = Dt.current.velocitySampleWindow, mt = Be[Be.length - 1], ye = Be.find((Et) => mt.time - Et.time <= ct) ?? Be[0];
1328
- if (mt && ye && mt.time !== ye.time) {
1329
- const Et = mt.clientY - ye.clientY, tr = mt.time - ye.time;
1330
- Ve = -(Et / tr) / (T.scale || 1);
1327
+ const We = T.velocitySamples, at = Dt.current.velocitySampleWindow, ht = We[We.length - 1], ye = We.find((Pt) => ht.time - Pt.time <= at) ?? We[0];
1328
+ if (ht && ye && ht.time !== ye.time) {
1329
+ const Pt = ht.clientY - ye.clientY, Qt = ht.time - ye.time;
1330
+ Ve = -(Pt / Qt) / (T.scale || 1);
1331
1331
  }
1332
1332
  }
1333
1333
  re(), T.shouldCancelNextClick && (T.clickResetTimer = window.setTimeout(() => {
1334
- const Be = Pe.current;
1335
- Be.shouldCancelNextClick = !1, Be.clickResetTimer = null;
1334
+ const We = Pe.current;
1335
+ We.shouldCancelNextClick = !1, We.clickResetTimer = null;
1336
1336
  }, 0));
1337
1337
  const Xe = Dt.current.startVelocityThreshold;
1338
- j(), or(p, S.pointerId), Math.abs(Ve) >= Xe && Z.current?.(Ve);
1339
- }, je = (S) => {
1338
+ U(), rr(p, S.pointerId), Math.abs(Ve) >= Xe && Z.current?.(Ve);
1339
+ }, Ge = (S) => {
1340
1340
  if (Pe.current.pointerId !== null) {
1341
1341
  if (!S.isPrimary || S.pointerType !== Pe.current.pointerType)
1342
1342
  return;
1343
1343
  Le(Pe.current.pointerId);
1344
1344
  }
1345
- if (Pe.current.shouldCancelNextClick && (re(), Pe.current.shouldCancelNextClick = !1), !(C.current && It.current) || !Xr(S.pointerType, dt.current) || S.button !== 0 && S.pointerType === "mouse" || S.ctrlKey || S.metaKey || S.altKey || Ye(S.target))
1345
+ if (Pe.current.shouldCancelNextClick && (re(), Pe.current.shouldCancelNextClick = !1), !(A.current && yt.current) || !kr(S.pointerType, ut.current) || S.button !== 0 && S.pointerType === "mouse" || S.ctrlKey || S.metaKey || S.altKey || Be(S.target))
1346
1346
  return;
1347
- window.dispatchEvent(new CustomEvent(Tr, { detail: { paneId: E } })), F.current?.();
1347
+ window.dispatchEvent(new CustomEvent(Mr, { detail: { paneId: E } })), F.current?.();
1348
1348
  const T = Pe.current;
1349
- re(), T.pointerId = S.pointerId, T.pointerType = S.pointerType, T.startClientY = S.clientY, T.startClientX = S.clientX, T.lastPanClientX = S.clientX, T.startScroll = W.current, T.scale = Gr(p, "y"), T.scaleX = st.current ? Gr(p, "x") : 1, T.isDragging = !1, T.shouldCancelNextClick = !1, T.velocitySamples = [];
1350
- }, xe = (S) => {
1349
+ re(), T.pointerId = S.pointerId, T.pointerType = S.pointerType, T.startClientY = S.clientY, T.startClientX = S.clientX, T.lastPanClientX = S.clientX, T.startScroll = Y.current, T.scale = Br(p, "y"), T.scaleX = it.current ? Br(p, "x") : 1, T.isDragging = !1, T.shouldCancelNextClick = !1, T.velocitySamples = [];
1350
+ }, be = (S) => {
1351
1351
  if (Pe.current.pointerId !== S.pointerId) {
1352
- at();
1352
+ ot();
1353
1353
  return;
1354
1354
  }
1355
- Se(S) && Le(S.pointerId);
1356
- }, Ke = [
1357
- ["click", ve, !0],
1358
- ["pointerdown", je, { passive: !1 }],
1355
+ we(S) && Le(S.pointerId);
1356
+ }, je = [
1357
+ ["click", xe, !0],
1358
+ ["pointerdown", Ge, { passive: !1 }],
1359
1359
  ["lostpointercapture", (S) => {
1360
1360
  S.target !== p || Pe.current.pointerId !== S.pointerId || Le(S.pointerId);
1361
1361
  }, void 0]
1362
1362
  ], Ee = [
1363
- ["pointermove", ht, { passive: !1 }],
1363
+ ["pointermove", ft, { passive: !1 }],
1364
1364
  ["pointerup", Fe, void 0],
1365
- ["pointercancel", xe, void 0]
1365
+ ["pointercancel", be, void 0]
1366
1366
  ];
1367
- return Cr(p, Ke, "add"), Cr(window, Ee, "add"), () => {
1368
- Cr(p, Ke, "remove"), Cr(window, Ee, "remove");
1367
+ return Nr(p, je, "add"), Nr(window, Ee, "add"), () => {
1368
+ Nr(p, je, "remove"), Nr(window, Ee, "remove");
1369
1369
  const S = Pe.current;
1370
- S.pointerId !== null && or(p, S.pointerId), re(), j();
1370
+ S.pointerId !== null && rr(p, S.pointerId), re(), U();
1371
1371
  };
1372
1372
  }, [E]);
1373
- const ft = b(
1373
+ const dt = x(
1374
1374
  (p) => ($e(), fe(p)),
1375
1375
  [fe, $e]
1376
1376
  );
1377
- return /* @__PURE__ */ Ut("div", { ref: ie, "data-testid": w, "data-self-measured": ce ? "true" : void 0, className: At("aqvs-scroll-pane", y), style: R, children: [
1378
- /* @__PURE__ */ Ut(
1377
+ return /* @__PURE__ */ Bt("div", { ref: ie, "data-testid": w, "data-self-measured": ce ? "true" : void 0, className: Ct("aqvs-scroll-pane", I), style: R, children: [
1378
+ /* @__PURE__ */ Bt(
1379
1379
  "div",
1380
1380
  {
1381
- ref: tt,
1382
- className: At("aqvs-scroll-pane-content"),
1381
+ ref: et,
1382
+ className: Ct("aqvs-scroll-pane-content"),
1383
1383
  "data-testid": "aqvs-scroll-pane-content",
1384
1384
  style: {
1385
1385
  // ❗ 自己計測モードでは高さを書かない。CSS の `height: 100%` (= ルートの確定高さ) が
@@ -1387,8 +1387,8 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1387
1387
  // フィードバックループが構造的に起こらず、初回 paint の時点でも帯は実寸で正しい
1388
1388
  // (数値の反映だけが 1 コミット遅れる)。明示モードは従来どおり px を書く。
1389
1389
  height: ce ? void 0 : ue,
1390
- paddingTop: ot.top,
1391
- paddingBottom: ot.bottom,
1390
+ paddingTop: st.top,
1391
+ paddingBottom: st.bottom,
1392
1392
  // スクロール不能時 (contentSize <= viewportSize) は touch-action を通常に戻し、
1393
1393
  // 短いリスト上のタッチがページ全体のパンを妨げるデッドゾーン化を防ぐ。
1394
1394
  // 直接操作 (指・ペン) のドラッグを許可していない場合も付けない。
@@ -1402,47 +1402,47 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1402
1402
  // 同一条件で揃えてあるため状態としても一貫している。
1403
1403
  // 非同期コンテンツを先読みして確保する挙動は意図的に入れていない
1404
1404
  // (空のペインがページのパンを殺すデッドゾーンになり、そちらの実害の方が大きいため)。
1405
- ...m && nt && v.some((p) => p === "touch" || p === "pen") ? { touchAction: "none" } : {}
1405
+ ...h && rt && b.some((p) => p === "touch" || p === "pen") ? { touchAction: "none" } : {}
1406
1406
  },
1407
- ...te,
1408
- id: ut,
1407
+ ...ee,
1408
+ id: lt,
1409
1409
  children: [
1410
1410
  ne,
1411
- t(W.current)
1411
+ t(Y.current)
1412
1412
  ]
1413
1413
  }
1414
1414
  ),
1415
- /* @__PURE__ */ J(
1416
- Vn,
1415
+ /* @__PURE__ */ j(
1416
+ zn,
1417
1417
  {
1418
1418
  contentSize: e,
1419
1419
  viewportSize: ue,
1420
1420
  stretchMainSize: ce,
1421
- scrollPosition: W.current,
1422
- onScroll: ft,
1421
+ scrollPosition: Y.current,
1422
+ onScroll: dt,
1423
1423
  enableThumbDrag: s,
1424
1424
  enableTrackClick: o,
1425
1425
  enableArrowButtons: l,
1426
1426
  enableArrowButtonTabStops: d,
1427
1427
  scrollBarWidth: i,
1428
- ariaControls: ut,
1429
- tapScrollCircleOptions: Y,
1430
- itemCount: Ce,
1428
+ ariaControls: lt,
1429
+ tapScrollCircleOptions: X,
1430
+ itemCount: Ae,
1431
1431
  renderThumbOverlay: D,
1432
- visibleStartIndex: ee,
1432
+ visibleStartIndex: J,
1433
1433
  visibleEndIndex: K,
1434
1434
  locale: ge,
1435
- labels: et
1435
+ labels: Je
1436
1436
  },
1437
1437
  "scrollbar"
1438
1438
  ),
1439
- B?.()
1439
+ q?.()
1440
1440
  ] });
1441
1441
  }
1442
- ), mn = (t, e, r) => Math.min(Math.max(t, e), r), ki = ({ dragState: t, normalizedDistance: e, sizeScale: r, size: n }) => {
1443
- const i = Math.max(n / 2, 1), s = 1 + e * 0.65, o = Math.max(0.65, 1 - e * 0.25), l = t.direction * e * 26 * r, d = 0.8 + e * 0.18, m = 3 * r, v = 6 * r, M = 22 * r, y = Math.abs(l) + v, w = l > 0 ? m : -Math.abs(l) - m, R = Math.max(2.5, 3 * r), ne = mn(t.offsetX, -i, i), Y = mn(t.offsetY, -i, i), pe = i * 0.35, Ce = ne / i * pe, D = Y / i * pe, H = Ce * 0.45, ae = D * 0.45, L = Math.max(M * 0.38, 6), N = 0.65 + e * 0.2, P = t.active;
1444
- return /* @__PURE__ */ Ut(Qr, { children: [
1445
- /* @__PURE__ */ J(
1442
+ ), fn = (t, e, r) => Math.min(Math.max(t, e), r), Bi = ({ dragState: t, normalizedDistance: e, sizeScale: r, size: n }) => {
1443
+ const i = Math.max(n / 2, 1), s = 1 + e * 0.65, o = Math.max(0.65, 1 - e * 0.25), l = t.direction * e * 26 * r, d = 0.8 + e * 0.18, h = 3 * r, b = 6 * r, M = 22 * r, I = Math.abs(l) + b, w = l > 0 ? h : -Math.abs(l) - h, R = Math.max(2.5, 3 * r), ne = fn(t.offsetX, -i, i), X = fn(t.offsetY, -i, i), pe = i * 0.35, Ae = ne / i * pe, D = X / i * pe, k = Ae * 0.45, ae = D * 0.45, L = Math.max(M * 0.38, 6), N = 0.65 + e * 0.2, P = t.active;
1444
+ return /* @__PURE__ */ Bt(jr, { children: [
1445
+ /* @__PURE__ */ j(
1446
1446
  "div",
1447
1447
  {
1448
1448
  className: "aqvs-tap-scroll-circle-gradient",
@@ -1452,39 +1452,39 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1452
1452
  }
1453
1453
  }
1454
1454
  ),
1455
- /* @__PURE__ */ J(
1455
+ /* @__PURE__ */ j(
1456
1456
  "div",
1457
1457
  {
1458
1458
  className: "aqvs-sample-visual-pupil",
1459
1459
  style: {
1460
1460
  width: M,
1461
1461
  height: M,
1462
- transform: `translate(calc(-50% + ${Ce}px), calc(-50% + ${D}px)) scale(${o}, ${d * s})`,
1462
+ transform: `translate(calc(-50% + ${Ae}px), calc(-50% + ${D}px)) scale(${o}, ${d * s})`,
1463
1463
  transition: P ? "70ms transform ease-out" : "200ms ease transform"
1464
1464
  }
1465
1465
  }
1466
1466
  ),
1467
- /* @__PURE__ */ J(
1467
+ /* @__PURE__ */ j(
1468
1468
  "div",
1469
1469
  {
1470
1470
  className: "aqvs-sample-visual-highlight",
1471
1471
  style: {
1472
1472
  width: L,
1473
1473
  height: L,
1474
- transform: `translate(calc(-50% + ${H}px), calc(-50% + ${ae}px)) scale(${o}, ${s})`,
1474
+ transform: `translate(calc(-50% + ${k}px), calc(-50% + ${ae}px)) scale(${o}, ${s})`,
1475
1475
  opacity: N,
1476
1476
  boxShadow: "0 0 8px rgba(255,255,255,0.45)",
1477
1477
  transition: P ? "120ms opacity 150ms, 120ms transform ease-out ease-out" : "220ms ease transform, 240ms opacity ease"
1478
1478
  }
1479
1479
  }
1480
1480
  ),
1481
- /* @__PURE__ */ J(
1481
+ /* @__PURE__ */ j(
1482
1482
  "div",
1483
1483
  {
1484
1484
  className: "aqvs-sample-visual-rod",
1485
1485
  style: {
1486
1486
  width: R,
1487
- height: y,
1487
+ height: I,
1488
1488
  transform: `translate(-50%, ${w}px)`,
1489
1489
  opacity: e,
1490
1490
  transition: P ? "40ms height, 60ms opacity ease-out ease-out" : "200ms ease height, 120ms ease opacity"
@@ -1492,16 +1492,16 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1492
1492
  }
1493
1493
  )
1494
1494
  ] });
1495
- }, mr = 100, hi = (t) => {
1495
+ }, hr = 100, pi = (t) => {
1496
1496
  if (!Number.isFinite(t))
1497
1497
  return 0n;
1498
1498
  const e = Math.trunc(t);
1499
1499
  return e <= 0 ? 0n : BigInt(e);
1500
- }, qr = (t, e) => {
1500
+ }, Hr = (t, e) => {
1501
1501
  if (!Number.isFinite(t))
1502
1502
  throw new Error(`valueFn returned a non-finite value at index ${e}: ${t}`);
1503
1503
  return t;
1504
- }, pr = (t) => {
1504
+ }, mr = (t) => {
1505
1505
  if (t <= 0 || !Number.isFinite(t))
1506
1506
  return 0;
1507
1507
  const e = Math.trunc(t);
@@ -1510,7 +1510,7 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
1510
1510
  const r = BigInt(e) & -BigInt(e);
1511
1511
  return Number(r);
1512
1512
  };
1513
- class er {
1513
+ class Zt {
1514
1514
  /**
1515
1515
  * @private
1516
1516
  * @property {Map<number, number>} tree - The Map storing the Fenwick tree structure, specifically the sums of deltas. It is 1-indexed.
@@ -1580,30 +1580,30 @@ class er {
1580
1580
  throw new RangeError(`[FenwickMapTree] options.baseValue must be a finite number >= 0, received ${l}.`);
1581
1581
  if (i > 0 && l !== void 0) {
1582
1582
  if (s = l, n?.materialize) {
1583
- const d = n?.sampleRange ?? { from: 0, to: Math.min(mr - 1, i - 1) };
1584
- let m = Math.max(0, Math.trunc(d.from)), v = Math.min(Math.trunc(d.to), i - 1);
1585
- m > v && (m = 0, v = Math.min(mr - 1, i - 1)), o = { from: m, values: er._collectValidatedValues(r, m, v) };
1583
+ const d = n?.sampleRange ?? { from: 0, to: Math.min(hr - 1, i - 1) };
1584
+ let h = Math.max(0, Math.trunc(d.from)), b = Math.min(Math.trunc(d.to), i - 1);
1585
+ h > b && (h = 0, b = Math.min(hr - 1, i - 1)), o = { from: h, values: Zt._collectValidatedValues(r, h, b) };
1586
1586
  }
1587
1587
  } else if (i > 0) {
1588
1588
  const d = n?.sampleRange ?? {
1589
1589
  from: 0,
1590
- to: Math.min(mr - 1, i - 1)
1590
+ to: Math.min(hr - 1, i - 1)
1591
1591
  };
1592
- let m = Math.max(0, Math.trunc(d.from)), v = Math.min(Math.trunc(d.to), i - 1);
1593
- if (m > v && (m = 0, v = Math.min(mr - 1, i - 1)), i > mr)
1594
- s = er._sampleBaseValueStrided(r, i, mr), n?.materialize && (o = { from: m, values: er._collectValidatedValues(r, m, v) });
1592
+ let h = Math.max(0, Math.trunc(d.from)), b = Math.min(Math.trunc(d.to), i - 1);
1593
+ if (h > b && (h = 0, b = Math.min(hr - 1, i - 1)), i > hr)
1594
+ s = Zt._sampleBaseValueStrided(r, i, hr), n?.materialize && (o = { from: h, values: Zt._collectValidatedValues(r, h, b) });
1595
1595
  else {
1596
- const M = er._collectValidatedValues(r, m, v);
1597
- s = er._modeOrMedian([...M]), n?.materialize && (o = { from: m, values: M });
1596
+ const M = Zt._collectValidatedValues(r, h, b);
1597
+ s = Zt._modeOrMedian([...M]), n?.materialize && (o = { from: h, values: M });
1598
1598
  }
1599
1599
  }
1600
1600
  if (this.size = i, this.tree = /* @__PURE__ */ new Map(), this.deltas = /* @__PURE__ */ new Map(), this.total = void 0, this.valueFn = r, this.baseValue = s, o)
1601
1601
  for (let d = 0; d < o.values.length; d++) {
1602
- const m = o.from + d;
1603
- if (m >= this.size)
1602
+ const h = o.from + d;
1603
+ if (h >= this.size)
1604
1604
  break;
1605
- const v = o.values[d] - this.baseValue;
1606
- v !== 0 && (this.deltas.set(m, v), this._updateTree(m, v));
1605
+ const b = o.values[d] - this.baseValue;
1606
+ b !== 0 && (this.deltas.set(h, b), this._updateTree(h, b));
1607
1607
  }
1608
1608
  this.total = this.getTotal();
1609
1609
  }
@@ -1634,7 +1634,7 @@ class er {
1634
1634
  static _collectValidatedValues(e, r, n) {
1635
1635
  const i = [];
1636
1636
  for (let s = r; s <= n; s++)
1637
- i.push(qr(e(s), s));
1637
+ i.push(Hr(e(s), s));
1638
1638
  return i;
1639
1639
  }
1640
1640
  /**
@@ -1660,9 +1660,9 @@ class er {
1660
1660
  }
1661
1661
  if (s > e.length * 0.2) {
1662
1662
  const o = [];
1663
- for (const [d, m] of i.entries())
1664
- m === s && o.push(d);
1665
- const l = o.reduce((d, m) => d + m, 0);
1663
+ for (const [d, h] of i.entries())
1664
+ h === s && o.push(d);
1665
+ const l = o.reduce((d, h) => d + h, 0);
1666
1666
  n = Math.floor(l / o.length);
1667
1667
  }
1668
1668
  return n;
@@ -1684,8 +1684,8 @@ class er {
1684
1684
  i % 2 === 0 && (i += 1);
1685
1685
  const s = [];
1686
1686
  for (let o = 0; o < r && s.length < n; o += i)
1687
- s.push(qr(e(o), o));
1688
- return er._modeOrMedian(s);
1687
+ s.push(Hr(e(o), o));
1688
+ return Zt._modeOrMedian(s);
1689
1689
  }
1690
1690
  /**
1691
1691
  * @method update
@@ -1757,7 +1757,7 @@ class er {
1757
1757
  let n = e + 1;
1758
1758
  for (; n <= this.size; ) {
1759
1759
  this.tree.set(n, (this.tree.get(n) ?? 0) + r);
1760
- const i = pr(n);
1760
+ const i = mr(n);
1761
1761
  if (i === 0)
1762
1762
  break;
1763
1763
  n += i;
@@ -1801,7 +1801,7 @@ class er {
1801
1801
  let e = 0, r = this.size;
1802
1802
  for (; r > 0; ) {
1803
1803
  e += this.tree.get(r) ?? 0;
1804
- const n = pr(r);
1804
+ const n = mr(r);
1805
1805
  if (n === 0)
1806
1806
  break;
1807
1807
  r -= n;
@@ -1818,7 +1818,7 @@ class er {
1818
1818
  */
1819
1819
  _materialize(e, r = !0) {
1820
1820
  if (this.valueFn) {
1821
- const n = this.deltas.get(e) ?? 0, s = qr(this.valueFn(e), e) - this.baseValue;
1821
+ const n = this.deltas.get(e) ?? 0, s = Hr(this.valueFn(e), e) - this.baseValue;
1822
1822
  if (s !== n && (s === 0 ? this.deltas.delete(e) : this.deltas.set(e, s), r)) {
1823
1823
  const o = s - n;
1824
1824
  this._updateTree(e, o);
@@ -1840,9 +1840,9 @@ class er {
1840
1840
  const i = e.ranges;
1841
1841
  if (i && i.length > 0) {
1842
1842
  for (const l of i) {
1843
- const d = Math.max(0, Math.trunc(l.from)), m = Math.min(Math.trunc(l.to), this.size - 1);
1844
- for (let v = d; v <= m; v++)
1845
- this._materialize(v);
1843
+ const d = Math.max(0, Math.trunc(l.from)), h = Math.min(Math.trunc(l.to), this.size - 1);
1844
+ for (let b = d; b <= h; b++)
1845
+ this._materialize(b);
1846
1846
  }
1847
1847
  if (r === void 0)
1848
1848
  return;
@@ -1922,17 +1922,17 @@ class er {
1922
1922
  _findIndexLarge(e, r, n) {
1923
1923
  if (this.size === 0)
1924
1924
  return { index: -1, total: this.total ?? 0, cumulative: void 0, currentValue: void 0, safeIndex: void 0 };
1925
- const i = hi(this.size);
1925
+ const i = pi(this.size);
1926
1926
  if (i === 0n)
1927
1927
  return { index: -1, total: this.total ?? 0, cumulative: void 0, currentValue: void 0, safeIndex: void 0 };
1928
1928
  this._materializeRanges(r.materializeOption);
1929
1929
  const s = r.materializeOption?.materialize === !0;
1930
1930
  for (; ; ) {
1931
- let o = 0n, l = i - 1n, d, m, v = this.total;
1931
+ let o = 0n, l = i - 1n, d, h, b = this.total;
1932
1932
  for (; o <= l; ) {
1933
1933
  const w = o + l >> 1n, R = Number(w), ne = this.prefixSum(R);
1934
- if (v = ne.total, n ? ne.cumulative >= e : ne.cumulative <= e)
1935
- if (d = w, m = ne, n) {
1934
+ if (b = ne.total, n ? ne.cumulative >= e : ne.cumulative <= e)
1935
+ if (d = w, h = ne, n) {
1936
1936
  if (w === 0n)
1937
1937
  break;
1938
1938
  l = w - 1n;
@@ -1946,15 +1946,15 @@ class er {
1946
1946
  l = w - 1n;
1947
1947
  }
1948
1948
  }
1949
- const M = m, y = d !== void 0 ? Number(d) : -1;
1950
- if (s && y >= 0) {
1951
- const w = this.deltas.get(y) ?? 0;
1952
- if (this._materialize(y), (this.deltas.get(y) ?? 0) !== w)
1949
+ const M = h, I = d !== void 0 ? Number(d) : -1;
1950
+ if (s && I >= 0) {
1951
+ const w = this.deltas.get(I) ?? 0;
1952
+ if (this._materialize(I), (this.deltas.get(I) ?? 0) !== w)
1953
1953
  continue;
1954
1954
  }
1955
1955
  return {
1956
- index: y,
1957
- total: v,
1956
+ index: I,
1957
+ total: b,
1958
1958
  cumulative: M?.cumulative,
1959
1959
  currentValue: M?.currentValue,
1960
1960
  safeIndex: M?.safeIndex
@@ -1980,10 +1980,10 @@ class er {
1980
1980
  for (; o > 0; ) {
1981
1981
  const d = this.tree.get(o) ?? 0;
1982
1982
  s += d;
1983
- const m = pr(o);
1984
- if (m === 0)
1983
+ const h = mr(o);
1984
+ if (h === 0)
1985
1985
  break;
1986
- o -= m;
1986
+ o -= h;
1987
1987
  }
1988
1988
  const l = i?.materialize ? this.get(n) : (this.deltas.get(n) || 0) + this.baseValue;
1989
1989
  return { cumulative: s + this.baseValue * (n + 1), total: this.total, currentValue: l, safeIndex: n };
@@ -2019,7 +2019,7 @@ class er {
2019
2019
  else {
2020
2020
  this.total = this._computeTreeTotal();
2021
2021
  const n = this.prefixSum(this.getSize() - 1);
2022
- n.cumulative !== n.total && A.error("Inconsistent Fenwick Tree state");
2022
+ n.cumulative !== n.total && C.error("Inconsistent Fenwick Tree state");
2023
2023
  }
2024
2024
  return this.total;
2025
2025
  }
@@ -2043,7 +2043,7 @@ class er {
2043
2043
  let s = n + 1;
2044
2044
  for (; s <= this.size; ) {
2045
2045
  r.set(s, (r.get(s) ?? 0) + i);
2046
- const o = pr(s);
2046
+ const o = mr(s);
2047
2047
  if (o === 0)
2048
2048
  break;
2049
2049
  s += o;
@@ -2126,7 +2126,7 @@ class er {
2126
2126
  this.size = r, this.rebuildTree();
2127
2127
  }
2128
2128
  const i = this.prefixSum(this.getSize() - 1);
2129
- i.cumulative !== i.total && A.error("Inconsistent Fenwick Tree state");
2129
+ i.cumulative !== i.total && C.error("Inconsistent Fenwick Tree state");
2130
2130
  }
2131
2131
  /**
2132
2132
  * @private
@@ -2160,14 +2160,14 @@ class er {
2160
2160
  _propagateDeltaToGrownNodes(e, r, n, i) {
2161
2161
  let s = e + 1;
2162
2162
  for (; s <= n; ) {
2163
- const o = pr(s);
2163
+ const o = mr(s);
2164
2164
  if (o === 0)
2165
2165
  break;
2166
2166
  s += o;
2167
2167
  }
2168
2168
  for (; s <= i; ) {
2169
2169
  this.tree.set(s, (this.tree.get(s) ?? 0) + r);
2170
- const o = pr(s);
2170
+ const o = mr(s);
2171
2171
  if (o === 0)
2172
2172
  break;
2173
2173
  s += o;
@@ -2183,7 +2183,7 @@ class er {
2183
2183
  */
2184
2184
  _growSize(e, r) {
2185
2185
  if (this.size = r, this.deltas.size > 0) {
2186
- const n = er._minCoveredLowBound(e, r);
2186
+ const n = Zt._minCoveredLowBound(e, r);
2187
2187
  if (e - n < this.deltas.size)
2188
2188
  for (let s = n; s < e; s++) {
2189
2189
  const o = this.deltas.get(s);
@@ -2261,20 +2261,20 @@ class er {
2261
2261
  return this._findIndex(e, r ?? {}, !1);
2262
2262
  }
2263
2263
  }
2264
- const mi = (t, e) => {
2264
+ const gi = (t, e) => {
2265
2265
  const r = t?.sampleRange, n = e?.sampleRange;
2266
2266
  return r === n ? !1 : r && n ? r.from !== n.from || r.to !== n.to : !0;
2267
- }, Cn = (t, e, r) => {
2267
+ }, Vn = (t, e, r) => {
2268
2268
  const n = Number.isFinite(t) && t > 0 ? Math.trunc(t) : 0, i = f(null), s = f({ size: n, valueOrFn: e, options: r });
2269
- i.current === null && (i.current = new er(n, e, r));
2270
- const o = i.current, l = s.current, d = l.size !== n, m = l.valueOrFn !== e, v = mi(l.options, r) || l.options?.baseValue !== r?.baseValue, M = l.size === 0 && n > 0 && (!i.current || i.current.base === 0);
2271
- if (m || v) {
2272
- const y = r?.resetOnValueFnChange ?? !0;
2273
- v || m && y || M ? (r?.debug && A.debug("[useFenwickMapTree] reset", { valueOrFnChanged: m, optionsChanged: v }), o.reset(n, e, r)) : (d && (r?.debug && A.debug("[useFenwickMapTree] resize (with valueFn change)", { from: l.size, to: n }), o.changeSize(n)), r?.debug && A.debug("[useFenwickMapTree] setValueFn (no reset)", { valueOrFnChanged: m }), o.setValueFn(e, { reset: !1 })), s.current = { size: n, valueOrFn: e, options: r };
2274
- } else d && (r?.debug && A.debug("[useFenwickMapTree] resize", { from: l.size, to: n }), M ? o.reset(n, e, r) : o.changeSize(n), s.current = { size: n, valueOrFn: e, options: r });
2269
+ i.current === null && (i.current = new Zt(n, e, r));
2270
+ const o = i.current, l = s.current, d = l.size !== n, h = l.valueOrFn !== e, b = gi(l.options, r) || l.options?.baseValue !== r?.baseValue, M = l.size === 0 && n > 0 && (!i.current || i.current.base === 0);
2271
+ if (h || b) {
2272
+ const I = r?.resetOnValueFnChange ?? !0;
2273
+ b || h && I || M ? (r?.debug && C.debug("[useFenwickMapTree] reset", { valueOrFnChanged: h, optionsChanged: b }), o.reset(n, e, r)) : (d && (r?.debug && C.debug("[useFenwickMapTree] resize (with valueFn change)", { from: l.size, to: n }), o.changeSize(n)), r?.debug && C.debug("[useFenwickMapTree] setValueFn (no reset)", { valueOrFnChanged: h }), o.setValueFn(e, { reset: !1 })), s.current = { size: n, valueOrFn: e, options: r };
2274
+ } else d && (r?.debug && C.debug("[useFenwickMapTree] resize", { from: l.size, to: n }), M ? o.reset(n, e, r) : o.changeSize(n), s.current = { size: n, valueOrFn: e, options: r });
2275
2275
  return o;
2276
2276
  };
2277
- class pi {
2277
+ class bi {
2278
2278
  key;
2279
2279
  value;
2280
2280
  prev = null;
@@ -2283,7 +2283,7 @@ class pi {
2283
2283
  this.key = e, this.value = r;
2284
2284
  }
2285
2285
  }
2286
- class Yr {
2286
+ class $r {
2287
2287
  head = null;
2288
2288
  tail = null;
2289
2289
  /**
@@ -2324,58 +2324,58 @@ class Yr {
2324
2324
  this.remove(e), this.addToTail(e);
2325
2325
  }
2326
2326
  }
2327
- function gi(t) {
2328
- const e = f(/* @__PURE__ */ new Map()), r = f(new Yr()), n = Math.floor(t), i = f(n);
2329
- q(() => {
2327
+ function xi(t) {
2328
+ const e = f(/* @__PURE__ */ new Map()), r = f(new $r()), n = Math.floor(t), i = f(n);
2329
+ $(() => {
2330
2330
  if (i.current = n, Number.isNaN(n) || n < 0) {
2331
- A.warn(`useLruCache: invalid capacity ${t}; the cache will not store any entries.`), e.current.clear(), r.current = new Yr();
2331
+ C.warn(`useLruCache: invalid capacity ${t}; the cache will not store any entries.`), e.current.clear(), r.current = new $r();
2332
2332
  return;
2333
2333
  }
2334
2334
  if (Number.isFinite(n))
2335
2335
  for (; e.current.size > n; ) {
2336
- const v = r.current.removeHead();
2337
- if (v)
2338
- e.current.delete(v.key);
2336
+ const b = r.current.removeHead();
2337
+ if (b)
2338
+ e.current.delete(b.key);
2339
2339
  else
2340
2340
  break;
2341
2341
  }
2342
2342
  }, [t, n]);
2343
- const s = b((v) => {
2344
- const M = e.current.get(v);
2343
+ const s = x((b) => {
2344
+ const M = e.current.get(b);
2345
2345
  if (M)
2346
2346
  return r.current.moveToTail(M), M.value;
2347
- }, []), o = b((v, M) => {
2348
- const y = i.current;
2349
- if (Number.isNaN(y) || y <= 0)
2347
+ }, []), o = x((b, M) => {
2348
+ const I = i.current;
2349
+ if (Number.isNaN(I) || I <= 0)
2350
2350
  return;
2351
- let w = e.current.get(v);
2351
+ let w = e.current.get(b);
2352
2352
  if (w)
2353
2353
  w.value = M, r.current.moveToTail(w);
2354
2354
  else {
2355
- if (e.current.size >= y) {
2355
+ if (e.current.size >= I) {
2356
2356
  const R = r.current.removeHead();
2357
2357
  R && e.current.delete(R.key);
2358
2358
  }
2359
- w = new pi(v, M), e.current.set(v, w), r.current.addToTail(w);
2359
+ w = new bi(b, M), e.current.set(b, w), r.current.addToTail(w);
2360
2360
  }
2361
- }, []), l = b((v) => e.current.has(v), []), d = b((v) => {
2362
- const M = e.current.get(v);
2363
- M && (r.current.remove(M), e.current.delete(v));
2364
- }, []), m = b(() => {
2365
- e.current.clear(), r.current = new Yr();
2361
+ }, []), l = x((b) => e.current.has(b), []), d = x((b) => {
2362
+ const M = e.current.get(b);
2363
+ M && (r.current.remove(M), e.current.delete(b));
2364
+ }, []), h = x(() => {
2365
+ e.current.clear(), r.current = new $r();
2366
2366
  }, []);
2367
- return we(() => ({ get: s, set: o, has: l, remove: d, clear: m }), [s, o, l, d, m]);
2367
+ return ve(() => ({ get: s, set: o, has: l, remove: d, clear: h }), [s, o, l, d, h]);
2368
2368
  }
2369
- const xi = 1e4, Hi = () => {
2370
- const { get: t, set: e, has: r, clear: n } = gi(xi);
2371
- return we(() => ({ get: t, set: e, has: r, clear: n }), [t, e, r, n]);
2372
- }, $i = (t, e) => {
2369
+ const vi = 1e4, Wi = () => {
2370
+ const { get: t, set: e, has: r, clear: n } = xi(vi);
2371
+ return ve(() => ({ get: t, set: e, has: r, clear: n }), [t, e, r, n]);
2372
+ }, Ui = (t, e) => {
2373
2373
  const r = f(e), n = f(t);
2374
- Je(() => {
2374
+ Qe(() => {
2375
2375
  r.current = e, n.current = t;
2376
2376
  }, [e, t]);
2377
2377
  const i = f(/* @__PURE__ */ new WeakMap());
2378
- return b((s) => {
2378
+ return x((s) => {
2379
2379
  if (!s || i.current.has(s))
2380
2380
  return;
2381
2381
  const o = (l) => {
@@ -2385,72 +2385,72 @@ const xi = 1e4, Hi = () => {
2385
2385
  i.current.get(s) === o && (s.removeEventListener("wheel", o), i.current.delete(s));
2386
2386
  };
2387
2387
  }, []);
2388
- }, pn = -200, gn = { active: !1, offsetX: 0, offsetY: 0, distance: 0, direction: 0, pointerId: null }, bi = (t) => {
2388
+ }, hn = -200, mn = { active: !1, offsetX: 0, offsetY: 0, distance: 0, direction: 0, pointerId: null }, wi = (t) => {
2389
2389
  const e = f(t);
2390
2390
  e.current = t;
2391
- const r = f(gn), n = f(null), [i, s] = Ae(!1), o = f(null), l = f(null), d = f({ residual: 0, direction: 0 }), m = f({ residual: 0, direction: 0 }), v = b(() => {
2392
- o.current !== null && (window.cancelAnimationFrame(o.current), o.current = null), l.current = null, d.current = { residual: 0, direction: 0 }, m.current = { residual: 0, direction: 0 };
2393
- }, []), M = b((D, H, ae, L, N, P) => {
2394
- const ee = H > 0 ? 1 : H < 0 ? -1 : 0;
2395
- ee !== 0 && ee !== D.direction && (D.direction = ee, D.residual = 0), D.residual += H * ae;
2391
+ const r = f(mn), n = f(null), [i, s] = Ce(!1), o = f(null), l = f(null), d = f({ residual: 0, direction: 0 }), h = f({ residual: 0, direction: 0 }), b = x(() => {
2392
+ o.current !== null && (window.cancelAnimationFrame(o.current), o.current = null), l.current = null, d.current = { residual: 0, direction: 0 }, h.current = { residual: 0, direction: 0 };
2393
+ }, []), M = x((D, k, ae, L, N, P) => {
2394
+ const J = k > 0 ? 1 : k < 0 ? -1 : 0;
2395
+ J !== 0 && J !== D.direction && (D.direction = J, D.residual = 0), D.residual += k * ae;
2396
2396
  const K = Math.max(N(), 0);
2397
2397
  K > 0 && (D.residual = se(D.residual, -K, K));
2398
- const B = D.residual;
2399
- if (B === 0)
2398
+ const q = D.residual;
2399
+ if (q === 0)
2400
2400
  return { actualDelta: 0, atBoundary: !1 };
2401
- const oe = L(), te = P(B), ge = te - oe;
2401
+ const oe = L(), ee = P(q), ge = ee - oe;
2402
2402
  D.residual -= ge;
2403
- const et = B < 0 && oe + B <= 0, z = B > 0 && oe + B >= K, W = B < 0 && (te <= 0 || et && ge === 0) || B > 0 && (te >= K || z && ge === 0);
2404
- return W && (D.residual = 0), { actualDelta: ge, atBoundary: W };
2405
- }, []), y = b(
2403
+ const Je = q < 0 && oe + q <= 0, z = q > 0 && oe + q >= K, Y = q < 0 && (ee <= 0 || Je && ge === 0) || q > 0 && (ee >= K || z && ge === 0);
2404
+ return Y && (D.residual = 0), { actualDelta: ge, atBoundary: Y };
2405
+ }, []), I = x(
2406
2406
  (D) => {
2407
- const H = e.current, ae = r.current;
2407
+ const k = e.current, ae = r.current;
2408
2408
  if (!ae.active || ae.direction === 0) {
2409
- v();
2409
+ b();
2410
2410
  return;
2411
2411
  }
2412
- const L = l.current ?? D, N = Math.max((D - L) / 1e3, 0), P = Math.min(N, Nn);
2412
+ const L = l.current ?? D, N = Math.max((D - L) / 1e3, 0), P = Math.min(N, En);
2413
2413
  if (l.current = D, P <= 0) {
2414
- o.current = window.requestAnimationFrame(y);
2414
+ o.current = window.requestAnimationFrame(I);
2415
2415
  return;
2416
2416
  }
2417
- const ee = oi({ offsetX: ae.offsetX, offsetY: ae.offsetY, maxDistance: H.maxDistance, x: H.xSpeedParams, y: H.ySpeedParams }), K = M(d.current, ee.x, P, H.getHx, H.getMaxHx, (ge) => H.applyHxRef.current(H.getHx() + ge));
2418
- K.actualDelta !== 0 && (H.pendingColAnchorRef.current = null);
2419
- const B = M(m.current, ee.y, P, H.getVy, H.getMaxVy, H.applyVy), oe = H.getMaxHx() <= 0 || K.atBoundary || ae.offsetX === 0, te = H.getMaxVy() <= 0 || B.atBoundary || ae.offsetY === 0;
2420
- if (oe && te) {
2421
- v();
2417
+ const J = ci({ offsetX: ae.offsetX, offsetY: ae.offsetY, maxDistance: k.maxDistance, x: k.xSpeedParams, y: k.ySpeedParams }), K = M(d.current, J.x, P, k.getHx, k.getMaxHx, (ge) => k.applyHxRef.current(k.getHx() + ge));
2418
+ K.actualDelta !== 0 && (k.pendingColAnchorRef.current = null);
2419
+ const q = M(h.current, J.y, P, k.getVy, k.getMaxVy, k.applyVy), oe = k.getMaxHx() <= 0 || K.atBoundary || ae.offsetX === 0, ee = k.getMaxVy() <= 0 || q.atBoundary || ae.offsetY === 0;
2420
+ if (oe && ee) {
2421
+ b();
2422
2422
  return;
2423
2423
  }
2424
- o.current = window.requestAnimationFrame(y);
2424
+ o.current = window.requestAnimationFrame(I);
2425
2425
  },
2426
- [v, M]
2427
- ), w = b(() => {
2428
- o.current === null && (l.current = null, d.current = { residual: 0, direction: 0 }, m.current = { residual: 0, direction: 0 }, o.current = window.requestAnimationFrame(y));
2429
- }, [y]), R = b(() => {
2430
- r.current = { ...gn }, s(!1), n.current?.reset(), v();
2431
- }, [v]), ne = b(
2426
+ [b, M]
2427
+ ), w = x(() => {
2428
+ o.current === null && (l.current = null, d.current = { residual: 0, direction: 0 }, h.current = { residual: 0, direction: 0 }, o.current = window.requestAnimationFrame(I));
2429
+ }, [I]), R = x(() => {
2430
+ r.current = { ...mn }, s(!1), n.current?.reset(), b();
2431
+ }, [b]), ne = x(
2432
2432
  (D) => {
2433
- r.current = D, s(D.active), D.active && D.direction !== 0 ? w() : v();
2433
+ r.current = D, s(D.active), D.active && D.direction !== 0 ? w() : b();
2434
2434
  },
2435
- [w, v]
2436
- ), { enabled: Y, xExtentFreshness: pe, yExtentFreshness: Ce } = t;
2437
- return q(() => {
2435
+ [w, b]
2436
+ ), { enabled: X, xExtentFreshness: pe, yExtentFreshness: Ae } = t;
2437
+ return $(() => {
2438
2438
  const D = r.current;
2439
2439
  !D.active || D.direction === 0 || w();
2440
- }, [pe, Ce, w]), q(() => {
2440
+ }, [pe, Ae, w]), $(() => {
2441
2441
  const D = () => {
2442
2442
  R();
2443
2443
  };
2444
- return window.addEventListener(Tr, D), () => {
2445
- window.removeEventListener(Tr, D);
2444
+ return window.addEventListener(Mr, D), () => {
2445
+ window.removeEventListener(Mr, D);
2446
2446
  };
2447
- }, [R]), q(() => {
2448
- if (!Y)
2447
+ }, [R]), $(() => {
2448
+ if (!X)
2449
2449
  return;
2450
- const D = (H) => {
2451
- if (!r.current.active || r.current.pointerId === H.pointerId)
2450
+ const D = (k) => {
2451
+ if (!r.current.active || r.current.pointerId === k.pointerId)
2452
2452
  return;
2453
- const ae = H.target;
2453
+ const ae = k.target;
2454
2454
  if (!(ae instanceof Node)) {
2455
2455
  R();
2456
2456
  return;
@@ -2460,34 +2460,56 @@ const xi = 1e4, Hi = () => {
2460
2460
  return document.addEventListener("pointerdown", D, !0), () => {
2461
2461
  document.removeEventListener("pointerdown", D, !0);
2462
2462
  };
2463
- }, [Y, R]), q(() => {
2464
- Y || R();
2465
- }, [Y, R]), q(() => () => {
2466
- v();
2467
- }, [v]), { isTapActive: i, handleTapCircleDragChange: ne, tapCircleHandleRef: n };
2468
- }, Qe = (t, e) => e <= 0 ? 0 : se(t, 0, e - 1), xn = (t) => ({
2463
+ }, [X, R]), $(() => {
2464
+ X || R();
2465
+ }, [X, R]), $(() => () => {
2466
+ b();
2467
+ }, [b]), { isTapActive: i, handleTapCircleDragChange: ne, tapCircleHandleRef: n };
2468
+ }, Ze = (t, e) => e <= 0 ? 0 : se(t, 0, e - 1), pn = (t) => ({
2469
2469
  top: Math.max(0, t?.top ?? 0),
2470
2470
  bottom: Math.max(0, t?.bottom ?? 0)
2471
- }), Pt = (t, e) => t <= e ? 0 : t - e, ur = (t, e) => t <= 0 ? 0 : t + e, Rr = 1e3, Zr = 2e3, Dn = 1048576, vi = (t, e) => {
2471
+ }), Rt = (t, e) => t <= e ? 0 : t - e, cr = (t, e) => t <= 0 ? 0 : t + e, yr = 1e3, Gr = 2e3, Cn = 1048576, Si = (t, e) => {
2472
2472
  if (!(Number.isFinite(e) && e > 0))
2473
2473
  throw new RangeError(`[VirtualScroll] devicePixelRatio must be a finite number > 0, received ${e}`);
2474
2474
  return Math.round(t * e) / e;
2475
- }, wi = (t) => {
2475
+ }, Mi = (t) => {
2476
2476
  const e = t.ownerDocument.defaultView;
2477
2477
  if (e === null)
2478
2478
  throw new Error("[VirtualScroll] the items wrapper belongs to a document without a window, so it has no device-pixel ratio");
2479
2479
  return e;
2480
- }, Si = 40, Mr = (t) => {
2480
+ }, An = () => {
2481
+ }, yi = () => null, Ii = () => typeof window > "u" ? null : window, Ti = (t, e) => {
2482
+ if (typeof t.matchMedia != "function")
2483
+ return An;
2484
+ let r = t.matchMedia(`(resolution: ${t.devicePixelRatio}dppx)`);
2485
+ const n = () => {
2486
+ r.removeEventListener("change", n), r = t.matchMedia(`(resolution: ${t.devicePixelRatio}dppx)`), r.addEventListener("change", n), e();
2487
+ };
2488
+ return r.addEventListener("change", n), () => {
2489
+ r.removeEventListener("change", n);
2490
+ };
2491
+ }, Ri = ({ translateY: t, children: e }) => {
2492
+ const [r, n] = Ce(Ii), i = x((h) => r === null ? An : Ti(r, h), [r]), s = x(() => r === null ? null : r.devicePixelRatio, [r]), o = qn(i, s, yi), l = x(
2493
+ (h) => {
2494
+ if (h === null)
2495
+ return;
2496
+ const b = Mi(h);
2497
+ b !== r && n(b);
2498
+ },
2499
+ [r]
2500
+ ), d = o === null ? t : Si(t, o);
2501
+ return /* @__PURE__ */ j("div", { ref: l, className: "aqvs-items-wrapper", style: { top: 0, transform: `translateY(${d}px)`, willChange: "transform" }, children: e });
2502
+ }, Pi = 40, vr = (t) => {
2481
2503
  if (!Number.isFinite(t)) return 0n;
2482
2504
  const e = Math.trunc(t);
2483
2505
  return e <= 0 ? 0n : BigInt(e);
2484
- }, Mi = (t, e, r, n, i, s, o, l) => {
2485
- const d = Mr(n);
2506
+ }, Ei = (t, e, r, n, i, s, o, l) => {
2507
+ const d = vr(n);
2486
2508
  if (d === 0n)
2487
2509
  return { renderingStartIndex: 0, renderingEndIndex: 0, visibleStartIndex: 0, visibleEndIndex: 0 };
2488
- const m = (L) => L < 0n ? 0n : L >= d ? d - 1n : L, v = { materializeOption: { materialize: !1 } }, { index: M, cumulative: y } = s.findIndexAtOrAfter(t, v);
2510
+ const h = (L) => L < 0n ? 0n : L >= d ? d - 1n : L, b = { materializeOption: { materialize: !1 } }, { index: M, cumulative: I } = s.findIndexAtOrAfter(t, b);
2489
2511
  let w;
2490
- M === -1 ? w = d - 1n : (y === t ? w = Mr(M + 1) : w = Mr(M), w >= d && (w = d - 1n)), t <= 0 && (w = 0n), l && t >= o && (w = d - 1n);
2512
+ M === -1 ? w = d - 1n : (I === t ? w = vr(M + 1) : w = vr(M), w >= d && (w = d - 1n)), t <= 0 && (w = 0n), l && t >= o && (w = d - 1n);
2491
2513
  const R = (L) => {
2492
2514
  const N = Number(L);
2493
2515
  if (!Number.isSafeInteger(N))
@@ -2495,52 +2517,52 @@ const xi = 1e4, Hi = () => {
2495
2517
  const { cumulative: P } = s.prefixSum(N, { materializeOption: { materialize: !1 } });
2496
2518
  if (!Number.isFinite(P))
2497
2519
  return null;
2498
- const { index: ee } = s.findIndexAtOrAfter(P + 0.5, { materializeOption: { materialize: !1 } });
2499
- if (ee === -1)
2520
+ const { index: J } = s.findIndexAtOrAfter(P + 0.5, { materializeOption: { materialize: !1 } });
2521
+ if (J === -1)
2500
2522
  return null;
2501
- const K = Mr(ee);
2523
+ const K = vr(J);
2502
2524
  return K > L ? K : null;
2503
2525
  }, ne = (L) => {
2504
- let N = 0, P = L, ee = L, K = 0n, B = 0;
2526
+ let N = 0, P = L, J = L, K = 0n, q = 0;
2505
2527
  for (; P < d && N < e; ) {
2506
- const oe = Number(P), te = i(oe);
2507
- if (N += te, ee = P, P += 1n, K += 1n, !Number.isFinite(te) || te < 0)
2528
+ const oe = Number(P), ee = i(oe);
2529
+ if (N += ee, J = P, P += 1n, K += 1n, !Number.isFinite(ee) || ee < 0)
2508
2530
  break;
2509
- if (te === 0) {
2510
- if (B += 1, B > Rr) {
2511
- const ge = R(ee);
2531
+ if (ee === 0) {
2532
+ if (q += 1, q > yr) {
2533
+ const ge = R(J);
2512
2534
  if (ge !== null && ge > P)
2513
- P = ge, B = 0;
2535
+ P = ge, q = 0;
2514
2536
  else if (ge !== null && ge === P && i(Number(P)) > 0)
2515
- B = 0;
2537
+ q = 0;
2516
2538
  else
2517
2539
  break;
2518
2540
  }
2519
2541
  } else
2520
- B = 0;
2542
+ q = 0;
2521
2543
  }
2522
- return K === 0n && (ee = L), { height: N, end: ee };
2544
+ return K === 0n && (J = L), { height: N, end: J };
2523
2545
  };
2524
- let { height: Y, end: pe } = ne(w);
2525
- if (Y < e && w > 0n) {
2526
- let L = w, N = Y, P = 0;
2546
+ let { height: X, end: pe } = ne(w);
2547
+ if (X < e && w > 0n) {
2548
+ let L = w, N = X, P = 0;
2527
2549
  for (; L > 0n && N < e; ) {
2528
2550
  L -= 1n;
2529
- const K = Number(L), B = i(K);
2530
- if (N += B, !Number.isFinite(B) || B < 0)
2551
+ const K = Number(L), q = i(K);
2552
+ if (N += q, !Number.isFinite(q) || q < 0)
2531
2553
  break;
2532
- if (B === 0) {
2533
- if (P += 1, P > Rr) {
2554
+ if (q === 0) {
2555
+ if (P += 1, P > yr) {
2534
2556
  const oe = Number(L);
2535
2557
  if (!Number.isSafeInteger(oe))
2536
2558
  break;
2537
- const { cumulative: te } = s.prefixSum(oe, { materializeOption: { materialize: !1 } });
2538
- if (!Number.isFinite(te))
2559
+ const { cumulative: ee } = s.prefixSum(oe, { materializeOption: { materialize: !1 } });
2560
+ if (!Number.isFinite(ee))
2539
2561
  break;
2540
- const { index: ge } = s.findIndexAtOrAfter(te - 0.5, { materializeOption: { materialize: !1 } }), et = ge === -1 ? -1n : Mr(ge);
2541
- if (et >= 0n && et < L)
2542
- L = et + 1n, P = 0;
2543
- else if (et === L && L >= 1n && i(Number(L - 1n)) > 0)
2562
+ const { index: ge } = s.findIndexAtOrAfter(ee - 0.5, { materializeOption: { materialize: !1 } }), Je = ge === -1 ? -1n : vr(ge);
2563
+ if (Je >= 0n && Je < L)
2564
+ L = Je + 1n, P = 0;
2565
+ else if (Je === L && L >= 1n && i(Number(L - 1n)) > 0)
2544
2566
  P = 0;
2545
2567
  else
2546
2568
  break;
@@ -2548,45 +2570,45 @@ const xi = 1e4, Hi = () => {
2548
2570
  } else
2549
2571
  P = 0;
2550
2572
  }
2551
- w = m(L);
2552
- const ee = ne(w);
2553
- Y = ee.height, pe = ee.end;
2573
+ w = h(L);
2574
+ const J = ne(w);
2575
+ X = J.height, pe = J.end;
2554
2576
  }
2555
- const Ce = m(w), D = m(pe), H = m(Ce - BigInt(Math.max(0, r))), ae = m(D + BigInt(Math.max(0, r)));
2577
+ const Ae = h(w), D = h(pe), k = h(Ae - BigInt(Math.max(0, r))), ae = h(D + BigInt(Math.max(0, r)));
2556
2578
  return {
2557
- renderingStartIndex: Qe(Number(H), n),
2558
- renderingEndIndex: Qe(Number(ae), n),
2559
- visibleStartIndex: Qe(Number(Ce), n),
2560
- visibleEndIndex: Qe(Number(D), n)
2579
+ renderingStartIndex: Ze(Number(k), n),
2580
+ renderingEndIndex: Ze(Number(ae), n),
2581
+ visibleStartIndex: Ze(Number(Ae), n),
2582
+ visibleEndIndex: Ze(Number(D), n)
2561
2583
  };
2562
- }, Ln = (t, e, r, n, i, s, o) => {
2584
+ }, Dn = (t, e, r, n, i, s, o) => {
2563
2585
  if (n === 0)
2564
2586
  return { renderingStartIndex: 0, renderingEndIndex: 0, visibleStartIndex: 0, visibleEndIndex: 0 };
2565
2587
  const l = Number.isFinite(o), d = l ? Math.min(Math.max(0, t), o) : Math.max(0, t);
2566
2588
  if (n >= Number.MAX_SAFE_INTEGER)
2567
- return Mi(d, e, r, n, i, s, o, l);
2568
- const { index: m, cumulative: v, currentValue: M } = s.findIndexAtOrAfter(d, { materializeOption: { materialize: !1 } }), y = m === -1 ? e <= 0 || (v ?? 0) < d + (M ?? 0) ? n - 1 : 0 : m;
2569
- let w = Qe(y, n), R = 0;
2570
- if (m !== -1 && v === d)
2571
- w = Qe(m + 1, n), R = 0;
2572
- else if (w === m && v !== void 0 && M !== void 0)
2573
- R = v - M - d;
2589
+ return Ei(d, e, r, n, i, s, o, l);
2590
+ const { index: h, cumulative: b, currentValue: M } = s.findIndexAtOrAfter(d, { materializeOption: { materialize: !1 } }), I = h === -1 ? e <= 0 || (b ?? 0) < d + (M ?? 0) ? n - 1 : 0 : h;
2591
+ let w = Ze(I, n), R = 0;
2592
+ if (h !== -1 && b === d)
2593
+ w = Ze(h + 1, n), R = 0;
2594
+ else if (w === h && b !== void 0 && M !== void 0)
2595
+ R = b - M - d;
2574
2596
  else {
2575
2597
  const { cumulative: L, currentValue: N } = s.prefixSum(w, { materializeOption: { materialize: !1 } });
2576
2598
  R = (L ?? 0) - (N ?? 0) - d;
2577
2599
  }
2578
- const ne = R, Y = (L, N) => {
2579
- let P = L, ee = N, K = 0;
2580
- for (; P < n && ee < e; ) {
2581
- const B = i(P);
2582
- if (ee += B, P++, !Number.isFinite(B) || B < 0)
2600
+ const ne = R, X = (L, N) => {
2601
+ let P = L, J = N, K = 0;
2602
+ for (; P < n && J < e; ) {
2603
+ const q = i(P);
2604
+ if (J += q, P++, !Number.isFinite(q) || q < 0)
2583
2605
  break;
2584
- if (B === 0) {
2585
- if (K++, K > Rr) {
2586
- const { cumulative: oe } = s.prefixSum(P - 1, { materializeOption: { materialize: !1 } }), { index: te } = Number.isFinite(oe) ? s.findIndexAtOrAfter(oe + 0.5, { materializeOption: { materialize: !1 } }) : { index: -1 };
2587
- if (te > P)
2588
- P = te, K = 0;
2589
- else if (te === P && i(P) > 0)
2606
+ if (q === 0) {
2607
+ if (K++, K > yr) {
2608
+ const { cumulative: oe } = s.prefixSum(P - 1, { materializeOption: { materialize: !1 } }), { index: ee } = Number.isFinite(oe) ? s.findIndexAtOrAfter(oe + 0.5, { materializeOption: { materialize: !1 } }) : { index: -1 };
2609
+ if (ee > P)
2610
+ P = ee, K = 0;
2611
+ else if (ee === P && i(P) > 0)
2590
2612
  K = 0;
2591
2613
  else
2592
2614
  break;
@@ -2594,9 +2616,9 @@ const xi = 1e4, Hi = () => {
2594
2616
  } else
2595
2617
  K = 0;
2596
2618
  }
2597
- return { cursor: P, height: ee };
2598
- }, pe = Y(w, R);
2599
- let Ce = pe.cursor;
2619
+ return { cursor: P, height: J };
2620
+ }, pe = X(w, R);
2621
+ let Ae = pe.cursor;
2600
2622
  if (R = pe.height, R < e && w > 0) {
2601
2623
  let L = R + Math.abs(Math.min(0, ne)), N = w - 1, P = 0;
2602
2624
  for (; N >= 0 && L < e; ) {
@@ -2606,8 +2628,8 @@ const xi = 1e4, Hi = () => {
2606
2628
  break;
2607
2629
  }
2608
2630
  if (K === 0) {
2609
- if (P++, P > Rr) {
2610
- const { cumulative: B } = s.prefixSum(N, { materializeOption: { materialize: !1 } }), { index: oe } = Number.isFinite(B) ? s.findIndexAtOrAfter(B - 0.5, { materializeOption: { materialize: !1 } }) : { index: -1 };
2631
+ if (P++, P > yr) {
2632
+ const { cumulative: q } = s.prefixSum(N, { materializeOption: { materialize: !1 } }), { index: oe } = Number.isFinite(q) ? s.findIndexAtOrAfter(q - 0.5, { materializeOption: { materialize: !1 } }) : { index: -1 };
2611
2633
  if (oe !== -1 && oe < N) {
2612
2634
  N = oe, P = 0;
2613
2635
  continue;
@@ -2623,15 +2645,15 @@ const xi = 1e4, Hi = () => {
2623
2645
  P = 0;
2624
2646
  N--;
2625
2647
  }
2626
- w = Qe(N + 1, n);
2627
- const ee = Y(w, 0);
2628
- Ce = ee.cursor, R = ee.height;
2648
+ w = Ze(N + 1, n);
2649
+ const J = X(w, 0);
2650
+ Ae = J.cursor, R = J.height;
2629
2651
  }
2630
- const D = Qe(w - r, n), H = Qe(Math.max(Ce - 1, w), n), ae = Qe(H + r, n);
2631
- return { renderingStartIndex: D, renderingEndIndex: ae, visibleStartIndex: w, visibleEndIndex: H };
2632
- }, bn = (t, e, r) => {
2652
+ const D = Ze(w - r, n), k = Ze(Math.max(Ae - 1, w), n), ae = Ze(k + r, n);
2653
+ return { renderingStartIndex: D, renderingEndIndex: ae, visibleStartIndex: w, visibleEndIndex: k };
2654
+ }, gn = (t, e, r) => {
2633
2655
  const n = Math.max(0, e ?? 0), i = f({ last: 0, id: null, arg: null }).current;
2634
- return q(
2656
+ return $(
2635
2657
  () => () => {
2636
2658
  if (i.id !== null && (cancelAnimationFrame(i.id), i.id = null), i.arg !== null && t.current) {
2637
2659
  try {
@@ -2643,7 +2665,7 @@ const xi = 1e4, Hi = () => {
2643
2665
  }
2644
2666
  },
2645
2667
  [i, t, r]
2646
- ), b(
2668
+ ), x(
2647
2669
  (s) => {
2648
2670
  if (i.arg = s, i.id !== null) return;
2649
2671
  const o = (l) => {
@@ -2653,8 +2675,8 @@ const xi = 1e4, Hi = () => {
2653
2675
  if (t.current)
2654
2676
  try {
2655
2677
  r(t.current, i.arg);
2656
- } catch (m) {
2657
- console.error("[useThrottledInvoker] Error invoking callback", m);
2678
+ } catch (h) {
2679
+ console.error("[useThrottledInvoker] Error invoking callback", h);
2658
2680
  }
2659
2681
  i.arg = null, i.last = l;
2660
2682
  }
@@ -2664,16 +2686,16 @@ const xi = 1e4, Hi = () => {
2664
2686
  },
2665
2687
  [n, r, t, i]
2666
2688
  );
2667
- }, Ii = kn.memo(({ index: t, top: e, height: r, item: n, children: i, clipItemHeight: s, enableKeyboardNavigation: o, onKeyDown: l, onEscapeKeyDown: d, onFocus: m, registerItemRef: v }) => {
2668
- const M = b((Y) => v(t, Y), [t, v]), y = b((Y) => l(Y, t), [t, l]), w = b((Y) => d?.(Y, t), [t, d]), R = b(() => m(t), [t, m]), ne = b((Y) => {
2669
- Y.currentTarget.focus({ preventScroll: !0 });
2689
+ }, zi = Hn.memo(({ index: t, top: e, height: r, item: n, children: i, clipItemHeight: s, enableKeyboardNavigation: o, onKeyDown: l, onEscapeKeyDown: d, onFocus: h, registerItemRef: b }) => {
2690
+ const M = x((X) => b(t, X), [t, b]), I = x((X) => l(X, t), [t, l]), w = x((X) => d?.(X, t), [t, d]), R = x(() => h(t), [t, h]), ne = x((X) => {
2691
+ X.currentTarget.focus({ preventScroll: !0 });
2670
2692
  }, []);
2671
2693
  return (
2672
2694
  // 行ラッパーの role は消費側の複合ウィジェット契約 (listbox / tree / grid — README「Composite widget
2673
2695
  // roles」) の所有物で、パッケージが既定 role を課すと衝突する。キー/フォーカス結線は
2674
2696
  // enableKeyboardNavigation の行ナビゲーション機構そのもの。
2675
2697
  // biome-ignore lint/a11y/noStaticElementInteractions: role は消費側の複合ウィジェット契約の所有物 (上記)
2676
- /* @__PURE__ */ J(
2698
+ /* @__PURE__ */ j(
2677
2699
  "div",
2678
2700
  {
2679
2701
  ref: M,
@@ -2687,14 +2709,14 @@ const xi = 1e4, Hi = () => {
2687
2709
  },
2688
2710
  tabIndex: o ? -1 : void 0,
2689
2711
  onPointerDown: o ? ne : void 0,
2690
- onKeyDownCapture: o ? y : void 0,
2712
+ onKeyDownCapture: o ? I : void 0,
2691
2713
  onKeyDown: o && d ? w : void 0,
2692
2714
  onFocusCapture: o ? R : void 0,
2693
2715
  children: i(n, t)
2694
2716
  }
2695
2717
  )
2696
2718
  );
2697
- }), yi = ({
2719
+ }), Ni = ({
2698
2720
  itemCount: t,
2699
2721
  getItem: e,
2700
2722
  getItemKey: r,
@@ -2704,76 +2726,76 @@ const xi = 1e4, Hi = () => {
2704
2726
  className: o,
2705
2727
  testId: l,
2706
2728
  onScroll: d,
2707
- onRangeChange: m,
2708
- children: v,
2729
+ onRangeChange: h,
2730
+ children: b,
2709
2731
  background: M,
2710
- initialScrollIndex: y,
2732
+ initialScrollIndex: I,
2711
2733
  initialScrollOffset: w,
2712
2734
  initialScrollAnchor: R,
2713
2735
  callbackThrottleMs: ne = 5,
2714
- contentInsets: Y,
2736
+ contentInsets: X,
2715
2737
  onItemFocus: pe,
2716
- scrollBarOptions: Ce,
2738
+ scrollBarOptions: Ae,
2717
2739
  behaviorOptions: D,
2718
- onWheelHorizontal: H,
2740
+ onWheelHorizontal: k,
2719
2741
  onPanHorizontal: ae,
2720
2742
  horizontalKeyInputs: L,
2721
- horizontalKeyStep: N = Si,
2743
+ horizontalKeyStep: N = Pi,
2722
2744
  contentProps: P,
2723
- liveRegion: ee,
2745
+ liveRegion: J,
2724
2746
  locale: K,
2725
- labels: B
2747
+ labels: q
2726
2748
  }, oe) => {
2727
- const { width: te, enableThumbDrag: ge, enableTrackClick: et, enableArrowButtons: z, enableArrowButtonTabStops: W, enableScrollToTopBottomButtons: ie, renderThumbOverlay: tt, tapScrollCircleOptions: ce } = Ce ?? {}, Me = we(() => Rn(K, B), [K, B]), { enablePointerDrag: Ct, pointerDragInputs: ue, enableKeyboardNavigation: le = !0, enableEscapeRowReturn: vt = !1, wheelSpeedMultiplier: st, inertiaOptions: lt, overscrollBehavior: _e, clipItemHeight: ot = !1, resetOnGetItemHeightChange: rt = !1 } = D ?? {}, [nt, fe] = Ae(0), ze = i ?? nt, $e = b((c) => {
2749
+ const { width: ee, enableThumbDrag: ge, enableTrackClick: Je, enableArrowButtons: z, enableArrowButtonTabStops: Y, enableScrollToTopBottomButtons: ie, renderThumbOverlay: et, tapScrollCircleOptions: ce } = Ae ?? {}, Se = ve(() => In(K, q), [K, q]), { enablePointerDrag: At, pointerDragInputs: ue, enableKeyboardNavigation: le = !0, enableEscapeRowReturn: vt = !1, wheelSpeedMultiplier: it, inertiaOptions: ct, overscrollBehavior: _e, clipItemHeight: st = !1, resetOnGetItemHeightChange: tt = !1 } = D ?? {}, [rt, fe] = Ce(0), ze = i ?? rt, $e = x((c) => {
2728
2750
  fe((g) => g === c ? g : c);
2729
- }, []), F = f(null), qe = f({
2751
+ }, []), F = f(null), Ye = f({
2730
2752
  renderingStartIndex: 0,
2731
2753
  renderingEndIndex: 0,
2732
2754
  visibleStartIndex: 0,
2733
2755
  visibleEndIndex: 0,
2734
2756
  scrollPosition: 0,
2735
2757
  totalHeight: 0
2736
- }), Z = f(R && t > 0 ? { index: se(Math.trunc(R.index), 0, t - 1), align: "top", offset: -Math.max(0, R.offsetPx ?? 0) } : null), gt = f(!1), U = f(!0);
2737
- q(() => {
2738
- if (U.current) {
2739
- U.current = !1;
2758
+ }), Z = f(R && t > 0 ? { index: se(Math.trunc(R.index), 0, t - 1), align: "top", offset: -Math.max(0, R.offsetPx ?? 0) } : null), bt = f(!1), B = f(!0);
2759
+ $(() => {
2760
+ if (B.current) {
2761
+ B.current = !1;
2740
2762
  return;
2741
2763
  }
2742
- rt && (Z.current = null);
2743
- }, [rt, n]);
2744
- const E = we(() => xn(Y), [Y]), [ut] = Ae(() => {
2745
- const g = R?.index ?? y, x = typeof g == "number" && Number.isFinite(g) ? Math.max(0, Math.trunc(g)) : 0;
2746
- return { from: Math.max(0, x - 50), to: x + 50 };
2747
- }), Pe = we(
2764
+ tt && (Z.current = null);
2765
+ }, [tt, n]);
2766
+ const E = ve(() => pn(X), [X]), [lt] = Ce(() => {
2767
+ const g = R?.index ?? I, v = typeof g == "number" && Number.isFinite(g) ? Math.max(0, Math.trunc(g)) : 0;
2768
+ return { from: Math.max(0, v - 50), to: v + 50 };
2769
+ }), Pe = ve(
2748
2770
  // 目的: Fenwick Tree のオプション設定
2749
2771
  // 依存関係: resetOnGetItemHeightChange, initialSampleRange (マウント時固定)
2750
2772
  // itemCount には依存させない (依存させると追記のたびに options 参照が変わり、計測済み高さが全消去される)。
2751
2773
  // この useMemo により sampleRange を毎レンダー新規生成しない = 参照同一性由来の破壊的 reset を防ぐ。
2752
2774
  () => ({
2753
- sampleRange: ut,
2754
- resetOnValueFnChange: rt,
2775
+ sampleRange: lt,
2776
+ resetOnValueFnChange: tt,
2755
2777
  materialize: !0
2756
2778
  }),
2757
- [rt, ut]
2758
- ), C = Cn(t, n, Pe), [dt] = Ae(() => {
2779
+ [tt, lt]
2780
+ ), A = Vn(t, n, Pe), [ut] = Ce(() => {
2759
2781
  let c = 0, g = 0;
2760
2782
  if (R && t > 0) {
2761
- const x = se(Math.trunc(R.index), 0, t - 1), k = Math.max(0, R.offsetPx ?? 0), G = se(x - s * 2, 0, t - 1), $ = se(x + s * 2, 0, t - 1), Q = x > 0 || k > 0 ? { materializeOption: { materialize: !0, ranges: [{ from: G, to: $ }] } } : void 0, { cumulative: be, total: Ue, currentValue: Oe } = C.prefixSum(x, Q), Ne = Math.max(be - Oe + k, 0);
2762
- c = ur(Ne, E.top), g = Ue ?? C.getTotal();
2763
- } else if (typeof y == "number") {
2764
- const x = se(y, 0, t - 1), k = se(x - s * 2, 0, t - 1), G = se(x + s * 2, 0, t - 1), $ = y > 0 ? { materializeOption: { materialize: !0, ranges: [{ from: k, to: G }] } } : void 0, { cumulative: Q, total: be, currentValue: Ue } = C.prefixSum(y, $), Oe = Math.max(Q - Ue, 0);
2765
- c = ur(Oe, E.top), g = be ?? C.getTotal();
2766
- } else typeof w == "number" && (c = ur(Math.max(w, 0), E.top)), g = C.getTotal();
2783
+ const v = se(Math.trunc(R.index), 0, t - 1), W = Math.max(0, R.offsetPx ?? 0), G = se(v - s * 2, 0, t - 1), Q = se(v + s * 2, 0, t - 1), te = v > 0 || W > 0 ? { materializeOption: { materialize: !0, ranges: [{ from: G, to: Q }] } } : void 0, { cumulative: Re, total: qe, currentValue: Oe } = A.prefixSum(v, te), Ne = Math.max(Re - Oe + W, 0);
2784
+ c = cr(Ne, E.top), g = qe ?? A.getTotal();
2785
+ } else if (typeof I == "number") {
2786
+ const v = se(I, 0, t - 1), W = se(v - s * 2, 0, t - 1), G = se(v + s * 2, 0, t - 1), Q = I > 0 ? { materializeOption: { materialize: !0, ranges: [{ from: W, to: G }] } } : void 0, { cumulative: te, total: Re, currentValue: qe } = A.prefixSum(I, Q), Oe = Math.max(te - qe, 0);
2787
+ c = cr(Oe, E.top), g = Re ?? A.getTotal();
2788
+ } else typeof w == "number" && (c = cr(Math.max(w, 0), E.top)), g = A.getTotal();
2767
2789
  return { position: c, total: g };
2768
- }), [It, Dt] = Ae(dt.position), [ft, p] = Ae(dt.total), _ = f(dt.position), he = f(E.top), j = f(d ?? void 0), re = f(m ?? void 0), De = f(H), Ye = (L?.length ?? 0) > 0, ve = !!H;
2769
- q(() => {
2770
- Ye && (le || A.warn("[VirtualScroll] horizontalKeyInputs is set but behaviorOptions.enableKeyboardNavigation is false; horizontal keyboard scrolling is disabled because the row key handler is not mounted."), ve || A.warn("[VirtualScroll] horizontalKeyInputs is set but onWheelHorizontal is missing; horizontal keyboard scrolling is disabled because the package does not own the horizontal axis."), Number.isFinite(N) && N > 0 || A.warn(`[VirtualScroll] horizontalKeyStep must be a finite positive number, received ${N}. Horizontal arrow keys are left untouched.`));
2771
- }, [Ye, ve, le, N]);
2772
- const Ge = f(/* @__PURE__ */ new Map()), Se = f(null), Le = f(null), [ht, at] = Ae(null), [Fe, je] = Ae(!1), xe = f(null), Ie = f(!1), Ke = f(0), Ee = f(!1), S = f(!1), T = f(t);
2773
- T.current !== t && (T.current = t, S.current = !0), Je(() => {
2774
- j.current = d ?? void 0, re.current = m ?? void 0, De.current = H;
2775
- }, [m, d, H]);
2776
- const Ve = b(
2790
+ }), [yt, Dt] = Ce(ut.position), [dt, p] = Ce(ut.total), _ = f(ut.position), he = f(E.top), U = f(d ?? void 0), re = f(h ?? void 0), De = f(k), Be = (L?.length ?? 0) > 0, xe = !!k;
2791
+ $(() => {
2792
+ Be && (le || C.warn("[VirtualScroll] horizontalKeyInputs is set but behaviorOptions.enableKeyboardNavigation is false; horizontal keyboard scrolling is disabled because the row key handler is not mounted."), xe || C.warn("[VirtualScroll] horizontalKeyInputs is set but onWheelHorizontal is missing; horizontal keyboard scrolling is disabled because the package does not own the horizontal axis."), Number.isFinite(N) && N > 0 || C.warn(`[VirtualScroll] horizontalKeyStep must be a finite positive number, received ${N}. Horizontal arrow keys are left untouched.`));
2793
+ }, [Be, xe, le, N]);
2794
+ const Ue = f(/* @__PURE__ */ new Map()), we = f(null), Le = f(null), [ft, ot] = Ce(null), [Fe, Ge] = Ce(!1), be = f(null), Me = f(!1), je = f(0), Ee = f(!1), S = f(!1), T = f(t);
2795
+ T.current !== t && (T.current = t, S.current = !0), Qe(() => {
2796
+ U.current = d ?? void 0, re.current = h ?? void 0, De.current = k;
2797
+ }, [h, d, k]);
2798
+ const Ve = x(
2777
2799
  (c) => {
2778
2800
  if (le && c && typeof c.focus == "function")
2779
2801
  try {
@@ -2783,96 +2805,96 @@ const xi = 1e4, Hi = () => {
2783
2805
  }
2784
2806
  },
2785
2807
  [le]
2786
- ), Xe = b((c, { position: g, totalHeight: x }) => {
2787
- c(g, x);
2788
- }, []), Be = bn(j, ne, Xe), ct = b((c, g) => {
2808
+ ), Xe = x((c, { position: g, totalHeight: v }) => {
2809
+ c(g, v);
2810
+ }, []), We = gn(U, ne, Xe), at = x((c, g) => {
2789
2811
  c(g);
2790
- }, []), mt = bn(re, ne, ct), ye = f(E.top);
2812
+ }, []), ht = gn(re, ne, at), ye = f(E.top);
2791
2813
  ye.current = E.top;
2792
- const Et = f(Be);
2793
- Et.current = Be, q(() => (gt.current = !1, () => {
2794
- gt.current = !0, xe.current && (clearTimeout(xe.current), xe.current = null);
2795
- }), []), q(() => {
2796
- le || (Ge.current.clear(), Se.current = null, Le.current = null);
2814
+ const Pt = f(We);
2815
+ Pt.current = We, $(() => (bt.current = !1, () => {
2816
+ bt.current = !0, be.current && (clearTimeout(be.current), be.current = null);
2817
+ }), []), $(() => {
2818
+ le || (Ue.current.clear(), we.current = null, Le.current = null);
2797
2819
  }, [le]);
2798
- const tr = b(
2820
+ const Qt = x(
2799
2821
  (c, g) => {
2800
2822
  if (!g) {
2801
- Ge.current.delete(c);
2823
+ Ue.current.delete(c);
2802
2824
  return;
2803
2825
  }
2804
- le && (Ge.current.set(c, g), Se.current === c && (Se.current = null, Le.current = c, Ve(g)));
2826
+ le && (Ue.current.set(c, g), we.current === c && (we.current = null, Le.current = c, Ve(g)));
2805
2827
  },
2806
2828
  [le, Ve]
2807
- ), dr = 0.01, Te = f({
2829
+ ), lr = 0.01, Ie = f({
2808
2830
  rafId: null,
2809
2831
  loopActive: !1,
2810
2832
  idleFrames: 0,
2811
- lastRenderedPosition: dt.position
2812
- }), wt = b(() => {
2813
- const c = Te.current;
2833
+ lastRenderedPosition: ut.position
2834
+ }), wt = x(() => {
2835
+ const c = Ie.current;
2814
2836
  c.rafId !== null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(c.rafId), c.rafId = null, c.loopActive = !1, c.idleFrames = 0;
2815
2837
  }, []);
2816
- q(
2838
+ $(
2817
2839
  () => () => {
2818
2840
  wt();
2819
2841
  },
2820
2842
  [wt]
2821
2843
  );
2822
- const ar = f(() => {
2823
- }), rr = b(() => {
2824
- const c = Te.current;
2844
+ const nr = f(() => {
2845
+ }), Jt = x(() => {
2846
+ const c = Ie.current;
2825
2847
  c.rafId = null;
2826
- const g = _.current, x = Pt(g, ye.current), k = C.getTotal();
2827
- if (Dt(($) => Math.abs($ - g) < dr ? $ : g), Math.abs(c.lastRenderedPosition - g) >= dr ? (Et.current({ position: x, totalHeight: k }), c.lastRenderedPosition = g, c.idleFrames = 0) : c.idleFrames += 1, c.idleFrames >= 2) {
2848
+ const g = _.current, v = Rt(g, ye.current), W = A.getTotal();
2849
+ if (Dt((Q) => Math.abs(Q - g) < lr ? Q : g), Math.abs(c.lastRenderedPosition - g) >= lr ? (Pt.current({ position: v, totalHeight: W }), c.lastRenderedPosition = g, c.idleFrames = 0) : c.idleFrames += 1, c.idleFrames >= 2) {
2828
2850
  wt();
2829
2851
  return;
2830
2852
  }
2831
2853
  if (typeof requestAnimationFrame == "function") {
2832
- c.rafId = requestAnimationFrame(($) => ar.current($));
2854
+ c.rafId = requestAnimationFrame((Q) => nr.current(Q));
2833
2855
  return;
2834
2856
  }
2835
2857
  c.loopActive = !1;
2836
- }, [C, wt]);
2837
- ar.current = rr;
2838
- const Gt = b(() => {
2839
- const c = Te.current;
2858
+ }, [A, wt]);
2859
+ nr.current = Jt;
2860
+ const Wt = x(() => {
2861
+ const c = Ie.current;
2840
2862
  if (c.idleFrames = 0, !c.loopActive) {
2841
2863
  if (c.loopActive = !0, typeof requestAnimationFrame == "function") {
2842
- c.rafId = requestAnimationFrame(rr);
2864
+ c.rafId = requestAnimationFrame(Jt);
2843
2865
  return;
2844
2866
  }
2845
2867
  c.loopActive = !1;
2846
2868
  }
2847
- }, [rr]), Re = b(
2869
+ }, [Jt]), Te = x(
2848
2870
  (c, g) => {
2849
- const x = g?.immediate ?? !1, k = Pt(c, E.top);
2850
- if (_.current = c, x) {
2851
- Te.current.lastRenderedPosition = c, Te.current.idleFrames = 0, Dt(c), Be({ position: k, totalHeight: C.getTotal() });
2871
+ const v = g?.immediate ?? !1, W = Rt(c, E.top);
2872
+ if (_.current = c, v) {
2873
+ Ie.current.lastRenderedPosition = c, Ie.current.idleFrames = 0, Dt(c), We({ position: W, totalHeight: A.getTotal() });
2852
2874
  return;
2853
2875
  }
2854
- Gt();
2876
+ Wt();
2855
2877
  },
2856
- [Gt, C, E.top, Be]
2857
- ), zt = b((c, g = 0) => {
2858
- const x = F.current;
2859
- if (!x)
2878
+ [Wt, A, E.top, We]
2879
+ ), Et = x((c, g = 0) => {
2880
+ const v = F.current;
2881
+ if (!v)
2860
2882
  return c;
2861
- const k = x.getScrollPosition();
2862
- Ke.current += 1;
2863
- const G = x.getContentSize() + g, $ = x.getViewportSize(), Q = x.scrollTo(c, { contentSize: G, viewportSize: $ });
2864
- return Q === k && (Ke.current = Math.max(0, Ke.current - 1)), Math.abs(Q - c) > 0.5 && (Ee.current = !0), Q;
2865
- }, []), jt = f(!1);
2866
- q(() => {
2867
- if (!jt.current)
2868
- if (jt.current = !0, R == null && typeof y != "number" && typeof w == "number") {
2869
- const c = ur(Math.max(w, 0), E.top), g = Math.abs(c - _.current) > 0.5;
2870
- Re(c, { immediate: !0 }), g && F.current?.scrollTo(c);
2883
+ const W = v.getScrollPosition();
2884
+ je.current += 1;
2885
+ const G = v.getContentSize() + g, Q = v.getViewportSize(), te = v.scrollTo(c, { contentSize: G, viewportSize: Q });
2886
+ return te === W && (je.current = Math.max(0, je.current - 1)), Math.abs(te - c) > 0.5 && (Ee.current = !0), te;
2887
+ }, []), Ut = f(!1);
2888
+ $(() => {
2889
+ if (!Ut.current)
2890
+ if (Ut.current = !0, R == null && typeof I != "number" && typeof w == "number") {
2891
+ const c = cr(Math.max(w, 0), E.top), g = Math.abs(c - _.current) > 0.5;
2892
+ Te(c, { immediate: !0 }), g && F.current?.scrollTo(c);
2871
2893
  } else
2872
- Re(_.current, { immediate: !0 });
2873
- }, [R, y, w, E.top, Re]), q(() => {
2874
- const c = C.getTotal();
2875
- if (ft !== c) {
2894
+ Te(_.current, { immediate: !0 });
2895
+ }, [R, I, w, E.top, Te]), $(() => {
2896
+ const c = A.getTotal();
2897
+ if (dt !== c) {
2876
2898
  p(c);
2877
2899
  return;
2878
2900
  }
@@ -2880,170 +2902,170 @@ const xi = 1e4, Hi = () => {
2880
2902
  Ee.current = !1;
2881
2903
  const g = F.current;
2882
2904
  if (g && Math.abs(g.getScrollPosition() - _.current) > 0.5) {
2883
- const x = zt(_.current);
2884
- Ee.current = !1, Re(x, { immediate: !0 });
2905
+ const v = Et(_.current);
2906
+ Ee.current = !1, Te(v, { immediate: !0 });
2885
2907
  }
2886
2908
  }
2887
- }, [C, ft, t, zt, Re]), q(() => {
2909
+ }, [A, dt, t, Et, Te]), $(() => {
2888
2910
  if (Z.current !== null) {
2889
- const { index: c, align: g, offset: x } = Z.current, k = Qe(c, t), { cumulative: G, currentValue: $ } = C.prefixSum(k, { materializeOption: { materialize: !1 } });
2890
- if (G !== void 0 && $ !== void 0) {
2891
- const Q = Math.max(G - $, 0);
2892
- let be = Q;
2893
- g === "bottom" ? be = G - ze : g === "center" && (be = Q + $ / 2 - ze / 2), x && (be -= x), be = Math.max(0, be);
2894
- const Ue = Math.max(0, ft + E.top + E.bottom - ze), Oe = Math.min(ur(be, E.top), Ue);
2895
- Math.abs(Oe - _.current) > 1 && (A.debug("[VirtualScroll] Drift correction", {
2911
+ const { index: c, align: g, offset: v } = Z.current, W = Ze(c, t), { cumulative: G, currentValue: Q } = A.prefixSum(W, { materializeOption: { materialize: !1 } });
2912
+ if (G !== void 0 && Q !== void 0) {
2913
+ const te = Math.max(G - Q, 0);
2914
+ let Re = te;
2915
+ g === "bottom" ? Re = G - ze : g === "center" && (Re = te + Q / 2 - ze / 2), v && (Re -= v), Re = Math.max(0, Re);
2916
+ const qe = Math.max(0, dt + E.top + E.bottom - ze), Oe = Math.min(cr(Re, E.top), qe);
2917
+ Math.abs(Oe - _.current) > 1 && (C.debug("[VirtualScroll] Drift correction", {
2896
2918
  from: _.current,
2897
2919
  to: Oe,
2898
- targetIndex: k
2899
- }), Ke.current === 0 && (Ke.current += 1), F.current?.scrollTo(Oe), Re(Oe, { immediate: !0 }));
2920
+ targetIndex: W
2921
+ }), je.current === 0 && (je.current += 1), F.current?.scrollTo(Oe), Te(Oe, { immediate: !0 }));
2900
2922
  }
2901
2923
  }
2902
2924
  S.current = !1;
2903
- }, [ft, C, t, E.top, Re, ze, E.bottom]), q(() => {
2925
+ }, [dt, A, t, E.top, Te, ze, E.bottom]), $(() => {
2904
2926
  const c = he.current;
2905
2927
  if (c === E.top || (he.current = E.top, Z.current))
2906
2928
  return;
2907
- const g = Pt(_.current, c), x = ur(g, E.top);
2908
- _.current = x, F.current?.scrollTo(x), Re(x, { immediate: !0 });
2909
- }, [E.top, Re]);
2910
- const cr = b(
2929
+ const g = Rt(_.current, c), v = cr(g, E.top);
2930
+ _.current = v, F.current?.scrollTo(v), Te(v, { immediate: !0 });
2931
+ }, [E.top, Te]);
2932
+ const ir = x(
2911
2933
  (c, g) => {
2912
2934
  if (t === 0)
2913
2935
  return;
2914
- const x = Qe(c, t), k = C.get(x), G = g - k, $ = C.update(x, g);
2915
- $ !== void 0 && p($), A.debug("[VirtualScroll] Updated item size manually", { index: x, size: g, total: $ });
2916
- let Q = Z.current ? Z.current.index : null;
2917
- if (Q === null) {
2918
- const be = _.current, Ue = xn(Y).top, Oe = Pt(be, Ue), { index: Ne, cumulative: xt } = C.findIndexAtOrAfter(Oe, { materializeOption: { materialize: !1 } });
2919
- Q = xt !== void 0 && xt === Oe ? Ne + 1 : Ne;
2936
+ const v = Ze(c, t), W = A.get(v), G = g - W, Q = A.update(v, g);
2937
+ Q !== void 0 && p(Q), C.debug("[VirtualScroll] Updated item size manually", { index: v, size: g, total: Q });
2938
+ let te = Z.current ? Z.current.index : null;
2939
+ if (te === null) {
2940
+ const Re = _.current, qe = pn(X).top, Oe = Rt(Re, qe), { index: Ne, cumulative: xt } = A.findIndexAtOrAfter(Oe, { materializeOption: { materialize: !1 } });
2941
+ te = xt !== void 0 && xt === Oe ? Ne + 1 : Ne;
2920
2942
  }
2921
- if (Q !== -1 && x < Q && G !== 0) {
2922
- const be = _.current, Ue = be + G;
2923
- zt(Ue, G), Re(Ue, { immediate: !0 }), A.debug("[VirtualScroll] Adjusted scroll for layout shift (manual update)", { from: be, to: Ue, causedByIndex: x, delta: G, activeVisibleStartIndex: Q });
2943
+ if (te !== -1 && v < te && G !== 0) {
2944
+ const Re = _.current, qe = Re + G;
2945
+ Et(qe, G), Te(qe, { immediate: !0 }), C.debug("[VirtualScroll] Adjusted scroll for layout shift (manual update)", { from: Re, to: qe, causedByIndex: v, delta: G, activeVisibleStartIndex: te });
2924
2946
  }
2925
2947
  },
2926
- [C, t, zt, Re, Y]
2927
- ), St = b(
2948
+ [A, t, Et, Te, X]
2949
+ ), St = x(
2928
2950
  (c, g) => {
2929
2951
  if (!F.current || t === 0)
2930
2952
  return;
2931
- const x = Qe(c, t), k = Qe(x - s * 2, t), G = Qe(x + s * 2, t), { cumulative: $, total: Q, currentValue: be } = C.prefixSum(x, { materializeOption: { materialize: !0, ranges: [{ from: k, to: G }] } });
2932
- if (A.debug("[VirtualScroll] Scrolling to index:", x, "ItemBottom:", $, "Total height:", Q, "ItemHeight:", be, "safeIndexFrom:", k, "safeIndexTo:", G), !Q)
2953
+ const v = Ze(c, t), W = Ze(v - s * 2, t), G = Ze(v + s * 2, t), { cumulative: Q, total: te, currentValue: Re } = A.prefixSum(v, { materializeOption: { materialize: !0, ranges: [{ from: W, to: G }] } });
2954
+ if (C.debug("[VirtualScroll] Scrolling to index:", v, "ItemBottom:", Q, "Total height:", te, "ItemHeight:", Re, "safeIndexFrom:", W, "safeIndexTo:", G), !te)
2933
2955
  return;
2934
- const Ue = Math.max($ - be, 0);
2935
- let Oe = Ue;
2936
- g?.align === "bottom" ? Oe = $ - ze : g?.align === "center" && (Oe = Ue + be / 2 - ze / 2), g?.offset && (Oe -= g.offset), Oe = Math.max(0, Oe);
2937
- const Ne = ur(Oe, E.top), xt = F.current?.getContentSize() ?? Q + E.top + E.bottom, pt = Math.max(0, xt - ze), bt = Math.min(Ne, pt);
2956
+ const qe = Math.max(Q - Re, 0);
2957
+ let Oe = qe;
2958
+ g?.align === "bottom" ? Oe = Q - ze : g?.align === "center" && (Oe = qe + Re / 2 - ze / 2), g?.offset && (Oe -= g.offset), Oe = Math.max(0, Oe);
2959
+ const Ne = cr(Oe, E.top), xt = F.current?.getContentSize() ?? te + E.top + E.bottom, pt = Math.max(0, xt - ze), gt = Math.min(Ne, pt);
2938
2960
  Z.current = {
2939
- index: x,
2961
+ index: v,
2940
2962
  align: g?.align,
2941
2963
  offset: g?.offset
2942
2964
  };
2943
- const ir = F.current?.getScrollPosition() ?? -1, vr = Math.abs(ir - bt) > 0.5;
2944
- Ie.current = !1, Ke.current = 0, vr && (Ie.current = !0, Ke.current += 1, F.current?.scrollTo(bt)), p(Q), Re(bt, { immediate: !0 }), A.debug("[VirtualScroll] Setting scroll position to:", bt, { original: Ne, max: pt });
2965
+ const ar = F.current?.getScrollPosition() ?? -1, gr = Math.abs(ar - gt) > 0.5;
2966
+ Me.current = !1, je.current = 0, gr && (Me.current = !0, je.current += 1, F.current?.scrollTo(gt)), p(te), Te(gt, { immediate: !0 }), C.debug("[VirtualScroll] Setting scroll position to:", gt, { original: Ne, max: pt });
2945
2967
  },
2946
- [C, s, t, E.top, E.bottom, ze, Re]
2968
+ [A, s, t, E.top, E.bottom, ze, Te]
2947
2969
  ), u = f(R && t === 0 ? R : null);
2948
- q(() => {
2970
+ $(() => {
2949
2971
  const c = u.current;
2950
2972
  !c || t === 0 || (u.current = null, St(se(Math.trunc(c.index), 0, t - 1), { align: "top", offset: -Math.max(0, c.offsetPx ?? 0) }));
2951
2973
  }, [t, St]);
2952
- const V = b(
2974
+ const V = x(
2953
2975
  (c) => {
2954
2976
  if (!F.current || t === 0)
2955
2977
  return;
2956
- const g = C.getTotal(), x = se(Math.floor(c), 0, g), { index: k, cumulative: G, currentValue: $ } = C.findIndexAtOrAfter(x, { materializeOption: { materialize: !1 } }), be = (G ?? 0) - ($ ?? 0) - x;
2957
- St(k, { offset: be });
2978
+ const g = A.getTotal(), v = se(Math.floor(c), 0, g), { index: W, cumulative: G, currentValue: Q } = A.findIndexAtOrAfter(v, { materializeOption: { materialize: !1 } }), Re = (G ?? 0) - (Q ?? 0) - v;
2979
+ St(W, { offset: Re });
2958
2980
  },
2959
- [C, t, St]
2960
- ), O = b(() => {
2981
+ [A, t, St]
2982
+ ), O = x(() => {
2961
2983
  if (t === 0)
2962
2984
  return null;
2963
- const c = Pt(_.current, E.top), { index: g, cumulative: x, currentValue: k } = C.findIndexAtOrAfter(c, { materializeOption: { materialize: !1 } });
2985
+ const c = Rt(_.current, E.top), { index: g, cumulative: v, currentValue: W } = A.findIndexAtOrAfter(c, { materializeOption: { materialize: !1 } });
2964
2986
  if (g === -1)
2965
2987
  return { index: t - 1, offsetPx: 0 };
2966
- if (x === c)
2988
+ if (v === c)
2967
2989
  return { index: se(g + 1, 0, t - 1), offsetPx: 0 };
2968
- const G = (x ?? 0) - (k ?? 0);
2990
+ const G = (v ?? 0) - (W ?? 0);
2969
2991
  return { index: g, offsetPx: Math.max(0, c - G) };
2970
- }, [C, t, E.top]), me = b(
2992
+ }, [A, t, E.top]), me = x(
2971
2993
  (c) => {
2972
- const g = Pt(_.current, E.top), x = typeof c == "function" ? c(g) : c;
2973
- V(x);
2974
- const k = F.current?.getScrollPosition(), G = typeof k == "number" ? k : _.current;
2975
- return Re(G), Pt(G, ye.current);
2994
+ const g = Rt(_.current, E.top), v = typeof c == "function" ? c(g) : c;
2995
+ V(v);
2996
+ const W = F.current?.getScrollPosition(), G = typeof W == "number" ? W : _.current;
2997
+ return Te(G), Rt(G, ye.current);
2976
2998
  },
2977
- [E.top, V, Re]
2978
- ), ke = b((c) => {
2999
+ [E.top, V, Te]
3000
+ ), ke = x((c) => {
2979
3001
  const g = F.current;
2980
3002
  if (!g)
2981
- return Pt(_.current, ye.current);
2982
- const x = g.scrollTo((k) => k + c);
2983
- return Pt(x, ye.current);
2984
- }, []), He = b((c) => F.current?.applyWheel(c) ?? !1, []), yt = b(
3003
+ return Rt(_.current, ye.current);
3004
+ const v = g.scrollTo((W) => W + c);
3005
+ return Rt(v, ye.current);
3006
+ }, []), He = x((c) => F.current?.applyWheel(c) ?? !1, []), It = x(
2985
3007
  (c, g) => {
2986
- A.debug("[VirtualScroll] Scroll position changed:", c);
2987
- const x = Ie.current;
2988
- x && (Ie.current = !1);
2989
- const k = Ke.current > 0;
2990
- k && (Ke.current = 0);
3008
+ C.debug("[VirtualScroll] Scroll position changed:", c);
3009
+ const v = Me.current;
3010
+ v && (Me.current = !1);
3011
+ const W = je.current > 0;
3012
+ W && (je.current = 0);
2991
3013
  const G = S.current && T.current === t;
2992
- if (x || k || G || (Z.current = null), Re(c), ie) {
2993
- if (x || k)
3014
+ if (v || W || G || (Z.current = null), Te(c), ie) {
3015
+ if (v || W)
2994
3016
  return;
2995
- const $ = c - g;
2996
- if (A.debug("[VirtualScroll] Scroll diff:", $, "New:", c, "Prev:", g), Math.abs($) > 1) {
2997
- const Q = $ > 0 ? "down" : "up";
2998
- at(Q), je(!0), A.debug("[VirtualScroll] Showing scroll buttons. Direction:", Q), xe.current && clearTimeout(xe.current), xe.current = setTimeout(() => {
2999
- je(!1), A.debug("[VirtualScroll] Hiding scroll buttons");
3017
+ const Q = c - g;
3018
+ if (C.debug("[VirtualScroll] Scroll diff:", Q, "New:", c, "Prev:", g), Math.abs(Q) > 1) {
3019
+ const te = Q > 0 ? "down" : "up";
3020
+ ot(te), Ge(!0), C.debug("[VirtualScroll] Showing scroll buttons. Direction:", te), be.current && clearTimeout(be.current), be.current = setTimeout(() => {
3021
+ Ge(!1), C.debug("[VirtualScroll] Hiding scroll buttons");
3000
3022
  }, 2e3);
3001
3023
  }
3002
3024
  }
3003
3025
  },
3004
- [Re, ie, t]
3005
- ), Ze = we(() => Pt(It, E.top), [E.top, It]), Ft = we(() => {
3006
- const c = C.getTotal(), g = Ln(Ze, ze, s, t, n, C, c);
3007
- return A.debug("[VirtualScroll] Calculated rendering range:", () => ({
3026
+ [Te, ie, t]
3027
+ ), Ke = ve(() => Rt(yt, E.top), [E.top, yt]), Ft = ve(() => {
3028
+ const c = A.getTotal(), g = Dn(Ke, ze, s, t, n, A, c);
3029
+ return C.debug("[VirtualScroll] Calculated rendering range:", () => ({
3008
3030
  ...g,
3009
- scrollPosition: Ze,
3031
+ scrollPosition: Ke,
3010
3032
  renderingContentSize: c,
3011
3033
  overscanCount: s,
3012
3034
  viewportSize: ze
3013
3035
  })), g;
3014
- }, [Ze, ze, s, t, n, C]), { renderingStartIndex: Tt, renderingEndIndex: Lt, visibleStartIndex: kt, visibleEndIndex: Ht } = Ft, Mt = b(
3036
+ }, [Ke, ze, s, t, n, A]), { renderingStartIndex: Tt, renderingEndIndex: Lt, visibleStartIndex: kt, visibleEndIndex: Ht } = Ft, Mt = x(
3015
3037
  (c, g) => {
3016
3038
  if (!le || t === 0)
3017
3039
  return;
3018
- const x = Qe(c, t);
3040
+ const v = Ze(c, t);
3019
3041
  if (!(g?.ensureVisible ?? !0)) {
3020
- const pt = Ge.current.get(x);
3021
- pt && (Se.current = null, Le.current = x, Ve(pt));
3042
+ const pt = Ue.current.get(v);
3043
+ pt && (we.current = null, Le.current = v, Ve(pt));
3022
3044
  return;
3023
3045
  }
3024
- const G = C.prefixSum(x, { materializeOption: { materialize: !1 } }), $ = G.currentValue, Q = Math.max(G.cumulative - $, 0), be = Q + $, Ue = Pt(_.current, E.top), Oe = Ue + ze;
3025
- if (Q < Ue || be > Oe) {
3026
- St(x);
3027
- const pt = Ge.current.get(x);
3028
- pt ? (Se.current = null, Le.current = x, Ve(pt)) : Se.current = x;
3046
+ const G = A.prefixSum(v, { materializeOption: { materialize: !1 } }), Q = G.currentValue, te = Math.max(G.cumulative - Q, 0), Re = te + Q, qe = Rt(_.current, E.top), Oe = qe + ze;
3047
+ if (te < qe || Re > Oe) {
3048
+ St(v);
3049
+ const pt = Ue.current.get(v);
3050
+ pt ? (we.current = null, Le.current = v, Ve(pt)) : we.current = v;
3029
3051
  return;
3030
3052
  }
3031
- const xt = Ge.current.get(x);
3053
+ const xt = Ue.current.get(v);
3032
3054
  if (xt) {
3033
- Se.current = null, Le.current = x, Ve(xt);
3055
+ we.current = null, Le.current = v, Ve(xt);
3034
3056
  return;
3035
3057
  }
3036
- Se.current = x;
3058
+ we.current = v;
3037
3059
  },
3038
- [le, t, C, E.top, St, Ve, ze]
3039
- ), Kt = b(
3060
+ [le, t, A, E.top, St, Ve, ze]
3061
+ ), Gt = x(
3040
3062
  (c, g) => {
3041
3063
  if (!(!le || c.defaultPrevented) && !(c.altKey || c.metaKey || c.ctrlKey) && c.target === c.currentTarget && !c.currentTarget.isContentEditable) {
3042
3064
  if (c.key === "ArrowLeft" || c.key === "ArrowRight") {
3043
- const x = De.current;
3044
- if (!x || c.shiftKey || !L?.includes("arrow") || !(Number.isFinite(N) && N > 0))
3065
+ const v = De.current;
3066
+ if (!v || c.shiftKey || !L?.includes("arrow") || !(Number.isFinite(N) && N > 0))
3045
3067
  return;
3046
- c.preventDefault(), x(c.key === "ArrowLeft" ? -N : N);
3068
+ c.preventDefault(), v(c.key === "ArrowLeft" ? -N : N);
3047
3069
  return;
3048
3070
  }
3049
3071
  if (c.key === "ArrowDown") {
@@ -3057,20 +3079,20 @@ const xi = 1e4, Hi = () => {
3057
3079
  if (c.key === "PageDown") {
3058
3080
  if (g < t - 1) {
3059
3081
  c.preventDefault();
3060
- const { visibleStartIndex: x, visibleEndIndex: k } = qe.current, G = Math.max(k - x + 1, 1), $ = Math.max(G, 1), Q = Qe(Math.min(g + $, t - 1), t);
3061
- Mt(Q);
3082
+ const { visibleStartIndex: v, visibleEndIndex: W } = Ye.current, G = Math.max(W - v + 1, 1), Q = Math.max(G, 1), te = Ze(Math.min(g + Q, t - 1), t);
3083
+ Mt(te);
3062
3084
  }
3063
3085
  return;
3064
3086
  }
3065
3087
  if (c.key === "PageUp" && g > 0) {
3066
3088
  c.preventDefault();
3067
- const { visibleStartIndex: x, visibleEndIndex: k } = qe.current, G = Math.max(k - x + 1, 1), $ = Math.max(G, 1), Q = Qe(g - $, t);
3068
- Mt(Q);
3089
+ const { visibleStartIndex: v, visibleEndIndex: W } = Ye.current, G = Math.max(W - v + 1, 1), Q = Math.max(G, 1), te = Ze(g - Q, t);
3090
+ Mt(te);
3069
3091
  }
3070
3092
  }
3071
3093
  },
3072
3094
  [le, t, Mt, L, N]
3073
- ), gr = b(
3095
+ ), pr = x(
3074
3096
  /**
3075
3097
  * Returns focus from an element inside the row back to the row wrapper on Escape.
3076
3098
  * 行内要素の Escape で行ラッパーへフォーカスを戻す処理。
@@ -3081,162 +3103,149 @@ const xi = 1e4, Hi = () => {
3081
3103
  (c, g) => {
3082
3104
  if (c.key !== "Escape" || c.defaultPrevented || c.nativeEvent.isComposing || c.target === c.currentTarget)
3083
3105
  return;
3084
- const x = c.target;
3085
- x instanceof HTMLInputElement || x instanceof HTMLTextAreaElement || x instanceof HTMLSelectElement || x.isContentEditable || (c.preventDefault(), Mt(g));
3106
+ const v = c.target;
3107
+ v instanceof HTMLInputElement || v instanceof HTMLTextAreaElement || v instanceof HTMLSelectElement || v.isContentEditable || (c.preventDefault(), Mt(g));
3086
3108
  },
3087
3109
  [Mt]
3088
- ), Nt = b(
3110
+ ), zt = x(
3089
3111
  (c) => {
3090
3112
  if (!le)
3091
3113
  return;
3092
- const g = Qe(c, t);
3093
- Se.current = null, Le.current = g, pe?.(g);
3114
+ const g = Ze(c, t);
3115
+ we.current = null, Le.current = g, pe?.(g);
3094
3116
  },
3095
3117
  [le, t, pe]
3096
3118
  );
3097
- q(() => {
3098
- const c = F.current?.getScrollPosition() ?? 0, g = _.current, x = Pt(g, E.top);
3099
- A.debug("[VirtualScroll] Range change effect triggered", () => ({
3119
+ $(() => {
3120
+ const c = F.current?.getScrollPosition() ?? 0, g = _.current, v = Rt(g, E.top);
3121
+ C.debug("[VirtualScroll] Range change effect triggered", () => ({
3100
3122
  renderingStartIndex: Tt,
3101
3123
  renderingEndIndex: Lt,
3102
3124
  visibleStartIndex: kt,
3103
3125
  visibleEndIndex: Ht,
3104
- scrollPositionState: It,
3126
+ scrollPositionState: yt,
3105
3127
  paneScrollPosition: g,
3106
- logicalScrollPosition: x,
3107
- contentSize: ft,
3128
+ logicalScrollPosition: v,
3129
+ contentSize: dt,
3108
3130
  scrollPaneScrollPosition: c
3109
- })), mt({
3131
+ })), ht({
3110
3132
  renderingStartIndex: Tt,
3111
3133
  renderingEndIndex: Lt,
3112
3134
  visibleStartIndex: kt,
3113
3135
  visibleEndIndex: Ht,
3114
- scrollPosition: x,
3115
- totalHeight: ft
3136
+ scrollPosition: v,
3137
+ totalHeight: dt
3116
3138
  });
3117
- }, [ft, Lt, Tt, E.top, mt, It, Ht, kt]);
3118
- const $t = b(() => {
3139
+ }, [dt, Lt, Tt, E.top, ht, yt, Ht, kt]);
3140
+ const $t = x(() => {
3119
3141
  if (!ie)
3120
3142
  return null;
3121
- const c = Fe && ht !== null;
3122
- return /* @__PURE__ */ J("div", { className: "aqvs-scroll-to-edge-overlay", "data-visible": c, inert: !c, children: ht === "up" ? /* @__PURE__ */ J("div", { className: "aqvs-scroll-to-edge-button-container aqvs-scroll-to-edge-button-container-top", children: /* @__PURE__ */ J(
3143
+ const c = Fe && ft !== null;
3144
+ return /* @__PURE__ */ j("div", { className: "aqvs-scroll-to-edge-overlay", "data-visible": c, inert: !c, children: ft === "up" ? /* @__PURE__ */ j("div", { className: "aqvs-scroll-to-edge-button-container aqvs-scroll-to-edge-button-container-top", children: /* @__PURE__ */ j(
3123
3145
  "button",
3124
3146
  {
3125
3147
  type: "button",
3126
3148
  className: "aqvs-scroll-to-edge-button",
3127
3149
  tabIndex: c ? 0 : -1,
3128
- onClick: (x) => {
3129
- x.stopPropagation(), Ie.current = !0, St(0), je(!1);
3150
+ onClick: (v) => {
3151
+ v.stopPropagation(), Me.current = !0, St(0), Ge(!1);
3130
3152
  },
3131
- children: Me.scrollToTop
3153
+ children: Se.scrollToTop
3132
3154
  }
3133
- ) }) : /* @__PURE__ */ J("div", { className: "aqvs-scroll-to-edge-button-container aqvs-scroll-to-edge-button-container-bottom", children: /* @__PURE__ */ J(
3155
+ ) }) : /* @__PURE__ */ j("div", { className: "aqvs-scroll-to-edge-button-container aqvs-scroll-to-edge-button-container-bottom", children: /* @__PURE__ */ j(
3134
3156
  "button",
3135
3157
  {
3136
3158
  type: "button",
3137
3159
  className: "aqvs-scroll-to-edge-button",
3138
3160
  tabIndex: c ? 0 : -1,
3139
- onClick: (x) => {
3140
- x.stopPropagation(), Ie.current = !0, St(t - 1), je(!1);
3161
+ onClick: (v) => {
3162
+ v.stopPropagation(), Me.current = !0, St(t - 1), Ge(!1);
3141
3163
  },
3142
- children: Me.scrollToBottom
3164
+ children: Se.scrollToBottom
3143
3165
  }
3144
3166
  ) }) });
3145
- }, [ie, Fe, ht, St, t, Me]), Xt = f(0), { visibleItems: Ot, renderAnchor: qt } = we(() => {
3167
+ }, [ie, Fe, ft, St, t, Se]), Xt = f(0), { visibleItems: Ot, renderAnchor: qt } = ve(() => {
3146
3168
  if (t === 0)
3147
3169
  return {
3148
- visibleItems: /* @__PURE__ */ J("div", { className: "aqvs-no-items-container", children: /* @__PURE__ */ J("div", { className: "aqvs-no-items-text", children: Me.noItems }) }),
3170
+ visibleItems: /* @__PURE__ */ j("div", { className: "aqvs-no-items-container", children: /* @__PURE__ */ j("div", { className: "aqvs-no-items-text", children: Se.noItems }) }),
3149
3171
  renderAnchor: 0
3150
3172
  };
3151
- const c = Qe(Tt, t), g = Qe(Lt, t), { cumulative: x, currentValue: k } = C.prefixSum(c, { materializeOption: { materialize: !1 } }), G = x - k;
3152
- Number.isFinite(G) && Math.abs(G - Xt.current) > Dn && (Xt.current = G);
3153
- const $ = Xt.current, Q = [], be = [];
3154
- let Ue = 0, Oe = G;
3173
+ const c = Ze(Tt, t), g = Ze(Lt, t), { cumulative: v, currentValue: W } = A.prefixSum(c, { materializeOption: { materialize: !1 } }), G = v - W;
3174
+ Number.isFinite(G) && Math.abs(G - Xt.current) > Cn && (Xt.current = G);
3175
+ const Q = Xt.current, te = [], Re = [];
3176
+ let qe = 0, Oe = G;
3155
3177
  for (let Ne = c; Ne <= g; Ne++) {
3156
- if (be.length >= Zr) {
3157
- A.warn("[VirtualScroll] Rendered item count reached the safety cap; truncating render window.", { cap: Zr, safeRenderingStartIndex: c, safeRenderingEndIndex: g });
3178
+ if (Re.length >= Gr) {
3179
+ C.warn("[VirtualScroll] Rendered item count reached the safety cap; truncating render window.", { cap: Gr, safeRenderingStartIndex: c, safeRenderingEndIndex: g });
3158
3180
  break;
3159
3181
  }
3160
- const xt = n(Ne), pt = C.get(Ne), bt = xt - pt;
3161
- bt !== 0 && Q.push({ index: Ne, value: xt });
3162
- const ir = Oe + Ue, vr = r ? r(Ne) : Ne;
3163
- be.push(
3164
- /* @__PURE__ */ J(
3165
- Ii,
3182
+ const xt = n(Ne), pt = A.get(Ne), gt = xt - pt;
3183
+ gt !== 0 && te.push({ index: Ne, value: xt });
3184
+ const ar = Oe + qe, gr = r ? r(Ne) : Ne;
3185
+ Re.push(
3186
+ /* @__PURE__ */ j(
3187
+ zi,
3166
3188
  {
3167
3189
  index: Ne,
3168
- top: ir - $,
3190
+ top: ar - Q,
3169
3191
  height: xt,
3170
3192
  item: e(Ne),
3171
- clipItemHeight: ot,
3193
+ clipItemHeight: st,
3172
3194
  enableKeyboardNavigation: le,
3173
- onKeyDown: Kt,
3174
- onEscapeKeyDown: vt ? gr : void 0,
3175
- onFocus: Nt,
3176
- registerItemRef: tr,
3177
- children: v
3195
+ onKeyDown: Gt,
3196
+ onEscapeKeyDown: vt ? pr : void 0,
3197
+ onFocus: zt,
3198
+ registerItemRef: Qt,
3199
+ children: b
3178
3200
  },
3179
- vr
3201
+ gr
3180
3202
  )
3181
- ), Ue += bt, Oe += pt;
3203
+ ), qe += gt, Oe += pt;
3182
3204
  }
3183
- return Q.length > 0 && Promise.resolve().then(() => {
3184
- if (gt.current)
3205
+ return te.length > 0 && Promise.resolve().then(() => {
3206
+ if (bt.current)
3185
3207
  return;
3186
3208
  let Ne = 0;
3187
- for (const bt of Q)
3188
- if (bt.index < kt) {
3189
- const ir = C.get(bt.index);
3190
- Ne += bt.value - ir;
3209
+ for (const gt of te)
3210
+ if (gt.index < kt) {
3211
+ const ar = A.get(gt.index);
3212
+ Ne += gt.value - ar;
3191
3213
  }
3192
- const xt = C.updates(Q);
3193
- if (gt.current || typeof xt != "number")
3214
+ const xt = A.updates(te);
3215
+ if (bt.current || typeof xt != "number")
3194
3216
  return;
3195
- p(xt), A.debug("[VirtualScroll] Updated heights for items", Q, "New total height:", xt);
3217
+ p(xt), C.debug("[VirtualScroll] Updated heights for items", te, "New total height:", xt);
3196
3218
  const pt = F.current?.getScrollPosition() ?? _.current;
3197
3219
  if (Ne !== 0) {
3198
- const bt = pt + Ne;
3199
- zt(bt, Ne), Re(bt, { immediate: !0 }), A.debug("[VirtualScroll] Adjusted scroll for layout shift (auto update)", { from: pt, to: bt, shiftAmount: Ne });
3200
- } else pt !== _.current && Re(pt);
3201
- }), { visibleItems: be, renderAnchor: $ };
3220
+ const gt = pt + Ne;
3221
+ Et(gt, Ne), Te(gt, { immediate: !0 }), C.debug("[VirtualScroll] Adjusted scroll for layout shift (auto update)", { from: pt, to: gt, shiftAmount: Ne });
3222
+ } else pt !== _.current && Te(pt);
3223
+ }), { visibleItems: Re, renderAnchor: Q };
3202
3224
  }, [
3203
- v,
3204
- ot,
3205
- ft,
3225
+ b,
3226
+ st,
3227
+ dt,
3206
3228
  le,
3207
3229
  t,
3208
- C,
3230
+ A,
3209
3231
  e,
3210
3232
  r,
3211
3233
  n,
3212
- Nt,
3213
- Kt,
3214
- vt,
3215
- gr,
3216
3234
  zt,
3217
- tr,
3235
+ Gt,
3236
+ vt,
3237
+ pr,
3238
+ Et,
3239
+ Qt,
3218
3240
  Lt,
3219
3241
  Tt,
3220
- Me,
3221
- Re,
3242
+ Se,
3243
+ Te,
3222
3244
  kt
3223
- ]), [Yt, nr] = Ae(null), Rt = b((c) => {
3224
- if (c === null)
3225
- return;
3226
- const g = wi(c);
3227
- let x;
3228
- const k = () => {
3229
- x?.removeEventListener("change", k);
3230
- const $ = g.devicePixelRatio;
3231
- nr($), x = typeof g.matchMedia == "function" ? g.matchMedia(`(resolution: ${$}dppx)`) : void 0, x?.addEventListener("change", k);
3232
- };
3233
- return k(), () => {
3234
- x?.removeEventListener("change", k);
3235
- };
3236
- }, []), lr = b(
3245
+ ]), sr = x(
3237
3246
  (c) => {
3238
- const g = (ne ?? 0) > 0, x = Math.abs(c - It), k = g && x > 0.5 ? It : c, G = Pt(k, E.top);
3239
- if (A.debug("[VirtualScroll] Rendering visible items", () => ({
3247
+ const g = (ne ?? 0) > 0, v = Math.abs(c - yt), W = g && v > 0.5 ? yt : c, G = Rt(W, E.top);
3248
+ if (C.debug("[VirtualScroll] Rendering visible items", () => ({
3240
3249
  currentScrollPosition: c,
3241
3250
  effectiveScrollPosition: G,
3242
3251
  renderingStartIndex: Tt,
@@ -3244,78 +3253,76 @@ const xi = 1e4, Hi = () => {
3244
3253
  itemCount: t,
3245
3254
  viewportSize: ze,
3246
3255
  callbackThrottleMs: ne,
3247
- diff: x,
3248
- rawEffectiveScrollPosition: k
3256
+ diff: v,
3257
+ rawEffectiveScrollPosition: W
3249
3258
  })), t === 0)
3250
3259
  return Ot;
3251
- const $ = E.top + qt - k, Q = Yt === null ? $ : vi($, Yt), be = E.bottom > 0 ? /* @__PURE__ */ J(
3260
+ const Q = E.top + qt - W, te = E.bottom > 0 ? /* @__PURE__ */ j(
3252
3261
  "div",
3253
3262
  {
3254
3263
  className: "aqvs-bottom-inset",
3255
3264
  style: {
3256
3265
  // ラッパー座標での bottom インセット位置 = コンテンツ総高さ (最終行の下端) - アンカー。
3257
- top: C.getTotal() - qt,
3266
+ top: A.getTotal() - qt,
3258
3267
  height: E.bottom
3259
3268
  }
3260
3269
  },
3261
3270
  "virtualscroll-bottom-inset"
3262
3271
  ) : null;
3263
- return A.debug("[VirtualScroll] Rendering items", () => ({
3264
- containerTop: $,
3265
- wrapperDevicePixelRatio: Yt,
3266
- wrapperTranslateY: Q,
3267
- logicalScrollPosition: Ze,
3272
+ return C.debug("[VirtualScroll] Rendering items", () => ({
3273
+ containerTop: Q,
3274
+ logicalScrollPosition: Ke,
3268
3275
  resolvedInsets: E,
3269
3276
  effectiveScrollPosition: G
3270
- })), /* @__PURE__ */ Ut("div", { ref: Rt, className: "aqvs-items-wrapper", style: { top: 0, transform: `translateY(${Q}px)`, willChange: "transform" }, children: [
3277
+ })), /* @__PURE__ */ Bt(Ri, { translateY: Q, children: [
3271
3278
  Ot,
3272
- be
3279
+ te
3273
3280
  ] });
3274
3281
  },
3275
- [ne, t, C, Ze, Rt, qt, Lt, Tt, E, It, ze, Ot, Yt]
3276
- ), Zt = we(
3282
+ [ne, t, A, Ke, qt, Lt, Tt, E, yt, ze, Ot]
3283
+ ), jt = ve(
3277
3284
  () => ({
3278
3285
  renderingStartIndex: Ft.renderingStartIndex,
3279
3286
  renderingEndIndex: Ft.renderingEndIndex,
3280
3287
  visibleStartIndex: Ft.visibleStartIndex,
3281
3288
  visibleEndIndex: Ft.visibleEndIndex,
3282
- scrollPosition: Ze,
3283
- totalHeight: C.getTotal()
3289
+ scrollPosition: Ke,
3290
+ totalHeight: A.getTotal()
3284
3291
  // contentSize (State) ではなく最新値を反映
3285
3292
  }),
3286
3293
  // contentSize を依存に含めることで、updateItemSize/updates 等で木の総高さが変わった際に
3287
3294
  // (fenwickTree は安定参照のため getTotal() の変化だけでは再計算されない) 総高さを再取得する。
3288
- [Ft, Ze, C, ft]
3295
+ [Ft, Ke, A, dt]
3289
3296
  );
3290
- q(() => {
3291
- qe.current = Zt;
3292
- }, [Zt]);
3293
- const [Vt, Pr] = Ae(""), Bt = f(ee);
3294
- Je(() => {
3295
- Bt.current = ee;
3296
- }, [ee]);
3297
- const Qt = ee?.debounceMs ?? 400, Jt = Number.isFinite(Qt) && Qt >= 0, We = ee !== void 0;
3298
- q(() => {
3299
- We && !Jt && A.warn(`[VirtualScroll] liveRegion.debounceMs must be a finite number >= 0, received ${Qt}. Announcements are disabled.`);
3300
- }, [We, Jt, Qt]), q(() => {
3301
- if (!(We && Jt)) {
3302
- Pr("");
3297
+ $(() => {
3298
+ Ye.current = jt;
3299
+ }, [jt]);
3300
+ const [Nt, er] = Ce(""), Kt = f(J);
3301
+ Qe(() => {
3302
+ Kt.current = J;
3303
+ }, [J]);
3304
+ const mt = J?.debounceMs ?? 400, ur = Number.isFinite(mt) && mt >= 0, Vt = J !== void 0;
3305
+ $(() => {
3306
+ Vt && !ur && C.warn(`[VirtualScroll] liveRegion.debounceMs must be a finite number >= 0, received ${mt}. Announcements are disabled.`);
3307
+ }, [Vt, ur, mt]), $(() => {
3308
+ if (!(Vt && ur)) {
3309
+ er("");
3303
3310
  return;
3304
3311
  }
3305
3312
  const c = setTimeout(() => {
3306
- const g = Bt.current?.format;
3313
+ const g = Kt.current?.format;
3307
3314
  if (!g)
3308
3315
  return;
3309
- const x = g({ visibleStartIndex: kt, visibleEndIndex: Ht, itemCount: t });
3310
- Pr(x);
3311
- }, Qt);
3316
+ const v = g({ visibleStartIndex: kt, visibleEndIndex: Ht, itemCount: t });
3317
+ er(v);
3318
+ }, mt);
3312
3319
  return () => clearTimeout(c);
3313
- }, [We, Jt, Qt, kt, Ht, t]), _r(
3320
+ }, [Vt, ur, mt, kt, Ht, t]), Dr(
3314
3321
  oe,
3315
3322
  () => ({
3316
3323
  getScrollPosition: () => {
3317
3324
  const c = F.current?.getScrollPosition();
3318
- return typeof c == "number" ? Pt(c, ye.current) : -1;
3325
+ return typeof c == "number" ? Rt(c, ye.current) : -1;
3319
3326
  },
3320
3327
  getContentSize: () => F.current?.getContentSize() ?? -1,
3321
3328
  getViewportSize: () => F.current?.getViewportSize() ?? -1,
@@ -3323,74 +3330,74 @@ const xi = 1e4, Hi = () => {
3323
3330
  scrollBy: ke,
3324
3331
  applyWheel: He,
3325
3332
  scrollToIndex: St,
3326
- getFenwickTreeTotalHeight: () => C.getTotal(),
3327
- getFenwickSize: () => C.getSize(),
3333
+ getFenwickTreeTotalHeight: () => A.getTotal(),
3334
+ getFenwickSize: () => A.getSize(),
3328
3335
  focusItemAtIndex: Mt,
3329
- getRange: () => qe.current,
3336
+ getRange: () => Ye.current,
3330
3337
  getScrollAnchor: O,
3331
- updateItemSize: cr
3338
+ updateItemSize: ir
3332
3339
  }),
3333
- [me, ke, He, St, C, Mt, O, cr]
3340
+ [me, ke, He, St, A, Mt, O, ir]
3334
3341
  );
3335
- const xr = C.getTotal() + E.top + E.bottom, br = /* @__PURE__ */ J(
3336
- fi,
3342
+ const Ir = A.getTotal() + E.top + E.bottom, or = /* @__PURE__ */ j(
3343
+ mi,
3337
3344
  {
3338
3345
  ref: F,
3339
- contentSize: xr,
3346
+ contentSize: Ir,
3340
3347
  viewportSize: i,
3341
3348
  onViewportSizeChange: $e,
3342
3349
  className: o,
3343
3350
  testId: l,
3344
- onScroll: yt,
3351
+ onScroll: It,
3345
3352
  background: M,
3346
3353
  tapScrollCircleOptions: ce,
3347
- inertiaOptions: lt,
3354
+ inertiaOptions: ct,
3348
3355
  overscrollBehavior: _e,
3349
3356
  itemCount: t,
3350
- scrollBarWidth: te,
3357
+ scrollBarWidth: ee,
3351
3358
  enableThumbDrag: ge,
3352
- enableTrackClick: et,
3359
+ enableTrackClick: Je,
3353
3360
  enableArrowButtons: z,
3354
- enableArrowButtonTabStops: W,
3355
- enablePointerDrag: Ct,
3361
+ enableArrowButtonTabStops: Y,
3362
+ enablePointerDrag: At,
3356
3363
  pointerDragInputs: ue,
3357
- renderThumbOverlay: tt,
3358
- wheelSpeedMultiplier: st,
3359
- onWheelHorizontal: H,
3364
+ renderThumbOverlay: et,
3365
+ wheelSpeedMultiplier: it,
3366
+ onWheelHorizontal: k,
3360
3367
  onPanHorizontal: ae,
3361
3368
  contentInsets: E,
3362
3369
  contentProps: P,
3363
3370
  visibleStartIndex: kt,
3364
3371
  visibleEndIndex: Ht,
3365
3372
  renderOverlay: $t,
3366
- initialScrollPosition: dt.position,
3373
+ initialScrollPosition: ut.position,
3367
3374
  locale: K,
3368
- labels: B,
3369
- children: lr
3375
+ labels: q,
3376
+ children: sr
3370
3377
  }
3371
3378
  );
3372
- return We ? /* @__PURE__ */ Ut(Qr, { children: [
3373
- br,
3374
- /* @__PURE__ */ J("div", { className: "aqvs-live-region", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-aqvs-live-region": "", children: Vt })
3375
- ] }) : br;
3376
- }, Ti = Or(yi), Ir = 262144, vn = 3, Ri = 32768, wn = 128, Sn = 128, Mn = 128, In = 128, Br = 10, Pi = (t, e) => Math.max(1, Math.floor((t ?? Ri) / Math.max(1, e))), Ei = (t, e, r, n, i) => {
3379
+ return Vt ? /* @__PURE__ */ Bt(jr, { children: [
3380
+ or,
3381
+ /* @__PURE__ */ j("div", { className: "aqvs-live-region", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-aqvs-live-region": "", children: Nt })
3382
+ ] }) : or;
3383
+ }, Vi = Ar(Ni), wr = 262144, bn = 3, Ci = 32768, xn = 128, vn = 128, wn = 128, Sn = 128, Xr = 10, Ai = (t, e) => Math.max(1, Math.floor((t ?? Ci) / Math.max(1, e))), Di = (t, e, r, n, i) => {
3377
3384
  let s = 0, o = 0, l = Math.max(0, Math.min(n, r - 1));
3378
- for (; l < r && s < t && o < Zr; )
3385
+ for (; l < r && s < t && o < Gr; )
3379
3386
  s += e(l), o += 1, l += 1;
3380
3387
  return Math.max(1, o + 2 * i + 2);
3381
- }, Dr = (t, e, r) => {
3382
- if (!(Number.isInteger(t) && t >= 0 && t <= Ir)) {
3388
+ }, Vr = (t, e, r) => {
3389
+ if (!(Number.isInteger(t) && t >= 0 && t <= wr)) {
3383
3390
  const n = e === "row" ? "getRowHeight" : "getColWidth", i = e === "row" ? "rows" : "columns";
3384
3391
  throw new RangeError(
3385
- `[VirtualGrid] ${n}(${r}) returned ${t} — must be an integer in [0, ${Ir}] (0 = hidden). Round fractional sizes to whole pixels and split content larger than ${Ir} px across several ${i}: a larger track could push cell positions past the 2^25 px layout-coordinate limit of browsers.`
3392
+ `[VirtualGrid] ${n}(${r}) returned ${t} — must be an integer in [0, ${wr}] (0 = hidden). Round fractional sizes to whole pixels and split content larger than ${wr} px across several ${i}: a larger track could push cell positions past the 2^25 px layout-coordinate limit of browsers.`
3386
3393
  );
3387
3394
  }
3388
3395
  return t;
3389
- }, zi = (t, e, r, n, i, s, o, l) => {
3390
- const d = Ln(t, e, r, n, i, s, o);
3396
+ }, Li = (t, e, r, n, i, s, o, l) => {
3397
+ const d = Dn(t, e, r, n, i, s, o);
3391
3398
  if (n === 0)
3392
3399
  return { renderingColStart: 0, renderingColEnd: 0, visibleColStart: 0, visibleColEnd: 0, colAnchor: 0 };
3393
- const m = se(d.renderingStartIndex, 0, n - 1), { cumulative: v, currentValue: M } = s.prefixSum(m, { materializeOption: { materialize: !1 } }), y = v - M, w = Number.isFinite(y) && Math.abs(y - l) > Dn ? y : l;
3400
+ const h = se(d.renderingStartIndex, 0, n - 1), { cumulative: b, currentValue: M } = s.prefixSum(h, { materializeOption: { materialize: !1 } }), I = b - M, w = Number.isFinite(I) && Math.abs(I - l) > Cn ? I : l;
3394
3401
  return {
3395
3402
  renderingColStart: d.renderingStartIndex,
3396
3403
  renderingColEnd: d.renderingEndIndex,
@@ -3398,30 +3405,30 @@ const xi = 1e4, Hi = () => {
3398
3405
  visibleColEnd: d.visibleEndIndex,
3399
3406
  colAnchor: w
3400
3407
  };
3401
- }, yn = [], Ni = (t, e, r, n, i) => {
3408
+ }, Mn = [], Oi = (t, e, r, n, i) => {
3402
3409
  const s = [], o = [];
3403
3410
  if (e < t)
3404
3411
  return { columns: s, widthUpdates: o, truncated: 0 };
3405
3412
  const l = n.prefixSum(t, { materializeOption: { materialize: !1 } });
3406
- let d = l.cumulative - l.currentValue, m = 0, v = t;
3407
- for (; v <= e; ) {
3413
+ let d = l.cumulative - l.currentValue, h = 0, b = t;
3414
+ for (; b <= e; ) {
3408
3415
  if (s.length >= i)
3409
- return { columns: s, widthUpdates: o, truncated: e - v + 1 };
3410
- const M = r(v), y = n.get(v);
3411
- if (M !== y && o.push({ index: v, value: M }), M > 0) {
3412
- s.push({ col: v, left: d, width: M }), d += y, m = 0, v += 1;
3416
+ return { columns: s, widthUpdates: o, truncated: e - b + 1 };
3417
+ const M = r(b), I = n.get(b);
3418
+ if (M !== I && o.push({ index: b, value: M }), M > 0) {
3419
+ s.push({ col: b, left: d, width: M }), d += I, h = 0, b += 1;
3413
3420
  continue;
3414
3421
  }
3415
- if (d += y, m += 1, v += 1, m > Rr) {
3422
+ if (d += I, h += 1, b += 1, h > yr) {
3416
3423
  const w = n.findIndexAtOrAfter(d + 0.5, { materializeOption: { materialize: !1 } });
3417
- if (w.index === -1 || w.index <= v || !Number.isSafeInteger(w.index))
3424
+ if (w.index === -1 || w.index <= b || !Number.isSafeInteger(w.index))
3418
3425
  break;
3419
3426
  const R = n.prefixSum(w.index, { materializeOption: { materialize: !1 } });
3420
- d = R.cumulative - R.currentValue, v = w.index, m = 0;
3427
+ d = R.cumulative - R.currentValue, b = w.index, h = 0;
3421
3428
  }
3422
3429
  }
3423
3430
  return { columns: s, widthUpdates: o, truncated: 0 };
3424
- }, Vi = (t, e, r) => {
3431
+ }, _i = (t, e, r) => {
3425
3432
  const n = [], i = [];
3426
3433
  let s = 0;
3427
3434
  for (let o = 0; o < t; o += 1) {
@@ -3429,15 +3436,15 @@ const xi = 1e4, Hi = () => {
3429
3436
  l !== d && i.push({ index: o, value: l }), l > 0 && n.push({ col: o, left: s, width: l }), s += d;
3430
3437
  }
3431
3438
  return { columns: n, widthUpdates: i, width: s };
3432
- }, Ai = (t, e, r, n) => {
3439
+ }, Fi = (t, e, r, n) => {
3433
3440
  const i = [], s = [];
3434
3441
  let o = 0;
3435
3442
  for (let l = t - e; l < t; l += 1) {
3436
- const d = r(l), m = n.get(l);
3437
- d !== m && s.push({ index: l, value: d }), d > 0 && i.push({ col: l, left: o, width: d }), o += m;
3443
+ const d = r(l), h = n.get(l);
3444
+ d !== h && s.push({ index: l, value: d }), d > 0 && i.push({ col: l, left: o, width: d }), o += h;
3438
3445
  }
3439
3446
  return { columns: i, widthUpdates: s, width: o };
3440
- }, Lr = (t, e, r) => Math.min(t, Math.max(0, r - e)), Ci = { renderingColStart: 0, renderingColEnd: 0, visibleColStart: 0, visibleColEnd: 0, colAnchor: 0, key: "0:0:0" }, Di = ({
3447
+ }, Cr = (t, e, r) => Math.min(t, Math.max(0, r - e)), ki = { renderingColStart: 0, renderingColEnd: 0, visibleColStart: 0, visibleColEnd: 0, colAnchor: 0, key: "0:0:0" }, Hi = ({
3441
3448
  rowCount: t,
3442
3449
  colCount: e,
3443
3450
  getRowHeight: r,
@@ -3447,139 +3454,139 @@ const xi = 1e4, Hi = () => {
3447
3454
  children: o,
3448
3455
  getCellProps: l,
3449
3456
  getRowProps: d,
3450
- contentProps: m,
3451
- background: v,
3457
+ contentProps: h,
3458
+ background: b,
3452
3459
  contentInsets: M,
3453
- onRowFocus: y,
3460
+ onRowFocus: I,
3454
3461
  frozenLeadingCols: w = 0,
3455
3462
  frozenLeadingRows: R = 0,
3456
3463
  frozenTrailingCols: ne = 0,
3457
- frozenTrailingRows: Y = 0,
3464
+ frozenTrailingRows: X = 0,
3458
3465
  horizontalKeyInputs: pe,
3459
- horizontalKeyStep: Ce,
3466
+ horizontalKeyStep: Ae,
3460
3467
  onScroll: D,
3461
- onRangeChange: H,
3468
+ onRangeChange: k,
3462
3469
  onRenderTruncated: ae,
3463
3470
  callbackThrottleMs: L,
3464
3471
  initialScrollAnchor: N,
3465
- overscanRows: P = vn,
3466
- overscanCols: ee = vn,
3472
+ overscanRows: P = bn,
3473
+ overscanCols: J = bn,
3467
3474
  viewportSize: K,
3468
- __maxRenderedCells: B,
3475
+ __maxRenderedCells: q,
3469
3476
  behaviorOptions: oe,
3470
- scrollBarOptions: te,
3477
+ scrollBarOptions: ee,
3471
3478
  liveRegion: ge,
3472
- locale: et,
3479
+ locale: Je,
3473
3480
  labels: z,
3474
- className: W,
3481
+ className: Y,
3475
3482
  testId: ie
3476
- }, tt) => {
3477
- const ce = f(null), Me = f(null), Ct = f(r);
3478
- Ct.current = r;
3483
+ }, et) => {
3484
+ const ce = f(null), Se = f(null), At = f(r);
3485
+ At.current = r;
3479
3486
  const ue = f(n);
3480
3487
  ue.current = n;
3481
- const le = oe?.resetOnGetColWidthChange === !0, st = oe?.resetOnGetItemHeightChange === !0 ? r : null, lt = le ? n : null, _e = b(
3482
- (a) => Dr(Ct.current(a), "row", a),
3483
- [st]
3484
- ), ot = b(
3485
- (a) => Dr(ue.current(a), "col", a),
3486
- [lt]
3487
- ), rt = oe?.defaultColWidth, nt = we(() => {
3488
- if (rt !== void 0 && !(Number.isInteger(rt) && rt >= 0 && rt <= Ir))
3489
- throw new RangeError(`[VirtualGrid] behaviorOptions.defaultColWidth must be an integer in [0, ${Ir}], received ${rt}.`);
3490
- return { resetOnValueFnChange: le, baseValue: rt };
3491
- }, [le, rt]), fe = Cn(e, ot, nt), [ze, $e] = Ae(0);
3492
- if (!(Number.isInteger(w) && w >= 0 && w <= wn))
3493
- throw new RangeError(`[VirtualGrid] frozenLeadingCols must be an integer in [0, ${wn}], received ${w}.`);
3494
- const F = Math.min(w, e), qe = f(0);
3495
- if (!(Number.isInteger(ne) && ne >= 0 && ne <= Mn))
3496
- throw new RangeError(`[VirtualGrid] frozenTrailingCols must be an integer in [0, ${Mn}], received ${ne}.`);
3497
- const Z = Math.min(ne, e - F), gt = f(0);
3498
- if (!(Number.isInteger(R) && R >= 0 && R <= Sn))
3499
- throw new RangeError(`[VirtualGrid] frozenLeadingRows must be an integer in [0, ${Sn}], received ${R}.`);
3500
- const U = Math.min(R, t);
3501
- if (!(Number.isInteger(Y) && Y >= 0 && Y <= In))
3502
- throw new RangeError(`[VirtualGrid] frozenTrailingRows must be an integer in [0, ${In}], received ${Y}.`);
3503
- const E = Math.min(Y, t - U), ut = Math.max(0, t - U - E), Pe = f(!1), C = f(0), dt = f(0), [It, Dt] = Ae(0), { frozenRows: ft, frozenHeight: p } = we(() => {
3504
- if (U === 0)
3488
+ const le = oe?.resetOnGetColWidthChange === !0, it = oe?.resetOnGetItemHeightChange === !0 ? r : null, ct = le ? n : null, _e = x(
3489
+ (a) => Vr(At.current(a), "row", a),
3490
+ [it]
3491
+ ), st = x(
3492
+ (a) => Vr(ue.current(a), "col", a),
3493
+ [ct]
3494
+ ), tt = oe?.defaultColWidth, rt = ve(() => {
3495
+ if (tt !== void 0 && !(Number.isInteger(tt) && tt >= 0 && tt <= wr))
3496
+ throw new RangeError(`[VirtualGrid] behaviorOptions.defaultColWidth must be an integer in [0, ${wr}], received ${tt}.`);
3497
+ return { resetOnValueFnChange: le, baseValue: tt };
3498
+ }, [le, tt]), fe = Vn(e, st, rt), [ze, $e] = Ce(0);
3499
+ if (!(Number.isInteger(w) && w >= 0 && w <= xn))
3500
+ throw new RangeError(`[VirtualGrid] frozenLeadingCols must be an integer in [0, ${xn}], received ${w}.`);
3501
+ const F = Math.min(w, e), Ye = f(0);
3502
+ if (!(Number.isInteger(ne) && ne >= 0 && ne <= wn))
3503
+ throw new RangeError(`[VirtualGrid] frozenTrailingCols must be an integer in [0, ${wn}], received ${ne}.`);
3504
+ const Z = Math.min(ne, e - F), bt = f(0);
3505
+ if (!(Number.isInteger(R) && R >= 0 && R <= vn))
3506
+ throw new RangeError(`[VirtualGrid] frozenLeadingRows must be an integer in [0, ${vn}], received ${R}.`);
3507
+ const B = Math.min(R, t);
3508
+ if (!(Number.isInteger(X) && X >= 0 && X <= Sn))
3509
+ throw new RangeError(`[VirtualGrid] frozenTrailingRows must be an integer in [0, ${Sn}], received ${X}.`);
3510
+ const E = Math.min(X, t - B), lt = Math.max(0, t - B - E), Pe = f(!1), A = f(0), ut = f(0), [yt, Dt] = Ce(0), { frozenRows: dt, frozenHeight: p } = ve(() => {
3511
+ if (B === 0)
3505
3512
  return { frozenRows: [], frozenHeight: 0 };
3506
3513
  const a = [];
3507
- let h = 0;
3508
- for (let I = 0; I < U; I += 1) {
3509
- const X = _e(I);
3510
- X > 0 && a.push({ row: I, top: h, height: X }), h += X;
3514
+ let m = 0;
3515
+ for (let y = 0; y < B; y += 1) {
3516
+ const H = _e(y);
3517
+ H > 0 && a.push({ row: y, top: m, height: H }), m += H;
3511
3518
  }
3512
- return { frozenRows: a, frozenHeight: h };
3513
- }, [U, It, _e]);
3514
- C.current = p;
3515
- const [_, he] = Ae(0), { trailingRows: j, trailingHeight: re } = we(() => {
3519
+ return { frozenRows: a, frozenHeight: m };
3520
+ }, [B, yt, _e]);
3521
+ A.current = p;
3522
+ const [_, he] = Ce(0), { trailingRows: U, trailingHeight: re } = ve(() => {
3516
3523
  if (E === 0)
3517
3524
  return { trailingRows: [], trailingHeight: 0 };
3518
3525
  const a = [];
3519
- let h = 0;
3520
- for (let I = t - E; I < t; I += 1) {
3521
- const X = _e(I);
3522
- X > 0 && a.push({ row: I, top: h, height: X }), h += X;
3526
+ let m = 0;
3527
+ for (let y = t - E; y < t; y += 1) {
3528
+ const H = _e(y);
3529
+ H > 0 && a.push({ row: y, top: m, height: H }), m += H;
3523
3530
  }
3524
- return { trailingRows: a, trailingHeight: h };
3531
+ return { trailingRows: a, trailingHeight: m };
3525
3532
  }, [E, t, _, _e]);
3526
- dt.current = re;
3527
- const De = b((a) => _e(a + U), [_e, U]), Ye = f(y);
3528
- Ye.current = y;
3529
- const ve = y !== void 0, Ge = we(() => ve ? (a) => Ye.current?.(a + U) : void 0, [U, ve]), Se = p, Le = re, [ht, at] = Ae(U), Fe = f(null), je = f(!1);
3530
- if (ht !== U) {
3531
- at(U), je.current = !0;
3533
+ ut.current = re;
3534
+ const De = x((a) => _e(a + B), [_e, B]), Be = f(I);
3535
+ Be.current = I;
3536
+ const xe = I !== void 0, Ue = ve(() => xe ? (a) => Be.current?.(a + B) : void 0, [B, xe]), we = p, Le = re, [ft, ot] = Ce(B), Fe = f(null), Ge = f(!1);
3537
+ if (ft !== B) {
3538
+ ot(B), Ge.current = !0;
3532
3539
  const a = ce.current?.getScrollAnchor() ?? null;
3533
- Fe.current = a === null ? null : { row: a.index + ht, offsetPx: a.offsetPx };
3540
+ Fe.current = a === null ? null : { row: a.index + ft, offsetPx: a.offsetPx };
3534
3541
  }
3535
- const xe = f(0), Ie = f(0), Ke = f(!1), [Ee, S] = Ae(Ci), T = f(Ee);
3542
+ const be = f(0), Me = f(0), je = f(!1), [Ee, S] = Ce(ki), T = f(Ee);
3536
3543
  T.current = Ee;
3537
- const Ve = f(0), [Xe, Be] = Ae(() => fe.getTotal() ?? 0), ct = f(Xe);
3538
- ct.current = Xe;
3539
- const mt = b((a) => {
3540
- typeof a == "number" && Number.isFinite(a) && (ct.current = a, Be(a));
3544
+ const Ve = f(0), [Xe, We] = Ce(() => fe.getTotal() ?? 0), at = f(Xe);
3545
+ at.current = Xe;
3546
+ const ht = x((a) => {
3547
+ typeof a == "number" && Number.isFinite(a) && (at.current = a, We(a));
3541
3548
  }, []);
3542
- Je(() => {
3549
+ Qe(() => {
3543
3550
  const a = fe.getTotal();
3544
- typeof a == "number" && Number.isFinite(a) && a !== ct.current && mt(a);
3551
+ typeof a == "number" && Number.isFinite(a) && a !== at.current && ht(a);
3545
3552
  });
3546
- const ye = te?.width ?? 12, Et = K === void 0 ? null : { width: Math.max(0, Math.round(K.width) - ye), height: Math.max(0, Math.round(K.height) - ye) }, [tr, dr] = Ae({ width: 0, height: 0 }), Te = Et ?? tr, wt = f(Te);
3547
- wt.current = Te;
3548
- const ar = Te.height > 0 && Te.height - p - re <= 0;
3549
- Pe.current = ar;
3550
- const rr = Et !== null;
3551
- Je(() => {
3552
- if (rr)
3553
+ const ye = ee?.width ?? 12, Pt = K === void 0 ? null : { width: Math.max(0, Math.round(K.width) - ye), height: Math.max(0, Math.round(K.height) - ye) }, [Qt, lr] = Ce({ width: 0, height: 0 }), Ie = Pt ?? Qt, wt = f(Ie);
3554
+ wt.current = Ie;
3555
+ const nr = Ie.height > 0 && Ie.height - p - re <= 0;
3556
+ Pe.current = nr;
3557
+ const Jt = Pt !== null;
3558
+ Qe(() => {
3559
+ if (Jt)
3553
3560
  return;
3554
- const a = Me.current;
3561
+ const a = Se.current;
3555
3562
  if (a === null)
3556
3563
  return;
3557
- const h = () => {
3558
- const X = Math.max(0, Math.round(a.clientWidth) - ye), de = Math.max(0, Math.round(a.clientHeight) - ye);
3559
- dr((it) => it.width === X && it.height === de ? it : { width: X, height: de });
3564
+ const m = () => {
3565
+ const H = Math.max(0, Math.round(a.clientWidth) - ye), de = Math.max(0, Math.round(a.clientHeight) - ye);
3566
+ lr((nt) => nt.width === H && nt.height === de ? nt : { width: H, height: de });
3560
3567
  };
3561
- h();
3562
- const I = new ResizeObserver(h);
3563
- return I.observe(a), () => I.disconnect();
3564
- }, [ye, rr]);
3565
- const Gt = b(() => {
3566
- const a = Me.current;
3567
- a !== null && a.style.setProperty("--aqvs-grid-hx-residual", `${Ve.current - xe.current}px`);
3568
- }, []), Re = b(() => Math.max(0, wt.current.width - qe.current - gt.current), []), zt = b(() => Math.max(0, ct.current - qe.current - gt.current - Re()), [Re]), jt = b(() => {
3569
- const a = Re(), h = zi(qe.current + xe.current, a, ee, e, ot, fe, ct.current, T.current.colAnchor);
3570
- if (F > 0 && (h.renderingColStart = Math.max(h.renderingColStart, F), h.visibleColStart = Math.max(h.visibleColStart, F)), Z > 0) {
3571
- const X = e - Z - 1;
3572
- h.renderingColEnd = Math.min(h.renderingColEnd, X), h.visibleColEnd = Math.min(h.visibleColEnd, X);
3568
+ m();
3569
+ const y = new ResizeObserver(m);
3570
+ return y.observe(a), () => y.disconnect();
3571
+ }, [ye, Jt]);
3572
+ const Wt = x(() => {
3573
+ const a = Se.current;
3574
+ a !== null && a.style.setProperty("--aqvs-grid-hx-residual", `${Ve.current - be.current}px`);
3575
+ }, []), Te = x(() => Math.max(0, wt.current.width - Ye.current - bt.current), []), Et = x(() => Math.max(0, at.current - Ye.current - bt.current - Te()), [Te]), Ut = x(() => {
3576
+ const a = Te(), m = Li(Ye.current + be.current, a, J, e, st, fe, at.current, T.current.colAnchor);
3577
+ if (F > 0 && (m.renderingColStart = Math.max(m.renderingColStart, F), m.visibleColStart = Math.max(m.visibleColStart, F)), Z > 0) {
3578
+ const H = e - Z - 1;
3579
+ m.renderingColEnd = Math.min(m.renderingColEnd, H), m.visibleColEnd = Math.min(m.visibleColEnd, H);
3573
3580
  }
3574
- (F > 0 || Z > 0) && (a <= 0 || h.renderingColStart > h.renderingColEnd) && (h.renderingColStart = e, h.renderingColEnd = e - 1, h.visibleColStart = e, h.visibleColEnd = e - 1);
3575
- const I = `${h.renderingColStart}:${h.renderingColEnd}:${h.colAnchor}`;
3576
- I !== T.current.key && S({ ...h, key: I });
3577
- }, [ee, e, ot, fe, F, Z, Re]), [cr, St] = Ae(0), u = f(null), V = b(() => {
3581
+ (F > 0 || Z > 0) && (a <= 0 || m.renderingColStart > m.renderingColEnd) && (m.renderingColStart = e, m.renderingColEnd = e - 1, m.visibleColStart = e, m.visibleColEnd = e - 1);
3582
+ const y = `${m.renderingColStart}:${m.renderingColEnd}:${m.colAnchor}`;
3583
+ y !== T.current.key && S({ ...m, key: y });
3584
+ }, [J, e, st, fe, F, Z, Te]), [ir, St] = Ce(0), u = f(null), V = x(() => {
3578
3585
  u.current === null && (u.current = requestAnimationFrame(() => {
3579
- u.current = null, St(xe.current);
3586
+ u.current = null, St(be.current);
3580
3587
  }));
3581
3588
  }, []);
3582
- q(
3589
+ $(
3583
3590
  () => () => {
3584
3591
  u.current !== null && cancelAnimationFrame(u.current);
3585
3592
  },
@@ -3587,384 +3594,384 @@ const xi = 1e4, Hi = () => {
3587
3594
  );
3588
3595
  const O = f(D);
3589
3596
  O.current = D;
3590
- const me = f(H);
3591
- me.current = H;
3597
+ const me = f(k);
3598
+ me.current = k;
3592
3599
  const ke = f(ae);
3593
3600
  ke.current = ae;
3594
- const He = f(null), [yt, Ze] = Ae(null), [Ft, Tt] = Ae(Te.height);
3595
- Ft !== Te.height && (Tt(Te.height), Ze(null));
3596
- const Lt = N === void 0 || t === 0 ? 0 : se(Math.trunc(N.row), 0, t - 1), kt = we(() => {
3601
+ const He = f(null), [It, Ke] = Ce(null), [Ft, Tt] = Ce(Ie.height);
3602
+ Ft !== Ie.height && (Tt(Ie.height), Ke(null));
3603
+ const Lt = N === void 0 || t === 0 ? 0 : se(Math.trunc(N.row), 0, t - 1), kt = ve(() => {
3597
3604
  const a = He.current?.renderingStartIndex ?? Lt;
3598
- return Ei(Math.max(0, Te.height - C.current - dt.current), _e, t, a, P);
3599
- }, [Te.height, _e, t, Lt, P, Se, Le]), Ht = yt ?? kt, Mt = b(() => {
3605
+ return Di(Math.max(0, Ie.height - A.current - ut.current), _e, t, a, P);
3606
+ }, [Ie.height, _e, t, Lt, P, we, Le]), Ht = It ?? kt, Mt = x(() => {
3600
3607
  const a = He.current;
3601
3608
  if (a === null)
3602
3609
  return null;
3603
- const h = T.current;
3610
+ const m = T.current;
3604
3611
  return {
3605
3612
  renderingRowStart: a.renderingStartIndex,
3606
3613
  renderingRowEnd: a.renderingEndIndex,
3607
3614
  visibleRowStart: a.visibleStartIndex,
3608
3615
  visibleRowEnd: a.visibleEndIndex,
3609
- renderingColStart: h.renderingColStart,
3610
- renderingColEnd: h.renderingColEnd,
3611
- visibleColStart: h.visibleColStart,
3612
- visibleColEnd: h.visibleColEnd,
3613
- scrollX: xe.current,
3614
- scrollY: Ie.current,
3615
- totalWidth: ct.current,
3616
+ renderingColStart: m.renderingColStart,
3617
+ renderingColEnd: m.renderingColEnd,
3618
+ visibleColStart: m.visibleColStart,
3619
+ visibleColEnd: m.visibleColEnd,
3620
+ scrollX: be.current,
3621
+ scrollY: Me.current,
3622
+ totalWidth: at.current,
3616
3623
  // 帯高は鮮度加算 (格納はスクロール木のみ — 帯行リサイズ後も総高が正しい。R1 是正。
3617
3624
  // 3.5.0: 末尾帯高 H_T も同じ鮮度規律で加算)
3618
- totalHeight: a.totalHeight + C.current + dt.current
3625
+ totalHeight: a.totalHeight + A.current + ut.current
3619
3626
  };
3620
- }, []), Kt = b(() => {
3627
+ }, []), Gt = x(() => {
3621
3628
  const a = Mt();
3622
3629
  a !== null && me.current?.(a);
3623
- }, [Mt]), gr = b(
3630
+ }, [Mt]), pr = x(
3624
3631
  (a) => {
3625
- const h = zt(), I = se(a, 0, h);
3626
- return I !== xe.current && (xe.current = I, Gt(), jt(), V(), O.current?.({ x: I, y: Ie.current })), I;
3632
+ const m = Et(), y = se(a, 0, m);
3633
+ return y !== be.current && (be.current = y, Wt(), Ut(), V(), O.current?.({ x: y, y: Me.current })), y;
3627
3634
  },
3628
- [Gt, jt, V, zt]
3629
- ), Nt = f(gr);
3630
- Nt.current = gr, Je(() => {
3631
- Ve.current = Ee.colAnchor, Gt(), Kt();
3632
- }, [Ee, Gt, Kt]), Je(() => {
3633
- He.current !== null && Kt();
3634
- }, [p, re, Kt]);
3635
- const $t = f(null), Xt = b(
3635
+ [Wt, Ut, V, Et]
3636
+ ), zt = f(pr);
3637
+ zt.current = pr, Qe(() => {
3638
+ Ve.current = Ee.colAnchor, Wt(), Gt();
3639
+ }, [Ee, Wt, Gt]), Qe(() => {
3640
+ He.current !== null && Gt();
3641
+ }, [p, re, Gt]);
3642
+ const $t = f(null), Xt = x(
3636
3643
  (a) => {
3637
- const h = se(a.col, 0, Math.max(0, e - 1)), I = fe.prefixSum(h, { materializeOption: { materialize: !1 } }), X = I.cumulative - I.currentValue, de = I.currentValue, it = Re();
3638
- return (a.alignX === "end" ? X + de - qe.current - it : a.alignX === "center" ? X + de / 2 - qe.current - it / 2 : X - qe.current) + a.offsetX;
3644
+ const m = se(a.col, 0, Math.max(0, e - 1)), y = fe.prefixSum(m, { materializeOption: { materialize: !1 } }), H = y.cumulative - y.currentValue, de = y.currentValue, nt = Te();
3645
+ return (a.alignX === "end" ? H + de - Ye.current - nt : a.alignX === "center" ? H + de / 2 - Ye.current - nt / 2 : H - Ye.current) + a.offsetX;
3639
3646
  },
3640
- [fe, e, Re]
3641
- ), Ot = f(null), qt = b(() => {
3647
+ [fe, e, Te]
3648
+ ), Ot = f(null), qt = x(() => {
3642
3649
  const a = Ot.current;
3643
- Ot.current = null, !(a === null || a.length === 0) && (mt(fe.updates(a)), $e((h) => h + 1));
3644
- }, [fe, mt]), Yt = f({ count: 0, warned: !1 }), { frozenColumns: nr, frozenWidth: Rt } = we(() => {
3650
+ Ot.current = null, !(a === null || a.length === 0) && (ht(fe.updates(a)), $e((m) => m + 1));
3651
+ }, [fe, ht]), sr = f({ count: 0, warned: !1 }), { frozenColumns: jt, frozenWidth: Nt } = ve(() => {
3645
3652
  if (F === 0)
3646
- return Yt.current.count = 0, Yt.current.warned = !1, { frozenColumns: yn, frozenWidth: 0 };
3647
- const { columns: a, widthUpdates: h, width: I } = Vi(F, ot, fe);
3648
- if (h.length > 0) {
3649
- const X = Yt.current;
3650
- X.count >= Br ? X.warned || (X.warned = !0, A.warn("[VirtualGrid] getColWidth keeps disagreeing with its own previous values inside the frozen band; width self-heal is suspended until a converged pass re-arms it (unstable accessor).", {
3653
+ return sr.current.count = 0, sr.current.warned = !1, { frozenColumns: Mn, frozenWidth: 0 };
3654
+ const { columns: a, widthUpdates: m, width: y } = _i(F, st, fe);
3655
+ if (m.length > 0) {
3656
+ const H = sr.current;
3657
+ H.count >= Xr ? H.warned || (H.warned = !0, C.warn("[VirtualGrid] getColWidth keeps disagreeing with its own previous values inside the frozen band; width self-heal is suspended until a converged pass re-arms it (unstable accessor).", {
3651
3658
  frozenCols: F,
3652
- pendingUpdates: h.length
3653
- })) : (X.count += 1, Ot.current = [...Ot.current ?? [], ...h], Promise.resolve().then(qt));
3659
+ pendingUpdates: m.length
3660
+ })) : (H.count += 1, Ot.current = [...Ot.current ?? [], ...m], Promise.resolve().then(qt));
3654
3661
  } else
3655
- Yt.current.count = 0, Yt.current.warned = !1;
3656
- return { frozenColumns: a, frozenWidth: I };
3657
- }, [F, ze, ot, fe, qt]);
3658
- qe.current = Rt, Je(() => {
3659
- F > 0 ? Me.current?.style.setProperty("--aqvs-grid-frozen-width", `${Rt}px`) : Me.current?.style.removeProperty("--aqvs-grid-frozen-width");
3660
- }, [Rt, F]);
3661
- const lr = f({ count: 0, warned: !1 }), { trailingColumns: Zt, trailingWidth: Vt } = we(() => {
3662
+ sr.current.count = 0, sr.current.warned = !1;
3663
+ return { frozenColumns: a, frozenWidth: y };
3664
+ }, [F, ze, st, fe, qt]);
3665
+ Ye.current = Nt, Qe(() => {
3666
+ F > 0 ? Se.current?.style.setProperty("--aqvs-grid-frozen-width", `${Nt}px`) : Se.current?.style.removeProperty("--aqvs-grid-frozen-width");
3667
+ }, [Nt, F]);
3668
+ const er = f({ count: 0, warned: !1 }), { trailingColumns: Kt, trailingWidth: mt } = ve(() => {
3662
3669
  if (Z === 0)
3663
- return lr.current.count = 0, lr.current.warned = !1, { trailingColumns: yn, trailingWidth: 0 };
3664
- const { columns: a, widthUpdates: h, width: I } = Ai(e, Z, ot, fe);
3665
- if (h.length > 0) {
3666
- const X = lr.current;
3667
- X.count >= Br ? X.warned || (X.warned = !0, A.warn("[VirtualGrid] getColWidth keeps disagreeing with its own previous values inside the trailing band; width self-heal is suspended until a converged pass re-arms it (unstable accessor).", {
3670
+ return er.current.count = 0, er.current.warned = !1, { trailingColumns: Mn, trailingWidth: 0 };
3671
+ const { columns: a, widthUpdates: m, width: y } = Fi(e, Z, st, fe);
3672
+ if (m.length > 0) {
3673
+ const H = er.current;
3674
+ H.count >= Xr ? H.warned || (H.warned = !0, C.warn("[VirtualGrid] getColWidth keeps disagreeing with its own previous values inside the trailing band; width self-heal is suspended until a converged pass re-arms it (unstable accessor).", {
3668
3675
  trailingCols: Z,
3669
- pendingUpdates: h.length
3670
- })) : (X.count += 1, Ot.current = [...Ot.current ?? [], ...h], Promise.resolve().then(qt));
3676
+ pendingUpdates: m.length
3677
+ })) : (H.count += 1, Ot.current = [...Ot.current ?? [], ...m], Promise.resolve().then(qt));
3671
3678
  } else
3672
- lr.current.count = 0, lr.current.warned = !1;
3673
- return { trailingColumns: a, trailingWidth: I };
3674
- }, [Z, e, ze, ot, fe, qt]);
3675
- gt.current = Vt, Je(() => {
3676
- Z > 0 ? Me.current?.style.setProperty("--aqvs-grid-trailing-width", `${Vt}px`) : Me.current?.style.removeProperty("--aqvs-grid-trailing-width");
3677
- }, [Vt, Z]);
3678
- const Pr = we(() => ({ ...te, tapScrollCircleOptions: { ...te?.tapScrollCircleOptions, enabled: !1 } }), [te]), Bt = te?.tapScrollCircleOptions, Qt = typeof Bt?.maxSpeedMultiplier == "number", Jt = we(
3679
+ er.current.count = 0, er.current.warned = !1;
3680
+ return { trailingColumns: a, trailingWidth: y };
3681
+ }, [Z, e, ze, st, fe, qt]);
3682
+ bt.current = mt, Qe(() => {
3683
+ Z > 0 ? Se.current?.style.setProperty("--aqvs-grid-trailing-width", `${mt}px`) : Se.current?.style.removeProperty("--aqvs-grid-trailing-width");
3684
+ }, [mt, Z]);
3685
+ const ur = ve(() => ({ ...ee, tapScrollCircleOptions: { ...ee?.tapScrollCircleOptions, enabled: !1 } }), [ee]), Vt = ee?.tapScrollCircleOptions, Ir = typeof Vt?.maxSpeedMultiplier == "number", or = ve(
3679
3686
  () => ({
3680
- ...Bt,
3681
- offsetX: Bt?.offsetX === void 0 ? pn : Bt.offsetX,
3682
- offsetY: Bt?.offsetY === void 0 ? pn : Bt.offsetY
3687
+ ...Vt,
3688
+ offsetX: Vt?.offsetX === void 0 ? hn : Vt.offsetX,
3689
+ offsetY: Vt?.offsetY === void 0 ? hn : Vt.offsetY
3683
3690
  }),
3684
- [Bt]
3685
- ), We = we(() => jr(Jt, Math.max(0, e - F - Z)), [Jt, e, F, Z]), xr = we(() => jr(Jt, ut), [Jt, ut]), br = We.enabled, c = Math.max(We.maxVisualDistance, 1), g = {
3686
- viewportSize: Math.max(0, Te.width - Rt - Vt),
3687
- minSpeedMultiplier: We.minSpeedMultiplier,
3688
- maxSpeedMultiplier: We.maxSpeedMultiplier,
3689
- hasCustomMaxSpeedMultiplier: Qt,
3690
- curve: We.maxSpeedCurve
3691
- }, x = {
3692
- viewportSize: Math.max(0, Te.height - p - re),
3693
- minSpeedMultiplier: xr.minSpeedMultiplier,
3694
- maxSpeedMultiplier: xr.maxSpeedMultiplier,
3695
- hasCustomMaxSpeedMultiplier: Qt,
3696
- curve: xr.maxSpeedCurve
3697
- }, k = b(() => xe.current, []), G = b(() => {
3691
+ [Vt]
3692
+ ), c = ve(() => Wr(or, Math.max(0, e - F - Z)), [or, e, F, Z]), g = ve(() => Wr(or, lt), [or, lt]), v = c.enabled, W = Math.max(c.maxVisualDistance, 1), G = {
3693
+ viewportSize: Math.max(0, Ie.width - Nt - mt),
3694
+ minSpeedMultiplier: c.minSpeedMultiplier,
3695
+ maxSpeedMultiplier: c.maxSpeedMultiplier,
3696
+ hasCustomMaxSpeedMultiplier: Ir,
3697
+ curve: c.maxSpeedCurve
3698
+ }, Q = {
3699
+ viewportSize: Math.max(0, Ie.height - p - re),
3700
+ minSpeedMultiplier: g.minSpeedMultiplier,
3701
+ maxSpeedMultiplier: g.maxSpeedMultiplier,
3702
+ hasCustomMaxSpeedMultiplier: Ir,
3703
+ curve: g.maxSpeedCurve
3704
+ }, te = x(() => be.current, []), Re = x(() => {
3698
3705
  const a = ce.current;
3699
3706
  if (a === null)
3700
- return Ie.current;
3701
- const h = a.getScrollPosition();
3702
- return h < 0 ? Ie.current : h;
3703
- }, []), $ = b(() => {
3707
+ return Me.current;
3708
+ const m = a.getScrollPosition();
3709
+ return m < 0 ? Me.current : m;
3710
+ }, []), qe = x(() => {
3704
3711
  const a = ce.current;
3705
3712
  return a === null ? 0 : Math.max(0, Math.max(0, a.getContentSize()) - Math.max(0, a.getViewportSize()));
3706
- }, []), Q = b((a) => {
3707
- const h = ce.current;
3708
- if (h === null)
3709
- return Ie.current;
3710
- const I = h.scrollBy(a);
3711
- return Ie.current = I, I;
3712
- }, []), be = zt() > 0 || $() > 0, Ue = `${Xe}:${Rt}:${Vt}:${Te.width}:${Ee.key}`, Oe = `${t}:${yt ?? -1}:${p}:${re}:${Te.height}`, { isTapActive: Ne, handleTapCircleDragChange: xt, tapCircleHandleRef: pt } = bi({
3713
- enabled: br && be,
3714
- maxDistance: c,
3715
- xSpeedParams: g,
3716
- ySpeedParams: x,
3717
- applyHxRef: Nt,
3718
- getHx: k,
3719
- getMaxHx: zt,
3720
- applyVy: Q,
3721
- getVy: G,
3722
- getMaxVy: $,
3713
+ }, []), Oe = x((a) => {
3714
+ const m = ce.current;
3715
+ if (m === null)
3716
+ return Me.current;
3717
+ const y = m.scrollBy(a);
3718
+ return Me.current = y, y;
3719
+ }, []), Ne = Et() > 0 || qe() > 0, xt = `${Xe}:${Nt}:${mt}:${Ie.width}:${Ee.key}`, pt = `${t}:${It ?? -1}:${p}:${re}:${Ie.height}`, { isTapActive: gt, handleTapCircleDragChange: ar, tapCircleHandleRef: gr } = wi({
3720
+ enabled: v && Ne,
3721
+ maxDistance: W,
3722
+ xSpeedParams: G,
3723
+ ySpeedParams: Q,
3724
+ applyHxRef: zt,
3725
+ getHx: te,
3726
+ getMaxHx: Et,
3727
+ applyVy: Oe,
3728
+ getVy: Re,
3729
+ getMaxVy: qe,
3723
3730
  pendingColAnchorRef: $t,
3724
- xExtentFreshness: Ue,
3725
- yExtentFreshness: Oe
3726
- }), bt = we(() => se((Ne ? 1 : 0.8) * We.opacity, 0, 1), [Ne, We.opacity]);
3727
- Je(() => {
3731
+ xExtentFreshness: xt,
3732
+ yExtentFreshness: pt
3733
+ }), Ln = ve(() => se((gt ? 1 : 0.8) * c.opacity, 0, 1), [gt, c.opacity]);
3734
+ Qe(() => {
3728
3735
  const a = $t.current;
3729
- a === null ? Nt.current(xe.current) : Nt.current(Xt(a)), jt();
3730
- }, [Te.width, Xe, ze, Rt, Vt, jt, Xt]);
3731
- const ir = f(!1);
3732
- Je(() => {
3733
- if (ir.current || N === void 0 || e === 0)
3736
+ a === null ? zt.current(be.current) : zt.current(Xt(a)), Ut();
3737
+ }, [Ie.width, Xe, ze, Nt, mt, Ut, Xt]);
3738
+ const Zr = f(!1);
3739
+ Qe(() => {
3740
+ if (Zr.current || N === void 0 || e === 0)
3734
3741
  return;
3735
- ir.current = !0;
3742
+ Zr.current = !0;
3736
3743
  const a = se(Math.trunc(N.col), 0, e - 1);
3737
3744
  if (a < F || a >= e - Z)
3738
3745
  return;
3739
- const h = { col: a, alignX: "start", offsetX: Math.max(0, N.offsetX) };
3740
- $t.current = h, Nt.current(Xt(h));
3746
+ const m = { col: a, alignX: "start", offsetX: Math.max(0, N.offsetX) };
3747
+ $t.current = m, zt.current(Xt(m));
3741
3748
  }, [N, e, Xt, F, Z]);
3742
- const vr = b((a) => {
3743
- Ie.current = a, Ke.current = !0, O.current?.({ x: xe.current, y: a });
3744
- }, []), en = b(
3749
+ const On = x((a) => {
3750
+ Me.current = a, je.current = !0, O.current?.({ x: be.current, y: a });
3751
+ }, []), Qr = x(
3745
3752
  (a) => {
3746
- if (ut === 0 || Pe.current)
3747
- He.current = { renderingStartIndex: t, renderingEndIndex: t - 1, visibleStartIndex: t, visibleEndIndex: t - 1, scrollPosition: 0, totalHeight: ut === 0 ? 0 : a.totalHeight }, Ie.current = 0;
3753
+ if (lt === 0 || Pe.current)
3754
+ He.current = { renderingStartIndex: t, renderingEndIndex: t - 1, visibleStartIndex: t, visibleEndIndex: t - 1, scrollPosition: 0, totalHeight: lt === 0 ? 0 : a.totalHeight }, Me.current = 0;
3748
3755
  else {
3749
- const h = U;
3756
+ const m = B;
3750
3757
  He.current = {
3751
- renderingStartIndex: a.renderingStartIndex + h,
3752
- renderingEndIndex: a.renderingEndIndex + h,
3753
- visibleStartIndex: a.visibleStartIndex + h,
3754
- visibleEndIndex: a.visibleEndIndex + h,
3758
+ renderingStartIndex: a.renderingStartIndex + m,
3759
+ renderingEndIndex: a.renderingEndIndex + m,
3760
+ visibleStartIndex: a.visibleStartIndex + m,
3761
+ visibleEndIndex: a.visibleEndIndex + m,
3755
3762
  scrollPosition: a.scrollPosition,
3756
3763
  totalHeight: a.totalHeight
3757
- }, Ie.current = a.scrollPosition;
3764
+ }, Me.current = a.scrollPosition;
3758
3765
  }
3759
- Ze((h) => {
3760
- const I = Math.max(1, a.renderingEndIndex - a.renderingStartIndex + 1);
3761
- return I === h ? h : I;
3762
- }), Kt();
3766
+ Ke((m) => {
3767
+ const y = Math.max(1, a.renderingEndIndex - a.renderingStartIndex + 1);
3768
+ return y === m ? m : y;
3769
+ }), Gt();
3763
3770
  },
3764
- [Kt, U, ut, t]
3765
- ), tn = b((a) => {
3766
- $t.current = null, Nt.current(xe.current + a);
3767
- }, []), rn = Pi(B, Ht + ft.length + j.length), Fr = f({ count: 0, warned: !1 }), { placedColumns: Er, truncatedCols: zr } = we(() => {
3768
- const a = Math.max(0, Te.width - Rt - Vt);
3771
+ [Gt, B, lt, t]
3772
+ ), Jr = x((a) => {
3773
+ $t.current = null, zt.current(be.current + a);
3774
+ }, []), en = Ai(q, Ht + dt.length + U.length), Lr = f({ count: 0, warned: !1 }), { placedColumns: Tr, truncatedCols: Rr } = ve(() => {
3775
+ const a = Math.max(0, Ie.width - Nt - mt);
3769
3776
  if (e === 0 || a <= 0)
3770
3777
  return { placedColumns: [], truncatedCols: 0 };
3771
3778
  if (Ee.renderingColStart > Ee.renderingColEnd)
3772
3779
  return { placedColumns: [], truncatedCols: 0 };
3773
- const h = Math.max(1, rn - nr.length - Zt.length), { columns: I, widthUpdates: X, truncated: de } = Ni(se(Ee.renderingColStart, 0, e - 1), se(Ee.renderingColEnd, 0, e - 1), ot, fe, h);
3774
- if (X.length > 0) {
3775
- const it = Fr.current;
3776
- it.count >= Br ? it.warned || (it.warned = !0, A.warn("[VirtualGrid] getColWidth keeps disagreeing with its own previous values; width self-heal is suspended until a converged (zero-deviation) pass re-arms it (unstable accessor — the accessor must be index-stable while the ordering is unchanged).", {
3780
+ const m = Math.max(1, en - jt.length - Kt.length), { columns: y, widthUpdates: H, truncated: de } = Oi(se(Ee.renderingColStart, 0, e - 1), se(Ee.renderingColEnd, 0, e - 1), st, fe, m);
3781
+ if (H.length > 0) {
3782
+ const nt = Lr.current;
3783
+ nt.count >= Xr ? nt.warned || (nt.warned = !0, C.warn("[VirtualGrid] getColWidth keeps disagreeing with its own previous values; width self-heal is suspended until a converged (zero-deviation) pass re-arms it (unstable accessor — the accessor must be index-stable while the ordering is unchanged).", {
3777
3784
  window: Ee.key,
3778
- pendingUpdates: X.length
3779
- })) : (it.count += 1, Ot.current = [...Ot.current ?? [], ...X], Promise.resolve().then(qt));
3785
+ pendingUpdates: H.length
3786
+ })) : (nt.count += 1, Ot.current = [...Ot.current ?? [], ...H], Promise.resolve().then(qt));
3780
3787
  } else
3781
- Fr.current.count = 0, Fr.current.warned = !1;
3782
- return { placedColumns: I, truncatedCols: de };
3783
- }, [Ee, e, Te.width, Rt, Vt, nr.length, Zt.length, ze, ot, fe, rn, qt]), nn = f("");
3784
- q(() => {
3785
- if (zr > 0) {
3786
- const a = `${Ee.key}:${zr}`;
3787
- a !== nn.current && (nn.current = a, ke.current?.({ renderedCells: (Er.length + nr.length + Zt.length) * (Ht + ft.length + j.length), droppedCols: zr }));
3788
+ Lr.current.count = 0, Lr.current.warned = !1;
3789
+ return { placedColumns: y, truncatedCols: de };
3790
+ }, [Ee, e, Ie.width, Nt, mt, jt.length, Kt.length, ze, st, fe, en, qt]), tn = f("");
3791
+ $(() => {
3792
+ if (Rr > 0) {
3793
+ const a = `${Ee.key}:${Rr}`;
3794
+ a !== tn.current && (tn.current = a, ke.current?.({ renderedCells: (Tr.length + jt.length + Kt.length) * (Ht + dt.length + U.length), droppedCols: Rr }));
3788
3795
  }
3789
- }, [zr, Ee.key, Er.length, nr.length, Zt.length, Ht, ft.length, j.length]);
3790
- const sn = Ee.colAnchor, kr = b(
3796
+ }, [Rr, Ee.key, Tr.length, jt.length, Kt.length, Ht, dt.length, U.length]);
3797
+ const rn = Ee.colAnchor, Or = x(
3791
3798
  (a) => {
3792
- const h = d?.(a), I = _e(a) === 0, X = I ? null : Er.map(({ col: de, left: it, width: hr }) => {
3793
- const _t = l?.(a, de), wr = { ..._t?.style, left: it - sn, width: hr };
3794
- return /* @__PURE__ */ Hr("div", { ..._t, key: s ? s(a, de) : de, className: At("aqvs-grid-cell", _t?.className), style: wr }, o(i(a, de), a, de));
3799
+ const m = d?.(a), y = _e(a) === 0, H = y ? null : Tr.map(({ col: de, left: nt, width: fr }) => {
3800
+ const _t = l?.(a, de), br = { ..._t?.style, left: nt - rn, width: fr };
3801
+ return /* @__PURE__ */ _r("div", { ..._t, key: s ? s(a, de) : de, className: Ct("aqvs-grid-cell", _t?.className), style: br }, o(i(a, de), a, de));
3795
3802
  });
3796
- return F === 0 && Z === 0 ? /* @__PURE__ */ J("div", { ...h, className: At("aqvs-grid-row", h?.className), style: h?.style, children: X }) : /* @__PURE__ */ Ut("div", { ...h, "data-aqvs-frozen-row": F > 0 ? "" : void 0, className: At("aqvs-grid-row aqvs-grid-row-frozen-host", h?.className), style: h?.style, children: [
3797
- I ? null : nr.map(({ col: de, left: it, width: hr }) => {
3798
- const _t = l?.(a, de), wr = { ..._t?.style, left: it, width: hr };
3799
- return /* @__PURE__ */ Hr("div", { ..._t, "data-aqvs-frozen-cell": "", key: s ? s(a, de) : de, className: At("aqvs-grid-cell", _t?.className), style: wr }, o(i(a, de), a, de));
3803
+ return F === 0 && Z === 0 ? /* @__PURE__ */ j("div", { ...m, className: Ct("aqvs-grid-row", m?.className), style: m?.style, children: H }) : /* @__PURE__ */ Bt("div", { ...m, "data-aqvs-frozen-row": F > 0 ? "" : void 0, className: Ct("aqvs-grid-row aqvs-grid-row-frozen-host", m?.className), style: m?.style, children: [
3804
+ y ? null : jt.map(({ col: de, left: nt, width: fr }) => {
3805
+ const _t = l?.(a, de), br = { ..._t?.style, left: nt, width: fr };
3806
+ return /* @__PURE__ */ _r("div", { ..._t, "data-aqvs-frozen-cell": "", key: s ? s(a, de) : de, className: Ct("aqvs-grid-cell", _t?.className), style: br }, o(i(a, de), a, de));
3800
3807
  }),
3801
- I ? null : /* @__PURE__ */ J("div", { className: "aqvs-grid-row-scroll", children: /* @__PURE__ */ J("div", { className: "aqvs-grid-row-scroll-inner", children: X }) }),
3802
- I || Z === 0 ? null : /* @__PURE__ */ J("div", { className: "aqvs-grid-row-trailing", children: /* @__PURE__ */ J("div", { className: "aqvs-grid-row-trailing-inner", children: Zt.map(({ col: de, left: it, width: hr }) => {
3803
- const _t = l?.(a, de), wr = { ..._t?.style, left: it, width: hr };
3804
- return /* @__PURE__ */ Hr("div", { ..._t, "data-aqvs-trailing-cell": "", key: s ? s(a, de) : de, className: At("aqvs-grid-cell", _t?.className), style: wr }, o(i(a, de), a, de));
3808
+ y ? null : /* @__PURE__ */ j("div", { className: "aqvs-grid-row-scroll", children: /* @__PURE__ */ j("div", { className: "aqvs-grid-row-scroll-inner", children: H }) }),
3809
+ y || Z === 0 ? null : /* @__PURE__ */ j("div", { className: "aqvs-grid-row-trailing", children: /* @__PURE__ */ j("div", { className: "aqvs-grid-row-trailing-inner", children: Kt.map(({ col: de, left: nt, width: fr }) => {
3810
+ const _t = l?.(a, de), br = { ..._t?.style, left: nt, width: fr };
3811
+ return /* @__PURE__ */ _r("div", { ..._t, "data-aqvs-trailing-cell": "", key: s ? s(a, de) : de, className: Ct("aqvs-grid-cell", _t?.className), style: br }, o(i(a, de), a, de));
3805
3812
  }) }) })
3806
3813
  ] });
3807
3814
  },
3808
- [Er, nr, Zt, F, Z, sn, d, l, s, i, o, _e]
3809
- ), [On, _n] = Ae(""), fr = f(null), on = f(ge);
3810
- on.current = ge;
3811
- const Nr = b(() => {
3812
- const a = on.current;
3815
+ [Tr, jt, Kt, F, Z, rn, d, l, s, i, o, _e]
3816
+ ), [_n, Fn] = Ce(""), dr = f(null), nn = f(ge);
3817
+ nn.current = ge;
3818
+ const Pr = x(() => {
3819
+ const a = nn.current;
3813
3820
  if (a === void 0)
3814
3821
  return;
3815
- const h = a.debounceMs ?? 400;
3816
- Number.isFinite(h) && h >= 0 && (fr.current !== null && window.clearTimeout(fr.current), fr.current = window.setTimeout(() => {
3817
- fr.current = null;
3818
- const I = Mt();
3819
- I !== null && _n((X) => {
3820
- const de = a.buildMessage(I);
3821
- return de === X ? X : de;
3822
+ const m = a.debounceMs ?? 400;
3823
+ Number.isFinite(m) && m >= 0 && (dr.current !== null && window.clearTimeout(dr.current), dr.current = window.setTimeout(() => {
3824
+ dr.current = null;
3825
+ const y = Mt();
3826
+ y !== null && Fn((H) => {
3827
+ const de = a.buildMessage(y);
3828
+ return de === H ? H : de;
3822
3829
  });
3823
- }, h));
3824
- }, [Mt]), Vr = ge?.debounceMs ?? 400, an = Number.isFinite(Vr) && Vr >= 0, cn = ge !== void 0;
3825
- q(() => {
3826
- cn && !an && A.warn(`[VirtualGrid] liveRegion.debounceMs must be a finite number >= 0, received ${Vr}. Announcements are disabled.`);
3827
- }, [cn, an, Vr]), q(
3830
+ }, m));
3831
+ }, [Mt]), Er = ge?.debounceMs ?? 400, sn = Number.isFinite(Er) && Er >= 0, on = ge !== void 0;
3832
+ $(() => {
3833
+ on && !sn && C.warn(`[VirtualGrid] liveRegion.debounceMs must be a finite number >= 0, received ${Er}. Announcements are disabled.`);
3834
+ }, [on, sn, Er]), $(
3828
3835
  () => () => {
3829
- fr.current !== null && window.clearTimeout(fr.current);
3836
+ dr.current !== null && window.clearTimeout(dr.current);
3830
3837
  },
3831
3838
  []
3832
- ), q(() => {
3833
- Nr();
3834
- }, [Ee, Nr]);
3835
- const Fn = b(
3839
+ ), $(() => {
3840
+ Pr();
3841
+ }, [Ee, Pr]);
3842
+ const kn = x(
3836
3843
  (a) => {
3837
- en(a), Nr();
3844
+ Qr(a), Pr();
3838
3845
  },
3839
- [en, Nr]
3846
+ [Qr, Pr]
3840
3847
  );
3841
- return _r(
3842
- tt,
3848
+ return Dr(
3849
+ et,
3843
3850
  () => ({
3844
3851
  scrollTo: (a) => {
3845
- const h = ce.current;
3846
- let I = Ie.current;
3847
- a.y !== void 0 && h !== null && (h.scrollTo(a.y), I = h.getScrollPosition(), Ie.current = I);
3848
- let X = xe.current;
3849
- return a.x !== void 0 && ($t.current = null, X = Nt.current(a.x)), { x: X, y: I };
3852
+ const m = ce.current;
3853
+ let y = Me.current;
3854
+ a.y !== void 0 && m !== null && (m.scrollTo(a.y), y = m.getScrollPosition(), Me.current = y);
3855
+ let H = be.current;
3856
+ return a.x !== void 0 && ($t.current = null, H = zt.current(a.x)), { x: H, y };
3850
3857
  },
3851
3858
  scrollBy: (a) => {
3852
- const h = ce.current;
3853
- let I = Ie.current;
3854
- a.y !== void 0 && a.y !== 0 && h !== null && (I = h.scrollBy(a.y), Ie.current = I);
3855
- let X = xe.current;
3856
- return a.x !== void 0 && a.x !== 0 && ($t.current = null, X = Nt.current(xe.current + a.x)), { x: X, y: I };
3859
+ const m = ce.current;
3860
+ let y = Me.current;
3861
+ a.y !== void 0 && a.y !== 0 && m !== null && (y = m.scrollBy(a.y), Me.current = y);
3862
+ let H = be.current;
3863
+ return a.x !== void 0 && a.x !== 0 && ($t.current = null, H = zt.current(be.current + a.x)), { x: H, y };
3857
3864
  },
3858
- scrollToCell: (a, h, I) => {
3859
- const X = ce.current;
3860
- if (X !== null && t > 0) {
3865
+ scrollToCell: (a, m, y) => {
3866
+ const H = ce.current;
3867
+ if (H !== null && t > 0) {
3861
3868
  const de = se(Math.trunc(a), 0, t - 1);
3862
- de >= U && de < t - E && X.scrollToIndex(de - U, { align: I?.alignY ?? "top", offset: I?.offsetY });
3869
+ de >= B && de < t - E && H.scrollToIndex(de - B, { align: y?.alignY ?? "top", offset: y?.offsetY });
3863
3870
  }
3864
3871
  if (e > 0) {
3865
- const de = se(Math.trunc(h), 0, e - 1);
3872
+ const de = se(Math.trunc(m), 0, e - 1);
3866
3873
  if (de >= F && de < e - Z) {
3867
- const it = { col: de, alignX: I?.alignX ?? "start", offsetX: I?.offsetX ?? 0 };
3868
- $t.current = it, Nt.current(Xt(it));
3874
+ const nt = { col: de, alignX: y?.alignX ?? "start", offsetX: y?.offsetX ?? 0 };
3875
+ $t.current = nt, zt.current(Xt(nt));
3869
3876
  }
3870
3877
  }
3871
3878
  },
3872
- getScrollPosition: () => Ke.current || ce.current !== null ? { x: xe.current, y: ce.current?.getScrollPosition() ?? Ie.current } : { x: -1, y: -1 },
3879
+ getScrollPosition: () => je.current || ce.current !== null ? { x: be.current, y: ce.current?.getScrollPosition() ?? Me.current } : { x: -1, y: -1 },
3873
3880
  getScrollAnchor: () => {
3874
3881
  if (t === 0 || e === 0)
3875
3882
  return null;
3876
3883
  const a = ce.current?.getScrollAnchor() ?? null;
3877
3884
  if (a === null)
3878
3885
  return null;
3879
- const h = qe.current + xe.current, I = fe.findIndexAtOrAfter(h, { materializeOption: { materialize: !1 } });
3880
- if (I.index === -1)
3881
- return { row: a.index + U, col: e - 1, offsetX: 0, offsetY: a.offsetPx };
3882
- if (I.cumulative === h)
3883
- return { row: a.index + U, col: se(I.index + 1, 0, e - 1), offsetX: 0, offsetY: a.offsetPx };
3884
- const X = (I.cumulative ?? 0) - (I.currentValue ?? 0);
3885
- return { row: a.index + U, col: I.index, offsetX: Math.max(0, h - X), offsetY: a.offsetPx };
3886
+ const m = Ye.current + be.current, y = fe.findIndexAtOrAfter(m, { materializeOption: { materialize: !1 } });
3887
+ if (y.index === -1)
3888
+ return { row: a.index + B, col: e - 1, offsetX: 0, offsetY: a.offsetPx };
3889
+ if (y.cumulative === m)
3890
+ return { row: a.index + B, col: se(y.index + 1, 0, e - 1), offsetX: 0, offsetY: a.offsetPx };
3891
+ const H = (y.cumulative ?? 0) - (y.currentValue ?? 0);
3892
+ return { row: a.index + B, col: y.index, offsetX: Math.max(0, m - H), offsetY: a.offsetPx };
3886
3893
  },
3887
3894
  getViewportSize: () => ({ width: wt.current.width, height: wt.current.height }),
3888
3895
  // 縦はインセット込みの行側 getContentSize を単一情報源にする (range.totalHeight は木総高のみ)。
3889
3896
  // 3.5.0: height = H_F + 埋め込み + H_T
3890
- getContentSize: () => ({ width: ct.current, height: ce.current === null ? 0 : C.current + dt.current + Math.max(0, ce.current.getContentSize()) }),
3897
+ getContentSize: () => ({ width: at.current, height: ce.current === null ? 0 : A.current + ut.current + Math.max(0, ce.current.getContentSize()) }),
3891
3898
  getRange: Mt,
3892
- updateRowSize: (a, h) => {
3893
- Dr(h, "row", a), Math.trunc(a) < U ? Dt((I) => I + 1) : E > 0 && Math.trunc(a) >= t - E ? he((I) => I + 1) : ce.current?.updateItemSize(Math.trunc(a) - U, h);
3899
+ updateRowSize: (a, m) => {
3900
+ Vr(m, "row", a), Math.trunc(a) < B ? Dt((y) => y + 1) : E > 0 && Math.trunc(a) >= t - E ? he((y) => y + 1) : ce.current?.updateItemSize(Math.trunc(a) - B, m);
3894
3901
  },
3895
- updateColSize: (a, h) => {
3896
- Dr(h, "col", a), mt(fe.update(se(Math.trunc(a), 0, Math.max(0, e - 1)), h)), $e((I) => I + 1);
3902
+ updateColSize: (a, m) => {
3903
+ Vr(m, "col", a), ht(fe.update(se(Math.trunc(a), 0, Math.max(0, e - 1)), m)), $e((y) => y + 1);
3897
3904
  },
3898
3905
  getFrozenSize: () => ({
3899
3906
  cols: F,
3900
- width: qe.current,
3901
- rows: U,
3902
- height: C.current,
3907
+ width: Ye.current,
3908
+ rows: B,
3909
+ height: A.current,
3903
3910
  trailingCols: Z,
3904
3911
  trailingRows: E,
3905
- trailingWidth: gt.current,
3906
- trailingHeight: dt.current,
3912
+ trailingWidth: bt.current,
3913
+ trailingHeight: ut.current,
3907
3914
  // vis は単一 JS 源ヘルパーの呼び出しのみ (式の再導出禁止 — 3.5.0 プラン §2.1-4)
3908
- trailingVisibleWidth: Lr(gt.current, qe.current, wt.current.width),
3909
- trailingVisibleHeight: Lr(dt.current, C.current, wt.current.height)
3915
+ trailingVisibleWidth: Cr(bt.current, Ye.current, wt.current.width),
3916
+ trailingVisibleHeight: Cr(ut.current, A.current, wt.current.height)
3910
3917
  }),
3911
3918
  applyWheel: (a) => ce.current?.applyWheel(a) ?? !1,
3912
- focusRowAtIndex: (a, h) => {
3913
- const I = Math.trunc(a);
3914
- I < U ? Me.current?.querySelector(`[data-aqvs-frozen-band-row="${I}"]`)?.focus() : E > 0 && I >= t - E ? Me.current?.querySelector(`[data-aqvs-trailing-band-row="${I}"]`)?.focus() : ce.current?.focusItemAtIndex(I - U, h);
3919
+ focusRowAtIndex: (a, m) => {
3920
+ const y = Math.trunc(a);
3921
+ y < B ? Se.current?.querySelector(`[data-aqvs-frozen-band-row="${y}"]`)?.focus() : E > 0 && y >= t - E ? Se.current?.querySelector(`[data-aqvs-trailing-band-row="${y}"]`)?.focus() : ce.current?.focusItemAtIndex(y - B, m);
3915
3922
  }
3916
3923
  }),
3917
- [t, e, fe, Mt, mt, Xt, F, U, Z, E]
3918
- ), /* @__PURE__ */ Ut("div", { ref: Me, className: At("aqvs-grid", U > 0 ? "aqvs-grid-has-frozen-rows" : "", E > 0 ? "aqvs-grid-has-trailing-rows" : "", W), "data-testid": ie, children: [
3919
- U > 0 ? (
3924
+ [t, e, fe, Mt, ht, Xt, F, B, Z, E]
3925
+ ), /* @__PURE__ */ Bt("div", { ref: Se, className: Ct("aqvs-grid", B > 0 ? "aqvs-grid-has-frozen-rows" : "", E > 0 ? "aqvs-grid-has-trailing-rows" : "", Y), "data-testid": ie, children: [
3926
+ B > 0 ? (
3920
3927
  // 凍結行帯 (行凍結設計 §4-2): グリッド所有の帯外バンド — 行本体は renderRow を
3921
3928
  // そのまま再利用する (F > 0 の凍結セル / クリップ / hx 残差 var は継承で無償追随
3922
3929
  // = 4 象限コーナーの成立点)。top は木絶対プレフィックス、高さ 0 行は DOM 非生成
3923
- /* @__PURE__ */ J("div", { className: "aqvs-grid-frozen-rows", style: { height: p }, "data-testid": ie ? `${ie}-frozen-rows` : void 0, children: ft.map(({ row: a, top: h, height: I }) => (
3930
+ /* @__PURE__ */ j("div", { className: "aqvs-grid-frozen-rows", style: { height: p }, "data-testid": ie ? `${ie}-frozen-rows` : void 0, children: dt.map(({ row: a, top: m, height: y }) => (
3924
3931
  // 行ラッパーの role は消費側の複合ウィジェット契約 (listbox / tree / grid — README
3925
3932
  // 「Composite widget roles」) の所有物で、パッケージが既定 role を課すと衝突する。
3926
3933
  // フォーカス結線は focusRowAtIndex ↔ onRowFocus 往復のバンド版そのもの。右インセット
3927
3934
  // (right: scrollBarWidth + overflow クリップ) は縦バーコーナーの予約 — ペインの
3928
3935
  // クリップ箱 (root − バー幅) と帯のクリップ箱を一致させる (R1 是正)。
3929
3936
  // biome-ignore lint/a11y/noStaticElementInteractions: role は消費側の複合ウィジェット契約の所有物 (上記)
3930
- /* @__PURE__ */ J("div", { "data-aqvs-frozen-band-row": a, className: "aqvs-grid-frozen-band-row", style: { top: h, height: I, right: ye }, tabIndex: -1, onFocus: () => y?.(a), children: kr(a) }, a)
3937
+ /* @__PURE__ */ j("div", { "data-aqvs-frozen-band-row": a, className: "aqvs-grid-frozen-band-row", style: { top: m, height: y, right: ye }, tabIndex: -1, onFocus: () => I?.(a), children: Or(a) }, a)
3931
3938
  )) })
3932
3939
  ) : null,
3933
- /* @__PURE__ */ J("div", { className: "aqvs-grid-main", "data-testid": ie ? `${ie}-main` : void 0, children: /* @__PURE__ */ J(
3934
- Ti,
3940
+ /* @__PURE__ */ j("div", { className: "aqvs-grid-main", "data-testid": ie ? `${ie}-main` : void 0, children: /* @__PURE__ */ j(
3941
+ Vi,
3935
3942
  {
3936
3943
  ref: ce,
3937
- itemCount: ar ? 0 : ut,
3938
- getItem: (a) => a + U,
3939
- getItemKey: (a) => a + U,
3944
+ itemCount: nr ? 0 : lt,
3945
+ getItem: (a) => a + B,
3946
+ getItemKey: (a) => a + B,
3940
3947
  getItemHeight: De,
3941
3948
  overscanCount: P,
3942
- viewportSize: Te.height > 0 ? Math.max(0, Te.height - p - re) : void 0,
3949
+ viewportSize: Ie.height > 0 ? Math.max(0, Ie.height - p - re) : void 0,
3943
3950
  callbackThrottleMs: L,
3944
3951
  behaviorOptions: oe,
3945
- scrollBarOptions: Pr,
3946
- contentProps: m,
3947
- background: v,
3952
+ scrollBarOptions: ur,
3953
+ contentProps: h,
3954
+ background: b,
3948
3955
  contentInsets: M,
3949
- onItemFocus: Ge,
3956
+ onItemFocus: Ue,
3950
3957
  horizontalKeyInputs: pe,
3951
- horizontalKeyStep: Ce,
3958
+ horizontalKeyStep: Ae,
3952
3959
  initialScrollAnchor: (
3953
3960
  // トグル済みなら視点保存 (捕捉アンカー) のみ — 捕捉 null は undefined (先頭)
3954
3961
  // へ落とし、消費済みマウント props の蘇りを断つ (R2 是正)。未トグルのみ
3955
3962
  // マウント props の凍結行 no-op 付き −R 変換 (列の §8 no-op と同文)
3956
- je.current ? Fe.current !== null && Fe.current.row >= U && ut > 0 ? { index: Fe.current.row - U, offsetPx: Fe.current.offsetPx } : void 0 : N !== void 0 && ut > 0 && Math.trunc(N.row) >= U && Math.trunc(N.row) < t - E ? { index: Math.trunc(N.row) - U, offsetPx: N.offsetY } : void 0
3963
+ Ge.current ? Fe.current !== null && Fe.current.row >= B && lt > 0 ? { index: Fe.current.row - B, offsetPx: Fe.current.offsetPx } : void 0 : N !== void 0 && lt > 0 && Math.trunc(N.row) >= B && Math.trunc(N.row) < t - E ? { index: Math.trunc(N.row) - B, offsetPx: N.offsetY } : void 0
3957
3964
  ),
3958
- onScroll: vr,
3959
- onRangeChange: Fn,
3960
- onWheelHorizontal: tn,
3961
- onPanHorizontal: tn,
3962
- locale: et,
3965
+ onScroll: On,
3966
+ onRangeChange: kn,
3967
+ onWheelHorizontal: Jr,
3968
+ onPanHorizontal: Jr,
3969
+ locale: Je,
3963
3970
  labels: z,
3964
3971
  testId: ie ? `${ie}-rows` : void 0,
3965
- children: kr
3972
+ children: Or
3966
3973
  },
3967
- U
3974
+ B
3968
3975
  ) }),
3969
3976
  E > 0 ? (
3970
3977
  // 末尾行帯 (3.5.0 プラン §6.1-17): .aqvs-grid-main の**後**・hbar の**前**の兄弟
@@ -3973,91 +3980,91 @@ const xi = 1e4, Hi = () => {
3973
3980
  // inner はインライン木高 H_T の bottom 定着 — 帯上端 = extent − H_T_vis が全構成で
3974
3981
  // 成立し、重複縮退では帯の**末尾**行が可視に残る。行本体は renderRow 逐語再利用
3975
3982
  // (先頭列 / 末尾列の帯構造を継承し 4 象限コーナー全種が無償で成立)
3976
- /* @__PURE__ */ J("div", { className: "aqvs-grid-trailing-rows", style: { height: Lr(re, p, Te.height) }, "data-testid": ie ? `${ie}-trailing-rows` : void 0, children: /* @__PURE__ */ J("div", { className: "aqvs-grid-trailing-rows-inner", style: { height: re }, children: j.map(({ row: a, top: h, height: I }) => (
3983
+ /* @__PURE__ */ j("div", { className: "aqvs-grid-trailing-rows", style: { height: Cr(re, p, Ie.height) }, "data-testid": ie ? `${ie}-trailing-rows` : void 0, children: /* @__PURE__ */ j("div", { className: "aqvs-grid-trailing-rows-inner", style: { height: re }, children: U.map(({ row: a, top: m, height: y }) => (
3977
3984
  // 帯行は帯ローカル top + right: scrollBarWidth (縦バーコーナーの予約 — 先頭帯行と
3978
3985
  // 同文) + tabIndex −1 + onFocus フル行 index (focusRowAtIndex ↔ onRowFocus 往復)。
3979
3986
  // biome-ignore lint/a11y/noStaticElementInteractions: role は消費側の複合ウィジェット契約の所有物 (先頭帯行と同文)
3980
- /* @__PURE__ */ J("div", { "data-aqvs-trailing-band-row": a, className: "aqvs-grid-trailing-band-row", style: { top: h, height: I, right: ye }, tabIndex: -1, onFocus: () => y?.(a), children: kr(a) }, a)
3987
+ /* @__PURE__ */ j("div", { "data-aqvs-trailing-band-row": a, className: "aqvs-grid-trailing-band-row", style: { top: m, height: y, right: ye }, tabIndex: -1, onFocus: () => I?.(a), children: Or(a) }, a)
3981
3988
  )) }) })
3982
3989
  ) : null,
3983
- /* @__PURE__ */ J("div", { className: "aqvs-grid-hbar-strip", style: { height: ye, paddingRight: Z > 0 ? ye + Lr(Vt, Rt, Te.width) : ye }, "data-testid": ie ? `${ie}-hbar` : void 0, children: /* @__PURE__ */ J(
3984
- Vn,
3990
+ /* @__PURE__ */ j("div", { className: "aqvs-grid-hbar-strip", style: { height: ye, paddingRight: Z > 0 ? ye + Cr(mt, Nt, Ie.width) : ye }, "data-testid": ie ? `${ie}-hbar` : void 0, children: /* @__PURE__ */ j(
3991
+ zn,
3985
3992
  {
3986
3993
  horizontal: !0,
3987
- contentSize: Math.max(0, Xe - Rt - Vt),
3988
- viewportSize: Math.max(0, Te.width - Rt - Vt),
3989
- scrollPosition: cr,
3994
+ contentSize: Math.max(0, Xe - Nt - mt),
3995
+ viewportSize: Math.max(0, Ie.width - Nt - mt),
3996
+ scrollPosition: ir,
3990
3997
  itemCount: Math.max(0, e - F - Z),
3991
- tapScrollCircleOptions: te?.tapScrollCircleOptions,
3992
- onScroll: (a, h) => ($t.current = null, Nt.current(typeof a == "function" ? a(h ?? xe.current) : a)),
3993
- enableThumbDrag: te?.enableThumbDrag,
3994
- enableTrackClick: te?.enableTrackClick,
3995
- enableArrowButtons: te?.enableArrowButtons,
3996
- enableArrowButtonTabStops: te?.enableArrowButtonTabStops,
3998
+ tapScrollCircleOptions: ee?.tapScrollCircleOptions,
3999
+ onScroll: (a, m) => ($t.current = null, zt.current(typeof a == "function" ? a(m ?? be.current) : a)),
4000
+ enableThumbDrag: ee?.enableThumbDrag,
4001
+ enableTrackClick: ee?.enableTrackClick,
4002
+ enableArrowButtons: ee?.enableArrowButtons,
4003
+ enableArrowButtonTabStops: ee?.enableArrowButtonTabStops,
3997
4004
  scrollBarWidth: ye,
3998
- locale: et,
4005
+ locale: Je,
3999
4006
  labels: z
4000
4007
  }
4001
4008
  ) }),
4002
- br && be && // 統合 2 軸タップサークルの 3 アーム配置則: (C) 可視上限
4009
+ v && Ne && // 統合 2 軸タップサークルの 3 アーム配置則: (C) 可視上限
4003
4010
  // `100% − (sbw + size)` / (R) 到達性 `100% − sbw + off` / (Q) 遠象限床
4004
4011
  // `75% − size/2`。全アームが root 寸・sbw・size・オフセットのみに依存 —
4005
4012
  // 帯幅非依存 (凍結トグル不変)。wrapper は純配置で transition を持たない
4006
4013
  // (フェードはサークルルートのインライン opacity — §8.7)。hbar strip の後・
4007
4014
  // live region の前 = 共有 z-50 層の DOM 後勝ちで最前
4008
- /* @__PURE__ */ J(
4015
+ /* @__PURE__ */ j(
4009
4016
  "div",
4010
4017
  {
4011
4018
  className: "aqvs-grid-tap-circle-wrapper",
4012
4019
  "data-aqvs-grid-tap-circle": "",
4013
4020
  style: {
4014
- left: `min(calc(100% - ${ye + We.size}px), max(calc(100% - ${ye}px + ${We.offsetX}px), calc(75% - ${We.size / 2}px)))`,
4015
- top: `min(calc(100% - ${ye + We.size}px), max(calc(100% - ${ye}px + ${We.offsetY}px), calc(75% - ${We.size / 2}px)))`
4021
+ left: `min(calc(100% - ${ye + c.size}px), max(calc(100% - ${ye}px + ${c.offsetX}px), calc(75% - ${c.size / 2}px)))`,
4022
+ top: `min(calc(100% - ${ye + c.size}px), max(calc(100% - ${ye}px + ${c.offsetY}px), calc(75% - ${c.size / 2}px)))`
4016
4023
  },
4017
- children: /* @__PURE__ */ J(
4018
- Jr,
4024
+ children: /* @__PURE__ */ j(
4025
+ Kr,
4019
4026
  {
4020
4027
  axis: "xy",
4021
- ref: pt,
4022
- className: At("aqvs-grid-tap-circle", We.className),
4023
- size: We.size,
4024
- maxVisualDistance: c,
4025
- opacity: bt,
4026
- renderVisual: We.renderVisual,
4027
- onDragChange: xt
4028
+ ref: gr,
4029
+ className: Ct("aqvs-grid-tap-circle", c.className),
4030
+ size: c.size,
4031
+ maxVisualDistance: W,
4032
+ opacity: Ln,
4033
+ renderVisual: c.renderVisual,
4034
+ onDragChange: ar
4028
4035
  }
4029
4036
  )
4030
4037
  }
4031
4038
  ),
4032
- ge !== void 0 ? /* @__PURE__ */ J("div", { className: "aqvs-grid-live-region", "aria-live": "polite", "data-testid": ie ? `${ie}-live` : void 0, children: On }) : null
4039
+ ge !== void 0 ? /* @__PURE__ */ j("div", { className: "aqvs-grid-live-region", "aria-live": "polite", "data-testid": ie ? `${ie}-live` : void 0, children: _n }) : null
4033
4040
  ] });
4034
- }, Xi = Or(Di);
4041
+ }, Gi = Ar(Hi);
4035
4042
  export {
4036
- er as FenwickMapTree,
4037
- wn as MAX_FROZEN_LEADING_COLS,
4038
- Sn as MAX_FROZEN_LEADING_ROWS,
4039
- Mn as MAX_FROZEN_TRAILING_COLS,
4040
- In as MAX_FROZEN_TRAILING_ROWS,
4041
- Ri as MAX_RENDERED_CELLS,
4042
- Ir as MAX_TRACK_SIZE,
4043
- Vn as ScrollBar,
4044
- fi as ScrollPane,
4045
- zn as TAP_SCROLL_SPEED_DEFAULTS,
4046
- Xn as VIRTUAL_SCROLL_LABEL_CATALOGS,
4047
- Wr as VIRTUAL_SCROLL_LABEL_KEYS,
4048
- Tn as VIRTUAL_SCROLL_LOCALES,
4049
- Xi as VirtualGrid,
4050
- Ti as VirtualScroll,
4051
- si as computeAutoTapScrollMaxSpeedMultiplier,
4052
- Kr as computeTapScrollSpeed,
4053
- oi as computeTapScrollVelocity,
4054
- Fi as createResidualQuantizer,
4043
+ Zt as FenwickMapTree,
4044
+ xn as MAX_FROZEN_LEADING_COLS,
4045
+ vn as MAX_FROZEN_LEADING_ROWS,
4046
+ wn as MAX_FROZEN_TRAILING_COLS,
4047
+ Sn as MAX_FROZEN_TRAILING_ROWS,
4048
+ Ci as MAX_RENDERED_CELLS,
4049
+ wr as MAX_TRACK_SIZE,
4050
+ zn as ScrollBar,
4051
+ mi as ScrollPane,
4052
+ Pn as TAP_SCROLL_SPEED_DEFAULTS,
4053
+ Yn as VIRTUAL_SCROLL_LABEL_CATALOGS,
4054
+ qr as VIRTUAL_SCROLL_LABEL_KEYS,
4055
+ yn as VIRTUAL_SCROLL_LOCALES,
4056
+ Gi as VirtualGrid,
4057
+ Vi as VirtualScroll,
4058
+ ai as computeAutoTapScrollMaxSpeedMultiplier,
4059
+ Ur as computeTapScrollSpeed,
4060
+ ci as computeTapScrollVelocity,
4061
+ Yi as createResidualQuantizer,
4055
4062
  se as minmax,
4056
- Rn as resolveVirtualScrollLabels,
4057
- Yn as resolveVirtualScrollLocale,
4058
- ki as tapScrollCircleSampleVisual,
4059
- Cn as useFenwickMapTree,
4060
- Hi as useHeightCache,
4061
- gi as useLruCache,
4062
- $i as useWheelBridge
4063
+ In as resolveVirtualScrollLabels,
4064
+ Wn as resolveVirtualScrollLocale,
4065
+ Bi as tapScrollCircleSampleVisual,
4066
+ Vn as useFenwickMapTree,
4067
+ Wi as useHeightCache,
4068
+ xi as useLruCache,
4069
+ Ui as useWheelBridge
4063
4070
  };