@cyca/react-timeline-editor 0.2.4-alpha.4 → 0.2.4-alpha.6
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 +1486 -1484
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { D as
|
|
4
|
-
import { flushSync as
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
9
|
-
|
|
1
|
+
import * as v from "react";
|
|
2
|
+
import Lt, { useRef as ue, useLayoutEffect as an, useEffect as Mt, useImperativeHandle as ur, useState as jt, useMemo as Fr, useCallback as Vr, useEffectEvent as Ur, createElement as $r } from "react";
|
|
3
|
+
import { D as en, a as fr, b as tn, c as ln, d as Mn, M as Hr, P as xn, e as Rn, f as nn, p as Oe, g as Cn, h as kt, i as Br, j as Ot, k as Yr, l as Xr, S as Nn } from "./index-aC1-xztU.js";
|
|
4
|
+
import { flushSync as Kr } from "react-dom";
|
|
5
|
+
var Xt = { exports: {} }, Wt = {};
|
|
6
|
+
var In;
|
|
7
|
+
function Gr() {
|
|
8
|
+
if (In) return Wt;
|
|
9
|
+
In = 1;
|
|
10
10
|
var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
11
11
|
function t(r, s, o) {
|
|
12
12
|
var i = null;
|
|
@@ -26,47 +26,47 @@ function Ur() {
|
|
|
26
26
|
return Wt.Fragment = e, Wt.jsx = t, Wt.jsxs = t, Wt;
|
|
27
27
|
}
|
|
28
28
|
var zt = {};
|
|
29
|
-
var
|
|
30
|
-
function
|
|
31
|
-
return
|
|
29
|
+
var kn;
|
|
30
|
+
function qr() {
|
|
31
|
+
return kn || (kn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
32
32
|
function n(d) {
|
|
33
33
|
if (d == null) return null;
|
|
34
34
|
if (typeof d == "function")
|
|
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 E:
|
|
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
|
-
case
|
|
46
|
+
case C:
|
|
47
47
|
return "SuspenseList";
|
|
48
|
-
case
|
|
48
|
+
case w:
|
|
49
49
|
return "Activity";
|
|
50
50
|
}
|
|
51
51
|
if (typeof d == "object")
|
|
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 =
|
|
64
|
-
case
|
|
65
|
-
return
|
|
66
|
-
case
|
|
67
|
-
|
|
62
|
+
var P = d.render;
|
|
63
|
+
return d = d.displayName, d || (d = P.displayName || P.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
64
|
+
case D:
|
|
65
|
+
return P = d.displayName || null, P !== null ? P : n(d.type) || "Memo";
|
|
66
|
+
case A:
|
|
67
|
+
P = d._payload, d = d._init;
|
|
68
68
|
try {
|
|
69
|
-
return n(d(
|
|
69
|
+
return n(d(P));
|
|
70
70
|
} catch {
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -78,74 +78,74 @@ function $r() {
|
|
|
78
78
|
function t(d) {
|
|
79
79
|
try {
|
|
80
80
|
e(d);
|
|
81
|
-
var
|
|
81
|
+
var P = !1;
|
|
82
82
|
} catch {
|
|
83
|
-
|
|
83
|
+
P = !0;
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
var
|
|
88
|
-
return
|
|
89
|
-
|
|
85
|
+
if (P) {
|
|
86
|
+
P = console;
|
|
87
|
+
var N = P.error, H = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
88
|
+
return N.call(
|
|
89
|
+
P,
|
|
90
90
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
91
|
-
|
|
91
|
+
H
|
|
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 === E) return "<>";
|
|
97
|
+
if (typeof d == "object" && d !== null && d.$$typeof === A)
|
|
98
98
|
return "<...>";
|
|
99
99
|
try {
|
|
100
|
-
var
|
|
101
|
-
return
|
|
100
|
+
var P = n(d);
|
|
101
|
+
return P ? "<" + P + ">" : "<...>";
|
|
102
102
|
} catch {
|
|
103
103
|
return "<...>";
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
function s() {
|
|
107
|
-
var d =
|
|
107
|
+
var d = F.A;
|
|
108
108
|
return d === null ? null : d.getOwner();
|
|
109
109
|
}
|
|
110
110
|
function o() {
|
|
111
111
|
return Error("react-stack-top-frame");
|
|
112
112
|
}
|
|
113
113
|
function i(d) {
|
|
114
|
-
if (
|
|
115
|
-
var
|
|
116
|
-
if (
|
|
114
|
+
if (K.call(d, "key")) {
|
|
115
|
+
var P = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
116
|
+
if (P && P.isReactWarning) return !1;
|
|
117
117
|
}
|
|
118
118
|
return d.key !== void 0;
|
|
119
119
|
}
|
|
120
|
-
function a(d,
|
|
121
|
-
function
|
|
122
|
-
|
|
120
|
+
function a(d, P) {
|
|
121
|
+
function N() {
|
|
122
|
+
Y || (Y = !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
|
+
P
|
|
125
125
|
));
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
get:
|
|
127
|
+
N.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
128
|
+
get: N,
|
|
129
129
|
configurable: !0
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function l() {
|
|
133
133
|
var d = n(this.type);
|
|
134
|
-
return
|
|
134
|
+
return Z[d] || (Z[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,
|
|
139
|
-
var
|
|
138
|
+
function u(d, P, N, H, he, pe) {
|
|
139
|
+
var B = N.ref;
|
|
140
140
|
return d = {
|
|
141
141
|
$$typeof: S,
|
|
142
142
|
type: d,
|
|
143
|
-
key:
|
|
144
|
-
props:
|
|
145
|
-
_owner:
|
|
146
|
-
}, (
|
|
143
|
+
key: P,
|
|
144
|
+
props: N,
|
|
145
|
+
_owner: H
|
|
146
|
+
}, (B !== void 0 ? B : null) !== null ? Object.defineProperty(d, "ref", {
|
|
147
147
|
enumerable: !1,
|
|
148
|
-
get:
|
|
148
|
+
get: l
|
|
149
149
|
}) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
150
150
|
configurable: !1,
|
|
151
151
|
enumerable: !1,
|
|
@@ -168,61 +168,61 @@ function $r() {
|
|
|
168
168
|
value: pe
|
|
169
169
|
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
var
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
if (
|
|
176
|
-
for (
|
|
177
|
-
|
|
178
|
-
Object.freeze && Object.freeze(
|
|
171
|
+
function c(d, P, N, H, he, pe) {
|
|
172
|
+
var B = P.children;
|
|
173
|
+
if (B !== void 0)
|
|
174
|
+
if (H)
|
|
175
|
+
if (W(B)) {
|
|
176
|
+
for (H = 0; H < B.length; H++)
|
|
177
|
+
h(B[H]);
|
|
178
|
+
Object.freeze && Object.freeze(B);
|
|
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 (
|
|
185
|
-
|
|
186
|
-
var
|
|
187
|
-
return
|
|
183
|
+
else h(B);
|
|
184
|
+
if (K.call(P, "key")) {
|
|
185
|
+
B = n(d);
|
|
186
|
+
var J = Object.keys(P).filter(function(re) {
|
|
187
|
+
return re !== "key";
|
|
188
188
|
});
|
|
189
|
-
|
|
189
|
+
H = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", L[B + H] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
190
190
|
`A props object containing a "key" prop is being spread into JSX:
|
|
191
191
|
let props = %s;
|
|
192
192
|
<%s {...props} />
|
|
193
193
|
React keys must be passed directly to JSX without using spread:
|
|
194
194
|
let props = %s;
|
|
195
195
|
<%s key={someKey} {...props} />`,
|
|
196
|
-
z,
|
|
197
196
|
H,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
B,
|
|
198
|
+
J,
|
|
199
|
+
B
|
|
200
|
+
), L[B + H] = !0);
|
|
201
201
|
}
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
for (var
|
|
205
|
-
|
|
206
|
-
} else
|
|
207
|
-
return
|
|
208
|
-
|
|
202
|
+
if (B = null, N !== void 0 && (t(N), B = "" + N), i(P) && (t(P.key), B = "" + P.key), "key" in P) {
|
|
203
|
+
N = {};
|
|
204
|
+
for (var $ in P)
|
|
205
|
+
$ !== "key" && (N[$] = P[$]);
|
|
206
|
+
} else N = P;
|
|
207
|
+
return B && a(
|
|
208
|
+
N,
|
|
209
209
|
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
210
210
|
), u(
|
|
211
211
|
d,
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
B,
|
|
213
|
+
N,
|
|
214
214
|
s(),
|
|
215
215
|
he,
|
|
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 === A && (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 =
|
|
225
|
+
var p = Lt, S = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), E = 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"), C = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), w = Symbol.for("react.activity"), I = Symbol.for("react.client.reference"), F = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, W = Array.isArray, ne = console.createTask ? console.createTask : function() {
|
|
226
226
|
return null;
|
|
227
227
|
};
|
|
228
228
|
p = {
|
|
@@ -230,53 +230,53 @@ React keys must be passed directly to JSX without using spread:
|
|
|
230
230
|
return d();
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
|
-
var
|
|
233
|
+
var Y, Z = {}, Q = p.react_stack_bottom_frame.bind(
|
|
234
234
|
p,
|
|
235
235
|
o
|
|
236
|
-
)(),
|
|
237
|
-
zt.Fragment =
|
|
238
|
-
var
|
|
239
|
-
return
|
|
236
|
+
)(), O = ne(r(o)), L = {};
|
|
237
|
+
zt.Fragment = E, zt.jsx = function(d, P, N) {
|
|
238
|
+
var H = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
239
|
+
return c(
|
|
240
240
|
d,
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
P,
|
|
242
|
+
N,
|
|
243
243
|
!1,
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
H ? Error("react-stack-top-frame") : Q,
|
|
245
|
+
H ? ne(r(d)) : O
|
|
246
246
|
);
|
|
247
|
-
}, zt.jsxs = function(d,
|
|
248
|
-
var
|
|
249
|
-
return
|
|
247
|
+
}, zt.jsxs = function(d, P, N) {
|
|
248
|
+
var H = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
249
|
+
return c(
|
|
250
250
|
d,
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
P,
|
|
252
|
+
N,
|
|
253
253
|
!0,
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
H ? Error("react-stack-top-frame") : Q,
|
|
255
|
+
H ? ne(r(d)) : O
|
|
256
256
|
);
|
|
257
257
|
};
|
|
258
258
|
})()), zt;
|
|
259
259
|
}
|
|
260
|
-
var
|
|
261
|
-
function
|
|
262
|
-
return
|
|
260
|
+
var Wn;
|
|
261
|
+
function Jr() {
|
|
262
|
+
return Wn || (Wn = 1, process.env.NODE_ENV === "production" ? Xt.exports = Gr() : Xt.exports = qr()), Xt.exports;
|
|
263
263
|
}
|
|
264
|
-
var
|
|
265
|
-
const
|
|
264
|
+
var T = Jr();
|
|
265
|
+
const vn = {
|
|
266
266
|
trace: 0,
|
|
267
267
|
debug: 1,
|
|
268
268
|
info: 2,
|
|
269
269
|
warn: 3,
|
|
270
270
|
error: 4,
|
|
271
271
|
silent: 5
|
|
272
|
-
},
|
|
272
|
+
}, Zr = [
|
|
273
273
|
"trace",
|
|
274
274
|
"debug",
|
|
275
275
|
"info",
|
|
276
276
|
"warn",
|
|
277
277
|
"error"
|
|
278
278
|
];
|
|
279
|
-
var
|
|
279
|
+
var Qr = class dr {
|
|
280
280
|
s;
|
|
281
281
|
ls = /* @__PURE__ */ new Map();
|
|
282
282
|
lvl;
|
|
@@ -296,10 +296,10 @@ var Yr = class or {
|
|
|
296
296
|
noop = () => {
|
|
297
297
|
};
|
|
298
298
|
bindMethods() {
|
|
299
|
-
|
|
299
|
+
Zr.forEach((e) => {
|
|
300
300
|
const t = this.e.bind(this.c, e, this.n);
|
|
301
301
|
Object.defineProperty(this, e, {
|
|
302
|
-
get: () =>
|
|
302
|
+
get: () => vn[e] >= vn[this.currentLevel()] ? t : this.noop,
|
|
303
303
|
configurable: !0
|
|
304
304
|
});
|
|
305
305
|
});
|
|
@@ -310,7 +310,7 @@ var Yr = class or {
|
|
|
310
310
|
currentLevel() {
|
|
311
311
|
if (this.lvl) return this.lvl;
|
|
312
312
|
const e = this.s.get(this.storageKey());
|
|
313
|
-
return e && e in
|
|
313
|
+
return e && e in vn ? (this.lvl = e, this.lvl) : this.def ? this.def : this.r ? this.r.currentLevel() : "trace";
|
|
314
314
|
}
|
|
315
315
|
setLevel(e) {
|
|
316
316
|
return this.lvl = e, this.s.set(this.storageKey(), e), this;
|
|
@@ -324,8 +324,8 @@ var Yr = class or {
|
|
|
324
324
|
getLogger(e) {
|
|
325
325
|
if (!e) throw new Error("Logger name required");
|
|
326
326
|
if (!this.ls.has(e)) {
|
|
327
|
-
const t = new
|
|
328
|
-
this.ls.set(e,
|
|
327
|
+
const t = new dr(this.s, this.e, e, this.r || this);
|
|
328
|
+
this.ls.set(e, hr(t));
|
|
329
329
|
}
|
|
330
330
|
return this.ls.get(e);
|
|
331
331
|
}
|
|
@@ -339,14 +339,14 @@ var Yr = class or {
|
|
|
339
339
|
this.c = e, this.bindMethods();
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
|
-
function
|
|
342
|
+
function hr(n) {
|
|
343
343
|
return new Proxy(n, { get(e, t, r) {
|
|
344
344
|
if (t in e) return Reflect.get(e, t, r);
|
|
345
345
|
const s = e.c[t];
|
|
346
346
|
return typeof s == "function" ? s.bind(e.c) : s;
|
|
347
347
|
} });
|
|
348
348
|
}
|
|
349
|
-
var
|
|
349
|
+
var es = class {
|
|
350
350
|
get(n) {
|
|
351
351
|
return localStorage.getItem(n);
|
|
352
352
|
}
|
|
@@ -357,13 +357,13 @@ var Xr = class {
|
|
|
357
357
|
localStorage.removeItem(n);
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
|
-
const
|
|
360
|
+
const ts = {
|
|
361
361
|
trace: "#95bdb7",
|
|
362
362
|
debug: "#ad95b8",
|
|
363
363
|
info: "#b6bd73",
|
|
364
364
|
warn: "#88a1bb",
|
|
365
365
|
error: "#bf6c69"
|
|
366
|
-
},
|
|
366
|
+
}, zn = {
|
|
367
367
|
info: "⚡️",
|
|
368
368
|
success: "✔",
|
|
369
369
|
warn: "▲",
|
|
@@ -371,25 +371,25 @@ const Kr = {
|
|
|
371
371
|
log: "●",
|
|
372
372
|
trace: "◔",
|
|
373
373
|
debug: "◌"
|
|
374
|
-
},
|
|
375
|
-
const r = t ? `${
|
|
376
|
-
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${
|
|
377
|
-
} }, tt =
|
|
378
|
-
function
|
|
374
|
+
}, ns = { bind(n, e, t) {
|
|
375
|
+
const r = t ? `${zn[e]} ${String(t)}:` : `${zn[e]}`;
|
|
376
|
+
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${ts[e]}; font-weight: bold;`, "color: inherit");
|
|
377
|
+
} }, tt = hr(new Qr(new es(), ns));
|
|
378
|
+
function rs(n) {
|
|
379
379
|
let {
|
|
380
380
|
editorData: e = [],
|
|
381
381
|
effects: t = {},
|
|
382
|
-
scale: r =
|
|
383
|
-
scaleSplitCount: s =
|
|
384
|
-
scaleWidth: o =
|
|
385
|
-
startLeft: i =
|
|
382
|
+
scale: r = en,
|
|
383
|
+
scaleSplitCount: s = fr,
|
|
384
|
+
scaleWidth: o = tn,
|
|
385
|
+
startLeft: i = ln,
|
|
386
386
|
minScaleCount: a,
|
|
387
|
-
maxScaleCount:
|
|
388
|
-
rowHeight: u =
|
|
389
|
-
autoScrollSpeed:
|
|
390
|
-
autoScrollMaxSpeed:
|
|
387
|
+
maxScaleCount: l = 1 / 0,
|
|
388
|
+
rowHeight: u = Mn,
|
|
389
|
+
autoScrollSpeed: c = 1,
|
|
390
|
+
autoScrollMaxSpeed: h = 10
|
|
391
391
|
} = n;
|
|
392
|
-
r <= 0 && (tt.error("Error: scale must be greater than 0!"), r =
|
|
392
|
+
r <= 0 && (tt.error("Error: scale must be greater than 0!"), r = en), 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 = tn), 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 = Hr), a = parseInt(a + ""), l < a && (tt.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), l = a)), l = l === 1 / 0 ? 1 / 0 : parseInt(l + ""), u <= 0 && (tt.warn("Warning: rowHeight must be greater than 0!"), u = Mn);
|
|
393
393
|
const f = {
|
|
394
394
|
...n
|
|
395
395
|
};
|
|
@@ -402,28 +402,28 @@ function Gr(n) {
|
|
|
402
402
|
scaleWidth: o,
|
|
403
403
|
startLeft: i,
|
|
404
404
|
minScaleCount: a,
|
|
405
|
-
maxScaleCount:
|
|
405
|
+
maxScaleCount: l,
|
|
406
406
|
rowHeight: u,
|
|
407
|
-
autoScrollSpeed:
|
|
408
|
-
autoScrollMaxSpeed:
|
|
407
|
+
autoScrollSpeed: c,
|
|
408
|
+
autoScrollMaxSpeed: h
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
-
var
|
|
412
|
-
var
|
|
413
|
-
function
|
|
414
|
-
if (
|
|
415
|
-
|
|
416
|
-
var n =
|
|
417
|
-
return
|
|
411
|
+
var Kt = { exports: {} }, bn = {};
|
|
412
|
+
var jn;
|
|
413
|
+
function ss() {
|
|
414
|
+
if (jn) return bn;
|
|
415
|
+
jn = 1;
|
|
416
|
+
var n = Lt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
417
|
+
return bn.c = function(e) {
|
|
418
418
|
return n.H.useMemoCache(e);
|
|
419
|
-
},
|
|
419
|
+
}, bn;
|
|
420
420
|
}
|
|
421
|
-
var
|
|
422
|
-
var
|
|
423
|
-
function
|
|
424
|
-
return
|
|
425
|
-
var n =
|
|
426
|
-
|
|
421
|
+
var Sn = {};
|
|
422
|
+
var Fn;
|
|
423
|
+
function os() {
|
|
424
|
+
return Fn || (Fn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
425
|
+
var n = Lt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
426
|
+
Sn.c = function(e) {
|
|
427
427
|
var t = n.H;
|
|
428
428
|
return t === null && console.error(
|
|
429
429
|
`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
@@ -433,14 +433,14 @@ function Zr() {
|
|
|
433
433
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
434
434
|
), t.useMemoCache(e);
|
|
435
435
|
};
|
|
436
|
-
})()),
|
|
436
|
+
})()), Sn;
|
|
437
437
|
}
|
|
438
|
-
var
|
|
439
|
-
function
|
|
440
|
-
return
|
|
438
|
+
var Vn;
|
|
439
|
+
function is() {
|
|
440
|
+
return Vn || (Vn = 1, process.env.NODE_ENV === "production" ? Kt.exports = ss() : Kt.exports = os()), Kt.exports;
|
|
441
441
|
}
|
|
442
|
-
var
|
|
443
|
-
function
|
|
442
|
+
var Ce = is();
|
|
443
|
+
function as(n) {
|
|
444
444
|
for (var e = [], t = 1; t < arguments.length; t++)
|
|
445
445
|
e[t - 1] = arguments[t];
|
|
446
446
|
return e.map(function(r) {
|
|
@@ -450,89 +450,89 @@ function es(n) {
|
|
|
450
450
|
}).join(" ");
|
|
451
451
|
}
|
|
452
452
|
function ge(...n) {
|
|
453
|
-
return
|
|
453
|
+
return as(`${xn}-`, ...n);
|
|
454
454
|
}
|
|
455
|
-
const
|
|
456
|
-
const e =
|
|
455
|
+
const ls = (n) => {
|
|
456
|
+
const e = Ce.c(11), {
|
|
457
457
|
isMoving: t,
|
|
458
458
|
movePositions: r,
|
|
459
459
|
assistPositions: s
|
|
460
460
|
} = n;
|
|
461
461
|
let o, i;
|
|
462
462
|
if (e[0] !== t || e[1] !== r || e[2] !== s) {
|
|
463
|
-
const
|
|
463
|
+
const l = r === void 0 ? [] : r;
|
|
464
464
|
let u;
|
|
465
465
|
e[5] !== s ? (u = s === void 0 ? [] : s, e[5] = s, e[6] = u) : u = e[6];
|
|
466
|
-
const
|
|
467
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = ge("snap-line-container"), e[7] = o) : o = e[7], i = t &&
|
|
466
|
+
const c = u;
|
|
467
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = ge("snap-line-container"), e[7] = o) : o = e[7], i = t && l.filter((h) => c.includes(h)).map(cs), 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;
|
|
471
|
-
return e[8] !== o || e[9] !== i ? (a = /* @__PURE__ */
|
|
471
|
+
return e[8] !== o || e[9] !== i ? (a = /* @__PURE__ */ T.jsx("div", { className: o, children: i }), e[8] = o, e[9] = i, e[10] = a) : a = e[10], a;
|
|
472
472
|
};
|
|
473
|
-
function
|
|
474
|
-
return /* @__PURE__ */
|
|
473
|
+
function cs(n, e) {
|
|
474
|
+
return /* @__PURE__ */ T.jsx("div", { className: ge("snap-line"), style: {
|
|
475
475
|
left: n
|
|
476
476
|
} }, e);
|
|
477
477
|
}
|
|
478
|
-
const
|
|
479
|
-
function
|
|
480
|
-
const r =
|
|
481
|
-
let
|
|
482
|
-
r[0] !== n ? (
|
|
478
|
+
const us = 1, fs = 10, Un = 10;
|
|
479
|
+
function ds(n, e, t) {
|
|
480
|
+
const r = Ce.c(15), s = e === void 0 ? us : e, o = t === void 0 ? fs : t, i = ue(Number.MIN_SAFE_INTEGER), a = ue(Number.MAX_SAFE_INTEGER), l = ue(s), u = ue(void 0);
|
|
481
|
+
let c;
|
|
482
|
+
r[0] !== n ? (c = () => {
|
|
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
|
-
}, r[0] = n, r[1] =
|
|
491
|
-
const
|
|
490
|
+
}, r[0] = n, r[1] = c) : c = r[1];
|
|
491
|
+
const h = c;
|
|
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(
|
|
497
|
-
|
|
498
|
-
const
|
|
499
|
-
|
|
496
|
+
const R = Math.abs(g.clientX >= a.current ? g.clientX - a.current : g.clientX - i.current);
|
|
497
|
+
l.current = Math.min(Number((R / Un).toFixed(0)) * s, o);
|
|
498
|
+
const C = (g.clientX >= a.current ? 1 : -1) * l.current, D = () => {
|
|
499
|
+
m && m(C), u.current = requestAnimationFrame(D);
|
|
500
500
|
};
|
|
501
|
-
return u.current = requestAnimationFrame(
|
|
501
|
+
return u.current = requestAnimationFrame(D), !1;
|
|
502
502
|
} else
|
|
503
503
|
u.current !== void 0 && cancelAnimationFrame(u.current);
|
|
504
504
|
return !0;
|
|
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
|
-
|
|
513
|
-
const
|
|
514
|
-
R && R(
|
|
511
|
+
const _ = Math.abs(g.clientX >= a.current ? g.clientX - a.current : g.clientX - i.current);
|
|
512
|
+
l.current = Math.min(Number((_ / Un).toFixed(0)) * s, o);
|
|
513
|
+
const D = (g.clientX >= a.current ? 1 : -1) * l.current, A = () => {
|
|
514
|
+
R && R(D), u.current = requestAnimationFrame(A);
|
|
515
515
|
};
|
|
516
|
-
return u.current = requestAnimationFrame(
|
|
516
|
+
return u.current = requestAnimationFrame(A), !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 ? (
|
|
524
|
-
i.current = Number.MIN_SAFE_INTEGER, a.current = Number.MAX_SAFE_INTEGER,
|
|
525
|
-
}, r[8] = s, r[9] =
|
|
526
|
-
const
|
|
521
|
+
const y = S;
|
|
522
|
+
let E;
|
|
523
|
+
r[8] !== s ? (E = () => {
|
|
524
|
+
i.current = Number.MIN_SAFE_INTEGER, a.current = Number.MAX_SAFE_INTEGER, l.current = s, u.current !== void 0 && cancelAnimationFrame(u.current);
|
|
525
|
+
}, r[8] = s, r[9] = E) : E = r[9];
|
|
526
|
+
const x = E;
|
|
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
|
-
function
|
|
535
|
+
function hs(n, e, t) {
|
|
536
536
|
return Math.max(e, Math.min(n, t));
|
|
537
537
|
}
|
|
538
538
|
const ve = {
|
|
@@ -552,17 +552,17 @@ const ve = {
|
|
|
552
552
|
n[0] -= e[0], n[1] -= e[1];
|
|
553
553
|
}
|
|
554
554
|
};
|
|
555
|
-
function
|
|
555
|
+
function $n(n, e, t) {
|
|
556
556
|
return e === 0 || Math.abs(e) === 1 / 0 ? Math.pow(n, t * 5) : n * e * t / (e + t * n);
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
return r === 0 ?
|
|
558
|
+
function Hn(n, e, t, r = 0.15) {
|
|
559
|
+
return r === 0 ? hs(n, e, t) : n < e ? -$n(e - n, t - e, r) + e : n > t ? +$n(n - t, t - e, r) + t : n;
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
const [[o, i], [a,
|
|
563
|
-
return [
|
|
561
|
+
function ms(n, [e, t], [r, s]) {
|
|
562
|
+
const [[o, i], [a, l]] = n;
|
|
563
|
+
return [Hn(e, o, i, r), Hn(t, a, l, s)];
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function ps(n, e) {
|
|
566
566
|
if (typeof n != "object" || n === null) return n;
|
|
567
567
|
var t = n[Symbol.toPrimitive];
|
|
568
568
|
if (t !== void 0) {
|
|
@@ -572,19 +572,19 @@ function cs(n, e) {
|
|
|
572
572
|
}
|
|
573
573
|
return (e === "string" ? String : Number)(n);
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
var e =
|
|
575
|
+
function gs(n) {
|
|
576
|
+
var e = ps(n, "string");
|
|
577
577
|
return typeof e == "symbol" ? e : String(e);
|
|
578
578
|
}
|
|
579
579
|
function we(n, e, t) {
|
|
580
|
-
return e =
|
|
580
|
+
return e = gs(e), e in n ? Object.defineProperty(n, e, {
|
|
581
581
|
value: t,
|
|
582
582
|
enumerable: !0,
|
|
583
583
|
configurable: !0,
|
|
584
584
|
writable: !0
|
|
585
585
|
}) : n[e] = t, n;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Bn(n, e) {
|
|
588
588
|
var t = Object.keys(n);
|
|
589
589
|
if (Object.getOwnPropertySymbols) {
|
|
590
590
|
var r = Object.getOwnPropertySymbols(n);
|
|
@@ -597,15 +597,15 @@ function jn(n, e) {
|
|
|
597
597
|
function te(n) {
|
|
598
598
|
for (var e = 1; e < arguments.length; e++) {
|
|
599
599
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
600
|
-
e % 2 ?
|
|
600
|
+
e % 2 ? Bn(Object(t), !0).forEach(function(r) {
|
|
601
601
|
we(n, r, t[r]);
|
|
602
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) :
|
|
602
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Bn(Object(t)).forEach(function(r) {
|
|
603
603
|
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
606
|
return n;
|
|
607
607
|
}
|
|
608
|
-
const
|
|
608
|
+
const mr = {
|
|
609
609
|
pointer: {
|
|
610
610
|
start: "down",
|
|
611
611
|
change: "move",
|
|
@@ -627,63 +627,63 @@ const ar = {
|
|
|
627
627
|
end: "end"
|
|
628
628
|
}
|
|
629
629
|
};
|
|
630
|
-
function
|
|
630
|
+
function Yn(n) {
|
|
631
631
|
return n ? n[0].toUpperCase() + n.slice(1) : "";
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
function
|
|
635
|
-
return n && !
|
|
633
|
+
const vs = ["enter", "leave"];
|
|
634
|
+
function bs(n = !1, e) {
|
|
635
|
+
return n && !vs.includes(e);
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
const r =
|
|
639
|
-
return "on" +
|
|
637
|
+
function Ss(n, e = "", t = !1) {
|
|
638
|
+
const r = mr[n], s = r && r[e] || e;
|
|
639
|
+
return "on" + Yn(n) + Yn(s) + (bs(t, s) ? "Capture" : "");
|
|
640
640
|
}
|
|
641
|
-
const
|
|
642
|
-
function
|
|
641
|
+
const _s = ["gotpointercapture", "lostpointercapture"];
|
|
642
|
+
function ws(n) {
|
|
643
643
|
let e = n.substring(2).toLowerCase();
|
|
644
644
|
const t = !!~e.indexOf("passive");
|
|
645
645
|
t && (e = e.replace("passive", ""));
|
|
646
|
-
const r =
|
|
646
|
+
const r = _s.includes(e) ? "capturecapture" : "capture", s = !!~e.indexOf(r);
|
|
647
647
|
return s && (e = e.replace("capture", "")), {
|
|
648
648
|
device: e,
|
|
649
649
|
capture: s,
|
|
650
650
|
passive: t
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
const t =
|
|
653
|
+
function Es(n, e = "") {
|
|
654
|
+
const t = mr[n], r = t && t[e] || e;
|
|
655
655
|
return n + r;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function cn(n) {
|
|
658
658
|
return "touches" in n;
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
return
|
|
660
|
+
function pr(n) {
|
|
661
|
+
return cn(n) ? "touch" : "pointerType" in n ? n.pointerType : "mouse";
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function ys(n) {
|
|
664
664
|
return Array.from(n.touches).filter((e) => {
|
|
665
665
|
var t, r;
|
|
666
666
|
return e.target === n.currentTarget || ((t = n.currentTarget) === null || t === void 0 || (r = t.contains) === null || r === void 0 ? void 0 : r.call(t, e.target));
|
|
667
667
|
});
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function xs(n) {
|
|
670
670
|
return n.type === "touchend" || n.type === "touchcancel" ? n.changedTouches : n.targetTouches;
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
return
|
|
672
|
+
function gr(n) {
|
|
673
|
+
return cn(n) ? xs(n)[0] : n;
|
|
674
674
|
}
|
|
675
|
-
function
|
|
676
|
-
return
|
|
675
|
+
function Rs(n) {
|
|
676
|
+
return ys(n).map((e) => e.identifier);
|
|
677
677
|
}
|
|
678
|
-
function
|
|
679
|
-
const e =
|
|
680
|
-
return
|
|
678
|
+
function _n(n) {
|
|
679
|
+
const e = gr(n);
|
|
680
|
+
return cn(n) ? e.identifier : e.pointerId;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
const e =
|
|
682
|
+
function Xn(n) {
|
|
683
|
+
const e = gr(n);
|
|
684
684
|
return [e.clientX, e.clientY];
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function Ts(n) {
|
|
687
687
|
const e = {};
|
|
688
688
|
if ("buttons" in n && (e.buttons = n.buttons), "shiftKey" in n) {
|
|
689
689
|
const {
|
|
@@ -701,24 +701,24 @@ function Ss(n) {
|
|
|
701
701
|
}
|
|
702
702
|
return e;
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function rn(n, ...e) {
|
|
705
705
|
return typeof n == "function" ? n(...e) : n;
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function As() {
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return n.length === 0 ?
|
|
709
|
+
function Cs(...n) {
|
|
710
|
+
return n.length === 0 ? As : n.length === 1 ? n[0] : function() {
|
|
711
711
|
let e;
|
|
712
712
|
for (const t of n)
|
|
713
713
|
e = t.apply(this, arguments) || e;
|
|
714
714
|
return e;
|
|
715
715
|
};
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function Kn(n, e) {
|
|
718
718
|
return Object.assign({}, e, n || {});
|
|
719
719
|
}
|
|
720
|
-
const
|
|
721
|
-
class
|
|
720
|
+
const Ps = 32;
|
|
721
|
+
class Ds {
|
|
722
722
|
constructor(e, t, r) {
|
|
723
723
|
this.ctrl = e, this.args = t, this.key = r, this.state || (this.state = {}, this.computeValues([0, 0]), this.computeInitial(), this.init && this.init(), this.reset());
|
|
724
724
|
}
|
|
@@ -757,7 +757,7 @@ class ys {
|
|
|
757
757
|
}
|
|
758
758
|
start(e) {
|
|
759
759
|
const t = this.state, r = this.config;
|
|
760
|
-
t._active || (this.reset(), this.computeInitial(), t._active = !0, t.target = e.target, t.currentTarget = e.currentTarget, t.lastOffset = r.from ?
|
|
760
|
+
t._active || (this.reset(), this.computeInitial(), t._active = !0, t.target = e.target, t.currentTarget = e.currentTarget, t.lastOffset = r.from ? rn(r.from, t) : t.offset, t.offset = t.lastOffset, t.startTime = t.timeStamp = e.timeStamp);
|
|
761
761
|
}
|
|
762
762
|
computeValues(e) {
|
|
763
763
|
const t = this.state;
|
|
@@ -775,32 +775,32 @@ class ys {
|
|
|
775
775
|
} = this;
|
|
776
776
|
t.args = this.args;
|
|
777
777
|
let o = 0;
|
|
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,
|
|
779
|
-
const
|
|
780
|
-
ve.addTo(t._distance,
|
|
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, Ts(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 _ = t._delta.map(Math.abs);
|
|
780
|
+
ve.addTo(t._distance, _);
|
|
781
781
|
}
|
|
782
782
|
this.axisIntent && this.axisIntent(e);
|
|
783
|
-
const [i, a] = t._movement, [
|
|
784
|
-
_step:
|
|
785
|
-
values:
|
|
783
|
+
const [i, a] = t._movement, [l, u] = r.threshold, {
|
|
784
|
+
_step: c,
|
|
785
|
+
values: h
|
|
786
786
|
} = t;
|
|
787
|
-
if (r.hasCustomTransform ? (
|
|
787
|
+
if (r.hasCustomTransform ? (c[0] === !1 && (c[0] = Math.abs(i) >= l && h[0]), c[1] === !1 && (c[1] = Math.abs(a) >= u && h[1])) : (c[0] === !1 && (c[0] = Math.abs(i) >= l && Math.sign(i) * l), c[1] === !1 && (c[1] = Math.abs(a) >= u && Math.sign(a) * u)), t.intentional = c[0] !== !1 || c[1] !== !1, !t.intentional) return;
|
|
788
788
|
const f = [0, 0];
|
|
789
789
|
if (r.hasCustomTransform) {
|
|
790
|
-
const [
|
|
791
|
-
f[0] =
|
|
790
|
+
const [_, C] = h;
|
|
791
|
+
f[0] = c[0] !== !1 ? _ - c[0] : 0, f[1] = c[1] !== !1 ? C - c[1] : 0;
|
|
792
792
|
} else
|
|
793
|
-
f[0] =
|
|
793
|
+
f[0] = c[0] !== !1 ? i - c[0] : 0, f[1] = c[1] !== !1 ? a - c[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
|
-
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 =
|
|
797
|
-
const [
|
|
798
|
-
t.overflow = [
|
|
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 = rn(r.bounds, t)), this.setup && this.setup()), t.movement = f, this.computeOffset()));
|
|
797
|
+
const [y, E] = t.offset, [[x, b], [g, m]] = t._bounds;
|
|
798
|
+
t.overflow = [y < x ? -1 : y > b ? 1 : 0, E < g ? -1 : E > 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
|
-
if (t.offset =
|
|
800
|
+
if (t.offset = ms(t._bounds, t.offset, R), t.delta = ve.sub(t.offset, p), this.computeMovement(), S && (!t.last || o > Ps)) {
|
|
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() {
|
|
@@ -815,14 +815,14 @@ class ys {
|
|
|
815
815
|
this.eventStore.clean(), this.timeoutStore.clean();
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Ls([n, e], t) {
|
|
819
819
|
const r = Math.abs(n), s = Math.abs(e);
|
|
820
820
|
if (r > s && r > t)
|
|
821
821
|
return "x";
|
|
822
822
|
if (s > r && s > t)
|
|
823
823
|
return "y";
|
|
824
824
|
}
|
|
825
|
-
class
|
|
825
|
+
class Os extends Ds {
|
|
826
826
|
constructor(...e) {
|
|
827
827
|
super(...e), we(this, "aliasKey", "xy");
|
|
828
828
|
}
|
|
@@ -841,8 +841,8 @@ class Rs extends ys {
|
|
|
841
841
|
axisIntent(e) {
|
|
842
842
|
const t = this.state, r = this.config;
|
|
843
843
|
if (!t.axis && e) {
|
|
844
|
-
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[
|
|
845
|
-
t.axis =
|
|
844
|
+
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[pr(e)] : r.axisThreshold;
|
|
845
|
+
t.axis = Ls(t._movement, s);
|
|
846
846
|
}
|
|
847
847
|
t._blocked = (r.lockDirection || !!r.axis) && !t.axis || !!r.axis && r.axis !== t.axis;
|
|
848
848
|
}
|
|
@@ -858,7 +858,7 @@ class Rs extends ys {
|
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
|
-
const
|
|
861
|
+
const Gn = (n) => n, qn = 0.15, Pn = {
|
|
862
862
|
enabled(n = !0) {
|
|
863
863
|
return n;
|
|
864
864
|
},
|
|
@@ -874,7 +874,7 @@ const $n = (n) => n, Hn = 0.15, yn = {
|
|
|
874
874
|
rubberband(n = 0) {
|
|
875
875
|
switch (n) {
|
|
876
876
|
case !0:
|
|
877
|
-
return [
|
|
877
|
+
return [qn, qn];
|
|
878
878
|
case !1:
|
|
879
879
|
return [0, 0];
|
|
880
880
|
default:
|
|
@@ -888,19 +888,19 @@ const $n = (n) => n, Hn = 0.15, yn = {
|
|
|
888
888
|
transform(n, e, t) {
|
|
889
889
|
const r = n || t.shared.transform;
|
|
890
890
|
if (this.hasCustomTransform = !!r, process.env.NODE_ENV === "development") {
|
|
891
|
-
const s = r ||
|
|
891
|
+
const s = r || Gn;
|
|
892
892
|
return (o) => {
|
|
893
893
|
const i = s(o);
|
|
894
894
|
return (!isFinite(i[0]) || !isFinite(i[1])) && console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${i[0]},${[1]}]`), i;
|
|
895
895
|
};
|
|
896
896
|
}
|
|
897
|
-
return r ||
|
|
897
|
+
return r || Gn;
|
|
898
898
|
},
|
|
899
899
|
threshold(n) {
|
|
900
900
|
return ve.toVector(n, 0);
|
|
901
901
|
}
|
|
902
902
|
};
|
|
903
|
-
process.env.NODE_ENV === "development" && Object.assign(
|
|
903
|
+
process.env.NODE_ENV === "development" && Object.assign(Pn, {
|
|
904
904
|
domTarget(n) {
|
|
905
905
|
if (n !== void 0)
|
|
906
906
|
throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
|
|
@@ -917,13 +917,13 @@ process.env.NODE_ENV === "development" && Object.assign(yn, {
|
|
|
917
917
|
return NaN;
|
|
918
918
|
}
|
|
919
919
|
});
|
|
920
|
-
const
|
|
920
|
+
const Ms = 0, Ft = te(te({}, Pn), {}, {
|
|
921
921
|
axis(n, e, {
|
|
922
922
|
axis: t
|
|
923
923
|
}) {
|
|
924
924
|
if (this.lockDirection = t === "lock", !this.lockDirection) return t;
|
|
925
925
|
},
|
|
926
|
-
axisThreshold(n =
|
|
926
|
+
axisThreshold(n = Ms) {
|
|
927
927
|
return n;
|
|
928
928
|
},
|
|
929
929
|
bounds(n = {}) {
|
|
@@ -941,13 +941,13 @@ const Ts = 0, Ft = te(te({}, yn), {}, {
|
|
|
941
941
|
} = n;
|
|
942
942
|
return [[e, t], [r, s]];
|
|
943
943
|
}
|
|
944
|
-
}),
|
|
944
|
+
}), Jn = {
|
|
945
945
|
ArrowRight: (n, e = 1) => [n * e, 0],
|
|
946
946
|
ArrowLeft: (n, e = 1) => [-1 * n * e, 0],
|
|
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 Ns extends Os {
|
|
951
951
|
constructor(...e) {
|
|
952
952
|
super(...e), we(this, "ingKey", "dragging");
|
|
953
953
|
}
|
|
@@ -984,7 +984,7 @@ class Cs extends Rs {
|
|
|
984
984
|
const t = this.config, r = this.state;
|
|
985
985
|
if (e.buttons != null && (Array.isArray(t.pointerButtons) ? !t.pointerButtons.includes(e.buttons) : t.pointerButtons !== -1 && t.pointerButtons !== e.buttons)) return;
|
|
986
986
|
const s = this.ctrl.setEventIds(e);
|
|
987
|
-
t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId =
|
|
987
|
+
t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId = _n(e), r._pointerActive = !0, this.computeValues(Xn(e)), this.computeInitial(), t.preventScrollAxis && pr(e) !== "mouse" ? (r._active = !1, this.setupScrollPrevention(e)) : t.delay > 0 ? (this.setupDelayTrigger(e), t.triggerAllEvents && (this.compute(e), this.emit())) : this.startPointerDrag(e));
|
|
988
988
|
}
|
|
989
989
|
startPointerDrag(e) {
|
|
990
990
|
const t = this.state;
|
|
@@ -993,9 +993,9 @@ class Cs extends Rs {
|
|
|
993
993
|
pointerMove(e) {
|
|
994
994
|
const t = this.state, r = this.config;
|
|
995
995
|
if (!t._pointerActive) return;
|
|
996
|
-
const s =
|
|
996
|
+
const s = _n(e);
|
|
997
997
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
998
|
-
const o =
|
|
998
|
+
const o = Xn(e);
|
|
999
999
|
if (document.pointerLockElement === e.target ? t._delta = [e.movementX, e.movementY] : (t._delta = ve.sub(o, t._values), this.computeValues(o)), ve.addTo(t._movement, t._delta), this.compute(e), t._delayed && t.intentional) {
|
|
1000
1000
|
this.timeoutStore.remove("dragDelay"), t.active = !1, this.startPointerDrag(e);
|
|
1001
1001
|
return;
|
|
@@ -1022,17 +1022,17 @@ class Cs extends Rs {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
const t = this.state, r = this.config;
|
|
1024
1024
|
if (!t._active || !t._pointerActive) return;
|
|
1025
|
-
const s =
|
|
1025
|
+
const s = _n(e);
|
|
1026
1026
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
1027
1027
|
this.state._pointerActive = !1, this.setActive(), this.compute(e);
|
|
1028
1028
|
const [o, i] = t._distance;
|
|
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,
|
|
1033
|
-
if (t.elapsedTime <
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1032
|
+
const [a, l] = t._delta, [u, c] = t._movement, [h, f] = r.swipe.velocity, [p, S] = r.swipe.distance, y = r.swipe.duration;
|
|
1033
|
+
if (t.elapsedTime < y) {
|
|
1034
|
+
const E = Math.abs(a / t.timeDelta), x = Math.abs(l / t.timeDelta);
|
|
1035
|
+
E > h && Math.abs(u) > p && (t.swipe[0] = Math.sign(a)), x > f && Math.abs(c) > S && (t.swipe[1] = Math.sign(l));
|
|
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, Is(e);
|
|
1063
1063
|
const t = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
|
|
1064
1064
|
passive: !1
|
|
1065
1065
|
});
|
|
@@ -1071,14 +1071,14 @@ class Cs extends Rs {
|
|
|
1071
1071
|
}, this.config.delay);
|
|
1072
1072
|
}
|
|
1073
1073
|
keyDown(e) {
|
|
1074
|
-
const t =
|
|
1074
|
+
const t = Jn[e.key];
|
|
1075
1075
|
if (t) {
|
|
1076
1076
|
const r = this.state, s = e.shiftKey ? 10 : e.altKey ? 0.1 : 1;
|
|
1077
1077
|
this.start(e), r._delta = t(this.config.keyboardDisplacement, s), r._keyboardActive = !0, ve.addTo(r._movement, r._delta), this.compute(e), this.emit();
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
keyUp(e) {
|
|
1081
|
-
e.key in
|
|
1081
|
+
e.key in Jn && (this.state._keyboardActive = !1, this.setActive(), this.compute(e), this.emit());
|
|
1082
1082
|
}
|
|
1083
1083
|
bind(e) {
|
|
1084
1084
|
const t = this.config.device;
|
|
@@ -1088,23 +1088,23 @@ class Cs extends Rs {
|
|
|
1088
1088
|
});
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Is(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;
|
|
1095
|
-
function
|
|
1095
|
+
function vr() {
|
|
1096
1096
|
return Vt && "ontouchstart" in window;
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1099
|
-
return
|
|
1098
|
+
function ks() {
|
|
1099
|
+
return vr() || Vt && window.navigator.maxTouchPoints > 1;
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function Ws() {
|
|
1102
1102
|
return Vt && "onpointerdown" in window;
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function zs() {
|
|
1105
1105
|
return Vt && "exitPointerLock" in window.document;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function js() {
|
|
1108
1108
|
try {
|
|
1109
1109
|
return "constructor" in GestureEvent;
|
|
1110
1110
|
} catch {
|
|
@@ -1113,16 +1113,16 @@ function Os() {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
const xe = {
|
|
1115
1115
|
isBrowser: Vt,
|
|
1116
|
-
gesture:
|
|
1117
|
-
touch:
|
|
1118
|
-
touchscreen:
|
|
1119
|
-
pointer:
|
|
1120
|
-
pointerLock:
|
|
1121
|
-
},
|
|
1116
|
+
gesture: js(),
|
|
1117
|
+
touch: vr(),
|
|
1118
|
+
touchscreen: ks(),
|
|
1119
|
+
pointer: Ws(),
|
|
1120
|
+
pointerLock: zs()
|
|
1121
|
+
}, Fs = 250, Vs = 180, Us = 0.5, $s = 50, Hs = 250, Bs = 10, Zn = {
|
|
1122
1122
|
mouse: 0,
|
|
1123
1123
|
touch: 0,
|
|
1124
1124
|
pen: 8
|
|
1125
|
-
},
|
|
1125
|
+
}, br = te(te({}, Ft), {}, {
|
|
1126
1126
|
device(n, e, {
|
|
1127
1127
|
pointer: {
|
|
1128
1128
|
touch: t = !1,
|
|
@@ -1135,7 +1135,7 @@ const xe = {
|
|
|
1135
1135
|
preventScrollAxis(n, e, {
|
|
1136
1136
|
preventScroll: t
|
|
1137
1137
|
}) {
|
|
1138
|
-
if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ?
|
|
1138
|
+
if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ? Fs : void 0, !(!xe.touchscreen || t === !1))
|
|
1139
1139
|
return n || (t !== void 0 ? "y" : void 0);
|
|
1140
1140
|
},
|
|
1141
1141
|
pointerCapture(n, e, {
|
|
@@ -1156,9 +1156,9 @@ const xe = {
|
|
|
1156
1156
|
return this.filterTaps = t, this.tapsThreshold = r, o;
|
|
1157
1157
|
},
|
|
1158
1158
|
swipe({
|
|
1159
|
-
velocity: n =
|
|
1160
|
-
distance: e =
|
|
1161
|
-
duration: t =
|
|
1159
|
+
velocity: n = Us,
|
|
1160
|
+
distance: e = $s,
|
|
1161
|
+
duration: t = Hs
|
|
1162
1162
|
} = {}) {
|
|
1163
1163
|
return {
|
|
1164
1164
|
velocity: this.transform(ve.toVector(n)),
|
|
@@ -1169,7 +1169,7 @@ const xe = {
|
|
|
1169
1169
|
delay(n = 0) {
|
|
1170
1170
|
switch (n) {
|
|
1171
1171
|
case !0:
|
|
1172
|
-
return
|
|
1172
|
+
return Vs;
|
|
1173
1173
|
case !1:
|
|
1174
1174
|
return 0;
|
|
1175
1175
|
default:
|
|
@@ -1177,13 +1177,13 @@ const xe = {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
},
|
|
1179
1179
|
axisThreshold(n) {
|
|
1180
|
-
return n ? te(te({},
|
|
1180
|
+
return n ? te(te({}, Zn), n) : Zn;
|
|
1181
1181
|
},
|
|
1182
|
-
keyboardDisplacement(n =
|
|
1182
|
+
keyboardDisplacement(n = Bs) {
|
|
1183
1183
|
return n;
|
|
1184
1184
|
}
|
|
1185
1185
|
});
|
|
1186
|
-
process.env.NODE_ENV === "development" && Object.assign(
|
|
1186
|
+
process.env.NODE_ENV === "development" && Object.assign(br, {
|
|
1187
1187
|
useTouch(n) {
|
|
1188
1188
|
if (n !== void 0)
|
|
1189
1189
|
throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");
|
|
@@ -1210,7 +1210,7 @@ process.env.NODE_ENV === "development" && Object.assign(fr, {
|
|
|
1210
1210
|
return NaN;
|
|
1211
1211
|
}
|
|
1212
1212
|
});
|
|
1213
|
-
te(te({},
|
|
1213
|
+
te(te({}, Pn), {}, {
|
|
1214
1214
|
device(n, e, {
|
|
1215
1215
|
shared: t,
|
|
1216
1216
|
pointer: {
|
|
@@ -1229,13 +1229,13 @@ te(te({}, yn), {}, {
|
|
|
1229
1229
|
angleBounds: r = {}
|
|
1230
1230
|
}) {
|
|
1231
1231
|
const s = (i) => {
|
|
1232
|
-
const a =
|
|
1232
|
+
const a = Kn(rn(t, i), {
|
|
1233
1233
|
min: -1 / 0,
|
|
1234
1234
|
max: 1 / 0
|
|
1235
1235
|
});
|
|
1236
1236
|
return [a.min, a.max];
|
|
1237
1237
|
}, o = (i) => {
|
|
1238
|
-
const a =
|
|
1238
|
+
const a = Kn(rn(r, i), {
|
|
1239
1239
|
min: -1 / 0,
|
|
1240
1240
|
max: 1 / 0
|
|
1241
1241
|
});
|
|
@@ -1259,25 +1259,25 @@ te(te({}, Ft), {}, {
|
|
|
1259
1259
|
te(te({}, Ft), {}, {
|
|
1260
1260
|
mouseOnly: (n = !0) => n
|
|
1261
1261
|
});
|
|
1262
|
-
const
|
|
1263
|
-
function
|
|
1264
|
-
|
|
1262
|
+
const Sr = /* @__PURE__ */ new Map(), Tn = /* @__PURE__ */ new Map();
|
|
1263
|
+
function Ys(n) {
|
|
1264
|
+
Sr.set(n.key, n.engine), Tn.set(n.key, n.resolver);
|
|
1265
1265
|
}
|
|
1266
|
-
const
|
|
1266
|
+
const Xs = {
|
|
1267
1267
|
key: "drag",
|
|
1268
|
-
engine:
|
|
1269
|
-
resolver:
|
|
1268
|
+
engine: Ns,
|
|
1269
|
+
resolver: br
|
|
1270
1270
|
};
|
|
1271
|
-
function
|
|
1271
|
+
function Ks(n, e) {
|
|
1272
1272
|
if (n == null) return {};
|
|
1273
1273
|
var t = {}, r = Object.keys(n), s, o;
|
|
1274
1274
|
for (o = 0; o < r.length; o++)
|
|
1275
1275
|
s = r[o], !(e.indexOf(s) >= 0) && (t[s] = n[s]);
|
|
1276
1276
|
return t;
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1278
|
+
function Gs(n, e) {
|
|
1279
1279
|
if (n == null) return {};
|
|
1280
|
-
var t =
|
|
1280
|
+
var t = Ks(n, e), r, s;
|
|
1281
1281
|
if (Object.getOwnPropertySymbols) {
|
|
1282
1282
|
var o = Object.getOwnPropertySymbols(n);
|
|
1283
1283
|
for (s = 0; s < o.length; s++)
|
|
@@ -1285,7 +1285,7 @@ function Us(n, e) {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
return t;
|
|
1287
1287
|
}
|
|
1288
|
-
const
|
|
1288
|
+
const qs = {
|
|
1289
1289
|
target(n) {
|
|
1290
1290
|
if (n)
|
|
1291
1291
|
return () => "current" in n ? n.current : n;
|
|
@@ -1308,8 +1308,8 @@ const $s = {
|
|
|
1308
1308
|
transform(n) {
|
|
1309
1309
|
return n;
|
|
1310
1310
|
}
|
|
1311
|
-
},
|
|
1312
|
-
function
|
|
1311
|
+
}, Js = ["target", "eventOptions", "window", "enabled", "transform"];
|
|
1312
|
+
function qt(n = {}, e) {
|
|
1313
1313
|
const t = {};
|
|
1314
1314
|
for (const [r, s] of Object.entries(e))
|
|
1315
1315
|
switch (typeof s) {
|
|
@@ -1321,7 +1321,7 @@ function Kt(n = {}, e) {
|
|
|
1321
1321
|
t[r] = s.call(t, n[r], r, n);
|
|
1322
1322
|
break;
|
|
1323
1323
|
case "object":
|
|
1324
|
-
t[r] =
|
|
1324
|
+
t[r] = qt(n[r], s);
|
|
1325
1325
|
break;
|
|
1326
1326
|
case "boolean":
|
|
1327
1327
|
s && (t[r] = n[r]);
|
|
@@ -1329,57 +1329,57 @@ function Kt(n = {}, e) {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
return t;
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1332
|
+
function Zs(n, e, t = {}) {
|
|
1333
1333
|
const r = n, {
|
|
1334
1334
|
target: s,
|
|
1335
1335
|
eventOptions: o,
|
|
1336
1336
|
window: i,
|
|
1337
1337
|
enabled: a,
|
|
1338
|
-
transform:
|
|
1339
|
-
} = r, u =
|
|
1340
|
-
if (t.shared =
|
|
1338
|
+
transform: l
|
|
1339
|
+
} = r, u = Gs(r, Js);
|
|
1340
|
+
if (t.shared = qt({
|
|
1341
1341
|
target: s,
|
|
1342
1342
|
eventOptions: o,
|
|
1343
1343
|
window: i,
|
|
1344
1344
|
enabled: a,
|
|
1345
|
-
transform:
|
|
1346
|
-
},
|
|
1347
|
-
const
|
|
1348
|
-
t[e] =
|
|
1345
|
+
transform: l
|
|
1346
|
+
}, qs), e) {
|
|
1347
|
+
const c = Tn.get(e);
|
|
1348
|
+
t[e] = qt(te({
|
|
1349
1349
|
shared: t.shared
|
|
1350
|
-
}, u),
|
|
1350
|
+
}, u), c);
|
|
1351
1351
|
} else
|
|
1352
|
-
for (const
|
|
1353
|
-
const
|
|
1354
|
-
if (
|
|
1355
|
-
t[
|
|
1352
|
+
for (const c in u) {
|
|
1353
|
+
const h = Tn.get(c);
|
|
1354
|
+
if (h)
|
|
1355
|
+
t[c] = qt(te({
|
|
1356
1356
|
shared: t.shared
|
|
1357
|
-
}, u[
|
|
1358
|
-
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(
|
|
1359
|
-
if (
|
|
1357
|
+
}, u[c]), h);
|
|
1358
|
+
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(c)) {
|
|
1359
|
+
if (c === "domTarget")
|
|
1360
1360
|
throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
|
|
1361
|
-
console.warn(`[@use-gesture]: Unknown config key \`${
|
|
1361
|
+
console.warn(`[@use-gesture]: Unknown config key \`${c}\` was used. Please read the documentation for further information.`);
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
1364
|
return t;
|
|
1365
1365
|
}
|
|
1366
|
-
class
|
|
1366
|
+
class _r {
|
|
1367
1367
|
constructor(e, t) {
|
|
1368
1368
|
we(this, "_listeners", /* @__PURE__ */ new Set()), this._ctrl = e, this._gestureKey = t;
|
|
1369
1369
|
}
|
|
1370
1370
|
add(e, t, r, s, o) {
|
|
1371
|
-
const i = this._listeners, a =
|
|
1371
|
+
const i = this._listeners, a = Es(t, r), l = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = te(te({}, l), o);
|
|
1372
1372
|
e.addEventListener(a, s, u);
|
|
1373
|
-
const
|
|
1374
|
-
e.removeEventListener(a, s, u), i.delete(
|
|
1373
|
+
const c = () => {
|
|
1374
|
+
e.removeEventListener(a, s, u), i.delete(c);
|
|
1375
1375
|
};
|
|
1376
|
-
return i.add(
|
|
1376
|
+
return i.add(c), c;
|
|
1377
1377
|
}
|
|
1378
1378
|
clean() {
|
|
1379
1379
|
this._listeners.forEach((e) => e()), this._listeners.clear();
|
|
1380
1380
|
}
|
|
1381
1381
|
}
|
|
1382
|
-
class
|
|
1382
|
+
class Qs {
|
|
1383
1383
|
constructor() {
|
|
1384
1384
|
we(this, "_timeouts", /* @__PURE__ */ new Map());
|
|
1385
1385
|
}
|
|
@@ -1394,20 +1394,20 @@ class Ys {
|
|
|
1394
1394
|
this._timeouts.forEach((e) => void window.clearTimeout(e)), this._timeouts.clear();
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
class
|
|
1397
|
+
class eo {
|
|
1398
1398
|
constructor(e) {
|
|
1399
|
-
we(this, "gestures", /* @__PURE__ */ new Set()), we(this, "_targetEventStore", new
|
|
1399
|
+
we(this, "gestures", /* @__PURE__ */ new Set()), we(this, "_targetEventStore", new _r(this)), we(this, "gestureEventStores", {}), we(this, "gestureTimeoutStores", {}), we(this, "handlers", {}), we(this, "config", {}), we(this, "pointerIds", /* @__PURE__ */ new Set()), we(this, "touchIds", /* @__PURE__ */ new Set()), we(this, "state", {
|
|
1400
1400
|
shared: {
|
|
1401
1401
|
shiftKey: !1,
|
|
1402
1402
|
metaKey: !1,
|
|
1403
1403
|
ctrlKey: !1,
|
|
1404
1404
|
altKey: !1
|
|
1405
1405
|
}
|
|
1406
|
-
}),
|
|
1406
|
+
}), to(this, e);
|
|
1407
1407
|
}
|
|
1408
1408
|
setEventIds(e) {
|
|
1409
|
-
if (
|
|
1410
|
-
return this.touchIds = new Set(
|
|
1409
|
+
if (cn(e))
|
|
1410
|
+
return this.touchIds = new Set(Rs(e)), this.touchIds;
|
|
1411
1411
|
if ("pointerId" in e)
|
|
1412
1412
|
return e.type === "pointerup" || e.type === "pointercancel" ? this.pointerIds.delete(e.pointerId) : e.type === "pointerdown" && this.pointerIds.add(e.pointerId), this.pointerIds;
|
|
1413
1413
|
}
|
|
@@ -1415,7 +1415,7 @@ class Xs {
|
|
|
1415
1415
|
this.handlers = e, this.nativeHandlers = t;
|
|
1416
1416
|
}
|
|
1417
1417
|
applyConfig(e, t) {
|
|
1418
|
-
this.config =
|
|
1418
|
+
this.config = Zs(e, t, this.config);
|
|
1419
1419
|
}
|
|
1420
1420
|
clean() {
|
|
1421
1421
|
this._targetEventStore.clean();
|
|
@@ -1431,13 +1431,13 @@ class Xs {
|
|
|
1431
1431
|
if (!(t.target && (s = t.target(), !s))) {
|
|
1432
1432
|
if (t.enabled) {
|
|
1433
1433
|
for (const i of this.gestures) {
|
|
1434
|
-
const a = this.config[i],
|
|
1434
|
+
const a = this.config[i], l = Qn(r, a.eventOptions, !!s);
|
|
1435
1435
|
if (a.enabled) {
|
|
1436
|
-
const u =
|
|
1437
|
-
new u(this, e, i).bind(
|
|
1436
|
+
const u = Sr.get(i);
|
|
1437
|
+
new u(this, e, i).bind(l);
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
const o =
|
|
1440
|
+
const o = Qn(r, t.eventOptions, !!s);
|
|
1441
1441
|
for (const i in this.nativeHandlers)
|
|
1442
1442
|
o(i, "", (a) => this.nativeHandlers[i](te(te({}, this.state.shared), {}, {
|
|
1443
1443
|
event: a,
|
|
@@ -1445,113 +1445,113 @@ class Xs {
|
|
|
1445
1445
|
})), void 0, !0);
|
|
1446
1446
|
}
|
|
1447
1447
|
for (const o in r)
|
|
1448
|
-
r[o] =
|
|
1448
|
+
r[o] = Cs(...r[o]);
|
|
1449
1449
|
if (!s) return r;
|
|
1450
1450
|
for (const o in r) {
|
|
1451
1451
|
const {
|
|
1452
1452
|
device: i,
|
|
1453
1453
|
capture: a,
|
|
1454
|
-
passive:
|
|
1455
|
-
} =
|
|
1454
|
+
passive: l
|
|
1455
|
+
} = ws(o);
|
|
1456
1456
|
this._targetEventStore.add(s, i, "", r[o], {
|
|
1457
1457
|
capture: a,
|
|
1458
|
-
passive:
|
|
1458
|
+
passive: l
|
|
1459
1459
|
});
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1465
|
-
n.gestures.add(e), n.gestureEventStores[e] = new
|
|
1464
|
+
function Ct(n, e) {
|
|
1465
|
+
n.gestures.add(e), n.gestureEventStores[e] = new _r(n, e), n.gestureTimeoutStores[e] = new Qs();
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1468
|
-
e.drag &&
|
|
1467
|
+
function to(n, e) {
|
|
1468
|
+
e.drag && Ct(n, "drag"), e.wheel && Ct(n, "wheel"), e.scroll && Ct(n, "scroll"), e.move && Ct(n, "move"), e.pinch && Ct(n, "pinch"), e.hover && Ct(n, "hover");
|
|
1469
1469
|
}
|
|
1470
|
-
const
|
|
1471
|
-
var
|
|
1472
|
-
const
|
|
1473
|
-
let f = a ? r :
|
|
1474
|
-
t &&
|
|
1470
|
+
const Qn = (n, e, t) => (r, s, o, i = {}, a = !1) => {
|
|
1471
|
+
var l, u;
|
|
1472
|
+
const c = (l = i.capture) !== null && l !== void 0 ? l : e.capture, h = (u = i.passive) !== null && u !== void 0 ? u : e.passive;
|
|
1473
|
+
let f = a ? r : Ss(r, s, c);
|
|
1474
|
+
t && h && (f += "Passive"), n[f] = n[f] || [], n[f].push(o);
|
|
1475
1475
|
};
|
|
1476
|
-
function
|
|
1477
|
-
const s =
|
|
1478
|
-
if (s.applyHandlers(n, r), s.applyConfig(e, t),
|
|
1476
|
+
function no(n, e = {}, t, r) {
|
|
1477
|
+
const s = Lt.useMemo(() => new eo(n), []);
|
|
1478
|
+
if (s.applyHandlers(n, r), s.applyConfig(e, t), Lt.useEffect(s.effect.bind(s)), Lt.useEffect(() => s.clean.bind(s), []), e.target === void 0)
|
|
1479
1479
|
return s.bind.bind(s);
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1482
|
-
return
|
|
1481
|
+
function wn(n, e) {
|
|
1482
|
+
return Ys(Xs), no({
|
|
1483
1483
|
drag: n
|
|
1484
1484
|
}, e || {}, "drag");
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function er(n, e) {
|
|
1487
1487
|
if (typeof n == "function")
|
|
1488
1488
|
return n(e);
|
|
1489
1489
|
n != null && (n.current = e);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function wr(...n) {
|
|
1492
1492
|
return (e) => {
|
|
1493
1493
|
let t = !1;
|
|
1494
1494
|
const r = n.map((s) => {
|
|
1495
|
-
const o =
|
|
1495
|
+
const o = er(s, e);
|
|
1496
1496
|
return !t && typeof o == "function" && (t = !0), o;
|
|
1497
1497
|
});
|
|
1498
1498
|
if (t)
|
|
1499
1499
|
return () => {
|
|
1500
1500
|
for (let s = 0; s < r.length; s++) {
|
|
1501
1501
|
const o = r[s];
|
|
1502
|
-
typeof o == "function" ? o() :
|
|
1502
|
+
typeof o == "function" ? o() : er(n[s], null);
|
|
1503
1503
|
}
|
|
1504
1504
|
};
|
|
1505
1505
|
};
|
|
1506
1506
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return
|
|
1507
|
+
function ot(...n) {
|
|
1508
|
+
return v.useCallback(wr(...n), n);
|
|
1509
1509
|
}
|
|
1510
1510
|
// @__NO_SIDE_EFFECTS__
|
|
1511
|
-
function
|
|
1512
|
-
const e = /* @__PURE__ */
|
|
1513
|
-
const { children: o, ...i } = r, a =
|
|
1514
|
-
if (
|
|
1515
|
-
const u =
|
|
1516
|
-
return /* @__PURE__ */
|
|
1511
|
+
function Er(n) {
|
|
1512
|
+
const e = /* @__PURE__ */ so(n), t = v.forwardRef((r, s) => {
|
|
1513
|
+
const { children: o, ...i } = r, a = v.Children.toArray(o), l = a.find(io);
|
|
1514
|
+
if (l) {
|
|
1515
|
+
const u = l.props.children, c = a.map((h) => h === l ? v.Children.count(u) > 1 ? v.Children.only(null) : v.isValidElement(u) ? u.props.children : null : h);
|
|
1516
|
+
return /* @__PURE__ */ T.jsx(e, { ...i, ref: s, children: v.isValidElement(u) ? v.cloneElement(u, void 0, c) : null });
|
|
1517
1517
|
}
|
|
1518
|
-
return /* @__PURE__ */
|
|
1518
|
+
return /* @__PURE__ */ T.jsx(e, { ...i, ref: s, children: o });
|
|
1519
1519
|
});
|
|
1520
1520
|
return t.displayName = `${n}.Slot`, t;
|
|
1521
1521
|
}
|
|
1522
|
-
var
|
|
1522
|
+
var ro = /* @__PURE__ */ Er("Slot");
|
|
1523
1523
|
// @__NO_SIDE_EFFECTS__
|
|
1524
|
-
function
|
|
1525
|
-
const e =
|
|
1524
|
+
function so(n) {
|
|
1525
|
+
const e = v.forwardRef((t, r) => {
|
|
1526
1526
|
const { children: s, ...o } = t;
|
|
1527
|
-
if (
|
|
1528
|
-
const i =
|
|
1529
|
-
return s.type !==
|
|
1527
|
+
if (v.isValidElement(s)) {
|
|
1528
|
+
const i = lo(s), a = ao(o, s.props);
|
|
1529
|
+
return s.type !== v.Fragment && (a.ref = r ? wr(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
|
-
var
|
|
1536
|
-
function
|
|
1537
|
-
return
|
|
1535
|
+
var oo = Symbol("radix.slottable");
|
|
1536
|
+
function io(n) {
|
|
1537
|
+
return v.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === oo;
|
|
1538
1538
|
}
|
|
1539
|
-
function
|
|
1539
|
+
function ao(n, e) {
|
|
1540
1540
|
const t = { ...e };
|
|
1541
1541
|
for (const r in e) {
|
|
1542
1542
|
const s = n[r], o = e[r];
|
|
1543
1543
|
/^on[A-Z]/.test(r) ? s && o ? t[r] = (...a) => {
|
|
1544
|
-
const
|
|
1545
|
-
return s(...a),
|
|
1544
|
+
const l = o(...a);
|
|
1545
|
+
return s(...a), l;
|
|
1546
1546
|
} : s && (t[r] = s) : r === "style" ? t[r] = { ...s, ...o } : r === "className" && (t[r] = [s, o].filter(Boolean).join(" "));
|
|
1547
1547
|
}
|
|
1548
1548
|
return { ...n, ...t };
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function lo(n) {
|
|
1551
1551
|
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
1552
1552
|
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);
|
|
1553
1553
|
}
|
|
1554
|
-
var
|
|
1554
|
+
var co = [
|
|
1555
1555
|
"a",
|
|
1556
1556
|
"button",
|
|
1557
1557
|
"div",
|
|
@@ -1569,44 +1569,44 @@ var no = [
|
|
|
1569
1569
|
"span",
|
|
1570
1570
|
"svg",
|
|
1571
1571
|
"ul"
|
|
1572
|
-
], Ut =
|
|
1573
|
-
const t = /* @__PURE__ */
|
|
1574
|
-
const { asChild: i, ...a } = s,
|
|
1575
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
1572
|
+
], Ut = co.reduce((n, e) => {
|
|
1573
|
+
const t = /* @__PURE__ */ Er(`Primitive.${e}`), r = v.forwardRef((s, o) => {
|
|
1574
|
+
const { asChild: i, ...a } = s, l = i ? t : e;
|
|
1575
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ T.jsx(l, { ...a, ref: o });
|
|
1576
1576
|
});
|
|
1577
1577
|
return r.displayName = `Primitive.${e}`, { ...n, [e]: r };
|
|
1578
1578
|
}, {});
|
|
1579
|
-
function
|
|
1579
|
+
function uo(n, e = []) {
|
|
1580
1580
|
let t = [];
|
|
1581
1581
|
function r(o, i) {
|
|
1582
|
-
const a =
|
|
1582
|
+
const a = v.createContext(i), l = t.length;
|
|
1583
1583
|
t = [...t, i];
|
|
1584
|
-
const u = (
|
|
1585
|
-
const { scope: f, children: p, ...S } =
|
|
1586
|
-
return /* @__PURE__ */
|
|
1584
|
+
const u = (h) => {
|
|
1585
|
+
const { scope: f, children: p, ...S } = h, y = f?.[n]?.[l] || a, E = v.useMemo(() => S, Object.values(S));
|
|
1586
|
+
return /* @__PURE__ */ T.jsx(y.Provider, { value: E, children: p });
|
|
1587
1587
|
};
|
|
1588
1588
|
u.displayName = o + "Provider";
|
|
1589
|
-
function
|
|
1590
|
-
const p = f?.[n]?.[
|
|
1589
|
+
function c(h, f) {
|
|
1590
|
+
const p = f?.[n]?.[l] || 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
|
-
return [u,
|
|
1595
|
+
return [u, c];
|
|
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
|
-
const
|
|
1601
|
-
return
|
|
1602
|
-
() => ({ [`__scope${n}`]: { ...a, [n]:
|
|
1603
|
-
[a,
|
|
1600
|
+
const l = a?.[n] || o;
|
|
1601
|
+
return v.useMemo(
|
|
1602
|
+
() => ({ [`__scope${n}`]: { ...a, [n]: l } }),
|
|
1603
|
+
[a, l]
|
|
1604
1604
|
);
|
|
1605
1605
|
};
|
|
1606
1606
|
};
|
|
1607
|
-
return s.scopeName = n, [r,
|
|
1607
|
+
return s.scopeName = n, [r, fo(s, ...e)];
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function fo(...n) {
|
|
1610
1610
|
const e = n[0];
|
|
1611
1611
|
if (n.length === 1) return e;
|
|
1612
1612
|
const t = () => {
|
|
@@ -1615,11 +1615,11 @@ function so(...n) {
|
|
|
1615
1615
|
scopeName: s.scopeName
|
|
1616
1616
|
}));
|
|
1617
1617
|
return function(o) {
|
|
1618
|
-
const i = r.reduce((a, { useScope:
|
|
1619
|
-
const
|
|
1620
|
-
return { ...a, ...
|
|
1618
|
+
const i = r.reduce((a, { useScope: l, scopeName: u }) => {
|
|
1619
|
+
const h = l(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
|
|
1633
|
+
var An = globalThis?.document ? v.useLayoutEffect : () => {
|
|
1634
1634
|
};
|
|
1635
|
-
function
|
|
1636
|
-
return
|
|
1635
|
+
function ho(n, e) {
|
|
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 =
|
|
1640
|
-
return typeof t == "function" || r.isPresent ?
|
|
1639
|
+
const { present: e, children: t } = n, r = mo(e), s = typeof t == "function" ? t({ present: r.isPresent }) : v.Children.only(t), o = ot(r.ref, po(s));
|
|
1640
|
+
return typeof t == "function" || r.isPresent ? v.cloneElement(s, { ref: o }) : null;
|
|
1641
1641
|
};
|
|
1642
1642
|
$t.displayName = "Presence";
|
|
1643
|
-
function
|
|
1644
|
-
const [e, t] =
|
|
1643
|
+
function mo(n) {
|
|
1644
|
+
const [e, t] = v.useState(), r = v.useRef(null), s = v.useRef(n), o = v.useRef("none"), i = n ? "mounted" : "unmounted", [a, l] = ho(i, {
|
|
1645
1645
|
mounted: {
|
|
1646
1646
|
UNMOUNT: "unmounted",
|
|
1647
1647
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -1654,66 +1654,66 @@ function io(n) {
|
|
|
1654
1654
|
MOUNT: "mounted"
|
|
1655
1655
|
}
|
|
1656
1656
|
});
|
|
1657
|
-
return
|
|
1658
|
-
const u =
|
|
1657
|
+
return v.useEffect(() => {
|
|
1658
|
+
const u = Gt(r.current);
|
|
1659
1659
|
o.current = a === "mounted" ? u : "none";
|
|
1660
|
-
}, [a]),
|
|
1661
|
-
const u = r.current,
|
|
1662
|
-
if (
|
|
1663
|
-
const f = o.current, p =
|
|
1664
|
-
n ?
|
|
1660
|
+
}, [a]), An(() => {
|
|
1661
|
+
const u = r.current, c = s.current;
|
|
1662
|
+
if (c !== n) {
|
|
1663
|
+
const f = o.current, p = Gt(u);
|
|
1664
|
+
n ? l("MOUNT") : p === "none" || u?.display === "none" ? l("UNMOUNT") : l(c && f !== p ? "ANIMATION_OUT" : "UNMOUNT"), s.current = n;
|
|
1665
1665
|
}
|
|
1666
|
-
}, [n,
|
|
1666
|
+
}, [n, l]), An(() => {
|
|
1667
1667
|
if (e) {
|
|
1668
1668
|
let u;
|
|
1669
|
-
const
|
|
1670
|
-
const
|
|
1671
|
-
if (p.target === e &&
|
|
1672
|
-
const
|
|
1673
|
-
e.style.animationFillMode = "forwards", u =
|
|
1674
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode =
|
|
1669
|
+
const c = e.ownerDocument.defaultView ?? window, h = (p) => {
|
|
1670
|
+
const y = Gt(r.current).includes(CSS.escape(p.animationName));
|
|
1671
|
+
if (p.target === e && y && (l("ANIMATION_END"), !s.current)) {
|
|
1672
|
+
const E = e.style.animationFillMode;
|
|
1673
|
+
e.style.animationFillMode = "forwards", u = c.setTimeout(() => {
|
|
1674
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = E);
|
|
1675
1675
|
});
|
|
1676
1676
|
}
|
|
1677
1677
|
}, f = (p) => {
|
|
1678
|
-
p.target === e && (o.current =
|
|
1678
|
+
p.target === e && (o.current = Gt(r.current));
|
|
1679
1679
|
};
|
|
1680
|
-
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel",
|
|
1681
|
-
|
|
1680
|
+
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", h), e.addEventListener("animationend", h), () => {
|
|
1681
|
+
c.clearTimeout(u), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", h), e.removeEventListener("animationend", h);
|
|
1682
1682
|
};
|
|
1683
1683
|
} else
|
|
1684
|
-
|
|
1685
|
-
}, [e,
|
|
1684
|
+
l("ANIMATION_END");
|
|
1685
|
+
}, [e, l]), {
|
|
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
|
};
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1692
|
+
function Gt(n) {
|
|
1693
1693
|
return n?.animationName || "none";
|
|
1694
1694
|
}
|
|
1695
|
-
function
|
|
1695
|
+
function po(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
|
|
1700
|
-
function
|
|
1701
|
-
const e =
|
|
1699
|
+
var go = v.createContext(void 0);
|
|
1700
|
+
function vo(n) {
|
|
1701
|
+
const e = v.useContext(go);
|
|
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
|
-
function
|
|
1710
|
+
function bo(n, [e, t]) {
|
|
1711
1711
|
return Math.min(t, Math.max(e, n));
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1714
|
-
return
|
|
1713
|
+
function So(n, e) {
|
|
1714
|
+
return v.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1715
1715
|
}
|
|
1716
|
-
var
|
|
1716
|
+
var Dn = "ScrollArea", [yr] = uo(Dn), [_o, Re] = yr(Dn), xr = v.forwardRef(
|
|
1717
1717
|
(n, e) => {
|
|
1718
1718
|
const {
|
|
1719
1719
|
__scopeScrollArea: t,
|
|
@@ -1721,40 +1721,40 @@ 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,
|
|
1725
|
-
return /* @__PURE__ */
|
|
1726
|
-
|
|
1724
|
+
} = n, [a, l] = v.useState(null), [u, c] = v.useState(null), [h, f] = v.useState(null), [p, S] = v.useState(null), [y, E] = v.useState(null), [x, b] = v.useState(0), [g, m] = v.useState(0), [R, _] = v.useState(!1), [C, D] = v.useState(!1), A = ot(e, (I) => l(I)), w = vo(s);
|
|
1725
|
+
return /* @__PURE__ */ T.jsx(
|
|
1726
|
+
_o,
|
|
1727
1727
|
{
|
|
1728
1728
|
scope: t,
|
|
1729
1729
|
type: r,
|
|
1730
|
-
dir:
|
|
1730
|
+
dir: w,
|
|
1731
1731
|
scrollHideDelay: o,
|
|
1732
1732
|
scrollArea: a,
|
|
1733
1733
|
viewport: u,
|
|
1734
|
-
onViewportChange:
|
|
1735
|
-
content:
|
|
1734
|
+
onViewportChange: c,
|
|
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:
|
|
1743
|
-
scrollbarYEnabled:
|
|
1744
|
-
onScrollbarYEnabledChange:
|
|
1740
|
+
onScrollbarXEnabledChange: _,
|
|
1741
|
+
scrollbarY: y,
|
|
1742
|
+
onScrollbarYChange: E,
|
|
1743
|
+
scrollbarYEnabled: C,
|
|
1744
|
+
onScrollbarYEnabledChange: D,
|
|
1745
1745
|
onCornerWidthChange: b,
|
|
1746
|
-
onCornerHeightChange:
|
|
1747
|
-
children: /* @__PURE__ */
|
|
1746
|
+
onCornerHeightChange: m,
|
|
1747
|
+
children: /* @__PURE__ */ T.jsx(
|
|
1748
1748
|
Ut.div,
|
|
1749
1749
|
{
|
|
1750
|
-
dir:
|
|
1750
|
+
dir: w,
|
|
1751
1751
|
...i,
|
|
1752
|
-
ref:
|
|
1752
|
+
ref: A,
|
|
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
|
}
|
|
@@ -1763,12 +1763,12 @@ var xn = "ScrollArea", [gr] = ro(xn), [ho, Re] = gr(xn), vr = g.forwardRef(
|
|
|
1763
1763
|
);
|
|
1764
1764
|
}
|
|
1765
1765
|
);
|
|
1766
|
-
|
|
1767
|
-
var
|
|
1766
|
+
xr.displayName = Dn;
|
|
1767
|
+
var Rr = "ScrollAreaViewport", Tr = v.forwardRef(
|
|
1768
1768
|
(n, e) => {
|
|
1769
|
-
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Re(
|
|
1770
|
-
return /* @__PURE__ */
|
|
1771
|
-
/* @__PURE__ */
|
|
1769
|
+
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Re(Rr, t), a = v.useRef(null), l = ot(e, a, i.onViewportChange);
|
|
1770
|
+
return /* @__PURE__ */ T.jsxs(T.Fragment, { children: [
|
|
1771
|
+
/* @__PURE__ */ T.jsx(
|
|
1772
1772
|
"style",
|
|
1773
1773
|
{
|
|
1774
1774
|
dangerouslySetInnerHTML: {
|
|
@@ -1777,12 +1777,12 @@ var br = "ScrollAreaViewport", Sr = g.forwardRef(
|
|
|
1777
1777
|
nonce: s
|
|
1778
1778
|
}
|
|
1779
1779
|
),
|
|
1780
|
-
/* @__PURE__ */
|
|
1780
|
+
/* @__PURE__ */ T.jsx(
|
|
1781
1781
|
Ut.div,
|
|
1782
1782
|
{
|
|
1783
1783
|
"data-radix-scroll-area-viewport": "",
|
|
1784
1784
|
...o,
|
|
1785
|
-
ref:
|
|
1785
|
+
ref: l,
|
|
1786
1786
|
style: {
|
|
1787
1787
|
/**
|
|
1788
1788
|
* We don't support `visible` because the intention is to have at least one scrollbar
|
|
@@ -1799,47 +1799,47 @@ var br = "ScrollAreaViewport", Sr = g.forwardRef(
|
|
|
1799
1799
|
overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
|
|
1800
1800
|
...n.style
|
|
1801
1801
|
},
|
|
1802
|
-
children: /* @__PURE__ */
|
|
1802
|
+
children: /* @__PURE__ */ T.jsx("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: r })
|
|
1803
1803
|
}
|
|
1804
1804
|
)
|
|
1805
1805
|
] });
|
|
1806
1806
|
}
|
|
1807
1807
|
);
|
|
1808
|
-
|
|
1809
|
-
var Me = "ScrollAreaScrollbar",
|
|
1808
|
+
Tr.displayName = Rr;
|
|
1809
|
+
var Me = "ScrollAreaScrollbar", Ar = 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
|
-
}), [a, o, i]), s.type === "hover" ? /* @__PURE__ */
|
|
1814
|
+
}), [a, o, i]), s.type === "hover" ? /* @__PURE__ */ T.jsx(wo, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ T.jsx(Eo, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ T.jsx(Cr, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ T.jsx(Ln, { ...r, ref: e }) : null;
|
|
1815
1815
|
}
|
|
1816
1816
|
);
|
|
1817
|
-
|
|
1818
|
-
var
|
|
1819
|
-
const { forceMount: t, ...r } = n, s = Re(Me, n.__scopeScrollArea), [o, i] =
|
|
1820
|
-
return
|
|
1817
|
+
Ar.displayName = Me;
|
|
1818
|
+
var wo = 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
|
-
let
|
|
1822
|
+
let l = 0;
|
|
1823
1823
|
if (a) {
|
|
1824
1824
|
const u = () => {
|
|
1825
|
-
window.clearTimeout(
|
|
1826
|
-
},
|
|
1827
|
-
|
|
1825
|
+
window.clearTimeout(l), i(!0);
|
|
1826
|
+
}, c = () => {
|
|
1827
|
+
l = window.setTimeout(() => i(!1), s.scrollHideDelay);
|
|
1828
1828
|
};
|
|
1829
|
-
return a.addEventListener("pointerenter", u), a.addEventListener("pointerleave",
|
|
1830
|
-
window.clearTimeout(
|
|
1829
|
+
return a.addEventListener("pointerenter", u), a.addEventListener("pointerleave", c), () => {
|
|
1830
|
+
window.clearTimeout(l), a.removeEventListener("pointerenter", u), a.removeEventListener("pointerleave", c);
|
|
1831
1831
|
};
|
|
1832
1832
|
}
|
|
1833
|
-
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */
|
|
1834
|
-
|
|
1833
|
+
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ T.jsx($t, { present: t || o, children: /* @__PURE__ */ T.jsx(
|
|
1834
|
+
Cr,
|
|
1835
1835
|
{
|
|
1836
1836
|
"data-state": o ? "visible" : "hidden",
|
|
1837
1837
|
...r,
|
|
1838
1838
|
ref: e
|
|
1839
1839
|
}
|
|
1840
1840
|
) });
|
|
1841
|
-
}),
|
|
1842
|
-
const { forceMount: t, ...r } = n, s = Re(Me, n.__scopeScrollArea), o = n.orientation === "horizontal", i =
|
|
1841
|
+
}), Eo = v.forwardRef((n, e) => {
|
|
1842
|
+
const { forceMount: t, ...r } = n, s = Re(Me, n.__scopeScrollArea), o = n.orientation === "horizontal", i = fn(() => l("SCROLL_END"), 100), [a, l] = So("hidden", {
|
|
1843
1843
|
hidden: {
|
|
1844
1844
|
SCROLL: "scrolling"
|
|
1845
1845
|
},
|
|
@@ -1857,71 +1857,71 @@ 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
|
-
const u = window.setTimeout(() =>
|
|
1862
|
+
const u = window.setTimeout(() => l("HIDE"), s.scrollHideDelay);
|
|
1863
1863
|
return () => window.clearTimeout(u);
|
|
1864
1864
|
}
|
|
1865
|
-
}, [a, s.scrollHideDelay,
|
|
1866
|
-
const u = s.viewport,
|
|
1865
|
+
}, [a, s.scrollHideDelay, l]), v.useEffect(() => {
|
|
1866
|
+
const u = s.viewport, c = o ? "scrollLeft" : "scrollTop";
|
|
1867
1867
|
if (u) {
|
|
1868
|
-
let
|
|
1868
|
+
let h = u[c];
|
|
1869
1869
|
const f = () => {
|
|
1870
|
-
const p = u[
|
|
1871
|
-
|
|
1870
|
+
const p = u[c];
|
|
1871
|
+
h !== p && (l("SCROLL"), i()), h = p;
|
|
1872
1872
|
};
|
|
1873
1873
|
return u.addEventListener("scroll", f), () => u.removeEventListener("scroll", f);
|
|
1874
1874
|
}
|
|
1875
|
-
}, [s.viewport, o,
|
|
1876
|
-
|
|
1875
|
+
}, [s.viewport, o, l, i]), /* @__PURE__ */ T.jsx($t, { present: t || a !== "hidden", children: /* @__PURE__ */ T.jsx(
|
|
1876
|
+
Ln,
|
|
1877
1877
|
{
|
|
1878
1878
|
"data-state": a === "hidden" ? "hidden" : "visible",
|
|
1879
1879
|
...r,
|
|
1880
1880
|
ref: e,
|
|
1881
|
-
onPointerEnter: st(n.onPointerEnter, () =>
|
|
1882
|
-
onPointerLeave: st(n.onPointerLeave, () =>
|
|
1881
|
+
onPointerEnter: st(n.onPointerEnter, () => l("POINTER_ENTER")),
|
|
1882
|
+
onPointerLeave: st(n.onPointerLeave, () => l("POINTER_LEAVE"))
|
|
1883
1883
|
}
|
|
1884
1884
|
) });
|
|
1885
|
-
}),
|
|
1886
|
-
const t = Re(Me, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] =
|
|
1885
|
+
}), Cr = v.forwardRef((n, e) => {
|
|
1886
|
+
const t = Re(Me, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = v.useState(!1), a = n.orientation === "horizontal", l = fn(() => {
|
|
1887
1887
|
if (t.viewport) {
|
|
1888
|
-
const u = t.viewport.offsetWidth < t.viewport.scrollWidth,
|
|
1889
|
-
i(a ? u :
|
|
1888
|
+
const u = t.viewport.offsetWidth < t.viewport.scrollWidth, c = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
1889
|
+
i(a ? u : c);
|
|
1890
1890
|
}
|
|
1891
1891
|
}, 10);
|
|
1892
|
-
return Nt(t.viewport,
|
|
1893
|
-
|
|
1892
|
+
return Nt(t.viewport, l), Nt(t.content, l), /* @__PURE__ */ T.jsx($t, { present: r || o, children: /* @__PURE__ */ T.jsx(
|
|
1893
|
+
Ln,
|
|
1894
1894
|
{
|
|
1895
1895
|
"data-state": o ? "visible" : "hidden",
|
|
1896
1896
|
...s,
|
|
1897
1897
|
ref: e
|
|
1898
1898
|
}
|
|
1899
1899
|
) });
|
|
1900
|
-
}),
|
|
1901
|
-
const { orientation: t = "vertical", ...r } = n, s = Re(Me, n.__scopeScrollArea), o =
|
|
1900
|
+
}), Ln = 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, l] = v.useState({
|
|
1902
1902
|
content: 0,
|
|
1903
1903
|
viewport: 0,
|
|
1904
1904
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
1905
|
-
}), u =
|
|
1905
|
+
}), u = Mr(a.viewport, a.content), c = {
|
|
1906
1906
|
...r,
|
|
1907
1907
|
sizes: a,
|
|
1908
|
-
onSizesChange:
|
|
1908
|
+
onSizesChange: l,
|
|
1909
1909
|
hasThumb: u > 0 && u < 1,
|
|
1910
1910
|
onThumbChange: (f) => o.current = f,
|
|
1911
1911
|
onThumbPointerUp: () => i.current = 0,
|
|
1912
1912
|
onThumbPointerDown: (f) => i.current = f
|
|
1913
1913
|
};
|
|
1914
|
-
function
|
|
1915
|
-
return
|
|
1914
|
+
function h(f, p) {
|
|
1915
|
+
return Co(f, i.current, a, p);
|
|
1916
1916
|
}
|
|
1917
|
-
return t === "horizontal" ? /* @__PURE__ */
|
|
1918
|
-
|
|
1917
|
+
return t === "horizontal" ? /* @__PURE__ */ T.jsx(
|
|
1918
|
+
yo,
|
|
1919
1919
|
{
|
|
1920
|
-
...
|
|
1920
|
+
...c,
|
|
1921
1921
|
ref: e,
|
|
1922
1922
|
onThumbPositionChange: () => {
|
|
1923
1923
|
if (s.viewport && o.current) {
|
|
1924
|
-
const f = s.viewport.scrollLeft, p =
|
|
1924
|
+
const f = s.viewport.scrollLeft, p = tr(f, a, s.dir);
|
|
1925
1925
|
o.current.style.transform = `translate3d(${p}px, 0, 0)`;
|
|
1926
1926
|
}
|
|
1927
1927
|
},
|
|
@@ -1929,17 +1929,17 @@ 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
|
-
) : t === "vertical" ? /* @__PURE__ */
|
|
1936
|
-
|
|
1935
|
+
) : t === "vertical" ? /* @__PURE__ */ T.jsx(
|
|
1936
|
+
xo,
|
|
1937
1937
|
{
|
|
1938
|
-
...
|
|
1938
|
+
...c,
|
|
1939
1939
|
ref: e,
|
|
1940
1940
|
onThumbPositionChange: () => {
|
|
1941
1941
|
if (s.viewport && o.current) {
|
|
1942
|
-
const f = s.viewport.scrollTop, p =
|
|
1942
|
+
const f = s.viewport.scrollTop, p = tr(f, a);
|
|
1943
1943
|
o.current.style.transform = `translate3d(0, ${p}px, 0)`;
|
|
1944
1944
|
}
|
|
1945
1945
|
},
|
|
@@ -1947,16 +1947,16 @@ 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
|
-
}),
|
|
1955
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Me, n.__scopeScrollArea), [i, a] =
|
|
1956
|
-
return
|
|
1957
|
-
|
|
1958
|
-
}, [
|
|
1959
|
-
|
|
1954
|
+
}), yo = v.forwardRef((n, e) => {
|
|
1955
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Me, n.__scopeScrollArea), [i, a] = v.useState(), l = v.useRef(null), u = ot(e, l, o.onScrollbarXChange);
|
|
1956
|
+
return v.useEffect(() => {
|
|
1957
|
+
l.current && a(getComputedStyle(l.current));
|
|
1958
|
+
}, [l]), /* @__PURE__ */ T.jsx(
|
|
1959
|
+
Dr,
|
|
1960
1960
|
{
|
|
1961
1961
|
"data-orientation": "horizontal",
|
|
1962
1962
|
...s,
|
|
@@ -1966,36 +1966,36 @@ var mo = g.forwardRef((n, e) => {
|
|
|
1966
1966
|
bottom: 0,
|
|
1967
1967
|
left: o.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
1968
1968
|
right: o.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
1969
|
-
"--radix-scroll-area-thumb-width":
|
|
1969
|
+
"--radix-scroll-area-thumb-width": un(t) + "px",
|
|
1970
1970
|
...n.style
|
|
1971
1971
|
},
|
|
1972
|
-
onThumbPointerDown: (
|
|
1973
|
-
onDragScroll: (
|
|
1974
|
-
onWheelScroll: (
|
|
1972
|
+
onThumbPointerDown: (c) => n.onThumbPointerDown(c.x),
|
|
1973
|
+
onDragScroll: (c) => n.onDragScroll(c.x),
|
|
1974
|
+
onWheelScroll: (c, h) => {
|
|
1975
1975
|
if (o.viewport) {
|
|
1976
|
-
const f = o.viewport.scrollLeft +
|
|
1977
|
-
n.onWheelScroll(f),
|
|
1976
|
+
const f = o.viewport.scrollLeft + c.deltaX;
|
|
1977
|
+
n.onWheelScroll(f), Ir(f, h) && c.preventDefault();
|
|
1978
1978
|
}
|
|
1979
1979
|
},
|
|
1980
1980
|
onResize: () => {
|
|
1981
|
-
|
|
1981
|
+
l.current && o.viewport && i && r({
|
|
1982
1982
|
content: o.viewport.scrollWidth,
|
|
1983
1983
|
viewport: o.viewport.offsetWidth,
|
|
1984
1984
|
scrollbar: {
|
|
1985
|
-
size:
|
|
1986
|
-
paddingStart:
|
|
1987
|
-
paddingEnd:
|
|
1985
|
+
size: l.current.clientWidth,
|
|
1986
|
+
paddingStart: on(i.paddingLeft),
|
|
1987
|
+
paddingEnd: on(i.paddingRight)
|
|
1988
1988
|
}
|
|
1989
1989
|
});
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
1992
|
);
|
|
1993
|
-
}),
|
|
1994
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Me, n.__scopeScrollArea), [i, a] =
|
|
1995
|
-
return
|
|
1996
|
-
|
|
1997
|
-
}, [
|
|
1998
|
-
|
|
1993
|
+
}), xo = v.forwardRef((n, e) => {
|
|
1994
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Me, n.__scopeScrollArea), [i, a] = v.useState(), l = v.useRef(null), u = ot(e, l, o.onScrollbarYChange);
|
|
1995
|
+
return v.useEffect(() => {
|
|
1996
|
+
l.current && a(getComputedStyle(l.current));
|
|
1997
|
+
}, [l]), /* @__PURE__ */ T.jsx(
|
|
1998
|
+
Dr,
|
|
1999
1999
|
{
|
|
2000
2000
|
"data-orientation": "vertical",
|
|
2001
2001
|
...s,
|
|
@@ -2006,31 +2006,31 @@ var mo = g.forwardRef((n, e) => {
|
|
|
2006
2006
|
right: o.dir === "ltr" ? 0 : void 0,
|
|
2007
2007
|
left: o.dir === "rtl" ? 0 : void 0,
|
|
2008
2008
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
2009
|
-
"--radix-scroll-area-thumb-height":
|
|
2009
|
+
"--radix-scroll-area-thumb-height": un(t) + "px",
|
|
2010
2010
|
...n.style
|
|
2011
2011
|
},
|
|
2012
|
-
onThumbPointerDown: (
|
|
2013
|
-
onDragScroll: (
|
|
2014
|
-
onWheelScroll: (
|
|
2012
|
+
onThumbPointerDown: (c) => n.onThumbPointerDown(c.y),
|
|
2013
|
+
onDragScroll: (c) => n.onDragScroll(c.y),
|
|
2014
|
+
onWheelScroll: (c, h) => {
|
|
2015
2015
|
if (o.viewport) {
|
|
2016
|
-
const f = o.viewport.scrollTop +
|
|
2017
|
-
n.onWheelScroll(f),
|
|
2016
|
+
const f = o.viewport.scrollTop + c.deltaY;
|
|
2017
|
+
n.onWheelScroll(f), Ir(f, h) && c.preventDefault();
|
|
2018
2018
|
}
|
|
2019
2019
|
},
|
|
2020
2020
|
onResize: () => {
|
|
2021
|
-
|
|
2021
|
+
l.current && o.viewport && i && r({
|
|
2022
2022
|
content: o.viewport.scrollHeight,
|
|
2023
2023
|
viewport: o.viewport.offsetHeight,
|
|
2024
2024
|
scrollbar: {
|
|
2025
|
-
size:
|
|
2026
|
-
paddingStart:
|
|
2027
|
-
paddingEnd:
|
|
2025
|
+
size: l.current.clientHeight,
|
|
2026
|
+
paddingStart: on(i.paddingTop),
|
|
2027
|
+
paddingEnd: on(i.paddingBottom)
|
|
2028
2028
|
}
|
|
2029
2029
|
});
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
2032
|
);
|
|
2033
|
-
}), [
|
|
2033
|
+
}), [Ro, Pr] = yr(Me), Dr = v.forwardRef((n, e) => {
|
|
2034
2034
|
const {
|
|
2035
2035
|
__scopeScrollArea: t,
|
|
2036
2036
|
sizes: r,
|
|
@@ -2038,113 +2038,113 @@ var mo = g.forwardRef((n, e) => {
|
|
|
2038
2038
|
onThumbChange: o,
|
|
2039
2039
|
onThumbPointerUp: i,
|
|
2040
2040
|
onThumbPointerDown: a,
|
|
2041
|
-
onThumbPositionChange:
|
|
2041
|
+
onThumbPositionChange: l,
|
|
2042
2042
|
onDragScroll: u,
|
|
2043
|
-
onWheelScroll:
|
|
2044
|
-
onResize:
|
|
2043
|
+
onWheelScroll: c,
|
|
2044
|
+
onResize: h,
|
|
2045
2045
|
...f
|
|
2046
|
-
} = n, p = Re(Me, t), [S,
|
|
2047
|
-
function
|
|
2048
|
-
if (
|
|
2049
|
-
const
|
|
2050
|
-
u({ x:
|
|
2046
|
+
} = n, p = Re(Me, t), [S, y] = v.useState(null), E = ot(e, (A) => y(A)), x = v.useRef(null), b = v.useRef(""), g = p.viewport, m = r.content - r.viewport, R = rt(c), _ = rt(l), C = fn(h, 10);
|
|
2047
|
+
function D(A) {
|
|
2048
|
+
if (x.current) {
|
|
2049
|
+
const w = A.clientX - x.current.left, I = A.clientY - x.current.top;
|
|
2050
|
+
u({ x: w, y: I });
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
|
-
return
|
|
2054
|
-
const
|
|
2055
|
-
const I =
|
|
2056
|
-
S?.contains(I) && R(
|
|
2053
|
+
return v.useEffect(() => {
|
|
2054
|
+
const A = (w) => {
|
|
2055
|
+
const I = w.target;
|
|
2056
|
+
S?.contains(I) && R(w, m);
|
|
2057
2057
|
};
|
|
2058
|
-
return document.addEventListener("wheel",
|
|
2059
|
-
}, [
|
|
2060
|
-
|
|
2058
|
+
return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
|
|
2059
|
+
}, [g, S, m, R]), v.useEffect(_, [r, _]), Nt(S, C), Nt(p.content, C), /* @__PURE__ */ T.jsx(
|
|
2060
|
+
Ro,
|
|
2061
2061
|
{
|
|
2062
2062
|
scope: t,
|
|
2063
2063
|
scrollbar: S,
|
|
2064
2064
|
hasThumb: s,
|
|
2065
2065
|
onThumbChange: rt(o),
|
|
2066
2066
|
onThumbPointerUp: rt(i),
|
|
2067
|
-
onThumbPositionChange:
|
|
2067
|
+
onThumbPositionChange: _,
|
|
2068
2068
|
onThumbPointerDown: rt(a),
|
|
2069
|
-
children: /* @__PURE__ */
|
|
2069
|
+
children: /* @__PURE__ */ T.jsx(
|
|
2070
2070
|
Ut.div,
|
|
2071
2071
|
{
|
|
2072
2072
|
...f,
|
|
2073
|
-
ref:
|
|
2073
|
+
ref: E,
|
|
2074
2074
|
style: { position: "absolute", ...f.style },
|
|
2075
|
-
onPointerDown: st(n.onPointerDown, (
|
|
2076
|
-
|
|
2075
|
+
onPointerDown: st(n.onPointerDown, (A) => {
|
|
2076
|
+
A.button === 0 && (A.target.setPointerCapture(A.pointerId), x.current = S.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", p.viewport && (p.viewport.style.scrollBehavior = "auto"), D(A));
|
|
2077
2077
|
}),
|
|
2078
|
-
onPointerMove: st(n.onPointerMove,
|
|
2079
|
-
onPointerUp: st(n.onPointerUp, (
|
|
2080
|
-
const
|
|
2081
|
-
|
|
2078
|
+
onPointerMove: st(n.onPointerMove, D),
|
|
2079
|
+
onPointerUp: st(n.onPointerUp, (A) => {
|
|
2080
|
+
const w = A.target;
|
|
2081
|
+
w.hasPointerCapture(A.pointerId) && w.releasePointerCapture(A.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
|
-
}),
|
|
2087
|
+
}), sn = "ScrollAreaThumb", Lr = v.forwardRef(
|
|
2088
2088
|
(n, e) => {
|
|
2089
|
-
const { forceMount: t, ...r } = n, s =
|
|
2090
|
-
return /* @__PURE__ */
|
|
2089
|
+
const { forceMount: t, ...r } = n, s = Pr(sn, n.__scopeScrollArea);
|
|
2090
|
+
return /* @__PURE__ */ T.jsx($t, { present: t || s.hasThumb, children: /* @__PURE__ */ T.jsx(To, { ref: e, ...r }) });
|
|
2091
2091
|
}
|
|
2092
|
-
),
|
|
2092
|
+
), To = v.forwardRef(
|
|
2093
2093
|
(n, e) => {
|
|
2094
|
-
const { __scopeScrollArea: t, style: r, ...s } = n, o = Re(
|
|
2094
|
+
const { __scopeScrollArea: t, style: r, ...s } = n, o = Re(sn, t), i = Pr(sn, t), { onThumbPositionChange: a } = i, l = ot(
|
|
2095
2095
|
e,
|
|
2096
|
-
(
|
|
2097
|
-
), u =
|
|
2096
|
+
(h) => i.onThumbChange(h)
|
|
2097
|
+
), u = v.useRef(void 0), c = fn(() => {
|
|
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
|
-
if (
|
|
2105
|
-
const p =
|
|
2104
|
+
if (c(), !u.current) {
|
|
2105
|
+
const p = Po(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
|
-
}, [o.viewport,
|
|
2111
|
+
}, [o.viewport, c, a]), /* @__PURE__ */ T.jsx(
|
|
2112
2112
|
Ut.div,
|
|
2113
2113
|
{
|
|
2114
2114
|
"data-state": i.hasThumb ? "visible" : "hidden",
|
|
2115
2115
|
...s,
|
|
2116
|
-
ref:
|
|
2116
|
+
ref: l,
|
|
2117
2117
|
style: {
|
|
2118
2118
|
width: "var(--radix-scroll-area-thumb-width)",
|
|
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
|
}
|
|
2128
2128
|
);
|
|
2129
2129
|
}
|
|
2130
2130
|
);
|
|
2131
|
-
|
|
2132
|
-
var
|
|
2131
|
+
Lr.displayName = sn;
|
|
2132
|
+
var On = "ScrollAreaCorner", Or = v.forwardRef(
|
|
2133
2133
|
(n, e) => {
|
|
2134
|
-
const t = Re(
|
|
2135
|
-
return t.type !== "scroll" && r ? /* @__PURE__ */
|
|
2134
|
+
const t = Re(On, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
|
|
2135
|
+
return t.type !== "scroll" && r ? /* @__PURE__ */ T.jsx(Ao, { ...n, ref: e }) : null;
|
|
2136
2136
|
}
|
|
2137
2137
|
);
|
|
2138
|
-
|
|
2139
|
-
var
|
|
2140
|
-
const { __scopeScrollArea: t, ...r } = n, s = Re(
|
|
2138
|
+
Or.displayName = On;
|
|
2139
|
+
var Ao = v.forwardRef((n, e) => {
|
|
2140
|
+
const { __scopeScrollArea: t, ...r } = n, s = Re(On, t), [o, i] = v.useState(0), [a, l] = v.useState(0), u = !!(o && a);
|
|
2141
2141
|
return Nt(s.scrollbarX, () => {
|
|
2142
|
-
const
|
|
2143
|
-
s.onCornerHeightChange(
|
|
2142
|
+
const c = s.scrollbarX?.offsetHeight || 0;
|
|
2143
|
+
s.onCornerHeightChange(c), l(c);
|
|
2144
2144
|
}), Nt(s.scrollbarY, () => {
|
|
2145
|
-
const
|
|
2146
|
-
s.onCornerWidthChange(
|
|
2147
|
-
}), u ? /* @__PURE__ */
|
|
2145
|
+
const c = s.scrollbarY?.offsetWidth || 0;
|
|
2146
|
+
s.onCornerWidthChange(c), i(c);
|
|
2147
|
+
}), u ? /* @__PURE__ */ T.jsx(
|
|
2148
2148
|
Ut.div,
|
|
2149
2149
|
{
|
|
2150
2150
|
...r,
|
|
@@ -2161,36 +2161,36 @@ var _o = g.forwardRef((n, e) => {
|
|
|
2161
2161
|
}
|
|
2162
2162
|
) : null;
|
|
2163
2163
|
});
|
|
2164
|
-
function
|
|
2164
|
+
function on(n) {
|
|
2165
2165
|
return n ? parseInt(n, 10) : 0;
|
|
2166
2166
|
}
|
|
2167
|
-
function
|
|
2167
|
+
function Mr(n, e) {
|
|
2168
2168
|
const t = n / e;
|
|
2169
2169
|
return isNaN(t) ? 0 : t;
|
|
2170
2170
|
}
|
|
2171
|
-
function
|
|
2172
|
-
const e =
|
|
2171
|
+
function un(n) {
|
|
2172
|
+
const e = Mr(n.viewport, n.content), t = n.scrollbar.paddingStart + n.scrollbar.paddingEnd, r = (n.scrollbar.size - t) * e;
|
|
2173
2173
|
return Math.max(r, 18);
|
|
2174
2174
|
}
|
|
2175
|
-
function
|
|
2176
|
-
const s =
|
|
2177
|
-
return
|
|
2175
|
+
function Co(n, e, t, r = "ltr") {
|
|
2176
|
+
const s = un(t), o = s / 2, i = e || o, a = s - i, l = t.scrollbar.paddingStart + i, u = t.scrollbar.size - t.scrollbar.paddingEnd - a, c = t.content - t.viewport, h = r === "ltr" ? [0, c] : [c * -1, 0];
|
|
2177
|
+
return Nr([l, u], h)(n);
|
|
2178
2178
|
}
|
|
2179
|
-
function
|
|
2180
|
-
const r =
|
|
2181
|
-
return
|
|
2179
|
+
function tr(n, e, t = "ltr") {
|
|
2180
|
+
const r = un(e), s = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = e.scrollbar.size - s, i = e.content - e.viewport, a = o - r, l = t === "ltr" ? [0, i] : [i * -1, 0], u = bo(n, l);
|
|
2181
|
+
return Nr([0, i], [0, a])(u);
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function Nr(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 Ir(n, e) {
|
|
2191
2191
|
return n > 0 && n < e;
|
|
2192
2192
|
}
|
|
2193
|
-
var
|
|
2193
|
+
var Po = (n, e = () => {
|
|
2194
2194
|
}) => {
|
|
2195
2195
|
let t = { left: n.scrollLeft, top: n.scrollTop }, r = 0;
|
|
2196
2196
|
return (function s() {
|
|
@@ -2198,15 +2198,15 @@ var Eo = (n, e = () => {
|
|
|
2198
2198
|
(i || a) && e(), t = o, r = window.requestAnimationFrame(s);
|
|
2199
2199
|
})(), () => window.cancelAnimationFrame(r);
|
|
2200
2200
|
};
|
|
2201
|
-
function
|
|
2202
|
-
const t = rt(n), r =
|
|
2203
|
-
return
|
|
2201
|
+
function fn(n, e) {
|
|
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
|
}
|
|
2207
2207
|
function Nt(n, e) {
|
|
2208
2208
|
const t = rt(e);
|
|
2209
|
-
|
|
2209
|
+
An(() => {
|
|
2210
2210
|
let r = 0;
|
|
2211
2211
|
if (n) {
|
|
2212
2212
|
const s = new ResizeObserver(() => {
|
|
@@ -2218,8 +2218,8 @@ function Nt(n, e) {
|
|
|
2218
2218
|
}
|
|
2219
2219
|
}, [n, t]);
|
|
2220
2220
|
}
|
|
2221
|
-
var
|
|
2222
|
-
const
|
|
2221
|
+
var Do = xr, Lo = Tr, Oo = Or;
|
|
2222
|
+
const En = (n, e, t, r, s) => ({
|
|
2223
2223
|
target: n,
|
|
2224
2224
|
dx: e[0],
|
|
2225
2225
|
dy: e[1],
|
|
@@ -2231,382 +2231,374 @@ const gn = (n, e, t, r, s) => ({
|
|
|
2231
2231
|
...s && {
|
|
2232
2232
|
deltaRect: s
|
|
2233
2233
|
}
|
|
2234
|
-
}),
|
|
2235
|
-
const e =
|
|
2234
|
+
}), Mo = (n, e, t) => n ? n === e || n === t || (e?.contains(n) ?? !1) || (t?.contains(n) ?? !1) : !1, No = (n) => {
|
|
2235
|
+
const e = Ce.c(31), {
|
|
2236
2236
|
children: t,
|
|
2237
2237
|
style: r,
|
|
2238
2238
|
draggable: s,
|
|
2239
2239
|
resizable: o,
|
|
2240
2240
|
draggableOptions: i,
|
|
2241
2241
|
resizableOptions: a,
|
|
2242
|
-
ref:
|
|
2243
|
-
} = n, u =
|
|
2244
|
-
let
|
|
2245
|
-
e[0] !== i || e[1] !==
|
|
2246
|
-
if (u.current = i,
|
|
2242
|
+
ref: l
|
|
2243
|
+
} = n, u = ue(void 0), c = ue(void 0), h = ue(null), f = ue(null);
|
|
2244
|
+
let p, S;
|
|
2245
|
+
e[0] !== i || e[1] !== l || e[2] !== a ? (p = () => {
|
|
2246
|
+
if (u.current = i, c.current = a, !l?.current)
|
|
2247
2247
|
return;
|
|
2248
|
-
const
|
|
2249
|
-
|
|
2250
|
-
},
|
|
2251
|
-
let
|
|
2252
|
-
e[5] !==
|
|
2248
|
+
const F = a?.edges?.left, K = a?.edges?.right, W = l.current;
|
|
2249
|
+
F && (h.current = W.querySelector(F)), K && (f.current = W.querySelector(K));
|
|
2250
|
+
}, S = [i, l, a], e[0] = i, e[1] = l, e[2] = a, e[3] = p, e[4] = S) : (p = e[3], S = e[4]), an(p, S);
|
|
2251
|
+
let y;
|
|
2252
|
+
e[5] !== l ? (y = (F) => {
|
|
2253
2253
|
const {
|
|
2254
|
-
active:
|
|
2255
|
-
delta:
|
|
2256
|
-
xy:
|
|
2257
|
-
event:
|
|
2258
|
-
first:
|
|
2259
|
-
last:
|
|
2260
|
-
} =
|
|
2261
|
-
if (!
|
|
2254
|
+
active: K,
|
|
2255
|
+
delta: W,
|
|
2256
|
+
xy: ne,
|
|
2257
|
+
event: Y,
|
|
2258
|
+
first: Z,
|
|
2259
|
+
last: Q
|
|
2260
|
+
} = F, O = l?.current;
|
|
2261
|
+
if (!O || Mo(Y?.target, h.current, f.current))
|
|
2262
2262
|
return;
|
|
2263
|
-
const
|
|
2264
|
-
|
|
2265
|
-
}, e[5] =
|
|
2266
|
-
const
|
|
2267
|
-
let
|
|
2268
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2263
|
+
const L = En(O, W, ne);
|
|
2264
|
+
Z ? u.current?.onstart?.(L) : Q ? u.current?.onend?.(L) : K && u.current?.onmove?.(L);
|
|
2265
|
+
}, e[5] = l, e[6] = y) : y = e[6];
|
|
2266
|
+
const E = i?.lockAxis === "x" ? "x" : void 0;
|
|
2267
|
+
let x;
|
|
2268
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (x = {
|
|
2269
2269
|
capture: !0
|
|
2270
|
-
}, e[7] =
|
|
2271
|
-
let
|
|
2272
|
-
e[8] !== s || e[9] !==
|
|
2270
|
+
}, e[7] = x) : x = e[7];
|
|
2271
|
+
let b;
|
|
2272
|
+
e[8] !== s || e[9] !== l || e[10] !== E ? (b = {
|
|
2273
2273
|
enabled: s,
|
|
2274
|
-
axis:
|
|
2275
|
-
pointer:
|
|
2276
|
-
target:
|
|
2274
|
+
axis: E,
|
|
2275
|
+
pointer: x,
|
|
2276
|
+
target: l,
|
|
2277
2277
|
threshold: 0
|
|
2278
|
-
}, e[8] = s, e[9] =
|
|
2279
|
-
let
|
|
2280
|
-
e[12] !==
|
|
2278
|
+
}, e[8] = s, e[9] = l, e[10] = E, e[11] = b) : b = e[11], wn(y, b);
|
|
2279
|
+
let g;
|
|
2280
|
+
e[12] !== l ? (g = (F) => {
|
|
2281
2281
|
const {
|
|
2282
|
-
active:
|
|
2283
|
-
delta:
|
|
2284
|
-
xy:
|
|
2285
|
-
first:
|
|
2286
|
-
last:
|
|
2287
|
-
} =
|
|
2288
|
-
if (!
|
|
2282
|
+
active: K,
|
|
2283
|
+
delta: W,
|
|
2284
|
+
xy: ne,
|
|
2285
|
+
first: Y,
|
|
2286
|
+
last: Z
|
|
2287
|
+
} = F, Q = l?.current;
|
|
2288
|
+
if (!Q)
|
|
2289
2289
|
return;
|
|
2290
|
-
const
|
|
2290
|
+
const O = En(Q, W, ne, {
|
|
2291
2291
|
left: !0
|
|
2292
2292
|
}, {
|
|
2293
|
-
left:
|
|
2293
|
+
left: W[0]
|
|
2294
2294
|
});
|
|
2295
|
-
|
|
2296
|
-
}, e[12] =
|
|
2297
|
-
let
|
|
2298
|
-
e[14] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2295
|
+
Y ? c.current?.onstart?.(O) : Z ? c.current?.onend?.(O) : K && c.current?.onmove?.(O);
|
|
2296
|
+
}, e[12] = l, e[13] = g) : g = e[13];
|
|
2297
|
+
let m;
|
|
2298
|
+
e[14] === Symbol.for("react.memo_cache_sentinel") ? (m = {
|
|
2299
2299
|
capture: !0
|
|
2300
|
-
}, e[14] =
|
|
2301
|
-
let
|
|
2302
|
-
e[15] !== o ? (
|
|
2300
|
+
}, e[14] = m) : m = e[14];
|
|
2301
|
+
let R;
|
|
2302
|
+
e[15] !== o ? (R = {
|
|
2303
2303
|
enabled: o,
|
|
2304
|
-
target:
|
|
2305
|
-
pointer:
|
|
2304
|
+
target: h,
|
|
2305
|
+
pointer: m,
|
|
2306
2306
|
threshold: 0
|
|
2307
|
-
}, e[15] = o, e[16] =
|
|
2308
|
-
let
|
|
2309
|
-
e[17] !==
|
|
2307
|
+
}, e[15] = o, e[16] = R) : R = e[16], wn(g, R);
|
|
2308
|
+
let _;
|
|
2309
|
+
e[17] !== l ? (_ = (F) => {
|
|
2310
2310
|
const {
|
|
2311
|
-
active:
|
|
2312
|
-
delta:
|
|
2313
|
-
xy:
|
|
2314
|
-
first:
|
|
2315
|
-
last:
|
|
2316
|
-
} =
|
|
2317
|
-
if (!
|
|
2311
|
+
active: K,
|
|
2312
|
+
delta: W,
|
|
2313
|
+
xy: ne,
|
|
2314
|
+
first: Y,
|
|
2315
|
+
last: Z
|
|
2316
|
+
} = F, Q = l?.current;
|
|
2317
|
+
if (!Q)
|
|
2318
2318
|
return;
|
|
2319
|
-
const
|
|
2319
|
+
const O = En(Q, W, ne, {
|
|
2320
2320
|
right: !0
|
|
2321
2321
|
}, {
|
|
2322
|
-
right:
|
|
2322
|
+
right: W[0]
|
|
2323
2323
|
});
|
|
2324
|
-
|
|
2325
|
-
}, e[17] =
|
|
2326
|
-
let
|
|
2327
|
-
e[19] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2324
|
+
Y ? c.current?.onstart?.(O) : Z ? c.current?.onend?.(O) : K && c.current?.onmove?.(O);
|
|
2325
|
+
}, e[17] = l, e[18] = _) : _ = e[18];
|
|
2326
|
+
let C;
|
|
2327
|
+
e[19] === Symbol.for("react.memo_cache_sentinel") ? (C = {
|
|
2328
2328
|
capture: !0
|
|
2329
|
-
}, e[19] =
|
|
2330
|
-
let
|
|
2331
|
-
e[20] !== o ? (
|
|
2329
|
+
}, e[19] = C) : C = e[19];
|
|
2330
|
+
let D;
|
|
2331
|
+
e[20] !== o ? (D = {
|
|
2332
2332
|
enabled: o,
|
|
2333
2333
|
target: f,
|
|
2334
|
-
pointer:
|
|
2334
|
+
pointer: C,
|
|
2335
2335
|
threshold: 0
|
|
2336
|
-
}, e[20] = o, e[21] =
|
|
2337
|
-
let
|
|
2338
|
-
e[22] !==
|
|
2339
|
-
const N = c?.current;
|
|
2340
|
-
if (!N)
|
|
2341
|
-
return;
|
|
2342
|
-
const B = l.current?.edges?.left, J = l.current?.edges?.right;
|
|
2343
|
-
B && (m.current = N.querySelector(B)), J && (f.current = N.querySelector(J));
|
|
2344
|
-
}, q = [c], e[22] = c, e[23] = I, e[24] = q) : (I = e[23], q = e[24]), sn(I, q);
|
|
2345
|
-
let G;
|
|
2346
|
-
e[25] !== s ? (G = s ? {
|
|
2336
|
+
}, e[20] = o, e[21] = D) : D = e[21], wn(_, D);
|
|
2337
|
+
let A;
|
|
2338
|
+
e[22] !== s ? (A = s ? {
|
|
2347
2339
|
touchAction: "none"
|
|
2348
|
-
} : {}, e[
|
|
2349
|
-
let
|
|
2350
|
-
e[
|
|
2351
|
-
...
|
|
2340
|
+
} : {}, e[22] = s, e[23] = A) : A = e[23];
|
|
2341
|
+
let w;
|
|
2342
|
+
e[24] !== r || e[25] !== A ? (w = {
|
|
2343
|
+
...A,
|
|
2352
2344
|
...r
|
|
2353
|
-
}, e[
|
|
2354
|
-
let
|
|
2355
|
-
return e[
|
|
2356
|
-
},
|
|
2345
|
+
}, e[24] = r, e[25] = A, e[26] = w) : w = e[26];
|
|
2346
|
+
let I;
|
|
2347
|
+
return e[27] !== t || e[28] !== l || e[29] !== w ? (I = /* @__PURE__ */ T.jsx(ro, { ref: l, style: w, draggable: !1, children: t }), e[27] = t, e[28] = l, e[29] = w, e[30] = I) : I = e[30], I;
|
|
2348
|
+
}, nr = tt.getLogger("[Snap Debug]").setLevel("info"), _e = (n, e = 0) => n ? parseFloat(n) : e, yn = (n, e, t, r = Number.MAX_SAFE_INTEGER) => {
|
|
2357
2349
|
let s = n, o = r;
|
|
2358
2350
|
for (const i of e) {
|
|
2359
|
-
const a = typeof i == "number" ? i : i.value,
|
|
2360
|
-
|
|
2351
|
+
const a = typeof i == "number" ? i : i.value, l = Math.abs(a - n);
|
|
2352
|
+
l < t && l < o && (s = a, o = l, typeof i == "object" ? nr.debug(`Snapped to: ${a} (Distance: ${l}) Row: ${i.rowId ?? "N/A"} Action: ${i.actionId ?? "N/A"}`) : nr.debug(`Snapped to: ${a} (Distance: ${l})`));
|
|
2361
2353
|
}
|
|
2362
2354
|
return {
|
|
2363
2355
|
snap: s,
|
|
2364
2356
|
minDis: o
|
|
2365
2357
|
};
|
|
2366
2358
|
};
|
|
2367
|
-
function
|
|
2368
|
-
const e =
|
|
2359
|
+
function kr(n) {
|
|
2360
|
+
const e = Ce.c(70), {
|
|
2369
2361
|
children: t,
|
|
2370
2362
|
edges: r,
|
|
2371
2363
|
left: s,
|
|
2372
2364
|
width: o,
|
|
2373
2365
|
start: i,
|
|
2374
2366
|
grid: a,
|
|
2375
|
-
getBounds:
|
|
2367
|
+
getBounds: l,
|
|
2376
2368
|
enableResizing: u,
|
|
2377
|
-
enableDragging:
|
|
2378
|
-
snapDistance:
|
|
2369
|
+
enableDragging: c,
|
|
2370
|
+
snapDistance: h,
|
|
2379
2371
|
snapPositions: f,
|
|
2380
2372
|
snapOrigin: p,
|
|
2381
2373
|
onResizeStart: S,
|
|
2382
|
-
onResize:
|
|
2383
|
-
onResizeEnd:
|
|
2384
|
-
onDragStart:
|
|
2374
|
+
onResize: y,
|
|
2375
|
+
onResizeEnd: E,
|
|
2376
|
+
onDragStart: x,
|
|
2385
2377
|
onDragEnd: b,
|
|
2386
|
-
onDrag:
|
|
2387
|
-
parentRef:
|
|
2378
|
+
onDrag: g,
|
|
2379
|
+
parentRef: m,
|
|
2388
2380
|
autoScroll: R,
|
|
2389
|
-
autoScrollSpeed:
|
|
2390
|
-
autoScrollMaxSpeed:
|
|
2391
|
-
ref:
|
|
2392
|
-
} = n,
|
|
2393
|
-
let
|
|
2394
|
-
e[0] !== f ? (
|
|
2395
|
-
const
|
|
2396
|
-
initAutoScroll:
|
|
2397
|
-
stopAutoScroll:
|
|
2398
|
-
dealDragAutoScroll:
|
|
2381
|
+
autoScrollSpeed: _,
|
|
2382
|
+
autoScrollMaxSpeed: C,
|
|
2383
|
+
ref: D
|
|
2384
|
+
} = n, A = i === void 0 ? ln : i, w = a === void 0 ? Rn : a, I = l === void 0 ? ko : l, F = u === void 0 ? !0 : u, K = c === void 0 ? !0 : c, W = h === void 0 ? nn : h;
|
|
2385
|
+
let ne;
|
|
2386
|
+
e[0] !== f ? (ne = f === void 0 ? [] : f, e[0] = f, e[1] = ne) : ne = e[1];
|
|
2387
|
+
const Y = ne, Z = p === void 0 ? "leading" : p, Q = R === void 0 ? !0 : R, O = ue(null), L = ue(0), d = ue(!1), {
|
|
2388
|
+
initAutoScroll: P,
|
|
2389
|
+
stopAutoScroll: N,
|
|
2390
|
+
dealDragAutoScroll: H,
|
|
2399
2391
|
dealResizeAutoScroll: he
|
|
2400
|
-
} =
|
|
2392
|
+
} = ds(m, _, C);
|
|
2401
2393
|
let pe;
|
|
2402
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (pe = (k,
|
|
2403
|
-
const
|
|
2404
|
-
if (!
|
|
2394
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (pe = (k, G) => {
|
|
2395
|
+
const z = G === void 0 ? !0 : G;
|
|
2396
|
+
if (!O.current)
|
|
2405
2397
|
return;
|
|
2406
|
-
|
|
2407
|
-
const
|
|
2408
|
-
|
|
2398
|
+
z && (L.current = 0);
|
|
2399
|
+
const U = O.current;
|
|
2400
|
+
U.style.setProperty("--translate-x", `${k}px`), U.dataset.left = String(k);
|
|
2409
2401
|
}, e[2] = pe) : pe = e[2];
|
|
2410
|
-
const
|
|
2411
|
-
let
|
|
2412
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2413
|
-
const
|
|
2414
|
-
if (!
|
|
2402
|
+
const B = pe;
|
|
2403
|
+
let J;
|
|
2404
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (J = (k, G) => {
|
|
2405
|
+
const z = G === void 0 ? !0 : G;
|
|
2406
|
+
if (!O.current)
|
|
2415
2407
|
return;
|
|
2416
|
-
|
|
2417
|
-
const
|
|
2418
|
-
|
|
2419
|
-
}, e[3] =
|
|
2420
|
-
const
|
|
2421
|
-
let
|
|
2422
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2423
|
-
const
|
|
2424
|
-
let
|
|
2425
|
-
e[5] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2426
|
-
const
|
|
2427
|
-
let
|
|
2428
|
-
e[6] !== o ? (
|
|
2429
|
-
if (!
|
|
2408
|
+
z && (L.current = 0);
|
|
2409
|
+
const U = O.current;
|
|
2410
|
+
U.style.width = `${k}px`, U.dataset.width = String(k);
|
|
2411
|
+
}, e[3] = J) : J = e[3];
|
|
2412
|
+
const $ = J;
|
|
2413
|
+
let re;
|
|
2414
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (re = () => O.current ? _e(O.current.dataset.left) : 0, e[4] = re) : re = e[4];
|
|
2415
|
+
const q = re;
|
|
2416
|
+
let V;
|
|
2417
|
+
e[5] === Symbol.for("react.memo_cache_sentinel") ? (V = () => O.current ? _e(O.current.dataset.width) : 0, e[5] = V) : V = e[5];
|
|
2418
|
+
const X = V;
|
|
2419
|
+
let it, at;
|
|
2420
|
+
e[6] !== o ? (it = () => {
|
|
2421
|
+
if (!O.current)
|
|
2430
2422
|
return;
|
|
2431
|
-
const k =
|
|
2432
|
-
|
|
2433
|
-
},
|
|
2423
|
+
const k = O.current;
|
|
2424
|
+
$(typeof o > "u" ? k.offsetWidth : o, !1);
|
|
2425
|
+
}, at = [o], e[6] = o, e[7] = it, e[8] = at) : (it = e[7], at = e[8]), Mt(it, at);
|
|
2434
2426
|
let je, Ne;
|
|
2435
2427
|
e[9] !== s ? (je = () => {
|
|
2436
|
-
|
|
2437
|
-
}, Ne = [s], e[9] = s, e[10] = je, e[11] = Ne) : (je = e[10], Ne = e[11]),
|
|
2428
|
+
B(s || 0, !1);
|
|
2429
|
+
}, Ne = [s], e[9] = s, e[10] = je, e[11] = Ne) : (je = e[10], Ne = e[11]), Mt(je, Ne);
|
|
2438
2430
|
let Pe;
|
|
2439
2431
|
e[12] === Symbol.for("react.memo_cache_sentinel") ? (Pe = () => ({
|
|
2440
|
-
updateLeft: (k) =>
|
|
2441
|
-
updateWidth: (k) =>
|
|
2442
|
-
getLeft:
|
|
2443
|
-
getWidth:
|
|
2444
|
-
}), e[12] = Pe) : Pe = e[12],
|
|
2432
|
+
updateLeft: (k) => B(k || 0, !1),
|
|
2433
|
+
updateWidth: (k) => $(k, !1),
|
|
2434
|
+
getLeft: q,
|
|
2435
|
+
getWidth: X
|
|
2436
|
+
}), e[12] = Pe) : Pe = e[12], ur(D, Pe);
|
|
2445
2437
|
let Fe;
|
|
2446
|
-
e[13] !==
|
|
2447
|
-
|
|
2448
|
-
}, e[13] =
|
|
2438
|
+
e[13] !== P || e[14] !== x ? (Fe = () => {
|
|
2439
|
+
L.current = 0, d.current = !1, P(), x?.();
|
|
2440
|
+
}, e[13] = P, e[14] = x, e[15] = Fe) : Fe = e[15];
|
|
2449
2441
|
const Ve = Fe;
|
|
2450
2442
|
let De;
|
|
2451
|
-
e[16] !== I || e[17] !==
|
|
2443
|
+
e[16] !== I || e[17] !== w || e[18] !== g || e[19] !== W || e[20] !== Z || e[21] !== Y || e[22] !== A ? (De = (k) => {
|
|
2452
2444
|
const {
|
|
2453
|
-
preLeft:
|
|
2454
|
-
preWidth:
|
|
2455
|
-
scrollDelta:
|
|
2445
|
+
preLeft: G,
|
|
2446
|
+
preWidth: z,
|
|
2447
|
+
scrollDelta: U
|
|
2456
2448
|
} = k;
|
|
2457
|
-
|
|
2458
|
-
const
|
|
2459
|
-
if (Math.abs(
|
|
2449
|
+
U && (L.current = L.current + U);
|
|
2450
|
+
const ae = d.current ? W : w;
|
|
2451
|
+
if (Math.abs(L.current) < ae)
|
|
2460
2452
|
return;
|
|
2461
|
-
const
|
|
2462
|
-
let
|
|
2463
|
-
const le =
|
|
2464
|
-
let M =
|
|
2465
|
-
|
|
2453
|
+
const oe = Math.trunc(L.current / ae);
|
|
2454
|
+
let j = G + oe * ae;
|
|
2455
|
+
const le = L.current > 0;
|
|
2456
|
+
let M = j;
|
|
2457
|
+
Z === "leading" ? M = le ? j + z : j : Z === "right" ? M = j + z : Z === "center" && (M = j + z / 2);
|
|
2466
2458
|
const {
|
|
2467
2459
|
snap: ee
|
|
2468
|
-
} =
|
|
2460
|
+
} = yn(M, Y, W);
|
|
2469
2461
|
if (ee !== M)
|
|
2470
|
-
d.current = !0,
|
|
2462
|
+
d.current = !0, Z === "leading" ? j = le ? ee - z : ee : Z === "right" ? j = ee - z : Z === "center" ? j = ee - z / 2 : j = ee;
|
|
2471
2463
|
else {
|
|
2472
|
-
const fe =
|
|
2473
|
-
fe %
|
|
2464
|
+
const fe = j - A;
|
|
2465
|
+
fe % w !== 0 && (j = A + w * Math.round(fe / w)), d.current = !1;
|
|
2474
2466
|
}
|
|
2475
|
-
|
|
2476
|
-
const
|
|
2477
|
-
|
|
2478
|
-
lastLeft:
|
|
2479
|
-
left:
|
|
2480
|
-
lastWidth:
|
|
2481
|
-
width:
|
|
2482
|
-
},
|
|
2483
|
-
}, e[16] = I, e[17] =
|
|
2467
|
+
L.current = L.current % ae;
|
|
2468
|
+
const ce = I();
|
|
2469
|
+
j < ce.left ? j = ce.left : j + z > ce.right && (j = ce.right - z), !(g && g({
|
|
2470
|
+
lastLeft: G,
|
|
2471
|
+
left: j,
|
|
2472
|
+
lastWidth: z,
|
|
2473
|
+
width: z
|
|
2474
|
+
}, U) === !1) && B(j, !1);
|
|
2475
|
+
}, e[16] = I, e[17] = w, e[18] = g, e[19] = W, e[20] = Z, e[21] = Y, e[22] = A, e[23] = De) : De = e[23];
|
|
2484
2476
|
const Ie = De;
|
|
2485
2477
|
let lt;
|
|
2486
|
-
e[24] !==
|
|
2487
|
-
const
|
|
2488
|
-
|
|
2489
|
-
if (!
|
|
2478
|
+
e[24] !== Q || e[25] !== H || e[26] !== Ie || e[27] !== m ? (lt = (k) => {
|
|
2479
|
+
const G = k.target, z = _e(G.dataset.left), U = _e(G.dataset.width);
|
|
2480
|
+
L.current = L.current + k.dx, !(Q && m?.current && !H(k, (j) => {
|
|
2481
|
+
if (!m?.current || !O.current)
|
|
2490
2482
|
return;
|
|
2491
|
-
|
|
2492
|
-
const le =
|
|
2483
|
+
m.current.scrollLeft = m.current.scrollLeft + j;
|
|
2484
|
+
const le = O.current, M = _e(le.dataset.left), ee = _e(le.dataset.width);
|
|
2493
2485
|
Ie({
|
|
2494
2486
|
preLeft: M,
|
|
2495
2487
|
preWidth: ee,
|
|
2496
|
-
scrollDelta:
|
|
2488
|
+
scrollDelta: j
|
|
2497
2489
|
});
|
|
2498
2490
|
})) && Ie({
|
|
2499
|
-
preLeft:
|
|
2500
|
-
preWidth:
|
|
2491
|
+
preLeft: z,
|
|
2492
|
+
preWidth: U
|
|
2501
2493
|
});
|
|
2502
|
-
}, e[24] =
|
|
2494
|
+
}, e[24] = Q, e[25] = H, e[26] = Ie, e[27] = m, e[28] = lt) : lt = e[28];
|
|
2503
2495
|
const It = lt;
|
|
2504
2496
|
let ke;
|
|
2505
|
-
e[29] !== b || e[30] !==
|
|
2506
|
-
|
|
2507
|
-
const
|
|
2497
|
+
e[29] !== b || e[30] !== N ? (ke = (k) => {
|
|
2498
|
+
L.current = 0, d.current = !1, N();
|
|
2499
|
+
const G = k.target;
|
|
2508
2500
|
b?.({
|
|
2509
|
-
left: _e(
|
|
2510
|
-
width: _e(
|
|
2501
|
+
left: _e(G.dataset.left),
|
|
2502
|
+
width: _e(G.dataset.width)
|
|
2511
2503
|
});
|
|
2512
|
-
}, e[29] = b, e[30] =
|
|
2504
|
+
}, e[29] = b, e[30] = N, e[31] = ke) : ke = e[31];
|
|
2513
2505
|
const ye = ke;
|
|
2514
2506
|
let We;
|
|
2515
|
-
e[32] !==
|
|
2516
|
-
|
|
2517
|
-
const
|
|
2518
|
-
S?.(
|
|
2519
|
-
}, e[32] =
|
|
2507
|
+
e[32] !== P || e[33] !== S ? (We = (k) => {
|
|
2508
|
+
L.current = 0, d.current = !1, P();
|
|
2509
|
+
const G = k.edges?.right ? "right" : "left";
|
|
2510
|
+
S?.(G);
|
|
2511
|
+
}, e[32] = P, e[33] = S, e[34] = We) : We = e[34];
|
|
2520
2512
|
const Ue = We;
|
|
2521
2513
|
let $e;
|
|
2522
|
-
e[35] !== I || e[36] !==
|
|
2514
|
+
e[35] !== I || e[36] !== w || e[37] !== y || e[38] !== W || e[39] !== Y || e[40] !== A ? ($e = (k) => {
|
|
2523
2515
|
const {
|
|
2524
|
-
dir:
|
|
2525
|
-
preWidth:
|
|
2526
|
-
preLeft:
|
|
2527
|
-
scrollDelta:
|
|
2516
|
+
dir: G,
|
|
2517
|
+
preWidth: z,
|
|
2518
|
+
preLeft: U,
|
|
2519
|
+
scrollDelta: ae
|
|
2528
2520
|
} = k;
|
|
2529
|
-
|
|
2530
|
-
const
|
|
2531
|
-
if (Math.abs(
|
|
2521
|
+
ae && (L.current = L.current + ae);
|
|
2522
|
+
const oe = d.current ? W : w;
|
|
2523
|
+
if (Math.abs(L.current) < oe)
|
|
2532
2524
|
return;
|
|
2533
|
-
const
|
|
2534
|
-
if (
|
|
2535
|
-
const le = Math.trunc(
|
|
2536
|
-
let M =
|
|
2525
|
+
const j = I();
|
|
2526
|
+
if (G === "left") {
|
|
2527
|
+
const le = Math.trunc(L.current / oe);
|
|
2528
|
+
let M = U + le * oe;
|
|
2537
2529
|
const {
|
|
2538
2530
|
snap: ee
|
|
2539
|
-
} =
|
|
2531
|
+
} = yn(M, Y, W);
|
|
2540
2532
|
if (ee !== M)
|
|
2541
2533
|
d.current = !0, M = ee;
|
|
2542
2534
|
else {
|
|
2543
|
-
const Ee = M -
|
|
2544
|
-
Ee %
|
|
2535
|
+
const Ee = M - A;
|
|
2536
|
+
Ee % w !== 0 && (M = A + w * Math.round(Ee / w)), d.current = !1;
|
|
2545
2537
|
}
|
|
2546
|
-
|
|
2547
|
-
const
|
|
2548
|
-
if (M >=
|
|
2549
|
-
lastLeft:
|
|
2550
|
-
lastWidth:
|
|
2538
|
+
L.current = L.current % oe, M < j.left && (M = j.left);
|
|
2539
|
+
const ce = U + z, fe = ce - M;
|
|
2540
|
+
if (M >= ce || y && y("left", {
|
|
2541
|
+
lastLeft: U,
|
|
2542
|
+
lastWidth: z,
|
|
2551
2543
|
left: M,
|
|
2552
2544
|
width: fe
|
|
2553
2545
|
}) === !1)
|
|
2554
2546
|
return;
|
|
2555
|
-
|
|
2547
|
+
B(M, !1), $(fe, !1);
|
|
2556
2548
|
} else {
|
|
2557
|
-
const le = Math.trunc(
|
|
2558
|
-
let M =
|
|
2559
|
-
const ee =
|
|
2560
|
-
snap:
|
|
2561
|
-
} =
|
|
2562
|
-
if (
|
|
2563
|
-
d.current = !0, M =
|
|
2549
|
+
const le = Math.trunc(L.current / oe);
|
|
2550
|
+
let M = z + le * oe;
|
|
2551
|
+
const ee = U + M, {
|
|
2552
|
+
snap: ce
|
|
2553
|
+
} = yn(ee, Y, W);
|
|
2554
|
+
if (ce !== ee)
|
|
2555
|
+
d.current = !0, M = ce - U;
|
|
2564
2556
|
else {
|
|
2565
|
-
let fe =
|
|
2566
|
-
const Ee = fe -
|
|
2567
|
-
Ee %
|
|
2557
|
+
let fe = U + M;
|
|
2558
|
+
const Ee = fe - A;
|
|
2559
|
+
Ee % w !== 0 && (fe = A + w * Math.round(Ee / w), M = fe - U), d.current = !1;
|
|
2568
2560
|
}
|
|
2569
|
-
if (
|
|
2570
|
-
lastLeft:
|
|
2571
|
-
lastWidth:
|
|
2572
|
-
left:
|
|
2561
|
+
if (L.current = L.current % oe, U + M > j.right && (M = j.right - U), M <= 0 || y && y("right", {
|
|
2562
|
+
lastLeft: U,
|
|
2563
|
+
lastWidth: z,
|
|
2564
|
+
left: U,
|
|
2573
2565
|
width: M
|
|
2574
2566
|
}) === !1)
|
|
2575
2567
|
return;
|
|
2576
|
-
|
|
2568
|
+
$(M, !1);
|
|
2577
2569
|
}
|
|
2578
|
-
}, e[35] = I, e[36] =
|
|
2570
|
+
}, e[35] = I, e[36] = w, e[37] = y, e[38] = W, e[39] = Y, e[40] = A, e[41] = $e) : $e = e[41];
|
|
2579
2571
|
const ze = $e;
|
|
2580
2572
|
let Te;
|
|
2581
|
-
e[42] !==
|
|
2582
|
-
const
|
|
2583
|
-
|
|
2584
|
-
if (!
|
|
2573
|
+
e[42] !== Q || e[43] !== he || e[44] !== m || e[45] !== ze ? (Te = (k) => {
|
|
2574
|
+
const G = k.target, z = k.edges?.left ? "left" : "right", U = _e(G.dataset.left), ae = _e(G.dataset.width);
|
|
2575
|
+
L.current = L.current + (z === "left" ? k.deltaRect?.left || 0 : k.deltaRect?.right || 0), !(Q && m?.current && !he(k, z, (le) => {
|
|
2576
|
+
if (!m?.current || !O.current)
|
|
2585
2577
|
return;
|
|
2586
|
-
|
|
2587
|
-
const M =
|
|
2578
|
+
m.current.scrollLeft = m.current.scrollLeft + le;
|
|
2579
|
+
const M = O.current, ee = _e(M.dataset.left), ce = _e(M.dataset.width);
|
|
2588
2580
|
ze({
|
|
2589
2581
|
preLeft: ee,
|
|
2590
|
-
preWidth:
|
|
2591
|
-
dir:
|
|
2582
|
+
preWidth: ce,
|
|
2583
|
+
dir: z,
|
|
2592
2584
|
scrollDelta: le
|
|
2593
2585
|
});
|
|
2594
2586
|
})) && ze({
|
|
2595
|
-
preLeft:
|
|
2596
|
-
preWidth:
|
|
2597
|
-
dir:
|
|
2587
|
+
preLeft: U,
|
|
2588
|
+
preWidth: ae,
|
|
2589
|
+
dir: z
|
|
2598
2590
|
});
|
|
2599
|
-
}, e[42] =
|
|
2591
|
+
}, e[42] = Q, e[43] = he, e[44] = m, e[45] = ze, e[46] = Te) : Te = e[46];
|
|
2600
2592
|
const He = Te;
|
|
2601
2593
|
let Be;
|
|
2602
|
-
e[47] !==
|
|
2603
|
-
|
|
2604
|
-
const
|
|
2605
|
-
|
|
2606
|
-
left: _e(
|
|
2607
|
-
width: _e(
|
|
2594
|
+
e[47] !== E || e[48] !== N ? (Be = (k) => {
|
|
2595
|
+
L.current = 0, d.current = !1, N();
|
|
2596
|
+
const G = k.target, z = k.edges?.right ? "right" : "left";
|
|
2597
|
+
E?.(z, {
|
|
2598
|
+
left: _e(G.dataset.left),
|
|
2599
|
+
width: _e(G.dataset.width)
|
|
2608
2600
|
});
|
|
2609
|
-
}, e[47] =
|
|
2601
|
+
}, e[47] = E, e[48] = N, e[49] = Be) : Be = e[49];
|
|
2610
2602
|
const Ye = Be, nt = s || 0, Xe = `${s || 0}px`;
|
|
2611
2603
|
let Ke;
|
|
2612
2604
|
e[50] !== Xe || e[51] !== o ? (Ke = {
|
|
@@ -2614,365 +2606,375 @@ function Pr(n) {
|
|
|
2614
2606
|
transform: "translateX(var(--translate-x)) scaleX(var(--scale-x,1))",
|
|
2615
2607
|
width: o
|
|
2616
2608
|
}, e[50] = Xe, e[51] = o, e[52] = Ke) : Ke = e[52];
|
|
2617
|
-
const
|
|
2609
|
+
const Ge = Ke;
|
|
2618
2610
|
let Le;
|
|
2619
2611
|
e[53] !== It || e[54] !== Ve || e[55] !== ye ? (Le = {
|
|
2620
2612
|
lockAxis: "x",
|
|
2621
2613
|
onmove: It,
|
|
2622
2614
|
onstart: Ve,
|
|
2623
2615
|
onend: ye,
|
|
2624
|
-
cursorChecker:
|
|
2616
|
+
cursorChecker: Io
|
|
2625
2617
|
}, 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 ? (
|
|
2618
|
+
let Ae;
|
|
2619
|
+
e[57] !== r || e[58] !== He || e[59] !== Ue || e[60] !== Ye ? (Ae = {
|
|
2628
2620
|
axis: "x",
|
|
2629
2621
|
invert: "none",
|
|
2630
2622
|
edges: r,
|
|
2631
2623
|
onmove: He,
|
|
2632
2624
|
onstart: Ue,
|
|
2633
2625
|
onend: Ye
|
|
2634
|
-
}, e[57] = r, e[58] = He, e[59] = Ue, e[60] = Ye, e[61] =
|
|
2635
|
-
let
|
|
2636
|
-
return e[62] !== t || e[63] !==
|
|
2626
|
+
}, e[57] = r, e[58] = He, e[59] = Ue, e[60] = Ye, e[61] = Ae) : Ae = e[61];
|
|
2627
|
+
let qe;
|
|
2628
|
+
return e[62] !== t || e[63] !== K || e[64] !== F || e[65] !== nt || e[66] !== Ge || e[67] !== Le || e[68] !== Ae ? (qe = /* @__PURE__ */ T.jsx(No, { "data-left": nt, style: Ge, ref: O, draggable: K, resizable: F, draggableOptions: Le, resizableOptions: Ae, children: t }), e[62] = t, e[63] = K, e[64] = F, e[65] = nt, e[66] = Ge, e[67] = Le, e[68] = Ae, e[69] = qe) : qe = e[69], qe;
|
|
2637
2629
|
}
|
|
2638
|
-
function
|
|
2630
|
+
function Io() {
|
|
2639
2631
|
return "";
|
|
2640
2632
|
}
|
|
2641
|
-
function
|
|
2633
|
+
function ko() {
|
|
2642
2634
|
return {
|
|
2643
2635
|
left: Number.MIN_SAFE_INTEGER,
|
|
2644
2636
|
right: Number.MAX_SAFE_INTEGER
|
|
2645
2637
|
};
|
|
2646
2638
|
}
|
|
2647
|
-
function
|
|
2639
|
+
function rr() {
|
|
2648
2640
|
let n = 0, e, t = "", r = arguments.length;
|
|
2649
2641
|
for (; n < r; n++)
|
|
2650
2642
|
(e = arguments[n]) && typeof e == "string" && (t += (t && " ") + e);
|
|
2651
2643
|
return t;
|
|
2652
2644
|
}
|
|
2653
|
-
const
|
|
2654
|
-
const e =
|
|
2645
|
+
const Wo = (n) => {
|
|
2646
|
+
const e = Ce.c(204), {
|
|
2655
2647
|
editorData: t,
|
|
2656
2648
|
row: r,
|
|
2657
2649
|
action: s,
|
|
2658
2650
|
effects: o,
|
|
2659
2651
|
rowHeight: i,
|
|
2660
2652
|
scale: a,
|
|
2661
|
-
scaleWidth:
|
|
2653
|
+
scaleWidth: l,
|
|
2662
2654
|
scaleSplitCount: u,
|
|
2663
|
-
startLeft:
|
|
2664
|
-
gridSnap:
|
|
2655
|
+
startLeft: c,
|
|
2656
|
+
gridSnap: h,
|
|
2665
2657
|
disableDrag: f,
|
|
2666
2658
|
autoScroll: p,
|
|
2667
2659
|
autoScrollSpeed: S,
|
|
2668
|
-
autoScrollMaxSpeed:
|
|
2669
|
-
scaleCount:
|
|
2670
|
-
maxScaleCount:
|
|
2660
|
+
autoScrollMaxSpeed: y,
|
|
2661
|
+
scaleCount: E,
|
|
2662
|
+
maxScaleCount: x,
|
|
2671
2663
|
setScaleCount: b,
|
|
2672
|
-
onActionMoveStart:
|
|
2673
|
-
onActionMoving:
|
|
2664
|
+
onActionMoveStart: g,
|
|
2665
|
+
onActionMoving: m,
|
|
2674
2666
|
onActionMoveEnd: R,
|
|
2675
|
-
onActionResizeStart:
|
|
2676
|
-
onActionResizeEnd:
|
|
2677
|
-
onActionResizing:
|
|
2678
|
-
snapData:
|
|
2679
|
-
setEditorData:
|
|
2667
|
+
onActionResizeStart: _,
|
|
2668
|
+
onActionResizeEnd: C,
|
|
2669
|
+
onActionResizing: D,
|
|
2670
|
+
snapData: A,
|
|
2671
|
+
setEditorData: w,
|
|
2680
2672
|
onClickAction: I,
|
|
2681
|
-
onClickActionOnly:
|
|
2682
|
-
onDoubleClickAction:
|
|
2683
|
-
onContextMenuAction:
|
|
2684
|
-
getActionRender:
|
|
2685
|
-
handleTime:
|
|
2686
|
-
scrollContainerRef:
|
|
2687
|
-
} = n,
|
|
2688
|
-
id:
|
|
2673
|
+
onClickActionOnly: F,
|
|
2674
|
+
onDoubleClickAction: K,
|
|
2675
|
+
onContextMenuAction: W,
|
|
2676
|
+
getActionRender: ne,
|
|
2677
|
+
handleTime: Y,
|
|
2678
|
+
scrollContainerRef: Z
|
|
2679
|
+
} = n, Q = ue(null), O = ue(!1), {
|
|
2680
|
+
id: L,
|
|
2689
2681
|
maxEnd: d,
|
|
2690
|
-
minStart:
|
|
2691
|
-
end:
|
|
2692
|
-
start:
|
|
2682
|
+
minStart: P,
|
|
2683
|
+
end: N,
|
|
2684
|
+
start: H,
|
|
2693
2685
|
selected: he,
|
|
2694
2686
|
flexible: pe,
|
|
2695
|
-
movable:
|
|
2696
|
-
effectId:
|
|
2697
|
-
} = s,
|
|
2687
|
+
movable: B,
|
|
2688
|
+
effectId: J
|
|
2689
|
+
} = s, $ = pe === void 0 ? !0 : pe, re = B === void 0 ? !0 : B, q = a ?? en, V = l ?? tn, X = c ?? ln, it = u ?? fr, at = x ?? Number.MAX_SAFE_INTEGER, je = P || 0;
|
|
2698
2690
|
let Ne;
|
|
2699
|
-
e[0] !==
|
|
2700
|
-
startLeft:
|
|
2701
|
-
scale:
|
|
2702
|
-
scaleWidth:
|
|
2703
|
-
}), e[0] =
|
|
2691
|
+
e[0] !== q || e[1] !== V || e[2] !== X || e[3] !== je ? (Ne = Oe(je, {
|
|
2692
|
+
startLeft: X,
|
|
2693
|
+
scale: q,
|
|
2694
|
+
scaleWidth: V
|
|
2695
|
+
}), e[0] = q, e[1] = V, e[2] = X, e[3] = je, e[4] = Ne) : Ne = e[4];
|
|
2704
2696
|
const Pe = Ne, Fe = d || Number.MAX_VALUE;
|
|
2705
2697
|
let Ve;
|
|
2706
|
-
e[5] !==
|
|
2707
|
-
startLeft:
|
|
2708
|
-
scale:
|
|
2709
|
-
scaleWidth:
|
|
2710
|
-
}), e[5] =
|
|
2711
|
-
const De = Math.min(
|
|
2698
|
+
e[5] !== q || e[6] !== V || e[7] !== X || e[8] !== Fe ? (Ve = Oe(Fe, {
|
|
2699
|
+
startLeft: X,
|
|
2700
|
+
scale: q,
|
|
2701
|
+
scaleWidth: V
|
|
2702
|
+
}), e[5] = q, e[6] = V, e[7] = X, e[8] = Fe, e[9] = Ve) : Ve = e[9];
|
|
2703
|
+
const De = Math.min(at * V + X, Ve);
|
|
2712
2704
|
let Ie;
|
|
2713
|
-
e[10] !==
|
|
2714
|
-
start:
|
|
2715
|
-
end:
|
|
2705
|
+
e[10] !== N || e[11] !== q || e[12] !== V || e[13] !== X || e[14] !== H ? (Ie = Cn({
|
|
2706
|
+
start: H,
|
|
2707
|
+
end: N
|
|
2716
2708
|
}, {
|
|
2717
|
-
startLeft:
|
|
2718
|
-
scale:
|
|
2719
|
-
scaleWidth:
|
|
2720
|
-
}), e[10] =
|
|
2721
|
-
const lt = Ie, [It, ke] = jt(null), ye = It ?? lt, We =
|
|
2709
|
+
startLeft: X,
|
|
2710
|
+
scale: q,
|
|
2711
|
+
scaleWidth: V
|
|
2712
|
+
}), e[10] = N, e[11] = q, e[12] = V, e[13] = X, e[14] = H, e[15] = Ie) : Ie = e[15];
|
|
2713
|
+
const lt = Ie, [It, ke] = jt(null), ye = It ?? lt, We = V / it;
|
|
2722
2714
|
let Ue;
|
|
2723
|
-
e[16] !==
|
|
2715
|
+
e[16] !== J || e[17] !== o || e[18] !== $ || e[19] !== re || e[20] !== he ? (Ue = ge(rr("action", re && "action-movable", he && "action-selected", $ && "action-flexible", o[J] && `action-effect-${J}`)), e[16] = J, e[17] = o, e[18] = $, e[19] = re, e[20] = he, e[21] = Ue) : Ue = e[21];
|
|
2724
2716
|
const $e = Ue;
|
|
2725
2717
|
let ze;
|
|
2726
|
-
e[22] !==
|
|
2727
|
-
const
|
|
2728
|
-
startLeft:
|
|
2729
|
-
scaleCount:
|
|
2730
|
-
scaleWidth:
|
|
2718
|
+
e[22] !== V || e[23] !== X || e[24] !== E || e[25] !== b ? (ze = (be, Se) => {
|
|
2719
|
+
const se = Br(be + Se, {
|
|
2720
|
+
startLeft: X,
|
|
2721
|
+
scaleCount: E,
|
|
2722
|
+
scaleWidth: V
|
|
2731
2723
|
});
|
|
2732
|
-
|
|
2733
|
-
}, e[22] =
|
|
2724
|
+
se !== E && b(se);
|
|
2725
|
+
}, e[22] = V, e[23] = X, e[24] = E, e[25] = b, e[26] = ze) : ze = e[26];
|
|
2734
2726
|
const Te = ze;
|
|
2735
2727
|
let He;
|
|
2736
|
-
e[27] !== s || e[28] !==
|
|
2737
|
-
|
|
2728
|
+
e[27] !== s || e[28] !== g || e[29] !== r ? (He = () => {
|
|
2729
|
+
g && g({
|
|
2738
2730
|
action: s,
|
|
2739
2731
|
row: r
|
|
2740
2732
|
});
|
|
2741
|
-
}, e[27] = s, e[28] =
|
|
2733
|
+
}, e[27] = s, e[28] = g, e[29] = r, e[30] = He) : He = e[30];
|
|
2742
2734
|
const Be = He;
|
|
2743
2735
|
let Ye;
|
|
2744
|
-
e[31] !== s || e[32] !== Te || e[33] !==
|
|
2736
|
+
e[31] !== s || e[32] !== Te || e[33] !== m || e[34] !== r || e[35] !== q || e[36] !== V || e[37] !== X ? (Ye = (be) => {
|
|
2745
2737
|
const {
|
|
2746
2738
|
left: Se,
|
|
2747
|
-
width:
|
|
2739
|
+
width: se
|
|
2748
2740
|
} = be;
|
|
2749
|
-
if (
|
|
2741
|
+
if (O.current = !0, m) {
|
|
2750
2742
|
const {
|
|
2751
2743
|
start: me,
|
|
2752
|
-
end:
|
|
2744
|
+
end: ie
|
|
2753
2745
|
} = kt({
|
|
2754
2746
|
left: Se,
|
|
2755
|
-
width:
|
|
2747
|
+
width: se
|
|
2756
2748
|
}, {
|
|
2757
|
-
scaleWidth:
|
|
2758
|
-
scale:
|
|
2759
|
-
startLeft:
|
|
2749
|
+
scaleWidth: V,
|
|
2750
|
+
scale: q,
|
|
2751
|
+
startLeft: X
|
|
2760
2752
|
});
|
|
2761
|
-
if (
|
|
2753
|
+
if (m({
|
|
2762
2754
|
action: s,
|
|
2763
2755
|
row: r,
|
|
2764
2756
|
start: me,
|
|
2765
|
-
end:
|
|
2757
|
+
end: ie
|
|
2766
2758
|
}) === !1)
|
|
2767
2759
|
return !1;
|
|
2768
2760
|
}
|
|
2769
2761
|
ke({
|
|
2770
2762
|
left: Se,
|
|
2771
|
-
width:
|
|
2772
|
-
}), Te(Se,
|
|
2773
|
-
}, e[31] = s, e[32] = Te, e[33] =
|
|
2763
|
+
width: se
|
|
2764
|
+
}), Te(Se, se);
|
|
2765
|
+
}, e[31] = s, e[32] = Te, e[33] = m, e[34] = r, e[35] = q, e[36] = V, e[37] = X, e[38] = Ye) : Ye = e[38];
|
|
2774
2766
|
const nt = Ye;
|
|
2775
2767
|
let Xe;
|
|
2776
|
-
e[39] !== t || e[40] !==
|
|
2768
|
+
e[39] !== t || e[40] !== L || e[41] !== R || e[42] !== r || e[43] !== q || e[44] !== V || e[45] !== X || e[46] !== w ? (Xe = (be) => {
|
|
2777
2769
|
const {
|
|
2778
2770
|
left: Se,
|
|
2779
|
-
width:
|
|
2771
|
+
width: se
|
|
2780
2772
|
} = be, {
|
|
2781
2773
|
start: me,
|
|
2782
|
-
end:
|
|
2774
|
+
end: ie
|
|
2783
2775
|
} = kt({
|
|
2784
2776
|
left: Se,
|
|
2785
|
-
width:
|
|
2777
|
+
width: se
|
|
2786
2778
|
}, {
|
|
2787
|
-
scaleWidth:
|
|
2788
|
-
scale:
|
|
2789
|
-
startLeft:
|
|
2779
|
+
scaleWidth: V,
|
|
2780
|
+
scale: q,
|
|
2781
|
+
startLeft: X
|
|
2790
2782
|
}), de = t.find((et) => et.id === r.id);
|
|
2791
2783
|
if (!de)
|
|
2792
2784
|
return;
|
|
2793
|
-
const Qe = de.actions.find((et) => et.id ===
|
|
2794
|
-
Qe && (Qe.start = me, Qe.end =
|
|
2785
|
+
const Qe = de.actions.find((et) => et.id === L);
|
|
2786
|
+
Qe && (Qe.start = me, Qe.end = ie, w([...t]), R && R({
|
|
2795
2787
|
action: Qe,
|
|
2796
2788
|
row: r,
|
|
2797
2789
|
start: me,
|
|
2798
|
-
end:
|
|
2790
|
+
end: ie
|
|
2799
2791
|
}), ke(null));
|
|
2800
|
-
}, e[39] = t, e[40] =
|
|
2792
|
+
}, e[39] = t, e[40] = L, e[41] = R, e[42] = r, e[43] = q, e[44] = V, e[45] = X, e[46] = w, e[47] = Xe) : Xe = e[47];
|
|
2801
2793
|
const Ke = Xe;
|
|
2802
|
-
let
|
|
2803
|
-
e[48] !== s || e[49] !==
|
|
2804
|
-
|
|
2794
|
+
let Ge;
|
|
2795
|
+
e[48] !== s || e[49] !== _ || e[50] !== r ? (Ge = (be) => {
|
|
2796
|
+
_ && _({
|
|
2805
2797
|
action: s,
|
|
2806
2798
|
row: r,
|
|
2807
2799
|
dir: be
|
|
2808
2800
|
});
|
|
2809
|
-
}, e[48] = s, e[49] =
|
|
2810
|
-
const Le =
|
|
2811
|
-
let
|
|
2812
|
-
e[52] !== s || e[53] !== Te || e[54] !==
|
|
2801
|
+
}, e[48] = s, e[49] = _, e[50] = r, e[51] = Ge) : Ge = e[51];
|
|
2802
|
+
const Le = Ge;
|
|
2803
|
+
let Ae;
|
|
2804
|
+
e[52] !== s || e[53] !== Te || e[54] !== D || e[55] !== r || e[56] !== q || e[57] !== V || e[58] !== X ? (Ae = (be, Se) => {
|
|
2813
2805
|
const {
|
|
2814
|
-
left:
|
|
2806
|
+
left: se,
|
|
2815
2807
|
width: me
|
|
2816
2808
|
} = Se;
|
|
2817
|
-
if (
|
|
2809
|
+
if (O.current = !0, D) {
|
|
2818
2810
|
const {
|
|
2819
|
-
start:
|
|
2811
|
+
start: ie,
|
|
2820
2812
|
end: de
|
|
2821
2813
|
} = kt({
|
|
2822
|
-
left:
|
|
2814
|
+
left: se,
|
|
2823
2815
|
width: me
|
|
2824
2816
|
}, {
|
|
2825
|
-
scaleWidth:
|
|
2826
|
-
scale:
|
|
2827
|
-
startLeft:
|
|
2817
|
+
scaleWidth: V,
|
|
2818
|
+
scale: q,
|
|
2819
|
+
startLeft: X
|
|
2828
2820
|
});
|
|
2829
|
-
if (
|
|
2821
|
+
if (D({
|
|
2830
2822
|
action: s,
|
|
2831
2823
|
row: r,
|
|
2832
|
-
start:
|
|
2824
|
+
start: ie,
|
|
2833
2825
|
end: de,
|
|
2834
2826
|
dir: be
|
|
2835
2827
|
}) === !1)
|
|
2836
2828
|
return !1;
|
|
2837
2829
|
}
|
|
2838
2830
|
ke({
|
|
2839
|
-
left:
|
|
2831
|
+
left: se,
|
|
2840
2832
|
width: me
|
|
2841
|
-
}), Te(
|
|
2842
|
-
}, e[52] = s, e[53] = Te, e[54] =
|
|
2843
|
-
const
|
|
2833
|
+
}), Te(se, me);
|
|
2834
|
+
}, e[52] = s, e[53] = Te, e[54] = D, e[55] = r, e[56] = q, e[57] = V, e[58] = X, e[59] = Ae) : Ae = e[59];
|
|
2835
|
+
const qe = Ae;
|
|
2844
2836
|
let k;
|
|
2845
|
-
e[60] !== t || e[61] !==
|
|
2837
|
+
e[60] !== t || e[61] !== L || e[62] !== C || e[63] !== r || e[64] !== q || e[65] !== V || e[66] !== X || e[67] !== w ? (k = (be, Se) => {
|
|
2846
2838
|
const {
|
|
2847
|
-
left:
|
|
2839
|
+
left: se,
|
|
2848
2840
|
width: me
|
|
2849
2841
|
} = Se, {
|
|
2850
|
-
start:
|
|
2842
|
+
start: ie,
|
|
2851
2843
|
end: de
|
|
2852
2844
|
} = kt({
|
|
2853
|
-
left:
|
|
2845
|
+
left: se,
|
|
2854
2846
|
width: me
|
|
2855
2847
|
}, {
|
|
2856
|
-
scaleWidth:
|
|
2857
|
-
scale:
|
|
2858
|
-
startLeft:
|
|
2859
|
-
}), Qe = t.find((
|
|
2848
|
+
scaleWidth: V,
|
|
2849
|
+
scale: q,
|
|
2850
|
+
startLeft: X
|
|
2851
|
+
}), Qe = t.find((gn) => gn.id === r.id);
|
|
2860
2852
|
if (!Qe)
|
|
2861
2853
|
return;
|
|
2862
|
-
const et = Qe.actions.find((
|
|
2863
|
-
et && (et.start =
|
|
2854
|
+
const et = Qe.actions.find((gn) => gn.id === L);
|
|
2855
|
+
et && (et.start = ie, et.end = de, w([...t]), C && C({
|
|
2864
2856
|
action: et,
|
|
2865
2857
|
row: r,
|
|
2866
|
-
start:
|
|
2858
|
+
start: ie,
|
|
2867
2859
|
end: de,
|
|
2868
2860
|
dir: be
|
|
2869
2861
|
}), ke(null));
|
|
2870
|
-
}, e[60] = t, e[61] =
|
|
2871
|
-
const
|
|
2872
|
-
let
|
|
2873
|
-
if (e[69] !== s || e[70] !== p || e[71] !==
|
|
2862
|
+
}, e[60] = t, e[61] = L, e[62] = C, e[63] = r, e[64] = q, e[65] = V, e[66] = X, e[67] = w, e[68] = k) : k = e[68];
|
|
2863
|
+
const G = k;
|
|
2864
|
+
let z, U, ae, oe, j, le, M, ee, ce, fe, Ee, ct, ut, ft, dt, ht, Je, Ze, mt, pt, gt, vt, bt, St, _t, wt, Et, yt, xt;
|
|
2865
|
+
if (e[69] !== s || e[70] !== p || e[71] !== y || e[72] !== S || e[73] !== $e || e[74] !== f || e[75] !== $ || e[76] !== ne || e[77] !== We || e[78] !== h || e[79] !== nt || e[80] !== Ke || e[81] !== Be || e[82] !== G || e[83] !== Le || e[84] !== qe || e[85] !== Y || e[86] !== Pe || e[87] !== re || e[88] !== I || e[89] !== F || e[90] !== W || e[91] !== K || e[92] !== De || e[93] !== r || e[94] !== i || e[95] !== q || e[96] !== V || e[97] !== X || e[98] !== Z || e[99] !== A.assistPositions || e[100] !== ye.left || e[101] !== ye.width) {
|
|
2874
2866
|
const be = {
|
|
2875
2867
|
...s,
|
|
2876
2868
|
...kt({
|
|
2877
2869
|
left: ye.left,
|
|
2878
2870
|
width: ye.width
|
|
2879
2871
|
}, {
|
|
2880
|
-
startLeft:
|
|
2881
|
-
scaleWidth:
|
|
2882
|
-
scale:
|
|
2872
|
+
startLeft: X,
|
|
2873
|
+
scaleWidth: V,
|
|
2874
|
+
scale: q
|
|
2883
2875
|
})
|
|
2884
2876
|
}, Se = {
|
|
2885
2877
|
...r,
|
|
2886
2878
|
actions: [...r.actions]
|
|
2887
2879
|
};
|
|
2888
|
-
r.actions.includes(s) && (Se.actions[r.actions.indexOf(s)] = be),
|
|
2880
|
+
r.actions.includes(s) && (Se.actions[r.actions.indexOf(s)] = be), z = kr, ce = Q, fe = Z, Ee = X, ct = ye.left, ut = ye.width, ft = h && We || Rn, dt = h ? Math.max((We || Rn) / 2, nn) : nn, ht = A.assistPositions, e[131] !== Pe || e[132] !== De ? (Je = () => ({
|
|
2889
2881
|
left: Pe,
|
|
2890
2882
|
right: De
|
|
2891
2883
|
}), e[131] = Pe, e[132] = De, e[133] = Je) : Je = e[133];
|
|
2892
|
-
let
|
|
2893
|
-
e[134] !== f || e[135] !==
|
|
2884
|
+
let se;
|
|
2885
|
+
e[134] !== f || e[135] !== $ ? (se = !f && $ && `.${ge("action-left-stretch")}`, e[134] = f, e[135] = $, e[136] = se) : se = e[136];
|
|
2894
2886
|
let me;
|
|
2895
|
-
e[137] !== f || e[138] !==
|
|
2896
|
-
left:
|
|
2887
|
+
e[137] !== f || e[138] !== $ ? (me = !f && $ && `.${ge("action-right-stretch")}`, e[137] = f, e[138] = $, e[139] = me) : me = e[139], e[140] !== se || e[141] !== me ? (Ze = {
|
|
2888
|
+
left: se,
|
|
2897
2889
|
right: me
|
|
2898
|
-
}, e[140] =
|
|
2899
|
-
|
|
2900
|
-
}, e[143] =
|
|
2890
|
+
}, e[140] = se, e[141] = me, e[142] = Ze) : Ze = e[142], mt = !f && re, pt = !f && $, gt = Be, vt = nt, bt = Ke, St = Le, _t = qe, wt = G, Et = p, yt = S, xt = y, e[143] === Symbol.for("react.memo_cache_sentinel") ? (U = () => {
|
|
2891
|
+
O.current = !1;
|
|
2892
|
+
}, e[143] = U) : U = e[143], e[144] !== s || e[145] !== Y || e[146] !== I || e[147] !== F || e[148] !== r ? (ae = (ie) => {
|
|
2901
2893
|
let de;
|
|
2902
|
-
I && (de =
|
|
2894
|
+
I && (de = Y(ie), I(ie, {
|
|
2903
2895
|
row: r,
|
|
2904
2896
|
action: s,
|
|
2905
2897
|
time: de
|
|
2906
|
-
})), !
|
|
2898
|
+
})), !O.current && F && (de === void 0 && (de = Y(ie)), F(ie, {
|
|
2907
2899
|
row: r,
|
|
2908
2900
|
action: s,
|
|
2909
2901
|
time: de
|
|
2910
2902
|
}));
|
|
2911
|
-
}, e[144] = s, e[145] =
|
|
2912
|
-
if (
|
|
2913
|
-
const de =
|
|
2914
|
-
|
|
2903
|
+
}, e[144] = s, e[145] = Y, e[146] = I, e[147] = F, e[148] = r, e[149] = ae) : ae = e[149], e[150] !== s || e[151] !== Y || e[152] !== K || e[153] !== r ? (oe = (ie) => {
|
|
2904
|
+
if (K) {
|
|
2905
|
+
const de = Y(ie);
|
|
2906
|
+
K(ie, {
|
|
2915
2907
|
row: r,
|
|
2916
2908
|
action: s,
|
|
2917
2909
|
time: de
|
|
2918
2910
|
});
|
|
2919
2911
|
}
|
|
2920
|
-
}, e[150] = s, e[151] =
|
|
2921
|
-
if (
|
|
2922
|
-
const de =
|
|
2923
|
-
|
|
2912
|
+
}, e[150] = s, e[151] = Y, e[152] = K, e[153] = r, e[154] = oe) : oe = e[154], e[155] !== s || e[156] !== Y || e[157] !== W || e[158] !== r ? (j = (ie) => {
|
|
2913
|
+
if (W) {
|
|
2914
|
+
const de = Y(ie);
|
|
2915
|
+
W(ie, {
|
|
2924
2916
|
row: r,
|
|
2925
2917
|
action: s,
|
|
2926
2918
|
time: de
|
|
2927
2919
|
});
|
|
2928
2920
|
}
|
|
2929
|
-
}, e[155] = s, e[156] =
|
|
2921
|
+
}, e[155] = s, e[156] = Y, e[157] = W, e[158] = r, e[159] = j) : j = e[159], le = $e, e[160] !== i ? (M = {
|
|
2930
2922
|
height: i
|
|
2931
|
-
}, e[160] = i, e[161] = M) : M = e[161], ee =
|
|
2923
|
+
}, e[160] = i, e[161] = M) : M = e[161], ee = ne && ne(be, Se), e[69] = s, e[70] = p, e[71] = y, e[72] = S, e[73] = $e, e[74] = f, e[75] = $, e[76] = ne, e[77] = We, e[78] = h, e[79] = nt, e[80] = Ke, e[81] = Be, e[82] = G, e[83] = Le, e[84] = qe, e[85] = Y, e[86] = Pe, e[87] = re, e[88] = I, e[89] = F, e[90] = W, e[91] = K, e[92] = De, e[93] = r, e[94] = i, e[95] = q, e[96] = V, e[97] = X, e[98] = Z, e[99] = A.assistPositions, e[100] = ye.left, e[101] = ye.width, e[102] = z, e[103] = U, e[104] = ae, e[105] = oe, e[106] = j, e[107] = le, e[108] = M, e[109] = ee, e[110] = ce, e[111] = fe, e[112] = Ee, e[113] = ct, e[114] = ut, e[115] = ft, e[116] = dt, e[117] = ht, e[118] = Je, e[119] = Ze, e[120] = mt, e[121] = pt, e[122] = gt, e[123] = vt, e[124] = bt, e[125] = St, e[126] = _t, e[127] = wt, e[128] = Et, e[129] = yt, e[130] = xt;
|
|
2932
2924
|
} else
|
|
2933
|
-
|
|
2925
|
+
z = e[102], U = e[103], ae = e[104], oe = e[105], j = e[106], le = e[107], M = e[108], ee = e[109], ce = e[110], fe = e[111], Ee = e[112], ct = e[113], ut = e[114], ft = e[115], dt = e[116], ht = e[117], Je = e[118], Ze = e[119], mt = 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];
|
|
2926
|
+
let Ht;
|
|
2927
|
+
e[162] === Symbol.for("react.memo_cache_sentinel") ? (Ht = rr(ge("action-left-stretch")), e[162] = Ht) : Ht = e[162];
|
|
2928
|
+
const dn = $ ? "visible" : "hidden", hn = $ ? "auto" : "none";
|
|
2929
|
+
let Rt;
|
|
2930
|
+
e[163] !== dn || e[164] !== hn ? (Rt = /* @__PURE__ */ T.jsx("div", { className: Ht, style: {
|
|
2931
|
+
touchAction: "none",
|
|
2932
|
+
visibility: dn,
|
|
2933
|
+
pointerEvents: hn
|
|
2934
|
+
} }), e[163] = dn, e[164] = hn, e[165] = Rt) : Rt = e[165];
|
|
2935
|
+
let Bt;
|
|
2936
|
+
e[166] === Symbol.for("react.memo_cache_sentinel") ? (Bt = ge("action-right-stretch"), e[166] = Bt) : Bt = e[166];
|
|
2937
|
+
const mn = $ ? "visible" : "hidden", pn = $ ? "auto" : "none";
|
|
2934
2938
|
let Tt;
|
|
2935
|
-
e[
|
|
2936
|
-
touchAction: "none"
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
e[
|
|
2940
|
-
touchAction: "none"
|
|
2941
|
-
} }), e[164] = j, e[165] = Ct) : Ct = e[165];
|
|
2939
|
+
e[167] !== mn || e[168] !== pn ? (Tt = /* @__PURE__ */ T.jsx("div", { className: Bt, style: {
|
|
2940
|
+
touchAction: "none",
|
|
2941
|
+
visibility: mn,
|
|
2942
|
+
pointerEvents: pn
|
|
2943
|
+
} }), e[167] = mn, e[168] = pn, e[169] = Tt) : Tt = e[169];
|
|
2942
2944
|
let At;
|
|
2943
|
-
e[
|
|
2945
|
+
e[170] !== U || e[171] !== ae || e[172] !== oe || e[173] !== j || e[174] !== le || e[175] !== M || e[176] !== ee || e[177] !== Rt || e[178] !== Tt ? (At = /* @__PURE__ */ T.jsxs("div", { onMouseDown: U, onClick: ae, onDoubleClick: oe, onContextMenu: j, className: le, style: M, children: [
|
|
2944
2946
|
ee,
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
] }), e[
|
|
2948
|
-
let
|
|
2949
|
-
return e[
|
|
2947
|
+
Rt,
|
|
2948
|
+
Tt
|
|
2949
|
+
] }), e[170] = U, e[171] = ae, e[172] = oe, e[173] = j, e[174] = le, e[175] = M, e[176] = ee, e[177] = Rt, e[178] = Tt, e[179] = At) : At = e[179];
|
|
2950
|
+
let Yt;
|
|
2951
|
+
return e[180] !== z || e[181] !== ce || e[182] !== fe || e[183] !== Ee || e[184] !== ct || e[185] !== ut || e[186] !== ft || e[187] !== dt || e[188] !== ht || e[189] !== Je || e[190] !== Ze || e[191] !== mt || e[192] !== pt || e[193] !== gt || e[194] !== vt || e[195] !== bt || e[196] !== St || e[197] !== _t || e[198] !== wt || e[199] !== Et || e[200] !== yt || e[201] !== xt || e[202] !== At ? (Yt = /* @__PURE__ */ T.jsx(z, { ref: ce, parentRef: fe, start: Ee, left: ct, width: ut, grid: ft, snapDistance: dt, snapPositions: ht, getBounds: Je, edges: Ze, enableDragging: mt, enableResizing: pt, onDragStart: gt, onDrag: vt, onDragEnd: bt, onResizeStart: St, onResize: _t, onResizeEnd: wt, autoScroll: Et, autoScrollSpeed: yt, autoScrollMaxSpeed: xt, children: At }), e[180] = z, e[181] = ce, e[182] = fe, e[183] = Ee, e[184] = ct, e[185] = ut, e[186] = ft, e[187] = dt, e[188] = ht, e[189] = Je, e[190] = Ze, e[191] = mt, e[192] = pt, e[193] = gt, e[194] = vt, e[195] = bt, e[196] = St, e[197] = _t, e[198] = wt, e[199] = Et, e[200] = yt, e[201] = xt, e[202] = At, e[203] = Yt) : Yt = e[203], Yt;
|
|
2950
2952
|
};
|
|
2951
|
-
function
|
|
2953
|
+
function Pt(n, e, t) {
|
|
2952
2954
|
let r = t.initialDeps ?? [], s;
|
|
2953
2955
|
function o() {
|
|
2954
|
-
var i, a,
|
|
2955
|
-
let
|
|
2956
|
-
t.key && ((i = t.debug) != null && i.call(t)) && (
|
|
2957
|
-
const
|
|
2958
|
-
if (!(
|
|
2956
|
+
var i, a, l, u;
|
|
2957
|
+
let c;
|
|
2958
|
+
t.key && ((i = t.debug) != null && i.call(t)) && (c = Date.now());
|
|
2959
|
+
const h = n();
|
|
2960
|
+
if (!(h.length !== r.length || h.some((S, y) => r[y] !== S)))
|
|
2959
2961
|
return s;
|
|
2960
|
-
r =
|
|
2962
|
+
r = h;
|
|
2961
2963
|
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() -
|
|
2964
|
-
for (b = String(b); b.length <
|
|
2964
|
+
if (t.key && ((a = t.debug) != null && a.call(t)) && (p = Date.now()), s = e(...h), t.key && ((l = t.debug) != null && l.call(t))) {
|
|
2965
|
+
const S = Math.round((Date.now() - c) * 100) / 100, y = Math.round((Date.now() - p) * 100) / 100, E = y / 16, x = (b, g) => {
|
|
2966
|
+
for (b = String(b); b.length < g; )
|
|
2965
2967
|
b = " " + b;
|
|
2966
2968
|
return b;
|
|
2967
2969
|
};
|
|
2968
2970
|
console.info(
|
|
2969
|
-
`%c⏱ ${
|
|
2971
|
+
`%c⏱ ${x(y, 5)} /${x(S, 5)} ms`,
|
|
2970
2972
|
`
|
|
2971
2973
|
font-size: .6rem;
|
|
2972
2974
|
font-weight: bold;
|
|
2973
2975
|
color: hsl(${Math.max(
|
|
2974
2976
|
0,
|
|
2975
|
-
Math.min(120 - 120 *
|
|
2977
|
+
Math.min(120 - 120 * E, 120)
|
|
2976
2978
|
)}deg 100% 31%);`,
|
|
2977
2979
|
t?.key
|
|
2978
2980
|
);
|
|
@@ -2983,25 +2985,25 @@ function Dt(n, e, t) {
|
|
|
2983
2985
|
r = i;
|
|
2984
2986
|
}, o;
|
|
2985
2987
|
}
|
|
2986
|
-
function
|
|
2988
|
+
function sr(n, e) {
|
|
2987
2989
|
if (n === void 0)
|
|
2988
2990
|
throw new Error("Unexpected undefined");
|
|
2989
2991
|
return n;
|
|
2990
2992
|
}
|
|
2991
|
-
const
|
|
2993
|
+
const zo = (n, e) => Math.abs(n - e) < 1.01, jo = (n, e, t) => {
|
|
2992
2994
|
let r;
|
|
2993
2995
|
return function(...s) {
|
|
2994
2996
|
n.clearTimeout(r), r = n.setTimeout(() => e.apply(this, s), t);
|
|
2995
2997
|
};
|
|
2996
|
-
},
|
|
2998
|
+
}, or = (n) => {
|
|
2997
2999
|
const { offsetWidth: e, offsetHeight: t } = n;
|
|
2998
3000
|
return { width: e, height: t };
|
|
2999
|
-
},
|
|
3001
|
+
}, Fo = (n) => n, Vo = (n) => {
|
|
3000
3002
|
const e = Math.max(n.startIndex - n.overscan, 0), t = Math.min(n.endIndex + n.overscan, n.count - 1), r = [];
|
|
3001
3003
|
for (let s = e; s <= t; s++)
|
|
3002
3004
|
r.push(s);
|
|
3003
3005
|
return r;
|
|
3004
|
-
},
|
|
3006
|
+
}, Uo = (n, e) => {
|
|
3005
3007
|
const t = n.scrollElement;
|
|
3006
3008
|
if (!t)
|
|
3007
3009
|
return;
|
|
@@ -3009,32 +3011,32 @@ const Oo = (n, e) => Math.abs(n - e) < 1.01, Mo = (n, e, t) => {
|
|
|
3009
3011
|
if (!r)
|
|
3010
3012
|
return;
|
|
3011
3013
|
const s = (i) => {
|
|
3012
|
-
const { width: a, height:
|
|
3013
|
-
e({ width: Math.round(a), height: Math.round(
|
|
3014
|
+
const { width: a, height: l } = i;
|
|
3015
|
+
e({ width: Math.round(a), height: Math.round(l) });
|
|
3014
3016
|
};
|
|
3015
|
-
if (s(
|
|
3017
|
+
if (s(or(t)), !r.ResizeObserver)
|
|
3016
3018
|
return () => {
|
|
3017
3019
|
};
|
|
3018
3020
|
const o = new r.ResizeObserver((i) => {
|
|
3019
3021
|
const a = () => {
|
|
3020
|
-
const
|
|
3021
|
-
if (
|
|
3022
|
-
const u =
|
|
3022
|
+
const l = i[0];
|
|
3023
|
+
if (l?.borderBoxSize) {
|
|
3024
|
+
const u = l.borderBoxSize[0];
|
|
3023
3025
|
if (u) {
|
|
3024
3026
|
s({ width: u.inlineSize, height: u.blockSize });
|
|
3025
3027
|
return;
|
|
3026
3028
|
}
|
|
3027
3029
|
}
|
|
3028
|
-
s(
|
|
3030
|
+
s(or(t));
|
|
3029
3031
|
};
|
|
3030
3032
|
n.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(a) : a();
|
|
3031
3033
|
});
|
|
3032
3034
|
return o.observe(t, { box: "border-box" }), () => {
|
|
3033
3035
|
o.unobserve(t);
|
|
3034
3036
|
};
|
|
3035
|
-
},
|
|
3037
|
+
}, ir = {
|
|
3036
3038
|
passive: !0
|
|
3037
|
-
},
|
|
3039
|
+
}, ar = typeof window > "u" ? !0 : "onscrollend" in window, $o = (n, e) => {
|
|
3038
3040
|
const t = n.scrollElement;
|
|
3039
3041
|
if (!t)
|
|
3040
3042
|
return;
|
|
@@ -3042,23 +3044,23 @@ const Oo = (n, e) => Math.abs(n - e) < 1.01, Mo = (n, e, t) => {
|
|
|
3042
3044
|
if (!r)
|
|
3043
3045
|
return;
|
|
3044
3046
|
let s = 0;
|
|
3045
|
-
const o = n.options.useScrollendEvent &&
|
|
3046
|
-
} :
|
|
3047
|
+
const o = n.options.useScrollendEvent && ar ? () => {
|
|
3048
|
+
} : jo(
|
|
3047
3049
|
r,
|
|
3048
3050
|
() => {
|
|
3049
3051
|
e(s, !1);
|
|
3050
3052
|
},
|
|
3051
3053
|
n.options.isScrollingResetDelay
|
|
3052
|
-
), i = (
|
|
3053
|
-
const { horizontal:
|
|
3054
|
-
s =
|
|
3055
|
-
}, a = i(!0),
|
|
3056
|
-
|
|
3057
|
-
const u = n.options.useScrollendEvent &&
|
|
3058
|
-
return u && t.addEventListener("scrollend",
|
|
3059
|
-
t.removeEventListener("scroll", a), u && t.removeEventListener("scrollend",
|
|
3054
|
+
), i = (c) => () => {
|
|
3055
|
+
const { horizontal: h, isRtl: f } = n.options;
|
|
3056
|
+
s = h ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, o(), e(s, c);
|
|
3057
|
+
}, a = i(!0), l = i(!1);
|
|
3058
|
+
l(), t.addEventListener("scroll", a, ir);
|
|
3059
|
+
const u = n.options.useScrollendEvent && ar;
|
|
3060
|
+
return u && t.addEventListener("scrollend", l, ir), () => {
|
|
3061
|
+
t.removeEventListener("scroll", a), u && t.removeEventListener("scrollend", l);
|
|
3060
3062
|
};
|
|
3061
|
-
},
|
|
3063
|
+
}, Ho = (n, e, t) => {
|
|
3062
3064
|
if (e?.borderBoxSize) {
|
|
3063
3065
|
const r = e.borderBoxSize[0];
|
|
3064
3066
|
if (r)
|
|
@@ -3067,7 +3069,7 @@ const Oo = (n, e) => Math.abs(n - e) < 1.01, Mo = (n, e, t) => {
|
|
|
3067
3069
|
);
|
|
3068
3070
|
}
|
|
3069
3071
|
return n[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
3070
|
-
},
|
|
3072
|
+
}, Bo = (n, {
|
|
3071
3073
|
adjustments: e = 0,
|
|
3072
3074
|
behavior: t
|
|
3073
3075
|
}, r) => {
|
|
@@ -3078,7 +3080,7 @@ const Oo = (n, e) => Math.abs(n - e) < 1.01, Mo = (n, e, t) => {
|
|
|
3078
3080
|
behavior: t
|
|
3079
3081
|
});
|
|
3080
3082
|
};
|
|
3081
|
-
class
|
|
3083
|
+
class Yo {
|
|
3082
3084
|
constructor(e) {
|
|
3083
3085
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
3084
3086
|
let t = null;
|
|
@@ -3116,11 +3118,11 @@ class Fo {
|
|
|
3116
3118
|
scrollPaddingStart: 0,
|
|
3117
3119
|
scrollPaddingEnd: 0,
|
|
3118
3120
|
horizontal: !1,
|
|
3119
|
-
getItemKey:
|
|
3120
|
-
rangeExtractor:
|
|
3121
|
+
getItemKey: Fo,
|
|
3122
|
+
rangeExtractor: Vo,
|
|
3121
3123
|
onChange: () => {
|
|
3122
3124
|
},
|
|
3123
|
-
measureElement:
|
|
3125
|
+
measureElement: Ho,
|
|
3124
3126
|
initialRect: { width: 0, height: 0 },
|
|
3125
3127
|
scrollMargin: 0,
|
|
3126
3128
|
gap: 0,
|
|
@@ -3137,7 +3139,7 @@ class Fo {
|
|
|
3137
3139
|
}, this.notify = (t) => {
|
|
3138
3140
|
var r, s;
|
|
3139
3141
|
(s = (r = this.options).onChange) == null || s.call(r, this, t);
|
|
3140
|
-
}, this.maybeNotify =
|
|
3142
|
+
}, this.maybeNotify = Pt(
|
|
3141
3143
|
() => (this.calculateRange(), [
|
|
3142
3144
|
this.isScrolling,
|
|
3143
3145
|
this.range ? this.range.startIndex : null,
|
|
@@ -3188,14 +3190,14 @@ class Fo {
|
|
|
3188
3190
|
const a = t[i];
|
|
3189
3191
|
if (s.has(a.lane))
|
|
3190
3192
|
continue;
|
|
3191
|
-
const
|
|
3193
|
+
const l = o.get(
|
|
3192
3194
|
a.lane
|
|
3193
3195
|
);
|
|
3194
|
-
if (
|
|
3196
|
+
if (l == null || a.end > l.end ? o.set(a.lane, a) : a.end < l.end && s.set(a.lane, !0), s.size === this.options.lanes)
|
|
3195
3197
|
break;
|
|
3196
3198
|
}
|
|
3197
3199
|
return o.size === this.options.lanes ? Array.from(o.values()).sort((i, a) => i.end === a.end ? i.index - a.index : i.end - a.end)[0] : void 0;
|
|
3198
|
-
}, this.getMeasurementOptions =
|
|
3200
|
+
}, this.getMeasurementOptions = Pt(
|
|
3199
3201
|
() => [
|
|
3200
3202
|
this.options.count,
|
|
3201
3203
|
this.options.paddingStart,
|
|
@@ -3213,26 +3215,26 @@ class Fo {
|
|
|
3213
3215
|
{
|
|
3214
3216
|
key: !1
|
|
3215
3217
|
}
|
|
3216
|
-
), this.getMeasurements =
|
|
3218
|
+
), this.getMeasurements = Pt(
|
|
3217
3219
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
3218
3220
|
({ count: t, paddingStart: r, scrollMargin: s, getItemKey: o, enabled: i }, a) => {
|
|
3219
3221
|
if (!i)
|
|
3220
3222
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
3221
|
-
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((
|
|
3222
|
-
this.itemSizeCache.set(
|
|
3223
|
+
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((c) => {
|
|
3224
|
+
this.itemSizeCache.set(c.key, c.size);
|
|
3223
3225
|
}));
|
|
3224
|
-
const
|
|
3226
|
+
const l = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
3225
3227
|
this.pendingMeasuredCacheIndexes = [];
|
|
3226
|
-
const u = this.measurementsCache.slice(0,
|
|
3227
|
-
for (let
|
|
3228
|
-
const
|
|
3229
|
-
u[
|
|
3230
|
-
index:
|
|
3228
|
+
const u = this.measurementsCache.slice(0, l);
|
|
3229
|
+
for (let c = l; c < t; c++) {
|
|
3230
|
+
const h = o(c), f = this.options.lanes === 1 ? u[c - 1] : this.getFurthestMeasurement(u, c), p = f ? f.end + this.options.gap : r + s, S = a.get(h), y = typeof S == "number" ? S : this.options.estimateSize(c), E = p + y, x = f ? f.lane : c % this.options.lanes;
|
|
3231
|
+
u[c] = {
|
|
3232
|
+
index: c,
|
|
3231
3233
|
start: p,
|
|
3232
|
-
size:
|
|
3233
|
-
end:
|
|
3234
|
-
key:
|
|
3235
|
-
lane:
|
|
3234
|
+
size: y,
|
|
3235
|
+
end: E,
|
|
3236
|
+
key: h,
|
|
3237
|
+
lane: x
|
|
3236
3238
|
};
|
|
3237
3239
|
}
|
|
3238
3240
|
return this.measurementsCache = u, u;
|
|
@@ -3241,14 +3243,14 @@ class Fo {
|
|
|
3241
3243
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
3242
3244
|
debug: () => this.options.debug
|
|
3243
3245
|
}
|
|
3244
|
-
), this.calculateRange =
|
|
3246
|
+
), this.calculateRange = Pt(
|
|
3245
3247
|
() => [
|
|
3246
3248
|
this.getMeasurements(),
|
|
3247
3249
|
this.getSize(),
|
|
3248
3250
|
this.getScrollOffset(),
|
|
3249
3251
|
this.options.lanes
|
|
3250
3252
|
],
|
|
3251
|
-
(t, r, s, o) => this.range = t.length > 0 && r > 0 ?
|
|
3253
|
+
(t, r, s, o) => this.range = t.length > 0 && r > 0 ? Xo({
|
|
3252
3254
|
measurements: t,
|
|
3253
3255
|
outerSize: r,
|
|
3254
3256
|
scrollOffset: s,
|
|
@@ -3258,7 +3260,7 @@ class Fo {
|
|
|
3258
3260
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
3259
3261
|
debug: () => this.options.debug
|
|
3260
3262
|
}
|
|
3261
|
-
), this.getVirtualIndexes =
|
|
3263
|
+
), this.getVirtualIndexes = Pt(
|
|
3262
3264
|
() => {
|
|
3263
3265
|
let t = null, r = null;
|
|
3264
3266
|
const s = this.calculateRange();
|
|
@@ -3308,13 +3310,13 @@ class Fo {
|
|
|
3308
3310
|
return;
|
|
3309
3311
|
}
|
|
3310
3312
|
this._measureElement(t, void 0);
|
|
3311
|
-
}, this.getVirtualItems =
|
|
3313
|
+
}, this.getVirtualItems = Pt(
|
|
3312
3314
|
() => [this.getVirtualIndexes(), this.getMeasurements()],
|
|
3313
3315
|
(t, r) => {
|
|
3314
3316
|
const s = [];
|
|
3315
3317
|
for (let o = 0, i = t.length; o < i; o++) {
|
|
3316
|
-
const a = t[o],
|
|
3317
|
-
s.push(
|
|
3318
|
+
const a = t[o], l = r[a];
|
|
3319
|
+
s.push(l);
|
|
3318
3320
|
}
|
|
3319
3321
|
return s;
|
|
3320
3322
|
},
|
|
@@ -3325,11 +3327,11 @@ class Fo {
|
|
|
3325
3327
|
), this.getVirtualItemForOffset = (t) => {
|
|
3326
3328
|
const r = this.getMeasurements();
|
|
3327
3329
|
if (r.length !== 0)
|
|
3328
|
-
return
|
|
3329
|
-
r[
|
|
3330
|
+
return sr(
|
|
3331
|
+
r[Wr(
|
|
3330
3332
|
0,
|
|
3331
3333
|
r.length - 1,
|
|
3332
|
-
(s) =>
|
|
3334
|
+
(s) => sr(r[s]).start,
|
|
3333
3335
|
t
|
|
3334
3336
|
)]
|
|
3335
3337
|
);
|
|
@@ -3370,21 +3372,21 @@ class Fo {
|
|
|
3370
3372
|
let o = 0;
|
|
3371
3373
|
const i = 10, a = (u) => {
|
|
3372
3374
|
if (!this.targetWindow) return;
|
|
3373
|
-
const
|
|
3374
|
-
if (!
|
|
3375
|
+
const c = this.getOffsetForIndex(t, u);
|
|
3376
|
+
if (!c) {
|
|
3375
3377
|
console.warn("Failed to get offset for index:", t);
|
|
3376
3378
|
return;
|
|
3377
3379
|
}
|
|
3378
|
-
const [
|
|
3379
|
-
this._scrollToOffset(
|
|
3380
|
+
const [h, f] = c;
|
|
3381
|
+
this._scrollToOffset(h, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
|
|
3380
3382
|
const p = this.getScrollOffset(), S = this.getOffsetForIndex(t, f);
|
|
3381
3383
|
if (!S) {
|
|
3382
3384
|
console.warn("Failed to get offset for index:", t);
|
|
3383
3385
|
return;
|
|
3384
3386
|
}
|
|
3385
|
-
|
|
3387
|
+
zo(S[0], p) || l(f);
|
|
3386
3388
|
});
|
|
3387
|
-
},
|
|
3389
|
+
}, l = (u) => {
|
|
3388
3390
|
this.targetWindow && (o++, o < i ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", o, i), this.targetWindow.requestAnimationFrame(() => a(u))) : console.warn(
|
|
3389
3391
|
`Failed to scroll to index ${t} after ${i} attempts.`
|
|
3390
3392
|
));
|
|
@@ -3428,7 +3430,7 @@ class Fo {
|
|
|
3428
3430
|
}, this.setOptions(e);
|
|
3429
3431
|
}
|
|
3430
3432
|
}
|
|
3431
|
-
const
|
|
3433
|
+
const Wr = (n, e, t, r) => {
|
|
3432
3434
|
for (; n <= e; ) {
|
|
3433
3435
|
const s = (n + e) / 2 | 0, o = t(s);
|
|
3434
3436
|
if (o < r)
|
|
@@ -3440,19 +3442,19 @@ const Dr = (n, e, t, r) => {
|
|
|
3440
3442
|
}
|
|
3441
3443
|
return n > 0 ? n - 1 : 0;
|
|
3442
3444
|
};
|
|
3443
|
-
function
|
|
3445
|
+
function Xo({
|
|
3444
3446
|
measurements: n,
|
|
3445
3447
|
outerSize: e,
|
|
3446
3448
|
scrollOffset: t,
|
|
3447
3449
|
lanes: r
|
|
3448
3450
|
}) {
|
|
3449
|
-
const s = n.length - 1, o = (
|
|
3451
|
+
const s = n.length - 1, o = (l) => n[l].start;
|
|
3450
3452
|
if (n.length <= r)
|
|
3451
3453
|
return {
|
|
3452
3454
|
startIndex: 0,
|
|
3453
3455
|
endIndex: s
|
|
3454
3456
|
};
|
|
3455
|
-
let i =
|
|
3457
|
+
let i = Wr(
|
|
3456
3458
|
0,
|
|
3457
3459
|
s,
|
|
3458
3460
|
o,
|
|
@@ -3462,42 +3464,42 @@ function Vo({
|
|
|
3462
3464
|
for (; a < s && n[a].end < t + e; )
|
|
3463
3465
|
a++;
|
|
3464
3466
|
else if (r > 1) {
|
|
3465
|
-
const
|
|
3466
|
-
for (; a < s &&
|
|
3467
|
-
const
|
|
3468
|
-
c
|
|
3467
|
+
const l = Array(r).fill(0);
|
|
3468
|
+
for (; a < s && l.some((c) => c < t + e); ) {
|
|
3469
|
+
const c = n[a];
|
|
3470
|
+
l[c.lane] = c.end, a++;
|
|
3469
3471
|
}
|
|
3470
3472
|
const u = Array(r).fill(t + e);
|
|
3471
|
-
for (; i >= 0 && u.some((
|
|
3472
|
-
const
|
|
3473
|
-
u[
|
|
3473
|
+
for (; i >= 0 && u.some((c) => c >= t); ) {
|
|
3474
|
+
const c = n[i];
|
|
3475
|
+
u[c.lane] = c.start, i--;
|
|
3474
3476
|
}
|
|
3475
3477
|
i = Math.max(0, i - i % r), a = Math.min(s, a + (r - 1 - a % r));
|
|
3476
3478
|
}
|
|
3477
3479
|
return { startIndex: i, endIndex: a };
|
|
3478
3480
|
}
|
|
3479
|
-
const
|
|
3480
|
-
function
|
|
3481
|
-
const e =
|
|
3481
|
+
const lr = typeof document < "u" ? v.useLayoutEffect : v.useEffect;
|
|
3482
|
+
function Ko(n) {
|
|
3483
|
+
const e = v.useReducer(() => ({}), {})[1], t = {
|
|
3482
3484
|
...n,
|
|
3483
3485
|
onChange: (s, o) => {
|
|
3484
3486
|
var i;
|
|
3485
|
-
o ?
|
|
3487
|
+
o ? Kr(e) : e(), (i = n.onChange) == null || i.call(n, s, o);
|
|
3486
3488
|
}
|
|
3487
|
-
}, [r] =
|
|
3488
|
-
() => new
|
|
3489
|
+
}, [r] = v.useState(
|
|
3490
|
+
() => new Yo(t)
|
|
3489
3491
|
);
|
|
3490
|
-
return r.setOptions(t),
|
|
3492
|
+
return r.setOptions(t), lr(() => r._didMount(), []), lr(() => r._willUpdate()), r;
|
|
3491
3493
|
}
|
|
3492
|
-
function
|
|
3493
|
-
return
|
|
3494
|
-
observeElementRect:
|
|
3495
|
-
observeElementOffset:
|
|
3496
|
-
scrollToFn:
|
|
3494
|
+
function zr(n) {
|
|
3495
|
+
return Ko({
|
|
3496
|
+
observeElementRect: Uo,
|
|
3497
|
+
observeElementOffset: $o,
|
|
3498
|
+
scrollToFn: Bo,
|
|
3497
3499
|
...n
|
|
3498
3500
|
});
|
|
3499
3501
|
}
|
|
3500
|
-
const
|
|
3502
|
+
const Go = (n) => {
|
|
3501
3503
|
const {
|
|
3502
3504
|
rowData: e,
|
|
3503
3505
|
style: t = {},
|
|
@@ -3506,133 +3508,133 @@ const $o = (n) => {
|
|
|
3506
3508
|
onContextMenuRow: o,
|
|
3507
3509
|
scrollContainerRef: i,
|
|
3508
3510
|
startLeft: a,
|
|
3509
|
-
scale:
|
|
3511
|
+
scale: l,
|
|
3510
3512
|
scaleWidth: u,
|
|
3511
|
-
unstable_rowActionsOverscan:
|
|
3512
|
-
} = n,
|
|
3513
|
-
e?.selected &&
|
|
3514
|
-
const f =
|
|
3513
|
+
unstable_rowActionsOverscan: c
|
|
3514
|
+
} = n, h = ["edit-row"];
|
|
3515
|
+
e?.selected && h.push("edit-row-selected");
|
|
3516
|
+
const f = l ?? en, p = u ?? tn, S = a ?? ln, y = (g) => {
|
|
3515
3517
|
if (!i.current) return 0;
|
|
3516
|
-
const R =
|
|
3517
|
-
return
|
|
3518
|
+
const R = g.currentTarget.getBoundingClientRect(), C = g.clientX - R.x;
|
|
3519
|
+
return Ot(C, {
|
|
3518
3520
|
startLeft: S,
|
|
3519
3521
|
scale: f,
|
|
3520
3522
|
scaleWidth: p
|
|
3521
3523
|
});
|
|
3522
|
-
},
|
|
3524
|
+
}, E = Fr(() => (e?.actions ? [...e.actions] : []).sort((g, m) => g.start - m.start), [e]), x = Vr((g) => E[g]?.id ?? g, [E]), b = zr({
|
|
3523
3525
|
horizontal: !0,
|
|
3524
|
-
count:
|
|
3525
|
-
getItemKey:
|
|
3526
|
+
count: E.length,
|
|
3527
|
+
getItemKey: x,
|
|
3526
3528
|
getScrollElement: () => i.current,
|
|
3527
|
-
estimateSize: (
|
|
3528
|
-
if (!
|
|
3529
|
-
let
|
|
3530
|
-
if (
|
|
3529
|
+
estimateSize: (g) => {
|
|
3530
|
+
if (!E[g]) return 0;
|
|
3531
|
+
let m = g > 0 ? E[g - 1].end : 0, R = E[g].end;
|
|
3532
|
+
if (m > R) return 0;
|
|
3531
3533
|
let {
|
|
3532
|
-
width:
|
|
3533
|
-
} =
|
|
3534
|
-
start:
|
|
3534
|
+
width: _
|
|
3535
|
+
} = Cn({
|
|
3536
|
+
start: m,
|
|
3535
3537
|
end: R
|
|
3536
3538
|
}, {
|
|
3537
3539
|
startLeft: S,
|
|
3538
3540
|
scale: f,
|
|
3539
3541
|
scaleWidth: p
|
|
3540
3542
|
});
|
|
3541
|
-
return
|
|
3543
|
+
return _;
|
|
3542
3544
|
},
|
|
3543
|
-
overscan:
|
|
3545
|
+
overscan: c ?? 5
|
|
3544
3546
|
});
|
|
3545
|
-
return
|
|
3547
|
+
return Mt(() => b.measure(), [f, p, S, b]), /* @__PURE__ */ T.jsx("div", { className: `${ge(...h)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (g) => {
|
|
3546
3548
|
if (e && r) {
|
|
3547
|
-
const
|
|
3548
|
-
r(
|
|
3549
|
+
const m = y(g);
|
|
3550
|
+
r(g, {
|
|
3549
3551
|
row: e,
|
|
3550
|
-
time:
|
|
3552
|
+
time: m
|
|
3551
3553
|
});
|
|
3552
3554
|
}
|
|
3553
|
-
}, onDoubleClick: (
|
|
3555
|
+
}, onDoubleClick: (g) => {
|
|
3554
3556
|
if (e && s) {
|
|
3555
|
-
const
|
|
3556
|
-
s(
|
|
3557
|
+
const m = y(g);
|
|
3558
|
+
s(g, {
|
|
3557
3559
|
row: e,
|
|
3558
|
-
time:
|
|
3560
|
+
time: m
|
|
3559
3561
|
});
|
|
3560
3562
|
}
|
|
3561
|
-
}, onContextMenu: (
|
|
3563
|
+
}, onContextMenu: (g) => {
|
|
3562
3564
|
if (e && o) {
|
|
3563
|
-
const
|
|
3564
|
-
o(
|
|
3565
|
+
const m = y(g);
|
|
3566
|
+
o(g, {
|
|
3565
3567
|
row: e,
|
|
3566
|
-
time:
|
|
3568
|
+
time: m
|
|
3567
3569
|
});
|
|
3568
3570
|
}
|
|
3569
|
-
}, children: e && b.getVirtualItems().map((
|
|
3570
|
-
const
|
|
3571
|
-
if (!
|
|
3572
|
-
return /* @__PURE__ */
|
|
3571
|
+
}, children: e && b.getVirtualItems().map((g) => {
|
|
3572
|
+
const m = E[g.index];
|
|
3573
|
+
if (!m) throw new Error("Action not found");
|
|
3574
|
+
return /* @__PURE__ */ T.jsx(Wo, { ...n, handleTime: y, row: e, action: m }, m.id);
|
|
3573
3575
|
}) });
|
|
3574
|
-
},
|
|
3575
|
-
const e =
|
|
3576
|
+
}, qo = (n) => {
|
|
3577
|
+
const e = Ce.c(20);
|
|
3576
3578
|
let t;
|
|
3577
3579
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
3578
3580
|
isMoving: !1,
|
|
3579
3581
|
movePositions: [],
|
|
3580
3582
|
assistPositions: []
|
|
3581
3583
|
}, e[0] = t) : t = e[0];
|
|
3582
|
-
const [r, s] = jt(t), o =
|
|
3584
|
+
const [r, s] = jt(t), o = ue(null);
|
|
3583
3585
|
let i;
|
|
3584
3586
|
e[1] !== n || e[2] !== r ? (i = () => ({
|
|
3585
3587
|
...n,
|
|
3586
3588
|
snapData: r
|
|
3587
3589
|
}), e[1] = n, e[2] = r, e[3] = i) : i = e[3];
|
|
3588
|
-
const a =
|
|
3589
|
-
let
|
|
3590
|
-
e[4] !== a ? (
|
|
3591
|
-
const
|
|
3592
|
-
if (b.snap &&
|
|
3593
|
-
const
|
|
3590
|
+
const a = Ur(i);
|
|
3591
|
+
let l;
|
|
3592
|
+
e[4] !== a ? (l = () => {
|
|
3593
|
+
const x = o.current, b = a();
|
|
3594
|
+
if (b.snap && x && b.snapData.isMoving && b.snapPositions) {
|
|
3595
|
+
const g = x.assistActionIds, m = b.snapPositions.filter((R) => !(R.actionId === x.action.id || g && !g.includes(R.actionId))).map(Jo);
|
|
3594
3596
|
if (!b.hideCursor) {
|
|
3595
3597
|
const R = Oe(b.cursorTime, {
|
|
3596
3598
|
scaleWidth: b.scaleWidth ?? 160,
|
|
3597
3599
|
scale: b.scale ?? 1,
|
|
3598
3600
|
startLeft: b.startLeft ?? 20
|
|
3599
3601
|
});
|
|
3600
|
-
|
|
3602
|
+
m.push(R);
|
|
3601
3603
|
}
|
|
3602
3604
|
s((R) => ({
|
|
3603
3605
|
...R,
|
|
3604
|
-
assistPositions:
|
|
3606
|
+
assistPositions: m
|
|
3605
3607
|
}));
|
|
3606
3608
|
} else
|
|
3607
|
-
!b.snap && b.snapData.isMoving && s(
|
|
3608
|
-
}, e[4] = a, e[5] =
|
|
3609
|
+
!b.snap && b.snapData.isMoving && s(Zo);
|
|
3610
|
+
}, e[4] = a, e[5] = l) : l = e[5];
|
|
3609
3611
|
let u;
|
|
3610
|
-
e[6] !== n.snap ? (u = [n.snap], e[6] = n.snap, e[7] = u) : u = e[7],
|
|
3611
|
-
let
|
|
3612
|
-
e[8] !== n ? (
|
|
3612
|
+
e[6] !== n.snap ? (u = [n.snap], e[6] = n.snap, e[7] = u) : u = e[7], Mt(l, u);
|
|
3613
|
+
let c;
|
|
3614
|
+
e[8] !== n ? (c = (x) => {
|
|
3613
3615
|
const b = n.getAssistDragLineActionIds && n.getAssistDragLineActionIds({
|
|
3614
|
-
action:
|
|
3615
|
-
row:
|
|
3616
|
+
action: x.action,
|
|
3617
|
+
row: x.row,
|
|
3616
3618
|
editorData: n.editorData
|
|
3617
3619
|
});
|
|
3618
3620
|
if (o.current = {
|
|
3619
|
-
action:
|
|
3620
|
-
row:
|
|
3621
|
+
action: x.action,
|
|
3622
|
+
row: x.row,
|
|
3621
3623
|
assistActionIds: b
|
|
3622
3624
|
}, n.snap && n.snapPositions) {
|
|
3623
|
-
const
|
|
3625
|
+
const g = n.snapPositions.filter((m) => !(m.actionId === x.action.id || b && !b.includes(m.actionId))).map(Qo);
|
|
3624
3626
|
if (!n.hideCursor) {
|
|
3625
|
-
const
|
|
3627
|
+
const m = Oe(n.cursorTime, {
|
|
3626
3628
|
scaleWidth: n.scaleWidth ?? 160,
|
|
3627
3629
|
scale: n.scale ?? 1,
|
|
3628
3630
|
startLeft: n.startLeft ?? 20
|
|
3629
3631
|
});
|
|
3630
|
-
|
|
3632
|
+
g.push(m);
|
|
3631
3633
|
}
|
|
3632
3634
|
s({
|
|
3633
3635
|
isMoving: !0,
|
|
3634
3636
|
movePositions: [],
|
|
3635
|
-
assistPositions:
|
|
3637
|
+
assistPositions: g
|
|
3636
3638
|
});
|
|
3637
3639
|
} else
|
|
3638
3640
|
s({
|
|
@@ -3640,25 +3642,25 @@ const $o = (n) => {
|
|
|
3640
3642
|
movePositions: [],
|
|
3641
3643
|
assistPositions: []
|
|
3642
3644
|
});
|
|
3643
|
-
}, e[8] = n, e[9] =
|
|
3644
|
-
const
|
|
3645
|
+
}, e[8] = n, e[9] = c) : c = e[9];
|
|
3646
|
+
const h = c;
|
|
3645
3647
|
let f;
|
|
3646
|
-
e[10] !== n.scale || e[11] !== n.scaleWidth || e[12] !== n.snap || e[13] !== n.startLeft ? (f = (
|
|
3648
|
+
e[10] !== n.scale || e[11] !== n.scaleWidth || e[12] !== n.snap || e[13] !== n.startLeft ? (f = (x) => {
|
|
3647
3649
|
if (n.snap) {
|
|
3648
|
-
const b = n.scaleWidth ?? 160,
|
|
3650
|
+
const b = n.scaleWidth ?? 160, g = n.scale ?? 1, m = n.startLeft ?? 20, {
|
|
3649
3651
|
left: R,
|
|
3650
|
-
width:
|
|
3651
|
-
} =
|
|
3652
|
-
start:
|
|
3653
|
-
end:
|
|
3652
|
+
width: _
|
|
3653
|
+
} = Cn({
|
|
3654
|
+
start: x.start,
|
|
3655
|
+
end: x.end
|
|
3654
3656
|
}, {
|
|
3655
|
-
startLeft:
|
|
3657
|
+
startLeft: m,
|
|
3656
3658
|
scaleWidth: b,
|
|
3657
|
-
scale:
|
|
3658
|
-
}),
|
|
3659
|
-
s((
|
|
3660
|
-
...
|
|
3661
|
-
movePositions:
|
|
3659
|
+
scale: g
|
|
3660
|
+
}), C = x.dir ? x.dir === "right" ? [R + _] : [R] : [R, R + _];
|
|
3661
|
+
s((D) => ({
|
|
3662
|
+
...D,
|
|
3663
|
+
movePositions: C
|
|
3662
3664
|
}));
|
|
3663
3665
|
}
|
|
3664
3666
|
}, e[10] = n.scale, e[11] = n.scaleWidth, e[12] = n.snap, e[13] = n.startLeft, e[14] = f) : f = e[14];
|
|
@@ -3671,29 +3673,29 @@ const $o = (n) => {
|
|
|
3671
3673
|
assistPositions: []
|
|
3672
3674
|
});
|
|
3673
3675
|
}, e[15] = S) : S = e[15];
|
|
3674
|
-
const
|
|
3675
|
-
let
|
|
3676
|
-
return e[16] !==
|
|
3676
|
+
const y = S;
|
|
3677
|
+
let E;
|
|
3678
|
+
return e[16] !== h || e[17] !== p || e[18] !== r ? (E = {
|
|
3677
3679
|
snapData: r,
|
|
3678
|
-
handleInitSnap:
|
|
3680
|
+
handleInitSnap: h,
|
|
3679
3681
|
handleUpdateSnap: p,
|
|
3680
|
-
disposeSnap:
|
|
3681
|
-
}, e[16] =
|
|
3682
|
+
disposeSnap: y
|
|
3683
|
+
}, e[16] = h, e[17] = p, e[18] = r, e[19] = E) : E = e[19], E;
|
|
3682
3684
|
};
|
|
3683
|
-
function
|
|
3685
|
+
function Jo(n) {
|
|
3684
3686
|
return n.value;
|
|
3685
3687
|
}
|
|
3686
|
-
function
|
|
3688
|
+
function Zo(n) {
|
|
3687
3689
|
return {
|
|
3688
3690
|
...n,
|
|
3689
3691
|
assistPositions: []
|
|
3690
3692
|
};
|
|
3691
3693
|
}
|
|
3692
|
-
function
|
|
3694
|
+
function Qo(n) {
|
|
3693
3695
|
return n.value;
|
|
3694
3696
|
}
|
|
3695
|
-
const
|
|
3696
|
-
const e =
|
|
3697
|
+
const ei = (n) => {
|
|
3698
|
+
const e = Ce.c(34);
|
|
3697
3699
|
let t, r;
|
|
3698
3700
|
e[0] !== n ? ({
|
|
3699
3701
|
ref: r,
|
|
@@ -3715,47 +3717,47 @@ const Ko = (n) => {
|
|
|
3715
3717
|
snapData: o,
|
|
3716
3718
|
handleInitSnap: i,
|
|
3717
3719
|
handleUpdateSnap: a,
|
|
3718
|
-
disposeSnap:
|
|
3719
|
-
} =
|
|
3720
|
+
disposeSnap: l
|
|
3721
|
+
} = qo(s), u = t.rowHeight ?? 32, c = t.scaleWidth ?? 160, h = t.startLeft ?? 20, f = Math.max(t.scaleCount * c + h, t.timelineWidth);
|
|
3720
3722
|
let p;
|
|
3721
|
-
if (e[13] !== f || e[14] !== u || e[15] !==
|
|
3723
|
+
if (e[13] !== f || e[14] !== u || e[15] !== l || e[16] !== i || e[17] !== a || e[18] !== t || e[19] !== o) {
|
|
3722
3724
|
const R = [];
|
|
3723
|
-
let
|
|
3724
|
-
for (let
|
|
3725
|
-
const
|
|
3726
|
-
if (!
|
|
3725
|
+
let _ = 0;
|
|
3726
|
+
for (let C = 0; C < t.editorData.length; C++) {
|
|
3727
|
+
const D = t.editorData[C];
|
|
3728
|
+
if (!D)
|
|
3727
3729
|
continue;
|
|
3728
|
-
const
|
|
3729
|
-
R.push(/* @__PURE__ */
|
|
3730
|
+
const A = D.rowHeight || u;
|
|
3731
|
+
R.push(/* @__PURE__ */ $r(Go, { ...t, key: D.id, rowData: D, snapData: o, scrollContainerRef: t.scrollElementRef, style: {
|
|
3730
3732
|
position: "absolute",
|
|
3731
3733
|
top: 0,
|
|
3732
3734
|
left: 0,
|
|
3733
3735
|
width: f,
|
|
3734
|
-
height: `${
|
|
3735
|
-
transform: `translateY(${
|
|
3736
|
-
}, onActionMoveStart: (
|
|
3736
|
+
height: `${A}px`,
|
|
3737
|
+
transform: `translateY(${_}px)`
|
|
3738
|
+
}, onActionMoveStart: (w) => (i(w), t.onActionMoveStart && t.onActionMoveStart(w)), onActionResizeStart: (w) => (i(w), t.onActionResizeStart && t.onActionResizeStart(w)), onActionMoving: (w) => (a(w), t.onActionMoving && t.onActionMoving(w)), onActionResizing: (w) => (a(w), t.onActionResizing && t.onActionResizing(w)), onActionResizeEnd: (w) => (l(), t.onActionResizeEnd && t.onActionResizeEnd(w)), onActionMoveEnd: (w) => (l(), t.onActionMoveEnd && t.onActionMoveEnd(w)) })), _ = _ + A;
|
|
3737
3739
|
}
|
|
3738
|
-
p = [
|
|
3740
|
+
p = [_, R], e[13] = f, e[14] = u, e[15] = l, e[16] = i, e[17] = a, e[18] = t, e[19] = o, e[20] = p;
|
|
3739
3741
|
} else
|
|
3740
3742
|
p = e[20];
|
|
3741
|
-
const [S,
|
|
3743
|
+
const [S, y] = p, E = `0, ${t.startLeft ?? 20}px`, x = `${t.startLeft ?? 20}px, ${t.scaleWidth ?? 160}px`;
|
|
3742
3744
|
let b;
|
|
3743
|
-
e[21] !== f || e[22] !==
|
|
3745
|
+
e[21] !== f || e[22] !== E || e[23] !== x || e[24] !== S ? (b = {
|
|
3744
3746
|
width: f,
|
|
3745
3747
|
height: S,
|
|
3746
3748
|
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] =
|
|
3749
|
+
backgroundPositionX: E,
|
|
3750
|
+
backgroundSize: x
|
|
3751
|
+
}, e[21] = f, e[22] = E, e[23] = x, e[24] = S, e[25] = b) : b = e[25];
|
|
3752
|
+
let g;
|
|
3753
|
+
e[26] !== t.snap || e[27] !== o ? (g = t.snap && /* @__PURE__ */ T.jsx(ls, { ...o }), e[26] = t.snap, e[27] = o, e[28] = g) : g = e[28];
|
|
3754
|
+
let m;
|
|
3755
|
+
return e[29] !== r || e[30] !== y || e[31] !== b || e[32] !== g ? (m = /* @__PURE__ */ T.jsxs("div", { ref: r, style: b, className: "timeline-editor-edit-area", children: [
|
|
3756
|
+
y,
|
|
3757
|
+
g
|
|
3758
|
+
] }), e[29] = r, e[30] = y, e[31] = b, e[32] = g, e[33] = m) : m = e[33], m;
|
|
3757
3759
|
};
|
|
3758
|
-
function
|
|
3760
|
+
function ti({
|
|
3759
3761
|
scaleSplitCount: n,
|
|
3760
3762
|
scaleWidth: e,
|
|
3761
3763
|
startLeft: t,
|
|
@@ -3764,10 +3766,10 @@ function qo({
|
|
|
3764
3766
|
scale: o,
|
|
3765
3767
|
scrollElementRef: i,
|
|
3766
3768
|
onClickTimeArea: a,
|
|
3767
|
-
setCursor:
|
|
3769
|
+
setCursor: l,
|
|
3768
3770
|
getScaleRender: u
|
|
3769
3771
|
}) {
|
|
3770
|
-
const
|
|
3772
|
+
const c = n ?? 1, h = e ?? 160, f = t ?? 20, p = (n ?? 0) > 0, S = p ? r * (n ?? 1) + 1 : r, y = (p ? h / c : h) * (S - 1) + f, x = zr({
|
|
3771
3773
|
horizontal: !0,
|
|
3772
3774
|
count: S,
|
|
3773
3775
|
getScrollElement: () => i.current,
|
|
@@ -3776,36 +3778,36 @@ function qo({
|
|
|
3776
3778
|
case 0:
|
|
3777
3779
|
return f;
|
|
3778
3780
|
default:
|
|
3779
|
-
return p ?
|
|
3781
|
+
return p ? h / c : h;
|
|
3780
3782
|
}
|
|
3781
3783
|
},
|
|
3782
3784
|
overscan: 10
|
|
3783
3785
|
});
|
|
3784
|
-
return
|
|
3785
|
-
width: `${
|
|
3786
|
+
return Mt(() => x.measure(), [o, e, t, x]), /* @__PURE__ */ T.jsx("div", { style: {
|
|
3787
|
+
width: `${y}px`
|
|
3786
3788
|
}, className: ge("time-area"), onClick: (b) => {
|
|
3787
|
-
const
|
|
3788
|
-
if (
|
|
3789
|
-
const
|
|
3790
|
-
startLeft:
|
|
3789
|
+
const g = t ?? 20, m = e ?? 160, R = o ?? 1, _ = s ?? 1 / 0, C = b.currentTarget.getBoundingClientRect(), D = b.clientX - C.x, A = Math.max(D, g);
|
|
3790
|
+
if (A > _ * m + g) return;
|
|
3791
|
+
const w = Ot(A, {
|
|
3792
|
+
startLeft: g,
|
|
3791
3793
|
scale: R,
|
|
3792
|
-
scaleWidth:
|
|
3794
|
+
scaleWidth: m
|
|
3793
3795
|
});
|
|
3794
|
-
a && a(
|
|
3795
|
-
time:
|
|
3796
|
+
a && a(w, b), !b.defaultPrevented && l({
|
|
3797
|
+
time: w
|
|
3796
3798
|
});
|
|
3797
|
-
}, children:
|
|
3798
|
-
const
|
|
3799
|
-
return /* @__PURE__ */
|
|
3799
|
+
}, children: x.getVirtualItems().map((b) => {
|
|
3800
|
+
const g = b.index, m = n ?? 1, R = o ?? 1, _ = p ? g % m === 0 : !0, C = [ge("time-unit"), ge(_ ? "time-unit-big" : "time-unit-small")], D = (p ? g / m : g) * R;
|
|
3801
|
+
return /* @__PURE__ */ T.jsx("div", { "data-index": b.index, style: {
|
|
3800
3802
|
width: `${b.size}px`,
|
|
3801
3803
|
transform: `translateX(${b.start}px)`
|
|
3802
|
-
}, className:
|
|
3804
|
+
}, className: C.join(" "), children: _ && /* @__PURE__ */ T.jsx("div", { className: ge("time-unit-scale"), children: u?.(D) ?? D }) }, b.key);
|
|
3803
3805
|
}) });
|
|
3804
3806
|
}
|
|
3805
|
-
function
|
|
3807
|
+
function ni(n) {
|
|
3806
3808
|
return typeof n == "object" && n !== null;
|
|
3807
3809
|
}
|
|
3808
|
-
function
|
|
3810
|
+
function ri(n, e, t) {
|
|
3809
3811
|
if (n instanceof EventTarget)
|
|
3810
3812
|
return [n];
|
|
3811
3813
|
if (typeof n == "string") {
|
|
@@ -3814,47 +3816,47 @@ function Jo(n, e, t) {
|
|
|
3814
3816
|
}
|
|
3815
3817
|
return Array.from(n);
|
|
3816
3818
|
}
|
|
3817
|
-
function
|
|
3818
|
-
return
|
|
3819
|
+
function si(n) {
|
|
3820
|
+
return ni(n) && "ownerSVGElement" in n;
|
|
3819
3821
|
}
|
|
3820
|
-
const
|
|
3821
|
-
let
|
|
3822
|
-
const
|
|
3823
|
-
function
|
|
3824
|
-
|
|
3822
|
+
const Jt = /* @__PURE__ */ new WeakMap();
|
|
3823
|
+
let Zt;
|
|
3824
|
+
const jr = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : si(r) && "getBBox" in r ? r.getBBox()[e] : r[t], oi = /* @__PURE__ */ jr("inline", "width", "offsetWidth"), ii = /* @__PURE__ */ jr("block", "height", "offsetHeight");
|
|
3825
|
+
function ai({ target: n, borderBoxSize: e }) {
|
|
3826
|
+
Jt.get(n)?.forEach((t) => {
|
|
3825
3827
|
t(n, {
|
|
3826
3828
|
get width() {
|
|
3827
|
-
return
|
|
3829
|
+
return oi(n, e);
|
|
3828
3830
|
},
|
|
3829
3831
|
get height() {
|
|
3830
|
-
return
|
|
3832
|
+
return ii(n, e);
|
|
3831
3833
|
}
|
|
3832
3834
|
});
|
|
3833
3835
|
});
|
|
3834
3836
|
}
|
|
3835
|
-
function
|
|
3836
|
-
n.forEach(
|
|
3837
|
+
function li(n) {
|
|
3838
|
+
n.forEach(ai);
|
|
3837
3839
|
}
|
|
3838
|
-
function
|
|
3839
|
-
typeof ResizeObserver > "u" || (
|
|
3840
|
+
function ci() {
|
|
3841
|
+
typeof ResizeObserver > "u" || (Zt = new ResizeObserver(li));
|
|
3840
3842
|
}
|
|
3841
|
-
function
|
|
3842
|
-
|
|
3843
|
-
const t =
|
|
3843
|
+
function ui(n, e) {
|
|
3844
|
+
Zt || ci();
|
|
3845
|
+
const t = ri(n);
|
|
3844
3846
|
return t.forEach((r) => {
|
|
3845
|
-
let s =
|
|
3846
|
-
s || (s = /* @__PURE__ */ new Set(),
|
|
3847
|
+
let s = Jt.get(r);
|
|
3848
|
+
s || (s = /* @__PURE__ */ new Set(), Jt.set(r, s)), s.add(e), Zt?.observe(r);
|
|
3847
3849
|
}), () => {
|
|
3848
3850
|
t.forEach((r) => {
|
|
3849
|
-
const s =
|
|
3850
|
-
s?.delete(e), s?.size ||
|
|
3851
|
+
const s = Jt.get(r);
|
|
3852
|
+
s?.delete(e), s?.size || Zt?.unobserve(r);
|
|
3851
3853
|
});
|
|
3852
3854
|
};
|
|
3853
3855
|
}
|
|
3854
|
-
const
|
|
3855
|
-
let
|
|
3856
|
-
function
|
|
3857
|
-
|
|
3856
|
+
const Qt = /* @__PURE__ */ new Set();
|
|
3857
|
+
let Dt;
|
|
3858
|
+
function fi() {
|
|
3859
|
+
Dt = () => {
|
|
3858
3860
|
const n = {
|
|
3859
3861
|
get width() {
|
|
3860
3862
|
return window.innerWidth;
|
|
@@ -3863,19 +3865,19 @@ function oi() {
|
|
|
3863
3865
|
return window.innerHeight;
|
|
3864
3866
|
}
|
|
3865
3867
|
};
|
|
3866
|
-
|
|
3867
|
-
}, window.addEventListener("resize",
|
|
3868
|
+
Qt.forEach((e) => e(n));
|
|
3869
|
+
}, window.addEventListener("resize", Dt);
|
|
3868
3870
|
}
|
|
3869
|
-
function
|
|
3870
|
-
return
|
|
3871
|
-
|
|
3871
|
+
function di(n) {
|
|
3872
|
+
return Qt.add(n), Dt || fi(), () => {
|
|
3873
|
+
Qt.delete(n), !Qt.size && typeof Dt == "function" && (window.removeEventListener("resize", Dt), Dt = void 0);
|
|
3872
3874
|
};
|
|
3873
3875
|
}
|
|
3874
|
-
function
|
|
3875
|
-
return typeof n == "function" ?
|
|
3876
|
+
function hi(n, e) {
|
|
3877
|
+
return typeof n == "function" ? di(n) : ui(n, e);
|
|
3876
3878
|
}
|
|
3877
|
-
function
|
|
3878
|
-
const e =
|
|
3879
|
+
function mi(n) {
|
|
3880
|
+
const e = Ce.c(4), {
|
|
3879
3881
|
elementRef: t
|
|
3880
3882
|
} = n;
|
|
3881
3883
|
let r;
|
|
@@ -3886,109 +3888,109 @@ function ci(n) {
|
|
|
3886
3888
|
const [s, o] = jt(r);
|
|
3887
3889
|
let i, a;
|
|
3888
3890
|
return e[1] !== t ? (i = () => {
|
|
3889
|
-
t.current &&
|
|
3891
|
+
t.current && hi(t.current, (l, u) => {
|
|
3890
3892
|
o({
|
|
3891
3893
|
width: u.width,
|
|
3892
3894
|
height: u.height
|
|
3893
3895
|
});
|
|
3894
3896
|
});
|
|
3895
|
-
}, a = [t], e[1] = t, e[2] = i, e[3] = a) : (i = e[2], a = e[3]),
|
|
3897
|
+
}, a = [t], e[1] = t, e[2] = i, e[3] = a) : (i = e[2], a = e[3]), an(i, a), s;
|
|
3896
3898
|
}
|
|
3897
|
-
const
|
|
3898
|
-
const e =
|
|
3899
|
+
const pi = (n) => {
|
|
3900
|
+
const e = Ce.c(49), {
|
|
3899
3901
|
disableDrag: t,
|
|
3900
3902
|
cursorTime: r,
|
|
3901
3903
|
setCursor: s,
|
|
3902
3904
|
startLeft: o,
|
|
3903
3905
|
scaleWidth: i,
|
|
3904
3906
|
scale: a,
|
|
3905
|
-
scaleCount:
|
|
3907
|
+
scaleCount: l,
|
|
3906
3908
|
scaleSplitCount: u,
|
|
3907
|
-
scrollElementRef:
|
|
3908
|
-
maxScaleCount:
|
|
3909
|
+
scrollElementRef: c,
|
|
3910
|
+
maxScaleCount: h,
|
|
3909
3911
|
onCursorDragStart: f,
|
|
3910
3912
|
onCursorDrag: p,
|
|
3911
3913
|
onCursorDragEnd: S,
|
|
3912
|
-
cursorSnap:
|
|
3913
|
-
autoScrollSpeed:
|
|
3914
|
-
autoScrollMaxSpeed:
|
|
3914
|
+
cursorSnap: y,
|
|
3915
|
+
autoScrollSpeed: E,
|
|
3916
|
+
autoScrollMaxSpeed: x,
|
|
3915
3917
|
snapPositions: b
|
|
3916
3918
|
} = n;
|
|
3917
|
-
let
|
|
3918
|
-
e[0] !== b ? (
|
|
3919
|
-
const
|
|
3920
|
-
let
|
|
3921
|
-
e[2] !==
|
|
3922
|
-
const
|
|
3923
|
-
let I,
|
|
3919
|
+
let g;
|
|
3920
|
+
e[0] !== b ? (g = b === void 0 ? [] : b, e[0] = b, e[1] = g) : g = e[1];
|
|
3921
|
+
const m = g, R = ue(null), _ = o ?? 20, C = i ?? 160, D = a ?? 1;
|
|
3922
|
+
let A;
|
|
3923
|
+
e[2] !== y || e[3] !== m ? (A = y ? m : [], e[2] = y, e[3] = m, e[4] = A) : A = e[4];
|
|
3924
|
+
const w = A;
|
|
3925
|
+
let I, F;
|
|
3924
3926
|
e[5] !== r || e[6] !== a || e[7] !== i || e[8] !== o ? (I = () => {
|
|
3925
3927
|
if (R.current) {
|
|
3926
|
-
const
|
|
3928
|
+
const J = o ?? 20, $ = i ?? 160, re = a ?? 1;
|
|
3927
3929
|
R.current.updateLeft(Oe(r, {
|
|
3928
|
-
startLeft:
|
|
3929
|
-
scaleWidth:
|
|
3930
|
-
scale:
|
|
3930
|
+
startLeft: J,
|
|
3931
|
+
scaleWidth: $,
|
|
3932
|
+
scale: re
|
|
3931
3933
|
}));
|
|
3932
3934
|
}
|
|
3933
|
-
},
|
|
3934
|
-
const
|
|
3935
|
-
let
|
|
3936
|
-
e[11] !==
|
|
3935
|
+
}, F = [r, o, i, a], e[5] = r, e[6] = a, e[7] = i, e[8] = o, e[9] = I, e[10] = F) : (I = e[9], F = e[10]), Mt(I, F);
|
|
3936
|
+
const K = h ?? 1 / 0, W = (u ?? 0) > 0, ne = u ?? 1, Y = W ? l * (u ?? 1) + 1 : l, Z = o ?? 20, Q = (W ? C / ne : C) * (Y - 1) + Z;
|
|
3937
|
+
let O;
|
|
3938
|
+
e[11] !== _ || e[12] !== K || e[13] !== c || e[14] !== Q || e[15] !== C ? (O = () => ({
|
|
3937
3939
|
left: 0,
|
|
3938
|
-
right: Math.min(
|
|
3939
|
-
}), e[11] =
|
|
3940
|
-
const
|
|
3940
|
+
right: Math.min(Q, K * C + _ - (c.current?.scrollLeft ?? 0))
|
|
3941
|
+
}), e[11] = _, e[12] = K, e[13] = c, e[14] = Q, e[15] = C, e[16] = O) : O = e[16];
|
|
3942
|
+
const L = !t;
|
|
3941
3943
|
let d;
|
|
3942
|
-
e[17] !== r || e[18] !==
|
|
3943
|
-
const
|
|
3944
|
-
startLeft:
|
|
3945
|
-
scaleWidth:
|
|
3946
|
-
scale:
|
|
3947
|
-
}),
|
|
3948
|
-
startLeft:
|
|
3949
|
-
scale:
|
|
3950
|
-
scaleWidth:
|
|
3944
|
+
e[17] !== r || e[18] !== _ || e[19] !== f || e[20] !== D || e[21] !== C ? (d = () => {
|
|
3945
|
+
const J = R.current?.getLeft() ?? Oe(r, {
|
|
3946
|
+
startLeft: _,
|
|
3947
|
+
scaleWidth: C,
|
|
3948
|
+
scale: D
|
|
3949
|
+
}), $ = Ot(J, {
|
|
3950
|
+
startLeft: _,
|
|
3951
|
+
scale: D,
|
|
3952
|
+
scaleWidth: C
|
|
3951
3953
|
});
|
|
3952
|
-
f && f(
|
|
3953
|
-
}, e[17] = r, e[18] =
|
|
3954
|
-
let
|
|
3955
|
-
e[23] !==
|
|
3954
|
+
f && f($);
|
|
3955
|
+
}, e[17] = r, e[18] = _, e[19] = f, e[20] = D, e[21] = C, e[22] = d) : d = e[22];
|
|
3956
|
+
let P;
|
|
3957
|
+
e[23] !== _ || e[24] !== S || e[25] !== D || e[26] !== s || e[27] !== C ? (P = (J) => {
|
|
3956
3958
|
const {
|
|
3957
|
-
left:
|
|
3958
|
-
} =
|
|
3959
|
-
startLeft:
|
|
3960
|
-
scale:
|
|
3961
|
-
scaleWidth:
|
|
3959
|
+
left: $
|
|
3960
|
+
} = J, re = Ot($, {
|
|
3961
|
+
startLeft: _,
|
|
3962
|
+
scale: D,
|
|
3963
|
+
scaleWidth: C
|
|
3962
3964
|
});
|
|
3963
3965
|
s({
|
|
3964
|
-
time:
|
|
3965
|
-
}), S && S(
|
|
3966
|
-
}, e[23] =
|
|
3967
|
-
let
|
|
3968
|
-
e[29] !==
|
|
3966
|
+
time: re
|
|
3967
|
+
}), S && S(re);
|
|
3968
|
+
}, e[23] = _, e[24] = S, e[25] = D, e[26] = s, e[27] = C, e[28] = P) : P = e[28];
|
|
3969
|
+
let N;
|
|
3970
|
+
e[29] !== _ || e[30] !== p || e[31] !== D || e[32] !== s || e[33] !== C ? (N = (J) => {
|
|
3969
3971
|
const {
|
|
3970
|
-
left:
|
|
3971
|
-
} =
|
|
3972
|
-
startLeft:
|
|
3973
|
-
scale:
|
|
3974
|
-
scaleWidth:
|
|
3972
|
+
left: $
|
|
3973
|
+
} = J, re = Ot($, {
|
|
3974
|
+
startLeft: _,
|
|
3975
|
+
scale: D,
|
|
3976
|
+
scaleWidth: C
|
|
3975
3977
|
});
|
|
3976
3978
|
s({
|
|
3977
|
-
time:
|
|
3978
|
-
}), p && p(
|
|
3979
|
-
}, e[29] =
|
|
3980
|
-
let
|
|
3981
|
-
e[35] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3979
|
+
time: re
|
|
3980
|
+
}), p && p(re);
|
|
3981
|
+
}, e[29] = _, e[30] = p, e[31] = D, e[32] = s, e[33] = C, e[34] = N) : N = e[34];
|
|
3982
|
+
let H, he;
|
|
3983
|
+
e[35] === Symbol.for("react.memo_cache_sentinel") ? (H = ge("cursor"), he = ge("cursor-top"), e[35] = H, e[36] = he) : (H = e[35], he = e[36]);
|
|
3982
3984
|
let pe;
|
|
3983
|
-
e[37] === Symbol.for("react.memo_cache_sentinel") ? (pe = /* @__PURE__ */
|
|
3984
|
-
/* @__PURE__ */
|
|
3985
|
-
/* @__PURE__ */
|
|
3985
|
+
e[37] === Symbol.for("react.memo_cache_sentinel") ? (pe = /* @__PURE__ */ T.jsxs("div", { className: H, children: [
|
|
3986
|
+
/* @__PURE__ */ T.jsx("svg", { className: he, width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", children: /* @__PURE__ */ T.jsx("path", { d: "M0 1C0 0.447715 0.447715 0 1 0H7C7.55228 0 8 0.447715 8 1V9.38197C8 9.76074 7.786 10.107 7.44721 10.2764L4.44721 11.7764C4.16569 11.9172 3.83431 11.9172 3.55279 11.7764L0.552786 10.2764C0.214002 10.107 0 9.76074 0 9.38197V1Z", fill: "currentColor" }) }),
|
|
3987
|
+
/* @__PURE__ */ T.jsx("div", { className: ge("cursor-area") })
|
|
3986
3988
|
] }), e[37] = pe) : pe = e[37];
|
|
3987
|
-
let
|
|
3988
|
-
return e[38] !==
|
|
3989
|
+
let B;
|
|
3990
|
+
return e[38] !== w || e[39] !== x || e[40] !== E || e[41] !== _ || e[42] !== c || e[43] !== N || e[44] !== O || e[45] !== L || e[46] !== d || e[47] !== P ? (B = /* @__PURE__ */ T.jsx(kr, { start: _, ref: R, parentRef: c, getBounds: O, autoScroll: !0, autoScrollSpeed: E, autoScrollMaxSpeed: x, enableDragging: L, enableResizing: !1, snapPositions: w, snapDistance: nn, snapOrigin: "left", onDragStart: d, onDragEnd: P, onDrag: N, children: pe }), e[38] = w, e[39] = x, e[40] = E, e[41] = _, e[42] = c, e[43] = N, e[44] = O, e[45] = L, e[46] = d, e[47] = P, e[48] = B) : B = e[48], B;
|
|
3989
3991
|
};
|
|
3990
|
-
function
|
|
3991
|
-
const e =
|
|
3992
|
+
function cr(n) {
|
|
3993
|
+
const e = Ce.c(9);
|
|
3992
3994
|
let t, r, s;
|
|
3993
3995
|
e[0] !== n ? ({
|
|
3994
3996
|
className: t,
|
|
@@ -3997,136 +3999,136 @@ function nr(n) {
|
|
|
3997
3999
|
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s) : (t = e[1], r = e[2], s = e[3]);
|
|
3998
4000
|
const o = s === void 0 ? "vertical" : s;
|
|
3999
4001
|
let i;
|
|
4000
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */
|
|
4002
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ T.jsx(Lr, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
|
|
4001
4003
|
let a;
|
|
4002
|
-
return e[5] !== t || e[6] !== o || e[7] !== r ? (a = /* @__PURE__ */
|
|
4004
|
+
return e[5] !== t || e[6] !== o || e[7] !== r ? (a = /* @__PURE__ */ T.jsx(Ar, { "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
4005
|
}
|
|
4004
|
-
function
|
|
4005
|
-
const e =
|
|
4006
|
+
function gi(n) {
|
|
4007
|
+
const e = Ce.c(7), {
|
|
4006
4008
|
scrollElementRef: t,
|
|
4007
4009
|
scale: r,
|
|
4008
4010
|
scaleWidth: s,
|
|
4009
4011
|
startLeft: o,
|
|
4010
4012
|
cursorTimeRef: i
|
|
4011
|
-
} = n, a =
|
|
4012
|
-
let u,
|
|
4013
|
+
} = n, a = ue(null), l = ue(null);
|
|
4014
|
+
let u, c;
|
|
4013
4015
|
e[0] !== i || e[1] !== r || e[2] !== s || e[3] !== t || e[4] !== o ? (u = () => {
|
|
4014
|
-
const
|
|
4015
|
-
if (a.current !== null &&
|
|
4016
|
-
const f =
|
|
4016
|
+
const h = t.current;
|
|
4017
|
+
if (a.current !== null && l.current !== null && h && (a.current !== r || l.current !== s)) {
|
|
4018
|
+
const f = h.scrollLeft, p = i.current, S = Oe(p, {
|
|
4017
4019
|
startLeft: o,
|
|
4018
4020
|
scale: a.current,
|
|
4019
|
-
scaleWidth:
|
|
4020
|
-
}),
|
|
4021
|
+
scaleWidth: l.current
|
|
4022
|
+
}), y = Oe(p, {
|
|
4021
4023
|
startLeft: o,
|
|
4022
4024
|
scale: r,
|
|
4023
4025
|
scaleWidth: s
|
|
4024
|
-
}),
|
|
4025
|
-
|
|
4026
|
+
}), E = S - f, x = y - E;
|
|
4027
|
+
h.scrollLeft = x;
|
|
4026
4028
|
}
|
|
4027
|
-
a.current = r,
|
|
4028
|
-
},
|
|
4029
|
+
a.current = r, l.current = s;
|
|
4030
|
+
}, c = [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] = c) : (u = e[5], c = e[6]), an(u, c);
|
|
4029
4031
|
}
|
|
4030
|
-
function
|
|
4032
|
+
function _i({
|
|
4031
4033
|
ref: n,
|
|
4032
4034
|
...e
|
|
4033
4035
|
}) {
|
|
4034
|
-
const t =
|
|
4036
|
+
const t = rs(e), r = ue(null), {
|
|
4035
4037
|
width: s,
|
|
4036
4038
|
height: o
|
|
4037
|
-
} =
|
|
4039
|
+
} = mi({
|
|
4038
4040
|
elementRef: r
|
|
4039
|
-
}), i = t.minScaleCount ?? Math.max(
|
|
4041
|
+
}), i = e.unstable_forceRemountEditorArea ?? 0, a = t.minScaleCount ?? Math.max(Yr(t.editorData, {
|
|
4040
4042
|
scale: t.scale,
|
|
4041
4043
|
pad: 0.1
|
|
4042
|
-
}), Math.ceil((s - t.startLeft) / t.scaleWidth)),
|
|
4044
|
+
}), Math.ceil((s - t.startLeft) / t.scaleWidth)), l = Math.min(t.maxScaleCount, a), u = t.editorData ? Xr(t.editorData.flatMap((m) => m.actions), {
|
|
4043
4045
|
startLeft: t.startLeft,
|
|
4044
4046
|
scale: t.scale,
|
|
4045
4047
|
scaleWidth: t.scaleWidth
|
|
4046
|
-
}) : [], [
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
}, [
|
|
4050
|
-
const
|
|
4051
|
-
const
|
|
4052
|
-
|
|
4053
|
-
}, [
|
|
4054
|
-
|
|
4048
|
+
}) : [], [c, h] = jt(null);
|
|
4049
|
+
an(() => {
|
|
4050
|
+
h(null);
|
|
4051
|
+
}, [l]);
|
|
4052
|
+
const f = c ?? l, p = (m) => {
|
|
4053
|
+
const R = Math.min(t.maxScaleCount, m);
|
|
4054
|
+
h(R);
|
|
4055
|
+
}, [S, y] = jt(Nn), E = ue(Nn);
|
|
4056
|
+
gi({
|
|
4055
4057
|
scrollElementRef: r,
|
|
4056
4058
|
scale: t.scale,
|
|
4057
4059
|
scaleWidth: t.scaleWidth,
|
|
4058
4060
|
startLeft: t.startLeft,
|
|
4059
|
-
cursorTimeRef:
|
|
4061
|
+
cursorTimeRef: E
|
|
4060
4062
|
});
|
|
4061
|
-
const x = (
|
|
4062
|
-
t.onChange?.(
|
|
4063
|
-
},
|
|
4063
|
+
const x = (m) => {
|
|
4064
|
+
t.onChange?.(m);
|
|
4065
|
+
}, b = (m) => {
|
|
4064
4066
|
let {
|
|
4065
|
-
left:
|
|
4066
|
-
time:
|
|
4067
|
-
} =
|
|
4068
|
-
return typeof
|
|
4067
|
+
left: R,
|
|
4068
|
+
time: _
|
|
4069
|
+
} = m;
|
|
4070
|
+
return typeof _ < "u" ? (y(_), E.current = _, !0) : typeof R < "u" ? (y(E.current = Ot(R, {
|
|
4069
4071
|
startLeft: t.startLeft,
|
|
4070
4072
|
scale: t.scale,
|
|
4071
4073
|
scaleWidth: t.scaleWidth
|
|
4072
4074
|
})), !0) : !1;
|
|
4073
|
-
},
|
|
4074
|
-
const
|
|
4075
|
-
if (!
|
|
4075
|
+
}, g = (m, R = {}) => {
|
|
4076
|
+
const _ = r.current;
|
|
4077
|
+
if (!_) return;
|
|
4076
4078
|
const {
|
|
4077
|
-
block:
|
|
4078
|
-
offset:
|
|
4079
|
-
onlyIfNotVisible:
|
|
4080
|
-
} =
|
|
4079
|
+
block: C = "start",
|
|
4080
|
+
offset: D = 0,
|
|
4081
|
+
onlyIfNotVisible: A = !1
|
|
4082
|
+
} = R, w = Oe(m, {
|
|
4081
4083
|
startLeft: t.startLeft,
|
|
4082
4084
|
scale: t.scale,
|
|
4083
4085
|
scaleWidth: t.scaleWidth
|
|
4084
|
-
}),
|
|
4085
|
-
if (
|
|
4086
|
-
const
|
|
4087
|
-
if (
|
|
4086
|
+
}), I = _.clientWidth;
|
|
4087
|
+
if (A) {
|
|
4088
|
+
const W = _.scrollLeft;
|
|
4089
|
+
if (w >= W && w <= W + I)
|
|
4088
4090
|
return;
|
|
4089
4091
|
}
|
|
4090
|
-
let
|
|
4091
|
-
|
|
4092
|
-
const
|
|
4093
|
-
|
|
4094
|
-
left: Math.min(Math.max(
|
|
4095
|
-
behavior:
|
|
4092
|
+
let F;
|
|
4093
|
+
C === "end" ? F = w - I + D : C === "center" ? F = w - I / 2 : F = w - D;
|
|
4094
|
+
const K = Math.max(0, _.scrollWidth - I);
|
|
4095
|
+
_.scrollTo({
|
|
4096
|
+
left: Math.min(Math.max(F, 0), K),
|
|
4097
|
+
behavior: R.behavior ?? "instant"
|
|
4096
4098
|
});
|
|
4097
4099
|
};
|
|
4098
|
-
return
|
|
4100
|
+
return ur(n, () => ({
|
|
4099
4101
|
get target() {
|
|
4100
4102
|
return r.current;
|
|
4101
4103
|
},
|
|
4102
|
-
set time(
|
|
4103
|
-
|
|
4104
|
-
time:
|
|
4104
|
+
set time(m) {
|
|
4105
|
+
b({
|
|
4106
|
+
time: m
|
|
4105
4107
|
});
|
|
4106
4108
|
},
|
|
4107
4109
|
get time() {
|
|
4108
|
-
return
|
|
4110
|
+
return E.current;
|
|
4109
4111
|
},
|
|
4110
4112
|
getTime() {
|
|
4111
|
-
return
|
|
4113
|
+
return E.current;
|
|
4112
4114
|
},
|
|
4113
|
-
setTime(
|
|
4114
|
-
|
|
4115
|
-
time:
|
|
4115
|
+
setTime(m) {
|
|
4116
|
+
b({
|
|
4117
|
+
time: m
|
|
4116
4118
|
});
|
|
4117
4119
|
},
|
|
4118
|
-
getTimePixelPosition(
|
|
4119
|
-
return Oe(
|
|
4120
|
+
getTimePixelPosition(m) {
|
|
4121
|
+
return Oe(m ?? E.current, {
|
|
4120
4122
|
startLeft: t.startLeft,
|
|
4121
4123
|
scale: t.scale,
|
|
4122
4124
|
scaleWidth: t.scaleWidth
|
|
4123
4125
|
});
|
|
4124
4126
|
},
|
|
4125
|
-
setScrollLeft: (
|
|
4126
|
-
r.current && (r.current.scrollLeft =
|
|
4127
|
+
setScrollLeft: (m) => {
|
|
4128
|
+
r.current && (r.current.scrollLeft = m);
|
|
4127
4129
|
},
|
|
4128
|
-
setScrollTop: (
|
|
4129
|
-
r.current && (r.current.scrollTop =
|
|
4130
|
+
setScrollTop: (m) => {
|
|
4131
|
+
r.current && (r.current.scrollTop = m);
|
|
4130
4132
|
},
|
|
4131
4133
|
get scrollLeft() {
|
|
4132
4134
|
return r.current ? r.current.scrollLeft : 0;
|
|
@@ -4134,26 +4136,26 @@ function mi({
|
|
|
4134
4136
|
get scrollTop() {
|
|
4135
4137
|
return r.current ? r.current.scrollTop : 0;
|
|
4136
4138
|
},
|
|
4137
|
-
set scrollLeft(
|
|
4138
|
-
r.current && (r.current.scrollLeft =
|
|
4139
|
+
set scrollLeft(m) {
|
|
4140
|
+
r.current && (r.current.scrollLeft = m);
|
|
4139
4141
|
},
|
|
4140
|
-
set scrollTop(
|
|
4141
|
-
r.current && (r.current.scrollTop =
|
|
4142
|
+
set scrollTop(m) {
|
|
4143
|
+
r.current && (r.current.scrollTop = m);
|
|
4142
4144
|
},
|
|
4143
|
-
scrollToTime:
|
|
4144
|
-
})), /* @__PURE__ */
|
|
4145
|
-
/* @__PURE__ */
|
|
4146
|
-
t.onScroll?.(
|
|
4145
|
+
scrollToTime: g
|
|
4146
|
+
})), /* @__PURE__ */ T.jsxs(Do, { style: t.style, className: `${xn} ${t.disableDrag ? xn + "-disable" : ""}`, "data-slot": "scroll-area", children: [
|
|
4147
|
+
/* @__PURE__ */ T.jsxs(Lo, { "data-slot": "scroll-area-viewport", ref: r, onScroll: (m) => {
|
|
4148
|
+
t.onScroll?.(m.currentTarget);
|
|
4147
4149
|
}, children: [
|
|
4148
|
-
/* @__PURE__ */
|
|
4149
|
-
/* @__PURE__ */
|
|
4150
|
-
!t.hideCursor && /* @__PURE__ */
|
|
4150
|
+
/* @__PURE__ */ T.jsx(ti, { ...t, setCursor: b, scaleCount: f, scrollElementRef: r }),
|
|
4151
|
+
/* @__PURE__ */ T.jsx(ei, { ...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}__`),
|
|
4152
|
+
!t.hideCursor && /* @__PURE__ */ T.jsx(pi, { ...t, timelineWidth: s, height: o, scaleCount: f, setScaleCount: p, setCursor: b, cursorTime: S, editorData: t.editorData, scrollElementRef: r, snapPositions: u })
|
|
4151
4153
|
] }),
|
|
4152
|
-
/* @__PURE__ */
|
|
4153
|
-
/* @__PURE__ */
|
|
4154
|
-
/* @__PURE__ */
|
|
4154
|
+
/* @__PURE__ */ T.jsx(cr, { orientation: "horizontal" }),
|
|
4155
|
+
/* @__PURE__ */ T.jsx(cr, { orientation: "vertical" }),
|
|
4156
|
+
/* @__PURE__ */ T.jsx(Oo, {})
|
|
4155
4157
|
] });
|
|
4156
4158
|
}
|
|
4157
4159
|
export {
|
|
4158
|
-
|
|
4160
|
+
_i as Timeline
|
|
4159
4161
|
};
|