@acrool/react-picker 0.0.2-alpha.7 → 0.0.2
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/README.md +134 -21
- package/dist/acrool-react-picker.es.js +780 -773
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as Cn from "react";
|
|
2
|
+
import Gs, { createContext as Et, useContext as U, useLayoutEffect as Yo, useEffect as gt, useRef as it, useInsertionEffect as zs, useCallback as pt, useMemo as Vt, forwardRef as Ce, Fragment as Hs, createElement as Xo, useId as Rn, Component as qo, Children as Zo, isValidElement as Jo, useState as Jt } from "react";
|
|
3
3
|
var jt = /* @__PURE__ */ ((t) => (t.Escape = "Escape", t.Enter = "Enter", t.Tab = "Tab", t.ArrowUp = "ArrowUp", t.ArrowDown = "ArrowDown", t))(jt || {});
|
|
4
4
|
const le = [
|
|
5
5
|
"color: #fff",
|
|
@@ -18,42 +18,42 @@ const le = [
|
|
|
18
18
|
function ce(t, e, ...n) {
|
|
19
19
|
console.log(`%c ${t}`, e, ...n);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Qo(t, ...e) {
|
|
22
22
|
const n = le.concat([
|
|
23
23
|
`background-color: ${ue.primary}`
|
|
24
24
|
]).join(";");
|
|
25
25
|
ce(t, n, ...e);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function ta(t, ...e) {
|
|
28
28
|
const n = le.concat([
|
|
29
29
|
`background-color: ${ue.success}`
|
|
30
30
|
]).join(";");
|
|
31
31
|
ce(t, n, ...e);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ea(t, ...e) {
|
|
34
34
|
const n = le.concat([
|
|
35
35
|
`background-color: ${ue.info}`
|
|
36
36
|
]).join(";");
|
|
37
37
|
ce(t, n, ...e);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function na(t, ...e) {
|
|
40
40
|
const n = le.concat([
|
|
41
41
|
`background-color: ${ue.warning}`
|
|
42
42
|
]).join(";");
|
|
43
43
|
ce(t, n, ...e);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function ia(t, ...e) {
|
|
46
46
|
const n = le.concat([
|
|
47
47
|
`background-color: ${ue.danger}`
|
|
48
48
|
]).join(";");
|
|
49
49
|
ce(t, n, ...e);
|
|
50
50
|
}
|
|
51
51
|
const wt = {
|
|
52
|
-
primary:
|
|
53
|
-
success:
|
|
54
|
-
info:
|
|
55
|
-
warning:
|
|
56
|
-
danger:
|
|
52
|
+
primary: Qo,
|
|
53
|
+
success: ta,
|
|
54
|
+
info: ea,
|
|
55
|
+
warning: na,
|
|
56
|
+
danger: ia
|
|
57
57
|
}, Vn = Et({
|
|
58
58
|
hide: () => wt.warning("No hide method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
59
59
|
show: () => wt.warning("No show method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
@@ -63,8 +63,8 @@ const wt = {
|
|
|
63
63
|
inputBlur: () => wt.warning("No blur method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
64
64
|
isInputFocus: !1,
|
|
65
65
|
onChange: () => wt.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?")
|
|
66
|
-
}),
|
|
67
|
-
var
|
|
66
|
+
}), Wf = Vn.Consumer, $f = () => U(Vn);
|
|
67
|
+
var fn = { exports: {} }, Ht = {};
|
|
68
68
|
/**
|
|
69
69
|
* @license React
|
|
70
70
|
* react-jsx-runtime.production.min.js
|
|
@@ -74,12 +74,12 @@ var hn = { exports: {} }, Ht = {};
|
|
|
74
74
|
* This source code is licensed under the MIT license found in the
|
|
75
75
|
* LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/
|
|
77
|
-
var
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
77
|
+
var wi;
|
|
78
|
+
function sa() {
|
|
79
|
+
if (wi)
|
|
80
80
|
return Ht;
|
|
81
|
-
|
|
82
|
-
var t =
|
|
81
|
+
wi = 1;
|
|
82
|
+
var t = Gs, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
83
83
|
function r(a, l, u) {
|
|
84
84
|
var c, h = {}, d = null, p = null;
|
|
85
85
|
u !== void 0 && (d = "" + u), l.key !== void 0 && (d = "" + l.key), l.ref !== void 0 && (p = l.ref);
|
|
@@ -102,10 +102,10 @@ var Yt = {};
|
|
|
102
102
|
* This source code is licensed under the MIT license found in the
|
|
103
103
|
* LICENSE file in the root directory of this source tree.
|
|
104
104
|
*/
|
|
105
|
-
var
|
|
106
|
-
function
|
|
107
|
-
return
|
|
108
|
-
var t =
|
|
105
|
+
var Si;
|
|
106
|
+
function ra() {
|
|
107
|
+
return Si || (Si = 1, process.env.NODE_ENV !== "production" && function() {
|
|
108
|
+
var t = Gs, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, P = "@@iterator";
|
|
109
109
|
function b(f) {
|
|
110
110
|
if (f === null || typeof f != "object")
|
|
111
111
|
return null;
|
|
@@ -115,14 +115,14 @@ function sa() {
|
|
|
115
115
|
var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
116
116
|
function y(f) {
|
|
117
117
|
{
|
|
118
|
-
for (var m = arguments.length, T = new Array(m > 1 ? m - 1 : 0),
|
|
119
|
-
T[
|
|
118
|
+
for (var m = arguments.length, T = new Array(m > 1 ? m - 1 : 0), C = 1; C < m; C++)
|
|
119
|
+
T[C - 1] = arguments[C];
|
|
120
120
|
v("error", f, T);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
function v(f, m, T) {
|
|
124
124
|
{
|
|
125
|
-
var
|
|
125
|
+
var C = x.ReactDebugCurrentFrame, D = C.getStackAddendum();
|
|
126
126
|
D !== "" && (m += "%s", T = T.concat([D]));
|
|
127
127
|
var k = T.map(function(E) {
|
|
128
128
|
return String(E);
|
|
@@ -130,19 +130,19 @@ function sa() {
|
|
|
130
130
|
k.unshift("Warning: " + m), Function.prototype.apply.call(console[f], console, k);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
var
|
|
133
|
+
var A = !1, w = !1, L = !1, q = !1, V = !1, G;
|
|
134
134
|
G = Symbol.for("react.module.reference");
|
|
135
135
|
function H(f) {
|
|
136
|
-
return !!(typeof f == "string" || typeof f == "function" || f === i || f === o || V || f === s || f === u || f === c || q || f === p ||
|
|
136
|
+
return !!(typeof f == "string" || typeof f == "function" || f === i || f === o || V || f === s || f === u || f === c || q || f === p || A || w || L || typeof f == "object" && f !== null && (f.$$typeof === d || f.$$typeof === h || f.$$typeof === r || f.$$typeof === a || f.$$typeof === l || // This needs to include all possible module reference object
|
|
137
137
|
// types supported by any Flight configuration anywhere since
|
|
138
138
|
// we don't know which Flight build this will end up being used
|
|
139
139
|
// with.
|
|
140
140
|
f.$$typeof === G || f.getModuleId !== void 0));
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
var
|
|
144
|
-
if (
|
|
145
|
-
return
|
|
142
|
+
function ht(f, m, T) {
|
|
143
|
+
var C = f.displayName;
|
|
144
|
+
if (C)
|
|
145
|
+
return C;
|
|
146
146
|
var D = m.displayName || m.name || "";
|
|
147
147
|
return D !== "" ? T + "(" + D + ")" : T;
|
|
148
148
|
}
|
|
@@ -179,10 +179,10 @@ function sa() {
|
|
|
179
179
|
var T = f;
|
|
180
180
|
return Kt(T._context) + ".Provider";
|
|
181
181
|
case l:
|
|
182
|
-
return
|
|
182
|
+
return ht(f, f.render, "ForwardRef");
|
|
183
183
|
case h:
|
|
184
|
-
var
|
|
185
|
-
return
|
|
184
|
+
var C = f.displayName || null;
|
|
185
|
+
return C !== null ? C : Z(f.type) || "Memo";
|
|
186
186
|
case d: {
|
|
187
187
|
var D = f, k = D._payload, E = D._init;
|
|
188
188
|
try {
|
|
@@ -194,18 +194,18 @@ function sa() {
|
|
|
194
194
|
}
|
|
195
195
|
return null;
|
|
196
196
|
}
|
|
197
|
-
var nt = Object.assign, F = 0, J, Dt, Mt,
|
|
198
|
-
function
|
|
197
|
+
var nt = Object.assign, F = 0, J, Dt, Mt, si, ri, oi, ai;
|
|
198
|
+
function li() {
|
|
199
199
|
}
|
|
200
|
-
|
|
201
|
-
function
|
|
200
|
+
li.__reactDisabledLog = !0;
|
|
201
|
+
function To() {
|
|
202
202
|
{
|
|
203
203
|
if (F === 0) {
|
|
204
|
-
J = console.log, Dt = console.info, Mt = console.warn,
|
|
204
|
+
J = console.log, Dt = console.info, Mt = console.warn, si = console.error, ri = console.group, oi = console.groupCollapsed, ai = console.groupEnd;
|
|
205
205
|
var f = {
|
|
206
206
|
configurable: !0,
|
|
207
207
|
enumerable: !0,
|
|
208
|
-
value:
|
|
208
|
+
value: li,
|
|
209
209
|
writable: !0
|
|
210
210
|
};
|
|
211
211
|
Object.defineProperties(console, {
|
|
@@ -221,7 +221,7 @@ function sa() {
|
|
|
221
221
|
F++;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function bo() {
|
|
225
225
|
{
|
|
226
226
|
if (F--, F === 0) {
|
|
227
227
|
var f = {
|
|
@@ -240,16 +240,16 @@ function sa() {
|
|
|
240
240
|
value: Mt
|
|
241
241
|
}),
|
|
242
242
|
error: nt({}, f, {
|
|
243
|
-
value:
|
|
243
|
+
value: si
|
|
244
244
|
}),
|
|
245
245
|
group: nt({}, f, {
|
|
246
|
-
value:
|
|
246
|
+
value: ri
|
|
247
247
|
}),
|
|
248
248
|
groupCollapsed: nt({}, f, {
|
|
249
|
-
value:
|
|
249
|
+
value: oi
|
|
250
250
|
}),
|
|
251
251
|
groupEnd: nt({}, f, {
|
|
252
|
-
value:
|
|
252
|
+
value: ai
|
|
253
253
|
})
|
|
254
254
|
});
|
|
255
255
|
}
|
|
@@ -263,8 +263,8 @@ function sa() {
|
|
|
263
263
|
try {
|
|
264
264
|
throw Error();
|
|
265
265
|
} catch (D) {
|
|
266
|
-
var
|
|
267
|
-
$e =
|
|
266
|
+
var C = D.stack.trim().match(/\n( *(at )?)/);
|
|
267
|
+
$e = C && C[1] || "";
|
|
268
268
|
}
|
|
269
269
|
return `
|
|
270
270
|
` + $e + f;
|
|
@@ -272,10 +272,10 @@ function sa() {
|
|
|
272
272
|
}
|
|
273
273
|
var Ke = !1, ge;
|
|
274
274
|
{
|
|
275
|
-
var
|
|
276
|
-
ge = new
|
|
275
|
+
var wo = typeof WeakMap == "function" ? WeakMap : Map;
|
|
276
|
+
ge = new wo();
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function ui(f, m) {
|
|
279
279
|
if (!f || Ke)
|
|
280
280
|
return "";
|
|
281
281
|
{
|
|
@@ -283,12 +283,12 @@ function sa() {
|
|
|
283
283
|
if (T !== void 0)
|
|
284
284
|
return T;
|
|
285
285
|
}
|
|
286
|
-
var
|
|
286
|
+
var C;
|
|
287
287
|
Ke = !0;
|
|
288
288
|
var D = Error.prepareStackTrace;
|
|
289
289
|
Error.prepareStackTrace = void 0;
|
|
290
290
|
var k;
|
|
291
|
-
k = We.current, We.current = null,
|
|
291
|
+
k = We.current, We.current = null, To();
|
|
292
292
|
try {
|
|
293
293
|
if (m) {
|
|
294
294
|
var E = function() {
|
|
@@ -302,14 +302,14 @@ function sa() {
|
|
|
302
302
|
try {
|
|
303
303
|
Reflect.construct(E, []);
|
|
304
304
|
} catch (Y) {
|
|
305
|
-
|
|
305
|
+
C = Y;
|
|
306
306
|
}
|
|
307
307
|
Reflect.construct(f, [], E);
|
|
308
308
|
} else {
|
|
309
309
|
try {
|
|
310
310
|
E.call();
|
|
311
311
|
} catch (Y) {
|
|
312
|
-
|
|
312
|
+
C = Y;
|
|
313
313
|
}
|
|
314
314
|
f.call(E.prototype);
|
|
315
315
|
}
|
|
@@ -317,14 +317,14 @@ function sa() {
|
|
|
317
317
|
try {
|
|
318
318
|
throw Error();
|
|
319
319
|
} catch (Y) {
|
|
320
|
-
|
|
320
|
+
C = Y;
|
|
321
321
|
}
|
|
322
322
|
f();
|
|
323
323
|
}
|
|
324
324
|
} catch (Y) {
|
|
325
|
-
if (Y &&
|
|
325
|
+
if (Y && C && typeof Y.stack == "string") {
|
|
326
326
|
for (var R = Y.stack.split(`
|
|
327
|
-
`), z =
|
|
327
|
+
`), z = C.stack.split(`
|
|
328
328
|
`), _ = R.length - 1, I = z.length - 1; _ >= 1 && I >= 0 && R[_] !== z[I]; )
|
|
329
329
|
I--;
|
|
330
330
|
for (; _ >= 1 && I >= 0; _--, I--)
|
|
@@ -341,15 +341,15 @@ function sa() {
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
} finally {
|
|
344
|
-
Ke = !1, We.current = k,
|
|
344
|
+
Ke = !1, We.current = k, bo(), Error.prepareStackTrace = D;
|
|
345
345
|
}
|
|
346
346
|
var Lt = f ? f.displayName || f.name : "", Tt = Lt ? me(Lt) : "";
|
|
347
347
|
return typeof f == "function" && ge.set(f, Tt), Tt;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
return
|
|
349
|
+
function So(f, m, T) {
|
|
350
|
+
return ui(f, !1);
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Ao(f) {
|
|
353
353
|
var m = f.prototype;
|
|
354
354
|
return !!(m && m.isReactComponent);
|
|
355
355
|
}
|
|
@@ -357,7 +357,7 @@ function sa() {
|
|
|
357
357
|
if (f == null)
|
|
358
358
|
return "";
|
|
359
359
|
if (typeof f == "function")
|
|
360
|
-
return
|
|
360
|
+
return ui(f, Ao(f));
|
|
361
361
|
if (typeof f == "string")
|
|
362
362
|
return me(f);
|
|
363
363
|
switch (f) {
|
|
@@ -369,11 +369,11 @@ function sa() {
|
|
|
369
369
|
if (typeof f == "object")
|
|
370
370
|
switch (f.$$typeof) {
|
|
371
371
|
case l:
|
|
372
|
-
return
|
|
372
|
+
return So(f.render);
|
|
373
373
|
case h:
|
|
374
374
|
return ye(f.type, m, T);
|
|
375
375
|
case d: {
|
|
376
|
-
var
|
|
376
|
+
var C = f, D = C._payload, k = C._init;
|
|
377
377
|
try {
|
|
378
378
|
return ye(k(D), m, T);
|
|
379
379
|
} catch {
|
|
@@ -382,15 +382,15 @@ function sa() {
|
|
|
382
382
|
}
|
|
383
383
|
return "";
|
|
384
384
|
}
|
|
385
|
-
var Gt = Object.prototype.hasOwnProperty,
|
|
385
|
+
var Gt = Object.prototype.hasOwnProperty, ci = {}, fi = x.ReactDebugCurrentFrame;
|
|
386
386
|
function ve(f) {
|
|
387
387
|
if (f) {
|
|
388
388
|
var m = f._owner, T = ye(f.type, f._source, m ? m.type : null);
|
|
389
|
-
|
|
389
|
+
fi.setExtraStackFrame(T);
|
|
390
390
|
} else
|
|
391
|
-
|
|
391
|
+
fi.setExtraStackFrame(null);
|
|
392
392
|
}
|
|
393
|
-
function Co(f, m, T,
|
|
393
|
+
function Co(f, m, T, C, D) {
|
|
394
394
|
{
|
|
395
395
|
var k = Function.call.bind(Gt);
|
|
396
396
|
for (var E in f)
|
|
@@ -398,28 +398,28 @@ function sa() {
|
|
|
398
398
|
var R = void 0;
|
|
399
399
|
try {
|
|
400
400
|
if (typeof f[E] != "function") {
|
|
401
|
-
var z = Error((
|
|
401
|
+
var z = Error((C || "React class") + ": " + T + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
402
402
|
throw z.name = "Invariant Violation", z;
|
|
403
403
|
}
|
|
404
|
-
R = f[E](m, E,
|
|
404
|
+
R = f[E](m, E, C, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
405
405
|
} catch (_) {
|
|
406
406
|
R = _;
|
|
407
407
|
}
|
|
408
|
-
R && !(R instanceof Error) && (ve(D), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",
|
|
408
|
+
R && !(R instanceof Error) && (ve(D), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", T, E, typeof R), ve(null)), R instanceof Error && !(R.message in ci) && (ci[R.message] = !0, ve(D), y("Failed %s type: %s", T, R.message), ve(null));
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
var
|
|
412
|
+
var Ro = Array.isArray;
|
|
413
413
|
function Ge(f) {
|
|
414
|
-
return
|
|
414
|
+
return Ro(f);
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Vo(f) {
|
|
417
417
|
{
|
|
418
418
|
var m = typeof Symbol == "function" && Symbol.toStringTag, T = m && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
419
419
|
return T;
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Eo(f) {
|
|
423
423
|
try {
|
|
424
424
|
return hi(f), !1;
|
|
425
425
|
} catch {
|
|
@@ -429,18 +429,18 @@ function sa() {
|
|
|
429
429
|
function hi(f) {
|
|
430
430
|
return "" + f;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
433
|
-
if (
|
|
434
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
432
|
+
function di(f) {
|
|
433
|
+
if (Eo(f))
|
|
434
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Vo(f)), hi(f);
|
|
435
435
|
}
|
|
436
|
-
var zt = x.ReactCurrentOwner,
|
|
436
|
+
var zt = x.ReactCurrentOwner, Do = {
|
|
437
437
|
key: !0,
|
|
438
438
|
ref: !0,
|
|
439
439
|
__self: !0,
|
|
440
440
|
__source: !0
|
|
441
|
-
},
|
|
441
|
+
}, pi, mi, ze;
|
|
442
442
|
ze = {};
|
|
443
|
-
function
|
|
443
|
+
function Mo(f) {
|
|
444
444
|
if (Gt.call(f, "ref")) {
|
|
445
445
|
var m = Object.getOwnPropertyDescriptor(f, "ref").get;
|
|
446
446
|
if (m && m.isReactWarning)
|
|
@@ -448,7 +448,7 @@ function sa() {
|
|
|
448
448
|
}
|
|
449
449
|
return f.ref !== void 0;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function ko(f) {
|
|
452
452
|
if (Gt.call(f, "key")) {
|
|
453
453
|
var m = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
454
454
|
if (m && m.isReactWarning)
|
|
@@ -456,16 +456,16 @@ function sa() {
|
|
|
456
456
|
}
|
|
457
457
|
return f.key !== void 0;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Lo(f, m) {
|
|
460
460
|
if (typeof f.ref == "string" && zt.current && m && zt.current.stateNode !== m) {
|
|
461
461
|
var T = Z(zt.current.type);
|
|
462
462
|
ze[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(zt.current.type), f.ref), ze[T] = !0);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function jo(f, m) {
|
|
466
466
|
{
|
|
467
467
|
var T = function() {
|
|
468
|
-
|
|
468
|
+
pi || (pi = !0, y("%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://reactjs.org/link/special-props)", m));
|
|
469
469
|
};
|
|
470
470
|
T.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
471
471
|
get: T,
|
|
@@ -473,10 +473,10 @@ function sa() {
|
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Oo(f, m) {
|
|
477
477
|
{
|
|
478
478
|
var T = function() {
|
|
479
|
-
|
|
479
|
+
mi || (mi = !0, y("%s: `ref` 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://reactjs.org/link/special-props)", m));
|
|
480
480
|
};
|
|
481
481
|
T.isReactWarning = !0, Object.defineProperty(f, "ref", {
|
|
482
482
|
get: T,
|
|
@@ -484,7 +484,7 @@ function sa() {
|
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
var
|
|
487
|
+
var Fo = function(f, m, T, C, D, k, E) {
|
|
488
488
|
var R = {
|
|
489
489
|
// This tag allows us to uniquely identify this as a React Element
|
|
490
490
|
$$typeof: e,
|
|
@@ -505,7 +505,7 @@ function sa() {
|
|
|
505
505
|
configurable: !1,
|
|
506
506
|
enumerable: !1,
|
|
507
507
|
writable: !1,
|
|
508
|
-
value:
|
|
508
|
+
value: C
|
|
509
509
|
}), Object.defineProperty(R, "_source", {
|
|
510
510
|
configurable: !1,
|
|
511
511
|
enumerable: !1,
|
|
@@ -513,12 +513,12 @@ function sa() {
|
|
|
513
513
|
value: D
|
|
514
514
|
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
|
515
515
|
};
|
|
516
|
-
function
|
|
516
|
+
function _o(f, m, T, C, D) {
|
|
517
517
|
{
|
|
518
518
|
var k, E = {}, R = null, z = null;
|
|
519
|
-
T !== void 0 && (
|
|
519
|
+
T !== void 0 && (di(T), R = "" + T), ko(m) && (di(m.key), R = "" + m.key), Mo(m) && (z = m.ref, Lo(m, D));
|
|
520
520
|
for (k in m)
|
|
521
|
-
Gt.call(m, k) && !
|
|
521
|
+
Gt.call(m, k) && !Do.hasOwnProperty(k) && (E[k] = m[k]);
|
|
522
522
|
if (f && f.defaultProps) {
|
|
523
523
|
var _ = f.defaultProps;
|
|
524
524
|
for (k in _)
|
|
@@ -526,25 +526,25 @@ function sa() {
|
|
|
526
526
|
}
|
|
527
527
|
if (R || z) {
|
|
528
528
|
var I = typeof f == "function" ? f.displayName || f.name || "Unknown" : f;
|
|
529
|
-
R &&
|
|
529
|
+
R && jo(E, I), z && Oo(E, I);
|
|
530
530
|
}
|
|
531
|
-
return
|
|
531
|
+
return Fo(f, R, z, D, C, zt.current, E);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
var He = x.ReactCurrentOwner,
|
|
534
|
+
var He = x.ReactCurrentOwner, gi = x.ReactDebugCurrentFrame;
|
|
535
535
|
function kt(f) {
|
|
536
536
|
if (f) {
|
|
537
537
|
var m = f._owner, T = ye(f.type, f._source, m ? m.type : null);
|
|
538
|
-
|
|
538
|
+
gi.setExtraStackFrame(T);
|
|
539
539
|
} else
|
|
540
|
-
|
|
540
|
+
gi.setExtraStackFrame(null);
|
|
541
541
|
}
|
|
542
542
|
var Ye;
|
|
543
543
|
Ye = !1;
|
|
544
544
|
function Xe(f) {
|
|
545
545
|
return typeof f == "object" && f !== null && f.$$typeof === e;
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function yi() {
|
|
548
548
|
{
|
|
549
549
|
if (He.current) {
|
|
550
550
|
var f = Z(He.current.type);
|
|
@@ -556,7 +556,7 @@ Check the render method of \`` + f + "`.";
|
|
|
556
556
|
return "";
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Bo(f) {
|
|
560
560
|
{
|
|
561
561
|
if (f !== void 0) {
|
|
562
562
|
var m = f.fileName.replace(/^.*[\\\/]/, ""), T = f.lineNumber;
|
|
@@ -567,10 +567,10 @@ Check your code at ` + m + ":" + T + ".";
|
|
|
567
567
|
return "";
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
var
|
|
571
|
-
function
|
|
570
|
+
var vi = {};
|
|
571
|
+
function Io(f) {
|
|
572
572
|
{
|
|
573
|
-
var m =
|
|
573
|
+
var m = yi();
|
|
574
574
|
if (!m) {
|
|
575
575
|
var T = typeof f == "string" ? f : f.displayName || f.name;
|
|
576
576
|
T && (m = `
|
|
@@ -580,27 +580,27 @@ Check the top-level render call using <` + T + ">.");
|
|
|
580
580
|
return m;
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function Pi(f, m) {
|
|
584
584
|
{
|
|
585
585
|
if (!f._store || f._store.validated || f.key != null)
|
|
586
586
|
return;
|
|
587
587
|
f._store.validated = !0;
|
|
588
|
-
var T =
|
|
589
|
-
if (
|
|
588
|
+
var T = Io(m);
|
|
589
|
+
if (vi[T])
|
|
590
590
|
return;
|
|
591
|
-
|
|
592
|
-
var
|
|
593
|
-
f && f._owner && f._owner !== He.current && (
|
|
591
|
+
vi[T] = !0;
|
|
592
|
+
var C = "";
|
|
593
|
+
f && f._owner && f._owner !== He.current && (C = " It was passed a child from " + Z(f._owner.type) + "."), kt(f), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, C), kt(null);
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function xi(f, m) {
|
|
597
597
|
{
|
|
598
598
|
if (typeof f != "object")
|
|
599
599
|
return;
|
|
600
600
|
if (Ge(f))
|
|
601
601
|
for (var T = 0; T < f.length; T++) {
|
|
602
|
-
var
|
|
603
|
-
Xe(
|
|
602
|
+
var C = f[T];
|
|
603
|
+
Xe(C) && Pi(C, m);
|
|
604
604
|
}
|
|
605
605
|
else if (Xe(f))
|
|
606
606
|
f._store && (f._store.validated = !0);
|
|
@@ -608,11 +608,11 @@ Check the top-level render call using <` + T + ">.");
|
|
|
608
608
|
var D = b(f);
|
|
609
609
|
if (typeof D == "function" && D !== f.entries)
|
|
610
610
|
for (var k = D.call(f), E; !(E = k.next()).done; )
|
|
611
|
-
Xe(E.value) &&
|
|
611
|
+
Xe(E.value) && Pi(E.value, m);
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function No(f) {
|
|
616
616
|
{
|
|
617
617
|
var m = f.type;
|
|
618
618
|
if (m == null || typeof m == "string")
|
|
@@ -627,8 +627,8 @@ Check the top-level render call using <` + T + ">.");
|
|
|
627
627
|
else
|
|
628
628
|
return;
|
|
629
629
|
if (T) {
|
|
630
|
-
var
|
|
631
|
-
Co(T, f.props, "prop",
|
|
630
|
+
var C = Z(m);
|
|
631
|
+
Co(T, f.props, "prop", C, f);
|
|
632
632
|
} else if (m.PropTypes !== void 0 && !Ye) {
|
|
633
633
|
Ye = !0;
|
|
634
634
|
var D = Z(m);
|
|
@@ -637,84 +637,84 @@ Check the top-level render call using <` + T + ">.");
|
|
|
637
637
|
typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Uo(f) {
|
|
641
641
|
{
|
|
642
642
|
for (var m = Object.keys(f.props), T = 0; T < m.length; T++) {
|
|
643
|
-
var
|
|
644
|
-
if (
|
|
645
|
-
kt(f), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
643
|
+
var C = m[T];
|
|
644
|
+
if (C !== "children" && C !== "key") {
|
|
645
|
+
kt(f), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), kt(null);
|
|
646
646
|
break;
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
649
|
f.ref !== null && (kt(f), y("Invalid attribute `ref` supplied to `React.Fragment`."), kt(null));
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
var
|
|
653
|
-
function
|
|
652
|
+
var Ti = {};
|
|
653
|
+
function bi(f, m, T, C, D, k) {
|
|
654
654
|
{
|
|
655
655
|
var E = H(f);
|
|
656
656
|
if (!E) {
|
|
657
657
|
var R = "";
|
|
658
658
|
(f === void 0 || typeof f == "object" && f !== null && Object.keys(f).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
659
|
-
var z =
|
|
660
|
-
z ? R += z : R +=
|
|
659
|
+
var z = Bo(D);
|
|
660
|
+
z ? R += z : R += yi();
|
|
661
661
|
var _;
|
|
662
662
|
f === null ? _ = "null" : Ge(f) ? _ = "array" : f !== void 0 && f.$$typeof === e ? (_ = "<" + (Z(f.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof f, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, R);
|
|
663
663
|
}
|
|
664
|
-
var I =
|
|
664
|
+
var I = _o(f, m, T, D, k);
|
|
665
665
|
if (I == null)
|
|
666
666
|
return I;
|
|
667
667
|
if (E) {
|
|
668
668
|
var Q = m.children;
|
|
669
669
|
if (Q !== void 0)
|
|
670
|
-
if (
|
|
670
|
+
if (C)
|
|
671
671
|
if (Ge(Q)) {
|
|
672
672
|
for (var Lt = 0; Lt < Q.length; Lt++)
|
|
673
|
-
|
|
673
|
+
xi(Q[Lt], f);
|
|
674
674
|
Object.freeze && Object.freeze(Q);
|
|
675
675
|
} else
|
|
676
676
|
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
677
677
|
else
|
|
678
|
-
|
|
678
|
+
xi(Q, f);
|
|
679
679
|
}
|
|
680
680
|
if (Gt.call(m, "key")) {
|
|
681
|
-
var Tt = Z(f), Y = Object.keys(m).filter(function(
|
|
682
|
-
return
|
|
681
|
+
var Tt = Z(f), Y = Object.keys(m).filter(function(Ho) {
|
|
682
|
+
return Ho !== "key";
|
|
683
683
|
}), qe = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
684
|
-
if (!
|
|
685
|
-
var
|
|
684
|
+
if (!Ti[Tt + qe]) {
|
|
685
|
+
var zo = Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}";
|
|
686
686
|
y(`A props object containing a "key" prop is being spread into JSX:
|
|
687
687
|
let props = %s;
|
|
688
688
|
<%s {...props} />
|
|
689
689
|
React keys must be passed directly to JSX without using spread:
|
|
690
690
|
let props = %s;
|
|
691
|
-
<%s key={someKey} {...props} />`, qe, Tt,
|
|
691
|
+
<%s key={someKey} {...props} />`, qe, Tt, zo, Tt), Ti[Tt + qe] = !0;
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
-
return f === i ?
|
|
694
|
+
return f === i ? Uo(I) : No(I), I;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
|
-
function Uo(f, m, T) {
|
|
698
|
-
return Ti(f, m, T, !0);
|
|
699
|
-
}
|
|
700
697
|
function Wo(f, m, T) {
|
|
701
|
-
return
|
|
698
|
+
return bi(f, m, T, !0);
|
|
702
699
|
}
|
|
703
|
-
|
|
704
|
-
|
|
700
|
+
function $o(f, m, T) {
|
|
701
|
+
return bi(f, m, T, !1);
|
|
702
|
+
}
|
|
703
|
+
var Ko = $o, Go = Wo;
|
|
704
|
+
Yt.Fragment = i, Yt.jsx = Ko, Yt.jsxs = Go;
|
|
705
705
|
}()), Yt;
|
|
706
706
|
}
|
|
707
|
-
process.env.NODE_ENV === "production" ?
|
|
708
|
-
var O =
|
|
707
|
+
process.env.NODE_ENV === "production" ? fn.exports = sa() : fn.exports = ra();
|
|
708
|
+
var O = fn.exports;
|
|
709
709
|
const En = Et({
|
|
710
710
|
transformPagePoint: (t) => t,
|
|
711
711
|
isStatic: !1,
|
|
712
712
|
reducedMotion: "never"
|
|
713
|
-
}), Le = Et({}), je = Et(null), Dn = typeof window < "u",
|
|
713
|
+
}), Le = Et({}), je = Et(null), Dn = typeof window < "u", Ys = Dn ? Yo : gt, Xs = Et({ strict: !1 }), Oe = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), oa = "framerAppearId", qs = "data-" + Oe(oa), aa = {
|
|
714
714
|
skipAnimations: !1,
|
|
715
715
|
useManualTiming: !1
|
|
716
716
|
};
|
|
717
|
-
function
|
|
717
|
+
function la(t) {
|
|
718
718
|
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = !1, s = !1;
|
|
719
719
|
const o = /* @__PURE__ */ new WeakSet();
|
|
720
720
|
let r = {
|
|
@@ -765,35 +765,35 @@ const Pe = [
|
|
|
765
765
|
// Write
|
|
766
766
|
"postRender"
|
|
767
767
|
// Compute
|
|
768
|
-
],
|
|
769
|
-
function
|
|
768
|
+
], ua = 40;
|
|
769
|
+
function Zs(t, e) {
|
|
770
770
|
let n = !1, i = !0;
|
|
771
771
|
const s = {
|
|
772
772
|
delta: 0,
|
|
773
773
|
timestamp: 0,
|
|
774
774
|
isProcessing: !1
|
|
775
|
-
}, o = () => n = !0, r = Pe.reduce((x, y) => (x[y] =
|
|
775
|
+
}, o = () => n = !0, r = Pe.reduce((x, y) => (x[y] = la(o), x), {}), { read: a, resolveKeyframes: l, update: u, preRender: c, render: h, postRender: d } = r, p = () => {
|
|
776
776
|
const x = performance.now();
|
|
777
|
-
n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(x - s.timestamp,
|
|
777
|
+
n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(x - s.timestamp, ua), 1), s.timestamp = x, s.isProcessing = !0, a.process(s), l.process(s), u.process(s), c.process(s), h.process(s), d.process(s), s.isProcessing = !1, n && e && (i = !1, t(p));
|
|
778
778
|
}, g = () => {
|
|
779
779
|
n = !0, i = !0, s.isProcessing || t(p);
|
|
780
780
|
};
|
|
781
781
|
return { schedule: Pe.reduce((x, y) => {
|
|
782
782
|
const v = r[y];
|
|
783
|
-
return x[y] = (
|
|
783
|
+
return x[y] = (A, w = !1, L = !1) => (n || g(), v.schedule(A, w, L)), x;
|
|
784
784
|
}, {}), cancel: (x) => {
|
|
785
785
|
for (let y = 0; y < Pe.length; y++)
|
|
786
786
|
r[Pe[y]].cancel(x);
|
|
787
787
|
}, state: s, steps: r };
|
|
788
788
|
}
|
|
789
|
-
const { schedule: Mn, cancel:
|
|
789
|
+
const { schedule: Mn, cancel: Kf } = Zs(queueMicrotask, !1);
|
|
790
790
|
function Ot(t) {
|
|
791
791
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
792
792
|
}
|
|
793
|
-
const
|
|
794
|
-
let
|
|
795
|
-
function
|
|
796
|
-
const { visualElement: o } = U(Le), r = U(
|
|
793
|
+
const Js = Et({});
|
|
794
|
+
let Ai = !1;
|
|
795
|
+
function ca(t, e, n, i, s) {
|
|
796
|
+
const { visualElement: o } = U(Le), r = U(Xs), a = U(je), l = U(En).reducedMotion, u = it();
|
|
797
797
|
i = i || r.renderer, !u.current && i && (u.current = i(t, {
|
|
798
798
|
visualState: e,
|
|
799
799
|
parent: o,
|
|
@@ -802,23 +802,23 @@ function ua(t, e, n, i, s) {
|
|
|
802
802
|
blockInitialAnimation: a ? a.initial === !1 : !1,
|
|
803
803
|
reducedMotionConfig: l
|
|
804
804
|
}));
|
|
805
|
-
const c = u.current, h = U(
|
|
806
|
-
c && !c.projection && s && (c.type === "html" || c.type === "svg") && ha(u.current, n, s, h),
|
|
805
|
+
const c = u.current, h = U(Js);
|
|
806
|
+
c && !c.projection && s && (c.type === "html" || c.type === "svg") && ha(u.current, n, s, h), zs(() => {
|
|
807
807
|
c && c.update(n, a);
|
|
808
808
|
});
|
|
809
|
-
const d = it(!!(n[
|
|
810
|
-
return
|
|
809
|
+
const d = it(!!(n[qs] && !window.HandoffComplete));
|
|
810
|
+
return Ys(() => {
|
|
811
811
|
c && (c.updateFeatures(), Mn.render(c.render), d.current && c.animationState && c.animationState.animateChanges());
|
|
812
812
|
}), gt(() => {
|
|
813
|
-
c && (!d.current && c.animationState && c.animationState.animateChanges(), d.current && (d.current = !1,
|
|
813
|
+
c && (!d.current && c.animationState && c.animationState.animateChanges(), d.current && (d.current = !1, Ai || (Ai = !0, queueMicrotask(fa))));
|
|
814
814
|
}), c;
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function fa() {
|
|
817
817
|
window.HandoffComplete = !0;
|
|
818
818
|
}
|
|
819
819
|
function ha(t, e, n, i) {
|
|
820
820
|
const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: u } = e;
|
|
821
|
-
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 :
|
|
821
|
+
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Qs(t.parent)), t.projection.setOptions({
|
|
822
822
|
layoutId: s,
|
|
823
823
|
layout: o,
|
|
824
824
|
alwaysMeasureLayout: !!r || a && Ot(a),
|
|
@@ -836,11 +836,11 @@ function ha(t, e, n, i) {
|
|
|
836
836
|
layoutRoot: u
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Qs(t) {
|
|
840
840
|
if (t)
|
|
841
|
-
return t.options.allowProjection !== !1 ? t.projection :
|
|
841
|
+
return t.options.allowProjection !== !1 ? t.projection : Qs(t.parent);
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function da(t, e, n) {
|
|
844
844
|
return pt(
|
|
845
845
|
(i) => {
|
|
846
846
|
i && t.mount && t.mount(i), e && (i ? e.mount(i) : e.unmount()), n && (typeof n == "function" ? n(i) : Ot(n) && (n.current = i));
|
|
@@ -871,10 +871,10 @@ const kn = [
|
|
|
871
871
|
function Fe(t) {
|
|
872
872
|
return se(t.animate) || Ln.some((e) => ie(t[e]));
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function tr(t) {
|
|
875
875
|
return !!(Fe(t) || t.variants);
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function pa(t, e) {
|
|
878
878
|
if (Fe(t)) {
|
|
879
879
|
const { initial: n, animate: i } = t;
|
|
880
880
|
return {
|
|
@@ -884,14 +884,14 @@ function da(t, e) {
|
|
|
884
884
|
}
|
|
885
885
|
return t.inherit !== !1 ? e : {};
|
|
886
886
|
}
|
|
887
|
-
function
|
|
888
|
-
const { initial: e, animate: n } =
|
|
887
|
+
function ma(t) {
|
|
888
|
+
const { initial: e, animate: n } = pa(t, U(Le));
|
|
889
889
|
return Vt(() => ({ initial: e, animate: n }), [Ci(e), Ci(n)]);
|
|
890
890
|
}
|
|
891
891
|
function Ci(t) {
|
|
892
892
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
893
893
|
}
|
|
894
|
-
const
|
|
894
|
+
const Ri = {
|
|
895
895
|
animation: [
|
|
896
896
|
"animate",
|
|
897
897
|
"variants",
|
|
@@ -911,18 +911,18 @@ const Ai = {
|
|
|
911
911
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
912
912
|
layout: ["layout", "layoutId"]
|
|
913
913
|
}, Nt = {};
|
|
914
|
-
for (const t in
|
|
914
|
+
for (const t in Ri)
|
|
915
915
|
Nt[t] = {
|
|
916
|
-
isEnabled: (e) =>
|
|
916
|
+
isEnabled: (e) => Ri[t].some((n) => !!e[n])
|
|
917
917
|
};
|
|
918
|
-
function
|
|
918
|
+
function ga(t) {
|
|
919
919
|
for (const e in t)
|
|
920
920
|
Nt[e] = {
|
|
921
921
|
...Nt[e],
|
|
922
922
|
...t[e]
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
|
-
const jn = Et({}),
|
|
925
|
+
const jn = Et({}), ya = Symbol.for("motionComponentSymbol"), W = (t) => t;
|
|
926
926
|
let Wt = W, ct = W;
|
|
927
927
|
process.env.NODE_ENV !== "production" && (Wt = (t, e) => {
|
|
928
928
|
!t && typeof console < "u" && console.warn(e);
|
|
@@ -930,37 +930,37 @@ process.env.NODE_ENV !== "production" && (Wt = (t, e) => {
|
|
|
930
930
|
if (!t)
|
|
931
931
|
throw new Error(e);
|
|
932
932
|
});
|
|
933
|
-
function
|
|
934
|
-
t &&
|
|
933
|
+
function va({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: i, Component: s }) {
|
|
934
|
+
t && ga(t);
|
|
935
935
|
function o(a, l) {
|
|
936
936
|
let u;
|
|
937
937
|
const c = {
|
|
938
938
|
...U(En),
|
|
939
939
|
...a,
|
|
940
|
-
layoutId:
|
|
941
|
-
}, { isStatic: h } = c, d =
|
|
940
|
+
layoutId: Pa(a)
|
|
941
|
+
}, { isStatic: h } = c, d = ma(a), p = i(a, h);
|
|
942
942
|
if (!h && Dn) {
|
|
943
|
-
|
|
944
|
-
const g =
|
|
945
|
-
u = g.MeasureLayout, d.visualElement =
|
|
943
|
+
xa(c, t);
|
|
944
|
+
const g = Ta(c);
|
|
945
|
+
u = g.MeasureLayout, d.visualElement = ca(s, p, c, e, g.ProjectionNode);
|
|
946
946
|
}
|
|
947
|
-
return O.jsxs(Le.Provider, { value: d, children: [u && d.visualElement ? O.jsx(u, { visualElement: d.visualElement, ...c }) : null, n(s, a,
|
|
947
|
+
return O.jsxs(Le.Provider, { value: d, children: [u && d.visualElement ? O.jsx(u, { visualElement: d.visualElement, ...c }) : null, n(s, a, da(p, d.visualElement, l), p, h, d.visualElement)] });
|
|
948
948
|
}
|
|
949
|
-
const r =
|
|
950
|
-
return r[
|
|
949
|
+
const r = Ce(o);
|
|
950
|
+
return r[ya] = s, r;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function Pa({ layoutId: t }) {
|
|
953
953
|
const e = U(jn).id;
|
|
954
954
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
const n = U(
|
|
956
|
+
function xa(t, e) {
|
|
957
|
+
const n = U(Xs).strict;
|
|
958
958
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
959
959
|
const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
960
960
|
t.ignoreStrict ? Wt(!1, i) : ct(!1, i);
|
|
961
961
|
}
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function Ta(t) {
|
|
964
964
|
const { drag: e, layout: n } = Nt;
|
|
965
965
|
if (!e && !n)
|
|
966
966
|
return {};
|
|
@@ -970,9 +970,9 @@ function xa(t) {
|
|
|
970
970
|
ProjectionNode: i.ProjectionNode
|
|
971
971
|
};
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function ba(t) {
|
|
974
974
|
function e(i, s = {}) {
|
|
975
|
-
return
|
|
975
|
+
return va(t(i, s));
|
|
976
976
|
}
|
|
977
977
|
if (typeof Proxy > "u")
|
|
978
978
|
return e;
|
|
@@ -986,7 +986,7 @@ function Ta(t) {
|
|
|
986
986
|
get: (i, s) => (n.has(s) || n.set(s, e(s)), n.get(s))
|
|
987
987
|
});
|
|
988
988
|
}
|
|
989
|
-
const
|
|
989
|
+
const wa = [
|
|
990
990
|
"animate",
|
|
991
991
|
"circle",
|
|
992
992
|
"defs",
|
|
@@ -1026,7 +1026,7 @@ function On(t) {
|
|
|
1026
1026
|
/**
|
|
1027
1027
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
1028
1028
|
*/
|
|
1029
|
-
!!(
|
|
1029
|
+
!!(wa.indexOf(t) > -1 || /**
|
|
1030
1030
|
* If it contains a capital letter, it's an SVG component
|
|
1031
1031
|
*/
|
|
1032
1032
|
/[A-Z]/u.test(t))
|
|
@@ -1034,10 +1034,10 @@ function On(t) {
|
|
|
1034
1034
|
);
|
|
1035
1035
|
}
|
|
1036
1036
|
const Re = {};
|
|
1037
|
-
function
|
|
1037
|
+
function Sa(t) {
|
|
1038
1038
|
Object.assign(Re, t);
|
|
1039
1039
|
}
|
|
1040
|
-
const
|
|
1040
|
+
const fe = [
|
|
1041
1041
|
"transformPerspective",
|
|
1042
1042
|
"x",
|
|
1043
1043
|
"y",
|
|
@@ -1055,28 +1055,11 @@ const he = [
|
|
|
1055
1055
|
"skew",
|
|
1056
1056
|
"skewX",
|
|
1057
1057
|
"skewY"
|
|
1058
|
-
], Pt = new Set(
|
|
1059
|
-
function
|
|
1058
|
+
], Pt = new Set(fe);
|
|
1059
|
+
function er(t, { layout: e, layoutId: n }) {
|
|
1060
1060
|
return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Re[t] || t === "opacity");
|
|
1061
1061
|
}
|
|
1062
|
-
const K = (t) => !!(t && t.getVelocity),
|
|
1063
|
-
x: "translateX",
|
|
1064
|
-
y: "translateY",
|
|
1065
|
-
z: "translateZ",
|
|
1066
|
-
transformPerspective: "perspective"
|
|
1067
|
-
}, Ca = he.length;
|
|
1068
|
-
function Aa(t, e, n) {
|
|
1069
|
-
let i = "";
|
|
1070
|
-
for (let s = 0; s < Ca; s++) {
|
|
1071
|
-
const o = he[s];
|
|
1072
|
-
if (t[o] !== void 0) {
|
|
1073
|
-
const r = Sa[o] || o;
|
|
1074
|
-
i += `${r}(${t[o]}) `;
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
return i = i.trim(), n ? i = n(t, e ? "" : i) : e && (i = "none"), i;
|
|
1078
|
-
}
|
|
1079
|
-
const er = (t) => (e) => typeof e == "string" && e.startsWith(t), nr = er("--"), Ra = er("var(--"), Fn = (t) => Ra(t) ? Va.test(t.split("/*")[0].trim()) : !1, Va = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Ea = (t, e) => e && typeof t == "number" ? e.transform(t) : t, yt = (t, e, n) => n > e ? e : n < t ? t : n, $t = {
|
|
1062
|
+
const K = (t) => !!(t && t.getVelocity), nr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, yt = (t, e, n) => n > e ? e : n < t ? t : n, $t = {
|
|
1080
1063
|
test: (t) => typeof t == "number",
|
|
1081
1064
|
parse: parseFloat,
|
|
1082
1065
|
transform: (t) => t
|
|
@@ -1086,25 +1069,25 @@ const er = (t) => (e) => typeof e == "string" && e.startsWith(t), nr = er("--"),
|
|
|
1086
1069
|
}, xe = {
|
|
1087
1070
|
...$t,
|
|
1088
1071
|
default: 1
|
|
1089
|
-
}, te = (t) => Math.round(t * 1e5) / 1e5,
|
|
1090
|
-
function
|
|
1072
|
+
}, te = (t) => Math.round(t * 1e5) / 1e5, Fn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu, Aa = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, Ca = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
|
|
1073
|
+
function he(t) {
|
|
1091
1074
|
return typeof t == "string";
|
|
1092
1075
|
}
|
|
1093
|
-
function
|
|
1076
|
+
function Ra(t) {
|
|
1094
1077
|
return t == null;
|
|
1095
1078
|
}
|
|
1096
1079
|
const de = (t) => ({
|
|
1097
|
-
test: (e) =>
|
|
1080
|
+
test: (e) => he(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
1098
1081
|
parse: parseFloat,
|
|
1099
1082
|
transform: (e) => `${e}${t}`
|
|
1100
|
-
}), dt = de("deg"), st = de("%"), S = de("px"),
|
|
1083
|
+
}), dt = de("deg"), st = de("%"), S = de("px"), Va = de("vh"), Ea = de("vw"), Vi = {
|
|
1101
1084
|
...st,
|
|
1102
1085
|
parse: (t) => st.parse(t) / 100,
|
|
1103
1086
|
transform: (t) => st.transform(t * 100)
|
|
1104
|
-
},
|
|
1087
|
+
}, Ei = {
|
|
1105
1088
|
...$t,
|
|
1106
1089
|
transform: Math.round
|
|
1107
|
-
},
|
|
1090
|
+
}, _n = {
|
|
1108
1091
|
// Border props
|
|
1109
1092
|
borderWidth: S,
|
|
1110
1093
|
borderTopWidth: S,
|
|
@@ -1160,59 +1143,83 @@ const de = (t) => ({
|
|
|
1160
1143
|
perspective: S,
|
|
1161
1144
|
transformPerspective: S,
|
|
1162
1145
|
opacity: Qt,
|
|
1163
|
-
originX:
|
|
1164
|
-
originY:
|
|
1146
|
+
originX: Vi,
|
|
1147
|
+
originY: Vi,
|
|
1165
1148
|
originZ: S,
|
|
1166
1149
|
// Misc
|
|
1167
|
-
zIndex:
|
|
1150
|
+
zIndex: Ei,
|
|
1168
1151
|
backgroundPositionX: S,
|
|
1169
1152
|
backgroundPositionY: S,
|
|
1170
1153
|
// SVG
|
|
1171
1154
|
fillOpacity: Qt,
|
|
1172
1155
|
strokeOpacity: Qt,
|
|
1173
|
-
numOctaves:
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1156
|
+
numOctaves: Ei
|
|
1157
|
+
}, Da = {
|
|
1158
|
+
x: "translateX",
|
|
1159
|
+
y: "translateY",
|
|
1160
|
+
z: "translateZ",
|
|
1161
|
+
transformPerspective: "perspective"
|
|
1162
|
+
}, Ma = fe.length;
|
|
1163
|
+
function ka(t, e, n) {
|
|
1164
|
+
let i = "", s = !0;
|
|
1165
|
+
for (let o = 0; o < Ma; o++) {
|
|
1166
|
+
const r = fe[o], a = t[r];
|
|
1167
|
+
if (a === void 0)
|
|
1182
1168
|
continue;
|
|
1169
|
+
let l = !0;
|
|
1170
|
+
if (typeof a == "number" ? l = a === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
1171
|
+
const u = nr(a, _n[r]);
|
|
1172
|
+
if (!l) {
|
|
1173
|
+
s = !1;
|
|
1174
|
+
const c = Da[r] || r;
|
|
1175
|
+
i += `${c}(${u}) `;
|
|
1176
|
+
}
|
|
1177
|
+
n && (e[r] = u);
|
|
1183
1178
|
}
|
|
1184
|
-
const d = ir[c], p = Ea(h, d);
|
|
1185
|
-
if (Pt.has(c)) {
|
|
1186
|
-
if (a = !0, o[c] = p, !u)
|
|
1187
|
-
continue;
|
|
1188
|
-
h !== (d.default || 0) && (u = !1);
|
|
1189
|
-
} else
|
|
1190
|
-
c.startsWith("origin") ? (l = !0, r[c] = p) : i[c] = p;
|
|
1191
1179
|
}
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1180
|
+
return i = i.trim(), n ? i = n(e, s ? "" : i) : s && (i = "none"), i;
|
|
1181
|
+
}
|
|
1182
|
+
const ir = (t) => (e) => typeof e == "string" && e.startsWith(t), sr = ir("--"), La = ir("var(--"), Bn = (t) => La(t) ? ja.test(t.split("/*")[0].trim()) : !1, ja = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
1183
|
+
function In(t, e, n) {
|
|
1184
|
+
const { style: i, vars: s, transformOrigin: o } = t;
|
|
1185
|
+
let r = !1, a = !1;
|
|
1186
|
+
for (const l in e) {
|
|
1187
|
+
const u = e[l];
|
|
1188
|
+
if (Pt.has(l)) {
|
|
1189
|
+
r = !0;
|
|
1190
|
+
continue;
|
|
1191
|
+
} else if (sr(l)) {
|
|
1192
|
+
s[l] = u;
|
|
1193
|
+
continue;
|
|
1194
|
+
} else {
|
|
1195
|
+
const c = nr(u, _n[l]);
|
|
1196
|
+
l.startsWith("origin") ? (a = !0, o[l] = c) : i[l] = c;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
if (e.transform || (r || n ? i.transform = ka(e, t.transform, n) : i.transform && (i.transform = "none")), a) {
|
|
1200
|
+
const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = o;
|
|
1201
|
+
i.transformOrigin = `${l} ${u} ${c}`;
|
|
1195
1202
|
}
|
|
1196
1203
|
}
|
|
1197
|
-
const
|
|
1204
|
+
const Nn = () => ({
|
|
1198
1205
|
style: {},
|
|
1199
1206
|
transform: {},
|
|
1200
1207
|
transformOrigin: {},
|
|
1201
1208
|
vars: {}
|
|
1202
1209
|
});
|
|
1203
|
-
function
|
|
1210
|
+
function rr(t, e, n) {
|
|
1204
1211
|
for (const i in e)
|
|
1205
|
-
!K(e[i]) && !
|
|
1212
|
+
!K(e[i]) && !er(i, n) && (t[i] = e[i]);
|
|
1206
1213
|
}
|
|
1207
1214
|
function Oa({ transformTemplate: t }, e) {
|
|
1208
1215
|
return Vt(() => {
|
|
1209
|
-
const n =
|
|
1210
|
-
return
|
|
1216
|
+
const n = Nn();
|
|
1217
|
+
return In(n, e, t), Object.assign({}, n.vars, n.style);
|
|
1211
1218
|
}, [e]);
|
|
1212
1219
|
}
|
|
1213
1220
|
function Fa(t, e) {
|
|
1214
1221
|
const n = t.style || {}, i = {};
|
|
1215
|
-
return
|
|
1222
|
+
return rr(i, n, t), Object.assign(i, Oa(t, e)), i;
|
|
1216
1223
|
}
|
|
1217
1224
|
function _a(t, e) {
|
|
1218
1225
|
const n = {}, i = Fa(t, e);
|
|
@@ -1253,9 +1260,9 @@ const Ba = /* @__PURE__ */ new Set([
|
|
|
1253
1260
|
function Ve(t) {
|
|
1254
1261
|
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Ba.has(t);
|
|
1255
1262
|
}
|
|
1256
|
-
let
|
|
1263
|
+
let or = (t) => !Ve(t);
|
|
1257
1264
|
function Ia(t) {
|
|
1258
|
-
t && (
|
|
1265
|
+
t && (or = (e) => e.startsWith("on") ? !Ve(e) : t(e));
|
|
1259
1266
|
}
|
|
1260
1267
|
try {
|
|
1261
1268
|
Ia(require("@emotion/is-prop-valid").default);
|
|
@@ -1264,15 +1271,15 @@ try {
|
|
|
1264
1271
|
function Na(t, e, n) {
|
|
1265
1272
|
const i = {};
|
|
1266
1273
|
for (const s in t)
|
|
1267
|
-
s === "values" && typeof t.values == "object" || (
|
|
1274
|
+
s === "values" && typeof t.values == "object" || (or(s) || n === !0 && Ve(s) || !e && !Ve(s) || // If trying to use native HTML drag events, forward drag listeners
|
|
1268
1275
|
t.draggable && s.startsWith("onDrag")) && (i[s] = t[s]);
|
|
1269
1276
|
return i;
|
|
1270
1277
|
}
|
|
1271
|
-
function
|
|
1278
|
+
function Di(t, e, n) {
|
|
1272
1279
|
return typeof t == "string" ? t : S.transform(e + n * t);
|
|
1273
1280
|
}
|
|
1274
1281
|
function Ua(t, e, n) {
|
|
1275
|
-
const i =
|
|
1282
|
+
const i = Di(e, t.x, t.width), s = Di(n, t.y, t.height);
|
|
1276
1283
|
return `${i} ${s}`;
|
|
1277
1284
|
}
|
|
1278
1285
|
const Wa = {
|
|
@@ -1289,7 +1296,7 @@ function Ka(t, e, n = 1, i = 0, s = !0) {
|
|
|
1289
1296
|
const r = S.transform(e), a = S.transform(n);
|
|
1290
1297
|
t[o.array] = `${r} ${a}`;
|
|
1291
1298
|
}
|
|
1292
|
-
function
|
|
1299
|
+
function Un(t, {
|
|
1293
1300
|
attrX: e,
|
|
1294
1301
|
attrY: n,
|
|
1295
1302
|
attrScale: i,
|
|
@@ -1301,7 +1308,7 @@ function Nn(t, {
|
|
|
1301
1308
|
// This is object creation, which we try to avoid per-frame.
|
|
1302
1309
|
...u
|
|
1303
1310
|
}, c, h) {
|
|
1304
|
-
if (
|
|
1311
|
+
if (In(t, u, h), c) {
|
|
1305
1312
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
1306
1313
|
return;
|
|
1307
1314
|
}
|
|
@@ -1309,39 +1316,39 @@ function Nn(t, {
|
|
|
1309
1316
|
const { attrs: d, style: p, dimensions: g } = t;
|
|
1310
1317
|
d.transform && (g && (p.transform = d.transform), delete d.transform), g && (s !== void 0 || o !== void 0 || p.transform) && (p.transformOrigin = Ua(g, s !== void 0 ? s : 0.5, o !== void 0 ? o : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), i !== void 0 && (d.scale = i), r !== void 0 && Ka(d, r, a, l, !1);
|
|
1311
1318
|
}
|
|
1312
|
-
const
|
|
1313
|
-
...
|
|
1319
|
+
const ar = () => ({
|
|
1320
|
+
...Nn(),
|
|
1314
1321
|
attrs: {}
|
|
1315
|
-
}),
|
|
1322
|
+
}), Wn = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1316
1323
|
function Ga(t, e, n, i) {
|
|
1317
1324
|
const s = Vt(() => {
|
|
1318
|
-
const o =
|
|
1319
|
-
return
|
|
1325
|
+
const o = ar();
|
|
1326
|
+
return Un(o, e, Wn(i), t.transformTemplate), {
|
|
1320
1327
|
...o.attrs,
|
|
1321
1328
|
style: { ...o.style }
|
|
1322
1329
|
};
|
|
1323
1330
|
}, [e]);
|
|
1324
1331
|
if (t.style) {
|
|
1325
1332
|
const o = {};
|
|
1326
|
-
|
|
1333
|
+
rr(o, t.style, t), s.style = { ...o, ...s.style };
|
|
1327
1334
|
}
|
|
1328
1335
|
return s;
|
|
1329
1336
|
}
|
|
1330
1337
|
function za(t = !1) {
|
|
1331
1338
|
return (n, i, s, { latestValues: o }, r) => {
|
|
1332
|
-
const l = (On(n) ? Ga : _a)(i, o, r, n), u = Na(i, typeof n == "string", t), c = n !==
|
|
1333
|
-
return
|
|
1339
|
+
const l = (On(n) ? Ga : _a)(i, o, r, n), u = Na(i, typeof n == "string", t), c = n !== Hs ? { ...u, ...l, ref: s } : {}, { children: h } = i, d = Vt(() => K(h) ? h.get() : h, [h]);
|
|
1340
|
+
return Xo(n, {
|
|
1334
1341
|
...c,
|
|
1335
1342
|
children: d
|
|
1336
1343
|
});
|
|
1337
1344
|
};
|
|
1338
1345
|
}
|
|
1339
|
-
function
|
|
1346
|
+
function lr(t, { style: e, vars: n }, i, s) {
|
|
1340
1347
|
Object.assign(t.style, e, s && s.getProjectionStyles(i));
|
|
1341
1348
|
for (const o in n)
|
|
1342
1349
|
t.style.setProperty(o, n[o]);
|
|
1343
1350
|
}
|
|
1344
|
-
const
|
|
1351
|
+
const ur = /* @__PURE__ */ new Set([
|
|
1345
1352
|
"baseFrequency",
|
|
1346
1353
|
"diffuseConstant",
|
|
1347
1354
|
"kernelMatrix",
|
|
@@ -1366,49 +1373,49 @@ const lr = /* @__PURE__ */ new Set([
|
|
|
1366
1373
|
"textLength",
|
|
1367
1374
|
"lengthAdjust"
|
|
1368
1375
|
]);
|
|
1369
|
-
function
|
|
1370
|
-
|
|
1376
|
+
function cr(t, e, n, i) {
|
|
1377
|
+
lr(t, e, void 0, i);
|
|
1371
1378
|
for (const s in e.attrs)
|
|
1372
|
-
t.setAttribute(
|
|
1379
|
+
t.setAttribute(ur.has(s) ? s : Oe(s), e.attrs[s]);
|
|
1373
1380
|
}
|
|
1374
|
-
function
|
|
1381
|
+
function $n(t, e, n) {
|
|
1375
1382
|
var i;
|
|
1376
1383
|
const { style: s } = t, o = {};
|
|
1377
1384
|
for (const r in s)
|
|
1378
|
-
(K(s[r]) || e.style && K(e.style[r]) ||
|
|
1385
|
+
(K(s[r]) || e.style && K(e.style[r]) || er(r, t) || ((i = n == null ? void 0 : n.getValue(r)) === null || i === void 0 ? void 0 : i.liveStyle) !== void 0) && (o[r] = s[r]);
|
|
1379
1386
|
return n && s && typeof s.willChange == "string" && (n.applyWillChange = !1), o;
|
|
1380
1387
|
}
|
|
1381
|
-
function
|
|
1382
|
-
const i =
|
|
1388
|
+
function fr(t, e, n) {
|
|
1389
|
+
const i = $n(t, e, n);
|
|
1383
1390
|
for (const s in t)
|
|
1384
1391
|
if (K(t[s]) || K(e[s])) {
|
|
1385
|
-
const o =
|
|
1392
|
+
const o = fe.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
1386
1393
|
i[o] = t[s];
|
|
1387
1394
|
}
|
|
1388
1395
|
return i;
|
|
1389
1396
|
}
|
|
1390
|
-
function
|
|
1397
|
+
function Mi(t) {
|
|
1391
1398
|
const e = [{}, {}];
|
|
1392
1399
|
return t == null || t.values.forEach((n, i) => {
|
|
1393
1400
|
e[0][i] = n.get(), e[1][i] = n.getVelocity();
|
|
1394
1401
|
}), e;
|
|
1395
1402
|
}
|
|
1396
|
-
function
|
|
1403
|
+
function Kn(t, e, n, i) {
|
|
1397
1404
|
if (typeof e == "function") {
|
|
1398
|
-
const [s, o] =
|
|
1405
|
+
const [s, o] = Mi(i);
|
|
1399
1406
|
e = e(n !== void 0 ? n : t.custom, s, o);
|
|
1400
1407
|
}
|
|
1401
1408
|
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
1402
|
-
const [s, o] =
|
|
1409
|
+
const [s, o] = Mi(i);
|
|
1403
1410
|
e = e(n !== void 0 ? n : t.custom, s, o);
|
|
1404
1411
|
}
|
|
1405
1412
|
return e;
|
|
1406
1413
|
}
|
|
1407
|
-
function
|
|
1414
|
+
function Gn(t) {
|
|
1408
1415
|
const e = it(null);
|
|
1409
1416
|
return e.current === null && (e.current = t()), e.current;
|
|
1410
1417
|
}
|
|
1411
|
-
const
|
|
1418
|
+
const hn = (t) => Array.isArray(t), Ha = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), Ya = (t) => hn(t) ? t[t.length - 1] || 0 : t;
|
|
1412
1419
|
function we(t) {
|
|
1413
1420
|
const e = K(t) ? t.get() : t;
|
|
1414
1421
|
return Ha(e) ? e.toValue() : e;
|
|
@@ -1422,7 +1429,7 @@ const hr = /* @__PURE__ */ new Set([
|
|
|
1422
1429
|
// or until we implement support for linear() easing.
|
|
1423
1430
|
// "background-color"
|
|
1424
1431
|
]);
|
|
1425
|
-
function
|
|
1432
|
+
function dr(t) {
|
|
1426
1433
|
if (Pt.has(t))
|
|
1427
1434
|
return "transform";
|
|
1428
1435
|
if (hr.has(t))
|
|
@@ -1442,18 +1449,18 @@ function Xa({ applyWillChange: t = !1, scrapeMotionValuesFromProps: e, createRen
|
|
|
1442
1449
|
};
|
|
1443
1450
|
return i && (l.mount = (u) => i(s, u, l)), l;
|
|
1444
1451
|
}
|
|
1445
|
-
const
|
|
1452
|
+
const pr = (t) => (e, n) => {
|
|
1446
1453
|
const i = U(Le), s = U(je), o = () => Xa(t, e, i, s, n);
|
|
1447
|
-
return n ? o() :
|
|
1454
|
+
return n ? o() : Gn(o);
|
|
1448
1455
|
};
|
|
1449
1456
|
function qa(t, e) {
|
|
1450
|
-
const n =
|
|
1457
|
+
const n = dr(e);
|
|
1451
1458
|
n && _e(t, n);
|
|
1452
1459
|
}
|
|
1453
|
-
function
|
|
1460
|
+
function ki(t, e, n) {
|
|
1454
1461
|
const i = Array.isArray(e) ? e : [e];
|
|
1455
1462
|
for (let s = 0; s < i.length; s++) {
|
|
1456
|
-
const o =
|
|
1463
|
+
const o = Kn(t, i[s]);
|
|
1457
1464
|
if (o) {
|
|
1458
1465
|
const { transitionEnd: r, transition: a, ...l } = o;
|
|
1459
1466
|
n(l, r);
|
|
@@ -1466,31 +1473,31 @@ function Za(t, e, n, i, s) {
|
|
|
1466
1473
|
for (const b in u)
|
|
1467
1474
|
r[b] = we(u[b]);
|
|
1468
1475
|
let { initial: c, animate: h } = t;
|
|
1469
|
-
const d = Fe(t), p =
|
|
1476
|
+
const d = Fe(t), p = tr(t);
|
|
1470
1477
|
e && p && !d && t.inherit !== !1 && (c === void 0 && (c = e.initial), h === void 0 && (h = e.animate));
|
|
1471
1478
|
let g = n ? n.initial === !1 : !1;
|
|
1472
1479
|
g = g || c === !1;
|
|
1473
1480
|
const P = g ? h : c;
|
|
1474
|
-
return P && typeof P != "boolean" && !se(P) &&
|
|
1481
|
+
return P && typeof P != "boolean" && !se(P) && ki(t, P, (b, x) => {
|
|
1475
1482
|
for (const y in b) {
|
|
1476
1483
|
let v = b[y];
|
|
1477
1484
|
if (Array.isArray(v)) {
|
|
1478
|
-
const
|
|
1479
|
-
v = v[
|
|
1485
|
+
const A = g ? v.length - 1 : 0;
|
|
1486
|
+
v = v[A];
|
|
1480
1487
|
}
|
|
1481
1488
|
v !== null && (r[y] = v);
|
|
1482
1489
|
}
|
|
1483
1490
|
for (const y in x)
|
|
1484
1491
|
r[y] = x[y];
|
|
1485
|
-
}), l && (h && c !== !1 && !se(h) &&
|
|
1492
|
+
}), l && (h && c !== !1 && !se(h) && ki(t, h, (b) => {
|
|
1486
1493
|
for (const x in b)
|
|
1487
1494
|
qa(a, x);
|
|
1488
1495
|
}), a.length && (r.willChange = a.join(","))), r;
|
|
1489
1496
|
}
|
|
1490
|
-
const { schedule: M, cancel:
|
|
1491
|
-
useVisualState:
|
|
1492
|
-
scrapeMotionValuesFromProps:
|
|
1493
|
-
createRenderState:
|
|
1497
|
+
const { schedule: M, cancel: ft, state: N, steps: Ze } = Zs(typeof requestAnimationFrame < "u" ? requestAnimationFrame : W, !0), Ja = {
|
|
1498
|
+
useVisualState: pr({
|
|
1499
|
+
scrapeMotionValuesFromProps: fr,
|
|
1500
|
+
createRenderState: ar,
|
|
1494
1501
|
onMount: (t, e, { renderState: n, latestValues: i }) => {
|
|
1495
1502
|
M.read(() => {
|
|
1496
1503
|
try {
|
|
@@ -1504,15 +1511,15 @@ const { schedule: M, cancel: ht, state: N, steps: Ze } = qs(typeof requestAnimat
|
|
|
1504
1511
|
};
|
|
1505
1512
|
}
|
|
1506
1513
|
}), M.render(() => {
|
|
1507
|
-
|
|
1514
|
+
Un(n, i, Wn(e.tagName), t.transformTemplate), cr(e, n);
|
|
1508
1515
|
});
|
|
1509
1516
|
}
|
|
1510
1517
|
})
|
|
1511
1518
|
}, Qa = {
|
|
1512
|
-
useVisualState:
|
|
1519
|
+
useVisualState: pr({
|
|
1513
1520
|
applyWillChange: !0,
|
|
1514
|
-
scrapeMotionValuesFromProps:
|
|
1515
|
-
createRenderState:
|
|
1521
|
+
scrapeMotionValuesFromProps: $n,
|
|
1522
|
+
createRenderState: Nn
|
|
1516
1523
|
})
|
|
1517
1524
|
};
|
|
1518
1525
|
function tl(t, { forwardMotionProps: e = !1 }, n, i) {
|
|
@@ -1527,7 +1534,7 @@ function tl(t, { forwardMotionProps: e = !1 }, n, i) {
|
|
|
1527
1534
|
function rt(t, e, n, i = { passive: !0 }) {
|
|
1528
1535
|
return t.addEventListener(e, n, i), () => t.removeEventListener(e, n);
|
|
1529
1536
|
}
|
|
1530
|
-
const
|
|
1537
|
+
const mr = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1;
|
|
1531
1538
|
function Ie(t, e = "page") {
|
|
1532
1539
|
return {
|
|
1533
1540
|
point: {
|
|
@@ -1536,12 +1543,12 @@ function Ie(t, e = "page") {
|
|
|
1536
1543
|
}
|
|
1537
1544
|
};
|
|
1538
1545
|
}
|
|
1539
|
-
const el = (t) => (e) =>
|
|
1546
|
+
const el = (t) => (e) => mr(e) && t(e, Ie(e));
|
|
1540
1547
|
function ot(t, e, n, i) {
|
|
1541
1548
|
return rt(t, e, el(n), i);
|
|
1542
1549
|
}
|
|
1543
1550
|
const nl = (t, e) => (n) => e(t(n)), at = (...t) => t.reduce(nl);
|
|
1544
|
-
function
|
|
1551
|
+
function gr(t) {
|
|
1545
1552
|
let e = null;
|
|
1546
1553
|
return () => {
|
|
1547
1554
|
const n = () => {
|
|
@@ -1550,23 +1557,23 @@ function mr(t) {
|
|
|
1550
1557
|
return e === null ? (e = t, n) : !1;
|
|
1551
1558
|
};
|
|
1552
1559
|
}
|
|
1553
|
-
const
|
|
1554
|
-
function
|
|
1560
|
+
const Li = gr("dragHorizontal"), ji = gr("dragVertical");
|
|
1561
|
+
function yr(t) {
|
|
1555
1562
|
let e = !1;
|
|
1556
1563
|
if (t === "y")
|
|
1557
|
-
e =
|
|
1564
|
+
e = ji();
|
|
1558
1565
|
else if (t === "x")
|
|
1559
|
-
e =
|
|
1566
|
+
e = Li();
|
|
1560
1567
|
else {
|
|
1561
|
-
const n =
|
|
1568
|
+
const n = Li(), i = ji();
|
|
1562
1569
|
n && i ? e = () => {
|
|
1563
1570
|
n(), i();
|
|
1564
1571
|
} : (n && n(), i && i());
|
|
1565
1572
|
}
|
|
1566
1573
|
return e;
|
|
1567
1574
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const t =
|
|
1575
|
+
function vr() {
|
|
1576
|
+
const t = yr(!0);
|
|
1570
1577
|
return t ? (t(), !1) : !0;
|
|
1571
1578
|
}
|
|
1572
1579
|
class xt {
|
|
@@ -1576,9 +1583,9 @@ class xt {
|
|
|
1576
1583
|
update() {
|
|
1577
1584
|
}
|
|
1578
1585
|
}
|
|
1579
|
-
function
|
|
1586
|
+
function Oi(t, e) {
|
|
1580
1587
|
const n = e ? "pointerenter" : "pointerleave", i = e ? "onHoverStart" : "onHoverEnd", s = (o, r) => {
|
|
1581
|
-
if (o.pointerType === "touch" ||
|
|
1588
|
+
if (o.pointerType === "touch" || vr())
|
|
1582
1589
|
return;
|
|
1583
1590
|
const a = t.getProps();
|
|
1584
1591
|
t.animationState && a.whileHover && t.animationState.setActive("whileHover", e);
|
|
@@ -1591,7 +1598,7 @@ function ji(t, e) {
|
|
|
1591
1598
|
}
|
|
1592
1599
|
class il extends xt {
|
|
1593
1600
|
mount() {
|
|
1594
|
-
this.unmount = at(
|
|
1601
|
+
this.unmount = at(Oi(this.node, !0), Oi(this.node, !1));
|
|
1595
1602
|
}
|
|
1596
1603
|
unmount() {
|
|
1597
1604
|
}
|
|
@@ -1618,7 +1625,7 @@ class sl extends xt {
|
|
|
1618
1625
|
unmount() {
|
|
1619
1626
|
}
|
|
1620
1627
|
}
|
|
1621
|
-
const
|
|
1628
|
+
const Pr = (t, e) => e ? t === e ? !0 : Pr(t, e.parentElement) : !1;
|
|
1622
1629
|
function Je(t, e) {
|
|
1623
1630
|
if (!e)
|
|
1624
1631
|
return;
|
|
@@ -1634,7 +1641,7 @@ class rl extends xt {
|
|
|
1634
1641
|
const i = this.node.getProps(), o = ot(window, "pointerup", (a, l) => {
|
|
1635
1642
|
if (!this.checkPressEnd())
|
|
1636
1643
|
return;
|
|
1637
|
-
const { onTap: u, onTapCancel: c, globalTapTarget: h } = this.node.getProps(), d = !h && !
|
|
1644
|
+
const { onTap: u, onTapCancel: c, globalTapTarget: h } = this.node.getProps(), d = !h && !Pr(this.node.current, a.target) ? c : u;
|
|
1638
1645
|
d && M.update(() => d(a, l));
|
|
1639
1646
|
}, {
|
|
1640
1647
|
passive: !(i.onTap || i.onPointerUp)
|
|
@@ -1667,7 +1674,7 @@ class rl extends xt {
|
|
|
1667
1674
|
s && this.node.animationState && this.node.animationState.setActive("whileTap", !0), i && M.postRender(() => i(e, n));
|
|
1668
1675
|
}
|
|
1669
1676
|
checkPressEnd() {
|
|
1670
|
-
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !
|
|
1677
|
+
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !vr();
|
|
1671
1678
|
}
|
|
1672
1679
|
cancelPress(e, n) {
|
|
1673
1680
|
if (!this.checkPressEnd())
|
|
@@ -1707,7 +1714,7 @@ const cl = {
|
|
|
1707
1714
|
some: 0,
|
|
1708
1715
|
all: 1
|
|
1709
1716
|
};
|
|
1710
|
-
class
|
|
1717
|
+
class fl extends xt {
|
|
1711
1718
|
constructor() {
|
|
1712
1719
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
1713
1720
|
}
|
|
@@ -1734,17 +1741,17 @@ class hl extends xt {
|
|
|
1734
1741
|
if (typeof IntersectionObserver > "u")
|
|
1735
1742
|
return;
|
|
1736
1743
|
const { props: e, prevProps: n } = this.node;
|
|
1737
|
-
["amount", "margin", "root"].some(
|
|
1744
|
+
["amount", "margin", "root"].some(hl(e, n)) && this.startObserver();
|
|
1738
1745
|
}
|
|
1739
1746
|
unmount() {
|
|
1740
1747
|
}
|
|
1741
1748
|
}
|
|
1742
|
-
function
|
|
1749
|
+
function hl({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
1743
1750
|
return (n) => t[n] !== e[n];
|
|
1744
1751
|
}
|
|
1745
1752
|
const dl = {
|
|
1746
1753
|
inView: {
|
|
1747
|
-
Feature:
|
|
1754
|
+
Feature: fl
|
|
1748
1755
|
},
|
|
1749
1756
|
tap: {
|
|
1750
1757
|
Feature: rl
|
|
@@ -1756,7 +1763,7 @@ const dl = {
|
|
|
1756
1763
|
Feature: il
|
|
1757
1764
|
}
|
|
1758
1765
|
};
|
|
1759
|
-
function
|
|
1766
|
+
function xr(t, e) {
|
|
1760
1767
|
if (!Array.isArray(e))
|
|
1761
1768
|
return !1;
|
|
1762
1769
|
const n = e.length;
|
|
@@ -1769,7 +1776,7 @@ function Pr(t, e) {
|
|
|
1769
1776
|
}
|
|
1770
1777
|
function Ne(t, e, n) {
|
|
1771
1778
|
const i = t.getProps();
|
|
1772
|
-
return
|
|
1779
|
+
return Kn(i, e, n !== void 0 ? n : i.custom, t);
|
|
1773
1780
|
}
|
|
1774
1781
|
const lt = (t) => t * 1e3, ut = (t) => t / 1e3, pl = {
|
|
1775
1782
|
type: "spring",
|
|
@@ -1792,7 +1799,7 @@ const lt = (t) => t * 1e3, ut = (t) => t / 1e3, pl = {
|
|
|
1792
1799
|
function Pl({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
|
|
1793
1800
|
return !!Object.keys(c).length;
|
|
1794
1801
|
}
|
|
1795
|
-
function
|
|
1802
|
+
function zn(t, e) {
|
|
1796
1803
|
return t[e] || t.default || t;
|
|
1797
1804
|
}
|
|
1798
1805
|
const xl = (t) => t !== null;
|
|
@@ -1805,15 +1812,15 @@ function Tl() {
|
|
|
1805
1812
|
Se = void 0;
|
|
1806
1813
|
}
|
|
1807
1814
|
const mt = {
|
|
1808
|
-
now: () => (Se === void 0 && mt.set(N.isProcessing ||
|
|
1815
|
+
now: () => (Se === void 0 && mt.set(N.isProcessing || aa.useManualTiming ? N.timestamp : performance.now()), Se),
|
|
1809
1816
|
set: (t) => {
|
|
1810
1817
|
Se = t, queueMicrotask(Tl);
|
|
1811
1818
|
}
|
|
1812
|
-
},
|
|
1819
|
+
}, Tr = (t) => /^0[^.\s]+$/u.test(t);
|
|
1813
1820
|
function bl(t) {
|
|
1814
|
-
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" ||
|
|
1821
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Tr(t) : !0;
|
|
1815
1822
|
}
|
|
1816
|
-
const
|
|
1823
|
+
const br = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), wl = (
|
|
1817
1824
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1818
1825
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1819
1826
|
);
|
|
@@ -1824,20 +1831,20 @@ function Sl(t) {
|
|
|
1824
1831
|
const [, n, i, s] = e;
|
|
1825
1832
|
return [`--${n ?? i}`, s];
|
|
1826
1833
|
}
|
|
1827
|
-
const
|
|
1828
|
-
function
|
|
1829
|
-
ct(n <=
|
|
1834
|
+
const Al = 4;
|
|
1835
|
+
function wr(t, e, n = 1) {
|
|
1836
|
+
ct(n <= Al, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
1830
1837
|
const [i, s] = Sl(t);
|
|
1831
1838
|
if (!i)
|
|
1832
1839
|
return;
|
|
1833
1840
|
const o = window.getComputedStyle(e).getPropertyValue(i);
|
|
1834
1841
|
if (o) {
|
|
1835
1842
|
const r = o.trim();
|
|
1836
|
-
return
|
|
1843
|
+
return br(r) ? parseFloat(r) : r;
|
|
1837
1844
|
}
|
|
1838
|
-
return
|
|
1845
|
+
return Bn(s) ? wr(s, e, n + 1) : s;
|
|
1839
1846
|
}
|
|
1840
|
-
const
|
|
1847
|
+
const Cl = /* @__PURE__ */ new Set([
|
|
1841
1848
|
"width",
|
|
1842
1849
|
"height",
|
|
1843
1850
|
"top",
|
|
@@ -1848,17 +1855,17 @@ const Al = /* @__PURE__ */ new Set([
|
|
|
1848
1855
|
"y",
|
|
1849
1856
|
"translateX",
|
|
1850
1857
|
"translateY"
|
|
1851
|
-
]),
|
|
1858
|
+
]), Fi = (t) => t === $t || t === S, _i = (t, e) => parseFloat(t.split(", ")[e]), Bi = (t, e) => (n, { transform: i }) => {
|
|
1852
1859
|
if (i === "none" || !i)
|
|
1853
1860
|
return 0;
|
|
1854
1861
|
const s = i.match(/^matrix3d\((.+)\)$/u);
|
|
1855
1862
|
if (s)
|
|
1856
|
-
return
|
|
1863
|
+
return _i(s[1], e);
|
|
1857
1864
|
{
|
|
1858
1865
|
const o = i.match(/^matrix\((.+)\)$/u);
|
|
1859
|
-
return o ?
|
|
1866
|
+
return o ? _i(o[1], t) : 0;
|
|
1860
1867
|
}
|
|
1861
|
-
}, Rl = /* @__PURE__ */ new Set(["x", "y", "z"]), Vl =
|
|
1868
|
+
}, Rl = /* @__PURE__ */ new Set(["x", "y", "z"]), Vl = fe.filter((t) => !Rl.has(t));
|
|
1862
1869
|
function El(t) {
|
|
1863
1870
|
const e = [];
|
|
1864
1871
|
return Vl.forEach((n) => {
|
|
@@ -1875,15 +1882,15 @@ const Ut = {
|
|
|
1875
1882
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
1876
1883
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
1877
1884
|
// Transform
|
|
1878
|
-
x:
|
|
1879
|
-
y:
|
|
1885
|
+
x: Bi(4, 13),
|
|
1886
|
+
y: Bi(5, 14)
|
|
1880
1887
|
};
|
|
1881
1888
|
Ut.translateX = Ut.x;
|
|
1882
1889
|
Ut.translateY = Ut.y;
|
|
1883
|
-
const
|
|
1890
|
+
const Sr = (t) => (e) => e.test(t), Dl = {
|
|
1884
1891
|
test: (t) => t === "auto",
|
|
1885
1892
|
parse: (t) => t
|
|
1886
|
-
},
|
|
1893
|
+
}, Ar = [$t, S, st, dt, Ea, Va, Dl], Ii = (t) => Ar.find(Sr(t)), Rt = /* @__PURE__ */ new Set();
|
|
1887
1894
|
let pn = !1, mn = !1;
|
|
1888
1895
|
function Cr() {
|
|
1889
1896
|
if (mn) {
|
|
@@ -1904,20 +1911,20 @@ function Cr() {
|
|
|
1904
1911
|
}
|
|
1905
1912
|
mn = !1, pn = !1, Rt.forEach((t) => t.complete()), Rt.clear();
|
|
1906
1913
|
}
|
|
1907
|
-
function
|
|
1914
|
+
function Rr() {
|
|
1908
1915
|
Rt.forEach((t) => {
|
|
1909
1916
|
t.readKeyframes(), t.needsMeasurement && (mn = !0);
|
|
1910
1917
|
});
|
|
1911
1918
|
}
|
|
1912
1919
|
function Ml() {
|
|
1913
|
-
|
|
1920
|
+
Rr(), Cr();
|
|
1914
1921
|
}
|
|
1915
|
-
class
|
|
1922
|
+
class Hn {
|
|
1916
1923
|
constructor(e, n, i, s, o, r = !1) {
|
|
1917
1924
|
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = o, this.isAsync = r;
|
|
1918
1925
|
}
|
|
1919
1926
|
scheduleResolve() {
|
|
1920
|
-
this.isScheduled = !0, this.isAsync ? (Rt.add(this), pn || (pn = !0, M.read(
|
|
1927
|
+
this.isScheduled = !0, this.isAsync ? (Rt.add(this), pn || (pn = !0, M.read(Rr), M.resolveKeyframes(Cr))) : (this.readKeyframes(), this.complete());
|
|
1921
1928
|
}
|
|
1922
1929
|
readKeyframes() {
|
|
1923
1930
|
const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
|
|
@@ -1953,10 +1960,10 @@ class zn {
|
|
|
1953
1960
|
this.isComplete || this.scheduleResolve();
|
|
1954
1961
|
}
|
|
1955
1962
|
}
|
|
1956
|
-
const
|
|
1957
|
-
if (!
|
|
1963
|
+
const Yn = (t, e) => (n) => !!(he(n) && Ca.test(n) && n.startsWith(t) || e && !Ra(n) && Object.prototype.hasOwnProperty.call(n, e)), Vr = (t, e, n) => (i) => {
|
|
1964
|
+
if (!he(i))
|
|
1958
1965
|
return i;
|
|
1959
|
-
const [s, o, r, a] = i.match(
|
|
1966
|
+
const [s, o, r, a] = i.match(Fn);
|
|
1960
1967
|
return {
|
|
1961
1968
|
[t]: parseFloat(s),
|
|
1962
1969
|
[e]: parseFloat(o),
|
|
@@ -1966,9 +1973,9 @@ const Hn = (t, e) => (n) => !!(fe(n) && Ma.test(n) && n.startsWith(t) || e && !k
|
|
|
1966
1973
|
}, kl = (t) => yt(0, 255, t), tn = {
|
|
1967
1974
|
...$t,
|
|
1968
1975
|
transform: (t) => Math.round(kl(t))
|
|
1969
|
-
},
|
|
1970
|
-
test:
|
|
1971
|
-
parse:
|
|
1976
|
+
}, Ct = {
|
|
1977
|
+
test: Yn("rgb", "red"),
|
|
1978
|
+
parse: Vr("red", "green", "blue"),
|
|
1972
1979
|
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + tn.transform(t) + ", " + tn.transform(e) + ", " + tn.transform(n) + ", " + te(Qt.transform(i)) + ")"
|
|
1973
1980
|
};
|
|
1974
1981
|
function Ll(t) {
|
|
@@ -1981,23 +1988,23 @@ function Ll(t) {
|
|
|
1981
1988
|
};
|
|
1982
1989
|
}
|
|
1983
1990
|
const gn = {
|
|
1984
|
-
test:
|
|
1991
|
+
test: Yn("#"),
|
|
1985
1992
|
parse: Ll,
|
|
1986
|
-
transform:
|
|
1993
|
+
transform: Ct.transform
|
|
1987
1994
|
}, Ft = {
|
|
1988
|
-
test:
|
|
1989
|
-
parse:
|
|
1995
|
+
test: Yn("hsl", "hue"),
|
|
1996
|
+
parse: Vr("hue", "saturation", "lightness"),
|
|
1990
1997
|
transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + st.transform(te(e)) + ", " + st.transform(te(n)) + ", " + te(Qt.transform(i)) + ")"
|
|
1991
1998
|
}, $ = {
|
|
1992
|
-
test: (t) =>
|
|
1993
|
-
parse: (t) =>
|
|
1994
|
-
transform: (t) =>
|
|
1999
|
+
test: (t) => Ct.test(t) || gn.test(t) || Ft.test(t),
|
|
2000
|
+
parse: (t) => Ct.test(t) ? Ct.parse(t) : Ft.test(t) ? Ft.parse(t) : gn.parse(t),
|
|
2001
|
+
transform: (t) => he(t) ? t : t.hasOwnProperty("red") ? Ct.transform(t) : Ft.transform(t)
|
|
1995
2002
|
};
|
|
1996
2003
|
function jl(t) {
|
|
1997
2004
|
var e, n;
|
|
1998
|
-
return isNaN(t) &&
|
|
2005
|
+
return isNaN(t) && he(t) && (((e = t.match(Fn)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Aa)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
1999
2006
|
}
|
|
2000
|
-
const
|
|
2007
|
+
const Er = "number", Dr = "color", Ol = "var", Fl = "var(", Ni = "${}", _l = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
2001
2008
|
function re(t) {
|
|
2002
2009
|
const e = t.toString(), n = [], i = {
|
|
2003
2010
|
color: [],
|
|
@@ -2005,40 +2012,40 @@ function re(t) {
|
|
|
2005
2012
|
var: []
|
|
2006
2013
|
}, s = [];
|
|
2007
2014
|
let o = 0;
|
|
2008
|
-
const a = e.replace(_l, (l) => ($.test(l) ? (i.color.push(o), s.push(
|
|
2015
|
+
const a = e.replace(_l, (l) => ($.test(l) ? (i.color.push(o), s.push(Dr), n.push($.parse(l))) : l.startsWith(Fl) ? (i.var.push(o), s.push(Ol), n.push(l)) : (i.number.push(o), s.push(Er), n.push(parseFloat(l))), ++o, Ni)).split(Ni);
|
|
2009
2016
|
return { values: n, split: a, indexes: i, types: s };
|
|
2010
2017
|
}
|
|
2011
|
-
function
|
|
2018
|
+
function Mr(t) {
|
|
2012
2019
|
return re(t).values;
|
|
2013
2020
|
}
|
|
2014
|
-
function
|
|
2021
|
+
function kr(t) {
|
|
2015
2022
|
const { split: e, types: n } = re(t), i = e.length;
|
|
2016
2023
|
return (s) => {
|
|
2017
2024
|
let o = "";
|
|
2018
2025
|
for (let r = 0; r < i; r++)
|
|
2019
2026
|
if (o += e[r], s[r] !== void 0) {
|
|
2020
2027
|
const a = n[r];
|
|
2021
|
-
a ===
|
|
2028
|
+
a === Er ? o += te(s[r]) : a === Dr ? o += $.transform(s[r]) : o += s[r];
|
|
2022
2029
|
}
|
|
2023
2030
|
return o;
|
|
2024
2031
|
};
|
|
2025
2032
|
}
|
|
2026
2033
|
const Bl = (t) => typeof t == "number" ? 0 : t;
|
|
2027
2034
|
function Il(t) {
|
|
2028
|
-
const e =
|
|
2029
|
-
return
|
|
2035
|
+
const e = Mr(t);
|
|
2036
|
+
return kr(t)(e.map(Bl));
|
|
2030
2037
|
}
|
|
2031
2038
|
const vt = {
|
|
2032
2039
|
test: jl,
|
|
2033
|
-
parse:
|
|
2034
|
-
createTransformer:
|
|
2040
|
+
parse: Mr,
|
|
2041
|
+
createTransformer: kr,
|
|
2035
2042
|
getAnimatableNone: Il
|
|
2036
2043
|
}, Nl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2037
2044
|
function Ul(t) {
|
|
2038
2045
|
const [e, n] = t.slice(0, -1).split("(");
|
|
2039
2046
|
if (e === "drop-shadow")
|
|
2040
2047
|
return t;
|
|
2041
|
-
const [i] = n.match(
|
|
2048
|
+
const [i] = n.match(Fn) || [];
|
|
2042
2049
|
if (!i)
|
|
2043
2050
|
return t;
|
|
2044
2051
|
const s = n.replace(i, "");
|
|
@@ -2052,7 +2059,7 @@ const Wl = /\b([a-z-]*)\(.*?\)/gu, yn = {
|
|
|
2052
2059
|
return e ? e.map(Ul).join(" ") : t;
|
|
2053
2060
|
}
|
|
2054
2061
|
}, $l = {
|
|
2055
|
-
...
|
|
2062
|
+
..._n,
|
|
2056
2063
|
// Color props
|
|
2057
2064
|
color: $,
|
|
2058
2065
|
backgroundColor: $,
|
|
@@ -2067,9 +2074,9 @@ const Wl = /\b([a-z-]*)\(.*?\)/gu, yn = {
|
|
|
2067
2074
|
borderLeftColor: $,
|
|
2068
2075
|
filter: yn,
|
|
2069
2076
|
WebkitFilter: yn
|
|
2070
|
-
},
|
|
2071
|
-
function
|
|
2072
|
-
let n =
|
|
2077
|
+
}, Xn = (t) => $l[t];
|
|
2078
|
+
function Lr(t, e) {
|
|
2079
|
+
let n = Xn(t);
|
|
2073
2080
|
return n !== yn && (n = vt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2074
2081
|
}
|
|
2075
2082
|
const Kl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
@@ -2081,9 +2088,9 @@ function Gl(t, e, n) {
|
|
|
2081
2088
|
}
|
|
2082
2089
|
if (s && n)
|
|
2083
2090
|
for (const o of e)
|
|
2084
|
-
t[o] =
|
|
2091
|
+
t[o] = Lr(n, s);
|
|
2085
2092
|
}
|
|
2086
|
-
class
|
|
2093
|
+
class jr extends Hn {
|
|
2087
2094
|
constructor(e, n, i, s) {
|
|
2088
2095
|
super(e, n, i, s, s == null ? void 0 : s.owner, !0);
|
|
2089
2096
|
}
|
|
@@ -2094,16 +2101,16 @@ class Lr extends zn {
|
|
|
2094
2101
|
super.readKeyframes();
|
|
2095
2102
|
for (let l = 0; l < e.length; l++) {
|
|
2096
2103
|
let u = e[l];
|
|
2097
|
-
if (typeof u == "string" && (u = u.trim(),
|
|
2098
|
-
const c =
|
|
2104
|
+
if (typeof u == "string" && (u = u.trim(), Bn(u))) {
|
|
2105
|
+
const c = wr(u, n.current);
|
|
2099
2106
|
c !== void 0 && (e[l] = c), l === e.length - 1 && (this.finalKeyframe = u);
|
|
2100
2107
|
}
|
|
2101
2108
|
}
|
|
2102
|
-
if (this.resolveNoneKeyframes(), !
|
|
2109
|
+
if (this.resolveNoneKeyframes(), !Cl.has(i) || e.length !== 2)
|
|
2103
2110
|
return;
|
|
2104
|
-
const [s, o] = e, r =
|
|
2111
|
+
const [s, o] = e, r = Ii(s), a = Ii(o);
|
|
2105
2112
|
if (r !== a)
|
|
2106
|
-
if (
|
|
2113
|
+
if (Fi(r) && Fi(a))
|
|
2107
2114
|
for (let l = 0; l < e.length; l++) {
|
|
2108
2115
|
const u = e[l];
|
|
2109
2116
|
typeof u == "string" && (e[l] = parseFloat(u));
|
|
@@ -2138,11 +2145,11 @@ class Lr extends zn {
|
|
|
2138
2145
|
}), this.resolveNoneKeyframes();
|
|
2139
2146
|
}
|
|
2140
2147
|
}
|
|
2141
|
-
function
|
|
2148
|
+
function Or(t) {
|
|
2142
2149
|
let e;
|
|
2143
2150
|
return () => (e === void 0 && (e = t()), e);
|
|
2144
2151
|
}
|
|
2145
|
-
const
|
|
2152
|
+
const Ui = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
2146
2153
|
(vt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
2147
2154
|
!t.startsWith("url("));
|
|
2148
2155
|
function zl(t) {
|
|
@@ -2159,10 +2166,10 @@ function Hl(t, e, n, i) {
|
|
|
2159
2166
|
return !1;
|
|
2160
2167
|
if (e === "display" || e === "visibility")
|
|
2161
2168
|
return !0;
|
|
2162
|
-
const o = t[t.length - 1], r =
|
|
2169
|
+
const o = t[t.length - 1], r = Ui(s, e), a = Ui(o, e);
|
|
2163
2170
|
return Wt(r === a, `You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`), !r || !a ? !1 : zl(t) || n === "spring" && i;
|
|
2164
2171
|
}
|
|
2165
|
-
class
|
|
2172
|
+
class Fr {
|
|
2166
2173
|
constructor({ autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: o = 0, repeatType: r = "loop", ...a }) {
|
|
2167
2174
|
this.isStopped = !1, this.hasAttemptedResolve = !1, this.options = {
|
|
2168
2175
|
autoplay: e,
|
|
@@ -2220,20 +2227,20 @@ class Or {
|
|
|
2220
2227
|
});
|
|
2221
2228
|
}
|
|
2222
2229
|
}
|
|
2223
|
-
function
|
|
2230
|
+
function _r(t, e) {
|
|
2224
2231
|
return e ? t * (1e3 / e) : 0;
|
|
2225
2232
|
}
|
|
2226
2233
|
const Yl = 5;
|
|
2227
|
-
function
|
|
2234
|
+
function Br(t, e, n) {
|
|
2228
2235
|
const i = Math.max(e - Yl, 0);
|
|
2229
|
-
return
|
|
2236
|
+
return _r(n - t(i), e - i);
|
|
2230
2237
|
}
|
|
2231
|
-
const en = 1e-3, Xl = 0.01,
|
|
2238
|
+
const en = 1e-3, Xl = 0.01, Wi = 10, ql = 0.05, Zl = 1;
|
|
2232
2239
|
function Jl({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1 }) {
|
|
2233
2240
|
let s, o;
|
|
2234
|
-
Wt(t <= lt(
|
|
2241
|
+
Wt(t <= lt(Wi), "Spring duration must be 10 seconds or less");
|
|
2235
2242
|
let r = 1 - e;
|
|
2236
|
-
r = yt(ql, Zl, r), t = yt(Xl,
|
|
2243
|
+
r = yt(ql, Zl, r), t = yt(Xl, Wi, ut(t)), r < 1 ? (s = (u) => {
|
|
2237
2244
|
const c = u * r, h = c * t, d = c - n, p = vn(u, r), g = Math.exp(-h);
|
|
2238
2245
|
return en - d / p * g;
|
|
2239
2246
|
}, o = (u) => {
|
|
@@ -2273,7 +2280,7 @@ function vn(t, e) {
|
|
|
2273
2280
|
return t * Math.sqrt(1 - e * e);
|
|
2274
2281
|
}
|
|
2275
2282
|
const eu = ["duration", "bounce"], nu = ["stiffness", "damping", "mass"];
|
|
2276
|
-
function
|
|
2283
|
+
function $i(t, e) {
|
|
2277
2284
|
return e.some((n) => t[n] !== void 0);
|
|
2278
2285
|
}
|
|
2279
2286
|
function iu(t) {
|
|
@@ -2285,7 +2292,7 @@ function iu(t) {
|
|
|
2285
2292
|
isResolvedFromDuration: !1,
|
|
2286
2293
|
...t
|
|
2287
2294
|
};
|
|
2288
|
-
if (
|
|
2295
|
+
if (!$i(t, nu) && $i(t, eu)) {
|
|
2289
2296
|
const n = Jl(t);
|
|
2290
2297
|
e = {
|
|
2291
2298
|
...e,
|
|
@@ -2295,7 +2302,7 @@ function iu(t) {
|
|
|
2295
2302
|
}
|
|
2296
2303
|
return e;
|
|
2297
2304
|
}
|
|
2298
|
-
function
|
|
2305
|
+
function Ir({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
2299
2306
|
const s = t[0], o = t[t.length - 1], r = { done: !1, value: s }, { stiffness: a, damping: l, mass: u, duration: c, velocity: h, isResolvedFromDuration: d } = iu({
|
|
2300
2307
|
...i,
|
|
2301
2308
|
velocity: -ut(i.velocity || 0)
|
|
@@ -2304,36 +2311,36 @@ function Br({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
|
2304
2311
|
let y;
|
|
2305
2312
|
if (g < 1) {
|
|
2306
2313
|
const v = vn(b, g);
|
|
2307
|
-
y = (
|
|
2308
|
-
const w = Math.exp(-g * b *
|
|
2309
|
-
return o - w * ((p + g * b * P) / v * Math.sin(v *
|
|
2314
|
+
y = (A) => {
|
|
2315
|
+
const w = Math.exp(-g * b * A);
|
|
2316
|
+
return o - w * ((p + g * b * P) / v * Math.sin(v * A) + P * Math.cos(v * A));
|
|
2310
2317
|
};
|
|
2311
2318
|
} else if (g === 1)
|
|
2312
2319
|
y = (v) => o - Math.exp(-b * v) * (P + (p + b * P) * v);
|
|
2313
2320
|
else {
|
|
2314
2321
|
const v = b * Math.sqrt(g * g - 1);
|
|
2315
|
-
y = (
|
|
2316
|
-
const w = Math.exp(-g * b *
|
|
2322
|
+
y = (A) => {
|
|
2323
|
+
const w = Math.exp(-g * b * A), L = Math.min(v * A, 300);
|
|
2317
2324
|
return o - w * ((p + g * b * P) * Math.sinh(L) + v * P * Math.cosh(L)) / v;
|
|
2318
2325
|
};
|
|
2319
2326
|
}
|
|
2320
2327
|
return {
|
|
2321
2328
|
calculatedDuration: d && c || null,
|
|
2322
2329
|
next: (v) => {
|
|
2323
|
-
const
|
|
2330
|
+
const A = y(v);
|
|
2324
2331
|
if (d)
|
|
2325
2332
|
r.done = v >= c;
|
|
2326
2333
|
else {
|
|
2327
2334
|
let w = p;
|
|
2328
|
-
v !== 0 && (g < 1 ? w =
|
|
2329
|
-
const L = Math.abs(w) <= n, q = Math.abs(o -
|
|
2335
|
+
v !== 0 && (g < 1 ? w = Br(y, v, A) : w = 0);
|
|
2336
|
+
const L = Math.abs(w) <= n, q = Math.abs(o - A) <= e;
|
|
2330
2337
|
r.done = L && q;
|
|
2331
2338
|
}
|
|
2332
|
-
return r.value = r.done ? o :
|
|
2339
|
+
return r.value = r.done ? o : A, r;
|
|
2333
2340
|
}
|
|
2334
2341
|
};
|
|
2335
2342
|
}
|
|
2336
|
-
function
|
|
2343
|
+
function Ki({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
2337
2344
|
const h = t[0], d = {
|
|
2338
2345
|
done: !1,
|
|
2339
2346
|
value: h
|
|
@@ -2341,15 +2348,15 @@ function $i({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2341
2348
|
let P = n * e;
|
|
2342
2349
|
const b = h + P, x = r === void 0 ? b : r(b);
|
|
2343
2350
|
x !== b && (P = x - h);
|
|
2344
|
-
const y = (V) => -P * Math.exp(-V / i), v = (V) => x + y(V),
|
|
2351
|
+
const y = (V) => -P * Math.exp(-V / i), v = (V) => x + y(V), A = (V) => {
|
|
2345
2352
|
const G = y(V), H = v(V);
|
|
2346
2353
|
d.done = Math.abs(G) <= u, d.value = d.done ? x : H;
|
|
2347
2354
|
};
|
|
2348
2355
|
let w, L;
|
|
2349
2356
|
const q = (V) => {
|
|
2350
|
-
p(d.value) && (w = V, L =
|
|
2357
|
+
p(d.value) && (w = V, L = Ir({
|
|
2351
2358
|
keyframes: [d.value, g(d.value)],
|
|
2352
|
-
velocity:
|
|
2359
|
+
velocity: Br(v, V, d.value),
|
|
2353
2360
|
// TODO: This should be passing * 1000
|
|
2354
2361
|
damping: s,
|
|
2355
2362
|
stiffness: o,
|
|
@@ -2361,15 +2368,15 @@ function $i({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2361
2368
|
calculatedDuration: null,
|
|
2362
2369
|
next: (V) => {
|
|
2363
2370
|
let G = !1;
|
|
2364
|
-
return !L && w === void 0 && (G = !0,
|
|
2371
|
+
return !L && w === void 0 && (G = !0, A(V), q(V)), w !== void 0 && V >= w ? L.next(V - w) : (!G && A(V), d);
|
|
2365
2372
|
}
|
|
2366
2373
|
};
|
|
2367
2374
|
}
|
|
2368
|
-
const
|
|
2375
|
+
const Nr = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, su = 1e-7, ru = 12;
|
|
2369
2376
|
function ou(t, e, n, i, s) {
|
|
2370
2377
|
let o, r, a = 0;
|
|
2371
2378
|
do
|
|
2372
|
-
r = e + (n - e) / 2, o =
|
|
2379
|
+
r = e + (n - e) / 2, o = Nr(r, i, s) - t, o > 0 ? n = r : e = r;
|
|
2373
2380
|
while (Math.abs(o) > su && ++a < ru);
|
|
2374
2381
|
return r;
|
|
2375
2382
|
}
|
|
@@ -2377,27 +2384,27 @@ function pe(t, e, n, i) {
|
|
|
2377
2384
|
if (t === e && n === i)
|
|
2378
2385
|
return W;
|
|
2379
2386
|
const s = (o) => ou(o, 0, 1, t, n);
|
|
2380
|
-
return (o) => o === 0 || o === 1 ? o :
|
|
2387
|
+
return (o) => o === 0 || o === 1 ? o : Nr(s(o), e, i);
|
|
2381
2388
|
}
|
|
2382
|
-
const au = pe(0.42, 0, 1, 1), lu = pe(0, 0, 0.58, 1),
|
|
2389
|
+
const au = pe(0.42, 0, 1, 1), lu = pe(0, 0, 0.58, 1), Ur = pe(0.42, 0, 0.58, 1), uu = (t) => Array.isArray(t) && typeof t[0] != "number", Wr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, $r = (t) => (e) => 1 - t(1 - e), qn = (t) => 1 - Math.sin(Math.acos(t)), Kr = $r(qn), cu = Wr(qn), Gr = pe(0.33, 1.53, 0.69, 0.99), Zn = $r(Gr), fu = Wr(Zn), hu = (t) => (t *= 2) < 1 ? 0.5 * Zn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Gi = {
|
|
2383
2390
|
linear: W,
|
|
2384
2391
|
easeIn: au,
|
|
2385
|
-
easeInOut:
|
|
2392
|
+
easeInOut: Ur,
|
|
2386
2393
|
easeOut: lu,
|
|
2387
|
-
circIn:
|
|
2394
|
+
circIn: qn,
|
|
2388
2395
|
circInOut: cu,
|
|
2389
|
-
circOut:
|
|
2390
|
-
backIn:
|
|
2391
|
-
backInOut:
|
|
2392
|
-
backOut:
|
|
2393
|
-
anticipate:
|
|
2394
|
-
},
|
|
2396
|
+
circOut: Kr,
|
|
2397
|
+
backIn: Zn,
|
|
2398
|
+
backInOut: fu,
|
|
2399
|
+
backOut: Gr,
|
|
2400
|
+
anticipate: hu
|
|
2401
|
+
}, zi = (t) => {
|
|
2395
2402
|
if (Array.isArray(t)) {
|
|
2396
2403
|
ct(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
2397
2404
|
const [e, n, i, s] = t;
|
|
2398
2405
|
return pe(e, n, i, s);
|
|
2399
2406
|
} else if (typeof t == "string")
|
|
2400
|
-
return ct(
|
|
2407
|
+
return ct(Gi[t] !== void 0, `Invalid easing type '${t}'`), Gi[t];
|
|
2401
2408
|
return t;
|
|
2402
2409
|
}, oe = (t, e, n) => {
|
|
2403
2410
|
const i = e - t;
|
|
@@ -2428,20 +2435,20 @@ function Ee(t, e) {
|
|
|
2428
2435
|
const sn = (t, e, n) => {
|
|
2429
2436
|
const i = t * t, s = n * (e * e - i) + i;
|
|
2430
2437
|
return s < 0 ? 0 : Math.sqrt(s);
|
|
2431
|
-
}, pu = [gn,
|
|
2432
|
-
function
|
|
2438
|
+
}, pu = [gn, Ct, Ft], mu = (t) => pu.find((e) => e.test(t));
|
|
2439
|
+
function Hi(t) {
|
|
2433
2440
|
const e = mu(t);
|
|
2434
2441
|
if (Wt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
2435
2442
|
return !1;
|
|
2436
2443
|
let n = e.parse(t);
|
|
2437
2444
|
return e === Ft && (n = du(n)), n;
|
|
2438
2445
|
}
|
|
2439
|
-
const
|
|
2440
|
-
const n =
|
|
2446
|
+
const Yi = (t, e) => {
|
|
2447
|
+
const n = Hi(t), i = Hi(e);
|
|
2441
2448
|
if (!n || !i)
|
|
2442
2449
|
return Ee(t, e);
|
|
2443
2450
|
const s = { ...n };
|
|
2444
|
-
return (o) => (s.red = sn(n.red, i.red, o), s.green = sn(n.green, i.green, o), s.blue = sn(n.blue, i.blue, o), s.alpha = j(n.alpha, i.alpha, o),
|
|
2451
|
+
return (o) => (s.red = sn(n.red, i.red, o), s.green = sn(n.green, i.green, o), s.blue = sn(n.blue, i.blue, o), s.alpha = j(n.alpha, i.alpha, o), Ct.transform(s));
|
|
2445
2452
|
}, Pn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2446
2453
|
function gu(t, e) {
|
|
2447
2454
|
return Pn.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
@@ -2449,11 +2456,11 @@ function gu(t, e) {
|
|
|
2449
2456
|
function yu(t, e) {
|
|
2450
2457
|
return (n) => j(t, e, n);
|
|
2451
2458
|
}
|
|
2452
|
-
function
|
|
2453
|
-
return typeof t == "number" ? yu : typeof t == "string" ?
|
|
2459
|
+
function Jn(t) {
|
|
2460
|
+
return typeof t == "number" ? yu : typeof t == "string" ? Bn(t) ? Ee : $.test(t) ? Yi : xu : Array.isArray(t) ? zr : typeof t == "object" ? $.test(t) ? Yi : vu : Ee;
|
|
2454
2461
|
}
|
|
2455
|
-
function
|
|
2456
|
-
const n = [...t], i = n.length, s = t.map((o, r) =>
|
|
2462
|
+
function zr(t, e) {
|
|
2463
|
+
const n = [...t], i = n.length, s = t.map((o, r) => Jn(o)(o, e[r]));
|
|
2457
2464
|
return (o) => {
|
|
2458
2465
|
for (let r = 0; r < i; r++)
|
|
2459
2466
|
n[r] = s[r](o);
|
|
@@ -2463,7 +2470,7 @@ function Gr(t, e) {
|
|
|
2463
2470
|
function vu(t, e) {
|
|
2464
2471
|
const n = { ...t, ...e }, i = {};
|
|
2465
2472
|
for (const s in n)
|
|
2466
|
-
t[s] !== void 0 && e[s] !== void 0 && (i[s] =
|
|
2473
|
+
t[s] !== void 0 && e[s] !== void 0 && (i[s] = Jn(t[s])(t[s], e[s]));
|
|
2467
2474
|
return (s) => {
|
|
2468
2475
|
for (const o in i)
|
|
2469
2476
|
n[o] = i[o](s);
|
|
@@ -2481,13 +2488,13 @@ function Pu(t, e) {
|
|
|
2481
2488
|
}
|
|
2482
2489
|
const xu = (t, e) => {
|
|
2483
2490
|
const n = vt.createTransformer(e), i = re(t), s = re(e);
|
|
2484
|
-
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? Pn.has(t) && !s.values.length || Pn.has(e) && !i.values.length ? gu(t, e) : at(
|
|
2491
|
+
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? Pn.has(t) && !s.values.length || Pn.has(e) && !i.values.length ? gu(t, e) : at(zr(Pu(i, s), s.values), n) : (Wt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Ee(t, e));
|
|
2485
2492
|
};
|
|
2486
|
-
function
|
|
2487
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? j(t, e, n) :
|
|
2493
|
+
function Hr(t, e, n) {
|
|
2494
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? j(t, e, n) : Jn(t)(t, e);
|
|
2488
2495
|
}
|
|
2489
2496
|
function Tu(t, e, n) {
|
|
2490
|
-
const i = [], s = n ||
|
|
2497
|
+
const i = [], s = n || Hr, o = t.length - 1;
|
|
2491
2498
|
for (let r = 0; r < o; r++) {
|
|
2492
2499
|
let a = s(t[r], t[r + 1]);
|
|
2493
2500
|
if (e) {
|
|
@@ -2526,43 +2533,43 @@ function Su(t) {
|
|
|
2526
2533
|
const e = [0];
|
|
2527
2534
|
return wu(e, t.length - 1), e;
|
|
2528
2535
|
}
|
|
2529
|
-
function
|
|
2536
|
+
function Au(t, e) {
|
|
2530
2537
|
return t.map((n) => n * e);
|
|
2531
2538
|
}
|
|
2532
|
-
function
|
|
2533
|
-
return t.map(() => e ||
|
|
2539
|
+
function Cu(t, e) {
|
|
2540
|
+
return t.map(() => e || Ur).splice(0, t.length - 1);
|
|
2534
2541
|
}
|
|
2535
2542
|
function De({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }) {
|
|
2536
|
-
const s = uu(i) ? i.map(
|
|
2543
|
+
const s = uu(i) ? i.map(zi) : zi(i), o = {
|
|
2537
2544
|
done: !1,
|
|
2538
2545
|
value: e[0]
|
|
2539
|
-
}, r =
|
|
2546
|
+
}, r = Au(
|
|
2540
2547
|
// Only use the provided offsets if they're the correct length
|
|
2541
2548
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
2542
2549
|
n && n.length === e.length ? n : Su(e),
|
|
2543
2550
|
t
|
|
2544
2551
|
), a = bu(r, e, {
|
|
2545
|
-
ease: Array.isArray(s) ? s :
|
|
2552
|
+
ease: Array.isArray(s) ? s : Cu(e, s)
|
|
2546
2553
|
});
|
|
2547
2554
|
return {
|
|
2548
2555
|
calculatedDuration: t,
|
|
2549
2556
|
next: (l) => (o.value = a(l), o.done = l >= t, o)
|
|
2550
2557
|
};
|
|
2551
2558
|
}
|
|
2552
|
-
const
|
|
2559
|
+
const Xi = 2e4;
|
|
2553
2560
|
function Ru(t) {
|
|
2554
2561
|
let e = 0;
|
|
2555
2562
|
const n = 50;
|
|
2556
2563
|
let i = t.next(e);
|
|
2557
|
-
for (; !i.done && e <
|
|
2564
|
+
for (; !i.done && e < Xi; )
|
|
2558
2565
|
e += n, i = t.next(e);
|
|
2559
|
-
return e >=
|
|
2566
|
+
return e >= Xi ? 1 / 0 : e;
|
|
2560
2567
|
}
|
|
2561
2568
|
const Vu = (t) => {
|
|
2562
2569
|
const e = ({ timestamp: n }) => t(n);
|
|
2563
2570
|
return {
|
|
2564
2571
|
start: () => M.update(e, !0),
|
|
2565
|
-
stop: () =>
|
|
2572
|
+
stop: () => ft(e),
|
|
2566
2573
|
/**
|
|
2567
2574
|
* If we're processing this frame we can use the
|
|
2568
2575
|
* framelocked timestamp to keep things in sync.
|
|
@@ -2570,14 +2577,14 @@ const Vu = (t) => {
|
|
|
2570
2577
|
now: () => N.isProcessing ? N.timestamp : mt.now()
|
|
2571
2578
|
};
|
|
2572
2579
|
}, Eu = {
|
|
2573
|
-
decay:
|
|
2574
|
-
inertia:
|
|
2580
|
+
decay: Ki,
|
|
2581
|
+
inertia: Ki,
|
|
2575
2582
|
tween: De,
|
|
2576
2583
|
keyframes: De,
|
|
2577
|
-
spring:
|
|
2584
|
+
spring: Ir
|
|
2578
2585
|
}, Du = (t) => t / 100;
|
|
2579
|
-
class
|
|
2580
|
-
constructor({ KeyframeResolver: e =
|
|
2586
|
+
class Qn extends Fr {
|
|
2587
|
+
constructor({ KeyframeResolver: e = Hn, ...n }) {
|
|
2581
2588
|
super(n), this.holdTime = null, this.startTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.state = "idle", this.stop = () => {
|
|
2582
2589
|
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
|
|
2583
2590
|
return;
|
|
@@ -2591,7 +2598,7 @@ class Jn extends Or {
|
|
|
2591
2598
|
initPlayback(e) {
|
|
2592
2599
|
const { type: n = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = this.options, a = Eu[n] || De;
|
|
2593
2600
|
let l, u;
|
|
2594
|
-
a !== De && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && ct(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = at(Du,
|
|
2601
|
+
a !== De && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && ct(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = at(Du, Hr(e[0], e[1])), e = [0, 100]);
|
|
2595
2602
|
const c = a({ ...this.options, keyframes: e });
|
|
2596
2603
|
o === "mirror" && (u = a({
|
|
2597
2604
|
...this.options,
|
|
@@ -2625,13 +2632,13 @@ class Jn extends Or {
|
|
|
2625
2632
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - c / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
|
|
2626
2633
|
const x = this.currentTime - d * (this.speed >= 0 ? 1 : -1), y = this.speed >= 0 ? x < 0 : x > c;
|
|
2627
2634
|
this.currentTime = Math.max(x, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = c);
|
|
2628
|
-
let v = this.currentTime,
|
|
2635
|
+
let v = this.currentTime, A = o;
|
|
2629
2636
|
if (p) {
|
|
2630
2637
|
const V = Math.min(this.currentTime, c) / h;
|
|
2631
2638
|
let G = Math.floor(V), H = V % 1;
|
|
2632
|
-
!H && V >= 1 && (H = 1), H === 1 && G--, G = Math.min(G, p + 1), !!(G % 2) && (g === "reverse" ? (H = 1 - H, P && (H -= P / h)) : g === "mirror" && (
|
|
2639
|
+
!H && V >= 1 && (H = 1), H === 1 && G--, G = Math.min(G, p + 1), !!(G % 2) && (g === "reverse" ? (H = 1 - H, P && (H -= P / h)) : g === "mirror" && (A = r)), v = yt(0, 1, H) * h;
|
|
2633
2640
|
}
|
|
2634
|
-
const w = y ? { done: !1, value: l[0] } :
|
|
2641
|
+
const w = y ? { done: !1, value: l[0] } : A.next(v);
|
|
2635
2642
|
a && (w.value = a(w.value));
|
|
2636
2643
|
let { done: L } = w;
|
|
2637
2644
|
!y && u !== null && (L = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
|
|
@@ -2696,11 +2703,11 @@ class Jn extends Or {
|
|
|
2696
2703
|
return this.startTime = 0, this.tick(e, !0);
|
|
2697
2704
|
}
|
|
2698
2705
|
}
|
|
2699
|
-
const
|
|
2700
|
-
function
|
|
2701
|
-
return !!(!t || typeof t == "string" && t in
|
|
2706
|
+
const Yr = (t) => Array.isArray(t) && typeof t[0] == "number";
|
|
2707
|
+
function Xr(t) {
|
|
2708
|
+
return !!(!t || typeof t == "string" && t in ti || Yr(t) || Array.isArray(t) && t.every(Xr));
|
|
2702
2709
|
}
|
|
2703
|
-
const qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`,
|
|
2710
|
+
const qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, ti = {
|
|
2704
2711
|
linear: "linear",
|
|
2705
2712
|
ease: "ease",
|
|
2706
2713
|
easeIn: "ease-in",
|
|
@@ -2712,16 +2719,16 @@ const qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, Qn = {
|
|
|
2712
2719
|
backOut: qt([0.33, 1.53, 0.69, 0.99])
|
|
2713
2720
|
};
|
|
2714
2721
|
function Mu(t) {
|
|
2715
|
-
return
|
|
2722
|
+
return qr(t) || ti.easeOut;
|
|
2716
2723
|
}
|
|
2717
|
-
function
|
|
2724
|
+
function qr(t) {
|
|
2718
2725
|
if (t)
|
|
2719
|
-
return
|
|
2726
|
+
return Yr(t) ? qt(t) : Array.isArray(t) ? t.map(Mu) : ti[t];
|
|
2720
2727
|
}
|
|
2721
2728
|
function ku(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a, times: l } = {}) {
|
|
2722
2729
|
const u = { [e]: n };
|
|
2723
2730
|
l && (u.offset = l);
|
|
2724
|
-
const c =
|
|
2731
|
+
const c = qr(a);
|
|
2725
2732
|
return Array.isArray(c) && (u.easing = c), t.animate(u, {
|
|
2726
2733
|
delay: i,
|
|
2727
2734
|
duration: s,
|
|
@@ -2731,12 +2738,12 @@ function ku(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatTyp
|
|
|
2731
2738
|
direction: r === "reverse" ? "alternate" : "normal"
|
|
2732
2739
|
});
|
|
2733
2740
|
}
|
|
2734
|
-
const Lu =
|
|
2741
|
+
const Lu = Or(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Me = 10, ju = 2e4;
|
|
2735
2742
|
function Ou(t) {
|
|
2736
|
-
return t.type === "spring" || !
|
|
2743
|
+
return t.type === "spring" || !Xr(t.ease);
|
|
2737
2744
|
}
|
|
2738
2745
|
function Fu(t, e) {
|
|
2739
|
-
const n = new
|
|
2746
|
+
const n = new Qn({
|
|
2740
2747
|
...e,
|
|
2741
2748
|
keyframes: t,
|
|
2742
2749
|
repeat: 0,
|
|
@@ -2755,11 +2762,11 @@ function Fu(t, e) {
|
|
|
2755
2762
|
ease: "linear"
|
|
2756
2763
|
};
|
|
2757
2764
|
}
|
|
2758
|
-
class
|
|
2765
|
+
class qi extends Fr {
|
|
2759
2766
|
constructor(e) {
|
|
2760
2767
|
super(e);
|
|
2761
2768
|
const { name: n, motionValue: i, keyframes: s } = this.options;
|
|
2762
|
-
this.resolver = new
|
|
2769
|
+
this.resolver = new jr(s, (o, r) => this.onKeyframesResolved(o, r), n, i), this.resolver.scheduleResolve();
|
|
2763
2770
|
}
|
|
2764
2771
|
initPlayback(e, n) {
|
|
2765
2772
|
var i;
|
|
@@ -2868,7 +2875,7 @@ class Xi extends Or {
|
|
|
2868
2875
|
if (n.playState === "idle" || n.playState === "finished")
|
|
2869
2876
|
return;
|
|
2870
2877
|
if (this.time) {
|
|
2871
|
-
const { motionValue: u, onUpdate: c, onComplete: h, ...d } = this.options, p = new
|
|
2878
|
+
const { motionValue: u, onUpdate: c, onComplete: h, ...d } = this.options, p = new Qn({
|
|
2872
2879
|
...d,
|
|
2873
2880
|
keyframes: i,
|
|
2874
2881
|
duration: s,
|
|
@@ -2905,9 +2912,9 @@ function _u(t, e) {
|
|
|
2905
2912
|
const { currentTime: s } = e, r = (s === null ? 0 : s.value) / 100;
|
|
2906
2913
|
n !== r && t(r), n = r;
|
|
2907
2914
|
};
|
|
2908
|
-
return M.update(i, !0), () =>
|
|
2915
|
+
return M.update(i, !0), () => ft(i);
|
|
2909
2916
|
}
|
|
2910
|
-
const Bu =
|
|
2917
|
+
const Bu = Or(() => window.ScrollTimeline !== void 0);
|
|
2911
2918
|
class Iu {
|
|
2912
2919
|
constructor(e) {
|
|
2913
2920
|
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
@@ -2974,8 +2981,8 @@ class Iu {
|
|
|
2974
2981
|
this.runAll("complete");
|
|
2975
2982
|
}
|
|
2976
2983
|
}
|
|
2977
|
-
const
|
|
2978
|
-
const l =
|
|
2984
|
+
const ei = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
2985
|
+
const l = zn(i, t) || {}, u = l.delay || i.delay || 0;
|
|
2979
2986
|
let { elapsed: c = 0 } = i;
|
|
2980
2987
|
c = c - lt(u);
|
|
2981
2988
|
let h = {
|
|
@@ -3007,9 +3014,9 @@ const ti = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
|
3007
3014
|
h.onUpdate(p), h.onComplete();
|
|
3008
3015
|
}), new Iu([]);
|
|
3009
3016
|
}
|
|
3010
|
-
return !o &&
|
|
3017
|
+
return !o && qi.supports(h) ? new qi(h) : new Qn(h);
|
|
3011
3018
|
};
|
|
3012
|
-
class
|
|
3019
|
+
class ni {
|
|
3013
3020
|
constructor() {
|
|
3014
3021
|
this.subscriptions = [];
|
|
3015
3022
|
}
|
|
@@ -3034,12 +3041,12 @@ class ei {
|
|
|
3034
3041
|
this.subscriptions.length = 0;
|
|
3035
3042
|
}
|
|
3036
3043
|
}
|
|
3037
|
-
const
|
|
3038
|
-
function
|
|
3039
|
-
t ||
|
|
3044
|
+
const Zi = /* @__PURE__ */ new Set();
|
|
3045
|
+
function ii(t, e, n) {
|
|
3046
|
+
t || Zi.has(e) || (console.warn(e), n && console.warn(n), Zi.add(e));
|
|
3040
3047
|
}
|
|
3041
|
-
const
|
|
3042
|
-
class
|
|
3048
|
+
const Ji = 30, Nu = (t) => !isNaN(parseFloat(t));
|
|
3049
|
+
class Zr {
|
|
3043
3050
|
/**
|
|
3044
3051
|
* @param init - The initiating value
|
|
3045
3052
|
* @param config - Optional configuration options
|
|
@@ -3049,7 +3056,7 @@ class qr {
|
|
|
3049
3056
|
* @internal
|
|
3050
3057
|
*/
|
|
3051
3058
|
constructor(e, n = {}) {
|
|
3052
|
-
this.version = "11.3.
|
|
3059
|
+
this.version = "11.3.21", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i, s = !0) => {
|
|
3053
3060
|
const o = mt.now();
|
|
3054
3061
|
this.updatedAt !== o && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), s && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
3055
3062
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
@@ -3101,10 +3108,10 @@ class qr {
|
|
|
3101
3108
|
* @deprecated
|
|
3102
3109
|
*/
|
|
3103
3110
|
onChange(e) {
|
|
3104
|
-
return process.env.NODE_ENV !== "production" &&
|
|
3111
|
+
return process.env.NODE_ENV !== "production" && ii(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
3105
3112
|
}
|
|
3106
3113
|
on(e, n) {
|
|
3107
|
-
this.events[e] || (this.events[e] = new
|
|
3114
|
+
this.events[e] || (this.events[e] = new ni());
|
|
3108
3115
|
const i = this.events[e].add(n);
|
|
3109
3116
|
return e === "change" ? () => {
|
|
3110
3117
|
i(), M.read(() => {
|
|
@@ -3177,10 +3184,10 @@ class qr {
|
|
|
3177
3184
|
*/
|
|
3178
3185
|
getVelocity() {
|
|
3179
3186
|
const e = mt.now();
|
|
3180
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt >
|
|
3187
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Ji)
|
|
3181
3188
|
return 0;
|
|
3182
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
3183
|
-
return
|
|
3189
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, Ji);
|
|
3190
|
+
return _r(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
3184
3191
|
}
|
|
3185
3192
|
/**
|
|
3186
3193
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -3234,7 +3241,7 @@ class qr {
|
|
|
3234
3241
|
}
|
|
3235
3242
|
}
|
|
3236
3243
|
function ae(t, e) {
|
|
3237
|
-
return new
|
|
3244
|
+
return new Zr(t, e);
|
|
3238
3245
|
}
|
|
3239
3246
|
function Uu(t, e, n) {
|
|
3240
3247
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, ae(n));
|
|
@@ -3248,15 +3255,15 @@ function Wu(t, e) {
|
|
|
3248
3255
|
Uu(t, r, a);
|
|
3249
3256
|
}
|
|
3250
3257
|
}
|
|
3251
|
-
function
|
|
3252
|
-
return t.getProps()[
|
|
3258
|
+
function Jr(t) {
|
|
3259
|
+
return t.getProps()[qs];
|
|
3253
3260
|
}
|
|
3254
|
-
class $u extends
|
|
3261
|
+
class $u extends Zr {
|
|
3255
3262
|
constructor() {
|
|
3256
3263
|
super(...arguments), this.output = [], this.counts = /* @__PURE__ */ new Map();
|
|
3257
3264
|
}
|
|
3258
3265
|
add(e) {
|
|
3259
|
-
const n =
|
|
3266
|
+
const n = dr(e);
|
|
3260
3267
|
if (!n)
|
|
3261
3268
|
return;
|
|
3262
3269
|
const i = this.counts.get(n) || 0;
|
|
@@ -3289,7 +3296,7 @@ function Gu({ protectedKeys: t, needsAnimating: e }, n) {
|
|
|
3289
3296
|
const i = t.hasOwnProperty(n) && e[n] !== !0;
|
|
3290
3297
|
return e[n] = !1, i;
|
|
3291
3298
|
}
|
|
3292
|
-
function
|
|
3299
|
+
function Qr(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
3293
3300
|
var o;
|
|
3294
3301
|
let { transition: r = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
|
|
3295
3302
|
i && (r = i);
|
|
@@ -3301,17 +3308,17 @@ function Jr(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
3301
3308
|
const g = {
|
|
3302
3309
|
delay: n,
|
|
3303
3310
|
elapsed: 0,
|
|
3304
|
-
...
|
|
3311
|
+
...zn(r || {}, h)
|
|
3305
3312
|
};
|
|
3306
3313
|
let P = !1;
|
|
3307
3314
|
if (window.HandoffAppearAnimations) {
|
|
3308
|
-
const x =
|
|
3315
|
+
const x = Jr(t);
|
|
3309
3316
|
if (x) {
|
|
3310
3317
|
const y = window.HandoffAppearAnimations(x, h, d, M);
|
|
3311
3318
|
y !== null && (g.elapsed = y, P = !0);
|
|
3312
3319
|
}
|
|
3313
3320
|
}
|
|
3314
|
-
d.start(
|
|
3321
|
+
d.start(ei(h, d, p, t.shouldReduceMotion && Pt.has(h) ? { type: !1 } : g, t, P, xn(t, h)));
|
|
3315
3322
|
const b = d.animation;
|
|
3316
3323
|
b && u.push(b);
|
|
3317
3324
|
}
|
|
@@ -3326,7 +3333,7 @@ function Tn(t, e, n = {}) {
|
|
|
3326
3333
|
const s = Ne(t, e, n.type === "exit" ? (i = t.presenceContext) === null || i === void 0 ? void 0 : i.custom : void 0);
|
|
3327
3334
|
let { transition: o = t.getDefaultTransition() || {} } = s || {};
|
|
3328
3335
|
n.transitionOverride && (o = n.transitionOverride);
|
|
3329
|
-
const r = s ? () => Promise.all(
|
|
3336
|
+
const r = s ? () => Promise.all(Qr(t, s, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (u = 0) => {
|
|
3330
3337
|
const { delayChildren: c = 0, staggerChildren: h, staggerDirection: d } = o;
|
|
3331
3338
|
return zu(t, e, c + u, h, d, n);
|
|
3332
3339
|
} : () => Promise.resolve(), { when: l } = o;
|
|
@@ -3358,7 +3365,7 @@ function Yu(t, e, n = {}) {
|
|
|
3358
3365
|
i = Tn(t, e, n);
|
|
3359
3366
|
else {
|
|
3360
3367
|
const s = typeof e == "function" ? Ne(t, e, n.custom) : e;
|
|
3361
|
-
i = Promise.all(
|
|
3368
|
+
i = Promise.all(Qr(t, s, n));
|
|
3362
3369
|
}
|
|
3363
3370
|
return i.then(() => {
|
|
3364
3371
|
t.notify("AnimationComplete", e);
|
|
@@ -3369,7 +3376,7 @@ function Zu(t) {
|
|
|
3369
3376
|
return (e) => Promise.all(e.map(({ animation: n, options: i }) => Yu(t, n, i)));
|
|
3370
3377
|
}
|
|
3371
3378
|
function Ju(t) {
|
|
3372
|
-
let e = Zu(t), n =
|
|
3379
|
+
let e = Zu(t), n = Qi(), i = !0;
|
|
3373
3380
|
const s = (l) => (u, c) => {
|
|
3374
3381
|
var h;
|
|
3375
3382
|
const d = Ne(t, c, l === "exit" ? (h = t.presenceContext) === null || h === void 0 ? void 0 : h.custom : void 0);
|
|
@@ -3386,36 +3393,36 @@ function Ju(t) {
|
|
|
3386
3393
|
const u = t.getProps(), c = t.getVariantContext(!0) || {}, h = [], d = /* @__PURE__ */ new Set();
|
|
3387
3394
|
let p = {}, g = 1 / 0;
|
|
3388
3395
|
for (let b = 0; b < qu; b++) {
|
|
3389
|
-
const x = Xu[b], y = n[x], v = u[x] !== void 0 ? u[x] : c[x],
|
|
3396
|
+
const x = Xu[b], y = n[x], v = u[x] !== void 0 ? u[x] : c[x], A = ie(v), w = x === l ? y.isActive : null;
|
|
3390
3397
|
w === !1 && (g = b);
|
|
3391
|
-
let L = v === c[x] && v !== u[x] &&
|
|
3398
|
+
let L = v === c[x] && v !== u[x] && A;
|
|
3392
3399
|
if (L && i && t.manuallyAnimateOnMount && (L = !1), y.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3393
3400
|
!y.isActive && w === null || // If we didn't and don't have any defined prop for this animation type
|
|
3394
3401
|
!v && !y.prevProp || // Or if the prop doesn't define an animation
|
|
3395
3402
|
se(v) || typeof v == "boolean")
|
|
3396
3403
|
continue;
|
|
3397
3404
|
let V = Qu(y.prevProp, v) || // If we're making this variant active, we want to always make it active
|
|
3398
|
-
x === l && y.isActive && !L &&
|
|
3399
|
-
b > g &&
|
|
3405
|
+
x === l && y.isActive && !L && A || // If we removed a higher-priority variant (i is in reverse order)
|
|
3406
|
+
b > g && A, G = !1;
|
|
3400
3407
|
const H = Array.isArray(v) ? v : [v];
|
|
3401
|
-
let
|
|
3402
|
-
w === !1 && (
|
|
3408
|
+
let ht = H.reduce(s(x), {});
|
|
3409
|
+
w === !1 && (ht = {});
|
|
3403
3410
|
const { prevResolvedValues: Kt = {} } = y, Z = {
|
|
3404
3411
|
...Kt,
|
|
3405
|
-
...
|
|
3412
|
+
...ht
|
|
3406
3413
|
}, nt = (F) => {
|
|
3407
3414
|
V = !0, d.has(F) && (G = !0, d.delete(F)), y.needsAnimating[F] = !0;
|
|
3408
3415
|
const J = t.getValue(F);
|
|
3409
3416
|
J && (J.liveStyle = !1);
|
|
3410
3417
|
};
|
|
3411
3418
|
for (const F in Z) {
|
|
3412
|
-
const J =
|
|
3419
|
+
const J = ht[F], Dt = Kt[F];
|
|
3413
3420
|
if (p.hasOwnProperty(F))
|
|
3414
3421
|
continue;
|
|
3415
3422
|
let Mt = !1;
|
|
3416
|
-
|
|
3423
|
+
hn(J) && hn(Dt) ? Mt = !xr(J, Dt) : Mt = J !== Dt, Mt ? J != null ? nt(F) : d.add(F) : J !== void 0 && d.has(F) ? nt(F) : y.protectedKeys[F] = !0;
|
|
3417
3424
|
}
|
|
3418
|
-
y.prevProp = v, y.prevResolvedValues =
|
|
3425
|
+
y.prevProp = v, y.prevResolvedValues = ht, y.isActive && (p = { ...p, ...ht }), i && t.blockInitialAnimation && (V = !1), V && (!L || G) && h.push(...H.map((F) => ({
|
|
3419
3426
|
animation: F,
|
|
3420
3427
|
options: { type: x }
|
|
3421
3428
|
})));
|
|
@@ -3449,12 +3456,12 @@ function Ju(t) {
|
|
|
3449
3456
|
setAnimateFunction: o,
|
|
3450
3457
|
getState: () => n,
|
|
3451
3458
|
reset: () => {
|
|
3452
|
-
n =
|
|
3459
|
+
n = Qi(), i = !0;
|
|
3453
3460
|
}
|
|
3454
3461
|
};
|
|
3455
3462
|
}
|
|
3456
3463
|
function Qu(t, e) {
|
|
3457
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ? !
|
|
3464
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !xr(e, t) : !1;
|
|
3458
3465
|
}
|
|
3459
3466
|
function bt(t = !1) {
|
|
3460
3467
|
return {
|
|
@@ -3464,7 +3471,7 @@ function bt(t = !1) {
|
|
|
3464
3471
|
prevResolvedValues: {}
|
|
3465
3472
|
};
|
|
3466
3473
|
}
|
|
3467
|
-
function
|
|
3474
|
+
function Qi() {
|
|
3468
3475
|
return {
|
|
3469
3476
|
animate: bt(!0),
|
|
3470
3477
|
whileInView: bt(),
|
|
@@ -3531,12 +3538,12 @@ const ic = {
|
|
|
3531
3538
|
exit: {
|
|
3532
3539
|
Feature: nc
|
|
3533
3540
|
}
|
|
3534
|
-
},
|
|
3541
|
+
}, ts = (t, e) => Math.abs(t - e);
|
|
3535
3542
|
function sc(t, e) {
|
|
3536
|
-
const n =
|
|
3543
|
+
const n = ts(t.x, e.x), i = ts(t.y, e.y);
|
|
3537
3544
|
return Math.sqrt(n ** 2 + i ** 2);
|
|
3538
3545
|
}
|
|
3539
|
-
class
|
|
3546
|
+
class to {
|
|
3540
3547
|
constructor(e, n, { transformPagePoint: i, contextWindow: s, dragSnapToOrigin: o = !1 } = {}) {
|
|
3541
3548
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3542
3549
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
@@ -3557,7 +3564,7 @@ class Qr {
|
|
|
3557
3564
|
return;
|
|
3558
3565
|
const b = on(h.type === "pointercancel" ? this.lastMoveEventInfo : rn(d, this.transformPagePoint), this.history);
|
|
3559
3566
|
this.startEvent && p && p(h, b), g && g(h, b);
|
|
3560
|
-
}, !
|
|
3567
|
+
}, !mr(e))
|
|
3561
3568
|
return;
|
|
3562
3569
|
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.contextWindow = s || window;
|
|
3563
3570
|
const r = Ie(e), a = rn(r, this.transformPagePoint), { point: l } = a, { timestamp: u } = N;
|
|
@@ -3569,34 +3576,34 @@ class Qr {
|
|
|
3569
3576
|
this.handlers = e;
|
|
3570
3577
|
}
|
|
3571
3578
|
end() {
|
|
3572
|
-
this.removeListeners && this.removeListeners(),
|
|
3579
|
+
this.removeListeners && this.removeListeners(), ft(this.updatePoint);
|
|
3573
3580
|
}
|
|
3574
3581
|
}
|
|
3575
3582
|
function rn(t, e) {
|
|
3576
3583
|
return e ? { point: e(t.point) } : t;
|
|
3577
3584
|
}
|
|
3578
|
-
function
|
|
3585
|
+
function es(t, e) {
|
|
3579
3586
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
3580
3587
|
}
|
|
3581
3588
|
function on({ point: t }, e) {
|
|
3582
3589
|
return {
|
|
3583
3590
|
point: t,
|
|
3584
|
-
delta:
|
|
3585
|
-
offset:
|
|
3591
|
+
delta: es(t, eo(e)),
|
|
3592
|
+
offset: es(t, rc(e)),
|
|
3586
3593
|
velocity: oc(e, 0.1)
|
|
3587
3594
|
};
|
|
3588
3595
|
}
|
|
3589
3596
|
function rc(t) {
|
|
3590
3597
|
return t[0];
|
|
3591
3598
|
}
|
|
3592
|
-
function
|
|
3599
|
+
function eo(t) {
|
|
3593
3600
|
return t[t.length - 1];
|
|
3594
3601
|
}
|
|
3595
3602
|
function oc(t, e) {
|
|
3596
3603
|
if (t.length < 2)
|
|
3597
3604
|
return { x: 0, y: 0 };
|
|
3598
3605
|
let n = t.length - 1, i = null;
|
|
3599
|
-
const s =
|
|
3606
|
+
const s = eo(t);
|
|
3600
3607
|
for (; n >= 0 && (i = t[n], !(s.timestamp - i.timestamp > lt(e))); )
|
|
3601
3608
|
n--;
|
|
3602
3609
|
if (!i)
|
|
@@ -3610,35 +3617,35 @@ function oc(t, e) {
|
|
|
3610
3617
|
};
|
|
3611
3618
|
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
3612
3619
|
}
|
|
3613
|
-
const
|
|
3620
|
+
const no = 1e-4, ac = 1 - no, lc = 1 + no, io = 0.01, uc = 0 - io, cc = 0 + io;
|
|
3614
3621
|
function X(t) {
|
|
3615
3622
|
return t.max - t.min;
|
|
3616
3623
|
}
|
|
3617
|
-
function
|
|
3624
|
+
function fc(t, e, n) {
|
|
3618
3625
|
return Math.abs(t - e) <= n;
|
|
3619
3626
|
}
|
|
3620
|
-
function
|
|
3627
|
+
function ns(t, e, n, i = 0.5) {
|
|
3621
3628
|
t.origin = i, t.originPoint = j(e.min, e.max, t.origin), t.scale = X(n) / X(e), t.translate = j(n.min, n.max, t.origin) - t.originPoint, (t.scale >= ac && t.scale <= lc || isNaN(t.scale)) && (t.scale = 1), (t.translate >= uc && t.translate <= cc || isNaN(t.translate)) && (t.translate = 0);
|
|
3622
3629
|
}
|
|
3623
3630
|
function ee(t, e, n, i) {
|
|
3624
|
-
|
|
3631
|
+
ns(t.x, e.x, n.x, i ? i.originX : void 0), ns(t.y, e.y, n.y, i ? i.originY : void 0);
|
|
3625
3632
|
}
|
|
3626
|
-
function
|
|
3633
|
+
function is(t, e, n) {
|
|
3627
3634
|
t.min = n.min + e.min, t.max = t.min + X(e);
|
|
3628
3635
|
}
|
|
3629
|
-
function
|
|
3630
|
-
|
|
3636
|
+
function hc(t, e, n) {
|
|
3637
|
+
is(t.x, e.x, n.x), is(t.y, e.y, n.y);
|
|
3631
3638
|
}
|
|
3632
|
-
function
|
|
3639
|
+
function ss(t, e, n) {
|
|
3633
3640
|
t.min = e.min - n.min, t.max = t.min + X(e);
|
|
3634
3641
|
}
|
|
3635
3642
|
function ne(t, e, n) {
|
|
3636
|
-
|
|
3643
|
+
ss(t.x, e.x, n.x), ss(t.y, e.y, n.y);
|
|
3637
3644
|
}
|
|
3638
3645
|
function dc(t, { min: e, max: n }, i) {
|
|
3639
3646
|
return e !== void 0 && t < e ? t = i ? j(e, t, i.min) : Math.max(t, e) : n !== void 0 && t > n && (t = i ? j(n, t, i.max) : Math.min(t, n)), t;
|
|
3640
3647
|
}
|
|
3641
|
-
function
|
|
3648
|
+
function rs(t, e, n) {
|
|
3642
3649
|
return {
|
|
3643
3650
|
min: e !== void 0 ? t.min + e : void 0,
|
|
3644
3651
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
@@ -3646,18 +3653,18 @@ function ss(t, e, n) {
|
|
|
3646
3653
|
}
|
|
3647
3654
|
function pc(t, { top: e, left: n, bottom: i, right: s }) {
|
|
3648
3655
|
return {
|
|
3649
|
-
x:
|
|
3650
|
-
y:
|
|
3656
|
+
x: rs(t.x, n, s),
|
|
3657
|
+
y: rs(t.y, e, i)
|
|
3651
3658
|
};
|
|
3652
3659
|
}
|
|
3653
|
-
function
|
|
3660
|
+
function os(t, e) {
|
|
3654
3661
|
let n = e.min - t.min, i = e.max - t.max;
|
|
3655
3662
|
return e.max - e.min < t.max - t.min && ([n, i] = [i, n]), { min: n, max: i };
|
|
3656
3663
|
}
|
|
3657
3664
|
function mc(t, e) {
|
|
3658
3665
|
return {
|
|
3659
|
-
x:
|
|
3660
|
-
y:
|
|
3666
|
+
x: os(t.x, e.x),
|
|
3667
|
+
y: os(t.y, e.y)
|
|
3661
3668
|
};
|
|
3662
3669
|
}
|
|
3663
3670
|
function gc(t, e) {
|
|
@@ -3672,35 +3679,35 @@ function yc(t, e) {
|
|
|
3672
3679
|
const bn = 0.35;
|
|
3673
3680
|
function vc(t = bn) {
|
|
3674
3681
|
return t === !1 ? t = 0 : t === !0 && (t = bn), {
|
|
3675
|
-
x:
|
|
3676
|
-
y:
|
|
3682
|
+
x: as(t, "left", "right"),
|
|
3683
|
+
y: as(t, "top", "bottom")
|
|
3677
3684
|
};
|
|
3678
3685
|
}
|
|
3679
|
-
function
|
|
3686
|
+
function as(t, e, n) {
|
|
3680
3687
|
return {
|
|
3681
|
-
min:
|
|
3682
|
-
max:
|
|
3688
|
+
min: ls(t, e),
|
|
3689
|
+
max: ls(t, n)
|
|
3683
3690
|
};
|
|
3684
3691
|
}
|
|
3685
|
-
function
|
|
3692
|
+
function ls(t, e) {
|
|
3686
3693
|
return typeof t == "number" ? t : t[e] || 0;
|
|
3687
3694
|
}
|
|
3688
|
-
const
|
|
3695
|
+
const us = () => ({
|
|
3689
3696
|
translate: 0,
|
|
3690
3697
|
scale: 1,
|
|
3691
3698
|
origin: 0,
|
|
3692
3699
|
originPoint: 0
|
|
3693
3700
|
}), _t = () => ({
|
|
3694
|
-
x: ls(),
|
|
3695
|
-
y: ls()
|
|
3696
|
-
}), us = () => ({ min: 0, max: 0 }), B = () => ({
|
|
3697
3701
|
x: us(),
|
|
3698
3702
|
y: us()
|
|
3703
|
+
}), cs = () => ({ min: 0, max: 0 }), B = () => ({
|
|
3704
|
+
x: cs(),
|
|
3705
|
+
y: cs()
|
|
3699
3706
|
});
|
|
3700
3707
|
function et(t) {
|
|
3701
3708
|
return [t("x"), t("y")];
|
|
3702
3709
|
}
|
|
3703
|
-
function
|
|
3710
|
+
function so({ top: t, left: e, right: n, bottom: i }) {
|
|
3704
3711
|
return {
|
|
3705
3712
|
x: { min: e, max: n },
|
|
3706
3713
|
y: { min: t, max: i }
|
|
@@ -3727,12 +3734,12 @@ function wn({ scale: t, scaleX: e, scaleY: n }) {
|
|
|
3727
3734
|
return !an(t) || !an(e) || !an(n);
|
|
3728
3735
|
}
|
|
3729
3736
|
function St(t) {
|
|
3730
|
-
return wn(t) ||
|
|
3737
|
+
return wn(t) || ro(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
3731
3738
|
}
|
|
3732
|
-
function
|
|
3733
|
-
return
|
|
3739
|
+
function ro(t) {
|
|
3740
|
+
return fs(t.x) || fs(t.y);
|
|
3734
3741
|
}
|
|
3735
|
-
function
|
|
3742
|
+
function fs(t) {
|
|
3736
3743
|
return t && t !== "0%";
|
|
3737
3744
|
}
|
|
3738
3745
|
function ke(t, e, n) {
|
|
@@ -3745,10 +3752,10 @@ function hs(t, e, n, i, s) {
|
|
|
3745
3752
|
function Sn(t, e = 0, n = 1, i, s) {
|
|
3746
3753
|
t.min = hs(t.min, e, n, i, s), t.max = hs(t.max, e, n, i, s);
|
|
3747
3754
|
}
|
|
3748
|
-
function
|
|
3755
|
+
function oo(t, { x: e, y: n }) {
|
|
3749
3756
|
Sn(t.x, e.translate, e.scale, e.originPoint), Sn(t.y, n.translate, n.scale, n.originPoint);
|
|
3750
3757
|
}
|
|
3751
|
-
const
|
|
3758
|
+
const ds = 0.999999999999, ps = 1.0000000000001;
|
|
3752
3759
|
function Tc(t, e, n, i = !1) {
|
|
3753
3760
|
const s = n.length;
|
|
3754
3761
|
if (!s)
|
|
@@ -3761,28 +3768,28 @@ function Tc(t, e, n, i = !1) {
|
|
|
3761
3768
|
l && l.props.style && l.props.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && It(t, {
|
|
3762
3769
|
x: -o.scroll.offset.x,
|
|
3763
3770
|
y: -o.scroll.offset.y
|
|
3764
|
-
}), r && (e.x *= r.x.scale, e.y *= r.y.scale,
|
|
3771
|
+
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, oo(t, r)), i && St(o.latestValues) && It(t, o.latestValues));
|
|
3765
3772
|
}
|
|
3766
|
-
e.x <
|
|
3773
|
+
e.x < ps && e.x > ds && (e.x = 1), e.y < ps && e.y > ds && (e.y = 1);
|
|
3767
3774
|
}
|
|
3768
3775
|
function Bt(t, e) {
|
|
3769
3776
|
t.min = t.min + e, t.max = t.max + e;
|
|
3770
3777
|
}
|
|
3771
|
-
function
|
|
3778
|
+
function ms(t, e, n, i, s = 0.5) {
|
|
3772
3779
|
const o = j(t.min, t.max, s);
|
|
3773
3780
|
Sn(t, e, n, o, i);
|
|
3774
3781
|
}
|
|
3775
3782
|
function It(t, e) {
|
|
3776
|
-
|
|
3783
|
+
ms(t.x, e.x, e.scaleX, e.scale, e.originX), ms(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
3777
3784
|
}
|
|
3778
|
-
function
|
|
3779
|
-
return
|
|
3785
|
+
function ao(t, e) {
|
|
3786
|
+
return so(xc(t.getBoundingClientRect(), e));
|
|
3780
3787
|
}
|
|
3781
3788
|
function bc(t, e, n) {
|
|
3782
|
-
const i =
|
|
3789
|
+
const i = ao(t, n), { scroll: s } = e;
|
|
3783
3790
|
return s && (Bt(i.x, s.offset.x), Bt(i.y, s.offset.y)), i;
|
|
3784
3791
|
}
|
|
3785
|
-
const
|
|
3792
|
+
const lo = ({ current: t }) => t ? t.ownerDocument.defaultView : null, wc = /* @__PURE__ */ new WeakMap();
|
|
3786
3793
|
class Sc {
|
|
3787
3794
|
constructor(e) {
|
|
3788
3795
|
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = B(), this.visualElement = e;
|
|
@@ -3797,15 +3804,15 @@ class Sc {
|
|
|
3797
3804
|
}, o = (c, h) => {
|
|
3798
3805
|
var d;
|
|
3799
3806
|
const { drag: p, dragPropagation: g, onDragStart: P } = this.getProps();
|
|
3800
|
-
if (p && !g && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock =
|
|
3807
|
+
if (p && !g && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = yr(p), !this.openGlobalLock))
|
|
3801
3808
|
return;
|
|
3802
3809
|
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), et((x) => {
|
|
3803
3810
|
let y = this.getAxisMotionValue(x).get() || 0;
|
|
3804
3811
|
if (st.test(y)) {
|
|
3805
3812
|
const { projection: v } = this.visualElement;
|
|
3806
3813
|
if (v && v.layout) {
|
|
3807
|
-
const
|
|
3808
|
-
|
|
3814
|
+
const A = v.layout.layoutBox[x];
|
|
3815
|
+
A && (y = X(A) * (parseFloat(y) / 100));
|
|
3809
3816
|
}
|
|
3810
3817
|
}
|
|
3811
3818
|
this.originPoint[x] = y;
|
|
@@ -3818,7 +3825,7 @@ class Sc {
|
|
|
3818
3825
|
return;
|
|
3819
3826
|
const { offset: b } = h;
|
|
3820
3827
|
if (p && this.currentDirection === null) {
|
|
3821
|
-
this.currentDirection =
|
|
3828
|
+
this.currentDirection = Ac(b), this.currentDirection !== null && g && g(this.currentDirection);
|
|
3822
3829
|
return;
|
|
3823
3830
|
}
|
|
3824
3831
|
this.updateAxis("x", h.point, b), this.updateAxis("y", h.point, b), this.visualElement.render(), P && P(c, h);
|
|
@@ -3826,7 +3833,7 @@ class Sc {
|
|
|
3826
3833
|
var h;
|
|
3827
3834
|
return this.getAnimationState(c) === "paused" && ((h = this.getAxisMotionValue(c).animation) === null || h === void 0 ? void 0 : h.play());
|
|
3828
3835
|
}), { dragSnapToOrigin: u } = this.getProps();
|
|
3829
|
-
this.panSession = new
|
|
3836
|
+
this.panSession = new to(e, {
|
|
3830
3837
|
onSessionStart: s,
|
|
3831
3838
|
onStart: o,
|
|
3832
3839
|
onMove: r,
|
|
@@ -3835,7 +3842,7 @@ class Sc {
|
|
|
3835
3842
|
}, {
|
|
3836
3843
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
3837
3844
|
dragSnapToOrigin: u,
|
|
3838
|
-
contextWindow:
|
|
3845
|
+
contextWindow: lo(this.visualElement)
|
|
3839
3846
|
});
|
|
3840
3847
|
}
|
|
3841
3848
|
stop(e, n) {
|
|
@@ -3884,7 +3891,7 @@ class Sc {
|
|
|
3884
3891
|
let r = mc(s.layout.layoutBox, o);
|
|
3885
3892
|
if (n) {
|
|
3886
3893
|
const a = n(Pc(r));
|
|
3887
|
-
this.hasMutatedConstraints = !!a, a && (r =
|
|
3894
|
+
this.hasMutatedConstraints = !!a, a && (r = so(a));
|
|
3888
3895
|
}
|
|
3889
3896
|
return r;
|
|
3890
3897
|
}
|
|
@@ -3911,7 +3918,7 @@ class Sc {
|
|
|
3911
3918
|
}
|
|
3912
3919
|
startAxisValueAnimation(e, n) {
|
|
3913
3920
|
const i = this.getAxisMotionValue(e);
|
|
3914
|
-
return i.start(
|
|
3921
|
+
return i.start(ei(e, i, 0, n, this.visualElement, !1, xn(this.visualElement, e)));
|
|
3915
3922
|
}
|
|
3916
3923
|
stopAnimation() {
|
|
3917
3924
|
et((e) => this.getAxisMotionValue(e).stop());
|
|
@@ -4014,11 +4021,11 @@ class Sc {
|
|
|
4014
4021
|
function Te(t, e, n) {
|
|
4015
4022
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
4016
4023
|
}
|
|
4017
|
-
function
|
|
4024
|
+
function Ac(t, e = 10) {
|
|
4018
4025
|
let n = null;
|
|
4019
4026
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
4020
4027
|
}
|
|
4021
|
-
class
|
|
4028
|
+
class Cc extends xt {
|
|
4022
4029
|
constructor(e) {
|
|
4023
4030
|
super(e), this.removeGroupControls = W, this.removeListeners = W, this.controls = new Sc(e);
|
|
4024
4031
|
}
|
|
@@ -4030,7 +4037,7 @@ class Ac extends xt {
|
|
|
4030
4037
|
this.removeGroupControls(), this.removeListeners();
|
|
4031
4038
|
}
|
|
4032
4039
|
}
|
|
4033
|
-
const
|
|
4040
|
+
const gs = (t) => (e, n) => {
|
|
4034
4041
|
t && M.postRender(() => t(e, n));
|
|
4035
4042
|
};
|
|
4036
4043
|
class Rc extends xt {
|
|
@@ -4038,16 +4045,16 @@ class Rc extends xt {
|
|
|
4038
4045
|
super(...arguments), this.removePointerDownListener = W;
|
|
4039
4046
|
}
|
|
4040
4047
|
onPointerDown(e) {
|
|
4041
|
-
this.session = new
|
|
4048
|
+
this.session = new to(e, this.createPanHandlers(), {
|
|
4042
4049
|
transformPagePoint: this.node.getTransformPagePoint(),
|
|
4043
|
-
contextWindow:
|
|
4050
|
+
contextWindow: lo(this.node)
|
|
4044
4051
|
});
|
|
4045
4052
|
}
|
|
4046
4053
|
createPanHandlers() {
|
|
4047
4054
|
const { onPanSessionStart: e, onPanStart: n, onPan: i, onPanEnd: s } = this.node.getProps();
|
|
4048
4055
|
return {
|
|
4049
|
-
onSessionStart:
|
|
4050
|
-
onStart:
|
|
4056
|
+
onSessionStart: gs(e),
|
|
4057
|
+
onStart: gs(n),
|
|
4051
4058
|
onMove: i,
|
|
4052
4059
|
onEnd: (o, r) => {
|
|
4053
4060
|
delete this.session, s && M.postRender(() => s(o, r));
|
|
@@ -4073,7 +4080,7 @@ function Vc() {
|
|
|
4073
4080
|
const o = pt(() => n && n(s), [s, n]);
|
|
4074
4081
|
return !e && n ? [!1, o] : [!0];
|
|
4075
4082
|
}
|
|
4076
|
-
const
|
|
4083
|
+
const Ae = {
|
|
4077
4084
|
/**
|
|
4078
4085
|
* Global flag as to whether the tree has animated since the last time
|
|
4079
4086
|
* we resized the window
|
|
@@ -4085,7 +4092,7 @@ const Ce = {
|
|
|
4085
4092
|
*/
|
|
4086
4093
|
hasEverUpdated: !1
|
|
4087
4094
|
};
|
|
4088
|
-
function
|
|
4095
|
+
function ys(t, e) {
|
|
4089
4096
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
4090
4097
|
}
|
|
4091
4098
|
const Xt = {
|
|
@@ -4097,7 +4104,7 @@ const Xt = {
|
|
|
4097
4104
|
t = parseFloat(t);
|
|
4098
4105
|
else
|
|
4099
4106
|
return t;
|
|
4100
|
-
const n =
|
|
4107
|
+
const n = ys(t, e.target.x), i = ys(t, e.target.y);
|
|
4101
4108
|
return `${n}% ${i}%`;
|
|
4102
4109
|
}
|
|
4103
4110
|
}, Ec = {
|
|
@@ -4111,7 +4118,7 @@ const Xt = {
|
|
|
4111
4118
|
return typeof s[2 + r] == "number" && (s[2 + r] /= u), typeof s[3 + r] == "number" && (s[3 + r] /= u), o(s);
|
|
4112
4119
|
}
|
|
4113
4120
|
};
|
|
4114
|
-
class Dc extends
|
|
4121
|
+
class Dc extends qo {
|
|
4115
4122
|
/**
|
|
4116
4123
|
* This only mounts projection nodes for components that
|
|
4117
4124
|
* need measuring, we might want to do it for all components
|
|
@@ -4119,12 +4126,12 @@ class Dc extends Xo {
|
|
|
4119
4126
|
*/
|
|
4120
4127
|
componentDidMount() {
|
|
4121
4128
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: i, layoutId: s } = this.props, { projection: o } = e;
|
|
4122
|
-
|
|
4129
|
+
Sa(Mc), o && (n.group && n.group.add(o), i && i.register && s && i.register(o), o.root.didUpdate(), o.addEventListener("animationComplete", () => {
|
|
4123
4130
|
this.safeToRemove();
|
|
4124
4131
|
}), o.setOptions({
|
|
4125
4132
|
...o.options,
|
|
4126
4133
|
onExitComplete: () => this.safeToRemove()
|
|
4127
|
-
})),
|
|
4134
|
+
})), Ae.hasEverUpdated = !0;
|
|
4128
4135
|
}
|
|
4129
4136
|
getSnapshotBeforeUpdate(e) {
|
|
4130
4137
|
const { layoutDependency: n, visualElement: i, drag: s, isPresent: o } = this.props, r = i.projection;
|
|
@@ -4151,9 +4158,9 @@ class Dc extends Xo {
|
|
|
4151
4158
|
return null;
|
|
4152
4159
|
}
|
|
4153
4160
|
}
|
|
4154
|
-
function
|
|
4161
|
+
function uo(t) {
|
|
4155
4162
|
const [e, n] = Vc(), i = U(jn);
|
|
4156
|
-
return O.jsx(Dc, { ...t, layoutGroup: i, switchLayoutGroup: U(
|
|
4163
|
+
return O.jsx(Dc, { ...t, layoutGroup: i, switchLayoutGroup: U(Js), isPresent: e, safeToRemove: n });
|
|
4157
4164
|
}
|
|
4158
4165
|
const Mc = {
|
|
4159
4166
|
borderRadius: {
|
|
@@ -4170,7 +4177,7 @@ const Mc = {
|
|
|
4170
4177
|
borderBottomLeftRadius: Xt,
|
|
4171
4178
|
borderBottomRightRadius: Xt,
|
|
4172
4179
|
boxShadow: Ec
|
|
4173
|
-
},
|
|
4180
|
+
}, co = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], kc = co.length, vs = (t) => typeof t == "string" ? parseFloat(t) : t, Ps = (t) => typeof t == "number" || S.test(t);
|
|
4174
4181
|
function Lc(t, e, n, i, s, o) {
|
|
4175
4182
|
s ? (t.opacity = j(
|
|
4176
4183
|
0,
|
|
@@ -4179,45 +4186,45 @@ function Lc(t, e, n, i, s, o) {
|
|
|
4179
4186
|
jc(i)
|
|
4180
4187
|
), t.opacityExit = j(e.opacity !== void 0 ? e.opacity : 1, 0, Oc(i))) : o && (t.opacity = j(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, i));
|
|
4181
4188
|
for (let r = 0; r < kc; r++) {
|
|
4182
|
-
const a = `border${
|
|
4183
|
-
let l =
|
|
4189
|
+
const a = `border${co[r]}Radius`;
|
|
4190
|
+
let l = xs(e, a), u = xs(n, a);
|
|
4184
4191
|
if (l === void 0 && u === void 0)
|
|
4185
4192
|
continue;
|
|
4186
|
-
l || (l = 0), u || (u = 0), l === 0 || u === 0 ||
|
|
4193
|
+
l || (l = 0), u || (u = 0), l === 0 || u === 0 || Ps(l) === Ps(u) ? (t[a] = Math.max(j(vs(l), vs(u), i), 0), (st.test(u) || st.test(l)) && (t[a] += "%")) : t[a] = u;
|
|
4187
4194
|
}
|
|
4188
4195
|
(e.rotate || n.rotate) && (t.rotate = j(e.rotate || 0, n.rotate || 0, i));
|
|
4189
4196
|
}
|
|
4190
|
-
function
|
|
4197
|
+
function xs(t, e) {
|
|
4191
4198
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
4192
4199
|
}
|
|
4193
|
-
const jc =
|
|
4194
|
-
function
|
|
4200
|
+
const jc = fo(0, 0.5, Kr), Oc = fo(0.5, 0.95, W);
|
|
4201
|
+
function fo(t, e, n) {
|
|
4195
4202
|
return (i) => i < t ? 0 : i > e ? 1 : n(oe(t, e, i));
|
|
4196
4203
|
}
|
|
4197
|
-
function
|
|
4204
|
+
function Ts(t, e) {
|
|
4198
4205
|
t.min = e.min, t.max = e.max;
|
|
4199
4206
|
}
|
|
4200
4207
|
function tt(t, e) {
|
|
4201
|
-
|
|
4208
|
+
Ts(t.x, e.x), Ts(t.y, e.y);
|
|
4202
4209
|
}
|
|
4203
|
-
function
|
|
4210
|
+
function bs(t, e) {
|
|
4204
4211
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
4205
4212
|
}
|
|
4206
|
-
function
|
|
4213
|
+
function ws(t, e, n, i, s) {
|
|
4207
4214
|
return t -= e, t = ke(t, 1 / n, i), s !== void 0 && (t = ke(t, 1 / s, i)), t;
|
|
4208
4215
|
}
|
|
4209
4216
|
function Fc(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
|
|
4210
4217
|
if (st.test(e) && (e = parseFloat(e), e = j(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
4211
4218
|
return;
|
|
4212
4219
|
let a = j(o.min, o.max, i);
|
|
4213
|
-
t === o && (a -= e), t.min =
|
|
4220
|
+
t === o && (a -= e), t.min = ws(t.min, e, n, a, s), t.max = ws(t.max, e, n, a, s);
|
|
4214
4221
|
}
|
|
4215
|
-
function
|
|
4222
|
+
function Ss(t, e, [n, i, s], o, r) {
|
|
4216
4223
|
Fc(t, e[n], e[i], e[s], e.scale, o, r);
|
|
4217
4224
|
}
|
|
4218
4225
|
const _c = ["x", "scaleX", "originX"], Bc = ["y", "scaleY", "originY"];
|
|
4219
|
-
function
|
|
4220
|
-
|
|
4226
|
+
function As(t, e, n, i) {
|
|
4227
|
+
Ss(t.x, e, _c, n ? n.x : void 0, i ? i.x : void 0), Ss(t.y, e, Bc, n ? n.y : void 0, i ? i.y : void 0);
|
|
4221
4228
|
}
|
|
4222
4229
|
function Cs(t) {
|
|
4223
4230
|
return t.translate === 0 && t.scale === 1;
|
|
@@ -4225,22 +4232,22 @@ function Cs(t) {
|
|
|
4225
4232
|
function ho(t) {
|
|
4226
4233
|
return Cs(t.x) && Cs(t.y);
|
|
4227
4234
|
}
|
|
4228
|
-
function
|
|
4235
|
+
function Rs(t, e) {
|
|
4229
4236
|
return t.min === e.min && t.max === e.max;
|
|
4230
4237
|
}
|
|
4231
4238
|
function Ic(t, e) {
|
|
4232
|
-
return
|
|
4239
|
+
return Rs(t.x, e.x) && Rs(t.y, e.y);
|
|
4233
4240
|
}
|
|
4234
|
-
function
|
|
4241
|
+
function Vs(t, e) {
|
|
4235
4242
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
4236
4243
|
}
|
|
4237
|
-
function
|
|
4238
|
-
return
|
|
4244
|
+
function po(t, e) {
|
|
4245
|
+
return Vs(t.x, e.x) && Vs(t.y, e.y);
|
|
4239
4246
|
}
|
|
4240
|
-
function
|
|
4247
|
+
function Es(t) {
|
|
4241
4248
|
return X(t.x) / X(t.y);
|
|
4242
4249
|
}
|
|
4243
|
-
function
|
|
4250
|
+
function Ds(t, e) {
|
|
4244
4251
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
4245
4252
|
}
|
|
4246
4253
|
class Nc {
|
|
@@ -4325,48 +4332,48 @@ class $c {
|
|
|
4325
4332
|
function Kc(t, e) {
|
|
4326
4333
|
const n = mt.now(), i = ({ timestamp: s }) => {
|
|
4327
4334
|
const o = s - n;
|
|
4328
|
-
o >= e && (
|
|
4335
|
+
o >= e && (ft(i), t(o - e));
|
|
4329
4336
|
};
|
|
4330
|
-
return M.read(i, !0), () =>
|
|
4337
|
+
return M.read(i, !0), () => ft(i);
|
|
4331
4338
|
}
|
|
4332
4339
|
function Gc(t) {
|
|
4333
4340
|
return t instanceof SVGElement && t.tagName !== "svg";
|
|
4334
4341
|
}
|
|
4335
4342
|
function zc(t, e, n) {
|
|
4336
4343
|
const i = K(t) ? t : ae(t);
|
|
4337
|
-
return i.start(
|
|
4344
|
+
return i.start(ei("", i, e, n)), i.animation;
|
|
4338
4345
|
}
|
|
4339
|
-
const
|
|
4346
|
+
const At = {
|
|
4340
4347
|
type: "projectionFrame",
|
|
4341
4348
|
totalNodes: 0,
|
|
4342
4349
|
resolvedTargetDeltas: 0,
|
|
4343
4350
|
recalculatedProjection: 0
|
|
4344
|
-
}, Zt = typeof window < "u" && window.MotionDebug !== void 0, ln = ["", "X", "Y", "Z"], Hc = { visibility: "hidden" },
|
|
4351
|
+
}, Zt = typeof window < "u" && window.MotionDebug !== void 0, ln = ["", "X", "Y", "Z"], Hc = { visibility: "hidden" }, Ms = 1e3;
|
|
4345
4352
|
let Yc = 0;
|
|
4346
4353
|
function un(t, e, n, i) {
|
|
4347
4354
|
const { latestValues: s } = e;
|
|
4348
4355
|
s[t] && (n[t] = s[t], e.setStaticValue(t, 0), i && (i[t] = 0));
|
|
4349
4356
|
}
|
|
4350
|
-
function
|
|
4357
|
+
function mo(t) {
|
|
4351
4358
|
if (t.hasCheckedOptimisedAppear = !0, t.root === t)
|
|
4352
4359
|
return !1;
|
|
4353
4360
|
const { visualElement: e } = t.options;
|
|
4354
|
-
return e ?
|
|
4361
|
+
return e ? Jr(e) ? !0 : t.parent && !t.parent.hasCheckedOptimisedAppear ? mo(t.parent) : !1 : !1;
|
|
4355
4362
|
}
|
|
4356
|
-
function
|
|
4363
|
+
function go({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: i, resetTransform: s }) {
|
|
4357
4364
|
return class {
|
|
4358
4365
|
constructor(r = {}, a = e == null ? void 0 : e()) {
|
|
4359
4366
|
this.id = Yc++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
4360
4367
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
4361
4368
|
}, this.updateProjection = () => {
|
|
4362
|
-
this.projectionUpdateScheduled = !1, Zt && (
|
|
4369
|
+
this.projectionUpdateScheduled = !1, Zt && (At.totalNodes = At.resolvedTargetDeltas = At.recalculatedProjection = 0), this.nodes.forEach(Zc), this.nodes.forEach(nf), this.nodes.forEach(sf), this.nodes.forEach(Jc), Zt && window.MotionDebug.record(At);
|
|
4363
4370
|
}, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
4364
4371
|
for (let l = 0; l < this.path.length; l++)
|
|
4365
4372
|
this.path[l].shouldResetTransform = !0;
|
|
4366
4373
|
this.root === this && (this.nodes = new $c());
|
|
4367
4374
|
}
|
|
4368
4375
|
addEventListener(r, a) {
|
|
4369
|
-
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new
|
|
4376
|
+
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new ni()), this.eventHandlers.get(r).add(a);
|
|
4370
4377
|
}
|
|
4371
4378
|
notifyListeners(r, ...a) {
|
|
4372
4379
|
const l = this.eventHandlers.get(r);
|
|
@@ -4387,7 +4394,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4387
4394
|
let h;
|
|
4388
4395
|
const d = () => this.root.updateBlockedByResize = !1;
|
|
4389
4396
|
t(r, () => {
|
|
4390
|
-
this.root.updateBlockedByResize = !0, h && h(), h = Kc(d, 250),
|
|
4397
|
+
this.root.updateBlockedByResize = !0, h && h(), h = Kc(d, 250), Ae.hasAnimatedSinceResize && (Ae.hasAnimatedSinceResize = !1, this.nodes.forEach(Ls));
|
|
4391
4398
|
});
|
|
4392
4399
|
}
|
|
4393
4400
|
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && c && (l || u) && this.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: d, hasRelativeTargetChanged: p, layout: g }) => {
|
|
@@ -4395,24 +4402,24 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4395
4402
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4396
4403
|
return;
|
|
4397
4404
|
}
|
|
4398
|
-
const P = this.options.transition || c.getDefaultTransition() ||
|
|
4405
|
+
const P = this.options.transition || c.getDefaultTransition() || uf, { onLayoutAnimationStart: b, onLayoutAnimationComplete: x } = c.getProps(), y = !this.targetLayout || !po(this.targetLayout, g) || p, v = !d && p;
|
|
4399
4406
|
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || v || d && (y || !this.currentAnimation)) {
|
|
4400
4407
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(h, v);
|
|
4401
|
-
const
|
|
4402
|
-
...
|
|
4408
|
+
const A = {
|
|
4409
|
+
...zn(P, "layout"),
|
|
4403
4410
|
onPlay: b,
|
|
4404
4411
|
onComplete: x
|
|
4405
4412
|
};
|
|
4406
|
-
(c.shouldReduceMotion || this.options.layoutRoot) && (
|
|
4413
|
+
(c.shouldReduceMotion || this.options.layoutRoot) && (A.delay = 0, A.type = !1), this.startAnimation(A);
|
|
4407
4414
|
} else
|
|
4408
|
-
d ||
|
|
4415
|
+
d || Ls(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4409
4416
|
this.targetLayout = g;
|
|
4410
4417
|
});
|
|
4411
4418
|
}
|
|
4412
4419
|
unmount() {
|
|
4413
4420
|
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
4414
4421
|
const r = this.getStack();
|
|
4415
|
-
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0,
|
|
4422
|
+
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, ft(this.updateProjection);
|
|
4416
4423
|
}
|
|
4417
4424
|
// only on the root
|
|
4418
4425
|
blockUpdate() {
|
|
@@ -4429,7 +4436,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4429
4436
|
}
|
|
4430
4437
|
// Note: currently only running on root node
|
|
4431
4438
|
startUpdate() {
|
|
4432
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
4439
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(rf), this.animationId++);
|
|
4433
4440
|
}
|
|
4434
4441
|
getTransformTemplate() {
|
|
4435
4442
|
const { visualElement: r } = this.options;
|
|
@@ -4440,7 +4447,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4440
4447
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
4441
4448
|
return;
|
|
4442
4449
|
}
|
|
4443
|
-
if (window.HandoffCancelAllAnimations &&
|
|
4450
|
+
if (window.HandoffCancelAllAnimations && mo(this) && window.HandoffCancelAllAnimations(), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
4444
4451
|
return;
|
|
4445
4452
|
this.isLayoutDirty = !0;
|
|
4446
4453
|
for (let c = 0; c < this.path.length; c++) {
|
|
@@ -4455,10 +4462,10 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4455
4462
|
}
|
|
4456
4463
|
update() {
|
|
4457
4464
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
4458
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(
|
|
4465
|
+
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(ks);
|
|
4459
4466
|
return;
|
|
4460
4467
|
}
|
|
4461
|
-
this.isUpdating || this.nodes.forEach(
|
|
4468
|
+
this.isUpdating || this.nodes.forEach(tf), this.isUpdating = !1, this.nodes.forEach(ef), this.nodes.forEach(Xc), this.nodes.forEach(qc), this.clearAllSnapshots();
|
|
4462
4469
|
const a = mt.now();
|
|
4463
4470
|
N.delta = yt(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0, Ze.update.process(N), Ze.preRender.process(N), Ze.render.process(N), N.isProcessing = !1;
|
|
4464
4471
|
}
|
|
@@ -4466,7 +4473,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4466
4473
|
this.updateScheduled || (this.updateScheduled = !0, Mn.read(this.scheduleUpdate));
|
|
4467
4474
|
}
|
|
4468
4475
|
clearAllSnapshots() {
|
|
4469
|
-
this.nodes.forEach(Qc), this.sharedNodes.forEach(
|
|
4476
|
+
this.nodes.forEach(Qc), this.sharedNodes.forEach(of);
|
|
4470
4477
|
}
|
|
4471
4478
|
scheduleUpdateProjection() {
|
|
4472
4479
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, M.preRender(this.updateProjection, !1, !0));
|
|
@@ -4515,7 +4522,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4515
4522
|
measure(r = !0) {
|
|
4516
4523
|
const a = this.measurePageBox();
|
|
4517
4524
|
let l = this.removeElementScroll(a);
|
|
4518
|
-
return r && (l = this.removeTransform(l)),
|
|
4525
|
+
return r && (l = this.removeTransform(l)), cf(l), {
|
|
4519
4526
|
animationId: this.root.animationId,
|
|
4520
4527
|
measuredBox: a,
|
|
4521
4528
|
layoutBox: l,
|
|
@@ -4529,7 +4536,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4529
4536
|
if (!a)
|
|
4530
4537
|
return B();
|
|
4531
4538
|
const l = a.measureViewportBox();
|
|
4532
|
-
if (!(((r = this.scroll) === null || r === void 0 ? void 0 : r.wasRoot) || this.path.some(
|
|
4539
|
+
if (!(((r = this.scroll) === null || r === void 0 ? void 0 : r.wasRoot) || this.path.some(ff))) {
|
|
4533
4540
|
const { scroll: c } = this.root;
|
|
4534
4541
|
c && (Bt(l.x, c.offset.x), Bt(l.y, c.offset.y));
|
|
4535
4542
|
}
|
|
@@ -4567,9 +4574,9 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4567
4574
|
continue;
|
|
4568
4575
|
wn(u.latestValues) && u.updateSnapshot();
|
|
4569
4576
|
const c = B(), h = u.measurePageBox();
|
|
4570
|
-
tt(c, h),
|
|
4577
|
+
tt(c, h), As(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
|
|
4571
4578
|
}
|
|
4572
|
-
return St(this.latestValues) &&
|
|
4579
|
+
return St(this.latestValues) && As(a, this.latestValues), a;
|
|
4573
4580
|
}
|
|
4574
4581
|
setTargetDelta(r) {
|
|
4575
4582
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4601,17 +4608,17 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4601
4608
|
p && p.layout && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), ne(this.relativeTargetOrigin, this.layout.layoutBox, p.layout.layoutBox), tt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4602
4609
|
}
|
|
4603
4610
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
4604
|
-
if (this.target || (this.target = B(), this.targetWithTransforms = B()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
|
|
4611
|
+
if (this.target || (this.target = B(), this.targetWithTransforms = B()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), hc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : tt(this.target, this.layout.layoutBox), oo(this.target, this.targetDelta)) : tt(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
4605
4612
|
this.attemptToResolveRelativeTarget = !1;
|
|
4606
4613
|
const p = this.getClosestProjectingParent();
|
|
4607
4614
|
p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), ne(this.relativeTargetOrigin, this.target, p.target), tt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4608
4615
|
}
|
|
4609
|
-
Zt &&
|
|
4616
|
+
Zt && At.resolvedTargetDeltas++;
|
|
4610
4617
|
}
|
|
4611
4618
|
}
|
|
4612
4619
|
}
|
|
4613
4620
|
getClosestProjectingParent() {
|
|
4614
|
-
if (!(!this.parent || wn(this.parent.latestValues) ||
|
|
4621
|
+
if (!(!this.parent || wn(this.parent.latestValues) || ro(this.parent.latestValues)))
|
|
4615
4622
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
4616
4623
|
}
|
|
4617
4624
|
isProjecting() {
|
|
@@ -4634,7 +4641,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4634
4641
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4635
4642
|
return;
|
|
4636
4643
|
}
|
|
4637
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
4644
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (bs(this.prevProjectionDelta.x, this.projectionDelta.x), bs(this.prevProjectionDelta.y, this.projectionDelta.y)), ee(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Ds(this.projectionDelta.x, this.prevProjectionDelta.x) || !Ds(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), Zt && At.recalculatedProjection++;
|
|
4638
4645
|
}
|
|
4639
4646
|
hide() {
|
|
4640
4647
|
this.isVisible = !1;
|
|
@@ -4656,17 +4663,17 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4656
4663
|
setAnimationOrigin(r, a = !1) {
|
|
4657
4664
|
const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, h = _t();
|
|
4658
4665
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4659
|
-
const d = B(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, P = p !== g, b = this.getStack(), x = !b || b.members.length <= 1, y = !!(P && !x && this.options.crossfade === !0 && !this.path.some(
|
|
4666
|
+
const d = B(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, P = p !== g, b = this.getStack(), x = !b || b.members.length <= 1, y = !!(P && !x && this.options.crossfade === !0 && !this.path.some(lf));
|
|
4660
4667
|
this.animationProgress = 0;
|
|
4661
4668
|
let v;
|
|
4662
|
-
this.mixTargetDelta = (
|
|
4663
|
-
const w =
|
|
4664
|
-
|
|
4669
|
+
this.mixTargetDelta = (A) => {
|
|
4670
|
+
const w = A / 1e3;
|
|
4671
|
+
js(h.x, r.x, w), js(h.y, r.y, w), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ne(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), af(this.relativeTarget, this.relativeTargetOrigin, d, w), v && Ic(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = B()), tt(v, this.relativeTarget)), P && (this.animationValues = c, Lc(c, u, this.latestValues, w, y, x)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
|
|
4665
4672
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4666
4673
|
}
|
|
4667
4674
|
startAnimation(r) {
|
|
4668
|
-
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (
|
|
4669
|
-
|
|
4675
|
+
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (ft(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = M.update(() => {
|
|
4676
|
+
Ae.hasAnimatedSinceResize = !0, this.currentAnimation = zc(0, Ms, {
|
|
4670
4677
|
...r,
|
|
4671
4678
|
onUpdate: (a) => {
|
|
4672
4679
|
this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
|
|
@@ -4683,13 +4690,13 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4683
4690
|
r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
4684
4691
|
}
|
|
4685
4692
|
finishAnimation() {
|
|
4686
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
4693
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Ms), this.currentAnimation.stop()), this.completeAnimation();
|
|
4687
4694
|
}
|
|
4688
4695
|
applyTransformsToTarget() {
|
|
4689
4696
|
const r = this.getLead();
|
|
4690
4697
|
let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = r;
|
|
4691
4698
|
if (!(!a || !l || !u)) {
|
|
4692
|
-
if (this !== r && this.layout && u &&
|
|
4699
|
+
if (this !== r && this.layout && u && yo(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
|
|
4693
4700
|
l = this.target || B();
|
|
4694
4701
|
const h = X(this.layout.layoutBox.x);
|
|
4695
4702
|
l.x.min = r.target.x.min, l.x.max = l.x.min + h;
|
|
@@ -4777,8 +4784,8 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4777
4784
|
const { correct: b, applyTo: x } = Re[P], y = u.transform === "none" ? d[P] : b(d[P], h);
|
|
4778
4785
|
if (x) {
|
|
4779
4786
|
const v = x.length;
|
|
4780
|
-
for (let
|
|
4781
|
-
u[x[
|
|
4787
|
+
for (let A = 0; A < v; A++)
|
|
4788
|
+
u[x[A]] = y;
|
|
4782
4789
|
} else
|
|
4783
4790
|
u[P] = y;
|
|
4784
4791
|
}
|
|
@@ -4792,7 +4799,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4792
4799
|
this.root.nodes.forEach((r) => {
|
|
4793
4800
|
var a;
|
|
4794
4801
|
return (a = r.currentAnimation) === null || a === void 0 ? void 0 : a.stop();
|
|
4795
|
-
}), this.root.nodes.forEach(
|
|
4802
|
+
}), this.root.nodes.forEach(ks), this.root.sharedNodes.clear();
|
|
4796
4803
|
}
|
|
4797
4804
|
};
|
|
4798
4805
|
}
|
|
@@ -4807,7 +4814,7 @@ function qc(t) {
|
|
|
4807
4814
|
o === "size" ? et((h) => {
|
|
4808
4815
|
const d = r ? n.measuredBox[h] : n.layoutBox[h], p = X(d);
|
|
4809
4816
|
d.min = i[h].min, d.max = d.min + p;
|
|
4810
|
-
}) :
|
|
4817
|
+
}) : yo(o, n.layoutBox, i) && et((h) => {
|
|
4811
4818
|
const d = r ? n.measuredBox[h] : n.layoutBox[h], p = X(i[h]);
|
|
4812
4819
|
d.max = d.min + p, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + p);
|
|
4813
4820
|
});
|
|
@@ -4825,7 +4832,7 @@ function qc(t) {
|
|
|
4825
4832
|
const g = B();
|
|
4826
4833
|
ne(g, n.layoutBox, d.layoutBox);
|
|
4827
4834
|
const P = B();
|
|
4828
|
-
ne(P, i, p.layoutBox),
|
|
4835
|
+
ne(P, i, p.layoutBox), po(g, P) || (c = !0), h.options.layoutRoot && (t.relativeTarget = P, t.relativeTargetOrigin = g, t.relativeParent = h);
|
|
4829
4836
|
}
|
|
4830
4837
|
}
|
|
4831
4838
|
}
|
|
@@ -4844,7 +4851,7 @@ function qc(t) {
|
|
|
4844
4851
|
t.options.transition = void 0;
|
|
4845
4852
|
}
|
|
4846
4853
|
function Zc(t) {
|
|
4847
|
-
Zt &&
|
|
4854
|
+
Zt && At.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
4848
4855
|
}
|
|
4849
4856
|
function Jc(t) {
|
|
4850
4857
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
@@ -4852,61 +4859,61 @@ function Jc(t) {
|
|
|
4852
4859
|
function Qc(t) {
|
|
4853
4860
|
t.clearSnapshot();
|
|
4854
4861
|
}
|
|
4855
|
-
function
|
|
4862
|
+
function ks(t) {
|
|
4856
4863
|
t.clearMeasurements();
|
|
4857
4864
|
}
|
|
4858
|
-
function
|
|
4865
|
+
function tf(t) {
|
|
4859
4866
|
t.isLayoutDirty = !1;
|
|
4860
4867
|
}
|
|
4861
|
-
function
|
|
4868
|
+
function ef(t) {
|
|
4862
4869
|
const { visualElement: e } = t.options;
|
|
4863
4870
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4864
4871
|
}
|
|
4865
|
-
function
|
|
4872
|
+
function Ls(t) {
|
|
4866
4873
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4867
4874
|
}
|
|
4868
|
-
function
|
|
4875
|
+
function nf(t) {
|
|
4869
4876
|
t.resolveTargetDelta();
|
|
4870
4877
|
}
|
|
4871
|
-
function
|
|
4878
|
+
function sf(t) {
|
|
4872
4879
|
t.calcProjection();
|
|
4873
4880
|
}
|
|
4874
|
-
function
|
|
4881
|
+
function rf(t) {
|
|
4875
4882
|
t.resetSkewAndRotation();
|
|
4876
4883
|
}
|
|
4877
|
-
function
|
|
4884
|
+
function of(t) {
|
|
4878
4885
|
t.removeLeadSnapshot();
|
|
4879
4886
|
}
|
|
4880
|
-
function
|
|
4887
|
+
function js(t, e, n) {
|
|
4881
4888
|
t.translate = j(e.translate, 0, n), t.scale = j(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
4882
4889
|
}
|
|
4883
|
-
function
|
|
4890
|
+
function Os(t, e, n, i) {
|
|
4884
4891
|
t.min = j(e.min, n.min, i), t.max = j(e.max, n.max, i);
|
|
4885
4892
|
}
|
|
4886
|
-
function
|
|
4887
|
-
|
|
4893
|
+
function af(t, e, n, i) {
|
|
4894
|
+
Os(t.x, e.x, n.x, i), Os(t.y, e.y, n.y, i);
|
|
4888
4895
|
}
|
|
4889
|
-
function
|
|
4896
|
+
function lf(t) {
|
|
4890
4897
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
4891
4898
|
}
|
|
4892
|
-
const
|
|
4899
|
+
const uf = {
|
|
4893
4900
|
duration: 0.45,
|
|
4894
4901
|
ease: [0.4, 0, 0.1, 1]
|
|
4895
|
-
},
|
|
4896
|
-
function
|
|
4897
|
-
t.min =
|
|
4902
|
+
}, Fs = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), _s = Fs("applewebkit/") && !Fs("chrome/") ? Math.round : W;
|
|
4903
|
+
function Bs(t) {
|
|
4904
|
+
t.min = _s(t.min), t.max = _s(t.max);
|
|
4898
4905
|
}
|
|
4899
|
-
function
|
|
4900
|
-
|
|
4906
|
+
function cf(t) {
|
|
4907
|
+
Bs(t.x), Bs(t.y);
|
|
4901
4908
|
}
|
|
4902
|
-
function
|
|
4903
|
-
return t === "position" || t === "preserve-aspect" && !
|
|
4909
|
+
function yo(t, e, n) {
|
|
4910
|
+
return t === "position" || t === "preserve-aspect" && !fc(Es(e), Es(n), 0.2);
|
|
4904
4911
|
}
|
|
4905
|
-
function
|
|
4912
|
+
function ff(t) {
|
|
4906
4913
|
var e;
|
|
4907
4914
|
return t !== t.root && ((e = t.scroll) === null || e === void 0 ? void 0 : e.wasRoot);
|
|
4908
4915
|
}
|
|
4909
|
-
const
|
|
4916
|
+
const hf = go({
|
|
4910
4917
|
attachResizeListener: (t, e) => rt(t, "resize", e),
|
|
4911
4918
|
measureScroll: () => ({
|
|
4912
4919
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
@@ -4915,14 +4922,14 @@ const hh = mo({
|
|
|
4915
4922
|
checkIsScrollRoot: () => !0
|
|
4916
4923
|
}), cn = {
|
|
4917
4924
|
current: void 0
|
|
4918
|
-
},
|
|
4925
|
+
}, vo = go({
|
|
4919
4926
|
measureScroll: (t) => ({
|
|
4920
4927
|
x: t.scrollLeft,
|
|
4921
4928
|
y: t.scrollTop
|
|
4922
4929
|
}),
|
|
4923
4930
|
defaultParent: () => {
|
|
4924
4931
|
if (!cn.current) {
|
|
4925
|
-
const t = new
|
|
4932
|
+
const t = new hf({});
|
|
4926
4933
|
t.mount(window), t.setOptions({ layoutScroll: !0 }), cn.current = t;
|
|
4927
4934
|
}
|
|
4928
4935
|
return cn.current;
|
|
@@ -4931,29 +4938,29 @@ const hh = mo({
|
|
|
4931
4938
|
t.style.transform = e !== void 0 ? e : "none";
|
|
4932
4939
|
},
|
|
4933
4940
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4934
|
-
}),
|
|
4941
|
+
}), df = {
|
|
4935
4942
|
pan: {
|
|
4936
4943
|
Feature: Rc
|
|
4937
4944
|
},
|
|
4938
4945
|
drag: {
|
|
4939
|
-
Feature:
|
|
4940
|
-
ProjectionNode:
|
|
4941
|
-
MeasureLayout:
|
|
4946
|
+
Feature: Cc,
|
|
4947
|
+
ProjectionNode: vo,
|
|
4948
|
+
MeasureLayout: uo
|
|
4942
4949
|
}
|
|
4943
|
-
},
|
|
4944
|
-
function
|
|
4945
|
-
if (
|
|
4950
|
+
}, An = { current: null }, Po = { current: !1 };
|
|
4951
|
+
function pf() {
|
|
4952
|
+
if (Po.current = !0, !!Dn)
|
|
4946
4953
|
if (window.matchMedia) {
|
|
4947
|
-
const t = window.matchMedia("(prefers-reduced-motion)"), e = () =>
|
|
4954
|
+
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => An.current = t.matches;
|
|
4948
4955
|
t.addListener(e), e();
|
|
4949
4956
|
} else
|
|
4950
|
-
|
|
4957
|
+
An.current = !1;
|
|
4951
4958
|
}
|
|
4952
|
-
function
|
|
4959
|
+
function mf(t, e, n) {
|
|
4953
4960
|
for (const i in e) {
|
|
4954
4961
|
const s = e[i], o = n[i];
|
|
4955
4962
|
if (K(s))
|
|
4956
|
-
t.addValue(i, s), process.env.NODE_ENV === "development" &&
|
|
4963
|
+
t.addValue(i, s), process.env.NODE_ENV === "development" && ii(s.version === "11.3.21", `Attempting to mix Framer Motion versions ${s.version} with 11.3.21 may not work as expected.`);
|
|
4957
4964
|
else if (K(o))
|
|
4958
4965
|
t.addValue(i, ae(s, { owner: t }));
|
|
4959
4966
|
else if (o !== s)
|
|
@@ -4969,7 +4976,7 @@ function ph(t, e, n) {
|
|
|
4969
4976
|
e[i] === void 0 && t.removeValue(i);
|
|
4970
4977
|
return e;
|
|
4971
4978
|
}
|
|
4972
|
-
const
|
|
4979
|
+
const Is = /* @__PURE__ */ new WeakMap(), gf = [...Ar, $, vt], yf = (t) => gf.find(Sr(t)), Ns = [
|
|
4973
4980
|
"AnimationStart",
|
|
4974
4981
|
"AnimationComplete",
|
|
4975
4982
|
"Update",
|
|
@@ -4977,8 +4984,8 @@ const Bs = /* @__PURE__ */ new WeakMap(), mh = [...Sr, $, vt], gh = (t) => mh.fi
|
|
|
4977
4984
|
"LayoutMeasure",
|
|
4978
4985
|
"LayoutAnimationStart",
|
|
4979
4986
|
"LayoutAnimationComplete"
|
|
4980
|
-
],
|
|
4981
|
-
class
|
|
4987
|
+
], vf = Ln.length;
|
|
4988
|
+
class Pf {
|
|
4982
4989
|
/**
|
|
4983
4990
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
4984
4991
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -4990,13 +4997,13 @@ class vh {
|
|
|
4990
4997
|
return {};
|
|
4991
4998
|
}
|
|
4992
4999
|
constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
4993
|
-
this.applyWillChange = !1, this.resolveKeyframes = (d, p, g, P) => new this.KeyframeResolver(d, p, g, P, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
5000
|
+
this.applyWillChange = !1, this.resolveKeyframes = (d, p, g, P) => new this.KeyframeResolver(d, p, g, P, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Hn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
4994
5001
|
this.isRenderScheduled = !1, this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
4995
5002
|
}, this.isRenderScheduled = !1, this.scheduleRender = () => {
|
|
4996
5003
|
this.isRenderScheduled || (this.isRenderScheduled = !0, M.render(this.render, !1, !0));
|
|
4997
5004
|
};
|
|
4998
5005
|
const { latestValues: l, renderState: u } = r;
|
|
4999
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = Fe(n), this.isVariantNode =
|
|
5006
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = Fe(n), this.isVariantNode = tr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
5000
5007
|
const { willChange: c, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
5001
5008
|
for (const d in h) {
|
|
5002
5009
|
const p = h[d];
|
|
@@ -5004,10 +5011,10 @@ class vh {
|
|
|
5004
5011
|
}
|
|
5005
5012
|
}
|
|
5006
5013
|
mount(e) {
|
|
5007
|
-
this.current = e,
|
|
5014
|
+
this.current = e, Is.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, i) => this.bindToMotionValue(i, n)), Po.current || pf(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : An.current, process.env.NODE_ENV !== "production" && ii(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
5008
5015
|
}
|
|
5009
5016
|
unmount() {
|
|
5010
|
-
|
|
5017
|
+
Is.delete(this.current), this.projection && this.projection.unmount(), ft(this.notifyUpdate), ft(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
5011
5018
|
for (const e in this.events)
|
|
5012
5019
|
this.events[e].clear();
|
|
5013
5020
|
for (const e in this.features) {
|
|
@@ -5063,13 +5070,13 @@ class vh {
|
|
|
5063
5070
|
*/
|
|
5064
5071
|
update(e, n) {
|
|
5065
5072
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
5066
|
-
for (let i = 0; i <
|
|
5067
|
-
const s =
|
|
5073
|
+
for (let i = 0; i < Ns.length; i++) {
|
|
5074
|
+
const s = Ns[i];
|
|
5068
5075
|
this.propEventSubscriptions[s] && (this.propEventSubscriptions[s](), delete this.propEventSubscriptions[s]);
|
|
5069
5076
|
const o = "on" + s, r = e[o];
|
|
5070
5077
|
r && (this.propEventSubscriptions[s] = this.on(s, r));
|
|
5071
5078
|
}
|
|
5072
|
-
this.prevMotionValues =
|
|
5079
|
+
this.prevMotionValues = mf(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
5073
5080
|
}
|
|
5074
5081
|
getProps() {
|
|
5075
5082
|
return this.props;
|
|
@@ -5100,7 +5107,7 @@ class vh {
|
|
|
5100
5107
|
return this.props.initial !== void 0 && (i.initial = this.props.initial), i;
|
|
5101
5108
|
}
|
|
5102
5109
|
const n = {};
|
|
5103
|
-
for (let i = 0; i <
|
|
5110
|
+
for (let i = 0; i < vf; i++) {
|
|
5104
5111
|
const s = Ln[i], o = this.props[s];
|
|
5105
5112
|
(ie(o) || o === !1) && (n[s] = o);
|
|
5106
5113
|
}
|
|
@@ -5149,7 +5156,7 @@ class vh {
|
|
|
5149
5156
|
readValue(e, n) {
|
|
5150
5157
|
var i;
|
|
5151
5158
|
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (i = this.getBaseTargetFromProps(this.props, e)) !== null && i !== void 0 ? i : this.readValueFromInstance(this.current, e, this.options);
|
|
5152
|
-
return s != null && (typeof s == "string" && (
|
|
5159
|
+
return s != null && (typeof s == "string" && (br(s) || Tr(s)) ? s = parseFloat(s) : !yf(s) && vt.test(n) && (s = Lr(e, n)), this.setBaseTarget(e, K(s) ? s.get() : s)), K(s) ? s.get() : s;
|
|
5153
5160
|
}
|
|
5154
5161
|
/**
|
|
5155
5162
|
* Set the base target to later animate back to. This is currently
|
|
@@ -5167,7 +5174,7 @@ class vh {
|
|
|
5167
5174
|
const { initial: i } = this.props;
|
|
5168
5175
|
let s;
|
|
5169
5176
|
if (typeof i == "string" || typeof i == "object") {
|
|
5170
|
-
const r =
|
|
5177
|
+
const r = Kn(this.props, i, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
|
|
5171
5178
|
r && (s = r[e]);
|
|
5172
5179
|
}
|
|
5173
5180
|
if (i && s !== void 0)
|
|
@@ -5176,15 +5183,15 @@ class vh {
|
|
|
5176
5183
|
return o !== void 0 && !K(o) ? o : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
5177
5184
|
}
|
|
5178
5185
|
on(e, n) {
|
|
5179
|
-
return this.events[e] || (this.events[e] = new
|
|
5186
|
+
return this.events[e] || (this.events[e] = new ni()), this.events[e].add(n);
|
|
5180
5187
|
}
|
|
5181
5188
|
notify(e, ...n) {
|
|
5182
5189
|
this.events[e] && this.events[e].notify(...n);
|
|
5183
5190
|
}
|
|
5184
5191
|
}
|
|
5185
|
-
class
|
|
5192
|
+
class xo extends Pf {
|
|
5186
5193
|
constructor() {
|
|
5187
|
-
super(...arguments), this.KeyframeResolver =
|
|
5194
|
+
super(...arguments), this.KeyframeResolver = jr;
|
|
5188
5195
|
}
|
|
5189
5196
|
sortInstanceNodePosition(e, n) {
|
|
5190
5197
|
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -5196,30 +5203,30 @@ class Po extends vh {
|
|
|
5196
5203
|
delete n[e], delete i[e];
|
|
5197
5204
|
}
|
|
5198
5205
|
}
|
|
5199
|
-
function
|
|
5206
|
+
function xf(t) {
|
|
5200
5207
|
return window.getComputedStyle(t);
|
|
5201
5208
|
}
|
|
5202
|
-
class
|
|
5209
|
+
class Tf extends xo {
|
|
5203
5210
|
constructor() {
|
|
5204
|
-
super(...arguments), this.type = "html", this.applyWillChange = !0, this.renderInstance =
|
|
5211
|
+
super(...arguments), this.type = "html", this.applyWillChange = !0, this.renderInstance = lr;
|
|
5205
5212
|
}
|
|
5206
5213
|
readValueFromInstance(e, n) {
|
|
5207
5214
|
if (Pt.has(n)) {
|
|
5208
|
-
const i =
|
|
5215
|
+
const i = Xn(n);
|
|
5209
5216
|
return i && i.default || 0;
|
|
5210
5217
|
} else {
|
|
5211
|
-
const i =
|
|
5218
|
+
const i = xf(e), s = (sr(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
5212
5219
|
return typeof s == "string" ? s.trim() : s;
|
|
5213
5220
|
}
|
|
5214
5221
|
}
|
|
5215
5222
|
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
5216
|
-
return
|
|
5223
|
+
return ao(e, n);
|
|
5217
5224
|
}
|
|
5218
5225
|
build(e, n, i) {
|
|
5219
|
-
|
|
5226
|
+
In(e, n, i.transformTemplate);
|
|
5220
5227
|
}
|
|
5221
5228
|
scrapeMotionValuesFromProps(e, n, i) {
|
|
5222
|
-
return
|
|
5229
|
+
return $n(e, n, i);
|
|
5223
5230
|
}
|
|
5224
5231
|
handleChildMotionValue() {
|
|
5225
5232
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
@@ -5229,7 +5236,7 @@ class xh extends Po {
|
|
|
5229
5236
|
}));
|
|
5230
5237
|
}
|
|
5231
5238
|
}
|
|
5232
|
-
class
|
|
5239
|
+
class bf extends xo {
|
|
5233
5240
|
constructor() {
|
|
5234
5241
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = B;
|
|
5235
5242
|
}
|
|
@@ -5238,38 +5245,38 @@ class Th extends Po {
|
|
|
5238
5245
|
}
|
|
5239
5246
|
readValueFromInstance(e, n) {
|
|
5240
5247
|
if (Pt.has(n)) {
|
|
5241
|
-
const i =
|
|
5248
|
+
const i = Xn(n);
|
|
5242
5249
|
return i && i.default || 0;
|
|
5243
5250
|
}
|
|
5244
|
-
return n =
|
|
5251
|
+
return n = ur.has(n) ? n : Oe(n), e.getAttribute(n);
|
|
5245
5252
|
}
|
|
5246
5253
|
scrapeMotionValuesFromProps(e, n, i) {
|
|
5247
|
-
return
|
|
5254
|
+
return fr(e, n, i);
|
|
5248
5255
|
}
|
|
5249
5256
|
build(e, n, i) {
|
|
5250
|
-
|
|
5257
|
+
Un(e, n, this.isSVGTag, i.transformTemplate);
|
|
5251
5258
|
}
|
|
5252
5259
|
renderInstance(e, n, i, s) {
|
|
5253
|
-
|
|
5260
|
+
cr(e, n, i, s);
|
|
5254
5261
|
}
|
|
5255
5262
|
mount(e) {
|
|
5256
|
-
this.isSVGTag =
|
|
5263
|
+
this.isSVGTag = Wn(e.tagName), super.mount(e);
|
|
5257
5264
|
}
|
|
5258
5265
|
}
|
|
5259
|
-
const
|
|
5260
|
-
allowProjection: t !==
|
|
5261
|
-
}),
|
|
5266
|
+
const wf = (t, e) => On(t) ? new bf(e) : new Tf(e, {
|
|
5267
|
+
allowProjection: t !== Hs
|
|
5268
|
+
}), Sf = {
|
|
5262
5269
|
layout: {
|
|
5263
|
-
ProjectionNode:
|
|
5264
|
-
MeasureLayout:
|
|
5270
|
+
ProjectionNode: vo,
|
|
5271
|
+
MeasureLayout: uo
|
|
5265
5272
|
}
|
|
5266
|
-
},
|
|
5273
|
+
}, Af = {
|
|
5267
5274
|
...ic,
|
|
5268
5275
|
...dl,
|
|
5269
|
-
...
|
|
5270
|
-
...
|
|
5271
|
-
},
|
|
5272
|
-
class
|
|
5276
|
+
...df,
|
|
5277
|
+
...Sf
|
|
5278
|
+
}, Cf = /* @__PURE__ */ ba((t, e) => tl(t, e, Af, wf));
|
|
5279
|
+
class Rf extends Cn.Component {
|
|
5273
5280
|
getSnapshotBeforeUpdate(e) {
|
|
5274
5281
|
const n = this.props.childRef.current;
|
|
5275
5282
|
if (n && e.isPresent && !this.props.isPresent) {
|
|
@@ -5287,14 +5294,14 @@ class Ah extends An.Component {
|
|
|
5287
5294
|
return this.props.children;
|
|
5288
5295
|
}
|
|
5289
5296
|
}
|
|
5290
|
-
function
|
|
5297
|
+
function Vf({ children: t, isPresent: e }) {
|
|
5291
5298
|
const n = Rn(), i = it(null), s = it({
|
|
5292
5299
|
width: 0,
|
|
5293
5300
|
height: 0,
|
|
5294
5301
|
top: 0,
|
|
5295
5302
|
left: 0
|
|
5296
5303
|
}), { nonce: o } = U(En);
|
|
5297
|
-
return
|
|
5304
|
+
return zs(() => {
|
|
5298
5305
|
const { width: r, height: a, top: l, left: u } = s.current;
|
|
5299
5306
|
if (e || !i.current || !r || !a)
|
|
5300
5307
|
return;
|
|
@@ -5311,10 +5318,10 @@ function Rh({ children: t, isPresent: e }) {
|
|
|
5311
5318
|
`), () => {
|
|
5312
5319
|
document.head.removeChild(c);
|
|
5313
5320
|
};
|
|
5314
|
-
}, [e]), O.jsx(
|
|
5321
|
+
}, [e]), O.jsx(Rf, { isPresent: e, childRef: i, sizeRef: s, children: Cn.cloneElement(t, { ref: i }) });
|
|
5315
5322
|
}
|
|
5316
|
-
const
|
|
5317
|
-
const a =
|
|
5323
|
+
const Ef = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r }) => {
|
|
5324
|
+
const a = Gn(Df), l = Rn(), u = Vt(
|
|
5318
5325
|
() => ({
|
|
5319
5326
|
id: l,
|
|
5320
5327
|
initial: e,
|
|
@@ -5338,24 +5345,24 @@ const Vh = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom:
|
|
|
5338
5345
|
);
|
|
5339
5346
|
return Vt(() => {
|
|
5340
5347
|
a.forEach((c, h) => a.set(h, !1));
|
|
5341
|
-
}, [n]),
|
|
5348
|
+
}, [n]), Cn.useEffect(() => {
|
|
5342
5349
|
!n && !a.size && i && i();
|
|
5343
|
-
}, [n]), r === "popLayout" && (t = O.jsx(
|
|
5350
|
+
}, [n]), r === "popLayout" && (t = O.jsx(Vf, { isPresent: n, children: t })), O.jsx(je.Provider, { value: u, children: t });
|
|
5344
5351
|
};
|
|
5345
|
-
function
|
|
5352
|
+
function Df() {
|
|
5346
5353
|
return /* @__PURE__ */ new Map();
|
|
5347
5354
|
}
|
|
5348
5355
|
const be = (t) => t.key || "";
|
|
5349
|
-
function
|
|
5356
|
+
function Us(t) {
|
|
5350
5357
|
const e = [];
|
|
5351
|
-
return
|
|
5352
|
-
|
|
5358
|
+
return Zo.forEach(t, (n) => {
|
|
5359
|
+
Jo(n) && e.push(n);
|
|
5353
5360
|
}), e;
|
|
5354
5361
|
}
|
|
5355
|
-
const
|
|
5362
|
+
const Mf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
|
|
5356
5363
|
ct(!e, "Replace exitBeforeEnter with mode='wait'");
|
|
5357
|
-
const a = Vt(() =>
|
|
5358
|
-
|
|
5364
|
+
const a = Vt(() => Us(t), [t]), l = a.map(be), u = it(!0), c = it(a), h = Gn(() => /* @__PURE__ */ new Map()), [d, p] = Jt(a), [g, P] = Jt(a);
|
|
5365
|
+
Ys(() => {
|
|
5359
5366
|
u.current = !1, c.current = a;
|
|
5360
5367
|
for (let y = 0; y < g.length; y++) {
|
|
5361
5368
|
const v = be(g[y]);
|
|
@@ -5366,16 +5373,16 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5366
5373
|
if (a !== d) {
|
|
5367
5374
|
let y = [...a];
|
|
5368
5375
|
for (let v = 0; v < g.length; v++) {
|
|
5369
|
-
const
|
|
5370
|
-
l.includes(w) || (y.splice(v, 0,
|
|
5376
|
+
const A = g[v], w = be(A);
|
|
5377
|
+
l.includes(w) || (y.splice(v, 0, A), b.push(A));
|
|
5371
5378
|
}
|
|
5372
|
-
r === "wait" && b.length && (y = b), P(
|
|
5379
|
+
r === "wait" && b.length && (y = b), P(Us(y)), p(a);
|
|
5373
5380
|
return;
|
|
5374
5381
|
}
|
|
5375
5382
|
process.env.NODE_ENV !== "production" && r === "wait" && g.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
5376
5383
|
const { forceRender: x } = U(jn);
|
|
5377
5384
|
return O.jsx(O.Fragment, { children: g.map((y) => {
|
|
5378
|
-
const v = be(y),
|
|
5385
|
+
const v = be(y), A = a === g || l.includes(v), w = () => {
|
|
5379
5386
|
if (h.has(v))
|
|
5380
5387
|
h.set(v, !0);
|
|
5381
5388
|
else
|
|
@@ -5385,28 +5392,28 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5385
5392
|
q || (L = !1);
|
|
5386
5393
|
}), L && (x == null || x(), P(c.current), s && s());
|
|
5387
5394
|
};
|
|
5388
|
-
return O.jsx(
|
|
5395
|
+
return O.jsx(Ef, { isPresent: A, initial: !u.current || i ? void 0 : !1, custom: A ? void 0 : n, presenceAffectsLayout: o, mode: r, onExitComplete: A ? void 0 : w, children: y }, v);
|
|
5389
5396
|
}) });
|
|
5390
|
-
},
|
|
5397
|
+
}, Ws = ({
|
|
5391
5398
|
onKeydown: t
|
|
5392
5399
|
}) => (gt(() => (document.addEventListener("keydown", t), () => {
|
|
5393
5400
|
document.removeEventListener("keydown", t);
|
|
5394
|
-
}), []), null),
|
|
5401
|
+
}), []), null), $s = ({
|
|
5395
5402
|
onMousedown: t
|
|
5396
5403
|
}) => (gt(() => (document.addEventListener("mousedown", t), () => {
|
|
5397
5404
|
document.removeEventListener("mousedown", t);
|
|
5398
|
-
}), []), null),
|
|
5405
|
+
}), []), null), kf = ({
|
|
5399
5406
|
onPickerHide: t
|
|
5400
5407
|
}) => (gt(() => () => {
|
|
5401
5408
|
t();
|
|
5402
|
-
}, []), null),
|
|
5403
|
-
root:
|
|
5409
|
+
}, []), null), Lf = "acrool-react-picker__root", jf = "acrool-react-picker__main-el", Ks = {
|
|
5410
|
+
root: Lf,
|
|
5404
5411
|
"main-el": "acrool-react-picker__main-el",
|
|
5405
|
-
mainEl:
|
|
5406
|
-
},
|
|
5412
|
+
mainEl: jf
|
|
5413
|
+
}, Of = "acrool-react-picker__motion-animation-wrapper", Ff = {
|
|
5407
5414
|
"motion-animation-wrapper": "acrool-react-picker__motion-animation-wrapper",
|
|
5408
|
-
motionAnimationWrapper:
|
|
5409
|
-
},
|
|
5415
|
+
motionAnimationWrapper: Of
|
|
5416
|
+
}, _f = {
|
|
5410
5417
|
variants: {
|
|
5411
5418
|
initial: { position: "absolute", zIndex: 999, opacity: 0, transition: { type: "spring" } },
|
|
5412
5419
|
show: { opacity: 1, transition: { type: "just" } },
|
|
@@ -5415,7 +5422,7 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5415
5422
|
transition: {
|
|
5416
5423
|
duration: 0.1
|
|
5417
5424
|
}
|
|
5418
|
-
},
|
|
5425
|
+
}, Bf = ({
|
|
5419
5426
|
position: t,
|
|
5420
5427
|
children: e
|
|
5421
5428
|
}, n) => {
|
|
@@ -5426,20 +5433,20 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5426
5433
|
// right: position.horizontal === 'left' ? 'calc(100% - 1px)': undefined,
|
|
5427
5434
|
};
|
|
5428
5435
|
return /* @__PURE__ */ O.jsx(
|
|
5429
|
-
|
|
5436
|
+
Cf.div,
|
|
5430
5437
|
{
|
|
5431
5438
|
ref: n,
|
|
5432
5439
|
transition: { type: "spring", duration: 0.2 },
|
|
5433
5440
|
style: i,
|
|
5434
|
-
className:
|
|
5435
|
-
variants:
|
|
5441
|
+
className: Ff.motionAnimationWrapper,
|
|
5442
|
+
variants: _f.variants,
|
|
5436
5443
|
initial: "initial",
|
|
5437
5444
|
animate: "show",
|
|
5438
5445
|
exit: "exit",
|
|
5439
5446
|
children: e
|
|
5440
5447
|
}
|
|
5441
5448
|
);
|
|
5442
|
-
},
|
|
5449
|
+
}, If = Ce(Bf), Nf = (t) => {
|
|
5443
5450
|
if (!t)
|
|
5444
5451
|
return {
|
|
5445
5452
|
vertical: "bottom",
|
|
@@ -5451,9 +5458,9 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5451
5458
|
horizontal: a
|
|
5452
5459
|
};
|
|
5453
5460
|
};
|
|
5454
|
-
function
|
|
5455
|
-
const n =
|
|
5456
|
-
return
|
|
5461
|
+
function zf(t, e) {
|
|
5462
|
+
const n = Ce(t);
|
|
5463
|
+
return Ce((s, o) => {
|
|
5457
5464
|
const [r, a] = Jt(!1), [l, u] = Jt(!1), [c, h] = Jt(), d = it(null), p = it(null), g = it(c);
|
|
5458
5465
|
gt(() => {
|
|
5459
5466
|
h(s.value);
|
|
@@ -5474,7 +5481,7 @@ function Gh(t, e) {
|
|
|
5474
5481
|
return;
|
|
5475
5482
|
}
|
|
5476
5483
|
typeof g.current < "u" && JSON.stringify(c) !== JSON.stringify(g.current) && s.onChange(g.current);
|
|
5477
|
-
}, [c, s.onChange]),
|
|
5484
|
+
}, [c, s.onChange]), A = pt((w) => {
|
|
5478
5485
|
[jt.Escape].includes(w.key) && r && (w.stopPropagation(), a(!1));
|
|
5479
5486
|
}, [r]);
|
|
5480
5487
|
return /* @__PURE__ */ O.jsx(
|
|
@@ -5491,27 +5498,27 @@ function Gh(t, e) {
|
|
|
5491
5498
|
value: c,
|
|
5492
5499
|
onChange: h
|
|
5493
5500
|
},
|
|
5494
|
-
children: /* @__PURE__ */ O.jsxs("div", { className:
|
|
5495
|
-
/* @__PURE__ */ O.jsx("div", { ref: p, className:
|
|
5501
|
+
children: /* @__PURE__ */ O.jsxs("div", { className: Ks.root, children: [
|
|
5502
|
+
/* @__PURE__ */ O.jsx("div", { ref: p, className: Ks.mainEl, onKeyDown: A, children: /* @__PURE__ */ O.jsx(
|
|
5496
5503
|
n,
|
|
5497
5504
|
{
|
|
5498
5505
|
...s,
|
|
5499
5506
|
ref: o
|
|
5500
5507
|
}
|
|
5501
5508
|
) }),
|
|
5502
|
-
/* @__PURE__ */ O.jsx(
|
|
5503
|
-
|
|
5509
|
+
/* @__PURE__ */ O.jsx(Mf, { children: r && /* @__PURE__ */ O.jsx(
|
|
5510
|
+
If,
|
|
5504
5511
|
{
|
|
5505
5512
|
ref: d,
|
|
5506
|
-
position:
|
|
5513
|
+
position: Nf(p.current),
|
|
5507
5514
|
children: /* @__PURE__ */ O.jsx(e, { ...s })
|
|
5508
5515
|
}
|
|
5509
5516
|
) }),
|
|
5510
|
-
r && /* @__PURE__ */ O.jsx(
|
|
5511
|
-
r && /* @__PURE__ */ O.jsx(
|
|
5512
|
-
l && /* @__PURE__ */ O.jsx(
|
|
5513
|
-
l && /* @__PURE__ */ O.jsx(
|
|
5514
|
-
l && /* @__PURE__ */ O.jsx(
|
|
5517
|
+
r && /* @__PURE__ */ O.jsx(kf, { onPickerHide: v }),
|
|
5518
|
+
r && /* @__PURE__ */ O.jsx($s, { onMousedown: y }),
|
|
5519
|
+
l && /* @__PURE__ */ O.jsx($s, { onMousedown: x }),
|
|
5520
|
+
l && /* @__PURE__ */ O.jsx(Ws, { onKeydown: b }),
|
|
5521
|
+
l && /* @__PURE__ */ O.jsx(Ws, { onKeydown: P })
|
|
5515
5522
|
] })
|
|
5516
5523
|
}
|
|
5517
5524
|
);
|
|
@@ -5519,8 +5526,8 @@ function Gh(t, e) {
|
|
|
5519
5526
|
}
|
|
5520
5527
|
export {
|
|
5521
5528
|
jt as EKeyboardKey,
|
|
5522
|
-
|
|
5529
|
+
Wf as PickerProviderConsumer,
|
|
5523
5530
|
Vn as PickerProviderContext,
|
|
5524
|
-
|
|
5525
|
-
|
|
5531
|
+
zf as createPicker,
|
|
5532
|
+
$f as usePicker
|
|
5526
5533
|
};
|