@cyca/react-timeline-editor 0.2.3-alpha.1 → 0.2.3-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import * as p from "react";
2
- import nt, { useRef as ie, useEffect as et, useEffectEvent as Ar, useImperativeHandle as Jn, useState as Tt, useLayoutEffect as pn, createElement as Pr, useCallback as Dr } from "react";
3
- import { flushSync as Lr } from "react-dom";
2
+ import nt, { useRef as ie, useEffect as et, useEffectEvent as Pr, useImperativeHandle as Jn, useState as Tt, useMemo as Dr, useCallback as Zn, useLayoutEffect as pn, createElement as Lr } from "react";
3
+ import { flushSync as Or } from "react-dom";
4
4
  var Wt = { exports: {} }, Pt = {};
5
5
  var Sn;
6
- function Or() {
6
+ function Mr() {
7
7
  if (Sn) return Pt;
8
8
  Sn = 1;
9
9
  var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
@@ -26,7 +26,7 @@ function Or() {
26
26
  }
27
27
  var Dt = {};
28
28
  var yn;
29
- function Mr() {
29
+ function Nr() {
30
30
  return yn || (yn = 1, process.env.NODE_ENV !== "production" && (function() {
31
31
  function n(d) {
32
32
  if (d == null) return null;
@@ -36,13 +36,13 @@ function Mr() {
36
36
  switch (d) {
37
37
  case g:
38
38
  return "Fragment";
39
- case w:
39
+ case _:
40
40
  return "Profiler";
41
- case v:
41
+ case S:
42
42
  return "StrictMode";
43
- case C:
44
- return "Suspense";
45
43
  case x:
44
+ return "Suspense";
45
+ case R:
46
46
  return "SuspenseList";
47
47
  case A:
48
48
  return "Activity";
@@ -51,13 +51,13 @@ function Mr() {
51
51
  switch (typeof d.tag == "number" && console.error(
52
52
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
53
53
  ), d.$$typeof) {
54
- case b:
54
+ case v:
55
55
  return "Portal";
56
- case S:
57
- return d.displayName || "Context";
58
56
  case y:
57
+ return d.displayName || "Context";
58
+ case w:
59
59
  return (d._context.displayName || "Context") + ".Consumer";
60
- case R:
60
+ case C:
61
61
  var T = d.render;
62
62
  return d = d.displayName, d || (d = T.displayName || T.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
63
63
  case k:
@@ -137,7 +137,7 @@ function Mr() {
137
137
  function u(d, T, F, H, q, B) {
138
138
  var V = F.ref;
139
139
  return d = {
140
- $$typeof: _,
140
+ $$typeof: b,
141
141
  type: d,
142
142
  key: T,
143
143
  props: F,
@@ -219,9 +219,9 @@ React keys must be passed directly to JSX without using spread:
219
219
  f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === L && (d._payload.status === "fulfilled" ? f(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
220
220
  }
221
221
  function f(d) {
222
- return typeof d == "object" && d !== null && d.$$typeof === _;
222
+ return typeof d == "object" && d !== null && d.$$typeof === b;
223
223
  }
224
- var m = nt, _ = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), S = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), A = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), $ = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, z = Object.prototype.hasOwnProperty, K = Array.isArray, P = console.createTask ? console.createTask : function() {
224
+ var m = nt, b = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), y = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), A = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), $ = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, z = Object.prototype.hasOwnProperty, K = Array.isArray, P = console.createTask ? console.createTask : function() {
225
225
  return null;
226
226
  };
227
227
  m = {
@@ -257,25 +257,25 @@ React keys must be passed directly to JSX without using spread:
257
257
  })()), Dt;
258
258
  }
259
259
  var En;
260
- function Nr() {
261
- return En || (En = 1, process.env.NODE_ENV === "production" ? Wt.exports = Or() : Wt.exports = Mr()), Wt.exports;
260
+ function Ir() {
261
+ return En || (En = 1, process.env.NODE_ENV === "production" ? Wt.exports = Mr() : Wt.exports = Nr()), Wt.exports;
262
262
  }
263
- var E = Nr();
264
- const ln = "timeline-editor", Ir = 0, Yt = 1, Zn = 10, Xt = 160, Jt = 20, un = 1, fn = 8, xn = 32, dn = 20, Qn = 5, rn = {
263
+ var E = Ir();
264
+ const ln = "timeline-editor", kr = 0, Yt = 1, Qn = 10, Xt = 160, Jt = 20, un = 1, fn = 8, Rn = 32, dn = 20, er = 5, rn = {
265
265
  trace: 0,
266
266
  debug: 1,
267
267
  info: 2,
268
268
  warn: 3,
269
269
  error: 4,
270
270
  silent: 5
271
- }, kr = [
271
+ }, Wr = [
272
272
  "trace",
273
273
  "debug",
274
274
  "info",
275
275
  "warn",
276
276
  "error"
277
277
  ];
278
- var Wr = class er {
278
+ var jr = class tr {
279
279
  s;
280
280
  ls = /* @__PURE__ */ new Map();
281
281
  lvl;
@@ -295,7 +295,7 @@ var Wr = class er {
295
295
  noop = () => {
296
296
  };
297
297
  bindMethods() {
298
- kr.forEach((e) => {
298
+ Wr.forEach((e) => {
299
299
  const t = this.e.bind(this.c, e, this.n);
300
300
  Object.defineProperty(this, e, {
301
301
  get: () => rn[e] >= rn[this.currentLevel()] ? t : this.noop,
@@ -323,8 +323,8 @@ var Wr = class er {
323
323
  getLogger(e) {
324
324
  if (!e) throw new Error("Logger name required");
325
325
  if (!this.ls.has(e)) {
326
- const t = new er(this.s, this.e, e, this.r || this);
327
- this.ls.set(e, tr(t));
326
+ const t = new tr(this.s, this.e, e, this.r || this);
327
+ this.ls.set(e, nr(t));
328
328
  }
329
329
  return this.ls.get(e);
330
330
  }
@@ -338,14 +338,14 @@ var Wr = class er {
338
338
  this.c = e, this.bindMethods();
339
339
  }
340
340
  };
341
- function tr(n) {
341
+ function nr(n) {
342
342
  return new Proxy(n, { get(e, t, r) {
343
343
  if (t in e) return Reflect.get(e, t, r);
344
344
  const s = e.c[t];
345
345
  return typeof s == "function" ? s.bind(e.c) : s;
346
346
  } });
347
347
  }
348
- var jr = class {
348
+ var zr = class {
349
349
  get(n) {
350
350
  return localStorage.getItem(n);
351
351
  }
@@ -356,13 +356,13 @@ var jr = class {
356
356
  localStorage.removeItem(n);
357
357
  }
358
358
  };
359
- const zr = {
359
+ const Fr = {
360
360
  trace: "#95bdb7",
361
361
  debug: "#ad95b8",
362
362
  info: "#b6bd73",
363
363
  warn: "#88a1bb",
364
364
  error: "#bf6c69"
365
- }, Rn = {
365
+ }, xn = {
366
366
  info: "⚡️",
367
367
  success: "✔",
368
368
  warn: "▲",
@@ -370,23 +370,23 @@ const zr = {
370
370
  log: "●",
371
371
  trace: "◔",
372
372
  debug: "◌"
373
- }, Fr = { bind(n, e, t) {
374
- const r = t ? `${Rn[e]} ${String(t)}:` : `${Rn[e]}`;
375
- return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${zr[e]}; font-weight: bold;`, "color: inherit");
376
- } }, Ze = tr(new Wr(new jr(), Fr));
377
- function Vr(n) {
373
+ }, Vr = { bind(n, e, t) {
374
+ const r = t ? `${xn[e]} ${String(t)}:` : `${xn[e]}`;
375
+ return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${Fr[e]}; font-weight: bold;`, "color: inherit");
376
+ } }, Ze = nr(new jr(new zr(), Vr));
377
+ function Ur(n) {
378
378
  let {
379
379
  editorData: e = [],
380
380
  effects: t = {},
381
381
  scale: r = Yt,
382
- scaleSplitCount: s = Zn,
382
+ scaleSplitCount: s = Qn,
383
383
  scaleWidth: o = Xt,
384
384
  startLeft: i = Jt,
385
385
  minScaleCount: c = dn,
386
386
  maxScaleCount: a = 1 / 0,
387
- rowHeight: u = xn
387
+ rowHeight: u = Rn
388
388
  } = n;
389
- r <= 0 && (Ze.error("Error: scale must be greater than 0!"), r = Yt), s <= 0 && (Ze.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (Ze.warn("Warning: scaleWidth must be greater than 0!"), o = Xt), i < 0 && (Ze.warn("Warning: startLeft cannot be less than 0!"), i = 0), c < 1 && (Ze.warn("Warning: minScaleCount must be greater than 1!"), c = dn), c = parseInt(c + ""), a < c && (Ze.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), a = c), a = a === 1 / 0 ? 1 / 0 : parseInt(a + ""), u <= 0 && (Ze.warn("Warning: rowHeight must be greater than 0!"), u = xn);
389
+ r <= 0 && (Ze.error("Error: scale must be greater than 0!"), r = Yt), s <= 0 && (Ze.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (Ze.warn("Warning: scaleWidth must be greater than 0!"), o = Xt), i < 0 && (Ze.warn("Warning: startLeft cannot be less than 0!"), i = 0), c < 1 && (Ze.warn("Warning: minScaleCount must be greater than 1!"), c = dn), c = parseInt(c + ""), a < c && (Ze.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), a = c), a = a === 1 / 0 ? 1 / 0 : parseInt(a + ""), u <= 0 && (Ze.warn("Warning: rowHeight must be greater than 0!"), u = Rn);
390
390
  const l = {
391
391
  ...n
392
392
  };
@@ -439,22 +439,22 @@ function gn(n, e) {
439
439
  width: o
440
440
  };
441
441
  }
442
- function Ur(n, e) {
442
+ function $r(n, e) {
443
443
  let t = 0;
444
444
  return n.forEach((s) => {
445
445
  s.actions.forEach((o) => {
446
446
  t = Math.max(t, o.end);
447
447
  });
448
- }), Math.ceil(t / e.scale) + Qn;
448
+ }), Math.ceil(t / e.scale) + er;
449
449
  }
450
- function $r(n, e) {
450
+ function Hr(n, e) {
451
451
  const {
452
452
  startLeft: t,
453
453
  scaleWidth: r
454
454
  } = e, s = Math.ceil((n - t) / r);
455
- return Math.max(s + Qn, e.scaleCount);
455
+ return Math.max(s + er, e.scaleCount);
456
456
  }
457
- function Hr(n, e) {
457
+ function Br(n, e) {
458
458
  const t = [];
459
459
  return n.forEach((r) => {
460
460
  t.push(je(r.start, e)), t.push(je(r.end, e));
@@ -462,7 +462,7 @@ function Hr(n, e) {
462
462
  }
463
463
  var jt = { exports: {} }, sn = {};
464
464
  var Cn;
465
- function Br() {
465
+ function Yr() {
466
466
  if (Cn) return sn;
467
467
  Cn = 1;
468
468
  var n = nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
@@ -472,7 +472,7 @@ function Br() {
472
472
  }
473
473
  var on = {};
474
474
  var Tn;
475
- function Yr() {
475
+ function Xr() {
476
476
  return Tn || (Tn = 1, process.env.NODE_ENV !== "production" && (function() {
477
477
  var n = nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
478
478
  on.c = function(e) {
@@ -488,11 +488,11 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
488
488
  })()), on;
489
489
  }
490
490
  var An;
491
- function Xr() {
492
- return An || (An = 1, process.env.NODE_ENV === "production" ? jt.exports = Br() : jt.exports = Yr()), jt.exports;
491
+ function Gr() {
492
+ return An || (An = 1, process.env.NODE_ENV === "production" ? jt.exports = Yr() : jt.exports = Xr()), jt.exports;
493
493
  }
494
- var ze = Xr();
495
- function Gr(n) {
494
+ var ze = Gr();
495
+ function Kr(n) {
496
496
  for (var e = [], t = 1; t < arguments.length; t++)
497
497
  e[t - 1] = arguments[t];
498
498
  return e.map(function(r) {
@@ -502,9 +502,9 @@ function Gr(n) {
502
502
  }).join(" ");
503
503
  }
504
504
  function de(...n) {
505
- return Gr(`${ln}-`, ...n);
505
+ return Kr(`${ln}-`, ...n);
506
506
  }
507
- const Kr = (n) => {
507
+ const qr = (n) => {
508
508
  const e = ze.c(11), {
509
509
  isMoving: t,
510
510
  movePositions: r,
@@ -516,56 +516,56 @@ const Kr = (n) => {
516
516
  let u;
517
517
  e[5] !== s ? (u = s === void 0 ? [] : s, e[5] = s, e[6] = u) : u = e[6];
518
518
  const l = u;
519
- e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = de("drag-line-container"), e[7] = o) : o = e[7], i = t && a.filter((h) => l.includes(h)).map(qr), e[0] = t, e[1] = r, e[2] = s, e[3] = o, e[4] = i;
519
+ e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = de("drag-line-container"), e[7] = o) : o = e[7], i = t && a.filter((h) => l.includes(h)).map(Jr), e[0] = t, e[1] = r, e[2] = s, e[3] = o, e[4] = i;
520
520
  } else
521
521
  o = e[3], i = e[4];
522
522
  let c;
523
523
  return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */ E.jsx("div", { className: o, children: i }), e[8] = o, e[9] = i, e[10] = c) : c = e[10], c;
524
524
  };
525
- function qr(n, e) {
525
+ function Jr(n, e) {
526
526
  return /* @__PURE__ */ E.jsx("div", { className: de("drag-line"), style: {
527
527
  left: n
528
528
  } }, e);
529
529
  }
530
530
  const zt = 1, Pn = 10, Dn = 10;
531
- function Jr(n) {
531
+ function Zr(n) {
532
532
  const e = ze.c(7), t = ie(Number.MIN_SAFE_INTEGER), r = ie(Number.MAX_SAFE_INTEGER), s = ie(zt), o = ie(void 0);
533
533
  let i;
534
534
  e[0] !== n ? (i = () => {
535
535
  if (n?.current) {
536
536
  const {
537
- left: b,
537
+ left: v,
538
538
  width: g
539
539
  } = n.current.getBoundingClientRect();
540
- t.current = b, r.current = b + g;
540
+ t.current = v, r.current = v + g;
541
541
  }
542
542
  }, e[0] = n, e[1] = i) : i = e[1];
543
543
  const c = i;
544
544
  let a;
545
- e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (b, g) => {
546
- if (b.clientX >= r.current || b.clientX <= t.current) {
545
+ e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (v, g) => {
546
+ if (v.clientX >= r.current || v.clientX <= t.current) {
547
547
  o.current !== void 0 && cancelAnimationFrame(o.current);
548
- const v = Math.abs(b.clientX >= r.current ? b.clientX - r.current : b.clientX - t.current);
549
- s.current = Math.min(Number((v / Dn).toFixed(0)) * zt, Pn);
550
- const y = (b.clientX >= r.current ? 1 : -1) * s.current, S = () => {
551
- g && g(y), o.current = requestAnimationFrame(S);
548
+ const S = Math.abs(v.clientX >= r.current ? v.clientX - r.current : v.clientX - t.current);
549
+ s.current = Math.min(Number((S / Dn).toFixed(0)) * zt, Pn);
550
+ const w = (v.clientX >= r.current ? 1 : -1) * s.current, y = () => {
551
+ g && g(w), o.current = requestAnimationFrame(y);
552
552
  };
553
- return o.current = requestAnimationFrame(S), !1;
553
+ return o.current = requestAnimationFrame(y), !1;
554
554
  } else
555
555
  o.current !== void 0 && cancelAnimationFrame(o.current);
556
556
  return !0;
557
557
  }, e[2] = a) : a = e[2];
558
558
  const u = a;
559
559
  let l;
560
- e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (b, g, v) => {
561
- if (b.clientX >= r.current || b.clientX < t.current) {
560
+ e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (v, g, S) => {
561
+ if (v.clientX >= r.current || v.clientX < t.current) {
562
562
  o.current !== void 0 && cancelAnimationFrame(o.current);
563
- const w = Math.abs(b.clientX >= r.current ? b.clientX - r.current : b.clientX - t.current);
564
- s.current = Math.min(Number((w / Dn).toFixed(0)) * zt, Pn);
565
- const S = (b.clientX >= r.current ? 1 : -1) * s.current, R = () => {
566
- v && v(S), o.current = requestAnimationFrame(R);
563
+ const _ = Math.abs(v.clientX >= r.current ? v.clientX - r.current : v.clientX - t.current);
564
+ s.current = Math.min(Number((_ / Dn).toFixed(0)) * zt, Pn);
565
+ const y = (v.clientX >= r.current ? 1 : -1) * s.current, C = () => {
566
+ S && S(y), o.current = requestAnimationFrame(C);
567
567
  };
568
- return o.current = requestAnimationFrame(R), !1;
568
+ return o.current = requestAnimationFrame(C), !1;
569
569
  } else
570
570
  o.current !== void 0 && cancelAnimationFrame(o.current);
571
571
  return !0;
@@ -576,15 +576,15 @@ function Jr(n) {
576
576
  t.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current = zt, o.current !== void 0 && cancelAnimationFrame(o.current);
577
577
  }, e[4] = f) : f = e[4];
578
578
  const m = f;
579
- let _;
580
- return e[5] !== c ? (_ = {
579
+ let b;
580
+ return e[5] !== c ? (b = {
581
581
  initAutoScroll: c,
582
582
  dealDragAutoScroll: u,
583
583
  dealResizeAutoScroll: h,
584
584
  stopAutoScroll: m
585
- }, e[5] = c, e[6] = _) : _ = e[6], _;
585
+ }, e[5] = c, e[6] = b) : b = e[6], b;
586
586
  }
587
- function Zr(n, e, t) {
587
+ function Qr(n, e, t) {
588
588
  return Math.max(e, Math.min(n, t));
589
589
  }
590
590
  const he = {
@@ -608,13 +608,13 @@ function Ln(n, e, t) {
608
608
  return e === 0 || Math.abs(e) === 1 / 0 ? Math.pow(n, t * 5) : n * e * t / (e + t * n);
609
609
  }
610
610
  function On(n, e, t, r = 0.15) {
611
- return r === 0 ? Zr(n, e, t) : n < e ? -Ln(e - n, t - e, r) + e : n > t ? +Ln(n - t, t - e, r) + t : n;
611
+ return r === 0 ? Qr(n, e, t) : n < e ? -Ln(e - n, t - e, r) + e : n > t ? +Ln(n - t, t - e, r) + t : n;
612
612
  }
613
- function Qr(n, [e, t], [r, s]) {
613
+ function es(n, [e, t], [r, s]) {
614
614
  const [[o, i], [c, a]] = n;
615
615
  return [On(e, o, i, r), On(t, c, a, s)];
616
616
  }
617
- function es(n, e) {
617
+ function ts(n, e) {
618
618
  if (typeof n != "object" || n === null) return n;
619
619
  var t = n[Symbol.toPrimitive];
620
620
  if (t !== void 0) {
@@ -624,12 +624,12 @@ function es(n, e) {
624
624
  }
625
625
  return (e === "string" ? String : Number)(n);
626
626
  }
627
- function ts(n) {
628
- var e = es(n, "string");
627
+ function ns(n) {
628
+ var e = ts(n, "string");
629
629
  return typeof e == "symbol" ? e : String(e);
630
630
  }
631
631
  function ve(n, e, t) {
632
- return e = ts(e), e in n ? Object.defineProperty(n, e, {
632
+ return e = ns(e), e in n ? Object.defineProperty(n, e, {
633
633
  value: t,
634
634
  enumerable: !0,
635
635
  configurable: !0,
@@ -657,7 +657,7 @@ function ee(n) {
657
657
  }
658
658
  return n;
659
659
  }
660
- const nr = {
660
+ const rr = {
661
661
  pointer: {
662
662
  start: "down",
663
663
  change: "move",
@@ -682,60 +682,60 @@ const nr = {
682
682
  function Nn(n) {
683
683
  return n ? n[0].toUpperCase() + n.slice(1) : "";
684
684
  }
685
- const ns = ["enter", "leave"];
686
- function rs(n = !1, e) {
687
- return n && !ns.includes(e);
685
+ const rs = ["enter", "leave"];
686
+ function ss(n = !1, e) {
687
+ return n && !rs.includes(e);
688
688
  }
689
- function ss(n, e = "", t = !1) {
690
- const r = nr[n], s = r && r[e] || e;
691
- return "on" + Nn(n) + Nn(s) + (rs(t, s) ? "Capture" : "");
689
+ function os(n, e = "", t = !1) {
690
+ const r = rr[n], s = r && r[e] || e;
691
+ return "on" + Nn(n) + Nn(s) + (ss(t, s) ? "Capture" : "");
692
692
  }
693
- const os = ["gotpointercapture", "lostpointercapture"];
694
- function is(n) {
693
+ const is = ["gotpointercapture", "lostpointercapture"];
694
+ function cs(n) {
695
695
  let e = n.substring(2).toLowerCase();
696
696
  const t = !!~e.indexOf("passive");
697
697
  t && (e = e.replace("passive", ""));
698
- const r = os.includes(e) ? "capturecapture" : "capture", s = !!~e.indexOf(r);
698
+ const r = is.includes(e) ? "capturecapture" : "capture", s = !!~e.indexOf(r);
699
699
  return s && (e = e.replace("capture", "")), {
700
700
  device: e,
701
701
  capture: s,
702
702
  passive: t
703
703
  };
704
704
  }
705
- function cs(n, e = "") {
706
- const t = nr[n], r = t && t[e] || e;
705
+ function as(n, e = "") {
706
+ const t = rr[n], r = t && t[e] || e;
707
707
  return n + r;
708
708
  }
709
709
  function Zt(n) {
710
710
  return "touches" in n;
711
711
  }
712
- function rr(n) {
712
+ function sr(n) {
713
713
  return Zt(n) ? "touch" : "pointerType" in n ? n.pointerType : "mouse";
714
714
  }
715
- function as(n) {
715
+ function ls(n) {
716
716
  return Array.from(n.touches).filter((e) => {
717
717
  var t, r;
718
718
  return e.target === n.currentTarget || ((t = n.currentTarget) === null || t === void 0 || (r = t.contains) === null || r === void 0 ? void 0 : r.call(t, e.target));
719
719
  });
720
720
  }
721
- function ls(n) {
721
+ function us(n) {
722
722
  return n.type === "touchend" || n.type === "touchcancel" ? n.changedTouches : n.targetTouches;
723
723
  }
724
- function sr(n) {
725
- return Zt(n) ? ls(n)[0] : n;
724
+ function or(n) {
725
+ return Zt(n) ? us(n)[0] : n;
726
726
  }
727
- function us(n) {
728
- return as(n).map((e) => e.identifier);
727
+ function fs(n) {
728
+ return ls(n).map((e) => e.identifier);
729
729
  }
730
730
  function cn(n) {
731
- const e = sr(n);
731
+ const e = or(n);
732
732
  return Zt(n) ? e.identifier : e.pointerId;
733
733
  }
734
734
  function In(n) {
735
- const e = sr(n);
735
+ const e = or(n);
736
736
  return [e.clientX, e.clientY];
737
737
  }
738
- function fs(n) {
738
+ function ds(n) {
739
739
  const e = {};
740
740
  if ("buttons" in n && (e.buttons = n.buttons), "shiftKey" in n) {
741
741
  const {
@@ -756,10 +756,10 @@ function fs(n) {
756
756
  function Gt(n, ...e) {
757
757
  return typeof n == "function" ? n(...e) : n;
758
758
  }
759
- function ds() {
759
+ function hs() {
760
760
  }
761
- function hs(...n) {
762
- return n.length === 0 ? ds : n.length === 1 ? n[0] : function() {
761
+ function ms(...n) {
762
+ return n.length === 0 ? hs : n.length === 1 ? n[0] : function() {
763
763
  let e;
764
764
  for (const t of n)
765
765
  e = t.apply(this, arguments) || e;
@@ -769,8 +769,8 @@ function hs(...n) {
769
769
  function kn(n, e) {
770
770
  return Object.assign({}, e, n || {});
771
771
  }
772
- const ms = 32;
773
- class ps {
772
+ const ps = 32;
773
+ class gs {
774
774
  constructor(e, t, r) {
775
775
  this.ctrl = e, this.args = t, this.key = r, this.state || (this.state = {}, this.computeValues([0, 0]), this.computeInitial(), this.init && this.init(), this.reset());
776
776
  }
@@ -827,9 +827,9 @@ class ps {
827
827
  } = this;
828
828
  t.args = this.args;
829
829
  let o = 0;
830
- if (e && (t.event = e, r.preventDefault && e.cancelable && t.event.preventDefault(), t.type = e.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s, fs(e)), s.down = s.pressed = s.buttons % 2 === 1 || s.touches > 0, o = e.timeStamp - t.timeStamp, t.timeStamp = e.timeStamp, t.elapsedTime = t.timeStamp - t.startTime), t._active) {
831
- const C = t._delta.map(Math.abs);
832
- he.addTo(t._distance, C);
830
+ if (e && (t.event = e, r.preventDefault && e.cancelable && t.event.preventDefault(), t.type = e.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s, ds(e)), s.down = s.pressed = s.buttons % 2 === 1 || s.touches > 0, o = e.timeStamp - t.timeStamp, t.timeStamp = e.timeStamp, t.elapsedTime = t.timeStamp - t.startTime), t._active) {
831
+ const x = t._delta.map(Math.abs);
832
+ he.addTo(t._distance, x);
833
833
  }
834
834
  this.axisIntent && this.axisIntent(e);
835
835
  const [i, c] = t._movement, [a, u] = r.threshold, {
@@ -839,20 +839,20 @@ class ps {
839
839
  if (r.hasCustomTransform ? (l[0] === !1 && (l[0] = Math.abs(i) >= a && h[0]), l[1] === !1 && (l[1] = Math.abs(c) >= u && h[1])) : (l[0] === !1 && (l[0] = Math.abs(i) >= a && Math.sign(i) * a), l[1] === !1 && (l[1] = Math.abs(c) >= u && Math.sign(c) * u)), t.intentional = l[0] !== !1 || l[1] !== !1, !t.intentional) return;
840
840
  const f = [0, 0];
841
841
  if (r.hasCustomTransform) {
842
- const [C, x] = h;
843
- f[0] = l[0] !== !1 ? C - l[0] : 0, f[1] = l[1] !== !1 ? x - l[1] : 0;
842
+ const [x, R] = h;
843
+ f[0] = l[0] !== !1 ? x - l[0] : 0, f[1] = l[1] !== !1 ? R - l[1] : 0;
844
844
  } else
845
845
  f[0] = l[0] !== !1 ? i - l[0] : 0, f[1] = l[1] !== !1 ? c - l[1] : 0;
846
846
  this.restrictToAxis && !t._blocked && this.restrictToAxis(f);
847
- const m = t.offset, _ = t._active && !t._blocked || t.active;
848
- _ && (t.first = t._active && !t.active, t.last = !t._active && t.active, t.active = s[this.ingKey] = t._active, e && (t.first && ("bounds" in r && (t._bounds = Gt(r.bounds, t)), this.setup && this.setup()), t.movement = f, this.computeOffset()));
849
- const [b, g] = t.offset, [[v, w], [y, S]] = t._bounds;
850
- t.overflow = [b < v ? -1 : b > w ? 1 : 0, g < y ? -1 : g > S ? 1 : 0], t._movementBound[0] = t.overflow[0] ? t._movementBound[0] === !1 ? t._movement[0] : t._movementBound[0] : !1, t._movementBound[1] = t.overflow[1] ? t._movementBound[1] === !1 ? t._movement[1] : t._movementBound[1] : !1;
851
- const R = t._active ? r.rubberband || [0, 0] : [0, 0];
852
- if (t.offset = Qr(t._bounds, t.offset, R), t.delta = he.sub(t.offset, m), this.computeMovement(), _ && (!t.last || o > ms)) {
847
+ const m = t.offset, b = t._active && !t._blocked || t.active;
848
+ b && (t.first = t._active && !t.active, t.last = !t._active && t.active, t.active = s[this.ingKey] = t._active, e && (t.first && ("bounds" in r && (t._bounds = Gt(r.bounds, t)), this.setup && this.setup()), t.movement = f, this.computeOffset()));
849
+ const [v, g] = t.offset, [[S, _], [w, y]] = t._bounds;
850
+ t.overflow = [v < S ? -1 : v > _ ? 1 : 0, g < w ? -1 : g > y ? 1 : 0], t._movementBound[0] = t.overflow[0] ? t._movementBound[0] === !1 ? t._movement[0] : t._movementBound[0] : !1, t._movementBound[1] = t.overflow[1] ? t._movementBound[1] === !1 ? t._movement[1] : t._movementBound[1] : !1;
851
+ const C = t._active ? r.rubberband || [0, 0] : [0, 0];
852
+ if (t.offset = es(t._bounds, t.offset, C), t.delta = he.sub(t.offset, m), this.computeMovement(), b && (!t.last || o > ps)) {
853
853
  t.delta = he.sub(t.offset, m);
854
- const C = t.delta.map(Math.abs);
855
- he.addTo(t.distance, C), t.direction = t.delta.map(Math.sign), t._direction = t._delta.map(Math.sign), !t.first && o > 0 && (t.velocity = [C[0] / o, C[1] / o], t.timeDelta = o);
854
+ const x = t.delta.map(Math.abs);
855
+ he.addTo(t.distance, x), t.direction = t.delta.map(Math.sign), t._direction = t._delta.map(Math.sign), !t.first && o > 0 && (t.velocity = [x[0] / o, x[1] / o], t.timeDelta = o);
856
856
  }
857
857
  }
858
858
  emit() {
@@ -867,14 +867,14 @@ class ps {
867
867
  this.eventStore.clean(), this.timeoutStore.clean();
868
868
  }
869
869
  }
870
- function gs([n, e], t) {
870
+ function vs([n, e], t) {
871
871
  const r = Math.abs(n), s = Math.abs(e);
872
872
  if (r > s && r > t)
873
873
  return "x";
874
874
  if (s > r && s > t)
875
875
  return "y";
876
876
  }
877
- class vs extends ps {
877
+ class bs extends gs {
878
878
  constructor(...e) {
879
879
  super(...e), ve(this, "aliasKey", "xy");
880
880
  }
@@ -893,8 +893,8 @@ class vs extends ps {
893
893
  axisIntent(e) {
894
894
  const t = this.state, r = this.config;
895
895
  if (!t.axis && e) {
896
- const s = typeof r.axisThreshold == "object" ? r.axisThreshold[rr(e)] : r.axisThreshold;
897
- t.axis = gs(t._movement, s);
896
+ const s = typeof r.axisThreshold == "object" ? r.axisThreshold[sr(e)] : r.axisThreshold;
897
+ t.axis = vs(t._movement, s);
898
898
  }
899
899
  t._blocked = (r.lockDirection || !!r.axis) && !t.axis || !!r.axis && r.axis !== t.axis;
900
900
  }
@@ -969,13 +969,13 @@ process.env.NODE_ENV === "development" && Object.assign(vn, {
969
969
  return NaN;
970
970
  }
971
971
  });
972
- const bs = 0, Ot = ee(ee({}, vn), {}, {
972
+ const _s = 0, Ot = ee(ee({}, vn), {}, {
973
973
  axis(n, e, {
974
974
  axis: t
975
975
  }) {
976
976
  if (this.lockDirection = t === "lock", !this.lockDirection) return t;
977
977
  },
978
- axisThreshold(n = bs) {
978
+ axisThreshold(n = _s) {
979
979
  return n;
980
980
  },
981
981
  bounds(n = {}) {
@@ -999,7 +999,7 @@ const bs = 0, Ot = ee(ee({}, vn), {}, {
999
999
  ArrowUp: (n, e = 1) => [0, -1 * n * e],
1000
1000
  ArrowDown: (n, e = 1) => [0, n * e]
1001
1001
  };
1002
- class _s extends vs {
1002
+ class ws extends bs {
1003
1003
  constructor(...e) {
1004
1004
  super(...e), ve(this, "ingKey", "dragging");
1005
1005
  }
@@ -1036,7 +1036,7 @@ class _s extends vs {
1036
1036
  const t = this.config, r = this.state;
1037
1037
  if (e.buttons != null && (Array.isArray(t.pointerButtons) ? !t.pointerButtons.includes(e.buttons) : t.pointerButtons !== -1 && t.pointerButtons !== e.buttons)) return;
1038
1038
  const s = this.ctrl.setEventIds(e);
1039
- t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId = cn(e), r._pointerActive = !0, this.computeValues(In(e)), this.computeInitial(), t.preventScrollAxis && rr(e) !== "mouse" ? (r._active = !1, this.setupScrollPrevention(e)) : t.delay > 0 ? (this.setupDelayTrigger(e), t.triggerAllEvents && (this.compute(e), this.emit())) : this.startPointerDrag(e));
1039
+ t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId = cn(e), r._pointerActive = !0, this.computeValues(In(e)), this.computeInitial(), t.preventScrollAxis && sr(e) !== "mouse" ? (r._active = !1, this.setupScrollPrevention(e)) : t.delay > 0 ? (this.setupDelayTrigger(e), t.triggerAllEvents && (this.compute(e), this.emit())) : this.startPointerDrag(e));
1040
1040
  }
1041
1041
  startPointerDrag(e) {
1042
1042
  const t = this.state;
@@ -1081,10 +1081,10 @@ class _s extends vs {
1081
1081
  if (t.tap = o <= r.tapsThreshold && i <= r.tapsThreshold, t.tap && r.filterTaps)
1082
1082
  t._force = !0;
1083
1083
  else {
1084
- const [c, a] = t._delta, [u, l] = t._movement, [h, f] = r.swipe.velocity, [m, _] = r.swipe.distance, b = r.swipe.duration;
1085
- if (t.elapsedTime < b) {
1086
- const g = Math.abs(c / t.timeDelta), v = Math.abs(a / t.timeDelta);
1087
- g > h && Math.abs(u) > m && (t.swipe[0] = Math.sign(c)), v > f && Math.abs(l) > _ && (t.swipe[1] = Math.sign(a));
1084
+ const [c, a] = t._delta, [u, l] = t._movement, [h, f] = r.swipe.velocity, [m, b] = r.swipe.distance, v = r.swipe.duration;
1085
+ if (t.elapsedTime < v) {
1086
+ const g = Math.abs(c / t.timeDelta), S = Math.abs(a / t.timeDelta);
1087
+ g > h && Math.abs(u) > m && (t.swipe[0] = Math.sign(c)), S > f && Math.abs(l) > b && (t.swipe[1] = Math.sign(a));
1088
1088
  }
1089
1089
  }
1090
1090
  this.emit();
@@ -1111,7 +1111,7 @@ class _s extends vs {
1111
1111
  this.state._preventScroll && e.cancelable && e.preventDefault();
1112
1112
  }
1113
1113
  setupScrollPrevention(e) {
1114
- this.state._preventScroll = !1, ws(e);
1114
+ this.state._preventScroll = !1, Ss(e);
1115
1115
  const t = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
1116
1116
  passive: !1
1117
1117
  });
@@ -1140,20 +1140,20 @@ class _s extends vs {
1140
1140
  });
1141
1141
  }
1142
1142
  }
1143
- function ws(n) {
1143
+ function Ss(n) {
1144
1144
  "persist" in n && typeof n.persist == "function" && n.persist();
1145
1145
  }
1146
1146
  const Mt = typeof window < "u" && window.document && window.document.createElement;
1147
- function or() {
1147
+ function ir() {
1148
1148
  return Mt && "ontouchstart" in window;
1149
1149
  }
1150
- function Ss() {
1151
- return or() || Mt && window.navigator.maxTouchPoints > 1;
1152
- }
1153
1150
  function ys() {
1154
- return Mt && "onpointerdown" in window;
1151
+ return ir() || Mt && window.navigator.maxTouchPoints > 1;
1155
1152
  }
1156
1153
  function Es() {
1154
+ return Mt && "onpointerdown" in window;
1155
+ }
1156
+ function Rs() {
1157
1157
  return Mt && "exitPointerLock" in window.document;
1158
1158
  }
1159
1159
  function xs() {
@@ -1166,15 +1166,15 @@ function xs() {
1166
1166
  const we = {
1167
1167
  isBrowser: Mt,
1168
1168
  gesture: xs(),
1169
- touch: or(),
1170
- touchscreen: Ss(),
1171
- pointer: ys(),
1172
- pointerLock: Es()
1173
- }, Rs = 250, Cs = 180, Ts = 0.5, As = 50, Ps = 250, Ds = 10, Fn = {
1169
+ touch: ir(),
1170
+ touchscreen: ys(),
1171
+ pointer: Es(),
1172
+ pointerLock: Rs()
1173
+ }, Cs = 250, Ts = 180, As = 0.5, Ps = 50, Ds = 250, Ls = 10, Fn = {
1174
1174
  mouse: 0,
1175
1175
  touch: 0,
1176
1176
  pen: 8
1177
- }, ir = ee(ee({}, Ot), {}, {
1177
+ }, cr = ee(ee({}, Ot), {}, {
1178
1178
  device(n, e, {
1179
1179
  pointer: {
1180
1180
  touch: t = !1,
@@ -1187,7 +1187,7 @@ const we = {
1187
1187
  preventScrollAxis(n, e, {
1188
1188
  preventScroll: t
1189
1189
  }) {
1190
- if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ? Rs : void 0, !(!we.touchscreen || t === !1))
1190
+ if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ? Cs : void 0, !(!we.touchscreen || t === !1))
1191
1191
  return n || (t !== void 0 ? "y" : void 0);
1192
1192
  },
1193
1193
  pointerCapture(n, e, {
@@ -1208,9 +1208,9 @@ const we = {
1208
1208
  return this.filterTaps = t, this.tapsThreshold = r, o;
1209
1209
  },
1210
1210
  swipe({
1211
- velocity: n = Ts,
1212
- distance: e = As,
1213
- duration: t = Ps
1211
+ velocity: n = As,
1212
+ distance: e = Ps,
1213
+ duration: t = Ds
1214
1214
  } = {}) {
1215
1215
  return {
1216
1216
  velocity: this.transform(he.toVector(n)),
@@ -1221,7 +1221,7 @@ const we = {
1221
1221
  delay(n = 0) {
1222
1222
  switch (n) {
1223
1223
  case !0:
1224
- return Cs;
1224
+ return Ts;
1225
1225
  case !1:
1226
1226
  return 0;
1227
1227
  default:
@@ -1231,11 +1231,11 @@ const we = {
1231
1231
  axisThreshold(n) {
1232
1232
  return n ? ee(ee({}, Fn), n) : Fn;
1233
1233
  },
1234
- keyboardDisplacement(n = Ds) {
1234
+ keyboardDisplacement(n = Ls) {
1235
1235
  return n;
1236
1236
  }
1237
1237
  });
1238
- process.env.NODE_ENV === "development" && Object.assign(ir, {
1238
+ process.env.NODE_ENV === "development" && Object.assign(cr, {
1239
1239
  useTouch(n) {
1240
1240
  if (n !== void 0)
1241
1241
  throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");
@@ -1311,25 +1311,25 @@ ee(ee({}, Ot), {}, {
1311
1311
  ee(ee({}, Ot), {}, {
1312
1312
  mouseOnly: (n = !0) => n
1313
1313
  });
1314
- const cr = /* @__PURE__ */ new Map(), hn = /* @__PURE__ */ new Map();
1315
- function Ls(n) {
1316
- cr.set(n.key, n.engine), hn.set(n.key, n.resolver);
1314
+ const ar = /* @__PURE__ */ new Map(), hn = /* @__PURE__ */ new Map();
1315
+ function Os(n) {
1316
+ ar.set(n.key, n.engine), hn.set(n.key, n.resolver);
1317
1317
  }
1318
- const Os = {
1318
+ const Ms = {
1319
1319
  key: "drag",
1320
- engine: _s,
1321
- resolver: ir
1320
+ engine: ws,
1321
+ resolver: cr
1322
1322
  };
1323
- function Ms(n, e) {
1323
+ function Ns(n, e) {
1324
1324
  if (n == null) return {};
1325
1325
  var t = {}, r = Object.keys(n), s, o;
1326
1326
  for (o = 0; o < r.length; o++)
1327
1327
  s = r[o], !(e.indexOf(s) >= 0) && (t[s] = n[s]);
1328
1328
  return t;
1329
1329
  }
1330
- function Ns(n, e) {
1330
+ function Is(n, e) {
1331
1331
  if (n == null) return {};
1332
- var t = Ms(n, e), r, s;
1332
+ var t = Ns(n, e), r, s;
1333
1333
  if (Object.getOwnPropertySymbols) {
1334
1334
  var o = Object.getOwnPropertySymbols(n);
1335
1335
  for (s = 0; s < o.length; s++)
@@ -1337,7 +1337,7 @@ function Ns(n, e) {
1337
1337
  }
1338
1338
  return t;
1339
1339
  }
1340
- const Is = {
1340
+ const ks = {
1341
1341
  target(n) {
1342
1342
  if (n)
1343
1343
  return () => "current" in n ? n.current : n;
@@ -1360,7 +1360,7 @@ const Is = {
1360
1360
  transform(n) {
1361
1361
  return n;
1362
1362
  }
1363
- }, ks = ["target", "eventOptions", "window", "enabled", "transform"];
1363
+ }, Ws = ["target", "eventOptions", "window", "enabled", "transform"];
1364
1364
  function Ut(n = {}, e) {
1365
1365
  const t = {};
1366
1366
  for (const [r, s] of Object.entries(e))
@@ -1381,21 +1381,21 @@ function Ut(n = {}, e) {
1381
1381
  }
1382
1382
  return t;
1383
1383
  }
1384
- function Ws(n, e, t = {}) {
1384
+ function js(n, e, t = {}) {
1385
1385
  const r = n, {
1386
1386
  target: s,
1387
1387
  eventOptions: o,
1388
1388
  window: i,
1389
1389
  enabled: c,
1390
1390
  transform: a
1391
- } = r, u = Ns(r, ks);
1391
+ } = r, u = Is(r, Ws);
1392
1392
  if (t.shared = Ut({
1393
1393
  target: s,
1394
1394
  eventOptions: o,
1395
1395
  window: i,
1396
1396
  enabled: c,
1397
1397
  transform: a
1398
- }, Is), e) {
1398
+ }, ks), e) {
1399
1399
  const l = hn.get(e);
1400
1400
  t[e] = Ut(ee({
1401
1401
  shared: t.shared
@@ -1415,12 +1415,12 @@ function Ws(n, e, t = {}) {
1415
1415
  }
1416
1416
  return t;
1417
1417
  }
1418
- class ar {
1418
+ class lr {
1419
1419
  constructor(e, t) {
1420
1420
  ve(this, "_listeners", /* @__PURE__ */ new Set()), this._ctrl = e, this._gestureKey = t;
1421
1421
  }
1422
1422
  add(e, t, r, s, o) {
1423
- const i = this._listeners, c = cs(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = ee(ee({}, a), o);
1423
+ const i = this._listeners, c = as(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = ee(ee({}, a), o);
1424
1424
  e.addEventListener(c, s, u);
1425
1425
  const l = () => {
1426
1426
  e.removeEventListener(c, s, u), i.delete(l);
@@ -1431,7 +1431,7 @@ class ar {
1431
1431
  this._listeners.forEach((e) => e()), this._listeners.clear();
1432
1432
  }
1433
1433
  }
1434
- class js {
1434
+ class zs {
1435
1435
  constructor() {
1436
1436
  ve(this, "_timeouts", /* @__PURE__ */ new Map());
1437
1437
  }
@@ -1446,20 +1446,20 @@ class js {
1446
1446
  this._timeouts.forEach((e) => void window.clearTimeout(e)), this._timeouts.clear();
1447
1447
  }
1448
1448
  }
1449
- class zs {
1449
+ class Fs {
1450
1450
  constructor(e) {
1451
- ve(this, "gestures", /* @__PURE__ */ new Set()), ve(this, "_targetEventStore", new ar(this)), ve(this, "gestureEventStores", {}), ve(this, "gestureTimeoutStores", {}), ve(this, "handlers", {}), ve(this, "config", {}), ve(this, "pointerIds", /* @__PURE__ */ new Set()), ve(this, "touchIds", /* @__PURE__ */ new Set()), ve(this, "state", {
1451
+ ve(this, "gestures", /* @__PURE__ */ new Set()), ve(this, "_targetEventStore", new lr(this)), ve(this, "gestureEventStores", {}), ve(this, "gestureTimeoutStores", {}), ve(this, "handlers", {}), ve(this, "config", {}), ve(this, "pointerIds", /* @__PURE__ */ new Set()), ve(this, "touchIds", /* @__PURE__ */ new Set()), ve(this, "state", {
1452
1452
  shared: {
1453
1453
  shiftKey: !1,
1454
1454
  metaKey: !1,
1455
1455
  ctrlKey: !1,
1456
1456
  altKey: !1
1457
1457
  }
1458
- }), Fs(this, e);
1458
+ }), Vs(this, e);
1459
1459
  }
1460
1460
  setEventIds(e) {
1461
1461
  if (Zt(e))
1462
- return this.touchIds = new Set(us(e)), this.touchIds;
1462
+ return this.touchIds = new Set(fs(e)), this.touchIds;
1463
1463
  if ("pointerId" in e)
1464
1464
  return e.type === "pointerup" || e.type === "pointercancel" ? this.pointerIds.delete(e.pointerId) : e.type === "pointerdown" && this.pointerIds.add(e.pointerId), this.pointerIds;
1465
1465
  }
@@ -1467,7 +1467,7 @@ class zs {
1467
1467
  this.handlers = e, this.nativeHandlers = t;
1468
1468
  }
1469
1469
  applyConfig(e, t) {
1470
- this.config = Ws(e, t, this.config);
1470
+ this.config = js(e, t, this.config);
1471
1471
  }
1472
1472
  clean() {
1473
1473
  this._targetEventStore.clean();
@@ -1485,7 +1485,7 @@ class zs {
1485
1485
  for (const i of this.gestures) {
1486
1486
  const c = this.config[i], a = Vn(r, c.eventOptions, !!s);
1487
1487
  if (c.enabled) {
1488
- const u = cr.get(i);
1488
+ const u = ar.get(i);
1489
1489
  new u(this, e, i).bind(a);
1490
1490
  }
1491
1491
  }
@@ -1497,14 +1497,14 @@ class zs {
1497
1497
  })), void 0, !0);
1498
1498
  }
1499
1499
  for (const o in r)
1500
- r[o] = hs(...r[o]);
1500
+ r[o] = ms(...r[o]);
1501
1501
  if (!s) return r;
1502
1502
  for (const o in r) {
1503
1503
  const {
1504
1504
  device: i,
1505
1505
  capture: c,
1506
1506
  passive: a
1507
- } = is(o);
1507
+ } = cs(o);
1508
1508
  this._targetEventStore.add(s, i, "", r[o], {
1509
1509
  capture: c,
1510
1510
  passive: a
@@ -1513,19 +1513,19 @@ class zs {
1513
1513
  }
1514
1514
  }
1515
1515
  }
1516
- function xt(n, e) {
1517
- n.gestures.add(e), n.gestureEventStores[e] = new ar(n, e), n.gestureTimeoutStores[e] = new js();
1516
+ function Rt(n, e) {
1517
+ n.gestures.add(e), n.gestureEventStores[e] = new lr(n, e), n.gestureTimeoutStores[e] = new zs();
1518
1518
  }
1519
- function Fs(n, e) {
1520
- e.drag && xt(n, "drag"), e.wheel && xt(n, "wheel"), e.scroll && xt(n, "scroll"), e.move && xt(n, "move"), e.pinch && xt(n, "pinch"), e.hover && xt(n, "hover");
1519
+ function Vs(n, e) {
1520
+ e.drag && Rt(n, "drag"), e.wheel && Rt(n, "wheel"), e.scroll && Rt(n, "scroll"), e.move && Rt(n, "move"), e.pinch && Rt(n, "pinch"), e.hover && Rt(n, "hover");
1521
1521
  }
1522
1522
  const Vn = (n, e, t) => (r, s, o, i = {}, c = !1) => {
1523
1523
  var a, u;
1524
1524
  const l = (a = i.capture) !== null && a !== void 0 ? a : e.capture, h = (u = i.passive) !== null && u !== void 0 ? u : e.passive;
1525
- let f = c ? r : ss(r, s, l);
1525
+ let f = c ? r : os(r, s, l);
1526
1526
  t && h && (f += "Passive"), n[f] = n[f] || [], n[f].push(o);
1527
1527
  };
1528
- function Vs(n, e) {
1528
+ function Us(n, e) {
1529
1529
  if (typeof n != "object" || n === null) return n;
1530
1530
  var t = n[Symbol.toPrimitive];
1531
1531
  if (t !== void 0) {
@@ -1535,12 +1535,12 @@ function Vs(n, e) {
1535
1535
  }
1536
1536
  return (e === "string" ? String : Number)(n);
1537
1537
  }
1538
- function Us(n) {
1539
- var e = Vs(n, "string");
1538
+ function $s(n) {
1539
+ var e = Us(n, "string");
1540
1540
  return typeof e == "symbol" ? e : String(e);
1541
1541
  }
1542
- function $s(n, e, t) {
1543
- return e = Us(e), e in n ? Object.defineProperty(n, e, {
1542
+ function Hs(n, e, t) {
1543
+ return e = $s(e), e in n ? Object.defineProperty(n, e, {
1544
1544
  value: t,
1545
1545
  enumerable: !0,
1546
1546
  configurable: !0,
@@ -1561,16 +1561,16 @@ function Ft(n) {
1561
1561
  for (var e = 1; e < arguments.length; e++) {
1562
1562
  var t = arguments[e] != null ? arguments[e] : {};
1563
1563
  e % 2 ? Un(Object(t), !0).forEach(function(r) {
1564
- $s(n, r, t[r]);
1564
+ Hs(n, r, t[r]);
1565
1565
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Un(Object(t)).forEach(function(r) {
1566
1566
  Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
1567
1567
  });
1568
1568
  }
1569
1569
  return n;
1570
1570
  }
1571
- class Hs {
1571
+ class Bs {
1572
1572
  constructor(e, t, r, s, o) {
1573
- this._target = e, this._gestureKey = s, this._ctrl = new zs(t), this._ctrl.applyHandlers(t, o), this._ctrl.applyConfig(Ft(Ft({}, r), {}, {
1573
+ this._target = e, this._gestureKey = s, this._ctrl = new Fs(t), this._ctrl.applyHandlers(t, o), this._ctrl.applyConfig(Ft(Ft({}, r), {}, {
1574
1574
  target: e
1575
1575
  }), s), this._ctrl.effect();
1576
1576
  }
@@ -1584,22 +1584,22 @@ class Hs {
1584
1584
  }
1585
1585
  }
1586
1586
  const an = function(e, t, r) {
1587
- return Ls(Os), new Hs(e, {
1587
+ return Os(Ms), new Bs(e, {
1588
1588
  drag: t
1589
1589
  }, r || {}, "drag");
1590
1590
  };
1591
- function Bs(...n) {
1591
+ function Ys(...n) {
1592
1592
  const e = n.filter(Boolean);
1593
1593
  return e.length <= 1 ? e[0] || null : function(r) {
1594
1594
  for (const s of e)
1595
1595
  typeof s == "function" ? s(r) : s && (s.current = r);
1596
1596
  };
1597
1597
  }
1598
- const lr = ({
1598
+ const ur = ({
1599
1599
  children: n,
1600
1600
  ...e
1601
1601
  }) => {
1602
- const t = nt.Children.only(n), r = Ys(t), s = t.props || {}, o = s.style || {}, i = {
1602
+ const t = nt.Children.only(n), r = Xs(t), s = t.props || {}, o = s.style || {}, i = {
1603
1603
  ...e,
1604
1604
  ...s,
1605
1605
  // child's own props take precedence
@@ -1607,15 +1607,15 @@ const lr = ({
1607
1607
  ...e.style ?? {},
1608
1608
  ...o
1609
1609
  },
1610
- ref: Bs(r, e.ref)
1610
+ ref: Ys(r, e.ref)
1611
1611
  };
1612
1612
  return nt.cloneElement(t, i);
1613
1613
  };
1614
- function Ys(n) {
1614
+ function Xs(n) {
1615
1615
  let e = Object.getOwnPropertyDescriptor(n, "ref")?.get;
1616
1616
  return e && "isReactWarning" in e && e.isReactWarning ? n.props.ref : n.props.ref || n.ref;
1617
1617
  }
1618
- const Xs = ({
1618
+ const Gs = ({
1619
1619
  children: n,
1620
1620
  interactRef: e,
1621
1621
  draggable: t,
@@ -1627,79 +1627,79 @@ const Xs = ({
1627
1627
  et(() => {
1628
1628
  c.current = s, a.current = o;
1629
1629
  }, [s, o]);
1630
- const _ = Ar(() => {
1631
- i.current && (t && c.current && (u.current = new an(i.current, (b) => {
1630
+ const b = Pr(() => {
1631
+ i.current && (t && c.current && (u.current = new an(i.current, (v) => {
1632
1632
  const {
1633
1633
  active: g,
1634
- delta: v,
1635
- xy: w,
1636
- event: y,
1637
- first: S,
1638
- last: R
1639
- } = b, C = y?.target;
1640
- if (C && (C === f.current || C === m.current || f.current && f.current.contains(C) || m.current && m.current.contains(C)))
1634
+ delta: S,
1635
+ xy: _,
1636
+ event: w,
1637
+ first: y,
1638
+ last: C
1639
+ } = v, x = w?.target;
1640
+ if (x && (x === f.current || x === m.current || f.current && f.current.contains(x) || m.current && m.current.contains(x)))
1641
1641
  return;
1642
- const x = {
1642
+ const R = {
1643
1643
  target: i.current,
1644
- dx: v[0],
1645
- dy: v[1],
1646
- clientX: w[0],
1647
- clientY: w[1]
1644
+ dx: S[0],
1645
+ dy: S[1],
1646
+ clientX: _[0],
1647
+ clientY: _[1]
1648
1648
  };
1649
- S ? c.current?.onstart?.(x) : R ? c.current?.onend?.(x) : g && c.current?.onmove?.(x);
1649
+ y ? c.current?.onstart?.(R) : C ? c.current?.onend?.(R) : g && c.current?.onmove?.(R);
1650
1650
  }, {
1651
1651
  axis: c.current?.lockAxis === "x" ? "x" : void 0,
1652
1652
  threshold: 0,
1653
1653
  pointer: {
1654
1654
  capture: !0
1655
1655
  }
1656
- })), r && a.current?.edges && (a.current.edges.left && (f.current || (f.current = i.current.querySelector(a.current.edges.left)), l.current = new an(f.current, (b) => {
1656
+ })), r && a.current?.edges && (a.current.edges.left && (f.current || (f.current = i.current.querySelector(a.current.edges.left)), l.current = new an(f.current, (v) => {
1657
1657
  const {
1658
1658
  active: g,
1659
- delta: v,
1660
- xy: w,
1661
- first: y,
1662
- last: S
1663
- } = b, R = {
1659
+ delta: S,
1660
+ xy: _,
1661
+ first: w,
1662
+ last: y
1663
+ } = v, C = {
1664
1664
  target: i.current,
1665
- dx: v[0],
1665
+ dx: S[0],
1666
1666
  dy: 0,
1667
- clientX: w[0],
1668
- clientY: w[1],
1667
+ clientX: _[0],
1668
+ clientY: _[1],
1669
1669
  edges: {
1670
1670
  left: !0
1671
1671
  },
1672
1672
  deltaRect: {
1673
- left: v[0]
1673
+ left: S[0]
1674
1674
  }
1675
1675
  };
1676
- S ? a.current?.onend?.(R) : y ? a.current?.onstart?.(R) : g && a.current?.onmove?.(R);
1676
+ y ? a.current?.onend?.(C) : w ? a.current?.onstart?.(C) : g && a.current?.onmove?.(C);
1677
1677
  }, {
1678
1678
  pointer: {
1679
1679
  capture: !0
1680
1680
  },
1681
1681
  threshold: 0
1682
- })), a.current.edges.right && (m.current || (m.current = i.current.querySelector(a.current.edges.right)), h.current = new an(m.current, (b) => {
1682
+ })), a.current.edges.right && (m.current || (m.current = i.current.querySelector(a.current.edges.right)), h.current = new an(m.current, (v) => {
1683
1683
  const {
1684
1684
  active: g,
1685
- delta: v,
1686
- xy: w,
1687
- first: y,
1688
- last: S
1689
- } = b, R = {
1685
+ delta: S,
1686
+ xy: _,
1687
+ first: w,
1688
+ last: y
1689
+ } = v, C = {
1690
1690
  target: i.current,
1691
- dx: v[0],
1691
+ dx: S[0],
1692
1692
  dy: 0,
1693
- clientX: w[0],
1694
- clientY: w[1],
1693
+ clientX: _[0],
1694
+ clientY: _[1],
1695
1695
  edges: {
1696
1696
  right: !0
1697
1697
  },
1698
1698
  deltaRect: {
1699
- right: v[0]
1699
+ right: S[0]
1700
1700
  }
1701
1701
  };
1702
- S ? a.current?.onend?.(R) : y ? a.current?.onstart?.(R) : g && a.current?.onmove?.(R);
1702
+ y ? a.current?.onend?.(C) : w ? a.current?.onstart?.(C) : g && a.current?.onmove?.(C);
1703
1703
  }, {
1704
1704
  pointer: {
1705
1705
  capture: !0
@@ -1710,14 +1710,14 @@ const Xs = ({
1710
1710
  return et(() => {
1711
1711
  if (!i.current) return;
1712
1712
  u.current?.destroy(), l.current?.destroy(), h.current?.destroy();
1713
- const b = {
1713
+ const v = {
1714
1714
  target: i.current,
1715
1715
  unset: () => {
1716
1716
  u.current?.destroy(), l.current?.destroy(), h.current?.destroy();
1717
1717
  }
1718
1718
  };
1719
- e && (e.current = b), _();
1720
- }, [t, r, e]), lr({
1719
+ e && (e.current = v), b();
1720
+ }, [t, r, e]), ur({
1721
1721
  children: n,
1722
1722
  ref: i,
1723
1723
  draggable: !1,
@@ -1727,7 +1727,7 @@ const Xs = ({
1727
1727
  }
1728
1728
  }
1729
1729
  });
1730
- }, ur = nt.forwardRef((n, e) => {
1730
+ }, fr = nt.forwardRef((n, e) => {
1731
1731
  const t = ze.c(70), {
1732
1732
  children: r,
1733
1733
  edges: s,
@@ -1740,23 +1740,23 @@ const Xs = ({
1740
1740
  enableDragging: h,
1741
1741
  adsorptionDistance: f,
1742
1742
  adsorptionPositions: m,
1743
- onResizeStart: _,
1744
- onResize: b,
1743
+ onResizeStart: b,
1744
+ onResize: v,
1745
1745
  onResizeEnd: g,
1746
- onDragStart: v,
1747
- onDragEnd: w,
1748
- onDrag: y,
1749
- parentRef: S,
1750
- autoScroll: R
1751
- } = n, C = c === void 0 ? Jt : c, x = a === void 0 ? un : a, k = u === void 0 ? Gs : u, L = l === void 0 ? !0 : l, A = h === void 0 ? !0 : h, O = f === void 0 ? fn : f;
1746
+ onDragStart: S,
1747
+ onDragEnd: _,
1748
+ onDrag: w,
1749
+ parentRef: y,
1750
+ autoScroll: C
1751
+ } = n, x = c === void 0 ? Jt : c, R = a === void 0 ? un : a, k = u === void 0 ? Ks : u, L = l === void 0 ? !0 : l, A = h === void 0 ? !0 : h, O = f === void 0 ? fn : f;
1752
1752
  let $;
1753
1753
  t[0] !== m ? ($ = m === void 0 ? [] : m, t[0] = m, t[1] = $) : $ = t[1];
1754
- const z = $, K = R === void 0 ? !0 : R, P = ie(void 0), N = ie(0), G = ie(!1), {
1754
+ const z = $, K = C === void 0 ? !0 : C, P = ie(void 0), N = ie(0), G = ie(!1), {
1755
1755
  initAutoScroll: ue,
1756
1756
  stopAutoScroll: fe,
1757
1757
  dealDragAutoScroll: me,
1758
1758
  dealResizeAutoScroll: d
1759
- } = Jr(S);
1759
+ } = Zr(y);
1760
1760
  let T, F;
1761
1761
  t[2] === Symbol.for("react.memo_cache_sentinel") ? (T = () => {
1762
1762
  const I = P.current;
@@ -1811,10 +1811,10 @@ const Xs = ({
1811
1811
  const I = P.current.target;
1812
1812
  V(typeof i > "u" ? I.offsetWidth : i, !1);
1813
1813
  }, Fe = [i], t[8] = i, t[9] = ot, t[10] = Fe) : (ot = t[9], Fe = t[10]), et(ot, Fe);
1814
- let Ae, xe;
1814
+ let Ae, Re;
1815
1815
  t[11] !== o ? (Ae = () => {
1816
1816
  q(o || 0, !1);
1817
- }, xe = [o], t[11] = o, t[12] = Ae, t[13] = xe) : (Ae = t[12], xe = t[13]), et(Ae, xe);
1817
+ }, Re = [o], t[11] = o, t[12] = Ae, t[13] = Re) : (Ae = t[12], Re = t[13]), et(Ae, Re);
1818
1818
  let Ve;
1819
1819
  t[14] === Symbol.for("react.memo_cache_sentinel") ? (Ve = () => ({
1820
1820
  updateLeft: (I) => q(I || 0, !1),
@@ -1823,19 +1823,19 @@ const Xs = ({
1823
1823
  getWidth: tn
1824
1824
  }), t[14] = Ve) : Ve = t[14], Jn(e, Ve);
1825
1825
  let Pe;
1826
- t[15] !== ue || t[16] !== v ? (Pe = () => {
1827
- N.current = 0, G.current = !1, ue(), v && v();
1828
- }, t[15] = ue, t[16] = v, t[17] = Pe) : Pe = t[17];
1826
+ t[15] !== ue || t[16] !== S ? (Pe = () => {
1827
+ N.current = 0, G.current = !1, ue(), S && S();
1828
+ }, t[15] = ue, t[16] = S, t[17] = Pe) : Pe = t[17];
1829
1829
  const De = Pe;
1830
1830
  let Le;
1831
- t[18] !== O || t[19] !== z || t[20] !== k || t[21] !== x || t[22] !== y || t[23] !== C ? (Le = (I) => {
1831
+ t[18] !== O || t[19] !== z || t[20] !== k || t[21] !== R || t[22] !== w || t[23] !== x ? (Le = (I) => {
1832
1832
  const {
1833
1833
  preLeft: J,
1834
1834
  preWidth: Y,
1835
1835
  scrollDelta: j
1836
1836
  } = I;
1837
1837
  j && (N.current = N.current + j);
1838
- const te = G.current ? O : x;
1838
+ const te = G.current ? O : R;
1839
1839
  if (Math.abs(N.current) >= te) {
1840
1840
  const ne = parseInt(N.current / te + "");
1841
1841
  let X = J + ne * te, W = X;
@@ -1845,7 +1845,7 @@ const Xs = ({
1845
1845
  Z < O && Z < re && (W = Q);
1846
1846
  const ce = Math.abs(Q - (X + Y));
1847
1847
  ce < O && ce < re && (W = Q - Y);
1848
- }), W !== X ? (G.current = !0, X = W) : ((X - C) % x !== 0 && (X = C + x * Math.round((X - C) / x)), G.current = !1), N.current = N.current % te, X < k().left ? X = k().left : X + Y > k().right && (X = k().right - Y), y && y({
1848
+ }), W !== X ? (G.current = !0, X = W) : ((X - x) % R !== 0 && (X = x + R * Math.round((X - x) / R)), G.current = !1), N.current = N.current % te, X < k().left ? X = k().left : X + Y > k().right && (X = k().right - Y), w && w({
1849
1849
  lastLeft: J,
1850
1850
  left: X,
1851
1851
  lastWidth: Y,
@@ -1854,18 +1854,18 @@ const Xs = ({
1854
1854
  return;
1855
1855
  q(X, !1);
1856
1856
  }
1857
- }, t[18] = O, t[19] = z, t[20] = k, t[21] = x, t[22] = y, t[23] = C, t[24] = Le) : Le = t[24];
1857
+ }, t[18] = O, t[19] = z, t[20] = k, t[21] = R, t[22] = w, t[23] = x, t[24] = Le) : Le = t[24];
1858
1858
  const it = Le;
1859
1859
  let ct;
1860
- t[25] !== K || t[26] !== me || t[27] !== it || t[28] !== S ? (ct = (I) => {
1860
+ t[25] !== K || t[26] !== me || t[27] !== it || t[28] !== y ? (ct = (I) => {
1861
1861
  const J = I.target, {
1862
1862
  left: Y,
1863
1863
  width: j
1864
1864
  } = J.dataset, te = parseFloat(Y || "0"), ne = parseFloat(j || "0");
1865
- N.current = N.current + I.dx, !(K && S?.current && !me(I, (re) => {
1866
- if (!S?.current || !P.current?.target)
1865
+ N.current = N.current + I.dx, !(K && y?.current && !me(I, (re) => {
1866
+ if (!y?.current || !P.current?.target)
1867
1867
  return;
1868
- S.current.scrollLeft = S.current.scrollLeft + re;
1868
+ y.current.scrollLeft = y.current.scrollLeft + re;
1869
1869
  const Q = P.current.target, Z = parseFloat(Q.dataset.left || "0"), ce = parseFloat(Q.dataset.width || "0");
1870
1870
  it({
1871
1871
  preLeft: Z,
@@ -1876,30 +1876,30 @@ const Xs = ({
1876
1876
  preLeft: te,
1877
1877
  preWidth: ne
1878
1878
  });
1879
- }, t[25] = K, t[26] = me, t[27] = it, t[28] = S, t[29] = ct) : ct = t[29];
1879
+ }, t[25] = K, t[26] = me, t[27] = it, t[28] = y, t[29] = ct) : ct = t[29];
1880
1880
  const Ue = ct;
1881
1881
  let be;
1882
- t[30] !== w || t[31] !== fe ? (be = (I) => {
1882
+ t[30] !== _ || t[31] !== fe ? (be = (I) => {
1883
1883
  N.current = 0, G.current = !1, fe();
1884
1884
  const J = I.target, {
1885
1885
  left: Y,
1886
1886
  width: j
1887
1887
  } = J.dataset;
1888
- w && w({
1888
+ _ && _({
1889
1889
  left: parseFloat(Y || "0"),
1890
1890
  width: parseFloat(j || "0")
1891
1891
  });
1892
- }, t[30] = w, t[31] = fe, t[32] = be) : be = t[32];
1892
+ }, t[30] = _, t[31] = fe, t[32] = be) : be = t[32];
1893
1893
  const $e = be;
1894
1894
  let Oe;
1895
- t[33] !== ue || t[34] !== _ ? (Oe = (I) => {
1895
+ t[33] !== ue || t[34] !== b ? (Oe = (I) => {
1896
1896
  N.current = 0, G.current = !1, ue();
1897
1897
  const J = I.edges?.right ? "right" : "left";
1898
- _ && _(J);
1899
- }, t[33] = ue, t[34] = _, t[35] = Oe) : Oe = t[35];
1898
+ b && b(J);
1899
+ }, t[33] = ue, t[34] = b, t[35] = Oe) : Oe = t[35];
1900
1900
  const Ke = Oe;
1901
1901
  let Me;
1902
- t[36] !== O || t[37] !== z || t[38] !== k || t[39] !== x || t[40] !== b || t[41] !== C ? (Me = (I) => {
1902
+ t[36] !== O || t[37] !== z || t[38] !== k || t[39] !== R || t[40] !== v || t[41] !== x ? (Me = (I) => {
1903
1903
  const {
1904
1904
  dir: J,
1905
1905
  preWidth: Y,
@@ -1907,7 +1907,7 @@ const Xs = ({
1907
1907
  scrollDelta: te
1908
1908
  } = I;
1909
1909
  te && (N.current = N.current + te);
1910
- const ne = G.current ? O : x;
1910
+ const ne = G.current ? O : R;
1911
1911
  if (J === "left") {
1912
1912
  if (Math.abs(N.current) >= ne) {
1913
1913
  const X = parseInt(N.current / ne + "");
@@ -1916,11 +1916,11 @@ const Xs = ({
1916
1916
  z.forEach((_e) => {
1917
1917
  const We = Math.abs(_e - W);
1918
1918
  We < O && We < Q && (re = _e);
1919
- }), re !== W ? (G.current = !0, W = re) : ((W - C) % x !== 0 && (W = C + x * Math.round((W - C) / x)), G.current = !1), N.current = N.current % ne;
1919
+ }), re !== W ? (G.current = !0, W = re) : ((W - x) % R !== 0 && (W = x + R * Math.round((W - x) / R)), G.current = !1), N.current = N.current % ne;
1920
1920
  const Z = j + Y;
1921
1921
  W < k().left && (W = k().left);
1922
1922
  const ce = Z - W;
1923
- if (b && b("left", {
1923
+ if (v && v("left", {
1924
1924
  lastLeft: j,
1925
1925
  lastWidth: Y,
1926
1926
  left: W,
@@ -1930,8 +1930,8 @@ const Xs = ({
1930
1930
  q(W, !1), V(ce, !1);
1931
1931
  }
1932
1932
  } else if (J === "right" && Math.abs(N.current) >= ne) {
1933
- const X = parseInt(N.current / x + "");
1934
- let W = Y + X * x, re = j + W;
1933
+ const X = parseInt(N.current / R + "");
1934
+ let W = Y + X * R, re = j + W;
1935
1935
  const Q = Number.MAX_SAFE_INTEGER;
1936
1936
  if (z.forEach((Z) => {
1937
1937
  const ce = Math.abs(Z - (j + W));
@@ -1940,9 +1940,9 @@ const Xs = ({
1940
1940
  G.current = !0, W = re - j;
1941
1941
  else {
1942
1942
  let Z = j + W;
1943
- (Z - C) % x !== 0 && (Z = C + x * Math.round((Z - C) / x), W = Z - j), G.current = !1;
1943
+ (Z - x) % R !== 0 && (Z = x + R * Math.round((Z - x) / R), W = Z - j), G.current = !1;
1944
1944
  }
1945
- if (N.current = N.current % ne, j + W > k().right && (W = k().right - j), b && b("right", {
1945
+ if (N.current = N.current % ne, j + W > k().right && (W = k().right - j), v && v("right", {
1946
1946
  lastLeft: j,
1947
1947
  lastWidth: Y,
1948
1948
  left: j,
@@ -1951,18 +1951,18 @@ const Xs = ({
1951
1951
  return;
1952
1952
  V(W, !1);
1953
1953
  }
1954
- }, t[36] = O, t[37] = z, t[38] = k, t[39] = x, t[40] = b, t[41] = C, t[42] = Me) : Me = t[42];
1954
+ }, t[36] = O, t[37] = z, t[38] = k, t[39] = R, t[40] = v, t[41] = x, t[42] = Me) : Me = t[42];
1955
1955
  const ye = Me;
1956
1956
  let Ne;
1957
- t[43] !== K || t[44] !== d || t[45] !== S || t[46] !== ye ? (Ne = (I) => {
1957
+ t[43] !== K || t[44] !== d || t[45] !== y || t[46] !== ye ? (Ne = (I) => {
1958
1958
  const J = I.target, Y = I.edges?.left ? "left" : "right", {
1959
1959
  left: j,
1960
1960
  width: te
1961
1961
  } = J.dataset, ne = parseFloat(j || "0"), X = parseFloat(te || "0");
1962
- N.current = N.current + (Y === "left" ? I.deltaRect?.left || 0 : I.deltaRect?.right || 0), !(K && S?.current && !d(I, Y, (Q) => {
1963
- if (!S?.current || !P.current?.target)
1962
+ N.current = N.current + (Y === "left" ? I.deltaRect?.left || 0 : I.deltaRect?.right || 0), !(K && y?.current && !d(I, Y, (Q) => {
1963
+ if (!y?.current || !P.current?.target)
1964
1964
  return;
1965
- S.current.scrollLeft = S.current.scrollLeft + Q;
1965
+ y.current.scrollLeft = y.current.scrollLeft + Q;
1966
1966
  const Z = P.current.target, ce = parseFloat(Z.dataset.left || "0"), _e = parseFloat(Z.dataset.width || "0");
1967
1967
  ye({
1968
1968
  preLeft: ce,
@@ -1975,7 +1975,7 @@ const Xs = ({
1975
1975
  preWidth: X,
1976
1976
  dir: Y
1977
1977
  });
1978
- }, t[43] = K, t[44] = d, t[45] = S, t[46] = ye, t[47] = Ne) : Ne = t[47];
1978
+ }, t[43] = K, t[44] = d, t[45] = y, t[46] = ye, t[47] = Ne) : Ne = t[47];
1979
1979
  const qe = Ne;
1980
1980
  let Ie;
1981
1981
  t[48] !== g || t[49] !== fe ? (Ie = (I) => {
@@ -1996,20 +1996,20 @@ const Xs = ({
1996
1996
  onmove: Ue,
1997
1997
  onstart: De,
1998
1998
  onend: $e,
1999
- cursorChecker: Ks
1999
+ cursorChecker: qs
2000
2000
  }, t[51] = Ue, t[52] = De, t[53] = $e, t[54] = Ee) : Ee = t[54];
2001
- let Re;
2002
- t[55] !== s || t[56] !== qe || t[57] !== Ke || t[58] !== Je ? (Re = {
2001
+ let xe;
2002
+ t[55] !== s || t[56] !== qe || t[57] !== Ke || t[58] !== Je ? (xe = {
2003
2003
  axis: "x",
2004
2004
  invert: "none",
2005
2005
  edges: s,
2006
2006
  onmove: qe,
2007
2007
  onstart: Ke,
2008
2008
  onend: Je
2009
- }, t[55] = s, t[56] = qe, t[57] = Ke, t[58] = Je, t[59] = Re) : Re = t[59];
2009
+ }, t[55] = s, t[56] = qe, t[57] = Ke, t[58] = Je, t[59] = xe) : xe = t[59];
2010
2010
  const He = r;
2011
2011
  let Ce;
2012
- t[60] !== o || t[61] !== He || t[62] !== i ? (Ce = lr({
2012
+ t[60] !== o || t[61] !== He || t[62] !== i ? (Ce = ur({
2013
2013
  children: He,
2014
2014
  style: {
2015
2015
  left: o,
@@ -2017,24 +2017,24 @@ const Xs = ({
2017
2017
  }
2018
2018
  }), t[60] = o, t[61] = He, t[62] = i, t[63] = Ce) : Ce = t[63];
2019
2019
  let ke;
2020
- return t[64] !== A || t[65] !== L || t[66] !== Ee || t[67] !== Re || t[68] !== Ce ? (ke = /* @__PURE__ */ E.jsx(Xs, { interactRef: P, draggable: A, resizable: L, draggableOptions: Ee, resizableOptions: Re, children: Ce }), t[64] = A, t[65] = L, t[66] = Ee, t[67] = Re, t[68] = Ce, t[69] = ke) : ke = t[69], ke;
2020
+ return t[64] !== A || t[65] !== L || t[66] !== Ee || t[67] !== xe || t[68] !== Ce ? (ke = /* @__PURE__ */ E.jsx(Gs, { interactRef: P, draggable: A, resizable: L, draggableOptions: Ee, resizableOptions: xe, children: Ce }), t[64] = A, t[65] = L, t[66] = Ee, t[67] = xe, t[68] = Ce, t[69] = ke) : ke = t[69], ke;
2021
2021
  });
2022
- function Gs() {
2022
+ function Ks() {
2023
2023
  return {
2024
2024
  left: Number.MIN_SAFE_INTEGER,
2025
2025
  right: Number.MAX_SAFE_INTEGER
2026
2026
  };
2027
2027
  }
2028
- function Ks() {
2028
+ function qs() {
2029
2029
  return "";
2030
2030
  }
2031
- function qs() {
2031
+ function Js() {
2032
2032
  let n = 0, e, t = "", r = arguments.length;
2033
2033
  for (; n < r; n++)
2034
2034
  (e = arguments[n]) && typeof e == "string" && (t += (t && " ") + e);
2035
2035
  return t;
2036
2036
  }
2037
- const Js = (n) => {
2037
+ const Zs = (n) => {
2038
2038
  const e = ze.c(191), {
2039
2039
  editorData: t,
2040
2040
  row: r,
@@ -2048,16 +2048,16 @@ const Js = (n) => {
2048
2048
  gridSnap: h,
2049
2049
  disableDrag: f,
2050
2050
  scaleCount: m,
2051
- maxScaleCount: _,
2052
- setScaleCount: b,
2051
+ maxScaleCount: b,
2052
+ setScaleCount: v,
2053
2053
  onActionMoveStart: g,
2054
- onActionMoving: v,
2055
- onActionMoveEnd: w,
2056
- onActionResizeStart: y,
2057
- onActionResizeEnd: S,
2058
- onActionResizing: R,
2059
- dragLineData: C,
2060
- setEditorData: x,
2054
+ onActionMoving: S,
2055
+ onActionMoveEnd: _,
2056
+ onActionResizeStart: w,
2057
+ onActionResizeEnd: y,
2058
+ onActionResizing: C,
2059
+ dragLineData: x,
2060
+ setEditorData: R,
2061
2061
  onClickAction: k,
2062
2062
  onClickActionOnly: L,
2063
2063
  onDoubleClickAction: A,
@@ -2075,14 +2075,14 @@ const Js = (n) => {
2075
2075
  flexible: F,
2076
2076
  movable: H,
2077
2077
  effectId: q
2078
- } = s, B = F === void 0 ? !0 : F, V = H === void 0 ? !0 : H, D = c ?? Yt, M = a ?? Xt, U = l ?? Jt, tn = u ?? Zn, ot = _ ?? Number.MAX_SAFE_INTEGER, Fe = fe || 0;
2078
+ } = s, B = F === void 0 ? !0 : F, V = H === void 0 ? !0 : H, D = c ?? Yt, M = a ?? Xt, U = l ?? Jt, tn = u ?? Qn, ot = b ?? Number.MAX_SAFE_INTEGER, Fe = fe || 0;
2079
2079
  let Ae;
2080
2080
  e[0] !== D || e[1] !== M || e[2] !== U || e[3] !== Fe ? (Ae = je(Fe, {
2081
2081
  startLeft: U,
2082
2082
  scale: D,
2083
2083
  scaleWidth: M
2084
2084
  }), e[0] = D, e[1] = M, e[2] = U, e[3] = Fe, e[4] = Ae) : Ae = e[4];
2085
- const xe = Ae, Ve = ue || Number.MAX_VALUE;
2085
+ const Re = Ae, Ve = ue || Number.MAX_VALUE;
2086
2086
  let Pe;
2087
2087
  e[5] !== D || e[6] !== M || e[7] !== U || e[8] !== Ve ? (Pe = je(Ve, {
2088
2088
  startLeft: U,
@@ -2101,17 +2101,17 @@ const Js = (n) => {
2101
2101
  }), e[10] = me, e[11] = D, e[12] = M, e[13] = U, e[14] = d, e[15] = Le) : Le = e[15];
2102
2102
  const it = Le, [ct, Ue] = Tt(null), be = ct ?? it, $e = M / tn;
2103
2103
  let Oe;
2104
- e[16] !== q || e[17] !== o || e[18] !== B || e[19] !== V || e[20] !== T ? (Oe = de(qs("action", V && "action-movable", T && "action-selected", B && "action-flexible", o[q] && `action-effect-${q}`)), e[16] = q, e[17] = o, e[18] = B, e[19] = V, e[20] = T, e[21] = Oe) : Oe = e[21];
2104
+ e[16] !== q || e[17] !== o || e[18] !== B || e[19] !== V || e[20] !== T ? (Oe = de(Js("action", V && "action-movable", T && "action-selected", B && "action-flexible", o[q] && `action-effect-${q}`)), e[16] = q, e[17] = o, e[18] = B, e[19] = V, e[20] = T, e[21] = Oe) : Oe = e[21];
2105
2105
  const Ke = Oe;
2106
2106
  let Me;
2107
- e[22] !== M || e[23] !== U || e[24] !== m || e[25] !== b ? (Me = (pe, ge) => {
2108
- const se = $r(pe + ge, {
2107
+ e[22] !== M || e[23] !== U || e[24] !== m || e[25] !== v ? (Me = (pe, ge) => {
2108
+ const se = Hr(pe + ge, {
2109
2109
  startLeft: U,
2110
2110
  scaleCount: m,
2111
2111
  scaleWidth: M
2112
2112
  });
2113
- se !== m && b(se);
2114
- }, e[22] = M, e[23] = U, e[24] = m, e[25] = b, e[26] = Me) : Me = e[26];
2113
+ se !== m && v(se);
2114
+ }, e[22] = M, e[23] = U, e[24] = m, e[25] = v, e[26] = Me) : Me = e[26];
2115
2115
  const ye = Me;
2116
2116
  let Ne;
2117
2117
  e[27] !== s || e[28] !== g || e[29] !== r ? (Ne = () => {
@@ -2122,12 +2122,12 @@ const Js = (n) => {
2122
2122
  }, e[27] = s, e[28] = g, e[29] = r, e[30] = Ne) : Ne = e[30];
2123
2123
  const qe = Ne;
2124
2124
  let Ie;
2125
- e[31] !== s || e[32] !== ye || e[33] !== v || e[34] !== r || e[35] !== D || e[36] !== M || e[37] !== U ? (Ie = (pe) => {
2125
+ e[31] !== s || e[32] !== ye || e[33] !== S || e[34] !== r || e[35] !== D || e[36] !== M || e[37] !== U ? (Ie = (pe) => {
2126
2126
  const {
2127
2127
  left: ge,
2128
2128
  width: se
2129
2129
  } = pe;
2130
- if (N.current = !0, v) {
2130
+ if (N.current = !0, S) {
2131
2131
  const {
2132
2132
  start: le,
2133
2133
  end: oe
@@ -2139,7 +2139,7 @@ const Js = (n) => {
2139
2139
  scale: D,
2140
2140
  startLeft: U
2141
2141
  });
2142
- if (v({
2142
+ if (S({
2143
2143
  action: s,
2144
2144
  row: r,
2145
2145
  start: le,
@@ -2151,10 +2151,10 @@ const Js = (n) => {
2151
2151
  left: ge,
2152
2152
  width: se
2153
2153
  }), ye(ge, se);
2154
- }, e[31] = s, e[32] = ye, e[33] = v, e[34] = r, e[35] = D, e[36] = M, e[37] = U, e[38] = Ie) : Ie = e[38];
2154
+ }, e[31] = s, e[32] = ye, e[33] = S, e[34] = r, e[35] = D, e[36] = M, e[37] = U, e[38] = Ie) : Ie = e[38];
2155
2155
  const Je = Ie;
2156
2156
  let Ee;
2157
- e[39] !== t || e[40] !== G || e[41] !== w || e[42] !== r || e[43] !== D || e[44] !== M || e[45] !== U || e[46] !== x ? (Ee = (pe) => {
2157
+ e[39] !== t || e[40] !== G || e[41] !== _ || e[42] !== r || e[43] !== D || e[44] !== M || e[45] !== U || e[46] !== R ? (Ee = (pe) => {
2158
2158
  const {
2159
2159
  left: ge,
2160
2160
  width: se
@@ -2172,30 +2172,30 @@ const Js = (n) => {
2172
2172
  if (!ae)
2173
2173
  return;
2174
2174
  const Xe = ae.actions.find((Ge) => Ge.id === G);
2175
- Xe && (Xe.start = le, Xe.end = oe, x(t), w && w({
2175
+ Xe && (Xe.start = le, Xe.end = oe, R(t), _ && _({
2176
2176
  action: Xe,
2177
2177
  row: r,
2178
2178
  start: le,
2179
2179
  end: oe
2180
2180
  }), Ue(null));
2181
- }, e[39] = t, e[40] = G, e[41] = w, e[42] = r, e[43] = D, e[44] = M, e[45] = U, e[46] = x, e[47] = Ee) : Ee = e[47];
2182
- const Re = Ee;
2181
+ }, e[39] = t, e[40] = G, e[41] = _, e[42] = r, e[43] = D, e[44] = M, e[45] = U, e[46] = R, e[47] = Ee) : Ee = e[47];
2182
+ const xe = Ee;
2183
2183
  let He;
2184
- e[48] !== s || e[49] !== y || e[50] !== r ? (He = (pe) => {
2185
- y && y({
2184
+ e[48] !== s || e[49] !== w || e[50] !== r ? (He = (pe) => {
2185
+ w && w({
2186
2186
  action: s,
2187
2187
  row: r,
2188
2188
  dir: pe
2189
2189
  });
2190
- }, e[48] = s, e[49] = y, e[50] = r, e[51] = He) : He = e[51];
2190
+ }, e[48] = s, e[49] = w, e[50] = r, e[51] = He) : He = e[51];
2191
2191
  const Ce = He;
2192
2192
  let ke;
2193
- e[52] !== s || e[53] !== ye || e[54] !== R || e[55] !== r || e[56] !== D || e[57] !== M || e[58] !== U ? (ke = (pe, ge) => {
2193
+ e[52] !== s || e[53] !== ye || e[54] !== C || e[55] !== r || e[56] !== D || e[57] !== M || e[58] !== U ? (ke = (pe, ge) => {
2194
2194
  const {
2195
2195
  left: se,
2196
2196
  width: le
2197
2197
  } = ge;
2198
- if (N.current = !0, R) {
2198
+ if (N.current = !0, C) {
2199
2199
  const {
2200
2200
  start: oe,
2201
2201
  end: ae
@@ -2207,7 +2207,7 @@ const Js = (n) => {
2207
2207
  scale: D,
2208
2208
  startLeft: U
2209
2209
  });
2210
- if (R({
2210
+ if (C({
2211
2211
  action: s,
2212
2212
  row: r,
2213
2213
  start: oe,
@@ -2220,10 +2220,10 @@ const Js = (n) => {
2220
2220
  left: se,
2221
2221
  width: le
2222
2222
  }), ye(se, le);
2223
- }, e[52] = s, e[53] = ye, e[54] = R, e[55] = r, e[56] = D, e[57] = M, e[58] = U, e[59] = ke) : ke = e[59];
2223
+ }, e[52] = s, e[53] = ye, e[54] = C, e[55] = r, e[56] = D, e[57] = M, e[58] = U, e[59] = ke) : ke = e[59];
2224
2224
  const I = ke;
2225
2225
  let J;
2226
- e[60] !== t || e[61] !== G || e[62] !== S || e[63] !== r || e[64] !== D || e[65] !== M || e[66] !== U || e[67] !== x ? (J = (pe, ge) => {
2226
+ e[60] !== t || e[61] !== G || e[62] !== y || e[63] !== r || e[64] !== D || e[65] !== M || e[66] !== U || e[67] !== R ? (J = (pe, ge) => {
2227
2227
  const {
2228
2228
  left: se,
2229
2229
  width: le
@@ -2241,17 +2241,17 @@ const Js = (n) => {
2241
2241
  if (!Xe)
2242
2242
  return;
2243
2243
  const Ge = Xe.actions.find((nn) => nn.id === G);
2244
- Ge && (Ge.start = oe, Ge.end = ae, x(t), S && S({
2244
+ Ge && (Ge.start = oe, Ge.end = ae, R(t), y && y({
2245
2245
  action: Ge,
2246
2246
  row: r,
2247
2247
  start: oe,
2248
2248
  end: ae,
2249
2249
  dir: pe
2250
2250
  }), Ue(null));
2251
- }, e[60] = t, e[61] = G, e[62] = S, e[63] = r, e[64] = D, e[65] = M, e[66] = U, e[67] = x, e[68] = J) : J = e[68];
2251
+ }, e[60] = t, e[61] = G, e[62] = y, e[63] = r, e[64] = D, e[65] = M, e[66] = U, e[67] = R, e[68] = J) : J = e[68];
2252
2252
  const Y = J;
2253
2253
  let j, te, ne, X, W, re, Q, Z, ce, _e, We, at, lt, ut, ft, dt, Be, Ye, ht, mt, pt, gt, vt, bt, _t, wt;
2254
- if (e[69] !== s || e[70] !== Ke || e[71] !== f || e[72] !== C.assistPositions || e[73] !== B || e[74] !== $ || e[75] !== $e || e[76] !== h || e[77] !== Je || e[78] !== Re || e[79] !== qe || e[80] !== Y || e[81] !== Ce || e[82] !== I || e[83] !== z || e[84] !== xe || e[85] !== V || e[86] !== k || e[87] !== L || e[88] !== O || e[89] !== A || e[90] !== De || e[91] !== r || e[92] !== i || e[93] !== D || e[94] !== M || e[95] !== U || e[96] !== K || e[97] !== be.left || e[98] !== be.width) {
2254
+ if (e[69] !== s || e[70] !== Ke || e[71] !== f || e[72] !== x.assistPositions || e[73] !== B || e[74] !== $ || e[75] !== $e || e[76] !== h || e[77] !== Je || e[78] !== xe || e[79] !== qe || e[80] !== Y || e[81] !== Ce || e[82] !== I || e[83] !== z || e[84] !== Re || e[85] !== V || e[86] !== k || e[87] !== L || e[88] !== O || e[89] !== A || e[90] !== De || e[91] !== r || e[92] !== i || e[93] !== D || e[94] !== M || e[95] !== U || e[96] !== K || e[97] !== be.left || e[98] !== be.width) {
2255
2255
  const pe = {
2256
2256
  ...s,
2257
2257
  ...Lt({
@@ -2266,17 +2266,17 @@ const Js = (n) => {
2266
2266
  ...r,
2267
2267
  actions: [...r.actions]
2268
2268
  };
2269
- r.actions.includes(s) && (ge.actions[r.actions.indexOf(s)] = pe), j = ur, ce = P, _e = K, We = U, at = be.left, lt = be.width, ut = h && $e || un, ft = h ? Math.max(($e || un) / 2, fn) : fn, dt = C.assistPositions, e[125] !== xe || e[126] !== De ? (Be = () => ({
2270
- left: xe,
2269
+ r.actions.includes(s) && (ge.actions[r.actions.indexOf(s)] = pe), j = fr, ce = P, _e = K, We = U, at = be.left, lt = be.width, ut = h && $e || un, ft = h ? Math.max(($e || un) / 2, fn) : fn, dt = x.assistPositions, e[125] !== Re || e[126] !== De ? (Be = () => ({
2270
+ left: Re,
2271
2271
  right: De
2272
- }), e[125] = xe, e[126] = De, e[127] = Be) : Be = e[127];
2272
+ }), e[125] = Re, e[126] = De, e[127] = Be) : Be = e[127];
2273
2273
  let se;
2274
2274
  e[128] !== f || e[129] !== B ? (se = !f && B && `.${de("action-left-stretch")}`, e[128] = f, e[129] = B, e[130] = se) : se = e[130];
2275
2275
  let le;
2276
2276
  e[131] !== f || e[132] !== B ? (le = !f && B && `.${de("action-right-stretch")}`, e[131] = f, e[132] = B, e[133] = le) : le = e[133], e[134] !== se || e[135] !== le ? (Ye = {
2277
2277
  left: se,
2278
2278
  right: le
2279
- }, e[134] = se, e[135] = le, e[136] = Ye) : Ye = e[136], ht = !f && V, mt = !f && B, pt = qe, gt = Je, vt = Re, bt = Ce, _t = I, wt = Y, e[137] === Symbol.for("react.memo_cache_sentinel") ? (te = () => {
2279
+ }, e[134] = se, e[135] = le, e[136] = Ye) : Ye = e[136], ht = !f && V, mt = !f && B, pt = qe, gt = Je, vt = xe, bt = Ce, _t = I, wt = Y, e[137] === Symbol.for("react.memo_cache_sentinel") ? (te = () => {
2280
2280
  N.current = !1;
2281
2281
  }, e[137] = te) : te = e[137], e[138] !== s || e[139] !== z || e[140] !== k || e[141] !== L || e[142] !== r ? (ne = (oe) => {
2282
2282
  let ae;
@@ -2309,7 +2309,7 @@ const Js = (n) => {
2309
2309
  }
2310
2310
  }, e[149] = s, e[150] = z, e[151] = O, e[152] = r, e[153] = W) : W = e[153], re = Ke, e[154] !== i ? (Q = {
2311
2311
  height: i
2312
- }, e[154] = i, e[155] = Q) : Q = e[155], Z = $ && $(pe, ge), e[69] = s, e[70] = Ke, e[71] = f, e[72] = C.assistPositions, e[73] = B, e[74] = $, e[75] = $e, e[76] = h, e[77] = Je, e[78] = Re, e[79] = qe, e[80] = Y, e[81] = Ce, e[82] = I, e[83] = z, e[84] = xe, e[85] = V, e[86] = k, e[87] = L, e[88] = O, e[89] = A, e[90] = De, e[91] = r, e[92] = i, e[93] = D, e[94] = M, e[95] = U, e[96] = K, e[97] = be.left, e[98] = be.width, e[99] = j, e[100] = te, e[101] = ne, e[102] = X, e[103] = W, e[104] = re, e[105] = Q, e[106] = Z, e[107] = ce, e[108] = _e, e[109] = We, e[110] = at, e[111] = lt, e[112] = ut, e[113] = ft, e[114] = dt, e[115] = Be, e[116] = Ye, e[117] = ht, e[118] = mt, e[119] = pt, e[120] = gt, e[121] = vt, e[122] = bt, e[123] = _t, e[124] = wt;
2312
+ }, e[154] = i, e[155] = Q) : Q = e[155], Z = $ && $(pe, ge), e[69] = s, e[70] = Ke, e[71] = f, e[72] = x.assistPositions, e[73] = B, e[74] = $, e[75] = $e, e[76] = h, e[77] = Je, e[78] = xe, e[79] = qe, e[80] = Y, e[81] = Ce, e[82] = I, e[83] = z, e[84] = Re, e[85] = V, e[86] = k, e[87] = L, e[88] = O, e[89] = A, e[90] = De, e[91] = r, e[92] = i, e[93] = D, e[94] = M, e[95] = U, e[96] = K, e[97] = be.left, e[98] = be.width, e[99] = j, e[100] = te, e[101] = ne, e[102] = X, e[103] = W, e[104] = re, e[105] = Q, e[106] = Z, e[107] = ce, e[108] = _e, e[109] = We, e[110] = at, e[111] = lt, e[112] = ut, e[113] = ft, e[114] = dt, e[115] = Be, e[116] = Ye, e[117] = ht, e[118] = mt, e[119] = pt, e[120] = gt, e[121] = vt, e[122] = bt, e[123] = _t, e[124] = wt;
2313
2313
  } else
2314
2314
  j = e[99], te = e[100], ne = e[101], X = e[102], W = e[103], re = e[104], Q = e[105], Z = e[106], ce = e[107], _e = e[108], We = e[109], at = e[110], lt = e[111], ut = e[112], ft = e[113], dt = e[114], Be = e[115], Ye = e[116], ht = e[117], mt = e[118], pt = e[119], gt = e[120], vt = e[121], bt = e[122], _t = e[123], wt = e[124];
2315
2315
  let St;
@@ -2329,25 +2329,25 @@ const Js = (n) => {
2329
2329
  let kt;
2330
2330
  return e[170] !== j || e[171] !== ce || e[172] !== _e || e[173] !== We || e[174] !== at || e[175] !== lt || e[176] !== ut || e[177] !== ft || e[178] !== dt || e[179] !== Be || e[180] !== Ye || e[181] !== ht || e[182] !== mt || e[183] !== pt || e[184] !== gt || e[185] !== vt || e[186] !== bt || e[187] !== _t || e[188] !== wt || e[189] !== Et ? (kt = /* @__PURE__ */ E.jsx(j, { ref: ce, parentRef: _e, start: We, left: at, width: lt, grid: ut, adsorptionDistance: ft, adsorptionPositions: dt, getBounds: Be, edges: Ye, enableDragging: ht, enableResizing: mt, onDragStart: pt, onDrag: gt, onDragEnd: vt, onResizeStart: bt, onResize: _t, onResizeEnd: wt, children: Et }), e[170] = j, e[171] = ce, e[172] = _e, e[173] = We, e[174] = at, e[175] = lt, e[176] = ut, e[177] = ft, e[178] = dt, e[179] = Be, e[180] = Ye, e[181] = ht, e[182] = mt, e[183] = pt, e[184] = gt, e[185] = vt, e[186] = bt, e[187] = _t, e[188] = wt, e[189] = Et, e[190] = kt) : kt = e[190], kt;
2331
2331
  };
2332
- function Rt(n, e, t) {
2332
+ function xt(n, e, t) {
2333
2333
  let r = t.initialDeps ?? [], s;
2334
2334
  function o() {
2335
2335
  var i, c, a, u;
2336
2336
  let l;
2337
2337
  t.key && ((i = t.debug) != null && i.call(t)) && (l = Date.now());
2338
2338
  const h = n();
2339
- if (!(h.length !== r.length || h.some((_, b) => r[b] !== _)))
2339
+ if (!(h.length !== r.length || h.some((b, v) => r[v] !== b)))
2340
2340
  return s;
2341
2341
  r = h;
2342
2342
  let m;
2343
2343
  if (t.key && ((c = t.debug) != null && c.call(t)) && (m = Date.now()), s = e(...h), t.key && ((a = t.debug) != null && a.call(t))) {
2344
- const _ = Math.round((Date.now() - l) * 100) / 100, b = Math.round((Date.now() - m) * 100) / 100, g = b / 16, v = (w, y) => {
2345
- for (w = String(w); w.length < y; )
2346
- w = " " + w;
2347
- return w;
2344
+ const b = Math.round((Date.now() - l) * 100) / 100, v = Math.round((Date.now() - m) * 100) / 100, g = v / 16, S = (_, w) => {
2345
+ for (_ = String(_); _.length < w; )
2346
+ _ = " " + _;
2347
+ return _;
2348
2348
  };
2349
2349
  console.info(
2350
- `%c⏱ ${v(b, 5)} /${v(_, 5)} ms`,
2350
+ `%c⏱ ${S(v, 5)} /${S(b, 5)} ms`,
2351
2351
  `
2352
2352
  font-size: .6rem;
2353
2353
  font-weight: bold;
@@ -2369,7 +2369,7 @@ function $n(n, e) {
2369
2369
  throw new Error("Unexpected undefined");
2370
2370
  return n;
2371
2371
  }
2372
- const Zs = (n, e) => Math.abs(n - e) < 1.01, Qs = (n, e, t) => {
2372
+ const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
2373
2373
  let r;
2374
2374
  return function(...s) {
2375
2375
  n.clearTimeout(r), r = n.setTimeout(() => e.apply(this, s), t);
@@ -2377,12 +2377,12 @@ const Zs = (n, e) => Math.abs(n - e) < 1.01, Qs = (n, e, t) => {
2377
2377
  }, Hn = (n) => {
2378
2378
  const { offsetWidth: e, offsetHeight: t } = n;
2379
2379
  return { width: e, height: t };
2380
- }, eo = (n) => n, to = (n) => {
2380
+ }, to = (n) => n, no = (n) => {
2381
2381
  const e = Math.max(n.startIndex - n.overscan, 0), t = Math.min(n.endIndex + n.overscan, n.count - 1), r = [];
2382
2382
  for (let s = e; s <= t; s++)
2383
2383
  r.push(s);
2384
2384
  return r;
2385
- }, no = (n, e) => {
2385
+ }, ro = (n, e) => {
2386
2386
  const t = n.scrollElement;
2387
2387
  if (!t)
2388
2388
  return;
@@ -2415,7 +2415,7 @@ const Zs = (n, e) => Math.abs(n - e) < 1.01, Qs = (n, e, t) => {
2415
2415
  };
2416
2416
  }, Bn = {
2417
2417
  passive: !0
2418
- }, Yn = typeof window > "u" ? !0 : "onscrollend" in window, ro = (n, e) => {
2418
+ }, Yn = typeof window > "u" ? !0 : "onscrollend" in window, so = (n, e) => {
2419
2419
  const t = n.scrollElement;
2420
2420
  if (!t)
2421
2421
  return;
@@ -2424,7 +2424,7 @@ const Zs = (n, e) => Math.abs(n - e) < 1.01, Qs = (n, e, t) => {
2424
2424
  return;
2425
2425
  let s = 0;
2426
2426
  const o = n.options.useScrollendEvent && Yn ? () => {
2427
- } : Qs(
2427
+ } : eo(
2428
2428
  r,
2429
2429
  () => {
2430
2430
  e(s, !1);
@@ -2439,7 +2439,7 @@ const Zs = (n, e) => Math.abs(n - e) < 1.01, Qs = (n, e, t) => {
2439
2439
  return u && t.addEventListener("scrollend", a, Bn), () => {
2440
2440
  t.removeEventListener("scroll", c), u && t.removeEventListener("scrollend", a);
2441
2441
  };
2442
- }, so = (n, e, t) => {
2442
+ }, oo = (n, e, t) => {
2443
2443
  if (e?.borderBoxSize) {
2444
2444
  const r = e.borderBoxSize[0];
2445
2445
  if (r)
@@ -2448,7 +2448,7 @@ const Zs = (n, e) => Math.abs(n - e) < 1.01, Qs = (n, e, t) => {
2448
2448
  );
2449
2449
  }
2450
2450
  return n[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
2451
- }, oo = (n, {
2451
+ }, io = (n, {
2452
2452
  adjustments: e = 0,
2453
2453
  behavior: t
2454
2454
  }, r) => {
@@ -2459,7 +2459,7 @@ const Zs = (n, e) => Math.abs(n - e) < 1.01, Qs = (n, e, t) => {
2459
2459
  behavior: t
2460
2460
  });
2461
2461
  };
2462
- class io {
2462
+ class co {
2463
2463
  constructor(e) {
2464
2464
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
2465
2465
  let t = null;
@@ -2497,11 +2497,11 @@ class io {
2497
2497
  scrollPaddingStart: 0,
2498
2498
  scrollPaddingEnd: 0,
2499
2499
  horizontal: !1,
2500
- getItemKey: eo,
2501
- rangeExtractor: to,
2500
+ getItemKey: to,
2501
+ rangeExtractor: no,
2502
2502
  onChange: () => {
2503
2503
  },
2504
- measureElement: so,
2504
+ measureElement: oo,
2505
2505
  initialRect: { width: 0, height: 0 },
2506
2506
  scrollMargin: 0,
2507
2507
  gap: 0,
@@ -2518,7 +2518,7 @@ class io {
2518
2518
  }, this.notify = (t) => {
2519
2519
  var r, s;
2520
2520
  (s = (r = this.options).onChange) == null || s.call(r, this, t);
2521
- }, this.maybeNotify = Rt(
2521
+ }, this.maybeNotify = xt(
2522
2522
  () => (this.calculateRange(), [
2523
2523
  this.isScrolling,
2524
2524
  this.range ? this.range.startIndex : null,
@@ -2576,7 +2576,7 @@ class io {
2576
2576
  break;
2577
2577
  }
2578
2578
  return o.size === this.options.lanes ? Array.from(o.values()).sort((i, c) => i.end === c.end ? i.index - c.index : i.end - c.end)[0] : void 0;
2579
- }, this.getMeasurementOptions = Rt(
2579
+ }, this.getMeasurementOptions = xt(
2580
2580
  () => [
2581
2581
  this.options.count,
2582
2582
  this.options.paddingStart,
@@ -2594,7 +2594,7 @@ class io {
2594
2594
  {
2595
2595
  key: !1
2596
2596
  }
2597
- ), this.getMeasurements = Rt(
2597
+ ), this.getMeasurements = xt(
2598
2598
  () => [this.getMeasurementOptions(), this.itemSizeCache],
2599
2599
  ({ count: t, paddingStart: r, scrollMargin: s, getItemKey: o, enabled: i }, c) => {
2600
2600
  if (!i)
@@ -2606,14 +2606,14 @@ class io {
2606
2606
  this.pendingMeasuredCacheIndexes = [];
2607
2607
  const u = this.measurementsCache.slice(0, a);
2608
2608
  for (let l = a; l < t; l++) {
2609
- const h = o(l), f = this.options.lanes === 1 ? u[l - 1] : this.getFurthestMeasurement(u, l), m = f ? f.end + this.options.gap : r + s, _ = c.get(h), b = typeof _ == "number" ? _ : this.options.estimateSize(l), g = m + b, v = f ? f.lane : l % this.options.lanes;
2609
+ const h = o(l), f = this.options.lanes === 1 ? u[l - 1] : this.getFurthestMeasurement(u, l), m = f ? f.end + this.options.gap : r + s, b = c.get(h), v = typeof b == "number" ? b : this.options.estimateSize(l), g = m + v, S = f ? f.lane : l % this.options.lanes;
2610
2610
  u[l] = {
2611
2611
  index: l,
2612
2612
  start: m,
2613
- size: b,
2613
+ size: v,
2614
2614
  end: g,
2615
2615
  key: h,
2616
- lane: v
2616
+ lane: S
2617
2617
  };
2618
2618
  }
2619
2619
  return this.measurementsCache = u, u;
@@ -2622,14 +2622,14 @@ class io {
2622
2622
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
2623
2623
  debug: () => this.options.debug
2624
2624
  }
2625
- ), this.calculateRange = Rt(
2625
+ ), this.calculateRange = xt(
2626
2626
  () => [
2627
2627
  this.getMeasurements(),
2628
2628
  this.getSize(),
2629
2629
  this.getScrollOffset(),
2630
2630
  this.options.lanes
2631
2631
  ],
2632
- (t, r, s, o) => this.range = t.length > 0 && r > 0 ? co({
2632
+ (t, r, s, o) => this.range = t.length > 0 && r > 0 ? ao({
2633
2633
  measurements: t,
2634
2634
  outerSize: r,
2635
2635
  scrollOffset: s,
@@ -2639,7 +2639,7 @@ class io {
2639
2639
  key: process.env.NODE_ENV !== "production" && "calculateRange",
2640
2640
  debug: () => this.options.debug
2641
2641
  }
2642
- ), this.getVirtualIndexes = Rt(
2642
+ ), this.getVirtualIndexes = xt(
2643
2643
  () => {
2644
2644
  let t = null, r = null;
2645
2645
  const s = this.calculateRange();
@@ -2689,7 +2689,7 @@ class io {
2689
2689
  return;
2690
2690
  }
2691
2691
  this._measureElement(t, void 0);
2692
- }, this.getVirtualItems = Rt(
2692
+ }, this.getVirtualItems = xt(
2693
2693
  () => [this.getVirtualIndexes(), this.getMeasurements()],
2694
2694
  (t, r) => {
2695
2695
  const s = [];
@@ -2707,7 +2707,7 @@ class io {
2707
2707
  const r = this.getMeasurements();
2708
2708
  if (r.length !== 0)
2709
2709
  return $n(
2710
- r[fr(
2710
+ r[dr(
2711
2711
  0,
2712
2712
  r.length - 1,
2713
2713
  (s) => $n(r[s]).start,
@@ -2758,12 +2758,12 @@ class io {
2758
2758
  }
2759
2759
  const [h, f] = l;
2760
2760
  this._scrollToOffset(h, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
2761
- const m = this.getScrollOffset(), _ = this.getOffsetForIndex(t, f);
2762
- if (!_) {
2761
+ const m = this.getScrollOffset(), b = this.getOffsetForIndex(t, f);
2762
+ if (!b) {
2763
2763
  console.warn("Failed to get offset for index:", t);
2764
2764
  return;
2765
2765
  }
2766
- Zs(_[0], m) || a(f);
2766
+ Qs(b[0], m) || a(f);
2767
2767
  });
2768
2768
  }, a = (u) => {
2769
2769
  this.targetWindow && (o++, o < i ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", o, i), this.targetWindow.requestAnimationFrame(() => c(u))) : console.warn(
@@ -2809,7 +2809,7 @@ class io {
2809
2809
  }, this.setOptions(e);
2810
2810
  }
2811
2811
  }
2812
- const fr = (n, e, t, r) => {
2812
+ const dr = (n, e, t, r) => {
2813
2813
  for (; n <= e; ) {
2814
2814
  const s = (n + e) / 2 | 0, o = t(s);
2815
2815
  if (o < r)
@@ -2821,7 +2821,7 @@ const fr = (n, e, t, r) => {
2821
2821
  }
2822
2822
  return n > 0 ? n - 1 : 0;
2823
2823
  };
2824
- function co({
2824
+ function ao({
2825
2825
  measurements: n,
2826
2826
  outerSize: e,
2827
2827
  scrollOffset: t,
@@ -2833,7 +2833,7 @@ function co({
2833
2833
  startIndex: 0,
2834
2834
  endIndex: s
2835
2835
  };
2836
- let i = fr(
2836
+ let i = dr(
2837
2837
  0,
2838
2838
  s,
2839
2839
  o,
@@ -2858,27 +2858,27 @@ function co({
2858
2858
  return { startIndex: i, endIndex: c };
2859
2859
  }
2860
2860
  const Xn = typeof document < "u" ? p.useLayoutEffect : p.useEffect;
2861
- function ao(n) {
2861
+ function lo(n) {
2862
2862
  const e = p.useReducer(() => ({}), {})[1], t = {
2863
2863
  ...n,
2864
2864
  onChange: (s, o) => {
2865
2865
  var i;
2866
- o ? Lr(e) : e(), (i = n.onChange) == null || i.call(n, s, o);
2866
+ o ? Or(e) : e(), (i = n.onChange) == null || i.call(n, s, o);
2867
2867
  }
2868
2868
  }, [r] = p.useState(
2869
- () => new io(t)
2869
+ () => new co(t)
2870
2870
  );
2871
2871
  return r.setOptions(t), Xn(() => r._didMount(), []), Xn(() => r._willUpdate()), r;
2872
2872
  }
2873
- function dr(n) {
2874
- return ao({
2875
- observeElementRect: no,
2876
- observeElementOffset: ro,
2877
- scrollToFn: oo,
2873
+ function hr(n) {
2874
+ return lo({
2875
+ observeElementRect: ro,
2876
+ observeElementOffset: so,
2877
+ scrollToFn: io,
2878
2878
  ...n
2879
2879
  });
2880
2880
  }
2881
- const lo = (n) => {
2881
+ const uo = (n) => {
2882
2882
  const {
2883
2883
  rowData: e,
2884
2884
  style: t = {},
@@ -2891,25 +2891,26 @@ const lo = (n) => {
2891
2891
  scaleWidth: u
2892
2892
  } = n, l = ["edit-row"];
2893
2893
  e?.selected && l.push("edit-row-selected");
2894
- const h = a ?? Yt, f = u ?? Xt, m = c ?? Jt, _ = (v) => {
2894
+ const h = a ?? Yt, f = u ?? Xt, m = c ?? Jt, b = (_) => {
2895
2895
  if (!i.current) return 0;
2896
- const w = i.current.getBoundingClientRect(), S = v.clientX - w.x;
2897
- return rt(S, {
2896
+ const y = _.currentTarget.getBoundingClientRect(), x = _.clientX - y.x;
2897
+ return rt(x, {
2898
2898
  startLeft: m,
2899
2899
  scale: h,
2900
2900
  scaleWidth: f
2901
2901
  });
2902
- }, b = e?.actions ?? [], g = dr({
2902
+ }, v = Dr(() => (e?.actions ? [...e.actions] : []).sort((_, w) => _.start - w.start), [e]), g = Zn((_) => v[_]?.id ?? _, [v]), S = hr({
2903
2903
  horizontal: !0,
2904
- count: b.length,
2904
+ count: v.length,
2905
+ getItemKey: g,
2905
2906
  getScrollElement: () => i.current,
2906
- estimateSize: (v) => {
2907
- if (!b[v]) return 0;
2907
+ estimateSize: (_) => {
2908
+ if (!v[_]) return 0;
2908
2909
  let {
2909
2910
  width: w
2910
2911
  } = gn({
2911
- start: b[v].start,
2912
- end: b[v].end
2912
+ start: v[_].start,
2913
+ end: v[_].end
2913
2914
  }, {
2914
2915
  startLeft: m,
2915
2916
  scale: h,
@@ -2920,38 +2921,38 @@ const lo = (n) => {
2920
2921
  overscan: 3
2921
2922
  });
2922
2923
  return pn(() => {
2923
- g.measure();
2924
- }, [u, c, g]), /* @__PURE__ */ E.jsx("div", { className: `${de(...l)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (v) => {
2924
+ S.measure();
2925
+ }, [u, c, S]), /* @__PURE__ */ E.jsx("div", { className: `${de(...l)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (_) => {
2925
2926
  if (e && r) {
2926
- const w = _(v);
2927
- r(v, {
2927
+ const w = b(_);
2928
+ r(_, {
2928
2929
  row: e,
2929
2930
  time: w
2930
2931
  });
2931
2932
  }
2932
- }, onDoubleClick: (v) => {
2933
+ }, onDoubleClick: (_) => {
2933
2934
  if (e && s) {
2934
- const w = _(v);
2935
- s(v, {
2935
+ const w = b(_);
2936
+ s(_, {
2936
2937
  row: e,
2937
2938
  time: w
2938
2939
  });
2939
2940
  }
2940
- }, onContextMenu: (v) => {
2941
+ }, onContextMenu: (_) => {
2941
2942
  if (e && o) {
2942
- const w = _(v);
2943
- o(v, {
2943
+ const w = b(_);
2944
+ o(_, {
2944
2945
  row: e,
2945
2946
  time: w
2946
2947
  });
2947
2948
  }
2948
- }, children: e && g.getVirtualItems().map((v) => {
2949
- const w = b[v.index];
2949
+ }, children: e && S.getVirtualItems().map((_) => {
2950
+ const w = v[_.index];
2950
2951
  if (!w) throw new Error("Action not found");
2951
- return /* @__PURE__ */ E.jsx(Js, { ...n, handleTime: _, row: e, action: w }, w.id);
2952
+ return /* @__PURE__ */ E.jsx(Zs, { ...n, handleTime: b, row: e, action: w }, w.id);
2952
2953
  }) });
2953
2954
  };
2954
- function uo() {
2955
+ function fo() {
2955
2956
  const n = ze.c(6);
2956
2957
  let e;
2957
2958
  n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
@@ -2959,30 +2960,30 @@ function uo() {
2959
2960
  movePositions: [],
2960
2961
  assistPositions: []
2961
2962
  }, n[0] = e) : e = n[0];
2962
- const [t, r] = Tt(e), s = ho, o = fo;
2963
+ const [t, r] = Tt(e), s = mo, o = ho;
2963
2964
  let i;
2964
2965
  n[1] === Symbol.for("react.memo_cache_sentinel") ? (i = (m) => {
2965
2966
  const {
2966
- movePositions: _,
2967
- assistPositions: b
2967
+ movePositions: b,
2968
+ assistPositions: v
2968
2969
  } = m;
2969
2970
  r({
2970
2971
  isMoving: !0,
2971
- movePositions: _ || [],
2972
- assistPositions: b || []
2972
+ movePositions: b || [],
2973
+ assistPositions: v || []
2973
2974
  });
2974
2975
  }, n[1] = i) : i = n[1];
2975
2976
  const c = i;
2976
2977
  let a;
2977
2978
  n[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (m) => {
2978
2979
  const {
2979
- movePositions: _,
2980
- assistPositions: b
2980
+ movePositions: b,
2981
+ assistPositions: v
2981
2982
  } = m;
2982
2983
  r((g) => ({
2983
2984
  ...g,
2984
- movePositions: _ || g.movePositions,
2985
- assistPositions: b || g.assistPositions
2985
+ movePositions: b || g.movePositions,
2986
+ assistPositions: v || g.assistPositions
2986
2987
  }));
2987
2988
  }, n[2] = a) : a = n[2];
2988
2989
  const u = a;
@@ -3005,7 +3006,7 @@ function uo() {
3005
3006
  defaultGetMovePosition: o
3006
3007
  }, n[4] = t, n[5] = f) : f = n[5], f;
3007
3008
  }
3008
- function fo(n) {
3009
+ function ho(n) {
3009
3010
  const {
3010
3011
  start: e,
3011
3012
  end: t,
@@ -3026,7 +3027,7 @@ function fo(n) {
3026
3027
  });
3027
3028
  return r ? r === "right" ? [c + a] : [c] : [c, c + a];
3028
3029
  }
3029
- function ho(n) {
3030
+ function mo(n) {
3030
3031
  const {
3031
3032
  editorData: e,
3032
3033
  assistActionIds: t,
@@ -3047,14 +3048,14 @@ function ho(n) {
3047
3048
  m.id !== r.id && l.push(m);
3048
3049
  });
3049
3050
  });
3050
- const h = Hr(l, {
3051
+ const h = Br(l, {
3051
3052
  startLeft: c,
3052
3053
  scale: o,
3053
3054
  scaleWidth: i
3054
3055
  });
3055
3056
  return u || h.push(a), h;
3056
3057
  }
3057
- const mo = (n) => {
3058
+ const po = (n) => {
3058
3059
  const e = ze.c(35);
3059
3060
  let t, r;
3060
3061
  e[0] !== n ? ({
@@ -3068,7 +3069,7 @@ const mo = (n) => {
3068
3069
  disposeDragLine: c,
3069
3070
  defaultGetAssistPosition: a,
3070
3071
  defaultGetMovePosition: u
3071
- } = uo();
3072
+ } = fo();
3072
3073
  let l;
3073
3074
  e[3] !== a || e[4] !== o || e[5] !== t ? (l = (A) => {
3074
3075
  if (t.dragLine) {
@@ -3111,46 +3112,46 @@ const mo = (n) => {
3111
3112
  });
3112
3113
  }
3113
3114
  }, e[7] = u, e[8] = t.dragLine, e[9] = t.scale, e[10] = t.scaleWidth, e[11] = t.startLeft, e[12] = i, e[13] = f) : f = e[13];
3114
- const m = f, _ = t.rowHeight ?? 32, b = t.scaleWidth ?? 160, g = t.startLeft ?? 20, v = Math.max(t.scaleCount * b + g, t.timelineWidth);
3115
- let w;
3116
- if (e[14] !== v || e[15] !== _ || e[16] !== c || e[17] !== s || e[18] !== h || e[19] !== m || e[20] !== t) {
3115
+ const m = f, b = t.rowHeight ?? 32, v = t.scaleWidth ?? 160, g = t.startLeft ?? 20, S = Math.max(t.scaleCount * v + g, t.timelineWidth);
3116
+ let _;
3117
+ if (e[14] !== S || e[15] !== b || e[16] !== c || e[17] !== s || e[18] !== h || e[19] !== m || e[20] !== t) {
3117
3118
  const A = [];
3118
3119
  let O = 0;
3119
3120
  for (let $ = 0; $ < t.editorData.length; $++) {
3120
3121
  const z = t.editorData[$];
3121
3122
  if (!z)
3122
3123
  continue;
3123
- const K = z.rowHeight || _;
3124
- A.push(/* @__PURE__ */ Pr(lo, { ...t, key: z.id, rowData: z, dragLineData: s, scrollContainerRef: t.scrollElementRef, style: {
3124
+ const K = z.rowHeight || b;
3125
+ A.push(/* @__PURE__ */ Lr(uo, { ...t, key: z.id, rowData: z, dragLineData: s, scrollContainerRef: t.scrollElementRef, style: {
3125
3126
  position: "absolute",
3126
3127
  top: 0,
3127
3128
  left: 0,
3128
- width: v,
3129
+ width: S,
3129
3130
  height: `${K}px`,
3130
3131
  transform: `translateY(${O}px)`
3131
3132
  }, onActionMoveStart: (P) => (h(P), t.onActionMoveStart && t.onActionMoveStart(P)), onActionResizeStart: (P) => (h(P), t.onActionResizeStart && t.onActionResizeStart(P)), onActionMoving: (P) => (m(P), t.onActionMoving && t.onActionMoving(P)), onActionResizing: (P) => (m(P), t.onActionResizing && t.onActionResizing(P)), onActionResizeEnd: (P) => (c(), t.onActionResizeEnd && t.onActionResizeEnd(P)), onActionMoveEnd: (P) => (c(), t.onActionMoveEnd && t.onActionMoveEnd(P)) })), O = O + K;
3132
3133
  }
3133
- w = [O, A], e[14] = v, e[15] = _, e[16] = c, e[17] = s, e[18] = h, e[19] = m, e[20] = t, e[21] = w;
3134
+ _ = [O, A], e[14] = S, e[15] = b, e[16] = c, e[17] = s, e[18] = h, e[19] = m, e[20] = t, e[21] = _;
3134
3135
  } else
3135
- w = e[21];
3136
- const [y, S] = w, R = `0, ${t.startLeft ?? 20}px`, C = `${t.startLeft ?? 20}px, ${t.scaleWidth ?? 160}px`;
3137
- let x;
3138
- e[22] !== v || e[23] !== R || e[24] !== C || e[25] !== y ? (x = {
3139
- width: v,
3140
- height: y,
3136
+ _ = e[21];
3137
+ const [w, y] = _, C = `0, ${t.startLeft ?? 20}px`, x = `${t.startLeft ?? 20}px, ${t.scaleWidth ?? 160}px`;
3138
+ let R;
3139
+ e[22] !== S || e[23] !== C || e[24] !== x || e[25] !== w ? (R = {
3140
+ width: S,
3141
+ height: w,
3141
3142
  position: "relative",
3142
- backgroundPositionX: R,
3143
- backgroundSize: C
3144
- }, e[22] = v, e[23] = R, e[24] = C, e[25] = y, e[26] = x) : x = e[26];
3143
+ backgroundPositionX: C,
3144
+ backgroundSize: x
3145
+ }, e[22] = S, e[23] = C, e[24] = x, e[25] = w, e[26] = R) : R = e[26];
3145
3146
  let k;
3146
- e[27] !== s || e[28] !== t.dragLine ? (k = t.dragLine && /* @__PURE__ */ E.jsx(Kr, { ...s }), e[27] = s, e[28] = t.dragLine, e[29] = k) : k = e[29];
3147
+ e[27] !== s || e[28] !== t.dragLine ? (k = t.dragLine && /* @__PURE__ */ E.jsx(qr, { ...s }), e[27] = s, e[28] = t.dragLine, e[29] = k) : k = e[29];
3147
3148
  let L;
3148
- return e[30] !== r || e[31] !== S || e[32] !== x || e[33] !== k ? (L = /* @__PURE__ */ E.jsxs("div", { ref: r, style: x, className: "timeline-editor-edit-area", children: [
3149
- S,
3149
+ return e[30] !== r || e[31] !== y || e[32] !== R || e[33] !== k ? (L = /* @__PURE__ */ E.jsxs("div", { ref: r, style: R, className: "timeline-editor-edit-area", children: [
3150
+ y,
3150
3151
  k
3151
- ] }), e[30] = r, e[31] = S, e[32] = x, e[33] = k, e[34] = L) : L = e[34], L;
3152
+ ] }), e[30] = r, e[31] = y, e[32] = R, e[33] = k, e[34] = L) : L = e[34], L;
3152
3153
  };
3153
- function po({
3154
+ function go({
3154
3155
  scaleSplitCount: n,
3155
3156
  scaleWidth: e,
3156
3157
  startLeft: t,
@@ -3161,12 +3162,12 @@ function po({
3161
3162
  onClickTimeArea: c,
3162
3163
  setCursor: a
3163
3164
  }) {
3164
- const u = n ?? 1, l = e ?? 160, h = t ?? 20, f = (n ?? 0) > 0, m = f ? r * (n ?? 1) + 1 : r, _ = (f ? l / u : l) * (m - 1) + h, g = dr({
3165
+ const u = n ?? 1, l = e ?? 160, h = t ?? 20, f = (n ?? 0) > 0, m = f ? r * (n ?? 1) + 1 : r, b = (f ? l / u : l) * (m - 1) + h, g = hr({
3165
3166
  horizontal: !0,
3166
3167
  count: m,
3167
3168
  getScrollElement: () => i.current,
3168
- estimateSize: (v) => {
3169
- switch (v) {
3169
+ estimateSize: (S) => {
3170
+ switch (S) {
3170
3171
  case 0:
3171
3172
  return h;
3172
3173
  default:
@@ -3176,30 +3177,30 @@ function po({
3176
3177
  overscan: 10
3177
3178
  });
3178
3179
  return et(() => g.measure(), [e, t, g]), /* @__PURE__ */ E.jsx("div", { style: {
3179
- width: `${_}px`
3180
- }, className: de("time-area"), onClick: (v) => {
3181
- const w = t ?? 20, y = e ?? 160, S = o ?? 1, R = s ?? 1 / 0, C = v.currentTarget.getBoundingClientRect(), x = v.clientX - C.x, k = Math.max(x, w);
3182
- if (k > R * y + w) return;
3180
+ width: `${b}px`
3181
+ }, className: de("time-area"), onClick: (S) => {
3182
+ const _ = t ?? 20, w = e ?? 160, y = o ?? 1, C = s ?? 1 / 0, x = S.currentTarget.getBoundingClientRect(), R = S.clientX - x.x, k = Math.max(R, _);
3183
+ if (k > C * w + _) return;
3183
3184
  const L = rt(k, {
3184
- startLeft: w,
3185
- scale: S,
3186
- scaleWidth: y
3185
+ startLeft: _,
3186
+ scale: y,
3187
+ scaleWidth: w
3187
3188
  });
3188
- c && c(L, v), !v.defaultPrevented && a({
3189
+ c && c(L, S), !S.defaultPrevented && a({
3189
3190
  time: L
3190
3191
  });
3191
- }, children: g.getVirtualItems().map((v) => {
3192
- const w = v.index, y = n ?? 1, S = o ?? 1, R = f ? w % y === 0 : !0, C = [de("time-unit"), de(R ? "time-unit-big" : "time-unit-small")], x = (f ? w / y : w) * S;
3193
- return /* @__PURE__ */ E.jsx("div", { "data-index": v.index, style: {
3194
- width: `${v.size}px`,
3195
- transform: `translateX(${v.start}px)`
3196
- }, className: C.join(" "), children: R && /* @__PURE__ */ E.jsx("div", { className: de("time-unit-scale"), children: x }) }, v.key);
3192
+ }, children: g.getVirtualItems().map((S) => {
3193
+ const _ = S.index, w = n ?? 1, y = o ?? 1, C = f ? _ % w === 0 : !0, x = [de("time-unit"), de(C ? "time-unit-big" : "time-unit-small")], R = (f ? _ / w : _) * y;
3194
+ return /* @__PURE__ */ E.jsx("div", { "data-index": S.index, style: {
3195
+ width: `${S.size}px`,
3196
+ transform: `translateX(${S.start}px)`
3197
+ }, className: x.join(" "), children: C && /* @__PURE__ */ E.jsx("div", { className: de("time-unit-scale"), children: R }) }, S.key);
3197
3198
  }) });
3198
3199
  }
3199
- function go(n) {
3200
+ function vo(n) {
3200
3201
  return typeof n == "object" && n !== null;
3201
3202
  }
3202
- function vo(n, e, t) {
3203
+ function bo(n, e, t) {
3203
3204
  if (n instanceof EventTarget)
3204
3205
  return [n];
3205
3206
  if (typeof n == "string") {
@@ -3208,33 +3209,33 @@ function vo(n, e, t) {
3208
3209
  }
3209
3210
  return Array.from(n);
3210
3211
  }
3211
- function bo(n) {
3212
- return go(n) && "ownerSVGElement" in n;
3212
+ function _o(n) {
3213
+ return vo(n) && "ownerSVGElement" in n;
3213
3214
  }
3214
3215
  const $t = /* @__PURE__ */ new WeakMap();
3215
3216
  let Ht;
3216
- const hr = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : bo(r) && "getBBox" in r ? r.getBBox()[e] : r[t], _o = /* @__PURE__ */ hr("inline", "width", "offsetWidth"), wo = /* @__PURE__ */ hr("block", "height", "offsetHeight");
3217
- function So({ target: n, borderBoxSize: e }) {
3217
+ const mr = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : _o(r) && "getBBox" in r ? r.getBBox()[e] : r[t], wo = /* @__PURE__ */ mr("inline", "width", "offsetWidth"), So = /* @__PURE__ */ mr("block", "height", "offsetHeight");
3218
+ function yo({ target: n, borderBoxSize: e }) {
3218
3219
  $t.get(n)?.forEach((t) => {
3219
3220
  t(n, {
3220
3221
  get width() {
3221
- return _o(n, e);
3222
+ return wo(n, e);
3222
3223
  },
3223
3224
  get height() {
3224
- return wo(n, e);
3225
+ return So(n, e);
3225
3226
  }
3226
3227
  });
3227
3228
  });
3228
3229
  }
3229
- function yo(n) {
3230
- n.forEach(So);
3230
+ function Eo(n) {
3231
+ n.forEach(yo);
3231
3232
  }
3232
- function Eo() {
3233
- typeof ResizeObserver > "u" || (Ht = new ResizeObserver(yo));
3233
+ function Ro() {
3234
+ typeof ResizeObserver > "u" || (Ht = new ResizeObserver(Eo));
3234
3235
  }
3235
3236
  function xo(n, e) {
3236
- Ht || Eo();
3237
- const t = vo(n);
3237
+ Ht || Ro();
3238
+ const t = bo(n);
3238
3239
  return t.forEach((r) => {
3239
3240
  let s = $t.get(r);
3240
3241
  s || (s = /* @__PURE__ */ new Set(), $t.set(r, s)), s.add(e), Ht?.observe(r);
@@ -3247,7 +3248,7 @@ function xo(n, e) {
3247
3248
  }
3248
3249
  const Bt = /* @__PURE__ */ new Set();
3249
3250
  let Ct;
3250
- function Ro() {
3251
+ function Co() {
3251
3252
  Ct = () => {
3252
3253
  const n = {
3253
3254
  get width() {
@@ -3260,15 +3261,15 @@ function Ro() {
3260
3261
  Bt.forEach((e) => e(n));
3261
3262
  }, window.addEventListener("resize", Ct);
3262
3263
  }
3263
- function Co(n) {
3264
- return Bt.add(n), Ct || Ro(), () => {
3264
+ function To(n) {
3265
+ return Bt.add(n), Ct || Co(), () => {
3265
3266
  Bt.delete(n), !Bt.size && typeof Ct == "function" && (window.removeEventListener("resize", Ct), Ct = void 0);
3266
3267
  };
3267
3268
  }
3268
- function To(n, e) {
3269
- return typeof n == "function" ? Co(n) : xo(n, e);
3269
+ function Ao(n, e) {
3270
+ return typeof n == "function" ? To(n) : xo(n, e);
3270
3271
  }
3271
- function Ao(n) {
3272
+ function Po(n) {
3272
3273
  const e = ze.c(4);
3273
3274
  let t;
3274
3275
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
@@ -3278,7 +3279,7 @@ function Ao(n) {
3278
3279
  const [r, s] = Tt(t);
3279
3280
  let o;
3280
3281
  e[1] !== n ? (o = () => {
3281
- n.current && To(n.current, (c, a) => {
3282
+ n.current && Ao(n.current, (c, a) => {
3282
3283
  s({
3283
3284
  width: a.width,
3284
3285
  height: a.height
@@ -3288,7 +3289,7 @@ function Ao(n) {
3288
3289
  let i;
3289
3290
  return e[3] === Symbol.for("react.memo_cache_sentinel") ? (i = [], e[3] = i) : i = e[3], pn(o, i), r;
3290
3291
  }
3291
- const Po = (n) => {
3292
+ const Do = (n) => {
3292
3293
  const e = ze.c(42), {
3293
3294
  disableDrag: t,
3294
3295
  cursorTime: r,
@@ -3302,50 +3303,50 @@ const Po = (n) => {
3302
3303
  maxScaleCount: h,
3303
3304
  onCursorDragStart: f,
3304
3305
  onCursorDrag: m,
3305
- onCursorDragEnd: _
3306
- } = n, b = ie(null), g = ie(void 0);
3307
- let v, w;
3308
- e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (v = () => {
3309
- if (typeof g.current > "u" && b.current) {
3306
+ onCursorDragEnd: b
3307
+ } = n, v = ie(null), g = ie(void 0);
3308
+ let S, _;
3309
+ e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (S = () => {
3310
+ if (typeof g.current > "u" && v.current) {
3310
3311
  const d = o ?? 20, T = i ?? 160, F = c ?? 1;
3311
- b.current.updateLeft(je(r, {
3312
+ v.current.updateLeft(je(r, {
3312
3313
  startLeft: d,
3313
3314
  scaleWidth: T,
3314
3315
  scale: F
3315
3316
  }));
3316
3317
  }
3317
- }, w = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] = v, e[5] = w) : (v = e[4], w = e[5]), et(v, w);
3318
- const y = o ?? 20, S = i ?? 160, R = c ?? 1, C = h ?? 1 / 0, x = (u ?? 0) > 0, k = u ?? 1, L = x ? a * (u ?? 1) + 1 : a, A = o ?? 20, O = (x ? S / k : S) * (L - 1) + A;
3318
+ }, _ = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] = S, e[5] = _) : (S = e[4], _ = e[5]), et(S, _);
3319
+ const w = o ?? 20, y = i ?? 160, C = c ?? 1, x = h ?? 1 / 0, R = (u ?? 0) > 0, k = u ?? 1, L = R ? a * (u ?? 1) + 1 : a, A = o ?? 20, O = (R ? y / k : y) * (L - 1) + A;
3319
3320
  let $;
3320
- e[6] !== y || e[7] !== C || e[8] !== l || e[9] !== O || e[10] !== S ? ($ = () => ({
3321
+ e[6] !== w || e[7] !== x || e[8] !== l || e[9] !== O || e[10] !== y ? ($ = () => ({
3321
3322
  left: 0,
3322
- right: Math.min(O, C * S + y - (l.current?.scrollLeft ?? 0))
3323
- }), e[6] = y, e[7] = C, e[8] = l, e[9] = O, e[10] = S, e[11] = $) : $ = e[11];
3323
+ right: Math.min(O, x * y + w - (l.current?.scrollLeft ?? 0))
3324
+ }), e[6] = w, e[7] = x, e[8] = l, e[9] = O, e[10] = y, e[11] = $) : $ = e[11];
3324
3325
  const z = !t;
3325
3326
  let K;
3326
- e[12] !== r || e[13] !== y || e[14] !== f || e[15] !== R || e[16] !== S ? (K = () => {
3327
+ e[12] !== r || e[13] !== w || e[14] !== f || e[15] !== C || e[16] !== y ? (K = () => {
3327
3328
  f && f(r), g.current = je(r, {
3328
- startLeft: y,
3329
- scaleWidth: S,
3330
- scale: R
3331
- }), b.current?.updateLeft(g.current);
3332
- }, e[12] = r, e[13] = y, e[14] = f, e[15] = R, e[16] = S, e[17] = K) : K = e[17];
3329
+ startLeft: w,
3330
+ scaleWidth: y,
3331
+ scale: C
3332
+ }), v.current?.updateLeft(g.current);
3333
+ }, e[12] = r, e[13] = w, e[14] = f, e[15] = C, e[16] = y, e[17] = K) : K = e[17];
3333
3334
  let P;
3334
- e[18] !== y || e[19] !== _ || e[20] !== R || e[21] !== s || e[22] !== S ? (P = () => {
3335
+ e[18] !== w || e[19] !== b || e[20] !== C || e[21] !== s || e[22] !== y ? (P = () => {
3335
3336
  if (typeof g.current < "u") {
3336
3337
  const d = rt(g.current, {
3337
- startLeft: y,
3338
- scale: R,
3339
- scaleWidth: S
3338
+ startLeft: w,
3339
+ scale: C,
3340
+ scaleWidth: y
3340
3341
  });
3341
3342
  s({
3342
3343
  time: d
3343
- }), _ && _(d);
3344
+ }), b && b(d);
3344
3345
  }
3345
3346
  g.current = void 0;
3346
- }, e[18] = y, e[19] = _, e[20] = R, e[21] = s, e[22] = S, e[23] = P) : P = e[23];
3347
+ }, e[18] = w, e[19] = b, e[20] = C, e[21] = s, e[22] = y, e[23] = P) : P = e[23];
3347
3348
  let N;
3348
- e[24] !== y || e[25] !== m || e[26] !== R || e[27] !== l || e[28] !== s || e[29] !== S ? (N = (d, T) => {
3349
+ e[24] !== w || e[25] !== m || e[26] !== C || e[27] !== l || e[28] !== s || e[29] !== y ? (N = (d, T) => {
3349
3350
  const {
3350
3351
  left: F
3351
3352
  } = d, H = T === void 0 ? 0 : T, q = l.current?.scrollLeft ?? 0, B = l.current, V = B?.clientWidth ?? 0;
@@ -3353,29 +3354,29 @@ const Po = (n) => {
3353
3354
  if (typeof g.current < "u") {
3354
3355
  g.current = g.current + H;
3355
3356
  const D = q, M = q + V;
3356
- g.current < D + 10 ? g.current = D + 10 : g.current > M - 10 && (g.current = M - 10), g.current < y - q && (g.current = y - q);
3357
+ g.current < D + 10 ? g.current = D + 10 : g.current > M - 10 && (g.current = M - 10), g.current < w - q && (g.current = w - q);
3357
3358
  } else {
3358
3359
  g.current = F + H;
3359
3360
  const D = q, M = q + V;
3360
3361
  g.current < D + 10 ? g.current = D + 10 : g.current > M - 10 && (g.current = M - 10);
3361
3362
  }
3362
- else if (F < y - q ? g.current = y - q : g.current = F, B && V > 0) {
3363
+ else if (F < w - q ? g.current = w - q : g.current = F, B && V > 0) {
3363
3364
  const D = q, M = q + V;
3364
3365
  g.current < D + 10 ? g.current = D + 10 : g.current > M - 10 && (g.current = M - 10);
3365
3366
  }
3366
3367
  if (typeof g.current < "u") {
3367
- b.current?.updateLeft(g.current);
3368
+ v.current?.updateLeft(g.current);
3368
3369
  const D = rt(g.current + q, {
3369
- startLeft: y,
3370
- scale: R,
3371
- scaleWidth: S
3370
+ startLeft: w,
3371
+ scale: C,
3372
+ scaleWidth: y
3372
3373
  });
3373
3374
  s({
3374
3375
  time: D
3375
3376
  }), m && m(D);
3376
3377
  }
3377
3378
  return !1;
3378
- }, e[24] = y, e[25] = m, e[26] = R, e[27] = l, e[28] = s, e[29] = S, e[30] = N) : N = e[30];
3379
+ }, e[24] = w, e[25] = m, e[26] = C, e[27] = l, e[28] = s, e[29] = y, e[30] = N) : N = e[30];
3379
3380
  let G, ue;
3380
3381
  e[31] === Symbol.for("react.memo_cache_sentinel") ? (G = de("cursor"), ue = de("cursor-top"), e[31] = G, e[32] = ue) : (G = e[31], ue = e[32]);
3381
3382
  let fe;
@@ -3384,14 +3385,14 @@ const Po = (n) => {
3384
3385
  /* @__PURE__ */ E.jsx("div", { className: de("cursor-area") })
3385
3386
  ] }), e[33] = fe) : fe = e[33];
3386
3387
  let me;
3387
- return e[34] !== y || e[35] !== l || e[36] !== $ || e[37] !== z || e[38] !== K || e[39] !== P || e[40] !== N ? (me = /* @__PURE__ */ E.jsx(ur, { start: y, ref: b, parentRef: l, getBounds: $, autoScroll: !0, enableDragging: z, enableResizing: !1, onDragStart: K, onDragEnd: P, onDrag: N, children: fe }), e[34] = y, e[35] = l, e[36] = $, e[37] = z, e[38] = K, e[39] = P, e[40] = N, e[41] = me) : me = e[41], me;
3388
+ return e[34] !== w || e[35] !== l || e[36] !== $ || e[37] !== z || e[38] !== K || e[39] !== P || e[40] !== N ? (me = /* @__PURE__ */ E.jsx(fr, { start: w, ref: v, parentRef: l, getBounds: $, autoScroll: !0, enableDragging: z, enableResizing: !1, onDragStart: K, onDragEnd: P, onDrag: N, children: fe }), e[34] = w, e[35] = l, e[36] = $, e[37] = z, e[38] = K, e[39] = P, e[40] = N, e[41] = me) : me = e[41], me;
3388
3389
  };
3389
3390
  function Gn(n, e) {
3390
3391
  if (typeof n == "function")
3391
3392
  return n(e);
3392
3393
  n != null && (n.current = e);
3393
3394
  }
3394
- function mr(...n) {
3395
+ function pr(...n) {
3395
3396
  return (e) => {
3396
3397
  let t = !1;
3397
3398
  const r = n.map((s) => {
@@ -3408,12 +3409,12 @@ function mr(...n) {
3408
3409
  };
3409
3410
  }
3410
3411
  function st(...n) {
3411
- return p.useCallback(mr(...n), n);
3412
+ return p.useCallback(pr(...n), n);
3412
3413
  }
3413
3414
  // @__NO_SIDE_EFFECTS__
3414
- function Do(n) {
3415
- const e = /* @__PURE__ */ Lo(n), t = p.forwardRef((r, s) => {
3416
- const { children: o, ...i } = r, c = p.Children.toArray(o), a = c.find(Mo);
3415
+ function Lo(n) {
3416
+ const e = /* @__PURE__ */ Oo(n), t = p.forwardRef((r, s) => {
3417
+ const { children: o, ...i } = r, c = p.Children.toArray(o), a = c.find(No);
3417
3418
  if (a) {
3418
3419
  const u = a.props.children, l = c.map((h) => h === a ? p.Children.count(u) > 1 ? p.Children.only(null) : p.isValidElement(u) ? u.props.children : null : h);
3419
3420
  return /* @__PURE__ */ E.jsx(e, { ...i, ref: s, children: p.isValidElement(u) ? p.cloneElement(u, void 0, l) : null });
@@ -3423,22 +3424,22 @@ function Do(n) {
3423
3424
  return t.displayName = `${n}.Slot`, t;
3424
3425
  }
3425
3426
  // @__NO_SIDE_EFFECTS__
3426
- function Lo(n) {
3427
+ function Oo(n) {
3427
3428
  const e = p.forwardRef((t, r) => {
3428
3429
  const { children: s, ...o } = t;
3429
3430
  if (p.isValidElement(s)) {
3430
- const i = Io(s), c = No(o, s.props);
3431
- return s.type !== p.Fragment && (c.ref = r ? mr(r, i) : i), p.cloneElement(s, c);
3431
+ const i = ko(s), c = Io(o, s.props);
3432
+ return s.type !== p.Fragment && (c.ref = r ? pr(r, i) : i), p.cloneElement(s, c);
3432
3433
  }
3433
3434
  return p.Children.count(s) > 1 ? p.Children.only(null) : null;
3434
3435
  });
3435
3436
  return e.displayName = `${n}.SlotClone`, e;
3436
3437
  }
3437
- var Oo = Symbol("radix.slottable");
3438
- function Mo(n) {
3439
- return p.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === Oo;
3438
+ var Mo = Symbol("radix.slottable");
3439
+ function No(n) {
3440
+ return p.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === Mo;
3440
3441
  }
3441
- function No(n, e) {
3442
+ function Io(n, e) {
3442
3443
  const t = { ...e };
3443
3444
  for (const r in e) {
3444
3445
  const s = n[r], o = e[r];
@@ -3449,11 +3450,11 @@ function No(n, e) {
3449
3450
  }
3450
3451
  return { ...n, ...t };
3451
3452
  }
3452
- function Io(n) {
3453
+ function ko(n) {
3453
3454
  let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
3454
3455
  return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
3455
3456
  }
3456
- var ko = [
3457
+ var Wo = [
3457
3458
  "a",
3458
3459
  "button",
3459
3460
  "div",
@@ -3471,26 +3472,26 @@ var ko = [
3471
3472
  "span",
3472
3473
  "svg",
3473
3474
  "ul"
3474
- ], Nt = ko.reduce((n, e) => {
3475
- const t = /* @__PURE__ */ Do(`Primitive.${e}`), r = p.forwardRef((s, o) => {
3475
+ ], Nt = Wo.reduce((n, e) => {
3476
+ const t = /* @__PURE__ */ Lo(`Primitive.${e}`), r = p.forwardRef((s, o) => {
3476
3477
  const { asChild: i, ...c } = s, a = i ? t : e;
3477
3478
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ E.jsx(a, { ...c, ref: o });
3478
3479
  });
3479
3480
  return r.displayName = `Primitive.${e}`, { ...n, [e]: r };
3480
3481
  }, {});
3481
- function Wo(n, e = []) {
3482
+ function jo(n, e = []) {
3482
3483
  let t = [];
3483
3484
  function r(o, i) {
3484
3485
  const c = p.createContext(i), a = t.length;
3485
3486
  t = [...t, i];
3486
3487
  const u = (h) => {
3487
- const { scope: f, children: m, ..._ } = h, b = f?.[n]?.[a] || c, g = p.useMemo(() => _, Object.values(_));
3488
- return /* @__PURE__ */ E.jsx(b.Provider, { value: g, children: m });
3488
+ const { scope: f, children: m, ...b } = h, v = f?.[n]?.[a] || c, g = p.useMemo(() => b, Object.values(b));
3489
+ return /* @__PURE__ */ E.jsx(v.Provider, { value: g, children: m });
3489
3490
  };
3490
3491
  u.displayName = o + "Provider";
3491
3492
  function l(h, f) {
3492
- const m = f?.[n]?.[a] || c, _ = p.useContext(m);
3493
- if (_) return _;
3493
+ const m = f?.[n]?.[a] || c, b = p.useContext(m);
3494
+ if (b) return b;
3494
3495
  if (i !== void 0) return i;
3495
3496
  throw new Error(`\`${h}\` must be used within \`${o}\``);
3496
3497
  }
@@ -3506,9 +3507,9 @@ function Wo(n, e = []) {
3506
3507
  );
3507
3508
  };
3508
3509
  };
3509
- return s.scopeName = n, [r, jo(s, ...e)];
3510
+ return s.scopeName = n, [r, zo(s, ...e)];
3510
3511
  }
3511
- function jo(...n) {
3512
+ function zo(...n) {
3512
3513
  const e = n[0];
3513
3514
  if (n.length === 1) return e;
3514
3515
  const t = () => {
@@ -3534,16 +3535,16 @@ function tt(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
3534
3535
  }
3535
3536
  var mn = globalThis?.document ? p.useLayoutEffect : () => {
3536
3537
  };
3537
- function zo(n, e) {
3538
+ function Fo(n, e) {
3538
3539
  return p.useReducer((t, r) => e[t][r] ?? t, n);
3539
3540
  }
3540
3541
  var It = (n) => {
3541
- const { present: e, children: t } = n, r = Fo(e), s = typeof t == "function" ? t({ present: r.isPresent }) : p.Children.only(t), o = st(r.ref, Vo(s));
3542
+ const { present: e, children: t } = n, r = Vo(e), s = typeof t == "function" ? t({ present: r.isPresent }) : p.Children.only(t), o = st(r.ref, Uo(s));
3542
3543
  return typeof t == "function" || r.isPresent ? p.cloneElement(s, { ref: o }) : null;
3543
3544
  };
3544
3545
  It.displayName = "Presence";
3545
- function Fo(n) {
3546
- const [e, t] = p.useState(), r = p.useRef(null), s = p.useRef(n), o = p.useRef("none"), i = n ? "mounted" : "unmounted", [c, a] = zo(i, {
3546
+ function Vo(n) {
3547
+ const [e, t] = p.useState(), r = p.useRef(null), s = p.useRef(n), o = p.useRef("none"), i = n ? "mounted" : "unmounted", [c, a] = Fo(i, {
3547
3548
  mounted: {
3548
3549
  UNMOUNT: "unmounted",
3549
3550
  ANIMATION_OUT: "unmountSuspended"
@@ -3569,8 +3570,8 @@ function Fo(n) {
3569
3570
  if (e) {
3570
3571
  let u;
3571
3572
  const l = e.ownerDocument.defaultView ?? window, h = (m) => {
3572
- const b = Vt(r.current).includes(CSS.escape(m.animationName));
3573
- if (m.target === e && b && (a("ANIMATION_END"), !s.current)) {
3573
+ const v = Vt(r.current).includes(CSS.escape(m.animationName));
3574
+ if (m.target === e && v && (a("ANIMATION_END"), !s.current)) {
3574
3575
  const g = e.style.animationFillMode;
3575
3576
  e.style.animationFillMode = "forwards", u = l.setTimeout(() => {
3576
3577
  e.style.animationFillMode === "forwards" && (e.style.animationFillMode = g);
@@ -3594,13 +3595,13 @@ function Fo(n) {
3594
3595
  function Vt(n) {
3595
3596
  return n?.animationName || "none";
3596
3597
  }
3597
- function Vo(n) {
3598
+ function Uo(n) {
3598
3599
  let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
3599
3600
  return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
3600
3601
  }
3601
- var Uo = p.createContext(void 0);
3602
- function $o(n) {
3603
- const e = p.useContext(Uo);
3602
+ var $o = p.createContext(void 0);
3603
+ function Ho(n) {
3604
+ const e = p.useContext($o);
3604
3605
  return n || e || "ltr";
3605
3606
  }
3606
3607
  function Qe(n) {
@@ -3609,13 +3610,13 @@ function Qe(n) {
3609
3610
  e.current = n;
3610
3611
  }), p.useMemo(() => (...t) => e.current?.(...t), []);
3611
3612
  }
3612
- function Ho(n, [e, t]) {
3613
+ function Bo(n, [e, t]) {
3613
3614
  return Math.min(t, Math.max(e, n));
3614
3615
  }
3615
- function Bo(n, e) {
3616
+ function Yo(n, e) {
3616
3617
  return p.useReducer((t, r) => e[t][r] ?? t, n);
3617
3618
  }
3618
- var bn = "ScrollArea", [pr] = Wo(bn), [Yo, Se] = pr(bn), gr = p.forwardRef(
3619
+ var bn = "ScrollArea", [gr] = jo(bn), [Xo, Se] = gr(bn), vr = p.forwardRef(
3619
3620
  (n, e) => {
3620
3621
  const {
3621
3622
  __scopeScrollArea: t,
@@ -3623,9 +3624,9 @@ var bn = "ScrollArea", [pr] = Wo(bn), [Yo, Se] = pr(bn), gr = p.forwardRef(
3623
3624
  dir: s,
3624
3625
  scrollHideDelay: o = 600,
3625
3626
  ...i
3626
- } = n, [c, a] = p.useState(null), [u, l] = p.useState(null), [h, f] = p.useState(null), [m, _] = p.useState(null), [b, g] = p.useState(null), [v, w] = p.useState(0), [y, S] = p.useState(0), [R, C] = p.useState(!1), [x, k] = p.useState(!1), L = st(e, (O) => a(O)), A = $o(s);
3627
+ } = n, [c, a] = p.useState(null), [u, l] = p.useState(null), [h, f] = p.useState(null), [m, b] = p.useState(null), [v, g] = p.useState(null), [S, _] = p.useState(0), [w, y] = p.useState(0), [C, x] = p.useState(!1), [R, k] = p.useState(!1), L = st(e, (O) => a(O)), A = Ho(s);
3627
3628
  return /* @__PURE__ */ E.jsx(
3628
- Yo,
3629
+ Xo,
3629
3630
  {
3630
3631
  scope: t,
3631
3632
  type: r,
@@ -3637,15 +3638,15 @@ var bn = "ScrollArea", [pr] = Wo(bn), [Yo, Se] = pr(bn), gr = p.forwardRef(
3637
3638
  content: h,
3638
3639
  onContentChange: f,
3639
3640
  scrollbarX: m,
3640
- onScrollbarXChange: _,
3641
- scrollbarXEnabled: R,
3642
- onScrollbarXEnabledChange: C,
3643
- scrollbarY: b,
3641
+ onScrollbarXChange: b,
3642
+ scrollbarXEnabled: C,
3643
+ onScrollbarXEnabledChange: x,
3644
+ scrollbarY: v,
3644
3645
  onScrollbarYChange: g,
3645
- scrollbarYEnabled: x,
3646
+ scrollbarYEnabled: R,
3646
3647
  onScrollbarYEnabledChange: k,
3647
- onCornerWidthChange: w,
3648
- onCornerHeightChange: S,
3648
+ onCornerWidthChange: _,
3649
+ onCornerHeightChange: y,
3649
3650
  children: /* @__PURE__ */ E.jsx(
3650
3651
  Nt.div,
3651
3652
  {
@@ -3655,8 +3656,8 @@ var bn = "ScrollArea", [pr] = Wo(bn), [Yo, Se] = pr(bn), gr = p.forwardRef(
3655
3656
  style: {
3656
3657
  position: "relative",
3657
3658
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
3658
- "--radix-scroll-area-corner-width": v + "px",
3659
- "--radix-scroll-area-corner-height": y + "px",
3659
+ "--radix-scroll-area-corner-width": S + "px",
3660
+ "--radix-scroll-area-corner-height": w + "px",
3660
3661
  ...n.style
3661
3662
  }
3662
3663
  }
@@ -3665,10 +3666,10 @@ var bn = "ScrollArea", [pr] = Wo(bn), [Yo, Se] = pr(bn), gr = p.forwardRef(
3665
3666
  );
3666
3667
  }
3667
3668
  );
3668
- gr.displayName = bn;
3669
- var vr = "ScrollAreaViewport", br = p.forwardRef(
3669
+ vr.displayName = bn;
3670
+ var br = "ScrollAreaViewport", _r = p.forwardRef(
3670
3671
  (n, e) => {
3671
- const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Se(vr, t), c = p.useRef(null), a = st(e, c, i.onViewportChange);
3672
+ const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Se(br, t), c = p.useRef(null), a = st(e, c, i.onViewportChange);
3672
3673
  return /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
3673
3674
  /* @__PURE__ */ E.jsx(
3674
3675
  "style",
@@ -3707,17 +3708,17 @@ var vr = "ScrollAreaViewport", br = p.forwardRef(
3707
3708
  ] });
3708
3709
  }
3709
3710
  );
3710
- br.displayName = vr;
3711
- var Te = "ScrollAreaScrollbar", _r = p.forwardRef(
3711
+ _r.displayName = br;
3712
+ var Te = "ScrollAreaScrollbar", wr = p.forwardRef(
3712
3713
  (n, e) => {
3713
3714
  const { forceMount: t, ...r } = n, s = Se(Te, n.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = s, c = n.orientation === "horizontal";
3714
3715
  return p.useEffect(() => (c ? o(!0) : i(!0), () => {
3715
3716
  c ? o(!1) : i(!1);
3716
- }), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ E.jsx(Xo, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ E.jsx(Go, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ E.jsx(wr, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ E.jsx(_n, { ...r, ref: e }) : null;
3717
+ }), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ E.jsx(Go, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ E.jsx(Ko, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ E.jsx(Sr, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ E.jsx(_n, { ...r, ref: e }) : null;
3717
3718
  }
3718
3719
  );
3719
- _r.displayName = Te;
3720
- var Xo = p.forwardRef((n, e) => {
3720
+ wr.displayName = Te;
3721
+ var Go = p.forwardRef((n, e) => {
3721
3722
  const { forceMount: t, ...r } = n, s = Se(Te, n.__scopeScrollArea), [o, i] = p.useState(!1);
3722
3723
  return p.useEffect(() => {
3723
3724
  const c = s.scrollArea;
@@ -3733,15 +3734,15 @@ var Xo = p.forwardRef((n, e) => {
3733
3734
  };
3734
3735
  }
3735
3736
  }, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ E.jsx(It, { present: t || o, children: /* @__PURE__ */ E.jsx(
3736
- wr,
3737
+ Sr,
3737
3738
  {
3738
3739
  "data-state": o ? "visible" : "hidden",
3739
3740
  ...r,
3740
3741
  ref: e
3741
3742
  }
3742
3743
  ) });
3743
- }), Go = p.forwardRef((n, e) => {
3744
- const { forceMount: t, ...r } = n, s = Se(Te, n.__scopeScrollArea), o = n.orientation === "horizontal", i = en(() => a("SCROLL_END"), 100), [c, a] = Bo("hidden", {
3744
+ }), Ko = p.forwardRef((n, e) => {
3745
+ const { forceMount: t, ...r } = n, s = Se(Te, n.__scopeScrollArea), o = n.orientation === "horizontal", i = en(() => a("SCROLL_END"), 100), [c, a] = Yo("hidden", {
3745
3746
  hidden: {
3746
3747
  SCROLL: "scrolling"
3747
3748
  },
@@ -3784,7 +3785,7 @@ var Xo = p.forwardRef((n, e) => {
3784
3785
  onPointerLeave: tt(n.onPointerLeave, () => a("POINTER_LEAVE"))
3785
3786
  }
3786
3787
  ) });
3787
- }), wr = p.forwardRef((n, e) => {
3788
+ }), Sr = p.forwardRef((n, e) => {
3788
3789
  const t = Se(Te, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = p.useState(!1), c = n.orientation === "horizontal", a = en(() => {
3789
3790
  if (t.viewport) {
3790
3791
  const u = t.viewport.offsetWidth < t.viewport.scrollWidth, l = t.viewport.offsetHeight < t.viewport.scrollHeight;
@@ -3804,7 +3805,7 @@ var Xo = p.forwardRef((n, e) => {
3804
3805
  content: 0,
3805
3806
  viewport: 0,
3806
3807
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
3807
- }), u = Rr(c.viewport, c.content), l = {
3808
+ }), u = Cr(c.viewport, c.content), l = {
3808
3809
  ...r,
3809
3810
  sizes: c,
3810
3811
  onSizesChange: a,
@@ -3814,10 +3815,10 @@ var Xo = p.forwardRef((n, e) => {
3814
3815
  onThumbPointerDown: (f) => i.current = f
3815
3816
  };
3816
3817
  function h(f, m) {
3817
- return ei(f, i.current, c, m);
3818
+ return ti(f, i.current, c, m);
3818
3819
  }
3819
3820
  return t === "horizontal" ? /* @__PURE__ */ E.jsx(
3820
- Ko,
3821
+ qo,
3821
3822
  {
3822
3823
  ...l,
3823
3824
  ref: e,
@@ -3835,7 +3836,7 @@ var Xo = p.forwardRef((n, e) => {
3835
3836
  }
3836
3837
  }
3837
3838
  ) : t === "vertical" ? /* @__PURE__ */ E.jsx(
3838
- qo,
3839
+ Jo,
3839
3840
  {
3840
3841
  ...l,
3841
3842
  ref: e,
@@ -3853,12 +3854,12 @@ var Xo = p.forwardRef((n, e) => {
3853
3854
  }
3854
3855
  }
3855
3856
  ) : null;
3856
- }), Ko = p.forwardRef((n, e) => {
3857
+ }), qo = p.forwardRef((n, e) => {
3857
3858
  const { sizes: t, onSizesChange: r, ...s } = n, o = Se(Te, n.__scopeScrollArea), [i, c] = p.useState(), a = p.useRef(null), u = st(e, a, o.onScrollbarXChange);
3858
3859
  return p.useEffect(() => {
3859
3860
  a.current && c(getComputedStyle(a.current));
3860
3861
  }, [a]), /* @__PURE__ */ E.jsx(
3861
- yr,
3862
+ Er,
3862
3863
  {
3863
3864
  "data-orientation": "horizontal",
3864
3865
  ...s,
@@ -3876,7 +3877,7 @@ var Xo = p.forwardRef((n, e) => {
3876
3877
  onWheelScroll: (l, h) => {
3877
3878
  if (o.viewport) {
3878
3879
  const f = o.viewport.scrollLeft + l.deltaX;
3879
- n.onWheelScroll(f), Tr(f, h) && l.preventDefault();
3880
+ n.onWheelScroll(f), Ar(f, h) && l.preventDefault();
3880
3881
  }
3881
3882
  },
3882
3883
  onResize: () => {
@@ -3892,12 +3893,12 @@ var Xo = p.forwardRef((n, e) => {
3892
3893
  }
3893
3894
  }
3894
3895
  );
3895
- }), qo = p.forwardRef((n, e) => {
3896
+ }), Jo = p.forwardRef((n, e) => {
3896
3897
  const { sizes: t, onSizesChange: r, ...s } = n, o = Se(Te, n.__scopeScrollArea), [i, c] = p.useState(), a = p.useRef(null), u = st(e, a, o.onScrollbarYChange);
3897
3898
  return p.useEffect(() => {
3898
3899
  a.current && c(getComputedStyle(a.current));
3899
3900
  }, [a]), /* @__PURE__ */ E.jsx(
3900
- yr,
3901
+ Er,
3901
3902
  {
3902
3903
  "data-orientation": "vertical",
3903
3904
  ...s,
@@ -3916,7 +3917,7 @@ var Xo = p.forwardRef((n, e) => {
3916
3917
  onWheelScroll: (l, h) => {
3917
3918
  if (o.viewport) {
3918
3919
  const f = o.viewport.scrollTop + l.deltaY;
3919
- n.onWheelScroll(f), Tr(f, h) && l.preventDefault();
3920
+ n.onWheelScroll(f), Ar(f, h) && l.preventDefault();
3920
3921
  }
3921
3922
  },
3922
3923
  onResize: () => {
@@ -3932,7 +3933,7 @@ var Xo = p.forwardRef((n, e) => {
3932
3933
  }
3933
3934
  }
3934
3935
  );
3935
- }), [Jo, Sr] = pr(Te), yr = p.forwardRef((n, e) => {
3936
+ }), [Zo, yr] = gr(Te), Er = p.forwardRef((n, e) => {
3936
3937
  const {
3937
3938
  __scopeScrollArea: t,
3938
3939
  sizes: r,
@@ -3945,28 +3946,28 @@ var Xo = p.forwardRef((n, e) => {
3945
3946
  onWheelScroll: l,
3946
3947
  onResize: h,
3947
3948
  ...f
3948
- } = n, m = Se(Te, t), [_, b] = p.useState(null), g = st(e, (L) => b(L)), v = p.useRef(null), w = p.useRef(""), y = m.viewport, S = r.content - r.viewport, R = Qe(l), C = Qe(a), x = en(h, 10);
3949
+ } = n, m = Se(Te, t), [b, v] = p.useState(null), g = st(e, (L) => v(L)), S = p.useRef(null), _ = p.useRef(""), w = m.viewport, y = r.content - r.viewport, C = Qe(l), x = Qe(a), R = en(h, 10);
3949
3950
  function k(L) {
3950
- if (v.current) {
3951
- const A = L.clientX - v.current.left, O = L.clientY - v.current.top;
3951
+ if (S.current) {
3952
+ const A = L.clientX - S.current.left, O = L.clientY - S.current.top;
3952
3953
  u({ x: A, y: O });
3953
3954
  }
3954
3955
  }
3955
3956
  return p.useEffect(() => {
3956
3957
  const L = (A) => {
3957
3958
  const O = A.target;
3958
- _?.contains(O) && R(A, S);
3959
+ b?.contains(O) && C(A, y);
3959
3960
  };
3960
3961
  return document.addEventListener("wheel", L, { passive: !1 }), () => document.removeEventListener("wheel", L, { passive: !1 });
3961
- }, [y, _, S, R]), p.useEffect(C, [r, C]), At(_, x), At(m.content, x), /* @__PURE__ */ E.jsx(
3962
- Jo,
3962
+ }, [w, b, y, C]), p.useEffect(x, [r, x]), At(b, R), At(m.content, R), /* @__PURE__ */ E.jsx(
3963
+ Zo,
3963
3964
  {
3964
3965
  scope: t,
3965
- scrollbar: _,
3966
+ scrollbar: b,
3966
3967
  hasThumb: s,
3967
3968
  onThumbChange: Qe(o),
3968
3969
  onThumbPointerUp: Qe(i),
3969
- onThumbPositionChange: C,
3970
+ onThumbPositionChange: x,
3970
3971
  onThumbPointerDown: Qe(c),
3971
3972
  children: /* @__PURE__ */ E.jsx(
3972
3973
  Nt.div,
@@ -3975,25 +3976,25 @@ var Xo = p.forwardRef((n, e) => {
3975
3976
  ref: g,
3976
3977
  style: { position: "absolute", ...f.style },
3977
3978
  onPointerDown: tt(n.onPointerDown, (L) => {
3978
- L.button === 0 && (L.target.setPointerCapture(L.pointerId), v.current = _.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), k(L));
3979
+ L.button === 0 && (L.target.setPointerCapture(L.pointerId), S.current = b.getBoundingClientRect(), _.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), k(L));
3979
3980
  }),
3980
3981
  onPointerMove: tt(n.onPointerMove, k),
3981
3982
  onPointerUp: tt(n.onPointerUp, (L) => {
3982
3983
  const A = L.target;
3983
- A.hasPointerCapture(L.pointerId) && A.releasePointerCapture(L.pointerId), document.body.style.webkitUserSelect = w.current, m.viewport && (m.viewport.style.scrollBehavior = ""), v.current = null;
3984
+ A.hasPointerCapture(L.pointerId) && A.releasePointerCapture(L.pointerId), document.body.style.webkitUserSelect = _.current, m.viewport && (m.viewport.style.scrollBehavior = ""), S.current = null;
3984
3985
  })
3985
3986
  }
3986
3987
  )
3987
3988
  }
3988
3989
  );
3989
- }), Kt = "ScrollAreaThumb", Er = p.forwardRef(
3990
+ }), Kt = "ScrollAreaThumb", Rr = p.forwardRef(
3990
3991
  (n, e) => {
3991
- const { forceMount: t, ...r } = n, s = Sr(Kt, n.__scopeScrollArea);
3992
- return /* @__PURE__ */ E.jsx(It, { present: t || s.hasThumb, children: /* @__PURE__ */ E.jsx(Zo, { ref: e, ...r }) });
3992
+ const { forceMount: t, ...r } = n, s = yr(Kt, n.__scopeScrollArea);
3993
+ return /* @__PURE__ */ E.jsx(It, { present: t || s.hasThumb, children: /* @__PURE__ */ E.jsx(Qo, { ref: e, ...r }) });
3993
3994
  }
3994
- ), Zo = p.forwardRef(
3995
+ ), Qo = p.forwardRef(
3995
3996
  (n, e) => {
3996
- const { __scopeScrollArea: t, style: r, ...s } = n, o = Se(Kt, t), i = Sr(Kt, t), { onThumbPositionChange: c } = i, a = st(
3997
+ const { __scopeScrollArea: t, style: r, ...s } = n, o = Se(Kt, t), i = yr(Kt, t), { onThumbPositionChange: c } = i, a = st(
3997
3998
  e,
3998
3999
  (h) => i.onThumbChange(h)
3999
4000
  ), u = p.useRef(void 0), l = en(() => {
@@ -4004,7 +4005,7 @@ var Xo = p.forwardRef((n, e) => {
4004
4005
  if (h) {
4005
4006
  const f = () => {
4006
4007
  if (l(), !u.current) {
4007
- const m = ti(h, c);
4008
+ const m = ni(h, c);
4008
4009
  u.current = m, c();
4009
4010
  }
4010
4011
  };
@@ -4022,23 +4023,23 @@ var Xo = p.forwardRef((n, e) => {
4022
4023
  ...r
4023
4024
  },
4024
4025
  onPointerDownCapture: tt(n.onPointerDownCapture, (h) => {
4025
- const m = h.target.getBoundingClientRect(), _ = h.clientX - m.left, b = h.clientY - m.top;
4026
- i.onThumbPointerDown({ x: _, y: b });
4026
+ const m = h.target.getBoundingClientRect(), b = h.clientX - m.left, v = h.clientY - m.top;
4027
+ i.onThumbPointerDown({ x: b, y: v });
4027
4028
  }),
4028
4029
  onPointerUp: tt(n.onPointerUp, i.onThumbPointerUp)
4029
4030
  }
4030
4031
  );
4031
4032
  }
4032
4033
  );
4033
- Er.displayName = Kt;
4034
+ Rr.displayName = Kt;
4034
4035
  var wn = "ScrollAreaCorner", xr = p.forwardRef(
4035
4036
  (n, e) => {
4036
4037
  const t = Se(wn, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
4037
- return t.type !== "scroll" && r ? /* @__PURE__ */ E.jsx(Qo, { ...n, ref: e }) : null;
4038
+ return t.type !== "scroll" && r ? /* @__PURE__ */ E.jsx(ei, { ...n, ref: e }) : null;
4038
4039
  }
4039
4040
  );
4040
4041
  xr.displayName = wn;
4041
- var Qo = p.forwardRef((n, e) => {
4042
+ var ei = p.forwardRef((n, e) => {
4042
4043
  const { __scopeScrollArea: t, ...r } = n, s = Se(wn, t), [o, i] = p.useState(0), [c, a] = p.useState(0), u = !!(o && c);
4043
4044
  return At(s.scrollbarX, () => {
4044
4045
  const l = s.scrollbarX?.offsetHeight || 0;
@@ -4066,33 +4067,33 @@ var Qo = p.forwardRef((n, e) => {
4066
4067
  function qt(n) {
4067
4068
  return n ? parseInt(n, 10) : 0;
4068
4069
  }
4069
- function Rr(n, e) {
4070
+ function Cr(n, e) {
4070
4071
  const t = n / e;
4071
4072
  return isNaN(t) ? 0 : t;
4072
4073
  }
4073
4074
  function Qt(n) {
4074
- const e = Rr(n.viewport, n.content), t = n.scrollbar.paddingStart + n.scrollbar.paddingEnd, r = (n.scrollbar.size - t) * e;
4075
+ const e = Cr(n.viewport, n.content), t = n.scrollbar.paddingStart + n.scrollbar.paddingEnd, r = (n.scrollbar.size - t) * e;
4075
4076
  return Math.max(r, 18);
4076
4077
  }
4077
- function ei(n, e, t, r = "ltr") {
4078
+ function ti(n, e, t, r = "ltr") {
4078
4079
  const s = Qt(t), o = s / 2, i = e || o, c = s - i, a = t.scrollbar.paddingStart + i, u = t.scrollbar.size - t.scrollbar.paddingEnd - c, l = t.content - t.viewport, h = r === "ltr" ? [0, l] : [l * -1, 0];
4079
- return Cr([a, u], h)(n);
4080
+ return Tr([a, u], h)(n);
4080
4081
  }
4081
4082
  function Kn(n, e, t = "ltr") {
4082
- const r = Qt(e), s = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = e.scrollbar.size - s, i = e.content - e.viewport, c = o - r, a = t === "ltr" ? [0, i] : [i * -1, 0], u = Ho(n, a);
4083
- return Cr([0, i], [0, c])(u);
4083
+ const r = Qt(e), s = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = e.scrollbar.size - s, i = e.content - e.viewport, c = o - r, a = t === "ltr" ? [0, i] : [i * -1, 0], u = Bo(n, a);
4084
+ return Tr([0, i], [0, c])(u);
4084
4085
  }
4085
- function Cr(n, e) {
4086
+ function Tr(n, e) {
4086
4087
  return (t) => {
4087
4088
  if (n[0] === n[1] || e[0] === e[1]) return e[0];
4088
4089
  const r = (e[1] - e[0]) / (n[1] - n[0]);
4089
4090
  return e[0] + r * (t - n[0]);
4090
4091
  };
4091
4092
  }
4092
- function Tr(n, e) {
4093
+ function Ar(n, e) {
4093
4094
  return n > 0 && n < e;
4094
4095
  }
4095
- var ti = (n, e = () => {
4096
+ var ni = (n, e = () => {
4096
4097
  }) => {
4097
4098
  let t = { left: n.scrollLeft, top: n.scrollTop }, r = 0;
4098
4099
  return (function s() {
@@ -4120,7 +4121,7 @@ function At(n, e) {
4120
4121
  }
4121
4122
  }, [n, t]);
4122
4123
  }
4123
- var ni = gr, ri = br, si = xr;
4124
+ var ri = vr, si = _r, oi = xr;
4124
4125
  function qn(n) {
4125
4126
  const e = ze.c(9);
4126
4127
  let t, r, s;
@@ -4131,12 +4132,12 @@ function qn(n) {
4131
4132
  } = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s) : (t = e[1], r = e[2], s = e[3]);
4132
4133
  const o = s === void 0 ? "vertical" : s;
4133
4134
  let i;
4134
- e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ E.jsx(Er, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
4135
+ e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ E.jsx(Rr, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
4135
4136
  let c;
4136
- return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ E.jsx(_r, { "data-slot": "scroll-area-scrollbar", orientation: o, className: t, ...r, children: i }), e[5] = t, e[6] = o, e[7] = r, e[8] = c) : c = e[8], c;
4137
+ return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ E.jsx(wr, { "data-slot": "scroll-area-scrollbar", orientation: o, className: t, ...r, children: i }), e[5] = t, e[6] = o, e[7] = r, e[8] = c) : c = e[8], c;
4137
4138
  }
4138
- const ci = nt.forwardRef((n, e) => {
4139
- const t = Vr(n), {
4139
+ const ai = nt.forwardRef((n, e) => {
4140
+ const t = Ur(n), {
4140
4141
  style: r
4141
4142
  } = n;
4142
4143
  let {
@@ -4151,23 +4152,23 @@ const ci = nt.forwardRef((n, e) => {
4151
4152
  onChange: f,
4152
4153
  onScroll: m
4153
4154
  } = t;
4154
- const _ = ie(null), [b, g] = Tt(s), [v, w] = Tt(dn), [y, S] = Tt(Ir), R = Dr((A) => {
4155
+ const b = ie(null), [v, g] = Tt(s), [S, _] = Tt(dn), [w, y] = Tt(kr), C = Zn((A) => {
4155
4156
  const O = Math.min(h, Math.max(l, A));
4156
- w(O);
4157
+ _(O);
4157
4158
  }, [h, l]);
4158
4159
  pn(() => {
4159
- R(Ur(s, {
4160
+ C($r(s, {
4160
4161
  scale: c
4161
4162
  })), g(s);
4162
- }, [s, l, h, c, R]);
4163
- const C = (A) => {
4163
+ }, [s, l, h, c, C]);
4164
+ const x = (A) => {
4164
4165
  f?.(A);
4165
- }, x = (A) => {
4166
+ }, R = (A) => {
4166
4167
  let {
4167
4168
  left: O,
4168
4169
  time: $
4169
4170
  } = A;
4170
- return typeof $ < "u" ? (S($), !0) : typeof O < "u" ? (S(rt(O, {
4171
+ return typeof $ < "u" ? (y($), !0) : typeof O < "u" ? (y(rt(O, {
4171
4172
  startLeft: u,
4172
4173
  scale: c,
4173
4174
  scaleWidth: a
@@ -4175,40 +4176,40 @@ const ci = nt.forwardRef((n, e) => {
4175
4176
  };
4176
4177
  Jn(e, () => ({
4177
4178
  get target() {
4178
- return _.current;
4179
+ return b.current;
4179
4180
  },
4180
4181
  set time(A) {
4181
- x({
4182
+ R({
4182
4183
  time: A
4183
4184
  });
4184
4185
  },
4185
4186
  get time() {
4186
- return y;
4187
+ return w;
4187
4188
  },
4188
4189
  setScrollLeft: (A) => {
4189
- _.current && (_.current.scrollLeft = A);
4190
+ b.current && (b.current.scrollLeft = A);
4190
4191
  },
4191
4192
  setScrollTop: (A) => {
4192
- _.current && (_.current.scrollTop = A);
4193
+ b.current && (b.current.scrollTop = A);
4193
4194
  }
4194
4195
  }));
4195
4196
  const {
4196
4197
  width: k,
4197
4198
  height: L
4198
- } = Ao(_);
4199
- return /* @__PURE__ */ E.jsxs(ni, { style: r, className: `${ln} ${i ? ln + "-disable" : ""}`, "data-slot": "scroll-area", children: [
4200
- /* @__PURE__ */ E.jsxs(ri, { "data-slot": "scroll-area-viewport", ref: _, onScroll: (A) => {
4199
+ } = Po(b);
4200
+ return /* @__PURE__ */ E.jsxs(ri, { style: r, className: `${ln} ${i ? ln + "-disable" : ""}`, "data-slot": "scroll-area", children: [
4201
+ /* @__PURE__ */ E.jsxs(si, { "data-slot": "scroll-area-viewport", ref: b, onScroll: (A) => {
4201
4202
  m?.(A.currentTarget);
4202
4203
  }, children: [
4203
- /* @__PURE__ */ E.jsx(po, { ...t, setCursor: x, scaleCount: v, scrollElementRef: _ }),
4204
- /* @__PURE__ */ E.jsx(mo, { ...t, scrollElementRef: _, timelineWidth: k, timelineHeight: L, disableDrag: i, editorData: b, cursorTime: y, scaleCount: v, setScaleCount: R, setEditorData: C }),
4205
- !o && /* @__PURE__ */ E.jsx(Po, { ...t, timelineWidth: k, height: L, scaleCount: v, setScaleCount: R, setCursor: x, cursorTime: y, editorData: b, scrollElementRef: _ })
4204
+ /* @__PURE__ */ E.jsx(go, { ...t, setCursor: R, scaleCount: S, scrollElementRef: b }),
4205
+ /* @__PURE__ */ E.jsx(po, { ...t, scrollElementRef: b, timelineWidth: k, timelineHeight: L, disableDrag: i, editorData: v, cursorTime: w, scaleCount: S, setScaleCount: C, setEditorData: x }),
4206
+ !o && /* @__PURE__ */ E.jsx(Do, { ...t, timelineWidth: k, height: L, scaleCount: S, setScaleCount: C, setCursor: R, cursorTime: w, editorData: v, scrollElementRef: b })
4206
4207
  ] }),
4207
4208
  /* @__PURE__ */ E.jsx(qn, { orientation: "horizontal" }),
4208
4209
  /* @__PURE__ */ E.jsx(qn, { orientation: "vertical" }),
4209
- /* @__PURE__ */ E.jsx(si, {})
4210
+ /* @__PURE__ */ E.jsx(oi, {})
4210
4211
  ] });
4211
4212
  });
4212
4213
  export {
4213
- ci as Timeline
4214
+ ai as Timeline
4214
4215
  };