@luna-park/plugin-motion 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +43 -43
- package/dist/{runtime-_rbH5H1J.js → runtime-BDFfjVth.js} +808 -580
- package/dist/runtime.js +1 -1
- package/package.json +3 -3
|
@@ -41,7 +41,7 @@ var a = typeof window < "u", o = a ? window : null, s = a ? document : null, c =
|
|
|
41
41
|
], C = /*#__PURE__*/ S.reduce((e, t) => ({
|
|
42
42
|
...e,
|
|
43
43
|
[t]: t + "("
|
|
44
|
-
}), {}), w = () => {}, T = (e) => e, E = /\)\s*[-.\d]/, D = /(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i, O = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i, ee = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i, k = /hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i, te = /hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i, ne = /[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,
|
|
44
|
+
}), {}), w = () => {}, T = (e) => e, E = /\)\s*[-.\d]/, D = /(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i, O = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i, ee = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i, k = /hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i, te = /hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i, ne = /[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi, re = /^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i, A = /([a-z])([A-Z])/g, j = /(\*=|\+=|-=)/, M = /var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/, N = {
|
|
45
45
|
id: null,
|
|
46
46
|
keyframes: null,
|
|
47
47
|
playbackEase: null,
|
|
@@ -65,29 +65,29 @@ var a = typeof window < "u", o = a ? window : null, s = a ? document : null, c =
|
|
|
65
65
|
onPause: w,
|
|
66
66
|
onComplete: w,
|
|
67
67
|
onRender: w
|
|
68
|
-
},
|
|
68
|
+
}, P = {
|
|
69
69
|
current: null,
|
|
70
70
|
root: s
|
|
71
|
-
},
|
|
72
|
-
defaults:
|
|
71
|
+
}, F = {
|
|
72
|
+
defaults: N,
|
|
73
73
|
precision: 4,
|
|
74
74
|
timeScale: 1,
|
|
75
75
|
tickThreshold: 200,
|
|
76
76
|
editor: null
|
|
77
|
-
},
|
|
77
|
+
}, ie = {
|
|
78
78
|
version: "4.5.0",
|
|
79
79
|
engine: null
|
|
80
80
|
};
|
|
81
|
-
a && (o.AnimeJS ||= [], o.AnimeJS.push(
|
|
81
|
+
a && (o.AnimeJS ||= [], o.AnimeJS.push(ie));
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/helpers.js
|
|
84
|
-
var
|
|
84
|
+
var ae = (e) => e.replace(A, "$1-$2").toLowerCase(), I = (e, t) => e.indexOf(t) === 0, oe = Date.now, se = Array.isArray, ce = (e) => e && e.constructor === Object, L = (e) => typeof e == "number" && !isNaN(e), R = (e) => typeof e == "string", z = (e) => typeof e == "function", B = (e) => e === void 0, le = (e) => B(e) || e === null, ue = (e) => a && e instanceof SVGElement, de = (e) => D.test(e), fe = (e) => I(e, "rgb"), pe = (e) => I(e, "hsl"), V = (e) => de(e) || (fe(e) || pe(e)) && (e[e.length - 1] === ")" || !E.test(e)), me = (e) => !F.defaults.hasOwnProperty(e), he = [
|
|
85
85
|
"opacity",
|
|
86
86
|
"rotate",
|
|
87
87
|
"overflow",
|
|
88
88
|
"color"
|
|
89
|
-
],
|
|
90
|
-
if (
|
|
89
|
+
], ge = (e, t) => {
|
|
90
|
+
if (he.includes(t)) return !1;
|
|
91
91
|
if (e.getAttribute(t) || t in e) {
|
|
92
92
|
if (t === "scale") {
|
|
93
93
|
let t = e.parentNode;
|
|
@@ -95,33 +95,33 @@ var ie = (e) => e.replace(j, "$1-$2").toLowerCase(), L = (e, t) => e.indexOf(t)
|
|
|
95
95
|
}
|
|
96
96
|
return !0;
|
|
97
97
|
}
|
|
98
|
-
},
|
|
98
|
+
}, _e = (e) => R(e) ? parseFloat(e) : e, ve = Math.pow, ye = Math.sqrt, H = Math.sin, be = Math.cos, xe = Math.abs, Se = Math.floor, Ce = Math.asin, we = Math.PI, Te = Math.round, U = (e, t, n) => e < t ? t : e > n ? n : e, W = (e, t) => {
|
|
99
99
|
if (t < 0) return e;
|
|
100
|
-
if (!t) return
|
|
100
|
+
if (!t) return Te(e);
|
|
101
101
|
let n = 10 ** t;
|
|
102
|
-
return
|
|
103
|
-
},
|
|
102
|
+
return Te(e * n) / n;
|
|
103
|
+
}, Ee = (e, t, n) => n === 1 ? t : n === 0 ? e : e + (t - e) * n, De = (e) => e === Infinity ? v : e === -Infinity ? -v : e, Oe = (e) => e <= 1e-11 ? _ : De(W(e, 11)), G = (e) => se(e) ? [...e] : e, ke = (e, t) => {
|
|
104
104
|
let n = { ...e };
|
|
105
105
|
for (let r in t) {
|
|
106
106
|
let i = e[r];
|
|
107
|
-
n[r] =
|
|
107
|
+
n[r] = B(i) ? t[r] : i;
|
|
108
108
|
}
|
|
109
109
|
return n;
|
|
110
|
-
},
|
|
110
|
+
}, K = (e, t, n, r = "_prev", i = "_next") => {
|
|
111
111
|
let a = e._head, o = i;
|
|
112
112
|
for (n && (a = e._tail, o = r); a;) {
|
|
113
113
|
let e = a[o];
|
|
114
114
|
t(a), a = e;
|
|
115
115
|
}
|
|
116
|
-
},
|
|
116
|
+
}, Ae = (e, t, n = "_prev", r = "_next") => {
|
|
117
117
|
let i = t[n], a = t[r];
|
|
118
118
|
i ? i[r] = a : e._head = a, a ? a[n] = i : e._tail = i, t[n] = null, t[r] = null;
|
|
119
|
-
},
|
|
119
|
+
}, je = (e, t, n, r = "_prev", i = "_next") => {
|
|
120
120
|
let a = e._tail;
|
|
121
121
|
for (; a && n && n(a, t);) a = a[r];
|
|
122
122
|
let o = a ? a[i] : e._head;
|
|
123
123
|
a ? a[i] = t : e._head = t, o ? o[r] = t : e._tail = t, t[r] = a, t[i] = o;
|
|
124
|
-
},
|
|
124
|
+
}, Me = (e, t, n) => {
|
|
125
125
|
let r = e.style.transform;
|
|
126
126
|
if (r) {
|
|
127
127
|
let i = e[h], a = 0, o = r.length, s;
|
|
@@ -141,10 +141,10 @@ var ie = (e) => e.replace(j, "$1-$2").toLowerCase(), L = (e, t) => e.indexOf(t)
|
|
|
141
141
|
}
|
|
142
142
|
if (t === "translate3d" && s) return n && (n[t] = s), s;
|
|
143
143
|
let c = i[t];
|
|
144
|
-
if (!
|
|
144
|
+
if (!B(c)) return n && (n[t] = c), c;
|
|
145
145
|
}
|
|
146
|
-
return t === "translate3d" ? "0px, 0px, 0px" : t === "rotate3d" ? "0, 0, 0, 0deg" :
|
|
147
|
-
},
|
|
146
|
+
return t === "translate3d" ? "0px, 0px, 0px" : t === "rotate3d" ? "0, 0, 0, 0deg" : I(t, "scale") ? "1" : I(t, "rotate") || I(t, "skew") ? "0deg" : "0px";
|
|
147
|
+
}, Ne = (e) => {
|
|
148
148
|
let t = "";
|
|
149
149
|
for (let n = 0, r = S.length; n < r; n++) {
|
|
150
150
|
let r = S[n], i = e[r];
|
|
@@ -170,12 +170,12 @@ var ie = (e) => e.replace(j, "$1-$2").toLowerCase(), L = (e, t) => e.indexOf(t)
|
|
|
170
170
|
r === "rotateZ" && e.rotate3d !== void 0 && (t += `rotate3d(${e.rotate3d}) `);
|
|
171
171
|
}
|
|
172
172
|
return e.matrix !== void 0 && (t += `matrix(${e.matrix}) `), e.matrix3d !== void 0 && (t += `matrix3d(${e.matrix3d}) `), t;
|
|
173
|
-
},
|
|
174
|
-
function
|
|
173
|
+
}, Pe = [];
|
|
174
|
+
function Fe(e, t) {
|
|
175
175
|
if (!e) return null;
|
|
176
|
-
let n =
|
|
176
|
+
let n = Pe.length;
|
|
177
177
|
outer: for (let r = 0; r < n; r++) {
|
|
178
|
-
let n =
|
|
178
|
+
let n = Pe[r];
|
|
179
179
|
if (n.detect && !n.detect(e)) continue;
|
|
180
180
|
let i = n.targetAdapters;
|
|
181
181
|
for (let n = 0, r = i.length; n < r; n++) {
|
|
@@ -188,7 +188,7 @@ function Pe(e, t) {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
for (let r = 0; r < n; r++) {
|
|
191
|
-
let n =
|
|
191
|
+
let n = Pe[r];
|
|
192
192
|
if (n.detect && !n.detect(e)) continue;
|
|
193
193
|
let i = n.propertyResolvers;
|
|
194
194
|
for (let n = 0, r = i.length; n < r; n++) {
|
|
@@ -200,15 +200,15 @@ function Pe(e, t) {
|
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/colors.js
|
|
203
|
-
var
|
|
204
|
-
let t = O.exec(e) || ee.exec(e), n =
|
|
203
|
+
var Ie = (e) => {
|
|
204
|
+
let t = O.exec(e) || ee.exec(e), n = B(t[4]) ? 1 : +t[4];
|
|
205
205
|
return [
|
|
206
206
|
+t[1],
|
|
207
207
|
+t[2],
|
|
208
208
|
+t[3],
|
|
209
209
|
n
|
|
210
210
|
];
|
|
211
|
-
},
|
|
211
|
+
}, Le = (e) => {
|
|
212
212
|
let t = e.length, n = t === 4 || t === 5;
|
|
213
213
|
return [
|
|
214
214
|
+("0x" + e[1] + e[n ? 1 : 2]),
|
|
@@ -216,12 +216,12 @@ var Fe = (e) => {
|
|
|
216
216
|
+("0x" + e[n ? 3 : 5] + e[n ? 3 : 6]),
|
|
217
217
|
t === 5 || t === 9 ? +(("0x" + e[n ? 4 : 7] + e[n ? 4 : 8]) / 255).toFixed(3) : 1
|
|
218
218
|
];
|
|
219
|
-
},
|
|
220
|
-
let t = k.exec(e) || te.exec(e), n = t[1] / 360, r = t[2] / 100, i = t[3] / 100, a =
|
|
219
|
+
}, Re = (e, t, n) => (n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e), ze = (e) => {
|
|
220
|
+
let t = k.exec(e) || te.exec(e), n = t[1] / 360, r = t[2] / 100, i = t[3] / 100, a = B(t[4]) ? 1 : +t[4], o, s, c;
|
|
221
221
|
if (r === 0) o = s = c = i;
|
|
222
222
|
else {
|
|
223
223
|
let e = i < .5 ? i * (1 + r) : i + r - i * r, t = 2 * i - e;
|
|
224
|
-
o =
|
|
224
|
+
o = W(Re(t, e, n + 1 / 3) * 255, 0), s = W(Re(t, e, n) * 255, 0), c = W(Re(t, e, n - 1 / 3) * 255, 0);
|
|
225
225
|
}
|
|
226
226
|
return [
|
|
227
227
|
o,
|
|
@@ -229,16 +229,16 @@ var Fe = (e) => {
|
|
|
229
229
|
c,
|
|
230
230
|
a
|
|
231
231
|
];
|
|
232
|
-
},
|
|
232
|
+
}, Be = (e) => fe(e) ? Ie(e) : de(e) ? Le(e) : pe(e) ? ze(e) : [
|
|
233
233
|
0,
|
|
234
234
|
0,
|
|
235
235
|
0,
|
|
236
236
|
1
|
|
237
|
-
],
|
|
238
|
-
let n = e.match(
|
|
237
|
+
], q = (e, t) => B(e) ? t : e, Ve = (e, t) => {
|
|
238
|
+
let n = e.match(M), r = t[p] ? t : document.documentElement, i = getComputedStyle(r)?.getPropertyValue(n[1]);
|
|
239
239
|
return (!i || i.trim() === "") && n[2] && (i = n[2].trim()), i || 0;
|
|
240
|
-
},
|
|
241
|
-
if (
|
|
240
|
+
}, J = (e, t, n, r, i, a) => {
|
|
241
|
+
if (z(e)) {
|
|
242
242
|
if (!i) {
|
|
243
243
|
let i = e(t, n, r, a);
|
|
244
244
|
return isNaN(+i) ? i || 0 : +i;
|
|
@@ -249,19 +249,19 @@ var Fe = (e) => {
|
|
|
249
249
|
};
|
|
250
250
|
return i.func = o, o();
|
|
251
251
|
}
|
|
252
|
-
if (
|
|
253
|
-
if (!i) return
|
|
254
|
-
let n = () =>
|
|
252
|
+
if (R(e) && I(e, "var(")) {
|
|
253
|
+
if (!i) return Ve(e, t);
|
|
254
|
+
let n = () => Ve(e, t);
|
|
255
255
|
return i.func = n, n();
|
|
256
256
|
}
|
|
257
257
|
return e;
|
|
258
|
-
}, He = (e, t) => e[p] ? e[m] &&
|
|
258
|
+
}, He = (e, t) => e[p] ? e[m] && ge(e, t) ? c.ATTRIBUTE : S.includes(t) || x.get(t) ? c.TRANSFORM : I(t, "--") ? c.CSS_VAR : t in e.style ? c.CSS : t in e ? c.OBJECT : c.ATTRIBUTE : c.OBJECT, Ue = (e, t, n) => {
|
|
259
259
|
let r = e.style[t];
|
|
260
260
|
r && n && (n[t] = r);
|
|
261
261
|
let i = r || getComputedStyle(e[g] || e).getPropertyValue(t);
|
|
262
262
|
return i === "auto" ? "0" : i;
|
|
263
263
|
}, We = (e, t, n, r) => {
|
|
264
|
-
let i =
|
|
264
|
+
let i = B(n) ? He(e, t) : n, a = Fe(e, t);
|
|
265
265
|
if (a) {
|
|
266
266
|
let n = a.get(e);
|
|
267
267
|
return n && r && (r[t] = n), n ?? 0;
|
|
@@ -274,7 +274,7 @@ var Fe = (e) => {
|
|
|
274
274
|
let n = e.getAttribute(t);
|
|
275
275
|
return n && r && (r[t] = n), n;
|
|
276
276
|
}
|
|
277
|
-
return i === c.TRANSFORM ?
|
|
277
|
+
return i === c.TRANSFORM ? Me(e, t, r) : i === c.CSS_VAR ? Ue(e, t, r).trimStart() : Ue(e, t, r);
|
|
278
278
|
}, Ge = (e, t, n) => n === "-" ? e - t : n === "+" ? e + t : e * t, Ke = () => ({
|
|
279
279
|
t: l.NUMBER,
|
|
280
280
|
n: 0,
|
|
@@ -288,62 +288,62 @@ var Fe = (e) => {
|
|
|
288
288
|
if (!isNaN(n)) return t.n = n, t;
|
|
289
289
|
let r = e;
|
|
290
290
|
r[1] === "=" && (t.o = r[0], r = r.slice(2));
|
|
291
|
-
let i = !r.includes(" ") &&
|
|
291
|
+
let i = !r.includes(" ") && re.exec(r);
|
|
292
292
|
if (i) return t.t = l.UNIT, t.n = +i[1], t.u = i[2], t;
|
|
293
293
|
if (t.o) return t.n = +r, t;
|
|
294
|
-
if (
|
|
294
|
+
if (V(r)) return t.t = l.COLOR, t.d = Be(r), t;
|
|
295
295
|
{
|
|
296
296
|
let e = r.match(ne);
|
|
297
297
|
return t.t = l.COMPLEX, t.d = e ? e.map(Number) : [], t.s = r.split(ne) || [], t;
|
|
298
298
|
}
|
|
299
|
-
}, qe = (e, t) => (t.t = e._valueType, t.n = e._toNumber, t.u = e._unit, t.o = null, t.d =
|
|
299
|
+
}, qe = (e, t) => (t.t = e._valueType, t.n = e._toNumber, t.u = e._unit, t.o = null, t.d = G(e._toNumbers), t.s = G(e._strings), t), X = Ke(), Je = (e, t, n) => {
|
|
300
300
|
let r = e._modifier, i = e._fromNumbers, a = e._toNumbers, o = e._strings, s = o[0];
|
|
301
301
|
for (let c = 0, l = a.length; c < l; c++) {
|
|
302
|
-
let l = r(
|
|
302
|
+
let l = r(W(Ee(i[c], a[c], t), n)), u = o[c + 1];
|
|
303
303
|
s += `${u ? l + u : l}`, e._numbers[c] = l;
|
|
304
304
|
}
|
|
305
305
|
return s;
|
|
306
306
|
}, Ye = (e, t, n, r, i) => {
|
|
307
|
-
let a = e.parent, o = e.duration, s = e.completed, f = e.iterationDuration, p = e.iterationCount, m = e._currentIteration, g = e._loopDelay, v = e._reversed, y = e._alternate, b = e._hasChildren, x = e._delay, S = e._currentTime, C = x + f, w = t - x, T =
|
|
307
|
+
let a = e.parent, o = e.duration, s = e.completed, f = e.iterationDuration, p = e.iterationCount, m = e._currentIteration, g = e._loopDelay, v = e._reversed, y = e._alternate, b = e._hasChildren, x = e._delay, S = e._currentTime, C = x + f, w = t - x, T = U(S, -x, o), E = U(w, -x, o), D = w - S, O = E > 0, ee = E >= o, k = o <= _, te = i === u.FORCE, ne = 0, re = w, A = 0;
|
|
308
308
|
if (p > 1) {
|
|
309
309
|
let t = f + (ee ? 0 : g), n = ~~(E / t);
|
|
310
|
-
e._currentIteration =
|
|
310
|
+
e._currentIteration = U(n, 0, p), ee && e._currentIteration--, ne = e._currentIteration % 2, re = E - n * t || 0;
|
|
311
311
|
}
|
|
312
|
-
let
|
|
313
|
-
|
|
314
|
-
let
|
|
315
|
-
if (e._currentTime = w, e._iterationTime =
|
|
312
|
+
let j = v ^ (y && ne), M = e._ease, N = ee ? j ? 0 : o : j ? f - re : re;
|
|
313
|
+
M && (N = f * M(N / f) || 0);
|
|
314
|
+
let P = (a ? a.backwards : w < S) ? !j : !!j;
|
|
315
|
+
if (e._currentTime = w, e._iterationTime = N, e.backwards = P, O && !e.began ? (e.began = !0, !n && (!a || !P && a.began) && e.onBegin(e)) : w <= 0 && (e.began = !1), !n && !b && O && e._currentIteration !== m && e.onLoop(e), te || i === u.AUTO && (t >= (a && x > 0 ? 0 : x) && t <= C || t <= x && T > x || t >= C && T !== o) || N >= C && T !== o || N <= x && T > 0 && !ee || t <= T && T === o && s || ee && !s && k) {
|
|
316
316
|
if (O && (e.computeDeltaTime(T), n || e.onBeforeUpdate(e)), !b) {
|
|
317
|
-
let t = te || (
|
|
317
|
+
let t = te || (P ? D * -1 : D) >= F.tickThreshold, i = W(e._offset + (a ? a._offset : 0) + x + N, 12), o = e._head, s, u, f, p, m = 0;
|
|
318
318
|
for (; o;) {
|
|
319
319
|
let e = o._composition, n = o._currentTime, a = o._changeDuration, g = o._absoluteStartTime + o._changeDuration, _ = o._nextRep, v = o._prevRep, y = e !== d.none, b = v ? v._absoluteStartTime + v._changeDuration : 0, x = v && v.parent !== o.parent, S = !_ || _._isOverridden ? g : _.parent === o.parent ? g + _._delay : _._absoluteStartTime < _._absoluteUpdateStartTime ? _._absoluteStartTime : _._absoluteUpdateStartTime;
|
|
320
|
-
if ((t || (n !== a || i <= S || v && !x && (!_ || _.parent !== o.parent)) && (n !== 0 || i >= o._absoluteStartTime || x && !o._hasFromValue && !v._isOverridden && i >= b || _ && !_._isOverridden && _.parent === o.parent && _._currentTime !== 0 &&
|
|
321
|
-
let t = o._currentTime =
|
|
322
|
-
if (b) S = C = i(
|
|
323
|
-
else if (g === l.UNIT) C = i(
|
|
320
|
+
if ((t || (n !== a || i <= S || v && !x && (!_ || _.parent !== o.parent)) && (n !== 0 || i >= o._absoluteStartTime || x && !o._hasFromValue && !v._isOverridden && i >= b || _ && !_._isOverridden && _.parent === o.parent && _._currentTime !== 0 && N < _._startTime)) && (!v || x || N >= o._startTime) && (!y || !o._isOverridden && (!o._isOverlapped || i <= g) && (!_ || _._isOverridden || i <= S) && (!v || v._isOverridden || (x ? i >= o._absoluteStartTime || !o._hasFromValue && i >= b : i >= b + o._delay)))) {
|
|
321
|
+
let t = o._currentTime = U(N - o._startTime, 0, a), n = o._ease(t / o._updateDuration), i = o._modifier, g = o._valueType, _ = o._tweenType, v = _ === c.OBJECT, b = g === l.NUMBER, x = b && v || n === 0 || n === 1 ? -1 : F.precision, S, C;
|
|
322
|
+
if (b) S = C = i(W(Ee(o._fromNumber, o._toNumber, n), x));
|
|
323
|
+
else if (g === l.UNIT) C = i(W(Ee(o._fromNumber, o._toNumber, n), x)), S = `${C}${o._unit}`;
|
|
324
324
|
else if (g === l.COLOR) {
|
|
325
325
|
let e = o._numbers, t = o._fromNumbers, a = o._toNumbers, s = 1 - n, c = t[0], l = t[1], u = t[2], d = a[0], f = a[1], p = a[2];
|
|
326
|
-
e[0] = i(Math.sqrt(c * c * s + d * d * n)), e[1] = i(Math.sqrt(l * l * s + f * f * n)), e[2] = i(Math.sqrt(u * u * s + p * p * n)), e[3] = i(
|
|
326
|
+
e[0] = i(Math.sqrt(c * c * s + d * d * n)), e[1] = i(Math.sqrt(l * l * s + f * f * n)), e[2] = i(Math.sqrt(u * u * s + p * p * n)), e[3] = i(Ee(t[3], a[3], n)), (!o._setter || r) && (S = `rgba(${W(e[0], 0)},${W(e[1], 0)},${W(e[2], 0)},${e[3]})`);
|
|
327
327
|
} else g === l.COMPLEX && (S = Je(o, n, x));
|
|
328
328
|
if (y && (o._number = C), !r && e !== d.blend) {
|
|
329
329
|
let e = o.property;
|
|
330
|
-
s = o.target, o._setter ? o._setter(s, C, o) : v ? s[e] = S : _ === c.ATTRIBUTE ? s.setAttribute(e, S) : (u = s.style, _ === c.TRANSFORM ? (s !== f && (f = s, p = s[h]), p[e] = S, m = 1) : _ === c.CSS ? u[e] = S : _ === c.CSS_VAR && u.setProperty(e, S)), O && (
|
|
330
|
+
s = o.target, o._setter ? o._setter(s, C, o) : v ? s[e] = S : _ === c.ATTRIBUTE ? s.setAttribute(e, S) : (u = s.style, _ === c.TRANSFORM ? (s !== f && (f = s, p = s[h]), p[e] = S, m = 1) : _ === c.CSS ? u[e] = S : _ === c.CSS_VAR && u.setProperty(e, S)), O && (A = 1);
|
|
331
331
|
} else o._value = S;
|
|
332
|
-
} else n && v && !x &&
|
|
333
|
-
m && o._renderTransforms && (u.transform =
|
|
332
|
+
} else n && v && !x && N < o._startTime && (o._currentTime = 0);
|
|
333
|
+
m && o._renderTransforms && (u.transform = Ne(p), m = 0), o = o._next;
|
|
334
334
|
}
|
|
335
|
-
!n &&
|
|
335
|
+
!n && A && e.onRender(e);
|
|
336
336
|
}
|
|
337
337
|
!n && O && e.onUpdate(e);
|
|
338
338
|
}
|
|
339
|
-
return a && k ? !n && (a.began && !
|
|
339
|
+
return a && k ? !n && (a.began && !P && w > 0 && !s || P && w <= 1e-11 && s) && (e.onComplete(e), e.completed = !P) : O && ee ? p === Infinity ? e._startTime += e.duration : e._currentIteration >= p - 1 && (e.paused = !0, !s && !b && (e.completed = !0, !n && (!a || !P && a.began) && (e.onComplete(e), e._resolve(e)))) : e.completed = !1, A;
|
|
340
340
|
}, Xe = (e, t, n, r, i) => {
|
|
341
341
|
let a = e._currentIteration;
|
|
342
342
|
if (Ye(e, t, n, r, i), e._hasChildren) {
|
|
343
|
-
let o = e, s = o.backwards, c = r ? t : o._iterationTime, l =
|
|
343
|
+
let o = e, s = o.backwards, c = r ? t : o._iterationTime, l = oe(), d = 0, f = !0;
|
|
344
344
|
if (!r && o._currentIteration !== a) {
|
|
345
345
|
let e = o.iterationDuration;
|
|
346
|
-
|
|
346
|
+
K(o, (t) => {
|
|
347
347
|
if (!s) !t.completed && !t.backwards && t._currentTime < t.iterationDuration && Ye(t, e, n, 1, u.FORCE), t.began = !1, t.completed = !1;
|
|
348
348
|
else {
|
|
349
349
|
let r = t.duration, i = t._offset + t._delay, a = i + r;
|
|
@@ -351,8 +351,8 @@ var Fe = (e) => {
|
|
|
351
351
|
}
|
|
352
352
|
}), n || o.onLoop(o);
|
|
353
353
|
}
|
|
354
|
-
|
|
355
|
-
let t =
|
|
354
|
+
K(o, (e) => {
|
|
355
|
+
let t = W((c - e._offset) * e._speed, 12);
|
|
356
356
|
if (s && t > e._delay + e.duration) return;
|
|
357
357
|
let a = e._fps < o._fps ? e.requestTick(l) : i;
|
|
358
358
|
d += Ye(e, t, n, r, a), !e.completed && f && (f = !1);
|
|
@@ -360,21 +360,21 @@ var Fe = (e) => {
|
|
|
360
360
|
}
|
|
361
361
|
}, Ze = {}, Qe = (e, t, n) => {
|
|
362
362
|
if (n === c.TRANSFORM) return x.get(e) || e;
|
|
363
|
-
if (n === c.CSS || n === c.ATTRIBUTE &&
|
|
363
|
+
if (n === c.CSS || n === c.ATTRIBUTE && ue(t) && e in t.style) {
|
|
364
364
|
let t = Ze[e];
|
|
365
365
|
if (t) return t;
|
|
366
366
|
{
|
|
367
|
-
let t = e &&
|
|
367
|
+
let t = e && ae(e);
|
|
368
368
|
return Ze[e] = t, t;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
return e;
|
|
372
372
|
}, $e = (e, t = !1) => {
|
|
373
|
-
if (e._hasChildren)
|
|
373
|
+
if (e._hasChildren) K(e, (e) => $e(e, t), !0);
|
|
374
374
|
else {
|
|
375
375
|
let n = e;
|
|
376
|
-
n.pause(),
|
|
377
|
-
let r = e.property, i = e.target, a = e._tweenType, o = e._inlineValue, s =
|
|
376
|
+
n.pause(), K(n, (e) => {
|
|
377
|
+
let r = e.property, i = e.target, a = e._tweenType, o = e._inlineValue, s = le(o) || o === "";
|
|
378
378
|
if (e._setter) {
|
|
379
379
|
if (!t && !s) {
|
|
380
380
|
if (Y(o, X), X.d) {
|
|
@@ -390,8 +390,8 @@ var Fe = (e) => {
|
|
|
390
390
|
let t = i.style;
|
|
391
391
|
if (a === c.TRANSFORM) {
|
|
392
392
|
let n = i[h];
|
|
393
|
-
s ? delete n[r] : n[r] = o, e._renderTransforms && (Object.keys(n).length ? t.transform =
|
|
394
|
-
} else s ? t.removeProperty(
|
|
393
|
+
s ? delete n[r] : n[r] = o, e._renderTransforms && (Object.keys(n).length ? t.transform = Ne(n) : t.removeProperty("transform"));
|
|
394
|
+
} else s ? t.removeProperty(ae(r)) : t[r] = o;
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
i[p] && n._tail === e && n.targets.forEach((e) => {
|
|
@@ -409,7 +409,7 @@ var Fe = (e) => {
|
|
|
409
409
|
}
|
|
410
410
|
set fps(e) {
|
|
411
411
|
let t = +e, n = t < 1e-11 ? _ : t, r = y / n;
|
|
412
|
-
n >
|
|
412
|
+
n > N.frameRate && (N.frameRate = n), this._fps = n, this._frameDuration = r;
|
|
413
413
|
}
|
|
414
414
|
get speed() {
|
|
415
415
|
return this._speed;
|
|
@@ -443,7 +443,7 @@ var Fe = (e) => {
|
|
|
443
443
|
for (let t in e) {
|
|
444
444
|
let n = e[t], r = n._head;
|
|
445
445
|
if (r) {
|
|
446
|
-
let e = r._valueType, t = e === l.COMPLEX || e === l.COLOR ?
|
|
446
|
+
let e = r._valueType, t = e === l.COMPLEX || e === l.COLOR ? G(r._fromNumbers) : null, i = r._fromNumber, a = n._tail;
|
|
447
447
|
for (; a && a !== r;) {
|
|
448
448
|
if (t) for (let e = 0, n = a._numbers.length; e < n; e++) t[e] += a._numbers[e];
|
|
449
449
|
else i += a._number;
|
|
@@ -456,56 +456,56 @@ var Fe = (e) => {
|
|
|
456
456
|
}), t;
|
|
457
457
|
}, rt = a ? requestAnimationFrame : setImmediate, it = a ? cancelAnimationFrame : clearImmediate, at = class extends et {
|
|
458
458
|
constructor(e) {
|
|
459
|
-
super(e), this.useDefaultMainLoop = !0, this.pauseOnDocumentHidden = !0, this.defaults =
|
|
459
|
+
super(e), this.useDefaultMainLoop = !0, this.pauseOnDocumentHidden = !0, this.defaults = N, this.paused = !0, this.reqId = 0;
|
|
460
460
|
}
|
|
461
461
|
update() {
|
|
462
|
-
let e = this._currentTime =
|
|
462
|
+
let e = this._currentTime = oe();
|
|
463
463
|
if (this.requestTick(e)) {
|
|
464
464
|
this.computeDeltaTime(e);
|
|
465
465
|
let t = this._speed, n = this._fps, r = this._head;
|
|
466
466
|
for (; r;) {
|
|
467
467
|
let i = r._next;
|
|
468
|
-
r.paused ? (
|
|
468
|
+
r.paused ? (Ae(this, r), this._hasChildren = !!this._tail, r._running = !1, r.completed && !r._cancelled && r.cancel()) : Xe(r, (e - r._startTime) * r._speed * t, 0, 0, r._fps < n ? r.requestTick(e) : u.AUTO), r = i;
|
|
469
469
|
}
|
|
470
470
|
tt.update();
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
wake() {
|
|
474
|
-
return this.useDefaultMainLoop && !this.reqId && (this.requestTick(
|
|
474
|
+
return this.useDefaultMainLoop && !this.reqId && (this.requestTick(oe()), this.reqId = rt(ot)), this;
|
|
475
475
|
}
|
|
476
476
|
pause() {
|
|
477
477
|
if (this.reqId) return this.paused = !0, st();
|
|
478
478
|
}
|
|
479
479
|
resume() {
|
|
480
|
-
if (this.paused) return this.paused = !1,
|
|
480
|
+
if (this.paused) return this.paused = !1, K(this, (e) => e.resetTime()), this.wake();
|
|
481
481
|
}
|
|
482
482
|
get speed() {
|
|
483
|
-
return this._speed * (
|
|
483
|
+
return this._speed * (F.timeScale === 1 ? 1 : y);
|
|
484
484
|
}
|
|
485
485
|
set speed(e) {
|
|
486
|
-
let t = e *
|
|
487
|
-
this._speed !== t && (this._speed = t,
|
|
486
|
+
let t = e * F.timeScale;
|
|
487
|
+
this._speed !== t && (this._speed = t, K(this, (e) => e.speed = e._speed));
|
|
488
488
|
}
|
|
489
489
|
get timeUnit() {
|
|
490
|
-
return
|
|
490
|
+
return F.timeScale === 1 ? "ms" : "s";
|
|
491
491
|
}
|
|
492
492
|
set timeUnit(e) {
|
|
493
493
|
let t = .001, n = e === "s", r = n ? t : 1;
|
|
494
|
-
if (
|
|
495
|
-
|
|
494
|
+
if (F.timeScale !== r) {
|
|
495
|
+
F.timeScale = r, F.tickThreshold = 200 * r;
|
|
496
496
|
let e = n ? t : y;
|
|
497
497
|
this.defaults.duration *= e, this._speed *= e;
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
get precision() {
|
|
501
|
-
return
|
|
501
|
+
return F.precision;
|
|
502
502
|
}
|
|
503
503
|
set precision(e) {
|
|
504
|
-
|
|
504
|
+
F.precision = e;
|
|
505
505
|
}
|
|
506
506
|
}, Z = /*#__PURE__*/ (() => {
|
|
507
|
-
let e = new at(
|
|
508
|
-
return a && (
|
|
507
|
+
let e = new at(oe());
|
|
508
|
+
return a && (ie.engine = e, s.addEventListener("visibilitychange", () => {
|
|
509
509
|
e.pauseOnDocumentHidden && (s.hidden ? e.pause() : e.resume());
|
|
510
510
|
})), e;
|
|
511
511
|
})(), ot = () => {
|
|
@@ -525,7 +525,7 @@ var Fe = (e) => {
|
|
|
525
525
|
let n = e._composition;
|
|
526
526
|
if (n === d.replace) {
|
|
527
527
|
let n = e._absoluteStartTime;
|
|
528
|
-
|
|
528
|
+
je(t, e, ut, "_prevRep", "_nextRep");
|
|
529
529
|
let r = e._prevRep;
|
|
530
530
|
if (r) {
|
|
531
531
|
let t = r.parent, i = r._absoluteEndTime;
|
|
@@ -536,20 +536,20 @@ var Fe = (e) => {
|
|
|
536
536
|
}
|
|
537
537
|
let a = e._absoluteUpdateStartTime;
|
|
538
538
|
if (i > a) {
|
|
539
|
-
let e = r._startTime, t =
|
|
539
|
+
let e = r._startTime, t = W(a - (i - (e + r._updateDuration)) - e, 12);
|
|
540
540
|
r._changeDuration = t, r._currentTime = t, r._isOverlapped = 1, t < 1e-11 && dt(r);
|
|
541
541
|
}
|
|
542
542
|
let o = e.parent.parent;
|
|
543
543
|
if (!o || o !== t.parent) {
|
|
544
544
|
let e = !0;
|
|
545
|
-
if (
|
|
545
|
+
if (K(t, (t) => {
|
|
546
546
|
t._isOverlapped || (e = !1);
|
|
547
547
|
}), e) {
|
|
548
548
|
let e = t.parent;
|
|
549
549
|
if (e) {
|
|
550
550
|
let n = !0;
|
|
551
|
-
|
|
552
|
-
e !== t &&
|
|
551
|
+
K(e, (e) => {
|
|
552
|
+
e !== t && K(e, (e) => {
|
|
553
553
|
e._isOverlapped || (n = !1);
|
|
554
554
|
});
|
|
555
555
|
}), n && e.cancel();
|
|
@@ -559,29 +559,29 @@ var Fe = (e) => {
|
|
|
559
559
|
}
|
|
560
560
|
} else if (n === d.blend) {
|
|
561
561
|
let t = lt(e.target, e.property, "_add"), n = nt(ct._add), r = t._head;
|
|
562
|
-
r || (r = { ...e }, r._composition = d.replace, r._updateDuration = _, r._startTime = 0, r._numbers =
|
|
562
|
+
r || (r = { ...e }, r._composition = d.replace, r._updateDuration = _, r._startTime = 0, r._numbers = G(e._fromNumbers), r._number = 0, r._next = null, r._prev = null, je(t, r), je(n, r));
|
|
563
563
|
let i = e._toNumber;
|
|
564
|
-
if (e._fromNumber = r._fromNumber - i, e._toNumber = 0, e._numbers =
|
|
565
|
-
let t =
|
|
564
|
+
if (e._fromNumber = r._fromNumber - i, e._toNumber = 0, e._numbers = G(e._fromNumbers), e._number = 0, r._fromNumber = i, e._toNumbers.length) {
|
|
565
|
+
let t = G(e._toNumbers);
|
|
566
566
|
t.forEach((t, n) => {
|
|
567
567
|
e._fromNumbers[n] = r._fromNumbers[n] - t, e._toNumbers[n] = 0;
|
|
568
568
|
}), r._fromNumbers = t;
|
|
569
569
|
}
|
|
570
|
-
|
|
570
|
+
je(t, e, null, "_prevAdd", "_nextAdd");
|
|
571
571
|
}
|
|
572
572
|
return e;
|
|
573
573
|
}, pt = (e) => {
|
|
574
574
|
let t = e._composition;
|
|
575
575
|
if (t !== d.none) {
|
|
576
576
|
let n = e.target, r = e.property, i = ct._rep.get(n)[r];
|
|
577
|
-
if (
|
|
577
|
+
if (Ae(i, e, "_prevRep", "_nextRep"), t === d.blend) {
|
|
578
578
|
let t = ct._add, i = t.get(n);
|
|
579
579
|
if (!i) return;
|
|
580
580
|
let a = i[r], o = tt.animation;
|
|
581
|
-
|
|
581
|
+
Ae(a, e, "_prevAdd", "_nextAdd");
|
|
582
582
|
let s = a._head;
|
|
583
583
|
if (s && s === a._tail) {
|
|
584
|
-
|
|
584
|
+
Ae(a, s, "_prevAdd", "_nextAdd"), Ae(o, s);
|
|
585
585
|
let e = !0;
|
|
586
586
|
for (let t in i) if (i[t]._head) {
|
|
587
587
|
e = !1;
|
|
@@ -592,15 +592,15 @@ var Fe = (e) => {
|
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
return e;
|
|
595
|
-
}, mt = (e) => (e.paused = !0, e.began = !1, e.completed = !1, e), ht = (e) => e._cancelled ? (e._hasChildren ?
|
|
595
|
+
}, mt = (e) => (e.paused = !0, e.began = !1, e.completed = !1, e), ht = (e) => e._cancelled ? (e._hasChildren ? K(e, ht) : K(e, (e) => {
|
|
596
596
|
e._composition !== d.none && ft(e, lt(e.target, e.property));
|
|
597
597
|
}), e._cancelled = 0, e) : e, gt = 0, _t = (e, t) => e._priority > t._priority, vt = class extends et {
|
|
598
598
|
constructor(e = {}, t = null, n = 0) {
|
|
599
599
|
super(0), ++gt;
|
|
600
600
|
let { id: r, delay: i, duration: a, reversed: o, alternate: s, loop: c, loopDelay: l, autoplay: u, frameRate: d, playbackRate: f, priority: p, onComplete: m, onLoop: h, onPause: g, onBegin: _, onBeforeUpdate: v, onUpdate: y } = e;
|
|
601
|
-
|
|
602
|
-
let b = t ? 0 : Z._lastTickTime, x = t ? t.defaults :
|
|
603
|
-
t ? O = n : (Z.reqId || Z.requestTick(
|
|
601
|
+
P.current && P.current.register(this);
|
|
602
|
+
let b = t ? 0 : Z._lastTickTime, x = t ? t.defaults : F.defaults, S = z(i) || B(i) ? x.delay : +i, C = z(a) || B(a) ? Infinity : +a, T = q(c, x.loop), E = q(l, x.loopDelay), D = T === !0 || T === Infinity || T < 0 ? Infinity : T + 1, O = 0;
|
|
603
|
+
t ? O = n : (Z.reqId || Z.requestTick(oe()), O = (Z._lastTickTime - Z._startTime) * F.timeScale), this.id = B(r) ? gt : r, this.parent = t, this.duration = De((C + E) * D - E) || 1e-11, this.backwards = !1, this.paused = !0, this.began = !1, this.completed = !1, this.onBegin = _ || x.onBegin, this.onBeforeUpdate = v || x.onBeforeUpdate, this.onUpdate = y || x.onUpdate, this.onLoop = h || x.onLoop, this.onPause = g || x.onPause, this.onComplete = m || x.onComplete, this.iterationDuration = C, this.iterationCount = D, this._autoplay = !t && q(u, x.autoplay), this._offset = O, this._delay = S, this._loopDelay = E, this._iterationTime = 0, this._currentIteration = 0, this._resolve = w, this._running = !1, this._reversed = +q(o, x.reversed), this._reverse = this._reversed, this._cancelled = 0, this._alternate = q(s, x.alternate), this._prev = null, this._next = null, this._lastTickTime = b, this._startTime = b, this._lastTime = b, this._fps = q(d, x.frameRate), this._speed = q(f, x.playbackRate), this._priority = +q(p, 1);
|
|
604
604
|
}
|
|
605
605
|
get cancelled() {
|
|
606
606
|
return !!this._cancelled;
|
|
@@ -609,26 +609,26 @@ var Fe = (e) => {
|
|
|
609
609
|
e ? this.cancel() : this.reset(!0).play();
|
|
610
610
|
}
|
|
611
611
|
get currentTime() {
|
|
612
|
-
return W(
|
|
612
|
+
return U(W(this._currentTime, F.precision), -this._delay, this.duration);
|
|
613
613
|
}
|
|
614
614
|
set currentTime(e) {
|
|
615
615
|
let t = this.paused;
|
|
616
616
|
this.pause().seek(+e), t || this.resume();
|
|
617
617
|
}
|
|
618
618
|
get iterationCurrentTime() {
|
|
619
|
-
return W(
|
|
619
|
+
return U(W(this._iterationTime, F.precision), 0, this.iterationDuration);
|
|
620
620
|
}
|
|
621
621
|
set iterationCurrentTime(e) {
|
|
622
622
|
this.currentTime = this.iterationDuration * this._currentIteration + e;
|
|
623
623
|
}
|
|
624
624
|
get progress() {
|
|
625
|
-
return W(
|
|
625
|
+
return U(W(this._currentTime / this.duration, 10), 0, 1);
|
|
626
626
|
}
|
|
627
627
|
set progress(e) {
|
|
628
628
|
this.currentTime = this.duration * e;
|
|
629
629
|
}
|
|
630
630
|
get iterationProgress() {
|
|
631
|
-
return W(
|
|
631
|
+
return U(W(this._iterationTime / this.iterationDuration, 10), 0, 1);
|
|
632
632
|
}
|
|
633
633
|
set iterationProgress(e) {
|
|
634
634
|
let t = this.iterationDuration;
|
|
@@ -638,7 +638,7 @@ var Fe = (e) => {
|
|
|
638
638
|
return this._currentIteration;
|
|
639
639
|
}
|
|
640
640
|
set currentIteration(e) {
|
|
641
|
-
this.currentTime = this.iterationDuration *
|
|
641
|
+
this.currentTime = this.iterationDuration * U(+e, 0, this.iterationCount - 1);
|
|
642
642
|
}
|
|
643
643
|
get reversed() {
|
|
644
644
|
return !!this._reversed;
|
|
@@ -653,22 +653,22 @@ var Fe = (e) => {
|
|
|
653
653
|
super.speed = e, this.resetTime();
|
|
654
654
|
}
|
|
655
655
|
reset(e = !1) {
|
|
656
|
-
return ht(this), this._reversed && !this._reverse && (this.reversed = !1), this._iterationTime = this.iterationDuration, Xe(this, 0, 1, ~~e, u.FORCE), mt(this), this._hasChildren &&
|
|
656
|
+
return ht(this), this._reversed && !this._reverse && (this.reversed = !1), this._iterationTime = this.iterationDuration, Xe(this, 0, 1, ~~e, u.FORCE), mt(this), this._hasChildren && K(this, mt), this;
|
|
657
657
|
}
|
|
658
658
|
init(e = !1) {
|
|
659
659
|
this.fps = this._fps, this.speed = this._speed, !e && this._hasChildren && Xe(this, this.duration, 1, ~~e, u.FORCE), this.reset(e);
|
|
660
660
|
let t = this._autoplay;
|
|
661
|
-
return t === !0 ? this.resume() : t && !
|
|
661
|
+
return t === !0 ? this.resume() : t && !B(t.linked) && t.link(this), this;
|
|
662
662
|
}
|
|
663
663
|
resetTime() {
|
|
664
664
|
let e = 1 / (this._speed * Z._speed);
|
|
665
|
-
return this._startTime =
|
|
665
|
+
return this._startTime = oe() - (this._currentTime + this._delay) * e, this;
|
|
666
666
|
}
|
|
667
667
|
pause() {
|
|
668
668
|
return this.paused ? this : (this.paused = !0, this.onPause(this), this);
|
|
669
669
|
}
|
|
670
670
|
resume() {
|
|
671
|
-
return this.paused ? (this.paused = !1, this.duration <= 1e-11 && !this._hasChildren ? Xe(this, _, 0, 0, u.FORCE) : (this._running ||= (
|
|
671
|
+
return this.paused ? (this.paused = !1, this.duration <= 1e-11 && !this._hasChildren ? Xe(this, _, 0, 0, u.FORCE) : (this._running ||= (je(Z, this, _t), Z._hasChildren = !0, !0), this.resetTime(), this._startTime -= 12, Z.wake()), this) : this;
|
|
672
672
|
}
|
|
673
673
|
restart() {
|
|
674
674
|
return this.reset().resume();
|
|
@@ -679,7 +679,7 @@ var Fe = (e) => {
|
|
|
679
679
|
return this.paused = !0, Xe(this, e + this._delay, ~~t, ~~n, u.AUTO), r ? this : this.resume();
|
|
680
680
|
}
|
|
681
681
|
alternate() {
|
|
682
|
-
let e = this._reversed, t = this.iterationCount, n = this.iterationDuration, r = t === Infinity ?
|
|
682
|
+
let e = this._reversed, t = this.iterationCount, n = this.iterationDuration, r = t === Infinity ? Se(v / n) : t;
|
|
683
683
|
return this._reversed = +(this._alternate && !(r % 2) ? e : !e), t === Infinity ? this.iterationProgress = this._reversed ? 1 - this.iterationProgress : this.iterationProgress : this.seek(n * r - this._currentTime), this.resetTime(), this;
|
|
684
684
|
}
|
|
685
685
|
play() {
|
|
@@ -689,13 +689,13 @@ var Fe = (e) => {
|
|
|
689
689
|
return this._reversed || this.alternate(), this.resume();
|
|
690
690
|
}
|
|
691
691
|
cancel() {
|
|
692
|
-
return this._hasChildren ?
|
|
692
|
+
return this._hasChildren ? K(this, (e) => e.cancel(), !0) : K(this, pt), this._cancelled = 1, this.pause();
|
|
693
693
|
}
|
|
694
694
|
stretch(e) {
|
|
695
|
-
let t = this.duration, n =
|
|
695
|
+
let t = this.duration, n = Oe(e);
|
|
696
696
|
if (t === n) return this;
|
|
697
697
|
let r = e / t, i = e <= _;
|
|
698
|
-
return this.duration = i ? _ : n, this.iterationDuration = i ? _ :
|
|
698
|
+
return this.duration = i ? _ : n, this.iterationDuration = i ? _ : Oe(this.iterationDuration * r), this._offset *= r, this._delay *= r, this._loopDelay *= r, this;
|
|
699
699
|
}
|
|
700
700
|
revert() {
|
|
701
701
|
Xe(this, 0, 1, 0, u.AUTO);
|
|
@@ -715,21 +715,21 @@ var Fe = (e) => {
|
|
|
715
715
|
//#endregion
|
|
716
716
|
//#region node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/targets.js
|
|
717
717
|
function yt(e) {
|
|
718
|
-
let t =
|
|
718
|
+
let t = R(e) ? P.root.querySelectorAll(e) : e;
|
|
719
719
|
if (t instanceof NodeList || t instanceof HTMLCollection) return t;
|
|
720
720
|
}
|
|
721
721
|
function bt(e) {
|
|
722
|
-
if (
|
|
723
|
-
if (!a) return
|
|
724
|
-
if (
|
|
722
|
+
if (le(e)) return [];
|
|
723
|
+
if (!a) return se(e) && e.flat(Infinity) || [e];
|
|
724
|
+
if (se(e)) {
|
|
725
725
|
let t = e.flat(Infinity), n = [];
|
|
726
726
|
for (let e = 0, r = t.length; e < r; e++) {
|
|
727
727
|
let r = t[e];
|
|
728
|
-
if (!
|
|
728
|
+
if (!le(r)) {
|
|
729
729
|
let e = yt(r);
|
|
730
730
|
if (e) for (let t = 0, r = e.length; t < r; t++) {
|
|
731
731
|
let r = e[t];
|
|
732
|
-
if (!
|
|
732
|
+
if (!le(r)) {
|
|
733
733
|
let e = !1;
|
|
734
734
|
for (let t = 0, i = n.length; t < i; t++) if (n[t] === r) {
|
|
735
735
|
e = !0;
|
|
@@ -759,7 +759,7 @@ function xt(e) {
|
|
|
759
759
|
let n = t[e];
|
|
760
760
|
if (!n[f]) {
|
|
761
761
|
n[f] = !0;
|
|
762
|
-
let e =
|
|
762
|
+
let e = ue(n);
|
|
763
763
|
(n.nodeType || e) && (n[p] = !0, n[m] = e, n[h] = {});
|
|
764
764
|
}
|
|
765
765
|
}
|
|
@@ -769,13 +769,13 @@ function xt(e) {
|
|
|
769
769
|
//#region node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/core/units.js
|
|
770
770
|
var St = {
|
|
771
771
|
deg: 1,
|
|
772
|
-
rad: 180 /
|
|
772
|
+
rad: 180 / we,
|
|
773
773
|
turn: 360
|
|
774
774
|
}, Ct = {}, wt = (e, t, n, r = !1) => {
|
|
775
775
|
let i = t.u, a = t.n;
|
|
776
776
|
if (t.t === l.UNIT && i === n) return t;
|
|
777
777
|
let o = a + i + n, c = Ct[o];
|
|
778
|
-
if (!
|
|
778
|
+
if (!B(c) && !r) t.n = c;
|
|
779
779
|
else {
|
|
780
780
|
let r;
|
|
781
781
|
if (i in St) r = a * St[i] / St[n];
|
|
@@ -792,29 +792,29 @@ var St = {
|
|
|
792
792
|
t.n = r, Ct[o] = r;
|
|
793
793
|
}
|
|
794
794
|
return t.t, l.UNIT, t.u = n, t;
|
|
795
|
-
}, Tt = (e) => e, Et = (e = 1.68) => (t) =>
|
|
795
|
+
}, Tt = (e) => e, Et = (e = 1.68) => (t) => ve(t, +e), Dt = {
|
|
796
796
|
in: (e) => (t) => e(t),
|
|
797
797
|
out: (e) => (t) => 1 - e(1 - t),
|
|
798
798
|
inOut: (e) => (t) => t < .5 ? e(t * 2) / 2 : 1 - e(t * -2 + 2) / 2,
|
|
799
799
|
outIn: (e) => (t) => t < .5 ? (1 - e(1 - t * 2)) / 2 : (e(t * 2 - 1) + 1) / 2
|
|
800
|
-
}, Ot =
|
|
800
|
+
}, Ot = we / 2, kt = we * 2, At = {
|
|
801
801
|
"": Et,
|
|
802
802
|
Quad: Et(2),
|
|
803
803
|
Cubic: Et(3),
|
|
804
804
|
Quart: Et(4),
|
|
805
805
|
Quint: Et(5),
|
|
806
|
-
Sine: (e) => 1 -
|
|
807
|
-
Circ: (e) => 1 -
|
|
808
|
-
Expo: (e) => e ?
|
|
806
|
+
Sine: (e) => 1 - be(e * Ot),
|
|
807
|
+
Circ: (e) => 1 - ye(1 - e * e),
|
|
808
|
+
Expo: (e) => e ? ve(2, 10 * e - 10) : 0,
|
|
809
809
|
Bounce: (e) => {
|
|
810
810
|
let t, n = 4;
|
|
811
|
-
for (; e < ((t =
|
|
812
|
-
return 1 /
|
|
811
|
+
for (; e < ((t = ve(2, --n)) - 1) / 11;);
|
|
812
|
+
return 1 / ve(4, 3 - n) - 7.5625 * ve((t * 3 - 2) / 22 - e, 2);
|
|
813
813
|
},
|
|
814
814
|
Back: (e = 1.7) => (t) => (+e + 1) * t * t * t - +e * t * t,
|
|
815
815
|
Elastic: (e = 1, t = .3) => {
|
|
816
|
-
let n =
|
|
817
|
-
return (e) => e === 0 || e === 1 ? e : -n *
|
|
816
|
+
let n = U(+e, 1, 10), r = U(+t, _, 2), i = r / kt * Ce(1 / n), a = kt / r;
|
|
817
|
+
return (e) => e === 0 || e === 1 ? e : -n * ve(2, -10 * (1 - e)) * H((1 - e - i) * a);
|
|
818
818
|
}
|
|
819
819
|
}, jt = /*#__PURE__ */ (() => {
|
|
820
820
|
let e = {
|
|
@@ -845,33 +845,33 @@ var St = {
|
|
|
845
845
|
"linear(",
|
|
846
846
|
"cubicBezier("
|
|
847
847
|
], Ft = (e) => {
|
|
848
|
-
if (
|
|
849
|
-
for (let t = 0, n = Pt.length; t < n; t++) if (
|
|
848
|
+
if (R(e)) {
|
|
849
|
+
for (let t = 0, n = Pt.length; t < n; t++) if (I(e, Pt[t])) return console.warn(`String syntax for \`ease: "${e}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${e}\``), Tt;
|
|
850
850
|
}
|
|
851
|
-
return
|
|
851
|
+
return z(e) ? e : R(e) ? Nt(e) : Tt;
|
|
852
852
|
}, Q = Ke(), $ = Ke(), It = {}, Lt = { func: null }, Rt = { func: null }, zt = [null], Bt = [null, null], Vt = { to: null }, Ht = 0, Ut = 0, Wt, Gt, Kt = (e, t) => {
|
|
853
853
|
let n = {};
|
|
854
|
-
if (
|
|
855
|
-
let t = [].concat(...e.map((e) => Object.keys(e))).filter(
|
|
854
|
+
if (se(e)) {
|
|
855
|
+
let t = [].concat(...e.map((e) => Object.keys(e))).filter(me);
|
|
856
856
|
for (let r = 0, i = t.length; r < i; r++) {
|
|
857
857
|
let i = t[r];
|
|
858
858
|
n[i] = e.map((e) => {
|
|
859
859
|
let t = {};
|
|
860
860
|
for (let n in e) {
|
|
861
861
|
let r = e[n];
|
|
862
|
-
|
|
862
|
+
me(n) ? n === i && (t.to = r) : t[n] = r;
|
|
863
863
|
}
|
|
864
864
|
return t;
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
867
|
} else {
|
|
868
|
-
let r =
|
|
868
|
+
let r = q(t.duration, F.defaults.duration);
|
|
869
869
|
Object.keys(e).map((t) => ({
|
|
870
870
|
o: parseFloat(t) / 100,
|
|
871
871
|
p: e[t]
|
|
872
872
|
})).sort((e, t) => e.o - t.o).forEach((e) => {
|
|
873
873
|
let t = e.o, i = e.p;
|
|
874
|
-
for (let e in i) if (
|
|
874
|
+
for (let e in i) if (me(e)) {
|
|
875
875
|
let a = n[e];
|
|
876
876
|
a ||= n[e] = [];
|
|
877
877
|
let o = t * r, s = a.length, c = a[s - 1], l = { to: i[e] }, u = 0;
|
|
@@ -893,15 +893,15 @@ var St = {
|
|
|
893
893
|
}, qt = class extends vt {
|
|
894
894
|
constructor(e, t, n, r, i = !1, a = 0, o) {
|
|
895
895
|
super(t, n, r), this._head, this._tail, ++Ut;
|
|
896
|
-
let s = xt(e), u = s.length, f = t.keyframes, p = f ?
|
|
896
|
+
let s = xt(e), u = s.length, f = t.keyframes, p = f ? ke(Kt(f, t), t) : t, { id: m, delay: h, duration: g, ease: v, playbackEase: y, modifier: x, composition: S, onRender: C } = p, w = n ? n.defaults : F.defaults, T = q(v, w.ease), E = q(y, w.playbackEase), D = E ? Ft(E) : null, O = !B(T.ease), ee = O ? T.ease : q(v, D ? "linear" : w.ease), k = O ? T.settlingDuration : q(g, w.duration), te = q(h, w.delay), ne = x || w.modifier, re = B(S) && u >= 1e3 ? d.none : B(S) ? w.composition : S, A = this._offset + (n ? n._offset : 0);
|
|
897
897
|
O && (T.parent = this);
|
|
898
|
-
let
|
|
898
|
+
let j = NaN, M = NaN, N = 0, P = 0;
|
|
899
899
|
for (let e = 0; e < u; e++) {
|
|
900
900
|
let t = s[e], r = a || e, u = o || s, f = NaN, m = NaN;
|
|
901
|
-
for (let e in p) if (
|
|
902
|
-
let a = He(t, e), o =
|
|
901
|
+
for (let e in p) if (me(e)) {
|
|
902
|
+
let a = He(t, e), o = Fe(t, e), s = Qe(e, t, a), h = p[e], g = se(h);
|
|
903
903
|
if (i && !g && (Bt[0] = h, Bt[1] = h, h = Bt), g) {
|
|
904
|
-
let e = h.length, t = !
|
|
904
|
+
let e = h.length, t = !ce(h[0]);
|
|
905
905
|
e === 2 && t ? (Vt.to = h, zt[0] = Vt, Wt = zt) : e > 2 && t ? (Wt = [], h.forEach((e, t) => {
|
|
906
906
|
t ? t === 1 ? (Bt[1] = e, Wt.push(Bt)) : Wt.push(e) : Bt[0] = e;
|
|
907
907
|
})) : Wt = h;
|
|
@@ -909,27 +909,27 @@ var St = {
|
|
|
909
909
|
let _ = null, v = null, y = NaN, x = 0, S = 0;
|
|
910
910
|
for (let e = Wt.length; S < e; S++) {
|
|
911
911
|
let i = Wt[S];
|
|
912
|
-
|
|
913
|
-
let c =
|
|
912
|
+
ce(i) ? Gt = i : (Vt.to = i, Gt = Vt), Lt.func = null, Rt.func = null;
|
|
913
|
+
let c = J(q(Gt.composition, re), t, r, u, null, null), f = L(c) ? c : d[c];
|
|
914
914
|
!_ && f !== d.none && (_ = lt(t, s));
|
|
915
|
-
let p = _ ? _._tail : null, m = n && p && p.parent.parent === n ? p : v, h =
|
|
916
|
-
|
|
917
|
-
let C =
|
|
918
|
-
!
|
|
919
|
-
let
|
|
915
|
+
let p = _ ? _._tail : null, m = n && p && p.parent.parent === n ? p : v, h = J(Gt.to, t, r, u, Lt, m), g;
|
|
916
|
+
ce(h) && !B(h.to) ? (Gt = h, g = h.to) : g = h;
|
|
917
|
+
let C = J(Gt.from, t, r, u, Rt, m), w = Gt.ease || ee, T = J(w, t, r, u, null, m), E = z(T) || R(T) ? T : w, D = !B(E) && !B(E.ease), O = D ? E.ease : E, j = D ? E.settlingDuration : J(q(Gt.duration, e > 1 ? J(k, t, r, u, null, m) / e : k), t, r, u, null, m), M = J(q(Gt.delay, S ? 0 : te), t, r, u, null, m), F = Gt.modifier || ne, ie = !B(C), ae = !B(g), I = se(g), oe = I || ie && ae, ue = v ? x : 0, de = v ? x + M : M, fe = W(A + de, 12), pe = W(A + ue, 12);
|
|
918
|
+
!P && (ie || I) && (P = 1);
|
|
919
|
+
let V = v;
|
|
920
920
|
if (f !== d.none) {
|
|
921
921
|
let e = _._head;
|
|
922
|
-
for (; e && e._absoluteStartTime <=
|
|
922
|
+
for (; e && e._absoluteStartTime <= fe;) if (e._isOverridden || (V = e), e = e._nextRep, e && e._absoluteStartTime >= fe) for (; e;) dt(e), e = e._nextRep;
|
|
923
923
|
}
|
|
924
|
-
if (
|
|
925
|
-
Y(
|
|
924
|
+
if (oe) {
|
|
925
|
+
Y(I ? J(g[0], t, r, u, Rt, m) : C, Q), Y(I ? J(g[1], t, r, u, Lt, m) : g, $);
|
|
926
926
|
let e = We(t, s, a, It);
|
|
927
|
-
Q.t === l.NUMBER && (
|
|
928
|
-
} else
|
|
929
|
-
if (Q.o && (Q.n = Ge(
|
|
927
|
+
Q.t === l.NUMBER && (V ? V._valueType === l.UNIT && (Q.t = l.UNIT, Q.u = V._unit) : (Y(e, X), X.t === l.UNIT && (Q.t = l.UNIT, Q.u = X.u)));
|
|
928
|
+
} else ae ? Y(g, $) : v ? qe(v, $) : Y(n && V && V.parent.parent === n ? V._value : We(t, s, a, It), $), ie ? Y(C, Q) : v ? qe(v, Q) : Y(n && V && V.parent.parent === n ? V._value : We(t, s, a, It), Q);
|
|
929
|
+
if (Q.o && (Q.n = Ge(V ? V._toNumber : Y(We(t, s, a, It), X).n, Q.n, Q.o)), $.o && ($.n = Ge(Q.n, $.n, $.o)), Q.t !== $.t) {
|
|
930
930
|
if (Q.t === l.COMPLEX || $.t === l.COMPLEX) {
|
|
931
931
|
let e = Q.t === l.COMPLEX ? Q : $, t = Q.t === l.COMPLEX ? $ : Q;
|
|
932
|
-
t.t = l.COMPLEX, t.s =
|
|
932
|
+
t.t = l.COMPLEX, t.s = G(e.s), t.d = e.d.map(() => t.n);
|
|
933
933
|
} else if (Q.t === l.UNIT || $.t === l.UNIT) {
|
|
934
934
|
let e = Q.t === l.UNIT ? Q : $, t = Q.t === l.UNIT ? $ : Q;
|
|
935
935
|
t.t = l.UNIT, t.u = e.u;
|
|
@@ -944,13 +944,13 @@ var St = {
|
|
|
944
944
|
}
|
|
945
945
|
if ($.d && Q.d && $.d.length !== Q.d.length) {
|
|
946
946
|
let e = Q.d.length > $.d.length ? Q : $, t = e === Q ? $ : Q;
|
|
947
|
-
t.d = e.d.map((e, n) =>
|
|
947
|
+
t.d = e.d.map((e, n) => B(t.d[n]) ? 0 : t.d[n]), t.s = G(e.s);
|
|
948
948
|
}
|
|
949
|
-
let
|
|
950
|
-
|
|
951
|
-
let
|
|
952
|
-
x =
|
|
953
|
-
let
|
|
949
|
+
let me = W(+j || 1e-11, 12), he = It[s];
|
|
950
|
+
le(he) || (It[s] = null);
|
|
951
|
+
let ge = o ? o.set : null;
|
|
952
|
+
x = W(de + me, 12);
|
|
953
|
+
let _e = Q.d, ve = $.d, ye = $.s, H = {
|
|
954
954
|
parent: this,
|
|
955
955
|
id: Ht++,
|
|
956
956
|
property: s,
|
|
@@ -959,32 +959,32 @@ var St = {
|
|
|
959
959
|
_toFunc: Lt.func,
|
|
960
960
|
_fromFunc: Rt.func,
|
|
961
961
|
_ease: Ft(O),
|
|
962
|
-
_fromNumbers:
|
|
963
|
-
_toNumbers:
|
|
964
|
-
_strings:
|
|
962
|
+
_fromNumbers: _e ? G(_e) : b,
|
|
963
|
+
_toNumbers: ve ? G(ve) : b,
|
|
964
|
+
_strings: ye ? G(ye) : b,
|
|
965
965
|
_fromNumber: Q.n,
|
|
966
966
|
_toNumber: $.n,
|
|
967
|
-
_numbers:
|
|
967
|
+
_numbers: _e ? G(_e) : b,
|
|
968
968
|
_number: Q.n,
|
|
969
969
|
_unit: $.u,
|
|
970
|
-
_modifier:
|
|
970
|
+
_modifier: F,
|
|
971
971
|
_currentTime: 0,
|
|
972
|
-
_startTime:
|
|
973
|
-
_delay: +
|
|
974
|
-
_updateDuration:
|
|
975
|
-
_changeDuration:
|
|
976
|
-
_absoluteStartTime:
|
|
977
|
-
_absoluteUpdateStartTime:
|
|
978
|
-
_absoluteEndTime:
|
|
979
|
-
_hasFromValue:
|
|
972
|
+
_startTime: de,
|
|
973
|
+
_delay: +M,
|
|
974
|
+
_updateDuration: me,
|
|
975
|
+
_changeDuration: me,
|
|
976
|
+
_absoluteStartTime: fe,
|
|
977
|
+
_absoluteUpdateStartTime: pe,
|
|
978
|
+
_absoluteEndTime: W(A + x, 12),
|
|
979
|
+
_hasFromValue: ie || I ? 1 : 0,
|
|
980
980
|
_tweenType: a,
|
|
981
|
-
_setter:
|
|
981
|
+
_setter: ge,
|
|
982
982
|
_valueType: $.t,
|
|
983
983
|
_composition: f,
|
|
984
984
|
_isOverlapped: 0,
|
|
985
985
|
_isOverridden: 0,
|
|
986
986
|
_renderTransforms: 0,
|
|
987
|
-
_inlineValue:
|
|
987
|
+
_inlineValue: he,
|
|
988
988
|
_prevRep: null,
|
|
989
989
|
_nextRep: null,
|
|
990
990
|
_prevAdd: null,
|
|
@@ -992,43 +992,43 @@ var St = {
|
|
|
992
992
|
_prev: null,
|
|
993
993
|
_next: null
|
|
994
994
|
};
|
|
995
|
-
f !== d.none && ft(
|
|
996
|
-
let
|
|
997
|
-
if (
|
|
998
|
-
else if (
|
|
999
|
-
else if (
|
|
995
|
+
f !== d.none && ft(H, _);
|
|
996
|
+
let be = H._valueType;
|
|
997
|
+
if (be === l.COMPLEX) H._value = Je(H, 1, -1);
|
|
998
|
+
else if (be === l.UNIT) H._value = `${F(H._toNumber)}${H._unit}`;
|
|
999
|
+
else if (be === l.COLOR) {
|
|
1000
1000
|
let e = $.d;
|
|
1001
|
-
|
|
1002
|
-
} else
|
|
1003
|
-
isNaN(y) && (y =
|
|
1001
|
+
H._value = `rgba(${W(e[0], 0)},${W(e[1], 0)},${W(e[2], 0)},${e[3]})`;
|
|
1002
|
+
} else H._value = F(H._toNumber);
|
|
1003
|
+
isNaN(y) && (y = H._startTime), v = H, N++, je(this, H);
|
|
1004
1004
|
}
|
|
1005
|
-
(isNaN(
|
|
1005
|
+
(isNaN(M) || y < M) && (M = y), (isNaN(j) || x > j) && (j = x), a === c.TRANSFORM && (f = N - S, m = N);
|
|
1006
1006
|
}
|
|
1007
1007
|
if (!isNaN(f)) {
|
|
1008
1008
|
let e = 0;
|
|
1009
|
-
|
|
1010
|
-
e >= f && e < m && (t._renderTransforms = 1, t._composition === d.blend &&
|
|
1009
|
+
K(this, (t) => {
|
|
1010
|
+
e >= f && e < m && (t._renderTransforms = 1, t._composition === d.blend && K(tt.animation, (e) => {
|
|
1011
1011
|
e.id === t.id && (e._renderTransforms = 1);
|
|
1012
1012
|
})), e++;
|
|
1013
1013
|
});
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
|
-
u || console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),
|
|
1017
|
-
e._startTime - e._delay || (e._delay -=
|
|
1018
|
-
}),
|
|
1016
|
+
u || console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."), M ? (K(this, (e) => {
|
|
1017
|
+
e._startTime - e._delay || (e._delay -= M), e._startTime -= M;
|
|
1018
|
+
}), j -= M) : M = 0, j || (j = _, this.iterationCount = 0), this.targets = s, this.id = B(m) ? Ut : m, this.duration = j === 1e-11 ? _ : De((j + this._loopDelay) * this.iterationCount - this._loopDelay) || 1e-11, this.onRender = C || w.onRender, this._ease = D, this._delay = M, this.iterationDuration = j, !this._autoplay && P && this.onRender(this);
|
|
1019
1019
|
}
|
|
1020
1020
|
stretch(e) {
|
|
1021
1021
|
let t = this.duration;
|
|
1022
|
-
if (t ===
|
|
1022
|
+
if (t === Oe(e)) return this;
|
|
1023
1023
|
let n = e / t;
|
|
1024
|
-
return
|
|
1025
|
-
e._updateDuration =
|
|
1024
|
+
return K(this, (e) => {
|
|
1025
|
+
e._updateDuration = Oe(e._updateDuration * n), e._changeDuration = Oe(e._changeDuration * n), e._currentTime *= n, e._delay *= n, e._startTime *= n, e._absoluteStartTime *= n, e._absoluteUpdateStartTime *= n, e._absoluteEndTime *= n;
|
|
1026
1026
|
}), super.stretch(e);
|
|
1027
1027
|
}
|
|
1028
1028
|
refresh() {
|
|
1029
|
-
return
|
|
1029
|
+
return K(this, (e) => {
|
|
1030
1030
|
let t = e._toFunc, n = e._fromFunc;
|
|
1031
|
-
(t || n) && (n ? (Y(n(), Q), Q.u !== e._unit && e.target[p] && wt(e.target, Q, e._unit, !0), e._fromNumbers =
|
|
1031
|
+
(t || n) && (n ? (Y(n(), Q), Q.u !== e._unit && e.target[p] && wt(e.target, Q, e._unit, !0), e._fromNumbers = G(Q.d), e._fromNumber = Q.n) : t && (Y(We(e.target, e.property, e._tweenType), X), e._fromNumbers = G(X.d), e._fromNumber = X.n), t && (Y(t(), $), e._toNumbers = G($.d), e._strings = G($.s), e._toNumber = $.o ? Ge(e._fromNumber, $.n, $.o) : $.n));
|
|
1032
1032
|
}), this.duration === 1e-11 && this.restart(), this;
|
|
1033
1033
|
}
|
|
1034
1034
|
revert() {
|
|
@@ -1037,63 +1037,94 @@ var St = {
|
|
|
1037
1037
|
then(e) {
|
|
1038
1038
|
return super.then(e);
|
|
1039
1039
|
}
|
|
1040
|
-
}, Jt = (e, t) =>
|
|
1041
|
-
if (
|
|
1040
|
+
}, Jt = (e, t) => F.editor ? F.editor.addAnimation(e, t) : new qt(e, t, null, 0, !1).init(), Yt = (e, t) => {
|
|
1041
|
+
if (I(t, "<")) {
|
|
1042
1042
|
let n = t[1] === "<", r = e._tail, i = r ? r._offset + r._delay : 0;
|
|
1043
1043
|
return n ? i : i + r.duration;
|
|
1044
1044
|
}
|
|
1045
1045
|
}, Xt = (e, t) => {
|
|
1046
1046
|
let n = e.iterationDuration;
|
|
1047
|
-
if (n === 1e-11 && (n = 0),
|
|
1048
|
-
if (
|
|
1049
|
-
let r = t, i = e ? e.labels : null, a = !
|
|
1047
|
+
if (n === 1e-11 && (n = 0), B(t)) return n;
|
|
1048
|
+
if (L(+t)) return +t;
|
|
1049
|
+
let r = t, i = e ? e.labels : null, a = !le(i), o = Yt(e, r), s = !B(o), c = j.exec(r);
|
|
1050
1050
|
if (c) {
|
|
1051
1051
|
let e = c[0], t = r.split(e), l = a && t[0] ? i[t[0]] : n;
|
|
1052
1052
|
return Ge(s ? o : a ? l : n, +t[1], e[0]);
|
|
1053
1053
|
}
|
|
1054
|
-
return s ? o : a ?
|
|
1054
|
+
return s ? o : a ? B(i[r]) ? n : i[r] : n;
|
|
1055
|
+
}, Zt = {
|
|
1056
|
+
_head: null,
|
|
1057
|
+
_tail: null
|
|
1058
|
+
}, Qt = (e, t, n) => {
|
|
1059
|
+
let r = Zt._head, i;
|
|
1060
|
+
for (; r;) {
|
|
1061
|
+
let a = r._next, o = r.$el === e, s = !t || r.property === t, c = !n || r.parent === n;
|
|
1062
|
+
if (o && s && c) {
|
|
1063
|
+
i = r.animation;
|
|
1064
|
+
try {
|
|
1065
|
+
i.commitStyles();
|
|
1066
|
+
} catch {}
|
|
1067
|
+
i.cancel(), Ae(Zt, r);
|
|
1068
|
+
let e = r.parent;
|
|
1069
|
+
e && (e._completed++, e.animations.length === e._completed && (e.completed = !0, e.paused = !0, e.muteCallbacks || (e.onComplete(e), e._resolve(e))));
|
|
1070
|
+
}
|
|
1071
|
+
r = a;
|
|
1072
|
+
}
|
|
1073
|
+
return i;
|
|
1074
|
+
}, $t = (e, t, n, r, i) => {
|
|
1075
|
+
let a = t.animate(r, i), o = i.delay + +i.duration * i.iterations;
|
|
1076
|
+
a.playbackRate = e._speed, e.paused && a.pause(), e.duration < o && (e.duration = o, e.controlAnimation = a), e.animations.push(a), Qt(t, n), je(Zt, {
|
|
1077
|
+
parent: e,
|
|
1078
|
+
animation: a,
|
|
1079
|
+
$el: t,
|
|
1080
|
+
property: n,
|
|
1081
|
+
_next: null,
|
|
1082
|
+
_prev: null
|
|
1083
|
+
});
|
|
1084
|
+
let s = () => Qt(t, n, e);
|
|
1085
|
+
return a.oncancel = s, a.onremove = s, e.persist || (a.onfinish = s), a;
|
|
1055
1086
|
};
|
|
1056
1087
|
//#endregion
|
|
1057
1088
|
//#region node_modules/.pnpm/animejs@4.5.0/node_modules/animejs/dist/modules/utils/target.js
|
|
1058
|
-
function
|
|
1089
|
+
function en(e, t, n) {
|
|
1059
1090
|
let r = xt(e);
|
|
1060
1091
|
if (!r.length) return;
|
|
1061
1092
|
let [i] = r, a = We(i, Qe(t, i, He(i, t)));
|
|
1062
|
-
if (
|
|
1093
|
+
if (B(n)) return a;
|
|
1063
1094
|
if (Y(a, X), X.t === l.NUMBER || X.t === l.UNIT) {
|
|
1064
1095
|
if (n === !1) return X.n;
|
|
1065
1096
|
{
|
|
1066
1097
|
let e = wt(i, X, n, !1);
|
|
1067
|
-
return `${
|
|
1098
|
+
return `${W(e.n, F.precision)}${e.u}`;
|
|
1068
1099
|
}
|
|
1069
1100
|
}
|
|
1070
1101
|
}
|
|
1071
|
-
var
|
|
1072
|
-
if (!
|
|
1073
|
-
},
|
|
1074
|
-
duration: 1 *
|
|
1102
|
+
var tn = (e, t) => {
|
|
1103
|
+
if (!B(t)) return F.editor && F.editor.addSet ? F.editor.addSet(e, t) : (t.duration = _, t.composition = q(t.composition, d.none), new qt(e, t, null, 0, !0).resume());
|
|
1104
|
+
}, nn = (e = w) => new vt({
|
|
1105
|
+
duration: 1 * F.timeScale,
|
|
1075
1106
|
onComplete: e
|
|
1076
|
-
}, null, 0).resume(),
|
|
1107
|
+
}, null, 0).resume(), rn = (e) => {
|
|
1077
1108
|
let t;
|
|
1078
1109
|
return ((...n) => {
|
|
1079
1110
|
let r, i, a, o, s;
|
|
1080
1111
|
t && (r = t.currentIteration, i = t.iterationProgress, a = t.reversed, o = t._alternate, s = t._startTime, t.revert());
|
|
1081
1112
|
let c = e(...n);
|
|
1082
|
-
return c && !
|
|
1113
|
+
return c && !z(c) && c.revert && (t = c), B(i) || (t.currentIteration = r, t.iterationProgress = (o && r % 2 ? !a : a) ? 1 - i : i, t._startTime = s), c || w;
|
|
1083
1114
|
});
|
|
1084
|
-
},
|
|
1115
|
+
}, an = () => {
|
|
1085
1116
|
let e = s.createElement("div");
|
|
1086
1117
|
s.body.appendChild(e), e.style.height = "100lvh";
|
|
1087
1118
|
let t = e.offsetHeight;
|
|
1088
1119
|
return s.body.removeChild(e), t;
|
|
1089
|
-
},
|
|
1120
|
+
}, on = (e, t) => e && z(e) ? e(t) : e, sn = /* @__PURE__ */ new Map(), cn = class {
|
|
1090
1121
|
constructor(e) {
|
|
1091
1122
|
this.element = e, this.useWin = this.element === s.body, this.winWidth = 0, this.winHeight = 0, this.width = 0, this.height = 0, this.left = 0, this.top = 0, this.scale = 1, this.zIndex = 0, this.scrollX = 0, this.scrollY = 0, this.prevScrollX = 0, this.prevScrollY = 0, this.scrollWidth = 0, this.scrollHeight = 0, this.velocity = 0, this.backwardX = !1, this.backwardY = !1, this.scrollTicker = new vt({
|
|
1092
1123
|
autoplay: !1,
|
|
1093
1124
|
onBegin: () => this.dataTimer.resume(),
|
|
1094
1125
|
onUpdate: () => {
|
|
1095
1126
|
let e = this.backwardX || this.backwardY;
|
|
1096
|
-
|
|
1127
|
+
K(this, (e) => e.handleScroll(), e);
|
|
1097
1128
|
},
|
|
1098
1129
|
onComplete: () => this.dataTimer.pause()
|
|
1099
1130
|
}).init(), this.dataTimer = new vt({
|
|
@@ -1101,17 +1132,17 @@ var Qt = (e, t) => {
|
|
|
1101
1132
|
frameRate: 30,
|
|
1102
1133
|
onUpdate: (e) => {
|
|
1103
1134
|
let t = e.deltaTime, n = this.prevScrollX, r = this.prevScrollY, i = this.scrollX, a = this.scrollY, o = n - i, s = r - a;
|
|
1104
|
-
this.prevScrollX = i, this.prevScrollY = a, o && (this.backwardX = n > i), s && (this.backwardY = r > a), this.velocity =
|
|
1135
|
+
this.prevScrollX = i, this.prevScrollY = a, o && (this.backwardX = n > i), s && (this.backwardY = r > a), this.velocity = W(t > 0 ? Math.sqrt(o * o + s * s) / t : 0, 5);
|
|
1105
1136
|
}
|
|
1106
1137
|
}).init(), this.resizeTicker = new vt({
|
|
1107
1138
|
autoplay: !1,
|
|
1108
|
-
duration: 250 *
|
|
1139
|
+
duration: 250 * F.timeScale,
|
|
1109
1140
|
onComplete: () => {
|
|
1110
1141
|
this.updateWindowBounds(), this.refreshScrollObservers(), this.handleScroll();
|
|
1111
1142
|
}
|
|
1112
1143
|
}).init(), this.wakeTicker = new vt({
|
|
1113
1144
|
autoplay: !1,
|
|
1114
|
-
duration: 500 *
|
|
1145
|
+
duration: 500 * F.timeScale,
|
|
1115
1146
|
onBegin: () => {
|
|
1116
1147
|
this.scrollTicker.resume();
|
|
1117
1148
|
},
|
|
@@ -1122,10 +1153,10 @@ var Qt = (e, t) => {
|
|
|
1122
1153
|
}
|
|
1123
1154
|
updateScrollCoords() {
|
|
1124
1155
|
let e = this.useWin, t = this.element;
|
|
1125
|
-
this.scrollX =
|
|
1156
|
+
this.scrollX = W(e ? o.scrollX : t.scrollLeft, 0), this.scrollY = W(e ? o.scrollY : t.scrollTop, 0);
|
|
1126
1157
|
}
|
|
1127
1158
|
updateWindowBounds() {
|
|
1128
|
-
this.winWidth = o.innerWidth, this.winHeight =
|
|
1159
|
+
this.winWidth = o.innerWidth, this.winHeight = an();
|
|
1129
1160
|
}
|
|
1130
1161
|
updateBounds() {
|
|
1131
1162
|
let e = getComputedStyle(this.element), t = this.element;
|
|
@@ -1139,9 +1170,9 @@ var Qt = (e, t) => {
|
|
|
1139
1170
|
this.width = n, this.height = r;
|
|
1140
1171
|
}
|
|
1141
1172
|
refreshScrollObservers() {
|
|
1142
|
-
|
|
1173
|
+
K(this, (e) => {
|
|
1143
1174
|
e.ready && e._debug && e.removeDebug();
|
|
1144
|
-
}), this.updateBounds(),
|
|
1175
|
+
}), this.updateBounds(), K(this, (e) => {
|
|
1145
1176
|
e.ready && (e.refresh(), e.onResize(e), e._debug && e.debug());
|
|
1146
1177
|
});
|
|
1147
1178
|
}
|
|
@@ -1155,31 +1186,31 @@ var Qt = (e, t) => {
|
|
|
1155
1186
|
e.type === "scroll" && this.handleScroll();
|
|
1156
1187
|
}
|
|
1157
1188
|
revert() {
|
|
1158
|
-
this.scrollTicker.cancel(), this.dataTimer.cancel(), this.resizeTicker.cancel(), this.wakeTicker.cancel(), this.resizeObserver.disconnect(), (this.useWin ? o : this.element).removeEventListener("scroll", this),
|
|
1189
|
+
this.scrollTicker.cancel(), this.dataTimer.cancel(), this.resizeTicker.cancel(), this.wakeTicker.cancel(), this.resizeObserver.disconnect(), (this.useWin ? o : this.element).removeEventListener("scroll", this), sn.delete(this.element);
|
|
1159
1190
|
}
|
|
1160
|
-
},
|
|
1161
|
-
let t = e && bt(e)[0] || s.body, n =
|
|
1162
|
-
return n || (n = new
|
|
1163
|
-
},
|
|
1191
|
+
}, ln = (e) => {
|
|
1192
|
+
let t = e && bt(e)[0] || s.body, n = sn.get(t);
|
|
1193
|
+
return n || (n = new cn(t), sn.set(t, n)), n;
|
|
1194
|
+
}, un = (e, t, n, r, i) => {
|
|
1164
1195
|
let a = t === "min", o = t === "max", { n: s, u: c } = Y(t === "top" || t === "left" || t === "start" || a ? 0 : t === "bottom" || t === "right" || t === "end" || o ? "100%" : t === "center" ? "50%" : t, X), l = s;
|
|
1165
1196
|
return c === "%" ? l = s / 100 * n : c && (l = wt(e, X, "px", !0).n), o && r < 0 && (l += r), a && i > 0 && (l += i), l;
|
|
1166
|
-
},
|
|
1197
|
+
}, dn = (e, t, n, r, i) => {
|
|
1167
1198
|
let a;
|
|
1168
|
-
if (
|
|
1169
|
-
let o =
|
|
1199
|
+
if (R(t)) {
|
|
1200
|
+
let o = j.exec(t);
|
|
1170
1201
|
if (o) {
|
|
1171
|
-
let s = o[0], c = s[0], l = t.split(s), u = l[0] === "min", d = l[0] === "max", f =
|
|
1202
|
+
let s = o[0], c = s[0], l = t.split(s), u = l[0] === "min", d = l[0] === "max", f = un(e, l[0], n, r, i), p = un(e, l[1], n, r, i);
|
|
1172
1203
|
if (u) {
|
|
1173
|
-
let t = Ge(
|
|
1204
|
+
let t = Ge(un(e, "min", n), p, c);
|
|
1174
1205
|
a = t < f ? f : t;
|
|
1175
1206
|
} else if (d) {
|
|
1176
|
-
let t = Ge(
|
|
1207
|
+
let t = Ge(un(e, "max", n), p, c);
|
|
1177
1208
|
a = t > f ? f : t;
|
|
1178
1209
|
} else a = Ge(f, p, c);
|
|
1179
|
-
} else a =
|
|
1210
|
+
} else a = un(e, t, n, r, i);
|
|
1180
1211
|
} else a = t;
|
|
1181
|
-
return
|
|
1182
|
-
},
|
|
1212
|
+
return W(a, 0);
|
|
1213
|
+
}, fn = (e) => {
|
|
1183
1214
|
let t, n = e.targets;
|
|
1184
1215
|
for (let e = 0, r = n.length; e < r; e++) {
|
|
1185
1216
|
let r = n[e];
|
|
@@ -1189,7 +1220,7 @@ var Qt = (e, t) => {
|
|
|
1189
1220
|
}
|
|
1190
1221
|
}
|
|
1191
1222
|
return t;
|
|
1192
|
-
},
|
|
1223
|
+
}, pn = 0, mn = [
|
|
1193
1224
|
"#FF4B4B",
|
|
1194
1225
|
"#FF971B",
|
|
1195
1226
|
"#FFC730",
|
|
@@ -1204,14 +1235,14 @@ var Qt = (e, t) => {
|
|
|
1204
1235
|
"#C563FE",
|
|
1205
1236
|
"#FF4FCF",
|
|
1206
1237
|
"#F93F8A"
|
|
1207
|
-
],
|
|
1238
|
+
], hn = class {
|
|
1208
1239
|
constructor(e = {}) {
|
|
1209
|
-
|
|
1210
|
-
let t =
|
|
1240
|
+
P.current && P.current.register(this);
|
|
1241
|
+
let t = q(e.sync, "play pause"), n = t ? Ft(t) : null, r = t && (t === "linear" || t === Tt), i = t && !(n === Tt && !r), a = t && (L(t) || t === !0 || r), o = t && R(t) && !i && !a, c = o ? t.split(" ").map((e) => () => {
|
|
1211
1242
|
let t = this.linked;
|
|
1212
1243
|
return t && t[e] ? t[e]() : null;
|
|
1213
1244
|
}) : null, l = o && c.length > 2;
|
|
1214
|
-
this.index =
|
|
1245
|
+
this.index = pn++, this.id = B(e.id) ? this.index : e.id, this.container = ln(e.container), this.target = null, this.linked = null, this.repeat = null, this.horizontal = null, this.enter = null, this.leave = null, this.sync = i || a || !!c, this.syncEase = i ? n : null, this.syncSmooth = a ? t === !0 || r ? 1 : t : null, this.onSyncEnter = c && !l && c[0] ? c[0] : w, this.onSyncLeave = c && !l && c[1] ? c[1] : w, this.onSyncEnterForward = c && l && c[0] ? c[0] : w, this.onSyncLeaveForward = c && l && c[1] ? c[1] : w, this.onSyncEnterBackward = c && l && c[2] ? c[2] : w, this.onSyncLeaveBackward = c && l && c[3] ? c[3] : w, this.onEnter = e.onEnter || w, this.onLeave = e.onLeave || w, this.onEnterForward = e.onEnterForward || w, this.onLeaveForward = e.onLeaveForward || w, this.onEnterBackward = e.onEnterBackward || w, this.onLeaveBackward = e.onLeaveBackward || w, this.onUpdate = e.onUpdate || w, this.onResize = e.onResize || w, this.onSyncComplete = e.onSyncComplete || w, this.reverted = !1, this.ready = !1, this.completed = !1, this.began = !1, this.isInView = !1, this.forceEnter = !1, this.hasEntered = !1, this.offset = 0, this.offsetStart = 0, this.offsetEnd = 0, this.distance = 0, this.prevProgress = 0, this.thresholds = [
|
|
1215
1246
|
"start",
|
|
1216
1247
|
"end",
|
|
1217
1248
|
"end",
|
|
@@ -1221,7 +1252,7 @@ var Qt = (e, t) => {
|
|
|
1221
1252
|
0,
|
|
1222
1253
|
0,
|
|
1223
1254
|
0
|
|
1224
|
-
], this.debugStyles = null, this.$debug = null, this._params = e, this._debug =
|
|
1255
|
+
], this.debugStyles = null, this.$debug = null, this._params = e, this._debug = q(e.debug, !1), this._next = null, this._prev = null, je(this.container, this), nn(() => {
|
|
1225
1256
|
if (!this.reverted) {
|
|
1226
1257
|
if (!this.target) {
|
|
1227
1258
|
let t = bt(e.target)[0];
|
|
@@ -1232,11 +1263,11 @@ var Qt = (e, t) => {
|
|
|
1232
1263
|
});
|
|
1233
1264
|
}
|
|
1234
1265
|
link(e) {
|
|
1235
|
-
if (e && (e.pause(), this.linked = e, !
|
|
1266
|
+
if (e && (e.pause(), this.linked = e, !B(e) && !B(e.persist) && (e.persist = !0), !this._params.target)) {
|
|
1236
1267
|
let t;
|
|
1237
|
-
|
|
1238
|
-
e.targets && !t && (t =
|
|
1239
|
-
}) : t =
|
|
1268
|
+
B(e.targets) ? K(e, (e) => {
|
|
1269
|
+
e.targets && !t && (t = fn(e));
|
|
1270
|
+
}) : t = fn(e), this.target = t || s.body, this.refresh();
|
|
1240
1271
|
}
|
|
1241
1272
|
return this;
|
|
1242
1273
|
}
|
|
@@ -1251,19 +1282,19 @@ var Qt = (e, t) => {
|
|
|
1251
1282
|
}
|
|
1252
1283
|
get progress() {
|
|
1253
1284
|
let e = (this.scroll - this.offsetStart) / this.distance;
|
|
1254
|
-
return e === Infinity || isNaN(e) ? 0 :
|
|
1285
|
+
return e === Infinity || isNaN(e) ? 0 : W(U(e, 0, 1), 6);
|
|
1255
1286
|
}
|
|
1256
1287
|
refresh() {
|
|
1257
1288
|
this.ready = !0, this.reverted = !1;
|
|
1258
1289
|
let e = this._params;
|
|
1259
|
-
return this.repeat =
|
|
1290
|
+
return this.repeat = q(on(e.repeat, this), !0), this.horizontal = q(on(e.axis, this), "y") === "x", this.enter = q(on(e.enter, this), "end start"), this.leave = q(on(e.leave, this), "start end"), this.updateBounds(), this.handleScroll(), this;
|
|
1260
1291
|
}
|
|
1261
1292
|
removeDebug() {
|
|
1262
1293
|
return this.$debug &&= (this.$debug.parentNode.removeChild(this.$debug), null), this.debugStyles && (this.debugStyles.revert(), this.$debug = null), this;
|
|
1263
1294
|
}
|
|
1264
1295
|
debug() {
|
|
1265
1296
|
this.removeDebug();
|
|
1266
|
-
let e = this.container, t = this.horizontal, n = e.element.querySelector(":scope > .animejs-onscroll-debug"), r = s.createElement("div"), i = s.createElement("div"), a = s.createElement("div"), o =
|
|
1297
|
+
let e = this.container, t = this.horizontal, n = e.element.querySelector(":scope > .animejs-onscroll-debug"), r = s.createElement("div"), i = s.createElement("div"), a = s.createElement("div"), o = mn[this.index % mn.length], c = e.useWin, l = c ? e.winWidth : e.width, u = c ? e.winHeight : e.height, d = e.scrollWidth, f = e.scrollHeight, p = this.container.width > 360 ? 320 : 260, m = t ? 0 : 10, h = t ? 10 : 0, g = t ? 24 : p / 2, _ = t ? g : 15, v = t ? 60 : g, y = t ? v : _, b = t ? "repeat-x" : "repeat-y", x = (e) => t ? "0px " + e + "px" : e + "px 2px", S = (e) => `linear-gradient(${t ? 90 : 0}deg, ${e} 2px, transparent 1px)`, C = (e, t, n, r, i) => `position:${e};left:${t}px;top:${n}px;width:${r}px;height:${i}px;`;
|
|
1267
1298
|
r.style.cssText = `${C("absolute", m, h, t ? d : p, t ? p : f)}
|
|
1268
1299
|
pointer-events: none;
|
|
1269
1300
|
z-index: ${this.container.zIndex++};
|
|
@@ -1308,31 +1339,31 @@ var Qt = (e, t) => {
|
|
|
1308
1339
|
`, x.appendChild(S);
|
|
1309
1340
|
let D = c - E + +!!t;
|
|
1310
1341
|
x.style[t ? "left" : "top"] = `${D}px`, (r ? i : a).appendChild(x);
|
|
1311
|
-
}), r.appendChild(i), r.appendChild(a), e.element.appendChild(r), n || r.classList.add("animejs-onscroll-debug"), this.$debug = r,
|
|
1342
|
+
}), r.appendChild(i), r.appendChild(a), e.element.appendChild(r), n || r.classList.add("animejs-onscroll-debug"), this.$debug = r, en(e.element, "position") === "static" && (this.debugStyles = tn(e.element, { position: "relative " }));
|
|
1312
1343
|
}
|
|
1313
1344
|
updateBounds() {
|
|
1314
1345
|
this._debug && this.removeDebug();
|
|
1315
1346
|
let e, t = this.target, n = this.container, r = this.horizontal, i = this.linked, a, o = t;
|
|
1316
1347
|
for (i && (a = i.currentTime, i.seek(0, !0)); o && o !== n.element && o !== s.body;) {
|
|
1317
|
-
let t =
|
|
1348
|
+
let t = en(o, "position") === "sticky" && tn(o, { position: "static" });
|
|
1318
1349
|
o = o.parentElement, t && (e ||= [], e.push(t));
|
|
1319
1350
|
}
|
|
1320
1351
|
let c = t.getBoundingClientRect(), l = n.scale, u = (r ? c.left + n.scrollX - n.left : c.top + n.scrollY - n.top) * l, d = (r ? c.width : c.height) * l, f = r ? n.width : n.height, p = (r ? n.scrollWidth : n.scrollHeight) - f, m = this.enter, h = this.leave, g = "start", _ = "end", v = "end", y = "start";
|
|
1321
|
-
if (
|
|
1352
|
+
if (R(m)) {
|
|
1322
1353
|
let e = m.split(" ");
|
|
1323
1354
|
v = e[0], g = e.length > 1 ? e[1] : g;
|
|
1324
|
-
} else if (
|
|
1355
|
+
} else if (ce(m)) {
|
|
1325
1356
|
let e = m;
|
|
1326
|
-
|
|
1327
|
-
} else
|
|
1328
|
-
if (
|
|
1357
|
+
B(e.container) || (v = e.container), B(e.target) || (g = e.target);
|
|
1358
|
+
} else L(m) && (v = m);
|
|
1359
|
+
if (R(h)) {
|
|
1329
1360
|
let e = h.split(" ");
|
|
1330
1361
|
y = e[0], _ = e.length > 1 ? e[1] : _;
|
|
1331
|
-
} else if (
|
|
1362
|
+
} else if (ce(h)) {
|
|
1332
1363
|
let e = h;
|
|
1333
|
-
|
|
1334
|
-
} else
|
|
1335
|
-
let b =
|
|
1364
|
+
B(e.container) || (y = e.container), B(e.target) || (_ = e.target);
|
|
1365
|
+
} else L(h) && (y = h);
|
|
1366
|
+
let b = dn(t, g, d), x = dn(t, _, d), S = b + u - f, C = x + u - p, w = dn(t, v, f, S, C), T = dn(t, y, f, S, C), E = b + u - w, D = x + u - T, O = D - E;
|
|
1336
1367
|
this.offset = u, this.offsetStart = E, this.offsetEnd = D, this.distance = O <= 0 ? 0 : O, this.thresholds = [
|
|
1337
1368
|
g,
|
|
1338
1369
|
_,
|
|
@@ -1350,10 +1381,10 @@ var Qt = (e, t) => {
|
|
|
1350
1381
|
let e = this.linked, t = this.sync, n = this.syncEase, r = this.syncSmooth, i = e && (n || r), a = this.horizontal, o = this.container, s = this.scroll, c = s <= this.offsetStart, l = s >= this.offsetEnd, u = !c && !l, d = s === this.offsetStart || s === this.offsetEnd, f = !this.hasEntered && d, p = this._debug && this.$debug, m = !1, h = !1, g = this.progress;
|
|
1351
1382
|
if (c && this.began && (this.began = !1), g > 0 && !this.began && (this.began = !0), i) {
|
|
1352
1383
|
let t = e.progress;
|
|
1353
|
-
if (r &&
|
|
1384
|
+
if (r && L(r)) {
|
|
1354
1385
|
if (r < 1) {
|
|
1355
1386
|
let e = t < g && g === 1 ? 1e-4 : t > g && !g ? -1e-4 : 0;
|
|
1356
|
-
g =
|
|
1387
|
+
g = W(Ee(t, g, Ee(.01, .2, r)) + e, 6);
|
|
1357
1388
|
}
|
|
1358
1389
|
} else n && (g = n(g));
|
|
1359
1390
|
m = g !== this.prevProgress, h = t === 1, m && !h && r && t && o.wakeTicker.restart();
|
|
@@ -1367,37 +1398,216 @@ var Qt = (e, t) => {
|
|
|
1367
1398
|
revert() {
|
|
1368
1399
|
if (this.reverted) return;
|
|
1369
1400
|
let e = this.container;
|
|
1370
|
-
return
|
|
1401
|
+
return Ae(e, this), e._head || e.revert(), this._debug && this.removeDebug(), this.reverted = !0, this.ready = !1, this;
|
|
1402
|
+
}
|
|
1403
|
+
}, gn = (e = {}) => new hn(e), _n = (e, t = 100) => {
|
|
1404
|
+
let n = [];
|
|
1405
|
+
for (let r = 0; r <= t; r++) n.push(W(e(r / t), 4));
|
|
1406
|
+
return `linear(${n.join(", ")})`;
|
|
1407
|
+
}, vn = {}, yn = (e) => {
|
|
1408
|
+
let t = vn[e];
|
|
1409
|
+
if (t) return t;
|
|
1410
|
+
if (t = "linear", R(e)) {
|
|
1411
|
+
if (I(e, "linear") || I(e, "cubic-") || I(e, "steps") || I(e, "ease")) t = e;
|
|
1412
|
+
else if (I(e, "cubicB")) t = ae(e);
|
|
1413
|
+
else {
|
|
1414
|
+
let n = Nt(e);
|
|
1415
|
+
z(n) && (t = n === Tt ? "linear" : _n(n));
|
|
1416
|
+
}
|
|
1417
|
+
vn[e] = t;
|
|
1418
|
+
} else if (z(e)) {
|
|
1419
|
+
let n = _n(e);
|
|
1420
|
+
n && (t = n);
|
|
1421
|
+
} else e.ease && (t = _n(e.ease));
|
|
1422
|
+
return t;
|
|
1423
|
+
}, bn = [
|
|
1424
|
+
"x",
|
|
1425
|
+
"y",
|
|
1426
|
+
"z"
|
|
1427
|
+
], xn = [
|
|
1428
|
+
"perspective",
|
|
1429
|
+
"width",
|
|
1430
|
+
"height",
|
|
1431
|
+
"margin",
|
|
1432
|
+
"padding",
|
|
1433
|
+
"top",
|
|
1434
|
+
"right",
|
|
1435
|
+
"bottom",
|
|
1436
|
+
"left",
|
|
1437
|
+
"borderWidth",
|
|
1438
|
+
"fontSize",
|
|
1439
|
+
"borderRadius",
|
|
1440
|
+
...bn
|
|
1441
|
+
], Sn = [...bn, ...S.filter((e) => [
|
|
1442
|
+
"X",
|
|
1443
|
+
"Y",
|
|
1444
|
+
"Z"
|
|
1445
|
+
].some((t) => e.endsWith(t)))], Cn = null, wn = (e, t, n, r, i) => {
|
|
1446
|
+
let a = R(t) ? t : J(t, n, r, i, null, null);
|
|
1447
|
+
return L(a) ? xn.includes(e) || I(e, "translate") ? `${a}px` : I(e, "rotate") || I(e, "skew") ? `${a}deg` : `${a}` : a;
|
|
1448
|
+
}, Tn = (e, t, n, r, i, a) => {
|
|
1449
|
+
let o = "0", s = B(r) ? getComputedStyle(e)[t] : wn(t, r, e, i, a);
|
|
1450
|
+
return o = B(n) ? se(r) ? r.map((n) => wn(t, n, e, i, a)) : s : [wn(t, n, e, i, a), s], o;
|
|
1451
|
+
}, En = class {
|
|
1452
|
+
constructor(e, t) {
|
|
1453
|
+
P.current && P.current.register(this), le(Cn) && (a && (B(CSS) || !Object.hasOwnProperty.call(CSS, "registerProperty")) ? Cn = !1 : (S.forEach((e) => {
|
|
1454
|
+
let t = I(e, "skew"), n = I(e, "scale"), r = I(e, "rotate"), i = I(e, "translate"), a = r || t, o = a ? "<angle>" : n ? "<number>" : i ? "<length-percentage>" : "*";
|
|
1455
|
+
try {
|
|
1456
|
+
CSS.registerProperty({
|
|
1457
|
+
name: "--" + e,
|
|
1458
|
+
syntax: o,
|
|
1459
|
+
inherits: !1,
|
|
1460
|
+
initialValue: i ? "0px" : a ? "0deg" : n ? "1" : "0"
|
|
1461
|
+
});
|
|
1462
|
+
} catch {}
|
|
1463
|
+
}), Cn = !0));
|
|
1464
|
+
let n = xt(e);
|
|
1465
|
+
n.length || console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");
|
|
1466
|
+
let r = q(t.autoplay, F.defaults.autoplay), i = r && r.link ? r : !1, o = t.alternate && t.alternate === !0, s = t.reversed && t.reversed === !0, c = q(t.loop, F.defaults.loop), l = c === !0 || c === Infinity ? Infinity : L(c) ? c + 1 : 1, u = o ? s ? "alternate-reverse" : "alternate" : s ? "reverse" : "normal", d = F.timeScale === 1 ? 1 : y;
|
|
1467
|
+
this.targets = n, this.animations = [], this.controlAnimation = null, this.onComplete = t.onComplete || F.defaults.onComplete, this.duration = 0, this.muteCallbacks = !1, this.completed = !1, this.paused = !r || i !== !1, this.reversed = s, this.persist = q(t.persist, F.defaults.persist), this.autoplay = r, this._speed = q(t.playbackRate, F.defaults.playbackRate), this._resolve = w, this._completed = 0, this._inlineStyles = [], n.forEach((e, r) => {
|
|
1468
|
+
let i = e[h], a = Sn.some((e) => t.hasOwnProperty(e)), o = e.style, s = this._inlineStyles[r] = {}, c = q(t.ease, F.defaults.ease), f = J(c, e, r, n, null, null), p = z(f) || R(f) ? f : c, m = c.ease && c, g = yn(p), _ = (m ? m.settlingDuration : J(q(t.duration, F.defaults.duration), e, r, n, null, null)) * d, v = J(q(t.delay, F.defaults.delay), e, r, n, null, null) * d, y = q(t.composition, "replace");
|
|
1469
|
+
for (let c in t) {
|
|
1470
|
+
if (!me(c)) continue;
|
|
1471
|
+
let f = {}, p = {
|
|
1472
|
+
iterations: l,
|
|
1473
|
+
direction: u,
|
|
1474
|
+
fill: "both",
|
|
1475
|
+
easing: g,
|
|
1476
|
+
duration: _,
|
|
1477
|
+
delay: v,
|
|
1478
|
+
composite: y
|
|
1479
|
+
}, m = t[c], h = a ? S.includes(c) ? c : x.get(c) : !1, b = h ? "transform" : c;
|
|
1480
|
+
s[b] || (s[b] = o[b]);
|
|
1481
|
+
let C;
|
|
1482
|
+
if (ce(m)) {
|
|
1483
|
+
let t = m, a = q(t.ease, g), s = a.ease && a, l = t.to, u = t.from;
|
|
1484
|
+
if (p.duration = (s ? s.settlingDuration : J(q(t.duration, _), e, r, n, null, null)) * d, p.delay = J(q(t.delay, v), e, r, n, null, null) * d, p.composite = q(t.composition, y), p.easing = yn(a), C = Tn(e, c, u, l, r, n), h ? (f[`--${h}`] = C, i[h] = C) : f[c] = Tn(e, c, u, l, r, n), $t(this, e, c, f, p), !B(u)) {
|
|
1485
|
+
if (!h) o[c] = f[c][0];
|
|
1486
|
+
else {
|
|
1487
|
+
let e = `--${h}`;
|
|
1488
|
+
o.setProperty(e, f[e][0]);
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
} else C = se(m) ? m.map((t) => wn(c, t, e, r, n)) : wn(c, m, e, r, n), h ? (f[`--${h}`] = C, i[h] = C) : f[c] = C, $t(this, e, c, f, p);
|
|
1492
|
+
}
|
|
1493
|
+
if (a) {
|
|
1494
|
+
let e = "";
|
|
1495
|
+
for (let t in i) e += `${C[t]}var(--${t})) `;
|
|
1496
|
+
o.transform = e;
|
|
1497
|
+
}
|
|
1498
|
+
}), i && this.autoplay.link(this);
|
|
1499
|
+
}
|
|
1500
|
+
forEach(e) {
|
|
1501
|
+
try {
|
|
1502
|
+
let t = R(e) ? (t) => t[e]() : e;
|
|
1503
|
+
this.animations.forEach(t);
|
|
1504
|
+
} catch {}
|
|
1505
|
+
return this;
|
|
1506
|
+
}
|
|
1507
|
+
get speed() {
|
|
1508
|
+
return this._speed;
|
|
1509
|
+
}
|
|
1510
|
+
set speed(e) {
|
|
1511
|
+
this._speed = +e, this.forEach((t) => t.playbackRate = e);
|
|
1512
|
+
}
|
|
1513
|
+
get currentTime() {
|
|
1514
|
+
let e = this.controlAnimation, t = F.timeScale;
|
|
1515
|
+
return this.completed ? this.duration : e ? +e.currentTime * (t === 1 ? 1 : t) : 0;
|
|
1516
|
+
}
|
|
1517
|
+
set currentTime(e) {
|
|
1518
|
+
let t = e * (F.timeScale === 1 ? 1 : y);
|
|
1519
|
+
this.forEach((e) => {
|
|
1520
|
+
!this.persist && t >= this.duration && e.play(), e.currentTime = t;
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
get progress() {
|
|
1524
|
+
return this.currentTime / this.duration;
|
|
1525
|
+
}
|
|
1526
|
+
set progress(e) {
|
|
1527
|
+
this.forEach((t) => t.currentTime = e * this.duration || 0);
|
|
1528
|
+
}
|
|
1529
|
+
resume() {
|
|
1530
|
+
return this.paused ? (this.paused = !1, this.forEach("play")) : this;
|
|
1531
|
+
}
|
|
1532
|
+
pause() {
|
|
1533
|
+
return this.paused ? this : (this.paused = !0, this.forEach("pause"));
|
|
1534
|
+
}
|
|
1535
|
+
alternate() {
|
|
1536
|
+
return this.reversed = !this.reversed, this.forEach("reverse"), this.paused && this.forEach("pause"), this;
|
|
1537
|
+
}
|
|
1538
|
+
play() {
|
|
1539
|
+
return this.reversed && this.alternate(), this.resume();
|
|
1540
|
+
}
|
|
1541
|
+
reverse() {
|
|
1542
|
+
return this.reversed || this.alternate(), this.resume();
|
|
1543
|
+
}
|
|
1544
|
+
seek(e, t = !1) {
|
|
1545
|
+
return t && (this.muteCallbacks = !0), e < this.duration && (this.completed = !1), this.currentTime = e, this.muteCallbacks = !1, this.paused && this.pause(), this;
|
|
1546
|
+
}
|
|
1547
|
+
restart() {
|
|
1548
|
+
return this.completed = !1, this.seek(0, !0).resume();
|
|
1549
|
+
}
|
|
1550
|
+
commitStyles() {
|
|
1551
|
+
return this.forEach("commitStyles");
|
|
1552
|
+
}
|
|
1553
|
+
complete() {
|
|
1554
|
+
return this.seek(this.duration);
|
|
1371
1555
|
}
|
|
1372
|
-
|
|
1556
|
+
cancel() {
|
|
1557
|
+
return this.muteCallbacks = !0, this.commitStyles().forEach("cancel"), this.animations.length = 0, requestAnimationFrame(() => {
|
|
1558
|
+
this.targets.forEach((e) => {
|
|
1559
|
+
e.style.transform === "none" && e.style.removeProperty("transform");
|
|
1560
|
+
});
|
|
1561
|
+
}), this;
|
|
1562
|
+
}
|
|
1563
|
+
revert() {
|
|
1564
|
+
return this.cancel().targets.forEach((e, t) => {
|
|
1565
|
+
let n = e.style, r = this._inlineStyles[t];
|
|
1566
|
+
for (let t in r) {
|
|
1567
|
+
let i = r[t];
|
|
1568
|
+
B(i) || i === "" ? n.removeProperty(ae(t)) : e.style[t] = i;
|
|
1569
|
+
}
|
|
1570
|
+
e.getAttribute("style") === "" && e.removeAttribute("style");
|
|
1571
|
+
}), this;
|
|
1572
|
+
}
|
|
1573
|
+
then(e = w) {
|
|
1574
|
+
let t = this.then, n = () => {
|
|
1575
|
+
this.then = null, e(this), this.then = t, this._resolve = w;
|
|
1576
|
+
};
|
|
1577
|
+
return new Promise((e) => (this._resolve = () => e(n()), this.completed && this._resolve(), this));
|
|
1578
|
+
}
|
|
1579
|
+
}, Dn = {
|
|
1580
|
+
animate: (e, t) => new En(e, t),
|
|
1581
|
+
convertEase: _n
|
|
1582
|
+
}, On = (e = 0, t = 1, n = 0) => {
|
|
1373
1583
|
let r = 10 ** n;
|
|
1374
1584
|
return Math.floor((Math.random() * (t - e + 1 / r) + e) * r) / r;
|
|
1375
|
-
},
|
|
1376
|
-
let i = e === void 0 ?
|
|
1585
|
+
}, kn = 0, An = (e, t = 0, n = 1, r = 0) => {
|
|
1586
|
+
let i = e === void 0 ? kn++ : e;
|
|
1377
1587
|
return (e = t, a = n, o = r) => {
|
|
1378
1588
|
i += 1831565813, i = Math.imul(i ^ i >>> 15, i | 1), i ^= i + Math.imul(i ^ i >>> 7, i | 61);
|
|
1379
1589
|
let s = 10 ** o;
|
|
1380
1590
|
return Math.floor((((i ^ i >>> 14) >>> 0) / 4294967296 * (a - e + 1 / s) + e) * s) / s;
|
|
1381
1591
|
};
|
|
1382
|
-
},
|
|
1592
|
+
}, jn = (e, t = On) => {
|
|
1383
1593
|
let n = e.length, r, i;
|
|
1384
1594
|
for (; n;) i = t(0, --n), r = e[n], e[n] = e[i], e[i] = r;
|
|
1385
1595
|
return e;
|
|
1386
|
-
},
|
|
1387
|
-
let n = [], r = 0, i, a = null, o = t.from, s = t.reversed, c = t.ease, l = !
|
|
1596
|
+
}, Mn = (e, t = {}) => {
|
|
1597
|
+
let n = [], r = 0, i, a = null, o = t.from, s = t.reversed, c = t.ease, l = !B(c), u = l && !B(c.ease) ? c.ease : l ? Ft(c) : null, d = t.grid, f = d === !0, p = t.axis, m = t.total, h = B(o) || o === 0 || o === "first", g = o === "center", _ = o === "last", v = o === "random", y = se(o), b = se(e), x = t.use, S = _e(b ? e[0] : e), C = b ? _e(e[1]) : 0, w = re.exec((b ? e[1] : e) + ""), T = t.start || 0 + (b ? S : 0), E = t.seed, D = !B(E) && E !== !1 ? An(E === !0 ? 0 : E) : On, O = t.jitter, ee = !B(O), k = se(O), te = k ? O[0] : O || 0, ne = k ? O[1] : O || 0, A = h ? 0 : L(o) ? o : 0;
|
|
1388
1598
|
return (e, c, l, h, E) => {
|
|
1389
|
-
let [O] = xt(e), k =
|
|
1390
|
-
if (g && (
|
|
1599
|
+
let [O] = xt(e), k = B(m) ? l.length : m, re = B(x) ? !1 : z(x) ? x(O, c, k) : We(O, x), j = L(re) || R(re) && L(+re) ? +re : c, M = j >= 0 && j < k ? j : c;
|
|
1600
|
+
if (g && (A = (k - 1) / 2), _ && (A = k - 1), !n.length) {
|
|
1391
1601
|
if (f) {
|
|
1392
1602
|
let e = !0, t = !1, r = Infinity, i = Infinity, a = Infinity, s = -Infinity, c = -Infinity, u = -Infinity, d = [], f = [], m = [];
|
|
1393
1603
|
for (let n = 0; n < k; n++) {
|
|
1394
1604
|
let o = l[n], p = 0, h = 0, g = 0, _ = !1;
|
|
1395
|
-
if (o &&
|
|
1605
|
+
if (o && z(o.getBoundingClientRect)) {
|
|
1396
1606
|
let e = o.getBoundingClientRect();
|
|
1397
1607
|
p = e.left + e.width / 2, h = e.top + e.height / 2, _ = !0;
|
|
1398
1608
|
} else {
|
|
1399
1609
|
let e = o;
|
|
1400
|
-
e &&
|
|
1610
|
+
e && L(e.x) && L(e.y) && (p = e.x, h = e.y, L(e.z) && (g = e.z, t = !0), _ = !0);
|
|
1401
1611
|
}
|
|
1402
1612
|
if (!_) {
|
|
1403
1613
|
e = !1;
|
|
@@ -1407,80 +1617,80 @@ var Qt = (e, t) => {
|
|
|
1407
1617
|
}
|
|
1408
1618
|
if (e) {
|
|
1409
1619
|
let e = d[0], l = f[0], h = m[0];
|
|
1410
|
-
y ? (e = r + o[0] * (s - r), l = i + o[1] * (c - i), h = t ? a + (o.length >= 3 ? o[2] : .5) * (u - a) : 0) : g ? (e = (r + s) / 2, l = (i + c) / 2, h = (a + u) / 2) : _ ? (e = d[k - 1], l = f[k - 1], h = m[k - 1]) :
|
|
1620
|
+
y ? (e = r + o[0] * (s - r), l = i + o[1] * (c - i), h = t ? a + (o.length >= 3 ? o[2] : .5) * (u - a) : 0) : g ? (e = (r + s) / 2, l = (i + c) / 2, h = (a + u) / 2) : _ ? (e = d[k - 1], l = f[k - 1], h = m[k - 1]) : L(o) && (e = d[o], l = f[o], h = m[o]);
|
|
1411
1621
|
for (let r = 0; r < k; r++) {
|
|
1412
|
-
let i = e - d[r], a = l - f[r], o = h - m[r], s =
|
|
1622
|
+
let i = e - d[r], a = l - f[r], o = h - m[r], s = ye(i * i + a * a + (t ? o * o : 0));
|
|
1413
1623
|
p === "x" && (s = -i), p === "y" && (s = -a), p === "z" && (s = -o), n.push(s);
|
|
1414
1624
|
}
|
|
1415
1625
|
let v = Infinity;
|
|
1416
1626
|
for (let e = 0; e < k; e++) {
|
|
1417
|
-
let t =
|
|
1627
|
+
let t = xe(n[e]);
|
|
1418
1628
|
t > 0 && t < v && (v = t);
|
|
1419
1629
|
}
|
|
1420
1630
|
if (v > 0 && v < Infinity) for (let e = 0; e < k; e++) n[e] = n[e] / v;
|
|
1421
|
-
} else for (let e = 0; e < k; e++) n.push(
|
|
1422
|
-
} else for (let e = 0; e < k; e++) if (!d) n.push(
|
|
1631
|
+
} else for (let e = 0; e < k; e++) n.push(xe(A - e));
|
|
1632
|
+
} else for (let e = 0; e < k; e++) if (!d) n.push(xe(A - e));
|
|
1423
1633
|
else {
|
|
1424
1634
|
let t = d.length, r = d[0] * d[1], i, a, s;
|
|
1425
|
-
y ? (i = o[0] * (d[0] - 1), a = o[1] * (d[1] - 1), s = t === 3 ? (o.length >= 3 ? o[2] : .5) * (d[2] - 1) : 0) : g ? (i = (d[0] - 1) / 2, a = (d[1] - 1) / 2, s = t === 3 ? (d[2] - 1) / 2 : 0) : (i =
|
|
1426
|
-
let c = e % d[0], l =
|
|
1635
|
+
y ? (i = o[0] * (d[0] - 1), a = o[1] * (d[1] - 1), s = t === 3 ? (o.length >= 3 ? o[2] : .5) * (d[2] - 1) : 0) : g ? (i = (d[0] - 1) / 2, a = (d[1] - 1) / 2, s = t === 3 ? (d[2] - 1) / 2 : 0) : (i = A % d[0], a = Se(A / d[0]) % d[1], s = t === 3 ? Se(A / r) : 0);
|
|
1636
|
+
let c = e % d[0], l = Se(e / d[0]) % d[1], u = t === 3 ? Se(e / r) : 0, f = i - c, m = a - l, h = s - u, _ = ye(f * f + m * m + (t === 3 ? h * h : 0));
|
|
1427
1637
|
p === "x" && (_ = -f), p === "y" && (_ = -m), p === "z" && (_ = -h), n.push(_);
|
|
1428
1638
|
}
|
|
1429
1639
|
r = n[0];
|
|
1430
1640
|
for (let e = 1; e < k; e++) n[e] > r && (r = n[e]);
|
|
1431
1641
|
if (u || s) for (let e = 0; e < k; e++) {
|
|
1432
1642
|
let t = n[e];
|
|
1433
|
-
u && (t = u(t / r) * r), s && (t = p ? -t :
|
|
1643
|
+
u && (t = u(t / r) * r), s && (t = p ? -t : xe(r - t)), n[e] = t;
|
|
1434
1644
|
}
|
|
1435
1645
|
if (ee) {
|
|
1436
1646
|
a = Array(k);
|
|
1437
1647
|
for (let e = 0; e < k; e++) a[e] = D(-1, 1, 4);
|
|
1438
1648
|
}
|
|
1439
|
-
v && (n =
|
|
1649
|
+
v && (n = jn(n, D));
|
|
1440
1650
|
}
|
|
1441
|
-
let
|
|
1442
|
-
|
|
1443
|
-
let
|
|
1651
|
+
let N = b ? (C - S) / r : S;
|
|
1652
|
+
B(i) && (i = E ? Xt(E, B(t.start) ? E.iterationDuration : T) : T);
|
|
1653
|
+
let P = i + (N * W(n[M], 2) || 0);
|
|
1444
1654
|
if (ee) {
|
|
1445
|
-
let e = r ? n[
|
|
1446
|
-
|
|
1655
|
+
let e = r ? n[M] / r : 0, t = te + (ne - te) * e;
|
|
1656
|
+
P += a[M] * t;
|
|
1447
1657
|
}
|
|
1448
|
-
return t.modifier && (
|
|
1658
|
+
return t.modifier && (P = t.modifier(P)), w && (P = `${P}${w[2]}`), P;
|
|
1449
1659
|
};
|
|
1450
|
-
},
|
|
1660
|
+
}, Nn = typeof Intl < "u" && Intl.Segmenter, Pn = /\{value\}/g, Fn = /\{i\}/g, In = /(\s+)/, Ln = /^\s+$/, Rn = "line", zn = "word", Bn = "char", Vn = "data-line", Hn = null, Un = null, Wn = null, Gn = (e) => e.isWordLike || e.segment === " " || L(+e.segment), Kn = (e) => e.setAttribute("aria-hidden", "true"), qn = (e, t) => [...e.querySelectorAll(`[data-${t}]:not([data-${t}] [data-${t}])`)], Jn = {
|
|
1451
1661
|
line: "#00D672",
|
|
1452
1662
|
word: "#FF4B4B",
|
|
1453
1663
|
char: "#5A87FF"
|
|
1454
|
-
},
|
|
1664
|
+
}, Yn = (e) => {
|
|
1455
1665
|
if (!e.childElementCount && !e.textContent.trim()) {
|
|
1456
1666
|
let t = e.parentElement;
|
|
1457
|
-
e.remove(), t &&
|
|
1667
|
+
e.remove(), t && Yn(t);
|
|
1458
1668
|
}
|
|
1459
|
-
},
|
|
1460
|
-
let r = e.getAttribute(
|
|
1669
|
+
}, Xn = (e, t, n) => {
|
|
1670
|
+
let r = e.getAttribute(Vn);
|
|
1461
1671
|
if (r !== null && +r !== t || e.tagName === "BR") {
|
|
1462
1672
|
n.add(e);
|
|
1463
1673
|
let t = e.previousSibling, r = e.nextSibling;
|
|
1464
|
-
t && t.nodeType === 3 &&
|
|
1674
|
+
t && t.nodeType === 3 && Ln.test(t.textContent) && n.add(t), r && r.nodeType === 3 && Ln.test(r.textContent) && n.add(r);
|
|
1465
1675
|
}
|
|
1466
1676
|
let i = e.childElementCount;
|
|
1467
|
-
for (; i--;)
|
|
1677
|
+
for (; i--;) Xn(e.children[i], t, n);
|
|
1468
1678
|
return n;
|
|
1469
|
-
},
|
|
1679
|
+
}, Zn = (e, t = {}) => {
|
|
1470
1680
|
let n = "";
|
|
1471
1681
|
t ||= {};
|
|
1472
|
-
let r =
|
|
1682
|
+
let r = R(t.class) ? ` class="${t.class}"` : "", i = q(t.clone, !1), a = q(t.wrap, !1), o = a ? a === !0 ? "clip" : a : i ? "clip" : !1;
|
|
1473
1683
|
if (a && (n += `<span${o ? ` style="overflow:${o};"` : ""}>`), n += `<span${r}${i ? " style=\"position:relative;\"" : ""} data-${e}="{i}">`, i) {
|
|
1474
1684
|
let e = i === "left" ? "-100%" : i === "right" ? "100%" : "0", t = i === "top" ? "-100%" : i === "bottom" ? "100%" : "0";
|
|
1475
1685
|
n += "<span>{value}</span>", n += `<span inert style="position:absolute;top:${t};left:${e};white-space:nowrap;">{value}</span>`;
|
|
1476
1686
|
} else n += "{value}";
|
|
1477
1687
|
return n += "</span>", a && (n += "</span>"), n;
|
|
1478
|
-
},
|
|
1479
|
-
let l = i ===
|
|
1480
|
-
|
|
1481
|
-
let m =
|
|
1688
|
+
}, Qn = (e, t, n, r, i, a, o, s, c) => {
|
|
1689
|
+
let l = i === Rn, u = i === Bn, d = `_${i}_`, f = z(e) ? e(n) : e, p = l ? "block" : "inline-block";
|
|
1690
|
+
Wn.innerHTML = f.replace(Pn, `<i class="${d}"></i>`).replace(Fn, `${u ? c : l ? o : s}`);
|
|
1691
|
+
let m = Wn.content, h = m.firstElementChild, g = m.querySelector(`[data-${i}]`) || h, _ = m.querySelectorAll(`i.${d}`), v = _.length;
|
|
1482
1692
|
if (v) {
|
|
1483
|
-
h.style.display = p, g.style.display = p, g.setAttribute(
|
|
1693
|
+
h.style.display = p, g.style.display = p, g.setAttribute(Vn, `${o}`), l || (g.setAttribute("data-word", `${s}`), u && g.setAttribute("data-char", `${c}`));
|
|
1484
1694
|
let e = v;
|
|
1485
1695
|
for (; e--;) {
|
|
1486
1696
|
let t = _[e], r = t.parentElement;
|
|
@@ -1488,22 +1698,22 @@ var Qt = (e, t) => {
|
|
|
1488
1698
|
}
|
|
1489
1699
|
t.push(g), r.appendChild(m);
|
|
1490
1700
|
} else console.warn("The expression \"{value}\" is missing from the provided template.");
|
|
1491
|
-
return a && (h.style.outline = `1px dotted ${
|
|
1492
|
-
},
|
|
1701
|
+
return a && (h.style.outline = `1px dotted ${Jn[i]}`), h;
|
|
1702
|
+
}, $n = class {
|
|
1493
1703
|
constructor(e, t = {}) {
|
|
1494
|
-
|
|
1495
|
-
let t = [], n = e.split(
|
|
1704
|
+
Hn ||= Nn ? new Nn([], { granularity: zn }) : { segment: (e) => {
|
|
1705
|
+
let t = [], n = e.split(In);
|
|
1496
1706
|
for (let e = 0, r = n.length; e < r; e++) {
|
|
1497
1707
|
let r = n[e];
|
|
1498
1708
|
t.push({
|
|
1499
1709
|
segment: r,
|
|
1500
|
-
isWordLike: !
|
|
1710
|
+
isWordLike: !Ln.test(r)
|
|
1501
1711
|
});
|
|
1502
1712
|
}
|
|
1503
1713
|
return t;
|
|
1504
|
-
} },
|
|
1505
|
-
let { words: n, chars: r, lines: i, accessible: o, includeSpaces: c, debug: l } = t, u = (e =
|
|
1506
|
-
this.debug =
|
|
1714
|
+
} }, Un ||= Nn ? new Nn([], { granularity: "grapheme" }) : { segment: (e) => [...e].map((e) => ({ segment: e })) }, !Wn && a && (Wn = s.createElement("template")), P.current && P.current.register(this);
|
|
1715
|
+
let { words: n, chars: r, lines: i, accessible: o, includeSpaces: c, debug: l } = t, u = (e = se(e) ? e[0] : e) && e.nodeType ? e : (yt(e) || [])[0], d = i === !0 ? {} : i, f = n === !0 || B(n) ? {} : n, p = r === !0 ? {} : r;
|
|
1716
|
+
this.debug = q(l, !1), this.includeSpaces = q(c, !1), this.accessible = q(o, !0), this.linesOnly = d && !f && !p, this.lineTemplate = ce(d) ? Zn(Rn, d) : d, this.wordTemplate = ce(f) || this.linesOnly ? Zn(zn, f) : f, this.charTemplate = ce(p) ? Zn(Bn, p) : p, this.$target = u, this.html = u && u.innerHTML, this.lines = [], this.words = [], this.chars = [], this.effects = [], this.effectsCleanups = [], this.cache = null, this.ready = !1, this.width = 0, this.resizeTimeout = null;
|
|
1507
1717
|
let m = () => this.html && (d || f || p) && this.split();
|
|
1508
1718
|
this.resizeObserver = new ResizeObserver(() => {
|
|
1509
1719
|
clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(() => {
|
|
@@ -1513,40 +1723,40 @@ var Qt = (e, t) => {
|
|
|
1513
1723
|
}), this.lineTemplate && !this.ready ? s.fonts.ready.then(m) : m(), u ? this.resizeObserver.observe(u) : console.warn("No Text Splitter target found.");
|
|
1514
1724
|
}
|
|
1515
1725
|
addEffect(e) {
|
|
1516
|
-
if (!
|
|
1517
|
-
let t =
|
|
1726
|
+
if (!z(e)) return console.warn("Effect must return a function."), this;
|
|
1727
|
+
let t = rn(e);
|
|
1518
1728
|
return this.effects.push(t), this.ready && (this.effectsCleanups[this.effects.length - 1] = t(this)), this;
|
|
1519
1729
|
}
|
|
1520
1730
|
revert() {
|
|
1521
|
-
return clearTimeout(this.resizeTimeout), this.lines.length = this.words.length = this.chars.length = 0, this.resizeObserver.disconnect(), this.effectsCleanups.forEach((e) =>
|
|
1731
|
+
return clearTimeout(this.resizeTimeout), this.lines.length = this.words.length = this.chars.length = 0, this.resizeObserver.disconnect(), this.effectsCleanups.forEach((e) => z(e) ? e(this) : e.revert && e.revert()), this.$target.innerHTML = this.html, this;
|
|
1522
1732
|
}
|
|
1523
1733
|
splitNode(e) {
|
|
1524
1734
|
let t = this.wordTemplate, n = this.charTemplate, r = this.includeSpaces, i = this.debug, a = e.nodeType;
|
|
1525
1735
|
if (a === 3) {
|
|
1526
1736
|
let a = e.nodeValue;
|
|
1527
1737
|
if (a.trim()) {
|
|
1528
|
-
let o = [], c = this.words, l = this.chars, u =
|
|
1738
|
+
let o = [], c = this.words, l = this.chars, u = Hn.segment(a), d = s.createDocumentFragment(), f = null;
|
|
1529
1739
|
for (let e of u) {
|
|
1530
|
-
let t = e.segment, n =
|
|
1531
|
-
if (!f || n && f &&
|
|
1740
|
+
let t = e.segment, n = Gn(e);
|
|
1741
|
+
if (!f || n && f && Gn(f)) o.push(t);
|
|
1532
1742
|
else {
|
|
1533
1743
|
let e = o.length - 1, n = o[e];
|
|
1534
|
-
!
|
|
1744
|
+
!In.test(n) && !In.test(t) ? o[e] += t : o.push(t);
|
|
1535
1745
|
}
|
|
1536
1746
|
f = e;
|
|
1537
1747
|
}
|
|
1538
1748
|
for (let e = 0, a = o.length; e < a; e++) {
|
|
1539
1749
|
let a = o[e];
|
|
1540
1750
|
if (a.trim()) {
|
|
1541
|
-
let u = o[e + 1], f = r && u && !u.trim(), p = a, m = n ?
|
|
1751
|
+
let u = o[e + 1], f = r && u && !u.trim(), p = a, m = n ? Un.segment(p) : null, h = n ? s.createDocumentFragment() : s.createTextNode(f ? a + "\xA0" : a);
|
|
1542
1752
|
if (n) {
|
|
1543
1753
|
let e = [...m];
|
|
1544
1754
|
for (let t = 0, r = e.length; t < r; t++) {
|
|
1545
1755
|
let a = e[t], o = t === r - 1 && f ? a.segment + "\xA0" : a.segment;
|
|
1546
|
-
|
|
1756
|
+
Qn(n, l, s.createTextNode(o), h, Bn, i, -1, c.length, l.length);
|
|
1547
1757
|
}
|
|
1548
1758
|
}
|
|
1549
|
-
t ?
|
|
1759
|
+
t ? Qn(t, c, h, d, zn, i, -1, c.length, l.length) : n ? d.appendChild(h) : d.appendChild(s.createTextNode(a)), f && e++;
|
|
1550
1760
|
} else {
|
|
1551
1761
|
if (e && r) continue;
|
|
1552
1762
|
d.appendChild(s.createTextNode(a));
|
|
@@ -1561,27 +1771,27 @@ var Qt = (e, t) => {
|
|
|
1561
1771
|
}
|
|
1562
1772
|
split(e = !1) {
|
|
1563
1773
|
let t = this.$target, n = !!this.cache && !e, r = this.lineTemplate, i = this.wordTemplate, a = this.charTemplate, o = s.fonts.status !== "loading", c = r && o;
|
|
1564
|
-
this.ready = !r || o, (c || e) && this.effectsCleanups.forEach((e) =>
|
|
1774
|
+
this.ready = !r || o, (c || e) && this.effectsCleanups.forEach((e) => z(e) && e(this)), n || (e && (t.innerHTML = this.html, this.words.length = this.chars.length = 0), this.splitNode(t), this.cache = t.innerHTML), c && (n && (t.innerHTML = this.cache), this.lines.length = 0, i && (this.words = qn(t, zn))), a && (c || i) && (this.chars = qn(t, Bn));
|
|
1565
1775
|
let l = this.words.length ? this.words : this.chars, u, d = 0;
|
|
1566
1776
|
for (let e = 0, t = l.length; e < t; e++) {
|
|
1567
1777
|
let t = l[e], { top: n, height: r } = t.getBoundingClientRect();
|
|
1568
|
-
!
|
|
1569
|
-
let i = t.querySelectorAll(`[${
|
|
1570
|
-
for (; a--;) i[a].setAttribute(
|
|
1778
|
+
!B(u) && n - u > r * .5 && d++, t.setAttribute(Vn, `${d}`);
|
|
1779
|
+
let i = t.querySelectorAll(`[${Vn}]`), a = i.length;
|
|
1780
|
+
for (; a--;) i[a].setAttribute(Vn, `${d}`);
|
|
1571
1781
|
u = n;
|
|
1572
1782
|
}
|
|
1573
1783
|
if (c) {
|
|
1574
1784
|
let e = s.createDocumentFragment(), n = /* @__PURE__ */ new Set(), o = [];
|
|
1575
1785
|
for (let e = 0; e < d + 1; e++) {
|
|
1576
1786
|
let r = t.cloneNode(!0);
|
|
1577
|
-
|
|
1787
|
+
Xn(r, e, /* @__PURE__ */ new Set()).forEach((e) => {
|
|
1578
1788
|
let t = e.parentNode;
|
|
1579
1789
|
t && (e.nodeType === 1 && n.add(t), t.removeChild(e));
|
|
1580
1790
|
}), o.push(r);
|
|
1581
1791
|
}
|
|
1582
|
-
n.forEach(
|
|
1583
|
-
for (let t = 0, n = o.length; t < n; t++)
|
|
1584
|
-
t.innerHTML = "", t.appendChild(e), i && (this.words =
|
|
1792
|
+
n.forEach(Yn);
|
|
1793
|
+
for (let t = 0, n = o.length; t < n; t++) Qn(r, this.lines, o[t], e, Rn, this.debug, t);
|
|
1794
|
+
t.innerHTML = "", t.appendChild(e), i && (this.words = qn(t, zn)), a && (this.chars = qn(t, Bn));
|
|
1585
1795
|
}
|
|
1586
1796
|
if (this.linesOnly) {
|
|
1587
1797
|
let e = this.words, t = e.length;
|
|
@@ -1593,27 +1803,27 @@ var Qt = (e, t) => {
|
|
|
1593
1803
|
}
|
|
1594
1804
|
if (this.accessible && (c || !n)) {
|
|
1595
1805
|
let e = s.createElement("span");
|
|
1596
|
-
e.style.cssText = "position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;", e.innerHTML = this.html, t.insertBefore(e, t.firstChild), this.lines.forEach(
|
|
1806
|
+
e.style.cssText = "position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;", e.innerHTML = this.html, t.insertBefore(e, t.firstChild), this.lines.forEach(Kn), this.words.forEach(Kn), this.chars.forEach(Kn);
|
|
1597
1807
|
}
|
|
1598
1808
|
return this.width = t.offsetWidth, (c || e) && this.effects.forEach((e, t) => this.effectsCleanups[t] = e(this)), this;
|
|
1599
1809
|
}
|
|
1600
1810
|
refresh() {
|
|
1601
1811
|
this.split(!0);
|
|
1602
1812
|
}
|
|
1603
|
-
},
|
|
1604
|
-
function
|
|
1813
|
+
}, er = (e, t) => new $n(e, t), tr = "1.3.26";
|
|
1814
|
+
function nr(e, t, n) {
|
|
1605
1815
|
return Math.max(e, Math.min(t, n));
|
|
1606
1816
|
}
|
|
1607
|
-
function
|
|
1817
|
+
function rr(e, t, n) {
|
|
1608
1818
|
return (1 - n) * e + n * t;
|
|
1609
1819
|
}
|
|
1610
|
-
function
|
|
1611
|
-
return
|
|
1820
|
+
function ir(e, t, n, r) {
|
|
1821
|
+
return rr(e, t, 1 - Math.exp(-n * r));
|
|
1612
1822
|
}
|
|
1613
|
-
function
|
|
1823
|
+
function ar(e, t) {
|
|
1614
1824
|
return (e % t + t) % t;
|
|
1615
1825
|
}
|
|
1616
|
-
var
|
|
1826
|
+
var or = class {
|
|
1617
1827
|
isRunning = !1;
|
|
1618
1828
|
value = 0;
|
|
1619
1829
|
from = 0;
|
|
@@ -1628,11 +1838,11 @@ var Kn = class {
|
|
|
1628
1838
|
let t = !1;
|
|
1629
1839
|
if (this.duration && this.easing) {
|
|
1630
1840
|
this.currentTime += e;
|
|
1631
|
-
let n =
|
|
1841
|
+
let n = nr(0, this.currentTime / this.duration, 1);
|
|
1632
1842
|
t = n >= 1;
|
|
1633
1843
|
let r = t ? 1 : this.easing(n);
|
|
1634
1844
|
this.value = this.from + (this.to - this.from) * r;
|
|
1635
|
-
} else this.lerp ? (this.value =
|
|
1845
|
+
} else this.lerp ? (this.value = ir(this.value, this.to, this.lerp * 60, e), Math.round(this.value) === Math.round(this.to) && (this.value = this.to, t = !0)) : (this.value = this.to, t = !0);
|
|
1636
1846
|
t && this.stop(), this.onUpdate?.(this.value, t);
|
|
1637
1847
|
}
|
|
1638
1848
|
stop() {
|
|
@@ -1642,7 +1852,7 @@ var Kn = class {
|
|
|
1642
1852
|
this.from = this.value = e, this.to = t, this.lerp = n, this.duration = r, this.easing = i, this.currentTime = 0, this.isRunning = !0, a?.(), this.onUpdate = o;
|
|
1643
1853
|
}
|
|
1644
1854
|
};
|
|
1645
|
-
function
|
|
1855
|
+
function sr(e, t) {
|
|
1646
1856
|
let n;
|
|
1647
1857
|
return function(...r) {
|
|
1648
1858
|
clearTimeout(n), n = setTimeout(() => {
|
|
@@ -1650,7 +1860,7 @@ function qn(e, t) {
|
|
|
1650
1860
|
}, t);
|
|
1651
1861
|
};
|
|
1652
1862
|
}
|
|
1653
|
-
var
|
|
1863
|
+
var cr = class {
|
|
1654
1864
|
width = 0;
|
|
1655
1865
|
height = 0;
|
|
1656
1866
|
scrollHeight = 0;
|
|
@@ -1659,7 +1869,7 @@ var Jn = class {
|
|
|
1659
1869
|
wrapperResizeObserver;
|
|
1660
1870
|
contentResizeObserver;
|
|
1661
1871
|
constructor(e, t, { autoResize: n = !0, debounce: r = 250 } = {}) {
|
|
1662
|
-
this.wrapper = e, this.content = t, n && (this.debouncedResize =
|
|
1872
|
+
this.wrapper = e, this.content = t, n && (this.debouncedResize = sr(this.resize, r), this.wrapper instanceof Window ? window.addEventListener("resize", this.debouncedResize) : (this.wrapperResizeObserver = new ResizeObserver(this.debouncedResize), this.wrapperResizeObserver.observe(this.wrapper)), this.contentResizeObserver = new ResizeObserver(this.debouncedResize), this.contentResizeObserver.observe(this.content)), this.resize();
|
|
1663
1873
|
}
|
|
1664
1874
|
destroy() {
|
|
1665
1875
|
this.wrapperResizeObserver?.disconnect(), this.contentResizeObserver?.disconnect(), this.wrapper === window && this.debouncedResize && window.removeEventListener("resize", this.debouncedResize);
|
|
@@ -1679,7 +1889,7 @@ var Jn = class {
|
|
|
1679
1889
|
y: this.scrollHeight - this.height
|
|
1680
1890
|
};
|
|
1681
1891
|
}
|
|
1682
|
-
},
|
|
1892
|
+
}, lr = class {
|
|
1683
1893
|
events = {};
|
|
1684
1894
|
emit(e, ...t) {
|
|
1685
1895
|
let n = this.events[e] || [];
|
|
@@ -1696,11 +1906,11 @@ var Jn = class {
|
|
|
1696
1906
|
destroy() {
|
|
1697
1907
|
this.events = {};
|
|
1698
1908
|
}
|
|
1699
|
-
},
|
|
1700
|
-
function
|
|
1701
|
-
return e === 1 ?
|
|
1909
|
+
}, ur = 100 / 6, dr = { passive: !1 };
|
|
1910
|
+
function fr(e, t) {
|
|
1911
|
+
return e === 1 ? ur : e === 2 ? t : 1;
|
|
1702
1912
|
}
|
|
1703
|
-
var
|
|
1913
|
+
var pr = class {
|
|
1704
1914
|
touchStart = {
|
|
1705
1915
|
x: 0,
|
|
1706
1916
|
y: 0
|
|
@@ -1713,18 +1923,18 @@ var $n = class {
|
|
|
1713
1923
|
width: 0,
|
|
1714
1924
|
height: 0
|
|
1715
1925
|
};
|
|
1716
|
-
emitter = new
|
|
1926
|
+
emitter = new lr();
|
|
1717
1927
|
constructor(e, t = {
|
|
1718
1928
|
wheelMultiplier: 1,
|
|
1719
1929
|
touchMultiplier: 1
|
|
1720
1930
|
}) {
|
|
1721
|
-
this.element = e, this.options = t, window.addEventListener("resize", this.onWindowResize), this.onWindowResize(), this.element.addEventListener("wheel", this.onWheel,
|
|
1931
|
+
this.element = e, this.options = t, window.addEventListener("resize", this.onWindowResize), this.onWindowResize(), this.element.addEventListener("wheel", this.onWheel, dr), this.element.addEventListener("touchstart", this.onTouchStart, dr), this.element.addEventListener("touchmove", this.onTouchMove, dr), this.element.addEventListener("touchend", this.onTouchEnd, dr);
|
|
1722
1932
|
}
|
|
1723
1933
|
on(e, t) {
|
|
1724
1934
|
return this.emitter.on(e, t);
|
|
1725
1935
|
}
|
|
1726
1936
|
destroy() {
|
|
1727
|
-
this.emitter.destroy(), window.removeEventListener("resize", this.onWindowResize), this.element.removeEventListener("wheel", this.onWheel,
|
|
1937
|
+
this.emitter.destroy(), window.removeEventListener("resize", this.onWindowResize), this.element.removeEventListener("wheel", this.onWheel, dr), this.element.removeEventListener("touchstart", this.onTouchStart, dr), this.element.removeEventListener("touchmove", this.onTouchMove, dr), this.element.removeEventListener("touchend", this.onTouchEnd, dr);
|
|
1728
1938
|
}
|
|
1729
1939
|
onTouchStart = (e) => {
|
|
1730
1940
|
let { clientX: t, clientY: n } = e.targetTouches ? e.targetTouches[0] : e;
|
|
@@ -1756,7 +1966,7 @@ var $n = class {
|
|
|
1756
1966
|
});
|
|
1757
1967
|
};
|
|
1758
1968
|
onWheel = (e) => {
|
|
1759
|
-
let { deltaX: t, deltaY: n, deltaMode: r } = e, i =
|
|
1969
|
+
let { deltaX: t, deltaY: n, deltaMode: r } = e, i = fr(r, this.window.width), a = fr(r, this.window.height);
|
|
1760
1970
|
t *= i, n *= a, t *= this.options.wheelMultiplier, n *= this.options.wheelMultiplier, this.emitter.emit("scroll", {
|
|
1761
1971
|
deltaX: t,
|
|
1762
1972
|
deltaY: n,
|
|
@@ -1769,7 +1979,7 @@ var $n = class {
|
|
|
1769
1979
|
height: window.innerHeight
|
|
1770
1980
|
};
|
|
1771
1981
|
};
|
|
1772
|
-
},
|
|
1982
|
+
}, mr = (e) => Math.min(1, 1.001 - 2 ** (-10 * e)), hr = class {
|
|
1773
1983
|
_isScrolling = !1;
|
|
1774
1984
|
_isStopped = !1;
|
|
1775
1985
|
_isLocked = !1;
|
|
@@ -1788,12 +1998,12 @@ var $n = class {
|
|
|
1788
1998
|
options;
|
|
1789
1999
|
targetScroll;
|
|
1790
2000
|
animatedScroll;
|
|
1791
|
-
animate = new
|
|
1792
|
-
emitter = new
|
|
2001
|
+
animate = new or();
|
|
2002
|
+
emitter = new lr();
|
|
1793
2003
|
dimensions;
|
|
1794
2004
|
virtualScroll;
|
|
1795
2005
|
constructor({ wrapper: e = window, content: t = document.documentElement, eventsTarget: n = e, smoothWheel: r = !0, syncTouch: i = !1, syncTouchLerp: a = .075, touchInertiaExponent: o = 1.7, duration: s, easing: c, lerp: l = .1, infinite: u = !1, orientation: d = "vertical", gestureOrientation: f = d === "horizontal" ? "both" : "vertical", touchMultiplier: p = 1, wheelMultiplier: m = 1, autoResize: h = !0, prevent: g, virtualScroll: _, overscroll: v = !0, autoRaf: y = !1, anchors: b = !1, autoToggle: x = !1, allowNestedScroll: S = !1, __experimental__naiveDimensions: C = !1, naiveDimensions: w = C, stopInertiaOnNavigate: T = !1, respectReducedMotion: E = !0 } = {}) {
|
|
1796
|
-
window.lenisVersion =
|
|
2006
|
+
window.lenisVersion = tr, window.lenis || (window.lenis = {}), window.lenis.version = tr, d === "horizontal" && (window.lenis.horizontal = !0), i === !0 && (window.lenis.touch = !0), this.isIos = /(iPad|iPhone|iPod)/g.test(navigator.userAgent), (!e || e === document.documentElement) && (e = window), typeof s == "number" && typeof c != "function" ? c = mr : typeof c == "function" && typeof s != "number" && (s = 1), this.options = {
|
|
1797
2007
|
wrapper: e,
|
|
1798
2008
|
content: t,
|
|
1799
2009
|
eventsTarget: n,
|
|
@@ -1820,7 +2030,7 @@ var $n = class {
|
|
|
1820
2030
|
naiveDimensions: w,
|
|
1821
2031
|
stopInertiaOnNavigate: T,
|
|
1822
2032
|
respectReducedMotion: E
|
|
1823
|
-
}, this.dimensions = new
|
|
2033
|
+
}, this.dimensions = new cr(e, t, { autoResize: h }), this.updateClassName(), this.targetScroll = this.animatedScroll = this.actualScroll, this.options.wrapper.addEventListener("scroll", this.onNativeScroll), this.options.wrapper.addEventListener("scrollend", this.onScrollEnd, { capture: !0 }), (this.options.anchors || this.options.stopInertiaOnNavigate) && this.options.wrapper.addEventListener("click", this.onClick), this.options.wrapper.addEventListener("pointerdown", this.onPointerDown), this.virtualScroll = new pr(n, {
|
|
1824
2034
|
touchMultiplier: p,
|
|
1825
2035
|
wheelMultiplier: m
|
|
1826
2036
|
}), this.virtualScroll.on("scroll", this.onVirtualScroll), this.options.autoToggle && (this.checkOverflow(), this.rootElement.addEventListener("transitionend", this.onTransitionEnd)), this.options.autoRaf && (this._rafId = requestAnimationFrame(this.raf));
|
|
@@ -2019,7 +2229,7 @@ var $n = class {
|
|
|
2019
2229
|
let e = f - this.animatedScroll;
|
|
2020
2230
|
e > this.limit / 2 ? f -= this.limit : e < -this.limit / 2 && (f += this.limit);
|
|
2021
2231
|
}
|
|
2022
|
-
} else f =
|
|
2232
|
+
} else f = nr(0, f, this.limit);
|
|
2023
2233
|
if (f === this.targetScroll) {
|
|
2024
2234
|
c?.(this), l?.(this);
|
|
2025
2235
|
return;
|
|
@@ -2030,7 +2240,7 @@ var $n = class {
|
|
|
2030
2240
|
});
|
|
2031
2241
|
return;
|
|
2032
2242
|
}
|
|
2033
|
-
i || (this.targetScroll = f), typeof o == "number" && typeof s != "function" ? s =
|
|
2243
|
+
i || (this.targetScroll = f), typeof o == "number" && typeof s != "function" ? s = mr : typeof s == "function" && typeof o != "number" && (o = 1), this.animate.fromTo(this.animatedScroll, f, {
|
|
2034
2244
|
duration: o,
|
|
2035
2245
|
easing: s,
|
|
2036
2246
|
lerp: a,
|
|
@@ -2089,7 +2299,7 @@ var $n = class {
|
|
|
2089
2299
|
return this.isHorizontal ? e.scrollX ?? e.scrollLeft : e.scrollY ?? e.scrollTop;
|
|
2090
2300
|
}
|
|
2091
2301
|
get scroll() {
|
|
2092
|
-
return this.options.infinite ?
|
|
2302
|
+
return this.options.infinite ? ar(this.animatedScroll, this.limit) : this.animatedScroll;
|
|
2093
2303
|
}
|
|
2094
2304
|
get progress() {
|
|
2095
2305
|
return this.limit === 0 ? 1 : this.scroll / this.limit;
|
|
@@ -2130,7 +2340,7 @@ var $n = class {
|
|
|
2130
2340
|
cleanUpClassName() {
|
|
2131
2341
|
for (let e of Array.from(this.rootElement.classList)) (e === "lenis" || e.startsWith("lenis-")) && this.rootElement.classList.remove(e);
|
|
2132
2342
|
}
|
|
2133
|
-
},
|
|
2343
|
+
}, gr = [
|
|
2134
2344
|
"linear",
|
|
2135
2345
|
"outQuad",
|
|
2136
2346
|
"outCubic",
|
|
@@ -2139,28 +2349,68 @@ var $n = class {
|
|
|
2139
2349
|
"outBack",
|
|
2140
2350
|
"outElastic",
|
|
2141
2351
|
"outBounce"
|
|
2142
|
-
],
|
|
2352
|
+
], _r = n({
|
|
2143
2353
|
duration: 600,
|
|
2144
2354
|
ease: "outExpo",
|
|
2145
2355
|
reducedMotion: "reduce",
|
|
2146
2356
|
smoothScroll: !1,
|
|
2147
2357
|
smoothScrollLerp: .1
|
|
2148
2358
|
});
|
|
2149
|
-
function
|
|
2150
|
-
Object.assign(
|
|
2359
|
+
function vr(e) {
|
|
2360
|
+
Object.assign(_r, e);
|
|
2151
2361
|
}
|
|
2152
|
-
var
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2362
|
+
var yr = {
|
|
2363
|
+
blink: {
|
|
2364
|
+
alternate: !0,
|
|
2365
|
+
category: "ambient",
|
|
2366
|
+
ease: "inOutSine",
|
|
2367
|
+
keyframes: { opacity: .4 },
|
|
2368
|
+
loop: !0
|
|
2156
2369
|
},
|
|
2157
|
-
|
|
2370
|
+
blur: {
|
|
2158
2371
|
category: "enter",
|
|
2159
2372
|
from: {
|
|
2160
|
-
|
|
2161
|
-
|
|
2373
|
+
blur: 8,
|
|
2374
|
+
opacity: 0
|
|
2162
2375
|
}
|
|
2163
2376
|
},
|
|
2377
|
+
count: {
|
|
2378
|
+
category: "enter",
|
|
2379
|
+
count: !0,
|
|
2380
|
+
duration: 1600
|
|
2381
|
+
},
|
|
2382
|
+
fade: {
|
|
2383
|
+
category: "enter",
|
|
2384
|
+
from: { opacity: 0 }
|
|
2385
|
+
},
|
|
2386
|
+
float: {
|
|
2387
|
+
alternate: !0,
|
|
2388
|
+
category: "ambient",
|
|
2389
|
+
ease: "inOutSine",
|
|
2390
|
+
keyframes: {
|
|
2391
|
+
composition: "add",
|
|
2392
|
+
transform: ["translateY(0px)", "translateY(-8px)"]
|
|
2393
|
+
},
|
|
2394
|
+
loop: !0
|
|
2395
|
+
},
|
|
2396
|
+
grow: {
|
|
2397
|
+
category: "emphasis",
|
|
2398
|
+
to: { scale: 1.05 }
|
|
2399
|
+
},
|
|
2400
|
+
lift: {
|
|
2401
|
+
category: "emphasis",
|
|
2402
|
+
to: { y: -6 }
|
|
2403
|
+
},
|
|
2404
|
+
pulse: {
|
|
2405
|
+
alternate: !0,
|
|
2406
|
+
category: "ambient",
|
|
2407
|
+
ease: "inOutSine",
|
|
2408
|
+
keyframes: {
|
|
2409
|
+
composition: "add",
|
|
2410
|
+
transform: ["scale(1)", "scale(1.06)"]
|
|
2411
|
+
},
|
|
2412
|
+
loop: !0
|
|
2413
|
+
},
|
|
2164
2414
|
"slide-down": {
|
|
2165
2415
|
category: "enter",
|
|
2166
2416
|
from: {
|
|
@@ -2168,6 +2418,22 @@ var ar = {
|
|
|
2168
2418
|
y: -32
|
|
2169
2419
|
}
|
|
2170
2420
|
},
|
|
2421
|
+
shake: {
|
|
2422
|
+
category: "ambient",
|
|
2423
|
+
ease: "linear",
|
|
2424
|
+
keyframes: {
|
|
2425
|
+
composition: "add",
|
|
2426
|
+
transform: [
|
|
2427
|
+
"translateX(0px)",
|
|
2428
|
+
"translateX(-6px)",
|
|
2429
|
+
"translateX(6px)",
|
|
2430
|
+
"translateX(-6px)",
|
|
2431
|
+
"translateX(6px)",
|
|
2432
|
+
"translateX(0px)"
|
|
2433
|
+
]
|
|
2434
|
+
},
|
|
2435
|
+
loop: !0
|
|
2436
|
+
},
|
|
2171
2437
|
"slide-left": {
|
|
2172
2438
|
category: "enter",
|
|
2173
2439
|
from: {
|
|
@@ -2182,108 +2448,64 @@ var ar = {
|
|
|
2182
2448
|
x: -32
|
|
2183
2449
|
}
|
|
2184
2450
|
},
|
|
2185
|
-
zoom: {
|
|
2186
|
-
category: "enter",
|
|
2187
|
-
from: {
|
|
2188
|
-
opacity: 0,
|
|
2189
|
-
scale: .8
|
|
2190
|
-
}
|
|
2191
|
-
},
|
|
2192
|
-
blur: {
|
|
2193
|
-
category: "enter",
|
|
2194
|
-
from: {
|
|
2195
|
-
blur: 8,
|
|
2196
|
-
opacity: 0
|
|
2197
|
-
}
|
|
2198
|
-
},
|
|
2199
|
-
count: {
|
|
2200
|
-
category: "enter",
|
|
2201
|
-
count: !0,
|
|
2202
|
-
duration: 1600
|
|
2203
|
-
},
|
|
2204
|
-
grow: {
|
|
2205
|
-
category: "emphasis",
|
|
2206
|
-
to: { scale: 1.05 }
|
|
2207
|
-
},
|
|
2208
2451
|
shrink: {
|
|
2209
2452
|
category: "emphasis",
|
|
2210
2453
|
to: { scale: .95 }
|
|
2211
2454
|
},
|
|
2212
|
-
|
|
2213
|
-
category: "
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
to: { rotate: 3 }
|
|
2219
|
-
},
|
|
2220
|
-
pulse: {
|
|
2221
|
-
alternate: !0,
|
|
2222
|
-
category: "ambient",
|
|
2223
|
-
ease: "inOutSine",
|
|
2224
|
-
loop: !0,
|
|
2225
|
-
params: { scale: 1.06 }
|
|
2226
|
-
},
|
|
2227
|
-
float: {
|
|
2228
|
-
alternate: !0,
|
|
2229
|
-
category: "ambient",
|
|
2230
|
-
ease: "inOutSine",
|
|
2231
|
-
loop: !0,
|
|
2232
|
-
params: { translateY: -8 }
|
|
2455
|
+
"slide-up": {
|
|
2456
|
+
category: "enter",
|
|
2457
|
+
from: {
|
|
2458
|
+
opacity: 0,
|
|
2459
|
+
y: 32
|
|
2460
|
+
}
|
|
2233
2461
|
},
|
|
2234
2462
|
spin: {
|
|
2235
2463
|
category: "ambient",
|
|
2236
2464
|
ease: "linear",
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
ease: "linear",
|
|
2243
|
-
loop: !0,
|
|
2244
|
-
params: { translateX: [
|
|
2245
|
-
0,
|
|
2246
|
-
-6,
|
|
2247
|
-
6,
|
|
2248
|
-
-6,
|
|
2249
|
-
6,
|
|
2250
|
-
0
|
|
2251
|
-
] }
|
|
2465
|
+
keyframes: {
|
|
2466
|
+
composition: "add",
|
|
2467
|
+
transform: ["rotate(0deg)", "rotate(360deg)"]
|
|
2468
|
+
},
|
|
2469
|
+
loop: !0
|
|
2252
2470
|
},
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
ease: "inOutSine",
|
|
2257
|
-
loop: !0,
|
|
2258
|
-
params: { opacity: .4 }
|
|
2471
|
+
tilt: {
|
|
2472
|
+
category: "emphasis",
|
|
2473
|
+
to: { rotate: 3 }
|
|
2259
2474
|
},
|
|
2260
2475
|
wiggle: {
|
|
2261
2476
|
alternate: !0,
|
|
2262
2477
|
category: "ambient",
|
|
2263
2478
|
ease: "inOutSine",
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2479
|
+
keyframes: {
|
|
2480
|
+
composition: "add",
|
|
2481
|
+
transform: ["rotate(-3deg)", "rotate(3deg)"]
|
|
2482
|
+
},
|
|
2483
|
+
loop: !0
|
|
2484
|
+
},
|
|
2485
|
+
zoom: {
|
|
2486
|
+
category: "enter",
|
|
2487
|
+
from: {
|
|
2488
|
+
opacity: 0,
|
|
2489
|
+
scale: .8
|
|
2490
|
+
}
|
|
2269
2491
|
}
|
|
2270
|
-
},
|
|
2492
|
+
}, br = {
|
|
2271
2493
|
blur: 0,
|
|
2272
2494
|
opacity: 1,
|
|
2273
2495
|
rotate: 0,
|
|
2274
2496
|
scale: 1,
|
|
2275
2497
|
x: 0,
|
|
2276
2498
|
y: 0
|
|
2277
|
-
},
|
|
2499
|
+
}, xr = {
|
|
2278
2500
|
center: .5,
|
|
2279
2501
|
top: 0
|
|
2280
|
-
},
|
|
2281
|
-
function
|
|
2502
|
+
}, Sr = 4, Cr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap();
|
|
2503
|
+
function Tr({ from: e, to: t }, n) {
|
|
2282
2504
|
let r = {};
|
|
2283
|
-
for (let i of Object.keys(
|
|
2284
|
-
let a = e?.[i] ??
|
|
2505
|
+
for (let i of Object.keys(br)) {
|
|
2506
|
+
let a = e?.[i] ?? br[i], o = t?.[i] ?? br[i];
|
|
2285
2507
|
if (a === o) continue;
|
|
2286
|
-
let s = o + (o - a) *
|
|
2508
|
+
let s = o + (o - a) * Sr, c = n ? [
|
|
2287
2509
|
a,
|
|
2288
2510
|
o,
|
|
2289
2511
|
i === "blur" || i === "scale" ? Math.max(0, s) : s
|
|
@@ -2303,40 +2525,40 @@ function dr({ from: e, to: t }, n) {
|
|
|
2303
2525
|
}
|
|
2304
2526
|
return r;
|
|
2305
2527
|
}
|
|
2306
|
-
function
|
|
2528
|
+
function Er(e) {
|
|
2307
2529
|
return e.preset === "custom" ? {
|
|
2308
2530
|
category: "enter",
|
|
2309
2531
|
from: e.from,
|
|
2310
2532
|
to: e.to
|
|
2311
|
-
} :
|
|
2533
|
+
} : yr[e.preset];
|
|
2312
2534
|
}
|
|
2313
|
-
function
|
|
2314
|
-
return n === "scroll" && e.scrollMode === "continue" && !t.
|
|
2535
|
+
function Dr({ options: e, preset: t, trigger: n }) {
|
|
2536
|
+
return n === "scroll" && e.scrollMode === "continue" && !t.keyframes && !t.count;
|
|
2315
2537
|
}
|
|
2316
|
-
function
|
|
2317
|
-
return
|
|
2538
|
+
function Or() {
|
|
2539
|
+
return _r.reducedMotion === "reduce" && typeof matchMedia < "u" && matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2318
2540
|
}
|
|
2319
|
-
function
|
|
2541
|
+
function kr(e) {
|
|
2320
2542
|
let { state: t, ...n } = e;
|
|
2321
2543
|
return JSON.stringify(n);
|
|
2322
2544
|
}
|
|
2323
|
-
function
|
|
2545
|
+
function Ar({ options: e, preset: t, reduced: n }) {
|
|
2324
2546
|
return n ? !1 : e.loop === void 0 ? t.loop ?? !1 : e.loop < 0 || e.loop;
|
|
2325
2547
|
}
|
|
2326
|
-
function
|
|
2548
|
+
function jr({ options: e, reduced: t }) {
|
|
2327
2549
|
return t ? void 0 : e.stagger ?? (e.split ? 30 : void 0);
|
|
2328
2550
|
}
|
|
2329
|
-
function
|
|
2551
|
+
function Mr(e, t = e.options.delay ?? 0) {
|
|
2330
2552
|
if (e.reduced) return 0;
|
|
2331
|
-
let n =
|
|
2332
|
-
return n === void 0 ? t :
|
|
2553
|
+
let n = jr(e);
|
|
2554
|
+
return n === void 0 ? t : Mn(n, {
|
|
2333
2555
|
from: e.options.staggerFrom ?? "first",
|
|
2334
2556
|
start: t
|
|
2335
2557
|
});
|
|
2336
2558
|
}
|
|
2337
|
-
function
|
|
2559
|
+
function Nr(e, t, n, r = e.options.delay ?? 0) {
|
|
2338
2560
|
if (e.reduced) return 0;
|
|
2339
|
-
let i =
|
|
2561
|
+
let i = jr(e) ?? 0;
|
|
2340
2562
|
switch (e.options.staggerFrom) {
|
|
2341
2563
|
case "last": return r + (n - 1 - t) * i;
|
|
2342
2564
|
case "center": return r + Math.abs(t - (n - 1) / 2) * i;
|
|
@@ -2344,55 +2566,55 @@ function yr(e, t, n, r = e.options.delay ?? 0) {
|
|
|
2344
2566
|
default: return r + t * i;
|
|
2345
2567
|
}
|
|
2346
2568
|
}
|
|
2347
|
-
function
|
|
2569
|
+
function Pr(e) {
|
|
2348
2570
|
let t = e.closest("[data-scroll-root]");
|
|
2349
2571
|
if (t) return t;
|
|
2350
2572
|
for (let t = e.parentElement; t; t = t.parentElement) if (/auto|scroll|overlay/.test(getComputedStyle(t).overflowY) && t.scrollHeight > t.clientHeight) return t;
|
|
2351
2573
|
}
|
|
2352
|
-
function
|
|
2574
|
+
function Fr(e) {
|
|
2353
2575
|
return Math.min(1, Math.max(0, e));
|
|
2354
2576
|
}
|
|
2355
|
-
function
|
|
2356
|
-
let { options: r } = e, i = t.container.height, a = t.distance || 1, o = Math.max(a - i, 0), s =
|
|
2577
|
+
function Ir(e, t, n) {
|
|
2578
|
+
let { options: r } = e, i = t.container.height, a = t.distance || 1, o = Math.max(a - i, 0), s = xr[r.scrollAnchor ?? "top"], c = Fr((r.scrollTarget ?? 50) / 100), l = (e, t) => (i + e * o - t * i) / a, u = l(s, 1), d = l(s, c), f = Math.max(d - u, 1e-4);
|
|
2357
2579
|
if (r.scrollMode === "hold") {
|
|
2358
2580
|
let e = l(s, Math.max(c, 1 - c)), t = l(1 - s, Math.min(c, 1 - c)), r = l(1 - s, 0);
|
|
2359
|
-
return n < e ?
|
|
2581
|
+
return n < e ? Fr((n - u) / Math.max(e - u, 1e-4)) : n <= t ? 1 : Fr((r - n) / Math.max(r - t, 1e-4));
|
|
2360
2582
|
}
|
|
2361
|
-
return
|
|
2583
|
+
return Dr(e) ? n < d ? .5 * Fr((n - u) / f) : .5 + .5 * Math.min(1, (n - d) / f / Sr) : Fr((n - u) / f);
|
|
2362
2584
|
}
|
|
2363
|
-
function
|
|
2364
|
-
let t =
|
|
2585
|
+
function Lr(e) {
|
|
2586
|
+
let t = Pr(e.element), n = gn({
|
|
2365
2587
|
container: t,
|
|
2366
2588
|
enter: "end start",
|
|
2367
2589
|
leave: "start end",
|
|
2368
|
-
sync: (t) =>
|
|
2590
|
+
sync: (t) => Ir(e, n, t),
|
|
2369
2591
|
target: e.element
|
|
2370
2592
|
});
|
|
2371
|
-
return
|
|
2593
|
+
return Rr(e, n, t), n;
|
|
2372
2594
|
}
|
|
2373
|
-
function
|
|
2595
|
+
function Rr({ controller: e, element: t }, n, r) {
|
|
2374
2596
|
let i = new ResizeObserver(() => n.container.refresh());
|
|
2375
2597
|
i.observe(t), [...(r ?? document.body).children].forEach((e) => i.observe(e)), e.cleanups.push(() => i.disconnect());
|
|
2376
2598
|
}
|
|
2377
|
-
function
|
|
2599
|
+
function zr(e) {
|
|
2378
2600
|
switch (e.trigger) {
|
|
2379
2601
|
case "mount": return !0;
|
|
2380
2602
|
case "visible": return e.controller.revealed;
|
|
2381
|
-
case "scroll": return
|
|
2603
|
+
case "scroll": return Lr(e);
|
|
2382
2604
|
default: return !1;
|
|
2383
2605
|
}
|
|
2384
2606
|
}
|
|
2385
|
-
function
|
|
2607
|
+
function Br(e) {
|
|
2386
2608
|
let t = new IntersectionObserver((n) => {
|
|
2387
|
-
n.some((e) => e.isIntersecting) && (t.disconnect(), e.controller.revealed = !0,
|
|
2609
|
+
n.some((e) => e.isIntersecting) && (t.disconnect(), e.controller.revealed = !0, ui(e.controller));
|
|
2388
2610
|
});
|
|
2389
2611
|
t.observe(e.element), e.controller.cleanups.push(() => t.disconnect());
|
|
2390
2612
|
}
|
|
2391
|
-
var
|
|
2392
|
-
function
|
|
2613
|
+
var Vr = /-?\d[\d,]*(\.\d+)?/;
|
|
2614
|
+
function Hr(e, t) {
|
|
2393
2615
|
let n = document.createTreeWalker(e, NodeFilter.SHOW_TEXT);
|
|
2394
2616
|
for (let e = n.nextNode(); e; e = n.nextNode()) {
|
|
2395
|
-
let n = e, r =
|
|
2617
|
+
let n = e, r = Vr.exec(n.data);
|
|
2396
2618
|
if (r) return {
|
|
2397
2619
|
decimals: r[1] ? r[1].length - 1 : 0,
|
|
2398
2620
|
from: t,
|
|
@@ -2407,7 +2629,7 @@ function Or(e, t) {
|
|
|
2407
2629
|
};
|
|
2408
2630
|
}
|
|
2409
2631
|
}
|
|
2410
|
-
function
|
|
2632
|
+
function Ur(e) {
|
|
2411
2633
|
let t = e.value.toLocaleString("en-US", {
|
|
2412
2634
|
maximumFractionDigits: e.decimals,
|
|
2413
2635
|
minimumFractionDigits: e.decimals,
|
|
@@ -2415,24 +2637,33 @@ function kr(e) {
|
|
|
2415
2637
|
});
|
|
2416
2638
|
e.rendered = e.prefix + t + e.suffix, e.node.data = e.rendered;
|
|
2417
2639
|
}
|
|
2418
|
-
function
|
|
2640
|
+
function Wr(e) {
|
|
2419
2641
|
e.node.data === e.rendered && (e.node.data = e.original);
|
|
2420
2642
|
}
|
|
2421
|
-
function
|
|
2422
|
-
let r = (Array.isArray(n) ? n : [n]).map((e) =>
|
|
2423
|
-
return e.cleanups.push(() => r.forEach(
|
|
2643
|
+
function Gr({ controller: e, options: t }, n) {
|
|
2644
|
+
let r = (Array.isArray(n) ? n : [n]).map((e) => Hr(e, t.countFrom ?? 0)).filter((e) => !!e);
|
|
2645
|
+
return e.cleanups.push(() => r.forEach(Wr)), r;
|
|
2424
2646
|
}
|
|
2425
|
-
function
|
|
2647
|
+
function Kr(e, t) {
|
|
2426
2648
|
return Jt(e, {
|
|
2427
2649
|
...t,
|
|
2428
|
-
onUpdate: () => e.forEach(
|
|
2650
|
+
onUpdate: () => e.forEach(Ur),
|
|
2429
2651
|
value: {
|
|
2430
2652
|
from: (t, n) => e[n].from,
|
|
2431
2653
|
to: (t, n) => e[n].to
|
|
2432
2654
|
}
|
|
2433
2655
|
});
|
|
2434
2656
|
}
|
|
2435
|
-
function
|
|
2657
|
+
function qr(e, t, n, r) {
|
|
2658
|
+
return t.keyframes ? Dn.animate(e, {
|
|
2659
|
+
...t.keyframes,
|
|
2660
|
+
...n
|
|
2661
|
+
}) : Jt(e, {
|
|
2662
|
+
...Tr(t, r),
|
|
2663
|
+
...n
|
|
2664
|
+
});
|
|
2665
|
+
}
|
|
2666
|
+
function Jr(e) {
|
|
2436
2667
|
return e instanceof HTMLElement && ![
|
|
2437
2668
|
"LINK",
|
|
2438
2669
|
"META",
|
|
@@ -2441,16 +2672,16 @@ function Nr(e) {
|
|
|
2441
2672
|
"TEMPLATE"
|
|
2442
2673
|
].includes(e.tagName);
|
|
2443
2674
|
}
|
|
2444
|
-
function
|
|
2445
|
-
return [...e.children].filter(
|
|
2675
|
+
function Yr(e) {
|
|
2676
|
+
return [...e.children].filter(Jr);
|
|
2446
2677
|
}
|
|
2447
|
-
function
|
|
2678
|
+
function Xr(e) {
|
|
2448
2679
|
return e.sort((e, t) => e.element.compareDocumentPosition(t.element) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1);
|
|
2449
2680
|
}
|
|
2450
|
-
function
|
|
2451
|
-
return
|
|
2681
|
+
function Zr({ controller: e, element: t }) {
|
|
2682
|
+
return Cr.get(t) === e;
|
|
2452
2683
|
}
|
|
2453
|
-
function
|
|
2684
|
+
function Qr({ controller: e }, t) {
|
|
2454
2685
|
for (let n of Array.isArray(t) ? t : [t]) {
|
|
2455
2686
|
if (getComputedStyle(n).display !== "inline") continue;
|
|
2456
2687
|
let t = n.style.display;
|
|
@@ -2459,117 +2690,114 @@ function Lr({ controller: e }, t) {
|
|
|
2459
2690
|
});
|
|
2460
2691
|
}
|
|
2461
2692
|
}
|
|
2462
|
-
function
|
|
2463
|
-
let { controller: i, options: a, preset: o, reduced: s } = e, c =
|
|
2464
|
-
o.count ||
|
|
2693
|
+
function $r(e, t, n, r = zr(e)) {
|
|
2694
|
+
let { controller: i, options: a, preset: o, reduced: s } = e, c = Dr(e), l = o.count ? Gr(e, t) : [];
|
|
2695
|
+
o.count || Qr(e, t);
|
|
2465
2696
|
let u = {
|
|
2466
2697
|
alternate: a.alternate ?? o.alternate ?? !1,
|
|
2467
2698
|
autoplay: r,
|
|
2468
2699
|
delay: n,
|
|
2469
|
-
duration: s ? 0 : a.duration ?? o.duration ??
|
|
2470
|
-
ease: a.ease ?? (c ? "linear" : o.ease ??
|
|
2471
|
-
loop:
|
|
2472
|
-
}, d = o.count ?
|
|
2473
|
-
|
|
2474
|
-
...u
|
|
2475
|
-
});
|
|
2476
|
-
return l.forEach(kr), e.trigger === "visible" && !r && d.seek(0), i.animations.push(d), d;
|
|
2700
|
+
duration: s ? 0 : a.duration ?? o.duration ?? _r.duration,
|
|
2701
|
+
ease: a.ease ?? (c ? "linear" : o.ease ?? _r.ease),
|
|
2702
|
+
loop: Ar(e)
|
|
2703
|
+
}, d = o.count ? Kr(l, u) : qr(t, o, u, c);
|
|
2704
|
+
return l.forEach(Ur), e.trigger === "visible" && !r && d.seek(0), i.animations.push(d), d;
|
|
2477
2705
|
}
|
|
2478
|
-
function
|
|
2706
|
+
function ei({ controller: e, element: t }, n) {
|
|
2479
2707
|
let r = new MutationObserver((e) => {
|
|
2480
|
-
let t = e.flatMap((e) => [...e.addedNodes]).filter(
|
|
2481
|
-
(t.length || e.some((e) => [...e.removedNodes].some(
|
|
2708
|
+
let t = e.flatMap((e) => [...e.addedNodes]).filter(Jr);
|
|
2709
|
+
(t.length || e.some((e) => [...e.removedNodes].some(Jr))) && n(t);
|
|
2482
2710
|
});
|
|
2483
2711
|
r.observe(t, { childList: !0 }), e.cleanups.push(() => r.disconnect());
|
|
2484
2712
|
}
|
|
2485
|
-
function
|
|
2486
|
-
|
|
2487
|
-
t.length &&
|
|
2488
|
-
}),
|
|
2713
|
+
function ti(e) {
|
|
2714
|
+
$r(e, Yr(e.element), Mr(e)), ei(e, (t) => {
|
|
2715
|
+
t.length && $r(e, t, Mr(e, 0));
|
|
2716
|
+
}), pi(e);
|
|
2489
2717
|
}
|
|
2490
|
-
function
|
|
2718
|
+
function ni(e) {
|
|
2491
2719
|
let t = new Map(e.map((e) => [e.element, e])), n = new IntersectionObserver((e) => {
|
|
2492
|
-
let r =
|
|
2720
|
+
let r = Xr(e.filter((e) => e.isIntersecting).map((e) => t.get(e.target)).filter((e) => !!e && Zr(e)));
|
|
2493
2721
|
r.forEach((e, t) => {
|
|
2494
2722
|
n.unobserve(e.element);
|
|
2495
|
-
let i = setTimeout(() =>
|
|
2723
|
+
let i = setTimeout(() => ui(e.controller), Nr(e, t, r.length, 0));
|
|
2496
2724
|
e.controller.cleanups.push(() => clearTimeout(i));
|
|
2497
2725
|
});
|
|
2498
2726
|
});
|
|
2499
|
-
for (let t of e)
|
|
2727
|
+
for (let t of e) $r(t, t.element, t.options.delay ?? 0, !1), n.observe(t.element), t.controller.cleanups.push(() => n.unobserve(t.element));
|
|
2500
2728
|
}
|
|
2501
|
-
var
|
|
2502
|
-
function
|
|
2503
|
-
return e ? (
|
|
2729
|
+
var ri = /* @__PURE__ */ new WeakMap(), ii = 0, ai = /* @__PURE__ */ new Map();
|
|
2730
|
+
function oi(e) {
|
|
2731
|
+
return e ? (ri.has(e) || ri.set(e, ii++), String(ri.get(e))) : "none";
|
|
2504
2732
|
}
|
|
2505
|
-
function
|
|
2506
|
-
|
|
2507
|
-
let t = `${
|
|
2508
|
-
|
|
2733
|
+
function si(e) {
|
|
2734
|
+
ai.size || queueMicrotask(ci);
|
|
2735
|
+
let t = `${oi(e.element.parentElement)}/${e.controller.key}`;
|
|
2736
|
+
ai.set(t, [...ai.get(t) ?? [], e]);
|
|
2509
2737
|
}
|
|
2510
|
-
function
|
|
2511
|
-
let e = [...
|
|
2512
|
-
|
|
2738
|
+
function ci() {
|
|
2739
|
+
let e = [...ai.values()];
|
|
2740
|
+
ai = /* @__PURE__ */ new Map();
|
|
2513
2741
|
for (let t of e) {
|
|
2514
|
-
let e =
|
|
2515
|
-
e.length === 1 ?
|
|
2742
|
+
let e = Xr(t.filter(Zr));
|
|
2743
|
+
e.length === 1 ? ti(e[0]) : e[0]?.trigger === "visible" ? ni(e) : e.forEach((t, n) => $r(t, t.element, Nr(t, n, e.length)));
|
|
2516
2744
|
}
|
|
2517
2745
|
}
|
|
2518
|
-
function
|
|
2746
|
+
function li({ controller: e, element: t }, n, r) {
|
|
2519
2747
|
for (let i of n) t.addEventListener(i, r), e.cleanups.push(() => t.removeEventListener(i, r));
|
|
2520
2748
|
}
|
|
2521
|
-
function
|
|
2749
|
+
function ui(e) {
|
|
2522
2750
|
e.animations.forEach((e) => e.play());
|
|
2523
2751
|
}
|
|
2524
|
-
function
|
|
2752
|
+
function di(e) {
|
|
2525
2753
|
e.animations.forEach((t) => e.looping ? t.pause().seek(0) : t.reverse());
|
|
2526
2754
|
}
|
|
2527
|
-
function
|
|
2755
|
+
function fi(e, t, n) {
|
|
2528
2756
|
if (e.state !== t) {
|
|
2529
2757
|
if (e.state = t, n && !e.looping) {
|
|
2530
2758
|
e.animations.forEach((e) => e.seek(t ? e.duration : 0));
|
|
2531
2759
|
return;
|
|
2532
2760
|
}
|
|
2533
|
-
t ?
|
|
2761
|
+
t ? ui(e) : di(e);
|
|
2534
2762
|
}
|
|
2535
2763
|
}
|
|
2536
|
-
function
|
|
2764
|
+
function pi(e) {
|
|
2537
2765
|
let { controller: t, options: n, trigger: r } = e;
|
|
2538
2766
|
switch (r) {
|
|
2539
2767
|
case "hover":
|
|
2540
|
-
|
|
2768
|
+
li(e, ["pointerenter"], () => ui(t)), li(e, ["pointerleave"], () => di(t));
|
|
2541
2769
|
break;
|
|
2542
2770
|
case "press":
|
|
2543
|
-
|
|
2771
|
+
li(e, ["pointerdown"], () => ui(t)), li(e, [
|
|
2544
2772
|
"pointerup",
|
|
2545
2773
|
"pointerleave",
|
|
2546
2774
|
"pointercancel"
|
|
2547
|
-
], () =>
|
|
2775
|
+
], () => di(t));
|
|
2548
2776
|
break;
|
|
2549
2777
|
case "focus":
|
|
2550
|
-
|
|
2778
|
+
li(e, ["focusin"], () => ui(t)), li(e, ["focusout"], () => di(t));
|
|
2551
2779
|
break;
|
|
2552
2780
|
case "state":
|
|
2553
|
-
|
|
2781
|
+
fi(t, !!n.state, !0);
|
|
2554
2782
|
return;
|
|
2555
2783
|
case "visible":
|
|
2556
|
-
|
|
2784
|
+
Br(e);
|
|
2557
2785
|
return;
|
|
2558
2786
|
default: return;
|
|
2559
2787
|
}
|
|
2560
2788
|
t.animations.forEach((e) => e.seek(0));
|
|
2561
2789
|
}
|
|
2562
|
-
function
|
|
2563
|
-
|
|
2790
|
+
function mi(e, t) {
|
|
2791
|
+
hi(e);
|
|
2564
2792
|
let n = {
|
|
2565
2793
|
animations: [],
|
|
2566
2794
|
cleanups: [],
|
|
2567
|
-
key:
|
|
2795
|
+
key: kr(t),
|
|
2568
2796
|
looping: !1,
|
|
2569
2797
|
revealed: !1
|
|
2570
2798
|
};
|
|
2571
|
-
|
|
2572
|
-
let r =
|
|
2799
|
+
Cr.set(e, n);
|
|
2800
|
+
let r = Er(t), i = Or();
|
|
2573
2801
|
if (!r || i && (r.loop || t.trigger === "scroll")) return;
|
|
2574
2802
|
let a = {
|
|
2575
2803
|
controller: n,
|
|
@@ -2579,52 +2807,52 @@ function $r(e, t) {
|
|
|
2579
2807
|
reduced: i,
|
|
2580
2808
|
trigger: i && t.trigger === "visible" ? "mount" : t.trigger
|
|
2581
2809
|
};
|
|
2582
|
-
if (n.looping =
|
|
2583
|
-
else if (t.stagger === void 0)
|
|
2810
|
+
if (n.looping = Ar(a) === !0, t.split && !r.count) n.splitter = er(e, { [t.split]: !0 }), $r(a, n.splitter[t.split], Mr(a));
|
|
2811
|
+
else if (t.stagger === void 0) $r(a, e, Mr(a));
|
|
2584
2812
|
else if (a.trigger === "mount" || a.trigger === "visible") {
|
|
2585
|
-
|
|
2813
|
+
si(a);
|
|
2586
2814
|
return;
|
|
2587
|
-
} else
|
|
2588
|
-
|
|
2815
|
+
} else $r(a, Yr(e), Mr(a)), ei(a, () => mi(e, t));
|
|
2816
|
+
pi(a);
|
|
2589
2817
|
}
|
|
2590
|
-
function
|
|
2591
|
-
let t =
|
|
2592
|
-
t && (t.cleanups.forEach((e) => e()), t.animations.forEach((e) => e.revert()), t.splitter?.revert(),
|
|
2818
|
+
function hi(e) {
|
|
2819
|
+
let t = Cr.get(e);
|
|
2820
|
+
t && (t.cleanups.forEach((e) => e()), t.animations.forEach((e) => e.revert()), t.splitter?.revert(), Cr.delete(e));
|
|
2593
2821
|
}
|
|
2594
|
-
function
|
|
2822
|
+
function gi(e) {
|
|
2595
2823
|
for (let t of e) {
|
|
2596
|
-
let e =
|
|
2597
|
-
e &&
|
|
2824
|
+
let e = wr.get(t);
|
|
2825
|
+
e && mi(t, e);
|
|
2598
2826
|
}
|
|
2599
2827
|
}
|
|
2600
|
-
var
|
|
2828
|
+
var _i = {
|
|
2601
2829
|
mounted(e, { value: t }) {
|
|
2602
|
-
|
|
2830
|
+
wr.set(e, t), mi(e, t);
|
|
2831
|
+
},
|
|
2832
|
+
unmounted(e) {
|
|
2833
|
+
wr.delete(e), hi(e);
|
|
2603
2834
|
},
|
|
2604
2835
|
updated(e, { value: t }) {
|
|
2605
|
-
|
|
2606
|
-
let n =
|
|
2607
|
-
if (!n || n.key !==
|
|
2608
|
-
|
|
2836
|
+
wr.set(e, t);
|
|
2837
|
+
let n = Cr.get(e);
|
|
2838
|
+
if (!n || n.key !== kr(t)) {
|
|
2839
|
+
mi(e, t);
|
|
2609
2840
|
return;
|
|
2610
2841
|
}
|
|
2611
|
-
t.trigger === "state" &&
|
|
2612
|
-
},
|
|
2613
|
-
unmounted(e) {
|
|
2614
|
-
ur.delete(e), ei(e);
|
|
2842
|
+
t.trigger === "state" && fi(n, !!t.state, !1);
|
|
2615
2843
|
}
|
|
2616
2844
|
};
|
|
2617
|
-
function
|
|
2845
|
+
function vi(n) {
|
|
2618
2846
|
return e((e, { slots: a }) => {
|
|
2619
2847
|
let o = r();
|
|
2620
2848
|
return i((t) => {
|
|
2621
|
-
if (!o.value || !
|
|
2622
|
-
let r = n ? o.value.closest("[data-scroll-root]") ?? void 0 :
|
|
2849
|
+
if (!o.value || !_r.smoothScroll || Or()) return;
|
|
2850
|
+
let r = n ? o.value.closest("[data-scroll-root]") ?? void 0 : Pr(o.value);
|
|
2623
2851
|
if (n && !r) return;
|
|
2624
|
-
let i = new
|
|
2852
|
+
let i = new hr({
|
|
2625
2853
|
autoRaf: !0,
|
|
2626
2854
|
content: r ? o.value : void 0,
|
|
2627
|
-
lerp: e.lerp ??
|
|
2855
|
+
lerp: e.lerp ?? _r.smoothScrollLerp,
|
|
2628
2856
|
wrapper: r
|
|
2629
2857
|
});
|
|
2630
2858
|
t(() => i.destroy());
|
|
@@ -2634,6 +2862,6 @@ function ri(n) {
|
|
|
2634
2862
|
props: { lerp: Number }
|
|
2635
2863
|
});
|
|
2636
2864
|
}
|
|
2637
|
-
var
|
|
2865
|
+
var yi = vi(!1);
|
|
2638
2866
|
//#endregion
|
|
2639
|
-
export {
|
|
2867
|
+
export { _r as a, _i as c, vi as i, jt as l, vr as n, yr as o, gr as r, gi as s, yi as t };
|