@cyca/react-timeline-editor 0.2.3-alpha.5 → 0.2.3-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-timeline-editor.cjs +4 -4
- package/dist/react-timeline-editor.js +1310 -1302
- package/dist/styles.css +1 -1
- package/package.json +4 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as p from "react";
|
|
2
|
-
import nt, { useRef as
|
|
3
|
-
import { flushSync as
|
|
2
|
+
import nt, { useRef as ee, useEffect as et, useEffectEvent as Lr, useImperativeHandle as Qn, useState as At, useMemo as Or, useCallback as er, useLayoutEffect as gn, createElement as Mr } from "react";
|
|
3
|
+
import { flushSync as Nr } from "react-dom";
|
|
4
4
|
var Wt = { exports: {} }, Pt = {};
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
|
|
5
|
+
var yn;
|
|
6
|
+
function Ir() {
|
|
7
|
+
if (yn) return Pt;
|
|
8
|
+
yn = 1;
|
|
9
9
|
var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
10
10
|
function t(r, s, o) {
|
|
11
11
|
var i = null;
|
|
@@ -25,47 +25,47 @@ function Mr() {
|
|
|
25
25
|
return Pt.Fragment = e, Pt.jsx = t, Pt.jsxs = t, Pt;
|
|
26
26
|
}
|
|
27
27
|
var Dt = {};
|
|
28
|
-
var
|
|
29
|
-
function
|
|
30
|
-
return
|
|
28
|
+
var En;
|
|
29
|
+
function kr() {
|
|
30
|
+
return En || (En = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
31
|
function n(d) {
|
|
32
32
|
if (d == null) return null;
|
|
33
33
|
if (typeof d == "function")
|
|
34
|
-
return d.$$typeof ===
|
|
34
|
+
return d.$$typeof === L ? null : d.displayName || d.name || null;
|
|
35
35
|
if (typeof d == "string") return d;
|
|
36
36
|
switch (d) {
|
|
37
|
-
case
|
|
37
|
+
case v:
|
|
38
38
|
return "Fragment";
|
|
39
39
|
case _:
|
|
40
40
|
return "Profiler";
|
|
41
|
-
case
|
|
41
|
+
case w:
|
|
42
42
|
return "StrictMode";
|
|
43
43
|
case x:
|
|
44
44
|
return "Suspense";
|
|
45
|
-
case
|
|
45
|
+
case C:
|
|
46
46
|
return "SuspenseList";
|
|
47
|
-
case
|
|
47
|
+
case D:
|
|
48
48
|
return "Activity";
|
|
49
49
|
}
|
|
50
50
|
if (typeof d == "object")
|
|
51
51
|
switch (typeof d.tag == "number" && console.error(
|
|
52
52
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
53
|
), d.$$typeof) {
|
|
54
|
-
case
|
|
54
|
+
case b:
|
|
55
55
|
return "Portal";
|
|
56
56
|
case y:
|
|
57
57
|
return d.displayName || "Context";
|
|
58
|
-
case
|
|
58
|
+
case S:
|
|
59
59
|
return (d._context.displayName || "Context") + ".Consumer";
|
|
60
|
-
case
|
|
61
|
-
var
|
|
62
|
-
return d = d.displayName, d || (d =
|
|
63
|
-
case
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
|
|
60
|
+
case T:
|
|
61
|
+
var A = d.render;
|
|
62
|
+
return d = d.displayName, d || (d = A.displayName || A.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
63
|
+
case P:
|
|
64
|
+
return A = d.displayName || null, A !== null ? A : n(d.type) || "Memo";
|
|
65
|
+
case E:
|
|
66
|
+
A = d._payload, d = d._init;
|
|
67
67
|
try {
|
|
68
|
-
return n(d(
|
|
68
|
+
return n(d(A));
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -77,74 +77,74 @@ function Nr() {
|
|
|
77
77
|
function t(d) {
|
|
78
78
|
try {
|
|
79
79
|
e(d);
|
|
80
|
-
var
|
|
80
|
+
var A = !1;
|
|
81
81
|
} catch {
|
|
82
|
-
|
|
82
|
+
A = !0;
|
|
83
83
|
}
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
var
|
|
87
|
-
return
|
|
88
|
-
|
|
84
|
+
if (A) {
|
|
85
|
+
A = console;
|
|
86
|
+
var V = A.error, H = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
87
|
+
return V.call(
|
|
88
|
+
A,
|
|
89
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
90
|
H
|
|
91
91
|
), e(d);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function r(d) {
|
|
95
|
-
if (d ===
|
|
96
|
-
if (typeof d == "object" && d !== null && d.$$typeof ===
|
|
95
|
+
if (d === v) return "<>";
|
|
96
|
+
if (typeof d == "object" && d !== null && d.$$typeof === E)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
|
-
var
|
|
100
|
-
return
|
|
99
|
+
var A = n(d);
|
|
100
|
+
return A ? "<" + A + ">" : "<...>";
|
|
101
101
|
} catch {
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
function s() {
|
|
106
|
-
var d =
|
|
106
|
+
var d = k.A;
|
|
107
107
|
return d === null ? null : d.getOwner();
|
|
108
108
|
}
|
|
109
109
|
function o() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
112
|
function i(d) {
|
|
113
|
-
if (
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
113
|
+
if (F.call(d, "key")) {
|
|
114
|
+
var A = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
115
|
+
if (A && A.isReactWarning) return !1;
|
|
116
116
|
}
|
|
117
117
|
return d.key !== void 0;
|
|
118
118
|
}
|
|
119
|
-
function c(d,
|
|
120
|
-
function
|
|
121
|
-
|
|
119
|
+
function c(d, A) {
|
|
120
|
+
function V() {
|
|
121
|
+
I || (I = !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
|
+
A
|
|
124
124
|
));
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
126
|
+
V.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
127
|
+
get: V,
|
|
128
128
|
configurable: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function l() {
|
|
132
132
|
var d = n(this.type);
|
|
133
133
|
return G[d] || (G[d] = !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
|
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
136
136
|
}
|
|
137
|
-
function u(d,
|
|
138
|
-
var
|
|
137
|
+
function u(d, A, V, H, q, B) {
|
|
138
|
+
var U = V.ref;
|
|
139
139
|
return d = {
|
|
140
|
-
$$typeof:
|
|
140
|
+
$$typeof: g,
|
|
141
141
|
type: d,
|
|
142
|
-
key:
|
|
143
|
-
props:
|
|
142
|
+
key: A,
|
|
143
|
+
props: V,
|
|
144
144
|
_owner: H
|
|
145
|
-
}, (
|
|
145
|
+
}, (U !== void 0 ? U : null) !== null ? Object.defineProperty(d, "ref", {
|
|
146
146
|
enumerable: !1,
|
|
147
|
-
get:
|
|
147
|
+
get: l
|
|
148
148
|
}) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
149
149
|
configurable: !1,
|
|
150
150
|
enumerable: !1,
|
|
@@ -167,25 +167,25 @@ function Nr() {
|
|
|
167
167
|
value: B
|
|
168
168
|
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
170
|
+
function a(d, A, V, H, q, B) {
|
|
171
|
+
var U = A.children;
|
|
172
|
+
if (U !== void 0)
|
|
173
173
|
if (H)
|
|
174
|
-
if (K(
|
|
175
|
-
for (H = 0; H <
|
|
176
|
-
h(
|
|
177
|
-
Object.freeze && Object.freeze(
|
|
174
|
+
if (K(U)) {
|
|
175
|
+
for (H = 0; H < U.length; H++)
|
|
176
|
+
h(U[H]);
|
|
177
|
+
Object.freeze && Object.freeze(U);
|
|
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 h(
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
return
|
|
182
|
+
else h(U);
|
|
183
|
+
if (F.call(A, "key")) {
|
|
184
|
+
U = n(d);
|
|
185
|
+
var M = Object.keys(A).filter(function($) {
|
|
186
|
+
return $ !== "key";
|
|
187
187
|
});
|
|
188
|
-
H = 0 <
|
|
188
|
+
H = 0 < M.length ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}", me[U + H] || (M = 0 < M.length ? "{" + M.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} />
|
|
@@ -193,35 +193,35 @@ React keys must be passed directly to JSX without using spread:
|
|
|
193
193
|
let props = %s;
|
|
194
194
|
<%s key={someKey} {...props} />`,
|
|
195
195
|
H,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
), me[
|
|
196
|
+
U,
|
|
197
|
+
M,
|
|
198
|
+
U
|
|
199
|
+
), me[U + H] = !0);
|
|
200
200
|
}
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
|
|
205
|
-
} else
|
|
206
|
-
return
|
|
207
|
-
|
|
201
|
+
if (U = null, V !== void 0 && (t(V), U = "" + V), i(A) && (t(A.key), U = "" + A.key), "key" in A) {
|
|
202
|
+
V = {};
|
|
203
|
+
for (var N in A)
|
|
204
|
+
N !== "key" && (V[N] = A[N]);
|
|
205
|
+
} else V = A;
|
|
206
|
+
return U && c(
|
|
207
|
+
V,
|
|
208
208
|
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
209
209
|
), u(
|
|
210
210
|
d,
|
|
211
|
+
U,
|
|
211
212
|
V,
|
|
212
|
-
F,
|
|
213
213
|
s(),
|
|
214
214
|
q,
|
|
215
215
|
B
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
function h(d) {
|
|
219
|
-
f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof ===
|
|
219
|
+
f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === E && (d._payload.status === "fulfilled" ? f(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
220
220
|
}
|
|
221
221
|
function f(d) {
|
|
222
|
-
return typeof d == "object" && d !== null && d.$$typeof ===
|
|
222
|
+
return typeof d == "object" && d !== null && d.$$typeof === g;
|
|
223
223
|
}
|
|
224
|
-
var m = nt,
|
|
224
|
+
var m = nt, g = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), y = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), k = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, K = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
227
|
m = {
|
|
@@ -229,53 +229,53 @@ React keys must be passed directly to JSX without using spread:
|
|
|
229
229
|
return d();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var
|
|
232
|
+
var I, G = {}, ue = m.react_stack_bottom_frame.bind(
|
|
233
233
|
m,
|
|
234
234
|
o
|
|
235
|
-
)(), fe =
|
|
236
|
-
Dt.Fragment =
|
|
237
|
-
var H = 1e4 >
|
|
238
|
-
return
|
|
235
|
+
)(), fe = O(r(o)), me = {};
|
|
236
|
+
Dt.Fragment = v, Dt.jsx = function(d, A, V) {
|
|
237
|
+
var H = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
238
|
+
return a(
|
|
239
239
|
d,
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
A,
|
|
241
|
+
V,
|
|
242
242
|
!1,
|
|
243
243
|
H ? Error("react-stack-top-frame") : ue,
|
|
244
|
-
H ?
|
|
244
|
+
H ? O(r(d)) : fe
|
|
245
245
|
);
|
|
246
|
-
}, Dt.jsxs = function(d,
|
|
247
|
-
var H = 1e4 >
|
|
248
|
-
return
|
|
246
|
+
}, Dt.jsxs = function(d, A, V) {
|
|
247
|
+
var H = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
248
|
+
return a(
|
|
249
249
|
d,
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
A,
|
|
251
|
+
V,
|
|
252
252
|
!0,
|
|
253
253
|
H ? Error("react-stack-top-frame") : ue,
|
|
254
|
-
H ?
|
|
254
|
+
H ? O(r(d)) : fe
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
257
|
})()), Dt;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
return
|
|
259
|
+
var Rn;
|
|
260
|
+
function Wr() {
|
|
261
|
+
return Rn || (Rn = 1, process.env.NODE_ENV === "production" ? Wt.exports = Ir() : Wt.exports = kr()), Wt.exports;
|
|
262
262
|
}
|
|
263
|
-
var
|
|
264
|
-
const
|
|
263
|
+
var R = Wr();
|
|
264
|
+
const un = "timeline-editor", xn = 0, Yt = 1, tr = 10, Xt = 160, Jt = 20, fn = 1, dn = 8, Cn = 32, hn = 20, nr = 5, rn = {
|
|
265
265
|
trace: 0,
|
|
266
266
|
debug: 1,
|
|
267
267
|
info: 2,
|
|
268
268
|
warn: 3,
|
|
269
269
|
error: 4,
|
|
270
270
|
silent: 5
|
|
271
|
-
},
|
|
271
|
+
}, jr = [
|
|
272
272
|
"trace",
|
|
273
273
|
"debug",
|
|
274
274
|
"info",
|
|
275
275
|
"warn",
|
|
276
276
|
"error"
|
|
277
277
|
];
|
|
278
|
-
var
|
|
278
|
+
var zr = class rr {
|
|
279
279
|
s;
|
|
280
280
|
ls = /* @__PURE__ */ new Map();
|
|
281
281
|
lvl;
|
|
@@ -295,7 +295,7 @@ var jr = class tr {
|
|
|
295
295
|
noop = () => {
|
|
296
296
|
};
|
|
297
297
|
bindMethods() {
|
|
298
|
-
|
|
298
|
+
jr.forEach((e) => {
|
|
299
299
|
const t = this.e.bind(this.c, e, this.n);
|
|
300
300
|
Object.defineProperty(this, e, {
|
|
301
301
|
get: () => rn[e] >= rn[this.currentLevel()] ? t : this.noop,
|
|
@@ -323,8 +323,8 @@ var jr = class tr {
|
|
|
323
323
|
getLogger(e) {
|
|
324
324
|
if (!e) throw new Error("Logger name required");
|
|
325
325
|
if (!this.ls.has(e)) {
|
|
326
|
-
const t = new
|
|
327
|
-
this.ls.set(e,
|
|
326
|
+
const t = new rr(this.s, this.e, e, this.r || this);
|
|
327
|
+
this.ls.set(e, sr(t));
|
|
328
328
|
}
|
|
329
329
|
return this.ls.get(e);
|
|
330
330
|
}
|
|
@@ -338,14 +338,14 @@ var jr = class tr {
|
|
|
338
338
|
this.c = e, this.bindMethods();
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
|
-
function
|
|
341
|
+
function sr(n) {
|
|
342
342
|
return new Proxy(n, { get(e, t, r) {
|
|
343
343
|
if (t in e) return Reflect.get(e, t, r);
|
|
344
344
|
const s = e.c[t];
|
|
345
345
|
return typeof s == "function" ? s.bind(e.c) : s;
|
|
346
346
|
} });
|
|
347
347
|
}
|
|
348
|
-
var
|
|
348
|
+
var Fr = class {
|
|
349
349
|
get(n) {
|
|
350
350
|
return localStorage.getItem(n);
|
|
351
351
|
}
|
|
@@ -356,13 +356,13 @@ var zr = class {
|
|
|
356
356
|
localStorage.removeItem(n);
|
|
357
357
|
}
|
|
358
358
|
};
|
|
359
|
-
const
|
|
359
|
+
const Vr = {
|
|
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,28 +370,28 @@ const Fr = {
|
|
|
370
370
|
log: "●",
|
|
371
371
|
trace: "◔",
|
|
372
372
|
debug: "◌"
|
|
373
|
-
},
|
|
374
|
-
const r = t ? `${
|
|
375
|
-
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${
|
|
376
|
-
} }, Ze =
|
|
377
|
-
function
|
|
373
|
+
}, Ur = { bind(n, e, t) {
|
|
374
|
+
const r = t ? `${An[e]} ${String(t)}:` : `${An[e]}`;
|
|
375
|
+
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${Vr[e]}; font-weight: bold;`, "color: inherit");
|
|
376
|
+
} }, Ze = sr(new zr(new Fr(), Ur));
|
|
377
|
+
function $r(n) {
|
|
378
378
|
let {
|
|
379
379
|
editorData: e = [],
|
|
380
380
|
effects: t = {},
|
|
381
381
|
scale: r = Yt,
|
|
382
|
-
scaleSplitCount: s =
|
|
382
|
+
scaleSplitCount: s = tr,
|
|
383
383
|
scaleWidth: o = Xt,
|
|
384
384
|
startLeft: i = Jt,
|
|
385
|
-
minScaleCount: c =
|
|
386
|
-
maxScaleCount:
|
|
387
|
-
rowHeight: u =
|
|
385
|
+
minScaleCount: c = hn,
|
|
386
|
+
maxScaleCount: l = 1 / 0,
|
|
387
|
+
rowHeight: u = Cn
|
|
388
388
|
} = n;
|
|
389
|
-
r <= 0 && (Ze.error("Error: scale must be greater than 0!"), r = Yt), s <= 0 && (Ze.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (Ze.warn("Warning: scaleWidth must be greater than 0!"), o = Xt), i < 0 && (Ze.warn("Warning: startLeft cannot be less than 0!"), i = 0), c < 1 && (Ze.warn("Warning: minScaleCount must be greater than 1!"), c =
|
|
390
|
-
const
|
|
389
|
+
r <= 0 && (Ze.error("Error: scale must be greater than 0!"), r = Yt), s <= 0 && (Ze.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (Ze.warn("Warning: scaleWidth must be greater than 0!"), o = Xt), i < 0 && (Ze.warn("Warning: startLeft cannot be less than 0!"), i = 0), c < 1 && (Ze.warn("Warning: minScaleCount must be greater than 1!"), c = hn), c = parseInt(c + ""), l < c && (Ze.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), l = c), l = l === 1 / 0 ? 1 / 0 : parseInt(l + ""), u <= 0 && (Ze.warn("Warning: rowHeight must be greater than 0!"), u = Cn);
|
|
390
|
+
const a = {
|
|
391
391
|
...n
|
|
392
392
|
};
|
|
393
|
-
return delete
|
|
394
|
-
...
|
|
393
|
+
return delete a.style, {
|
|
394
|
+
...a,
|
|
395
395
|
editorData: e,
|
|
396
396
|
effects: t,
|
|
397
397
|
scale: r,
|
|
@@ -399,7 +399,7 @@ function Ur(n) {
|
|
|
399
399
|
scaleWidth: o,
|
|
400
400
|
startLeft: i,
|
|
401
401
|
minScaleCount: c,
|
|
402
|
-
maxScaleCount:
|
|
402
|
+
maxScaleCount: l,
|
|
403
403
|
rowHeight: u
|
|
404
404
|
};
|
|
405
405
|
}
|
|
@@ -429,7 +429,7 @@ function Lt(n, e) {
|
|
|
429
429
|
end: o
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function vn(n, e) {
|
|
433
433
|
const {
|
|
434
434
|
start: t,
|
|
435
435
|
end: r
|
|
@@ -439,41 +439,41 @@ function gn(n, e) {
|
|
|
439
439
|
width: o
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function Hr(n, e) {
|
|
443
443
|
let t = 0;
|
|
444
444
|
return n.forEach((s) => {
|
|
445
445
|
s.actions.forEach((o) => {
|
|
446
446
|
t = Math.max(t, o.end);
|
|
447
447
|
});
|
|
448
|
-
}), Math.ceil(t / e.scale) +
|
|
448
|
+
}), Math.ceil(t / e.scale) + nr;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Br(n, e) {
|
|
451
451
|
const {
|
|
452
452
|
startLeft: t,
|
|
453
453
|
scaleWidth: r
|
|
454
454
|
} = e, s = Math.ceil((n - t) / r);
|
|
455
|
-
return Math.max(s +
|
|
455
|
+
return Math.max(s + nr, e.scaleCount);
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Yr(n, e) {
|
|
458
458
|
const t = [];
|
|
459
459
|
return n.forEach((r) => {
|
|
460
460
|
t.push(je(r.start, e)), t.push(je(r.end, e));
|
|
461
461
|
}), t;
|
|
462
462
|
}
|
|
463
463
|
var jt = { exports: {} }, sn = {};
|
|
464
|
-
var
|
|
465
|
-
function
|
|
466
|
-
if (
|
|
467
|
-
|
|
464
|
+
var Tn;
|
|
465
|
+
function Xr() {
|
|
466
|
+
if (Tn) return sn;
|
|
467
|
+
Tn = 1;
|
|
468
468
|
var n = nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
469
469
|
return sn.c = function(e) {
|
|
470
470
|
return n.H.useMemoCache(e);
|
|
471
471
|
}, sn;
|
|
472
472
|
}
|
|
473
473
|
var on = {};
|
|
474
|
-
var
|
|
475
|
-
function
|
|
476
|
-
return
|
|
474
|
+
var Pn;
|
|
475
|
+
function Gr() {
|
|
476
|
+
return Pn || (Pn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
477
477
|
var n = nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
478
478
|
on.c = function(e) {
|
|
479
479
|
var t = n.H;
|
|
@@ -487,12 +487,12 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
487
487
|
};
|
|
488
488
|
})()), on;
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
492
|
-
return
|
|
490
|
+
var Dn;
|
|
491
|
+
function Kr() {
|
|
492
|
+
return Dn || (Dn = 1, process.env.NODE_ENV === "production" ? jt.exports = Xr() : jt.exports = Gr()), jt.exports;
|
|
493
493
|
}
|
|
494
|
-
var ze =
|
|
495
|
-
function
|
|
494
|
+
var ze = Kr();
|
|
495
|
+
function qr(n) {
|
|
496
496
|
for (var e = [], t = 1; t < arguments.length; t++)
|
|
497
497
|
e[t - 1] = arguments[t];
|
|
498
498
|
return e.map(function(r) {
|
|
@@ -502,9 +502,9 @@ function Kr(n) {
|
|
|
502
502
|
}).join(" ");
|
|
503
503
|
}
|
|
504
504
|
function de(...n) {
|
|
505
|
-
return
|
|
505
|
+
return qr(`${un}-`, ...n);
|
|
506
506
|
}
|
|
507
|
-
const
|
|
507
|
+
const Jr = (n) => {
|
|
508
508
|
const e = ze.c(11), {
|
|
509
509
|
isMoving: t,
|
|
510
510
|
movePositions: r,
|
|
@@ -512,79 +512,79 @@ const qr = (n) => {
|
|
|
512
512
|
} = n;
|
|
513
513
|
let o, i;
|
|
514
514
|
if (e[0] !== t || e[1] !== r || e[2] !== s) {
|
|
515
|
-
const
|
|
515
|
+
const l = r === void 0 ? [] : r;
|
|
516
516
|
let u;
|
|
517
517
|
e[5] !== s ? (u = s === void 0 ? [] : s, e[5] = s, e[6] = u) : u = e[6];
|
|
518
|
-
const
|
|
519
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = de("drag-line-container"), e[7] = o) : o = e[7], i = t &&
|
|
518
|
+
const a = u;
|
|
519
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = de("drag-line-container"), e[7] = o) : o = e[7], i = t && l.filter((h) => a.includes(h)).map(Zr), e[0] = t, e[1] = r, e[2] = s, e[3] = o, e[4] = i;
|
|
520
520
|
} else
|
|
521
521
|
o = e[3], i = e[4];
|
|
522
522
|
let c;
|
|
523
|
-
return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */
|
|
523
|
+
return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */ R.jsx("div", { className: o, children: i }), e[8] = o, e[9] = i, e[10] = c) : c = e[10], c;
|
|
524
524
|
};
|
|
525
|
-
function
|
|
526
|
-
return /* @__PURE__ */
|
|
525
|
+
function Zr(n, e) {
|
|
526
|
+
return /* @__PURE__ */ R.jsx("div", { className: de("drag-line"), style: {
|
|
527
527
|
left: n
|
|
528
528
|
} }, e);
|
|
529
529
|
}
|
|
530
|
-
const zt = 1,
|
|
531
|
-
function
|
|
532
|
-
const e = ze.c(7), t =
|
|
530
|
+
const zt = 1, Ln = 10, On = 10;
|
|
531
|
+
function Qr(n) {
|
|
532
|
+
const e = ze.c(7), t = ee(Number.MIN_SAFE_INTEGER), r = ee(Number.MAX_SAFE_INTEGER), s = ee(zt), o = ee(void 0);
|
|
533
533
|
let i;
|
|
534
534
|
e[0] !== n ? (i = () => {
|
|
535
535
|
if (n?.current) {
|
|
536
536
|
const {
|
|
537
|
-
left:
|
|
538
|
-
width:
|
|
537
|
+
left: b,
|
|
538
|
+
width: v
|
|
539
539
|
} = n.current.getBoundingClientRect();
|
|
540
|
-
t.current =
|
|
540
|
+
t.current = b, r.current = b + v;
|
|
541
541
|
}
|
|
542
542
|
}, e[0] = n, e[1] = i) : i = e[1];
|
|
543
543
|
const c = i;
|
|
544
|
-
let
|
|
545
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
546
|
-
if (
|
|
544
|
+
let l;
|
|
545
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (l = (b, v) => {
|
|
546
|
+
if (b.clientX >= r.current || b.clientX <= t.current) {
|
|
547
547
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
548
|
-
const
|
|
549
|
-
s.current = Math.min(Number((
|
|
550
|
-
const
|
|
551
|
-
|
|
548
|
+
const w = Math.abs(b.clientX >= r.current ? b.clientX - r.current : b.clientX - t.current);
|
|
549
|
+
s.current = Math.min(Number((w / On).toFixed(0)) * zt, Ln);
|
|
550
|
+
const S = (b.clientX >= r.current ? 1 : -1) * s.current, y = () => {
|
|
551
|
+
v && v(S), o.current = requestAnimationFrame(y);
|
|
552
552
|
};
|
|
553
553
|
return o.current = requestAnimationFrame(y), !1;
|
|
554
554
|
} else
|
|
555
555
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
556
556
|
return !0;
|
|
557
|
-
}, e[2] =
|
|
558
|
-
const u =
|
|
559
|
-
let
|
|
560
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
561
|
-
if (
|
|
557
|
+
}, e[2] = l) : l = e[2];
|
|
558
|
+
const u = l;
|
|
559
|
+
let a;
|
|
560
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (a = (b, v, w) => {
|
|
561
|
+
if (b.clientX >= r.current || b.clientX < t.current) {
|
|
562
562
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
563
|
-
const _ = Math.abs(
|
|
564
|
-
s.current = Math.min(Number((_ /
|
|
565
|
-
const y = (
|
|
566
|
-
|
|
563
|
+
const _ = Math.abs(b.clientX >= r.current ? b.clientX - r.current : b.clientX - t.current);
|
|
564
|
+
s.current = Math.min(Number((_ / On).toFixed(0)) * zt, Ln);
|
|
565
|
+
const y = (b.clientX >= r.current ? 1 : -1) * s.current, T = () => {
|
|
566
|
+
w && w(y), o.current = requestAnimationFrame(T);
|
|
567
567
|
};
|
|
568
|
-
return o.current = requestAnimationFrame(
|
|
568
|
+
return o.current = requestAnimationFrame(T), !1;
|
|
569
569
|
} else
|
|
570
570
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
571
571
|
return !0;
|
|
572
|
-
}, e[3] =
|
|
573
|
-
const h =
|
|
572
|
+
}, e[3] = a) : a = e[3];
|
|
573
|
+
const h = a;
|
|
574
574
|
let f;
|
|
575
575
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
|
|
576
576
|
t.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current = zt, o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
577
577
|
}, e[4] = f) : f = e[4];
|
|
578
578
|
const m = f;
|
|
579
|
-
let
|
|
580
|
-
return e[5] !== c ? (
|
|
579
|
+
let g;
|
|
580
|
+
return e[5] !== c ? (g = {
|
|
581
581
|
initAutoScroll: c,
|
|
582
582
|
dealDragAutoScroll: u,
|
|
583
583
|
dealResizeAutoScroll: h,
|
|
584
584
|
stopAutoScroll: m
|
|
585
|
-
}, e[5] = c, e[6] =
|
|
585
|
+
}, e[5] = c, e[6] = g) : g = e[6], g;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function es(n, e, t) {
|
|
588
588
|
return Math.max(e, Math.min(n, t));
|
|
589
589
|
}
|
|
590
590
|
const he = {
|
|
@@ -604,17 +604,17 @@ const he = {
|
|
|
604
604
|
n[0] -= e[0], n[1] -= e[1];
|
|
605
605
|
}
|
|
606
606
|
};
|
|
607
|
-
function
|
|
607
|
+
function Mn(n, e, t) {
|
|
608
608
|
return e === 0 || Math.abs(e) === 1 / 0 ? Math.pow(n, t * 5) : n * e * t / (e + t * n);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return r === 0 ?
|
|
610
|
+
function Nn(n, e, t, r = 0.15) {
|
|
611
|
+
return r === 0 ? es(n, e, t) : n < e ? -Mn(e - n, t - e, r) + e : n > t ? +Mn(n - t, t - e, r) + t : n;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
const [[o, i], [c,
|
|
615
|
-
return [
|
|
613
|
+
function ts(n, [e, t], [r, s]) {
|
|
614
|
+
const [[o, i], [c, l]] = n;
|
|
615
|
+
return [Nn(e, o, i, r), Nn(t, c, l, s)];
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function ns(n, e) {
|
|
618
618
|
if (typeof n != "object" || n === null) return n;
|
|
619
619
|
var t = n[Symbol.toPrimitive];
|
|
620
620
|
if (t !== void 0) {
|
|
@@ -624,19 +624,19 @@ function ts(n, e) {
|
|
|
624
624
|
}
|
|
625
625
|
return (e === "string" ? String : Number)(n);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
var e =
|
|
627
|
+
function rs(n) {
|
|
628
|
+
var e = ns(n, "string");
|
|
629
629
|
return typeof e == "symbol" ? e : String(e);
|
|
630
630
|
}
|
|
631
631
|
function ve(n, e, t) {
|
|
632
|
-
return e =
|
|
632
|
+
return e = rs(e), e in n ? Object.defineProperty(n, e, {
|
|
633
633
|
value: t,
|
|
634
634
|
enumerable: !0,
|
|
635
635
|
configurable: !0,
|
|
636
636
|
writable: !0
|
|
637
637
|
}) : n[e] = t, n;
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function In(n, e) {
|
|
640
640
|
var t = Object.keys(n);
|
|
641
641
|
if (Object.getOwnPropertySymbols) {
|
|
642
642
|
var r = Object.getOwnPropertySymbols(n);
|
|
@@ -646,18 +646,18 @@ function Mn(n, e) {
|
|
|
646
646
|
}
|
|
647
647
|
return t;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function te(n) {
|
|
650
650
|
for (var e = 1; e < arguments.length; e++) {
|
|
651
651
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
652
|
-
e % 2 ?
|
|
652
|
+
e % 2 ? In(Object(t), !0).forEach(function(r) {
|
|
653
653
|
ve(n, r, t[r]);
|
|
654
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) :
|
|
654
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : In(Object(t)).forEach(function(r) {
|
|
655
655
|
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
656
656
|
});
|
|
657
657
|
}
|
|
658
658
|
return n;
|
|
659
659
|
}
|
|
660
|
-
const
|
|
660
|
+
const or = {
|
|
661
661
|
pointer: {
|
|
662
662
|
start: "down",
|
|
663
663
|
change: "move",
|
|
@@ -679,63 +679,63 @@ const rr = {
|
|
|
679
679
|
end: "end"
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
|
-
function
|
|
682
|
+
function kn(n) {
|
|
683
683
|
return n ? n[0].toUpperCase() + n.slice(1) : "";
|
|
684
684
|
}
|
|
685
|
-
const
|
|
686
|
-
function
|
|
687
|
-
return n && !
|
|
685
|
+
const ss = ["enter", "leave"];
|
|
686
|
+
function os(n = !1, e) {
|
|
687
|
+
return n && !ss.includes(e);
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
const r =
|
|
691
|
-
return "on" +
|
|
689
|
+
function is(n, e = "", t = !1) {
|
|
690
|
+
const r = or[n], s = r && r[e] || e;
|
|
691
|
+
return "on" + kn(n) + kn(s) + (os(t, s) ? "Capture" : "");
|
|
692
692
|
}
|
|
693
|
-
const
|
|
694
|
-
function
|
|
693
|
+
const cs = ["gotpointercapture", "lostpointercapture"];
|
|
694
|
+
function as(n) {
|
|
695
695
|
let e = n.substring(2).toLowerCase();
|
|
696
696
|
const t = !!~e.indexOf("passive");
|
|
697
697
|
t && (e = e.replace("passive", ""));
|
|
698
|
-
const r =
|
|
698
|
+
const r = cs.includes(e) ? "capturecapture" : "capture", s = !!~e.indexOf(r);
|
|
699
699
|
return s && (e = e.replace("capture", "")), {
|
|
700
700
|
device: e,
|
|
701
701
|
capture: s,
|
|
702
702
|
passive: t
|
|
703
703
|
};
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
const t =
|
|
705
|
+
function ls(n, e = "") {
|
|
706
|
+
const t = or[n], r = t && t[e] || e;
|
|
707
707
|
return n + r;
|
|
708
708
|
}
|
|
709
709
|
function Zt(n) {
|
|
710
710
|
return "touches" in n;
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function ir(n) {
|
|
713
713
|
return Zt(n) ? "touch" : "pointerType" in n ? n.pointerType : "mouse";
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function us(n) {
|
|
716
716
|
return Array.from(n.touches).filter((e) => {
|
|
717
717
|
var t, r;
|
|
718
718
|
return e.target === n.currentTarget || ((t = n.currentTarget) === null || t === void 0 || (r = t.contains) === null || r === void 0 ? void 0 : r.call(t, e.target));
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function fs(n) {
|
|
722
722
|
return n.type === "touchend" || n.type === "touchcancel" ? n.changedTouches : n.targetTouches;
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
return Zt(n) ?
|
|
724
|
+
function cr(n) {
|
|
725
|
+
return Zt(n) ? fs(n)[0] : n;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
728
|
-
return
|
|
727
|
+
function ds(n) {
|
|
728
|
+
return us(n).map((e) => e.identifier);
|
|
729
729
|
}
|
|
730
730
|
function cn(n) {
|
|
731
|
-
const e =
|
|
731
|
+
const e = cr(n);
|
|
732
732
|
return Zt(n) ? e.identifier : e.pointerId;
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
const e =
|
|
734
|
+
function Wn(n) {
|
|
735
|
+
const e = cr(n);
|
|
736
736
|
return [e.clientX, e.clientY];
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function hs(n) {
|
|
739
739
|
const e = {};
|
|
740
740
|
if ("buttons" in n && (e.buttons = n.buttons), "shiftKey" in n) {
|
|
741
741
|
const {
|
|
@@ -756,21 +756,21 @@ function ds(n) {
|
|
|
756
756
|
function Gt(n, ...e) {
|
|
757
757
|
return typeof n == "function" ? n(...e) : n;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function ms() {
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
return n.length === 0 ?
|
|
761
|
+
function ps(...n) {
|
|
762
|
+
return n.length === 0 ? ms : n.length === 1 ? n[0] : function() {
|
|
763
763
|
let e;
|
|
764
764
|
for (const t of n)
|
|
765
765
|
e = t.apply(this, arguments) || e;
|
|
766
766
|
return e;
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function jn(n, e) {
|
|
770
770
|
return Object.assign({}, e, n || {});
|
|
771
771
|
}
|
|
772
|
-
const
|
|
773
|
-
class
|
|
772
|
+
const gs = 32;
|
|
773
|
+
class vs {
|
|
774
774
|
constructor(e, t, r) {
|
|
775
775
|
this.ctrl = e, this.args = t, this.key = r, this.state || (this.state = {}, this.computeValues([0, 0]), this.computeInitial(), this.init && this.init(), this.reset());
|
|
776
776
|
}
|
|
@@ -827,29 +827,29 @@ class gs {
|
|
|
827
827
|
} = this;
|
|
828
828
|
t.args = this.args;
|
|
829
829
|
let o = 0;
|
|
830
|
-
if (e && (t.event = e, r.preventDefault && e.cancelable && t.event.preventDefault(), t.type = e.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s,
|
|
830
|
+
if (e && (t.event = e, r.preventDefault && e.cancelable && t.event.preventDefault(), t.type = e.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s, hs(e)), s.down = s.pressed = s.buttons % 2 === 1 || s.touches > 0, o = e.timeStamp - t.timeStamp, t.timeStamp = e.timeStamp, t.elapsedTime = t.timeStamp - t.startTime), t._active) {
|
|
831
831
|
const x = t._delta.map(Math.abs);
|
|
832
832
|
he.addTo(t._distance, x);
|
|
833
833
|
}
|
|
834
834
|
this.axisIntent && this.axisIntent(e);
|
|
835
|
-
const [i, c] = t._movement, [
|
|
836
|
-
_step:
|
|
835
|
+
const [i, c] = t._movement, [l, u] = r.threshold, {
|
|
836
|
+
_step: a,
|
|
837
837
|
values: h
|
|
838
838
|
} = t;
|
|
839
|
-
if (r.hasCustomTransform ? (
|
|
839
|
+
if (r.hasCustomTransform ? (a[0] === !1 && (a[0] = Math.abs(i) >= l && h[0]), a[1] === !1 && (a[1] = Math.abs(c) >= u && h[1])) : (a[0] === !1 && (a[0] = Math.abs(i) >= l && Math.sign(i) * l), a[1] === !1 && (a[1] = Math.abs(c) >= u && Math.sign(c) * u)), t.intentional = a[0] !== !1 || a[1] !== !1, !t.intentional) return;
|
|
840
840
|
const f = [0, 0];
|
|
841
841
|
if (r.hasCustomTransform) {
|
|
842
|
-
const [x,
|
|
843
|
-
f[0] =
|
|
842
|
+
const [x, C] = h;
|
|
843
|
+
f[0] = a[0] !== !1 ? x - a[0] : 0, f[1] = a[1] !== !1 ? C - a[1] : 0;
|
|
844
844
|
} else
|
|
845
|
-
f[0] =
|
|
845
|
+
f[0] = a[0] !== !1 ? i - a[0] : 0, f[1] = a[1] !== !1 ? c - a[1] : 0;
|
|
846
846
|
this.restrictToAxis && !t._blocked && this.restrictToAxis(f);
|
|
847
|
-
const m = t.offset,
|
|
848
|
-
|
|
849
|
-
const [
|
|
850
|
-
t.overflow = [
|
|
851
|
-
const
|
|
852
|
-
if (t.offset =
|
|
847
|
+
const m = t.offset, g = t._active && !t._blocked || t.active;
|
|
848
|
+
g && (t.first = t._active && !t.active, t.last = !t._active && t.active, t.active = s[this.ingKey] = t._active, e && (t.first && ("bounds" in r && (t._bounds = Gt(r.bounds, t)), this.setup && this.setup()), t.movement = f, this.computeOffset()));
|
|
849
|
+
const [b, v] = t.offset, [[w, _], [S, y]] = t._bounds;
|
|
850
|
+
t.overflow = [b < w ? -1 : b > _ ? 1 : 0, v < S ? -1 : v > y ? 1 : 0], t._movementBound[0] = t.overflow[0] ? t._movementBound[0] === !1 ? t._movement[0] : t._movementBound[0] : !1, t._movementBound[1] = t.overflow[1] ? t._movementBound[1] === !1 ? t._movement[1] : t._movementBound[1] : !1;
|
|
851
|
+
const T = t._active ? r.rubberband || [0, 0] : [0, 0];
|
|
852
|
+
if (t.offset = ts(t._bounds, t.offset, T), t.delta = he.sub(t.offset, m), this.computeMovement(), g && (!t.last || o > gs)) {
|
|
853
853
|
t.delta = he.sub(t.offset, m);
|
|
854
854
|
const x = t.delta.map(Math.abs);
|
|
855
855
|
he.addTo(t.distance, x), t.direction = t.delta.map(Math.sign), t._direction = t._delta.map(Math.sign), !t.first && o > 0 && (t.velocity = [x[0] / o, x[1] / o], t.timeDelta = o);
|
|
@@ -858,7 +858,7 @@ class gs {
|
|
|
858
858
|
emit() {
|
|
859
859
|
const e = this.state, t = this.shared, r = this.config;
|
|
860
860
|
if (e._active || this.clean(), (e._blocked || !e.intentional) && !e._force && !r.triggerAllEvents) return;
|
|
861
|
-
const s = this.handler(
|
|
861
|
+
const s = this.handler(te(te(te({}, t), e), {}, {
|
|
862
862
|
[this.aliasKey]: e.values
|
|
863
863
|
}));
|
|
864
864
|
s !== void 0 && (e.memo = s);
|
|
@@ -867,14 +867,14 @@ class gs {
|
|
|
867
867
|
this.eventStore.clean(), this.timeoutStore.clean();
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function bs([n, e], t) {
|
|
871
871
|
const r = Math.abs(n), s = Math.abs(e);
|
|
872
872
|
if (r > s && r > t)
|
|
873
873
|
return "x";
|
|
874
874
|
if (s > r && s > t)
|
|
875
875
|
return "y";
|
|
876
876
|
}
|
|
877
|
-
class
|
|
877
|
+
class _s extends vs {
|
|
878
878
|
constructor(...e) {
|
|
879
879
|
super(...e), ve(this, "aliasKey", "xy");
|
|
880
880
|
}
|
|
@@ -893,8 +893,8 @@ class bs extends gs {
|
|
|
893
893
|
axisIntent(e) {
|
|
894
894
|
const t = this.state, r = this.config;
|
|
895
895
|
if (!t.axis && e) {
|
|
896
|
-
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[
|
|
897
|
-
t.axis =
|
|
896
|
+
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[ir(e)] : r.axisThreshold;
|
|
897
|
+
t.axis = bs(t._movement, s);
|
|
898
898
|
}
|
|
899
899
|
t._blocked = (r.lockDirection || !!r.axis) && !t.axis || !!r.axis && r.axis !== t.axis;
|
|
900
900
|
}
|
|
@@ -910,12 +910,12 @@ class bs extends gs {
|
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
const
|
|
913
|
+
const zn = (n) => n, Fn = 0.15, bn = {
|
|
914
914
|
enabled(n = !0) {
|
|
915
915
|
return n;
|
|
916
916
|
},
|
|
917
917
|
eventOptions(n, e, t) {
|
|
918
|
-
return
|
|
918
|
+
return te(te({}, t.shared.eventOptions), n);
|
|
919
919
|
},
|
|
920
920
|
preventDefault(n = !1) {
|
|
921
921
|
return n;
|
|
@@ -926,7 +926,7 @@ const Wn = (n) => n, jn = 0.15, vn = {
|
|
|
926
926
|
rubberband(n = 0) {
|
|
927
927
|
switch (n) {
|
|
928
928
|
case !0:
|
|
929
|
-
return [
|
|
929
|
+
return [Fn, Fn];
|
|
930
930
|
case !1:
|
|
931
931
|
return [0, 0];
|
|
932
932
|
default:
|
|
@@ -940,19 +940,19 @@ const Wn = (n) => n, jn = 0.15, vn = {
|
|
|
940
940
|
transform(n, e, t) {
|
|
941
941
|
const r = n || t.shared.transform;
|
|
942
942
|
if (this.hasCustomTransform = !!r, process.env.NODE_ENV === "development") {
|
|
943
|
-
const s = r ||
|
|
943
|
+
const s = r || zn;
|
|
944
944
|
return (o) => {
|
|
945
945
|
const i = s(o);
|
|
946
946
|
return (!isFinite(i[0]) || !isFinite(i[1])) && console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${i[0]},${[1]}]`), i;
|
|
947
947
|
};
|
|
948
948
|
}
|
|
949
|
-
return r ||
|
|
949
|
+
return r || zn;
|
|
950
950
|
},
|
|
951
951
|
threshold(n) {
|
|
952
952
|
return he.toVector(n, 0);
|
|
953
953
|
}
|
|
954
954
|
};
|
|
955
|
-
process.env.NODE_ENV === "development" && Object.assign(
|
|
955
|
+
process.env.NODE_ENV === "development" && Object.assign(bn, {
|
|
956
956
|
domTarget(n) {
|
|
957
957
|
if (n !== void 0)
|
|
958
958
|
throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
|
|
@@ -969,13 +969,13 @@ process.env.NODE_ENV === "development" && Object.assign(vn, {
|
|
|
969
969
|
return NaN;
|
|
970
970
|
}
|
|
971
971
|
});
|
|
972
|
-
const
|
|
972
|
+
const ws = 0, Ot = te(te({}, bn), {}, {
|
|
973
973
|
axis(n, e, {
|
|
974
974
|
axis: t
|
|
975
975
|
}) {
|
|
976
976
|
if (this.lockDirection = t === "lock", !this.lockDirection) return t;
|
|
977
977
|
},
|
|
978
|
-
axisThreshold(n =
|
|
978
|
+
axisThreshold(n = ws) {
|
|
979
979
|
return n;
|
|
980
980
|
},
|
|
981
981
|
bounds(n = {}) {
|
|
@@ -993,13 +993,13 @@ const _s = 0, Ot = ee(ee({}, vn), {}, {
|
|
|
993
993
|
} = n;
|
|
994
994
|
return [[e, t], [r, s]];
|
|
995
995
|
}
|
|
996
|
-
}),
|
|
996
|
+
}), Vn = {
|
|
997
997
|
ArrowRight: (n, e = 1) => [n * e, 0],
|
|
998
998
|
ArrowLeft: (n, e = 1) => [-1 * n * e, 0],
|
|
999
999
|
ArrowUp: (n, e = 1) => [0, -1 * n * e],
|
|
1000
1000
|
ArrowDown: (n, e = 1) => [0, n * e]
|
|
1001
1001
|
};
|
|
1002
|
-
class
|
|
1002
|
+
class Ss extends _s {
|
|
1003
1003
|
constructor(...e) {
|
|
1004
1004
|
super(...e), ve(this, "ingKey", "dragging");
|
|
1005
1005
|
}
|
|
@@ -1036,7 +1036,7 @@ class ws extends bs {
|
|
|
1036
1036
|
const t = this.config, r = this.state;
|
|
1037
1037
|
if (e.buttons != null && (Array.isArray(t.pointerButtons) ? !t.pointerButtons.includes(e.buttons) : t.pointerButtons !== -1 && t.pointerButtons !== e.buttons)) return;
|
|
1038
1038
|
const s = this.ctrl.setEventIds(e);
|
|
1039
|
-
t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId = cn(e), r._pointerActive = !0, this.computeValues(
|
|
1039
|
+
t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId = cn(e), r._pointerActive = !0, this.computeValues(Wn(e)), this.computeInitial(), t.preventScrollAxis && ir(e) !== "mouse" ? (r._active = !1, this.setupScrollPrevention(e)) : t.delay > 0 ? (this.setupDelayTrigger(e), t.triggerAllEvents && (this.compute(e), this.emit())) : this.startPointerDrag(e));
|
|
1040
1040
|
}
|
|
1041
1041
|
startPointerDrag(e) {
|
|
1042
1042
|
const t = this.state;
|
|
@@ -1047,7 +1047,7 @@ class ws extends bs {
|
|
|
1047
1047
|
if (!t._pointerActive) return;
|
|
1048
1048
|
const s = cn(e);
|
|
1049
1049
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
1050
|
-
const o =
|
|
1050
|
+
const o = Wn(e);
|
|
1051
1051
|
if (document.pointerLockElement === e.target ? t._delta = [e.movementX, e.movementY] : (t._delta = he.sub(o, t._values), this.computeValues(o)), he.addTo(t._movement, t._delta), this.compute(e), t._delayed && t.intentional) {
|
|
1052
1052
|
this.timeoutStore.remove("dragDelay"), t.active = !1, this.startPointerDrag(e);
|
|
1053
1053
|
return;
|
|
@@ -1081,10 +1081,10 @@ class ws extends bs {
|
|
|
1081
1081
|
if (t.tap = o <= r.tapsThreshold && i <= r.tapsThreshold, t.tap && r.filterTaps)
|
|
1082
1082
|
t._force = !0;
|
|
1083
1083
|
else {
|
|
1084
|
-
const [c,
|
|
1085
|
-
if (t.elapsedTime <
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1084
|
+
const [c, l] = t._delta, [u, a] = t._movement, [h, f] = r.swipe.velocity, [m, g] = r.swipe.distance, b = r.swipe.duration;
|
|
1085
|
+
if (t.elapsedTime < b) {
|
|
1086
|
+
const v = Math.abs(c / t.timeDelta), w = Math.abs(l / t.timeDelta);
|
|
1087
|
+
v > h && Math.abs(u) > m && (t.swipe[0] = Math.sign(c)), w > f && Math.abs(a) > g && (t.swipe[1] = Math.sign(l));
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
1090
|
this.emit();
|
|
@@ -1111,7 +1111,7 @@ class ws extends bs {
|
|
|
1111
1111
|
this.state._preventScroll && e.cancelable && e.preventDefault();
|
|
1112
1112
|
}
|
|
1113
1113
|
setupScrollPrevention(e) {
|
|
1114
|
-
this.state._preventScroll = !1,
|
|
1114
|
+
this.state._preventScroll = !1, ys(e);
|
|
1115
1115
|
const t = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
|
|
1116
1116
|
passive: !1
|
|
1117
1117
|
});
|
|
@@ -1123,14 +1123,14 @@ class ws extends bs {
|
|
|
1123
1123
|
}, this.config.delay);
|
|
1124
1124
|
}
|
|
1125
1125
|
keyDown(e) {
|
|
1126
|
-
const t =
|
|
1126
|
+
const t = Vn[e.key];
|
|
1127
1127
|
if (t) {
|
|
1128
1128
|
const r = this.state, s = e.shiftKey ? 10 : e.altKey ? 0.1 : 1;
|
|
1129
1129
|
this.start(e), r._delta = t(this.config.keyboardDisplacement, s), r._keyboardActive = !0, he.addTo(r._movement, r._delta), this.compute(e), this.emit();
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
1132
|
keyUp(e) {
|
|
1133
|
-
e.key in
|
|
1133
|
+
e.key in Vn && (this.state._keyboardActive = !1, this.setActive(), this.compute(e), this.emit());
|
|
1134
1134
|
}
|
|
1135
1135
|
bind(e) {
|
|
1136
1136
|
const t = this.config.device;
|
|
@@ -1140,23 +1140,23 @@ class ws extends bs {
|
|
|
1140
1140
|
});
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1143
|
+
function ys(n) {
|
|
1144
1144
|
"persist" in n && typeof n.persist == "function" && n.persist();
|
|
1145
1145
|
}
|
|
1146
1146
|
const Mt = typeof window < "u" && window.document && window.document.createElement;
|
|
1147
|
-
function
|
|
1147
|
+
function ar() {
|
|
1148
1148
|
return Mt && "ontouchstart" in window;
|
|
1149
1149
|
}
|
|
1150
|
-
function ys() {
|
|
1151
|
-
return ir() || Mt && window.navigator.maxTouchPoints > 1;
|
|
1152
|
-
}
|
|
1153
1150
|
function Es() {
|
|
1154
|
-
return Mt &&
|
|
1151
|
+
return ar() || Mt && window.navigator.maxTouchPoints > 1;
|
|
1155
1152
|
}
|
|
1156
1153
|
function Rs() {
|
|
1157
|
-
return Mt && "
|
|
1154
|
+
return Mt && "onpointerdown" in window;
|
|
1158
1155
|
}
|
|
1159
1156
|
function xs() {
|
|
1157
|
+
return Mt && "exitPointerLock" in window.document;
|
|
1158
|
+
}
|
|
1159
|
+
function Cs() {
|
|
1160
1160
|
try {
|
|
1161
1161
|
return "constructor" in GestureEvent;
|
|
1162
1162
|
} catch {
|
|
@@ -1165,16 +1165,16 @@ function xs() {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
const we = {
|
|
1167
1167
|
isBrowser: Mt,
|
|
1168
|
-
gesture:
|
|
1169
|
-
touch:
|
|
1170
|
-
touchscreen:
|
|
1171
|
-
pointer:
|
|
1172
|
-
pointerLock:
|
|
1173
|
-
},
|
|
1168
|
+
gesture: Cs(),
|
|
1169
|
+
touch: ar(),
|
|
1170
|
+
touchscreen: Es(),
|
|
1171
|
+
pointer: Rs(),
|
|
1172
|
+
pointerLock: xs()
|
|
1173
|
+
}, As = 250, Ts = 180, Ps = 0.5, Ds = 50, Ls = 250, Os = 10, Un = {
|
|
1174
1174
|
mouse: 0,
|
|
1175
1175
|
touch: 0,
|
|
1176
1176
|
pen: 8
|
|
1177
|
-
},
|
|
1177
|
+
}, lr = te(te({}, Ot), {}, {
|
|
1178
1178
|
device(n, e, {
|
|
1179
1179
|
pointer: {
|
|
1180
1180
|
touch: t = !1,
|
|
@@ -1187,7 +1187,7 @@ const we = {
|
|
|
1187
1187
|
preventScrollAxis(n, e, {
|
|
1188
1188
|
preventScroll: t
|
|
1189
1189
|
}) {
|
|
1190
|
-
if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ?
|
|
1190
|
+
if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ? As : void 0, !(!we.touchscreen || t === !1))
|
|
1191
1191
|
return n || (t !== void 0 ? "y" : void 0);
|
|
1192
1192
|
},
|
|
1193
1193
|
pointerCapture(n, e, {
|
|
@@ -1208,9 +1208,9 @@ const we = {
|
|
|
1208
1208
|
return this.filterTaps = t, this.tapsThreshold = r, o;
|
|
1209
1209
|
},
|
|
1210
1210
|
swipe({
|
|
1211
|
-
velocity: n =
|
|
1212
|
-
distance: e =
|
|
1213
|
-
duration: t =
|
|
1211
|
+
velocity: n = Ps,
|
|
1212
|
+
distance: e = Ds,
|
|
1213
|
+
duration: t = Ls
|
|
1214
1214
|
} = {}) {
|
|
1215
1215
|
return {
|
|
1216
1216
|
velocity: this.transform(he.toVector(n)),
|
|
@@ -1229,13 +1229,13 @@ const we = {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
},
|
|
1231
1231
|
axisThreshold(n) {
|
|
1232
|
-
return n ?
|
|
1232
|
+
return n ? te(te({}, Un), n) : Un;
|
|
1233
1233
|
},
|
|
1234
|
-
keyboardDisplacement(n =
|
|
1234
|
+
keyboardDisplacement(n = Os) {
|
|
1235
1235
|
return n;
|
|
1236
1236
|
}
|
|
1237
1237
|
});
|
|
1238
|
-
process.env.NODE_ENV === "development" && Object.assign(
|
|
1238
|
+
process.env.NODE_ENV === "development" && Object.assign(lr, {
|
|
1239
1239
|
useTouch(n) {
|
|
1240
1240
|
if (n !== void 0)
|
|
1241
1241
|
throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");
|
|
@@ -1262,7 +1262,7 @@ process.env.NODE_ENV === "development" && Object.assign(cr, {
|
|
|
1262
1262
|
return NaN;
|
|
1263
1263
|
}
|
|
1264
1264
|
});
|
|
1265
|
-
|
|
1265
|
+
te(te({}, bn), {}, {
|
|
1266
1266
|
device(n, e, {
|
|
1267
1267
|
shared: t,
|
|
1268
1268
|
pointer: {
|
|
@@ -1281,13 +1281,13 @@ ee(ee({}, vn), {}, {
|
|
|
1281
1281
|
angleBounds: r = {}
|
|
1282
1282
|
}) {
|
|
1283
1283
|
const s = (i) => {
|
|
1284
|
-
const c =
|
|
1284
|
+
const c = jn(Gt(t, i), {
|
|
1285
1285
|
min: -1 / 0,
|
|
1286
1286
|
max: 1 / 0
|
|
1287
1287
|
});
|
|
1288
1288
|
return [c.min, c.max];
|
|
1289
1289
|
}, o = (i) => {
|
|
1290
|
-
const c =
|
|
1290
|
+
const c = jn(Gt(r, i), {
|
|
1291
1291
|
min: -1 / 0,
|
|
1292
1292
|
max: 1 / 0
|
|
1293
1293
|
});
|
|
@@ -1305,31 +1305,31 @@ ee(ee({}, vn), {}, {
|
|
|
1305
1305
|
return n;
|
|
1306
1306
|
}
|
|
1307
1307
|
});
|
|
1308
|
-
|
|
1308
|
+
te(te({}, Ot), {}, {
|
|
1309
1309
|
mouseOnly: (n = !0) => n
|
|
1310
1310
|
});
|
|
1311
|
-
|
|
1311
|
+
te(te({}, Ot), {}, {
|
|
1312
1312
|
mouseOnly: (n = !0) => n
|
|
1313
1313
|
});
|
|
1314
|
-
const
|
|
1315
|
-
function
|
|
1316
|
-
|
|
1314
|
+
const ur = /* @__PURE__ */ new Map(), mn = /* @__PURE__ */ new Map();
|
|
1315
|
+
function Ms(n) {
|
|
1316
|
+
ur.set(n.key, n.engine), mn.set(n.key, n.resolver);
|
|
1317
1317
|
}
|
|
1318
|
-
const
|
|
1318
|
+
const Ns = {
|
|
1319
1319
|
key: "drag",
|
|
1320
|
-
engine:
|
|
1321
|
-
resolver:
|
|
1320
|
+
engine: Ss,
|
|
1321
|
+
resolver: lr
|
|
1322
1322
|
};
|
|
1323
|
-
function
|
|
1323
|
+
function Is(n, e) {
|
|
1324
1324
|
if (n == null) return {};
|
|
1325
1325
|
var t = {}, r = Object.keys(n), s, o;
|
|
1326
1326
|
for (o = 0; o < r.length; o++)
|
|
1327
1327
|
s = r[o], !(e.indexOf(s) >= 0) && (t[s] = n[s]);
|
|
1328
1328
|
return t;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function ks(n, e) {
|
|
1331
1331
|
if (n == null) return {};
|
|
1332
|
-
var t =
|
|
1332
|
+
var t = Is(n, e), r, s;
|
|
1333
1333
|
if (Object.getOwnPropertySymbols) {
|
|
1334
1334
|
var o = Object.getOwnPropertySymbols(n);
|
|
1335
1335
|
for (s = 0; s < o.length; s++)
|
|
@@ -1337,7 +1337,7 @@ function Is(n, e) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
return t;
|
|
1339
1339
|
}
|
|
1340
|
-
const
|
|
1340
|
+
const Ws = {
|
|
1341
1341
|
target(n) {
|
|
1342
1342
|
if (n)
|
|
1343
1343
|
return () => "current" in n ? n.current : n;
|
|
@@ -1360,7 +1360,7 @@ const ks = {
|
|
|
1360
1360
|
transform(n) {
|
|
1361
1361
|
return n;
|
|
1362
1362
|
}
|
|
1363
|
-
},
|
|
1363
|
+
}, js = ["target", "eventOptions", "window", "enabled", "transform"];
|
|
1364
1364
|
function Ut(n = {}, e) {
|
|
1365
1365
|
const t = {};
|
|
1366
1366
|
for (const [r, s] of Object.entries(e))
|
|
@@ -1381,57 +1381,57 @@ function Ut(n = {}, e) {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
return t;
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function zs(n, e, t = {}) {
|
|
1385
1385
|
const r = n, {
|
|
1386
1386
|
target: s,
|
|
1387
1387
|
eventOptions: o,
|
|
1388
1388
|
window: i,
|
|
1389
1389
|
enabled: c,
|
|
1390
|
-
transform:
|
|
1391
|
-
} = r, u =
|
|
1390
|
+
transform: l
|
|
1391
|
+
} = r, u = ks(r, js);
|
|
1392
1392
|
if (t.shared = Ut({
|
|
1393
1393
|
target: s,
|
|
1394
1394
|
eventOptions: o,
|
|
1395
1395
|
window: i,
|
|
1396
1396
|
enabled: c,
|
|
1397
|
-
transform:
|
|
1398
|
-
},
|
|
1399
|
-
const
|
|
1400
|
-
t[e] = Ut(
|
|
1397
|
+
transform: l
|
|
1398
|
+
}, Ws), e) {
|
|
1399
|
+
const a = mn.get(e);
|
|
1400
|
+
t[e] = Ut(te({
|
|
1401
1401
|
shared: t.shared
|
|
1402
|
-
}, u),
|
|
1402
|
+
}, u), a);
|
|
1403
1403
|
} else
|
|
1404
|
-
for (const
|
|
1405
|
-
const h =
|
|
1404
|
+
for (const a in u) {
|
|
1405
|
+
const h = mn.get(a);
|
|
1406
1406
|
if (h)
|
|
1407
|
-
t[
|
|
1407
|
+
t[a] = Ut(te({
|
|
1408
1408
|
shared: t.shared
|
|
1409
|
-
}, u[
|
|
1410
|
-
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(
|
|
1411
|
-
if (
|
|
1409
|
+
}, u[a]), h);
|
|
1410
|
+
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(a)) {
|
|
1411
|
+
if (a === "domTarget")
|
|
1412
1412
|
throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
|
|
1413
|
-
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.`);
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
1416
|
return t;
|
|
1417
1417
|
}
|
|
1418
|
-
class
|
|
1418
|
+
class fr {
|
|
1419
1419
|
constructor(e, t) {
|
|
1420
1420
|
ve(this, "_listeners", /* @__PURE__ */ new Set()), this._ctrl = e, this._gestureKey = t;
|
|
1421
1421
|
}
|
|
1422
1422
|
add(e, t, r, s, o) {
|
|
1423
|
-
const i = this._listeners, c =
|
|
1423
|
+
const i = this._listeners, c = ls(t, r), l = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = te(te({}, l), o);
|
|
1424
1424
|
e.addEventListener(c, s, u);
|
|
1425
|
-
const
|
|
1426
|
-
e.removeEventListener(c, s, u), i.delete(
|
|
1425
|
+
const a = () => {
|
|
1426
|
+
e.removeEventListener(c, s, u), i.delete(a);
|
|
1427
1427
|
};
|
|
1428
|
-
return i.add(
|
|
1428
|
+
return i.add(a), a;
|
|
1429
1429
|
}
|
|
1430
1430
|
clean() {
|
|
1431
1431
|
this._listeners.forEach((e) => e()), this._listeners.clear();
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
|
-
class
|
|
1434
|
+
class Fs {
|
|
1435
1435
|
constructor() {
|
|
1436
1436
|
ve(this, "_timeouts", /* @__PURE__ */ new Map());
|
|
1437
1437
|
}
|
|
@@ -1446,20 +1446,20 @@ class zs {
|
|
|
1446
1446
|
this._timeouts.forEach((e) => void window.clearTimeout(e)), this._timeouts.clear();
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
|
-
class
|
|
1449
|
+
class Vs {
|
|
1450
1450
|
constructor(e) {
|
|
1451
|
-
ve(this, "gestures", /* @__PURE__ */ new Set()), ve(this, "_targetEventStore", new
|
|
1451
|
+
ve(this, "gestures", /* @__PURE__ */ new Set()), ve(this, "_targetEventStore", new fr(this)), ve(this, "gestureEventStores", {}), ve(this, "gestureTimeoutStores", {}), ve(this, "handlers", {}), ve(this, "config", {}), ve(this, "pointerIds", /* @__PURE__ */ new Set()), ve(this, "touchIds", /* @__PURE__ */ new Set()), ve(this, "state", {
|
|
1452
1452
|
shared: {
|
|
1453
1453
|
shiftKey: !1,
|
|
1454
1454
|
metaKey: !1,
|
|
1455
1455
|
ctrlKey: !1,
|
|
1456
1456
|
altKey: !1
|
|
1457
1457
|
}
|
|
1458
|
-
}),
|
|
1458
|
+
}), Us(this, e);
|
|
1459
1459
|
}
|
|
1460
1460
|
setEventIds(e) {
|
|
1461
1461
|
if (Zt(e))
|
|
1462
|
-
return this.touchIds = new Set(
|
|
1462
|
+
return this.touchIds = new Set(ds(e)), this.touchIds;
|
|
1463
1463
|
if ("pointerId" in e)
|
|
1464
1464
|
return e.type === "pointerup" || e.type === "pointercancel" ? this.pointerIds.delete(e.pointerId) : e.type === "pointerdown" && this.pointerIds.add(e.pointerId), this.pointerIds;
|
|
1465
1465
|
}
|
|
@@ -1467,7 +1467,7 @@ class Fs {
|
|
|
1467
1467
|
this.handlers = e, this.nativeHandlers = t;
|
|
1468
1468
|
}
|
|
1469
1469
|
applyConfig(e, t) {
|
|
1470
|
-
this.config =
|
|
1470
|
+
this.config = zs(e, t, this.config);
|
|
1471
1471
|
}
|
|
1472
1472
|
clean() {
|
|
1473
1473
|
this._targetEventStore.clean();
|
|
@@ -1483,49 +1483,49 @@ class Fs {
|
|
|
1483
1483
|
if (!(t.target && (s = t.target(), !s))) {
|
|
1484
1484
|
if (t.enabled) {
|
|
1485
1485
|
for (const i of this.gestures) {
|
|
1486
|
-
const c = this.config[i],
|
|
1486
|
+
const c = this.config[i], l = $n(r, c.eventOptions, !!s);
|
|
1487
1487
|
if (c.enabled) {
|
|
1488
|
-
const u =
|
|
1489
|
-
new u(this, e, i).bind(
|
|
1488
|
+
const u = ur.get(i);
|
|
1489
|
+
new u(this, e, i).bind(l);
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
|
-
const o =
|
|
1492
|
+
const o = $n(r, t.eventOptions, !!s);
|
|
1493
1493
|
for (const i in this.nativeHandlers)
|
|
1494
|
-
o(i, "", (c) => this.nativeHandlers[i](
|
|
1494
|
+
o(i, "", (c) => this.nativeHandlers[i](te(te({}, this.state.shared), {}, {
|
|
1495
1495
|
event: c,
|
|
1496
1496
|
args: e
|
|
1497
1497
|
})), void 0, !0);
|
|
1498
1498
|
}
|
|
1499
1499
|
for (const o in r)
|
|
1500
|
-
r[o] =
|
|
1500
|
+
r[o] = ps(...r[o]);
|
|
1501
1501
|
if (!s) return r;
|
|
1502
1502
|
for (const o in r) {
|
|
1503
1503
|
const {
|
|
1504
1504
|
device: i,
|
|
1505
1505
|
capture: c,
|
|
1506
|
-
passive:
|
|
1507
|
-
} =
|
|
1506
|
+
passive: l
|
|
1507
|
+
} = as(o);
|
|
1508
1508
|
this._targetEventStore.add(s, i, "", r[o], {
|
|
1509
1509
|
capture: c,
|
|
1510
|
-
passive:
|
|
1510
|
+
passive: l
|
|
1511
1511
|
});
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
1516
|
function Rt(n, e) {
|
|
1517
|
-
n.gestures.add(e), n.gestureEventStores[e] = new
|
|
1517
|
+
n.gestures.add(e), n.gestureEventStores[e] = new fr(n, e), n.gestureTimeoutStores[e] = new Fs();
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function Us(n, e) {
|
|
1520
1520
|
e.drag && Rt(n, "drag"), e.wheel && Rt(n, "wheel"), e.scroll && Rt(n, "scroll"), e.move && Rt(n, "move"), e.pinch && Rt(n, "pinch"), e.hover && Rt(n, "hover");
|
|
1521
1521
|
}
|
|
1522
|
-
const
|
|
1523
|
-
var
|
|
1524
|
-
const
|
|
1525
|
-
let f = c ? r :
|
|
1522
|
+
const $n = (n, e, t) => (r, s, o, i = {}, c = !1) => {
|
|
1523
|
+
var l, u;
|
|
1524
|
+
const a = (l = i.capture) !== null && l !== void 0 ? l : e.capture, h = (u = i.passive) !== null && u !== void 0 ? u : e.passive;
|
|
1525
|
+
let f = c ? r : is(r, s, a);
|
|
1526
1526
|
t && h && (f += "Passive"), n[f] = n[f] || [], n[f].push(o);
|
|
1527
1527
|
};
|
|
1528
|
-
function
|
|
1528
|
+
function $s(n, e) {
|
|
1529
1529
|
if (typeof n != "object" || n === null) return n;
|
|
1530
1530
|
var t = n[Symbol.toPrimitive];
|
|
1531
1531
|
if (t !== void 0) {
|
|
@@ -1535,19 +1535,19 @@ function Us(n, e) {
|
|
|
1535
1535
|
}
|
|
1536
1536
|
return (e === "string" ? String : Number)(n);
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1539
|
-
var e =
|
|
1538
|
+
function Hs(n) {
|
|
1539
|
+
var e = $s(n, "string");
|
|
1540
1540
|
return typeof e == "symbol" ? e : String(e);
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1543
|
-
return e =
|
|
1542
|
+
function Bs(n, e, t) {
|
|
1543
|
+
return e = Hs(e), e in n ? Object.defineProperty(n, e, {
|
|
1544
1544
|
value: t,
|
|
1545
1545
|
enumerable: !0,
|
|
1546
1546
|
configurable: !0,
|
|
1547
1547
|
writable: !0
|
|
1548
1548
|
}) : n[e] = t, n;
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function Hn(n, e) {
|
|
1551
1551
|
var t = Object.keys(n);
|
|
1552
1552
|
if (Object.getOwnPropertySymbols) {
|
|
1553
1553
|
var r = Object.getOwnPropertySymbols(n);
|
|
@@ -1560,17 +1560,17 @@ function Un(n, e) {
|
|
|
1560
1560
|
function Ft(n) {
|
|
1561
1561
|
for (var e = 1; e < arguments.length; e++) {
|
|
1562
1562
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
1563
|
-
e % 2 ?
|
|
1564
|
-
|
|
1565
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) :
|
|
1563
|
+
e % 2 ? Hn(Object(t), !0).forEach(function(r) {
|
|
1564
|
+
Bs(n, r, t[r]);
|
|
1565
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Hn(Object(t)).forEach(function(r) {
|
|
1566
1566
|
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
1567
1567
|
});
|
|
1568
1568
|
}
|
|
1569
1569
|
return n;
|
|
1570
1570
|
}
|
|
1571
|
-
class
|
|
1571
|
+
class Ys {
|
|
1572
1572
|
constructor(e, t, r, s, o) {
|
|
1573
|
-
this._target = e, this._gestureKey = s, this._ctrl = new
|
|
1573
|
+
this._target = e, this._gestureKey = s, this._ctrl = new Vs(t), this._ctrl.applyHandlers(t, o), this._ctrl.applyConfig(Ft(Ft({}, r), {}, {
|
|
1574
1574
|
target: e
|
|
1575
1575
|
}), s), this._ctrl.effect();
|
|
1576
1576
|
}
|
|
@@ -1584,22 +1584,22 @@ class Bs {
|
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
1586
|
const an = function(e, t, r) {
|
|
1587
|
-
return
|
|
1587
|
+
return Ms(Ns), new Ys(e, {
|
|
1588
1588
|
drag: t
|
|
1589
1589
|
}, r || {}, "drag");
|
|
1590
1590
|
};
|
|
1591
|
-
function
|
|
1591
|
+
function Xs(...n) {
|
|
1592
1592
|
const e = n.filter(Boolean);
|
|
1593
1593
|
return e.length <= 1 ? e[0] || null : function(r) {
|
|
1594
1594
|
for (const s of e)
|
|
1595
1595
|
typeof s == "function" ? s(r) : s && (s.current = r);
|
|
1596
1596
|
};
|
|
1597
1597
|
}
|
|
1598
|
-
const
|
|
1598
|
+
const dr = ({
|
|
1599
1599
|
children: n,
|
|
1600
1600
|
...e
|
|
1601
1601
|
}) => {
|
|
1602
|
-
const t = nt.Children.only(n), r =
|
|
1602
|
+
const t = nt.Children.only(n), r = Gs(t), s = t.props || {}, o = s.style || {}, i = {
|
|
1603
1603
|
...e,
|
|
1604
1604
|
...s,
|
|
1605
1605
|
// child's own props take precedence
|
|
@@ -1607,15 +1607,27 @@ const ur = ({
|
|
|
1607
1607
|
...e.style ?? {},
|
|
1608
1608
|
...o
|
|
1609
1609
|
},
|
|
1610
|
-
ref:
|
|
1610
|
+
ref: Xs(r, e.ref)
|
|
1611
1611
|
};
|
|
1612
1612
|
return nt.cloneElement(t, i);
|
|
1613
1613
|
};
|
|
1614
|
-
function
|
|
1614
|
+
function Gs(n) {
|
|
1615
1615
|
let e = Object.getOwnPropertyDescriptor(n, "ref")?.get;
|
|
1616
1616
|
return e && "isReactWarning" in e && e.isReactWarning ? n.props.ref : n.props.ref || n.ref;
|
|
1617
1617
|
}
|
|
1618
|
-
const
|
|
1618
|
+
const ln = (n, e, t, r, s) => ({
|
|
1619
|
+
target: n,
|
|
1620
|
+
dx: e[0],
|
|
1621
|
+
dy: e[1],
|
|
1622
|
+
clientX: t[0],
|
|
1623
|
+
clientY: t[1],
|
|
1624
|
+
...r && {
|
|
1625
|
+
edges: r
|
|
1626
|
+
},
|
|
1627
|
+
...s && {
|
|
1628
|
+
deltaRect: s
|
|
1629
|
+
}
|
|
1630
|
+
}), Ks = (n, e, t) => n ? n === e || n === t || (e?.contains(n) ?? !1) || (t?.contains(n) ?? !1) : !1, qs = ({
|
|
1619
1631
|
children: n,
|
|
1620
1632
|
interactRef: e,
|
|
1621
1633
|
draggable: t,
|
|
@@ -1623,101 +1635,87 @@ const Gs = ({
|
|
|
1623
1635
|
draggableOptions: s,
|
|
1624
1636
|
resizableOptions: o
|
|
1625
1637
|
}) => {
|
|
1626
|
-
const i =
|
|
1638
|
+
const i = ee(null), c = ee(void 0), l = ee(void 0), u = ee(void 0), a = ee(void 0), h = ee(void 0), f = ee(null), m = ee(null), g = ee(void 0), b = ee(void 0);
|
|
1627
1639
|
et(() => {
|
|
1628
|
-
c.current = s,
|
|
1640
|
+
c.current = s, l.current = o;
|
|
1629
1641
|
}, [s, o]);
|
|
1630
|
-
const
|
|
1631
|
-
|
|
1642
|
+
const v = Lr(() => {
|
|
1643
|
+
const w = i.current;
|
|
1644
|
+
if (!w) return;
|
|
1645
|
+
u.current?.destroy(), a.current?.destroy(), h.current?.destroy(), u.current = void 0, a.current = void 0, h.current = void 0;
|
|
1646
|
+
const _ = l.current?.edges?.left, S = l.current?.edges?.right;
|
|
1647
|
+
_ !== g.current && (g.current = _, f.current = _ ? w.querySelector(_) : null), S !== b.current && (b.current = S, m.current = S ? w.querySelector(S) : null), t && c.current && (u.current = new an(w, (T) => {
|
|
1632
1648
|
const {
|
|
1633
|
-
active:
|
|
1634
|
-
delta:
|
|
1635
|
-
xy:
|
|
1636
|
-
event:
|
|
1637
|
-
first:
|
|
1638
|
-
last:
|
|
1639
|
-
} =
|
|
1640
|
-
if (
|
|
1649
|
+
active: x,
|
|
1650
|
+
delta: C,
|
|
1651
|
+
xy: P,
|
|
1652
|
+
event: E,
|
|
1653
|
+
first: D,
|
|
1654
|
+
last: L
|
|
1655
|
+
} = T;
|
|
1656
|
+
if (Ks(E?.target, f.current, m.current))
|
|
1641
1657
|
return;
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1644
|
-
dx: S[0],
|
|
1645
|
-
dy: S[1],
|
|
1646
|
-
clientX: _[0],
|
|
1647
|
-
clientY: _[1]
|
|
1648
|
-
};
|
|
1649
|
-
y ? c.current?.onstart?.(R) : C ? c.current?.onend?.(R) : g && c.current?.onmove?.(R);
|
|
1658
|
+
const k = ln(w, C, P);
|
|
1659
|
+
D ? c.current?.onstart?.(k) : L ? c.current?.onend?.(k) : x && c.current?.onmove?.(k);
|
|
1650
1660
|
}, {
|
|
1651
1661
|
axis: c.current?.lockAxis === "x" ? "x" : void 0,
|
|
1652
1662
|
threshold: 0,
|
|
1653
1663
|
pointer: {
|
|
1654
1664
|
capture: !0
|
|
1655
1665
|
}
|
|
1656
|
-
}))
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
clientY: _[1],
|
|
1669
|
-
edges: {
|
|
1666
|
+
}));
|
|
1667
|
+
const y = l.current;
|
|
1668
|
+
if (r && y?.edges) {
|
|
1669
|
+
const T = y.edges;
|
|
1670
|
+
T.left && f.current && (a.current = new an(f.current, (x) => {
|
|
1671
|
+
const {
|
|
1672
|
+
active: C,
|
|
1673
|
+
delta: P,
|
|
1674
|
+
xy: E,
|
|
1675
|
+
first: D,
|
|
1676
|
+
last: L
|
|
1677
|
+
} = x, k = ln(w, P, E, {
|
|
1670
1678
|
left: !0
|
|
1679
|
+
}, {
|
|
1680
|
+
left: P[0]
|
|
1681
|
+
});
|
|
1682
|
+
D ? y.onstart?.(k) : L ? y.onend?.(k) : C && y.onmove?.(k);
|
|
1683
|
+
}, {
|
|
1684
|
+
pointer: {
|
|
1685
|
+
capture: !0
|
|
1671
1686
|
},
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
threshold: 0
|
|
1682
|
-
})), a.current.edges.right && (m.current || (m.current = i.current.querySelector(a.current.edges.right)), h.current = new an(m.current, (v) => {
|
|
1683
|
-
const {
|
|
1684
|
-
active: g,
|
|
1685
|
-
delta: S,
|
|
1686
|
-
xy: _,
|
|
1687
|
-
first: w,
|
|
1688
|
-
last: y
|
|
1689
|
-
} = v, C = {
|
|
1690
|
-
target: i.current,
|
|
1691
|
-
dx: S[0],
|
|
1692
|
-
dy: 0,
|
|
1693
|
-
clientX: _[0],
|
|
1694
|
-
clientY: _[1],
|
|
1695
|
-
edges: {
|
|
1687
|
+
threshold: 0
|
|
1688
|
+
})), T.right && m.current && (h.current = new an(m.current, (x) => {
|
|
1689
|
+
const {
|
|
1690
|
+
active: C,
|
|
1691
|
+
delta: P,
|
|
1692
|
+
xy: E,
|
|
1693
|
+
first: D,
|
|
1694
|
+
last: L
|
|
1695
|
+
} = x, k = ln(w, P, E, {
|
|
1696
1696
|
right: !0
|
|
1697
|
+
}, {
|
|
1698
|
+
right: P[0]
|
|
1699
|
+
});
|
|
1700
|
+
D ? y.onstart?.(k) : L ? y.onend?.(k) : C && y.onmove?.(k);
|
|
1701
|
+
}, {
|
|
1702
|
+
pointer: {
|
|
1703
|
+
capture: !0
|
|
1697
1704
|
},
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
};
|
|
1702
|
-
y ? a.current?.onend?.(C) : w ? a.current?.onstart?.(C) : g && a.current?.onmove?.(C);
|
|
1703
|
-
}, {
|
|
1704
|
-
pointer: {
|
|
1705
|
-
capture: !0
|
|
1706
|
-
},
|
|
1707
|
-
threshold: 0
|
|
1708
|
-
}))));
|
|
1705
|
+
threshold: 0
|
|
1706
|
+
}));
|
|
1707
|
+
}
|
|
1709
1708
|
});
|
|
1710
1709
|
return et(() => {
|
|
1711
1710
|
if (!i.current) return;
|
|
1712
|
-
|
|
1713
|
-
const v = {
|
|
1711
|
+
const w = {
|
|
1714
1712
|
target: i.current,
|
|
1715
1713
|
unset: () => {
|
|
1716
|
-
u.current?.destroy(),
|
|
1714
|
+
u.current?.destroy(), a.current?.destroy(), h.current?.destroy();
|
|
1717
1715
|
}
|
|
1718
1716
|
};
|
|
1719
|
-
e && (e.current =
|
|
1720
|
-
}, [t, r
|
|
1717
|
+
e && (e.current = w), v();
|
|
1718
|
+
}, [t, r]), dr({
|
|
1721
1719
|
children: n,
|
|
1722
1720
|
ref: i,
|
|
1723
1721
|
draggable: !1,
|
|
@@ -1727,243 +1725,243 @@ const Gs = ({
|
|
|
1727
1725
|
}
|
|
1728
1726
|
}
|
|
1729
1727
|
});
|
|
1730
|
-
},
|
|
1728
|
+
}, hr = nt.forwardRef((n, e) => {
|
|
1731
1729
|
const t = ze.c(70), {
|
|
1732
1730
|
children: r,
|
|
1733
1731
|
edges: s,
|
|
1734
1732
|
left: o,
|
|
1735
1733
|
width: i,
|
|
1736
1734
|
start: c,
|
|
1737
|
-
grid:
|
|
1735
|
+
grid: l,
|
|
1738
1736
|
getBounds: u,
|
|
1739
|
-
enableResizing:
|
|
1737
|
+
enableResizing: a,
|
|
1740
1738
|
enableDragging: h,
|
|
1741
1739
|
adsorptionDistance: f,
|
|
1742
1740
|
adsorptionPositions: m,
|
|
1743
|
-
onResizeStart:
|
|
1744
|
-
onResize:
|
|
1745
|
-
onResizeEnd:
|
|
1746
|
-
onDragStart:
|
|
1741
|
+
onResizeStart: g,
|
|
1742
|
+
onResize: b,
|
|
1743
|
+
onResizeEnd: v,
|
|
1744
|
+
onDragStart: w,
|
|
1747
1745
|
onDragEnd: _,
|
|
1748
|
-
onDrag:
|
|
1746
|
+
onDrag: S,
|
|
1749
1747
|
parentRef: y,
|
|
1750
|
-
autoScroll:
|
|
1751
|
-
} = n, x = c === void 0 ? Jt : c,
|
|
1752
|
-
let
|
|
1753
|
-
t[0] !== m ? (
|
|
1754
|
-
const
|
|
1748
|
+
autoScroll: T
|
|
1749
|
+
} = n, x = c === void 0 ? Jt : c, C = l === void 0 ? fn : l, P = u === void 0 ? Js : u, E = a === void 0 ? !0 : a, D = h === void 0 ? !0 : h, L = f === void 0 ? dn : f;
|
|
1750
|
+
let k;
|
|
1751
|
+
t[0] !== m ? (k = m === void 0 ? [] : m, t[0] = m, t[1] = k) : k = t[1];
|
|
1752
|
+
const F = k, K = T === void 0 ? !0 : T, O = ee(void 0), I = ee(0), G = ee(!1), {
|
|
1755
1753
|
initAutoScroll: ue,
|
|
1756
1754
|
stopAutoScroll: fe,
|
|
1757
1755
|
dealDragAutoScroll: me,
|
|
1758
1756
|
dealResizeAutoScroll: d
|
|
1759
|
-
} =
|
|
1760
|
-
let
|
|
1761
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1762
|
-
const
|
|
1757
|
+
} = Qr(y);
|
|
1758
|
+
let A, V;
|
|
1759
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (A = () => {
|
|
1760
|
+
const W = O.current;
|
|
1763
1761
|
return () => {
|
|
1764
|
-
|
|
1762
|
+
W?.unset();
|
|
1765
1763
|
};
|
|
1766
|
-
},
|
|
1764
|
+
}, V = [], t[2] = A, t[3] = V) : (A = t[2], V = t[3]), et(A, V);
|
|
1767
1765
|
let H;
|
|
1768
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (H = (
|
|
1766
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (H = (W, J) => {
|
|
1769
1767
|
const Y = J === void 0 ? !0 : J;
|
|
1770
|
-
if (!
|
|
1768
|
+
if (!O.current || !O.current.target)
|
|
1771
1769
|
return;
|
|
1772
|
-
Y && (
|
|
1773
|
-
const
|
|
1774
|
-
|
|
1775
|
-
left:
|
|
1770
|
+
Y && (I.current = 0);
|
|
1771
|
+
const z = O.current.target;
|
|
1772
|
+
z.style.left = `${W}px`, Object.assign(z.dataset, {
|
|
1773
|
+
left: W
|
|
1776
1774
|
});
|
|
1777
1775
|
}, t[4] = H) : H = t[4];
|
|
1778
1776
|
const q = H;
|
|
1779
1777
|
let B;
|
|
1780
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (B = (
|
|
1778
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (B = (W, J) => {
|
|
1781
1779
|
const Y = J === void 0 ? !0 : J;
|
|
1782
|
-
if (!
|
|
1780
|
+
if (!O.current || !O.current.target)
|
|
1783
1781
|
return;
|
|
1784
|
-
Y && (
|
|
1785
|
-
const
|
|
1786
|
-
|
|
1787
|
-
width:
|
|
1782
|
+
Y && (I.current = 0);
|
|
1783
|
+
const z = O.current.target;
|
|
1784
|
+
z.style.width = `${W}px`, Object.assign(z.dataset, {
|
|
1785
|
+
width: W
|
|
1788
1786
|
});
|
|
1789
1787
|
}, t[5] = B) : B = t[5];
|
|
1790
|
-
const
|
|
1791
|
-
let
|
|
1792
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1793
|
-
if (!
|
|
1788
|
+
const U = B;
|
|
1789
|
+
let M;
|
|
1790
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (M = () => {
|
|
1791
|
+
if (!O.current?.target)
|
|
1794
1792
|
return 0;
|
|
1795
|
-
const
|
|
1796
|
-
return parseFloat(
|
|
1797
|
-
}, t[6] =
|
|
1798
|
-
const
|
|
1799
|
-
let
|
|
1800
|
-
t[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1801
|
-
if (!
|
|
1793
|
+
const W = O.current.target;
|
|
1794
|
+
return parseFloat(W?.dataset?.left || "0");
|
|
1795
|
+
}, t[6] = M) : M = t[6];
|
|
1796
|
+
const N = M;
|
|
1797
|
+
let $;
|
|
1798
|
+
t[7] === Symbol.for("react.memo_cache_sentinel") ? ($ = () => {
|
|
1799
|
+
if (!O.current?.target)
|
|
1802
1800
|
return 0;
|
|
1803
|
-
const
|
|
1804
|
-
return parseFloat(
|
|
1805
|
-
}, t[7] =
|
|
1806
|
-
const tn =
|
|
1801
|
+
const W = O.current.target;
|
|
1802
|
+
return parseFloat(W?.dataset?.width || "0");
|
|
1803
|
+
}, t[7] = $) : $ = t[7];
|
|
1804
|
+
const tn = $;
|
|
1807
1805
|
let ot, Fe;
|
|
1808
1806
|
t[8] !== i ? (ot = () => {
|
|
1809
|
-
if (!
|
|
1807
|
+
if (!O.current?.target)
|
|
1810
1808
|
return;
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1809
|
+
const W = O.current.target;
|
|
1810
|
+
U(typeof i > "u" ? W.offsetWidth : i, !1);
|
|
1813
1811
|
}, Fe = [i], t[8] = i, t[9] = ot, t[10] = Fe) : (ot = t[9], Fe = t[10]), et(ot, Fe);
|
|
1814
|
-
let
|
|
1815
|
-
t[11] !== o ? (
|
|
1812
|
+
let Te, Re;
|
|
1813
|
+
t[11] !== o ? (Te = () => {
|
|
1816
1814
|
q(o || 0, !1);
|
|
1817
|
-
}, Re = [o], t[11] = o, t[12] =
|
|
1815
|
+
}, Re = [o], t[11] = o, t[12] = Te, t[13] = Re) : (Te = t[12], Re = t[13]), et(Te, Re);
|
|
1818
1816
|
let Ve;
|
|
1819
1817
|
t[14] === Symbol.for("react.memo_cache_sentinel") ? (Ve = () => ({
|
|
1820
|
-
updateLeft: (
|
|
1821
|
-
updateWidth: (
|
|
1822
|
-
getLeft:
|
|
1818
|
+
updateLeft: (W) => q(W || 0, !1),
|
|
1819
|
+
updateWidth: (W) => U(W, !1),
|
|
1820
|
+
getLeft: N,
|
|
1823
1821
|
getWidth: tn
|
|
1824
|
-
}), t[14] = Ve) : Ve = t[14],
|
|
1822
|
+
}), t[14] = Ve) : Ve = t[14], Qn(e, Ve);
|
|
1825
1823
|
let Pe;
|
|
1826
|
-
t[15] !== ue || t[16] !==
|
|
1827
|
-
|
|
1828
|
-
}, t[15] = ue, t[16] =
|
|
1824
|
+
t[15] !== ue || t[16] !== w ? (Pe = () => {
|
|
1825
|
+
I.current = 0, G.current = !1, ue(), w && w();
|
|
1826
|
+
}, t[15] = ue, t[16] = w, t[17] = Pe) : Pe = t[17];
|
|
1829
1827
|
const De = Pe;
|
|
1830
1828
|
let Le;
|
|
1831
|
-
t[18] !==
|
|
1829
|
+
t[18] !== L || t[19] !== F || t[20] !== P || t[21] !== C || t[22] !== S || t[23] !== x ? (Le = (W) => {
|
|
1832
1830
|
const {
|
|
1833
1831
|
preLeft: J,
|
|
1834
1832
|
preWidth: Y,
|
|
1835
|
-
scrollDelta:
|
|
1836
|
-
} =
|
|
1837
|
-
|
|
1838
|
-
const
|
|
1839
|
-
if (Math.abs(
|
|
1840
|
-
const
|
|
1841
|
-
let X = J +
|
|
1842
|
-
const
|
|
1843
|
-
if (
|
|
1833
|
+
scrollDelta: z
|
|
1834
|
+
} = W;
|
|
1835
|
+
z && (I.current = I.current + z);
|
|
1836
|
+
const ne = G.current ? L : C;
|
|
1837
|
+
if (Math.abs(I.current) >= ne) {
|
|
1838
|
+
const re = parseInt(I.current / ne + "");
|
|
1839
|
+
let X = J + re * ne, j = X;
|
|
1840
|
+
const se = Number.MAX_SAFE_INTEGER;
|
|
1841
|
+
if (F.forEach((Q) => {
|
|
1844
1842
|
const Z = Math.abs(Q - X);
|
|
1845
|
-
Z <
|
|
1843
|
+
Z < L && Z < se && (j = Q);
|
|
1846
1844
|
const ce = Math.abs(Q - (X + Y));
|
|
1847
|
-
ce <
|
|
1848
|
-
}),
|
|
1845
|
+
ce < L && ce < se && (j = Q - Y);
|
|
1846
|
+
}), j !== X ? (G.current = !0, X = j) : ((X - x) % C !== 0 && (X = x + C * Math.round((X - x) / C)), G.current = !1), I.current = I.current % ne, X < P().left ? X = P().left : X + Y > P().right && (X = P().right - Y), S && S({
|
|
1849
1847
|
lastLeft: J,
|
|
1850
1848
|
left: X,
|
|
1851
1849
|
lastWidth: Y,
|
|
1852
1850
|
width: Y
|
|
1853
|
-
},
|
|
1851
|
+
}, z) === !1)
|
|
1854
1852
|
return;
|
|
1855
1853
|
q(X, !1);
|
|
1856
1854
|
}
|
|
1857
|
-
}, t[18] =
|
|
1855
|
+
}, t[18] = L, t[19] = F, t[20] = P, t[21] = C, t[22] = S, t[23] = x, t[24] = Le) : Le = t[24];
|
|
1858
1856
|
const it = Le;
|
|
1859
1857
|
let ct;
|
|
1860
|
-
t[25] !== K || t[26] !== me || t[27] !== it || t[28] !== y ? (ct = (
|
|
1861
|
-
const J =
|
|
1858
|
+
t[25] !== K || t[26] !== me || t[27] !== it || t[28] !== y ? (ct = (W) => {
|
|
1859
|
+
const J = W.target, {
|
|
1862
1860
|
left: Y,
|
|
1863
|
-
width:
|
|
1864
|
-
} = J.dataset,
|
|
1865
|
-
|
|
1866
|
-
if (!y?.current || !
|
|
1861
|
+
width: z
|
|
1862
|
+
} = J.dataset, ne = parseFloat(Y || "0"), re = parseFloat(z || "0");
|
|
1863
|
+
I.current = I.current + W.dx, !(K && y?.current && !me(W, (se) => {
|
|
1864
|
+
if (!y?.current || !O.current?.target)
|
|
1867
1865
|
return;
|
|
1868
|
-
y.current.scrollLeft = y.current.scrollLeft +
|
|
1869
|
-
const Q =
|
|
1866
|
+
y.current.scrollLeft = y.current.scrollLeft + se;
|
|
1867
|
+
const Q = O.current.target, Z = parseFloat(Q.dataset.left || "0"), ce = parseFloat(Q.dataset.width || "0");
|
|
1870
1868
|
it({
|
|
1871
1869
|
preLeft: Z,
|
|
1872
1870
|
preWidth: ce,
|
|
1873
|
-
scrollDelta:
|
|
1871
|
+
scrollDelta: se
|
|
1874
1872
|
});
|
|
1875
1873
|
})) && it({
|
|
1876
|
-
preLeft:
|
|
1877
|
-
preWidth:
|
|
1874
|
+
preLeft: ne,
|
|
1875
|
+
preWidth: re
|
|
1878
1876
|
});
|
|
1879
1877
|
}, t[25] = K, t[26] = me, t[27] = it, t[28] = y, t[29] = ct) : ct = t[29];
|
|
1880
1878
|
const Ue = ct;
|
|
1881
1879
|
let be;
|
|
1882
|
-
t[30] !== _ || t[31] !== fe ? (be = (
|
|
1883
|
-
|
|
1884
|
-
const J =
|
|
1880
|
+
t[30] !== _ || t[31] !== fe ? (be = (W) => {
|
|
1881
|
+
I.current = 0, G.current = !1, fe();
|
|
1882
|
+
const J = W.target, {
|
|
1885
1883
|
left: Y,
|
|
1886
|
-
width:
|
|
1884
|
+
width: z
|
|
1887
1885
|
} = J.dataset;
|
|
1888
1886
|
_ && _({
|
|
1889
1887
|
left: parseFloat(Y || "0"),
|
|
1890
|
-
width: parseFloat(
|
|
1888
|
+
width: parseFloat(z || "0")
|
|
1891
1889
|
});
|
|
1892
1890
|
}, t[30] = _, t[31] = fe, t[32] = be) : be = t[32];
|
|
1893
1891
|
const $e = be;
|
|
1894
1892
|
let Oe;
|
|
1895
|
-
t[33] !== ue || t[34] !==
|
|
1896
|
-
|
|
1897
|
-
const J =
|
|
1898
|
-
|
|
1899
|
-
}, t[33] = ue, t[34] =
|
|
1893
|
+
t[33] !== ue || t[34] !== g ? (Oe = (W) => {
|
|
1894
|
+
I.current = 0, G.current = !1, ue();
|
|
1895
|
+
const J = W.edges?.right ? "right" : "left";
|
|
1896
|
+
g && g(J);
|
|
1897
|
+
}, t[33] = ue, t[34] = g, t[35] = Oe) : Oe = t[35];
|
|
1900
1898
|
const Ke = Oe;
|
|
1901
1899
|
let Me;
|
|
1902
|
-
t[36] !==
|
|
1900
|
+
t[36] !== L || t[37] !== F || t[38] !== P || t[39] !== C || t[40] !== b || t[41] !== x ? (Me = (W) => {
|
|
1903
1901
|
const {
|
|
1904
1902
|
dir: J,
|
|
1905
1903
|
preWidth: Y,
|
|
1906
|
-
preLeft:
|
|
1907
|
-
scrollDelta:
|
|
1908
|
-
} =
|
|
1909
|
-
|
|
1910
|
-
const
|
|
1904
|
+
preLeft: z,
|
|
1905
|
+
scrollDelta: ne
|
|
1906
|
+
} = W;
|
|
1907
|
+
ne && (I.current = I.current + ne);
|
|
1908
|
+
const re = G.current ? L : C;
|
|
1911
1909
|
if (J === "left") {
|
|
1912
|
-
if (Math.abs(
|
|
1913
|
-
const X = parseInt(
|
|
1914
|
-
let
|
|
1910
|
+
if (Math.abs(I.current) >= re) {
|
|
1911
|
+
const X = parseInt(I.current / re + "");
|
|
1912
|
+
let j = z + X * re, se = j;
|
|
1915
1913
|
const Q = Number.MAX_SAFE_INTEGER;
|
|
1916
|
-
|
|
1917
|
-
const We = Math.abs(_e -
|
|
1918
|
-
We <
|
|
1919
|
-
}),
|
|
1920
|
-
const Z =
|
|
1921
|
-
|
|
1922
|
-
const ce = Z -
|
|
1923
|
-
if (
|
|
1924
|
-
lastLeft:
|
|
1914
|
+
F.forEach((_e) => {
|
|
1915
|
+
const We = Math.abs(_e - j);
|
|
1916
|
+
We < L && We < Q && (se = _e);
|
|
1917
|
+
}), se !== j ? (G.current = !0, j = se) : ((j - x) % C !== 0 && (j = x + C * Math.round((j - x) / C)), G.current = !1), I.current = I.current % re;
|
|
1918
|
+
const Z = z + Y;
|
|
1919
|
+
j < P().left && (j = P().left);
|
|
1920
|
+
const ce = Z - j;
|
|
1921
|
+
if (j >= Z || b && b("left", {
|
|
1922
|
+
lastLeft: z,
|
|
1925
1923
|
lastWidth: Y,
|
|
1926
|
-
left:
|
|
1924
|
+
left: j,
|
|
1927
1925
|
width: ce
|
|
1928
1926
|
}) === !1)
|
|
1929
1927
|
return;
|
|
1930
|
-
q(
|
|
1928
|
+
q(j, !1), U(ce, !1);
|
|
1931
1929
|
}
|
|
1932
|
-
} else if (J === "right" && Math.abs(
|
|
1933
|
-
const X = parseInt(
|
|
1934
|
-
let
|
|
1930
|
+
} else if (J === "right" && Math.abs(I.current) >= re) {
|
|
1931
|
+
const X = parseInt(I.current / C + "");
|
|
1932
|
+
let j = Y + X * C, se = z + j;
|
|
1935
1933
|
const Q = Number.MAX_SAFE_INTEGER;
|
|
1936
|
-
if (
|
|
1937
|
-
const ce = Math.abs(Z - (
|
|
1938
|
-
ce <
|
|
1939
|
-
}),
|
|
1940
|
-
G.current = !0,
|
|
1934
|
+
if (F.forEach((Z) => {
|
|
1935
|
+
const ce = Math.abs(Z - (z + j));
|
|
1936
|
+
ce < L && ce < Q && (se = Z);
|
|
1937
|
+
}), se !== z + j)
|
|
1938
|
+
G.current = !0, j = se - z;
|
|
1941
1939
|
else {
|
|
1942
|
-
let Z =
|
|
1943
|
-
(Z - x) %
|
|
1940
|
+
let Z = z + j;
|
|
1941
|
+
(Z - x) % C !== 0 && (Z = x + C * Math.round((Z - x) / C), j = Z - z), G.current = !1;
|
|
1944
1942
|
}
|
|
1945
|
-
if (
|
|
1946
|
-
lastLeft:
|
|
1943
|
+
if (I.current = I.current % re, z + j > P().right && (j = P().right - z), j <= 0 || b && b("right", {
|
|
1944
|
+
lastLeft: z,
|
|
1947
1945
|
lastWidth: Y,
|
|
1948
|
-
left:
|
|
1949
|
-
width:
|
|
1946
|
+
left: z,
|
|
1947
|
+
width: j
|
|
1950
1948
|
}) === !1)
|
|
1951
1949
|
return;
|
|
1952
|
-
|
|
1950
|
+
U(j, !1);
|
|
1953
1951
|
}
|
|
1954
|
-
}, t[36] =
|
|
1952
|
+
}, t[36] = L, t[37] = F, t[38] = P, t[39] = C, t[40] = b, t[41] = x, t[42] = Me) : Me = t[42];
|
|
1955
1953
|
const ye = Me;
|
|
1956
1954
|
let Ne;
|
|
1957
|
-
t[43] !== K || t[44] !== d || t[45] !== y || t[46] !== ye ? (Ne = (
|
|
1958
|
-
const J =
|
|
1959
|
-
left:
|
|
1960
|
-
width:
|
|
1961
|
-
} = J.dataset,
|
|
1962
|
-
|
|
1963
|
-
if (!y?.current || !
|
|
1955
|
+
t[43] !== K || t[44] !== d || t[45] !== y || t[46] !== ye ? (Ne = (W) => {
|
|
1956
|
+
const J = W.target, Y = W.edges?.left ? "left" : "right", {
|
|
1957
|
+
left: z,
|
|
1958
|
+
width: ne
|
|
1959
|
+
} = J.dataset, re = parseFloat(z || "0"), X = parseFloat(ne || "0");
|
|
1960
|
+
I.current = I.current + (Y === "left" ? W.deltaRect?.left || 0 : W.deltaRect?.right || 0), !(K && y?.current && !d(W, Y, (Q) => {
|
|
1961
|
+
if (!y?.current || !O.current?.target)
|
|
1964
1962
|
return;
|
|
1965
1963
|
y.current.scrollLeft = y.current.scrollLeft + Q;
|
|
1966
|
-
const Z =
|
|
1964
|
+
const Z = O.current.target, ce = parseFloat(Z.dataset.left || "0"), _e = parseFloat(Z.dataset.width || "0");
|
|
1967
1965
|
ye({
|
|
1968
1966
|
preLeft: ce,
|
|
1969
1967
|
preWidth: _e,
|
|
@@ -1971,24 +1969,24 @@ const Gs = ({
|
|
|
1971
1969
|
scrollDelta: Q
|
|
1972
1970
|
});
|
|
1973
1971
|
})) && ye({
|
|
1974
|
-
preLeft:
|
|
1972
|
+
preLeft: re,
|
|
1975
1973
|
preWidth: X,
|
|
1976
1974
|
dir: Y
|
|
1977
1975
|
});
|
|
1978
1976
|
}, t[43] = K, t[44] = d, t[45] = y, t[46] = ye, t[47] = Ne) : Ne = t[47];
|
|
1979
1977
|
const qe = Ne;
|
|
1980
1978
|
let Ie;
|
|
1981
|
-
t[48] !==
|
|
1982
|
-
|
|
1983
|
-
const J =
|
|
1979
|
+
t[48] !== v || t[49] !== fe ? (Ie = (W) => {
|
|
1980
|
+
I.current = 0, G.current = !1, fe();
|
|
1981
|
+
const J = W.target, {
|
|
1984
1982
|
left: Y,
|
|
1985
|
-
width:
|
|
1986
|
-
} = J.dataset,
|
|
1987
|
-
|
|
1983
|
+
width: z
|
|
1984
|
+
} = J.dataset, ne = W.edges?.right ? "right" : "left";
|
|
1985
|
+
v && v(ne, {
|
|
1988
1986
|
left: parseFloat(Y || "0"),
|
|
1989
|
-
width: parseFloat(
|
|
1987
|
+
width: parseFloat(z || "0")
|
|
1990
1988
|
});
|
|
1991
|
-
}, t[48] =
|
|
1989
|
+
}, t[48] = v, t[49] = fe, t[50] = Ie) : Ie = t[50];
|
|
1992
1990
|
const Je = Ie;
|
|
1993
1991
|
let Ee;
|
|
1994
1992
|
t[51] !== Ue || t[52] !== De || t[53] !== $e ? (Ee = {
|
|
@@ -1996,7 +1994,7 @@ const Gs = ({
|
|
|
1996
1994
|
onmove: Ue,
|
|
1997
1995
|
onstart: De,
|
|
1998
1996
|
onend: $e,
|
|
1999
|
-
cursorChecker:
|
|
1997
|
+
cursorChecker: Zs
|
|
2000
1998
|
}, t[51] = Ue, t[52] = De, t[53] = $e, t[54] = Ee) : Ee = t[54];
|
|
2001
1999
|
let xe;
|
|
2002
2000
|
t[55] !== s || t[56] !== qe || t[57] !== Ke || t[58] !== Je ? (xe = {
|
|
@@ -2009,7 +2007,7 @@ const Gs = ({
|
|
|
2009
2007
|
}, t[55] = s, t[56] = qe, t[57] = Ke, t[58] = Je, t[59] = xe) : xe = t[59];
|
|
2010
2008
|
const He = r;
|
|
2011
2009
|
let Ce;
|
|
2012
|
-
t[60] !== o || t[61] !== He || t[62] !== i ? (Ce =
|
|
2010
|
+
t[60] !== o || t[61] !== He || t[62] !== i ? (Ce = dr({
|
|
2013
2011
|
children: He,
|
|
2014
2012
|
style: {
|
|
2015
2013
|
left: o,
|
|
@@ -2017,24 +2015,24 @@ const Gs = ({
|
|
|
2017
2015
|
}
|
|
2018
2016
|
}), t[60] = o, t[61] = He, t[62] = i, t[63] = Ce) : Ce = t[63];
|
|
2019
2017
|
let ke;
|
|
2020
|
-
return t[64] !==
|
|
2018
|
+
return t[64] !== D || t[65] !== E || t[66] !== Ee || t[67] !== xe || t[68] !== Ce ? (ke = /* @__PURE__ */ R.jsx(qs, { interactRef: O, draggable: D, resizable: E, draggableOptions: Ee, resizableOptions: xe, children: Ce }), t[64] = D, t[65] = E, t[66] = Ee, t[67] = xe, t[68] = Ce, t[69] = ke) : ke = t[69], ke;
|
|
2021
2019
|
});
|
|
2022
|
-
function
|
|
2020
|
+
function Js() {
|
|
2023
2021
|
return {
|
|
2024
2022
|
left: Number.MIN_SAFE_INTEGER,
|
|
2025
2023
|
right: Number.MAX_SAFE_INTEGER
|
|
2026
2024
|
};
|
|
2027
2025
|
}
|
|
2028
|
-
function
|
|
2026
|
+
function Zs() {
|
|
2029
2027
|
return "";
|
|
2030
2028
|
}
|
|
2031
|
-
function
|
|
2029
|
+
function Qs() {
|
|
2032
2030
|
let n = 0, e, t = "", r = arguments.length;
|
|
2033
2031
|
for (; n < r; n++)
|
|
2034
2032
|
(e = arguments[n]) && typeof e == "string" && (t += (t && " ") + e);
|
|
2035
2033
|
return t;
|
|
2036
2034
|
}
|
|
2037
|
-
const
|
|
2035
|
+
const eo = (n) => {
|
|
2038
2036
|
const e = ze.c(191), {
|
|
2039
2037
|
editorData: t,
|
|
2040
2038
|
row: r,
|
|
@@ -2042,318 +2040,318 @@ const Zs = (n) => {
|
|
|
2042
2040
|
effects: o,
|
|
2043
2041
|
rowHeight: i,
|
|
2044
2042
|
scale: c,
|
|
2045
|
-
scaleWidth:
|
|
2043
|
+
scaleWidth: l,
|
|
2046
2044
|
scaleSplitCount: u,
|
|
2047
|
-
startLeft:
|
|
2045
|
+
startLeft: a,
|
|
2048
2046
|
gridSnap: h,
|
|
2049
2047
|
disableDrag: f,
|
|
2050
2048
|
scaleCount: m,
|
|
2051
|
-
maxScaleCount:
|
|
2052
|
-
setScaleCount:
|
|
2053
|
-
onActionMoveStart:
|
|
2054
|
-
onActionMoving:
|
|
2049
|
+
maxScaleCount: g,
|
|
2050
|
+
setScaleCount: b,
|
|
2051
|
+
onActionMoveStart: v,
|
|
2052
|
+
onActionMoving: w,
|
|
2055
2053
|
onActionMoveEnd: _,
|
|
2056
|
-
onActionResizeStart:
|
|
2054
|
+
onActionResizeStart: S,
|
|
2057
2055
|
onActionResizeEnd: y,
|
|
2058
|
-
onActionResizing:
|
|
2056
|
+
onActionResizing: T,
|
|
2059
2057
|
dragLineData: x,
|
|
2060
|
-
setEditorData:
|
|
2061
|
-
onClickAction:
|
|
2062
|
-
onClickActionOnly:
|
|
2063
|
-
onDoubleClickAction:
|
|
2064
|
-
onContextMenuAction:
|
|
2065
|
-
getActionRender:
|
|
2066
|
-
handleTime:
|
|
2058
|
+
setEditorData: C,
|
|
2059
|
+
onClickAction: P,
|
|
2060
|
+
onClickActionOnly: E,
|
|
2061
|
+
onDoubleClickAction: D,
|
|
2062
|
+
onContextMenuAction: L,
|
|
2063
|
+
getActionRender: k,
|
|
2064
|
+
handleTime: F,
|
|
2067
2065
|
scrollContainerRef: K
|
|
2068
|
-
} = n,
|
|
2066
|
+
} = n, O = ee(null), I = ee(!1), {
|
|
2069
2067
|
id: G,
|
|
2070
2068
|
maxEnd: ue,
|
|
2071
2069
|
minStart: fe,
|
|
2072
2070
|
end: me,
|
|
2073
2071
|
start: d,
|
|
2074
|
-
selected:
|
|
2075
|
-
flexible:
|
|
2072
|
+
selected: A,
|
|
2073
|
+
flexible: V,
|
|
2076
2074
|
movable: H,
|
|
2077
2075
|
effectId: q
|
|
2078
|
-
} = s, B =
|
|
2079
|
-
let
|
|
2080
|
-
e[0] !==
|
|
2081
|
-
startLeft:
|
|
2082
|
-
scale:
|
|
2083
|
-
scaleWidth:
|
|
2084
|
-
}), e[0] =
|
|
2085
|
-
const Re =
|
|
2076
|
+
} = s, B = V === void 0 ? !0 : V, U = H === void 0 ? !0 : H, M = c ?? Yt, N = l ?? Xt, $ = a ?? Jt, tn = u ?? tr, ot = g ?? Number.MAX_SAFE_INTEGER, Fe = fe || 0;
|
|
2077
|
+
let Te;
|
|
2078
|
+
e[0] !== M || e[1] !== N || e[2] !== $ || e[3] !== Fe ? (Te = je(Fe, {
|
|
2079
|
+
startLeft: $,
|
|
2080
|
+
scale: M,
|
|
2081
|
+
scaleWidth: N
|
|
2082
|
+
}), e[0] = M, e[1] = N, e[2] = $, e[3] = Fe, e[4] = Te) : Te = e[4];
|
|
2083
|
+
const Re = Te, Ve = ue || Number.MAX_VALUE;
|
|
2086
2084
|
let Pe;
|
|
2087
|
-
e[5] !==
|
|
2088
|
-
startLeft:
|
|
2089
|
-
scale:
|
|
2090
|
-
scaleWidth:
|
|
2091
|
-
}), e[5] =
|
|
2092
|
-
const De = Math.min(ot *
|
|
2085
|
+
e[5] !== M || e[6] !== N || e[7] !== $ || e[8] !== Ve ? (Pe = je(Ve, {
|
|
2086
|
+
startLeft: $,
|
|
2087
|
+
scale: M,
|
|
2088
|
+
scaleWidth: N
|
|
2089
|
+
}), e[5] = M, e[6] = N, e[7] = $, e[8] = Ve, e[9] = Pe) : Pe = e[9];
|
|
2090
|
+
const De = Math.min(ot * N + $, Pe);
|
|
2093
2091
|
let Le;
|
|
2094
|
-
e[10] !== me || e[11] !==
|
|
2092
|
+
e[10] !== me || e[11] !== M || e[12] !== N || e[13] !== $ || e[14] !== d ? (Le = vn({
|
|
2095
2093
|
start: d,
|
|
2096
2094
|
end: me
|
|
2097
2095
|
}, {
|
|
2098
|
-
startLeft:
|
|
2099
|
-
scale:
|
|
2100
|
-
scaleWidth:
|
|
2101
|
-
}), e[10] = me, e[11] =
|
|
2102
|
-
const it = Le, [ct, Ue] =
|
|
2096
|
+
startLeft: $,
|
|
2097
|
+
scale: M,
|
|
2098
|
+
scaleWidth: N
|
|
2099
|
+
}), e[10] = me, e[11] = M, e[12] = N, e[13] = $, e[14] = d, e[15] = Le) : Le = e[15];
|
|
2100
|
+
const it = Le, [ct, Ue] = At(null), be = ct ?? it, $e = N / tn;
|
|
2103
2101
|
let Oe;
|
|
2104
|
-
e[16] !== q || e[17] !== o || e[18] !== B || e[19] !==
|
|
2102
|
+
e[16] !== q || e[17] !== o || e[18] !== B || e[19] !== U || e[20] !== A ? (Oe = de(Qs("action", U && "action-movable", A && "action-selected", B && "action-flexible", o[q] && `action-effect-${q}`)), e[16] = q, e[17] = o, e[18] = B, e[19] = U, e[20] = A, e[21] = Oe) : Oe = e[21];
|
|
2105
2103
|
const Ke = Oe;
|
|
2106
2104
|
let Me;
|
|
2107
|
-
e[22] !==
|
|
2108
|
-
const
|
|
2109
|
-
startLeft:
|
|
2105
|
+
e[22] !== N || e[23] !== $ || e[24] !== m || e[25] !== b ? (Me = (pe, ge) => {
|
|
2106
|
+
const oe = Br(pe + ge, {
|
|
2107
|
+
startLeft: $,
|
|
2110
2108
|
scaleCount: m,
|
|
2111
|
-
scaleWidth:
|
|
2109
|
+
scaleWidth: N
|
|
2112
2110
|
});
|
|
2113
|
-
|
|
2114
|
-
}, e[22] =
|
|
2111
|
+
oe !== m && b(oe);
|
|
2112
|
+
}, e[22] = N, e[23] = $, e[24] = m, e[25] = b, e[26] = Me) : Me = e[26];
|
|
2115
2113
|
const ye = Me;
|
|
2116
2114
|
let Ne;
|
|
2117
|
-
e[27] !== s || e[28] !==
|
|
2118
|
-
|
|
2115
|
+
e[27] !== s || e[28] !== v || e[29] !== r ? (Ne = () => {
|
|
2116
|
+
v && v({
|
|
2119
2117
|
action: s,
|
|
2120
2118
|
row: r
|
|
2121
2119
|
});
|
|
2122
|
-
}, e[27] = s, e[28] =
|
|
2120
|
+
}, e[27] = s, e[28] = v, e[29] = r, e[30] = Ne) : Ne = e[30];
|
|
2123
2121
|
const qe = Ne;
|
|
2124
2122
|
let Ie;
|
|
2125
|
-
e[31] !== s || e[32] !== ye || e[33] !==
|
|
2123
|
+
e[31] !== s || e[32] !== ye || e[33] !== w || e[34] !== r || e[35] !== M || e[36] !== N || e[37] !== $ ? (Ie = (pe) => {
|
|
2126
2124
|
const {
|
|
2127
2125
|
left: ge,
|
|
2128
|
-
width:
|
|
2126
|
+
width: oe
|
|
2129
2127
|
} = pe;
|
|
2130
|
-
if (
|
|
2128
|
+
if (I.current = !0, w) {
|
|
2131
2129
|
const {
|
|
2132
2130
|
start: le,
|
|
2133
|
-
end:
|
|
2131
|
+
end: ie
|
|
2134
2132
|
} = Lt({
|
|
2135
2133
|
left: ge,
|
|
2136
|
-
width:
|
|
2134
|
+
width: oe
|
|
2137
2135
|
}, {
|
|
2138
|
-
scaleWidth:
|
|
2139
|
-
scale:
|
|
2140
|
-
startLeft:
|
|
2136
|
+
scaleWidth: N,
|
|
2137
|
+
scale: M,
|
|
2138
|
+
startLeft: $
|
|
2141
2139
|
});
|
|
2142
|
-
if (
|
|
2140
|
+
if (w({
|
|
2143
2141
|
action: s,
|
|
2144
2142
|
row: r,
|
|
2145
2143
|
start: le,
|
|
2146
|
-
end:
|
|
2144
|
+
end: ie
|
|
2147
2145
|
}) === !1)
|
|
2148
2146
|
return !1;
|
|
2149
2147
|
}
|
|
2150
2148
|
Ue({
|
|
2151
2149
|
left: ge,
|
|
2152
|
-
width:
|
|
2153
|
-
}), ye(ge,
|
|
2154
|
-
}, e[31] = s, e[32] = ye, e[33] =
|
|
2150
|
+
width: oe
|
|
2151
|
+
}), ye(ge, oe);
|
|
2152
|
+
}, e[31] = s, e[32] = ye, e[33] = w, e[34] = r, e[35] = M, e[36] = N, e[37] = $, e[38] = Ie) : Ie = e[38];
|
|
2155
2153
|
const Je = Ie;
|
|
2156
2154
|
let Ee;
|
|
2157
|
-
e[39] !== t || e[40] !== G || e[41] !== _ || e[42] !== r || e[43] !==
|
|
2155
|
+
e[39] !== t || e[40] !== G || e[41] !== _ || e[42] !== r || e[43] !== M || e[44] !== N || e[45] !== $ || e[46] !== C ? (Ee = (pe) => {
|
|
2158
2156
|
const {
|
|
2159
2157
|
left: ge,
|
|
2160
|
-
width:
|
|
2158
|
+
width: oe
|
|
2161
2159
|
} = pe, {
|
|
2162
2160
|
start: le,
|
|
2163
|
-
end:
|
|
2161
|
+
end: ie
|
|
2164
2162
|
} = Lt({
|
|
2165
2163
|
left: ge,
|
|
2166
|
-
width:
|
|
2164
|
+
width: oe
|
|
2167
2165
|
}, {
|
|
2168
|
-
scaleWidth:
|
|
2169
|
-
scale:
|
|
2170
|
-
startLeft:
|
|
2166
|
+
scaleWidth: N,
|
|
2167
|
+
scale: M,
|
|
2168
|
+
startLeft: $
|
|
2171
2169
|
}), ae = t.find((Ge) => Ge.id === r.id);
|
|
2172
2170
|
if (!ae)
|
|
2173
2171
|
return;
|
|
2174
2172
|
const Xe = ae.actions.find((Ge) => Ge.id === G);
|
|
2175
|
-
Xe && (Xe.start = le, Xe.end =
|
|
2173
|
+
Xe && (Xe.start = le, Xe.end = ie, C(t), _ && _({
|
|
2176
2174
|
action: Xe,
|
|
2177
2175
|
row: r,
|
|
2178
2176
|
start: le,
|
|
2179
|
-
end:
|
|
2177
|
+
end: ie
|
|
2180
2178
|
}), Ue(null));
|
|
2181
|
-
}, e[39] = t, e[40] = G, e[41] = _, e[42] = r, e[43] =
|
|
2179
|
+
}, e[39] = t, e[40] = G, e[41] = _, e[42] = r, e[43] = M, e[44] = N, e[45] = $, e[46] = C, e[47] = Ee) : Ee = e[47];
|
|
2182
2180
|
const xe = Ee;
|
|
2183
2181
|
let He;
|
|
2184
|
-
e[48] !== s || e[49] !==
|
|
2185
|
-
|
|
2182
|
+
e[48] !== s || e[49] !== S || e[50] !== r ? (He = (pe) => {
|
|
2183
|
+
S && S({
|
|
2186
2184
|
action: s,
|
|
2187
2185
|
row: r,
|
|
2188
2186
|
dir: pe
|
|
2189
2187
|
});
|
|
2190
|
-
}, e[48] = s, e[49] =
|
|
2188
|
+
}, e[48] = s, e[49] = S, e[50] = r, e[51] = He) : He = e[51];
|
|
2191
2189
|
const Ce = He;
|
|
2192
2190
|
let ke;
|
|
2193
|
-
e[52] !== s || e[53] !== ye || e[54] !==
|
|
2191
|
+
e[52] !== s || e[53] !== ye || e[54] !== T || e[55] !== r || e[56] !== M || e[57] !== N || e[58] !== $ ? (ke = (pe, ge) => {
|
|
2194
2192
|
const {
|
|
2195
|
-
left:
|
|
2193
|
+
left: oe,
|
|
2196
2194
|
width: le
|
|
2197
2195
|
} = ge;
|
|
2198
|
-
if (
|
|
2196
|
+
if (I.current = !0, T) {
|
|
2199
2197
|
const {
|
|
2200
|
-
start:
|
|
2198
|
+
start: ie,
|
|
2201
2199
|
end: ae
|
|
2202
2200
|
} = Lt({
|
|
2203
|
-
left:
|
|
2201
|
+
left: oe,
|
|
2204
2202
|
width: le
|
|
2205
2203
|
}, {
|
|
2206
|
-
scaleWidth:
|
|
2207
|
-
scale:
|
|
2208
|
-
startLeft:
|
|
2204
|
+
scaleWidth: N,
|
|
2205
|
+
scale: M,
|
|
2206
|
+
startLeft: $
|
|
2209
2207
|
});
|
|
2210
|
-
if (
|
|
2208
|
+
if (T({
|
|
2211
2209
|
action: s,
|
|
2212
2210
|
row: r,
|
|
2213
|
-
start:
|
|
2211
|
+
start: ie,
|
|
2214
2212
|
end: ae,
|
|
2215
2213
|
dir: pe
|
|
2216
2214
|
}) === !1)
|
|
2217
2215
|
return !1;
|
|
2218
2216
|
}
|
|
2219
2217
|
Ue({
|
|
2220
|
-
left:
|
|
2218
|
+
left: oe,
|
|
2221
2219
|
width: le
|
|
2222
|
-
}), ye(
|
|
2223
|
-
}, e[52] = s, e[53] = ye, e[54] =
|
|
2224
|
-
const
|
|
2220
|
+
}), ye(oe, le);
|
|
2221
|
+
}, e[52] = s, e[53] = ye, e[54] = T, e[55] = r, e[56] = M, e[57] = N, e[58] = $, e[59] = ke) : ke = e[59];
|
|
2222
|
+
const W = ke;
|
|
2225
2223
|
let J;
|
|
2226
|
-
e[60] !== t || e[61] !== G || e[62] !== y || e[63] !== r || e[64] !==
|
|
2224
|
+
e[60] !== t || e[61] !== G || e[62] !== y || e[63] !== r || e[64] !== M || e[65] !== N || e[66] !== $ || e[67] !== C ? (J = (pe, ge) => {
|
|
2227
2225
|
const {
|
|
2228
|
-
left:
|
|
2226
|
+
left: oe,
|
|
2229
2227
|
width: le
|
|
2230
2228
|
} = ge, {
|
|
2231
|
-
start:
|
|
2229
|
+
start: ie,
|
|
2232
2230
|
end: ae
|
|
2233
2231
|
} = Lt({
|
|
2234
|
-
left:
|
|
2232
|
+
left: oe,
|
|
2235
2233
|
width: le
|
|
2236
2234
|
}, {
|
|
2237
|
-
scaleWidth:
|
|
2238
|
-
scale:
|
|
2239
|
-
startLeft:
|
|
2235
|
+
scaleWidth: N,
|
|
2236
|
+
scale: M,
|
|
2237
|
+
startLeft: $
|
|
2240
2238
|
}), Xe = t.find((nn) => nn.id === r.id);
|
|
2241
2239
|
if (!Xe)
|
|
2242
2240
|
return;
|
|
2243
2241
|
const Ge = Xe.actions.find((nn) => nn.id === G);
|
|
2244
|
-
Ge && (Ge.start =
|
|
2242
|
+
Ge && (Ge.start = ie, Ge.end = ae, C(t), y && y({
|
|
2245
2243
|
action: Ge,
|
|
2246
2244
|
row: r,
|
|
2247
|
-
start:
|
|
2245
|
+
start: ie,
|
|
2248
2246
|
end: ae,
|
|
2249
2247
|
dir: pe
|
|
2250
2248
|
}), Ue(null));
|
|
2251
|
-
}, e[60] = t, e[61] = G, e[62] = y, e[63] = r, e[64] =
|
|
2249
|
+
}, e[60] = t, e[61] = G, e[62] = y, e[63] = r, e[64] = M, e[65] = N, e[66] = $, e[67] = C, e[68] = J) : J = e[68];
|
|
2252
2250
|
const Y = J;
|
|
2253
|
-
let
|
|
2254
|
-
if (e[69] !== s || e[70] !== Ke || e[71] !== f || e[72] !== x.assistPositions || e[73] !== B || e[74] !==
|
|
2251
|
+
let z, ne, re, X, j, se, Q, Z, ce, _e, We, at, lt, ut, ft, dt, Be, Ye, ht, mt, pt, gt, vt, bt, _t, wt;
|
|
2252
|
+
if (e[69] !== s || e[70] !== Ke || e[71] !== f || e[72] !== x.assistPositions || e[73] !== B || e[74] !== k || e[75] !== $e || e[76] !== h || e[77] !== Je || e[78] !== xe || e[79] !== qe || e[80] !== Y || e[81] !== Ce || e[82] !== W || e[83] !== F || e[84] !== Re || e[85] !== U || e[86] !== P || e[87] !== E || e[88] !== L || e[89] !== D || e[90] !== De || e[91] !== r || e[92] !== i || e[93] !== M || e[94] !== N || e[95] !== $ || e[96] !== K || e[97] !== be.left || e[98] !== be.width) {
|
|
2255
2253
|
const pe = {
|
|
2256
2254
|
...s,
|
|
2257
2255
|
...Lt({
|
|
2258
2256
|
left: be.left,
|
|
2259
2257
|
width: be.width
|
|
2260
2258
|
}, {
|
|
2261
|
-
startLeft:
|
|
2262
|
-
scaleWidth:
|
|
2263
|
-
scale:
|
|
2259
|
+
startLeft: $,
|
|
2260
|
+
scaleWidth: N,
|
|
2261
|
+
scale: M
|
|
2264
2262
|
})
|
|
2265
2263
|
}, ge = {
|
|
2266
2264
|
...r,
|
|
2267
2265
|
actions: [...r.actions]
|
|
2268
2266
|
};
|
|
2269
|
-
r.actions.includes(s) && (ge.actions[r.actions.indexOf(s)] = pe),
|
|
2267
|
+
r.actions.includes(s) && (ge.actions[r.actions.indexOf(s)] = pe), z = hr, ce = O, _e = K, We = $, at = be.left, lt = be.width, ut = h && $e || fn, ft = h ? Math.max(($e || fn) / 2, dn) : dn, dt = x.assistPositions, e[125] !== Re || e[126] !== De ? (Be = () => ({
|
|
2270
2268
|
left: Re,
|
|
2271
2269
|
right: De
|
|
2272
2270
|
}), e[125] = Re, e[126] = De, e[127] = Be) : Be = e[127];
|
|
2273
|
-
let
|
|
2274
|
-
e[128] !== f || e[129] !== B ? (
|
|
2271
|
+
let oe;
|
|
2272
|
+
e[128] !== f || e[129] !== B ? (oe = !f && B && `.${de("action-left-stretch")}`, e[128] = f, e[129] = B, e[130] = oe) : oe = e[130];
|
|
2275
2273
|
let le;
|
|
2276
|
-
e[131] !== f || e[132] !== B ? (le = !f && B && `.${de("action-right-stretch")}`, e[131] = f, e[132] = B, e[133] = le) : le = e[133], e[134] !==
|
|
2277
|
-
left:
|
|
2274
|
+
e[131] !== f || e[132] !== B ? (le = !f && B && `.${de("action-right-stretch")}`, e[131] = f, e[132] = B, e[133] = le) : le = e[133], e[134] !== oe || e[135] !== le ? (Ye = {
|
|
2275
|
+
left: oe,
|
|
2278
2276
|
right: le
|
|
2279
|
-
}, e[134] =
|
|
2280
|
-
|
|
2281
|
-
}, e[137] =
|
|
2277
|
+
}, e[134] = oe, e[135] = le, e[136] = Ye) : Ye = e[136], ht = !f && U, mt = !f && B, pt = qe, gt = Je, vt = xe, bt = Ce, _t = W, wt = Y, e[137] === Symbol.for("react.memo_cache_sentinel") ? (ne = () => {
|
|
2278
|
+
I.current = !1;
|
|
2279
|
+
}, e[137] = ne) : ne = e[137], e[138] !== s || e[139] !== F || e[140] !== P || e[141] !== E || e[142] !== r ? (re = (ie) => {
|
|
2282
2280
|
let ae;
|
|
2283
|
-
|
|
2281
|
+
P && (ae = F(ie), P(ie, {
|
|
2284
2282
|
row: r,
|
|
2285
2283
|
action: s,
|
|
2286
2284
|
time: ae
|
|
2287
|
-
})), !
|
|
2285
|
+
})), !I.current && E && (ae === void 0 && (ae = F(ie)), E(ie, {
|
|
2288
2286
|
row: r,
|
|
2289
2287
|
action: s,
|
|
2290
2288
|
time: ae
|
|
2291
2289
|
}));
|
|
2292
|
-
}, e[138] = s, e[139] =
|
|
2293
|
-
if (
|
|
2294
|
-
const ae =
|
|
2295
|
-
|
|
2290
|
+
}, e[138] = s, e[139] = F, e[140] = P, e[141] = E, e[142] = r, e[143] = re) : re = e[143], e[144] !== s || e[145] !== F || e[146] !== D || e[147] !== r ? (X = (ie) => {
|
|
2291
|
+
if (D) {
|
|
2292
|
+
const ae = F(ie);
|
|
2293
|
+
D(ie, {
|
|
2296
2294
|
row: r,
|
|
2297
2295
|
action: s,
|
|
2298
2296
|
time: ae
|
|
2299
2297
|
});
|
|
2300
2298
|
}
|
|
2301
|
-
}, e[144] = s, e[145] =
|
|
2302
|
-
if (
|
|
2303
|
-
const ae =
|
|
2304
|
-
|
|
2299
|
+
}, e[144] = s, e[145] = F, e[146] = D, e[147] = r, e[148] = X) : X = e[148], e[149] !== s || e[150] !== F || e[151] !== L || e[152] !== r ? (j = (ie) => {
|
|
2300
|
+
if (L) {
|
|
2301
|
+
const ae = F(ie);
|
|
2302
|
+
L(ie, {
|
|
2305
2303
|
row: r,
|
|
2306
2304
|
action: s,
|
|
2307
2305
|
time: ae
|
|
2308
2306
|
});
|
|
2309
2307
|
}
|
|
2310
|
-
}, e[149] = s, e[150] =
|
|
2308
|
+
}, e[149] = s, e[150] = F, e[151] = L, e[152] = r, e[153] = j) : j = e[153], se = Ke, e[154] !== i ? (Q = {
|
|
2311
2309
|
height: i
|
|
2312
|
-
}, e[154] = i, e[155] = Q) : Q = e[155], Z =
|
|
2310
|
+
}, e[154] = i, e[155] = Q) : Q = e[155], Z = k && k(pe, ge), e[69] = s, e[70] = Ke, e[71] = f, e[72] = x.assistPositions, e[73] = B, e[74] = k, e[75] = $e, e[76] = h, e[77] = Je, e[78] = xe, e[79] = qe, e[80] = Y, e[81] = Ce, e[82] = W, e[83] = F, e[84] = Re, e[85] = U, e[86] = P, e[87] = E, e[88] = L, e[89] = D, e[90] = De, e[91] = r, e[92] = i, e[93] = M, e[94] = N, e[95] = $, e[96] = K, e[97] = be.left, e[98] = be.width, e[99] = z, e[100] = ne, e[101] = re, e[102] = X, e[103] = j, e[104] = se, e[105] = Q, e[106] = Z, e[107] = ce, e[108] = _e, e[109] = We, e[110] = at, e[111] = lt, e[112] = ut, e[113] = ft, e[114] = dt, e[115] = Be, e[116] = Ye, e[117] = ht, e[118] = mt, e[119] = pt, e[120] = gt, e[121] = vt, e[122] = bt, e[123] = _t, e[124] = wt;
|
|
2313
2311
|
} else
|
|
2314
|
-
|
|
2312
|
+
z = e[99], ne = e[100], re = e[101], X = e[102], j = e[103], se = e[104], Q = e[105], Z = e[106], ce = e[107], _e = e[108], We = e[109], at = e[110], lt = e[111], ut = e[112], ft = e[113], dt = e[114], Be = e[115], Ye = e[116], ht = e[117], mt = e[118], pt = e[119], gt = e[120], vt = e[121], bt = e[122], _t = e[123], wt = e[124];
|
|
2315
2313
|
let St;
|
|
2316
|
-
e[156] !== B ? (St = B && /* @__PURE__ */
|
|
2314
|
+
e[156] !== B ? (St = B && /* @__PURE__ */ R.jsx("div", { className: de("action-left-stretch"), style: {
|
|
2317
2315
|
touchAction: "none"
|
|
2318
2316
|
} }), e[156] = B, e[157] = St) : St = e[157];
|
|
2319
2317
|
let yt;
|
|
2320
|
-
e[158] !== B ? (yt = B && /* @__PURE__ */
|
|
2318
|
+
e[158] !== B ? (yt = B && /* @__PURE__ */ R.jsx("div", { className: de("action-right-stretch"), style: {
|
|
2321
2319
|
touchAction: "none"
|
|
2322
2320
|
} }), e[158] = B, e[159] = yt) : yt = e[159];
|
|
2323
2321
|
let Et;
|
|
2324
|
-
e[160] !==
|
|
2322
|
+
e[160] !== ne || e[161] !== re || e[162] !== X || e[163] !== j || e[164] !== se || e[165] !== Q || e[166] !== Z || e[167] !== St || e[168] !== yt ? (Et = /* @__PURE__ */ R.jsxs("div", { onMouseDown: ne, onClick: re, onDoubleClick: X, onContextMenu: j, className: se, style: Q, children: [
|
|
2325
2323
|
Z,
|
|
2326
2324
|
St,
|
|
2327
2325
|
yt
|
|
2328
|
-
] }), e[160] =
|
|
2326
|
+
] }), e[160] = ne, e[161] = re, e[162] = X, e[163] = j, e[164] = se, e[165] = Q, e[166] = Z, e[167] = St, e[168] = yt, e[169] = Et) : Et = e[169];
|
|
2329
2327
|
let kt;
|
|
2330
|
-
return e[170] !==
|
|
2328
|
+
return e[170] !== z || e[171] !== ce || e[172] !== _e || e[173] !== We || e[174] !== at || e[175] !== lt || e[176] !== ut || e[177] !== ft || e[178] !== dt || e[179] !== Be || e[180] !== Ye || e[181] !== ht || e[182] !== mt || e[183] !== pt || e[184] !== gt || e[185] !== vt || e[186] !== bt || e[187] !== _t || e[188] !== wt || e[189] !== Et ? (kt = /* @__PURE__ */ R.jsx(z, { ref: ce, parentRef: _e, start: We, left: at, width: lt, grid: ut, adsorptionDistance: ft, adsorptionPositions: dt, getBounds: Be, edges: Ye, enableDragging: ht, enableResizing: mt, onDragStart: pt, onDrag: gt, onDragEnd: vt, onResizeStart: bt, onResize: _t, onResizeEnd: wt, children: Et }), e[170] = z, e[171] = ce, e[172] = _e, e[173] = We, e[174] = at, e[175] = lt, e[176] = ut, e[177] = ft, e[178] = dt, e[179] = Be, e[180] = Ye, e[181] = ht, e[182] = mt, e[183] = pt, e[184] = gt, e[185] = vt, e[186] = bt, e[187] = _t, e[188] = wt, e[189] = Et, e[190] = kt) : kt = e[190], kt;
|
|
2331
2329
|
};
|
|
2332
2330
|
function xt(n, e, t) {
|
|
2333
2331
|
let r = t.initialDeps ?? [], s;
|
|
2334
2332
|
function o() {
|
|
2335
|
-
var i, c,
|
|
2336
|
-
let
|
|
2337
|
-
t.key && ((i = t.debug) != null && i.call(t)) && (
|
|
2333
|
+
var i, c, l, u;
|
|
2334
|
+
let a;
|
|
2335
|
+
t.key && ((i = t.debug) != null && i.call(t)) && (a = Date.now());
|
|
2338
2336
|
const h = n();
|
|
2339
|
-
if (!(h.length !== r.length || h.some((
|
|
2337
|
+
if (!(h.length !== r.length || h.some((g, b) => r[b] !== g)))
|
|
2340
2338
|
return s;
|
|
2341
2339
|
r = h;
|
|
2342
2340
|
let m;
|
|
2343
|
-
if (t.key && ((c = t.debug) != null && c.call(t)) && (m = Date.now()), s = e(...h), t.key && ((
|
|
2344
|
-
const
|
|
2345
|
-
for (_ = String(_); _.length <
|
|
2341
|
+
if (t.key && ((c = t.debug) != null && c.call(t)) && (m = Date.now()), s = e(...h), t.key && ((l = t.debug) != null && l.call(t))) {
|
|
2342
|
+
const g = Math.round((Date.now() - a) * 100) / 100, b = Math.round((Date.now() - m) * 100) / 100, v = b / 16, w = (_, S) => {
|
|
2343
|
+
for (_ = String(_); _.length < S; )
|
|
2346
2344
|
_ = " " + _;
|
|
2347
2345
|
return _;
|
|
2348
2346
|
};
|
|
2349
2347
|
console.info(
|
|
2350
|
-
`%c⏱ ${
|
|
2348
|
+
`%c⏱ ${w(b, 5)} /${w(g, 5)} ms`,
|
|
2351
2349
|
`
|
|
2352
2350
|
font-size: .6rem;
|
|
2353
2351
|
font-weight: bold;
|
|
2354
2352
|
color: hsl(${Math.max(
|
|
2355
2353
|
0,
|
|
2356
|
-
Math.min(120 - 120 *
|
|
2354
|
+
Math.min(120 - 120 * v, 120)
|
|
2357
2355
|
)}deg 100% 31%);`,
|
|
2358
2356
|
t?.key
|
|
2359
2357
|
);
|
|
@@ -2364,25 +2362,25 @@ function xt(n, e, t) {
|
|
|
2364
2362
|
r = i;
|
|
2365
2363
|
}, o;
|
|
2366
2364
|
}
|
|
2367
|
-
function
|
|
2365
|
+
function Bn(n, e) {
|
|
2368
2366
|
if (n === void 0)
|
|
2369
2367
|
throw new Error("Unexpected undefined");
|
|
2370
2368
|
return n;
|
|
2371
2369
|
}
|
|
2372
|
-
const
|
|
2370
|
+
const to = (n, e) => Math.abs(n - e) < 1.01, no = (n, e, t) => {
|
|
2373
2371
|
let r;
|
|
2374
2372
|
return function(...s) {
|
|
2375
2373
|
n.clearTimeout(r), r = n.setTimeout(() => e.apply(this, s), t);
|
|
2376
2374
|
};
|
|
2377
|
-
},
|
|
2375
|
+
}, Yn = (n) => {
|
|
2378
2376
|
const { offsetWidth: e, offsetHeight: t } = n;
|
|
2379
2377
|
return { width: e, height: t };
|
|
2380
|
-
},
|
|
2378
|
+
}, ro = (n) => n, so = (n) => {
|
|
2381
2379
|
const e = Math.max(n.startIndex - n.overscan, 0), t = Math.min(n.endIndex + n.overscan, n.count - 1), r = [];
|
|
2382
2380
|
for (let s = e; s <= t; s++)
|
|
2383
2381
|
r.push(s);
|
|
2384
2382
|
return r;
|
|
2385
|
-
},
|
|
2383
|
+
}, oo = (n, e) => {
|
|
2386
2384
|
const t = n.scrollElement;
|
|
2387
2385
|
if (!t)
|
|
2388
2386
|
return;
|
|
@@ -2390,32 +2388,32 @@ const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
|
|
|
2390
2388
|
if (!r)
|
|
2391
2389
|
return;
|
|
2392
2390
|
const s = (i) => {
|
|
2393
|
-
const { width: c, height:
|
|
2394
|
-
e({ width: Math.round(c), height: Math.round(
|
|
2391
|
+
const { width: c, height: l } = i;
|
|
2392
|
+
e({ width: Math.round(c), height: Math.round(l) });
|
|
2395
2393
|
};
|
|
2396
|
-
if (s(
|
|
2394
|
+
if (s(Yn(t)), !r.ResizeObserver)
|
|
2397
2395
|
return () => {
|
|
2398
2396
|
};
|
|
2399
2397
|
const o = new r.ResizeObserver((i) => {
|
|
2400
2398
|
const c = () => {
|
|
2401
|
-
const
|
|
2402
|
-
if (
|
|
2403
|
-
const u =
|
|
2399
|
+
const l = i[0];
|
|
2400
|
+
if (l?.borderBoxSize) {
|
|
2401
|
+
const u = l.borderBoxSize[0];
|
|
2404
2402
|
if (u) {
|
|
2405
2403
|
s({ width: u.inlineSize, height: u.blockSize });
|
|
2406
2404
|
return;
|
|
2407
2405
|
}
|
|
2408
2406
|
}
|
|
2409
|
-
s(
|
|
2407
|
+
s(Yn(t));
|
|
2410
2408
|
};
|
|
2411
2409
|
n.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(c) : c();
|
|
2412
2410
|
});
|
|
2413
2411
|
return o.observe(t, { box: "border-box" }), () => {
|
|
2414
2412
|
o.unobserve(t);
|
|
2415
2413
|
};
|
|
2416
|
-
},
|
|
2414
|
+
}, Xn = {
|
|
2417
2415
|
passive: !0
|
|
2418
|
-
},
|
|
2416
|
+
}, Gn = typeof window > "u" ? !0 : "onscrollend" in window, io = (n, e) => {
|
|
2419
2417
|
const t = n.scrollElement;
|
|
2420
2418
|
if (!t)
|
|
2421
2419
|
return;
|
|
@@ -2423,23 +2421,23 @@ const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
|
|
|
2423
2421
|
if (!r)
|
|
2424
2422
|
return;
|
|
2425
2423
|
let s = 0;
|
|
2426
|
-
const o = n.options.useScrollendEvent &&
|
|
2427
|
-
} :
|
|
2424
|
+
const o = n.options.useScrollendEvent && Gn ? () => {
|
|
2425
|
+
} : no(
|
|
2428
2426
|
r,
|
|
2429
2427
|
() => {
|
|
2430
2428
|
e(s, !1);
|
|
2431
2429
|
},
|
|
2432
2430
|
n.options.isScrollingResetDelay
|
|
2433
|
-
), i = (
|
|
2431
|
+
), i = (a) => () => {
|
|
2434
2432
|
const { horizontal: h, isRtl: f } = n.options;
|
|
2435
|
-
s = h ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, o(), e(s,
|
|
2436
|
-
}, c = i(!0),
|
|
2437
|
-
|
|
2438
|
-
const u = n.options.useScrollendEvent &&
|
|
2439
|
-
return u && t.addEventListener("scrollend",
|
|
2440
|
-
t.removeEventListener("scroll", c), u && t.removeEventListener("scrollend",
|
|
2433
|
+
s = h ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, o(), e(s, a);
|
|
2434
|
+
}, c = i(!0), l = i(!1);
|
|
2435
|
+
l(), t.addEventListener("scroll", c, Xn);
|
|
2436
|
+
const u = n.options.useScrollendEvent && Gn;
|
|
2437
|
+
return u && t.addEventListener("scrollend", l, Xn), () => {
|
|
2438
|
+
t.removeEventListener("scroll", c), u && t.removeEventListener("scrollend", l);
|
|
2441
2439
|
};
|
|
2442
|
-
},
|
|
2440
|
+
}, co = (n, e, t) => {
|
|
2443
2441
|
if (e?.borderBoxSize) {
|
|
2444
2442
|
const r = e.borderBoxSize[0];
|
|
2445
2443
|
if (r)
|
|
@@ -2448,7 +2446,7 @@ const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
|
|
|
2448
2446
|
);
|
|
2449
2447
|
}
|
|
2450
2448
|
return n[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
2451
|
-
},
|
|
2449
|
+
}, ao = (n, {
|
|
2452
2450
|
adjustments: e = 0,
|
|
2453
2451
|
behavior: t
|
|
2454
2452
|
}, r) => {
|
|
@@ -2459,7 +2457,7 @@ const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
|
|
|
2459
2457
|
behavior: t
|
|
2460
2458
|
});
|
|
2461
2459
|
};
|
|
2462
|
-
class
|
|
2460
|
+
class lo {
|
|
2463
2461
|
constructor(e) {
|
|
2464
2462
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
2465
2463
|
let t = null;
|
|
@@ -2497,11 +2495,11 @@ class co {
|
|
|
2497
2495
|
scrollPaddingStart: 0,
|
|
2498
2496
|
scrollPaddingEnd: 0,
|
|
2499
2497
|
horizontal: !1,
|
|
2500
|
-
getItemKey:
|
|
2501
|
-
rangeExtractor:
|
|
2498
|
+
getItemKey: ro,
|
|
2499
|
+
rangeExtractor: so,
|
|
2502
2500
|
onChange: () => {
|
|
2503
2501
|
},
|
|
2504
|
-
measureElement:
|
|
2502
|
+
measureElement: co,
|
|
2505
2503
|
initialRect: { width: 0, height: 0 },
|
|
2506
2504
|
scrollMargin: 0,
|
|
2507
2505
|
gap: 0,
|
|
@@ -2569,10 +2567,10 @@ class co {
|
|
|
2569
2567
|
const c = t[i];
|
|
2570
2568
|
if (s.has(c.lane))
|
|
2571
2569
|
continue;
|
|
2572
|
-
const
|
|
2570
|
+
const l = o.get(
|
|
2573
2571
|
c.lane
|
|
2574
2572
|
);
|
|
2575
|
-
if (
|
|
2573
|
+
if (l == null || c.end > l.end ? o.set(c.lane, c) : c.end < l.end && s.set(c.lane, !0), s.size === this.options.lanes)
|
|
2576
2574
|
break;
|
|
2577
2575
|
}
|
|
2578
2576
|
return o.size === this.options.lanes ? Array.from(o.values()).sort((i, c) => i.end === c.end ? i.index - c.index : i.end - c.end)[0] : void 0;
|
|
@@ -2599,21 +2597,21 @@ class co {
|
|
|
2599
2597
|
({ count: t, paddingStart: r, scrollMargin: s, getItemKey: o, enabled: i }, c) => {
|
|
2600
2598
|
if (!i)
|
|
2601
2599
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
2602
|
-
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((
|
|
2603
|
-
this.itemSizeCache.set(
|
|
2600
|
+
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((a) => {
|
|
2601
|
+
this.itemSizeCache.set(a.key, a.size);
|
|
2604
2602
|
}));
|
|
2605
|
-
const
|
|
2603
|
+
const l = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
2606
2604
|
this.pendingMeasuredCacheIndexes = [];
|
|
2607
|
-
const u = this.measurementsCache.slice(0,
|
|
2608
|
-
for (let
|
|
2609
|
-
const h = o(
|
|
2610
|
-
u[
|
|
2611
|
-
index:
|
|
2605
|
+
const u = this.measurementsCache.slice(0, l);
|
|
2606
|
+
for (let a = l; a < t; a++) {
|
|
2607
|
+
const h = o(a), f = this.options.lanes === 1 ? u[a - 1] : this.getFurthestMeasurement(u, a), m = f ? f.end + this.options.gap : r + s, g = c.get(h), b = typeof g == "number" ? g : this.options.estimateSize(a), v = m + b, w = f ? f.lane : a % this.options.lanes;
|
|
2608
|
+
u[a] = {
|
|
2609
|
+
index: a,
|
|
2612
2610
|
start: m,
|
|
2613
|
-
size:
|
|
2614
|
-
end:
|
|
2611
|
+
size: b,
|
|
2612
|
+
end: v,
|
|
2615
2613
|
key: h,
|
|
2616
|
-
lane:
|
|
2614
|
+
lane: w
|
|
2617
2615
|
};
|
|
2618
2616
|
}
|
|
2619
2617
|
return this.measurementsCache = u, u;
|
|
@@ -2629,7 +2627,7 @@ class co {
|
|
|
2629
2627
|
this.getScrollOffset(),
|
|
2630
2628
|
this.options.lanes
|
|
2631
2629
|
],
|
|
2632
|
-
(t, r, s, o) => this.range = t.length > 0 && r > 0 ?
|
|
2630
|
+
(t, r, s, o) => this.range = t.length > 0 && r > 0 ? uo({
|
|
2633
2631
|
measurements: t,
|
|
2634
2632
|
outerSize: r,
|
|
2635
2633
|
scrollOffset: s,
|
|
@@ -2694,8 +2692,8 @@ class co {
|
|
|
2694
2692
|
(t, r) => {
|
|
2695
2693
|
const s = [];
|
|
2696
2694
|
for (let o = 0, i = t.length; o < i; o++) {
|
|
2697
|
-
const c = t[o],
|
|
2698
|
-
s.push(
|
|
2695
|
+
const c = t[o], l = r[c];
|
|
2696
|
+
s.push(l);
|
|
2699
2697
|
}
|
|
2700
2698
|
return s;
|
|
2701
2699
|
},
|
|
@@ -2706,11 +2704,11 @@ class co {
|
|
|
2706
2704
|
), this.getVirtualItemForOffset = (t) => {
|
|
2707
2705
|
const r = this.getMeasurements();
|
|
2708
2706
|
if (r.length !== 0)
|
|
2709
|
-
return
|
|
2710
|
-
r[
|
|
2707
|
+
return Bn(
|
|
2708
|
+
r[mr(
|
|
2711
2709
|
0,
|
|
2712
2710
|
r.length - 1,
|
|
2713
|
-
(s) =>
|
|
2711
|
+
(s) => Bn(r[s]).start,
|
|
2714
2712
|
t
|
|
2715
2713
|
)]
|
|
2716
2714
|
);
|
|
@@ -2751,21 +2749,21 @@ class co {
|
|
|
2751
2749
|
let o = 0;
|
|
2752
2750
|
const i = 10, c = (u) => {
|
|
2753
2751
|
if (!this.targetWindow) return;
|
|
2754
|
-
const
|
|
2755
|
-
if (!
|
|
2752
|
+
const a = this.getOffsetForIndex(t, u);
|
|
2753
|
+
if (!a) {
|
|
2756
2754
|
console.warn("Failed to get offset for index:", t);
|
|
2757
2755
|
return;
|
|
2758
2756
|
}
|
|
2759
|
-
const [h, f] =
|
|
2757
|
+
const [h, f] = a;
|
|
2760
2758
|
this._scrollToOffset(h, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
|
|
2761
|
-
const m = this.getScrollOffset(),
|
|
2762
|
-
if (!
|
|
2759
|
+
const m = this.getScrollOffset(), g = this.getOffsetForIndex(t, f);
|
|
2760
|
+
if (!g) {
|
|
2763
2761
|
console.warn("Failed to get offset for index:", t);
|
|
2764
2762
|
return;
|
|
2765
2763
|
}
|
|
2766
|
-
|
|
2764
|
+
to(g[0], m) || l(f);
|
|
2767
2765
|
});
|
|
2768
|
-
},
|
|
2766
|
+
}, l = (u) => {
|
|
2769
2767
|
this.targetWindow && (o++, o < i ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", o, i), this.targetWindow.requestAnimationFrame(() => c(u))) : console.warn(
|
|
2770
2768
|
`Failed to scroll to index ${t} after ${i} attempts.`
|
|
2771
2769
|
));
|
|
@@ -2809,7 +2807,7 @@ class co {
|
|
|
2809
2807
|
}, this.setOptions(e);
|
|
2810
2808
|
}
|
|
2811
2809
|
}
|
|
2812
|
-
const
|
|
2810
|
+
const mr = (n, e, t, r) => {
|
|
2813
2811
|
for (; n <= e; ) {
|
|
2814
2812
|
const s = (n + e) / 2 | 0, o = t(s);
|
|
2815
2813
|
if (o < r)
|
|
@@ -2821,19 +2819,19 @@ const dr = (n, e, t, r) => {
|
|
|
2821
2819
|
}
|
|
2822
2820
|
return n > 0 ? n - 1 : 0;
|
|
2823
2821
|
};
|
|
2824
|
-
function
|
|
2822
|
+
function uo({
|
|
2825
2823
|
measurements: n,
|
|
2826
2824
|
outerSize: e,
|
|
2827
2825
|
scrollOffset: t,
|
|
2828
2826
|
lanes: r
|
|
2829
2827
|
}) {
|
|
2830
|
-
const s = n.length - 1, o = (
|
|
2828
|
+
const s = n.length - 1, o = (l) => n[l].start;
|
|
2831
2829
|
if (n.length <= r)
|
|
2832
2830
|
return {
|
|
2833
2831
|
startIndex: 0,
|
|
2834
2832
|
endIndex: s
|
|
2835
2833
|
};
|
|
2836
|
-
let i =
|
|
2834
|
+
let i = mr(
|
|
2837
2835
|
0,
|
|
2838
2836
|
s,
|
|
2839
2837
|
o,
|
|
@@ -2843,42 +2841,42 @@ function ao({
|
|
|
2843
2841
|
for (; c < s && n[c].end < t + e; )
|
|
2844
2842
|
c++;
|
|
2845
2843
|
else if (r > 1) {
|
|
2846
|
-
const
|
|
2847
|
-
for (; c < s &&
|
|
2848
|
-
const
|
|
2849
|
-
a
|
|
2844
|
+
const l = Array(r).fill(0);
|
|
2845
|
+
for (; c < s && l.some((a) => a < t + e); ) {
|
|
2846
|
+
const a = n[c];
|
|
2847
|
+
l[a.lane] = a.end, c++;
|
|
2850
2848
|
}
|
|
2851
2849
|
const u = Array(r).fill(t + e);
|
|
2852
|
-
for (; i >= 0 && u.some((
|
|
2853
|
-
const
|
|
2854
|
-
u[
|
|
2850
|
+
for (; i >= 0 && u.some((a) => a >= t); ) {
|
|
2851
|
+
const a = n[i];
|
|
2852
|
+
u[a.lane] = a.start, i--;
|
|
2855
2853
|
}
|
|
2856
2854
|
i = Math.max(0, i - i % r), c = Math.min(s, c + (r - 1 - c % r));
|
|
2857
2855
|
}
|
|
2858
2856
|
return { startIndex: i, endIndex: c };
|
|
2859
2857
|
}
|
|
2860
|
-
const
|
|
2861
|
-
function
|
|
2858
|
+
const Kn = typeof document < "u" ? p.useLayoutEffect : p.useEffect;
|
|
2859
|
+
function fo(n) {
|
|
2862
2860
|
const e = p.useReducer(() => ({}), {})[1], t = {
|
|
2863
2861
|
...n,
|
|
2864
2862
|
onChange: (s, o) => {
|
|
2865
2863
|
var i;
|
|
2866
|
-
o ?
|
|
2864
|
+
o ? Nr(e) : e(), (i = n.onChange) == null || i.call(n, s, o);
|
|
2867
2865
|
}
|
|
2868
2866
|
}, [r] = p.useState(
|
|
2869
|
-
() => new
|
|
2867
|
+
() => new lo(t)
|
|
2870
2868
|
);
|
|
2871
|
-
return r.setOptions(t),
|
|
2869
|
+
return r.setOptions(t), Kn(() => r._didMount(), []), Kn(() => r._willUpdate()), r;
|
|
2872
2870
|
}
|
|
2873
|
-
function
|
|
2874
|
-
return
|
|
2875
|
-
observeElementRect:
|
|
2876
|
-
observeElementOffset:
|
|
2877
|
-
scrollToFn:
|
|
2871
|
+
function pr(n) {
|
|
2872
|
+
return fo({
|
|
2873
|
+
observeElementRect: oo,
|
|
2874
|
+
observeElementOffset: io,
|
|
2875
|
+
scrollToFn: ao,
|
|
2878
2876
|
...n
|
|
2879
2877
|
});
|
|
2880
2878
|
}
|
|
2881
|
-
const
|
|
2879
|
+
const ho = (n) => {
|
|
2882
2880
|
const {
|
|
2883
2881
|
rowData: e,
|
|
2884
2882
|
style: t = {},
|
|
@@ -2887,11 +2885,11 @@ const uo = (n) => {
|
|
|
2887
2885
|
onContextMenuRow: o,
|
|
2888
2886
|
scrollContainerRef: i,
|
|
2889
2887
|
startLeft: c,
|
|
2890
|
-
scale:
|
|
2888
|
+
scale: l,
|
|
2891
2889
|
scaleWidth: u
|
|
2892
|
-
} = n,
|
|
2893
|
-
e?.selected &&
|
|
2894
|
-
const h =
|
|
2890
|
+
} = n, a = ["edit-row"];
|
|
2891
|
+
e?.selected && a.push("edit-row-selected");
|
|
2892
|
+
const h = l ?? Yt, f = u ?? Xt, m = c ?? Jt, g = (_) => {
|
|
2895
2893
|
if (!i.current) return 0;
|
|
2896
2894
|
const y = _.currentTarget.getBoundingClientRect(), x = _.clientX - y.x;
|
|
2897
2895
|
return rt(x, {
|
|
@@ -2899,60 +2897,62 @@ const uo = (n) => {
|
|
|
2899
2897
|
scale: h,
|
|
2900
2898
|
scaleWidth: f
|
|
2901
2899
|
});
|
|
2902
|
-
},
|
|
2900
|
+
}, b = Or(() => (e?.actions ? [...e.actions] : []).sort((_, S) => _.start - S.start), [e]), v = er((_) => b[_]?.id ?? _, [b]), w = pr({
|
|
2903
2901
|
horizontal: !0,
|
|
2904
|
-
count:
|
|
2905
|
-
getItemKey:
|
|
2902
|
+
count: b.length,
|
|
2903
|
+
getItemKey: v,
|
|
2906
2904
|
getScrollElement: () => i.current,
|
|
2907
2905
|
estimateSize: (_) => {
|
|
2908
|
-
if (!
|
|
2906
|
+
if (!b[_]) return 0;
|
|
2907
|
+
let S = _ > 0 ? b[_ - 1].end : 0, y = b[_].end;
|
|
2908
|
+
if (S > y) return 0;
|
|
2909
2909
|
let {
|
|
2910
|
-
width:
|
|
2911
|
-
} =
|
|
2912
|
-
start:
|
|
2913
|
-
end:
|
|
2910
|
+
width: T
|
|
2911
|
+
} = vn({
|
|
2912
|
+
start: S,
|
|
2913
|
+
end: y
|
|
2914
2914
|
}, {
|
|
2915
2915
|
startLeft: m,
|
|
2916
2916
|
scale: h,
|
|
2917
2917
|
scaleWidth: f
|
|
2918
2918
|
});
|
|
2919
|
-
return
|
|
2919
|
+
return T;
|
|
2920
2920
|
},
|
|
2921
|
-
overscan:
|
|
2921
|
+
overscan: 5
|
|
2922
2922
|
});
|
|
2923
|
-
return
|
|
2924
|
-
|
|
2925
|
-
}, [u, c,
|
|
2923
|
+
return gn(() => {
|
|
2924
|
+
w.measure();
|
|
2925
|
+
}, [u, c, w]), /* @__PURE__ */ R.jsx("div", { className: `${de(...a)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (_) => {
|
|
2926
2926
|
if (e && r) {
|
|
2927
|
-
const
|
|
2927
|
+
const S = g(_);
|
|
2928
2928
|
r(_, {
|
|
2929
2929
|
row: e,
|
|
2930
|
-
time:
|
|
2930
|
+
time: S
|
|
2931
2931
|
});
|
|
2932
2932
|
}
|
|
2933
2933
|
}, onDoubleClick: (_) => {
|
|
2934
2934
|
if (e && s) {
|
|
2935
|
-
const
|
|
2935
|
+
const S = g(_);
|
|
2936
2936
|
s(_, {
|
|
2937
2937
|
row: e,
|
|
2938
|
-
time:
|
|
2938
|
+
time: S
|
|
2939
2939
|
});
|
|
2940
2940
|
}
|
|
2941
2941
|
}, onContextMenu: (_) => {
|
|
2942
2942
|
if (e && o) {
|
|
2943
|
-
const
|
|
2943
|
+
const S = g(_);
|
|
2944
2944
|
o(_, {
|
|
2945
2945
|
row: e,
|
|
2946
|
-
time:
|
|
2946
|
+
time: S
|
|
2947
2947
|
});
|
|
2948
2948
|
}
|
|
2949
|
-
}, children: e &&
|
|
2950
|
-
const
|
|
2951
|
-
if (!
|
|
2952
|
-
return /* @__PURE__ */
|
|
2949
|
+
}, children: e && w.getVirtualItems().map((_) => {
|
|
2950
|
+
const S = b[_.index];
|
|
2951
|
+
if (!S) throw new Error("Action not found");
|
|
2952
|
+
return /* @__PURE__ */ R.jsx(eo, { ...n, handleTime: g, row: e, action: S }, S.id);
|
|
2953
2953
|
}) });
|
|
2954
2954
|
};
|
|
2955
|
-
function
|
|
2955
|
+
function mo() {
|
|
2956
2956
|
const n = ze.c(6);
|
|
2957
2957
|
let e;
|
|
2958
2958
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
@@ -2960,42 +2960,42 @@ function fo() {
|
|
|
2960
2960
|
movePositions: [],
|
|
2961
2961
|
assistPositions: []
|
|
2962
2962
|
}, n[0] = e) : e = n[0];
|
|
2963
|
-
const [t, r] =
|
|
2963
|
+
const [t, r] = At(e), s = go, o = po;
|
|
2964
2964
|
let i;
|
|
2965
2965
|
n[1] === Symbol.for("react.memo_cache_sentinel") ? (i = (m) => {
|
|
2966
2966
|
const {
|
|
2967
|
-
movePositions:
|
|
2968
|
-
assistPositions:
|
|
2967
|
+
movePositions: g,
|
|
2968
|
+
assistPositions: b
|
|
2969
2969
|
} = m;
|
|
2970
2970
|
r({
|
|
2971
2971
|
isMoving: !0,
|
|
2972
|
-
movePositions:
|
|
2973
|
-
assistPositions:
|
|
2972
|
+
movePositions: g || [],
|
|
2973
|
+
assistPositions: b || []
|
|
2974
2974
|
});
|
|
2975
2975
|
}, n[1] = i) : i = n[1];
|
|
2976
2976
|
const c = i;
|
|
2977
|
-
let
|
|
2978
|
-
n[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2977
|
+
let l;
|
|
2978
|
+
n[2] === Symbol.for("react.memo_cache_sentinel") ? (l = (m) => {
|
|
2979
2979
|
const {
|
|
2980
|
-
movePositions:
|
|
2981
|
-
assistPositions:
|
|
2980
|
+
movePositions: g,
|
|
2981
|
+
assistPositions: b
|
|
2982
2982
|
} = m;
|
|
2983
|
-
r((
|
|
2984
|
-
...
|
|
2985
|
-
movePositions:
|
|
2986
|
-
assistPositions:
|
|
2983
|
+
r((v) => ({
|
|
2984
|
+
...v,
|
|
2985
|
+
movePositions: g || v.movePositions,
|
|
2986
|
+
assistPositions: b || v.assistPositions
|
|
2987
2987
|
}));
|
|
2988
|
-
}, n[2] =
|
|
2989
|
-
const u =
|
|
2990
|
-
let
|
|
2991
|
-
n[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2988
|
+
}, n[2] = l) : l = n[2];
|
|
2989
|
+
const u = l;
|
|
2990
|
+
let a;
|
|
2991
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (a = () => {
|
|
2992
2992
|
r({
|
|
2993
2993
|
isMoving: !1,
|
|
2994
2994
|
movePositions: [],
|
|
2995
2995
|
assistPositions: []
|
|
2996
2996
|
});
|
|
2997
|
-
}, n[3] =
|
|
2998
|
-
const h =
|
|
2997
|
+
}, n[3] = a) : a = n[3];
|
|
2998
|
+
const h = a;
|
|
2999
2999
|
let f;
|
|
3000
3000
|
return n[4] !== t ? (f = {
|
|
3001
3001
|
initDragLine: c,
|
|
@@ -3006,7 +3006,7 @@ function fo() {
|
|
|
3006
3006
|
defaultGetMovePosition: o
|
|
3007
3007
|
}, n[4] = t, n[5] = f) : f = n[5], f;
|
|
3008
3008
|
}
|
|
3009
|
-
function
|
|
3009
|
+
function po(n) {
|
|
3010
3010
|
const {
|
|
3011
3011
|
start: e,
|
|
3012
3012
|
end: t,
|
|
@@ -3016,8 +3016,8 @@ function ho(n) {
|
|
|
3016
3016
|
startLeft: i
|
|
3017
3017
|
} = n, {
|
|
3018
3018
|
left: c,
|
|
3019
|
-
width:
|
|
3020
|
-
} =
|
|
3019
|
+
width: l
|
|
3020
|
+
} = vn({
|
|
3021
3021
|
start: e,
|
|
3022
3022
|
end: t
|
|
3023
3023
|
}, {
|
|
@@ -3025,9 +3025,9 @@ function ho(n) {
|
|
|
3025
3025
|
scaleWidth: o,
|
|
3026
3026
|
scale: s
|
|
3027
3027
|
});
|
|
3028
|
-
return r ? r === "right" ? [c +
|
|
3028
|
+
return r ? r === "right" ? [c + l] : [c] : [c, c + l];
|
|
3029
3029
|
}
|
|
3030
|
-
function
|
|
3030
|
+
function go(n) {
|
|
3031
3031
|
const {
|
|
3032
3032
|
editorData: e,
|
|
3033
3033
|
assistActionIds: t,
|
|
@@ -3036,26 +3036,26 @@ function mo(n) {
|
|
|
3036
3036
|
scale: o,
|
|
3037
3037
|
scaleWidth: i,
|
|
3038
3038
|
startLeft: c,
|
|
3039
|
-
cursorLeft:
|
|
3039
|
+
cursorLeft: l,
|
|
3040
3040
|
hideCursor: u
|
|
3041
|
-
} = n,
|
|
3041
|
+
} = n, a = [];
|
|
3042
3042
|
t ? e.forEach((f) => {
|
|
3043
3043
|
f.actions.forEach((m) => {
|
|
3044
|
-
t.includes(m.id) &&
|
|
3044
|
+
t.includes(m.id) && a.push(m);
|
|
3045
3045
|
});
|
|
3046
3046
|
}) : e.forEach((f) => {
|
|
3047
|
-
f.id !== s.id ?
|
|
3048
|
-
m.id !== r.id &&
|
|
3047
|
+
f.id !== s.id ? a.push(...f.actions) : f.actions.forEach((m) => {
|
|
3048
|
+
m.id !== r.id && a.push(m);
|
|
3049
3049
|
});
|
|
3050
3050
|
});
|
|
3051
|
-
const h =
|
|
3051
|
+
const h = Yr(a, {
|
|
3052
3052
|
startLeft: c,
|
|
3053
3053
|
scale: o,
|
|
3054
3054
|
scaleWidth: i
|
|
3055
3055
|
});
|
|
3056
|
-
return u || h.push(
|
|
3056
|
+
return u || h.push(l), h;
|
|
3057
3057
|
}
|
|
3058
|
-
const
|
|
3058
|
+
const vo = (n) => {
|
|
3059
3059
|
const e = ze.c(35);
|
|
3060
3060
|
let t, r;
|
|
3061
3061
|
e[0] !== n ? ({
|
|
@@ -3067,91 +3067,91 @@ const po = (n) => {
|
|
|
3067
3067
|
initDragLine: o,
|
|
3068
3068
|
updateDragLine: i,
|
|
3069
3069
|
disposeDragLine: c,
|
|
3070
|
-
defaultGetAssistPosition:
|
|
3070
|
+
defaultGetAssistPosition: l,
|
|
3071
3071
|
defaultGetMovePosition: u
|
|
3072
|
-
} =
|
|
3073
|
-
let
|
|
3074
|
-
e[3] !==
|
|
3072
|
+
} = mo();
|
|
3073
|
+
let a;
|
|
3074
|
+
e[3] !== l || e[4] !== o || e[5] !== t ? (a = (D) => {
|
|
3075
3075
|
if (t.dragLine) {
|
|
3076
|
-
const
|
|
3077
|
-
action:
|
|
3078
|
-
row:
|
|
3076
|
+
const L = t.getAssistDragLineActionIds && t.getAssistDragLineActionIds({
|
|
3077
|
+
action: D.action,
|
|
3078
|
+
row: D.row,
|
|
3079
3079
|
editorData: t.editorData
|
|
3080
|
-
}),
|
|
3081
|
-
scaleWidth:
|
|
3082
|
-
scale:
|
|
3080
|
+
}), k = t.scaleWidth ?? 160, F = t.scale ?? 1, K = t.startLeft ?? 20, O = t.hideCursor ?? !1, I = je(t.cursorTime, {
|
|
3081
|
+
scaleWidth: k,
|
|
3082
|
+
scale: F,
|
|
3083
3083
|
startLeft: K
|
|
3084
|
-
}), G =
|
|
3084
|
+
}), G = l({
|
|
3085
3085
|
editorData: t.editorData,
|
|
3086
|
-
assistActionIds:
|
|
3087
|
-
action:
|
|
3088
|
-
row:
|
|
3089
|
-
scale:
|
|
3090
|
-
scaleWidth:
|
|
3086
|
+
assistActionIds: L,
|
|
3087
|
+
action: D.action,
|
|
3088
|
+
row: D.row,
|
|
3089
|
+
scale: F,
|
|
3090
|
+
scaleWidth: k,
|
|
3091
3091
|
startLeft: K,
|
|
3092
|
-
hideCursor:
|
|
3093
|
-
cursorLeft:
|
|
3092
|
+
hideCursor: O,
|
|
3093
|
+
cursorLeft: I
|
|
3094
3094
|
});
|
|
3095
3095
|
o({
|
|
3096
3096
|
assistPositions: G
|
|
3097
3097
|
});
|
|
3098
3098
|
}
|
|
3099
|
-
}, e[3] =
|
|
3100
|
-
const h =
|
|
3099
|
+
}, e[3] = l, e[4] = o, e[5] = t, e[6] = a) : a = e[6];
|
|
3100
|
+
const h = a;
|
|
3101
3101
|
let f;
|
|
3102
|
-
e[7] !== u || e[8] !== t.dragLine || e[9] !== t.scale || e[10] !== t.scaleWidth || e[11] !== t.startLeft || e[12] !== i ? (f = (
|
|
3102
|
+
e[7] !== u || e[8] !== t.dragLine || e[9] !== t.scale || e[10] !== t.scaleWidth || e[11] !== t.startLeft || e[12] !== i ? (f = (D) => {
|
|
3103
3103
|
if (t.dragLine) {
|
|
3104
|
-
const
|
|
3105
|
-
...
|
|
3106
|
-
startLeft:
|
|
3107
|
-
scaleWidth:
|
|
3108
|
-
scale:
|
|
3104
|
+
const L = t.scaleWidth ?? 160, k = t.scale ?? 1, F = t.startLeft ?? 20, K = u({
|
|
3105
|
+
...D,
|
|
3106
|
+
startLeft: F,
|
|
3107
|
+
scaleWidth: L,
|
|
3108
|
+
scale: k
|
|
3109
3109
|
});
|
|
3110
3110
|
i({
|
|
3111
3111
|
movePositions: K
|
|
3112
3112
|
});
|
|
3113
3113
|
}
|
|
3114
3114
|
}, e[7] = u, e[8] = t.dragLine, e[9] = t.scale, e[10] = t.scaleWidth, e[11] = t.startLeft, e[12] = i, e[13] = f) : f = e[13];
|
|
3115
|
-
const m = f,
|
|
3115
|
+
const m = f, g = t.rowHeight ?? 32, b = t.scaleWidth ?? 160, v = t.startLeft ?? 20, w = Math.max(t.scaleCount * b + v, t.timelineWidth);
|
|
3116
3116
|
let _;
|
|
3117
|
-
if (e[14] !==
|
|
3118
|
-
const
|
|
3119
|
-
let
|
|
3120
|
-
for (let
|
|
3121
|
-
const
|
|
3122
|
-
if (!
|
|
3117
|
+
if (e[14] !== w || e[15] !== g || e[16] !== c || e[17] !== s || e[18] !== h || e[19] !== m || e[20] !== t) {
|
|
3118
|
+
const D = [];
|
|
3119
|
+
let L = 0;
|
|
3120
|
+
for (let k = 0; k < t.editorData.length; k++) {
|
|
3121
|
+
const F = t.editorData[k];
|
|
3122
|
+
if (!F)
|
|
3123
3123
|
continue;
|
|
3124
|
-
const K =
|
|
3125
|
-
|
|
3124
|
+
const K = F.rowHeight || g;
|
|
3125
|
+
D.push(/* @__PURE__ */ Mr(ho, { ...t, key: F.id, rowData: F, dragLineData: s, scrollContainerRef: t.scrollElementRef, style: {
|
|
3126
3126
|
position: "absolute",
|
|
3127
3127
|
top: 0,
|
|
3128
3128
|
left: 0,
|
|
3129
|
-
width:
|
|
3129
|
+
width: w,
|
|
3130
3130
|
height: `${K}px`,
|
|
3131
|
-
transform: `translateY(${
|
|
3132
|
-
}, onActionMoveStart: (
|
|
3131
|
+
transform: `translateY(${L}px)`
|
|
3132
|
+
}, onActionMoveStart: (O) => (h(O), t.onActionMoveStart && t.onActionMoveStart(O)), onActionResizeStart: (O) => (h(O), t.onActionResizeStart && t.onActionResizeStart(O)), onActionMoving: (O) => (m(O), t.onActionMoving && t.onActionMoving(O)), onActionResizing: (O) => (m(O), t.onActionResizing && t.onActionResizing(O)), onActionResizeEnd: (O) => (c(), t.onActionResizeEnd && t.onActionResizeEnd(O)), onActionMoveEnd: (O) => (c(), t.onActionMoveEnd && t.onActionMoveEnd(O)) })), L = L + K;
|
|
3133
3133
|
}
|
|
3134
|
-
_ = [
|
|
3134
|
+
_ = [L, D], e[14] = w, e[15] = g, e[16] = c, e[17] = s, e[18] = h, e[19] = m, e[20] = t, e[21] = _;
|
|
3135
3135
|
} else
|
|
3136
3136
|
_ = e[21];
|
|
3137
|
-
const [
|
|
3138
|
-
let
|
|
3139
|
-
e[22] !==
|
|
3140
|
-
width:
|
|
3141
|
-
height:
|
|
3137
|
+
const [S, y] = _, T = `0, ${t.startLeft ?? 20}px`, x = `${t.startLeft ?? 20}px, ${t.scaleWidth ?? 160}px`;
|
|
3138
|
+
let C;
|
|
3139
|
+
e[22] !== w || e[23] !== T || e[24] !== x || e[25] !== S ? (C = {
|
|
3140
|
+
width: w,
|
|
3141
|
+
height: S,
|
|
3142
3142
|
position: "relative",
|
|
3143
|
-
backgroundPositionX:
|
|
3143
|
+
backgroundPositionX: T,
|
|
3144
3144
|
backgroundSize: x
|
|
3145
|
-
}, e[22] =
|
|
3146
|
-
let
|
|
3147
|
-
e[27] !== s || e[28] !== t.dragLine ? (
|
|
3148
|
-
let
|
|
3149
|
-
return e[30] !== r || e[31] !== y || e[32] !==
|
|
3145
|
+
}, e[22] = w, e[23] = T, e[24] = x, e[25] = S, e[26] = C) : C = e[26];
|
|
3146
|
+
let P;
|
|
3147
|
+
e[27] !== s || e[28] !== t.dragLine ? (P = t.dragLine && /* @__PURE__ */ R.jsx(Jr, { ...s }), e[27] = s, e[28] = t.dragLine, e[29] = P) : P = e[29];
|
|
3148
|
+
let E;
|
|
3149
|
+
return e[30] !== r || e[31] !== y || e[32] !== C || e[33] !== P ? (E = /* @__PURE__ */ R.jsxs("div", { ref: r, style: C, className: "timeline-editor-edit-area", children: [
|
|
3150
3150
|
y,
|
|
3151
|
-
|
|
3152
|
-
] }), e[30] = r, e[31] = y, e[32] =
|
|
3151
|
+
P
|
|
3152
|
+
] }), e[30] = r, e[31] = y, e[32] = C, e[33] = P, e[34] = E) : E = e[34], E;
|
|
3153
3153
|
};
|
|
3154
|
-
function
|
|
3154
|
+
function bo({
|
|
3155
3155
|
scaleSplitCount: n,
|
|
3156
3156
|
scaleWidth: e,
|
|
3157
3157
|
startLeft: t,
|
|
@@ -3160,47 +3160,47 @@ function go({
|
|
|
3160
3160
|
scale: o,
|
|
3161
3161
|
scrollElementRef: i,
|
|
3162
3162
|
onClickTimeArea: c,
|
|
3163
|
-
setCursor:
|
|
3163
|
+
setCursor: l
|
|
3164
3164
|
}) {
|
|
3165
|
-
const u = n ?? 1,
|
|
3165
|
+
const u = n ?? 1, a = e ?? 160, h = t ?? 20, f = (n ?? 0) > 0, m = f ? r * (n ?? 1) + 1 : r, g = (f ? a / u : a) * (m - 1) + h, v = pr({
|
|
3166
3166
|
horizontal: !0,
|
|
3167
3167
|
count: m,
|
|
3168
3168
|
getScrollElement: () => i.current,
|
|
3169
|
-
estimateSize: (
|
|
3170
|
-
switch (
|
|
3169
|
+
estimateSize: (w) => {
|
|
3170
|
+
switch (w) {
|
|
3171
3171
|
case 0:
|
|
3172
3172
|
return h;
|
|
3173
3173
|
default:
|
|
3174
|
-
return f ?
|
|
3174
|
+
return f ? a / u : a;
|
|
3175
3175
|
}
|
|
3176
3176
|
},
|
|
3177
3177
|
overscan: 10
|
|
3178
3178
|
});
|
|
3179
|
-
return et(() =>
|
|
3180
|
-
width: `${
|
|
3181
|
-
}, className: de("time-area"), onClick: (
|
|
3182
|
-
const _ = t ?? 20,
|
|
3183
|
-
if (
|
|
3184
|
-
const
|
|
3179
|
+
return et(() => v.measure(), [e, t, v]), /* @__PURE__ */ R.jsx("div", { style: {
|
|
3180
|
+
width: `${g}px`
|
|
3181
|
+
}, className: de("time-area"), onClick: (w) => {
|
|
3182
|
+
const _ = t ?? 20, S = e ?? 160, y = o ?? 1, T = s ?? 1 / 0, x = w.currentTarget.getBoundingClientRect(), C = w.clientX - x.x, P = Math.max(C, _);
|
|
3183
|
+
if (P > T * S + _) return;
|
|
3184
|
+
const E = rt(P, {
|
|
3185
3185
|
startLeft: _,
|
|
3186
3186
|
scale: y,
|
|
3187
|
-
scaleWidth:
|
|
3187
|
+
scaleWidth: S
|
|
3188
3188
|
});
|
|
3189
|
-
c && c(
|
|
3190
|
-
time:
|
|
3189
|
+
c && c(E, w), !w.defaultPrevented && l({
|
|
3190
|
+
time: E
|
|
3191
3191
|
});
|
|
3192
|
-
}, children:
|
|
3193
|
-
const _ =
|
|
3194
|
-
return /* @__PURE__ */
|
|
3195
|
-
width: `${
|
|
3196
|
-
transform: `translateX(${
|
|
3197
|
-
}, className: x.join(" "), children:
|
|
3192
|
+
}, children: v.getVirtualItems().map((w) => {
|
|
3193
|
+
const _ = w.index, S = n ?? 1, y = o ?? 1, T = f ? _ % S === 0 : !0, x = [de("time-unit"), de(T ? "time-unit-big" : "time-unit-small")], C = (f ? _ / S : _) * y;
|
|
3194
|
+
return /* @__PURE__ */ R.jsx("div", { "data-index": w.index, style: {
|
|
3195
|
+
width: `${w.size}px`,
|
|
3196
|
+
transform: `translateX(${w.start}px)`
|
|
3197
|
+
}, className: x.join(" "), children: T && /* @__PURE__ */ R.jsx("div", { className: de("time-unit-scale"), children: C }) }, w.key);
|
|
3198
3198
|
}) });
|
|
3199
3199
|
}
|
|
3200
|
-
function
|
|
3200
|
+
function _o(n) {
|
|
3201
3201
|
return typeof n == "object" && n !== null;
|
|
3202
3202
|
}
|
|
3203
|
-
function
|
|
3203
|
+
function wo(n, e, t) {
|
|
3204
3204
|
if (n instanceof EventTarget)
|
|
3205
3205
|
return [n];
|
|
3206
3206
|
if (typeof n == "string") {
|
|
@@ -3209,33 +3209,33 @@ function bo(n, e, t) {
|
|
|
3209
3209
|
}
|
|
3210
3210
|
return Array.from(n);
|
|
3211
3211
|
}
|
|
3212
|
-
function
|
|
3213
|
-
return
|
|
3212
|
+
function So(n) {
|
|
3213
|
+
return _o(n) && "ownerSVGElement" in n;
|
|
3214
3214
|
}
|
|
3215
3215
|
const $t = /* @__PURE__ */ new WeakMap();
|
|
3216
3216
|
let Ht;
|
|
3217
|
-
const
|
|
3218
|
-
function
|
|
3217
|
+
const gr = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : So(r) && "getBBox" in r ? r.getBBox()[e] : r[t], yo = /* @__PURE__ */ gr("inline", "width", "offsetWidth"), Eo = /* @__PURE__ */ gr("block", "height", "offsetHeight");
|
|
3218
|
+
function Ro({ target: n, borderBoxSize: e }) {
|
|
3219
3219
|
$t.get(n)?.forEach((t) => {
|
|
3220
3220
|
t(n, {
|
|
3221
3221
|
get width() {
|
|
3222
|
-
return
|
|
3222
|
+
return yo(n, e);
|
|
3223
3223
|
},
|
|
3224
3224
|
get height() {
|
|
3225
|
-
return
|
|
3225
|
+
return Eo(n, e);
|
|
3226
3226
|
}
|
|
3227
3227
|
});
|
|
3228
3228
|
});
|
|
3229
3229
|
}
|
|
3230
|
-
function
|
|
3231
|
-
n.forEach(
|
|
3230
|
+
function xo(n) {
|
|
3231
|
+
n.forEach(Ro);
|
|
3232
3232
|
}
|
|
3233
|
-
function
|
|
3234
|
-
typeof ResizeObserver > "u" || (Ht = new ResizeObserver(
|
|
3233
|
+
function Co() {
|
|
3234
|
+
typeof ResizeObserver > "u" || (Ht = new ResizeObserver(xo));
|
|
3235
3235
|
}
|
|
3236
|
-
function
|
|
3237
|
-
Ht ||
|
|
3238
|
-
const t =
|
|
3236
|
+
function Ao(n, e) {
|
|
3237
|
+
Ht || Co();
|
|
3238
|
+
const t = wo(n);
|
|
3239
3239
|
return t.forEach((r) => {
|
|
3240
3240
|
let s = $t.get(r);
|
|
3241
3241
|
s || (s = /* @__PURE__ */ new Set(), $t.set(r, s)), s.add(e), Ht?.observe(r);
|
|
@@ -3248,7 +3248,7 @@ function xo(n, e) {
|
|
|
3248
3248
|
}
|
|
3249
3249
|
const Bt = /* @__PURE__ */ new Set();
|
|
3250
3250
|
let Ct;
|
|
3251
|
-
function
|
|
3251
|
+
function To() {
|
|
3252
3252
|
Ct = () => {
|
|
3253
3253
|
const n = {
|
|
3254
3254
|
get width() {
|
|
@@ -3261,35 +3261,45 @@ function Co() {
|
|
|
3261
3261
|
Bt.forEach((e) => e(n));
|
|
3262
3262
|
}, window.addEventListener("resize", Ct);
|
|
3263
3263
|
}
|
|
3264
|
-
function
|
|
3265
|
-
return Bt.add(n), Ct ||
|
|
3264
|
+
function Po(n) {
|
|
3265
|
+
return Bt.add(n), Ct || To(), () => {
|
|
3266
3266
|
Bt.delete(n), !Bt.size && typeof Ct == "function" && (window.removeEventListener("resize", Ct), Ct = void 0);
|
|
3267
3267
|
};
|
|
3268
3268
|
}
|
|
3269
|
-
function
|
|
3270
|
-
return typeof n == "function" ?
|
|
3269
|
+
function Do(n, e) {
|
|
3270
|
+
return typeof n == "function" ? Po(n) : Ao(n, e);
|
|
3271
3271
|
}
|
|
3272
|
-
function
|
|
3273
|
-
const e =
|
|
3274
|
-
|
|
3275
|
-
|
|
3272
|
+
function Lo(n) {
|
|
3273
|
+
const e = ({
|
|
3274
|
+
children: t,
|
|
3275
|
+
...r
|
|
3276
|
+
}) => {
|
|
3277
|
+
const s = n(r);
|
|
3278
|
+
return t(s);
|
|
3279
|
+
};
|
|
3280
|
+
return e.displayName = `withHooks(${n.name || "Hook"})`, e;
|
|
3281
|
+
}
|
|
3282
|
+
function Oo(n) {
|
|
3283
|
+
const e = ze.c(4), {
|
|
3284
|
+
elementRef: t
|
|
3285
|
+
} = n;
|
|
3286
|
+
let r;
|
|
3287
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = {
|
|
3276
3288
|
width: 0,
|
|
3277
3289
|
height: 0
|
|
3278
|
-
}, e[0] =
|
|
3279
|
-
const [
|
|
3280
|
-
let
|
|
3281
|
-
e[1] !==
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
width:
|
|
3285
|
-
height:
|
|
3290
|
+
}, e[0] = r) : r = e[0];
|
|
3291
|
+
const [s, o] = At(r);
|
|
3292
|
+
let i, c;
|
|
3293
|
+
return e[1] !== t ? (i = () => {
|
|
3294
|
+
t.current && Do(t.current, (l, u) => {
|
|
3295
|
+
o({
|
|
3296
|
+
width: u.width,
|
|
3297
|
+
height: u.height
|
|
3286
3298
|
});
|
|
3287
3299
|
});
|
|
3288
|
-
}, e[1] =
|
|
3289
|
-
let i;
|
|
3290
|
-
return e[3] === Symbol.for("react.memo_cache_sentinel") ? (i = [], e[3] = i) : i = e[3], pn(o, i), r;
|
|
3300
|
+
}, c = [t], e[1] = t, e[2] = i, e[3] = c) : (i = e[2], c = e[3]), gn(i, c), s;
|
|
3291
3301
|
}
|
|
3292
|
-
const
|
|
3302
|
+
const Mo = Lo(Oo), No = (n) => {
|
|
3293
3303
|
const e = ze.c(42), {
|
|
3294
3304
|
disableDrag: t,
|
|
3295
3305
|
cursorTime: r,
|
|
@@ -3297,164 +3307,164 @@ const Do = (n) => {
|
|
|
3297
3307
|
startLeft: o,
|
|
3298
3308
|
scaleWidth: i,
|
|
3299
3309
|
scale: c,
|
|
3300
|
-
scaleCount:
|
|
3310
|
+
scaleCount: l,
|
|
3301
3311
|
scaleSplitCount: u,
|
|
3302
|
-
scrollElementRef:
|
|
3312
|
+
scrollElementRef: a,
|
|
3303
3313
|
maxScaleCount: h,
|
|
3304
3314
|
onCursorDragStart: f,
|
|
3305
3315
|
onCursorDrag: m,
|
|
3306
|
-
onCursorDragEnd:
|
|
3307
|
-
} = n,
|
|
3308
|
-
let
|
|
3309
|
-
e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (
|
|
3310
|
-
if (typeof
|
|
3311
|
-
const d = o ?? 20,
|
|
3312
|
-
|
|
3316
|
+
onCursorDragEnd: g
|
|
3317
|
+
} = n, b = ee(null), v = ee(void 0);
|
|
3318
|
+
let w, _;
|
|
3319
|
+
e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (w = () => {
|
|
3320
|
+
if (typeof v.current > "u" && b.current) {
|
|
3321
|
+
const d = o ?? 20, A = i ?? 160, V = c ?? 1;
|
|
3322
|
+
b.current.updateLeft(je(r, {
|
|
3313
3323
|
startLeft: d,
|
|
3314
|
-
scaleWidth:
|
|
3315
|
-
scale:
|
|
3324
|
+
scaleWidth: A,
|
|
3325
|
+
scale: V
|
|
3316
3326
|
}));
|
|
3317
3327
|
}
|
|
3318
|
-
}, _ = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] =
|
|
3319
|
-
const
|
|
3320
|
-
let
|
|
3321
|
-
e[6] !==
|
|
3328
|
+
}, _ = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] = w, e[5] = _) : (w = e[4], _ = e[5]), et(w, _);
|
|
3329
|
+
const S = o ?? 20, y = i ?? 160, T = c ?? 1, x = h ?? 1 / 0, C = (u ?? 0) > 0, P = u ?? 1, E = C ? l * (u ?? 1) + 1 : l, D = o ?? 20, L = (C ? y / P : y) * (E - 1) + D;
|
|
3330
|
+
let k;
|
|
3331
|
+
e[6] !== S || e[7] !== x || e[8] !== a || e[9] !== L || e[10] !== y ? (k = () => ({
|
|
3322
3332
|
left: 0,
|
|
3323
|
-
right: Math.min(
|
|
3324
|
-
}), e[6] =
|
|
3325
|
-
const
|
|
3333
|
+
right: Math.min(L, x * y + S - (a.current?.scrollLeft ?? 0))
|
|
3334
|
+
}), e[6] = S, e[7] = x, e[8] = a, e[9] = L, e[10] = y, e[11] = k) : k = e[11];
|
|
3335
|
+
const F = !t;
|
|
3326
3336
|
let K;
|
|
3327
|
-
e[12] !== r || e[13] !==
|
|
3328
|
-
f && f(r),
|
|
3329
|
-
startLeft:
|
|
3337
|
+
e[12] !== r || e[13] !== S || e[14] !== f || e[15] !== T || e[16] !== y ? (K = () => {
|
|
3338
|
+
f && f(r), v.current = je(r, {
|
|
3339
|
+
startLeft: S,
|
|
3330
3340
|
scaleWidth: y,
|
|
3331
|
-
scale:
|
|
3332
|
-
}),
|
|
3333
|
-
}, e[12] = r, e[13] =
|
|
3334
|
-
let
|
|
3335
|
-
e[18] !==
|
|
3336
|
-
if (typeof
|
|
3337
|
-
const d = rt(
|
|
3338
|
-
startLeft:
|
|
3339
|
-
scale:
|
|
3341
|
+
scale: T
|
|
3342
|
+
}), b.current?.updateLeft(v.current);
|
|
3343
|
+
}, e[12] = r, e[13] = S, e[14] = f, e[15] = T, e[16] = y, e[17] = K) : K = e[17];
|
|
3344
|
+
let O;
|
|
3345
|
+
e[18] !== S || e[19] !== g || e[20] !== T || e[21] !== s || e[22] !== y ? (O = () => {
|
|
3346
|
+
if (typeof v.current < "u") {
|
|
3347
|
+
const d = rt(v.current, {
|
|
3348
|
+
startLeft: S,
|
|
3349
|
+
scale: T,
|
|
3340
3350
|
scaleWidth: y
|
|
3341
3351
|
});
|
|
3342
3352
|
s({
|
|
3343
3353
|
time: d
|
|
3344
|
-
}),
|
|
3354
|
+
}), g && g(d);
|
|
3345
3355
|
}
|
|
3346
|
-
|
|
3347
|
-
}, e[18] =
|
|
3348
|
-
let
|
|
3349
|
-
e[24] !==
|
|
3356
|
+
v.current = void 0;
|
|
3357
|
+
}, e[18] = S, e[19] = g, e[20] = T, e[21] = s, e[22] = y, e[23] = O) : O = e[23];
|
|
3358
|
+
let I;
|
|
3359
|
+
e[24] !== S || e[25] !== m || e[26] !== T || e[27] !== a || e[28] !== s || e[29] !== y ? (I = (d, A) => {
|
|
3350
3360
|
const {
|
|
3351
|
-
left:
|
|
3352
|
-
} = d, H =
|
|
3361
|
+
left: V
|
|
3362
|
+
} = d, H = A === void 0 ? 0 : A, q = a.current?.scrollLeft ?? 0, B = a.current, U = B?.clientWidth ?? 0;
|
|
3353
3363
|
if (H !== 0)
|
|
3354
|
-
if (typeof
|
|
3355
|
-
|
|
3356
|
-
const
|
|
3357
|
-
|
|
3364
|
+
if (typeof v.current < "u") {
|
|
3365
|
+
v.current = v.current + H;
|
|
3366
|
+
const M = q, N = q + U;
|
|
3367
|
+
v.current < M + 10 ? v.current = M + 10 : v.current > N - 10 && (v.current = N - 10), v.current < S - q && (v.current = S - q);
|
|
3358
3368
|
} else {
|
|
3359
|
-
|
|
3360
|
-
const
|
|
3361
|
-
|
|
3369
|
+
v.current = V + H;
|
|
3370
|
+
const M = q, N = q + U;
|
|
3371
|
+
v.current < M + 10 ? v.current = M + 10 : v.current > N - 10 && (v.current = N - 10);
|
|
3362
3372
|
}
|
|
3363
|
-
else if (
|
|
3364
|
-
const
|
|
3365
|
-
|
|
3373
|
+
else if (V < S - q ? v.current = S - q : v.current = V, B && U > 0) {
|
|
3374
|
+
const M = q, N = q + U;
|
|
3375
|
+
v.current < M + 10 ? v.current = M + 10 : v.current > N - 10 && (v.current = N - 10);
|
|
3366
3376
|
}
|
|
3367
|
-
if (typeof
|
|
3368
|
-
|
|
3369
|
-
const
|
|
3370
|
-
startLeft:
|
|
3371
|
-
scale:
|
|
3377
|
+
if (typeof v.current < "u") {
|
|
3378
|
+
b.current?.updateLeft(v.current);
|
|
3379
|
+
const M = rt(v.current + q, {
|
|
3380
|
+
startLeft: S,
|
|
3381
|
+
scale: T,
|
|
3372
3382
|
scaleWidth: y
|
|
3373
3383
|
});
|
|
3374
3384
|
s({
|
|
3375
|
-
time:
|
|
3376
|
-
}), m && m(
|
|
3385
|
+
time: M
|
|
3386
|
+
}), m && m(M);
|
|
3377
3387
|
}
|
|
3378
3388
|
return !1;
|
|
3379
|
-
}, e[24] =
|
|
3389
|
+
}, e[24] = S, e[25] = m, e[26] = T, e[27] = a, e[28] = s, e[29] = y, e[30] = I) : I = e[30];
|
|
3380
3390
|
let G, ue;
|
|
3381
3391
|
e[31] === Symbol.for("react.memo_cache_sentinel") ? (G = de("cursor"), ue = de("cursor-top"), e[31] = G, e[32] = ue) : (G = e[31], ue = e[32]);
|
|
3382
3392
|
let fe;
|
|
3383
|
-
e[33] === Symbol.for("react.memo_cache_sentinel") ? (fe = /* @__PURE__ */
|
|
3384
|
-
/* @__PURE__ */
|
|
3385
|
-
/* @__PURE__ */
|
|
3393
|
+
e[33] === Symbol.for("react.memo_cache_sentinel") ? (fe = /* @__PURE__ */ R.jsxs("div", { className: G, children: [
|
|
3394
|
+
/* @__PURE__ */ R.jsx("svg", { className: ue, width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", children: /* @__PURE__ */ R.jsx("path", { d: "M0 1C0 0.447715 0.447715 0 1 0H7C7.55228 0 8 0.447715 8 1V9.38197C8 9.76074 7.786 10.107 7.44721 10.2764L4.44721 11.7764C4.16569 11.9172 3.83431 11.9172 3.55279 11.7764L0.552786 10.2764C0.214002 10.107 0 9.76074 0 9.38197V1Z", fill: "currentColor" }) }),
|
|
3395
|
+
/* @__PURE__ */ R.jsx("div", { className: de("cursor-area") })
|
|
3386
3396
|
] }), e[33] = fe) : fe = e[33];
|
|
3387
3397
|
let me;
|
|
3388
|
-
return e[34] !==
|
|
3398
|
+
return e[34] !== S || e[35] !== a || e[36] !== k || e[37] !== F || e[38] !== K || e[39] !== O || e[40] !== I ? (me = /* @__PURE__ */ R.jsx(hr, { start: S, ref: b, parentRef: a, getBounds: k, autoScroll: !0, enableDragging: F, enableResizing: !1, onDragStart: K, onDragEnd: O, onDrag: I, children: fe }), e[34] = S, e[35] = a, e[36] = k, e[37] = F, e[38] = K, e[39] = O, e[40] = I, e[41] = me) : me = e[41], me;
|
|
3389
3399
|
};
|
|
3390
|
-
function
|
|
3400
|
+
function qn(n, e) {
|
|
3391
3401
|
if (typeof n == "function")
|
|
3392
3402
|
return n(e);
|
|
3393
3403
|
n != null && (n.current = e);
|
|
3394
3404
|
}
|
|
3395
|
-
function
|
|
3405
|
+
function vr(...n) {
|
|
3396
3406
|
return (e) => {
|
|
3397
3407
|
let t = !1;
|
|
3398
3408
|
const r = n.map((s) => {
|
|
3399
|
-
const o =
|
|
3409
|
+
const o = qn(s, e);
|
|
3400
3410
|
return !t && typeof o == "function" && (t = !0), o;
|
|
3401
3411
|
});
|
|
3402
3412
|
if (t)
|
|
3403
3413
|
return () => {
|
|
3404
3414
|
for (let s = 0; s < r.length; s++) {
|
|
3405
3415
|
const o = r[s];
|
|
3406
|
-
typeof o == "function" ? o() :
|
|
3416
|
+
typeof o == "function" ? o() : qn(n[s], null);
|
|
3407
3417
|
}
|
|
3408
3418
|
};
|
|
3409
3419
|
};
|
|
3410
3420
|
}
|
|
3411
3421
|
function st(...n) {
|
|
3412
|
-
return p.useCallback(
|
|
3422
|
+
return p.useCallback(vr(...n), n);
|
|
3413
3423
|
}
|
|
3414
3424
|
// @__NO_SIDE_EFFECTS__
|
|
3415
|
-
function
|
|
3416
|
-
const e = /* @__PURE__ */
|
|
3417
|
-
const { children: o, ...i } = r, c = p.Children.toArray(o),
|
|
3418
|
-
if (
|
|
3419
|
-
const u =
|
|
3420
|
-
return /* @__PURE__ */
|
|
3425
|
+
function Io(n) {
|
|
3426
|
+
const e = /* @__PURE__ */ ko(n), t = p.forwardRef((r, s) => {
|
|
3427
|
+
const { children: o, ...i } = r, c = p.Children.toArray(o), l = c.find(jo);
|
|
3428
|
+
if (l) {
|
|
3429
|
+
const u = l.props.children, a = c.map((h) => h === l ? p.Children.count(u) > 1 ? p.Children.only(null) : p.isValidElement(u) ? u.props.children : null : h);
|
|
3430
|
+
return /* @__PURE__ */ R.jsx(e, { ...i, ref: s, children: p.isValidElement(u) ? p.cloneElement(u, void 0, a) : null });
|
|
3421
3431
|
}
|
|
3422
|
-
return /* @__PURE__ */
|
|
3432
|
+
return /* @__PURE__ */ R.jsx(e, { ...i, ref: s, children: o });
|
|
3423
3433
|
});
|
|
3424
3434
|
return t.displayName = `${n}.Slot`, t;
|
|
3425
3435
|
}
|
|
3426
3436
|
// @__NO_SIDE_EFFECTS__
|
|
3427
|
-
function
|
|
3437
|
+
function ko(n) {
|
|
3428
3438
|
const e = p.forwardRef((t, r) => {
|
|
3429
3439
|
const { children: s, ...o } = t;
|
|
3430
3440
|
if (p.isValidElement(s)) {
|
|
3431
|
-
const i =
|
|
3432
|
-
return s.type !== p.Fragment && (c.ref = r ?
|
|
3441
|
+
const i = Fo(s), c = zo(o, s.props);
|
|
3442
|
+
return s.type !== p.Fragment && (c.ref = r ? vr(r, i) : i), p.cloneElement(s, c);
|
|
3433
3443
|
}
|
|
3434
3444
|
return p.Children.count(s) > 1 ? p.Children.only(null) : null;
|
|
3435
3445
|
});
|
|
3436
3446
|
return e.displayName = `${n}.SlotClone`, e;
|
|
3437
3447
|
}
|
|
3438
|
-
var
|
|
3439
|
-
function
|
|
3440
|
-
return p.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId ===
|
|
3448
|
+
var Wo = Symbol("radix.slottable");
|
|
3449
|
+
function jo(n) {
|
|
3450
|
+
return p.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === Wo;
|
|
3441
3451
|
}
|
|
3442
|
-
function
|
|
3452
|
+
function zo(n, e) {
|
|
3443
3453
|
const t = { ...e };
|
|
3444
3454
|
for (const r in e) {
|
|
3445
3455
|
const s = n[r], o = e[r];
|
|
3446
3456
|
/^on[A-Z]/.test(r) ? s && o ? t[r] = (...c) => {
|
|
3447
|
-
const
|
|
3448
|
-
return s(...c),
|
|
3457
|
+
const l = o(...c);
|
|
3458
|
+
return s(...c), l;
|
|
3449
3459
|
} : s && (t[r] = s) : r === "style" ? t[r] = { ...s, ...o } : r === "className" && (t[r] = [s, o].filter(Boolean).join(" "));
|
|
3450
3460
|
}
|
|
3451
3461
|
return { ...n, ...t };
|
|
3452
3462
|
}
|
|
3453
|
-
function
|
|
3463
|
+
function Fo(n) {
|
|
3454
3464
|
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
3455
3465
|
return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
|
|
3456
3466
|
}
|
|
3457
|
-
var
|
|
3467
|
+
var Vo = [
|
|
3458
3468
|
"a",
|
|
3459
3469
|
"button",
|
|
3460
3470
|
"div",
|
|
@@ -3472,44 +3482,44 @@ var Wo = [
|
|
|
3472
3482
|
"span",
|
|
3473
3483
|
"svg",
|
|
3474
3484
|
"ul"
|
|
3475
|
-
], Nt =
|
|
3476
|
-
const t = /* @__PURE__ */
|
|
3477
|
-
const { asChild: i, ...c } = s,
|
|
3478
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
3485
|
+
], Nt = Vo.reduce((n, e) => {
|
|
3486
|
+
const t = /* @__PURE__ */ Io(`Primitive.${e}`), r = p.forwardRef((s, o) => {
|
|
3487
|
+
const { asChild: i, ...c } = s, l = i ? t : e;
|
|
3488
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ R.jsx(l, { ...c, ref: o });
|
|
3479
3489
|
});
|
|
3480
3490
|
return r.displayName = `Primitive.${e}`, { ...n, [e]: r };
|
|
3481
3491
|
}, {});
|
|
3482
|
-
function
|
|
3492
|
+
function Uo(n, e = []) {
|
|
3483
3493
|
let t = [];
|
|
3484
3494
|
function r(o, i) {
|
|
3485
|
-
const c = p.createContext(i),
|
|
3495
|
+
const c = p.createContext(i), l = t.length;
|
|
3486
3496
|
t = [...t, i];
|
|
3487
3497
|
const u = (h) => {
|
|
3488
|
-
const { scope: f, children: m, ...
|
|
3489
|
-
return /* @__PURE__ */
|
|
3498
|
+
const { scope: f, children: m, ...g } = h, b = f?.[n]?.[l] || c, v = p.useMemo(() => g, Object.values(g));
|
|
3499
|
+
return /* @__PURE__ */ R.jsx(b.Provider, { value: v, children: m });
|
|
3490
3500
|
};
|
|
3491
3501
|
u.displayName = o + "Provider";
|
|
3492
|
-
function
|
|
3493
|
-
const m = f?.[n]?.[
|
|
3494
|
-
if (
|
|
3502
|
+
function a(h, f) {
|
|
3503
|
+
const m = f?.[n]?.[l] || c, g = p.useContext(m);
|
|
3504
|
+
if (g) return g;
|
|
3495
3505
|
if (i !== void 0) return i;
|
|
3496
3506
|
throw new Error(`\`${h}\` must be used within \`${o}\``);
|
|
3497
3507
|
}
|
|
3498
|
-
return [u,
|
|
3508
|
+
return [u, a];
|
|
3499
3509
|
}
|
|
3500
3510
|
const s = () => {
|
|
3501
3511
|
const o = t.map((i) => p.createContext(i));
|
|
3502
3512
|
return function(c) {
|
|
3503
|
-
const
|
|
3513
|
+
const l = c?.[n] || o;
|
|
3504
3514
|
return p.useMemo(
|
|
3505
|
-
() => ({ [`__scope${n}`]: { ...c, [n]:
|
|
3506
|
-
[c,
|
|
3515
|
+
() => ({ [`__scope${n}`]: { ...c, [n]: l } }),
|
|
3516
|
+
[c, l]
|
|
3507
3517
|
);
|
|
3508
3518
|
};
|
|
3509
3519
|
};
|
|
3510
|
-
return s.scopeName = n, [r,
|
|
3520
|
+
return s.scopeName = n, [r, $o(s, ...e)];
|
|
3511
3521
|
}
|
|
3512
|
-
function
|
|
3522
|
+
function $o(...n) {
|
|
3513
3523
|
const e = n[0];
|
|
3514
3524
|
if (n.length === 1) return e;
|
|
3515
3525
|
const t = () => {
|
|
@@ -3518,8 +3528,8 @@ function zo(...n) {
|
|
|
3518
3528
|
scopeName: s.scopeName
|
|
3519
3529
|
}));
|
|
3520
3530
|
return function(o) {
|
|
3521
|
-
const i = r.reduce((c, { useScope:
|
|
3522
|
-
const h =
|
|
3531
|
+
const i = r.reduce((c, { useScope: l, scopeName: u }) => {
|
|
3532
|
+
const h = l(o)[`__scope${u}`];
|
|
3523
3533
|
return { ...c, ...h };
|
|
3524
3534
|
}, {});
|
|
3525
3535
|
return p.useMemo(() => ({ [`__scope${e.scopeName}`]: i }), [i]);
|
|
@@ -3533,18 +3543,18 @@ function tt(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
|
3533
3543
|
return e?.(s);
|
|
3534
3544
|
};
|
|
3535
3545
|
}
|
|
3536
|
-
var
|
|
3546
|
+
var pn = globalThis?.document ? p.useLayoutEffect : () => {
|
|
3537
3547
|
};
|
|
3538
|
-
function
|
|
3548
|
+
function Ho(n, e) {
|
|
3539
3549
|
return p.useReducer((t, r) => e[t][r] ?? t, n);
|
|
3540
3550
|
}
|
|
3541
3551
|
var It = (n) => {
|
|
3542
|
-
const { present: e, children: t } = n, r =
|
|
3552
|
+
const { present: e, children: t } = n, r = Bo(e), s = typeof t == "function" ? t({ present: r.isPresent }) : p.Children.only(t), o = st(r.ref, Yo(s));
|
|
3543
3553
|
return typeof t == "function" || r.isPresent ? p.cloneElement(s, { ref: o }) : null;
|
|
3544
3554
|
};
|
|
3545
3555
|
It.displayName = "Presence";
|
|
3546
|
-
function
|
|
3547
|
-
const [e, t] = p.useState(), r = p.useRef(null), s = p.useRef(n), o = p.useRef("none"), i = n ? "mounted" : "unmounted", [c,
|
|
3556
|
+
function Bo(n) {
|
|
3557
|
+
const [e, t] = p.useState(), r = p.useRef(null), s = p.useRef(n), o = p.useRef("none"), i = n ? "mounted" : "unmounted", [c, l] = Ho(i, {
|
|
3548
3558
|
mounted: {
|
|
3549
3559
|
UNMOUNT: "unmounted",
|
|
3550
3560
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -3560,32 +3570,32 @@ function Vo(n) {
|
|
|
3560
3570
|
return p.useEffect(() => {
|
|
3561
3571
|
const u = Vt(r.current);
|
|
3562
3572
|
o.current = c === "mounted" ? u : "none";
|
|
3563
|
-
}, [c]),
|
|
3564
|
-
const u = r.current,
|
|
3565
|
-
if (
|
|
3573
|
+
}, [c]), pn(() => {
|
|
3574
|
+
const u = r.current, a = s.current;
|
|
3575
|
+
if (a !== n) {
|
|
3566
3576
|
const f = o.current, m = Vt(u);
|
|
3567
|
-
n ?
|
|
3577
|
+
n ? l("MOUNT") : m === "none" || u?.display === "none" ? l("UNMOUNT") : l(a && f !== m ? "ANIMATION_OUT" : "UNMOUNT"), s.current = n;
|
|
3568
3578
|
}
|
|
3569
|
-
}, [n,
|
|
3579
|
+
}, [n, l]), pn(() => {
|
|
3570
3580
|
if (e) {
|
|
3571
3581
|
let u;
|
|
3572
|
-
const
|
|
3573
|
-
const
|
|
3574
|
-
if (m.target === e &&
|
|
3575
|
-
const
|
|
3576
|
-
e.style.animationFillMode = "forwards", u =
|
|
3577
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode =
|
|
3582
|
+
const a = e.ownerDocument.defaultView ?? window, h = (m) => {
|
|
3583
|
+
const b = Vt(r.current).includes(CSS.escape(m.animationName));
|
|
3584
|
+
if (m.target === e && b && (l("ANIMATION_END"), !s.current)) {
|
|
3585
|
+
const v = e.style.animationFillMode;
|
|
3586
|
+
e.style.animationFillMode = "forwards", u = a.setTimeout(() => {
|
|
3587
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = v);
|
|
3578
3588
|
});
|
|
3579
3589
|
}
|
|
3580
3590
|
}, f = (m) => {
|
|
3581
3591
|
m.target === e && (o.current = Vt(r.current));
|
|
3582
3592
|
};
|
|
3583
3593
|
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", h), e.addEventListener("animationend", h), () => {
|
|
3584
|
-
|
|
3594
|
+
a.clearTimeout(u), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", h), e.removeEventListener("animationend", h);
|
|
3585
3595
|
};
|
|
3586
3596
|
} else
|
|
3587
|
-
|
|
3588
|
-
}, [e,
|
|
3597
|
+
l("ANIMATION_END");
|
|
3598
|
+
}, [e, l]), {
|
|
3589
3599
|
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
3590
3600
|
ref: p.useCallback((u) => {
|
|
3591
3601
|
r.current = u ? getComputedStyle(u) : null, t(u);
|
|
@@ -3595,13 +3605,13 @@ function Vo(n) {
|
|
|
3595
3605
|
function Vt(n) {
|
|
3596
3606
|
return n?.animationName || "none";
|
|
3597
3607
|
}
|
|
3598
|
-
function
|
|
3608
|
+
function Yo(n) {
|
|
3599
3609
|
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
3600
3610
|
return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
|
|
3601
3611
|
}
|
|
3602
|
-
var
|
|
3603
|
-
function
|
|
3604
|
-
const e = p.useContext(
|
|
3612
|
+
var Xo = p.createContext(void 0);
|
|
3613
|
+
function Go(n) {
|
|
3614
|
+
const e = p.useContext(Xo);
|
|
3605
3615
|
return n || e || "ltr";
|
|
3606
3616
|
}
|
|
3607
3617
|
function Qe(n) {
|
|
@@ -3610,13 +3620,13 @@ function Qe(n) {
|
|
|
3610
3620
|
e.current = n;
|
|
3611
3621
|
}), p.useMemo(() => (...t) => e.current?.(...t), []);
|
|
3612
3622
|
}
|
|
3613
|
-
function
|
|
3623
|
+
function Ko(n, [e, t]) {
|
|
3614
3624
|
return Math.min(t, Math.max(e, n));
|
|
3615
3625
|
}
|
|
3616
|
-
function
|
|
3626
|
+
function qo(n, e) {
|
|
3617
3627
|
return p.useReducer((t, r) => e[t][r] ?? t, n);
|
|
3618
3628
|
}
|
|
3619
|
-
var
|
|
3629
|
+
var _n = "ScrollArea", [br] = Uo(_n), [Jo, Se] = br(_n), _r = p.forwardRef(
|
|
3620
3630
|
(n, e) => {
|
|
3621
3631
|
const {
|
|
3622
3632
|
__scopeScrollArea: t,
|
|
@@ -3624,40 +3634,40 @@ var bn = "ScrollArea", [gr] = jo(bn), [Xo, Se] = gr(bn), vr = p.forwardRef(
|
|
|
3624
3634
|
dir: s,
|
|
3625
3635
|
scrollHideDelay: o = 600,
|
|
3626
3636
|
...i
|
|
3627
|
-
} = n, [c,
|
|
3628
|
-
return /* @__PURE__ */
|
|
3629
|
-
|
|
3637
|
+
} = n, [c, l] = p.useState(null), [u, a] = p.useState(null), [h, f] = p.useState(null), [m, g] = p.useState(null), [b, v] = p.useState(null), [w, _] = p.useState(0), [S, y] = p.useState(0), [T, x] = p.useState(!1), [C, P] = p.useState(!1), E = st(e, (L) => l(L)), D = Go(s);
|
|
3638
|
+
return /* @__PURE__ */ R.jsx(
|
|
3639
|
+
Jo,
|
|
3630
3640
|
{
|
|
3631
3641
|
scope: t,
|
|
3632
3642
|
type: r,
|
|
3633
|
-
dir:
|
|
3643
|
+
dir: D,
|
|
3634
3644
|
scrollHideDelay: o,
|
|
3635
3645
|
scrollArea: c,
|
|
3636
3646
|
viewport: u,
|
|
3637
|
-
onViewportChange:
|
|
3647
|
+
onViewportChange: a,
|
|
3638
3648
|
content: h,
|
|
3639
3649
|
onContentChange: f,
|
|
3640
3650
|
scrollbarX: m,
|
|
3641
|
-
onScrollbarXChange:
|
|
3642
|
-
scrollbarXEnabled:
|
|
3651
|
+
onScrollbarXChange: g,
|
|
3652
|
+
scrollbarXEnabled: T,
|
|
3643
3653
|
onScrollbarXEnabledChange: x,
|
|
3644
|
-
scrollbarY:
|
|
3645
|
-
onScrollbarYChange:
|
|
3646
|
-
scrollbarYEnabled:
|
|
3647
|
-
onScrollbarYEnabledChange:
|
|
3654
|
+
scrollbarY: b,
|
|
3655
|
+
onScrollbarYChange: v,
|
|
3656
|
+
scrollbarYEnabled: C,
|
|
3657
|
+
onScrollbarYEnabledChange: P,
|
|
3648
3658
|
onCornerWidthChange: _,
|
|
3649
3659
|
onCornerHeightChange: y,
|
|
3650
|
-
children: /* @__PURE__ */
|
|
3660
|
+
children: /* @__PURE__ */ R.jsx(
|
|
3651
3661
|
Nt.div,
|
|
3652
3662
|
{
|
|
3653
|
-
dir:
|
|
3663
|
+
dir: D,
|
|
3654
3664
|
...i,
|
|
3655
|
-
ref:
|
|
3665
|
+
ref: E,
|
|
3656
3666
|
style: {
|
|
3657
3667
|
position: "relative",
|
|
3658
3668
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
3659
|
-
"--radix-scroll-area-corner-width":
|
|
3660
|
-
"--radix-scroll-area-corner-height":
|
|
3669
|
+
"--radix-scroll-area-corner-width": w + "px",
|
|
3670
|
+
"--radix-scroll-area-corner-height": S + "px",
|
|
3661
3671
|
...n.style
|
|
3662
3672
|
}
|
|
3663
3673
|
}
|
|
@@ -3666,12 +3676,12 @@ var bn = "ScrollArea", [gr] = jo(bn), [Xo, Se] = gr(bn), vr = p.forwardRef(
|
|
|
3666
3676
|
);
|
|
3667
3677
|
}
|
|
3668
3678
|
);
|
|
3669
|
-
|
|
3670
|
-
var
|
|
3679
|
+
_r.displayName = _n;
|
|
3680
|
+
var wr = "ScrollAreaViewport", Sr = p.forwardRef(
|
|
3671
3681
|
(n, e) => {
|
|
3672
|
-
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Se(
|
|
3673
|
-
return /* @__PURE__ */
|
|
3674
|
-
/* @__PURE__ */
|
|
3682
|
+
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Se(wr, t), c = p.useRef(null), l = st(e, c, i.onViewportChange);
|
|
3683
|
+
return /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
|
|
3684
|
+
/* @__PURE__ */ R.jsx(
|
|
3675
3685
|
"style",
|
|
3676
3686
|
{
|
|
3677
3687
|
dangerouslySetInnerHTML: {
|
|
@@ -3680,12 +3690,12 @@ var br = "ScrollAreaViewport", _r = p.forwardRef(
|
|
|
3680
3690
|
nonce: s
|
|
3681
3691
|
}
|
|
3682
3692
|
),
|
|
3683
|
-
/* @__PURE__ */
|
|
3693
|
+
/* @__PURE__ */ R.jsx(
|
|
3684
3694
|
Nt.div,
|
|
3685
3695
|
{
|
|
3686
3696
|
"data-radix-scroll-area-viewport": "",
|
|
3687
3697
|
...o,
|
|
3688
|
-
ref:
|
|
3698
|
+
ref: l,
|
|
3689
3699
|
style: {
|
|
3690
3700
|
/**
|
|
3691
3701
|
* We don't support `visible` because the intention is to have at least one scrollbar
|
|
@@ -3702,47 +3712,47 @@ var br = "ScrollAreaViewport", _r = p.forwardRef(
|
|
|
3702
3712
|
overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
|
|
3703
3713
|
...n.style
|
|
3704
3714
|
},
|
|
3705
|
-
children: /* @__PURE__ */
|
|
3715
|
+
children: /* @__PURE__ */ R.jsx("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: r })
|
|
3706
3716
|
}
|
|
3707
3717
|
)
|
|
3708
3718
|
] });
|
|
3709
3719
|
}
|
|
3710
3720
|
);
|
|
3711
|
-
|
|
3712
|
-
var
|
|
3721
|
+
Sr.displayName = wr;
|
|
3722
|
+
var Ae = "ScrollAreaScrollbar", yr = p.forwardRef(
|
|
3713
3723
|
(n, e) => {
|
|
3714
|
-
const { forceMount: t, ...r } = n, s = Se(
|
|
3724
|
+
const { forceMount: t, ...r } = n, s = Se(Ae, n.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = s, c = n.orientation === "horizontal";
|
|
3715
3725
|
return p.useEffect(() => (c ? o(!0) : i(!0), () => {
|
|
3716
3726
|
c ? o(!1) : i(!1);
|
|
3717
|
-
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */
|
|
3727
|
+
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ R.jsx(Zo, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ R.jsx(Qo, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ R.jsx(Er, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ R.jsx(wn, { ...r, ref: e }) : null;
|
|
3718
3728
|
}
|
|
3719
3729
|
);
|
|
3720
|
-
|
|
3721
|
-
var
|
|
3722
|
-
const { forceMount: t, ...r } = n, s = Se(
|
|
3730
|
+
yr.displayName = Ae;
|
|
3731
|
+
var Zo = p.forwardRef((n, e) => {
|
|
3732
|
+
const { forceMount: t, ...r } = n, s = Se(Ae, n.__scopeScrollArea), [o, i] = p.useState(!1);
|
|
3723
3733
|
return p.useEffect(() => {
|
|
3724
3734
|
const c = s.scrollArea;
|
|
3725
|
-
let
|
|
3735
|
+
let l = 0;
|
|
3726
3736
|
if (c) {
|
|
3727
3737
|
const u = () => {
|
|
3728
|
-
window.clearTimeout(
|
|
3729
|
-
},
|
|
3730
|
-
|
|
3738
|
+
window.clearTimeout(l), i(!0);
|
|
3739
|
+
}, a = () => {
|
|
3740
|
+
l = window.setTimeout(() => i(!1), s.scrollHideDelay);
|
|
3731
3741
|
};
|
|
3732
|
-
return c.addEventListener("pointerenter", u), c.addEventListener("pointerleave",
|
|
3733
|
-
window.clearTimeout(
|
|
3742
|
+
return c.addEventListener("pointerenter", u), c.addEventListener("pointerleave", a), () => {
|
|
3743
|
+
window.clearTimeout(l), c.removeEventListener("pointerenter", u), c.removeEventListener("pointerleave", a);
|
|
3734
3744
|
};
|
|
3735
3745
|
}
|
|
3736
|
-
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */
|
|
3737
|
-
|
|
3746
|
+
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ R.jsx(It, { present: t || o, children: /* @__PURE__ */ R.jsx(
|
|
3747
|
+
Er,
|
|
3738
3748
|
{
|
|
3739
3749
|
"data-state": o ? "visible" : "hidden",
|
|
3740
3750
|
...r,
|
|
3741
3751
|
ref: e
|
|
3742
3752
|
}
|
|
3743
3753
|
) });
|
|
3744
|
-
}),
|
|
3745
|
-
const { forceMount: t, ...r } = n, s = Se(
|
|
3754
|
+
}), Qo = p.forwardRef((n, e) => {
|
|
3755
|
+
const { forceMount: t, ...r } = n, s = Se(Ae, n.__scopeScrollArea), o = n.orientation === "horizontal", i = en(() => l("SCROLL_END"), 100), [c, l] = qo("hidden", {
|
|
3746
3756
|
hidden: {
|
|
3747
3757
|
SCROLL: "scrolling"
|
|
3748
3758
|
},
|
|
@@ -3762,69 +3772,69 @@ var Go = p.forwardRef((n, e) => {
|
|
|
3762
3772
|
});
|
|
3763
3773
|
return p.useEffect(() => {
|
|
3764
3774
|
if (c === "idle") {
|
|
3765
|
-
const u = window.setTimeout(() =>
|
|
3775
|
+
const u = window.setTimeout(() => l("HIDE"), s.scrollHideDelay);
|
|
3766
3776
|
return () => window.clearTimeout(u);
|
|
3767
3777
|
}
|
|
3768
|
-
}, [c, s.scrollHideDelay,
|
|
3769
|
-
const u = s.viewport,
|
|
3778
|
+
}, [c, s.scrollHideDelay, l]), p.useEffect(() => {
|
|
3779
|
+
const u = s.viewport, a = o ? "scrollLeft" : "scrollTop";
|
|
3770
3780
|
if (u) {
|
|
3771
|
-
let h = u[
|
|
3781
|
+
let h = u[a];
|
|
3772
3782
|
const f = () => {
|
|
3773
|
-
const m = u[
|
|
3774
|
-
h !== m && (
|
|
3783
|
+
const m = u[a];
|
|
3784
|
+
h !== m && (l("SCROLL"), i()), h = m;
|
|
3775
3785
|
};
|
|
3776
3786
|
return u.addEventListener("scroll", f), () => u.removeEventListener("scroll", f);
|
|
3777
3787
|
}
|
|
3778
|
-
}, [s.viewport, o,
|
|
3779
|
-
|
|
3788
|
+
}, [s.viewport, o, l, i]), /* @__PURE__ */ R.jsx(It, { present: t || c !== "hidden", children: /* @__PURE__ */ R.jsx(
|
|
3789
|
+
wn,
|
|
3780
3790
|
{
|
|
3781
3791
|
"data-state": c === "hidden" ? "hidden" : "visible",
|
|
3782
3792
|
...r,
|
|
3783
3793
|
ref: e,
|
|
3784
|
-
onPointerEnter: tt(n.onPointerEnter, () =>
|
|
3785
|
-
onPointerLeave: tt(n.onPointerLeave, () =>
|
|
3794
|
+
onPointerEnter: tt(n.onPointerEnter, () => l("POINTER_ENTER")),
|
|
3795
|
+
onPointerLeave: tt(n.onPointerLeave, () => l("POINTER_LEAVE"))
|
|
3786
3796
|
}
|
|
3787
3797
|
) });
|
|
3788
|
-
}),
|
|
3789
|
-
const t = Se(
|
|
3798
|
+
}), Er = p.forwardRef((n, e) => {
|
|
3799
|
+
const t = Se(Ae, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = p.useState(!1), c = n.orientation === "horizontal", l = en(() => {
|
|
3790
3800
|
if (t.viewport) {
|
|
3791
|
-
const u = t.viewport.offsetWidth < t.viewport.scrollWidth,
|
|
3792
|
-
i(c ? u :
|
|
3801
|
+
const u = t.viewport.offsetWidth < t.viewport.scrollWidth, a = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
3802
|
+
i(c ? u : a);
|
|
3793
3803
|
}
|
|
3794
3804
|
}, 10);
|
|
3795
|
-
return
|
|
3796
|
-
|
|
3805
|
+
return Tt(t.viewport, l), Tt(t.content, l), /* @__PURE__ */ R.jsx(It, { present: r || o, children: /* @__PURE__ */ R.jsx(
|
|
3806
|
+
wn,
|
|
3797
3807
|
{
|
|
3798
3808
|
"data-state": o ? "visible" : "hidden",
|
|
3799
3809
|
...s,
|
|
3800
3810
|
ref: e
|
|
3801
3811
|
}
|
|
3802
3812
|
) });
|
|
3803
|
-
}),
|
|
3804
|
-
const { orientation: t = "vertical", ...r } = n, s = Se(
|
|
3813
|
+
}), wn = p.forwardRef((n, e) => {
|
|
3814
|
+
const { orientation: t = "vertical", ...r } = n, s = Se(Ae, n.__scopeScrollArea), o = p.useRef(null), i = p.useRef(0), [c, l] = p.useState({
|
|
3805
3815
|
content: 0,
|
|
3806
3816
|
viewport: 0,
|
|
3807
3817
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
3808
|
-
}), u =
|
|
3818
|
+
}), u = Tr(c.viewport, c.content), a = {
|
|
3809
3819
|
...r,
|
|
3810
3820
|
sizes: c,
|
|
3811
|
-
onSizesChange:
|
|
3821
|
+
onSizesChange: l,
|
|
3812
3822
|
hasThumb: u > 0 && u < 1,
|
|
3813
3823
|
onThumbChange: (f) => o.current = f,
|
|
3814
3824
|
onThumbPointerUp: () => i.current = 0,
|
|
3815
3825
|
onThumbPointerDown: (f) => i.current = f
|
|
3816
3826
|
};
|
|
3817
3827
|
function h(f, m) {
|
|
3818
|
-
return
|
|
3828
|
+
return oi(f, i.current, c, m);
|
|
3819
3829
|
}
|
|
3820
|
-
return t === "horizontal" ? /* @__PURE__ */
|
|
3821
|
-
|
|
3830
|
+
return t === "horizontal" ? /* @__PURE__ */ R.jsx(
|
|
3831
|
+
ei,
|
|
3822
3832
|
{
|
|
3823
|
-
...
|
|
3833
|
+
...a,
|
|
3824
3834
|
ref: e,
|
|
3825
3835
|
onThumbPositionChange: () => {
|
|
3826
3836
|
if (s.viewport && o.current) {
|
|
3827
|
-
const f = s.viewport.scrollLeft, m =
|
|
3837
|
+
const f = s.viewport.scrollLeft, m = Jn(f, c, s.dir);
|
|
3828
3838
|
o.current.style.transform = `translate3d(${m}px, 0, 0)`;
|
|
3829
3839
|
}
|
|
3830
3840
|
},
|
|
@@ -3835,14 +3845,14 @@ var Go = p.forwardRef((n, e) => {
|
|
|
3835
3845
|
s.viewport && (s.viewport.scrollLeft = h(f, s.dir));
|
|
3836
3846
|
}
|
|
3837
3847
|
}
|
|
3838
|
-
) : t === "vertical" ? /* @__PURE__ */
|
|
3839
|
-
|
|
3848
|
+
) : t === "vertical" ? /* @__PURE__ */ R.jsx(
|
|
3849
|
+
ti,
|
|
3840
3850
|
{
|
|
3841
|
-
...
|
|
3851
|
+
...a,
|
|
3842
3852
|
ref: e,
|
|
3843
3853
|
onThumbPositionChange: () => {
|
|
3844
3854
|
if (s.viewport && o.current) {
|
|
3845
|
-
const f = s.viewport.scrollTop, m =
|
|
3855
|
+
const f = s.viewport.scrollTop, m = Jn(f, c);
|
|
3846
3856
|
o.current.style.transform = `translate3d(0, ${m}px, 0)`;
|
|
3847
3857
|
}
|
|
3848
3858
|
},
|
|
@@ -3854,12 +3864,12 @@ var Go = p.forwardRef((n, e) => {
|
|
|
3854
3864
|
}
|
|
3855
3865
|
}
|
|
3856
3866
|
) : null;
|
|
3857
|
-
}),
|
|
3858
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Se(
|
|
3867
|
+
}), ei = p.forwardRef((n, e) => {
|
|
3868
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Se(Ae, n.__scopeScrollArea), [i, c] = p.useState(), l = p.useRef(null), u = st(e, l, o.onScrollbarXChange);
|
|
3859
3869
|
return p.useEffect(() => {
|
|
3860
|
-
|
|
3861
|
-
}, [
|
|
3862
|
-
|
|
3870
|
+
l.current && c(getComputedStyle(l.current));
|
|
3871
|
+
}, [l]), /* @__PURE__ */ R.jsx(
|
|
3872
|
+
xr,
|
|
3863
3873
|
{
|
|
3864
3874
|
"data-orientation": "horizontal",
|
|
3865
3875
|
...s,
|
|
@@ -3872,20 +3882,20 @@ var Go = p.forwardRef((n, e) => {
|
|
|
3872
3882
|
"--radix-scroll-area-thumb-width": Qt(t) + "px",
|
|
3873
3883
|
...n.style
|
|
3874
3884
|
},
|
|
3875
|
-
onThumbPointerDown: (
|
|
3876
|
-
onDragScroll: (
|
|
3877
|
-
onWheelScroll: (
|
|
3885
|
+
onThumbPointerDown: (a) => n.onThumbPointerDown(a.x),
|
|
3886
|
+
onDragScroll: (a) => n.onDragScroll(a.x),
|
|
3887
|
+
onWheelScroll: (a, h) => {
|
|
3878
3888
|
if (o.viewport) {
|
|
3879
|
-
const f = o.viewport.scrollLeft +
|
|
3880
|
-
n.onWheelScroll(f),
|
|
3889
|
+
const f = o.viewport.scrollLeft + a.deltaX;
|
|
3890
|
+
n.onWheelScroll(f), Dr(f, h) && a.preventDefault();
|
|
3881
3891
|
}
|
|
3882
3892
|
},
|
|
3883
3893
|
onResize: () => {
|
|
3884
|
-
|
|
3894
|
+
l.current && o.viewport && i && r({
|
|
3885
3895
|
content: o.viewport.scrollWidth,
|
|
3886
3896
|
viewport: o.viewport.offsetWidth,
|
|
3887
3897
|
scrollbar: {
|
|
3888
|
-
size:
|
|
3898
|
+
size: l.current.clientWidth,
|
|
3889
3899
|
paddingStart: qt(i.paddingLeft),
|
|
3890
3900
|
paddingEnd: qt(i.paddingRight)
|
|
3891
3901
|
}
|
|
@@ -3893,12 +3903,12 @@ var Go = p.forwardRef((n, e) => {
|
|
|
3893
3903
|
}
|
|
3894
3904
|
}
|
|
3895
3905
|
);
|
|
3896
|
-
}),
|
|
3897
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Se(
|
|
3906
|
+
}), ti = p.forwardRef((n, e) => {
|
|
3907
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Se(Ae, n.__scopeScrollArea), [i, c] = p.useState(), l = p.useRef(null), u = st(e, l, o.onScrollbarYChange);
|
|
3898
3908
|
return p.useEffect(() => {
|
|
3899
|
-
|
|
3900
|
-
}, [
|
|
3901
|
-
|
|
3909
|
+
l.current && c(getComputedStyle(l.current));
|
|
3910
|
+
}, [l]), /* @__PURE__ */ R.jsx(
|
|
3911
|
+
xr,
|
|
3902
3912
|
{
|
|
3903
3913
|
"data-orientation": "vertical",
|
|
3904
3914
|
...s,
|
|
@@ -3912,20 +3922,20 @@ var Go = p.forwardRef((n, e) => {
|
|
|
3912
3922
|
"--radix-scroll-area-thumb-height": Qt(t) + "px",
|
|
3913
3923
|
...n.style
|
|
3914
3924
|
},
|
|
3915
|
-
onThumbPointerDown: (
|
|
3916
|
-
onDragScroll: (
|
|
3917
|
-
onWheelScroll: (
|
|
3925
|
+
onThumbPointerDown: (a) => n.onThumbPointerDown(a.y),
|
|
3926
|
+
onDragScroll: (a) => n.onDragScroll(a.y),
|
|
3927
|
+
onWheelScroll: (a, h) => {
|
|
3918
3928
|
if (o.viewport) {
|
|
3919
|
-
const f = o.viewport.scrollTop +
|
|
3920
|
-
n.onWheelScroll(f),
|
|
3929
|
+
const f = o.viewport.scrollTop + a.deltaY;
|
|
3930
|
+
n.onWheelScroll(f), Dr(f, h) && a.preventDefault();
|
|
3921
3931
|
}
|
|
3922
3932
|
},
|
|
3923
3933
|
onResize: () => {
|
|
3924
|
-
|
|
3934
|
+
l.current && o.viewport && i && r({
|
|
3925
3935
|
content: o.viewport.scrollHeight,
|
|
3926
3936
|
viewport: o.viewport.offsetHeight,
|
|
3927
3937
|
scrollbar: {
|
|
3928
|
-
size:
|
|
3938
|
+
size: l.current.clientHeight,
|
|
3929
3939
|
paddingStart: qt(i.paddingTop),
|
|
3930
3940
|
paddingEnd: qt(i.paddingBottom)
|
|
3931
3941
|
}
|
|
@@ -3933,7 +3943,7 @@ var Go = p.forwardRef((n, e) => {
|
|
|
3933
3943
|
}
|
|
3934
3944
|
}
|
|
3935
3945
|
);
|
|
3936
|
-
}), [
|
|
3946
|
+
}), [ni, Rr] = br(Ae), xr = p.forwardRef((n, e) => {
|
|
3937
3947
|
const {
|
|
3938
3948
|
__scopeScrollArea: t,
|
|
3939
3949
|
sizes: r,
|
|
@@ -3941,113 +3951,113 @@ var Go = p.forwardRef((n, e) => {
|
|
|
3941
3951
|
onThumbChange: o,
|
|
3942
3952
|
onThumbPointerUp: i,
|
|
3943
3953
|
onThumbPointerDown: c,
|
|
3944
|
-
onThumbPositionChange:
|
|
3954
|
+
onThumbPositionChange: l,
|
|
3945
3955
|
onDragScroll: u,
|
|
3946
|
-
onWheelScroll:
|
|
3956
|
+
onWheelScroll: a,
|
|
3947
3957
|
onResize: h,
|
|
3948
3958
|
...f
|
|
3949
|
-
} = n, m = Se(
|
|
3950
|
-
function
|
|
3951
|
-
if (
|
|
3952
|
-
const
|
|
3953
|
-
u({ x:
|
|
3959
|
+
} = n, m = Se(Ae, t), [g, b] = p.useState(null), v = st(e, (E) => b(E)), w = p.useRef(null), _ = p.useRef(""), S = m.viewport, y = r.content - r.viewport, T = Qe(a), x = Qe(l), C = en(h, 10);
|
|
3960
|
+
function P(E) {
|
|
3961
|
+
if (w.current) {
|
|
3962
|
+
const D = E.clientX - w.current.left, L = E.clientY - w.current.top;
|
|
3963
|
+
u({ x: D, y: L });
|
|
3954
3964
|
}
|
|
3955
3965
|
}
|
|
3956
3966
|
return p.useEffect(() => {
|
|
3957
|
-
const
|
|
3958
|
-
const
|
|
3959
|
-
|
|
3967
|
+
const E = (D) => {
|
|
3968
|
+
const L = D.target;
|
|
3969
|
+
g?.contains(L) && T(D, y);
|
|
3960
3970
|
};
|
|
3961
|
-
return document.addEventListener("wheel",
|
|
3962
|
-
}, [
|
|
3963
|
-
|
|
3971
|
+
return document.addEventListener("wheel", E, { passive: !1 }), () => document.removeEventListener("wheel", E, { passive: !1 });
|
|
3972
|
+
}, [S, g, y, T]), p.useEffect(x, [r, x]), Tt(g, C), Tt(m.content, C), /* @__PURE__ */ R.jsx(
|
|
3973
|
+
ni,
|
|
3964
3974
|
{
|
|
3965
3975
|
scope: t,
|
|
3966
|
-
scrollbar:
|
|
3976
|
+
scrollbar: g,
|
|
3967
3977
|
hasThumb: s,
|
|
3968
3978
|
onThumbChange: Qe(o),
|
|
3969
3979
|
onThumbPointerUp: Qe(i),
|
|
3970
3980
|
onThumbPositionChange: x,
|
|
3971
3981
|
onThumbPointerDown: Qe(c),
|
|
3972
|
-
children: /* @__PURE__ */
|
|
3982
|
+
children: /* @__PURE__ */ R.jsx(
|
|
3973
3983
|
Nt.div,
|
|
3974
3984
|
{
|
|
3975
3985
|
...f,
|
|
3976
|
-
ref:
|
|
3986
|
+
ref: v,
|
|
3977
3987
|
style: { position: "absolute", ...f.style },
|
|
3978
|
-
onPointerDown: tt(n.onPointerDown, (
|
|
3979
|
-
|
|
3988
|
+
onPointerDown: tt(n.onPointerDown, (E) => {
|
|
3989
|
+
E.button === 0 && (E.target.setPointerCapture(E.pointerId), w.current = g.getBoundingClientRect(), _.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), P(E));
|
|
3980
3990
|
}),
|
|
3981
|
-
onPointerMove: tt(n.onPointerMove,
|
|
3982
|
-
onPointerUp: tt(n.onPointerUp, (
|
|
3983
|
-
const
|
|
3984
|
-
|
|
3991
|
+
onPointerMove: tt(n.onPointerMove, P),
|
|
3992
|
+
onPointerUp: tt(n.onPointerUp, (E) => {
|
|
3993
|
+
const D = E.target;
|
|
3994
|
+
D.hasPointerCapture(E.pointerId) && D.releasePointerCapture(E.pointerId), document.body.style.webkitUserSelect = _.current, m.viewport && (m.viewport.style.scrollBehavior = ""), w.current = null;
|
|
3985
3995
|
})
|
|
3986
3996
|
}
|
|
3987
3997
|
)
|
|
3988
3998
|
}
|
|
3989
3999
|
);
|
|
3990
|
-
}), Kt = "ScrollAreaThumb",
|
|
4000
|
+
}), Kt = "ScrollAreaThumb", Cr = p.forwardRef(
|
|
3991
4001
|
(n, e) => {
|
|
3992
|
-
const { forceMount: t, ...r } = n, s =
|
|
3993
|
-
return /* @__PURE__ */
|
|
4002
|
+
const { forceMount: t, ...r } = n, s = Rr(Kt, n.__scopeScrollArea);
|
|
4003
|
+
return /* @__PURE__ */ R.jsx(It, { present: t || s.hasThumb, children: /* @__PURE__ */ R.jsx(ri, { ref: e, ...r }) });
|
|
3994
4004
|
}
|
|
3995
|
-
),
|
|
4005
|
+
), ri = p.forwardRef(
|
|
3996
4006
|
(n, e) => {
|
|
3997
|
-
const { __scopeScrollArea: t, style: r, ...s } = n, o = Se(Kt, t), i =
|
|
4007
|
+
const { __scopeScrollArea: t, style: r, ...s } = n, o = Se(Kt, t), i = Rr(Kt, t), { onThumbPositionChange: c } = i, l = st(
|
|
3998
4008
|
e,
|
|
3999
4009
|
(h) => i.onThumbChange(h)
|
|
4000
|
-
), u = p.useRef(void 0),
|
|
4010
|
+
), u = p.useRef(void 0), a = en(() => {
|
|
4001
4011
|
u.current && (u.current(), u.current = void 0);
|
|
4002
4012
|
}, 100);
|
|
4003
4013
|
return p.useEffect(() => {
|
|
4004
4014
|
const h = o.viewport;
|
|
4005
4015
|
if (h) {
|
|
4006
4016
|
const f = () => {
|
|
4007
|
-
if (
|
|
4008
|
-
const m =
|
|
4017
|
+
if (a(), !u.current) {
|
|
4018
|
+
const m = ii(h, c);
|
|
4009
4019
|
u.current = m, c();
|
|
4010
4020
|
}
|
|
4011
4021
|
};
|
|
4012
4022
|
return c(), h.addEventListener("scroll", f), () => h.removeEventListener("scroll", f);
|
|
4013
4023
|
}
|
|
4014
|
-
}, [o.viewport,
|
|
4024
|
+
}, [o.viewport, a, c]), /* @__PURE__ */ R.jsx(
|
|
4015
4025
|
Nt.div,
|
|
4016
4026
|
{
|
|
4017
4027
|
"data-state": i.hasThumb ? "visible" : "hidden",
|
|
4018
4028
|
...s,
|
|
4019
|
-
ref:
|
|
4029
|
+
ref: l,
|
|
4020
4030
|
style: {
|
|
4021
4031
|
width: "var(--radix-scroll-area-thumb-width)",
|
|
4022
4032
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
4023
4033
|
...r
|
|
4024
4034
|
},
|
|
4025
4035
|
onPointerDownCapture: tt(n.onPointerDownCapture, (h) => {
|
|
4026
|
-
const m = h.target.getBoundingClientRect(),
|
|
4027
|
-
i.onThumbPointerDown({ x:
|
|
4036
|
+
const m = h.target.getBoundingClientRect(), g = h.clientX - m.left, b = h.clientY - m.top;
|
|
4037
|
+
i.onThumbPointerDown({ x: g, y: b });
|
|
4028
4038
|
}),
|
|
4029
4039
|
onPointerUp: tt(n.onPointerUp, i.onThumbPointerUp)
|
|
4030
4040
|
}
|
|
4031
4041
|
);
|
|
4032
4042
|
}
|
|
4033
4043
|
);
|
|
4034
|
-
|
|
4035
|
-
var
|
|
4044
|
+
Cr.displayName = Kt;
|
|
4045
|
+
var Sn = "ScrollAreaCorner", Ar = p.forwardRef(
|
|
4036
4046
|
(n, e) => {
|
|
4037
|
-
const t = Se(
|
|
4038
|
-
return t.type !== "scroll" && r ? /* @__PURE__ */
|
|
4047
|
+
const t = Se(Sn, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
|
|
4048
|
+
return t.type !== "scroll" && r ? /* @__PURE__ */ R.jsx(si, { ...n, ref: e }) : null;
|
|
4039
4049
|
}
|
|
4040
4050
|
);
|
|
4041
|
-
|
|
4042
|
-
var
|
|
4043
|
-
const { __scopeScrollArea: t, ...r } = n, s = Se(
|
|
4044
|
-
return
|
|
4045
|
-
const
|
|
4046
|
-
s.onCornerHeightChange(
|
|
4047
|
-
}),
|
|
4048
|
-
const
|
|
4049
|
-
s.onCornerWidthChange(
|
|
4050
|
-
}), u ? /* @__PURE__ */
|
|
4051
|
+
Ar.displayName = Sn;
|
|
4052
|
+
var si = p.forwardRef((n, e) => {
|
|
4053
|
+
const { __scopeScrollArea: t, ...r } = n, s = Se(Sn, t), [o, i] = p.useState(0), [c, l] = p.useState(0), u = !!(o && c);
|
|
4054
|
+
return Tt(s.scrollbarX, () => {
|
|
4055
|
+
const a = s.scrollbarX?.offsetHeight || 0;
|
|
4056
|
+
s.onCornerHeightChange(a), l(a);
|
|
4057
|
+
}), Tt(s.scrollbarY, () => {
|
|
4058
|
+
const a = s.scrollbarY?.offsetWidth || 0;
|
|
4059
|
+
s.onCornerWidthChange(a), i(a);
|
|
4060
|
+
}), u ? /* @__PURE__ */ R.jsx(
|
|
4051
4061
|
Nt.div,
|
|
4052
4062
|
{
|
|
4053
4063
|
...r,
|
|
@@ -4067,33 +4077,33 @@ var ei = p.forwardRef((n, e) => {
|
|
|
4067
4077
|
function qt(n) {
|
|
4068
4078
|
return n ? parseInt(n, 10) : 0;
|
|
4069
4079
|
}
|
|
4070
|
-
function
|
|
4080
|
+
function Tr(n, e) {
|
|
4071
4081
|
const t = n / e;
|
|
4072
4082
|
return isNaN(t) ? 0 : t;
|
|
4073
4083
|
}
|
|
4074
4084
|
function Qt(n) {
|
|
4075
|
-
const e =
|
|
4085
|
+
const e = Tr(n.viewport, n.content), t = n.scrollbar.paddingStart + n.scrollbar.paddingEnd, r = (n.scrollbar.size - t) * e;
|
|
4076
4086
|
return Math.max(r, 18);
|
|
4077
4087
|
}
|
|
4078
|
-
function
|
|
4079
|
-
const s = Qt(t), o = s / 2, i = e || o, c = s - i,
|
|
4080
|
-
return
|
|
4088
|
+
function oi(n, e, t, r = "ltr") {
|
|
4089
|
+
const s = Qt(t), o = s / 2, i = e || o, c = s - i, l = t.scrollbar.paddingStart + i, u = t.scrollbar.size - t.scrollbar.paddingEnd - c, a = t.content - t.viewport, h = r === "ltr" ? [0, a] : [a * -1, 0];
|
|
4090
|
+
return Pr([l, u], h)(n);
|
|
4081
4091
|
}
|
|
4082
|
-
function
|
|
4083
|
-
const r = Qt(e), s = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = e.scrollbar.size - s, i = e.content - e.viewport, c = o - r,
|
|
4084
|
-
return
|
|
4092
|
+
function Jn(n, e, t = "ltr") {
|
|
4093
|
+
const r = Qt(e), s = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = e.scrollbar.size - s, i = e.content - e.viewport, c = o - r, l = t === "ltr" ? [0, i] : [i * -1, 0], u = Ko(n, l);
|
|
4094
|
+
return Pr([0, i], [0, c])(u);
|
|
4085
4095
|
}
|
|
4086
|
-
function
|
|
4096
|
+
function Pr(n, e) {
|
|
4087
4097
|
return (t) => {
|
|
4088
4098
|
if (n[0] === n[1] || e[0] === e[1]) return e[0];
|
|
4089
4099
|
const r = (e[1] - e[0]) / (n[1] - n[0]);
|
|
4090
4100
|
return e[0] + r * (t - n[0]);
|
|
4091
4101
|
};
|
|
4092
4102
|
}
|
|
4093
|
-
function
|
|
4103
|
+
function Dr(n, e) {
|
|
4094
4104
|
return n > 0 && n < e;
|
|
4095
4105
|
}
|
|
4096
|
-
var
|
|
4106
|
+
var ii = (n, e = () => {
|
|
4097
4107
|
}) => {
|
|
4098
4108
|
let t = { left: n.scrollLeft, top: n.scrollTop }, r = 0;
|
|
4099
4109
|
return (function s() {
|
|
@@ -4107,9 +4117,9 @@ function en(n, e) {
|
|
|
4107
4117
|
window.clearTimeout(r.current), r.current = window.setTimeout(t, e);
|
|
4108
4118
|
}, [t, e]);
|
|
4109
4119
|
}
|
|
4110
|
-
function
|
|
4120
|
+
function Tt(n, e) {
|
|
4111
4121
|
const t = Qe(e);
|
|
4112
|
-
|
|
4122
|
+
pn(() => {
|
|
4113
4123
|
let r = 0;
|
|
4114
4124
|
if (n) {
|
|
4115
4125
|
const s = new ResizeObserver(() => {
|
|
@@ -4121,8 +4131,8 @@ function At(n, e) {
|
|
|
4121
4131
|
}
|
|
4122
4132
|
}, [n, t]);
|
|
4123
4133
|
}
|
|
4124
|
-
var
|
|
4125
|
-
function
|
|
4134
|
+
var ci = _r, ai = Sr, li = Ar;
|
|
4135
|
+
function Zn(n) {
|
|
4126
4136
|
const e = ze.c(9);
|
|
4127
4137
|
let t, r, s;
|
|
4128
4138
|
e[0] !== n ? ({
|
|
@@ -4132,12 +4142,12 @@ function qn(n) {
|
|
|
4132
4142
|
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s) : (t = e[1], r = e[2], s = e[3]);
|
|
4133
4143
|
const o = s === void 0 ? "vertical" : s;
|
|
4134
4144
|
let i;
|
|
4135
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */
|
|
4145
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ R.jsx(Cr, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
|
|
4136
4146
|
let c;
|
|
4137
|
-
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */
|
|
4147
|
+
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ R.jsx(yr, { "data-slot": "scroll-area-scrollbar", orientation: o, className: t, ...r, children: i }), e[5] = t, e[6] = o, e[7] = r, e[8] = c) : c = e[8], c;
|
|
4138
4148
|
}
|
|
4139
|
-
const
|
|
4140
|
-
const t =
|
|
4149
|
+
const di = nt.forwardRef((n, e) => {
|
|
4150
|
+
const t = $r(n), {
|
|
4141
4151
|
style: r
|
|
4142
4152
|
} = n;
|
|
4143
4153
|
let {
|
|
@@ -4145,71 +4155,69 @@ const ai = nt.forwardRef((n, e) => {
|
|
|
4145
4155
|
hideCursor: o,
|
|
4146
4156
|
disableDrag: i,
|
|
4147
4157
|
scale: c = 1,
|
|
4148
|
-
scaleWidth:
|
|
4158
|
+
scaleWidth: l = 160,
|
|
4149
4159
|
startLeft: u = 20,
|
|
4150
|
-
minScaleCount:
|
|
4160
|
+
minScaleCount: a = 20,
|
|
4151
4161
|
maxScaleCount: h = 1 / 0,
|
|
4152
4162
|
onChange: f,
|
|
4153
4163
|
onScroll: m
|
|
4154
4164
|
} = t;
|
|
4155
|
-
const
|
|
4156
|
-
const
|
|
4157
|
-
_(
|
|
4158
|
-
}, [h,
|
|
4159
|
-
|
|
4160
|
-
|
|
4165
|
+
const g = ee(null), [b, v] = At(s), [w, _] = At(hn), [S, y] = At(xn), T = ee(xn), x = er((E) => {
|
|
4166
|
+
const D = Math.min(h, Math.max(a, E));
|
|
4167
|
+
_(D);
|
|
4168
|
+
}, [h, a]);
|
|
4169
|
+
gn(() => {
|
|
4170
|
+
x(Hr(s, {
|
|
4161
4171
|
scale: c
|
|
4162
|
-
})),
|
|
4163
|
-
}, [s,
|
|
4164
|
-
const
|
|
4165
|
-
f?.(
|
|
4166
|
-
},
|
|
4172
|
+
})), v(s);
|
|
4173
|
+
}, [s, a, h, c, x]);
|
|
4174
|
+
const C = (E) => {
|
|
4175
|
+
f?.(E);
|
|
4176
|
+
}, P = (E) => {
|
|
4167
4177
|
let {
|
|
4168
|
-
left:
|
|
4169
|
-
time:
|
|
4170
|
-
} =
|
|
4171
|
-
return typeof
|
|
4178
|
+
left: D,
|
|
4179
|
+
time: L
|
|
4180
|
+
} = E;
|
|
4181
|
+
return typeof L < "u" ? (y(L), T.current = L, !0) : typeof D < "u" ? (y(T.current = rt(D, {
|
|
4172
4182
|
startLeft: u,
|
|
4173
4183
|
scale: c,
|
|
4174
|
-
scaleWidth:
|
|
4184
|
+
scaleWidth: l
|
|
4175
4185
|
})), !0) : !1;
|
|
4176
4186
|
};
|
|
4177
|
-
|
|
4187
|
+
return Qn(e, () => ({
|
|
4178
4188
|
get target() {
|
|
4179
|
-
return
|
|
4189
|
+
return g.current;
|
|
4180
4190
|
},
|
|
4181
|
-
set time(
|
|
4182
|
-
|
|
4183
|
-
time:
|
|
4191
|
+
set time(E) {
|
|
4192
|
+
P({
|
|
4193
|
+
time: E
|
|
4184
4194
|
});
|
|
4185
4195
|
},
|
|
4186
4196
|
get time() {
|
|
4187
|
-
return
|
|
4197
|
+
return T.current;
|
|
4188
4198
|
},
|
|
4189
|
-
setScrollLeft: (
|
|
4190
|
-
|
|
4199
|
+
setScrollLeft: (E) => {
|
|
4200
|
+
g.current && (g.current.scrollLeft = E);
|
|
4191
4201
|
},
|
|
4192
|
-
setScrollTop: (
|
|
4193
|
-
|
|
4202
|
+
setScrollTop: (E) => {
|
|
4203
|
+
g.current && (g.current.scrollTop = E);
|
|
4194
4204
|
}
|
|
4195
|
-
}))
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
/* @__PURE__ */
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
/* @__PURE__ */
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
/* @__PURE__ */
|
|
4209
|
-
/* @__PURE__ */ E.jsx(qn, { orientation: "vertical" }),
|
|
4210
|
-
/* @__PURE__ */ E.jsx(oi, {})
|
|
4205
|
+
})), /* @__PURE__ */ R.jsxs(ci, { style: r, className: `${un} ${i ? un + "-disable" : ""}`, "data-slot": "scroll-area", children: [
|
|
4206
|
+
/* @__PURE__ */ R.jsx(ai, { "data-slot": "scroll-area-viewport", ref: g, onScroll: (E) => {
|
|
4207
|
+
m?.(E.currentTarget);
|
|
4208
|
+
}, children: /* @__PURE__ */ R.jsx(Mo, { elementRef: g, children: ({
|
|
4209
|
+
width: E,
|
|
4210
|
+
height: D
|
|
4211
|
+
}) => /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
|
|
4212
|
+
/* @__PURE__ */ R.jsx(bo, { ...t, setCursor: P, scaleCount: w, scrollElementRef: g }),
|
|
4213
|
+
/* @__PURE__ */ R.jsx(vo, { ...t, scrollElementRef: g, timelineWidth: E, timelineHeight: D, disableDrag: i, editorData: b, cursorTime: S, scaleCount: w, setScaleCount: x, setEditorData: C }),
|
|
4214
|
+
!o && /* @__PURE__ */ R.jsx(No, { ...t, timelineWidth: E, height: D, scaleCount: w, setScaleCount: x, setCursor: P, cursorTime: S, editorData: b, scrollElementRef: g })
|
|
4215
|
+
] }) }) }),
|
|
4216
|
+
/* @__PURE__ */ R.jsx(Zn, { orientation: "horizontal" }),
|
|
4217
|
+
/* @__PURE__ */ R.jsx(Zn, { orientation: "vertical" }),
|
|
4218
|
+
/* @__PURE__ */ R.jsx(li, {})
|
|
4211
4219
|
] });
|
|
4212
4220
|
});
|
|
4213
4221
|
export {
|
|
4214
|
-
|
|
4222
|
+
di as Timeline
|
|
4215
4223
|
};
|