@cyca/react-timeline-editor 0.2.4-alpha.4 → 0.2.4-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/react-timeline-editor.cjs +4 -4
- package/dist/react-timeline-editor.js +639 -639
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as v from "react";
|
|
2
2
|
import Ot, { useRef as se, useEffect as ot, useLayoutEffect as sn, useImperativeHandle as rr, useState as jt, useMemo as Mr, useCallback as Nr, useEffectEvent as Ir, createElement as kr } from "react";
|
|
3
|
-
import { D as Zt, a as sr, b as Qt, c as on, d as
|
|
3
|
+
import { D as Zt, a as sr, b as Qt, c as on, d as An, M as Wr, P as bn, e as Sn, f as en, p as Oe, g as En, h as kt, i as zr, j as Mt, k as jr, l as Fr, S as Cn } from "./index-aC1-xztU.js";
|
|
4
4
|
import { flushSync as Vr } from "react-dom";
|
|
5
5
|
var Bt = { exports: {} }, Wt = {};
|
|
6
6
|
var Pn;
|
|
@@ -35,13 +35,13 @@ function $r() {
|
|
|
35
35
|
return d.$$typeof === I ? null : d.displayName || d.name || null;
|
|
36
36
|
if (typeof d == "string") return d;
|
|
37
37
|
switch (d) {
|
|
38
|
-
case
|
|
38
|
+
case w:
|
|
39
39
|
return "Fragment";
|
|
40
40
|
case b:
|
|
41
41
|
return "Profiler";
|
|
42
|
-
case
|
|
42
|
+
case x:
|
|
43
43
|
return "StrictMode";
|
|
44
|
-
case
|
|
44
|
+
case _:
|
|
45
45
|
return "Suspense";
|
|
46
46
|
case P:
|
|
47
47
|
return "SuspenseList";
|
|
@@ -52,21 +52,21 @@ function $r() {
|
|
|
52
52
|
switch (typeof d.tag == "number" && console.error(
|
|
53
53
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
54
54
|
), d.$$typeof) {
|
|
55
|
-
case
|
|
55
|
+
case y:
|
|
56
56
|
return "Portal";
|
|
57
|
-
case
|
|
57
|
+
case m:
|
|
58
58
|
return d.displayName || "Context";
|
|
59
|
-
case
|
|
59
|
+
case g:
|
|
60
60
|
return (d._context.displayName || "Context") + ".Consumer";
|
|
61
61
|
case R:
|
|
62
|
-
var
|
|
63
|
-
return d = d.displayName, d || (d =
|
|
62
|
+
var T = d.render;
|
|
63
|
+
return d = d.displayName, d || (d = T.displayName || T.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
64
64
|
case L:
|
|
65
|
-
return
|
|
66
|
-
case
|
|
67
|
-
|
|
65
|
+
return T = d.displayName || null, T !== null ? T : n(d.type) || "Memo";
|
|
66
|
+
case C:
|
|
67
|
+
T = d._payload, d = d._init;
|
|
68
68
|
try {
|
|
69
|
-
return n(d(
|
|
69
|
+
return n(d(T));
|
|
70
70
|
} catch {
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -78,33 +78,33 @@ function $r() {
|
|
|
78
78
|
function t(d) {
|
|
79
79
|
try {
|
|
80
80
|
e(d);
|
|
81
|
-
var
|
|
81
|
+
var T = !1;
|
|
82
82
|
} catch {
|
|
83
|
-
|
|
83
|
+
T = !0;
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
var D =
|
|
85
|
+
if (T) {
|
|
86
|
+
T = console;
|
|
87
|
+
var D = T.error, z = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
88
88
|
return D.call(
|
|
89
|
-
|
|
89
|
+
T,
|
|
90
90
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
91
91
|
z
|
|
92
92
|
), e(d);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
function r(d) {
|
|
96
|
-
if (d ===
|
|
97
|
-
if (typeof d == "object" && d !== null && d.$$typeof ===
|
|
96
|
+
if (d === w) return "<>";
|
|
97
|
+
if (typeof d == "object" && d !== null && d.$$typeof === C)
|
|
98
98
|
return "<...>";
|
|
99
99
|
try {
|
|
100
|
-
var
|
|
101
|
-
return
|
|
100
|
+
var T = n(d);
|
|
101
|
+
return T ? "<" + T + ">" : "<...>";
|
|
102
102
|
} catch {
|
|
103
103
|
return "<...>";
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
function s() {
|
|
107
|
-
var d =
|
|
107
|
+
var d = K.A;
|
|
108
108
|
return d === null ? null : d.getOwner();
|
|
109
109
|
}
|
|
110
110
|
function o() {
|
|
@@ -112,16 +112,16 @@ function $r() {
|
|
|
112
112
|
}
|
|
113
113
|
function i(d) {
|
|
114
114
|
if (G.call(d, "key")) {
|
|
115
|
-
var
|
|
116
|
-
if (
|
|
115
|
+
var T = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
116
|
+
if (T && T.isReactWarning) return !1;
|
|
117
117
|
}
|
|
118
118
|
return d.key !== void 0;
|
|
119
119
|
}
|
|
120
|
-
function a(d,
|
|
120
|
+
function a(d, T) {
|
|
121
121
|
function D() {
|
|
122
122
|
N || (N = !0, console.error(
|
|
123
123
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
124
|
-
|
|
124
|
+
T
|
|
125
125
|
));
|
|
126
126
|
}
|
|
127
127
|
D.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
@@ -131,16 +131,16 @@ function $r() {
|
|
|
131
131
|
}
|
|
132
132
|
function c() {
|
|
133
133
|
var d = n(this.type);
|
|
134
|
-
return
|
|
134
|
+
return Y[d] || (Y[d] = !0, console.error(
|
|
135
135
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
136
136
|
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
137
137
|
}
|
|
138
|
-
function u(d,
|
|
138
|
+
function u(d, T, D, z, he, pe) {
|
|
139
139
|
var H = D.ref;
|
|
140
140
|
return d = {
|
|
141
141
|
$$typeof: S,
|
|
142
142
|
type: d,
|
|
143
|
-
key:
|
|
143
|
+
key: T,
|
|
144
144
|
props: D,
|
|
145
145
|
_owner: z
|
|
146
146
|
}, (H !== void 0 ? H : null) !== null ? Object.defineProperty(d, "ref", {
|
|
@@ -168,22 +168,22 @@ function $r() {
|
|
|
168
168
|
value: pe
|
|
169
169
|
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
170
170
|
}
|
|
171
|
-
function l(d,
|
|
172
|
-
var H =
|
|
171
|
+
function l(d, T, D, z, he, pe) {
|
|
172
|
+
var H = T.children;
|
|
173
173
|
if (H !== void 0)
|
|
174
174
|
if (z)
|
|
175
|
-
if (
|
|
175
|
+
if (B(H)) {
|
|
176
176
|
for (z = 0; z < H.length; z++)
|
|
177
|
-
|
|
177
|
+
h(H[z]);
|
|
178
178
|
Object.freeze && Object.freeze(H);
|
|
179
179
|
} else
|
|
180
180
|
console.error(
|
|
181
181
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
182
182
|
);
|
|
183
|
-
else
|
|
184
|
-
if (G.call(
|
|
183
|
+
else h(H);
|
|
184
|
+
if (G.call(T, "key")) {
|
|
185
185
|
H = n(d);
|
|
186
|
-
var Q = Object.keys(
|
|
186
|
+
var Q = Object.keys(T).filter(function(ne) {
|
|
187
187
|
return ne !== "key";
|
|
188
188
|
});
|
|
189
189
|
z = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", O[H + z] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
@@ -199,11 +199,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
199
199
|
H
|
|
200
200
|
), O[H + z] = !0);
|
|
201
201
|
}
|
|
202
|
-
if (H = null, D !== void 0 && (t(D), H = "" + D), i(
|
|
202
|
+
if (H = null, D !== void 0 && (t(D), H = "" + D), i(T) && (t(T.key), H = "" + T.key), "key" in T) {
|
|
203
203
|
D = {};
|
|
204
|
-
for (var j in
|
|
205
|
-
j !== "key" && (D[j] =
|
|
206
|
-
} else D =
|
|
204
|
+
for (var j in T)
|
|
205
|
+
j !== "key" && (D[j] = T[j]);
|
|
206
|
+
} else D = T;
|
|
207
207
|
return H && a(
|
|
208
208
|
D,
|
|
209
209
|
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
@@ -216,13 +216,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
216
216
|
pe
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof ===
|
|
219
|
+
function h(d) {
|
|
220
|
+
f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === C && (d._payload.status === "fulfilled" ? f(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
221
221
|
}
|
|
222
222
|
function f(d) {
|
|
223
223
|
return typeof d == "object" && d !== null && d.$$typeof === S;
|
|
224
224
|
}
|
|
225
|
-
var p = Ot, S = Symbol.for("react.transitional.element"),
|
|
225
|
+
var p = Ot, S = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), m = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), E = Symbol.for("react.activity"), I = Symbol.for("react.client.reference"), K = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, B = Array.isArray, oe = console.createTask ? console.createTask : function() {
|
|
226
226
|
return null;
|
|
227
227
|
};
|
|
228
228
|
p = {
|
|
@@ -230,25 +230,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
230
230
|
return d();
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
|
-
var N,
|
|
233
|
+
var N, Y = {}, J = p.react_stack_bottom_frame.bind(
|
|
234
234
|
p,
|
|
235
235
|
o
|
|
236
236
|
)(), W = oe(r(o)), O = {};
|
|
237
|
-
zt.Fragment =
|
|
238
|
-
var z = 1e4 >
|
|
237
|
+
zt.Fragment = w, zt.jsx = function(d, T, D) {
|
|
238
|
+
var z = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
239
239
|
return l(
|
|
240
240
|
d,
|
|
241
|
-
|
|
241
|
+
T,
|
|
242
242
|
D,
|
|
243
243
|
!1,
|
|
244
244
|
z ? Error("react-stack-top-frame") : J,
|
|
245
245
|
z ? oe(r(d)) : W
|
|
246
246
|
);
|
|
247
|
-
}, zt.jsxs = function(d,
|
|
248
|
-
var z = 1e4 >
|
|
247
|
+
}, zt.jsxs = function(d, T, D) {
|
|
248
|
+
var z = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
249
249
|
return l(
|
|
250
250
|
d,
|
|
251
|
-
|
|
251
|
+
T,
|
|
252
252
|
D,
|
|
253
253
|
!0,
|
|
254
254
|
z ? Error("react-stack-top-frame") : J,
|
|
@@ -385,11 +385,11 @@ function Gr(n) {
|
|
|
385
385
|
startLeft: i = on,
|
|
386
386
|
minScaleCount: a,
|
|
387
387
|
maxScaleCount: c = 1 / 0,
|
|
388
|
-
rowHeight: u =
|
|
388
|
+
rowHeight: u = An,
|
|
389
389
|
autoScrollSpeed: l = 1,
|
|
390
|
-
autoScrollMaxSpeed:
|
|
390
|
+
autoScrollMaxSpeed: h = 10
|
|
391
391
|
} = n;
|
|
392
|
-
r <= 0 && (tt.error("Error: scale must be greater than 0!"), r = Zt), s <= 0 && (tt.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (tt.warn("Warning: scaleWidth must be greater than 0!"), o = Qt), i < 0 && (tt.warn("Warning: startLeft cannot be less than 0!"), i = 0), a && typeof a == "number" && (a < 1 && (tt.warn("Warning: minScaleCount must be greater than 1!"), a = Wr), a = parseInt(a + ""), c < a && (tt.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), c = a)), c = c === 1 / 0 ? 1 / 0 : parseInt(c + ""), u <= 0 && (tt.warn("Warning: rowHeight must be greater than 0!"), u =
|
|
392
|
+
r <= 0 && (tt.error("Error: scale must be greater than 0!"), r = Zt), s <= 0 && (tt.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (tt.warn("Warning: scaleWidth must be greater than 0!"), o = Qt), i < 0 && (tt.warn("Warning: startLeft cannot be less than 0!"), i = 0), a && typeof a == "number" && (a < 1 && (tt.warn("Warning: minScaleCount must be greater than 1!"), a = Wr), a = parseInt(a + ""), c < a && (tt.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), c = a)), c = c === 1 / 0 ? 1 / 0 : parseInt(c + ""), u <= 0 && (tt.warn("Warning: rowHeight must be greater than 0!"), u = An);
|
|
393
393
|
const f = {
|
|
394
394
|
...n
|
|
395
395
|
};
|
|
@@ -405,7 +405,7 @@ function Gr(n) {
|
|
|
405
405
|
maxScaleCount: c,
|
|
406
406
|
rowHeight: u,
|
|
407
407
|
autoScrollSpeed: l,
|
|
408
|
-
autoScrollMaxSpeed:
|
|
408
|
+
autoScrollMaxSpeed: h
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
var Yt = { exports: {} }, dn = {};
|
|
@@ -439,7 +439,7 @@ var In;
|
|
|
439
439
|
function Qr() {
|
|
440
440
|
return In || (In = 1, process.env.NODE_ENV === "production" ? Yt.exports = Jr() : Yt.exports = Zr()), Yt.exports;
|
|
441
441
|
}
|
|
442
|
-
var
|
|
442
|
+
var Ce = Qr();
|
|
443
443
|
function es(n) {
|
|
444
444
|
for (var e = [], t = 1; t < arguments.length; t++)
|
|
445
445
|
e[t - 1] = arguments[t];
|
|
@@ -453,7 +453,7 @@ function ge(...n) {
|
|
|
453
453
|
return es(`${bn}-`, ...n);
|
|
454
454
|
}
|
|
455
455
|
const ts = (n) => {
|
|
456
|
-
const e =
|
|
456
|
+
const e = Ce.c(11), {
|
|
457
457
|
isMoving: t,
|
|
458
458
|
movePositions: r,
|
|
459
459
|
assistPositions: s
|
|
@@ -464,7 +464,7 @@ const ts = (n) => {
|
|
|
464
464
|
let u;
|
|
465
465
|
e[5] !== s ? (u = s === void 0 ? [] : s, e[5] = s, e[6] = u) : u = e[6];
|
|
466
466
|
const l = u;
|
|
467
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = ge("snap-line-container"), e[7] = o) : o = e[7], i = t && c.filter((
|
|
467
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = ge("snap-line-container"), e[7] = o) : o = e[7], i = t && c.filter((h) => l.includes(h)).map(ns), e[0] = t, e[1] = r, e[2] = s, e[3] = o, e[4] = i;
|
|
468
468
|
} else
|
|
469
469
|
o = e[3], i = e[4];
|
|
470
470
|
let a;
|
|
@@ -477,26 +477,26 @@ function ns(n, e) {
|
|
|
477
477
|
}
|
|
478
478
|
const rs = 1, ss = 10, kn = 10;
|
|
479
479
|
function os(n, e, t) {
|
|
480
|
-
const r =
|
|
480
|
+
const r = Ce.c(15), s = e === void 0 ? rs : e, o = t === void 0 ? ss : t, i = se(Number.MIN_SAFE_INTEGER), a = se(Number.MAX_SAFE_INTEGER), c = se(s), u = se(void 0);
|
|
481
481
|
let l;
|
|
482
482
|
r[0] !== n ? (l = () => {
|
|
483
483
|
if (n?.current) {
|
|
484
484
|
const {
|
|
485
|
-
left:
|
|
486
|
-
width:
|
|
485
|
+
left: g,
|
|
486
|
+
width: m
|
|
487
487
|
} = n.current.getBoundingClientRect();
|
|
488
|
-
i.current =
|
|
488
|
+
i.current = g, a.current = g + m;
|
|
489
489
|
}
|
|
490
490
|
}, r[0] = n, r[1] = l) : l = r[1];
|
|
491
|
-
const
|
|
491
|
+
const h = l;
|
|
492
492
|
let f;
|
|
493
|
-
r[2] !== o || r[3] !== s ? (f = (
|
|
494
|
-
if (
|
|
493
|
+
r[2] !== o || r[3] !== s ? (f = (g, m) => {
|
|
494
|
+
if (g.clientX >= a.current || g.clientX <= i.current) {
|
|
495
495
|
u.current !== void 0 && cancelAnimationFrame(u.current);
|
|
496
|
-
const R = Math.abs(
|
|
496
|
+
const R = Math.abs(g.clientX >= a.current ? g.clientX - a.current : g.clientX - i.current);
|
|
497
497
|
c.current = Math.min(Number((R / kn).toFixed(0)) * s, o);
|
|
498
|
-
const P = (
|
|
499
|
-
|
|
498
|
+
const P = (g.clientX >= a.current ? 1 : -1) * c.current, L = () => {
|
|
499
|
+
m && m(P), u.current = requestAnimationFrame(L);
|
|
500
500
|
};
|
|
501
501
|
return u.current = requestAnimationFrame(L), !1;
|
|
502
502
|
} else
|
|
@@ -505,32 +505,32 @@ function os(n, e, t) {
|
|
|
505
505
|
}, r[2] = o, r[3] = s, r[4] = f) : f = r[4];
|
|
506
506
|
const p = f;
|
|
507
507
|
let S;
|
|
508
|
-
r[5] !== o || r[6] !== s ? (S = (
|
|
509
|
-
if (
|
|
508
|
+
r[5] !== o || r[6] !== s ? (S = (g, m, R) => {
|
|
509
|
+
if (g.clientX >= a.current || g.clientX < i.current) {
|
|
510
510
|
u.current !== void 0 && cancelAnimationFrame(u.current);
|
|
511
|
-
const
|
|
512
|
-
c.current = Math.min(Number((
|
|
513
|
-
const L = (
|
|
514
|
-
R && R(L), u.current = requestAnimationFrame(
|
|
511
|
+
const _ = Math.abs(g.clientX >= a.current ? g.clientX - a.current : g.clientX - i.current);
|
|
512
|
+
c.current = Math.min(Number((_ / kn).toFixed(0)) * s, o);
|
|
513
|
+
const L = (g.clientX >= a.current ? 1 : -1) * c.current, C = () => {
|
|
514
|
+
R && R(L), u.current = requestAnimationFrame(C);
|
|
515
515
|
};
|
|
516
|
-
return u.current = requestAnimationFrame(
|
|
516
|
+
return u.current = requestAnimationFrame(C), !1;
|
|
517
517
|
} else
|
|
518
518
|
u.current !== void 0 && cancelAnimationFrame(u.current);
|
|
519
519
|
return !0;
|
|
520
520
|
}, r[5] = o, r[6] = s, r[7] = S) : S = r[7];
|
|
521
|
-
const
|
|
522
|
-
let
|
|
523
|
-
r[8] !== s ? (
|
|
521
|
+
const y = S;
|
|
522
|
+
let w;
|
|
523
|
+
r[8] !== s ? (w = () => {
|
|
524
524
|
i.current = Number.MIN_SAFE_INTEGER, a.current = Number.MAX_SAFE_INTEGER, c.current = s, u.current !== void 0 && cancelAnimationFrame(u.current);
|
|
525
|
-
}, r[8] = s, r[9] =
|
|
526
|
-
const
|
|
525
|
+
}, r[8] = s, r[9] = w) : w = r[9];
|
|
526
|
+
const x = w;
|
|
527
527
|
let b;
|
|
528
|
-
return r[10] !== p || r[11] !==
|
|
529
|
-
initAutoScroll:
|
|
528
|
+
return r[10] !== p || r[11] !== y || r[12] !== h || r[13] !== x ? (b = {
|
|
529
|
+
initAutoScroll: h,
|
|
530
530
|
dealDragAutoScroll: p,
|
|
531
|
-
dealResizeAutoScroll:
|
|
532
|
-
stopAutoScroll:
|
|
533
|
-
}, r[10] = p, r[11] =
|
|
531
|
+
dealResizeAutoScroll: y,
|
|
532
|
+
stopAutoScroll: x
|
|
533
|
+
}, r[10] = p, r[11] = y, r[12] = h, r[13] = x, r[14] = b) : b = r[14], b;
|
|
534
534
|
}
|
|
535
535
|
function is(n, e, t) {
|
|
536
536
|
return Math.max(e, Math.min(n, t));
|
|
@@ -776,31 +776,31 @@ class ys {
|
|
|
776
776
|
t.args = this.args;
|
|
777
777
|
let o = 0;
|
|
778
778
|
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, Ss(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) {
|
|
779
|
-
const
|
|
780
|
-
ve.addTo(t._distance,
|
|
779
|
+
const _ = t._delta.map(Math.abs);
|
|
780
|
+
ve.addTo(t._distance, _);
|
|
781
781
|
}
|
|
782
782
|
this.axisIntent && this.axisIntent(e);
|
|
783
783
|
const [i, a] = t._movement, [c, u] = r.threshold, {
|
|
784
784
|
_step: l,
|
|
785
|
-
values:
|
|
785
|
+
values: h
|
|
786
786
|
} = t;
|
|
787
|
-
if (r.hasCustomTransform ? (l[0] === !1 && (l[0] = Math.abs(i) >= c &&
|
|
787
|
+
if (r.hasCustomTransform ? (l[0] === !1 && (l[0] = Math.abs(i) >= c && h[0]), l[1] === !1 && (l[1] = Math.abs(a) >= u && h[1])) : (l[0] === !1 && (l[0] = Math.abs(i) >= c && Math.sign(i) * c), l[1] === !1 && (l[1] = Math.abs(a) >= u && Math.sign(a) * u)), t.intentional = l[0] !== !1 || l[1] !== !1, !t.intentional) return;
|
|
788
788
|
const f = [0, 0];
|
|
789
789
|
if (r.hasCustomTransform) {
|
|
790
|
-
const [
|
|
791
|
-
f[0] = l[0] !== !1 ?
|
|
790
|
+
const [_, P] = h;
|
|
791
|
+
f[0] = l[0] !== !1 ? _ - l[0] : 0, f[1] = l[1] !== !1 ? P - l[1] : 0;
|
|
792
792
|
} else
|
|
793
793
|
f[0] = l[0] !== !1 ? i - l[0] : 0, f[1] = l[1] !== !1 ? a - l[1] : 0;
|
|
794
794
|
this.restrictToAxis && !t._blocked && this.restrictToAxis(f);
|
|
795
795
|
const p = t.offset, S = t._active && !t._blocked || t.active;
|
|
796
796
|
S && (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 = tn(r.bounds, t)), this.setup && this.setup()), t.movement = f, this.computeOffset()));
|
|
797
|
-
const [
|
|
798
|
-
t.overflow = [
|
|
797
|
+
const [y, w] = t.offset, [[x, b], [g, m]] = t._bounds;
|
|
798
|
+
t.overflow = [y < x ? -1 : y > b ? 1 : 0, w < g ? -1 : w > m ? 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;
|
|
799
799
|
const R = t._active ? r.rubberband || [0, 0] : [0, 0];
|
|
800
800
|
if (t.offset = as(t._bounds, t.offset, R), t.delta = ve.sub(t.offset, p), this.computeMovement(), S && (!t.last || o > Es)) {
|
|
801
801
|
t.delta = ve.sub(t.offset, p);
|
|
802
|
-
const
|
|
803
|
-
ve.addTo(t.distance,
|
|
802
|
+
const _ = t.delta.map(Math.abs);
|
|
803
|
+
ve.addTo(t.distance, _), t.direction = t.delta.map(Math.sign), t._direction = t._delta.map(Math.sign), !t.first && o > 0 && (t.velocity = [_[0] / o, _[1] / o], t.timeDelta = o);
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
806
|
emit() {
|
|
@@ -947,7 +947,7 @@ const Ts = 0, Ft = te(te({}, yn), {}, {
|
|
|
947
947
|
ArrowUp: (n, e = 1) => [0, -1 * n * e],
|
|
948
948
|
ArrowDown: (n, e = 1) => [0, n * e]
|
|
949
949
|
};
|
|
950
|
-
class
|
|
950
|
+
class As extends Rs {
|
|
951
951
|
constructor(...e) {
|
|
952
952
|
super(...e), we(this, "ingKey", "dragging");
|
|
953
953
|
}
|
|
@@ -1029,10 +1029,10 @@ class Cs extends Rs {
|
|
|
1029
1029
|
if (t.tap = o <= r.tapsThreshold && i <= r.tapsThreshold, t.tap && r.filterTaps)
|
|
1030
1030
|
t._force = !0;
|
|
1031
1031
|
else {
|
|
1032
|
-
const [a, c] = t._delta, [u, l] = t._movement, [
|
|
1033
|
-
if (t.elapsedTime <
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1032
|
+
const [a, c] = t._delta, [u, l] = t._movement, [h, f] = r.swipe.velocity, [p, S] = r.swipe.distance, y = r.swipe.duration;
|
|
1033
|
+
if (t.elapsedTime < y) {
|
|
1034
|
+
const w = Math.abs(a / t.timeDelta), x = Math.abs(c / t.timeDelta);
|
|
1035
|
+
w > h && Math.abs(u) > p && (t.swipe[0] = Math.sign(a)), x > f && Math.abs(l) > S && (t.swipe[1] = Math.sign(c));
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
1038
|
this.emit();
|
|
@@ -1059,7 +1059,7 @@ class Cs extends Rs {
|
|
|
1059
1059
|
this.state._preventScroll && e.cancelable && e.preventDefault();
|
|
1060
1060
|
}
|
|
1061
1061
|
setupScrollPrevention(e) {
|
|
1062
|
-
this.state._preventScroll = !1,
|
|
1062
|
+
this.state._preventScroll = !1, Cs(e);
|
|
1063
1063
|
const t = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
|
|
1064
1064
|
passive: !1
|
|
1065
1065
|
});
|
|
@@ -1088,7 +1088,7 @@ class Cs extends Rs {
|
|
|
1088
1088
|
});
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Cs(n) {
|
|
1092
1092
|
"persist" in n && typeof n.persist == "function" && n.persist();
|
|
1093
1093
|
}
|
|
1094
1094
|
const Vt = typeof window < "u" && window.document && window.document.createElement;
|
|
@@ -1265,7 +1265,7 @@ function js(n) {
|
|
|
1265
1265
|
}
|
|
1266
1266
|
const Fs = {
|
|
1267
1267
|
key: "drag",
|
|
1268
|
-
engine:
|
|
1268
|
+
engine: As,
|
|
1269
1269
|
resolver: fr
|
|
1270
1270
|
};
|
|
1271
1271
|
function Vs(n, e) {
|
|
@@ -1350,11 +1350,11 @@ function Bs(n, e, t = {}) {
|
|
|
1350
1350
|
}, u), l);
|
|
1351
1351
|
} else
|
|
1352
1352
|
for (const l in u) {
|
|
1353
|
-
const
|
|
1354
|
-
if (
|
|
1353
|
+
const h = _n.get(l);
|
|
1354
|
+
if (h)
|
|
1355
1355
|
t[l] = Kt(te({
|
|
1356
1356
|
shared: t.shared
|
|
1357
|
-
}, u[l]),
|
|
1357
|
+
}, u[l]), h);
|
|
1358
1358
|
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(l)) {
|
|
1359
1359
|
if (l === "domTarget")
|
|
1360
1360
|
throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
|
|
@@ -1469,9 +1469,9 @@ function Ks(n, e) {
|
|
|
1469
1469
|
}
|
|
1470
1470
|
const Xn = (n, e, t) => (r, s, o, i = {}, a = !1) => {
|
|
1471
1471
|
var c, u;
|
|
1472
|
-
const l = (c = i.capture) !== null && c !== void 0 ? c : e.capture,
|
|
1472
|
+
const l = (c = i.capture) !== null && c !== void 0 ? c : e.capture, h = (u = i.passive) !== null && u !== void 0 ? u : e.passive;
|
|
1473
1473
|
let f = a ? r : ds(r, s, l);
|
|
1474
|
-
t &&
|
|
1474
|
+
t && h && (f += "Passive"), n[f] = n[f] || [], n[f].push(o);
|
|
1475
1475
|
};
|
|
1476
1476
|
function qs(n, e = {}, t, r) {
|
|
1477
1477
|
const s = Ot.useMemo(() => new Xs(n), []);
|
|
@@ -1505,15 +1505,15 @@ function mr(...n) {
|
|
|
1505
1505
|
};
|
|
1506
1506
|
}
|
|
1507
1507
|
function it(...n) {
|
|
1508
|
-
return
|
|
1508
|
+
return v.useCallback(mr(...n), n);
|
|
1509
1509
|
}
|
|
1510
1510
|
// @__NO_SIDE_EFFECTS__
|
|
1511
1511
|
function pr(n) {
|
|
1512
|
-
const e = /* @__PURE__ */ Js(n), t =
|
|
1513
|
-
const { children: o, ...i } = r, a =
|
|
1512
|
+
const e = /* @__PURE__ */ Js(n), t = v.forwardRef((r, s) => {
|
|
1513
|
+
const { children: o, ...i } = r, a = v.Children.toArray(o), c = a.find(Qs);
|
|
1514
1514
|
if (c) {
|
|
1515
|
-
const u = c.props.children, l = a.map((
|
|
1516
|
-
return /* @__PURE__ */ A.jsx(e, { ...i, ref: s, children:
|
|
1515
|
+
const u = c.props.children, l = a.map((h) => h === c ? v.Children.count(u) > 1 ? v.Children.only(null) : v.isValidElement(u) ? u.props.children : null : h);
|
|
1516
|
+
return /* @__PURE__ */ A.jsx(e, { ...i, ref: s, children: v.isValidElement(u) ? v.cloneElement(u, void 0, l) : null });
|
|
1517
1517
|
}
|
|
1518
1518
|
return /* @__PURE__ */ A.jsx(e, { ...i, ref: s, children: o });
|
|
1519
1519
|
});
|
|
@@ -1522,19 +1522,19 @@ function pr(n) {
|
|
|
1522
1522
|
var Gs = /* @__PURE__ */ pr("Slot");
|
|
1523
1523
|
// @__NO_SIDE_EFFECTS__
|
|
1524
1524
|
function Js(n) {
|
|
1525
|
-
const e =
|
|
1525
|
+
const e = v.forwardRef((t, r) => {
|
|
1526
1526
|
const { children: s, ...o } = t;
|
|
1527
|
-
if (
|
|
1527
|
+
if (v.isValidElement(s)) {
|
|
1528
1528
|
const i = to(s), a = eo(o, s.props);
|
|
1529
|
-
return s.type !==
|
|
1529
|
+
return s.type !== v.Fragment && (a.ref = r ? mr(r, i) : i), v.cloneElement(s, a);
|
|
1530
1530
|
}
|
|
1531
|
-
return
|
|
1531
|
+
return v.Children.count(s) > 1 ? v.Children.only(null) : null;
|
|
1532
1532
|
});
|
|
1533
1533
|
return e.displayName = `${n}.SlotClone`, e;
|
|
1534
1534
|
}
|
|
1535
1535
|
var Zs = Symbol("radix.slottable");
|
|
1536
1536
|
function Qs(n) {
|
|
1537
|
-
return
|
|
1537
|
+
return v.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === Zs;
|
|
1538
1538
|
}
|
|
1539
1539
|
function eo(n, e) {
|
|
1540
1540
|
const t = { ...e };
|
|
@@ -1570,7 +1570,7 @@ var no = [
|
|
|
1570
1570
|
"svg",
|
|
1571
1571
|
"ul"
|
|
1572
1572
|
], Ut = no.reduce((n, e) => {
|
|
1573
|
-
const t = /* @__PURE__ */ pr(`Primitive.${e}`), r =
|
|
1573
|
+
const t = /* @__PURE__ */ pr(`Primitive.${e}`), r = v.forwardRef((s, o) => {
|
|
1574
1574
|
const { asChild: i, ...a } = s, c = i ? t : e;
|
|
1575
1575
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ A.jsx(c, { ...a, ref: o });
|
|
1576
1576
|
});
|
|
@@ -1579,26 +1579,26 @@ var no = [
|
|
|
1579
1579
|
function ro(n, e = []) {
|
|
1580
1580
|
let t = [];
|
|
1581
1581
|
function r(o, i) {
|
|
1582
|
-
const a =
|
|
1582
|
+
const a = v.createContext(i), c = t.length;
|
|
1583
1583
|
t = [...t, i];
|
|
1584
|
-
const u = (
|
|
1585
|
-
const { scope: f, children: p, ...S } =
|
|
1586
|
-
return /* @__PURE__ */ A.jsx(
|
|
1584
|
+
const u = (h) => {
|
|
1585
|
+
const { scope: f, children: p, ...S } = h, y = f?.[n]?.[c] || a, w = v.useMemo(() => S, Object.values(S));
|
|
1586
|
+
return /* @__PURE__ */ A.jsx(y.Provider, { value: w, children: p });
|
|
1587
1587
|
};
|
|
1588
1588
|
u.displayName = o + "Provider";
|
|
1589
|
-
function l(
|
|
1590
|
-
const p = f?.[n]?.[c] || a, S =
|
|
1589
|
+
function l(h, f) {
|
|
1590
|
+
const p = f?.[n]?.[c] || a, S = v.useContext(p);
|
|
1591
1591
|
if (S) return S;
|
|
1592
1592
|
if (i !== void 0) return i;
|
|
1593
|
-
throw new Error(`\`${
|
|
1593
|
+
throw new Error(`\`${h}\` must be used within \`${o}\``);
|
|
1594
1594
|
}
|
|
1595
1595
|
return [u, l];
|
|
1596
1596
|
}
|
|
1597
1597
|
const s = () => {
|
|
1598
|
-
const o = t.map((i) =>
|
|
1598
|
+
const o = t.map((i) => v.createContext(i));
|
|
1599
1599
|
return function(a) {
|
|
1600
1600
|
const c = a?.[n] || o;
|
|
1601
|
-
return
|
|
1601
|
+
return v.useMemo(
|
|
1602
1602
|
() => ({ [`__scope${n}`]: { ...a, [n]: c } }),
|
|
1603
1603
|
[a, c]
|
|
1604
1604
|
);
|
|
@@ -1616,10 +1616,10 @@ function so(...n) {
|
|
|
1616
1616
|
}));
|
|
1617
1617
|
return function(o) {
|
|
1618
1618
|
const i = r.reduce((a, { useScope: c, scopeName: u }) => {
|
|
1619
|
-
const
|
|
1620
|
-
return { ...a, ...
|
|
1619
|
+
const h = c(o)[`__scope${u}`];
|
|
1620
|
+
return { ...a, ...h };
|
|
1621
1621
|
}, {});
|
|
1622
|
-
return
|
|
1622
|
+
return v.useMemo(() => ({ [`__scope${e.scopeName}`]: i }), [i]);
|
|
1623
1623
|
};
|
|
1624
1624
|
};
|
|
1625
1625
|
return t.scopeName = e.scopeName, t;
|
|
@@ -1630,18 +1630,18 @@ function st(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
|
1630
1630
|
return e?.(s);
|
|
1631
1631
|
};
|
|
1632
1632
|
}
|
|
1633
|
-
var wn = globalThis?.document ?
|
|
1633
|
+
var wn = globalThis?.document ? v.useLayoutEffect : () => {
|
|
1634
1634
|
};
|
|
1635
1635
|
function oo(n, e) {
|
|
1636
|
-
return
|
|
1636
|
+
return v.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1637
1637
|
}
|
|
1638
1638
|
var $t = (n) => {
|
|
1639
|
-
const { present: e, children: t } = n, r = io(e), s = typeof t == "function" ? t({ present: r.isPresent }) :
|
|
1640
|
-
return typeof t == "function" || r.isPresent ?
|
|
1639
|
+
const { present: e, children: t } = n, r = io(e), s = typeof t == "function" ? t({ present: r.isPresent }) : v.Children.only(t), o = it(r.ref, ao(s));
|
|
1640
|
+
return typeof t == "function" || r.isPresent ? v.cloneElement(s, { ref: o }) : null;
|
|
1641
1641
|
};
|
|
1642
1642
|
$t.displayName = "Presence";
|
|
1643
1643
|
function io(n) {
|
|
1644
|
-
const [e, t] =
|
|
1644
|
+
const [e, t] = v.useState(), r = v.useRef(null), s = v.useRef(n), o = v.useRef("none"), i = n ? "mounted" : "unmounted", [a, c] = oo(i, {
|
|
1645
1645
|
mounted: {
|
|
1646
1646
|
UNMOUNT: "unmounted",
|
|
1647
1647
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -1654,7 +1654,7 @@ function io(n) {
|
|
|
1654
1654
|
MOUNT: "mounted"
|
|
1655
1655
|
}
|
|
1656
1656
|
});
|
|
1657
|
-
return
|
|
1657
|
+
return v.useEffect(() => {
|
|
1658
1658
|
const u = Xt(r.current);
|
|
1659
1659
|
o.current = a === "mounted" ? u : "none";
|
|
1660
1660
|
}, [a]), wn(() => {
|
|
@@ -1666,25 +1666,25 @@ function io(n) {
|
|
|
1666
1666
|
}, [n, c]), wn(() => {
|
|
1667
1667
|
if (e) {
|
|
1668
1668
|
let u;
|
|
1669
|
-
const l = e.ownerDocument.defaultView ?? window,
|
|
1670
|
-
const
|
|
1671
|
-
if (p.target === e &&
|
|
1672
|
-
const
|
|
1669
|
+
const l = e.ownerDocument.defaultView ?? window, h = (p) => {
|
|
1670
|
+
const y = Xt(r.current).includes(CSS.escape(p.animationName));
|
|
1671
|
+
if (p.target === e && y && (c("ANIMATION_END"), !s.current)) {
|
|
1672
|
+
const w = e.style.animationFillMode;
|
|
1673
1673
|
e.style.animationFillMode = "forwards", u = l.setTimeout(() => {
|
|
1674
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode =
|
|
1674
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = w);
|
|
1675
1675
|
});
|
|
1676
1676
|
}
|
|
1677
1677
|
}, f = (p) => {
|
|
1678
1678
|
p.target === e && (o.current = Xt(r.current));
|
|
1679
1679
|
};
|
|
1680
|
-
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel",
|
|
1681
|
-
l.clearTimeout(u), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel",
|
|
1680
|
+
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", h), e.addEventListener("animationend", h), () => {
|
|
1681
|
+
l.clearTimeout(u), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", h), e.removeEventListener("animationend", h);
|
|
1682
1682
|
};
|
|
1683
1683
|
} else
|
|
1684
1684
|
c("ANIMATION_END");
|
|
1685
1685
|
}, [e, c]), {
|
|
1686
1686
|
isPresent: ["mounted", "unmountSuspended"].includes(a),
|
|
1687
|
-
ref:
|
|
1687
|
+
ref: v.useCallback((u) => {
|
|
1688
1688
|
r.current = u ? getComputedStyle(u) : null, t(u);
|
|
1689
1689
|
}, [])
|
|
1690
1690
|
};
|
|
@@ -1696,24 +1696,24 @@ function ao(n) {
|
|
|
1696
1696
|
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
1697
1697
|
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);
|
|
1698
1698
|
}
|
|
1699
|
-
var co =
|
|
1699
|
+
var co = v.createContext(void 0);
|
|
1700
1700
|
function lo(n) {
|
|
1701
|
-
const e =
|
|
1701
|
+
const e = v.useContext(co);
|
|
1702
1702
|
return n || e || "ltr";
|
|
1703
1703
|
}
|
|
1704
1704
|
function rt(n) {
|
|
1705
|
-
const e =
|
|
1706
|
-
return
|
|
1705
|
+
const e = v.useRef(n);
|
|
1706
|
+
return v.useEffect(() => {
|
|
1707
1707
|
e.current = n;
|
|
1708
|
-
}),
|
|
1708
|
+
}), v.useMemo(() => (...t) => e.current?.(...t), []);
|
|
1709
1709
|
}
|
|
1710
1710
|
function uo(n, [e, t]) {
|
|
1711
1711
|
return Math.min(t, Math.max(e, n));
|
|
1712
1712
|
}
|
|
1713
1713
|
function fo(n, e) {
|
|
1714
|
-
return
|
|
1714
|
+
return v.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1715
1715
|
}
|
|
1716
|
-
var xn = "ScrollArea", [gr] = ro(xn), [ho, Re] = gr(xn), vr =
|
|
1716
|
+
var xn = "ScrollArea", [gr] = ro(xn), [ho, Re] = gr(xn), vr = v.forwardRef(
|
|
1717
1717
|
(n, e) => {
|
|
1718
1718
|
const {
|
|
1719
1719
|
__scopeScrollArea: t,
|
|
@@ -1721,7 +1721,7 @@ var xn = "ScrollArea", [gr] = ro(xn), [ho, Re] = gr(xn), vr = g.forwardRef(
|
|
|
1721
1721
|
dir: s,
|
|
1722
1722
|
scrollHideDelay: o = 600,
|
|
1723
1723
|
...i
|
|
1724
|
-
} = n, [a, c] =
|
|
1724
|
+
} = n, [a, c] = v.useState(null), [u, l] = v.useState(null), [h, f] = v.useState(null), [p, S] = v.useState(null), [y, w] = v.useState(null), [x, b] = v.useState(0), [g, m] = v.useState(0), [R, _] = v.useState(!1), [P, L] = v.useState(!1), C = it(e, (I) => c(I)), E = lo(s);
|
|
1725
1725
|
return /* @__PURE__ */ A.jsx(
|
|
1726
1726
|
ho,
|
|
1727
1727
|
{
|
|
@@ -1732,29 +1732,29 @@ var xn = "ScrollArea", [gr] = ro(xn), [ho, Re] = gr(xn), vr = g.forwardRef(
|
|
|
1732
1732
|
scrollArea: a,
|
|
1733
1733
|
viewport: u,
|
|
1734
1734
|
onViewportChange: l,
|
|
1735
|
-
content:
|
|
1735
|
+
content: h,
|
|
1736
1736
|
onContentChange: f,
|
|
1737
1737
|
scrollbarX: p,
|
|
1738
1738
|
onScrollbarXChange: S,
|
|
1739
1739
|
scrollbarXEnabled: R,
|
|
1740
|
-
onScrollbarXEnabledChange:
|
|
1741
|
-
scrollbarY:
|
|
1742
|
-
onScrollbarYChange:
|
|
1740
|
+
onScrollbarXEnabledChange: _,
|
|
1741
|
+
scrollbarY: y,
|
|
1742
|
+
onScrollbarYChange: w,
|
|
1743
1743
|
scrollbarYEnabled: P,
|
|
1744
1744
|
onScrollbarYEnabledChange: L,
|
|
1745
1745
|
onCornerWidthChange: b,
|
|
1746
|
-
onCornerHeightChange:
|
|
1746
|
+
onCornerHeightChange: m,
|
|
1747
1747
|
children: /* @__PURE__ */ A.jsx(
|
|
1748
1748
|
Ut.div,
|
|
1749
1749
|
{
|
|
1750
1750
|
dir: E,
|
|
1751
1751
|
...i,
|
|
1752
|
-
ref:
|
|
1752
|
+
ref: C,
|
|
1753
1753
|
style: {
|
|
1754
1754
|
position: "relative",
|
|
1755
1755
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
1756
|
-
"--radix-scroll-area-corner-width":
|
|
1757
|
-
"--radix-scroll-area-corner-height":
|
|
1756
|
+
"--radix-scroll-area-corner-width": x + "px",
|
|
1757
|
+
"--radix-scroll-area-corner-height": g + "px",
|
|
1758
1758
|
...n.style
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
@@ -1764,9 +1764,9 @@ var xn = "ScrollArea", [gr] = ro(xn), [ho, Re] = gr(xn), vr = g.forwardRef(
|
|
|
1764
1764
|
}
|
|
1765
1765
|
);
|
|
1766
1766
|
vr.displayName = xn;
|
|
1767
|
-
var br = "ScrollAreaViewport", Sr =
|
|
1767
|
+
var br = "ScrollAreaViewport", Sr = v.forwardRef(
|
|
1768
1768
|
(n, e) => {
|
|
1769
|
-
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Re(br, t), a =
|
|
1769
|
+
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Re(br, t), a = v.useRef(null), c = it(e, a, i.onViewportChange);
|
|
1770
1770
|
return /* @__PURE__ */ A.jsxs(A.Fragment, { children: [
|
|
1771
1771
|
/* @__PURE__ */ A.jsx(
|
|
1772
1772
|
"style",
|
|
@@ -1806,18 +1806,18 @@ var br = "ScrollAreaViewport", Sr = g.forwardRef(
|
|
|
1806
1806
|
}
|
|
1807
1807
|
);
|
|
1808
1808
|
Sr.displayName = br;
|
|
1809
|
-
var Me = "ScrollAreaScrollbar", _r =
|
|
1809
|
+
var Me = "ScrollAreaScrollbar", _r = v.forwardRef(
|
|
1810
1810
|
(n, e) => {
|
|
1811
1811
|
const { forceMount: t, ...r } = n, s = Re(Me, n.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = s, a = n.orientation === "horizontal";
|
|
1812
|
-
return
|
|
1812
|
+
return v.useEffect(() => (a ? o(!0) : i(!0), () => {
|
|
1813
1813
|
a ? o(!1) : i(!1);
|
|
1814
1814
|
}), [a, o, i]), s.type === "hover" ? /* @__PURE__ */ A.jsx(mo, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ A.jsx(po, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ A.jsx(wr, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ A.jsx(Rn, { ...r, ref: e }) : null;
|
|
1815
1815
|
}
|
|
1816
1816
|
);
|
|
1817
1817
|
_r.displayName = Me;
|
|
1818
|
-
var mo =
|
|
1819
|
-
const { forceMount: t, ...r } = n, s = Re(Me, n.__scopeScrollArea), [o, i] =
|
|
1820
|
-
return
|
|
1818
|
+
var mo = v.forwardRef((n, e) => {
|
|
1819
|
+
const { forceMount: t, ...r } = n, s = Re(Me, n.__scopeScrollArea), [o, i] = v.useState(!1);
|
|
1820
|
+
return v.useEffect(() => {
|
|
1821
1821
|
const a = s.scrollArea;
|
|
1822
1822
|
let c = 0;
|
|
1823
1823
|
if (a) {
|
|
@@ -1838,7 +1838,7 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1838
1838
|
ref: e
|
|
1839
1839
|
}
|
|
1840
1840
|
) });
|
|
1841
|
-
}), po =
|
|
1841
|
+
}), po = v.forwardRef((n, e) => {
|
|
1842
1842
|
const { forceMount: t, ...r } = n, s = Re(Me, n.__scopeScrollArea), o = n.orientation === "horizontal", i = ln(() => c("SCROLL_END"), 100), [a, c] = fo("hidden", {
|
|
1843
1843
|
hidden: {
|
|
1844
1844
|
SCROLL: "scrolling"
|
|
@@ -1857,18 +1857,18 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1857
1857
|
POINTER_ENTER: "interacting"
|
|
1858
1858
|
}
|
|
1859
1859
|
});
|
|
1860
|
-
return
|
|
1860
|
+
return v.useEffect(() => {
|
|
1861
1861
|
if (a === "idle") {
|
|
1862
1862
|
const u = window.setTimeout(() => c("HIDE"), s.scrollHideDelay);
|
|
1863
1863
|
return () => window.clearTimeout(u);
|
|
1864
1864
|
}
|
|
1865
|
-
}, [a, s.scrollHideDelay, c]),
|
|
1865
|
+
}, [a, s.scrollHideDelay, c]), v.useEffect(() => {
|
|
1866
1866
|
const u = s.viewport, l = o ? "scrollLeft" : "scrollTop";
|
|
1867
1867
|
if (u) {
|
|
1868
|
-
let
|
|
1868
|
+
let h = u[l];
|
|
1869
1869
|
const f = () => {
|
|
1870
1870
|
const p = u[l];
|
|
1871
|
-
|
|
1871
|
+
h !== p && (c("SCROLL"), i()), h = p;
|
|
1872
1872
|
};
|
|
1873
1873
|
return u.addEventListener("scroll", f), () => u.removeEventListener("scroll", f);
|
|
1874
1874
|
}
|
|
@@ -1882,8 +1882,8 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1882
1882
|
onPointerLeave: st(n.onPointerLeave, () => c("POINTER_LEAVE"))
|
|
1883
1883
|
}
|
|
1884
1884
|
) });
|
|
1885
|
-
}), wr =
|
|
1886
|
-
const t = Re(Me, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] =
|
|
1885
|
+
}), wr = v.forwardRef((n, e) => {
|
|
1886
|
+
const t = Re(Me, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = v.useState(!1), a = n.orientation === "horizontal", c = ln(() => {
|
|
1887
1887
|
if (t.viewport) {
|
|
1888
1888
|
const u = t.viewport.offsetWidth < t.viewport.scrollWidth, l = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
1889
1889
|
i(a ? u : l);
|
|
@@ -1897,8 +1897,8 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1897
1897
|
ref: e
|
|
1898
1898
|
}
|
|
1899
1899
|
) });
|
|
1900
|
-
}), Rn =
|
|
1901
|
-
const { orientation: t = "vertical", ...r } = n, s = Re(Me, n.__scopeScrollArea), o =
|
|
1900
|
+
}), Rn = v.forwardRef((n, e) => {
|
|
1901
|
+
const { orientation: t = "vertical", ...r } = n, s = Re(Me, n.__scopeScrollArea), o = v.useRef(null), i = v.useRef(0), [a, c] = v.useState({
|
|
1902
1902
|
content: 0,
|
|
1903
1903
|
viewport: 0,
|
|
1904
1904
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -1911,7 +1911,7 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1911
1911
|
onThumbPointerUp: () => i.current = 0,
|
|
1912
1912
|
onThumbPointerDown: (f) => i.current = f
|
|
1913
1913
|
};
|
|
1914
|
-
function
|
|
1914
|
+
function h(f, p) {
|
|
1915
1915
|
return wo(f, i.current, a, p);
|
|
1916
1916
|
}
|
|
1917
1917
|
return t === "horizontal" ? /* @__PURE__ */ A.jsx(
|
|
@@ -1929,7 +1929,7 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1929
1929
|
s.viewport && (s.viewport.scrollLeft = f);
|
|
1930
1930
|
},
|
|
1931
1931
|
onDragScroll: (f) => {
|
|
1932
|
-
s.viewport && (s.viewport.scrollLeft =
|
|
1932
|
+
s.viewport && (s.viewport.scrollLeft = h(f, s.dir));
|
|
1933
1933
|
}
|
|
1934
1934
|
}
|
|
1935
1935
|
) : t === "vertical" ? /* @__PURE__ */ A.jsx(
|
|
@@ -1947,13 +1947,13 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1947
1947
|
s.viewport && (s.viewport.scrollTop = f);
|
|
1948
1948
|
},
|
|
1949
1949
|
onDragScroll: (f) => {
|
|
1950
|
-
s.viewport && (s.viewport.scrollTop =
|
|
1950
|
+
s.viewport && (s.viewport.scrollTop = h(f));
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
1953
|
) : null;
|
|
1954
|
-
}), go =
|
|
1955
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Me, n.__scopeScrollArea), [i, a] =
|
|
1956
|
-
return
|
|
1954
|
+
}), go = v.forwardRef((n, e) => {
|
|
1955
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Me, n.__scopeScrollArea), [i, a] = v.useState(), c = v.useRef(null), u = it(e, c, o.onScrollbarXChange);
|
|
1956
|
+
return v.useEffect(() => {
|
|
1957
1957
|
c.current && a(getComputedStyle(c.current));
|
|
1958
1958
|
}, [c]), /* @__PURE__ */ A.jsx(
|
|
1959
1959
|
yr,
|
|
@@ -1971,10 +1971,10 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1971
1971
|
},
|
|
1972
1972
|
onThumbPointerDown: (l) => n.onThumbPointerDown(l.x),
|
|
1973
1973
|
onDragScroll: (l) => n.onDragScroll(l.x),
|
|
1974
|
-
onWheelScroll: (l,
|
|
1974
|
+
onWheelScroll: (l, h) => {
|
|
1975
1975
|
if (o.viewport) {
|
|
1976
1976
|
const f = o.viewport.scrollLeft + l.deltaX;
|
|
1977
|
-
n.onWheelScroll(f),
|
|
1977
|
+
n.onWheelScroll(f), Cr(f, h) && l.preventDefault();
|
|
1978
1978
|
}
|
|
1979
1979
|
},
|
|
1980
1980
|
onResize: () => {
|
|
@@ -1990,9 +1990,9 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
1992
|
);
|
|
1993
|
-
}), vo =
|
|
1994
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Me, n.__scopeScrollArea), [i, a] =
|
|
1995
|
-
return
|
|
1993
|
+
}), vo = v.forwardRef((n, e) => {
|
|
1994
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Me, n.__scopeScrollArea), [i, a] = v.useState(), c = v.useRef(null), u = it(e, c, o.onScrollbarYChange);
|
|
1995
|
+
return v.useEffect(() => {
|
|
1996
1996
|
c.current && a(getComputedStyle(c.current));
|
|
1997
1997
|
}, [c]), /* @__PURE__ */ A.jsx(
|
|
1998
1998
|
yr,
|
|
@@ -2011,10 +2011,10 @@ var mo = g.forwardRef((n, e) => {
|
|
|
2011
2011
|
},
|
|
2012
2012
|
onThumbPointerDown: (l) => n.onThumbPointerDown(l.y),
|
|
2013
2013
|
onDragScroll: (l) => n.onDragScroll(l.y),
|
|
2014
|
-
onWheelScroll: (l,
|
|
2014
|
+
onWheelScroll: (l, h) => {
|
|
2015
2015
|
if (o.viewport) {
|
|
2016
2016
|
const f = o.viewport.scrollTop + l.deltaY;
|
|
2017
|
-
n.onWheelScroll(f),
|
|
2017
|
+
n.onWheelScroll(f), Cr(f, h) && l.preventDefault();
|
|
2018
2018
|
}
|
|
2019
2019
|
},
|
|
2020
2020
|
onResize: () => {
|
|
@@ -2030,7 +2030,7 @@ var mo = g.forwardRef((n, e) => {
|
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
2032
|
);
|
|
2033
|
-
}), [bo, Er] = gr(Me), yr =
|
|
2033
|
+
}), [bo, Er] = gr(Me), yr = v.forwardRef((n, e) => {
|
|
2034
2034
|
const {
|
|
2035
2035
|
__scopeScrollArea: t,
|
|
2036
2036
|
sizes: r,
|
|
@@ -2041,22 +2041,22 @@ var mo = g.forwardRef((n, e) => {
|
|
|
2041
2041
|
onThumbPositionChange: c,
|
|
2042
2042
|
onDragScroll: u,
|
|
2043
2043
|
onWheelScroll: l,
|
|
2044
|
-
onResize:
|
|
2044
|
+
onResize: h,
|
|
2045
2045
|
...f
|
|
2046
|
-
} = n, p = Re(Me, t), [S,
|
|
2047
|
-
function L(
|
|
2048
|
-
if (
|
|
2049
|
-
const E =
|
|
2046
|
+
} = n, p = Re(Me, t), [S, y] = v.useState(null), w = it(e, (C) => y(C)), x = v.useRef(null), b = v.useRef(""), g = p.viewport, m = r.content - r.viewport, R = rt(l), _ = rt(c), P = ln(h, 10);
|
|
2047
|
+
function L(C) {
|
|
2048
|
+
if (x.current) {
|
|
2049
|
+
const E = C.clientX - x.current.left, I = C.clientY - x.current.top;
|
|
2050
2050
|
u({ x: E, y: I });
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
|
-
return
|
|
2054
|
-
const
|
|
2053
|
+
return v.useEffect(() => {
|
|
2054
|
+
const C = (E) => {
|
|
2055
2055
|
const I = E.target;
|
|
2056
|
-
S?.contains(I) && R(E,
|
|
2056
|
+
S?.contains(I) && R(E, m);
|
|
2057
2057
|
};
|
|
2058
|
-
return document.addEventListener("wheel",
|
|
2059
|
-
}, [
|
|
2058
|
+
return document.addEventListener("wheel", C, { passive: !1 }), () => document.removeEventListener("wheel", C, { passive: !1 });
|
|
2059
|
+
}, [g, S, m, R]), v.useEffect(_, [r, _]), Nt(S, P), Nt(p.content, P), /* @__PURE__ */ A.jsx(
|
|
2060
2060
|
bo,
|
|
2061
2061
|
{
|
|
2062
2062
|
scope: t,
|
|
@@ -2064,49 +2064,49 @@ var mo = g.forwardRef((n, e) => {
|
|
|
2064
2064
|
hasThumb: s,
|
|
2065
2065
|
onThumbChange: rt(o),
|
|
2066
2066
|
onThumbPointerUp: rt(i),
|
|
2067
|
-
onThumbPositionChange:
|
|
2067
|
+
onThumbPositionChange: _,
|
|
2068
2068
|
onThumbPointerDown: rt(a),
|
|
2069
2069
|
children: /* @__PURE__ */ A.jsx(
|
|
2070
2070
|
Ut.div,
|
|
2071
2071
|
{
|
|
2072
2072
|
...f,
|
|
2073
|
-
ref:
|
|
2073
|
+
ref: w,
|
|
2074
2074
|
style: { position: "absolute", ...f.style },
|
|
2075
|
-
onPointerDown: st(n.onPointerDown, (
|
|
2076
|
-
|
|
2075
|
+
onPointerDown: st(n.onPointerDown, (C) => {
|
|
2076
|
+
C.button === 0 && (C.target.setPointerCapture(C.pointerId), x.current = S.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", p.viewport && (p.viewport.style.scrollBehavior = "auto"), L(C));
|
|
2077
2077
|
}),
|
|
2078
2078
|
onPointerMove: st(n.onPointerMove, L),
|
|
2079
|
-
onPointerUp: st(n.onPointerUp, (
|
|
2080
|
-
const E =
|
|
2081
|
-
E.hasPointerCapture(
|
|
2079
|
+
onPointerUp: st(n.onPointerUp, (C) => {
|
|
2080
|
+
const E = C.target;
|
|
2081
|
+
E.hasPointerCapture(C.pointerId) && E.releasePointerCapture(C.pointerId), document.body.style.webkitUserSelect = b.current, p.viewport && (p.viewport.style.scrollBehavior = ""), x.current = null;
|
|
2082
2082
|
})
|
|
2083
2083
|
}
|
|
2084
2084
|
)
|
|
2085
2085
|
}
|
|
2086
2086
|
);
|
|
2087
|
-
}), nn = "ScrollAreaThumb", xr =
|
|
2087
|
+
}), nn = "ScrollAreaThumb", xr = v.forwardRef(
|
|
2088
2088
|
(n, e) => {
|
|
2089
2089
|
const { forceMount: t, ...r } = n, s = Er(nn, n.__scopeScrollArea);
|
|
2090
2090
|
return /* @__PURE__ */ A.jsx($t, { present: t || s.hasThumb, children: /* @__PURE__ */ A.jsx(So, { ref: e, ...r }) });
|
|
2091
2091
|
}
|
|
2092
|
-
), So =
|
|
2092
|
+
), So = v.forwardRef(
|
|
2093
2093
|
(n, e) => {
|
|
2094
2094
|
const { __scopeScrollArea: t, style: r, ...s } = n, o = Re(nn, t), i = Er(nn, t), { onThumbPositionChange: a } = i, c = it(
|
|
2095
2095
|
e,
|
|
2096
|
-
(
|
|
2097
|
-
), u =
|
|
2096
|
+
(h) => i.onThumbChange(h)
|
|
2097
|
+
), u = v.useRef(void 0), l = ln(() => {
|
|
2098
2098
|
u.current && (u.current(), u.current = void 0);
|
|
2099
2099
|
}, 100);
|
|
2100
|
-
return
|
|
2101
|
-
const
|
|
2102
|
-
if (
|
|
2100
|
+
return v.useEffect(() => {
|
|
2101
|
+
const h = o.viewport;
|
|
2102
|
+
if (h) {
|
|
2103
2103
|
const f = () => {
|
|
2104
2104
|
if (l(), !u.current) {
|
|
2105
|
-
const p = Eo(
|
|
2105
|
+
const p = Eo(h, a);
|
|
2106
2106
|
u.current = p, a();
|
|
2107
2107
|
}
|
|
2108
2108
|
};
|
|
2109
|
-
return a(),
|
|
2109
|
+
return a(), h.addEventListener("scroll", f), () => h.removeEventListener("scroll", f);
|
|
2110
2110
|
}
|
|
2111
2111
|
}, [o.viewport, l, a]), /* @__PURE__ */ A.jsx(
|
|
2112
2112
|
Ut.div,
|
|
@@ -2119,9 +2119,9 @@ var mo = g.forwardRef((n, e) => {
|
|
|
2119
2119
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
2120
2120
|
...r
|
|
2121
2121
|
},
|
|
2122
|
-
onPointerDownCapture: st(n.onPointerDownCapture, (
|
|
2123
|
-
const p =
|
|
2124
|
-
i.onThumbPointerDown({ x: S, y
|
|
2122
|
+
onPointerDownCapture: st(n.onPointerDownCapture, (h) => {
|
|
2123
|
+
const p = h.target.getBoundingClientRect(), S = h.clientX - p.left, y = h.clientY - p.top;
|
|
2124
|
+
i.onThumbPointerDown({ x: S, y });
|
|
2125
2125
|
}),
|
|
2126
2126
|
onPointerUp: st(n.onPointerUp, i.onThumbPointerUp)
|
|
2127
2127
|
}
|
|
@@ -2129,15 +2129,15 @@ var mo = g.forwardRef((n, e) => {
|
|
|
2129
2129
|
}
|
|
2130
2130
|
);
|
|
2131
2131
|
xr.displayName = nn;
|
|
2132
|
-
var Tn = "ScrollAreaCorner", Rr =
|
|
2132
|
+
var Tn = "ScrollAreaCorner", Rr = v.forwardRef(
|
|
2133
2133
|
(n, e) => {
|
|
2134
2134
|
const t = Re(Tn, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
|
|
2135
2135
|
return t.type !== "scroll" && r ? /* @__PURE__ */ A.jsx(_o, { ...n, ref: e }) : null;
|
|
2136
2136
|
}
|
|
2137
2137
|
);
|
|
2138
2138
|
Rr.displayName = Tn;
|
|
2139
|
-
var _o =
|
|
2140
|
-
const { __scopeScrollArea: t, ...r } = n, s = Re(Tn, t), [o, i] =
|
|
2139
|
+
var _o = v.forwardRef((n, e) => {
|
|
2140
|
+
const { __scopeScrollArea: t, ...r } = n, s = Re(Tn, t), [o, i] = v.useState(0), [a, c] = v.useState(0), u = !!(o && a);
|
|
2141
2141
|
return Nt(s.scrollbarX, () => {
|
|
2142
2142
|
const l = s.scrollbarX?.offsetHeight || 0;
|
|
2143
2143
|
s.onCornerHeightChange(l), c(l);
|
|
@@ -2173,21 +2173,21 @@ function cn(n) {
|
|
|
2173
2173
|
return Math.max(r, 18);
|
|
2174
2174
|
}
|
|
2175
2175
|
function wo(n, e, t, r = "ltr") {
|
|
2176
|
-
const s = cn(t), o = s / 2, i = e || o, a = s - i, c = t.scrollbar.paddingStart + i, u = t.scrollbar.size - t.scrollbar.paddingEnd - a, l = t.content - t.viewport,
|
|
2177
|
-
return
|
|
2176
|
+
const s = cn(t), o = s / 2, i = e || o, a = s - i, c = t.scrollbar.paddingStart + i, u = t.scrollbar.size - t.scrollbar.paddingEnd - a, l = t.content - t.viewport, h = r === "ltr" ? [0, l] : [l * -1, 0];
|
|
2177
|
+
return Ar([c, u], h)(n);
|
|
2178
2178
|
}
|
|
2179
2179
|
function qn(n, e, t = "ltr") {
|
|
2180
2180
|
const r = cn(e), s = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = e.scrollbar.size - s, i = e.content - e.viewport, a = o - r, c = t === "ltr" ? [0, i] : [i * -1, 0], u = uo(n, c);
|
|
2181
|
-
return
|
|
2181
|
+
return Ar([0, i], [0, a])(u);
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function Ar(n, e) {
|
|
2184
2184
|
return (t) => {
|
|
2185
2185
|
if (n[0] === n[1] || e[0] === e[1]) return e[0];
|
|
2186
2186
|
const r = (e[1] - e[0]) / (n[1] - n[0]);
|
|
2187
2187
|
return e[0] + r * (t - n[0]);
|
|
2188
2188
|
};
|
|
2189
2189
|
}
|
|
2190
|
-
function
|
|
2190
|
+
function Cr(n, e) {
|
|
2191
2191
|
return n > 0 && n < e;
|
|
2192
2192
|
}
|
|
2193
2193
|
var Eo = (n, e = () => {
|
|
@@ -2199,8 +2199,8 @@ var Eo = (n, e = () => {
|
|
|
2199
2199
|
})(), () => window.cancelAnimationFrame(r);
|
|
2200
2200
|
};
|
|
2201
2201
|
function ln(n, e) {
|
|
2202
|
-
const t = rt(n), r =
|
|
2203
|
-
return
|
|
2202
|
+
const t = rt(n), r = v.useRef(0);
|
|
2203
|
+
return v.useEffect(() => () => window.clearTimeout(r.current), []), v.useCallback(() => {
|
|
2204
2204
|
window.clearTimeout(r.current), r.current = window.setTimeout(t, e);
|
|
2205
2205
|
}, [t, e]);
|
|
2206
2206
|
}
|
|
@@ -2231,8 +2231,8 @@ const gn = (n, e, t, r, s) => ({
|
|
|
2231
2231
|
...s && {
|
|
2232
2232
|
deltaRect: s
|
|
2233
2233
|
}
|
|
2234
|
-
}), To = (n, e, t) => n ? n === e || n === t || (e?.contains(n) ?? !1) || (t?.contains(n) ?? !1) : !1,
|
|
2235
|
-
const e =
|
|
2234
|
+
}), To = (n, e, t) => n ? n === e || n === t || (e?.contains(n) ?? !1) || (t?.contains(n) ?? !1) : !1, Ao = (n) => {
|
|
2235
|
+
const e = Ce.c(34), {
|
|
2236
2236
|
children: t,
|
|
2237
2237
|
style: r,
|
|
2238
2238
|
draggable: s,
|
|
@@ -2240,119 +2240,119 @@ const gn = (n, e, t, r, s) => ({
|
|
|
2240
2240
|
draggableOptions: i,
|
|
2241
2241
|
resizableOptions: a,
|
|
2242
2242
|
ref: c
|
|
2243
|
-
} = n, u = se(void 0), l = se(void 0),
|
|
2244
|
-
let
|
|
2245
|
-
e[0] !== i || e[1] !== c || e[2] !== a ? (
|
|
2243
|
+
} = n, u = se(void 0), l = se(void 0), h = se(null), f = se(null), p = se(void 0), S = se(void 0);
|
|
2244
|
+
let y, w;
|
|
2245
|
+
e[0] !== i || e[1] !== c || e[2] !== a ? (y = () => {
|
|
2246
2246
|
if (u.current = i, l.current = a, !c?.current)
|
|
2247
2247
|
return;
|
|
2248
|
-
const N = a?.edges?.left,
|
|
2249
|
-
N && N !== p.current && (p.current = N,
|
|
2250
|
-
},
|
|
2251
|
-
let
|
|
2252
|
-
e[5] !== c ? (
|
|
2248
|
+
const N = a?.edges?.left, Y = a?.edges?.right;
|
|
2249
|
+
N && N !== p.current && (p.current = N, h.current = c.current.querySelector(N)), Y && Y !== S.current && (S.current = Y, f.current = c.current.querySelector(Y));
|
|
2250
|
+
}, w = [i, c, a], e[0] = i, e[1] = c, e[2] = a, e[3] = y, e[4] = w) : (y = e[3], w = e[4]), ot(y, w);
|
|
2251
|
+
let x;
|
|
2252
|
+
e[5] !== c ? (x = (N) => {
|
|
2253
2253
|
const {
|
|
2254
|
-
active:
|
|
2254
|
+
active: Y,
|
|
2255
2255
|
delta: J,
|
|
2256
2256
|
xy: W,
|
|
2257
2257
|
event: O,
|
|
2258
2258
|
first: d,
|
|
2259
|
-
last:
|
|
2259
|
+
last: T
|
|
2260
2260
|
} = N, D = c?.current;
|
|
2261
|
-
if (!D || To(O?.target,
|
|
2261
|
+
if (!D || To(O?.target, h.current, f.current))
|
|
2262
2262
|
return;
|
|
2263
2263
|
const z = gn(D, J, W);
|
|
2264
|
-
d ? u.current?.onstart?.(z) :
|
|
2265
|
-
}, e[5] = c, e[6] =
|
|
2264
|
+
d ? u.current?.onstart?.(z) : T ? u.current?.onend?.(z) : Y && u.current?.onmove?.(z);
|
|
2265
|
+
}, e[5] = c, e[6] = x) : x = e[6];
|
|
2266
2266
|
const b = i?.lockAxis === "x" ? "x" : void 0;
|
|
2267
|
-
let
|
|
2268
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2267
|
+
let g;
|
|
2268
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
2269
2269
|
capture: !0
|
|
2270
|
-
}, e[7] =
|
|
2271
|
-
let
|
|
2272
|
-
e[8] !== s || e[9] !== c || e[10] !== b ? (
|
|
2270
|
+
}, e[7] = g) : g = e[7];
|
|
2271
|
+
let m;
|
|
2272
|
+
e[8] !== s || e[9] !== c || e[10] !== b ? (m = {
|
|
2273
2273
|
enabled: s,
|
|
2274
2274
|
axis: b,
|
|
2275
|
-
pointer:
|
|
2275
|
+
pointer: g,
|
|
2276
2276
|
target: c,
|
|
2277
2277
|
threshold: 0
|
|
2278
|
-
}, e[8] = s, e[9] = c, e[10] = b, e[11] =
|
|
2278
|
+
}, e[8] = s, e[9] = c, e[10] = b, e[11] = m) : m = e[11], pn(x, m);
|
|
2279
2279
|
let R;
|
|
2280
2280
|
e[12] !== c ? (R = (N) => {
|
|
2281
2281
|
const {
|
|
2282
|
-
active:
|
|
2282
|
+
active: Y,
|
|
2283
2283
|
delta: J,
|
|
2284
2284
|
xy: W,
|
|
2285
2285
|
first: O,
|
|
2286
2286
|
last: d
|
|
2287
|
-
} = N,
|
|
2288
|
-
if (!
|
|
2287
|
+
} = N, T = c?.current;
|
|
2288
|
+
if (!T)
|
|
2289
2289
|
return;
|
|
2290
|
-
const D = gn(
|
|
2290
|
+
const D = gn(T, J, W, {
|
|
2291
2291
|
left: !0
|
|
2292
2292
|
}, {
|
|
2293
2293
|
left: J[0]
|
|
2294
2294
|
});
|
|
2295
|
-
O ? l.current?.onstart?.(D) : d ? l.current?.onend?.(D) :
|
|
2295
|
+
O ? l.current?.onstart?.(D) : d ? l.current?.onend?.(D) : Y && l.current?.onmove?.(D);
|
|
2296
2296
|
}, e[12] = c, e[13] = R) : R = e[13];
|
|
2297
|
-
let
|
|
2298
|
-
e[14] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2297
|
+
let _;
|
|
2298
|
+
e[14] === Symbol.for("react.memo_cache_sentinel") ? (_ = {
|
|
2299
2299
|
capture: !0
|
|
2300
|
-
}, e[14] =
|
|
2300
|
+
}, e[14] = _) : _ = e[14];
|
|
2301
2301
|
let P;
|
|
2302
2302
|
e[15] !== o ? (P = {
|
|
2303
2303
|
enabled: o,
|
|
2304
|
-
target:
|
|
2305
|
-
pointer:
|
|
2304
|
+
target: h,
|
|
2305
|
+
pointer: _,
|
|
2306
2306
|
threshold: 0
|
|
2307
2307
|
}, e[15] = o, e[16] = P) : P = e[16], pn(R, P);
|
|
2308
2308
|
let L;
|
|
2309
2309
|
e[17] !== c ? (L = (N) => {
|
|
2310
2310
|
const {
|
|
2311
|
-
active:
|
|
2311
|
+
active: Y,
|
|
2312
2312
|
delta: J,
|
|
2313
2313
|
xy: W,
|
|
2314
2314
|
first: O,
|
|
2315
2315
|
last: d
|
|
2316
|
-
} = N,
|
|
2317
|
-
if (!
|
|
2316
|
+
} = N, T = c?.current;
|
|
2317
|
+
if (!T)
|
|
2318
2318
|
return;
|
|
2319
|
-
const D = gn(
|
|
2319
|
+
const D = gn(T, J, W, {
|
|
2320
2320
|
right: !0
|
|
2321
2321
|
}, {
|
|
2322
2322
|
right: J[0]
|
|
2323
2323
|
});
|
|
2324
|
-
O ? l.current?.onstart?.(D) : d ? l.current?.onend?.(D) :
|
|
2324
|
+
O ? l.current?.onstart?.(D) : d ? l.current?.onend?.(D) : Y && l.current?.onmove?.(D);
|
|
2325
2325
|
}, e[17] = c, e[18] = L) : L = e[18];
|
|
2326
|
-
let
|
|
2327
|
-
e[19] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2326
|
+
let C;
|
|
2327
|
+
e[19] === Symbol.for("react.memo_cache_sentinel") ? (C = {
|
|
2328
2328
|
capture: !0
|
|
2329
|
-
}, e[19] =
|
|
2329
|
+
}, e[19] = C) : C = e[19];
|
|
2330
2330
|
let E;
|
|
2331
2331
|
e[20] !== o ? (E = {
|
|
2332
2332
|
enabled: o,
|
|
2333
2333
|
target: f,
|
|
2334
|
-
pointer:
|
|
2334
|
+
pointer: C,
|
|
2335
2335
|
threshold: 0
|
|
2336
2336
|
}, e[20] = o, e[21] = E) : E = e[21], pn(L, E);
|
|
2337
|
-
let I,
|
|
2337
|
+
let I, K;
|
|
2338
2338
|
e[22] !== c ? (I = () => {
|
|
2339
2339
|
const N = c?.current;
|
|
2340
2340
|
if (!N)
|
|
2341
2341
|
return;
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2344
|
-
},
|
|
2342
|
+
const Y = l.current?.edges?.left, J = l.current?.edges?.right;
|
|
2343
|
+
Y && (h.current = N.querySelector(Y)), J && (f.current = N.querySelector(J));
|
|
2344
|
+
}, K = [c], e[22] = c, e[23] = I, e[24] = K) : (I = e[23], K = e[24]), sn(I, K);
|
|
2345
2345
|
let G;
|
|
2346
2346
|
e[25] !== s ? (G = s ? {
|
|
2347
2347
|
touchAction: "none"
|
|
2348
2348
|
} : {}, e[25] = s, e[26] = G) : G = e[26];
|
|
2349
|
-
let
|
|
2350
|
-
e[27] !== r || e[28] !== G ? (
|
|
2349
|
+
let B;
|
|
2350
|
+
e[27] !== r || e[28] !== G ? (B = {
|
|
2351
2351
|
...G,
|
|
2352
2352
|
...r
|
|
2353
|
-
}, e[27] = r, e[28] = G, e[29] =
|
|
2353
|
+
}, e[27] = r, e[28] = G, e[29] = B) : B = e[29];
|
|
2354
2354
|
let oe;
|
|
2355
|
-
return e[30] !== t || e[31] !== c || e[32] !==
|
|
2355
|
+
return e[30] !== t || e[31] !== c || e[32] !== B ? (oe = /* @__PURE__ */ A.jsx(Gs, { ref: c, style: B, draggable: !1, children: t }), e[30] = t, e[31] = c, e[32] = B, e[33] = oe) : oe = e[33], oe;
|
|
2356
2356
|
}, Gn = tt.getLogger("[Snap Debug]").setLevel("info"), _e = (n, e = 0) => n ? parseFloat(n) : e, vn = (n, e, t, r = Number.MAX_SAFE_INTEGER) => {
|
|
2357
2357
|
let s = n, o = r;
|
|
2358
2358
|
for (const i of e) {
|
|
@@ -2365,7 +2365,7 @@ const gn = (n, e, t, r, s) => ({
|
|
|
2365
2365
|
};
|
|
2366
2366
|
};
|
|
2367
2367
|
function Pr(n) {
|
|
2368
|
-
const e =
|
|
2368
|
+
const e = Ce.c(70), {
|
|
2369
2369
|
children: t,
|
|
2370
2370
|
edges: r,
|
|
2371
2371
|
left: s,
|
|
@@ -2375,32 +2375,32 @@ function Pr(n) {
|
|
|
2375
2375
|
getBounds: c,
|
|
2376
2376
|
enableResizing: u,
|
|
2377
2377
|
enableDragging: l,
|
|
2378
|
-
snapDistance:
|
|
2378
|
+
snapDistance: h,
|
|
2379
2379
|
snapPositions: f,
|
|
2380
2380
|
snapOrigin: p,
|
|
2381
2381
|
onResizeStart: S,
|
|
2382
|
-
onResize:
|
|
2383
|
-
onResizeEnd:
|
|
2384
|
-
onDragStart:
|
|
2382
|
+
onResize: y,
|
|
2383
|
+
onResizeEnd: w,
|
|
2384
|
+
onDragStart: x,
|
|
2385
2385
|
onDragEnd: b,
|
|
2386
|
-
onDrag:
|
|
2387
|
-
parentRef:
|
|
2386
|
+
onDrag: g,
|
|
2387
|
+
parentRef: m,
|
|
2388
2388
|
autoScroll: R,
|
|
2389
|
-
autoScrollSpeed:
|
|
2389
|
+
autoScrollSpeed: _,
|
|
2390
2390
|
autoScrollMaxSpeed: P,
|
|
2391
2391
|
ref: L
|
|
2392
|
-
} = n,
|
|
2392
|
+
} = n, C = i === void 0 ? on : i, E = a === void 0 ? Sn : a, I = c === void 0 ? Po : c, K = u === void 0 ? !0 : u, G = l === void 0 ? !0 : l, B = h === void 0 ? en : h;
|
|
2393
2393
|
let oe;
|
|
2394
2394
|
e[0] !== f ? (oe = f === void 0 ? [] : f, e[0] = f, e[1] = oe) : oe = e[1];
|
|
2395
|
-
const N = oe,
|
|
2396
|
-
initAutoScroll:
|
|
2395
|
+
const N = oe, Y = p === void 0 ? "leading" : p, J = R === void 0 ? !0 : R, W = se(null), O = se(0), d = se(!1), {
|
|
2396
|
+
initAutoScroll: T,
|
|
2397
2397
|
stopAutoScroll: D,
|
|
2398
2398
|
dealDragAutoScroll: z,
|
|
2399
2399
|
dealResizeAutoScroll: he
|
|
2400
|
-
} = os(
|
|
2400
|
+
} = os(m, _, P);
|
|
2401
2401
|
let pe;
|
|
2402
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (pe = (k,
|
|
2403
|
-
const F =
|
|
2402
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (pe = (k, q) => {
|
|
2403
|
+
const F = q === void 0 ? !0 : q;
|
|
2404
2404
|
if (!W.current)
|
|
2405
2405
|
return;
|
|
2406
2406
|
F && (O.current = 0);
|
|
@@ -2409,8 +2409,8 @@ function Pr(n) {
|
|
|
2409
2409
|
}, e[2] = pe) : pe = e[2];
|
|
2410
2410
|
const H = pe;
|
|
2411
2411
|
let Q;
|
|
2412
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (Q = (k,
|
|
2413
|
-
const F =
|
|
2412
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (Q = (k, q) => {
|
|
2413
|
+
const F = q === void 0 ? !0 : q;
|
|
2414
2414
|
if (!W.current)
|
|
2415
2415
|
return;
|
|
2416
2416
|
F && (O.current = 0);
|
|
@@ -2423,7 +2423,7 @@ function Pr(n) {
|
|
|
2423
2423
|
const Z = ne;
|
|
2424
2424
|
let U;
|
|
2425
2425
|
e[5] === Symbol.for("react.memo_cache_sentinel") ? (U = () => W.current ? _e(W.current.dataset.width) : 0, e[5] = U) : U = e[5];
|
|
2426
|
-
const
|
|
2426
|
+
const X = U;
|
|
2427
2427
|
let at, ct;
|
|
2428
2428
|
e[6] !== o ? (at = () => {
|
|
2429
2429
|
if (!W.current)
|
|
@@ -2440,55 +2440,55 @@ function Pr(n) {
|
|
|
2440
2440
|
updateLeft: (k) => H(k || 0, !1),
|
|
2441
2441
|
updateWidth: (k) => j(k, !1),
|
|
2442
2442
|
getLeft: Z,
|
|
2443
|
-
getWidth:
|
|
2443
|
+
getWidth: X
|
|
2444
2444
|
}), e[12] = Pe) : Pe = e[12], rr(L, Pe);
|
|
2445
2445
|
let Fe;
|
|
2446
|
-
e[13] !==
|
|
2447
|
-
O.current = 0, d.current = !1,
|
|
2448
|
-
}, e[13] =
|
|
2446
|
+
e[13] !== T || e[14] !== x ? (Fe = () => {
|
|
2447
|
+
O.current = 0, d.current = !1, T(), x?.();
|
|
2448
|
+
}, e[13] = T, e[14] = x, e[15] = Fe) : Fe = e[15];
|
|
2449
2449
|
const Ve = Fe;
|
|
2450
2450
|
let De;
|
|
2451
|
-
e[16] !== I || e[17] !== E || e[18] !==
|
|
2451
|
+
e[16] !== I || e[17] !== E || e[18] !== g || e[19] !== B || e[20] !== Y || e[21] !== N || e[22] !== C ? (De = (k) => {
|
|
2452
2452
|
const {
|
|
2453
|
-
preLeft:
|
|
2453
|
+
preLeft: q,
|
|
2454
2454
|
preWidth: F,
|
|
2455
2455
|
scrollDelta: $
|
|
2456
2456
|
} = k;
|
|
2457
2457
|
$ && (O.current = O.current + $);
|
|
2458
|
-
const ce = d.current ?
|
|
2458
|
+
const ce = d.current ? B : E;
|
|
2459
2459
|
if (Math.abs(O.current) < ce)
|
|
2460
2460
|
return;
|
|
2461
2461
|
const ie = Math.trunc(O.current / ce);
|
|
2462
|
-
let V =
|
|
2462
|
+
let V = q + ie * ce;
|
|
2463
2463
|
const le = O.current > 0;
|
|
2464
2464
|
let M = V;
|
|
2465
|
-
|
|
2465
|
+
Y === "leading" ? M = le ? V + F : V : Y === "right" ? M = V + F : Y === "center" && (M = V + F / 2);
|
|
2466
2466
|
const {
|
|
2467
2467
|
snap: ee
|
|
2468
|
-
} = vn(M, N,
|
|
2468
|
+
} = vn(M, N, B);
|
|
2469
2469
|
if (ee !== M)
|
|
2470
|
-
d.current = !0,
|
|
2470
|
+
d.current = !0, Y === "leading" ? V = le ? ee - F : ee : Y === "right" ? V = ee - F : Y === "center" ? V = ee - F / 2 : V = ee;
|
|
2471
2471
|
else {
|
|
2472
|
-
const fe = V -
|
|
2473
|
-
fe % E !== 0 && (V =
|
|
2472
|
+
const fe = V - C;
|
|
2473
|
+
fe % E !== 0 && (V = C + E * Math.round(fe / E)), d.current = !1;
|
|
2474
2474
|
}
|
|
2475
2475
|
O.current = O.current % ce;
|
|
2476
2476
|
const ue = I();
|
|
2477
|
-
V < ue.left ? V = ue.left : V + F > ue.right && (V = ue.right - F), !(
|
|
2478
|
-
lastLeft:
|
|
2477
|
+
V < ue.left ? V = ue.left : V + F > ue.right && (V = ue.right - F), !(g && g({
|
|
2478
|
+
lastLeft: q,
|
|
2479
2479
|
left: V,
|
|
2480
2480
|
lastWidth: F,
|
|
2481
2481
|
width: F
|
|
2482
2482
|
}, $) === !1) && H(V, !1);
|
|
2483
|
-
}, e[16] = I, e[17] = E, e[18] =
|
|
2483
|
+
}, e[16] = I, e[17] = E, e[18] = g, e[19] = B, e[20] = Y, e[21] = N, e[22] = C, e[23] = De) : De = e[23];
|
|
2484
2484
|
const Ie = De;
|
|
2485
2485
|
let lt;
|
|
2486
|
-
e[24] !== J || e[25] !== z || e[26] !== Ie || e[27] !==
|
|
2487
|
-
const
|
|
2488
|
-
O.current = O.current + k.dx, !(J &&
|
|
2489
|
-
if (!
|
|
2486
|
+
e[24] !== J || e[25] !== z || e[26] !== Ie || e[27] !== m ? (lt = (k) => {
|
|
2487
|
+
const q = k.target, F = _e(q.dataset.left), $ = _e(q.dataset.width);
|
|
2488
|
+
O.current = O.current + k.dx, !(J && m?.current && !z(k, (V) => {
|
|
2489
|
+
if (!m?.current || !W.current)
|
|
2490
2490
|
return;
|
|
2491
|
-
|
|
2491
|
+
m.current.scrollLeft = m.current.scrollLeft + V;
|
|
2492
2492
|
const le = W.current, M = _e(le.dataset.left), ee = _e(le.dataset.width);
|
|
2493
2493
|
Ie({
|
|
2494
2494
|
preLeft: M,
|
|
@@ -2499,53 +2499,53 @@ function Pr(n) {
|
|
|
2499
2499
|
preLeft: F,
|
|
2500
2500
|
preWidth: $
|
|
2501
2501
|
});
|
|
2502
|
-
}, e[24] = J, e[25] = z, e[26] = Ie, e[27] =
|
|
2502
|
+
}, e[24] = J, e[25] = z, e[26] = Ie, e[27] = m, e[28] = lt) : lt = e[28];
|
|
2503
2503
|
const It = lt;
|
|
2504
2504
|
let ke;
|
|
2505
2505
|
e[29] !== b || e[30] !== D ? (ke = (k) => {
|
|
2506
2506
|
O.current = 0, d.current = !1, D();
|
|
2507
|
-
const
|
|
2507
|
+
const q = k.target;
|
|
2508
2508
|
b?.({
|
|
2509
|
-
left: _e(
|
|
2510
|
-
width: _e(
|
|
2509
|
+
left: _e(q.dataset.left),
|
|
2510
|
+
width: _e(q.dataset.width)
|
|
2511
2511
|
});
|
|
2512
2512
|
}, e[29] = b, e[30] = D, e[31] = ke) : ke = e[31];
|
|
2513
2513
|
const ye = ke;
|
|
2514
2514
|
let We;
|
|
2515
|
-
e[32] !==
|
|
2516
|
-
O.current = 0, d.current = !1,
|
|
2517
|
-
const
|
|
2518
|
-
S?.(
|
|
2519
|
-
}, e[32] =
|
|
2515
|
+
e[32] !== T || e[33] !== S ? (We = (k) => {
|
|
2516
|
+
O.current = 0, d.current = !1, T();
|
|
2517
|
+
const q = k.edges?.right ? "right" : "left";
|
|
2518
|
+
S?.(q);
|
|
2519
|
+
}, e[32] = T, e[33] = S, e[34] = We) : We = e[34];
|
|
2520
2520
|
const Ue = We;
|
|
2521
2521
|
let $e;
|
|
2522
|
-
e[35] !== I || e[36] !== E || e[37] !==
|
|
2522
|
+
e[35] !== I || e[36] !== E || e[37] !== y || e[38] !== B || e[39] !== N || e[40] !== C ? ($e = (k) => {
|
|
2523
2523
|
const {
|
|
2524
|
-
dir:
|
|
2524
|
+
dir: q,
|
|
2525
2525
|
preWidth: F,
|
|
2526
2526
|
preLeft: $,
|
|
2527
2527
|
scrollDelta: ce
|
|
2528
2528
|
} = k;
|
|
2529
2529
|
ce && (O.current = O.current + ce);
|
|
2530
|
-
const ie = d.current ?
|
|
2530
|
+
const ie = d.current ? B : E;
|
|
2531
2531
|
if (Math.abs(O.current) < ie)
|
|
2532
2532
|
return;
|
|
2533
2533
|
const V = I();
|
|
2534
|
-
if (
|
|
2534
|
+
if (q === "left") {
|
|
2535
2535
|
const le = Math.trunc(O.current / ie);
|
|
2536
2536
|
let M = $ + le * ie;
|
|
2537
2537
|
const {
|
|
2538
2538
|
snap: ee
|
|
2539
|
-
} = vn(M, N,
|
|
2539
|
+
} = vn(M, N, B);
|
|
2540
2540
|
if (ee !== M)
|
|
2541
2541
|
d.current = !0, M = ee;
|
|
2542
2542
|
else {
|
|
2543
|
-
const Ee = M -
|
|
2544
|
-
Ee % E !== 0 && (M =
|
|
2543
|
+
const Ee = M - C;
|
|
2544
|
+
Ee % E !== 0 && (M = C + E * Math.round(Ee / E)), d.current = !1;
|
|
2545
2545
|
}
|
|
2546
2546
|
O.current = O.current % ie, M < V.left && (M = V.left);
|
|
2547
2547
|
const ue = $ + F, fe = ue - M;
|
|
2548
|
-
if (M >= ue ||
|
|
2548
|
+
if (M >= ue || y && y("left", {
|
|
2549
2549
|
lastLeft: $,
|
|
2550
2550
|
lastWidth: F,
|
|
2551
2551
|
left: M,
|
|
@@ -2558,15 +2558,15 @@ function Pr(n) {
|
|
|
2558
2558
|
let M = F + le * ie;
|
|
2559
2559
|
const ee = $ + M, {
|
|
2560
2560
|
snap: ue
|
|
2561
|
-
} = vn(ee, N,
|
|
2561
|
+
} = vn(ee, N, B);
|
|
2562
2562
|
if (ue !== ee)
|
|
2563
2563
|
d.current = !0, M = ue - $;
|
|
2564
2564
|
else {
|
|
2565
2565
|
let fe = $ + M;
|
|
2566
|
-
const Ee = fe -
|
|
2567
|
-
Ee % E !== 0 && (fe =
|
|
2566
|
+
const Ee = fe - C;
|
|
2567
|
+
Ee % E !== 0 && (fe = C + E * Math.round(Ee / E), M = fe - $), d.current = !1;
|
|
2568
2568
|
}
|
|
2569
|
-
if (O.current = O.current % ie, $ + M > V.right && (M = V.right - $), M <= 0 ||
|
|
2569
|
+
if (O.current = O.current % ie, $ + M > V.right && (M = V.right - $), M <= 0 || y && y("right", {
|
|
2570
2570
|
lastLeft: $,
|
|
2571
2571
|
lastWidth: F,
|
|
2572
2572
|
left: $,
|
|
@@ -2575,15 +2575,15 @@ function Pr(n) {
|
|
|
2575
2575
|
return;
|
|
2576
2576
|
j(M, !1);
|
|
2577
2577
|
}
|
|
2578
|
-
}, e[35] = I, e[36] = E, e[37] =
|
|
2578
|
+
}, e[35] = I, e[36] = E, e[37] = y, e[38] = B, e[39] = N, e[40] = C, e[41] = $e) : $e = e[41];
|
|
2579
2579
|
const ze = $e;
|
|
2580
2580
|
let Te;
|
|
2581
|
-
e[42] !== J || e[43] !== he || e[44] !==
|
|
2582
|
-
const
|
|
2583
|
-
O.current = O.current + (F === "left" ? k.deltaRect?.left || 0 : k.deltaRect?.right || 0), !(J &&
|
|
2584
|
-
if (!
|
|
2581
|
+
e[42] !== J || e[43] !== he || e[44] !== m || e[45] !== ze ? (Te = (k) => {
|
|
2582
|
+
const q = k.target, F = k.edges?.left ? "left" : "right", $ = _e(q.dataset.left), ce = _e(q.dataset.width);
|
|
2583
|
+
O.current = O.current + (F === "left" ? k.deltaRect?.left || 0 : k.deltaRect?.right || 0), !(J && m?.current && !he(k, F, (le) => {
|
|
2584
|
+
if (!m?.current || !W.current)
|
|
2585
2585
|
return;
|
|
2586
|
-
|
|
2586
|
+
m.current.scrollLeft = m.current.scrollLeft + le;
|
|
2587
2587
|
const M = W.current, ee = _e(M.dataset.left), ue = _e(M.dataset.width);
|
|
2588
2588
|
ze({
|
|
2589
2589
|
preLeft: ee,
|
|
@@ -2596,17 +2596,17 @@ function Pr(n) {
|
|
|
2596
2596
|
preWidth: ce,
|
|
2597
2597
|
dir: F
|
|
2598
2598
|
});
|
|
2599
|
-
}, e[42] = J, e[43] = he, e[44] =
|
|
2599
|
+
}, e[42] = J, e[43] = he, e[44] = m, e[45] = ze, e[46] = Te) : Te = e[46];
|
|
2600
2600
|
const He = Te;
|
|
2601
2601
|
let Be;
|
|
2602
|
-
e[47] !==
|
|
2602
|
+
e[47] !== w || e[48] !== D ? (Be = (k) => {
|
|
2603
2603
|
O.current = 0, d.current = !1, D();
|
|
2604
|
-
const
|
|
2605
|
-
|
|
2606
|
-
left: _e(
|
|
2607
|
-
width: _e(
|
|
2604
|
+
const q = k.target, F = k.edges?.right ? "right" : "left";
|
|
2605
|
+
w?.(F, {
|
|
2606
|
+
left: _e(q.dataset.left),
|
|
2607
|
+
width: _e(q.dataset.width)
|
|
2608
2608
|
});
|
|
2609
|
-
}, e[47] =
|
|
2609
|
+
}, e[47] = w, e[48] = D, e[49] = Be) : Be = e[49];
|
|
2610
2610
|
const Ye = Be, nt = s || 0, Xe = `${s || 0}px`;
|
|
2611
2611
|
let Ke;
|
|
2612
2612
|
e[50] !== Xe || e[51] !== o ? (Ke = {
|
|
@@ -2621,21 +2621,21 @@ function Pr(n) {
|
|
|
2621
2621
|
onmove: It,
|
|
2622
2622
|
onstart: Ve,
|
|
2623
2623
|
onend: ye,
|
|
2624
|
-
cursorChecker:
|
|
2624
|
+
cursorChecker: Co
|
|
2625
2625
|
}, e[53] = It, e[54] = Ve, e[55] = ye, e[56] = Le) : Le = e[56];
|
|
2626
|
-
let
|
|
2627
|
-
e[57] !== r || e[58] !== He || e[59] !== Ue || e[60] !== Ye ? (
|
|
2626
|
+
let Ae;
|
|
2627
|
+
e[57] !== r || e[58] !== He || e[59] !== Ue || e[60] !== Ye ? (Ae = {
|
|
2628
2628
|
axis: "x",
|
|
2629
2629
|
invert: "none",
|
|
2630
2630
|
edges: r,
|
|
2631
2631
|
onmove: He,
|
|
2632
2632
|
onstart: Ue,
|
|
2633
2633
|
onend: Ye
|
|
2634
|
-
}, e[57] = r, e[58] = He, e[59] = Ue, e[60] = Ye, e[61] =
|
|
2634
|
+
}, e[57] = r, e[58] = He, e[59] = Ue, e[60] = Ye, e[61] = Ae) : Ae = e[61];
|
|
2635
2635
|
let Ge;
|
|
2636
|
-
return e[62] !== t || e[63] !== G || e[64] !==
|
|
2636
|
+
return e[62] !== t || e[63] !== G || e[64] !== K || e[65] !== nt || e[66] !== qe || e[67] !== Le || e[68] !== Ae ? (Ge = /* @__PURE__ */ A.jsx(Ao, { "data-left": nt, style: qe, ref: W, draggable: G, resizable: K, draggableOptions: Le, resizableOptions: Ae, children: t }), e[62] = t, e[63] = G, e[64] = K, e[65] = nt, e[66] = qe, e[67] = Le, e[68] = Ae, e[69] = Ge) : Ge = e[69], Ge;
|
|
2637
2637
|
}
|
|
2638
|
-
function
|
|
2638
|
+
function Co() {
|
|
2639
2639
|
return "";
|
|
2640
2640
|
}
|
|
2641
2641
|
function Po() {
|
|
@@ -2651,7 +2651,7 @@ function Do() {
|
|
|
2651
2651
|
return t;
|
|
2652
2652
|
}
|
|
2653
2653
|
const Lo = (n) => {
|
|
2654
|
-
const e =
|
|
2654
|
+
const e = Ce.c(200), {
|
|
2655
2655
|
editorData: t,
|
|
2656
2656
|
row: r,
|
|
2657
2657
|
action: s,
|
|
@@ -2661,92 +2661,92 @@ const Lo = (n) => {
|
|
|
2661
2661
|
scaleWidth: c,
|
|
2662
2662
|
scaleSplitCount: u,
|
|
2663
2663
|
startLeft: l,
|
|
2664
|
-
gridSnap:
|
|
2664
|
+
gridSnap: h,
|
|
2665
2665
|
disableDrag: f,
|
|
2666
2666
|
autoScroll: p,
|
|
2667
2667
|
autoScrollSpeed: S,
|
|
2668
|
-
autoScrollMaxSpeed:
|
|
2669
|
-
scaleCount:
|
|
2670
|
-
maxScaleCount:
|
|
2668
|
+
autoScrollMaxSpeed: y,
|
|
2669
|
+
scaleCount: w,
|
|
2670
|
+
maxScaleCount: x,
|
|
2671
2671
|
setScaleCount: b,
|
|
2672
|
-
onActionMoveStart:
|
|
2673
|
-
onActionMoving:
|
|
2672
|
+
onActionMoveStart: g,
|
|
2673
|
+
onActionMoving: m,
|
|
2674
2674
|
onActionMoveEnd: R,
|
|
2675
|
-
onActionResizeStart:
|
|
2675
|
+
onActionResizeStart: _,
|
|
2676
2676
|
onActionResizeEnd: P,
|
|
2677
2677
|
onActionResizing: L,
|
|
2678
|
-
snapData:
|
|
2678
|
+
snapData: C,
|
|
2679
2679
|
setEditorData: E,
|
|
2680
2680
|
onClickAction: I,
|
|
2681
|
-
onClickActionOnly:
|
|
2681
|
+
onClickActionOnly: K,
|
|
2682
2682
|
onDoubleClickAction: G,
|
|
2683
|
-
onContextMenuAction:
|
|
2683
|
+
onContextMenuAction: B,
|
|
2684
2684
|
getActionRender: oe,
|
|
2685
2685
|
handleTime: N,
|
|
2686
|
-
scrollContainerRef:
|
|
2686
|
+
scrollContainerRef: Y
|
|
2687
2687
|
} = n, J = se(null), W = se(!1), {
|
|
2688
2688
|
id: O,
|
|
2689
2689
|
maxEnd: d,
|
|
2690
|
-
minStart:
|
|
2690
|
+
minStart: T,
|
|
2691
2691
|
end: D,
|
|
2692
2692
|
start: z,
|
|
2693
2693
|
selected: he,
|
|
2694
2694
|
flexible: pe,
|
|
2695
2695
|
movable: H,
|
|
2696
2696
|
effectId: Q
|
|
2697
|
-
} = s, j = pe === void 0 ? !0 : pe, ne = H === void 0 ? !0 : H, Z = a ?? Zt, U = c ?? Qt,
|
|
2697
|
+
} = s, j = pe === void 0 ? !0 : pe, ne = H === void 0 ? !0 : H, Z = a ?? Zt, U = c ?? Qt, X = l ?? on, at = u ?? sr, ct = x ?? Number.MAX_SAFE_INTEGER, je = T || 0;
|
|
2698
2698
|
let Ne;
|
|
2699
|
-
e[0] !== Z || e[1] !== U || e[2] !==
|
|
2700
|
-
startLeft:
|
|
2699
|
+
e[0] !== Z || e[1] !== U || e[2] !== X || e[3] !== je ? (Ne = Oe(je, {
|
|
2700
|
+
startLeft: X,
|
|
2701
2701
|
scale: Z,
|
|
2702
2702
|
scaleWidth: U
|
|
2703
|
-
}), e[0] = Z, e[1] = U, e[2] =
|
|
2703
|
+
}), e[0] = Z, e[1] = U, e[2] = X, e[3] = je, e[4] = Ne) : Ne = e[4];
|
|
2704
2704
|
const Pe = Ne, Fe = d || Number.MAX_VALUE;
|
|
2705
2705
|
let Ve;
|
|
2706
|
-
e[5] !== Z || e[6] !== U || e[7] !==
|
|
2707
|
-
startLeft:
|
|
2706
|
+
e[5] !== Z || e[6] !== U || e[7] !== X || e[8] !== Fe ? (Ve = Oe(Fe, {
|
|
2707
|
+
startLeft: X,
|
|
2708
2708
|
scale: Z,
|
|
2709
2709
|
scaleWidth: U
|
|
2710
|
-
}), e[5] = Z, e[6] = U, e[7] =
|
|
2711
|
-
const De = Math.min(ct * U +
|
|
2710
|
+
}), e[5] = Z, e[6] = U, e[7] = X, e[8] = Fe, e[9] = Ve) : Ve = e[9];
|
|
2711
|
+
const De = Math.min(ct * U + X, Ve);
|
|
2712
2712
|
let Ie;
|
|
2713
|
-
e[10] !== D || e[11] !== Z || e[12] !== U || e[13] !==
|
|
2713
|
+
e[10] !== D || e[11] !== Z || e[12] !== U || e[13] !== X || e[14] !== z ? (Ie = En({
|
|
2714
2714
|
start: z,
|
|
2715
2715
|
end: D
|
|
2716
2716
|
}, {
|
|
2717
|
-
startLeft:
|
|
2717
|
+
startLeft: X,
|
|
2718
2718
|
scale: Z,
|
|
2719
2719
|
scaleWidth: U
|
|
2720
|
-
}), e[10] = D, e[11] = Z, e[12] = U, e[13] =
|
|
2720
|
+
}), e[10] = D, e[11] = Z, e[12] = U, e[13] = X, e[14] = z, e[15] = Ie) : Ie = e[15];
|
|
2721
2721
|
const lt = Ie, [It, ke] = jt(null), ye = It ?? lt, We = U / at;
|
|
2722
2722
|
let Ue;
|
|
2723
2723
|
e[16] !== Q || e[17] !== o || e[18] !== j || e[19] !== ne || e[20] !== he ? (Ue = ge(Do("action", ne && "action-movable", he && "action-selected", j && "action-flexible", o[Q] && `action-effect-${Q}`)), e[16] = Q, e[17] = o, e[18] = j, e[19] = ne, e[20] = he, e[21] = Ue) : Ue = e[21];
|
|
2724
2724
|
const $e = Ue;
|
|
2725
2725
|
let ze;
|
|
2726
|
-
e[22] !== U || e[23] !==
|
|
2726
|
+
e[22] !== U || e[23] !== X || e[24] !== w || e[25] !== b ? (ze = (be, Se) => {
|
|
2727
2727
|
const re = zr(be + Se, {
|
|
2728
|
-
startLeft:
|
|
2729
|
-
scaleCount:
|
|
2728
|
+
startLeft: X,
|
|
2729
|
+
scaleCount: w,
|
|
2730
2730
|
scaleWidth: U
|
|
2731
2731
|
});
|
|
2732
|
-
re !==
|
|
2733
|
-
}, e[22] = U, e[23] =
|
|
2732
|
+
re !== w && b(re);
|
|
2733
|
+
}, e[22] = U, e[23] = X, e[24] = w, e[25] = b, e[26] = ze) : ze = e[26];
|
|
2734
2734
|
const Te = ze;
|
|
2735
2735
|
let He;
|
|
2736
|
-
e[27] !== s || e[28] !==
|
|
2737
|
-
|
|
2736
|
+
e[27] !== s || e[28] !== g || e[29] !== r ? (He = () => {
|
|
2737
|
+
g && g({
|
|
2738
2738
|
action: s,
|
|
2739
2739
|
row: r
|
|
2740
2740
|
});
|
|
2741
|
-
}, e[27] = s, e[28] =
|
|
2741
|
+
}, e[27] = s, e[28] = g, e[29] = r, e[30] = He) : He = e[30];
|
|
2742
2742
|
const Be = He;
|
|
2743
2743
|
let Ye;
|
|
2744
|
-
e[31] !== s || e[32] !== Te || e[33] !==
|
|
2744
|
+
e[31] !== s || e[32] !== Te || e[33] !== m || e[34] !== r || e[35] !== Z || e[36] !== U || e[37] !== X ? (Ye = (be) => {
|
|
2745
2745
|
const {
|
|
2746
2746
|
left: Se,
|
|
2747
2747
|
width: re
|
|
2748
2748
|
} = be;
|
|
2749
|
-
if (W.current = !0,
|
|
2749
|
+
if (W.current = !0, m) {
|
|
2750
2750
|
const {
|
|
2751
2751
|
start: me,
|
|
2752
2752
|
end: ae
|
|
@@ -2756,9 +2756,9 @@ const Lo = (n) => {
|
|
|
2756
2756
|
}, {
|
|
2757
2757
|
scaleWidth: U,
|
|
2758
2758
|
scale: Z,
|
|
2759
|
-
startLeft:
|
|
2759
|
+
startLeft: X
|
|
2760
2760
|
});
|
|
2761
|
-
if (
|
|
2761
|
+
if (m({
|
|
2762
2762
|
action: s,
|
|
2763
2763
|
row: r,
|
|
2764
2764
|
start: me,
|
|
@@ -2770,10 +2770,10 @@ const Lo = (n) => {
|
|
|
2770
2770
|
left: Se,
|
|
2771
2771
|
width: re
|
|
2772
2772
|
}), Te(Se, re);
|
|
2773
|
-
}, e[31] = s, e[32] = Te, e[33] =
|
|
2773
|
+
}, e[31] = s, e[32] = Te, e[33] = m, e[34] = r, e[35] = Z, e[36] = U, e[37] = X, e[38] = Ye) : Ye = e[38];
|
|
2774
2774
|
const nt = Ye;
|
|
2775
2775
|
let Xe;
|
|
2776
|
-
e[39] !== t || e[40] !== O || e[41] !== R || e[42] !== r || e[43] !== Z || e[44] !== U || e[45] !==
|
|
2776
|
+
e[39] !== t || e[40] !== O || e[41] !== R || e[42] !== r || e[43] !== Z || e[44] !== U || e[45] !== X || e[46] !== E ? (Xe = (be) => {
|
|
2777
2777
|
const {
|
|
2778
2778
|
left: Se,
|
|
2779
2779
|
width: re
|
|
@@ -2786,7 +2786,7 @@ const Lo = (n) => {
|
|
|
2786
2786
|
}, {
|
|
2787
2787
|
scaleWidth: U,
|
|
2788
2788
|
scale: Z,
|
|
2789
|
-
startLeft:
|
|
2789
|
+
startLeft: X
|
|
2790
2790
|
}), de = t.find((et) => et.id === r.id);
|
|
2791
2791
|
if (!de)
|
|
2792
2792
|
return;
|
|
@@ -2797,19 +2797,19 @@ const Lo = (n) => {
|
|
|
2797
2797
|
start: me,
|
|
2798
2798
|
end: ae
|
|
2799
2799
|
}), ke(null));
|
|
2800
|
-
}, e[39] = t, e[40] = O, e[41] = R, e[42] = r, e[43] = Z, e[44] = U, e[45] =
|
|
2800
|
+
}, e[39] = t, e[40] = O, e[41] = R, e[42] = r, e[43] = Z, e[44] = U, e[45] = X, e[46] = E, e[47] = Xe) : Xe = e[47];
|
|
2801
2801
|
const Ke = Xe;
|
|
2802
2802
|
let qe;
|
|
2803
|
-
e[48] !== s || e[49] !==
|
|
2804
|
-
|
|
2803
|
+
e[48] !== s || e[49] !== _ || e[50] !== r ? (qe = (be) => {
|
|
2804
|
+
_ && _({
|
|
2805
2805
|
action: s,
|
|
2806
2806
|
row: r,
|
|
2807
2807
|
dir: be
|
|
2808
2808
|
});
|
|
2809
|
-
}, e[48] = s, e[49] =
|
|
2809
|
+
}, e[48] = s, e[49] = _, e[50] = r, e[51] = qe) : qe = e[51];
|
|
2810
2810
|
const Le = qe;
|
|
2811
|
-
let
|
|
2812
|
-
e[52] !== s || e[53] !== Te || e[54] !== L || e[55] !== r || e[56] !== Z || e[57] !== U || e[58] !==
|
|
2811
|
+
let Ae;
|
|
2812
|
+
e[52] !== s || e[53] !== Te || e[54] !== L || e[55] !== r || e[56] !== Z || e[57] !== U || e[58] !== X ? (Ae = (be, Se) => {
|
|
2813
2813
|
const {
|
|
2814
2814
|
left: re,
|
|
2815
2815
|
width: me
|
|
@@ -2824,7 +2824,7 @@ const Lo = (n) => {
|
|
|
2824
2824
|
}, {
|
|
2825
2825
|
scaleWidth: U,
|
|
2826
2826
|
scale: Z,
|
|
2827
|
-
startLeft:
|
|
2827
|
+
startLeft: X
|
|
2828
2828
|
});
|
|
2829
2829
|
if (L({
|
|
2830
2830
|
action: s,
|
|
@@ -2839,10 +2839,10 @@ const Lo = (n) => {
|
|
|
2839
2839
|
left: re,
|
|
2840
2840
|
width: me
|
|
2841
2841
|
}), Te(re, me);
|
|
2842
|
-
}, e[52] = s, e[53] = Te, e[54] = L, e[55] = r, e[56] = Z, e[57] = U, e[58] =
|
|
2843
|
-
const Ge =
|
|
2842
|
+
}, e[52] = s, e[53] = Te, e[54] = L, e[55] = r, e[56] = Z, e[57] = U, e[58] = X, e[59] = Ae) : Ae = e[59];
|
|
2843
|
+
const Ge = Ae;
|
|
2844
2844
|
let k;
|
|
2845
|
-
e[60] !== t || e[61] !== O || e[62] !== P || e[63] !== r || e[64] !== Z || e[65] !== U || e[66] !==
|
|
2845
|
+
e[60] !== t || e[61] !== O || e[62] !== P || e[63] !== r || e[64] !== Z || e[65] !== U || e[66] !== X || e[67] !== E ? (k = (be, Se) => {
|
|
2846
2846
|
const {
|
|
2847
2847
|
left: re,
|
|
2848
2848
|
width: me
|
|
@@ -2855,7 +2855,7 @@ const Lo = (n) => {
|
|
|
2855
2855
|
}, {
|
|
2856
2856
|
scaleWidth: U,
|
|
2857
2857
|
scale: Z,
|
|
2858
|
-
startLeft:
|
|
2858
|
+
startLeft: X
|
|
2859
2859
|
}), Qe = t.find((un) => un.id === r.id);
|
|
2860
2860
|
if (!Qe)
|
|
2861
2861
|
return;
|
|
@@ -2867,17 +2867,17 @@ const Lo = (n) => {
|
|
|
2867
2867
|
end: de,
|
|
2868
2868
|
dir: be
|
|
2869
2869
|
}), ke(null));
|
|
2870
|
-
}, e[60] = t, e[61] = O, e[62] = P, e[63] = r, e[64] = Z, e[65] = U, e[66] =
|
|
2871
|
-
const
|
|
2870
|
+
}, e[60] = t, e[61] = O, e[62] = P, e[63] = r, e[64] = Z, e[65] = U, e[66] = X, e[67] = E, e[68] = k) : k = e[68];
|
|
2871
|
+
const q = k;
|
|
2872
2872
|
let F, $, ce, ie, V, le, M, ee, ue, fe, Ee, ut, ft, dt, ht, mt, Je, Ze, pt, gt, vt, bt, St, _t, wt, Et, yt, xt, Rt;
|
|
2873
|
-
if (e[69] !== s || e[70] !== p || e[71] !==
|
|
2873
|
+
if (e[69] !== s || e[70] !== p || e[71] !== y || e[72] !== S || e[73] !== $e || e[74] !== f || e[75] !== j || e[76] !== oe || e[77] !== We || e[78] !== h || e[79] !== nt || e[80] !== Ke || e[81] !== Be || e[82] !== q || e[83] !== Le || e[84] !== Ge || e[85] !== N || e[86] !== Pe || e[87] !== ne || e[88] !== I || e[89] !== K || e[90] !== B || e[91] !== G || e[92] !== De || e[93] !== r || e[94] !== i || e[95] !== Z || e[96] !== U || e[97] !== X || e[98] !== Y || e[99] !== C.assistPositions || e[100] !== ye.left || e[101] !== ye.width) {
|
|
2874
2874
|
const be = {
|
|
2875
2875
|
...s,
|
|
2876
2876
|
...kt({
|
|
2877
2877
|
left: ye.left,
|
|
2878
2878
|
width: ye.width
|
|
2879
2879
|
}, {
|
|
2880
|
-
startLeft:
|
|
2880
|
+
startLeft: X,
|
|
2881
2881
|
scaleWidth: U,
|
|
2882
2882
|
scale: Z
|
|
2883
2883
|
})
|
|
@@ -2885,7 +2885,7 @@ const Lo = (n) => {
|
|
|
2885
2885
|
...r,
|
|
2886
2886
|
actions: [...r.actions]
|
|
2887
2887
|
};
|
|
2888
|
-
r.actions.includes(s) && (Se.actions[r.actions.indexOf(s)] = be), F = Pr, ue = J, fe =
|
|
2888
|
+
r.actions.includes(s) && (Se.actions[r.actions.indexOf(s)] = be), F = Pr, ue = J, fe = Y, Ee = X, ut = ye.left, ft = ye.width, dt = h && We || Sn, ht = h ? Math.max((We || Sn) / 2, en) : en, mt = C.assistPositions, e[131] !== Pe || e[132] !== De ? (Je = () => ({
|
|
2889
2889
|
left: Pe,
|
|
2890
2890
|
right: De
|
|
2891
2891
|
}), e[131] = Pe, e[132] = De, e[133] = Je) : Je = e[133];
|
|
@@ -2895,20 +2895,20 @@ const Lo = (n) => {
|
|
|
2895
2895
|
e[137] !== f || e[138] !== j ? (me = !f && j && `.${ge("action-right-stretch")}`, e[137] = f, e[138] = j, e[139] = me) : me = e[139], e[140] !== re || e[141] !== me ? (Ze = {
|
|
2896
2896
|
left: re,
|
|
2897
2897
|
right: me
|
|
2898
|
-
}, e[140] = re, e[141] = me, e[142] = Ze) : Ze = e[142], pt = !f && ne, gt = !f && j, vt = Be, bt = nt, St = Ke, _t = Le, wt = Ge, Et =
|
|
2898
|
+
}, e[140] = re, e[141] = me, e[142] = Ze) : Ze = e[142], pt = !f && ne, gt = !f && j, vt = Be, bt = nt, St = Ke, _t = Le, wt = Ge, Et = q, yt = p, xt = S, Rt = y, e[143] === Symbol.for("react.memo_cache_sentinel") ? ($ = () => {
|
|
2899
2899
|
W.current = !1;
|
|
2900
|
-
}, e[143] = $) : $ = e[143], e[144] !== s || e[145] !== N || e[146] !== I || e[147] !==
|
|
2900
|
+
}, e[143] = $) : $ = e[143], e[144] !== s || e[145] !== N || e[146] !== I || e[147] !== K || e[148] !== r ? (ce = (ae) => {
|
|
2901
2901
|
let de;
|
|
2902
2902
|
I && (de = N(ae), I(ae, {
|
|
2903
2903
|
row: r,
|
|
2904
2904
|
action: s,
|
|
2905
2905
|
time: de
|
|
2906
|
-
})), !W.current &&
|
|
2906
|
+
})), !W.current && K && (de === void 0 && (de = N(ae)), K(ae, {
|
|
2907
2907
|
row: r,
|
|
2908
2908
|
action: s,
|
|
2909
2909
|
time: de
|
|
2910
2910
|
}));
|
|
2911
|
-
}, e[144] = s, e[145] = N, e[146] = I, e[147] =
|
|
2911
|
+
}, e[144] = s, e[145] = N, e[146] = I, e[147] = K, e[148] = r, e[149] = ce) : ce = e[149], e[150] !== s || e[151] !== N || e[152] !== G || e[153] !== r ? (ie = (ae) => {
|
|
2912
2912
|
if (G) {
|
|
2913
2913
|
const de = N(ae);
|
|
2914
2914
|
G(ae, {
|
|
@@ -2917,36 +2917,36 @@ const Lo = (n) => {
|
|
|
2917
2917
|
time: de
|
|
2918
2918
|
});
|
|
2919
2919
|
}
|
|
2920
|
-
}, e[150] = s, e[151] = N, e[152] = G, e[153] = r, e[154] = ie) : ie = e[154], e[155] !== s || e[156] !== N || e[157] !==
|
|
2921
|
-
if (
|
|
2920
|
+
}, e[150] = s, e[151] = N, e[152] = G, e[153] = r, e[154] = ie) : ie = e[154], e[155] !== s || e[156] !== N || e[157] !== B || e[158] !== r ? (V = (ae) => {
|
|
2921
|
+
if (B) {
|
|
2922
2922
|
const de = N(ae);
|
|
2923
|
-
|
|
2923
|
+
B(ae, {
|
|
2924
2924
|
row: r,
|
|
2925
2925
|
action: s,
|
|
2926
2926
|
time: de
|
|
2927
2927
|
});
|
|
2928
2928
|
}
|
|
2929
|
-
}, e[155] = s, e[156] = N, e[157] =
|
|
2929
|
+
}, e[155] = s, e[156] = N, e[157] = B, e[158] = r, e[159] = V) : V = e[159], le = $e, e[160] !== i ? (M = {
|
|
2930
2930
|
height: i
|
|
2931
|
-
}, e[160] = i, e[161] = M) : M = e[161], ee = oe && oe(be, Se), e[69] = s, e[70] = p, e[71] =
|
|
2931
|
+
}, e[160] = i, e[161] = M) : M = e[161], ee = oe && oe(be, Se), e[69] = s, e[70] = p, e[71] = y, e[72] = S, e[73] = $e, e[74] = f, e[75] = j, e[76] = oe, e[77] = We, e[78] = h, e[79] = nt, e[80] = Ke, e[81] = Be, e[82] = q, e[83] = Le, e[84] = Ge, e[85] = N, e[86] = Pe, e[87] = ne, e[88] = I, e[89] = K, e[90] = B, e[91] = G, e[92] = De, e[93] = r, e[94] = i, e[95] = Z, e[96] = U, e[97] = X, e[98] = Y, e[99] = C.assistPositions, e[100] = ye.left, e[101] = ye.width, e[102] = F, e[103] = $, e[104] = ce, e[105] = ie, e[106] = V, e[107] = le, e[108] = M, e[109] = ee, e[110] = ue, e[111] = fe, e[112] = Ee, e[113] = ut, e[114] = ft, e[115] = dt, e[116] = ht, e[117] = mt, e[118] = Je, e[119] = Ze, e[120] = pt, e[121] = gt, e[122] = vt, e[123] = bt, e[124] = St, e[125] = _t, e[126] = wt, e[127] = Et, e[128] = yt, e[129] = xt, e[130] = Rt;
|
|
2932
2932
|
} else
|
|
2933
2933
|
F = e[102], $ = e[103], ce = e[104], ie = e[105], V = e[106], le = e[107], M = e[108], ee = e[109], ue = e[110], fe = e[111], Ee = e[112], ut = e[113], ft = e[114], dt = e[115], ht = e[116], mt = e[117], Je = e[118], Ze = e[119], pt = e[120], gt = e[121], vt = e[122], bt = e[123], St = e[124], _t = e[125], wt = e[126], Et = e[127], yt = e[128], xt = e[129], Rt = e[130];
|
|
2934
2934
|
let Tt;
|
|
2935
2935
|
e[162] !== j ? (Tt = j && /* @__PURE__ */ A.jsx("div", { className: ge("action-left-stretch"), style: {
|
|
2936
2936
|
touchAction: "none"
|
|
2937
2937
|
} }), e[162] = j, e[163] = Tt) : Tt = e[163];
|
|
2938
|
-
let Ct;
|
|
2939
|
-
e[164] !== j ? (Ct = j && /* @__PURE__ */ A.jsx("div", { className: ge("action-right-stretch"), style: {
|
|
2940
|
-
touchAction: "none"
|
|
2941
|
-
} }), e[164] = j, e[165] = Ct) : Ct = e[165];
|
|
2942
2938
|
let At;
|
|
2943
|
-
e[
|
|
2939
|
+
e[164] !== j ? (At = j && /* @__PURE__ */ A.jsx("div", { className: ge("action-right-stretch"), style: {
|
|
2940
|
+
touchAction: "none"
|
|
2941
|
+
} }), e[164] = j, e[165] = At) : At = e[165];
|
|
2942
|
+
let Ct;
|
|
2943
|
+
e[166] !== $ || e[167] !== ce || e[168] !== ie || e[169] !== V || e[170] !== le || e[171] !== M || e[172] !== ee || e[173] !== Tt || e[174] !== At ? (Ct = /* @__PURE__ */ A.jsxs("div", { onMouseDown: $, onClick: ce, onDoubleClick: ie, onContextMenu: V, className: le, style: M, children: [
|
|
2944
2944
|
ee,
|
|
2945
2945
|
Tt,
|
|
2946
|
-
|
|
2947
|
-
] }), e[166] = $, e[167] = ce, e[168] = ie, e[169] = V, e[170] = le, e[171] = M, e[172] = ee, e[173] = Tt, e[174] =
|
|
2946
|
+
At
|
|
2947
|
+
] }), e[166] = $, e[167] = ce, e[168] = ie, e[169] = V, e[170] = le, e[171] = M, e[172] = ee, e[173] = Tt, e[174] = At, e[175] = Ct) : Ct = e[175];
|
|
2948
2948
|
let Ht;
|
|
2949
|
-
return e[176] !== F || e[177] !== ue || e[178] !== fe || e[179] !== Ee || e[180] !== ut || e[181] !== ft || e[182] !== dt || e[183] !== ht || e[184] !== mt || e[185] !== Je || e[186] !== Ze || e[187] !== pt || e[188] !== gt || e[189] !== vt || e[190] !== bt || e[191] !== St || e[192] !== _t || e[193] !== wt || e[194] !== Et || e[195] !== yt || e[196] !== xt || e[197] !== Rt || e[198] !==
|
|
2949
|
+
return e[176] !== F || e[177] !== ue || e[178] !== fe || e[179] !== Ee || e[180] !== ut || e[181] !== ft || e[182] !== dt || e[183] !== ht || e[184] !== mt || e[185] !== Je || e[186] !== Ze || e[187] !== pt || e[188] !== gt || e[189] !== vt || e[190] !== bt || e[191] !== St || e[192] !== _t || e[193] !== wt || e[194] !== Et || e[195] !== yt || e[196] !== xt || e[197] !== Rt || e[198] !== Ct ? (Ht = /* @__PURE__ */ A.jsx(F, { ref: ue, parentRef: fe, start: Ee, left: ut, width: ft, grid: dt, snapDistance: ht, snapPositions: mt, getBounds: Je, edges: Ze, enableDragging: pt, enableResizing: gt, onDragStart: vt, onDrag: bt, onDragEnd: St, onResizeStart: _t, onResize: wt, onResizeEnd: Et, autoScroll: yt, autoScrollSpeed: xt, autoScrollMaxSpeed: Rt, children: Ct }), e[176] = F, e[177] = ue, e[178] = fe, e[179] = Ee, e[180] = ut, e[181] = ft, e[182] = dt, e[183] = ht, e[184] = mt, e[185] = Je, e[186] = Ze, e[187] = pt, e[188] = gt, e[189] = vt, e[190] = bt, e[191] = St, e[192] = _t, e[193] = wt, e[194] = Et, e[195] = yt, e[196] = xt, e[197] = Rt, e[198] = Ct, e[199] = Ht) : Ht = e[199], Ht;
|
|
2950
2950
|
};
|
|
2951
2951
|
function Dt(n, e, t) {
|
|
2952
2952
|
let r = t.initialDeps ?? [], s;
|
|
@@ -2954,25 +2954,25 @@ function Dt(n, e, t) {
|
|
|
2954
2954
|
var i, a, c, u;
|
|
2955
2955
|
let l;
|
|
2956
2956
|
t.key && ((i = t.debug) != null && i.call(t)) && (l = Date.now());
|
|
2957
|
-
const
|
|
2958
|
-
if (!(
|
|
2957
|
+
const h = n();
|
|
2958
|
+
if (!(h.length !== r.length || h.some((S, y) => r[y] !== S)))
|
|
2959
2959
|
return s;
|
|
2960
|
-
r =
|
|
2960
|
+
r = h;
|
|
2961
2961
|
let p;
|
|
2962
|
-
if (t.key && ((a = t.debug) != null && a.call(t)) && (p = Date.now()), s = e(...
|
|
2963
|
-
const S = Math.round((Date.now() - l) * 100) / 100,
|
|
2964
|
-
for (b = String(b); b.length <
|
|
2962
|
+
if (t.key && ((a = t.debug) != null && a.call(t)) && (p = Date.now()), s = e(...h), t.key && ((c = t.debug) != null && c.call(t))) {
|
|
2963
|
+
const S = Math.round((Date.now() - l) * 100) / 100, y = Math.round((Date.now() - p) * 100) / 100, w = y / 16, x = (b, g) => {
|
|
2964
|
+
for (b = String(b); b.length < g; )
|
|
2965
2965
|
b = " " + b;
|
|
2966
2966
|
return b;
|
|
2967
2967
|
};
|
|
2968
2968
|
console.info(
|
|
2969
|
-
`%c⏱ ${
|
|
2969
|
+
`%c⏱ ${x(y, 5)} /${x(S, 5)} ms`,
|
|
2970
2970
|
`
|
|
2971
2971
|
font-size: .6rem;
|
|
2972
2972
|
font-weight: bold;
|
|
2973
2973
|
color: hsl(${Math.max(
|
|
2974
2974
|
0,
|
|
2975
|
-
Math.min(120 - 120 *
|
|
2975
|
+
Math.min(120 - 120 * w, 120)
|
|
2976
2976
|
)}deg 100% 31%);`,
|
|
2977
2977
|
t?.key
|
|
2978
2978
|
);
|
|
@@ -3050,8 +3050,8 @@ const Oo = (n, e) => Math.abs(n - e) < 1.01, Mo = (n, e, t) => {
|
|
|
3050
3050
|
},
|
|
3051
3051
|
n.options.isScrollingResetDelay
|
|
3052
3052
|
), i = (l) => () => {
|
|
3053
|
-
const { horizontal:
|
|
3054
|
-
s =
|
|
3053
|
+
const { horizontal: h, isRtl: f } = n.options;
|
|
3054
|
+
s = h ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, o(), e(s, l);
|
|
3055
3055
|
}, a = i(!0), c = i(!1);
|
|
3056
3056
|
c(), t.addEventListener("scroll", a, Qn);
|
|
3057
3057
|
const u = n.options.useScrollendEvent && er;
|
|
@@ -3225,14 +3225,14 @@ class Fo {
|
|
|
3225
3225
|
this.pendingMeasuredCacheIndexes = [];
|
|
3226
3226
|
const u = this.measurementsCache.slice(0, c);
|
|
3227
3227
|
for (let l = c; l < t; l++) {
|
|
3228
|
-
const
|
|
3228
|
+
const h = o(l), f = this.options.lanes === 1 ? u[l - 1] : this.getFurthestMeasurement(u, l), p = f ? f.end + this.options.gap : r + s, S = a.get(h), y = typeof S == "number" ? S : this.options.estimateSize(l), w = p + y, x = f ? f.lane : l % this.options.lanes;
|
|
3229
3229
|
u[l] = {
|
|
3230
3230
|
index: l,
|
|
3231
3231
|
start: p,
|
|
3232
|
-
size:
|
|
3233
|
-
end:
|
|
3234
|
-
key:
|
|
3235
|
-
lane:
|
|
3232
|
+
size: y,
|
|
3233
|
+
end: w,
|
|
3234
|
+
key: h,
|
|
3235
|
+
lane: x
|
|
3236
3236
|
};
|
|
3237
3237
|
}
|
|
3238
3238
|
return this.measurementsCache = u, u;
|
|
@@ -3375,8 +3375,8 @@ class Fo {
|
|
|
3375
3375
|
console.warn("Failed to get offset for index:", t);
|
|
3376
3376
|
return;
|
|
3377
3377
|
}
|
|
3378
|
-
const [
|
|
3379
|
-
this._scrollToOffset(
|
|
3378
|
+
const [h, f] = l;
|
|
3379
|
+
this._scrollToOffset(h, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
|
|
3380
3380
|
const p = this.getScrollOffset(), S = this.getOffsetForIndex(t, f);
|
|
3381
3381
|
if (!S) {
|
|
3382
3382
|
console.warn("Failed to get offset for index:", t);
|
|
@@ -3476,15 +3476,15 @@ function Vo({
|
|
|
3476
3476
|
}
|
|
3477
3477
|
return { startIndex: i, endIndex: a };
|
|
3478
3478
|
}
|
|
3479
|
-
const tr = typeof document < "u" ?
|
|
3479
|
+
const tr = typeof document < "u" ? v.useLayoutEffect : v.useEffect;
|
|
3480
3480
|
function Uo(n) {
|
|
3481
|
-
const e =
|
|
3481
|
+
const e = v.useReducer(() => ({}), {})[1], t = {
|
|
3482
3482
|
...n,
|
|
3483
3483
|
onChange: (s, o) => {
|
|
3484
3484
|
var i;
|
|
3485
3485
|
o ? Vr(e) : e(), (i = n.onChange) == null || i.call(n, s, o);
|
|
3486
3486
|
}
|
|
3487
|
-
}, [r] =
|
|
3487
|
+
}, [r] = v.useState(
|
|
3488
3488
|
() => new Fo(t)
|
|
3489
3489
|
);
|
|
3490
3490
|
return r.setOptions(t), tr(() => r._didMount(), []), tr(() => r._willUpdate()), r;
|
|
@@ -3509,70 +3509,70 @@ const $o = (n) => {
|
|
|
3509
3509
|
scale: c,
|
|
3510
3510
|
scaleWidth: u,
|
|
3511
3511
|
unstable_rowActionsOverscan: l
|
|
3512
|
-
} = n,
|
|
3513
|
-
e?.selected &&
|
|
3514
|
-
const f = c ?? Zt, p = u ?? Qt, S = a ?? on,
|
|
3512
|
+
} = n, h = ["edit-row"];
|
|
3513
|
+
e?.selected && h.push("edit-row-selected");
|
|
3514
|
+
const f = c ?? Zt, p = u ?? Qt, S = a ?? on, y = (g) => {
|
|
3515
3515
|
if (!i.current) return 0;
|
|
3516
|
-
const R =
|
|
3516
|
+
const R = g.currentTarget.getBoundingClientRect(), P = g.clientX - R.x;
|
|
3517
3517
|
return Mt(P, {
|
|
3518
3518
|
startLeft: S,
|
|
3519
3519
|
scale: f,
|
|
3520
3520
|
scaleWidth: p
|
|
3521
3521
|
});
|
|
3522
|
-
},
|
|
3522
|
+
}, w = Mr(() => (e?.actions ? [...e.actions] : []).sort((g, m) => g.start - m.start), [e]), x = Nr((g) => w[g]?.id ?? g, [w]), b = Lr({
|
|
3523
3523
|
horizontal: !0,
|
|
3524
|
-
count:
|
|
3525
|
-
getItemKey:
|
|
3524
|
+
count: w.length,
|
|
3525
|
+
getItemKey: x,
|
|
3526
3526
|
getScrollElement: () => i.current,
|
|
3527
|
-
estimateSize: (
|
|
3528
|
-
if (!
|
|
3529
|
-
let
|
|
3530
|
-
if (
|
|
3527
|
+
estimateSize: (g) => {
|
|
3528
|
+
if (!w[g]) return 0;
|
|
3529
|
+
let m = g > 0 ? w[g - 1].end : 0, R = w[g].end;
|
|
3530
|
+
if (m > R) return 0;
|
|
3531
3531
|
let {
|
|
3532
|
-
width:
|
|
3532
|
+
width: _
|
|
3533
3533
|
} = En({
|
|
3534
|
-
start:
|
|
3534
|
+
start: m,
|
|
3535
3535
|
end: R
|
|
3536
3536
|
}, {
|
|
3537
3537
|
startLeft: S,
|
|
3538
3538
|
scale: f,
|
|
3539
3539
|
scaleWidth: p
|
|
3540
3540
|
});
|
|
3541
|
-
return
|
|
3541
|
+
return _;
|
|
3542
3542
|
},
|
|
3543
3543
|
overscan: l ?? 5
|
|
3544
3544
|
});
|
|
3545
|
-
return ot(() => b.measure(), [f, p, S, b]), /* @__PURE__ */ A.jsx("div", { className: `${ge(...
|
|
3545
|
+
return ot(() => b.measure(), [f, p, S, b]), /* @__PURE__ */ A.jsx("div", { className: `${ge(...h)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (g) => {
|
|
3546
3546
|
if (e && r) {
|
|
3547
|
-
const
|
|
3548
|
-
r(
|
|
3547
|
+
const m = y(g);
|
|
3548
|
+
r(g, {
|
|
3549
3549
|
row: e,
|
|
3550
|
-
time:
|
|
3550
|
+
time: m
|
|
3551
3551
|
});
|
|
3552
3552
|
}
|
|
3553
|
-
}, onDoubleClick: (
|
|
3553
|
+
}, onDoubleClick: (g) => {
|
|
3554
3554
|
if (e && s) {
|
|
3555
|
-
const
|
|
3556
|
-
s(
|
|
3555
|
+
const m = y(g);
|
|
3556
|
+
s(g, {
|
|
3557
3557
|
row: e,
|
|
3558
|
-
time:
|
|
3558
|
+
time: m
|
|
3559
3559
|
});
|
|
3560
3560
|
}
|
|
3561
|
-
}, onContextMenu: (
|
|
3561
|
+
}, onContextMenu: (g) => {
|
|
3562
3562
|
if (e && o) {
|
|
3563
|
-
const
|
|
3564
|
-
o(
|
|
3563
|
+
const m = y(g);
|
|
3564
|
+
o(g, {
|
|
3565
3565
|
row: e,
|
|
3566
|
-
time:
|
|
3566
|
+
time: m
|
|
3567
3567
|
});
|
|
3568
3568
|
}
|
|
3569
|
-
}, children: e && b.getVirtualItems().map((
|
|
3570
|
-
const
|
|
3571
|
-
if (!
|
|
3572
|
-
return /* @__PURE__ */ A.jsx(Lo, { ...n, handleTime:
|
|
3569
|
+
}, children: e && b.getVirtualItems().map((g) => {
|
|
3570
|
+
const m = w[g.index];
|
|
3571
|
+
if (!m) throw new Error("Action not found");
|
|
3572
|
+
return /* @__PURE__ */ A.jsx(Lo, { ...n, handleTime: y, row: e, action: m }, m.id);
|
|
3573
3573
|
}) });
|
|
3574
3574
|
}, Ho = (n) => {
|
|
3575
|
-
const e =
|
|
3575
|
+
const e = Ce.c(20);
|
|
3576
3576
|
let t;
|
|
3577
3577
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
3578
3578
|
isMoving: !1,
|
|
@@ -3588,20 +3588,20 @@ const $o = (n) => {
|
|
|
3588
3588
|
const a = Ir(i);
|
|
3589
3589
|
let c;
|
|
3590
3590
|
e[4] !== a ? (c = () => {
|
|
3591
|
-
const
|
|
3592
|
-
if (b.snap &&
|
|
3593
|
-
const
|
|
3591
|
+
const x = o.current, b = a();
|
|
3592
|
+
if (b.snap && x && b.snapData.isMoving && b.snapPositions) {
|
|
3593
|
+
const g = x.assistActionIds, m = b.snapPositions.filter((R) => !(R.actionId === x.action.id || g && !g.includes(R.actionId))).map(Bo);
|
|
3594
3594
|
if (!b.hideCursor) {
|
|
3595
3595
|
const R = Oe(b.cursorTime, {
|
|
3596
3596
|
scaleWidth: b.scaleWidth ?? 160,
|
|
3597
3597
|
scale: b.scale ?? 1,
|
|
3598
3598
|
startLeft: b.startLeft ?? 20
|
|
3599
3599
|
});
|
|
3600
|
-
|
|
3600
|
+
m.push(R);
|
|
3601
3601
|
}
|
|
3602
3602
|
s((R) => ({
|
|
3603
3603
|
...R,
|
|
3604
|
-
assistPositions:
|
|
3604
|
+
assistPositions: m
|
|
3605
3605
|
}));
|
|
3606
3606
|
} else
|
|
3607
3607
|
!b.snap && b.snapData.isMoving && s(Yo);
|
|
@@ -3609,30 +3609,30 @@ const $o = (n) => {
|
|
|
3609
3609
|
let u;
|
|
3610
3610
|
e[6] !== n.snap ? (u = [n.snap], e[6] = n.snap, e[7] = u) : u = e[7], ot(c, u);
|
|
3611
3611
|
let l;
|
|
3612
|
-
e[8] !== n ? (l = (
|
|
3612
|
+
e[8] !== n ? (l = (x) => {
|
|
3613
3613
|
const b = n.getAssistDragLineActionIds && n.getAssistDragLineActionIds({
|
|
3614
|
-
action:
|
|
3615
|
-
row:
|
|
3614
|
+
action: x.action,
|
|
3615
|
+
row: x.row,
|
|
3616
3616
|
editorData: n.editorData
|
|
3617
3617
|
});
|
|
3618
3618
|
if (o.current = {
|
|
3619
|
-
action:
|
|
3620
|
-
row:
|
|
3619
|
+
action: x.action,
|
|
3620
|
+
row: x.row,
|
|
3621
3621
|
assistActionIds: b
|
|
3622
3622
|
}, n.snap && n.snapPositions) {
|
|
3623
|
-
const
|
|
3623
|
+
const g = n.snapPositions.filter((m) => !(m.actionId === x.action.id || b && !b.includes(m.actionId))).map(Xo);
|
|
3624
3624
|
if (!n.hideCursor) {
|
|
3625
|
-
const
|
|
3625
|
+
const m = Oe(n.cursorTime, {
|
|
3626
3626
|
scaleWidth: n.scaleWidth ?? 160,
|
|
3627
3627
|
scale: n.scale ?? 1,
|
|
3628
3628
|
startLeft: n.startLeft ?? 20
|
|
3629
3629
|
});
|
|
3630
|
-
|
|
3630
|
+
g.push(m);
|
|
3631
3631
|
}
|
|
3632
3632
|
s({
|
|
3633
3633
|
isMoving: !0,
|
|
3634
3634
|
movePositions: [],
|
|
3635
|
-
assistPositions:
|
|
3635
|
+
assistPositions: g
|
|
3636
3636
|
});
|
|
3637
3637
|
} else
|
|
3638
3638
|
s({
|
|
@@ -3641,21 +3641,21 @@ const $o = (n) => {
|
|
|
3641
3641
|
assistPositions: []
|
|
3642
3642
|
});
|
|
3643
3643
|
}, e[8] = n, e[9] = l) : l = e[9];
|
|
3644
|
-
const
|
|
3644
|
+
const h = l;
|
|
3645
3645
|
let f;
|
|
3646
|
-
e[10] !== n.scale || e[11] !== n.scaleWidth || e[12] !== n.snap || e[13] !== n.startLeft ? (f = (
|
|
3646
|
+
e[10] !== n.scale || e[11] !== n.scaleWidth || e[12] !== n.snap || e[13] !== n.startLeft ? (f = (x) => {
|
|
3647
3647
|
if (n.snap) {
|
|
3648
|
-
const b = n.scaleWidth ?? 160,
|
|
3648
|
+
const b = n.scaleWidth ?? 160, g = n.scale ?? 1, m = n.startLeft ?? 20, {
|
|
3649
3649
|
left: R,
|
|
3650
|
-
width:
|
|
3650
|
+
width: _
|
|
3651
3651
|
} = En({
|
|
3652
|
-
start:
|
|
3653
|
-
end:
|
|
3652
|
+
start: x.start,
|
|
3653
|
+
end: x.end
|
|
3654
3654
|
}, {
|
|
3655
|
-
startLeft:
|
|
3655
|
+
startLeft: m,
|
|
3656
3656
|
scaleWidth: b,
|
|
3657
|
-
scale:
|
|
3658
|
-
}), P =
|
|
3657
|
+
scale: g
|
|
3658
|
+
}), P = x.dir ? x.dir === "right" ? [R + _] : [R] : [R, R + _];
|
|
3659
3659
|
s((L) => ({
|
|
3660
3660
|
...L,
|
|
3661
3661
|
movePositions: P
|
|
@@ -3671,14 +3671,14 @@ const $o = (n) => {
|
|
|
3671
3671
|
assistPositions: []
|
|
3672
3672
|
});
|
|
3673
3673
|
}, e[15] = S) : S = e[15];
|
|
3674
|
-
const
|
|
3675
|
-
let
|
|
3676
|
-
return e[16] !==
|
|
3674
|
+
const y = S;
|
|
3675
|
+
let w;
|
|
3676
|
+
return e[16] !== h || e[17] !== p || e[18] !== r ? (w = {
|
|
3677
3677
|
snapData: r,
|
|
3678
|
-
handleInitSnap:
|
|
3678
|
+
handleInitSnap: h,
|
|
3679
3679
|
handleUpdateSnap: p,
|
|
3680
|
-
disposeSnap:
|
|
3681
|
-
}, e[16] =
|
|
3680
|
+
disposeSnap: y
|
|
3681
|
+
}, e[16] = h, e[17] = p, e[18] = r, e[19] = w) : w = e[19], w;
|
|
3682
3682
|
};
|
|
3683
3683
|
function Bo(n) {
|
|
3684
3684
|
return n.value;
|
|
@@ -3693,7 +3693,7 @@ function Xo(n) {
|
|
|
3693
3693
|
return n.value;
|
|
3694
3694
|
}
|
|
3695
3695
|
const Ko = (n) => {
|
|
3696
|
-
const e =
|
|
3696
|
+
const e = Ce.c(34);
|
|
3697
3697
|
let t, r;
|
|
3698
3698
|
e[0] !== n ? ({
|
|
3699
3699
|
ref: r,
|
|
@@ -3716,44 +3716,44 @@ const Ko = (n) => {
|
|
|
3716
3716
|
handleInitSnap: i,
|
|
3717
3717
|
handleUpdateSnap: a,
|
|
3718
3718
|
disposeSnap: c
|
|
3719
|
-
} = Ho(s), u = t.rowHeight ?? 32, l = t.scaleWidth ?? 160,
|
|
3719
|
+
} = Ho(s), u = t.rowHeight ?? 32, l = t.scaleWidth ?? 160, h = t.startLeft ?? 20, f = Math.max(t.scaleCount * l + h, t.timelineWidth);
|
|
3720
3720
|
let p;
|
|
3721
3721
|
if (e[13] !== f || e[14] !== u || e[15] !== c || e[16] !== i || e[17] !== a || e[18] !== t || e[19] !== o) {
|
|
3722
3722
|
const R = [];
|
|
3723
|
-
let
|
|
3723
|
+
let _ = 0;
|
|
3724
3724
|
for (let P = 0; P < t.editorData.length; P++) {
|
|
3725
3725
|
const L = t.editorData[P];
|
|
3726
3726
|
if (!L)
|
|
3727
3727
|
continue;
|
|
3728
|
-
const
|
|
3728
|
+
const C = L.rowHeight || u;
|
|
3729
3729
|
R.push(/* @__PURE__ */ kr($o, { ...t, key: L.id, rowData: L, snapData: o, scrollContainerRef: t.scrollElementRef, style: {
|
|
3730
3730
|
position: "absolute",
|
|
3731
3731
|
top: 0,
|
|
3732
3732
|
left: 0,
|
|
3733
3733
|
width: f,
|
|
3734
|
-
height: `${
|
|
3735
|
-
transform: `translateY(${
|
|
3736
|
-
}, onActionMoveStart: (E) => (i(E), t.onActionMoveStart && t.onActionMoveStart(E)), onActionResizeStart: (E) => (i(E), t.onActionResizeStart && t.onActionResizeStart(E)), onActionMoving: (E) => (a(E), t.onActionMoving && t.onActionMoving(E)), onActionResizing: (E) => (a(E), t.onActionResizing && t.onActionResizing(E)), onActionResizeEnd: (E) => (c(), t.onActionResizeEnd && t.onActionResizeEnd(E)), onActionMoveEnd: (E) => (c(), t.onActionMoveEnd && t.onActionMoveEnd(E)) })),
|
|
3734
|
+
height: `${C}px`,
|
|
3735
|
+
transform: `translateY(${_}px)`
|
|
3736
|
+
}, onActionMoveStart: (E) => (i(E), t.onActionMoveStart && t.onActionMoveStart(E)), onActionResizeStart: (E) => (i(E), t.onActionResizeStart && t.onActionResizeStart(E)), onActionMoving: (E) => (a(E), t.onActionMoving && t.onActionMoving(E)), onActionResizing: (E) => (a(E), t.onActionResizing && t.onActionResizing(E)), onActionResizeEnd: (E) => (c(), t.onActionResizeEnd && t.onActionResizeEnd(E)), onActionMoveEnd: (E) => (c(), t.onActionMoveEnd && t.onActionMoveEnd(E)) })), _ = _ + C;
|
|
3737
3737
|
}
|
|
3738
|
-
p = [
|
|
3738
|
+
p = [_, R], e[13] = f, e[14] = u, e[15] = c, e[16] = i, e[17] = a, e[18] = t, e[19] = o, e[20] = p;
|
|
3739
3739
|
} else
|
|
3740
3740
|
p = e[20];
|
|
3741
|
-
const [S,
|
|
3741
|
+
const [S, y] = p, w = `0, ${t.startLeft ?? 20}px`, x = `${t.startLeft ?? 20}px, ${t.scaleWidth ?? 160}px`;
|
|
3742
3742
|
let b;
|
|
3743
|
-
e[21] !== f || e[22] !==
|
|
3743
|
+
e[21] !== f || e[22] !== w || e[23] !== x || e[24] !== S ? (b = {
|
|
3744
3744
|
width: f,
|
|
3745
3745
|
height: S,
|
|
3746
3746
|
position: "relative",
|
|
3747
|
-
backgroundPositionX:
|
|
3748
|
-
backgroundSize:
|
|
3749
|
-
}, e[21] = f, e[22] =
|
|
3750
|
-
let
|
|
3751
|
-
e[26] !== t.snap || e[27] !== o ? (
|
|
3752
|
-
let
|
|
3753
|
-
return e[29] !== r || e[30] !==
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
] }), e[29] = r, e[30] =
|
|
3747
|
+
backgroundPositionX: w,
|
|
3748
|
+
backgroundSize: x
|
|
3749
|
+
}, e[21] = f, e[22] = w, e[23] = x, e[24] = S, e[25] = b) : b = e[25];
|
|
3750
|
+
let g;
|
|
3751
|
+
e[26] !== t.snap || e[27] !== o ? (g = t.snap && /* @__PURE__ */ A.jsx(ts, { ...o }), e[26] = t.snap, e[27] = o, e[28] = g) : g = e[28];
|
|
3752
|
+
let m;
|
|
3753
|
+
return e[29] !== r || e[30] !== y || e[31] !== b || e[32] !== g ? (m = /* @__PURE__ */ A.jsxs("div", { ref: r, style: b, className: "timeline-editor-edit-area", children: [
|
|
3754
|
+
y,
|
|
3755
|
+
g
|
|
3756
|
+
] }), e[29] = r, e[30] = y, e[31] = b, e[32] = g, e[33] = m) : m = e[33], m;
|
|
3757
3757
|
};
|
|
3758
3758
|
function qo({
|
|
3759
3759
|
scaleSplitCount: n,
|
|
@@ -3767,7 +3767,7 @@ function qo({
|
|
|
3767
3767
|
setCursor: c,
|
|
3768
3768
|
getScaleRender: u
|
|
3769
3769
|
}) {
|
|
3770
|
-
const l = n ?? 1,
|
|
3770
|
+
const l = n ?? 1, h = e ?? 160, f = t ?? 20, p = (n ?? 0) > 0, S = p ? r * (n ?? 1) + 1 : r, y = (p ? h / l : h) * (S - 1) + f, x = Lr({
|
|
3771
3771
|
horizontal: !0,
|
|
3772
3772
|
count: S,
|
|
3773
3773
|
getScrollElement: () => i.current,
|
|
@@ -3776,30 +3776,30 @@ function qo({
|
|
|
3776
3776
|
case 0:
|
|
3777
3777
|
return f;
|
|
3778
3778
|
default:
|
|
3779
|
-
return p ?
|
|
3779
|
+
return p ? h / l : h;
|
|
3780
3780
|
}
|
|
3781
3781
|
},
|
|
3782
3782
|
overscan: 10
|
|
3783
3783
|
});
|
|
3784
|
-
return ot(() =>
|
|
3785
|
-
width: `${
|
|
3784
|
+
return ot(() => x.measure(), [o, e, t, x]), /* @__PURE__ */ A.jsx("div", { style: {
|
|
3785
|
+
width: `${y}px`
|
|
3786
3786
|
}, className: ge("time-area"), onClick: (b) => {
|
|
3787
|
-
const
|
|
3788
|
-
if (
|
|
3789
|
-
const E = Mt(
|
|
3790
|
-
startLeft:
|
|
3787
|
+
const g = t ?? 20, m = e ?? 160, R = o ?? 1, _ = s ?? 1 / 0, P = b.currentTarget.getBoundingClientRect(), L = b.clientX - P.x, C = Math.max(L, g);
|
|
3788
|
+
if (C > _ * m + g) return;
|
|
3789
|
+
const E = Mt(C, {
|
|
3790
|
+
startLeft: g,
|
|
3791
3791
|
scale: R,
|
|
3792
|
-
scaleWidth:
|
|
3792
|
+
scaleWidth: m
|
|
3793
3793
|
});
|
|
3794
3794
|
a && a(E, b), !b.defaultPrevented && c({
|
|
3795
3795
|
time: E
|
|
3796
3796
|
});
|
|
3797
|
-
}, children:
|
|
3798
|
-
const
|
|
3797
|
+
}, children: x.getVirtualItems().map((b) => {
|
|
3798
|
+
const g = b.index, m = n ?? 1, R = o ?? 1, _ = p ? g % m === 0 : !0, P = [ge("time-unit"), ge(_ ? "time-unit-big" : "time-unit-small")], L = (p ? g / m : g) * R;
|
|
3799
3799
|
return /* @__PURE__ */ A.jsx("div", { "data-index": b.index, style: {
|
|
3800
3800
|
width: `${b.size}px`,
|
|
3801
3801
|
transform: `translateX(${b.start}px)`
|
|
3802
|
-
}, className: P.join(" "), children:
|
|
3802
|
+
}, className: P.join(" "), children: _ && /* @__PURE__ */ A.jsx("div", { className: ge("time-unit-scale"), children: u?.(L) ?? L }) }, b.key);
|
|
3803
3803
|
}) });
|
|
3804
3804
|
}
|
|
3805
3805
|
function Go(n) {
|
|
@@ -3875,7 +3875,7 @@ function ai(n, e) {
|
|
|
3875
3875
|
return typeof n == "function" ? ii(n) : si(n, e);
|
|
3876
3876
|
}
|
|
3877
3877
|
function ci(n) {
|
|
3878
|
-
const e =
|
|
3878
|
+
const e = Ce.c(4), {
|
|
3879
3879
|
elementRef: t
|
|
3880
3880
|
} = n;
|
|
3881
3881
|
let r;
|
|
@@ -3895,7 +3895,7 @@ function ci(n) {
|
|
|
3895
3895
|
}, a = [t], e[1] = t, e[2] = i, e[3] = a) : (i = e[2], a = e[3]), sn(i, a), s;
|
|
3896
3896
|
}
|
|
3897
3897
|
const li = (n) => {
|
|
3898
|
-
const e =
|
|
3898
|
+
const e = Ce.c(49), {
|
|
3899
3899
|
disableDrag: t,
|
|
3900
3900
|
cursorTime: r,
|
|
3901
3901
|
setCursor: s,
|
|
@@ -3905,22 +3905,22 @@ const li = (n) => {
|
|
|
3905
3905
|
scaleCount: c,
|
|
3906
3906
|
scaleSplitCount: u,
|
|
3907
3907
|
scrollElementRef: l,
|
|
3908
|
-
maxScaleCount:
|
|
3908
|
+
maxScaleCount: h,
|
|
3909
3909
|
onCursorDragStart: f,
|
|
3910
3910
|
onCursorDrag: p,
|
|
3911
3911
|
onCursorDragEnd: S,
|
|
3912
|
-
cursorSnap:
|
|
3913
|
-
autoScrollSpeed:
|
|
3914
|
-
autoScrollMaxSpeed:
|
|
3912
|
+
cursorSnap: y,
|
|
3913
|
+
autoScrollSpeed: w,
|
|
3914
|
+
autoScrollMaxSpeed: x,
|
|
3915
3915
|
snapPositions: b
|
|
3916
3916
|
} = n;
|
|
3917
|
-
let
|
|
3918
|
-
e[0] !== b ? (
|
|
3919
|
-
const
|
|
3920
|
-
let
|
|
3921
|
-
e[2] !==
|
|
3922
|
-
const E =
|
|
3923
|
-
let I,
|
|
3917
|
+
let g;
|
|
3918
|
+
e[0] !== b ? (g = b === void 0 ? [] : b, e[0] = b, e[1] = g) : g = e[1];
|
|
3919
|
+
const m = g, R = se(null), _ = o ?? 20, P = i ?? 160, L = a ?? 1;
|
|
3920
|
+
let C;
|
|
3921
|
+
e[2] !== y || e[3] !== m ? (C = y ? m : [], e[2] = y, e[3] = m, e[4] = C) : C = e[4];
|
|
3922
|
+
const E = C;
|
|
3923
|
+
let I, K;
|
|
3924
3924
|
e[5] !== r || e[6] !== a || e[7] !== i || e[8] !== o ? (I = () => {
|
|
3925
3925
|
if (R.current) {
|
|
3926
3926
|
const Q = o ?? 20, j = i ?? 160, ne = a ?? 1;
|
|
@@ -3930,53 +3930,53 @@ const li = (n) => {
|
|
|
3930
3930
|
scale: ne
|
|
3931
3931
|
}));
|
|
3932
3932
|
}
|
|
3933
|
-
},
|
|
3934
|
-
const G =
|
|
3933
|
+
}, K = [r, o, i, a], e[5] = r, e[6] = a, e[7] = i, e[8] = o, e[9] = I, e[10] = K) : (I = e[9], K = e[10]), ot(I, K);
|
|
3934
|
+
const G = h ?? 1 / 0, B = (u ?? 0) > 0, oe = u ?? 1, N = B ? c * (u ?? 1) + 1 : c, Y = o ?? 20, J = (B ? P / oe : P) * (N - 1) + Y;
|
|
3935
3935
|
let W;
|
|
3936
|
-
e[11] !==
|
|
3936
|
+
e[11] !== _ || e[12] !== G || e[13] !== l || e[14] !== J || e[15] !== P ? (W = () => ({
|
|
3937
3937
|
left: 0,
|
|
3938
|
-
right: Math.min(J, G * P +
|
|
3939
|
-
}), e[11] =
|
|
3938
|
+
right: Math.min(J, G * P + _ - (l.current?.scrollLeft ?? 0))
|
|
3939
|
+
}), e[11] = _, e[12] = G, e[13] = l, e[14] = J, e[15] = P, e[16] = W) : W = e[16];
|
|
3940
3940
|
const O = !t;
|
|
3941
3941
|
let d;
|
|
3942
|
-
e[17] !== r || e[18] !==
|
|
3942
|
+
e[17] !== r || e[18] !== _ || e[19] !== f || e[20] !== L || e[21] !== P ? (d = () => {
|
|
3943
3943
|
const Q = R.current?.getLeft() ?? Oe(r, {
|
|
3944
|
-
startLeft:
|
|
3944
|
+
startLeft: _,
|
|
3945
3945
|
scaleWidth: P,
|
|
3946
3946
|
scale: L
|
|
3947
3947
|
}), j = Mt(Q, {
|
|
3948
|
-
startLeft:
|
|
3948
|
+
startLeft: _,
|
|
3949
3949
|
scale: L,
|
|
3950
3950
|
scaleWidth: P
|
|
3951
3951
|
});
|
|
3952
3952
|
f && f(j);
|
|
3953
|
-
}, e[17] = r, e[18] =
|
|
3954
|
-
let
|
|
3955
|
-
e[23] !==
|
|
3953
|
+
}, e[17] = r, e[18] = _, e[19] = f, e[20] = L, e[21] = P, e[22] = d) : d = e[22];
|
|
3954
|
+
let T;
|
|
3955
|
+
e[23] !== _ || e[24] !== S || e[25] !== L || e[26] !== s || e[27] !== P ? (T = (Q) => {
|
|
3956
3956
|
const {
|
|
3957
3957
|
left: j
|
|
3958
3958
|
} = Q, ne = Mt(j, {
|
|
3959
|
-
startLeft:
|
|
3959
|
+
startLeft: _,
|
|
3960
3960
|
scale: L,
|
|
3961
3961
|
scaleWidth: P
|
|
3962
3962
|
});
|
|
3963
3963
|
s({
|
|
3964
3964
|
time: ne
|
|
3965
3965
|
}), S && S(ne);
|
|
3966
|
-
}, e[23] =
|
|
3966
|
+
}, e[23] = _, e[24] = S, e[25] = L, e[26] = s, e[27] = P, e[28] = T) : T = e[28];
|
|
3967
3967
|
let D;
|
|
3968
|
-
e[29] !==
|
|
3968
|
+
e[29] !== _ || e[30] !== p || e[31] !== L || e[32] !== s || e[33] !== P ? (D = (Q) => {
|
|
3969
3969
|
const {
|
|
3970
3970
|
left: j
|
|
3971
3971
|
} = Q, ne = Mt(j, {
|
|
3972
|
-
startLeft:
|
|
3972
|
+
startLeft: _,
|
|
3973
3973
|
scale: L,
|
|
3974
3974
|
scaleWidth: P
|
|
3975
3975
|
});
|
|
3976
3976
|
s({
|
|
3977
3977
|
time: ne
|
|
3978
3978
|
}), p && p(ne);
|
|
3979
|
-
}, e[29] =
|
|
3979
|
+
}, e[29] = _, e[30] = p, e[31] = L, e[32] = s, e[33] = P, e[34] = D) : D = e[34];
|
|
3980
3980
|
let z, he;
|
|
3981
3981
|
e[35] === Symbol.for("react.memo_cache_sentinel") ? (z = ge("cursor"), he = ge("cursor-top"), e[35] = z, e[36] = he) : (z = e[35], he = e[36]);
|
|
3982
3982
|
let pe;
|
|
@@ -3985,10 +3985,10 @@ const li = (n) => {
|
|
|
3985
3985
|
/* @__PURE__ */ A.jsx("div", { className: ge("cursor-area") })
|
|
3986
3986
|
] }), e[37] = pe) : pe = e[37];
|
|
3987
3987
|
let H;
|
|
3988
|
-
return e[38] !== E || e[39] !==
|
|
3988
|
+
return e[38] !== E || e[39] !== x || e[40] !== w || e[41] !== _ || e[42] !== l || e[43] !== D || e[44] !== W || e[45] !== O || e[46] !== d || e[47] !== T ? (H = /* @__PURE__ */ A.jsx(Pr, { start: _, ref: R, parentRef: l, getBounds: W, autoScroll: !0, autoScrollSpeed: w, autoScrollMaxSpeed: x, enableDragging: O, enableResizing: !1, snapPositions: E, snapDistance: en, snapOrigin: "left", onDragStart: d, onDragEnd: T, onDrag: D, children: pe }), e[38] = E, e[39] = x, e[40] = w, e[41] = _, e[42] = l, e[43] = D, e[44] = W, e[45] = O, e[46] = d, e[47] = T, e[48] = H) : H = e[48], H;
|
|
3989
3989
|
};
|
|
3990
3990
|
function nr(n) {
|
|
3991
|
-
const e =
|
|
3991
|
+
const e = Ce.c(9);
|
|
3992
3992
|
let t, r, s;
|
|
3993
3993
|
e[0] !== n ? ({
|
|
3994
3994
|
className: t,
|
|
@@ -4002,7 +4002,7 @@ function nr(n) {
|
|
|
4002
4002
|
return e[5] !== t || e[6] !== o || e[7] !== r ? (a = /* @__PURE__ */ A.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] = a) : a = e[8], a;
|
|
4003
4003
|
}
|
|
4004
4004
|
function ui(n) {
|
|
4005
|
-
const e =
|
|
4005
|
+
const e = Ce.c(7), {
|
|
4006
4006
|
scrollElementRef: t,
|
|
4007
4007
|
scale: r,
|
|
4008
4008
|
scaleWidth: s,
|
|
@@ -4011,18 +4011,18 @@ function ui(n) {
|
|
|
4011
4011
|
} = n, a = se(null), c = se(null);
|
|
4012
4012
|
let u, l;
|
|
4013
4013
|
e[0] !== i || e[1] !== r || e[2] !== s || e[3] !== t || e[4] !== o ? (u = () => {
|
|
4014
|
-
const
|
|
4015
|
-
if (a.current !== null && c.current !== null &&
|
|
4016
|
-
const f =
|
|
4014
|
+
const h = t.current;
|
|
4015
|
+
if (a.current !== null && c.current !== null && h && (a.current !== r || c.current !== s)) {
|
|
4016
|
+
const f = h.scrollLeft, p = i.current, S = Oe(p, {
|
|
4017
4017
|
startLeft: o,
|
|
4018
4018
|
scale: a.current,
|
|
4019
4019
|
scaleWidth: c.current
|
|
4020
|
-
}),
|
|
4020
|
+
}), y = Oe(p, {
|
|
4021
4021
|
startLeft: o,
|
|
4022
4022
|
scale: r,
|
|
4023
4023
|
scaleWidth: s
|
|
4024
|
-
}),
|
|
4025
|
-
|
|
4024
|
+
}), w = S - f, x = y - w;
|
|
4025
|
+
h.scrollLeft = x;
|
|
4026
4026
|
}
|
|
4027
4027
|
a.current = r, c.current = s;
|
|
4028
4028
|
}, l = [r, s, o, t, i], e[0] = i, e[1] = r, e[2] = s, e[3] = t, e[4] = o, e[5] = u, e[6] = l) : (u = e[5], l = e[6]), sn(u, l);
|
|
@@ -4036,97 +4036,97 @@ function mi({
|
|
|
4036
4036
|
height: o
|
|
4037
4037
|
} = ci({
|
|
4038
4038
|
elementRef: r
|
|
4039
|
-
}), i = t.minScaleCount ?? Math.max(jr(t.editorData, {
|
|
4039
|
+
}), i = e.unstable_forceRemountEditorArea ?? 0, a = t.minScaleCount ?? Math.max(jr(t.editorData, {
|
|
4040
4040
|
scale: t.scale,
|
|
4041
4041
|
pad: 0.1
|
|
4042
|
-
}), Math.ceil((s - t.startLeft) / t.scaleWidth)),
|
|
4042
|
+
}), Math.ceil((s - t.startLeft) / t.scaleWidth)), c = Math.min(t.maxScaleCount, a), u = t.editorData ? Fr(t.editorData.flatMap((m) => m.actions), {
|
|
4043
4043
|
startLeft: t.startLeft,
|
|
4044
4044
|
scale: t.scale,
|
|
4045
4045
|
scaleWidth: t.scaleWidth
|
|
4046
|
-
}) : [], [
|
|
4046
|
+
}) : [], [l, h] = jt(null);
|
|
4047
4047
|
sn(() => {
|
|
4048
|
-
|
|
4049
|
-
}, [
|
|
4050
|
-
const
|
|
4051
|
-
const
|
|
4052
|
-
|
|
4053
|
-
}, [
|
|
4048
|
+
h(null);
|
|
4049
|
+
}, [c]);
|
|
4050
|
+
const f = l ?? c, p = (m) => {
|
|
4051
|
+
const R = Math.min(t.maxScaleCount, m);
|
|
4052
|
+
h(R);
|
|
4053
|
+
}, [S, y] = jt(Cn), w = se(Cn);
|
|
4054
4054
|
ui({
|
|
4055
4055
|
scrollElementRef: r,
|
|
4056
4056
|
scale: t.scale,
|
|
4057
4057
|
scaleWidth: t.scaleWidth,
|
|
4058
4058
|
startLeft: t.startLeft,
|
|
4059
|
-
cursorTimeRef:
|
|
4059
|
+
cursorTimeRef: w
|
|
4060
4060
|
});
|
|
4061
|
-
const x = (
|
|
4062
|
-
t.onChange?.(
|
|
4063
|
-
},
|
|
4061
|
+
const x = (m) => {
|
|
4062
|
+
t.onChange?.(m);
|
|
4063
|
+
}, b = (m) => {
|
|
4064
4064
|
let {
|
|
4065
|
-
left:
|
|
4066
|
-
time:
|
|
4067
|
-
} =
|
|
4068
|
-
return typeof
|
|
4065
|
+
left: R,
|
|
4066
|
+
time: _
|
|
4067
|
+
} = m;
|
|
4068
|
+
return typeof _ < "u" ? (y(_), w.current = _, !0) : typeof R < "u" ? (y(w.current = Mt(R, {
|
|
4069
4069
|
startLeft: t.startLeft,
|
|
4070
4070
|
scale: t.scale,
|
|
4071
4071
|
scaleWidth: t.scaleWidth
|
|
4072
4072
|
})), !0) : !1;
|
|
4073
|
-
},
|
|
4074
|
-
const
|
|
4075
|
-
if (!
|
|
4073
|
+
}, g = (m, R = {}) => {
|
|
4074
|
+
const _ = r.current;
|
|
4075
|
+
if (!_) return;
|
|
4076
4076
|
const {
|
|
4077
|
-
block:
|
|
4078
|
-
offset:
|
|
4079
|
-
onlyIfNotVisible:
|
|
4080
|
-
} =
|
|
4077
|
+
block: P = "start",
|
|
4078
|
+
offset: L = 0,
|
|
4079
|
+
onlyIfNotVisible: C = !1
|
|
4080
|
+
} = R, E = Oe(m, {
|
|
4081
4081
|
startLeft: t.startLeft,
|
|
4082
4082
|
scale: t.scale,
|
|
4083
4083
|
scaleWidth: t.scaleWidth
|
|
4084
|
-
}),
|
|
4085
|
-
if (
|
|
4086
|
-
const
|
|
4087
|
-
if (
|
|
4084
|
+
}), I = _.clientWidth;
|
|
4085
|
+
if (C) {
|
|
4086
|
+
const B = _.scrollLeft;
|
|
4087
|
+
if (E >= B && E <= B + I)
|
|
4088
4088
|
return;
|
|
4089
4089
|
}
|
|
4090
|
-
let
|
|
4091
|
-
|
|
4092
|
-
const
|
|
4093
|
-
|
|
4094
|
-
left: Math.min(Math.max(
|
|
4095
|
-
behavior:
|
|
4090
|
+
let K;
|
|
4091
|
+
P === "end" ? K = E - I + L : P === "center" ? K = E - I / 2 : K = E - L;
|
|
4092
|
+
const G = Math.max(0, _.scrollWidth - I);
|
|
4093
|
+
_.scrollTo({
|
|
4094
|
+
left: Math.min(Math.max(K, 0), G),
|
|
4095
|
+
behavior: R.behavior ?? "instant"
|
|
4096
4096
|
});
|
|
4097
4097
|
};
|
|
4098
4098
|
return rr(n, () => ({
|
|
4099
4099
|
get target() {
|
|
4100
4100
|
return r.current;
|
|
4101
4101
|
},
|
|
4102
|
-
set time(
|
|
4103
|
-
|
|
4104
|
-
time:
|
|
4102
|
+
set time(m) {
|
|
4103
|
+
b({
|
|
4104
|
+
time: m
|
|
4105
4105
|
});
|
|
4106
4106
|
},
|
|
4107
4107
|
get time() {
|
|
4108
|
-
return
|
|
4108
|
+
return w.current;
|
|
4109
4109
|
},
|
|
4110
4110
|
getTime() {
|
|
4111
|
-
return
|
|
4111
|
+
return w.current;
|
|
4112
4112
|
},
|
|
4113
|
-
setTime(
|
|
4114
|
-
|
|
4115
|
-
time:
|
|
4113
|
+
setTime(m) {
|
|
4114
|
+
b({
|
|
4115
|
+
time: m
|
|
4116
4116
|
});
|
|
4117
4117
|
},
|
|
4118
|
-
getTimePixelPosition(
|
|
4119
|
-
return Oe(
|
|
4118
|
+
getTimePixelPosition(m) {
|
|
4119
|
+
return Oe(m ?? w.current, {
|
|
4120
4120
|
startLeft: t.startLeft,
|
|
4121
4121
|
scale: t.scale,
|
|
4122
4122
|
scaleWidth: t.scaleWidth
|
|
4123
4123
|
});
|
|
4124
4124
|
},
|
|
4125
|
-
setScrollLeft: (
|
|
4126
|
-
r.current && (r.current.scrollLeft =
|
|
4125
|
+
setScrollLeft: (m) => {
|
|
4126
|
+
r.current && (r.current.scrollLeft = m);
|
|
4127
4127
|
},
|
|
4128
|
-
setScrollTop: (
|
|
4129
|
-
r.current && (r.current.scrollTop =
|
|
4128
|
+
setScrollTop: (m) => {
|
|
4129
|
+
r.current && (r.current.scrollTop = m);
|
|
4130
4130
|
},
|
|
4131
4131
|
get scrollLeft() {
|
|
4132
4132
|
return r.current ? r.current.scrollLeft : 0;
|
|
@@ -4134,20 +4134,20 @@ function mi({
|
|
|
4134
4134
|
get scrollTop() {
|
|
4135
4135
|
return r.current ? r.current.scrollTop : 0;
|
|
4136
4136
|
},
|
|
4137
|
-
set scrollLeft(
|
|
4138
|
-
r.current && (r.current.scrollLeft =
|
|
4137
|
+
set scrollLeft(m) {
|
|
4138
|
+
r.current && (r.current.scrollLeft = m);
|
|
4139
4139
|
},
|
|
4140
|
-
set scrollTop(
|
|
4141
|
-
r.current && (r.current.scrollTop =
|
|
4140
|
+
set scrollTop(m) {
|
|
4141
|
+
r.current && (r.current.scrollTop = m);
|
|
4142
4142
|
},
|
|
4143
|
-
scrollToTime:
|
|
4143
|
+
scrollToTime: g
|
|
4144
4144
|
})), /* @__PURE__ */ A.jsxs(yo, { style: t.style, className: `${bn} ${t.disableDrag ? bn + "-disable" : ""}`, "data-slot": "scroll-area", children: [
|
|
4145
|
-
/* @__PURE__ */ A.jsxs(xo, { "data-slot": "scroll-area-viewport", ref: r, onScroll: (
|
|
4146
|
-
t.onScroll?.(
|
|
4145
|
+
/* @__PURE__ */ A.jsxs(xo, { "data-slot": "scroll-area-viewport", ref: r, onScroll: (m) => {
|
|
4146
|
+
t.onScroll?.(m.currentTarget);
|
|
4147
4147
|
}, children: [
|
|
4148
|
-
/* @__PURE__ */ A.jsx(qo, { ...t, setCursor:
|
|
4149
|
-
/* @__PURE__ */ A.jsx(Ko, { ...t, scrollElementRef: r, timelineWidth: s, timelineHeight: o, disableDrag: t.disableDrag, editorData: t.editorData, cursorTime:
|
|
4150
|
-
!t.hideCursor && /* @__PURE__ */ A.jsx(li, { ...t, timelineWidth: s, height: o, scaleCount:
|
|
4148
|
+
/* @__PURE__ */ A.jsx(qo, { ...t, setCursor: b, scaleCount: f, scrollElementRef: r }),
|
|
4149
|
+
/* @__PURE__ */ A.jsx(Ko, { ...t, scrollElementRef: r, timelineWidth: s, timelineHeight: o, disableDrag: t.disableDrag, editorData: t.editorData, cursorTime: S, scaleCount: f, setScaleCount: p, setEditorData: x, snapPositions: u }, `__editor_area_${i}__`),
|
|
4150
|
+
!t.hideCursor && /* @__PURE__ */ A.jsx(li, { ...t, timelineWidth: s, height: o, scaleCount: f, setScaleCount: p, setCursor: b, cursorTime: S, editorData: t.editorData, scrollElementRef: r, snapPositions: u })
|
|
4151
4151
|
] }),
|
|
4152
4152
|
/* @__PURE__ */ A.jsx(nr, { orientation: "horizontal" }),
|
|
4153
4153
|
/* @__PURE__ */ A.jsx(nr, { orientation: "vertical" }),
|