@cyca/react-timeline-editor 0.2.2-alpha.3 → 0.2.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -6
- package/dist/react-timeline-editor.cjs +4 -4
- package/dist/react-timeline-editor.css +1 -1
- package/dist/react-timeline-editor.js +1550 -1690
- package/package.json +4 -5
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { flushSync as
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
|
|
1
|
+
import * as Ne from "react";
|
|
2
|
+
import Jt, { useRef as st, useEffect as qt, useEffectEvent as Kn, useImperativeHandle as Ln, useState as Ee, useLayoutEffect as tn, createElement as qn, useCallback as Jn } from "react";
|
|
3
|
+
import { flushSync as Zn } from "react-dom";
|
|
4
|
+
var De = { exports: {} }, we = {};
|
|
5
|
+
var rn;
|
|
6
|
+
function Qn() {
|
|
7
|
+
if (rn) return we;
|
|
8
|
+
rn = 1;
|
|
9
9
|
var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
10
10
|
function e(r, s, i) {
|
|
11
11
|
var o = null;
|
|
@@ -22,50 +22,50 @@ function er() {
|
|
|
22
22
|
props: i
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return we.Fragment = t, we.jsx = e, we.jsxs = e, we;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
function
|
|
30
|
-
return
|
|
27
|
+
var Se = {};
|
|
28
|
+
var sn;
|
|
29
|
+
function tr() {
|
|
30
|
+
return sn || (sn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
31
|
function n(u) {
|
|
32
32
|
if (u == null) return null;
|
|
33
33
|
if (typeof u == "function")
|
|
34
|
-
return u.$$typeof ===
|
|
34
|
+
return u.$$typeof === D ? null : u.displayName || u.name || null;
|
|
35
35
|
if (typeof u == "string") return u;
|
|
36
36
|
switch (u) {
|
|
37
|
-
case b:
|
|
38
|
-
return "Fragment";
|
|
39
37
|
case h:
|
|
38
|
+
return "Fragment";
|
|
39
|
+
case p:
|
|
40
40
|
return "Profiler";
|
|
41
|
-
case
|
|
41
|
+
case g:
|
|
42
42
|
return "StrictMode";
|
|
43
|
-
case
|
|
43
|
+
case x:
|
|
44
44
|
return "Suspense";
|
|
45
|
-
case
|
|
45
|
+
case w:
|
|
46
46
|
return "SuspenseList";
|
|
47
|
-
case
|
|
47
|
+
case G:
|
|
48
48
|
return "Activity";
|
|
49
49
|
}
|
|
50
50
|
if (typeof u == "object")
|
|
51
51
|
switch (typeof u.tag == "number" && console.error(
|
|
52
52
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
53
|
), u.$$typeof) {
|
|
54
|
-
case
|
|
54
|
+
case m:
|
|
55
55
|
return "Portal";
|
|
56
|
-
case
|
|
56
|
+
case y:
|
|
57
57
|
return u.displayName || "Context";
|
|
58
|
-
case
|
|
58
|
+
case b:
|
|
59
59
|
return (u._context.displayName || "Context") + ".Consumer";
|
|
60
|
-
case
|
|
61
|
-
var
|
|
62
|
-
return u = u.displayName, u || (u =
|
|
60
|
+
case S:
|
|
61
|
+
var R = u.render;
|
|
62
|
+
return u = u.displayName, u || (u = R.displayName || R.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
|
|
63
|
+
case T:
|
|
64
|
+
return R = u.displayName || null, R !== null ? R : n(u.type) || "Memo";
|
|
63
65
|
case P:
|
|
64
|
-
|
|
65
|
-
case C:
|
|
66
|
-
T = u._payload, u = u._init;
|
|
66
|
+
R = u._payload, u = u._init;
|
|
67
67
|
try {
|
|
68
|
-
return n(u(
|
|
68
|
+
return n(u(R));
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -77,74 +77,74 @@ function nr() {
|
|
|
77
77
|
function e(u) {
|
|
78
78
|
try {
|
|
79
79
|
t(u);
|
|
80
|
-
var
|
|
80
|
+
var R = !1;
|
|
81
81
|
} catch {
|
|
82
|
-
|
|
82
|
+
R = !0;
|
|
83
83
|
}
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
var
|
|
87
|
-
return
|
|
88
|
-
|
|
84
|
+
if (R) {
|
|
85
|
+
R = console;
|
|
86
|
+
var k = R.error, j = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
|
|
87
|
+
return k.call(
|
|
88
|
+
R,
|
|
89
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
-
|
|
90
|
+
j
|
|
91
91
|
), t(u);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function r(u) {
|
|
95
|
-
if (u ===
|
|
96
|
-
if (typeof u == "object" && u !== null && u.$$typeof ===
|
|
95
|
+
if (u === h) return "<>";
|
|
96
|
+
if (typeof u == "object" && u !== null && u.$$typeof === P)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
|
-
var
|
|
100
|
-
return
|
|
99
|
+
var R = n(u);
|
|
100
|
+
return R ? "<" + R + ">" : "<...>";
|
|
101
101
|
} catch {
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
function s() {
|
|
106
|
-
var u =
|
|
106
|
+
var u = Z.A;
|
|
107
107
|
return u === null ? null : u.getOwner();
|
|
108
108
|
}
|
|
109
109
|
function i() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
112
|
function o(u) {
|
|
113
|
-
if (
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
113
|
+
if (U.call(u, "key")) {
|
|
114
|
+
var R = Object.getOwnPropertyDescriptor(u, "key").get;
|
|
115
|
+
if (R && R.isReactWarning) return !1;
|
|
116
116
|
}
|
|
117
117
|
return u.key !== void 0;
|
|
118
118
|
}
|
|
119
|
-
function c(u,
|
|
120
|
-
function
|
|
121
|
-
|
|
119
|
+
function c(u, R) {
|
|
120
|
+
function k() {
|
|
121
|
+
L || (L = !0, console.error(
|
|
122
122
|
"%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)",
|
|
123
|
-
|
|
123
|
+
R
|
|
124
124
|
));
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
126
|
+
k.isReactWarning = !0, Object.defineProperty(u, "key", {
|
|
127
|
+
get: k,
|
|
128
128
|
configurable: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function l() {
|
|
132
132
|
var u = n(this.type);
|
|
133
|
-
return
|
|
133
|
+
return B[u] || (B[u] = !0, console.error(
|
|
134
134
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
135
|
)), u = this.props.ref, u !== void 0 ? u : null;
|
|
136
136
|
}
|
|
137
|
-
function f(u,
|
|
138
|
-
var
|
|
137
|
+
function f(u, R, k, j, H, F) {
|
|
138
|
+
var N = k.ref;
|
|
139
139
|
return u = {
|
|
140
|
-
$$typeof:
|
|
140
|
+
$$typeof: E,
|
|
141
141
|
type: u,
|
|
142
|
-
key:
|
|
143
|
-
props:
|
|
144
|
-
_owner:
|
|
145
|
-
}, (
|
|
142
|
+
key: R,
|
|
143
|
+
props: k,
|
|
144
|
+
_owner: j
|
|
145
|
+
}, (N !== void 0 ? N : null) !== null ? Object.defineProperty(u, "ref", {
|
|
146
146
|
enumerable: !1,
|
|
147
|
-
get:
|
|
147
|
+
get: l
|
|
148
148
|
}) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
149
149
|
configurable: !1,
|
|
150
150
|
enumerable: !1,
|
|
@@ -159,123 +159,123 @@ function nr() {
|
|
|
159
159
|
configurable: !1,
|
|
160
160
|
enumerable: !1,
|
|
161
161
|
writable: !0,
|
|
162
|
-
value:
|
|
162
|
+
value: H
|
|
163
163
|
}), Object.defineProperty(u, "_debugTask", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
|
-
value:
|
|
167
|
+
value: F
|
|
168
168
|
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
for (
|
|
176
|
-
|
|
177
|
-
Object.freeze && Object.freeze(
|
|
170
|
+
function a(u, R, k, j, H, F) {
|
|
171
|
+
var N = R.children;
|
|
172
|
+
if (N !== void 0)
|
|
173
|
+
if (j)
|
|
174
|
+
if (tt(N)) {
|
|
175
|
+
for (j = 0; j < N.length; j++)
|
|
176
|
+
_(N[j]);
|
|
177
|
+
Object.freeze && Object.freeze(N);
|
|
178
178
|
} else
|
|
179
179
|
console.error(
|
|
180
180
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
181
|
);
|
|
182
|
-
else
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
return
|
|
182
|
+
else _(N);
|
|
183
|
+
if (U.call(R, "key")) {
|
|
184
|
+
N = n(u);
|
|
185
|
+
var A = Object.keys(R).filter(function(W) {
|
|
186
|
+
return W !== "key";
|
|
187
187
|
});
|
|
188
|
-
|
|
188
|
+
j = 0 < A.length ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}", dt[N + j] || (A = 0 < A.length ? "{" + A.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
189
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
190
|
let props = %s;
|
|
191
191
|
<%s {...props} />
|
|
192
192
|
React keys must be passed directly to JSX without using spread:
|
|
193
193
|
let props = %s;
|
|
194
194
|
<%s key={someKey} {...props} />`,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
),
|
|
195
|
+
j,
|
|
196
|
+
N,
|
|
197
|
+
A,
|
|
198
|
+
N
|
|
199
|
+
), dt[N + j] = !0);
|
|
200
200
|
}
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
|
|
205
|
-
} else
|
|
206
|
-
return
|
|
207
|
-
|
|
201
|
+
if (N = null, k !== void 0 && (e(k), N = "" + k), o(R) && (e(R.key), N = "" + R.key), "key" in R) {
|
|
202
|
+
k = {};
|
|
203
|
+
for (var C in R)
|
|
204
|
+
C !== "key" && (k[C] = R[C]);
|
|
205
|
+
} else k = R;
|
|
206
|
+
return N && c(
|
|
207
|
+
k,
|
|
208
208
|
typeof u == "function" ? u.displayName || u.name || "Unknown" : u
|
|
209
209
|
), f(
|
|
210
210
|
u,
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
N,
|
|
212
|
+
k,
|
|
213
213
|
s(),
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
H,
|
|
215
|
+
F
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
d(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof ===
|
|
218
|
+
function _(u) {
|
|
219
|
+
d(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === P && (u._payload.status === "fulfilled" ? d(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
|
|
220
220
|
}
|
|
221
221
|
function d(u) {
|
|
222
|
-
return typeof u == "object" && u !== null && u.$$typeof ===
|
|
222
|
+
return typeof u == "object" && u !== null && u.$$typeof === E;
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var v = Jt, E = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), y = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), G = Symbol.for("react.activity"), D = Symbol.for("react.client.reference"), Z = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, tt = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
v = {
|
|
228
228
|
react_stack_bottom_frame: function(u) {
|
|
229
229
|
return u();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var
|
|
233
|
-
|
|
232
|
+
var L, B = {}, lt = v.react_stack_bottom_frame.bind(
|
|
233
|
+
v,
|
|
234
234
|
i
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var
|
|
238
|
-
return
|
|
235
|
+
)(), ut = z(r(i)), dt = {};
|
|
236
|
+
Se.Fragment = h, Se.jsx = function(u, R, k) {
|
|
237
|
+
var j = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
238
|
+
return a(
|
|
239
239
|
u,
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
R,
|
|
241
|
+
k,
|
|
242
242
|
!1,
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
j ? Error("react-stack-top-frame") : lt,
|
|
244
|
+
j ? z(r(u)) : ut
|
|
245
245
|
);
|
|
246
|
-
},
|
|
247
|
-
var
|
|
248
|
-
return
|
|
246
|
+
}, Se.jsxs = function(u, R, k) {
|
|
247
|
+
var j = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
248
|
+
return a(
|
|
249
249
|
u,
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
R,
|
|
251
|
+
k,
|
|
252
252
|
!0,
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
j ? Error("react-stack-top-frame") : lt,
|
|
254
|
+
j ? z(r(u)) : ut
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
|
-
})()),
|
|
257
|
+
})()), Se;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
return
|
|
259
|
+
var on;
|
|
260
|
+
function er() {
|
|
261
|
+
return on || (on = 1, process.env.NODE_ENV === "production" ? De.exports = Qn() : De.exports = tr()), De.exports;
|
|
262
262
|
}
|
|
263
|
-
var
|
|
264
|
-
const
|
|
263
|
+
var X = er();
|
|
264
|
+
const Ke = "timeline-editor", nr = 0, We = 1, Mn = 10, ze = 160, Fe = 20, qe = 1, Je = 8, cn = 32, Ze = 20, In = 5, Be = {
|
|
265
265
|
trace: 0,
|
|
266
266
|
debug: 1,
|
|
267
267
|
info: 2,
|
|
268
268
|
warn: 3,
|
|
269
269
|
error: 4,
|
|
270
270
|
silent: 5
|
|
271
|
-
},
|
|
271
|
+
}, rr = [
|
|
272
272
|
"trace",
|
|
273
273
|
"debug",
|
|
274
274
|
"info",
|
|
275
275
|
"warn",
|
|
276
276
|
"error"
|
|
277
277
|
];
|
|
278
|
-
var
|
|
278
|
+
var sr = class Pn {
|
|
279
279
|
s;
|
|
280
280
|
ls = /* @__PURE__ */ new Map();
|
|
281
281
|
lvl;
|
|
@@ -295,10 +295,10 @@ var or = class Pn {
|
|
|
295
295
|
noop = () => {
|
|
296
296
|
};
|
|
297
297
|
bindMethods() {
|
|
298
|
-
|
|
298
|
+
rr.forEach((t) => {
|
|
299
299
|
const e = this.e.bind(this.c, t, this.n);
|
|
300
300
|
Object.defineProperty(this, t, {
|
|
301
|
-
get: () =>
|
|
301
|
+
get: () => Be[t] >= Be[this.currentLevel()] ? e : this.noop,
|
|
302
302
|
configurable: !0
|
|
303
303
|
});
|
|
304
304
|
});
|
|
@@ -309,7 +309,7 @@ var or = class Pn {
|
|
|
309
309
|
currentLevel() {
|
|
310
310
|
if (this.lvl) return this.lvl;
|
|
311
311
|
const t = this.s.get(this.storageKey());
|
|
312
|
-
return t && t in
|
|
312
|
+
return t && t in Be ? (this.lvl = t, this.lvl) : this.def ? this.def : this.r ? this.r.currentLevel() : "trace";
|
|
313
313
|
}
|
|
314
314
|
setLevel(t) {
|
|
315
315
|
return this.lvl = t, this.s.set(this.storageKey(), t), this;
|
|
@@ -345,7 +345,7 @@ function kn(n) {
|
|
|
345
345
|
return typeof s == "function" ? s.bind(t.c) : s;
|
|
346
346
|
} });
|
|
347
347
|
}
|
|
348
|
-
var
|
|
348
|
+
var ir = class {
|
|
349
349
|
get(n) {
|
|
350
350
|
return localStorage.getItem(n);
|
|
351
351
|
}
|
|
@@ -356,13 +356,13 @@ var cr = class {
|
|
|
356
356
|
localStorage.removeItem(n);
|
|
357
357
|
}
|
|
358
358
|
};
|
|
359
|
-
const
|
|
359
|
+
const or = {
|
|
360
360
|
trace: "#95bdb7",
|
|
361
361
|
debug: "#ad95b8",
|
|
362
362
|
info: "#b6bd73",
|
|
363
363
|
warn: "#88a1bb",
|
|
364
364
|
error: "#bf6c69"
|
|
365
|
-
},
|
|
365
|
+
}, an = {
|
|
366
366
|
info: "⚡️",
|
|
367
367
|
success: "✔",
|
|
368
368
|
warn: "▲",
|
|
@@ -370,42 +370,40 @@ const ar = {
|
|
|
370
370
|
log: "●",
|
|
371
371
|
trace: "◔",
|
|
372
372
|
debug: "◌"
|
|
373
|
-
},
|
|
374
|
-
const r = e ? `${
|
|
375
|
-
return (n[t] || n.log).bind(n, `%c${r}%c`, `color: ${
|
|
376
|
-
} },
|
|
377
|
-
function
|
|
373
|
+
}, cr = { bind(n, t, e) {
|
|
374
|
+
const r = e ? `${an[t]} ${String(e)}:` : `${an[t]}`;
|
|
375
|
+
return (n[t] || n.log).bind(n, `%c${r}%c`, `color: ${or[t]}; font-weight: bold;`, "color: inherit");
|
|
376
|
+
} }, Kt = kn(new sr(new ir(), cr));
|
|
377
|
+
function ar(n) {
|
|
378
378
|
let {
|
|
379
379
|
editorData: t = [],
|
|
380
380
|
effects: e = {},
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
rowHeight: l = an
|
|
381
|
+
scale: r = We,
|
|
382
|
+
scaleSplitCount: s = Mn,
|
|
383
|
+
scaleWidth: i = ze,
|
|
384
|
+
startLeft: o = Fe,
|
|
385
|
+
minScaleCount: c = Ze,
|
|
386
|
+
maxScaleCount: l = 1 / 0,
|
|
387
|
+
rowHeight: f = cn
|
|
389
388
|
} = n;
|
|
390
|
-
|
|
391
|
-
const
|
|
389
|
+
r <= 0 && (Kt.error("Error: scale must be greater than 0!"), r = We), s <= 0 && (Kt.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), i <= 0 && (Kt.warn("Warning: scaleWidth must be greater than 0!"), i = ze), o < 0 && (Kt.warn("Warning: startLeft cannot be less than 0!"), o = 0), c < 1 && (Kt.warn("Warning: minScaleCount must be greater than 1!"), c = Ze), c = parseInt(c + ""), l < c && (Kt.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), l = c), l = l === 1 / 0 ? 1 / 0 : parseInt(l + ""), f <= 0 && (Kt.warn("Warning: rowHeight must be greater than 0!"), f = cn);
|
|
390
|
+
const a = {
|
|
392
391
|
...n
|
|
393
392
|
};
|
|
394
|
-
return delete
|
|
395
|
-
...
|
|
393
|
+
return delete a.style, {
|
|
394
|
+
...a,
|
|
396
395
|
editorData: t,
|
|
397
396
|
effects: e,
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
rowHeight: l
|
|
397
|
+
scale: r,
|
|
398
|
+
scaleSplitCount: s,
|
|
399
|
+
scaleWidth: i,
|
|
400
|
+
startLeft: o,
|
|
401
|
+
minScaleCount: c,
|
|
402
|
+
maxScaleCount: l,
|
|
403
|
+
rowHeight: f
|
|
406
404
|
};
|
|
407
405
|
}
|
|
408
|
-
function
|
|
406
|
+
function kt(n, t) {
|
|
409
407
|
const {
|
|
410
408
|
startLeft: e,
|
|
411
409
|
scale: r,
|
|
@@ -413,7 +411,7 @@ function $t(n, t) {
|
|
|
413
411
|
} = t;
|
|
414
412
|
return e + n / r * s;
|
|
415
413
|
}
|
|
416
|
-
function
|
|
414
|
+
function Zt(n, t) {
|
|
417
415
|
const {
|
|
418
416
|
startLeft: e,
|
|
419
417
|
scale: r,
|
|
@@ -421,27 +419,27 @@ function re(n, t) {
|
|
|
421
419
|
} = t;
|
|
422
420
|
return (n - e) / s * r;
|
|
423
421
|
}
|
|
424
|
-
function
|
|
422
|
+
function Re(n, t) {
|
|
425
423
|
const {
|
|
426
424
|
left: e,
|
|
427
425
|
width: r
|
|
428
|
-
} = n, s =
|
|
426
|
+
} = n, s = Zt(e, t), i = Zt(e + r, t);
|
|
429
427
|
return {
|
|
430
428
|
start: s,
|
|
431
429
|
end: i
|
|
432
430
|
};
|
|
433
431
|
}
|
|
434
|
-
function
|
|
432
|
+
function en(n, t) {
|
|
435
433
|
const {
|
|
436
434
|
start: e,
|
|
437
435
|
end: r
|
|
438
|
-
} = n, s =
|
|
436
|
+
} = n, s = kt(e, t), i = kt(r, t) - s;
|
|
439
437
|
return {
|
|
440
438
|
left: s,
|
|
441
439
|
width: i
|
|
442
440
|
};
|
|
443
441
|
}
|
|
444
|
-
function
|
|
442
|
+
function lr(n, t) {
|
|
445
443
|
let e = 0;
|
|
446
444
|
return n.forEach((s) => {
|
|
447
445
|
s.actions.forEach((i) => {
|
|
@@ -449,35 +447,35 @@ function fr(n, t) {
|
|
|
449
447
|
});
|
|
450
448
|
}), Math.ceil(e / t.scale) + In;
|
|
451
449
|
}
|
|
452
|
-
function
|
|
450
|
+
function ur(n, t) {
|
|
453
451
|
const {
|
|
454
452
|
startLeft: e,
|
|
455
453
|
scaleWidth: r
|
|
456
454
|
} = t, s = Math.ceil((n - e) / r);
|
|
457
455
|
return Math.max(s + In, t.scaleCount);
|
|
458
456
|
}
|
|
459
|
-
function
|
|
457
|
+
function fr(n, t) {
|
|
460
458
|
const e = [];
|
|
461
459
|
return n.forEach((r) => {
|
|
462
|
-
e.push(
|
|
460
|
+
e.push(kt(r.start, t)), e.push(kt(r.end, t));
|
|
463
461
|
}), e;
|
|
464
462
|
}
|
|
465
|
-
var
|
|
466
|
-
var
|
|
467
|
-
function
|
|
468
|
-
if (
|
|
469
|
-
|
|
470
|
-
var n =
|
|
471
|
-
return
|
|
463
|
+
var Ce = { exports: {} }, He = {};
|
|
464
|
+
var ln;
|
|
465
|
+
function dr() {
|
|
466
|
+
if (ln) return He;
|
|
467
|
+
ln = 1;
|
|
468
|
+
var n = Jt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
469
|
+
return He.c = function(t) {
|
|
472
470
|
return n.H.useMemoCache(t);
|
|
473
|
-
},
|
|
471
|
+
}, He;
|
|
474
472
|
}
|
|
475
|
-
var
|
|
476
|
-
var
|
|
477
|
-
function
|
|
478
|
-
return
|
|
479
|
-
var n =
|
|
480
|
-
|
|
473
|
+
var Ye = {};
|
|
474
|
+
var un;
|
|
475
|
+
function hr() {
|
|
476
|
+
return un || (un = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
477
|
+
var n = Jt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
478
|
+
Ye.c = function(t) {
|
|
481
479
|
var e = n.H;
|
|
482
480
|
return e === null && console.error(
|
|
483
481
|
`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:
|
|
@@ -487,14 +485,14 @@ function pr() {
|
|
|
487
485
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
488
486
|
), e.useMemoCache(t);
|
|
489
487
|
};
|
|
490
|
-
})()),
|
|
488
|
+
})()), Ye;
|
|
491
489
|
}
|
|
492
|
-
var
|
|
493
|
-
function
|
|
494
|
-
return
|
|
490
|
+
var fn;
|
|
491
|
+
function mr() {
|
|
492
|
+
return fn || (fn = 1, process.env.NODE_ENV === "production" ? Ce.exports = dr() : Ce.exports = hr()), Ce.exports;
|
|
495
493
|
}
|
|
496
|
-
var
|
|
497
|
-
function
|
|
494
|
+
var Nt = mr();
|
|
495
|
+
function gr(n) {
|
|
498
496
|
for (var t = [], e = 1; e < arguments.length; e++)
|
|
499
497
|
t[e - 1] = arguments[e];
|
|
500
498
|
return t.map(function(r) {
|
|
@@ -503,70 +501,93 @@ function _r(n) {
|
|
|
503
501
|
}).join(" ");
|
|
504
502
|
}).join(" ");
|
|
505
503
|
}
|
|
506
|
-
function
|
|
507
|
-
return
|
|
504
|
+
function Et(...n) {
|
|
505
|
+
return gr(`${Ke}-`, ...n);
|
|
508
506
|
}
|
|
509
|
-
const
|
|
507
|
+
const pr = (n) => {
|
|
508
|
+
const t = Nt.c(11), {
|
|
509
|
+
isMoving: e,
|
|
510
|
+
movePositions: r,
|
|
511
|
+
assistPositions: s
|
|
512
|
+
} = n;
|
|
513
|
+
let i, o;
|
|
514
|
+
if (t[0] !== e || t[1] !== r || t[2] !== s) {
|
|
515
|
+
const l = r === void 0 ? [] : r;
|
|
516
|
+
let f;
|
|
517
|
+
t[5] !== s ? (f = s === void 0 ? [] : s, t[5] = s, t[6] = f) : f = t[6];
|
|
518
|
+
const a = f;
|
|
519
|
+
t[7] === Symbol.for("react.memo_cache_sentinel") ? (i = Et("drag-line-container"), t[7] = i) : i = t[7], o = e && l.filter((_) => a.includes(_)).map(_r), t[0] = e, t[1] = r, t[2] = s, t[3] = i, t[4] = o;
|
|
520
|
+
} else
|
|
521
|
+
i = t[3], o = t[4];
|
|
522
|
+
let c;
|
|
523
|
+
return t[8] !== i || t[9] !== o ? (c = /* @__PURE__ */ X.jsx("div", { className: i, children: o }), t[8] = i, t[9] = o, t[10] = c) : c = t[10], c;
|
|
524
|
+
};
|
|
525
|
+
function _r(n, t) {
|
|
526
|
+
return /* @__PURE__ */ X.jsx("div", { className: Et("drag-line"), style: {
|
|
527
|
+
left: n
|
|
528
|
+
} }, t);
|
|
529
|
+
}
|
|
530
|
+
const Oe = 1, dn = 10, hn = 10;
|
|
510
531
|
function vr(n) {
|
|
511
|
-
const t =
|
|
532
|
+
const t = Nt.c(7), e = st(Number.MIN_SAFE_INTEGER), r = st(Number.MAX_SAFE_INTEGER), s = st(Oe), i = st(void 0);
|
|
512
533
|
let o;
|
|
513
534
|
t[0] !== n ? (o = () => {
|
|
514
535
|
if (n?.current) {
|
|
515
536
|
const {
|
|
516
|
-
left:
|
|
517
|
-
width:
|
|
537
|
+
left: m,
|
|
538
|
+
width: h
|
|
518
539
|
} = n.current.getBoundingClientRect();
|
|
519
|
-
e.current =
|
|
540
|
+
e.current = m, r.current = m + h;
|
|
520
541
|
}
|
|
521
542
|
}, t[0] = n, t[1] = o) : o = t[1];
|
|
522
543
|
const c = o;
|
|
523
|
-
let
|
|
524
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
525
|
-
if (
|
|
544
|
+
let l;
|
|
545
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (l = (m, h) => {
|
|
546
|
+
if (m.clientX >= r.current || m.clientX <= e.current) {
|
|
526
547
|
i.current !== void 0 && cancelAnimationFrame(i.current);
|
|
527
|
-
const
|
|
528
|
-
s.current = Math.min(Number((
|
|
529
|
-
const
|
|
530
|
-
|
|
548
|
+
const g = Math.abs(m.clientX >= r.current ? m.clientX - r.current : m.clientX - e.current);
|
|
549
|
+
s.current = Math.min(Number((g / hn).toFixed(0)) * Oe, dn);
|
|
550
|
+
const b = (m.clientX >= r.current ? 1 : -1) * s.current, y = () => {
|
|
551
|
+
h && h(b), i.current = requestAnimationFrame(y);
|
|
531
552
|
};
|
|
532
|
-
return i.current = requestAnimationFrame(
|
|
553
|
+
return i.current = requestAnimationFrame(y), !1;
|
|
533
554
|
} else
|
|
534
555
|
i.current !== void 0 && cancelAnimationFrame(i.current);
|
|
535
556
|
return !0;
|
|
536
|
-
}, t[2] =
|
|
537
|
-
const f =
|
|
538
|
-
let
|
|
539
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
540
|
-
if (
|
|
557
|
+
}, t[2] = l) : l = t[2];
|
|
558
|
+
const f = l;
|
|
559
|
+
let a;
|
|
560
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (a = (m, h, g) => {
|
|
561
|
+
if (m.clientX >= r.current || m.clientX < e.current) {
|
|
541
562
|
i.current !== void 0 && cancelAnimationFrame(i.current);
|
|
542
|
-
const
|
|
543
|
-
s.current = Math.min(Number((
|
|
544
|
-
const
|
|
545
|
-
|
|
563
|
+
const p = Math.abs(m.clientX >= r.current ? m.clientX - r.current : m.clientX - e.current);
|
|
564
|
+
s.current = Math.min(Number((p / hn).toFixed(0)) * Oe, dn);
|
|
565
|
+
const y = (m.clientX >= r.current ? 1 : -1) * s.current, S = () => {
|
|
566
|
+
g && g(y), i.current = requestAnimationFrame(S);
|
|
546
567
|
};
|
|
547
|
-
return i.current = requestAnimationFrame(
|
|
568
|
+
return i.current = requestAnimationFrame(S), !1;
|
|
548
569
|
} else
|
|
549
570
|
i.current !== void 0 && cancelAnimationFrame(i.current);
|
|
550
571
|
return !0;
|
|
551
|
-
}, t[3] =
|
|
552
|
-
const
|
|
572
|
+
}, t[3] = a) : a = t[3];
|
|
573
|
+
const _ = a;
|
|
553
574
|
let d;
|
|
554
575
|
t[4] === Symbol.for("react.memo_cache_sentinel") ? (d = () => {
|
|
555
|
-
e.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current =
|
|
576
|
+
e.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current = Oe, i.current !== void 0 && cancelAnimationFrame(i.current);
|
|
556
577
|
}, t[4] = d) : d = t[4];
|
|
557
|
-
const
|
|
558
|
-
let
|
|
559
|
-
return t[5] !== c ? (
|
|
578
|
+
const v = d;
|
|
579
|
+
let E;
|
|
580
|
+
return t[5] !== c ? (E = {
|
|
560
581
|
initAutoScroll: c,
|
|
561
582
|
dealDragAutoScroll: f,
|
|
562
|
-
dealResizeAutoScroll:
|
|
563
|
-
stopAutoScroll:
|
|
564
|
-
}, t[5] = c, t[6] =
|
|
583
|
+
dealResizeAutoScroll: _,
|
|
584
|
+
stopAutoScroll: v
|
|
585
|
+
}, t[5] = c, t[6] = E) : E = t[6], E;
|
|
565
586
|
}
|
|
566
587
|
function br(n, t, e) {
|
|
567
588
|
return Math.max(t, Math.min(n, e));
|
|
568
589
|
}
|
|
569
|
-
const
|
|
590
|
+
const ft = {
|
|
570
591
|
toVector(n, t) {
|
|
571
592
|
return n === void 0 && (n = t), Array.isArray(n) ? n : [n, n];
|
|
572
593
|
},
|
|
@@ -583,17 +604,17 @@ const pt = {
|
|
|
583
604
|
n[0] -= t[0], n[1] -= t[1];
|
|
584
605
|
}
|
|
585
606
|
};
|
|
586
|
-
function
|
|
607
|
+
function mn(n, t, e) {
|
|
587
608
|
return t === 0 || Math.abs(t) === 1 / 0 ? Math.pow(n, e * 5) : n * t * e / (t + e * n);
|
|
588
609
|
}
|
|
589
610
|
function gn(n, t, e, r = 0.15) {
|
|
590
|
-
return r === 0 ? br(n, t, e) : n < t ? -
|
|
611
|
+
return r === 0 ? br(n, t, e) : n < t ? -mn(t - n, e - t, r) + t : n > e ? +mn(n - e, e - t, r) + e : n;
|
|
591
612
|
}
|
|
592
613
|
function yr(n, [t, e], [r, s]) {
|
|
593
|
-
const [[i, o], [c,
|
|
594
|
-
return [gn(t, i, o, r), gn(e, c,
|
|
614
|
+
const [[i, o], [c, l]] = n;
|
|
615
|
+
return [gn(t, i, o, r), gn(e, c, l, s)];
|
|
595
616
|
}
|
|
596
|
-
function
|
|
617
|
+
function Er(n, t) {
|
|
597
618
|
if (typeof n != "object" || n === null) return n;
|
|
598
619
|
var e = n[Symbol.toPrimitive];
|
|
599
620
|
if (e !== void 0) {
|
|
@@ -603,19 +624,19 @@ function wr(n, t) {
|
|
|
603
624
|
}
|
|
604
625
|
return (t === "string" ? String : Number)(n);
|
|
605
626
|
}
|
|
606
|
-
function
|
|
607
|
-
var t =
|
|
627
|
+
function wr(n) {
|
|
628
|
+
var t = Er(n, "string");
|
|
608
629
|
return typeof t == "symbol" ? t : String(t);
|
|
609
630
|
}
|
|
610
|
-
function
|
|
611
|
-
return t =
|
|
631
|
+
function gt(n, t, e) {
|
|
632
|
+
return t = wr(t), t in n ? Object.defineProperty(n, t, {
|
|
612
633
|
value: e,
|
|
613
634
|
enumerable: !0,
|
|
614
635
|
configurable: !0,
|
|
615
636
|
writable: !0
|
|
616
637
|
}) : n[t] = e, n;
|
|
617
638
|
}
|
|
618
|
-
function
|
|
639
|
+
function pn(n, t) {
|
|
619
640
|
var e = Object.keys(n);
|
|
620
641
|
if (Object.getOwnPropertySymbols) {
|
|
621
642
|
var r = Object.getOwnPropertySymbols(n);
|
|
@@ -625,18 +646,18 @@ function _n(n, t) {
|
|
|
625
646
|
}
|
|
626
647
|
return e;
|
|
627
648
|
}
|
|
628
|
-
function
|
|
649
|
+
function J(n) {
|
|
629
650
|
for (var t = 1; t < arguments.length; t++) {
|
|
630
651
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
631
|
-
t % 2 ?
|
|
632
|
-
|
|
633
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(e)) :
|
|
652
|
+
t % 2 ? pn(Object(e), !0).forEach(function(r) {
|
|
653
|
+
gt(n, r, e[r]);
|
|
654
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(e)) : pn(Object(e)).forEach(function(r) {
|
|
634
655
|
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(e, r));
|
|
635
656
|
});
|
|
636
657
|
}
|
|
637
658
|
return n;
|
|
638
659
|
}
|
|
639
|
-
const
|
|
660
|
+
const Nn = {
|
|
640
661
|
pointer: {
|
|
641
662
|
start: "down",
|
|
642
663
|
change: "move",
|
|
@@ -658,38 +679,38 @@ const jn = {
|
|
|
658
679
|
end: "end"
|
|
659
680
|
}
|
|
660
681
|
};
|
|
661
|
-
function
|
|
682
|
+
function _n(n) {
|
|
662
683
|
return n ? n[0].toUpperCase() + n.slice(1) : "";
|
|
663
684
|
}
|
|
664
685
|
const Sr = ["enter", "leave"];
|
|
665
|
-
function
|
|
686
|
+
function Rr(n = !1, t) {
|
|
666
687
|
return n && !Sr.includes(t);
|
|
667
688
|
}
|
|
668
|
-
function
|
|
669
|
-
const r =
|
|
670
|
-
return "on" +
|
|
689
|
+
function Tr(n, t = "", e = !1) {
|
|
690
|
+
const r = Nn[n], s = r && r[t] || t;
|
|
691
|
+
return "on" + _n(n) + _n(s) + (Rr(e, s) ? "Capture" : "");
|
|
671
692
|
}
|
|
672
|
-
const
|
|
693
|
+
const xr = ["gotpointercapture", "lostpointercapture"];
|
|
673
694
|
function Ar(n) {
|
|
674
695
|
let t = n.substring(2).toLowerCase();
|
|
675
696
|
const e = !!~t.indexOf("passive");
|
|
676
697
|
e && (t = t.replace("passive", ""));
|
|
677
|
-
const r =
|
|
698
|
+
const r = xr.includes(t) ? "capturecapture" : "capture", s = !!~t.indexOf(r);
|
|
678
699
|
return s && (t = t.replace("capture", "")), {
|
|
679
700
|
device: t,
|
|
680
701
|
capture: s,
|
|
681
702
|
passive: e
|
|
682
703
|
};
|
|
683
704
|
}
|
|
684
|
-
function
|
|
685
|
-
const e =
|
|
705
|
+
function Dr(n, t = "") {
|
|
706
|
+
const e = Nn[n], r = e && e[t] || t;
|
|
686
707
|
return n + r;
|
|
687
708
|
}
|
|
688
|
-
function
|
|
709
|
+
function Ve(n) {
|
|
689
710
|
return "touches" in n;
|
|
690
711
|
}
|
|
691
712
|
function Wn(n) {
|
|
692
|
-
return
|
|
713
|
+
return Ve(n) ? "touch" : "pointerType" in n ? n.pointerType : "mouse";
|
|
693
714
|
}
|
|
694
715
|
function Cr(n) {
|
|
695
716
|
return Array.from(n.touches).filter((t) => {
|
|
@@ -697,20 +718,20 @@ function Cr(n) {
|
|
|
697
718
|
return t.target === n.currentTarget || ((e = n.currentTarget) === null || e === void 0 || (r = e.contains) === null || r === void 0 ? void 0 : r.call(e, t.target));
|
|
698
719
|
});
|
|
699
720
|
}
|
|
700
|
-
function
|
|
721
|
+
function Or(n) {
|
|
701
722
|
return n.type === "touchend" || n.type === "touchcancel" ? n.changedTouches : n.targetTouches;
|
|
702
723
|
}
|
|
703
724
|
function zn(n) {
|
|
704
|
-
return
|
|
725
|
+
return Ve(n) ? Or(n)[0] : n;
|
|
705
726
|
}
|
|
706
727
|
function Lr(n) {
|
|
707
728
|
return Cr(n).map((t) => t.identifier);
|
|
708
729
|
}
|
|
709
|
-
function
|
|
730
|
+
function Xe(n) {
|
|
710
731
|
const t = zn(n);
|
|
711
|
-
return
|
|
732
|
+
return Ve(n) ? t.identifier : t.pointerId;
|
|
712
733
|
}
|
|
713
|
-
function
|
|
734
|
+
function vn(n) {
|
|
714
735
|
const t = zn(n);
|
|
715
736
|
return [t.clientX, t.clientY];
|
|
716
737
|
}
|
|
@@ -732,7 +753,7 @@ function Mr(n) {
|
|
|
732
753
|
}
|
|
733
754
|
return t;
|
|
734
755
|
}
|
|
735
|
-
function
|
|
756
|
+
function je(n, ...t) {
|
|
736
757
|
return typeof n == "function" ? n(...t) : n;
|
|
737
758
|
}
|
|
738
759
|
function Ir() {
|
|
@@ -745,7 +766,7 @@ function Pr(...n) {
|
|
|
745
766
|
return t;
|
|
746
767
|
};
|
|
747
768
|
}
|
|
748
|
-
function
|
|
769
|
+
function bn(n, t) {
|
|
749
770
|
return Object.assign({}, t, n || {});
|
|
750
771
|
}
|
|
751
772
|
const kr = 32;
|
|
@@ -788,7 +809,7 @@ class Nr {
|
|
|
788
809
|
}
|
|
789
810
|
start(t) {
|
|
790
811
|
const e = this.state, r = this.config;
|
|
791
|
-
e._active || (this.reset(), this.computeInitial(), e._active = !0, e.target = t.target, e.currentTarget = t.currentTarget, e.lastOffset = r.from ?
|
|
812
|
+
e._active || (this.reset(), this.computeInitial(), e._active = !0, e.target = t.target, e.currentTarget = t.currentTarget, e.lastOffset = r.from ? je(r.from, e) : e.offset, e.offset = e.lastOffset, e.startTime = e.timeStamp = t.timeStamp);
|
|
792
813
|
}
|
|
793
814
|
computeValues(t) {
|
|
794
815
|
const e = this.state;
|
|
@@ -807,37 +828,37 @@ class Nr {
|
|
|
807
828
|
e.args = this.args;
|
|
808
829
|
let i = 0;
|
|
809
830
|
if (t && (e.event = t, r.preventDefault && t.cancelable && e.event.preventDefault(), e.type = t.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s, Mr(t)), s.down = s.pressed = s.buttons % 2 === 1 || s.touches > 0, i = t.timeStamp - e.timeStamp, e.timeStamp = t.timeStamp, e.elapsedTime = e.timeStamp - e.startTime), e._active) {
|
|
810
|
-
const
|
|
811
|
-
|
|
831
|
+
const x = e._delta.map(Math.abs);
|
|
832
|
+
ft.addTo(e._distance, x);
|
|
812
833
|
}
|
|
813
834
|
this.axisIntent && this.axisIntent(t);
|
|
814
|
-
const [o, c] = e._movement, [
|
|
815
|
-
_step:
|
|
816
|
-
values:
|
|
835
|
+
const [o, c] = e._movement, [l, f] = r.threshold, {
|
|
836
|
+
_step: a,
|
|
837
|
+
values: _
|
|
817
838
|
} = e;
|
|
818
|
-
if (r.hasCustomTransform ? (
|
|
839
|
+
if (r.hasCustomTransform ? (a[0] === !1 && (a[0] = Math.abs(o) >= l && _[0]), a[1] === !1 && (a[1] = Math.abs(c) >= f && _[1])) : (a[0] === !1 && (a[0] = Math.abs(o) >= l && Math.sign(o) * l), a[1] === !1 && (a[1] = Math.abs(c) >= f && Math.sign(c) * f)), e.intentional = a[0] !== !1 || a[1] !== !1, !e.intentional) return;
|
|
819
840
|
const d = [0, 0];
|
|
820
841
|
if (r.hasCustomTransform) {
|
|
821
|
-
const [
|
|
822
|
-
d[0] =
|
|
842
|
+
const [x, w] = _;
|
|
843
|
+
d[0] = a[0] !== !1 ? x - a[0] : 0, d[1] = a[1] !== !1 ? w - a[1] : 0;
|
|
823
844
|
} else
|
|
824
|
-
d[0] =
|
|
845
|
+
d[0] = a[0] !== !1 ? o - a[0] : 0, d[1] = a[1] !== !1 ? c - a[1] : 0;
|
|
825
846
|
this.restrictToAxis && !e._blocked && this.restrictToAxis(d);
|
|
826
|
-
const
|
|
827
|
-
|
|
828
|
-
const [
|
|
829
|
-
e.overflow = [
|
|
830
|
-
const
|
|
831
|
-
if (e.offset = yr(e._bounds, e.offset,
|
|
832
|
-
e.delta =
|
|
833
|
-
const
|
|
834
|
-
|
|
847
|
+
const v = e.offset, E = e._active && !e._blocked || e.active;
|
|
848
|
+
E && (e.first = e._active && !e.active, e.last = !e._active && e.active, e.active = s[this.ingKey] = e._active, t && (e.first && ("bounds" in r && (e._bounds = je(r.bounds, e)), this.setup && this.setup()), e.movement = d, this.computeOffset()));
|
|
849
|
+
const [m, h] = e.offset, [[g, p], [b, y]] = e._bounds;
|
|
850
|
+
e.overflow = [m < g ? -1 : m > p ? 1 : 0, h < b ? -1 : h > y ? 1 : 0], e._movementBound[0] = e.overflow[0] ? e._movementBound[0] === !1 ? e._movement[0] : e._movementBound[0] : !1, e._movementBound[1] = e.overflow[1] ? e._movementBound[1] === !1 ? e._movement[1] : e._movementBound[1] : !1;
|
|
851
|
+
const S = e._active ? r.rubberband || [0, 0] : [0, 0];
|
|
852
|
+
if (e.offset = yr(e._bounds, e.offset, S), e.delta = ft.sub(e.offset, v), this.computeMovement(), E && (!e.last || i > kr)) {
|
|
853
|
+
e.delta = ft.sub(e.offset, v);
|
|
854
|
+
const x = e.delta.map(Math.abs);
|
|
855
|
+
ft.addTo(e.distance, x), e.direction = e.delta.map(Math.sign), e._direction = e._delta.map(Math.sign), !e.first && i > 0 && (e.velocity = [x[0] / i, x[1] / i], e.timeDelta = i);
|
|
835
856
|
}
|
|
836
857
|
}
|
|
837
858
|
emit() {
|
|
838
859
|
const t = this.state, e = this.shared, r = this.config;
|
|
839
860
|
if (t._active || this.clean(), (t._blocked || !t.intentional) && !t._force && !r.triggerAllEvents) return;
|
|
840
|
-
const s = this.handler(
|
|
861
|
+
const s = this.handler(J(J(J({}, e), t), {}, {
|
|
841
862
|
[this.aliasKey]: t.values
|
|
842
863
|
}));
|
|
843
864
|
s !== void 0 && (t.memo = s);
|
|
@@ -846,16 +867,16 @@ class Nr {
|
|
|
846
867
|
this.eventStore.clean(), this.timeoutStore.clean();
|
|
847
868
|
}
|
|
848
869
|
}
|
|
849
|
-
function
|
|
870
|
+
function Wr([n, t], e) {
|
|
850
871
|
const r = Math.abs(n), s = Math.abs(t);
|
|
851
872
|
if (r > s && r > e)
|
|
852
873
|
return "x";
|
|
853
874
|
if (s > r && s > e)
|
|
854
875
|
return "y";
|
|
855
876
|
}
|
|
856
|
-
class
|
|
877
|
+
class zr extends Nr {
|
|
857
878
|
constructor(...t) {
|
|
858
|
-
super(...t),
|
|
879
|
+
super(...t), gt(this, "aliasKey", "xy");
|
|
859
880
|
}
|
|
860
881
|
reset() {
|
|
861
882
|
super.reset(), this.state.axis = void 0;
|
|
@@ -864,16 +885,16 @@ class Wr extends Nr {
|
|
|
864
885
|
this.state.offset = [0, 0], this.state.lastOffset = [0, 0];
|
|
865
886
|
}
|
|
866
887
|
computeOffset() {
|
|
867
|
-
this.state.offset =
|
|
888
|
+
this.state.offset = ft.add(this.state.lastOffset, this.state.movement);
|
|
868
889
|
}
|
|
869
890
|
computeMovement() {
|
|
870
|
-
this.state.movement =
|
|
891
|
+
this.state.movement = ft.sub(this.state.offset, this.state.lastOffset);
|
|
871
892
|
}
|
|
872
893
|
axisIntent(t) {
|
|
873
894
|
const e = this.state, r = this.config;
|
|
874
895
|
if (!e.axis && t) {
|
|
875
896
|
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[Wn(t)] : r.axisThreshold;
|
|
876
|
-
e.axis =
|
|
897
|
+
e.axis = Wr(e._movement, s);
|
|
877
898
|
}
|
|
878
899
|
e._blocked = (r.lockDirection || !!r.axis) && !e.axis || !!r.axis && r.axis !== e.axis;
|
|
879
900
|
}
|
|
@@ -889,12 +910,12 @@ class Wr extends Nr {
|
|
|
889
910
|
}
|
|
890
911
|
}
|
|
891
912
|
}
|
|
892
|
-
const
|
|
913
|
+
const yn = (n) => n, En = 0.15, nn = {
|
|
893
914
|
enabled(n = !0) {
|
|
894
915
|
return n;
|
|
895
916
|
},
|
|
896
917
|
eventOptions(n, t, e) {
|
|
897
|
-
return
|
|
918
|
+
return J(J({}, e.shared.eventOptions), n);
|
|
898
919
|
},
|
|
899
920
|
preventDefault(n = !1) {
|
|
900
921
|
return n;
|
|
@@ -909,29 +930,29 @@ const wn = (n) => n, En = 0.15, rn = {
|
|
|
909
930
|
case !1:
|
|
910
931
|
return [0, 0];
|
|
911
932
|
default:
|
|
912
|
-
return
|
|
933
|
+
return ft.toVector(n);
|
|
913
934
|
}
|
|
914
935
|
},
|
|
915
936
|
from(n) {
|
|
916
937
|
if (typeof n == "function") return n;
|
|
917
|
-
if (n != null) return
|
|
938
|
+
if (n != null) return ft.toVector(n);
|
|
918
939
|
},
|
|
919
940
|
transform(n, t, e) {
|
|
920
941
|
const r = n || e.shared.transform;
|
|
921
942
|
if (this.hasCustomTransform = !!r, process.env.NODE_ENV === "development") {
|
|
922
|
-
const s = r ||
|
|
943
|
+
const s = r || yn;
|
|
923
944
|
return (i) => {
|
|
924
945
|
const o = s(i);
|
|
925
946
|
return (!isFinite(o[0]) || !isFinite(o[1])) && console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${o[0]},${[1]}]`), o;
|
|
926
947
|
};
|
|
927
948
|
}
|
|
928
|
-
return r ||
|
|
949
|
+
return r || yn;
|
|
929
950
|
},
|
|
930
951
|
threshold(n) {
|
|
931
|
-
return
|
|
952
|
+
return ft.toVector(n, 0);
|
|
932
953
|
}
|
|
933
954
|
};
|
|
934
|
-
process.env.NODE_ENV === "development" && Object.assign(
|
|
955
|
+
process.env.NODE_ENV === "development" && Object.assign(nn, {
|
|
935
956
|
domTarget(n) {
|
|
936
957
|
if (n !== void 0)
|
|
937
958
|
throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
|
|
@@ -948,18 +969,18 @@ process.env.NODE_ENV === "development" && Object.assign(rn, {
|
|
|
948
969
|
return NaN;
|
|
949
970
|
}
|
|
950
971
|
});
|
|
951
|
-
const
|
|
972
|
+
const jr = 0, Te = J(J({}, nn), {}, {
|
|
952
973
|
axis(n, t, {
|
|
953
974
|
axis: e
|
|
954
975
|
}) {
|
|
955
976
|
if (this.lockDirection = e === "lock", !this.lockDirection) return e;
|
|
956
977
|
},
|
|
957
|
-
axisThreshold(n =
|
|
978
|
+
axisThreshold(n = jr) {
|
|
958
979
|
return n;
|
|
959
980
|
},
|
|
960
981
|
bounds(n = {}) {
|
|
961
982
|
if (typeof n == "function")
|
|
962
|
-
return (i) =>
|
|
983
|
+
return (i) => Te.bounds(n(i));
|
|
963
984
|
if ("current" in n)
|
|
964
985
|
return () => n.current;
|
|
965
986
|
if (typeof HTMLElement == "function" && n instanceof HTMLElement)
|
|
@@ -972,15 +993,15 @@ const zr = 0, Oe = nt(nt({}, rn), {}, {
|
|
|
972
993
|
} = n;
|
|
973
994
|
return [[t, e], [r, s]];
|
|
974
995
|
}
|
|
975
|
-
}),
|
|
996
|
+
}), wn = {
|
|
976
997
|
ArrowRight: (n, t = 1) => [n * t, 0],
|
|
977
998
|
ArrowLeft: (n, t = 1) => [-1 * n * t, 0],
|
|
978
999
|
ArrowUp: (n, t = 1) => [0, -1 * n * t],
|
|
979
1000
|
ArrowDown: (n, t = 1) => [0, n * t]
|
|
980
1001
|
};
|
|
981
|
-
class Fr extends
|
|
1002
|
+
class Fr extends zr {
|
|
982
1003
|
constructor(...t) {
|
|
983
|
-
super(...t),
|
|
1004
|
+
super(...t), gt(this, "ingKey", "dragging");
|
|
984
1005
|
}
|
|
985
1006
|
reset() {
|
|
986
1007
|
super.reset();
|
|
@@ -996,7 +1017,7 @@ class Fr extends Wr {
|
|
|
996
1017
|
top: e.top - r.top + t.offset[1],
|
|
997
1018
|
bottom: e.bottom - r.bottom + t.offset[1]
|
|
998
1019
|
};
|
|
999
|
-
t._bounds =
|
|
1020
|
+
t._bounds = Te.bounds(s);
|
|
1000
1021
|
}
|
|
1001
1022
|
}
|
|
1002
1023
|
cancel() {
|
|
@@ -1015,7 +1036,7 @@ class Fr extends Wr {
|
|
|
1015
1036
|
const e = this.config, r = this.state;
|
|
1016
1037
|
if (t.buttons != null && (Array.isArray(e.pointerButtons) ? !e.pointerButtons.includes(t.buttons) : e.pointerButtons !== -1 && e.pointerButtons !== t.buttons)) return;
|
|
1017
1038
|
const s = this.ctrl.setEventIds(t);
|
|
1018
|
-
e.pointerCapture && t.target.setPointerCapture(t.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(t), this.setupPointer(t), r._pointerId =
|
|
1039
|
+
e.pointerCapture && t.target.setPointerCapture(t.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(t), this.setupPointer(t), r._pointerId = Xe(t), r._pointerActive = !0, this.computeValues(vn(t)), this.computeInitial(), e.preventScrollAxis && Wn(t) !== "mouse" ? (r._active = !1, this.setupScrollPrevention(t)) : e.delay > 0 ? (this.setupDelayTrigger(t), e.triggerAllEvents && (this.compute(t), this.emit())) : this.startPointerDrag(t));
|
|
1019
1040
|
}
|
|
1020
1041
|
startPointerDrag(t) {
|
|
1021
1042
|
const e = this.state;
|
|
@@ -1024,10 +1045,10 @@ class Fr extends Wr {
|
|
|
1024
1045
|
pointerMove(t) {
|
|
1025
1046
|
const e = this.state, r = this.config;
|
|
1026
1047
|
if (!e._pointerActive) return;
|
|
1027
|
-
const s =
|
|
1048
|
+
const s = Xe(t);
|
|
1028
1049
|
if (e._pointerId !== void 0 && s !== e._pointerId) return;
|
|
1029
|
-
const i =
|
|
1030
|
-
if (document.pointerLockElement === t.target ? e._delta = [t.movementX, t.movementY] : (e._delta =
|
|
1050
|
+
const i = vn(t);
|
|
1051
|
+
if (document.pointerLockElement === t.target ? e._delta = [t.movementX, t.movementY] : (e._delta = ft.sub(i, e._values), this.computeValues(i)), ft.addTo(e._movement, e._delta), this.compute(t), e._delayed && e.intentional) {
|
|
1031
1052
|
this.timeoutStore.remove("dragDelay"), e.active = !1, this.startPointerDrag(t);
|
|
1032
1053
|
return;
|
|
1033
1054
|
}
|
|
@@ -1053,17 +1074,17 @@ class Fr extends Wr {
|
|
|
1053
1074
|
}
|
|
1054
1075
|
const e = this.state, r = this.config;
|
|
1055
1076
|
if (!e._active || !e._pointerActive) return;
|
|
1056
|
-
const s =
|
|
1077
|
+
const s = Xe(t);
|
|
1057
1078
|
if (e._pointerId !== void 0 && s !== e._pointerId) return;
|
|
1058
1079
|
this.state._pointerActive = !1, this.setActive(), this.compute(t);
|
|
1059
1080
|
const [i, o] = e._distance;
|
|
1060
1081
|
if (e.tap = i <= r.tapsThreshold && o <= r.tapsThreshold, e.tap && r.filterTaps)
|
|
1061
1082
|
e._force = !0;
|
|
1062
1083
|
else {
|
|
1063
|
-
const [c,
|
|
1064
|
-
if (e.elapsedTime <
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1084
|
+
const [c, l] = e._delta, [f, a] = e._movement, [_, d] = r.swipe.velocity, [v, E] = r.swipe.distance, m = r.swipe.duration;
|
|
1085
|
+
if (e.elapsedTime < m) {
|
|
1086
|
+
const h = Math.abs(c / e.timeDelta), g = Math.abs(l / e.timeDelta);
|
|
1087
|
+
h > _ && Math.abs(f) > v && (e.swipe[0] = Math.sign(c)), g > d && Math.abs(a) > E && (e.swipe[1] = Math.sign(l));
|
|
1067
1088
|
}
|
|
1068
1089
|
}
|
|
1069
1090
|
this.emit();
|
|
@@ -1102,14 +1123,14 @@ class Fr extends Wr {
|
|
|
1102
1123
|
}, this.config.delay);
|
|
1103
1124
|
}
|
|
1104
1125
|
keyDown(t) {
|
|
1105
|
-
const e =
|
|
1126
|
+
const e = wn[t.key];
|
|
1106
1127
|
if (e) {
|
|
1107
1128
|
const r = this.state, s = t.shiftKey ? 10 : t.altKey ? 0.1 : 1;
|
|
1108
|
-
this.start(t), r._delta = e(this.config.keyboardDisplacement, s), r._keyboardActive = !0,
|
|
1129
|
+
this.start(t), r._delta = e(this.config.keyboardDisplacement, s), r._keyboardActive = !0, ft.addTo(r._movement, r._delta), this.compute(t), this.emit();
|
|
1109
1130
|
}
|
|
1110
1131
|
}
|
|
1111
1132
|
keyUp(t) {
|
|
1112
|
-
t.key in
|
|
1133
|
+
t.key in wn && (this.state._keyboardActive = !1, this.setActive(), this.compute(t), this.emit());
|
|
1113
1134
|
}
|
|
1114
1135
|
bind(t) {
|
|
1115
1136
|
const e = this.config.device;
|
|
@@ -1122,38 +1143,38 @@ class Fr extends Wr {
|
|
|
1122
1143
|
function Vr(n) {
|
|
1123
1144
|
"persist" in n && typeof n.persist == "function" && n.persist();
|
|
1124
1145
|
}
|
|
1125
|
-
const
|
|
1126
|
-
function
|
|
1127
|
-
return
|
|
1146
|
+
const xe = typeof window < "u" && window.document && window.document.createElement;
|
|
1147
|
+
function jn() {
|
|
1148
|
+
return xe && "ontouchstart" in window;
|
|
1128
1149
|
}
|
|
1129
1150
|
function $r() {
|
|
1130
|
-
return
|
|
1151
|
+
return jn() || xe && window.navigator.maxTouchPoints > 1;
|
|
1131
1152
|
}
|
|
1132
1153
|
function Ur() {
|
|
1133
|
-
return
|
|
1134
|
-
}
|
|
1135
|
-
function Hr() {
|
|
1136
|
-
return Ce && "exitPointerLock" in window.document;
|
|
1154
|
+
return xe && "onpointerdown" in window;
|
|
1137
1155
|
}
|
|
1138
1156
|
function Br() {
|
|
1157
|
+
return xe && "exitPointerLock" in window.document;
|
|
1158
|
+
}
|
|
1159
|
+
function Hr() {
|
|
1139
1160
|
try {
|
|
1140
1161
|
return "constructor" in GestureEvent;
|
|
1141
1162
|
} catch {
|
|
1142
1163
|
return !1;
|
|
1143
1164
|
}
|
|
1144
1165
|
}
|
|
1145
|
-
const
|
|
1146
|
-
isBrowser:
|
|
1147
|
-
gesture:
|
|
1148
|
-
touch:
|
|
1166
|
+
const vt = {
|
|
1167
|
+
isBrowser: xe,
|
|
1168
|
+
gesture: Hr(),
|
|
1169
|
+
touch: jn(),
|
|
1149
1170
|
touchscreen: $r(),
|
|
1150
1171
|
pointer: Ur(),
|
|
1151
|
-
pointerLock:
|
|
1152
|
-
},
|
|
1172
|
+
pointerLock: Br()
|
|
1173
|
+
}, Yr = 250, Xr = 180, Gr = 0.5, Kr = 50, qr = 250, Jr = 10, Sn = {
|
|
1153
1174
|
mouse: 0,
|
|
1154
1175
|
touch: 0,
|
|
1155
1176
|
pen: 8
|
|
1156
|
-
},
|
|
1177
|
+
}, Fn = J(J({}, Te), {}, {
|
|
1157
1178
|
device(n, t, {
|
|
1158
1179
|
pointer: {
|
|
1159
1180
|
touch: e = !1,
|
|
@@ -1161,12 +1182,12 @@ const Mt = {
|
|
|
1161
1182
|
mouse: s = !1
|
|
1162
1183
|
} = {}
|
|
1163
1184
|
}) {
|
|
1164
|
-
return this.pointerLock = r &&
|
|
1185
|
+
return this.pointerLock = r && vt.pointerLock, vt.touch && e ? "touch" : this.pointerLock ? "mouse" : vt.pointer && !s ? "pointer" : vt.touch ? "touch" : "mouse";
|
|
1165
1186
|
},
|
|
1166
1187
|
preventScrollAxis(n, t, {
|
|
1167
1188
|
preventScroll: e
|
|
1168
1189
|
}) {
|
|
1169
|
-
if (this.preventScrollDelay = typeof e == "number" ? e : e || e === void 0 && n ?
|
|
1190
|
+
if (this.preventScrollDelay = typeof e == "number" ? e : e || e === void 0 && n ? Yr : void 0, !(!vt.touchscreen || e === !1))
|
|
1170
1191
|
return n || (e !== void 0 ? "y" : void 0);
|
|
1171
1192
|
},
|
|
1172
1193
|
pointerCapture(n, t, {
|
|
@@ -1183,7 +1204,7 @@ const Mt = {
|
|
|
1183
1204
|
tapsThreshold: r = 3,
|
|
1184
1205
|
axis: s = void 0
|
|
1185
1206
|
}) {
|
|
1186
|
-
const i =
|
|
1207
|
+
const i = ft.toVector(n, e ? r : s ? 1 : 0);
|
|
1187
1208
|
return this.filterTaps = e, this.tapsThreshold = r, i;
|
|
1188
1209
|
},
|
|
1189
1210
|
swipe({
|
|
@@ -1192,15 +1213,15 @@ const Mt = {
|
|
|
1192
1213
|
duration: e = qr
|
|
1193
1214
|
} = {}) {
|
|
1194
1215
|
return {
|
|
1195
|
-
velocity: this.transform(
|
|
1196
|
-
distance: this.transform(
|
|
1216
|
+
velocity: this.transform(ft.toVector(n)),
|
|
1217
|
+
distance: this.transform(ft.toVector(t)),
|
|
1197
1218
|
duration: e
|
|
1198
1219
|
};
|
|
1199
1220
|
},
|
|
1200
1221
|
delay(n = 0) {
|
|
1201
1222
|
switch (n) {
|
|
1202
1223
|
case !0:
|
|
1203
|
-
return
|
|
1224
|
+
return Xr;
|
|
1204
1225
|
case !1:
|
|
1205
1226
|
return 0;
|
|
1206
1227
|
default:
|
|
@@ -1208,13 +1229,13 @@ const Mt = {
|
|
|
1208
1229
|
}
|
|
1209
1230
|
},
|
|
1210
1231
|
axisThreshold(n) {
|
|
1211
|
-
return n ?
|
|
1232
|
+
return n ? J(J({}, Sn), n) : Sn;
|
|
1212
1233
|
},
|
|
1213
1234
|
keyboardDisplacement(n = Jr) {
|
|
1214
1235
|
return n;
|
|
1215
1236
|
}
|
|
1216
1237
|
});
|
|
1217
|
-
process.env.NODE_ENV === "development" && Object.assign(
|
|
1238
|
+
process.env.NODE_ENV === "development" && Object.assign(Fn, {
|
|
1218
1239
|
useTouch(n) {
|
|
1219
1240
|
if (n !== void 0)
|
|
1220
1241
|
throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");
|
|
@@ -1241,18 +1262,18 @@ process.env.NODE_ENV === "development" && Object.assign(Vn, {
|
|
|
1241
1262
|
return NaN;
|
|
1242
1263
|
}
|
|
1243
1264
|
});
|
|
1244
|
-
|
|
1265
|
+
J(J({}, nn), {}, {
|
|
1245
1266
|
device(n, t, {
|
|
1246
1267
|
shared: e,
|
|
1247
1268
|
pointer: {
|
|
1248
1269
|
touch: r = !1
|
|
1249
1270
|
} = {}
|
|
1250
1271
|
}) {
|
|
1251
|
-
if (e.target && !
|
|
1252
|
-
if (
|
|
1253
|
-
if (
|
|
1254
|
-
if (
|
|
1255
|
-
if (
|
|
1272
|
+
if (e.target && !vt.touch && vt.gesture) return "gesture";
|
|
1273
|
+
if (vt.touch && r) return "touch";
|
|
1274
|
+
if (vt.touchscreen) {
|
|
1275
|
+
if (vt.pointer) return "pointer";
|
|
1276
|
+
if (vt.touch) return "touch";
|
|
1256
1277
|
}
|
|
1257
1278
|
},
|
|
1258
1279
|
bounds(n, t, {
|
|
@@ -1260,13 +1281,13 @@ nt(nt({}, rn), {}, {
|
|
|
1260
1281
|
angleBounds: r = {}
|
|
1261
1282
|
}) {
|
|
1262
1283
|
const s = (o) => {
|
|
1263
|
-
const c =
|
|
1284
|
+
const c = bn(je(e, o), {
|
|
1264
1285
|
min: -1 / 0,
|
|
1265
1286
|
max: 1 / 0
|
|
1266
1287
|
});
|
|
1267
1288
|
return [c.min, c.max];
|
|
1268
1289
|
}, i = (o) => {
|
|
1269
|
-
const c =
|
|
1290
|
+
const c = bn(je(r, o), {
|
|
1270
1291
|
min: -1 / 0,
|
|
1271
1292
|
max: 1 / 0
|
|
1272
1293
|
});
|
|
@@ -1275,7 +1296,7 @@ nt(nt({}, rn), {}, {
|
|
|
1275
1296
|
return typeof e != "function" && typeof r != "function" ? [s(), i()] : (o) => [s(o), i(o)];
|
|
1276
1297
|
},
|
|
1277
1298
|
threshold(n, t, e) {
|
|
1278
|
-
return this.lockDirection = e.axis === "lock",
|
|
1299
|
+
return this.lockDirection = e.axis === "lock", ft.toVector(n, this.lockDirection ? [0.1, 3] : 0);
|
|
1279
1300
|
},
|
|
1280
1301
|
modifierKey(n) {
|
|
1281
1302
|
return n === void 0 ? "ctrlKey" : n;
|
|
@@ -1284,20 +1305,20 @@ nt(nt({}, rn), {}, {
|
|
|
1284
1305
|
return n;
|
|
1285
1306
|
}
|
|
1286
1307
|
});
|
|
1287
|
-
|
|
1308
|
+
J(J({}, Te), {}, {
|
|
1288
1309
|
mouseOnly: (n = !0) => n
|
|
1289
1310
|
});
|
|
1290
|
-
|
|
1311
|
+
J(J({}, Te), {}, {
|
|
1291
1312
|
mouseOnly: (n = !0) => n
|
|
1292
1313
|
});
|
|
1293
|
-
const
|
|
1314
|
+
const Vn = /* @__PURE__ */ new Map(), Qe = /* @__PURE__ */ new Map();
|
|
1294
1315
|
function Zr(n) {
|
|
1295
|
-
|
|
1316
|
+
Vn.set(n.key, n.engine), Qe.set(n.key, n.resolver);
|
|
1296
1317
|
}
|
|
1297
1318
|
const Qr = {
|
|
1298
1319
|
key: "drag",
|
|
1299
1320
|
engine: Fr,
|
|
1300
|
-
resolver:
|
|
1321
|
+
resolver: Fn
|
|
1301
1322
|
};
|
|
1302
1323
|
function ts(n, t) {
|
|
1303
1324
|
if (n == null) return {};
|
|
@@ -1324,7 +1345,7 @@ const ns = {
|
|
|
1324
1345
|
enabled(n = !0) {
|
|
1325
1346
|
return n;
|
|
1326
1347
|
},
|
|
1327
|
-
window(n =
|
|
1348
|
+
window(n = vt.isBrowser ? window : void 0) {
|
|
1328
1349
|
return n;
|
|
1329
1350
|
},
|
|
1330
1351
|
eventOptions({
|
|
@@ -1340,7 +1361,7 @@ const ns = {
|
|
|
1340
1361
|
return n;
|
|
1341
1362
|
}
|
|
1342
1363
|
}, rs = ["target", "eventOptions", "window", "enabled", "transform"];
|
|
1343
|
-
function
|
|
1364
|
+
function Me(n = {}, t) {
|
|
1344
1365
|
const e = {};
|
|
1345
1366
|
for (const [r, s] of Object.entries(t))
|
|
1346
1367
|
switch (typeof s) {
|
|
@@ -1352,7 +1373,7 @@ function ke(n = {}, t) {
|
|
|
1352
1373
|
e[r] = s.call(e, n[r], r, n);
|
|
1353
1374
|
break;
|
|
1354
1375
|
case "object":
|
|
1355
|
-
e[r] =
|
|
1376
|
+
e[r] = Me(n[r], s);
|
|
1356
1377
|
break;
|
|
1357
1378
|
case "boolean":
|
|
1358
1379
|
s && (e[r] = n[r]);
|
|
@@ -1366,45 +1387,45 @@ function ss(n, t, e = {}) {
|
|
|
1366
1387
|
eventOptions: i,
|
|
1367
1388
|
window: o,
|
|
1368
1389
|
enabled: c,
|
|
1369
|
-
transform:
|
|
1390
|
+
transform: l
|
|
1370
1391
|
} = r, f = es(r, rs);
|
|
1371
|
-
if (e.shared =
|
|
1392
|
+
if (e.shared = Me({
|
|
1372
1393
|
target: s,
|
|
1373
1394
|
eventOptions: i,
|
|
1374
1395
|
window: o,
|
|
1375
1396
|
enabled: c,
|
|
1376
|
-
transform:
|
|
1397
|
+
transform: l
|
|
1377
1398
|
}, ns), t) {
|
|
1378
|
-
const
|
|
1379
|
-
e[t] =
|
|
1399
|
+
const a = Qe.get(t);
|
|
1400
|
+
e[t] = Me(J({
|
|
1380
1401
|
shared: e.shared
|
|
1381
|
-
}, f),
|
|
1402
|
+
}, f), a);
|
|
1382
1403
|
} else
|
|
1383
|
-
for (const
|
|
1384
|
-
const
|
|
1385
|
-
if (
|
|
1386
|
-
e[
|
|
1404
|
+
for (const a in f) {
|
|
1405
|
+
const _ = Qe.get(a);
|
|
1406
|
+
if (_)
|
|
1407
|
+
e[a] = Me(J({
|
|
1387
1408
|
shared: e.shared
|
|
1388
|
-
}, f[
|
|
1389
|
-
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(
|
|
1390
|
-
if (
|
|
1409
|
+
}, f[a]), _);
|
|
1410
|
+
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(a)) {
|
|
1411
|
+
if (a === "domTarget")
|
|
1391
1412
|
throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
|
|
1392
|
-
console.warn(`[@use-gesture]: Unknown config key \`${
|
|
1413
|
+
console.warn(`[@use-gesture]: Unknown config key \`${a}\` was used. Please read the documentation for further information.`);
|
|
1393
1414
|
}
|
|
1394
1415
|
}
|
|
1395
1416
|
return e;
|
|
1396
1417
|
}
|
|
1397
|
-
class
|
|
1418
|
+
class $n {
|
|
1398
1419
|
constructor(t, e) {
|
|
1399
|
-
|
|
1420
|
+
gt(this, "_listeners", /* @__PURE__ */ new Set()), this._ctrl = t, this._gestureKey = e;
|
|
1400
1421
|
}
|
|
1401
1422
|
add(t, e, r, s, i) {
|
|
1402
|
-
const o = this._listeners, c =
|
|
1423
|
+
const o = this._listeners, c = Dr(e, r), l = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, f = J(J({}, l), i);
|
|
1403
1424
|
t.addEventListener(c, s, f);
|
|
1404
|
-
const
|
|
1405
|
-
t.removeEventListener(c, s, f), o.delete(
|
|
1425
|
+
const a = () => {
|
|
1426
|
+
t.removeEventListener(c, s, f), o.delete(a);
|
|
1406
1427
|
};
|
|
1407
|
-
return o.add(
|
|
1428
|
+
return o.add(a), a;
|
|
1408
1429
|
}
|
|
1409
1430
|
clean() {
|
|
1410
1431
|
this._listeners.forEach((t) => t()), this._listeners.clear();
|
|
@@ -1412,7 +1433,7 @@ class Un {
|
|
|
1412
1433
|
}
|
|
1413
1434
|
class is {
|
|
1414
1435
|
constructor() {
|
|
1415
|
-
|
|
1436
|
+
gt(this, "_timeouts", /* @__PURE__ */ new Map());
|
|
1416
1437
|
}
|
|
1417
1438
|
add(t, e, r = 140, ...s) {
|
|
1418
1439
|
this.remove(t), this._timeouts.set(t, window.setTimeout(e, r, ...s));
|
|
@@ -1427,7 +1448,7 @@ class is {
|
|
|
1427
1448
|
}
|
|
1428
1449
|
class os {
|
|
1429
1450
|
constructor(t) {
|
|
1430
|
-
|
|
1451
|
+
gt(this, "gestures", /* @__PURE__ */ new Set()), gt(this, "_targetEventStore", new $n(this)), gt(this, "gestureEventStores", {}), gt(this, "gestureTimeoutStores", {}), gt(this, "handlers", {}), gt(this, "config", {}), gt(this, "pointerIds", /* @__PURE__ */ new Set()), gt(this, "touchIds", /* @__PURE__ */ new Set()), gt(this, "state", {
|
|
1431
1452
|
shared: {
|
|
1432
1453
|
shiftKey: !1,
|
|
1433
1454
|
metaKey: !1,
|
|
@@ -1437,7 +1458,7 @@ class os {
|
|
|
1437
1458
|
}), cs(this, t);
|
|
1438
1459
|
}
|
|
1439
1460
|
setEventIds(t) {
|
|
1440
|
-
if (
|
|
1461
|
+
if (Ve(t))
|
|
1441
1462
|
return this.touchIds = new Set(Lr(t)), this.touchIds;
|
|
1442
1463
|
if ("pointerId" in t)
|
|
1443
1464
|
return t.type === "pointerup" || t.type === "pointercancel" ? this.pointerIds.delete(t.pointerId) : t.type === "pointerdown" && this.pointerIds.add(t.pointerId), this.pointerIds;
|
|
@@ -1462,15 +1483,15 @@ class os {
|
|
|
1462
1483
|
if (!(e.target && (s = e.target(), !s))) {
|
|
1463
1484
|
if (e.enabled) {
|
|
1464
1485
|
for (const o of this.gestures) {
|
|
1465
|
-
const c = this.config[o],
|
|
1486
|
+
const c = this.config[o], l = Rn(r, c.eventOptions, !!s);
|
|
1466
1487
|
if (c.enabled) {
|
|
1467
|
-
const f =
|
|
1468
|
-
new f(this, t, o).bind(
|
|
1488
|
+
const f = Vn.get(o);
|
|
1489
|
+
new f(this, t, o).bind(l);
|
|
1469
1490
|
}
|
|
1470
1491
|
}
|
|
1471
1492
|
const i = Rn(r, e.eventOptions, !!s);
|
|
1472
1493
|
for (const o in this.nativeHandlers)
|
|
1473
|
-
i(o, "", (c) => this.nativeHandlers[o](
|
|
1494
|
+
i(o, "", (c) => this.nativeHandlers[o](J(J({}, this.state.shared), {}, {
|
|
1474
1495
|
event: c,
|
|
1475
1496
|
args: t
|
|
1476
1497
|
})), void 0, !0);
|
|
@@ -1482,27 +1503,27 @@ class os {
|
|
|
1482
1503
|
const {
|
|
1483
1504
|
device: o,
|
|
1484
1505
|
capture: c,
|
|
1485
|
-
passive:
|
|
1506
|
+
passive: l
|
|
1486
1507
|
} = Ar(i);
|
|
1487
1508
|
this._targetEventStore.add(s, o, "", r[i], {
|
|
1488
1509
|
capture: c,
|
|
1489
|
-
passive:
|
|
1510
|
+
passive: l
|
|
1490
1511
|
});
|
|
1491
1512
|
}
|
|
1492
1513
|
}
|
|
1493
1514
|
}
|
|
1494
1515
|
}
|
|
1495
|
-
function
|
|
1496
|
-
n.gestures.add(t), n.gestureEventStores[t] = new
|
|
1516
|
+
function ve(n, t) {
|
|
1517
|
+
n.gestures.add(t), n.gestureEventStores[t] = new $n(n, t), n.gestureTimeoutStores[t] = new is();
|
|
1497
1518
|
}
|
|
1498
1519
|
function cs(n, t) {
|
|
1499
|
-
t.drag &&
|
|
1520
|
+
t.drag && ve(n, "drag"), t.wheel && ve(n, "wheel"), t.scroll && ve(n, "scroll"), t.move && ve(n, "move"), t.pinch && ve(n, "pinch"), t.hover && ve(n, "hover");
|
|
1500
1521
|
}
|
|
1501
1522
|
const Rn = (n, t, e) => (r, s, i, o = {}, c = !1) => {
|
|
1502
|
-
var
|
|
1503
|
-
const
|
|
1504
|
-
let d = c ? r :
|
|
1505
|
-
e &&
|
|
1523
|
+
var l, f;
|
|
1524
|
+
const a = (l = o.capture) !== null && l !== void 0 ? l : t.capture, _ = (f = o.passive) !== null && f !== void 0 ? f : t.passive;
|
|
1525
|
+
let d = c ? r : Tr(r, s, a);
|
|
1526
|
+
e && _ && (d += "Passive"), n[d] = n[d] || [], n[d].push(i);
|
|
1506
1527
|
};
|
|
1507
1528
|
function as(n, t) {
|
|
1508
1529
|
if (typeof n != "object" || n === null) return n;
|
|
@@ -1536,7 +1557,7 @@ function Tn(n, t) {
|
|
|
1536
1557
|
}
|
|
1537
1558
|
return e;
|
|
1538
1559
|
}
|
|
1539
|
-
function
|
|
1560
|
+
function Le(n) {
|
|
1540
1561
|
for (var t = 1; t < arguments.length; t++) {
|
|
1541
1562
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
1542
1563
|
t % 2 ? Tn(Object(e), !0).forEach(function(r) {
|
|
@@ -1549,7 +1570,7 @@ function Pe(n) {
|
|
|
1549
1570
|
}
|
|
1550
1571
|
class fs {
|
|
1551
1572
|
constructor(t, e, r, s, i) {
|
|
1552
|
-
this._target = t, this._gestureKey = s, this._ctrl = new os(e), this._ctrl.applyHandlers(e, i), this._ctrl.applyConfig(
|
|
1573
|
+
this._target = t, this._gestureKey = s, this._ctrl = new os(e), this._ctrl.applyHandlers(e, i), this._ctrl.applyConfig(Le(Le({}, r), {}, {
|
|
1553
1574
|
target: t
|
|
1554
1575
|
}), s), this._ctrl.effect();
|
|
1555
1576
|
}
|
|
@@ -1557,17 +1578,17 @@ class fs {
|
|
|
1557
1578
|
this._ctrl.clean();
|
|
1558
1579
|
}
|
|
1559
1580
|
setConfig(t) {
|
|
1560
|
-
this._ctrl.clean(), this._ctrl.applyConfig(
|
|
1581
|
+
this._ctrl.clean(), this._ctrl.applyConfig(Le(Le({}, t), {}, {
|
|
1561
1582
|
target: this._target
|
|
1562
1583
|
}), this._gestureKey), this._ctrl.effect();
|
|
1563
1584
|
}
|
|
1564
1585
|
}
|
|
1565
|
-
const
|
|
1586
|
+
const Ge = function(t, e, r) {
|
|
1566
1587
|
return Zr(Qr), new fs(t, {
|
|
1567
1588
|
drag: e
|
|
1568
1589
|
}, r || {}, "drag");
|
|
1569
1590
|
};
|
|
1570
|
-
function
|
|
1591
|
+
function Un(...n) {
|
|
1571
1592
|
const t = n.filter(Boolean);
|
|
1572
1593
|
return t.length <= 1 ? t[0] || null : function(r) {
|
|
1573
1594
|
for (const s of t)
|
|
@@ -1578,7 +1599,7 @@ const Bn = ({
|
|
|
1578
1599
|
children: n,
|
|
1579
1600
|
...t
|
|
1580
1601
|
}) => {
|
|
1581
|
-
const e =
|
|
1602
|
+
const e = Jt.Children.only(n), r = ds(e), s = e.props || {}, i = s.style || {}, o = {
|
|
1582
1603
|
...t,
|
|
1583
1604
|
...s,
|
|
1584
1605
|
// child's own props take precedence
|
|
@@ -1586,9 +1607,9 @@ const Bn = ({
|
|
|
1586
1607
|
...t.style ?? {},
|
|
1587
1608
|
...i
|
|
1588
1609
|
},
|
|
1589
|
-
ref:
|
|
1610
|
+
ref: Un(r, t.ref)
|
|
1590
1611
|
};
|
|
1591
|
-
return
|
|
1612
|
+
return Jt.cloneElement(e, o);
|
|
1592
1613
|
};
|
|
1593
1614
|
function ds(n) {
|
|
1594
1615
|
let t = Object.getOwnPropertyDescriptor(n, "ref")?.get;
|
|
@@ -1602,97 +1623,100 @@ const hs = ({
|
|
|
1602
1623
|
draggableOptions: s,
|
|
1603
1624
|
resizableOptions: i
|
|
1604
1625
|
}) => {
|
|
1605
|
-
const o =
|
|
1606
|
-
|
|
1607
|
-
c.current = s,
|
|
1626
|
+
const o = st(null), c = st(void 0), l = st(void 0), f = st(void 0), a = st(void 0), _ = st(void 0), d = st(null), v = st(null);
|
|
1627
|
+
qt(() => {
|
|
1628
|
+
c.current = s, l.current = i;
|
|
1608
1629
|
}, [s, i]);
|
|
1609
|
-
const
|
|
1610
|
-
o.current && (e && c.current && (f.current = new
|
|
1630
|
+
const E = Kn(() => {
|
|
1631
|
+
o.current && (e && c.current && (f.current = new Ge(o.current, (m) => {
|
|
1611
1632
|
const {
|
|
1612
|
-
active:
|
|
1613
|
-
delta:
|
|
1614
|
-
xy:
|
|
1615
|
-
event:
|
|
1616
|
-
first:
|
|
1617
|
-
last:
|
|
1618
|
-
} =
|
|
1619
|
-
if (
|
|
1633
|
+
active: h,
|
|
1634
|
+
delta: g,
|
|
1635
|
+
xy: p,
|
|
1636
|
+
event: b,
|
|
1637
|
+
first: y,
|
|
1638
|
+
last: S
|
|
1639
|
+
} = m, x = b?.target;
|
|
1640
|
+
if (x && (x === d.current || x === v.current || d.current && d.current.contains(x) || v.current && v.current.contains(x)))
|
|
1620
1641
|
return;
|
|
1621
|
-
const
|
|
1642
|
+
const w = {
|
|
1622
1643
|
target: o.current,
|
|
1623
|
-
dx:
|
|
1624
|
-
dy:
|
|
1625
|
-
clientX:
|
|
1626
|
-
clientY:
|
|
1644
|
+
dx: g[0],
|
|
1645
|
+
dy: g[1],
|
|
1646
|
+
clientX: p[0],
|
|
1647
|
+
clientY: p[1]
|
|
1627
1648
|
};
|
|
1628
|
-
|
|
1649
|
+
y ? c.current?.onstart?.(w) : S ? c.current?.onend?.(w) : h && c.current?.onmove?.(w);
|
|
1629
1650
|
}, {
|
|
1630
1651
|
axis: c.current?.lockAxis === "x" ? "x" : void 0,
|
|
1652
|
+
threshold: 0,
|
|
1631
1653
|
pointer: {
|
|
1632
1654
|
capture: !0
|
|
1633
1655
|
}
|
|
1634
|
-
})), r &&
|
|
1656
|
+
})), r && l.current?.edges && (l.current.edges.left && (d.current || (d.current = o.current.querySelector(l.current.edges.left)), a.current = new Ge(d.current, (m) => {
|
|
1635
1657
|
const {
|
|
1636
|
-
active:
|
|
1637
|
-
delta:
|
|
1638
|
-
xy:
|
|
1639
|
-
first:
|
|
1640
|
-
last:
|
|
1641
|
-
} =
|
|
1658
|
+
active: h,
|
|
1659
|
+
delta: g,
|
|
1660
|
+
xy: p,
|
|
1661
|
+
first: b,
|
|
1662
|
+
last: y
|
|
1663
|
+
} = m, S = {
|
|
1642
1664
|
target: o.current,
|
|
1643
|
-
dx:
|
|
1665
|
+
dx: g[0],
|
|
1644
1666
|
dy: 0,
|
|
1645
|
-
clientX:
|
|
1646
|
-
clientY:
|
|
1667
|
+
clientX: p[0],
|
|
1668
|
+
clientY: p[1],
|
|
1647
1669
|
edges: {
|
|
1648
1670
|
left: !0
|
|
1649
1671
|
},
|
|
1650
1672
|
deltaRect: {
|
|
1651
|
-
left:
|
|
1673
|
+
left: g[0]
|
|
1652
1674
|
}
|
|
1653
1675
|
};
|
|
1654
|
-
|
|
1676
|
+
y ? l.current?.onend?.(S) : b ? l.current?.onstart?.(S) : h && l.current?.onmove?.(S);
|
|
1655
1677
|
}, {
|
|
1656
1678
|
pointer: {
|
|
1657
1679
|
capture: !0
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1680
|
+
},
|
|
1681
|
+
threshold: 0
|
|
1682
|
+
})), l.current.edges.right && (v.current || (v.current = o.current.querySelector(l.current.edges.right)), _.current = new Ge(v.current, (m) => {
|
|
1660
1683
|
const {
|
|
1661
|
-
active:
|
|
1662
|
-
delta:
|
|
1663
|
-
xy:
|
|
1664
|
-
first:
|
|
1665
|
-
last:
|
|
1666
|
-
} =
|
|
1684
|
+
active: h,
|
|
1685
|
+
delta: g,
|
|
1686
|
+
xy: p,
|
|
1687
|
+
first: b,
|
|
1688
|
+
last: y
|
|
1689
|
+
} = m, S = {
|
|
1667
1690
|
target: o.current,
|
|
1668
|
-
dx:
|
|
1691
|
+
dx: g[0],
|
|
1669
1692
|
dy: 0,
|
|
1670
|
-
clientX:
|
|
1671
|
-
clientY:
|
|
1693
|
+
clientX: p[0],
|
|
1694
|
+
clientY: p[1],
|
|
1672
1695
|
edges: {
|
|
1673
1696
|
right: !0
|
|
1674
1697
|
},
|
|
1675
1698
|
deltaRect: {
|
|
1676
|
-
right:
|
|
1699
|
+
right: g[0]
|
|
1677
1700
|
}
|
|
1678
1701
|
};
|
|
1679
|
-
|
|
1702
|
+
y ? l.current?.onend?.(S) : b ? l.current?.onstart?.(S) : h && l.current?.onmove?.(S);
|
|
1680
1703
|
}, {
|
|
1681
1704
|
pointer: {
|
|
1682
1705
|
capture: !0
|
|
1683
|
-
}
|
|
1706
|
+
},
|
|
1707
|
+
threshold: 0
|
|
1684
1708
|
}))));
|
|
1685
1709
|
});
|
|
1686
|
-
return
|
|
1710
|
+
return qt(() => {
|
|
1687
1711
|
if (!o.current) return;
|
|
1688
|
-
f.current?.destroy(),
|
|
1689
|
-
const
|
|
1712
|
+
f.current?.destroy(), a.current?.destroy(), _.current?.destroy();
|
|
1713
|
+
const m = {
|
|
1690
1714
|
target: o.current,
|
|
1691
1715
|
unset: () => {
|
|
1692
|
-
f.current?.destroy(),
|
|
1716
|
+
f.current?.destroy(), a.current?.destroy(), _.current?.destroy();
|
|
1693
1717
|
}
|
|
1694
1718
|
};
|
|
1695
|
-
t && (t.current =
|
|
1719
|
+
t && (t.current = m), E();
|
|
1696
1720
|
}, [e, r, t]), Bn({
|
|
1697
1721
|
children: n,
|
|
1698
1722
|
ref: o,
|
|
@@ -1703,451 +1727,633 @@ const hs = ({
|
|
|
1703
1727
|
}
|
|
1704
1728
|
}
|
|
1705
1729
|
});
|
|
1706
|
-
},
|
|
1707
|
-
const e =
|
|
1730
|
+
}, Hn = Jt.forwardRef((n, t) => {
|
|
1731
|
+
const e = Nt.c(70), {
|
|
1708
1732
|
children: r,
|
|
1709
1733
|
edges: s,
|
|
1710
1734
|
left: i,
|
|
1711
1735
|
width: o,
|
|
1712
1736
|
start: c,
|
|
1713
|
-
grid:
|
|
1714
|
-
|
|
1715
|
-
enableResizing:
|
|
1716
|
-
enableDragging:
|
|
1737
|
+
grid: l,
|
|
1738
|
+
getBounds: f,
|
|
1739
|
+
enableResizing: a,
|
|
1740
|
+
enableDragging: _,
|
|
1717
1741
|
adsorptionDistance: d,
|
|
1718
|
-
adsorptionPositions:
|
|
1719
|
-
onResizeStart:
|
|
1720
|
-
onResize:
|
|
1721
|
-
onResizeEnd:
|
|
1722
|
-
onDragStart:
|
|
1723
|
-
onDragEnd:
|
|
1724
|
-
onDrag:
|
|
1725
|
-
parentRef:
|
|
1726
|
-
|
|
1727
|
-
} = n,
|
|
1728
|
-
let
|
|
1729
|
-
e[0] !==
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
dealResizeAutoScroll: gt,
|
|
1740
|
-
stopAutoScroll: u
|
|
1741
|
-
} = vr(O);
|
|
1742
|
-
let T, I;
|
|
1743
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (T = () => {
|
|
1744
|
-
const L = S.current;
|
|
1742
|
+
adsorptionPositions: v,
|
|
1743
|
+
onResizeStart: E,
|
|
1744
|
+
onResize: m,
|
|
1745
|
+
onResizeEnd: h,
|
|
1746
|
+
onDragStart: g,
|
|
1747
|
+
onDragEnd: p,
|
|
1748
|
+
onDrag: b,
|
|
1749
|
+
parentRef: y,
|
|
1750
|
+
autoScroll: S
|
|
1751
|
+
} = n, x = c === void 0 ? Fe : c, w = l === void 0 ? qe : l, T = f === void 0 ? ms : f, P = a === void 0 ? !0 : a, G = _ === void 0 ? !0 : _, D = d === void 0 ? Je : d;
|
|
1752
|
+
let Z;
|
|
1753
|
+
e[0] !== v ? (Z = v === void 0 ? [] : v, e[0] = v, e[1] = Z) : Z = e[1];
|
|
1754
|
+
const U = Z, tt = S === void 0 ? !0 : S, z = st(void 0), L = st(0), B = st(!1), {
|
|
1755
|
+
initAutoScroll: lt,
|
|
1756
|
+
stopAutoScroll: ut,
|
|
1757
|
+
dealDragAutoScroll: dt,
|
|
1758
|
+
dealResizeAutoScroll: u
|
|
1759
|
+
} = vr(y);
|
|
1760
|
+
let R, k;
|
|
1761
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (R = () => {
|
|
1762
|
+
const O = z.current;
|
|
1745
1763
|
return () => {
|
|
1746
|
-
|
|
1764
|
+
O?.unset();
|
|
1747
1765
|
};
|
|
1748
|
-
},
|
|
1749
|
-
let
|
|
1750
|
-
e[
|
|
1751
|
-
const
|
|
1752
|
-
if (!
|
|
1766
|
+
}, k = [], e[2] = R, e[3] = k) : (R = e[2], k = e[3]), qt(R, k);
|
|
1767
|
+
let j;
|
|
1768
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (j = (O, Y) => {
|
|
1769
|
+
const V = Y === void 0 ? !0 : Y;
|
|
1770
|
+
if (!z.current || !z.current.target)
|
|
1753
1771
|
return;
|
|
1754
|
-
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1757
|
-
left:
|
|
1772
|
+
V && (L.current = 0);
|
|
1773
|
+
const I = z.current.target;
|
|
1774
|
+
I.style.left = `${O}px`, Object.assign(I.dataset, {
|
|
1775
|
+
left: O
|
|
1758
1776
|
});
|
|
1759
|
-
}, e[
|
|
1760
|
-
const
|
|
1761
|
-
let
|
|
1762
|
-
e[
|
|
1763
|
-
const
|
|
1764
|
-
if (!
|
|
1777
|
+
}, e[4] = j) : j = e[4];
|
|
1778
|
+
const H = j;
|
|
1779
|
+
let F;
|
|
1780
|
+
e[5] === Symbol.for("react.memo_cache_sentinel") ? (F = (O, Y) => {
|
|
1781
|
+
const V = Y === void 0 ? !0 : Y;
|
|
1782
|
+
if (!z.current || !z.current.target)
|
|
1765
1783
|
return;
|
|
1766
|
-
|
|
1767
|
-
const
|
|
1768
|
-
|
|
1769
|
-
width:
|
|
1784
|
+
V && (L.current = 0);
|
|
1785
|
+
const I = z.current.target;
|
|
1786
|
+
I.style.width = `${O}px`, Object.assign(I.dataset, {
|
|
1787
|
+
width: O
|
|
1770
1788
|
});
|
|
1771
|
-
}, e[
|
|
1772
|
-
const
|
|
1773
|
-
let
|
|
1774
|
-
e[
|
|
1775
|
-
if (!
|
|
1789
|
+
}, e[5] = F) : F = e[5];
|
|
1790
|
+
const N = F;
|
|
1791
|
+
let A;
|
|
1792
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (A = () => {
|
|
1793
|
+
if (!z.current?.target)
|
|
1776
1794
|
return 0;
|
|
1777
|
-
const
|
|
1778
|
-
return parseFloat(
|
|
1779
|
-
}, e[
|
|
1780
|
-
const
|
|
1781
|
-
let
|
|
1782
|
-
e[
|
|
1783
|
-
if (!
|
|
1795
|
+
const O = z.current.target;
|
|
1796
|
+
return parseFloat(O?.dataset?.left || "0");
|
|
1797
|
+
}, e[6] = A) : A = e[6];
|
|
1798
|
+
const C = A;
|
|
1799
|
+
let W;
|
|
1800
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (W = () => {
|
|
1801
|
+
if (!z.current?.target)
|
|
1784
1802
|
return 0;
|
|
1785
|
-
const
|
|
1786
|
-
return parseFloat(
|
|
1787
|
-
}, e[
|
|
1788
|
-
const
|
|
1789
|
-
let
|
|
1790
|
-
e[
|
|
1791
|
-
if (!
|
|
1803
|
+
const O = z.current.target;
|
|
1804
|
+
return parseFloat(O?.dataset?.width || "0");
|
|
1805
|
+
}, e[7] = W) : W = e[7];
|
|
1806
|
+
const $e = W;
|
|
1807
|
+
let Qt, Wt;
|
|
1808
|
+
e[8] !== o ? (Qt = () => {
|
|
1809
|
+
if (!z.current?.target)
|
|
1792
1810
|
return;
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1795
|
-
},
|
|
1796
|
-
let
|
|
1797
|
-
e[
|
|
1798
|
-
|
|
1799
|
-
},
|
|
1800
|
-
let
|
|
1801
|
-
e[
|
|
1802
|
-
updateLeft: (
|
|
1803
|
-
updateWidth: (
|
|
1804
|
-
getLeft:
|
|
1805
|
-
getWidth:
|
|
1806
|
-
}), e[
|
|
1807
|
-
let
|
|
1808
|
-
e[
|
|
1809
|
-
|
|
1810
|
-
}, e[
|
|
1811
|
-
const
|
|
1812
|
-
let
|
|
1813
|
-
e[
|
|
1811
|
+
const O = z.current.target;
|
|
1812
|
+
N(typeof o > "u" ? O.offsetWidth : o, !1);
|
|
1813
|
+
}, Wt = [o], e[8] = o, e[9] = Qt, e[10] = Wt) : (Qt = e[9], Wt = e[10]), qt(Qt, Wt);
|
|
1814
|
+
let Tt, wt;
|
|
1815
|
+
e[11] !== i ? (Tt = () => {
|
|
1816
|
+
H(i || 0, !1);
|
|
1817
|
+
}, wt = [i], e[11] = i, e[12] = Tt, e[13] = wt) : (Tt = e[12], wt = e[13]), qt(Tt, wt);
|
|
1818
|
+
let zt;
|
|
1819
|
+
e[14] === Symbol.for("react.memo_cache_sentinel") ? (zt = () => ({
|
|
1820
|
+
updateLeft: (O) => H(O || 0, !1),
|
|
1821
|
+
updateWidth: (O) => N(O, !1),
|
|
1822
|
+
getLeft: C,
|
|
1823
|
+
getWidth: $e
|
|
1824
|
+
}), e[14] = zt) : zt = e[14], Ln(t, zt);
|
|
1825
|
+
let xt;
|
|
1826
|
+
e[15] !== lt || e[16] !== g ? (xt = () => {
|
|
1827
|
+
L.current = 0, B.current = !1, lt(), g && g();
|
|
1828
|
+
}, e[15] = lt, e[16] = g, e[17] = xt) : xt = e[17];
|
|
1829
|
+
const At = xt;
|
|
1830
|
+
let Dt;
|
|
1831
|
+
e[18] !== D || e[19] !== U || e[20] !== T || e[21] !== w || e[22] !== b || e[23] !== x ? (Dt = (O) => {
|
|
1814
1832
|
const {
|
|
1815
|
-
preLeft:
|
|
1816
|
-
preWidth:
|
|
1817
|
-
scrollDelta:
|
|
1818
|
-
} =
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
const
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
const
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1833
|
+
preLeft: Y,
|
|
1834
|
+
preWidth: V,
|
|
1835
|
+
scrollDelta: I
|
|
1836
|
+
} = O;
|
|
1837
|
+
I && (L.current = L.current + I);
|
|
1838
|
+
const Q = B.current ? D : w;
|
|
1839
|
+
if (Math.abs(L.current) >= Q) {
|
|
1840
|
+
const et = parseInt(L.current / Q + "");
|
|
1841
|
+
let $ = Y + et * Q, M = $;
|
|
1842
|
+
const nt = Number.MAX_SAFE_INTEGER;
|
|
1843
|
+
if (U.forEach((q) => {
|
|
1844
|
+
const K = Math.abs(q - $);
|
|
1845
|
+
K < D && K < nt && (M = q);
|
|
1846
|
+
const ot = Math.abs(q - ($ + V));
|
|
1847
|
+
ot < D && ot < nt && (M = q - V);
|
|
1848
|
+
}), M !== $ ? (B.current = !0, $ = M) : (($ - x) % w !== 0 && ($ = x + w * Math.round(($ - x) / w)), B.current = !1), L.current = L.current % Q, $ < T().left ? $ = T().left : $ + V > T().right && ($ = T().right - V), b && b({
|
|
1849
|
+
lastLeft: Y,
|
|
1850
|
+
left: $,
|
|
1851
|
+
lastWidth: V,
|
|
1852
|
+
width: V
|
|
1853
|
+
}, I) === !1)
|
|
1834
1854
|
return;
|
|
1835
|
-
|
|
1855
|
+
H($, !1);
|
|
1836
1856
|
}
|
|
1837
|
-
}, e[
|
|
1838
|
-
const
|
|
1839
|
-
let
|
|
1840
|
-
e[
|
|
1841
|
-
const
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1857
|
+
}, e[18] = D, e[19] = U, e[20] = T, e[21] = w, e[22] = b, e[23] = x, e[24] = Dt) : Dt = e[24];
|
|
1858
|
+
const te = Dt;
|
|
1859
|
+
let ee;
|
|
1860
|
+
e[25] !== tt || e[26] !== dt || e[27] !== te || e[28] !== y ? (ee = (O) => {
|
|
1861
|
+
const Y = O.target, {
|
|
1862
|
+
left: V,
|
|
1863
|
+
width: I
|
|
1864
|
+
} = Y.dataset, Q = parseFloat(V || "0"), et = parseFloat(I || "0");
|
|
1865
|
+
L.current = L.current + O.dx, !(tt && y?.current && !dt(O, (nt) => {
|
|
1866
|
+
if (!y?.current || !z.current?.target)
|
|
1867
|
+
return;
|
|
1868
|
+
y.current.scrollLeft = y.current.scrollLeft + nt;
|
|
1869
|
+
const q = z.current.target, K = parseFloat(q.dataset.left || "0"), ot = parseFloat(q.dataset.width || "0");
|
|
1870
|
+
te({
|
|
1871
|
+
preLeft: K,
|
|
1872
|
+
preWidth: ot,
|
|
1873
|
+
scrollDelta: nt
|
|
1852
1874
|
});
|
|
1853
|
-
}))
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
left: B,
|
|
1857
|
-
width: W
|
|
1858
|
-
} = K.dataset, tt = parseFloat(B || "0"), lt = parseFloat(W || "0");
|
|
1859
|
-
R.current = R.current + L.dx, Ct({
|
|
1860
|
-
preLeft: tt,
|
|
1861
|
-
preWidth: lt
|
|
1875
|
+
})) && te({
|
|
1876
|
+
preLeft: Q,
|
|
1877
|
+
preWidth: et
|
|
1862
1878
|
});
|
|
1863
|
-
}, e[
|
|
1864
|
-
const
|
|
1865
|
-
let
|
|
1866
|
-
e[
|
|
1867
|
-
|
|
1868
|
-
const
|
|
1869
|
-
left:
|
|
1870
|
-
width:
|
|
1871
|
-
} =
|
|
1872
|
-
|
|
1873
|
-
left: parseFloat(
|
|
1874
|
-
width: parseFloat(
|
|
1879
|
+
}, e[25] = tt, e[26] = dt, e[27] = te, e[28] = y, e[29] = ee) : ee = e[29];
|
|
1880
|
+
const jt = ee;
|
|
1881
|
+
let pt;
|
|
1882
|
+
e[30] !== p || e[31] !== ut ? (pt = (O) => {
|
|
1883
|
+
L.current = 0, B.current = !1, ut();
|
|
1884
|
+
const Y = O.target, {
|
|
1885
|
+
left: V,
|
|
1886
|
+
width: I
|
|
1887
|
+
} = Y.dataset;
|
|
1888
|
+
p && p({
|
|
1889
|
+
left: parseFloat(V || "0"),
|
|
1890
|
+
width: parseFloat(I || "0")
|
|
1875
1891
|
});
|
|
1876
|
-
}, e[
|
|
1877
|
-
const
|
|
1878
|
-
let
|
|
1879
|
-
e[
|
|
1880
|
-
|
|
1881
|
-
const
|
|
1882
|
-
|
|
1883
|
-
}, e[
|
|
1884
|
-
const
|
|
1885
|
-
let
|
|
1886
|
-
e[
|
|
1892
|
+
}, e[30] = p, e[31] = ut, e[32] = pt) : pt = e[32];
|
|
1893
|
+
const Ft = pt;
|
|
1894
|
+
let Ct;
|
|
1895
|
+
e[33] !== lt || e[34] !== E ? (Ct = (O) => {
|
|
1896
|
+
L.current = 0, B.current = !1, lt();
|
|
1897
|
+
const Y = O.edges?.right ? "right" : "left";
|
|
1898
|
+
E && E(Y);
|
|
1899
|
+
}, e[33] = lt, e[34] = E, e[35] = Ct) : Ct = e[35];
|
|
1900
|
+
const Yt = Ct;
|
|
1901
|
+
let Ot;
|
|
1902
|
+
e[36] !== D || e[37] !== U || e[38] !== T || e[39] !== w || e[40] !== m || e[41] !== x ? (Ot = (O) => {
|
|
1887
1903
|
const {
|
|
1888
|
-
dir:
|
|
1889
|
-
preWidth:
|
|
1890
|
-
preLeft:
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1904
|
+
dir: Y,
|
|
1905
|
+
preWidth: V,
|
|
1906
|
+
preLeft: I,
|
|
1907
|
+
scrollDelta: Q
|
|
1908
|
+
} = O;
|
|
1909
|
+
Q && (L.current = L.current + Q);
|
|
1910
|
+
const et = B.current ? D : w;
|
|
1911
|
+
if (Y === "left") {
|
|
1912
|
+
if (Math.abs(L.current) >= et) {
|
|
1913
|
+
const $ = parseInt(L.current / et + "");
|
|
1914
|
+
let M = I + $ * et, nt = M;
|
|
1915
|
+
const q = Number.MAX_SAFE_INTEGER;
|
|
1916
|
+
U.forEach((_t) => {
|
|
1917
|
+
const Pt = Math.abs(_t - M);
|
|
1918
|
+
Pt < D && Pt < q && (nt = _t);
|
|
1919
|
+
}), nt !== M ? (B.current = !0, M = nt) : ((M - x) % w !== 0 && (M = x + w * Math.round((M - x) / w)), B.current = !1), L.current = L.current % et;
|
|
1920
|
+
const K = I + V;
|
|
1921
|
+
M < T().left && (M = T().left);
|
|
1922
|
+
const ot = K - M;
|
|
1923
|
+
if (m && m("left", {
|
|
1924
|
+
lastLeft: I,
|
|
1925
|
+
lastWidth: V,
|
|
1926
|
+
left: M,
|
|
1927
|
+
width: ot
|
|
1909
1928
|
}) === !1)
|
|
1910
1929
|
return;
|
|
1911
|
-
|
|
1930
|
+
H(M, !1), N(ot, !1);
|
|
1912
1931
|
}
|
|
1913
|
-
} else if (
|
|
1914
|
-
const
|
|
1915
|
-
let
|
|
1916
|
-
const
|
|
1917
|
-
if (
|
|
1918
|
-
const
|
|
1919
|
-
|
|
1920
|
-
}),
|
|
1921
|
-
|
|
1932
|
+
} else if (Y === "right" && Math.abs(L.current) >= et) {
|
|
1933
|
+
const $ = parseInt(L.current / w + "");
|
|
1934
|
+
let M = V + $ * w, nt = I + M;
|
|
1935
|
+
const q = Number.MAX_SAFE_INTEGER;
|
|
1936
|
+
if (U.forEach((K) => {
|
|
1937
|
+
const ot = Math.abs(K - (I + M));
|
|
1938
|
+
ot < D && ot < q && (nt = K);
|
|
1939
|
+
}), nt !== I + M)
|
|
1940
|
+
B.current = !0, M = nt - I;
|
|
1922
1941
|
else {
|
|
1923
|
-
let
|
|
1924
|
-
(
|
|
1942
|
+
let K = I + M;
|
|
1943
|
+
(K - x) % w !== 0 && (K = x + w * Math.round((K - x) / w), M = K - I), B.current = !1;
|
|
1925
1944
|
}
|
|
1926
|
-
if (
|
|
1927
|
-
lastLeft:
|
|
1928
|
-
lastWidth:
|
|
1929
|
-
left:
|
|
1930
|
-
width:
|
|
1945
|
+
if (L.current = L.current % et, I + M > T().right && (M = T().right - I), m && m("right", {
|
|
1946
|
+
lastLeft: I,
|
|
1947
|
+
lastWidth: V,
|
|
1948
|
+
left: I,
|
|
1949
|
+
width: M
|
|
1931
1950
|
}) === !1)
|
|
1932
1951
|
return;
|
|
1933
|
-
|
|
1952
|
+
N(M, !1);
|
|
1934
1953
|
}
|
|
1935
|
-
}, e[
|
|
1936
|
-
const
|
|
1937
|
-
let
|
|
1938
|
-
e[
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1954
|
+
}, e[36] = D, e[37] = U, e[38] = T, e[39] = w, e[40] = m, e[41] = x, e[42] = Ot) : Ot = e[42];
|
|
1955
|
+
const bt = Ot;
|
|
1956
|
+
let Lt;
|
|
1957
|
+
e[43] !== tt || e[44] !== u || e[45] !== y || e[46] !== bt ? (Lt = (O) => {
|
|
1958
|
+
const Y = O.target, V = O.edges?.left ? "left" : "right", {
|
|
1959
|
+
left: I,
|
|
1960
|
+
width: Q
|
|
1961
|
+
} = Y.dataset, et = parseFloat(I || "0"), $ = parseFloat(Q || "0");
|
|
1962
|
+
L.current = L.current + (V === "left" ? O.deltaRect?.left || 0 : O.deltaRect?.right || 0), !(tt && y?.current && !u(O, V, (q) => {
|
|
1963
|
+
if (!y?.current || !z.current?.target)
|
|
1964
|
+
return;
|
|
1965
|
+
y.current.scrollLeft = y.current.scrollLeft + q;
|
|
1966
|
+
const K = z.current.target, ot = parseFloat(K.dataset.left || "0"), _t = parseFloat(K.dataset.width || "0");
|
|
1967
|
+
bt({
|
|
1968
|
+
preLeft: ot,
|
|
1969
|
+
preWidth: _t,
|
|
1970
|
+
dir: V,
|
|
1971
|
+
scrollDelta: q
|
|
1950
1972
|
});
|
|
1951
|
-
}))
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
width: tt
|
|
1956
|
-
} = K.dataset, lt = parseFloat(W || "0"), A = parseFloat(tt || "0");
|
|
1957
|
-
R.current = R.current + (B === "left" ? L.deltaRect?.left || 0 : L.deltaRect?.right || 0), Tt({
|
|
1958
|
-
preLeft: lt,
|
|
1959
|
-
preWidth: A,
|
|
1960
|
-
dir: B
|
|
1973
|
+
})) && bt({
|
|
1974
|
+
preLeft: et,
|
|
1975
|
+
preWidth: $,
|
|
1976
|
+
dir: V
|
|
1961
1977
|
});
|
|
1962
|
-
}, e[
|
|
1963
|
-
const
|
|
1964
|
-
let
|
|
1965
|
-
e[
|
|
1966
|
-
|
|
1967
|
-
const
|
|
1968
|
-
left:
|
|
1969
|
-
width:
|
|
1970
|
-
} =
|
|
1971
|
-
|
|
1972
|
-
left: parseFloat(
|
|
1973
|
-
width: parseFloat(
|
|
1978
|
+
}, e[43] = tt, e[44] = u, e[45] = y, e[46] = bt, e[47] = Lt) : Lt = e[47];
|
|
1979
|
+
const Xt = Lt;
|
|
1980
|
+
let Mt;
|
|
1981
|
+
e[48] !== h || e[49] !== ut ? (Mt = (O) => {
|
|
1982
|
+
L.current = 0, B.current = !1, ut();
|
|
1983
|
+
const Y = O.target, {
|
|
1984
|
+
left: V,
|
|
1985
|
+
width: I
|
|
1986
|
+
} = Y.dataset, Q = O.edges?.right ? "right" : "left";
|
|
1987
|
+
h && h(Q, {
|
|
1988
|
+
left: parseFloat(V || "0"),
|
|
1989
|
+
width: parseFloat(I || "0")
|
|
1974
1990
|
});
|
|
1975
|
-
}, e[
|
|
1976
|
-
const
|
|
1977
|
-
let
|
|
1978
|
-
e[
|
|
1991
|
+
}, e[48] = h, e[49] = ut, e[50] = Mt) : Mt = e[50];
|
|
1992
|
+
const Gt = Mt;
|
|
1993
|
+
let yt;
|
|
1994
|
+
e[51] !== jt || e[52] !== At || e[53] !== Ft ? (yt = {
|
|
1979
1995
|
lockAxis: "x",
|
|
1980
|
-
onmove:
|
|
1981
|
-
onstart:
|
|
1982
|
-
onend:
|
|
1983
|
-
cursorChecker:
|
|
1984
|
-
}, e[
|
|
1985
|
-
let
|
|
1986
|
-
e[
|
|
1996
|
+
onmove: jt,
|
|
1997
|
+
onstart: At,
|
|
1998
|
+
onend: Ft,
|
|
1999
|
+
cursorChecker: gs
|
|
2000
|
+
}, e[51] = jt, e[52] = At, e[53] = Ft, e[54] = yt) : yt = e[54];
|
|
2001
|
+
let St;
|
|
2002
|
+
e[55] !== s || e[56] !== Xt || e[57] !== Yt || e[58] !== Gt ? (St = {
|
|
1987
2003
|
axis: "x",
|
|
1988
2004
|
invert: "none",
|
|
1989
2005
|
edges: s,
|
|
1990
|
-
onmove:
|
|
1991
|
-
onstart:
|
|
1992
|
-
onend:
|
|
1993
|
-
}, e[
|
|
1994
|
-
const
|
|
1995
|
-
let
|
|
1996
|
-
e[
|
|
1997
|
-
children:
|
|
2006
|
+
onmove: Xt,
|
|
2007
|
+
onstart: Yt,
|
|
2008
|
+
onend: Gt
|
|
2009
|
+
}, e[55] = s, e[56] = Xt, e[57] = Yt, e[58] = Gt, e[59] = St) : St = e[59];
|
|
2010
|
+
const Vt = r;
|
|
2011
|
+
let Rt;
|
|
2012
|
+
e[60] !== i || e[61] !== Vt || e[62] !== o ? (Rt = Bn({
|
|
2013
|
+
children: Vt,
|
|
1998
2014
|
style: {
|
|
1999
2015
|
left: i,
|
|
2000
2016
|
width: o
|
|
2001
2017
|
}
|
|
2002
|
-
}), e[
|
|
2003
|
-
let
|
|
2004
|
-
return e[
|
|
2018
|
+
}), e[60] = i, e[61] = Vt, e[62] = o, e[63] = Rt) : Rt = e[63];
|
|
2019
|
+
let It;
|
|
2020
|
+
return e[64] !== G || e[65] !== P || e[66] !== yt || e[67] !== St || e[68] !== Rt ? (It = /* @__PURE__ */ X.jsx(hs, { interactRef: z, draggable: G, resizable: P, draggableOptions: yt, resizableOptions: St, children: Rt }), e[64] = G, e[65] = P, e[66] = yt, e[67] = St, e[68] = Rt, e[69] = It) : It = e[69], It;
|
|
2005
2021
|
});
|
|
2006
2022
|
function ms() {
|
|
2023
|
+
return {
|
|
2024
|
+
left: Number.MIN_SAFE_INTEGER,
|
|
2025
|
+
right: Number.MAX_SAFE_INTEGER
|
|
2026
|
+
};
|
|
2027
|
+
}
|
|
2028
|
+
function gs() {
|
|
2007
2029
|
return "";
|
|
2008
2030
|
}
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
let
|
|
2082
|
-
t[16] !==
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2031
|
+
function ps() {
|
|
2032
|
+
let n = 0, t, e = "", r = arguments.length;
|
|
2033
|
+
for (; n < r; n++)
|
|
2034
|
+
(t = arguments[n]) && typeof t == "string" && (e += (e && " ") + t);
|
|
2035
|
+
return e;
|
|
2036
|
+
}
|
|
2037
|
+
const _s = (n) => {
|
|
2038
|
+
const t = Nt.c(191), {
|
|
2039
|
+
editorData: e,
|
|
2040
|
+
row: r,
|
|
2041
|
+
action: s,
|
|
2042
|
+
effects: i,
|
|
2043
|
+
rowHeight: o,
|
|
2044
|
+
scale: c,
|
|
2045
|
+
scaleWidth: l,
|
|
2046
|
+
scaleSplitCount: f,
|
|
2047
|
+
startLeft: a,
|
|
2048
|
+
gridSnap: _,
|
|
2049
|
+
disableDrag: d,
|
|
2050
|
+
scaleCount: v,
|
|
2051
|
+
maxScaleCount: E,
|
|
2052
|
+
setScaleCount: m,
|
|
2053
|
+
onActionMoveStart: h,
|
|
2054
|
+
onActionMoving: g,
|
|
2055
|
+
onActionMoveEnd: p,
|
|
2056
|
+
onActionResizeStart: b,
|
|
2057
|
+
onActionResizeEnd: y,
|
|
2058
|
+
onActionResizing: S,
|
|
2059
|
+
dragLineData: x,
|
|
2060
|
+
setEditorData: w,
|
|
2061
|
+
onClickAction: T,
|
|
2062
|
+
onClickActionOnly: P,
|
|
2063
|
+
onDoubleClickAction: G,
|
|
2064
|
+
onContextMenuAction: D,
|
|
2065
|
+
getActionRender: Z,
|
|
2066
|
+
handleTime: U,
|
|
2067
|
+
scrollContainerRef: tt
|
|
2068
|
+
} = n, z = st(null), L = st(!1), {
|
|
2069
|
+
id: B,
|
|
2070
|
+
maxEnd: lt,
|
|
2071
|
+
minStart: ut,
|
|
2072
|
+
end: dt,
|
|
2073
|
+
start: u,
|
|
2074
|
+
selected: R,
|
|
2075
|
+
flexible: k,
|
|
2076
|
+
movable: j,
|
|
2077
|
+
effectId: H
|
|
2078
|
+
} = s, F = k === void 0 ? !0 : k, N = j === void 0 ? !0 : j, A = c ?? We, C = l ?? ze, W = a ?? Fe, $e = f ?? Mn, Qt = E ?? Number.MAX_SAFE_INTEGER, Wt = ut || 0;
|
|
2079
|
+
let Tt;
|
|
2080
|
+
t[0] !== A || t[1] !== C || t[2] !== W || t[3] !== Wt ? (Tt = kt(Wt, {
|
|
2081
|
+
startLeft: W,
|
|
2082
|
+
scale: A,
|
|
2083
|
+
scaleWidth: C
|
|
2084
|
+
}), t[0] = A, t[1] = C, t[2] = W, t[3] = Wt, t[4] = Tt) : Tt = t[4];
|
|
2085
|
+
const wt = Tt, zt = lt || Number.MAX_VALUE;
|
|
2086
|
+
let xt;
|
|
2087
|
+
t[5] !== A || t[6] !== C || t[7] !== W || t[8] !== zt ? (xt = kt(zt, {
|
|
2088
|
+
startLeft: W,
|
|
2089
|
+
scale: A,
|
|
2090
|
+
scaleWidth: C
|
|
2091
|
+
}), t[5] = A, t[6] = C, t[7] = W, t[8] = zt, t[9] = xt) : xt = t[9];
|
|
2092
|
+
const At = Math.min(Qt * C + W, xt);
|
|
2093
|
+
let Dt;
|
|
2094
|
+
t[10] !== dt || t[11] !== A || t[12] !== C || t[13] !== W || t[14] !== u ? (Dt = en({
|
|
2095
|
+
start: u,
|
|
2096
|
+
end: dt
|
|
2097
|
+
}, {
|
|
2098
|
+
startLeft: W,
|
|
2099
|
+
scale: A,
|
|
2100
|
+
scaleWidth: C
|
|
2101
|
+
}), t[10] = dt, t[11] = A, t[12] = C, t[13] = W, t[14] = u, t[15] = Dt) : Dt = t[15];
|
|
2102
|
+
const te = Dt, [ee, jt] = Ee(null), pt = ee ?? te, Ft = C / $e;
|
|
2103
|
+
let Ct;
|
|
2104
|
+
t[16] !== H || t[17] !== i || t[18] !== F || t[19] !== N || t[20] !== R ? (Ct = Et(ps("action", N && "action-movable", R && "action-selected", F && "action-flexible", i[H] && `action-effect-${H}`)), t[16] = H, t[17] = i, t[18] = F, t[19] = N, t[20] = R, t[21] = Ct) : Ct = t[21];
|
|
2105
|
+
const Yt = Ct;
|
|
2106
|
+
let Ot;
|
|
2107
|
+
t[22] !== C || t[23] !== W || t[24] !== v || t[25] !== m ? (Ot = (ht, mt) => {
|
|
2108
|
+
const rt = ur(ht + mt, {
|
|
2109
|
+
startLeft: W,
|
|
2110
|
+
scaleCount: v,
|
|
2111
|
+
scaleWidth: C
|
|
2112
|
+
});
|
|
2113
|
+
rt !== v && m(rt);
|
|
2114
|
+
}, t[22] = C, t[23] = W, t[24] = v, t[25] = m, t[26] = Ot) : Ot = t[26];
|
|
2115
|
+
const bt = Ot;
|
|
2116
|
+
let Lt;
|
|
2117
|
+
t[27] !== s || t[28] !== h || t[29] !== r ? (Lt = () => {
|
|
2118
|
+
h && h({
|
|
2119
|
+
action: s,
|
|
2120
|
+
row: r
|
|
2121
|
+
});
|
|
2122
|
+
}, t[27] = s, t[28] = h, t[29] = r, t[30] = Lt) : Lt = t[30];
|
|
2123
|
+
const Xt = Lt;
|
|
2124
|
+
let Mt;
|
|
2125
|
+
t[31] !== s || t[32] !== bt || t[33] !== g || t[34] !== r || t[35] !== A || t[36] !== C || t[37] !== W ? (Mt = (ht) => {
|
|
2126
|
+
const {
|
|
2127
|
+
left: mt,
|
|
2128
|
+
width: rt
|
|
2129
|
+
} = ht;
|
|
2130
|
+
if (L.current = !0, g) {
|
|
2131
|
+
const {
|
|
2132
|
+
start: at,
|
|
2133
|
+
end: it
|
|
2134
|
+
} = Re({
|
|
2135
|
+
left: mt,
|
|
2136
|
+
width: rt
|
|
2137
|
+
}, {
|
|
2138
|
+
scaleWidth: C,
|
|
2139
|
+
scale: A,
|
|
2140
|
+
startLeft: W
|
|
2088
2141
|
});
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2142
|
+
if (g({
|
|
2143
|
+
action: s,
|
|
2144
|
+
row: r,
|
|
2145
|
+
start: at,
|
|
2146
|
+
end: it
|
|
2147
|
+
}) === !1)
|
|
2148
|
+
return !1;
|
|
2092
2149
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2150
|
+
jt({
|
|
2151
|
+
left: mt,
|
|
2152
|
+
width: rt
|
|
2153
|
+
}), bt(mt, rt);
|
|
2154
|
+
}, t[31] = s, t[32] = bt, t[33] = g, t[34] = r, t[35] = A, t[36] = C, t[37] = W, t[38] = Mt) : Mt = t[38];
|
|
2155
|
+
const Gt = Mt;
|
|
2156
|
+
let yt;
|
|
2157
|
+
t[39] !== e || t[40] !== B || t[41] !== p || t[42] !== r || t[43] !== A || t[44] !== C || t[45] !== W || t[46] !== w ? (yt = (ht) => {
|
|
2097
2158
|
const {
|
|
2098
|
-
left:
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2159
|
+
left: mt,
|
|
2160
|
+
width: rt
|
|
2161
|
+
} = ht, {
|
|
2162
|
+
start: at,
|
|
2163
|
+
end: it
|
|
2164
|
+
} = Re({
|
|
2165
|
+
left: mt,
|
|
2166
|
+
width: rt
|
|
2167
|
+
}, {
|
|
2168
|
+
scaleWidth: C,
|
|
2169
|
+
scale: A,
|
|
2170
|
+
startLeft: W
|
|
2171
|
+
}), ct = e.find((Ht) => Ht.id === r.id);
|
|
2172
|
+
if (!ct)
|
|
2173
|
+
return;
|
|
2174
|
+
const Bt = ct.actions.find((Ht) => Ht.id === B);
|
|
2175
|
+
Bt && (Bt.start = at, Bt.end = it, w(e), p && p({
|
|
2176
|
+
action: Bt,
|
|
2177
|
+
row: r,
|
|
2178
|
+
start: at,
|
|
2179
|
+
end: it
|
|
2180
|
+
}), jt(null));
|
|
2181
|
+
}, t[39] = e, t[40] = B, t[41] = p, t[42] = r, t[43] = A, t[44] = C, t[45] = W, t[46] = w, t[47] = yt) : yt = t[47];
|
|
2182
|
+
const St = yt;
|
|
2183
|
+
let Vt;
|
|
2184
|
+
t[48] !== s || t[49] !== b || t[50] !== r ? (Vt = (ht) => {
|
|
2185
|
+
b && b({
|
|
2186
|
+
action: s,
|
|
2187
|
+
row: r,
|
|
2188
|
+
dir: ht
|
|
2189
|
+
});
|
|
2190
|
+
}, t[48] = s, t[49] = b, t[50] = r, t[51] = Vt) : Vt = t[51];
|
|
2191
|
+
const Rt = Vt;
|
|
2192
|
+
let It;
|
|
2193
|
+
t[52] !== s || t[53] !== bt || t[54] !== S || t[55] !== r || t[56] !== A || t[57] !== C || t[58] !== W ? (It = (ht, mt) => {
|
|
2194
|
+
const {
|
|
2195
|
+
left: rt,
|
|
2196
|
+
width: at
|
|
2197
|
+
} = mt;
|
|
2198
|
+
if (L.current = !0, S) {
|
|
2199
|
+
const {
|
|
2200
|
+
start: it,
|
|
2201
|
+
end: ct
|
|
2202
|
+
} = Re({
|
|
2203
|
+
left: rt,
|
|
2204
|
+
width: at
|
|
2205
|
+
}, {
|
|
2206
|
+
scaleWidth: C,
|
|
2207
|
+
scale: A,
|
|
2208
|
+
startLeft: W
|
|
2109
2209
|
});
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2210
|
+
if (S({
|
|
2211
|
+
action: s,
|
|
2212
|
+
row: r,
|
|
2213
|
+
start: it,
|
|
2214
|
+
end: ct,
|
|
2215
|
+
dir: ht
|
|
2216
|
+
}) === !1)
|
|
2217
|
+
return !1;
|
|
2113
2218
|
}
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2219
|
+
jt({
|
|
2220
|
+
left: rt,
|
|
2221
|
+
width: at
|
|
2222
|
+
}), bt(rt, at);
|
|
2223
|
+
}, t[52] = s, t[53] = bt, t[54] = S, t[55] = r, t[56] = A, t[57] = C, t[58] = W, t[59] = It) : It = t[59];
|
|
2224
|
+
const O = It;
|
|
2225
|
+
let Y;
|
|
2226
|
+
t[60] !== e || t[61] !== B || t[62] !== y || t[63] !== r || t[64] !== A || t[65] !== C || t[66] !== W || t[67] !== w ? (Y = (ht, mt) => {
|
|
2227
|
+
const {
|
|
2228
|
+
left: rt,
|
|
2229
|
+
width: at
|
|
2230
|
+
} = mt, {
|
|
2231
|
+
start: it,
|
|
2232
|
+
end: ct
|
|
2233
|
+
} = Re({
|
|
2234
|
+
left: rt,
|
|
2235
|
+
width: at
|
|
2236
|
+
}, {
|
|
2237
|
+
scaleWidth: C,
|
|
2238
|
+
scale: A,
|
|
2239
|
+
startLeft: W
|
|
2240
|
+
}), Bt = e.find((Ue) => Ue.id === r.id);
|
|
2241
|
+
if (!Bt)
|
|
2242
|
+
return;
|
|
2243
|
+
const Ht = Bt.actions.find((Ue) => Ue.id === B);
|
|
2244
|
+
Ht && (Ht.start = it, Ht.end = ct, w(e), y && y({
|
|
2245
|
+
action: Ht,
|
|
2246
|
+
row: r,
|
|
2247
|
+
start: it,
|
|
2248
|
+
end: ct,
|
|
2249
|
+
dir: ht
|
|
2250
|
+
}), jt(null));
|
|
2251
|
+
}, t[60] = e, t[61] = B, t[62] = y, t[63] = r, t[64] = A, t[65] = C, t[66] = W, t[67] = w, t[68] = Y) : Y = t[68];
|
|
2252
|
+
const V = Y;
|
|
2253
|
+
let I, Q, et, $, M, nt, q, K, ot, _t, Pt, ne, re, se, ie, oe, $t, Ut, ce, ae, le, ue, fe, de, he, me;
|
|
2254
|
+
if (t[69] !== s || t[70] !== Yt || t[71] !== d || t[72] !== x.assistPositions || t[73] !== F || t[74] !== Z || t[75] !== Ft || t[76] !== _ || t[77] !== Gt || t[78] !== St || t[79] !== Xt || t[80] !== V || t[81] !== Rt || t[82] !== O || t[83] !== U || t[84] !== wt || t[85] !== N || t[86] !== T || t[87] !== P || t[88] !== D || t[89] !== G || t[90] !== At || t[91] !== r || t[92] !== o || t[93] !== A || t[94] !== C || t[95] !== W || t[96] !== tt || t[97] !== pt.left || t[98] !== pt.width) {
|
|
2255
|
+
const ht = {
|
|
2256
|
+
...s,
|
|
2257
|
+
...Re({
|
|
2258
|
+
left: pt.left,
|
|
2259
|
+
width: pt.width
|
|
2260
|
+
}, {
|
|
2261
|
+
startLeft: W,
|
|
2262
|
+
scaleWidth: C,
|
|
2263
|
+
scale: A
|
|
2264
|
+
})
|
|
2265
|
+
}, mt = {
|
|
2266
|
+
...r,
|
|
2267
|
+
actions: [...r.actions]
|
|
2268
|
+
};
|
|
2269
|
+
r.actions.includes(s) && (mt.actions[r.actions.indexOf(s)] = ht), I = Hn, ot = z, _t = tt, Pt = W, ne = pt.left, re = pt.width, se = _ && Ft || qe, ie = _ ? Math.max((Ft || qe) / 2, Je) : Je, oe = x.assistPositions, t[125] !== wt || t[126] !== At ? ($t = () => ({
|
|
2270
|
+
left: wt,
|
|
2271
|
+
right: At
|
|
2272
|
+
}), t[125] = wt, t[126] = At, t[127] = $t) : $t = t[127];
|
|
2273
|
+
let rt;
|
|
2274
|
+
t[128] !== d || t[129] !== F ? (rt = !d && F && `.${Et("action-left-stretch")}`, t[128] = d, t[129] = F, t[130] = rt) : rt = t[130];
|
|
2275
|
+
let at;
|
|
2276
|
+
t[131] !== d || t[132] !== F ? (at = !d && F && `.${Et("action-right-stretch")}`, t[131] = d, t[132] = F, t[133] = at) : at = t[133], t[134] !== rt || t[135] !== at ? (Ut = {
|
|
2277
|
+
left: rt,
|
|
2278
|
+
right: at
|
|
2279
|
+
}, t[134] = rt, t[135] = at, t[136] = Ut) : Ut = t[136], ce = !d && N, ae = !d && F, le = Xt, ue = Gt, fe = St, de = Rt, he = O, me = V, t[137] === Symbol.for("react.memo_cache_sentinel") ? (Q = () => {
|
|
2280
|
+
L.current = !1;
|
|
2281
|
+
}, t[137] = Q) : Q = t[137], t[138] !== s || t[139] !== U || t[140] !== T || t[141] !== P || t[142] !== r ? (et = (it) => {
|
|
2282
|
+
let ct;
|
|
2283
|
+
T && (ct = U(it), T(it, {
|
|
2284
|
+
row: r,
|
|
2285
|
+
action: s,
|
|
2286
|
+
time: ct
|
|
2287
|
+
})), !L.current && P && (ct === void 0 && (ct = U(it)), P(it, {
|
|
2288
|
+
row: r,
|
|
2289
|
+
action: s,
|
|
2290
|
+
time: ct
|
|
2291
|
+
}));
|
|
2292
|
+
}, t[138] = s, t[139] = U, t[140] = T, t[141] = P, t[142] = r, t[143] = et) : et = t[143], t[144] !== s || t[145] !== U || t[146] !== G || t[147] !== r ? ($ = (it) => {
|
|
2293
|
+
if (G) {
|
|
2294
|
+
const ct = U(it);
|
|
2295
|
+
G(it, {
|
|
2296
|
+
row: r,
|
|
2297
|
+
action: s,
|
|
2298
|
+
time: ct
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
}, t[144] = s, t[145] = U, t[146] = G, t[147] = r, t[148] = $) : $ = t[148], t[149] !== s || t[150] !== U || t[151] !== D || t[152] !== r ? (M = (it) => {
|
|
2302
|
+
if (D) {
|
|
2303
|
+
const ct = U(it);
|
|
2304
|
+
D(it, {
|
|
2305
|
+
row: r,
|
|
2306
|
+
action: s,
|
|
2307
|
+
time: ct
|
|
2308
|
+
});
|
|
2309
|
+
}
|
|
2310
|
+
}, t[149] = s, t[150] = U, t[151] = D, t[152] = r, t[153] = M) : M = t[153], nt = Yt, t[154] !== o ? (q = {
|
|
2311
|
+
height: o
|
|
2312
|
+
}, t[154] = o, t[155] = q) : q = t[155], K = Z && Z(ht, mt), t[69] = s, t[70] = Yt, t[71] = d, t[72] = x.assistPositions, t[73] = F, t[74] = Z, t[75] = Ft, t[76] = _, t[77] = Gt, t[78] = St, t[79] = Xt, t[80] = V, t[81] = Rt, t[82] = O, t[83] = U, t[84] = wt, t[85] = N, t[86] = T, t[87] = P, t[88] = D, t[89] = G, t[90] = At, t[91] = r, t[92] = o, t[93] = A, t[94] = C, t[95] = W, t[96] = tt, t[97] = pt.left, t[98] = pt.width, t[99] = I, t[100] = Q, t[101] = et, t[102] = $, t[103] = M, t[104] = nt, t[105] = q, t[106] = K, t[107] = ot, t[108] = _t, t[109] = Pt, t[110] = ne, t[111] = re, t[112] = se, t[113] = ie, t[114] = oe, t[115] = $t, t[116] = Ut, t[117] = ce, t[118] = ae, t[119] = le, t[120] = ue, t[121] = fe, t[122] = de, t[123] = he, t[124] = me;
|
|
2313
|
+
} else
|
|
2314
|
+
I = t[99], Q = t[100], et = t[101], $ = t[102], M = t[103], nt = t[104], q = t[105], K = t[106], ot = t[107], _t = t[108], Pt = t[109], ne = t[110], re = t[111], se = t[112], ie = t[113], oe = t[114], $t = t[115], Ut = t[116], ce = t[117], ae = t[118], le = t[119], ue = t[120], fe = t[121], de = t[122], he = t[123], me = t[124];
|
|
2315
|
+
let ge;
|
|
2316
|
+
t[156] !== F ? (ge = F && /* @__PURE__ */ X.jsx("div", { className: Et("action-left-stretch"), style: {
|
|
2317
|
+
touchAction: "none"
|
|
2318
|
+
} }), t[156] = F, t[157] = ge) : ge = t[157];
|
|
2319
|
+
let pe;
|
|
2320
|
+
t[158] !== F ? (pe = F && /* @__PURE__ */ X.jsx("div", { className: Et("action-right-stretch"), style: {
|
|
2321
|
+
touchAction: "none"
|
|
2322
|
+
} }), t[158] = F, t[159] = pe) : pe = t[159];
|
|
2323
|
+
let _e;
|
|
2324
|
+
t[160] !== Q || t[161] !== et || t[162] !== $ || t[163] !== M || t[164] !== nt || t[165] !== q || t[166] !== K || t[167] !== ge || t[168] !== pe ? (_e = /* @__PURE__ */ X.jsxs("div", { onMouseDown: Q, onClick: et, onDoubleClick: $, onContextMenu: M, className: nt, style: q, children: [
|
|
2325
|
+
K,
|
|
2326
|
+
ge,
|
|
2327
|
+
pe
|
|
2328
|
+
] }), t[160] = Q, t[161] = et, t[162] = $, t[163] = M, t[164] = nt, t[165] = q, t[166] = K, t[167] = ge, t[168] = pe, t[169] = _e) : _e = t[169];
|
|
2329
|
+
let Ae;
|
|
2330
|
+
return t[170] !== I || t[171] !== ot || t[172] !== _t || t[173] !== Pt || t[174] !== ne || t[175] !== re || t[176] !== se || t[177] !== ie || t[178] !== oe || t[179] !== $t || t[180] !== Ut || t[181] !== ce || t[182] !== ae || t[183] !== le || t[184] !== ue || t[185] !== fe || t[186] !== de || t[187] !== he || t[188] !== me || t[189] !== _e ? (Ae = /* @__PURE__ */ X.jsx(I, { ref: ot, parentRef: _t, start: Pt, left: ne, width: re, grid: se, adsorptionDistance: ie, adsorptionPositions: oe, getBounds: $t, edges: Ut, enableDragging: ce, enableResizing: ae, onDragStart: le, onDrag: ue, onDragEnd: fe, onResizeStart: de, onResize: he, onResizeEnd: me, children: _e }), t[170] = I, t[171] = ot, t[172] = _t, t[173] = Pt, t[174] = ne, t[175] = re, t[176] = se, t[177] = ie, t[178] = oe, t[179] = $t, t[180] = Ut, t[181] = ce, t[182] = ae, t[183] = le, t[184] = ue, t[185] = fe, t[186] = de, t[187] = he, t[188] = me, t[189] = _e, t[190] = Ae) : Ae = t[190], Ae;
|
|
2125
2331
|
};
|
|
2126
|
-
function
|
|
2332
|
+
function be(n, t, e) {
|
|
2127
2333
|
let r = e.initialDeps ?? [], s;
|
|
2128
2334
|
function i() {
|
|
2129
|
-
var o, c,
|
|
2130
|
-
let
|
|
2131
|
-
e.key && ((o = e.debug) != null && o.call(e)) && (
|
|
2132
|
-
const
|
|
2133
|
-
if (!(
|
|
2335
|
+
var o, c, l, f;
|
|
2336
|
+
let a;
|
|
2337
|
+
e.key && ((o = e.debug) != null && o.call(e)) && (a = Date.now());
|
|
2338
|
+
const _ = n();
|
|
2339
|
+
if (!(_.length !== r.length || _.some((E, m) => r[m] !== E)))
|
|
2134
2340
|
return s;
|
|
2135
|
-
r =
|
|
2136
|
-
let
|
|
2137
|
-
if (e.key && ((c = e.debug) != null && c.call(e)) && (
|
|
2138
|
-
const
|
|
2139
|
-
for (
|
|
2140
|
-
|
|
2141
|
-
return
|
|
2341
|
+
r = _;
|
|
2342
|
+
let v;
|
|
2343
|
+
if (e.key && ((c = e.debug) != null && c.call(e)) && (v = Date.now()), s = t(..._), e.key && ((l = e.debug) != null && l.call(e))) {
|
|
2344
|
+
const E = Math.round((Date.now() - a) * 100) / 100, m = Math.round((Date.now() - v) * 100) / 100, h = m / 16, g = (p, b) => {
|
|
2345
|
+
for (p = String(p); p.length < b; )
|
|
2346
|
+
p = " " + p;
|
|
2347
|
+
return p;
|
|
2142
2348
|
};
|
|
2143
2349
|
console.info(
|
|
2144
|
-
`%c⏱ ${
|
|
2350
|
+
`%c⏱ ${g(m, 5)} /${g(E, 5)} ms`,
|
|
2145
2351
|
`
|
|
2146
2352
|
font-size: .6rem;
|
|
2147
2353
|
font-weight: bold;
|
|
2148
2354
|
color: hsl(${Math.max(
|
|
2149
2355
|
0,
|
|
2150
|
-
Math.min(120 - 120 *
|
|
2356
|
+
Math.min(120 - 120 * h, 120)
|
|
2151
2357
|
)}deg 100% 31%);`,
|
|
2152
2358
|
e?.key
|
|
2153
2359
|
);
|
|
@@ -2158,25 +2364,25 @@ function Se(n, t, e) {
|
|
|
2158
2364
|
r = o;
|
|
2159
2365
|
}, i;
|
|
2160
2366
|
}
|
|
2161
|
-
function
|
|
2367
|
+
function xn(n, t) {
|
|
2162
2368
|
if (n === void 0)
|
|
2163
2369
|
throw new Error("Unexpected undefined");
|
|
2164
2370
|
return n;
|
|
2165
2371
|
}
|
|
2166
|
-
const
|
|
2372
|
+
const vs = (n, t) => Math.abs(n - t) < 1.01, bs = (n, t, e) => {
|
|
2167
2373
|
let r;
|
|
2168
2374
|
return function(...s) {
|
|
2169
2375
|
n.clearTimeout(r), r = n.setTimeout(() => t.apply(this, s), e);
|
|
2170
2376
|
};
|
|
2171
|
-
},
|
|
2377
|
+
}, An = (n) => {
|
|
2172
2378
|
const { offsetWidth: t, offsetHeight: e } = n;
|
|
2173
2379
|
return { width: t, height: e };
|
|
2174
|
-
},
|
|
2380
|
+
}, ys = (n) => n, Es = (n) => {
|
|
2175
2381
|
const t = Math.max(n.startIndex - n.overscan, 0), e = Math.min(n.endIndex + n.overscan, n.count - 1), r = [];
|
|
2176
2382
|
for (let s = t; s <= e; s++)
|
|
2177
2383
|
r.push(s);
|
|
2178
2384
|
return r;
|
|
2179
|
-
},
|
|
2385
|
+
}, ws = (n, t) => {
|
|
2180
2386
|
const e = n.scrollElement;
|
|
2181
2387
|
if (!e)
|
|
2182
2388
|
return;
|
|
@@ -2184,32 +2390,32 @@ const gs = (n, t) => Math.abs(n - t) < 1.01, _s = (n, t, e) => {
|
|
|
2184
2390
|
if (!r)
|
|
2185
2391
|
return;
|
|
2186
2392
|
const s = (o) => {
|
|
2187
|
-
const { width: c, height:
|
|
2188
|
-
t({ width: Math.round(c), height: Math.round(
|
|
2393
|
+
const { width: c, height: l } = o;
|
|
2394
|
+
t({ width: Math.round(c), height: Math.round(l) });
|
|
2189
2395
|
};
|
|
2190
|
-
if (s(
|
|
2396
|
+
if (s(An(e)), !r.ResizeObserver)
|
|
2191
2397
|
return () => {
|
|
2192
2398
|
};
|
|
2193
2399
|
const i = new r.ResizeObserver((o) => {
|
|
2194
2400
|
const c = () => {
|
|
2195
|
-
const
|
|
2196
|
-
if (
|
|
2197
|
-
const f =
|
|
2401
|
+
const l = o[0];
|
|
2402
|
+
if (l?.borderBoxSize) {
|
|
2403
|
+
const f = l.borderBoxSize[0];
|
|
2198
2404
|
if (f) {
|
|
2199
2405
|
s({ width: f.inlineSize, height: f.blockSize });
|
|
2200
2406
|
return;
|
|
2201
2407
|
}
|
|
2202
2408
|
}
|
|
2203
|
-
s(
|
|
2409
|
+
s(An(e));
|
|
2204
2410
|
};
|
|
2205
2411
|
n.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(c) : c();
|
|
2206
2412
|
});
|
|
2207
2413
|
return i.observe(e, { box: "border-box" }), () => {
|
|
2208
2414
|
i.unobserve(e);
|
|
2209
2415
|
};
|
|
2210
|
-
},
|
|
2416
|
+
}, Dn = {
|
|
2211
2417
|
passive: !0
|
|
2212
|
-
},
|
|
2418
|
+
}, Cn = typeof window > "u" ? !0 : "onscrollend" in window, Ss = (n, t) => {
|
|
2213
2419
|
const e = n.scrollElement;
|
|
2214
2420
|
if (!e)
|
|
2215
2421
|
return;
|
|
@@ -2217,23 +2423,23 @@ const gs = (n, t) => Math.abs(n - t) < 1.01, _s = (n, t, e) => {
|
|
|
2217
2423
|
if (!r)
|
|
2218
2424
|
return;
|
|
2219
2425
|
let s = 0;
|
|
2220
|
-
const i = n.options.useScrollendEvent &&
|
|
2221
|
-
} :
|
|
2426
|
+
const i = n.options.useScrollendEvent && Cn ? () => {
|
|
2427
|
+
} : bs(
|
|
2222
2428
|
r,
|
|
2223
2429
|
() => {
|
|
2224
2430
|
t(s, !1);
|
|
2225
2431
|
},
|
|
2226
2432
|
n.options.isScrollingResetDelay
|
|
2227
|
-
), o = (
|
|
2228
|
-
const { horizontal:
|
|
2229
|
-
s =
|
|
2230
|
-
}, c = o(!0),
|
|
2231
|
-
|
|
2232
|
-
const f = n.options.useScrollendEvent &&
|
|
2233
|
-
return f && e.addEventListener("scrollend",
|
|
2234
|
-
e.removeEventListener("scroll", c), f && e.removeEventListener("scrollend",
|
|
2433
|
+
), o = (a) => () => {
|
|
2434
|
+
const { horizontal: _, isRtl: d } = n.options;
|
|
2435
|
+
s = _ ? e.scrollLeft * (d && -1 || 1) : e.scrollTop, i(), t(s, a);
|
|
2436
|
+
}, c = o(!0), l = o(!1);
|
|
2437
|
+
l(), e.addEventListener("scroll", c, Dn);
|
|
2438
|
+
const f = n.options.useScrollendEvent && Cn;
|
|
2439
|
+
return f && e.addEventListener("scrollend", l, Dn), () => {
|
|
2440
|
+
e.removeEventListener("scroll", c), f && e.removeEventListener("scrollend", l);
|
|
2235
2441
|
};
|
|
2236
|
-
},
|
|
2442
|
+
}, Rs = (n, t, e) => {
|
|
2237
2443
|
if (t?.borderBoxSize) {
|
|
2238
2444
|
const r = t.borderBoxSize[0];
|
|
2239
2445
|
if (r)
|
|
@@ -2242,7 +2448,7 @@ const gs = (n, t) => Math.abs(n - t) < 1.01, _s = (n, t, e) => {
|
|
|
2242
2448
|
);
|
|
2243
2449
|
}
|
|
2244
2450
|
return n[e.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
2245
|
-
},
|
|
2451
|
+
}, Ts = (n, {
|
|
2246
2452
|
adjustments: t = 0,
|
|
2247
2453
|
behavior: e
|
|
2248
2454
|
}, r) => {
|
|
@@ -2291,11 +2497,11 @@ class xs {
|
|
|
2291
2497
|
scrollPaddingStart: 0,
|
|
2292
2498
|
scrollPaddingEnd: 0,
|
|
2293
2499
|
horizontal: !1,
|
|
2294
|
-
getItemKey:
|
|
2295
|
-
rangeExtractor:
|
|
2500
|
+
getItemKey: ys,
|
|
2501
|
+
rangeExtractor: Es,
|
|
2296
2502
|
onChange: () => {
|
|
2297
2503
|
},
|
|
2298
|
-
measureElement:
|
|
2504
|
+
measureElement: Rs,
|
|
2299
2505
|
initialRect: { width: 0, height: 0 },
|
|
2300
2506
|
scrollMargin: 0,
|
|
2301
2507
|
gap: 0,
|
|
@@ -2312,7 +2518,7 @@ class xs {
|
|
|
2312
2518
|
}, this.notify = (e) => {
|
|
2313
2519
|
var r, s;
|
|
2314
2520
|
(s = (r = this.options).onChange) == null || s.call(r, this, e);
|
|
2315
|
-
}, this.maybeNotify =
|
|
2521
|
+
}, this.maybeNotify = be(
|
|
2316
2522
|
() => (this.calculateRange(), [
|
|
2317
2523
|
this.isScrolling,
|
|
2318
2524
|
this.range ? this.range.startIndex : null,
|
|
@@ -2363,14 +2569,14 @@ class xs {
|
|
|
2363
2569
|
const c = e[o];
|
|
2364
2570
|
if (s.has(c.lane))
|
|
2365
2571
|
continue;
|
|
2366
|
-
const
|
|
2572
|
+
const l = i.get(
|
|
2367
2573
|
c.lane
|
|
2368
2574
|
);
|
|
2369
|
-
if (
|
|
2575
|
+
if (l == null || c.end > l.end ? i.set(c.lane, c) : c.end < l.end && s.set(c.lane, !0), s.size === this.options.lanes)
|
|
2370
2576
|
break;
|
|
2371
2577
|
}
|
|
2372
2578
|
return i.size === this.options.lanes ? Array.from(i.values()).sort((o, c) => o.end === c.end ? o.index - c.index : o.end - c.end)[0] : void 0;
|
|
2373
|
-
}, this.getMeasurementOptions =
|
|
2579
|
+
}, this.getMeasurementOptions = be(
|
|
2374
2580
|
() => [
|
|
2375
2581
|
this.options.count,
|
|
2376
2582
|
this.options.paddingStart,
|
|
@@ -2388,26 +2594,26 @@ class xs {
|
|
|
2388
2594
|
{
|
|
2389
2595
|
key: !1
|
|
2390
2596
|
}
|
|
2391
|
-
), this.getMeasurements =
|
|
2597
|
+
), this.getMeasurements = be(
|
|
2392
2598
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
2393
2599
|
({ count: e, paddingStart: r, scrollMargin: s, getItemKey: i, enabled: o }, c) => {
|
|
2394
2600
|
if (!o)
|
|
2395
2601
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
2396
|
-
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((
|
|
2397
|
-
this.itemSizeCache.set(
|
|
2602
|
+
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((a) => {
|
|
2603
|
+
this.itemSizeCache.set(a.key, a.size);
|
|
2398
2604
|
}));
|
|
2399
|
-
const
|
|
2605
|
+
const l = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
2400
2606
|
this.pendingMeasuredCacheIndexes = [];
|
|
2401
|
-
const f = this.measurementsCache.slice(0,
|
|
2402
|
-
for (let
|
|
2403
|
-
const
|
|
2404
|
-
f[
|
|
2405
|
-
index:
|
|
2406
|
-
start:
|
|
2407
|
-
size:
|
|
2408
|
-
end:
|
|
2409
|
-
key:
|
|
2410
|
-
lane:
|
|
2607
|
+
const f = this.measurementsCache.slice(0, l);
|
|
2608
|
+
for (let a = l; a < e; a++) {
|
|
2609
|
+
const _ = i(a), d = this.options.lanes === 1 ? f[a - 1] : this.getFurthestMeasurement(f, a), v = d ? d.end + this.options.gap : r + s, E = c.get(_), m = typeof E == "number" ? E : this.options.estimateSize(a), h = v + m, g = d ? d.lane : a % this.options.lanes;
|
|
2610
|
+
f[a] = {
|
|
2611
|
+
index: a,
|
|
2612
|
+
start: v,
|
|
2613
|
+
size: m,
|
|
2614
|
+
end: h,
|
|
2615
|
+
key: _,
|
|
2616
|
+
lane: g
|
|
2411
2617
|
};
|
|
2412
2618
|
}
|
|
2413
2619
|
return this.measurementsCache = f, f;
|
|
@@ -2416,14 +2622,14 @@ class xs {
|
|
|
2416
2622
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
2417
2623
|
debug: () => this.options.debug
|
|
2418
2624
|
}
|
|
2419
|
-
), this.calculateRange =
|
|
2625
|
+
), this.calculateRange = be(
|
|
2420
2626
|
() => [
|
|
2421
2627
|
this.getMeasurements(),
|
|
2422
2628
|
this.getSize(),
|
|
2423
2629
|
this.getScrollOffset(),
|
|
2424
2630
|
this.options.lanes
|
|
2425
2631
|
],
|
|
2426
|
-
(e, r, s, i) => this.range = e.length > 0 && r > 0 ?
|
|
2632
|
+
(e, r, s, i) => this.range = e.length > 0 && r > 0 ? As({
|
|
2427
2633
|
measurements: e,
|
|
2428
2634
|
outerSize: r,
|
|
2429
2635
|
scrollOffset: s,
|
|
@@ -2433,7 +2639,7 @@ class xs {
|
|
|
2433
2639
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
2434
2640
|
debug: () => this.options.debug
|
|
2435
2641
|
}
|
|
2436
|
-
), this.getVirtualIndexes =
|
|
2642
|
+
), this.getVirtualIndexes = be(
|
|
2437
2643
|
() => {
|
|
2438
2644
|
let e = null, r = null;
|
|
2439
2645
|
const s = this.calculateRange();
|
|
@@ -2483,13 +2689,13 @@ class xs {
|
|
|
2483
2689
|
return;
|
|
2484
2690
|
}
|
|
2485
2691
|
this._measureElement(e, void 0);
|
|
2486
|
-
}, this.getVirtualItems =
|
|
2692
|
+
}, this.getVirtualItems = be(
|
|
2487
2693
|
() => [this.getVirtualIndexes(), this.getMeasurements()],
|
|
2488
2694
|
(e, r) => {
|
|
2489
2695
|
const s = [];
|
|
2490
2696
|
for (let i = 0, o = e.length; i < o; i++) {
|
|
2491
|
-
const c = e[i],
|
|
2492
|
-
s.push(
|
|
2697
|
+
const c = e[i], l = r[c];
|
|
2698
|
+
s.push(l);
|
|
2493
2699
|
}
|
|
2494
2700
|
return s;
|
|
2495
2701
|
},
|
|
@@ -2500,11 +2706,11 @@ class xs {
|
|
|
2500
2706
|
), this.getVirtualItemForOffset = (e) => {
|
|
2501
2707
|
const r = this.getMeasurements();
|
|
2502
2708
|
if (r.length !== 0)
|
|
2503
|
-
return
|
|
2504
|
-
r[
|
|
2709
|
+
return xn(
|
|
2710
|
+
r[Yn(
|
|
2505
2711
|
0,
|
|
2506
2712
|
r.length - 1,
|
|
2507
|
-
(s) =>
|
|
2713
|
+
(s) => xn(r[s]).start,
|
|
2508
2714
|
e
|
|
2509
2715
|
)]
|
|
2510
2716
|
);
|
|
@@ -2545,21 +2751,21 @@ class xs {
|
|
|
2545
2751
|
let i = 0;
|
|
2546
2752
|
const o = 10, c = (f) => {
|
|
2547
2753
|
if (!this.targetWindow) return;
|
|
2548
|
-
const
|
|
2549
|
-
if (!
|
|
2754
|
+
const a = this.getOffsetForIndex(e, f);
|
|
2755
|
+
if (!a) {
|
|
2550
2756
|
console.warn("Failed to get offset for index:", e);
|
|
2551
2757
|
return;
|
|
2552
2758
|
}
|
|
2553
|
-
const [
|
|
2554
|
-
this._scrollToOffset(
|
|
2555
|
-
const
|
|
2556
|
-
if (!
|
|
2759
|
+
const [_, d] = a;
|
|
2760
|
+
this._scrollToOffset(_, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
|
|
2761
|
+
const v = this.getScrollOffset(), E = this.getOffsetForIndex(e, d);
|
|
2762
|
+
if (!E) {
|
|
2557
2763
|
console.warn("Failed to get offset for index:", e);
|
|
2558
2764
|
return;
|
|
2559
2765
|
}
|
|
2560
|
-
|
|
2766
|
+
vs(E[0], v) || l(d);
|
|
2561
2767
|
});
|
|
2562
|
-
},
|
|
2768
|
+
}, l = (f) => {
|
|
2563
2769
|
this.targetWindow && (i++, i < o ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", i, o), this.targetWindow.requestAnimationFrame(() => c(f))) : console.warn(
|
|
2564
2770
|
`Failed to scroll to index ${e} after ${o} attempts.`
|
|
2565
2771
|
));
|
|
@@ -2603,7 +2809,7 @@ class xs {
|
|
|
2603
2809
|
}, this.setOptions(t);
|
|
2604
2810
|
}
|
|
2605
2811
|
}
|
|
2606
|
-
const
|
|
2812
|
+
const Yn = (n, t, e, r) => {
|
|
2607
2813
|
for (; n <= t; ) {
|
|
2608
2814
|
const s = (n + t) / 2 | 0, i = e(s);
|
|
2609
2815
|
if (i < r)
|
|
@@ -2615,19 +2821,19 @@ const Gn = (n, t, e, r) => {
|
|
|
2615
2821
|
}
|
|
2616
2822
|
return n > 0 ? n - 1 : 0;
|
|
2617
2823
|
};
|
|
2618
|
-
function
|
|
2824
|
+
function As({
|
|
2619
2825
|
measurements: n,
|
|
2620
2826
|
outerSize: t,
|
|
2621
2827
|
scrollOffset: e,
|
|
2622
2828
|
lanes: r
|
|
2623
2829
|
}) {
|
|
2624
|
-
const s = n.length - 1, i = (
|
|
2830
|
+
const s = n.length - 1, i = (l) => n[l].start;
|
|
2625
2831
|
if (n.length <= r)
|
|
2626
2832
|
return {
|
|
2627
2833
|
startIndex: 0,
|
|
2628
2834
|
endIndex: s
|
|
2629
2835
|
};
|
|
2630
|
-
let o =
|
|
2836
|
+
let o = Yn(
|
|
2631
2837
|
0,
|
|
2632
2838
|
s,
|
|
2633
2839
|
i,
|
|
@@ -2637,482 +2843,163 @@ function Rs({
|
|
|
2637
2843
|
for (; c < s && n[c].end < e + t; )
|
|
2638
2844
|
c++;
|
|
2639
2845
|
else if (r > 1) {
|
|
2640
|
-
const
|
|
2641
|
-
for (; c < s &&
|
|
2642
|
-
const
|
|
2643
|
-
a
|
|
2846
|
+
const l = Array(r).fill(0);
|
|
2847
|
+
for (; c < s && l.some((a) => a < e + t); ) {
|
|
2848
|
+
const a = n[c];
|
|
2849
|
+
l[a.lane] = a.end, c++;
|
|
2644
2850
|
}
|
|
2645
2851
|
const f = Array(r).fill(e + t);
|
|
2646
|
-
for (; o >= 0 && f.some((
|
|
2647
|
-
const
|
|
2648
|
-
f[
|
|
2852
|
+
for (; o >= 0 && f.some((a) => a >= e); ) {
|
|
2853
|
+
const a = n[o];
|
|
2854
|
+
f[a.lane] = a.start, o--;
|
|
2649
2855
|
}
|
|
2650
2856
|
o = Math.max(0, o - o % r), c = Math.min(s, c + (r - 1 - c % r));
|
|
2651
2857
|
}
|
|
2652
2858
|
return { startIndex: o, endIndex: c };
|
|
2653
2859
|
}
|
|
2654
|
-
const
|
|
2655
|
-
function
|
|
2656
|
-
const t =
|
|
2860
|
+
const On = typeof document < "u" ? Ne.useLayoutEffect : Ne.useEffect;
|
|
2861
|
+
function Ds(n) {
|
|
2862
|
+
const t = Ne.useReducer(() => ({}), {})[1], e = {
|
|
2657
2863
|
...n,
|
|
2658
2864
|
onChange: (s, i) => {
|
|
2659
2865
|
var o;
|
|
2660
|
-
i ?
|
|
2866
|
+
i ? Zn(t) : t(), (o = n.onChange) == null || o.call(n, s, i);
|
|
2661
2867
|
}
|
|
2662
|
-
}, [r] =
|
|
2868
|
+
}, [r] = Ne.useState(
|
|
2663
2869
|
() => new xs(e)
|
|
2664
2870
|
);
|
|
2665
|
-
return r.setOptions(e),
|
|
2871
|
+
return r.setOptions(e), On(() => r._didMount(), []), On(() => r._willUpdate()), r;
|
|
2666
2872
|
}
|
|
2667
|
-
function
|
|
2668
|
-
return
|
|
2669
|
-
observeElementRect:
|
|
2670
|
-
observeElementOffset:
|
|
2671
|
-
scrollToFn:
|
|
2873
|
+
function Xn(n) {
|
|
2874
|
+
return Ds({
|
|
2875
|
+
observeElementRect: ws,
|
|
2876
|
+
observeElementOffset: Ss,
|
|
2877
|
+
scrollToFn: Ts,
|
|
2672
2878
|
...n
|
|
2673
2879
|
});
|
|
2674
2880
|
}
|
|
2675
|
-
const
|
|
2676
|
-
const
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
}, Os = (n) => {
|
|
2696
|
-
const t = Qt.c(198), {
|
|
2697
|
-
editorData: e,
|
|
2698
|
-
row: r,
|
|
2699
|
-
action: s,
|
|
2700
|
-
effects: i,
|
|
2701
|
-
rowHeight: o,
|
|
2702
|
-
scale: c,
|
|
2703
|
-
scaleWidth: a,
|
|
2704
|
-
scaleSplitCount: f,
|
|
2705
|
-
startLeft: l,
|
|
2706
|
-
gridSnap: m,
|
|
2707
|
-
disableDrag: d,
|
|
2708
|
-
scaleCount: g,
|
|
2709
|
-
maxScaleCount: v,
|
|
2710
|
-
setScaleCount: p,
|
|
2711
|
-
onActionMoveStart: b,
|
|
2712
|
-
onActionMoving: w,
|
|
2713
|
-
onActionMoveEnd: h,
|
|
2714
|
-
onActionResizeStart: x,
|
|
2715
|
-
onActionResizeEnd: O,
|
|
2716
|
-
onActionResizing: _,
|
|
2717
|
-
dragLineData: y,
|
|
2718
|
-
setEditorData: E,
|
|
2719
|
-
onClickAction: P,
|
|
2720
|
-
onClickActionOnly: C,
|
|
2721
|
-
onDoubleClickAction: H,
|
|
2722
|
-
onContextMenuAction: X,
|
|
2723
|
-
getActionRender: z,
|
|
2724
|
-
handleTime: F,
|
|
2725
|
-
areaRef: q,
|
|
2726
|
-
deltaScrollLeft: S
|
|
2727
|
-
} = n, R = Q(null), M = Q(!1), {
|
|
2728
|
-
id: U,
|
|
2729
|
-
maxEnd: ft,
|
|
2730
|
-
minStart: gt,
|
|
2731
|
-
end: u,
|
|
2732
|
-
start: T,
|
|
2733
|
-
selected: I,
|
|
2734
|
-
flexible: V,
|
|
2735
|
-
movable: _t,
|
|
2736
|
-
effectId: vt
|
|
2737
|
-
} = s, D = V === void 0 ? !0 : V, rt = _t === void 0 ? !0 : _t, $ = c ?? ze, k = a ?? Fe, j = l ?? Ue, jt = f ?? Mn, Ut = v ?? Number.MAX_SAFE_INTEGER, It = gt || 0;
|
|
2738
|
-
let xt;
|
|
2739
|
-
t[0] !== $ || t[1] !== k || t[2] !== j || t[3] !== It ? (xt = $t(It, {
|
|
2740
|
-
startLeft: j,
|
|
2741
|
-
scale: $,
|
|
2742
|
-
scaleWidth: k
|
|
2743
|
-
}), t[0] = $, t[1] = k, t[2] = j, t[3] = It, t[4] = xt) : xt = t[4];
|
|
2744
|
-
const Rt = xt, At = ft || Number.MAX_VALUE;
|
|
2745
|
-
let Wt;
|
|
2746
|
-
t[5] !== $ || t[6] !== k || t[7] !== j || t[8] !== At ? (Wt = $t(At, {
|
|
2747
|
-
startLeft: j,
|
|
2748
|
-
scale: $,
|
|
2749
|
-
scaleWidth: k
|
|
2750
|
-
}), t[5] = $, t[6] = k, t[7] = j, t[8] = At, t[9] = Wt) : Wt = t[9];
|
|
2751
|
-
const Ot = Math.min(Ut * k + j, Wt);
|
|
2752
|
-
let Ct;
|
|
2753
|
-
t[10] !== u || t[11] !== $ || t[12] !== k || t[13] !== j || t[14] !== T ? (Ct = Nn({
|
|
2754
|
-
start: T,
|
|
2755
|
-
end: u
|
|
2756
|
-
}, {
|
|
2757
|
-
startLeft: j,
|
|
2758
|
-
scale: $,
|
|
2759
|
-
scaleWidth: k
|
|
2760
|
-
}), t[10] = u, t[11] = $, t[12] = k, t[13] = j, t[14] = T, t[15] = Ct) : Ct = t[15];
|
|
2761
|
-
const Dt = Ct, [te, J] = ne(null), Z = te ?? Dt, Y = k / jt;
|
|
2762
|
-
let it;
|
|
2763
|
-
t[16] !== vt || t[17] !== i || t[18] !== D || t[19] !== rt || t[20] !== I ? (it = ["action"], rt && it.push("action-movable"), I && it.push("action-selected"), D && it.push("action-flexible"), i[vt] && it.push(`action-effect-${vt}`), t[16] = vt, t[17] = i, t[18] = D, t[19] = rt, t[20] = I, t[21] = it) : it = t[21];
|
|
2764
|
-
let bt;
|
|
2765
|
-
t[22] !== k || t[23] !== j || t[24] !== g || t[25] !== p ? (bt = (yt, wt) => {
|
|
2766
|
-
const st = dr(yt + wt, {
|
|
2767
|
-
startLeft: j,
|
|
2768
|
-
scaleCount: g,
|
|
2769
|
-
scaleWidth: k
|
|
2770
|
-
});
|
|
2771
|
-
st !== g && p(st);
|
|
2772
|
-
}, t[22] = k, t[23] = j, t[24] = g, t[25] = p, t[26] = bt) : bt = t[26];
|
|
2773
|
-
const Tt = bt;
|
|
2774
|
-
let Pt;
|
|
2775
|
-
t[27] !== s || t[28] !== b || t[29] !== r ? (Pt = () => {
|
|
2776
|
-
b && b({
|
|
2777
|
-
action: s,
|
|
2778
|
-
row: r
|
|
2779
|
-
});
|
|
2780
|
-
}, t[27] = s, t[28] = b, t[29] = r, t[30] = Pt) : Pt = t[30];
|
|
2781
|
-
const Ht = Pt;
|
|
2782
|
-
let Bt;
|
|
2783
|
-
t[31] !== s || t[32] !== Tt || t[33] !== w || t[34] !== r || t[35] !== $ || t[36] !== k || t[37] !== j ? (Bt = (yt) => {
|
|
2784
|
-
const {
|
|
2785
|
-
left: wt,
|
|
2786
|
-
width: st
|
|
2787
|
-
} = yt;
|
|
2788
|
-
if (M.current = !0, w) {
|
|
2789
|
-
const {
|
|
2790
|
-
start: ht,
|
|
2791
|
-
end: Et
|
|
2792
|
-
} = Ae({
|
|
2793
|
-
left: wt,
|
|
2794
|
-
width: st
|
|
2795
|
-
}, {
|
|
2796
|
-
scaleWidth: k,
|
|
2797
|
-
scale: $,
|
|
2798
|
-
startLeft: j
|
|
2799
|
-
});
|
|
2800
|
-
if (w({
|
|
2801
|
-
action: s,
|
|
2802
|
-
row: r,
|
|
2803
|
-
start: ht,
|
|
2804
|
-
end: Et
|
|
2805
|
-
}) === !1)
|
|
2806
|
-
return !1;
|
|
2807
|
-
}
|
|
2808
|
-
J({
|
|
2809
|
-
left: wt,
|
|
2810
|
-
width: st
|
|
2811
|
-
}), Tt(wt, st);
|
|
2812
|
-
}, t[31] = s, t[32] = Tt, t[33] = w, t[34] = r, t[35] = $, t[36] = k, t[37] = j, t[38] = Bt) : Bt = t[38];
|
|
2813
|
-
const ee = Bt;
|
|
2814
|
-
let kt;
|
|
2815
|
-
t[39] !== e || t[40] !== U || t[41] !== h || t[42] !== r || t[43] !== $ || t[44] !== k || t[45] !== j || t[46] !== E ? (kt = (yt) => {
|
|
2816
|
-
const {
|
|
2817
|
-
left: wt,
|
|
2818
|
-
width: st
|
|
2819
|
-
} = yt, {
|
|
2820
|
-
start: ht,
|
|
2821
|
-
end: Et
|
|
2822
|
-
} = Ae({
|
|
2823
|
-
left: wt,
|
|
2824
|
-
width: st
|
|
2825
|
-
}, {
|
|
2826
|
-
scaleWidth: k,
|
|
2827
|
-
scale: $,
|
|
2828
|
-
startLeft: j
|
|
2829
|
-
}), Lt = e.find((ut) => ut.id === r.id);
|
|
2830
|
-
if (!Lt)
|
|
2831
|
-
return;
|
|
2832
|
-
const at = Lt.actions.find((ut) => ut.id === U);
|
|
2833
|
-
at && (at.start = ht, at.end = Et, E(e), h && h({
|
|
2834
|
-
action: at,
|
|
2835
|
-
row: r,
|
|
2836
|
-
start: ht,
|
|
2837
|
-
end: Et
|
|
2838
|
-
}), J(null));
|
|
2839
|
-
}, t[39] = e, t[40] = U, t[41] = h, t[42] = r, t[43] = $, t[44] = k, t[45] = j, t[46] = E, t[47] = kt) : kt = t[47];
|
|
2840
|
-
const zt = kt;
|
|
2841
|
-
let Yt;
|
|
2842
|
-
t[48] !== s || t[49] !== x || t[50] !== r ? (Yt = (yt) => {
|
|
2843
|
-
x && x({
|
|
2844
|
-
action: s,
|
|
2845
|
-
row: r,
|
|
2846
|
-
dir: yt
|
|
2881
|
+
const Cs = (n) => {
|
|
2882
|
+
const {
|
|
2883
|
+
rowData: t,
|
|
2884
|
+
style: e = {},
|
|
2885
|
+
onClickRow: r,
|
|
2886
|
+
onDoubleClickRow: s,
|
|
2887
|
+
onContextMenuRow: i,
|
|
2888
|
+
scrollContainerRef: o,
|
|
2889
|
+
startLeft: c,
|
|
2890
|
+
scale: l,
|
|
2891
|
+
scaleWidth: f
|
|
2892
|
+
} = n, a = ["edit-row"];
|
|
2893
|
+
t?.selected && a.push("edit-row-selected");
|
|
2894
|
+
const _ = l ?? We, d = f ?? ze, v = c ?? Fe, E = (g) => {
|
|
2895
|
+
if (!o.current) return 0;
|
|
2896
|
+
const p = o.current.getBoundingClientRect(), y = g.clientX - p.x;
|
|
2897
|
+
return Zt(y, {
|
|
2898
|
+
startLeft: v,
|
|
2899
|
+
scale: _,
|
|
2900
|
+
scaleWidth: d
|
|
2847
2901
|
});
|
|
2848
|
-
},
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
end: Lt
|
|
2860
|
-
} = Ae({
|
|
2861
|
-
left: st,
|
|
2862
|
-
width: ht
|
|
2863
|
-
}, {
|
|
2864
|
-
scaleWidth: k,
|
|
2865
|
-
scale: $,
|
|
2866
|
-
startLeft: j
|
|
2867
|
-
});
|
|
2868
|
-
if (_({
|
|
2869
|
-
action: s,
|
|
2870
|
-
row: r,
|
|
2871
|
-
start: Et,
|
|
2872
|
-
end: Lt,
|
|
2873
|
-
dir: yt
|
|
2874
|
-
}) === !1)
|
|
2875
|
-
return !1;
|
|
2876
|
-
}
|
|
2877
|
-
J({
|
|
2878
|
-
left: st,
|
|
2879
|
-
width: ht
|
|
2880
|
-
}), Tt(st, ht);
|
|
2881
|
-
}, t[52] = s, t[53] = Tt, t[54] = _, t[55] = r, t[56] = $, t[57] = k, t[58] = j, t[59] = Xt) : Xt = t[59];
|
|
2882
|
-
const L = Xt;
|
|
2883
|
-
let K;
|
|
2884
|
-
t[60] !== e || t[61] !== U || t[62] !== O || t[63] !== r || t[64] !== $ || t[65] !== k || t[66] !== j || t[67] !== E ? (K = (yt, wt) => {
|
|
2885
|
-
const {
|
|
2886
|
-
left: st,
|
|
2887
|
-
width: ht
|
|
2888
|
-
} = wt, {
|
|
2889
|
-
start: Et,
|
|
2890
|
-
end: Lt
|
|
2891
|
-
} = Ae({
|
|
2892
|
-
left: st,
|
|
2893
|
-
width: ht
|
|
2894
|
-
}, {
|
|
2895
|
-
scaleWidth: k,
|
|
2896
|
-
scale: $,
|
|
2897
|
-
startLeft: j
|
|
2898
|
-
}), at = e.find((Be) => Be.id === r.id);
|
|
2899
|
-
if (!at)
|
|
2900
|
-
return;
|
|
2901
|
-
const ut = at.actions.find((Be) => Be.id === U);
|
|
2902
|
-
ut && (ut.start = Et, ut.end = Lt, E(e), O && O({
|
|
2903
|
-
action: ut,
|
|
2904
|
-
row: r,
|
|
2905
|
-
start: Et,
|
|
2906
|
-
end: Lt,
|
|
2907
|
-
dir: yt
|
|
2908
|
-
}), J(null));
|
|
2909
|
-
}, t[60] = e, t[61] = U, t[62] = O, t[63] = r, t[64] = $, t[65] = k, t[66] = j, t[67] = E, t[68] = K) : K = t[68];
|
|
2910
|
-
const B = K;
|
|
2911
|
-
let W, tt, lt, A, et, ot, G, ct, dt, Nt, se, ie, oe, ce, ae, le, Gt, Kt, ue, fe, de, he, me, pe, ge, _e, ve;
|
|
2912
|
-
if (t[69] !== s || t[70] !== q || t[71] !== it || t[72] !== S || t[73] !== d || t[74] !== y.assistPositions || t[75] !== D || t[76] !== z || t[77] !== Y || t[78] !== m || t[79] !== ee || t[80] !== zt || t[81] !== Ht || t[82] !== B || t[83] !== Ft || t[84] !== L || t[85] !== F || t[86] !== Rt || t[87] !== rt || t[88] !== P || t[89] !== C || t[90] !== X || t[91] !== H || t[92] !== Ot || t[93] !== r || t[94] !== o || t[95] !== $ || t[96] !== k || t[97] !== j || t[98] !== Z.left || t[99] !== Z.width) {
|
|
2913
|
-
const yt = {
|
|
2914
|
-
...s,
|
|
2915
|
-
...Ae({
|
|
2916
|
-
left: Z.left,
|
|
2917
|
-
width: Z.width
|
|
2902
|
+
}, m = t?.actions ?? [], h = Xn({
|
|
2903
|
+
horizontal: !0,
|
|
2904
|
+
count: m.length,
|
|
2905
|
+
getScrollElement: () => o.current,
|
|
2906
|
+
estimateSize: (g) => {
|
|
2907
|
+
if (!m[g]) return 0;
|
|
2908
|
+
let {
|
|
2909
|
+
width: p
|
|
2910
|
+
} = en({
|
|
2911
|
+
start: m[g].start,
|
|
2912
|
+
end: m[g].end
|
|
2918
2913
|
}, {
|
|
2919
|
-
startLeft:
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
})
|
|
2923
|
-
}, wt = {
|
|
2924
|
-
...r,
|
|
2925
|
-
actions: [...r.actions]
|
|
2926
|
-
};
|
|
2927
|
-
r.actions.includes(s) && (wt.actions[r.actions.indexOf(s)] = yt), W = Xn, dt = R, Nt = q, se = j, ie = Z.left, oe = Z.width, ce = m && Y || Ze, ae = m ? Math.max((Y || Ze) / 2, Qe) : Qe, le = y.assistPositions, t[127] !== Rt || t[128] !== Ot ? (Gt = {
|
|
2928
|
-
left: Rt,
|
|
2929
|
-
right: Ot
|
|
2930
|
-
}, t[127] = Rt, t[128] = Ot, t[129] = Gt) : Gt = t[129];
|
|
2931
|
-
let st;
|
|
2932
|
-
t[130] !== d || t[131] !== D ? (st = !d && D && `.${mt("action-left-stretch")}`, t[130] = d, t[131] = D, t[132] = st) : st = t[132];
|
|
2933
|
-
let ht;
|
|
2934
|
-
t[133] !== d || t[134] !== D ? (ht = !d && D && `.${mt("action-right-stretch")}`, t[133] = d, t[134] = D, t[135] = ht) : ht = t[135], t[136] !== st || t[137] !== ht ? (Kt = {
|
|
2935
|
-
left: st,
|
|
2936
|
-
right: ht
|
|
2937
|
-
}, t[136] = st, t[137] = ht, t[138] = Kt) : Kt = t[138], ue = !d && rt, fe = !d && D, de = Ht, he = ee, me = zt, pe = Ft, ge = L, _e = B, ve = S, t[139] === Symbol.for("react.memo_cache_sentinel") ? (tt = () => {
|
|
2938
|
-
M.current = !1;
|
|
2939
|
-
}, t[139] = tt) : tt = t[139], t[140] !== s || t[141] !== F || t[142] !== P || t[143] !== C || t[144] !== r ? (lt = (at) => {
|
|
2940
|
-
let ut;
|
|
2941
|
-
P && (ut = F(at), P(at, {
|
|
2942
|
-
row: r,
|
|
2943
|
-
action: s,
|
|
2944
|
-
time: ut
|
|
2945
|
-
})), !M.current && C && (ut === void 0 && (ut = F(at)), C(at, {
|
|
2946
|
-
row: r,
|
|
2947
|
-
action: s,
|
|
2948
|
-
time: ut
|
|
2949
|
-
}));
|
|
2950
|
-
}, t[140] = s, t[141] = F, t[142] = P, t[143] = C, t[144] = r, t[145] = lt) : lt = t[145], t[146] !== s || t[147] !== F || t[148] !== H || t[149] !== r ? (A = (at) => {
|
|
2951
|
-
if (H) {
|
|
2952
|
-
const ut = F(at);
|
|
2953
|
-
H(at, {
|
|
2954
|
-
row: r,
|
|
2955
|
-
action: s,
|
|
2956
|
-
time: ut
|
|
2957
|
-
});
|
|
2958
|
-
}
|
|
2959
|
-
}, t[146] = s, t[147] = F, t[148] = H, t[149] = r, t[150] = A) : A = t[150], t[151] !== s || t[152] !== F || t[153] !== X || t[154] !== r ? (et = (at) => {
|
|
2960
|
-
if (X) {
|
|
2961
|
-
const ut = F(at);
|
|
2962
|
-
X(at, {
|
|
2963
|
-
row: r,
|
|
2964
|
-
action: s,
|
|
2965
|
-
time: ut
|
|
2966
|
-
});
|
|
2967
|
-
}
|
|
2968
|
-
}, t[151] = s, t[152] = F, t[153] = X, t[154] = r, t[155] = et) : et = t[155];
|
|
2969
|
-
let Et;
|
|
2970
|
-
t[156] !== it ? (Et = it || [], t[156] = it, t[157] = Et) : Et = t[157];
|
|
2971
|
-
const Lt = Et.join(" ");
|
|
2972
|
-
t[158] !== Lt ? (ot = mt(Lt), t[158] = Lt, t[159] = ot) : ot = t[159], t[160] !== o ? (G = {
|
|
2973
|
-
height: o
|
|
2974
|
-
}, t[160] = o, t[161] = G) : G = t[161], ct = z && z(yt, wt), t[69] = s, t[70] = q, t[71] = it, t[72] = S, t[73] = d, t[74] = y.assistPositions, t[75] = D, t[76] = z, t[77] = Y, t[78] = m, t[79] = ee, t[80] = zt, t[81] = Ht, t[82] = B, t[83] = Ft, t[84] = L, t[85] = F, t[86] = Rt, t[87] = rt, t[88] = P, t[89] = C, t[90] = X, t[91] = H, t[92] = Ot, t[93] = r, t[94] = o, t[95] = $, t[96] = k, t[97] = j, t[98] = Z.left, t[99] = Z.width, t[100] = W, t[101] = tt, t[102] = lt, t[103] = A, t[104] = et, t[105] = ot, t[106] = G, t[107] = ct, t[108] = dt, t[109] = Nt, t[110] = se, t[111] = ie, t[112] = oe, t[113] = ce, t[114] = ae, t[115] = le, t[116] = Gt, t[117] = Kt, t[118] = ue, t[119] = fe, t[120] = de, t[121] = he, t[122] = me, t[123] = pe, t[124] = ge, t[125] = _e, t[126] = ve;
|
|
2975
|
-
} else
|
|
2976
|
-
W = t[100], tt = t[101], lt = t[102], A = t[103], et = t[104], ot = t[105], G = t[106], ct = t[107], dt = t[108], Nt = t[109], se = t[110], ie = t[111], oe = t[112], ce = t[113], ae = t[114], le = t[115], Gt = t[116], Kt = t[117], ue = t[118], fe = t[119], de = t[120], he = t[121], me = t[122], pe = t[123], ge = t[124], _e = t[125], ve = t[126];
|
|
2977
|
-
let be;
|
|
2978
|
-
t[162] !== D ? (be = D && /* @__PURE__ */ N.jsx("div", { className: mt("action-left-stretch"), style: {
|
|
2979
|
-
touchAction: "none"
|
|
2980
|
-
} }), t[162] = D, t[163] = be) : be = t[163];
|
|
2981
|
-
let ye;
|
|
2982
|
-
t[164] !== D ? (ye = D && /* @__PURE__ */ N.jsx("div", { className: mt("action-right-stretch"), style: {
|
|
2983
|
-
touchAction: "none"
|
|
2984
|
-
} }), t[164] = D, t[165] = ye) : ye = t[165];
|
|
2985
|
-
let we;
|
|
2986
|
-
t[166] !== tt || t[167] !== lt || t[168] !== A || t[169] !== et || t[170] !== ot || t[171] !== G || t[172] !== ct || t[173] !== be || t[174] !== ye ? (we = /* @__PURE__ */ N.jsxs("div", { onMouseDown: tt, onClick: lt, onDoubleClick: A, onContextMenu: et, className: ot, style: G, children: [
|
|
2987
|
-
ct,
|
|
2988
|
-
be,
|
|
2989
|
-
ye
|
|
2990
|
-
] }), t[166] = tt, t[167] = lt, t[168] = A, t[169] = et, t[170] = ot, t[171] = G, t[172] = ct, t[173] = be, t[174] = ye, t[175] = we) : we = t[175];
|
|
2991
|
-
let De;
|
|
2992
|
-
return t[176] !== W || t[177] !== dt || t[178] !== Nt || t[179] !== se || t[180] !== ie || t[181] !== oe || t[182] !== ce || t[183] !== ae || t[184] !== le || t[185] !== Gt || t[186] !== Kt || t[187] !== ue || t[188] !== fe || t[189] !== de || t[190] !== he || t[191] !== me || t[192] !== pe || t[193] !== ge || t[194] !== _e || t[195] !== ve || t[196] !== we ? (De = /* @__PURE__ */ N.jsx(W, { ref: dt, parentRef: Nt, start: se, left: ie, width: oe, grid: ce, adsorptionDistance: ae, adsorptionPositions: le, bounds: Gt, edges: Kt, enableDragging: ue, enableResizing: fe, onDragStart: de, onDrag: he, onDragEnd: me, onResizeStart: pe, onResize: ge, onResizeEnd: _e, deltaScrollLeft: ve, children: we }), t[176] = W, t[177] = dt, t[178] = Nt, t[179] = se, t[180] = ie, t[181] = oe, t[182] = ce, t[183] = ae, t[184] = le, t[185] = Gt, t[186] = Kt, t[187] = ue, t[188] = fe, t[189] = de, t[190] = he, t[191] = me, t[192] = pe, t[193] = ge, t[194] = _e, t[195] = ve, t[196] = we, t[197] = De) : De = t[197], De;
|
|
2993
|
-
}, Cs = (n) => {
|
|
2994
|
-
const t = Qt.c(43), {
|
|
2995
|
-
rowData: e,
|
|
2996
|
-
style: r,
|
|
2997
|
-
onClickRow: s,
|
|
2998
|
-
onDoubleClickRow: i,
|
|
2999
|
-
onContextMenuRow: o,
|
|
3000
|
-
areaRef: c,
|
|
3001
|
-
scrollLeft: a,
|
|
3002
|
-
startLeft: f,
|
|
3003
|
-
scale: l,
|
|
3004
|
-
scaleWidth: m
|
|
3005
|
-
} = n;
|
|
3006
|
-
let d;
|
|
3007
|
-
t[0] !== r ? (d = r === void 0 ? {} : r, t[0] = r, t[1] = d) : d = t[1];
|
|
3008
|
-
const g = d;
|
|
3009
|
-
let v, p;
|
|
3010
|
-
if (t[2] !== c || t[3] !== e?.selected || t[4] !== l || t[5] !== m || t[6] !== a || t[7] !== f) {
|
|
3011
|
-
const P = ["edit-row"];
|
|
3012
|
-
e?.selected && P.push("edit-row-selected");
|
|
3013
|
-
const C = l ?? ze, H = m ?? Fe, X = f ?? Ue;
|
|
3014
|
-
let z;
|
|
3015
|
-
t[10] !== c || t[11] !== C || t[12] !== H || t[13] !== X || t[14] !== a ? (z = (F) => {
|
|
3016
|
-
if (!c.current)
|
|
3017
|
-
return 0;
|
|
3018
|
-
const q = c.current.getBoundingClientRect(), R = F.clientX - q.x + a;
|
|
3019
|
-
return re(R, {
|
|
3020
|
-
startLeft: X,
|
|
3021
|
-
scale: C,
|
|
3022
|
-
scaleWidth: H
|
|
2914
|
+
startLeft: v,
|
|
2915
|
+
scale: _,
|
|
2916
|
+
scaleWidth: d
|
|
3023
2917
|
});
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
s(P, {
|
|
3037
|
-
row: e,
|
|
3038
|
-
time: C
|
|
2918
|
+
return p;
|
|
2919
|
+
},
|
|
2920
|
+
overscan: 3
|
|
2921
|
+
});
|
|
2922
|
+
return tn(() => {
|
|
2923
|
+
h.measure();
|
|
2924
|
+
}, [f, c, h]), /* @__PURE__ */ X.jsx("div", { className: `${Et(...a)} ${(t?.classNames || []).join(" ")}`, style: e, onClick: (g) => {
|
|
2925
|
+
if (t && r) {
|
|
2926
|
+
const p = E(g);
|
|
2927
|
+
r(g, {
|
|
2928
|
+
row: t,
|
|
2929
|
+
time: p
|
|
3039
2930
|
});
|
|
3040
2931
|
}
|
|
3041
|
-
},
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
row: e,
|
|
3048
|
-
time: C
|
|
2932
|
+
}, onDoubleClick: (g) => {
|
|
2933
|
+
if (t && s) {
|
|
2934
|
+
const p = E(g);
|
|
2935
|
+
s(g, {
|
|
2936
|
+
row: t,
|
|
2937
|
+
time: p
|
|
3049
2938
|
});
|
|
3050
2939
|
}
|
|
3051
|
-
},
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
row: e,
|
|
3058
|
-
time: C
|
|
2940
|
+
}, onContextMenu: (g) => {
|
|
2941
|
+
if (t && i) {
|
|
2942
|
+
const p = E(g);
|
|
2943
|
+
i(g, {
|
|
2944
|
+
row: t,
|
|
2945
|
+
time: p
|
|
3059
2946
|
});
|
|
3060
2947
|
}
|
|
3061
|
-
},
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
2948
|
+
}, children: t && h.getVirtualItems().map((g) => {
|
|
2949
|
+
const p = m[g.index];
|
|
2950
|
+
if (!p) throw new Error("Action not found");
|
|
2951
|
+
return /* @__PURE__ */ X.jsx(_s, { ...n, handleTime: E, row: t, action: p }, p.id);
|
|
2952
|
+
}) });
|
|
3066
2953
|
};
|
|
3067
|
-
function
|
|
3068
|
-
const n =
|
|
2954
|
+
function Os() {
|
|
2955
|
+
const n = Nt.c(6);
|
|
3069
2956
|
let t;
|
|
3070
2957
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
3071
2958
|
isMoving: !1,
|
|
3072
2959
|
movePositions: [],
|
|
3073
2960
|
assistPositions: []
|
|
3074
2961
|
}, n[0] = t) : t = n[0];
|
|
3075
|
-
const [e, r] =
|
|
2962
|
+
const [e, r] = Ee(t), s = Ms, i = Ls;
|
|
3076
2963
|
let o;
|
|
3077
|
-
n[1] === Symbol.for("react.memo_cache_sentinel") ? (o = (
|
|
2964
|
+
n[1] === Symbol.for("react.memo_cache_sentinel") ? (o = (v) => {
|
|
3078
2965
|
const {
|
|
3079
|
-
movePositions:
|
|
3080
|
-
assistPositions:
|
|
3081
|
-
} =
|
|
2966
|
+
movePositions: E,
|
|
2967
|
+
assistPositions: m
|
|
2968
|
+
} = v;
|
|
3082
2969
|
r({
|
|
3083
2970
|
isMoving: !0,
|
|
3084
|
-
movePositions:
|
|
3085
|
-
assistPositions:
|
|
2971
|
+
movePositions: E || [],
|
|
2972
|
+
assistPositions: m || []
|
|
3086
2973
|
});
|
|
3087
2974
|
}, n[1] = o) : o = n[1];
|
|
3088
2975
|
const c = o;
|
|
3089
|
-
let
|
|
3090
|
-
n[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2976
|
+
let l;
|
|
2977
|
+
n[2] === Symbol.for("react.memo_cache_sentinel") ? (l = (v) => {
|
|
3091
2978
|
const {
|
|
3092
|
-
movePositions:
|
|
3093
|
-
assistPositions:
|
|
3094
|
-
} =
|
|
3095
|
-
r((
|
|
3096
|
-
...
|
|
3097
|
-
movePositions:
|
|
3098
|
-
assistPositions:
|
|
2979
|
+
movePositions: E,
|
|
2980
|
+
assistPositions: m
|
|
2981
|
+
} = v;
|
|
2982
|
+
r((h) => ({
|
|
2983
|
+
...h,
|
|
2984
|
+
movePositions: E || h.movePositions,
|
|
2985
|
+
assistPositions: m || h.assistPositions
|
|
3099
2986
|
}));
|
|
3100
|
-
}, n[2] =
|
|
3101
|
-
const f =
|
|
3102
|
-
let
|
|
3103
|
-
n[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2987
|
+
}, n[2] = l) : l = n[2];
|
|
2988
|
+
const f = l;
|
|
2989
|
+
let a;
|
|
2990
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (a = () => {
|
|
3104
2991
|
r({
|
|
3105
2992
|
isMoving: !1,
|
|
3106
2993
|
movePositions: [],
|
|
3107
2994
|
assistPositions: []
|
|
3108
2995
|
});
|
|
3109
|
-
}, n[3] =
|
|
3110
|
-
const
|
|
2996
|
+
}, n[3] = a) : a = n[3];
|
|
2997
|
+
const _ = a;
|
|
3111
2998
|
let d;
|
|
3112
2999
|
return n[4] !== e ? (d = {
|
|
3113
3000
|
initDragLine: c,
|
|
3114
3001
|
updateDragLine: f,
|
|
3115
|
-
disposeDragLine:
|
|
3002
|
+
disposeDragLine: _,
|
|
3116
3003
|
dragLineData: e,
|
|
3117
3004
|
defaultGetAssistPosition: s,
|
|
3118
3005
|
defaultGetMovePosition: i
|
|
@@ -3128,8 +3015,8 @@ function Ls(n) {
|
|
|
3128
3015
|
startLeft: o
|
|
3129
3016
|
} = n, {
|
|
3130
3017
|
left: c,
|
|
3131
|
-
width:
|
|
3132
|
-
} =
|
|
3018
|
+
width: l
|
|
3019
|
+
} = en({
|
|
3133
3020
|
start: t,
|
|
3134
3021
|
end: e
|
|
3135
3022
|
}, {
|
|
@@ -3137,7 +3024,7 @@ function Ls(n) {
|
|
|
3137
3024
|
scaleWidth: i,
|
|
3138
3025
|
scale: s
|
|
3139
3026
|
});
|
|
3140
|
-
return r ? r === "right" ? [c +
|
|
3027
|
+
return r ? r === "right" ? [c + l] : [c] : [c, c + l];
|
|
3141
3028
|
}
|
|
3142
3029
|
function Ms(n) {
|
|
3143
3030
|
const {
|
|
@@ -3148,29 +3035,164 @@ function Ms(n) {
|
|
|
3148
3035
|
scale: i,
|
|
3149
3036
|
scaleWidth: o,
|
|
3150
3037
|
startLeft: c,
|
|
3151
|
-
cursorLeft:
|
|
3038
|
+
cursorLeft: l,
|
|
3152
3039
|
hideCursor: f
|
|
3153
|
-
} = n,
|
|
3040
|
+
} = n, a = [];
|
|
3154
3041
|
e ? t.forEach((d) => {
|
|
3155
|
-
d.actions.forEach((
|
|
3156
|
-
e.includes(
|
|
3042
|
+
d.actions.forEach((v) => {
|
|
3043
|
+
e.includes(v.id) && a.push(v);
|
|
3157
3044
|
});
|
|
3158
3045
|
}) : t.forEach((d) => {
|
|
3159
|
-
d.id !== s.id ?
|
|
3160
|
-
|
|
3046
|
+
d.id !== s.id ? a.push(...d.actions) : d.actions.forEach((v) => {
|
|
3047
|
+
v.id !== r.id && a.push(v);
|
|
3161
3048
|
});
|
|
3162
3049
|
});
|
|
3163
|
-
const
|
|
3050
|
+
const _ = fr(a, {
|
|
3164
3051
|
startLeft: c,
|
|
3165
3052
|
scale: i,
|
|
3166
3053
|
scaleWidth: o
|
|
3167
3054
|
});
|
|
3168
|
-
return f ||
|
|
3055
|
+
return f || _.push(l), _;
|
|
3169
3056
|
}
|
|
3170
|
-
|
|
3057
|
+
const Is = (n) => {
|
|
3058
|
+
const t = Nt.c(30), {
|
|
3059
|
+
dragLineData: e,
|
|
3060
|
+
initDragLine: r,
|
|
3061
|
+
updateDragLine: s,
|
|
3062
|
+
disposeDragLine: i,
|
|
3063
|
+
defaultGetAssistPosition: o,
|
|
3064
|
+
defaultGetMovePosition: c
|
|
3065
|
+
} = Os();
|
|
3066
|
+
let l;
|
|
3067
|
+
t[0] !== o || t[1] !== r || t[2] !== n ? (l = (w) => {
|
|
3068
|
+
if (n.dragLine) {
|
|
3069
|
+
const T = n.getAssistDragLineActionIds && n.getAssistDragLineActionIds({
|
|
3070
|
+
action: w.action,
|
|
3071
|
+
row: w.row,
|
|
3072
|
+
editorData: n.editorData
|
|
3073
|
+
}), P = n.scaleWidth ?? 160, G = n.scale ?? 1, D = n.startLeft ?? 20, Z = n.hideCursor ?? !1, U = kt(n.cursorTime, {
|
|
3074
|
+
scaleWidth: P,
|
|
3075
|
+
scale: G,
|
|
3076
|
+
startLeft: D
|
|
3077
|
+
}), tt = o({
|
|
3078
|
+
editorData: n.editorData,
|
|
3079
|
+
assistActionIds: T,
|
|
3080
|
+
action: w.action,
|
|
3081
|
+
row: w.row,
|
|
3082
|
+
scale: G,
|
|
3083
|
+
scaleWidth: P,
|
|
3084
|
+
startLeft: D,
|
|
3085
|
+
hideCursor: Z,
|
|
3086
|
+
cursorLeft: U
|
|
3087
|
+
});
|
|
3088
|
+
r({
|
|
3089
|
+
assistPositions: tt
|
|
3090
|
+
});
|
|
3091
|
+
}
|
|
3092
|
+
}, t[0] = o, t[1] = r, t[2] = n, t[3] = l) : l = t[3];
|
|
3093
|
+
const f = l;
|
|
3094
|
+
let a;
|
|
3095
|
+
t[4] !== c || t[5] !== n.dragLine || t[6] !== n.scale || t[7] !== n.scaleWidth || t[8] !== n.startLeft || t[9] !== s ? (a = (w) => {
|
|
3096
|
+
if (n.dragLine) {
|
|
3097
|
+
const T = n.scaleWidth ?? 160, P = n.scale ?? 1, G = n.startLeft ?? 20, D = c({
|
|
3098
|
+
...w,
|
|
3099
|
+
startLeft: G,
|
|
3100
|
+
scaleWidth: T,
|
|
3101
|
+
scale: P
|
|
3102
|
+
});
|
|
3103
|
+
s({
|
|
3104
|
+
movePositions: D
|
|
3105
|
+
});
|
|
3106
|
+
}
|
|
3107
|
+
}, t[4] = c, t[5] = n.dragLine, t[6] = n.scale, t[7] = n.scaleWidth, t[8] = n.startLeft, t[9] = s, t[10] = a) : a = t[10];
|
|
3108
|
+
const _ = a, d = n.rowHeight ?? 32, v = n.scaleWidth ?? 160, E = n.startLeft ?? 20, m = Math.max(n.scaleCount * v + E, n.timelineWidth), h = `0, ${n.startLeft ?? 20}px`, g = `${n.startLeft ?? 20}px, ${n.scaleWidth ?? 160}px`;
|
|
3109
|
+
let p;
|
|
3110
|
+
t[11] !== m || t[12] !== h || t[13] !== g ? (p = {
|
|
3111
|
+
width: m,
|
|
3112
|
+
position: "relative",
|
|
3113
|
+
backgroundPositionX: h,
|
|
3114
|
+
backgroundSize: g
|
|
3115
|
+
}, t[11] = m, t[12] = h, t[13] = g, t[14] = p) : p = t[14];
|
|
3116
|
+
let b;
|
|
3117
|
+
if (t[15] !== m || t[16] !== d || t[17] !== i || t[18] !== e || t[19] !== f || t[20] !== _ || t[21] !== n) {
|
|
3118
|
+
b = [];
|
|
3119
|
+
let w = 0;
|
|
3120
|
+
for (let T = 0; T < n.editorData.length; T++) {
|
|
3121
|
+
const P = n.editorData[T];
|
|
3122
|
+
if (!P)
|
|
3123
|
+
continue;
|
|
3124
|
+
const G = P.rowHeight || d;
|
|
3125
|
+
b.push(/* @__PURE__ */ qn(Cs, { ...n, key: P.id, rowData: P, dragLineData: e, scrollContainerRef: n.scrollElementRef, style: {
|
|
3126
|
+
position: "absolute",
|
|
3127
|
+
top: 0,
|
|
3128
|
+
left: 0,
|
|
3129
|
+
width: m,
|
|
3130
|
+
height: `${G}px`,
|
|
3131
|
+
transform: `translateY(${w}px)`
|
|
3132
|
+
}, onActionMoveStart: (D) => (f(D), n.onActionMoveStart && n.onActionMoveStart(D)), onActionResizeStart: (D) => (f(D), n.onActionResizeStart && n.onActionResizeStart(D)), onActionMoving: (D) => (_(D), n.onActionMoving && n.onActionMoving(D)), onActionResizing: (D) => (_(D), n.onActionResizing && n.onActionResizing(D)), onActionResizeEnd: (D) => (i(), n.onActionResizeEnd && n.onActionResizeEnd(D)), onActionMoveEnd: (D) => (i(), n.onActionMoveEnd && n.onActionMoveEnd(D)) })), w = w + G;
|
|
3133
|
+
}
|
|
3134
|
+
t[15] = m, t[16] = d, t[17] = i, t[18] = e, t[19] = f, t[20] = _, t[21] = n, t[22] = b;
|
|
3135
|
+
} else
|
|
3136
|
+
b = t[22];
|
|
3137
|
+
const y = b;
|
|
3138
|
+
let S;
|
|
3139
|
+
t[23] !== e || t[24] !== n.dragLine ? (S = n.dragLine && /* @__PURE__ */ X.jsx(pr, { ...e }), t[23] = e, t[24] = n.dragLine, t[25] = S) : S = t[25];
|
|
3140
|
+
let x;
|
|
3141
|
+
return t[26] !== p || t[27] !== y || t[28] !== S ? (x = /* @__PURE__ */ X.jsxs("div", { style: p, className: "timeline-editor-edit-area", children: [
|
|
3142
|
+
y,
|
|
3143
|
+
S
|
|
3144
|
+
] }), t[26] = p, t[27] = y, t[28] = S, t[29] = x) : x = t[29], x;
|
|
3145
|
+
};
|
|
3146
|
+
function Ps({
|
|
3147
|
+
scaleSplitCount: n,
|
|
3148
|
+
scaleWidth: t,
|
|
3149
|
+
startLeft: e,
|
|
3150
|
+
scaleCount: r,
|
|
3151
|
+
maxScaleCount: s,
|
|
3152
|
+
scale: i,
|
|
3153
|
+
scrollElementRef: o,
|
|
3154
|
+
onClickTimeArea: c,
|
|
3155
|
+
setCursor: l
|
|
3156
|
+
}) {
|
|
3157
|
+
const f = n ?? 1, a = t ?? 160, _ = e ?? 20, d = (n ?? 0) > 0, v = d ? r * (n ?? 1) + 1 : r, E = (d ? a / f : a) * (v - 1) + _, h = Xn({
|
|
3158
|
+
horizontal: !0,
|
|
3159
|
+
count: v,
|
|
3160
|
+
getScrollElement: () => o.current,
|
|
3161
|
+
estimateSize: (g) => {
|
|
3162
|
+
switch (g) {
|
|
3163
|
+
case 0:
|
|
3164
|
+
return _;
|
|
3165
|
+
default:
|
|
3166
|
+
return d ? a / f : a;
|
|
3167
|
+
}
|
|
3168
|
+
},
|
|
3169
|
+
overscan: 10
|
|
3170
|
+
});
|
|
3171
|
+
return qt(() => h.measure(), [t, e, h]), /* @__PURE__ */ X.jsx("div", { style: {
|
|
3172
|
+
width: `${E}px`
|
|
3173
|
+
}, className: "time-editor-time-area", onClick: (g) => {
|
|
3174
|
+
const p = e ?? 20, b = t ?? 160, y = i ?? 1, S = s ?? 1 / 0, x = g.currentTarget.getBoundingClientRect(), w = g.clientX - x.x, T = Math.max(w, p);
|
|
3175
|
+
if (T > S * b + p) return;
|
|
3176
|
+
const P = Zt(T, {
|
|
3177
|
+
startLeft: p,
|
|
3178
|
+
scale: y,
|
|
3179
|
+
scaleWidth: b
|
|
3180
|
+
});
|
|
3181
|
+
c && c(P, g), !g.defaultPrevented && l({
|
|
3182
|
+
time: P
|
|
3183
|
+
});
|
|
3184
|
+
}, children: h.getVirtualItems().map((g) => {
|
|
3185
|
+
const p = g.index, b = n ?? 1, y = i ?? 1, S = d ? p % b === 0 : !0, x = ["time-editor-time-unit", S ? "time-editor-time-unit-big" : "time-editor-time-unit-small"], w = (d ? p / b : p) * y;
|
|
3186
|
+
return /* @__PURE__ */ X.jsx("div", { "data-index": g.index, style: {
|
|
3187
|
+
width: `${g.size}px`,
|
|
3188
|
+
transform: `translateX(${g.start}px)`
|
|
3189
|
+
}, className: x.join(" "), children: S && /* @__PURE__ */ X.jsx("div", { className: "time-editor-time-unit-scale", children: w }) }, g.key);
|
|
3190
|
+
}) });
|
|
3191
|
+
}
|
|
3192
|
+
function ks(n) {
|
|
3171
3193
|
return typeof n == "object" && n !== null;
|
|
3172
3194
|
}
|
|
3173
|
-
function
|
|
3195
|
+
function Ns(n, t, e) {
|
|
3174
3196
|
if (n instanceof EventTarget)
|
|
3175
3197
|
return [n];
|
|
3176
3198
|
if (typeof n == "string") {
|
|
@@ -3179,17 +3201,17 @@ function Ps(n, t, e) {
|
|
|
3179
3201
|
}
|
|
3180
3202
|
return Array.from(n);
|
|
3181
3203
|
}
|
|
3182
|
-
function
|
|
3183
|
-
return
|
|
3204
|
+
function Ws(n) {
|
|
3205
|
+
return ks(n) && "ownerSVGElement" in n;
|
|
3184
3206
|
}
|
|
3185
|
-
const
|
|
3186
|
-
let
|
|
3187
|
-
const
|
|
3188
|
-
function
|
|
3189
|
-
|
|
3207
|
+
const Ie = /* @__PURE__ */ new WeakMap();
|
|
3208
|
+
let Pe;
|
|
3209
|
+
const Gn = (n, t, e) => (r, s) => s && s[0] ? s[0][n + "Size"] : Ws(r) && "getBBox" in r ? r.getBBox()[t] : r[e], zs = /* @__PURE__ */ Gn("inline", "width", "offsetWidth"), js = /* @__PURE__ */ Gn("block", "height", "offsetHeight");
|
|
3210
|
+
function Fs({ target: n, borderBoxSize: t }) {
|
|
3211
|
+
Ie.get(n)?.forEach((e) => {
|
|
3190
3212
|
e(n, {
|
|
3191
3213
|
get width() {
|
|
3192
|
-
return
|
|
3214
|
+
return zs(n, t);
|
|
3193
3215
|
},
|
|
3194
3216
|
get height() {
|
|
3195
3217
|
return js(n, t);
|
|
@@ -3197,29 +3219,29 @@ function Ws({ target: n, borderBoxSize: t }) {
|
|
|
3197
3219
|
});
|
|
3198
3220
|
});
|
|
3199
3221
|
}
|
|
3200
|
-
function
|
|
3201
|
-
n.forEach(
|
|
3222
|
+
function Vs(n) {
|
|
3223
|
+
n.forEach(Fs);
|
|
3202
3224
|
}
|
|
3203
|
-
function
|
|
3204
|
-
typeof ResizeObserver > "u" || (
|
|
3225
|
+
function $s() {
|
|
3226
|
+
typeof ResizeObserver > "u" || (Pe = new ResizeObserver(Vs));
|
|
3205
3227
|
}
|
|
3206
|
-
function
|
|
3207
|
-
|
|
3208
|
-
const e =
|
|
3228
|
+
function Us(n, t) {
|
|
3229
|
+
Pe || $s();
|
|
3230
|
+
const e = Ns(n);
|
|
3209
3231
|
return e.forEach((r) => {
|
|
3210
|
-
let s =
|
|
3211
|
-
s || (s = /* @__PURE__ */ new Set(),
|
|
3232
|
+
let s = Ie.get(r);
|
|
3233
|
+
s || (s = /* @__PURE__ */ new Set(), Ie.set(r, s)), s.add(t), Pe?.observe(r);
|
|
3212
3234
|
}), () => {
|
|
3213
3235
|
e.forEach((r) => {
|
|
3214
|
-
const s =
|
|
3215
|
-
s?.delete(t), s?.size ||
|
|
3236
|
+
const s = Ie.get(r);
|
|
3237
|
+
s?.delete(t), s?.size || Pe?.unobserve(r);
|
|
3216
3238
|
});
|
|
3217
3239
|
};
|
|
3218
3240
|
}
|
|
3219
|
-
const
|
|
3220
|
-
let
|
|
3221
|
-
function
|
|
3222
|
-
|
|
3241
|
+
const ke = /* @__PURE__ */ new Set();
|
|
3242
|
+
let ye;
|
|
3243
|
+
function Bs() {
|
|
3244
|
+
ye = () => {
|
|
3223
3245
|
const n = {
|
|
3224
3246
|
get width() {
|
|
3225
3247
|
return window.innerWidth;
|
|
@@ -3228,379 +3250,217 @@ function $s() {
|
|
|
3228
3250
|
return window.innerHeight;
|
|
3229
3251
|
}
|
|
3230
3252
|
};
|
|
3231
|
-
|
|
3232
|
-
}, window.addEventListener("resize",
|
|
3253
|
+
ke.forEach((t) => t(n));
|
|
3254
|
+
}, window.addEventListener("resize", ye);
|
|
3233
3255
|
}
|
|
3234
|
-
function
|
|
3235
|
-
return
|
|
3236
|
-
|
|
3256
|
+
function Hs(n) {
|
|
3257
|
+
return ke.add(n), ye || Bs(), () => {
|
|
3258
|
+
ke.delete(n), !ke.size && typeof ye == "function" && (window.removeEventListener("resize", ye), ye = void 0);
|
|
3237
3259
|
};
|
|
3238
3260
|
}
|
|
3239
|
-
function
|
|
3240
|
-
return typeof n == "function" ?
|
|
3261
|
+
function Ys(n, t) {
|
|
3262
|
+
return typeof n == "function" ? Hs(n) : Us(n, t);
|
|
3241
3263
|
}
|
|
3242
|
-
function
|
|
3243
|
-
const t =
|
|
3264
|
+
function Xs(n) {
|
|
3265
|
+
const t = Nt.c(13);
|
|
3244
3266
|
let e, r, s;
|
|
3245
3267
|
t[0] !== n ? ({
|
|
3246
3268
|
render: s,
|
|
3247
3269
|
ref: r,
|
|
3248
3270
|
...e
|
|
3249
3271
|
} = n, t[0] = n, t[1] = e, t[2] = r, t[3] = s) : (e = t[1], r = t[2], s = t[3]);
|
|
3250
|
-
|
|
3251
|
-
|
|
3272
|
+
const i = st(null), o = Gs(i);
|
|
3273
|
+
let c;
|
|
3274
|
+
t[4] !== r ? (c = Un(i, r), t[4] = r, t[5] = c) : c = t[5];
|
|
3275
|
+
let l;
|
|
3276
|
+
t[6] !== s || t[7] !== o ? (l = s(o), t[6] = s, t[7] = o, t[8] = l) : l = t[8];
|
|
3277
|
+
let f;
|
|
3278
|
+
return t[9] !== e || t[10] !== c || t[11] !== l ? (f = /* @__PURE__ */ X.jsx("div", { ref: c, ...e, children: l }), t[9] = e, t[10] = c, t[11] = l, t[12] = f) : f = t[12], f;
|
|
3279
|
+
}
|
|
3280
|
+
function Gs(n) {
|
|
3281
|
+
const t = Nt.c(4);
|
|
3282
|
+
let e;
|
|
3283
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
3252
3284
|
width: 0,
|
|
3253
3285
|
height: 0
|
|
3254
|
-
}, t[
|
|
3255
|
-
const [
|
|
3256
|
-
let
|
|
3257
|
-
t[
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
width:
|
|
3261
|
-
height:
|
|
3286
|
+
}, t[0] = e) : e = t[0];
|
|
3287
|
+
const [r, s] = Ee(e);
|
|
3288
|
+
let i;
|
|
3289
|
+
t[1] !== n ? (i = () => {
|
|
3290
|
+
n.current && Ys(n.current, (c, l) => {
|
|
3291
|
+
s({
|
|
3292
|
+
width: l.width,
|
|
3293
|
+
height: l.height
|
|
3262
3294
|
});
|
|
3263
3295
|
});
|
|
3264
|
-
},
|
|
3265
|
-
let
|
|
3266
|
-
t[
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
onScroll: O,
|
|
3294
|
-
cursorTime: _,
|
|
3295
|
-
hideCursor: y,
|
|
3296
|
-
setEditorData: E,
|
|
3297
|
-
deltaScrollLeft: P,
|
|
3298
|
-
timelineWidth: C,
|
|
3299
|
-
// Pass remaining CommonProp fields
|
|
3300
|
-
getActionRender: H,
|
|
3301
|
-
getScaleRender: X,
|
|
3302
|
-
onClickRow: z,
|
|
3303
|
-
onDoubleClickRow: F,
|
|
3304
|
-
onContextMenuRow: q,
|
|
3305
|
-
onClickAction: S,
|
|
3306
|
-
onClickActionOnly: R,
|
|
3307
|
-
onDoubleClickAction: M,
|
|
3308
|
-
onContextMenuAction: U,
|
|
3309
|
-
onCursorDragStart: ft,
|
|
3310
|
-
onCursorDragEnd: gt,
|
|
3311
|
-
onCursorDrag: u,
|
|
3312
|
-
onClickTimeArea: T,
|
|
3313
|
-
gridSnap: I,
|
|
3314
|
-
effects: V
|
|
3315
|
-
}) => {
|
|
3316
|
-
const {
|
|
3317
|
-
dragLineData: _t,
|
|
3318
|
-
initDragLine: vt,
|
|
3319
|
-
updateDragLine: D,
|
|
3320
|
-
disposeDragLine: rt,
|
|
3321
|
-
defaultGetAssistPosition: $,
|
|
3322
|
-
defaultGetMovePosition: k
|
|
3323
|
-
} = Ds(), j = Q(null), jt = Q(-1), Ut = (J) => {
|
|
3324
|
-
if (d) {
|
|
3325
|
-
const Z = g && g({
|
|
3326
|
-
action: J.action,
|
|
3327
|
-
row: J.row,
|
|
3328
|
-
editorData: r
|
|
3329
|
-
}), Y = i ?? 160, it = m ?? 1, bt = a ?? 20, Tt = y ?? !1, Pt = $t(_, {
|
|
3330
|
-
scaleWidth: Y,
|
|
3331
|
-
scale: it,
|
|
3332
|
-
startLeft: bt
|
|
3333
|
-
}), Ht = $({
|
|
3334
|
-
editorData: r,
|
|
3335
|
-
assistActionIds: Z,
|
|
3336
|
-
action: J.action,
|
|
3337
|
-
row: J.row,
|
|
3338
|
-
scale: it,
|
|
3339
|
-
scaleWidth: Y,
|
|
3340
|
-
startLeft: bt,
|
|
3341
|
-
hideCursor: Tt,
|
|
3342
|
-
cursorLeft: Pt
|
|
3343
|
-
});
|
|
3344
|
-
vt({
|
|
3345
|
-
assistPositions: Ht
|
|
3346
|
-
});
|
|
3296
|
+
}, t[1] = n, t[2] = i) : i = t[2];
|
|
3297
|
+
let o;
|
|
3298
|
+
return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = [], t[3] = o) : o = t[3], tn(i, o), r;
|
|
3299
|
+
}
|
|
3300
|
+
const Ks = (n) => {
|
|
3301
|
+
const t = Nt.c(42), {
|
|
3302
|
+
disableDrag: e,
|
|
3303
|
+
cursorTime: r,
|
|
3304
|
+
setCursor: s,
|
|
3305
|
+
startLeft: i,
|
|
3306
|
+
scaleWidth: o,
|
|
3307
|
+
scale: c,
|
|
3308
|
+
scaleCount: l,
|
|
3309
|
+
scaleSplitCount: f,
|
|
3310
|
+
scrollElementRef: a,
|
|
3311
|
+
maxScaleCount: _,
|
|
3312
|
+
onCursorDragStart: d,
|
|
3313
|
+
onCursorDrag: v,
|
|
3314
|
+
onCursorDragEnd: E
|
|
3315
|
+
} = n, m = st(null), h = st(void 0);
|
|
3316
|
+
let g, p;
|
|
3317
|
+
t[0] !== r || t[1] !== c || t[2] !== o || t[3] !== i ? (g = () => {
|
|
3318
|
+
if (typeof h.current > "u" && m.current) {
|
|
3319
|
+
const u = i ?? 20, R = o ?? 160, k = c ?? 1;
|
|
3320
|
+
m.current.updateLeft(kt(r, {
|
|
3321
|
+
startLeft: u,
|
|
3322
|
+
scaleWidth: R,
|
|
3323
|
+
scale: k
|
|
3324
|
+
}));
|
|
3347
3325
|
}
|
|
3348
|
-
},
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3326
|
+
}, p = [r, i, o, c], t[0] = r, t[1] = c, t[2] = o, t[3] = i, t[4] = g, t[5] = p) : (g = t[4], p = t[5]), qt(g, p);
|
|
3327
|
+
const b = i ?? 20, y = o ?? 160, S = c ?? 1, x = _ ?? 1 / 0, w = (f ?? 0) > 0, T = f ?? 1, P = w ? l * (f ?? 1) + 1 : l, G = i ?? 20, D = (w ? y / T : y) * (P - 1) + G;
|
|
3328
|
+
let Z;
|
|
3329
|
+
t[6] !== b || t[7] !== x || t[8] !== a || t[9] !== D || t[10] !== y ? (Z = () => ({
|
|
3330
|
+
left: 0,
|
|
3331
|
+
right: Math.min(D, x * y + b - (a.current?.scrollLeft ?? 0))
|
|
3332
|
+
}), t[6] = b, t[7] = x, t[8] = a, t[9] = D, t[10] = y, t[11] = Z) : Z = t[11];
|
|
3333
|
+
const U = !e;
|
|
3334
|
+
let tt;
|
|
3335
|
+
t[12] !== r || t[13] !== b || t[14] !== d || t[15] !== S || t[16] !== y ? (tt = () => {
|
|
3336
|
+
d && d(r), h.current = kt(r, {
|
|
3337
|
+
startLeft: b,
|
|
3338
|
+
scaleWidth: y,
|
|
3339
|
+
scale: S
|
|
3340
|
+
}), m.current?.updateLeft(h.current);
|
|
3341
|
+
}, t[12] = r, t[13] = b, t[14] = d, t[15] = S, t[16] = y, t[17] = tt) : tt = t[17];
|
|
3342
|
+
let z;
|
|
3343
|
+
t[18] !== b || t[19] !== E || t[20] !== S || t[21] !== s || t[22] !== y ? (z = () => {
|
|
3344
|
+
if (typeof h.current < "u") {
|
|
3345
|
+
const u = Zt(h.current, {
|
|
3346
|
+
startLeft: b,
|
|
3347
|
+
scale: S,
|
|
3348
|
+
scaleWidth: y
|
|
3358
3349
|
});
|
|
3350
|
+
s({
|
|
3351
|
+
time: u
|
|
3352
|
+
}), E && E(u);
|
|
3359
3353
|
}
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
const te = (J) => {
|
|
3381
|
-
const Z = J.currentTarget;
|
|
3382
|
-
O({
|
|
3383
|
-
clientHeight: Z.clientHeight,
|
|
3384
|
-
clientWidth: Z.clientWidth,
|
|
3385
|
-
scrollHeight: Z.scrollHeight,
|
|
3386
|
-
scrollLeft: Z.scrollLeft,
|
|
3387
|
-
scrollTop: Z.scrollTop,
|
|
3388
|
-
scrollWidth: Z.scrollWidth
|
|
3389
|
-
});
|
|
3390
|
-
};
|
|
3391
|
-
return /* @__PURE__ */ N.jsxs(N.Fragment, { children: [
|
|
3392
|
-
/* @__PURE__ */ N.jsx("div", { ref: j, style: {
|
|
3393
|
-
width: n,
|
|
3394
|
-
height: t,
|
|
3395
|
-
overflow: "auto"
|
|
3396
|
-
}, onScroll: te, children: /* @__PURE__ */ N.jsx("div", { style: {
|
|
3397
|
-
height: `${Dt.getTotalSize()}px`,
|
|
3398
|
-
width: Ct,
|
|
3399
|
-
position: "relative"
|
|
3400
|
-
}, children: Dt.getVirtualItems().map((J) => {
|
|
3401
|
-
const Z = r[J.index];
|
|
3402
|
-
return /* @__PURE__ */ N.jsx(Cs, { scaleCount: o, setScaleCount: c, cursorTime: _, editorData: r, rowHeight: s, scaleWidth: i, startLeft: a, scale: m, hideCursor: y, timelineWidth: C, getActionRender: H, getScaleRender: X, onClickRow: z, onDoubleClickRow: F, onContextMenuRow: q, onClickAction: S, onClickActionOnly: R, onDoubleClickAction: M, onContextMenuAction: U, onCursorDragStart: ft, onCursorDragEnd: gt, onCursorDrag: u, onClickTimeArea: T, gridSnap: I, effects: V, setEditorData: E, deltaScrollLeft: P, style: {
|
|
3403
|
-
position: "absolute",
|
|
3404
|
-
top: 0,
|
|
3405
|
-
left: 0,
|
|
3406
|
-
width: Ct,
|
|
3407
|
-
height: `${J.size}px`,
|
|
3408
|
-
transform: `translateY(${J.start}px)`,
|
|
3409
|
-
backgroundPositionX: `0, ${a ?? 20}px`,
|
|
3410
|
-
backgroundSize: `${a ?? 20}px, ${i ?? 160}px`
|
|
3411
|
-
}, areaRef: e, rowData: Z, dragLineData: _t, onActionMoveStart: (Y) => (Ut(Y), p && p(Y)), onActionResizeStart: (Y) => (Ut(Y), h && h(Y)), onActionMoving: (Y) => (It(Y), b && b(Y)), onActionResizing: (Y) => (It(Y), x && x(Y)), onActionResizeEnd: (Y) => (rt(), w && w(Y)), onActionMoveEnd: (Y) => (rt(), v && v(Y)), scrollLeft: f }, J.key);
|
|
3412
|
-
}) }) }),
|
|
3413
|
-
d && /* @__PURE__ */ N.jsx(As, { scrollLeft: f, ..._t })
|
|
3414
|
-
] });
|
|
3415
|
-
}, Xs = Zt.forwardRef((n, t) => {
|
|
3416
|
-
const e = Q(null);
|
|
3417
|
-
return nn(t, () => ({
|
|
3418
|
-
get domRef() {
|
|
3419
|
-
return e;
|
|
3420
|
-
}
|
|
3421
|
-
})), /* @__PURE__ */ N.jsx(Jn, { ref: e, className: mt("edit-area"), render: ({
|
|
3422
|
-
width: r,
|
|
3423
|
-
height: s
|
|
3424
|
-
}) => /* @__PURE__ */ N.jsx(Bs, { ...n, width: r, height: s, editAreaRef: e }) });
|
|
3425
|
-
}), Ys = ({
|
|
3426
|
-
setCursor: n,
|
|
3427
|
-
maxScaleCount: t,
|
|
3428
|
-
hideCursor: e,
|
|
3429
|
-
scale: r,
|
|
3430
|
-
scaleWidth: s,
|
|
3431
|
-
scaleCount: i,
|
|
3432
|
-
scaleSplitCount: o,
|
|
3433
|
-
startLeft: c,
|
|
3434
|
-
scrollLeft: a,
|
|
3435
|
-
onClickTimeArea: f,
|
|
3436
|
-
getScaleRender: l
|
|
3437
|
-
}) => {
|
|
3438
|
-
const m = Q(null), d = (o ?? 0) > 0, g = (b) => {
|
|
3439
|
-
const w = o ?? 1, h = s ?? 160, x = c ?? 20;
|
|
3440
|
-
switch (b) {
|
|
3441
|
-
case 0:
|
|
3442
|
-
return x;
|
|
3443
|
-
default:
|
|
3444
|
-
return d ? h / w : h;
|
|
3354
|
+
h.current = void 0;
|
|
3355
|
+
}, t[18] = b, t[19] = E, t[20] = S, t[21] = s, t[22] = y, t[23] = z) : z = t[23];
|
|
3356
|
+
let L;
|
|
3357
|
+
t[24] !== b || t[25] !== v || t[26] !== S || t[27] !== a || t[28] !== s || t[29] !== y ? (L = (u, R) => {
|
|
3358
|
+
const {
|
|
3359
|
+
left: k
|
|
3360
|
+
} = u, j = R === void 0 ? 0 : R, H = a.current?.scrollLeft ?? 0, F = a.current, N = F?.clientWidth ?? 0;
|
|
3361
|
+
if (j !== 0)
|
|
3362
|
+
if (typeof h.current < "u") {
|
|
3363
|
+
h.current = h.current + j;
|
|
3364
|
+
const A = H, C = H + N;
|
|
3365
|
+
h.current < A + 10 ? h.current = A + 10 : h.current > C - 10 && (h.current = C - 10), h.current < b - H && (h.current = b - H);
|
|
3366
|
+
} else {
|
|
3367
|
+
h.current = k + j;
|
|
3368
|
+
const A = H, C = H + N;
|
|
3369
|
+
h.current < A + 10 ? h.current = A + 10 : h.current > C - 10 && (h.current = C - 10);
|
|
3370
|
+
}
|
|
3371
|
+
else if (k < b - H ? h.current = b - H : h.current = k, F && N > 0) {
|
|
3372
|
+
const A = H, C = H + N;
|
|
3373
|
+
h.current < A + 10 ? h.current = A + 10 : h.current > C - 10 && (h.current = C - 10);
|
|
3445
3374
|
}
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
});
|
|
3453
|
-
return $e(() => {
|
|
3454
|
-
m.current && a !== void 0 && (m.current.scrollLeft = a);
|
|
3455
|
-
}, [a]), Vt(() => {
|
|
3456
|
-
p.measure();
|
|
3457
|
-
}, [s, c, p]), /* @__PURE__ */ N.jsx(Jn, { className: mt("time-area"), render: ({
|
|
3458
|
-
width: b,
|
|
3459
|
-
height: w
|
|
3460
|
-
}) => /* @__PURE__ */ N.jsxs(N.Fragment, { children: [
|
|
3461
|
-
/* @__PURE__ */ N.jsx("div", { className: mt("time-area-virtual"), ref: m, style: {
|
|
3462
|
-
width: b,
|
|
3463
|
-
height: w,
|
|
3464
|
-
overflowX: "hidden",
|
|
3465
|
-
overflowY: "hidden"
|
|
3466
|
-
}, children: /* @__PURE__ */ N.jsx("div", { style: {
|
|
3467
|
-
width: `${p.getTotalSize()}px`,
|
|
3468
|
-
height: "100%",
|
|
3469
|
-
position: "relative"
|
|
3470
|
-
}, children: p.getVirtualItems().map((h) => {
|
|
3471
|
-
const x = h.index, O = o ?? 1, _ = r ?? 1, y = d ? x % O === 0 : !0, E = ["time-unit"];
|
|
3472
|
-
y && E.push("time-unit-big");
|
|
3473
|
-
const P = (d ? x / O : x) * _;
|
|
3474
|
-
return /* @__PURE__ */ N.jsx("div", { "data-index": h.index, style: {
|
|
3475
|
-
position: "absolute",
|
|
3476
|
-
top: 0,
|
|
3477
|
-
left: 0,
|
|
3478
|
-
height: "100%",
|
|
3479
|
-
width: `${h.size}px`,
|
|
3480
|
-
transform: `translateX(${h.start}px)`
|
|
3481
|
-
}, className: mt(...E), children: y && /* @__PURE__ */ N.jsx("div", { className: mt("time-unit-scale"), children: l ? l(P) : P }) }, h.key);
|
|
3482
|
-
}) }) }),
|
|
3483
|
-
/* @__PURE__ */ N.jsx("div", { style: {
|
|
3484
|
-
width: b,
|
|
3485
|
-
height: w
|
|
3486
|
-
}, onClick: (h) => {
|
|
3487
|
-
if (e) return;
|
|
3488
|
-
const x = c ?? 20, O = s ?? 160, _ = r ?? 1, y = t ?? 1 / 0, E = h.currentTarget.getBoundingClientRect(), P = h.clientX - E.x, C = Math.max(P + a, x);
|
|
3489
|
-
if (C > y * O + x - a) return;
|
|
3490
|
-
const H = re(C, {
|
|
3491
|
-
startLeft: x,
|
|
3492
|
-
scale: _,
|
|
3493
|
-
scaleWidth: O
|
|
3494
|
-
});
|
|
3495
|
-
(f && f(H, h)) !== !1 && n({
|
|
3496
|
-
time: H
|
|
3375
|
+
if (typeof h.current < "u") {
|
|
3376
|
+
m.current?.updateLeft(h.current);
|
|
3377
|
+
const A = Zt(h.current + H, {
|
|
3378
|
+
startLeft: b,
|
|
3379
|
+
scale: S,
|
|
3380
|
+
scaleWidth: y
|
|
3497
3381
|
});
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
},
|
|
3501
|
-
|
|
3382
|
+
s({
|
|
3383
|
+
time: A
|
|
3384
|
+
}), v && v(A);
|
|
3385
|
+
}
|
|
3386
|
+
return !1;
|
|
3387
|
+
}, t[24] = b, t[25] = v, t[26] = S, t[27] = a, t[28] = s, t[29] = y, t[30] = L) : L = t[30];
|
|
3388
|
+
let B, lt;
|
|
3389
|
+
t[31] === Symbol.for("react.memo_cache_sentinel") ? (B = Et("cursor"), lt = Et("cursor-top"), t[31] = B, t[32] = lt) : (B = t[31], lt = t[32]);
|
|
3390
|
+
let ut;
|
|
3391
|
+
t[33] === Symbol.for("react.memo_cache_sentinel") ? (ut = /* @__PURE__ */ X.jsxs("div", { className: B, children: [
|
|
3392
|
+
/* @__PURE__ */ X.jsx("svg", { className: lt, width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", children: /* @__PURE__ */ X.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: "#5297FF" }) }),
|
|
3393
|
+
/* @__PURE__ */ X.jsx("div", { className: Et("cursor-area") })
|
|
3394
|
+
] }), t[33] = ut) : ut = t[33];
|
|
3395
|
+
let dt;
|
|
3396
|
+
return t[34] !== b || t[35] !== a || t[36] !== Z || t[37] !== U || t[38] !== tt || t[39] !== z || t[40] !== L ? (dt = /* @__PURE__ */ X.jsx(Hn, { start: b, ref: m, parentRef: a, getBounds: Z, autoScroll: !0, enableDragging: U, enableResizing: !1, onDragStart: tt, onDragEnd: z, onDrag: L, children: ut }), t[34] = b, t[35] = a, t[36] = Z, t[37] = U, t[38] = tt, t[39] = z, t[40] = L, t[41] = dt) : dt = t[41], dt;
|
|
3397
|
+
}, Zs = Jt.forwardRef((n, t) => {
|
|
3398
|
+
const e = ar(n), {
|
|
3502
3399
|
style: r
|
|
3503
3400
|
} = n;
|
|
3504
3401
|
let {
|
|
3505
3402
|
editorData: s,
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
disableDrag: a,
|
|
3510
|
-
scale: f = 1,
|
|
3403
|
+
hideCursor: i,
|
|
3404
|
+
disableDrag: o,
|
|
3405
|
+
scale: c = 1,
|
|
3511
3406
|
scaleWidth: l = 160,
|
|
3512
|
-
startLeft:
|
|
3513
|
-
minScaleCount:
|
|
3514
|
-
maxScaleCount:
|
|
3515
|
-
onChange:
|
|
3516
|
-
onScroll:
|
|
3407
|
+
startLeft: f = 20,
|
|
3408
|
+
minScaleCount: a = 20,
|
|
3409
|
+
maxScaleCount: _ = 1 / 0,
|
|
3410
|
+
onChange: d,
|
|
3411
|
+
onScroll: v
|
|
3517
3412
|
} = e;
|
|
3518
|
-
const
|
|
3519
|
-
const
|
|
3520
|
-
|
|
3521
|
-
}, [
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
scale:
|
|
3525
|
-
})),
|
|
3526
|
-
}, [s,
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
}));
|
|
3531
|
-
}, [i]);
|
|
3532
|
-
const z = (S) => {
|
|
3533
|
-
v?.(S);
|
|
3534
|
-
}, F = (S) => {
|
|
3413
|
+
const E = st(null), [m, h] = Ee(s), [g, p] = Ee(Ze), [b, y] = Ee(nr), S = Jn((T) => {
|
|
3414
|
+
const P = Math.min(_, Math.max(a, T));
|
|
3415
|
+
p(P);
|
|
3416
|
+
}, [_, a]);
|
|
3417
|
+
tn(() => {
|
|
3418
|
+
S(lr(s, {
|
|
3419
|
+
scale: c
|
|
3420
|
+
})), h(s);
|
|
3421
|
+
}, [s, a, _, c, S]);
|
|
3422
|
+
const x = (T) => {
|
|
3423
|
+
d?.(T);
|
|
3424
|
+
}, w = (T) => {
|
|
3535
3425
|
let {
|
|
3536
|
-
left:
|
|
3537
|
-
time:
|
|
3538
|
-
} =
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
scale: f,
|
|
3543
|
-
scaleWidth: l
|
|
3544
|
-
}), M = re(R, {
|
|
3545
|
-
startLeft: m,
|
|
3546
|
-
scale: f,
|
|
3426
|
+
left: P,
|
|
3427
|
+
time: G
|
|
3428
|
+
} = T;
|
|
3429
|
+
return typeof G < "u" ? (y(G), !0) : typeof P < "u" ? (y(Zt(P, {
|
|
3430
|
+
startLeft: f,
|
|
3431
|
+
scale: c,
|
|
3547
3432
|
scaleWidth: l
|
|
3548
|
-
}));
|
|
3549
|
-
let U = !0;
|
|
3550
|
-
return P(M), U;
|
|
3551
|
-
}, q = (S) => {
|
|
3552
|
-
!h.current?.state || h.current.state.scrollLeft + S > _ * (l - 1) + m - C || h.current && h.current.setScrollState((M) => ({
|
|
3553
|
-
...M,
|
|
3554
|
-
scrollLeft: Math.max(M.scrollLeft + S, 0)
|
|
3555
|
-
}));
|
|
3433
|
+
})), !0) : !1;
|
|
3556
3434
|
};
|
|
3557
|
-
return
|
|
3435
|
+
return Ln(t, () => ({
|
|
3558
3436
|
get target() {
|
|
3559
|
-
return
|
|
3437
|
+
return E.current;
|
|
3560
3438
|
},
|
|
3561
|
-
set time(
|
|
3562
|
-
|
|
3563
|
-
time:
|
|
3439
|
+
set time(T) {
|
|
3440
|
+
w({
|
|
3441
|
+
time: T
|
|
3564
3442
|
});
|
|
3565
3443
|
},
|
|
3566
3444
|
get time() {
|
|
3567
|
-
return
|
|
3445
|
+
return b;
|
|
3568
3446
|
},
|
|
3569
|
-
setScrollLeft: (
|
|
3570
|
-
|
|
3571
|
-
...R,
|
|
3572
|
-
scrollLeft: Math.max(S, 0)
|
|
3573
|
-
}));
|
|
3447
|
+
setScrollLeft: (T) => {
|
|
3448
|
+
E.current && (E.current.scrollLeft = T);
|
|
3574
3449
|
},
|
|
3575
|
-
setScrollTop: (
|
|
3576
|
-
|
|
3577
|
-
...R,
|
|
3578
|
-
scrollTop: Math.max(S, 0)
|
|
3579
|
-
}));
|
|
3450
|
+
setScrollTop: (T) => {
|
|
3451
|
+
E.current && (E.current.scrollTop = T);
|
|
3580
3452
|
}
|
|
3581
|
-
})),
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
}
|
|
3590
|
-
|
|
3591
|
-
scrollLeft: S,
|
|
3592
|
-
scrollTop: R,
|
|
3593
|
-
onScroll: M
|
|
3594
|
-
}) => /* @__PURE__ */ N.jsxs(N.Fragment, { children: [
|
|
3595
|
-
/* @__PURE__ */ N.jsx(Ys, { ...e, timelineWidth: C, disableDrag: a, setCursor: F, cursorTime: E, editorData: x, scaleCount: _, setScaleCount: X, onScroll: M, scrollLeft: S }),
|
|
3596
|
-
/* @__PURE__ */ N.jsx(Xs, { ...e, timelineWidth: C, ref: (U) => {
|
|
3597
|
-
U?.domRef.current && (w.current = U.domRef.current);
|
|
3598
|
-
}, disableDrag: a, editorData: x, cursorTime: E, scaleCount: _, setScaleCount: X, scrollTop: R, scrollLeft: S, setEditorData: z, deltaScrollLeft: o ? q : void 0, onScroll: (U) => {
|
|
3599
|
-
M(U), p?.(U);
|
|
3600
|
-
} }),
|
|
3601
|
-
!c && /* @__PURE__ */ N.jsx(ps, { ...e, timelineWidth: C, scrollLeft: S, scaleCount: _, setScaleCount: X, setCursor: F, cursorTime: E, editorData: x, areaRef: w, scrollSync: h, deltaScrollLeft: o ? q : void 0 })
|
|
3602
|
-
] }) }) });
|
|
3453
|
+
})), /* @__PURE__ */ X.jsx(Xs, { ref: E, style: r, className: `${Ke} ${o ? Ke + "-disable" : ""}`, onScroll: (T) => {
|
|
3454
|
+
v?.(T.currentTarget);
|
|
3455
|
+
}, render: ({
|
|
3456
|
+
width: T,
|
|
3457
|
+
height: P
|
|
3458
|
+
}) => /* @__PURE__ */ X.jsxs(X.Fragment, { children: [
|
|
3459
|
+
/* @__PURE__ */ X.jsx(Ps, { ...e, setCursor: w, scaleCount: g, scrollElementRef: E }),
|
|
3460
|
+
/* @__PURE__ */ X.jsx(Is, { ...e, scrollElementRef: E, timelineWidth: T, timelineHeight: P, disableDrag: o, editorData: m, cursorTime: b, scaleCount: g, setScaleCount: S, setEditorData: x }),
|
|
3461
|
+
!i && /* @__PURE__ */ X.jsx(Ks, { ...e, timelineWidth: T, scaleCount: g, setScaleCount: S, setCursor: w, cursorTime: b, editorData: m, scrollElementRef: E })
|
|
3462
|
+
] }) });
|
|
3603
3463
|
});
|
|
3604
3464
|
export {
|
|
3605
|
-
|
|
3465
|
+
Zs as Timeline
|
|
3606
3466
|
};
|