@ptlm-azulejo/segmented-control 0.0.1-alpha.23 → 0.0.1-alpha.25
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/CHANGELOG.md +3 -0
- package/dist/index.js +1136 -1123
- package/dist/index.umd.cjs +1 -1
- package/dist/src/index.vue.d.ts.map +1 -1
- package/dist/src/useSegmentedControl.d.ts +1 -1
- package/dist/src/useSegmentedControl.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var Yo = Object.defineProperty, Xo = Object.defineProperties;
|
|
2
|
+
var qo = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Kt = Object.getOwnPropertySymbols;
|
|
4
4
|
var Dn = Object.prototype.hasOwnProperty, Rn = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var de = Math.pow, Mn = (t, e, n) => e in t ? Yo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, g = (t, e) => {
|
|
6
6
|
for (var n in e || (e = {}))
|
|
7
7
|
Dn.call(e, n) && Mn(t, n, e[n]);
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
8
|
+
if (Kt)
|
|
9
|
+
for (var n of Kt(e))
|
|
10
10
|
Rn.call(e, n) && Mn(t, n, e[n]);
|
|
11
11
|
return t;
|
|
12
|
-
}, E = (t, e) =>
|
|
12
|
+
}, E = (t, e) => Xo(t, qo(e));
|
|
13
13
|
var U = (t, e) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var i in t)
|
|
16
16
|
Dn.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
|
|
17
|
-
if (t != null &&
|
|
18
|
-
for (var i of
|
|
17
|
+
if (t != null && Kt)
|
|
18
|
+
for (var i of Kt(t))
|
|
19
19
|
e.indexOf(i) < 0 && Rn.call(t, i) && (n[i] = t[i]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
import { inject as
|
|
22
|
+
import { inject as Zo, provide as Jo, watch as Qo, computed as qt, ref as us, useAttrs as tr, getCurrentInstance as er, onBeforeMount as nr, onMounted as ir, onBeforeUnmount as sr, onUnmounted as or, onBeforeUpdate as rr, onUpdated as ar, defineComponent as cs, h as hs, Comment as lr, mergeProps as ur, cloneVNode as cr, toRef as pe, openBlock as Wt, createElementBlock as me, normalizeStyle as ge, normalizeClass as Gt, createBlock as hr, unref as ct, createCommentVNode as fr, Fragment as dr, renderList as pr, createElementVNode as mr, toDisplayString as gr } from "vue";
|
|
23
23
|
const zt = [
|
|
24
24
|
"setup",
|
|
25
25
|
// Compute
|
|
@@ -38,7 +38,7 @@ const zt = [
|
|
|
38
38
|
"postRender"
|
|
39
39
|
// Compute
|
|
40
40
|
];
|
|
41
|
-
function
|
|
41
|
+
function yr(t, e) {
|
|
42
42
|
let n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = !1, r = !1;
|
|
43
43
|
const o = /* @__PURE__ */ new WeakSet();
|
|
44
44
|
let a = {
|
|
@@ -53,8 +53,8 @@ function gr(t, e) {
|
|
|
53
53
|
/**
|
|
54
54
|
* Schedule a process to run on the next frame.
|
|
55
55
|
*/
|
|
56
|
-
schedule: (u, h = !1,
|
|
57
|
-
const p =
|
|
56
|
+
schedule: (u, h = !1, d = !1) => {
|
|
57
|
+
const p = d && s ? n : i;
|
|
58
58
|
return h && o.add(u), p.has(u) || p.add(u), u;
|
|
59
59
|
},
|
|
60
60
|
/**
|
|
@@ -76,50 +76,50 @@ function gr(t, e) {
|
|
|
76
76
|
};
|
|
77
77
|
return c;
|
|
78
78
|
}
|
|
79
|
-
const J = {},
|
|
80
|
-
function
|
|
79
|
+
const J = {}, vr = 40;
|
|
80
|
+
function fs(t, e) {
|
|
81
81
|
let n = !1, i = !0;
|
|
82
82
|
const s = {
|
|
83
83
|
delta: 0,
|
|
84
84
|
timestamp: 0,
|
|
85
85
|
isProcessing: !1
|
|
86
|
-
}, r = () => n = !0, o = zt.reduce((T,
|
|
86
|
+
}, r = () => n = !0, o = zt.reduce((T, S) => (T[S] = yr(r), T), {}), { setup: a, read: l, resolveKeyframes: c, preUpdate: u, update: h, preRender: d, render: f, postRender: p } = o, m = () => {
|
|
87
87
|
const T = J.useManualTiming ? s.timestamp : performance.now();
|
|
88
|
-
n = !1, J.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(T - s.timestamp,
|
|
88
|
+
n = !1, J.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(T - s.timestamp, vr), 1)), s.timestamp = T, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), h.process(s), d.process(s), f.process(s), p.process(s), s.isProcessing = !1, n && e && (i = !1, t(m));
|
|
89
89
|
}, y = () => {
|
|
90
90
|
n = !0, i = !0, s.isProcessing || t(m);
|
|
91
91
|
};
|
|
92
|
-
return { schedule: zt.reduce((T,
|
|
93
|
-
const
|
|
94
|
-
return T[
|
|
92
|
+
return { schedule: zt.reduce((T, S) => {
|
|
93
|
+
const b = o[S];
|
|
94
|
+
return T[S] = (A, V = !1, P = !1) => (n || y(), b.schedule(A, V, P)), T;
|
|
95
95
|
}, {}), cancel: (T) => {
|
|
96
|
-
for (let
|
|
97
|
-
o[zt[
|
|
96
|
+
for (let S = 0; S < zt.length; S++)
|
|
97
|
+
o[zt[S]].cancel(T);
|
|
98
98
|
}, state: s, steps: o };
|
|
99
99
|
}
|
|
100
|
-
const _ = /* @__NO_SIDE_EFFECTS__ */ (t) => t, { schedule: C, cancel: Q, state: F, steps: ye } = /* @__PURE__ */
|
|
101
|
-
let
|
|
102
|
-
function
|
|
103
|
-
|
|
100
|
+
const _ = /* @__NO_SIDE_EFFECTS__ */ (t) => t, { schedule: C, cancel: Q, state: F, steps: ye } = /* @__PURE__ */ fs(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : _, !0);
|
|
101
|
+
let Zt;
|
|
102
|
+
function xr() {
|
|
103
|
+
Zt = void 0;
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
now: () => (
|
|
105
|
+
const j = {
|
|
106
|
+
now: () => (Zt === void 0 && j.set(F.isProcessing || J.useManualTiming ? F.timestamp : performance.now()), Zt),
|
|
107
107
|
set: (t) => {
|
|
108
|
-
|
|
108
|
+
Zt = t, queueMicrotask(xr);
|
|
109
109
|
}
|
|
110
110
|
}, G = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, N = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
|
|
111
111
|
function br(t, e) {
|
|
112
|
-
const n =
|
|
112
|
+
const n = j.now(), i = ({ timestamp: s }) => {
|
|
113
113
|
const r = s - n;
|
|
114
114
|
r >= e && (Q(i), t(r - e));
|
|
115
115
|
};
|
|
116
116
|
return C.setup(i, !0), () => Q(i);
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const Ot = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
119
119
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
120
120
|
parse: parseFloat,
|
|
121
121
|
transform: (e) => `${e}${t}`
|
|
122
|
-
}), nt = /* @__PURE__ */
|
|
122
|
+
}), nt = /* @__PURE__ */ Ot("deg"), Y = /* @__PURE__ */ Ot("%"), x = /* @__PURE__ */ Ot("px"), Tr = /* @__PURE__ */ Ot("vh"), Sr = /* @__PURE__ */ Ot("vw"), Ln = E(g({}, Y), {
|
|
123
123
|
parse: (t) => Y.parse(t) / 100,
|
|
124
124
|
transform: (t) => Y.transform(t * 100)
|
|
125
125
|
});
|
|
@@ -131,7 +131,7 @@ const H = {
|
|
|
131
131
|
if (!e.target)
|
|
132
132
|
return t;
|
|
133
133
|
if (typeof t == "string")
|
|
134
|
-
if (
|
|
134
|
+
if (x.test(t))
|
|
135
135
|
t = parseFloat(t);
|
|
136
136
|
else
|
|
137
137
|
return t;
|
|
@@ -142,15 +142,15 @@ const H = {
|
|
|
142
142
|
test: (t) => typeof t == "number",
|
|
143
143
|
parse: parseFloat,
|
|
144
144
|
transform: (t) => t
|
|
145
|
-
},
|
|
145
|
+
}, Lt = E(g({}, vt), {
|
|
146
146
|
transform: (t) => X(0, 1, t)
|
|
147
147
|
}), Ht = E(g({}, vt), {
|
|
148
148
|
default: 1
|
|
149
|
-
}),
|
|
150
|
-
function
|
|
149
|
+
}), Ct = (t) => Math.round(t * 1e5) / 1e5, qe = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
150
|
+
function wr(t) {
|
|
151
151
|
return t == null;
|
|
152
152
|
}
|
|
153
|
-
const
|
|
153
|
+
const Ar = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Ze = (t, e) => (n) => !!(typeof n == "string" && Ar.test(n) && n.startsWith(t) || e && !wr(n) && Object.prototype.hasOwnProperty.call(n, e)), ds = (t, e, n) => (i) => {
|
|
154
154
|
if (typeof i != "string")
|
|
155
155
|
return i;
|
|
156
156
|
const [s, r, o, a] = i.match(qe);
|
|
@@ -160,14 +160,14 @@ const wr = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
160
160
|
[n]: parseFloat(o),
|
|
161
161
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
162
162
|
};
|
|
163
|
-
},
|
|
164
|
-
transform: (t) => Math.round(
|
|
163
|
+
}, Pr = (t) => X(0, 255, t), ve = E(g({}, vt), {
|
|
164
|
+
transform: (t) => Math.round(Pr(t))
|
|
165
165
|
}), rt = {
|
|
166
166
|
test: /* @__PURE__ */ Ze("rgb", "red"),
|
|
167
|
-
parse: /* @__PURE__ */
|
|
168
|
-
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + ve.transform(t) + ", " + ve.transform(e) + ", " + ve.transform(n) + ", " +
|
|
167
|
+
parse: /* @__PURE__ */ ds("red", "green", "blue"),
|
|
168
|
+
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + ve.transform(t) + ", " + ve.transform(e) + ", " + ve.transform(n) + ", " + Ct(Lt.transform(i)) + ")"
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function Er(t) {
|
|
171
171
|
let e = "", n = "", i = "", s = "";
|
|
172
172
|
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), i = t.substring(5, 7), s = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), i = t.substring(3, 4), s = t.substring(4, 5), e += e, n += n, i += i, s += s), {
|
|
173
173
|
red: parseInt(e, 16),
|
|
@@ -178,12 +178,12 @@ function Pr(t) {
|
|
|
178
178
|
}
|
|
179
179
|
const Re = {
|
|
180
180
|
test: /* @__PURE__ */ Ze("#"),
|
|
181
|
-
parse:
|
|
181
|
+
parse: Er,
|
|
182
182
|
transform: rt.transform
|
|
183
183
|
}, ht = {
|
|
184
184
|
test: /* @__PURE__ */ Ze("hsl", "hue"),
|
|
185
|
-
parse: /* @__PURE__ */
|
|
186
|
-
transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + Y.transform(
|
|
185
|
+
parse: /* @__PURE__ */ ds("hue", "saturation", "lightness"),
|
|
186
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + Y.transform(Ct(e)) + ", " + Y.transform(Ct(n)) + ", " + Ct(Lt.transform(i)) + ")"
|
|
187
187
|
}, R = {
|
|
188
188
|
test: (t) => rt.test(t) || Re.test(t) || ht.test(t),
|
|
189
189
|
parse: (t) => rt.test(t) ? rt.parse(t) : ht.test(t) ? ht.parse(t) : Re.parse(t),
|
|
@@ -192,48 +192,48 @@ const Re = {
|
|
|
192
192
|
const e = R.parse(t);
|
|
193
193
|
return e.alpha = 0, R.transform(e);
|
|
194
194
|
}
|
|
195
|
-
},
|
|
196
|
-
function
|
|
195
|
+
}, Vr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
196
|
+
function Cr(t) {
|
|
197
197
|
var e, n;
|
|
198
|
-
return isNaN(t) && typeof t == "string" && (((e = t.match(qe)) == null ? void 0 : e.length) || 0) + (((n = t.match(
|
|
198
|
+
return isNaN(t) && typeof t == "string" && (((e = t.match(qe)) == null ? void 0 : e.length) || 0) + (((n = t.match(Vr)) == null ? void 0 : n.length) || 0) > 0;
|
|
199
199
|
}
|
|
200
|
-
const
|
|
201
|
-
function
|
|
200
|
+
const ps = "number", ms = "color", Mr = "var", Dr = "var(", kn = "${}", Rr = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
201
|
+
function Bt(t) {
|
|
202
202
|
const e = t.toString(), n = [], i = {
|
|
203
203
|
color: [],
|
|
204
204
|
number: [],
|
|
205
205
|
var: []
|
|
206
206
|
}, s = [];
|
|
207
207
|
let r = 0;
|
|
208
|
-
const a = e.replace(
|
|
208
|
+
const a = e.replace(Rr, (l) => (R.test(l) ? (i.color.push(r), s.push(ms), n.push(R.parse(l))) : l.startsWith(Dr) ? (i.var.push(r), s.push(Mr), n.push(l)) : (i.number.push(r), s.push(ps), n.push(parseFloat(l))), ++r, kn)).split(kn);
|
|
209
209
|
return { values: n, split: a, indexes: i, types: s };
|
|
210
210
|
}
|
|
211
|
-
function ms(t) {
|
|
212
|
-
return kt(t).values;
|
|
213
|
-
}
|
|
214
211
|
function gs(t) {
|
|
215
|
-
|
|
212
|
+
return Bt(t).values;
|
|
213
|
+
}
|
|
214
|
+
function ys(t) {
|
|
215
|
+
const { split: e, types: n } = Bt(t), i = e.length;
|
|
216
216
|
return (s) => {
|
|
217
217
|
let r = "";
|
|
218
218
|
for (let o = 0; o < i; o++)
|
|
219
219
|
if (r += e[o], s[o] !== void 0) {
|
|
220
220
|
const a = n[o];
|
|
221
|
-
a ===
|
|
221
|
+
a === ps ? r += Ct(s[o]) : a === ms ? r += R.transform(s[o]) : r += s[o];
|
|
222
222
|
}
|
|
223
223
|
return r;
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
|
-
const
|
|
227
|
-
function
|
|
228
|
-
const e =
|
|
229
|
-
return
|
|
226
|
+
const Lr = (t) => typeof t == "number" ? 0 : R.test(t) ? R.getAnimatableNone(t) : t;
|
|
227
|
+
function Br(t) {
|
|
228
|
+
const e = gs(t);
|
|
229
|
+
return ys(t)(e.map(Lr));
|
|
230
230
|
}
|
|
231
231
|
const st = {
|
|
232
|
-
test:
|
|
233
|
-
parse:
|
|
234
|
-
createTransformer:
|
|
235
|
-
getAnimatableNone:
|
|
236
|
-
}, M = (t, e, n) => t + (e - t) * n,
|
|
232
|
+
test: Cr,
|
|
233
|
+
parse: gs,
|
|
234
|
+
createTransformer: ys,
|
|
235
|
+
getAnimatableNone: Br
|
|
236
|
+
}, M = (t, e, n) => t + (e - t) * n, vs = {
|
|
237
237
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
238
238
|
const i = t, s = st.parse(t);
|
|
239
239
|
if (s.length > 5)
|
|
@@ -243,11 +243,11 @@ const st = {
|
|
|
243
243
|
const c = M(a, l, 0.5);
|
|
244
244
|
return typeof s[2 + o] == "number" && (s[2 + o] /= c), typeof s[3 + o] == "number" && (s[3 + o] /= c), r(s);
|
|
245
245
|
}
|
|
246
|
-
},
|
|
246
|
+
}, xs = (t) => (e) => typeof e == "string" && e.startsWith(t), Je = /* @__PURE__ */ xs("--"), kr = /* @__PURE__ */ xs("var(--"), Qe = (t) => kr(t) ? Fr.test(t.split("/*")[0].trim()) : !1, Fr = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
247
247
|
function Fn(t) {
|
|
248
248
|
return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
|
|
249
249
|
}
|
|
250
|
-
const
|
|
250
|
+
const kt = {
|
|
251
251
|
borderRadius: E(g({}, H), {
|
|
252
252
|
applyTo: [
|
|
253
253
|
"borderTopLeftRadius",
|
|
@@ -260,16 +260,16 @@ const Ft = {
|
|
|
260
260
|
borderTopRightRadius: H,
|
|
261
261
|
borderBottomLeftRadius: H,
|
|
262
262
|
borderBottomRightRadius: H,
|
|
263
|
-
boxShadow:
|
|
263
|
+
boxShadow: vs
|
|
264
264
|
};
|
|
265
265
|
function bs(t) {
|
|
266
266
|
for (const e in t)
|
|
267
|
-
|
|
267
|
+
kt[e] = t[e], Je(e) && (kt[e].isCSSVariable = !0);
|
|
268
268
|
}
|
|
269
269
|
function It(t, e) {
|
|
270
270
|
const n = typeof t == "string" && !e ? `${t}Context` : e, i = Symbol(n);
|
|
271
271
|
return [(o) => {
|
|
272
|
-
const a =
|
|
272
|
+
const a = Zo(i, o);
|
|
273
273
|
if (a === void 0)
|
|
274
274
|
throw new Error(
|
|
275
275
|
`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t) ? `one of the following components: ${t.join(
|
|
@@ -277,9 +277,9 @@ function It(t, e) {
|
|
|
277
277
|
)}` : `\`${t}\``}`
|
|
278
278
|
);
|
|
279
279
|
return a;
|
|
280
|
-
}, (o) => (
|
|
280
|
+
}, (o) => (Jo(i, o), o)];
|
|
281
281
|
}
|
|
282
|
-
const [
|
|
282
|
+
const [Or, Ir] = It("Motion"), [jr] = It("LayoutGroup");
|
|
283
283
|
function On(t) {
|
|
284
284
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
285
285
|
}
|
|
@@ -301,18 +301,18 @@ class tt {
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
var ft = function() {
|
|
304
|
-
},
|
|
304
|
+
}, ue = function() {
|
|
305
305
|
};
|
|
306
306
|
process.env.NODE_ENV !== "production" && (ft = function(t, e) {
|
|
307
307
|
!t && typeof console != "undefined" && console.warn(e);
|
|
308
|
-
},
|
|
308
|
+
}, ue = function(t, e) {
|
|
309
309
|
if (!t)
|
|
310
310
|
throw new Error(e);
|
|
311
311
|
});
|
|
312
|
-
function
|
|
312
|
+
function Mt(t, e, n) {
|
|
313
313
|
if (Array.isArray(t))
|
|
314
314
|
return t.reduce((i, s) => {
|
|
315
|
-
const r =
|
|
315
|
+
const r = Mt(s, e, n);
|
|
316
316
|
return r ? g(g({}, i), r) : i;
|
|
317
317
|
}, {});
|
|
318
318
|
if (typeof t == "object")
|
|
@@ -322,10 +322,10 @@ function Dt(t, e, n) {
|
|
|
322
322
|
return typeof i == "function" ? i(n) : i;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
function Ir(t, e) {
|
|
326
|
-
return typeof t != typeof e ? !0 : Array.isArray(t) && Array.isArray(e) ? !_r(t, e) : t !== e;
|
|
327
|
-
}
|
|
328
325
|
function _r(t, e) {
|
|
326
|
+
return typeof t != typeof e ? !0 : Array.isArray(t) && Array.isArray(e) ? !Ur(t, e) : t !== e;
|
|
327
|
+
}
|
|
328
|
+
function Ur(t, e) {
|
|
329
329
|
const n = e.length;
|
|
330
330
|
if (n !== t.length)
|
|
331
331
|
return !1;
|
|
@@ -334,14 +334,14 @@ function _r(t, e) {
|
|
|
334
334
|
return !1;
|
|
335
335
|
return !0;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function In(t) {
|
|
338
338
|
return t == null ? void 0 : t.startsWith("--");
|
|
339
339
|
}
|
|
340
|
-
const
|
|
341
|
-
function
|
|
340
|
+
const Nr = (t) => t;
|
|
341
|
+
function $r(t) {
|
|
342
342
|
return typeof t == "number";
|
|
343
343
|
}
|
|
344
|
-
const
|
|
344
|
+
const Kr = [
|
|
345
345
|
"animate",
|
|
346
346
|
"circle",
|
|
347
347
|
"defs",
|
|
@@ -397,17 +397,17 @@ const $r = [
|
|
|
397
397
|
"linearGradient",
|
|
398
398
|
"radialGradient",
|
|
399
399
|
"textPath"
|
|
400
|
-
],
|
|
401
|
-
function
|
|
402
|
-
return
|
|
400
|
+
], Wr = new Set(Kr);
|
|
401
|
+
function Ts(t) {
|
|
402
|
+
return Wr.has(t);
|
|
403
403
|
}
|
|
404
|
-
class
|
|
404
|
+
class Gr {
|
|
405
405
|
constructor(e) {
|
|
406
406
|
this.features = [];
|
|
407
407
|
const { features: n = [], lazyMotionContext: i } = e.options, s = n.concat(i.features.value);
|
|
408
408
|
this.features = s.map((o) => new o(e));
|
|
409
409
|
const r = this.features;
|
|
410
|
-
|
|
410
|
+
Qo(i.features, (o) => {
|
|
411
411
|
o.forEach((a) => {
|
|
412
412
|
if (!s.includes(a)) {
|
|
413
413
|
s.push(a);
|
|
@@ -447,20 +447,20 @@ class Wr {
|
|
|
447
447
|
this.features.forEach((e) => e.beforeUnmount());
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function zr(t) {
|
|
451
451
|
return typeof t == "string" || t === !1 || Array.isArray(t);
|
|
452
452
|
}
|
|
453
|
-
const
|
|
454
|
-
let
|
|
455
|
-
class
|
|
453
|
+
const Ss = /* @__PURE__ */ new WeakMap();
|
|
454
|
+
let Hr = 0;
|
|
455
|
+
class Yr {
|
|
456
456
|
constructor(e, n) {
|
|
457
457
|
var i;
|
|
458
458
|
this.element = null, this.isExiting = !1, this.presenceContainer = null, this.children = /* @__PURE__ */ new Set(), this.activeStates = {
|
|
459
459
|
initial: !0,
|
|
460
460
|
animate: !0
|
|
461
|
-
}, this.currentProcess = null, this._context = null, this.animateUpdates = _, this.id = `motion-state-${
|
|
461
|
+
}, this.currentProcess = null, this._context = null, this.animateUpdates = _, this.id = `motion-state-${Hr++}`, this.options = e, this.parent = n, (i = n == null ? void 0 : n.children) == null || i.add(this);
|
|
462
462
|
const r = (e.initial === void 0 && e.variants ? this.context.initial : e.initial) === !1 ? ["initial", "animate"] : ["initial"];
|
|
463
|
-
this.initTarget(r), this.featureManager = new
|
|
463
|
+
this.initTarget(r), this.featureManager = new Gr(this), this.type = Ts(this.options.as) ? "svg" : "html";
|
|
464
464
|
}
|
|
465
465
|
// Get animation context, falling back to parent context for inheritance
|
|
466
466
|
get context() {
|
|
@@ -468,7 +468,7 @@ class Hr {
|
|
|
468
468
|
const e = {
|
|
469
469
|
get: (n, i) => {
|
|
470
470
|
var s;
|
|
471
|
-
return
|
|
471
|
+
return zr(this.options[i]) ? this.options[i] : (s = this.parent) == null ? void 0 : s.context[i];
|
|
472
472
|
}
|
|
473
473
|
};
|
|
474
474
|
this._context = new Proxy({}, e);
|
|
@@ -480,7 +480,7 @@ class Hr {
|
|
|
480
480
|
var s;
|
|
481
481
|
var n;
|
|
482
482
|
const i = (s = this.options.custom) != null ? s : (n = this.options.animatePresenceContext) == null ? void 0 : n.custom;
|
|
483
|
-
this.baseTarget = e.reduce((r, o) => g(g({}, r),
|
|
483
|
+
this.baseTarget = e.reduce((r, o) => g(g({}, r), Mt(this.options[o] || this.context[o], this.options.variants, i)), {}), this.target = {};
|
|
484
484
|
}
|
|
485
485
|
// Update visual element with new options
|
|
486
486
|
updateOptions(e) {
|
|
@@ -496,7 +496,7 @@ class Hr {
|
|
|
496
496
|
// Mount motion state to DOM element, handles parent-child relationships
|
|
497
497
|
mount(e, n, i = !1) {
|
|
498
498
|
var s;
|
|
499
|
-
|
|
499
|
+
ue(
|
|
500
500
|
!!e,
|
|
501
501
|
"Animation state must be mounted with valid Element"
|
|
502
502
|
), this.element = e, this.updateOptions(n), this.featureManager.mount(), !i && this.options.animate && ((s = this.startAnimation) == null || s.call(this));
|
|
@@ -519,7 +519,7 @@ class Hr {
|
|
|
519
519
|
}
|
|
520
520
|
unmount() {
|
|
521
521
|
var e, n, i;
|
|
522
|
-
(n = (e = this.parent) == null ? void 0 : e.children) == null || n.delete(this),
|
|
522
|
+
(n = (e = this.parent) == null ? void 0 : e.children) == null || n.delete(this), Ss.delete(this.element), this.featureManager.unmount(), (i = this.visualElement) == null || i.unmount(), this.clearAnimation();
|
|
523
523
|
}
|
|
524
524
|
// Called before updating, executes in parent-to-child order
|
|
525
525
|
beforeUpdate(e) {
|
|
@@ -547,14 +547,14 @@ class Hr {
|
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
const ut = /* @__PURE__ */ new WeakMap();
|
|
550
|
-
function
|
|
550
|
+
function jn(t, e, n) {
|
|
551
551
|
return new CustomEvent(t, { detail: { target: e, isExit: n } });
|
|
552
552
|
}
|
|
553
553
|
const _n = {
|
|
554
554
|
syntax: "<angle>",
|
|
555
555
|
initialValue: "0deg",
|
|
556
556
|
toDefaultUnit: (t) => `${t}deg`
|
|
557
|
-
},
|
|
557
|
+
}, Xr = {
|
|
558
558
|
translate: {
|
|
559
559
|
syntax: "<length-percentage>",
|
|
560
560
|
initialValue: "0px",
|
|
@@ -564,31 +564,31 @@ const _n = {
|
|
|
564
564
|
scale: {
|
|
565
565
|
syntax: "<number>",
|
|
566
566
|
initialValue: 1,
|
|
567
|
-
toDefaultUnit:
|
|
567
|
+
toDefaultUnit: Nr
|
|
568
568
|
},
|
|
569
569
|
skew: _n
|
|
570
|
-
},
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
570
|
+
}, qr = ["translate", "scale", "rotate", "skew"], Zr = ["", "X", "Y", "Z"], tn = /* @__PURE__ */ new Map(), te = ["transformPerspective", "x", "y", "z", "translateX", "translateY", "translateZ", "scale", "scaleX", "scaleY", "rotate", "rotateX", "rotateY", "rotateZ", "skew", "skewX", "skewY"];
|
|
571
|
+
qr.forEach((t) => {
|
|
572
|
+
Zr.forEach((e) => {
|
|
573
|
+
te.push(t + e), tn.set(
|
|
574
574
|
t + e,
|
|
575
|
-
|
|
575
|
+
Xr[t]
|
|
576
576
|
);
|
|
577
577
|
});
|
|
578
578
|
});
|
|
579
|
-
const
|
|
579
|
+
const Jr = new Set(te), Qr = (t) => Jr.has(t), Un = {
|
|
580
580
|
x: "translateX",
|
|
581
581
|
y: "translateY",
|
|
582
582
|
z: "translateZ"
|
|
583
583
|
};
|
|
584
|
-
function
|
|
585
|
-
return
|
|
584
|
+
function ta([t], [e]) {
|
|
585
|
+
return te.indexOf(t) - te.indexOf(e);
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function ea(t, [e, n]) {
|
|
588
588
|
return `${t} ${e}(${n})`;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
591
|
-
return t.sort(
|
|
590
|
+
function na(t) {
|
|
591
|
+
return t.sort(ta).reduce(ea, "").trim();
|
|
592
592
|
}
|
|
593
593
|
const Nn = {
|
|
594
594
|
translate: [0, 0],
|
|
@@ -598,9 +598,9 @@ const Nn = {
|
|
|
598
598
|
x: 0,
|
|
599
599
|
y: 0,
|
|
600
600
|
z: 0
|
|
601
|
-
}, L = (t) => !!(t && t.getVelocity),
|
|
601
|
+
}, L = (t) => !!(t && t.getVelocity), ia = {
|
|
602
602
|
get: (t, e) => {
|
|
603
|
-
let n =
|
|
603
|
+
let n = In(e) ? t.style.getPropertyValue(e) : getComputedStyle(t)[e];
|
|
604
604
|
if (!n && n !== "0") {
|
|
605
605
|
const i = tn.get(e);
|
|
606
606
|
i && (n = i.initialValue);
|
|
@@ -608,22 +608,22 @@ const Nn = {
|
|
|
608
608
|
return n;
|
|
609
609
|
},
|
|
610
610
|
set: (t, e, n) => {
|
|
611
|
-
|
|
611
|
+
In(e) ? t.style.setProperty(e, n) : t.style[e] = n;
|
|
612
612
|
}
|
|
613
613
|
};
|
|
614
|
-
function
|
|
614
|
+
function sa(t) {
|
|
615
615
|
var e;
|
|
616
616
|
const n = {}, i = [];
|
|
617
617
|
for (let s in t) {
|
|
618
618
|
let r = t[s];
|
|
619
|
-
r = L(r) ? r.get() : r,
|
|
619
|
+
r = L(r) ? r.get() : r, Qr(s) && s in Un && (s = Un[s]);
|
|
620
620
|
let o = Array.isArray(r) ? r[0] : r;
|
|
621
621
|
const a = tn.get(s);
|
|
622
|
-
a ? (o =
|
|
622
|
+
a ? (o = $r(r) ? (e = a.toDefaultUnit) == null ? void 0 : e.call(a, r) : r, i.push([s, o])) : n[s] = o;
|
|
623
623
|
}
|
|
624
|
-
return i.length && (n.transform =
|
|
624
|
+
return i.length && (n.transform = na(i)), Object.keys(n).length === 0 ? null : n;
|
|
625
625
|
}
|
|
626
|
-
const
|
|
626
|
+
const oa = {
|
|
627
627
|
fill: !0,
|
|
628
628
|
stroke: !0,
|
|
629
629
|
opacity: !0,
|
|
@@ -667,38 +667,38 @@ const sa = {
|
|
|
667
667
|
"letter-spacing": !0,
|
|
668
668
|
"vector-effect": !0
|
|
669
669
|
};
|
|
670
|
-
function
|
|
670
|
+
function ra(t) {
|
|
671
671
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
t.pathLength = 1, delete t["path-length"], t["stroke-dashoffset"] =
|
|
675
|
-
const s =
|
|
673
|
+
function aa(t, e, n = 1, i = 0) {
|
|
674
|
+
t.pathLength = 1, delete t["path-length"], t["stroke-dashoffset"] = x.transform(-i);
|
|
675
|
+
const s = x.transform(e), r = x.transform(n);
|
|
676
676
|
t["stroke-dasharray"] = `${s} ${r}`;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function la(t) {
|
|
679
679
|
const e = {}, n = {};
|
|
680
680
|
for (const i in t) {
|
|
681
|
-
const s =
|
|
682
|
-
if (s in
|
|
681
|
+
const s = ra(i);
|
|
682
|
+
if (s in oa) {
|
|
683
683
|
const r = t[i];
|
|
684
684
|
e[s] = L(r) ? r.get() : r;
|
|
685
685
|
} else
|
|
686
686
|
n[i] = t[i];
|
|
687
687
|
}
|
|
688
|
-
return e["path-length"] !== void 0 &&
|
|
688
|
+
return e["path-length"] !== void 0 && aa(e, e["path-length"], e["path-spacing"], e["path-offset"]), {
|
|
689
689
|
attrs: e,
|
|
690
690
|
style: n
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
693
|
typeof WorkerGlobalScope != "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
694
|
-
const
|
|
695
|
-
function
|
|
694
|
+
const ee = (t) => typeof t != "undefined";
|
|
695
|
+
function ua({ top: t, left: e, right: n, bottom: i }) {
|
|
696
696
|
return {
|
|
697
697
|
x: { min: e, max: n },
|
|
698
698
|
y: { min: t, max: i }
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function ca(t, e) {
|
|
702
702
|
if (!e)
|
|
703
703
|
return t;
|
|
704
704
|
const n = e({ x: t.left, y: t.top }), i = e({ x: t.right, y: t.bottom });
|
|
@@ -709,8 +709,8 @@ function ua(t, e) {
|
|
|
709
709
|
right: i.x
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
712
|
+
function ha(t, e) {
|
|
713
|
+
return ua(ca(t.getBoundingClientRect(), e));
|
|
714
714
|
}
|
|
715
715
|
const $n = {
|
|
716
716
|
animation: [
|
|
@@ -747,22 +747,22 @@ const Kn = () => ({
|
|
|
747
747
|
}), Wn = () => ({ min: 0, max: 0 }), B = () => ({
|
|
748
748
|
x: Wn(),
|
|
749
749
|
y: Wn()
|
|
750
|
-
}),
|
|
751
|
-
function
|
|
752
|
-
if (
|
|
750
|
+
}), fa = typeof window != "undefined", ne = { current: null }, ws = { current: !1 };
|
|
751
|
+
function da() {
|
|
752
|
+
if (ws.current = !0, !!fa)
|
|
753
753
|
if (window.matchMedia) {
|
|
754
|
-
const t = window.matchMedia("(prefers-reduced-motion)"), e = () =>
|
|
754
|
+
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => ne.current = t.matches;
|
|
755
755
|
t.addEventListener("change", e), e();
|
|
756
756
|
} else
|
|
757
|
-
|
|
757
|
+
ne.current = !1;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function pa(t) {
|
|
760
760
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function ma(t) {
|
|
763
763
|
return typeof t == "string" || Array.isArray(t);
|
|
764
764
|
}
|
|
765
|
-
const
|
|
765
|
+
const ga = [
|
|
766
766
|
"animate",
|
|
767
767
|
"whileInView",
|
|
768
768
|
"whileFocus",
|
|
@@ -770,24 +770,24 @@ const ma = [
|
|
|
770
770
|
"whileTap",
|
|
771
771
|
"whileDrag",
|
|
772
772
|
"exit"
|
|
773
|
-
],
|
|
774
|
-
function
|
|
775
|
-
return
|
|
773
|
+
], ya = ["initial", ...ga];
|
|
774
|
+
function As(t) {
|
|
775
|
+
return pa(t.animate) || ya.some((e) => ma(t[e]));
|
|
776
776
|
}
|
|
777
|
-
function
|
|
778
|
-
return !!(
|
|
777
|
+
function va(t) {
|
|
778
|
+
return !!(As(t) || t.variants);
|
|
779
779
|
}
|
|
780
780
|
function Be(t, e) {
|
|
781
781
|
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
782
782
|
}
|
|
783
783
|
const Gn = /* @__PURE__ */ new Set();
|
|
784
|
-
function
|
|
784
|
+
function Ps(t, e, n) {
|
|
785
785
|
t || Gn.has(e) || (console.warn(Be(e, n)), Gn.add(e));
|
|
786
786
|
}
|
|
787
787
|
function en(t, e) {
|
|
788
788
|
t.indexOf(e) === -1 && t.push(e);
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function ce(t, e) {
|
|
791
791
|
const n = t.indexOf(e);
|
|
792
792
|
n > -1 && t.splice(n, 1);
|
|
793
793
|
}
|
|
@@ -796,7 +796,7 @@ class nn {
|
|
|
796
796
|
this.subscriptions = [];
|
|
797
797
|
}
|
|
798
798
|
add(e) {
|
|
799
|
-
return en(this.subscriptions, e), () =>
|
|
799
|
+
return en(this.subscriptions, e), () => ce(this.subscriptions, e);
|
|
800
800
|
}
|
|
801
801
|
notify(e, n, i) {
|
|
802
802
|
const s = this.subscriptions.length;
|
|
@@ -816,10 +816,10 @@ class nn {
|
|
|
816
816
|
this.subscriptions.length = 0;
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function Es(t, e) {
|
|
820
820
|
return e ? t * (1e3 / e) : 0;
|
|
821
821
|
}
|
|
822
|
-
const zn = 30,
|
|
822
|
+
const zn = 30, xa = (t) => !isNaN(parseFloat(t));
|
|
823
823
|
class ba {
|
|
824
824
|
/**
|
|
825
825
|
* @param init - The initiating value
|
|
@@ -830,14 +830,14 @@ class ba {
|
|
|
830
830
|
constructor(e, n = {}) {
|
|
831
831
|
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i) => {
|
|
832
832
|
var s;
|
|
833
|
-
const r =
|
|
833
|
+
const r = j.now();
|
|
834
834
|
if (this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && ((s = this.events.change) == null || s.notify(this.current), this.dependents))
|
|
835
835
|
for (const o of this.dependents)
|
|
836
836
|
o.dirty();
|
|
837
837
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
838
838
|
}
|
|
839
839
|
setCurrent(e) {
|
|
840
|
-
this.current = e, this.updatedAt =
|
|
840
|
+
this.current = e, this.updatedAt = j.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = xa(this.current));
|
|
841
841
|
}
|
|
842
842
|
setPrevFrameValue(e = this.current) {
|
|
843
843
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -883,7 +883,7 @@ class ba {
|
|
|
883
883
|
* @deprecated
|
|
884
884
|
*/
|
|
885
885
|
onChange(e) {
|
|
886
|
-
return process.env.NODE_ENV !== "production" &&
|
|
886
|
+
return process.env.NODE_ENV !== "production" && Ps(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
887
887
|
}
|
|
888
888
|
on(e, n) {
|
|
889
889
|
this.events[e] || (this.events[e] = new nn());
|
|
@@ -966,11 +966,11 @@ class ba {
|
|
|
966
966
|
* @public
|
|
967
967
|
*/
|
|
968
968
|
getVelocity() {
|
|
969
|
-
const e =
|
|
969
|
+
const e = j.now();
|
|
970
970
|
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > zn)
|
|
971
971
|
return 0;
|
|
972
972
|
const n = Math.min(this.updatedAt - this.prevUpdatedAt, zn);
|
|
973
|
-
return
|
|
973
|
+
return Es(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
974
974
|
}
|
|
975
975
|
/**
|
|
976
976
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -1025,7 +1025,7 @@ class ba {
|
|
|
1025
1025
|
function gt(t, e) {
|
|
1026
1026
|
return new ba(t, e);
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function Ta(t, e, n) {
|
|
1029
1029
|
for (const i in e) {
|
|
1030
1030
|
const s = e[i], r = n[i];
|
|
1031
1031
|
if (L(s))
|
|
@@ -1051,7 +1051,7 @@ function Hn(t) {
|
|
|
1051
1051
|
e[0][i] = n.get(), e[1][i] = n.getVelocity();
|
|
1052
1052
|
}), e;
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1054
|
+
function Vs(t, e, n, i) {
|
|
1055
1055
|
if (typeof e == "function") {
|
|
1056
1056
|
const [s, r] = Hn(i);
|
|
1057
1057
|
e = e(n !== void 0 ? n : t.custom, s, r);
|
|
@@ -1062,7 +1062,7 @@ function Es(t, e, n, i) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
return e;
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function Sa(t) {
|
|
1066
1066
|
var e;
|
|
1067
1067
|
for (let n = 1; n < t.length; n++)
|
|
1068
1068
|
(e = t[n]) != null || (t[n] = t[n - 1]);
|
|
@@ -1070,7 +1070,7 @@ function Ta(t) {
|
|
|
1070
1070
|
const at = (t) => t * 180 / Math.PI, ke = (t) => {
|
|
1071
1071
|
const e = at(Math.atan2(t[1], t[0]));
|
|
1072
1072
|
return Fe(e);
|
|
1073
|
-
},
|
|
1073
|
+
}, wa = {
|
|
1074
1074
|
x: 4,
|
|
1075
1075
|
y: 5,
|
|
1076
1076
|
translateX: 4,
|
|
@@ -1083,7 +1083,7 @@ const at = (t) => t * 180 / Math.PI, ke = (t) => {
|
|
|
1083
1083
|
skewX: (t) => at(Math.atan(t[1])),
|
|
1084
1084
|
skewY: (t) => at(Math.atan(t[2])),
|
|
1085
1085
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
1086
|
-
}, Fe = (t) => (t = t % 360, t < 0 && (t += 360), t), Yn = ke, Xn = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), qn = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]),
|
|
1086
|
+
}, Fe = (t) => (t = t % 360, t < 0 && (t += 360), t), Yn = ke, Xn = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), qn = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Aa = {
|
|
1087
1087
|
x: 12,
|
|
1088
1088
|
y: 13,
|
|
1089
1089
|
z: 14,
|
|
@@ -1104,30 +1104,30 @@ const at = (t) => t * 180 / Math.PI, ke = (t) => {
|
|
|
1104
1104
|
function Oe(t) {
|
|
1105
1105
|
return t.includes("scale") ? 1 : 0;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function Ie(t, e) {
|
|
1108
1108
|
if (!t || t === "none")
|
|
1109
1109
|
return Oe(e);
|
|
1110
1110
|
const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
1111
1111
|
let i, s;
|
|
1112
1112
|
if (n)
|
|
1113
|
-
i =
|
|
1113
|
+
i = Aa, s = n;
|
|
1114
1114
|
else {
|
|
1115
1115
|
const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
1116
|
-
i =
|
|
1116
|
+
i = wa, s = a;
|
|
1117
1117
|
}
|
|
1118
1118
|
if (!s)
|
|
1119
1119
|
return Oe(e);
|
|
1120
|
-
const r = i[e], o = s[1].split(",").map(
|
|
1120
|
+
const r = i[e], o = s[1].split(",").map(Ea);
|
|
1121
1121
|
return typeof r == "function" ? r(o) : o[r];
|
|
1122
1122
|
}
|
|
1123
|
-
const
|
|
1123
|
+
const Pa = (t, e) => {
|
|
1124
1124
|
const { transform: n = "none" } = getComputedStyle(t);
|
|
1125
|
-
return
|
|
1125
|
+
return Ie(n, e);
|
|
1126
1126
|
};
|
|
1127
|
-
function
|
|
1127
|
+
function Ea(t) {
|
|
1128
1128
|
return parseFloat(t.trim());
|
|
1129
1129
|
}
|
|
1130
|
-
const
|
|
1130
|
+
const xt = [
|
|
1131
1131
|
"transformPerspective",
|
|
1132
1132
|
"x",
|
|
1133
1133
|
"y",
|
|
@@ -1145,10 +1145,10 @@ const bt = [
|
|
|
1145
1145
|
"skew",
|
|
1146
1146
|
"skewX",
|
|
1147
1147
|
"skewY"
|
|
1148
|
-
],
|
|
1149
|
-
function
|
|
1148
|
+
], bt = new Set(xt), Zn = (t) => t === vt || t === x, Va = /* @__PURE__ */ new Set(["x", "y", "z"]), Ca = xt.filter((t) => !Va.has(t));
|
|
1149
|
+
function Ma(t) {
|
|
1150
1150
|
const e = [];
|
|
1151
|
-
return
|
|
1151
|
+
return Ca.forEach((n) => {
|
|
1152
1152
|
const i = t.getValue(n);
|
|
1153
1153
|
i !== void 0 && (e.push([n, i.get()]), i.set(n.startsWith("scale") ? 1 : 0));
|
|
1154
1154
|
}), e;
|
|
@@ -1162,18 +1162,18 @@ const it = {
|
|
|
1162
1162
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
1163
1163
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
1164
1164
|
// Transform
|
|
1165
|
-
x: (t, { transform: e }) =>
|
|
1166
|
-
y: (t, { transform: e }) =>
|
|
1165
|
+
x: (t, { transform: e }) => Ie(e, "x"),
|
|
1166
|
+
y: (t, { transform: e }) => Ie(e, "y")
|
|
1167
1167
|
};
|
|
1168
1168
|
it.translateX = it.x;
|
|
1169
1169
|
it.translateY = it.y;
|
|
1170
1170
|
const lt = /* @__PURE__ */ new Set();
|
|
1171
|
-
let
|
|
1172
|
-
function
|
|
1171
|
+
let je = !1, _e = !1, Ue = !1;
|
|
1172
|
+
function Cs() {
|
|
1173
1173
|
if (_e) {
|
|
1174
1174
|
const t = Array.from(lt).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
|
|
1175
1175
|
e.forEach((i) => {
|
|
1176
|
-
const s =
|
|
1176
|
+
const s = Ma(i);
|
|
1177
1177
|
s.length && (n.set(i, s), i.render());
|
|
1178
1178
|
}), t.forEach((i) => i.measureInitialState()), e.forEach((i) => {
|
|
1179
1179
|
i.render();
|
|
@@ -1186,22 +1186,22 @@ function Vs() {
|
|
|
1186
1186
|
i.suspendedScrollY !== void 0 && window.scrollTo(0, i.suspendedScrollY);
|
|
1187
1187
|
});
|
|
1188
1188
|
}
|
|
1189
|
-
_e = !1,
|
|
1189
|
+
_e = !1, je = !1, lt.forEach((t) => t.complete(Ue)), lt.clear();
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Ms() {
|
|
1192
1192
|
lt.forEach((t) => {
|
|
1193
1193
|
t.readKeyframes(), t.needsMeasurement && (_e = !0);
|
|
1194
1194
|
});
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1197
|
-
Ue = !0,
|
|
1196
|
+
function Da() {
|
|
1197
|
+
Ue = !0, Ms(), Cs(), Ue = !1;
|
|
1198
1198
|
}
|
|
1199
1199
|
class sn {
|
|
1200
1200
|
constructor(e, n, i, s, r, o = !1) {
|
|
1201
1201
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = r, this.isAsync = o;
|
|
1202
1202
|
}
|
|
1203
1203
|
scheduleResolve() {
|
|
1204
|
-
this.state = "scheduled", this.isAsync ? (lt.add(this),
|
|
1204
|
+
this.state = "scheduled", this.isAsync ? (lt.add(this), je || (je = !0, C.read(Ms), C.resolveKeyframes(Cs))) : (this.readKeyframes(), this.complete());
|
|
1205
1205
|
}
|
|
1206
1206
|
readKeyframes() {
|
|
1207
1207
|
const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
|
|
@@ -1215,7 +1215,7 @@ class sn {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
e[0] === void 0 && (e[0] = o), s && r === void 0 && s.set(e[0]);
|
|
1217
1217
|
}
|
|
1218
|
-
|
|
1218
|
+
Sa(e);
|
|
1219
1219
|
}
|
|
1220
1220
|
setFinalKeyframe() {
|
|
1221
1221
|
}
|
|
@@ -1235,11 +1235,11 @@ class sn {
|
|
|
1235
1235
|
this.state === "pending" && this.scheduleResolve();
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
|
-
const
|
|
1238
|
+
const Ds = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), Rs = (t) => /^0[^.\s]+$/u.test(t), Ra = {
|
|
1239
1239
|
test: (t) => t === "auto",
|
|
1240
1240
|
parse: (t) => t
|
|
1241
|
-
},
|
|
1242
|
-
function
|
|
1241
|
+
}, Ls = (t) => (e) => e.test(t), Bs = [vt, x, Y, nt, Sr, Tr, Ra], Jn = (t) => Bs.find(Ls(t)), La = [...Bs, R, st], Ba = (t) => La.find(Ls(t)), ka = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1242
|
+
function Fa(t) {
|
|
1243
1243
|
const [e, n] = t.slice(0, -1).split("(");
|
|
1244
1244
|
if (e === "drop-shadow")
|
|
1245
1245
|
return t;
|
|
@@ -1247,17 +1247,17 @@ function ka(t) {
|
|
|
1247
1247
|
if (!i)
|
|
1248
1248
|
return t;
|
|
1249
1249
|
const s = n.replace(i, "");
|
|
1250
|
-
let r =
|
|
1250
|
+
let r = ka.has(e) ? 1 : 0;
|
|
1251
1251
|
return i !== n && (r *= 100), e + "(" + r + s + ")";
|
|
1252
1252
|
}
|
|
1253
|
-
const
|
|
1253
|
+
const Oa = /\b([a-z-]*)\(.*?\)/gu, Ne = E(g({}, st), {
|
|
1254
1254
|
getAnimatableNone: (t) => {
|
|
1255
|
-
const e = t.match(
|
|
1256
|
-
return e ? e.map(
|
|
1255
|
+
const e = t.match(Oa);
|
|
1256
|
+
return e ? e.map(Fa).join(" ") : t;
|
|
1257
1257
|
}
|
|
1258
1258
|
}), Qn = E(g({}, vt), {
|
|
1259
1259
|
transform: Math.round
|
|
1260
|
-
}),
|
|
1260
|
+
}), Ia = {
|
|
1261
1261
|
rotate: nt,
|
|
1262
1262
|
rotateX: nt,
|
|
1263
1263
|
rotateY: nt,
|
|
@@ -1269,79 +1269,79 @@ const Fa = /\b([a-z-]*)\(.*?\)/gu, Ne = E(g({}, st), {
|
|
|
1269
1269
|
skew: nt,
|
|
1270
1270
|
skewX: nt,
|
|
1271
1271
|
skewY: nt,
|
|
1272
|
-
distance:
|
|
1273
|
-
translateX:
|
|
1274
|
-
translateY:
|
|
1275
|
-
translateZ:
|
|
1276
|
-
x
|
|
1277
|
-
y:
|
|
1278
|
-
z:
|
|
1279
|
-
perspective:
|
|
1280
|
-
transformPerspective:
|
|
1281
|
-
opacity:
|
|
1272
|
+
distance: x,
|
|
1273
|
+
translateX: x,
|
|
1274
|
+
translateY: x,
|
|
1275
|
+
translateZ: x,
|
|
1276
|
+
x,
|
|
1277
|
+
y: x,
|
|
1278
|
+
z: x,
|
|
1279
|
+
perspective: x,
|
|
1280
|
+
transformPerspective: x,
|
|
1281
|
+
opacity: Lt,
|
|
1282
1282
|
originX: Ln,
|
|
1283
1283
|
originY: Ln,
|
|
1284
|
-
originZ:
|
|
1284
|
+
originZ: x
|
|
1285
1285
|
}, on = E(g({
|
|
1286
1286
|
// Border props
|
|
1287
|
-
borderWidth:
|
|
1288
|
-
borderTopWidth:
|
|
1289
|
-
borderRightWidth:
|
|
1290
|
-
borderBottomWidth:
|
|
1291
|
-
borderLeftWidth:
|
|
1292
|
-
borderRadius:
|
|
1293
|
-
radius:
|
|
1294
|
-
borderTopLeftRadius:
|
|
1295
|
-
borderTopRightRadius:
|
|
1296
|
-
borderBottomRightRadius:
|
|
1297
|
-
borderBottomLeftRadius:
|
|
1287
|
+
borderWidth: x,
|
|
1288
|
+
borderTopWidth: x,
|
|
1289
|
+
borderRightWidth: x,
|
|
1290
|
+
borderBottomWidth: x,
|
|
1291
|
+
borderLeftWidth: x,
|
|
1292
|
+
borderRadius: x,
|
|
1293
|
+
radius: x,
|
|
1294
|
+
borderTopLeftRadius: x,
|
|
1295
|
+
borderTopRightRadius: x,
|
|
1296
|
+
borderBottomRightRadius: x,
|
|
1297
|
+
borderBottomLeftRadius: x,
|
|
1298
1298
|
// Positioning props
|
|
1299
|
-
width:
|
|
1300
|
-
maxWidth:
|
|
1301
|
-
height:
|
|
1302
|
-
maxHeight:
|
|
1303
|
-
top:
|
|
1304
|
-
right:
|
|
1305
|
-
bottom:
|
|
1306
|
-
left:
|
|
1307
|
-
inset:
|
|
1308
|
-
insetBlock:
|
|
1309
|
-
insetBlockStart:
|
|
1310
|
-
insetBlockEnd:
|
|
1311
|
-
insetInline:
|
|
1312
|
-
insetInlineStart:
|
|
1313
|
-
insetInlineEnd:
|
|
1299
|
+
width: x,
|
|
1300
|
+
maxWidth: x,
|
|
1301
|
+
height: x,
|
|
1302
|
+
maxHeight: x,
|
|
1303
|
+
top: x,
|
|
1304
|
+
right: x,
|
|
1305
|
+
bottom: x,
|
|
1306
|
+
left: x,
|
|
1307
|
+
inset: x,
|
|
1308
|
+
insetBlock: x,
|
|
1309
|
+
insetBlockStart: x,
|
|
1310
|
+
insetBlockEnd: x,
|
|
1311
|
+
insetInline: x,
|
|
1312
|
+
insetInlineStart: x,
|
|
1313
|
+
insetInlineEnd: x,
|
|
1314
1314
|
// Spacing props
|
|
1315
|
-
padding:
|
|
1316
|
-
paddingTop:
|
|
1317
|
-
paddingRight:
|
|
1318
|
-
paddingBottom:
|
|
1319
|
-
paddingLeft:
|
|
1320
|
-
paddingBlock:
|
|
1321
|
-
paddingBlockStart:
|
|
1322
|
-
paddingBlockEnd:
|
|
1323
|
-
paddingInline:
|
|
1324
|
-
paddingInlineStart:
|
|
1325
|
-
paddingInlineEnd:
|
|
1326
|
-
margin:
|
|
1327
|
-
marginTop:
|
|
1328
|
-
marginRight:
|
|
1329
|
-
marginBottom:
|
|
1330
|
-
marginLeft:
|
|
1331
|
-
marginBlock:
|
|
1332
|
-
marginBlockStart:
|
|
1333
|
-
marginBlockEnd:
|
|
1334
|
-
marginInline:
|
|
1335
|
-
marginInlineStart:
|
|
1336
|
-
marginInlineEnd:
|
|
1315
|
+
padding: x,
|
|
1316
|
+
paddingTop: x,
|
|
1317
|
+
paddingRight: x,
|
|
1318
|
+
paddingBottom: x,
|
|
1319
|
+
paddingLeft: x,
|
|
1320
|
+
paddingBlock: x,
|
|
1321
|
+
paddingBlockStart: x,
|
|
1322
|
+
paddingBlockEnd: x,
|
|
1323
|
+
paddingInline: x,
|
|
1324
|
+
paddingInlineStart: x,
|
|
1325
|
+
paddingInlineEnd: x,
|
|
1326
|
+
margin: x,
|
|
1327
|
+
marginTop: x,
|
|
1328
|
+
marginRight: x,
|
|
1329
|
+
marginBottom: x,
|
|
1330
|
+
marginLeft: x,
|
|
1331
|
+
marginBlock: x,
|
|
1332
|
+
marginBlockStart: x,
|
|
1333
|
+
marginBlockEnd: x,
|
|
1334
|
+
marginInline: x,
|
|
1335
|
+
marginInlineStart: x,
|
|
1336
|
+
marginInlineEnd: x,
|
|
1337
1337
|
// Misc
|
|
1338
|
-
backgroundPositionX:
|
|
1339
|
-
backgroundPositionY:
|
|
1340
|
-
},
|
|
1338
|
+
backgroundPositionX: x,
|
|
1339
|
+
backgroundPositionY: x
|
|
1340
|
+
}, Ia), {
|
|
1341
1341
|
zIndex: Qn,
|
|
1342
1342
|
// SVG
|
|
1343
|
-
fillOpacity:
|
|
1344
|
-
strokeOpacity:
|
|
1343
|
+
fillOpacity: Lt,
|
|
1344
|
+
strokeOpacity: Lt,
|
|
1345
1345
|
numOctaves: Qn
|
|
1346
1346
|
}), ja = E(g({}, on), {
|
|
1347
1347
|
// Color props
|
|
@@ -1358,12 +1358,12 @@ const Fa = /\b([a-z-]*)\(.*?\)/gu, Ne = E(g({}, st), {
|
|
|
1358
1358
|
borderLeftColor: R,
|
|
1359
1359
|
filter: Ne,
|
|
1360
1360
|
WebkitFilter: Ne
|
|
1361
|
-
}),
|
|
1362
|
-
function
|
|
1363
|
-
let n =
|
|
1361
|
+
}), ks = (t) => ja[t];
|
|
1362
|
+
function Fs(t, e) {
|
|
1363
|
+
let n = ks(t);
|
|
1364
1364
|
return n !== Ne && (n = st), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
1365
1365
|
}
|
|
1366
|
-
const { schedule:
|
|
1366
|
+
const { schedule: Os } = /* @__PURE__ */ fs(queueMicrotask, !0), ti = [
|
|
1367
1367
|
"AnimationStart",
|
|
1368
1368
|
"AnimationComplete",
|
|
1369
1369
|
"Update",
|
|
@@ -1372,7 +1372,7 @@ const { schedule: Fs } = /* @__PURE__ */ hs(queueMicrotask, !0), ti = [
|
|
|
1372
1372
|
"LayoutAnimationStart",
|
|
1373
1373
|
"LayoutAnimationComplete"
|
|
1374
1374
|
];
|
|
1375
|
-
class
|
|
1375
|
+
class Is {
|
|
1376
1376
|
/**
|
|
1377
1377
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
1378
1378
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -1387,20 +1387,20 @@ class Os {
|
|
|
1387
1387
|
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = sn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
1388
1388
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
1389
1389
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
1390
|
-
const
|
|
1391
|
-
this.renderScheduledAt <
|
|
1390
|
+
const f = j.now();
|
|
1391
|
+
this.renderScheduledAt < f && (this.renderScheduledAt = f, C.render(this.render, !1, !0));
|
|
1392
1392
|
};
|
|
1393
1393
|
const { latestValues: l, renderState: c } = o;
|
|
1394
|
-
this.latestValues = l, this.baseTarget = g({}, l), this.initialValues = n.initial ? g({}, l) : {}, this.renderState = c, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants =
|
|
1395
|
-
const
|
|
1396
|
-
for (const
|
|
1397
|
-
const p = h[
|
|
1398
|
-
l[
|
|
1394
|
+
this.latestValues = l, this.baseTarget = g({}, l), this.initialValues = n.initial ? g({}, l) : {}, this.renderState = c, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = As(n), this.isVariantNode = va(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
1395
|
+
const d = this.scrapeMotionValuesFromProps(n, {}, this), { willChange: u } = d, h = U(d, ["willChange"]);
|
|
1396
|
+
for (const f in h) {
|
|
1397
|
+
const p = h[f];
|
|
1398
|
+
l[f] !== void 0 && L(p) && p.set(l[f]);
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
1401
|
mount(e) {
|
|
1402
1402
|
var n;
|
|
1403
|
-
this.current = e, ut.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, s) => this.bindToMotionValue(s, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (
|
|
1403
|
+
this.current = e, ut.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, s) => this.bindToMotionValue(s, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (ws.current || da(), this.shouldReduceMotion = ne.current), process.env.NODE_ENV !== "production" && Ps(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), (n = this.parent) == null || n.addChild(this), this.update(this.props, this.presenceContext);
|
|
1404
1404
|
}
|
|
1405
1405
|
unmount() {
|
|
1406
1406
|
var e;
|
|
@@ -1422,7 +1422,7 @@ class Os {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
bindToMotionValue(e, n) {
|
|
1424
1424
|
this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
|
|
1425
|
-
const i =
|
|
1425
|
+
const i = bt.has(e);
|
|
1426
1426
|
i && this.onBindTransform && this.onBindTransform();
|
|
1427
1427
|
const s = n.on("change", (o) => {
|
|
1428
1428
|
this.latestValues[e] = o, this.props.onUpdate && C.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
@@ -1477,7 +1477,7 @@ class Os {
|
|
|
1477
1477
|
const r = "on" + s, o = e[r];
|
|
1478
1478
|
o && (this.propEventSubscriptions[s] = this.on(s, o));
|
|
1479
1479
|
}
|
|
1480
|
-
this.prevMotionValues =
|
|
1480
|
+
this.prevMotionValues = Ta(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
1481
1481
|
}
|
|
1482
1482
|
getProps() {
|
|
1483
1483
|
return this.props;
|
|
@@ -1543,7 +1543,7 @@ class Os {
|
|
|
1543
1543
|
readValue(e, n) {
|
|
1544
1544
|
var s;
|
|
1545
1545
|
let i = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (s = this.getBaseTargetFromProps(this.props, e)) != null ? s : this.readValueFromInstance(this.current, e, this.options);
|
|
1546
|
-
return i != null && (typeof i == "string" && (
|
|
1546
|
+
return i != null && (typeof i == "string" && (Ds(i) || Rs(i)) ? i = parseFloat(i) : !Ba(i) && st.test(n) && (i = Fs(e, n)), this.setBaseTarget(e, L(i) ? i.get() : i)), L(i) ? i.get() : i;
|
|
1547
1547
|
}
|
|
1548
1548
|
/**
|
|
1549
1549
|
* Set the base target to later animate back to. This is currently
|
|
@@ -1561,7 +1561,7 @@ class Os {
|
|
|
1561
1561
|
const { initial: i } = this.props;
|
|
1562
1562
|
let s;
|
|
1563
1563
|
if (typeof i == "string" || typeof i == "object") {
|
|
1564
|
-
const o =
|
|
1564
|
+
const o = Vs(this.props, i, (n = this.presenceContext) == null ? void 0 : n.custom);
|
|
1565
1565
|
o && (s = o[e]);
|
|
1566
1566
|
}
|
|
1567
1567
|
if (i && s !== void 0)
|
|
@@ -1576,7 +1576,7 @@ class Os {
|
|
|
1576
1576
|
this.events[e] && this.events[e].notify(...n);
|
|
1577
1577
|
}
|
|
1578
1578
|
scheduleRenderMicrotask() {
|
|
1579
|
-
|
|
1579
|
+
Os.render(this.render);
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
1582
1582
|
const js = /* @__PURE__ */ new Set([
|
|
@@ -1586,57 +1586,57 @@ const js = /* @__PURE__ */ new Set([
|
|
|
1586
1586
|
"left",
|
|
1587
1587
|
"right",
|
|
1588
1588
|
"bottom",
|
|
1589
|
-
...
|
|
1589
|
+
...xt
|
|
1590
1590
|
]);
|
|
1591
1591
|
var ei;
|
|
1592
|
-
let
|
|
1592
|
+
let jt = () => {
|
|
1593
1593
|
}, q = () => {
|
|
1594
1594
|
};
|
|
1595
|
-
typeof process != "undefined" && ((ei = process.env) == null ? void 0 : ei.NODE_ENV) !== "production" && (
|
|
1595
|
+
typeof process != "undefined" && ((ei = process.env) == null ? void 0 : ei.NODE_ENV) !== "production" && (jt = (t, e, n) => {
|
|
1596
1596
|
!t && typeof console != "undefined" && console.warn(Be(e, n));
|
|
1597
1597
|
}, q = (t, e, n) => {
|
|
1598
1598
|
if (!t)
|
|
1599
1599
|
throw new Error(Be(e, n));
|
|
1600
1600
|
});
|
|
1601
|
-
const
|
|
1601
|
+
const _a = (
|
|
1602
1602
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1603
1603
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1604
1604
|
);
|
|
1605
|
-
function
|
|
1606
|
-
const e =
|
|
1605
|
+
function Ua(t) {
|
|
1606
|
+
const e = _a.exec(t);
|
|
1607
1607
|
if (!e)
|
|
1608
1608
|
return [,];
|
|
1609
1609
|
const [, n, i, s] = e;
|
|
1610
1610
|
return [`--${n != null ? n : i}`, s];
|
|
1611
1611
|
}
|
|
1612
|
-
const
|
|
1613
|
-
function
|
|
1614
|
-
q(n <=
|
|
1615
|
-
const [i, s] =
|
|
1612
|
+
const Na = 4;
|
|
1613
|
+
function _s(t, e, n = 1) {
|
|
1614
|
+
q(n <= Na, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1615
|
+
const [i, s] = Ua(t);
|
|
1616
1616
|
if (!i)
|
|
1617
1617
|
return;
|
|
1618
1618
|
const r = window.getComputedStyle(e).getPropertyValue(i);
|
|
1619
1619
|
if (r) {
|
|
1620
1620
|
const o = r.trim();
|
|
1621
|
-
return
|
|
1621
|
+
return Ds(o) ? parseFloat(o) : o;
|
|
1622
1622
|
}
|
|
1623
|
-
return Qe(s) ?
|
|
1623
|
+
return Qe(s) ? _s(s, e, n + 1) : s;
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1626
|
-
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" ||
|
|
1625
|
+
function $a(t) {
|
|
1626
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Rs(t) : !0;
|
|
1627
1627
|
}
|
|
1628
|
-
const
|
|
1629
|
-
function
|
|
1628
|
+
const Ka = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1629
|
+
function Wa(t, e, n) {
|
|
1630
1630
|
let i = 0, s;
|
|
1631
1631
|
for (; i < t.length && !s; ) {
|
|
1632
1632
|
const r = t[i];
|
|
1633
|
-
typeof r == "string" &&
|
|
1633
|
+
typeof r == "string" && !Ka.has(r) && Bt(r).values.length && (s = t[i]), i++;
|
|
1634
1634
|
}
|
|
1635
1635
|
if (s && n)
|
|
1636
1636
|
for (const r of e)
|
|
1637
|
-
t[r] =
|
|
1637
|
+
t[r] = Fs(n, s);
|
|
1638
1638
|
}
|
|
1639
|
-
class
|
|
1639
|
+
class Ga extends sn {
|
|
1640
1640
|
constructor(e, n, i, s, r) {
|
|
1641
1641
|
super(e, n, i, s, r, !0);
|
|
1642
1642
|
}
|
|
@@ -1648,8 +1648,8 @@ class Wa extends sn {
|
|
|
1648
1648
|
for (let u = 0; u < e.length; u++) {
|
|
1649
1649
|
let h = e[u];
|
|
1650
1650
|
if (typeof h == "string" && (h = h.trim(), Qe(h))) {
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1651
|
+
const d = _s(h, n.current);
|
|
1652
|
+
d !== void 0 && (e[u] = d), u === e.length - 1 && (this.finalKeyframe = h);
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
1655
|
if (this.resolveNoneKeyframes(), !js.has(i) || e.length !== 2)
|
|
@@ -1670,8 +1670,8 @@ class Wa extends sn {
|
|
|
1670
1670
|
resolveNoneKeyframes() {
|
|
1671
1671
|
const { unresolvedKeyframes: e, name: n } = this, i = [];
|
|
1672
1672
|
for (let s = 0; s < e.length; s++)
|
|
1673
|
-
(e[s] === null ||
|
|
1674
|
-
i.length &&
|
|
1673
|
+
(e[s] === null || $a(e[s])) && i.push(s);
|
|
1674
|
+
i.length && Wa(e, i, n);
|
|
1675
1675
|
}
|
|
1676
1676
|
measureInitialState() {
|
|
1677
1677
|
const { element: e, unresolvedKeyframes: n, name: i } = this;
|
|
@@ -1694,9 +1694,9 @@ class Wa extends sn {
|
|
|
1694
1694
|
}), this.resolveNoneKeyframes();
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
|
-
class
|
|
1697
|
+
class Us extends Is {
|
|
1698
1698
|
constructor() {
|
|
1699
|
-
super(...arguments), this.KeyframeResolver =
|
|
1699
|
+
super(...arguments), this.KeyframeResolver = Ga;
|
|
1700
1700
|
}
|
|
1701
1701
|
sortInstanceNodePosition(e, n) {
|
|
1702
1702
|
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -1715,24 +1715,24 @@ class _s extends Os {
|
|
|
1715
1715
|
}));
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
const
|
|
1718
|
+
const Ns = (t, e) => e && typeof t == "number" ? e.transform(t) : t, za = {
|
|
1719
1719
|
x: "translateX",
|
|
1720
1720
|
y: "translateY",
|
|
1721
1721
|
z: "translateZ",
|
|
1722
1722
|
transformPerspective: "perspective"
|
|
1723
|
-
},
|
|
1724
|
-
function
|
|
1723
|
+
}, Ha = xt.length;
|
|
1724
|
+
function Ya(t, e, n) {
|
|
1725
1725
|
let i = "", s = !0;
|
|
1726
|
-
for (let r = 0; r <
|
|
1727
|
-
const o =
|
|
1726
|
+
for (let r = 0; r < Ha; r++) {
|
|
1727
|
+
const o = xt[r], a = t[o];
|
|
1728
1728
|
if (a === void 0)
|
|
1729
1729
|
continue;
|
|
1730
1730
|
let l = !0;
|
|
1731
1731
|
if (typeof a == "number" ? l = a === (o.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
1732
|
-
const c =
|
|
1732
|
+
const c = Ns(a, on[o]);
|
|
1733
1733
|
if (!l) {
|
|
1734
1734
|
s = !1;
|
|
1735
|
-
const u =
|
|
1735
|
+
const u = za[o] || o;
|
|
1736
1736
|
i += `${u}(${c}) `;
|
|
1737
1737
|
}
|
|
1738
1738
|
n && (e[o] = c);
|
|
@@ -1740,28 +1740,28 @@ function Ha(t, e, n) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
return i = i.trim(), n ? i = n(e, s ? "" : i) : s && (i = "none"), i;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function $s(t, e, n) {
|
|
1744
1744
|
const { style: i, vars: s, transformOrigin: r } = t;
|
|
1745
1745
|
let o = !1, a = !1;
|
|
1746
1746
|
for (const l in e) {
|
|
1747
1747
|
const c = e[l];
|
|
1748
|
-
if (
|
|
1748
|
+
if (bt.has(l)) {
|
|
1749
1749
|
o = !0;
|
|
1750
1750
|
continue;
|
|
1751
1751
|
} else if (Je(l)) {
|
|
1752
1752
|
s[l] = c;
|
|
1753
1753
|
continue;
|
|
1754
1754
|
} else {
|
|
1755
|
-
const u =
|
|
1755
|
+
const u = Ns(c, on[l]);
|
|
1756
1756
|
l.startsWith("origin") ? (a = !0, r[l] = u) : i[l] = u;
|
|
1757
1757
|
}
|
|
1758
1758
|
}
|
|
1759
|
-
if (e.transform || (o || n ? i.transform =
|
|
1759
|
+
if (e.transform || (o || n ? i.transform = Ya(e, t.transform, n) : i.transform && (i.transform = "none")), a) {
|
|
1760
1760
|
const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = r;
|
|
1761
1761
|
i.transformOrigin = `${l} ${c} ${u}`;
|
|
1762
1762
|
}
|
|
1763
1763
|
}
|
|
1764
|
-
function
|
|
1764
|
+
function Ks(t, { style: e, vars: n }, i, s) {
|
|
1765
1765
|
const r = t.style;
|
|
1766
1766
|
let o;
|
|
1767
1767
|
for (o in e)
|
|
@@ -1770,71 +1770,71 @@ function $s(t, { style: e, vars: n }, i, s) {
|
|
|
1770
1770
|
for (o in n)
|
|
1771
1771
|
r.setProperty(o, n[o]);
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1774
|
-
return
|
|
1773
|
+
function Xa(t, { layout: e, layoutId: n }) {
|
|
1774
|
+
return bt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!kt[t] || t === "opacity");
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1776
|
+
function Ws(t, e, n) {
|
|
1777
1777
|
var i;
|
|
1778
1778
|
const { style: s } = t, r = {};
|
|
1779
1779
|
for (const o in s)
|
|
1780
|
-
(L(s[o]) || e.style && L(e.style[o]) ||
|
|
1780
|
+
(L(s[o]) || e.style && L(e.style[o]) || Xa(o, t) || ((i = n == null ? void 0 : n.getValue(o)) == null ? void 0 : i.liveStyle) !== void 0) && (r[o] = s[o]);
|
|
1781
1781
|
return r;
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function qa(t) {
|
|
1784
1784
|
return window.getComputedStyle(t);
|
|
1785
1785
|
}
|
|
1786
|
-
class
|
|
1786
|
+
class Gs extends Us {
|
|
1787
1787
|
constructor() {
|
|
1788
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
1788
|
+
super(...arguments), this.type = "html", this.renderInstance = Ks;
|
|
1789
1789
|
}
|
|
1790
1790
|
readValueFromInstance(e, n) {
|
|
1791
1791
|
var i;
|
|
1792
|
-
if (
|
|
1793
|
-
return (i = this.projection) != null && i.isProjecting ? Oe(n) :
|
|
1792
|
+
if (bt.has(n))
|
|
1793
|
+
return (i = this.projection) != null && i.isProjecting ? Oe(n) : Pa(e, n);
|
|
1794
1794
|
{
|
|
1795
|
-
const s =
|
|
1795
|
+
const s = qa(e), r = (Je(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
1796
1796
|
return typeof r == "string" ? r.trim() : r;
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
1799
|
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
1800
|
-
return
|
|
1800
|
+
return ha(e, n);
|
|
1801
1801
|
}
|
|
1802
1802
|
build(e, n, i) {
|
|
1803
|
-
|
|
1803
|
+
$s(e, n, i.transformTemplate);
|
|
1804
1804
|
}
|
|
1805
1805
|
scrapeMotionValuesFromProps(e, n, i) {
|
|
1806
|
-
return
|
|
1806
|
+
return Ws(e, n, i);
|
|
1807
1807
|
}
|
|
1808
1808
|
}
|
|
1809
|
-
const rn = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(),
|
|
1809
|
+
const rn = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Za = {
|
|
1810
1810
|
offset: "stroke-dashoffset",
|
|
1811
1811
|
array: "stroke-dasharray"
|
|
1812
|
-
},
|
|
1812
|
+
}, Ja = {
|
|
1813
1813
|
offset: "strokeDashoffset",
|
|
1814
1814
|
array: "strokeDasharray"
|
|
1815
1815
|
};
|
|
1816
|
-
function
|
|
1816
|
+
function Qa(t, e, n = 1, i = 0, s = !0) {
|
|
1817
1817
|
t.pathLength = 1;
|
|
1818
|
-
const r = s ?
|
|
1819
|
-
t[r.offset] =
|
|
1820
|
-
const o =
|
|
1818
|
+
const r = s ? Za : Ja;
|
|
1819
|
+
t[r.offset] = x.transform(-i);
|
|
1820
|
+
const o = x.transform(e), a = x.transform(n);
|
|
1821
1821
|
t[r.array] = `${o} ${a}`;
|
|
1822
1822
|
}
|
|
1823
|
-
const
|
|
1823
|
+
const tl = [
|
|
1824
1824
|
"offsetDistance",
|
|
1825
1825
|
"offsetPath",
|
|
1826
1826
|
"offsetRotate",
|
|
1827
1827
|
"offsetAnchor"
|
|
1828
1828
|
];
|
|
1829
|
-
function
|
|
1830
|
-
var
|
|
1829
|
+
function el(t, h, l, c, u) {
|
|
1830
|
+
var d = h, {
|
|
1831
1831
|
attrX: e,
|
|
1832
1832
|
attrY: n,
|
|
1833
1833
|
attrScale: i,
|
|
1834
1834
|
pathLength: s,
|
|
1835
1835
|
pathSpacing: r = 1,
|
|
1836
1836
|
pathOffset: o = 0
|
|
1837
|
-
} =
|
|
1837
|
+
} = d, a = U(d, [
|
|
1838
1838
|
"attrX",
|
|
1839
1839
|
"attrY",
|
|
1840
1840
|
"attrScale",
|
|
@@ -1843,18 +1843,18 @@ function tl(t, h, l, c, u) {
|
|
|
1843
1843
|
"pathOffset"
|
|
1844
1844
|
]);
|
|
1845
1845
|
var m, y;
|
|
1846
|
-
if (
|
|
1846
|
+
if ($s(t, a, c), l) {
|
|
1847
1847
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
1848
1848
|
return;
|
|
1849
1849
|
}
|
|
1850
1850
|
t.attrs = t.style, t.style = {};
|
|
1851
|
-
const { attrs:
|
|
1852
|
-
|
|
1853
|
-
for (const v of
|
|
1854
|
-
|
|
1855
|
-
e !== void 0 && (
|
|
1851
|
+
const { attrs: f, style: p } = t;
|
|
1852
|
+
f.transform && (p.transform = f.transform, delete f.transform), (p.transform || f.transformOrigin) && (p.transformOrigin = (m = f.transformOrigin) != null ? m : "50% 50%", delete f.transformOrigin), p.transform && (p.transformBox = (y = u == null ? void 0 : u.transformBox) != null ? y : "fill-box", delete f.transformBox);
|
|
1853
|
+
for (const v of tl)
|
|
1854
|
+
f[v] !== void 0 && (p[v] = f[v], delete f[v]);
|
|
1855
|
+
e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), i !== void 0 && (f.scale = i), s !== void 0 && Qa(f, s, r, o, !1);
|
|
1856
1856
|
}
|
|
1857
|
-
const
|
|
1857
|
+
const zs = /* @__PURE__ */ new Set([
|
|
1858
1858
|
"baseFrequency",
|
|
1859
1859
|
"diffuseConstant",
|
|
1860
1860
|
"kernelMatrix",
|
|
@@ -1878,22 +1878,22 @@ const Gs = /* @__PURE__ */ new Set([
|
|
|
1878
1878
|
"startOffset",
|
|
1879
1879
|
"textLength",
|
|
1880
1880
|
"lengthAdjust"
|
|
1881
|
-
]),
|
|
1882
|
-
function
|
|
1883
|
-
|
|
1881
|
+
]), nl = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1882
|
+
function il(t, e, n, i) {
|
|
1883
|
+
Ks(t, e, void 0, i);
|
|
1884
1884
|
for (const s in e.attrs)
|
|
1885
|
-
t.setAttribute(
|
|
1885
|
+
t.setAttribute(zs.has(s) ? s : rn(s), e.attrs[s]);
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1888
|
-
const i =
|
|
1887
|
+
function sl(t, e, n) {
|
|
1888
|
+
const i = Ws(t, e, n);
|
|
1889
1889
|
for (const s in t)
|
|
1890
1890
|
if (L(t[s]) || L(e[s])) {
|
|
1891
|
-
const r =
|
|
1891
|
+
const r = xt.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
1892
1892
|
i[r] = t[s];
|
|
1893
1893
|
}
|
|
1894
1894
|
return i;
|
|
1895
1895
|
}
|
|
1896
|
-
class
|
|
1896
|
+
class Hs extends Us {
|
|
1897
1897
|
constructor() {
|
|
1898
1898
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = B;
|
|
1899
1899
|
}
|
|
@@ -1901,29 +1901,29 @@ class zs extends _s {
|
|
|
1901
1901
|
return e[n];
|
|
1902
1902
|
}
|
|
1903
1903
|
readValueFromInstance(e, n) {
|
|
1904
|
-
if (
|
|
1905
|
-
const i =
|
|
1904
|
+
if (bt.has(n)) {
|
|
1905
|
+
const i = ks(n);
|
|
1906
1906
|
return i && i.default || 0;
|
|
1907
1907
|
}
|
|
1908
|
-
return n =
|
|
1908
|
+
return n = zs.has(n) ? n : rn(n), e.getAttribute(n);
|
|
1909
1909
|
}
|
|
1910
1910
|
scrapeMotionValuesFromProps(e, n, i) {
|
|
1911
|
-
return
|
|
1911
|
+
return sl(e, n, i);
|
|
1912
1912
|
}
|
|
1913
1913
|
build(e, n, i) {
|
|
1914
|
-
|
|
1914
|
+
el(e, n, this.isSVGTag, i.transformTemplate, i.style);
|
|
1915
1915
|
}
|
|
1916
1916
|
renderInstance(e, n, i, s) {
|
|
1917
|
-
|
|
1917
|
+
il(e, n, i, s);
|
|
1918
1918
|
}
|
|
1919
1919
|
mount(e) {
|
|
1920
|
-
this.isSVGTag =
|
|
1920
|
+
this.isSVGTag = nl(e.tagName), super.mount(e);
|
|
1921
1921
|
}
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1924
|
-
return
|
|
1923
|
+
function ol(t, e) {
|
|
1924
|
+
return Ts(t) ? new Hs(e) : new Gs(e);
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1926
|
+
function rl(t, e, n, i = 0, s = 1) {
|
|
1927
1927
|
const r = Array.from(t), o = r.indexOf(e), a = t.size, l = (a - 1) * i, c = typeof n == "function";
|
|
1928
1928
|
return o === r.length - 1 && (e.parent.enteringChildren = void 0), c ? n(o, a) : s === 1 ? o * i : l - o * i;
|
|
1929
1929
|
}
|
|
@@ -1941,71 +1941,71 @@ function ln(t, e, n) {
|
|
|
1941
1941
|
}
|
|
1942
1942
|
return Array.from(t);
|
|
1943
1943
|
}
|
|
1944
|
-
function
|
|
1944
|
+
function Ys(t, e, n, i) {
|
|
1945
1945
|
return typeof t == "string" && an(e) ? ln(t, n, i) : t instanceof NodeList ? Array.from(t) : Array.isArray(t) ? t : [t];
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1947
|
+
function al(t, e, n) {
|
|
1948
1948
|
return t * (e + 1);
|
|
1949
1949
|
}
|
|
1950
1950
|
function ni(t, e, n, i) {
|
|
1951
1951
|
var s;
|
|
1952
1952
|
return typeof e == "number" ? e : e.startsWith("-") || e.startsWith("+") ? Math.max(0, t + parseFloat(e)) : e === "<" ? n : e.startsWith("<") ? Math.max(0, n + parseFloat(e.slice(1))) : (s = i.get(e)) != null ? s : t;
|
|
1953
1953
|
}
|
|
1954
|
-
const
|
|
1954
|
+
const ll = (t, e, n) => {
|
|
1955
1955
|
const i = e - t;
|
|
1956
1956
|
return ((n - t) % i + i) % i + t;
|
|
1957
|
-
},
|
|
1958
|
-
function
|
|
1959
|
-
return
|
|
1957
|
+
}, Xs = (t) => Array.isArray(t) && typeof t[0] != "number";
|
|
1958
|
+
function qs(t, e) {
|
|
1959
|
+
return Xs(t) ? t[ll(0, t.length, e)] : t;
|
|
1960
1960
|
}
|
|
1961
|
-
function
|
|
1961
|
+
function ul(t, e, n) {
|
|
1962
1962
|
for (let i = 0; i < t.length; i++) {
|
|
1963
1963
|
const s = t[i];
|
|
1964
|
-
s.at > e && s.at < n && (
|
|
1964
|
+
s.at > e && s.at < n && (ce(t, s), i--);
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
|
-
function
|
|
1968
|
-
|
|
1967
|
+
function cl(t, e, n, i, s, r) {
|
|
1968
|
+
ul(t, s, r);
|
|
1969
1969
|
for (let o = 0; o < e.length; o++)
|
|
1970
1970
|
t.push({
|
|
1971
1971
|
value: e[o],
|
|
1972
1972
|
at: M(s, r, i[o]),
|
|
1973
|
-
easing:
|
|
1973
|
+
easing: qs(n, o)
|
|
1974
1974
|
});
|
|
1975
1975
|
}
|
|
1976
|
-
function
|
|
1976
|
+
function hl(t, e) {
|
|
1977
1977
|
for (let n = 0; n < t.length; n++)
|
|
1978
1978
|
t[n] = t[n] / (e + 1);
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1980
|
+
function fl(t, e) {
|
|
1981
1981
|
return t.at === e.at ? t.value === null ? 1 : e.value === null ? -1 : 0 : t.at - e.at;
|
|
1982
1982
|
}
|
|
1983
1983
|
const yt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
|
|
1984
1984
|
const i = e - t;
|
|
1985
1985
|
return i === 0 ? 1 : (n - t) / i;
|
|
1986
1986
|
};
|
|
1987
|
-
function
|
|
1987
|
+
function Zs(t, e) {
|
|
1988
1988
|
const n = t[t.length - 1];
|
|
1989
1989
|
for (let i = 1; i <= e; i++) {
|
|
1990
1990
|
const s = /* @__PURE__ */ yt(0, e, i);
|
|
1991
1991
|
t.push(M(n, 1, s));
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
|
-
function
|
|
1994
|
+
function Js(t) {
|
|
1995
1995
|
const e = [0];
|
|
1996
|
-
return
|
|
1996
|
+
return Zs(e, t.length - 1), e;
|
|
1997
1997
|
}
|
|
1998
|
-
const
|
|
1998
|
+
const ie = 2e4;
|
|
1999
1999
|
function un(t) {
|
|
2000
2000
|
let e = 0;
|
|
2001
2001
|
const n = 50;
|
|
2002
2002
|
let i = t.next(e);
|
|
2003
|
-
for (; !i.done && e <
|
|
2003
|
+
for (; !i.done && e < ie; )
|
|
2004
2004
|
e += n, i = t.next(e);
|
|
2005
|
-
return e >=
|
|
2005
|
+
return e >= ie ? 1 / 0 : e;
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2008
|
-
const i = n(E(g({}, t), { keyframes: [0, e] })), s = Math.min(un(i),
|
|
2007
|
+
function Qs(t, e = 100, n) {
|
|
2008
|
+
const i = n(E(g({}, t), { keyframes: [0, e] })), s = Math.min(un(i), ie);
|
|
2009
2009
|
return {
|
|
2010
2010
|
type: "keyframes",
|
|
2011
2011
|
ease: (r) => i.next(s * r).value / e,
|
|
@@ -2015,89 +2015,89 @@ function Js(t, e = 100, n) {
|
|
|
2015
2015
|
function cn(t) {
|
|
2016
2016
|
return typeof t == "function" && "applyToOptions" in t;
|
|
2017
2017
|
}
|
|
2018
|
-
const
|
|
2019
|
-
function
|
|
2018
|
+
const dl = "easeInOut", pl = 20;
|
|
2019
|
+
function ml(t, r = {}, i, s) {
|
|
2020
2020
|
var o = r, { defaultTransition: e = {} } = o, n = U(o, ["defaultTransition"]);
|
|
2021
2021
|
const a = e.duration || 0.3, l = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), u = {}, h = /* @__PURE__ */ new Map();
|
|
2022
|
-
let
|
|
2022
|
+
let d = 0, f = 0, p = 0;
|
|
2023
2023
|
for (let m = 0; m < t.length; m++) {
|
|
2024
2024
|
const y = t[m];
|
|
2025
2025
|
if (typeof y == "string") {
|
|
2026
|
-
h.set(y,
|
|
2026
|
+
h.set(y, f);
|
|
2027
2027
|
continue;
|
|
2028
2028
|
} else if (!Array.isArray(y)) {
|
|
2029
|
-
h.set(y.name, ni(
|
|
2029
|
+
h.set(y.name, ni(f, y.at, d, h));
|
|
2030
2030
|
continue;
|
|
2031
2031
|
}
|
|
2032
|
-
let [v,
|
|
2033
|
-
T.at !== void 0 && (
|
|
2034
|
-
let
|
|
2035
|
-
const
|
|
2036
|
-
const O =
|
|
2032
|
+
let [v, w, T = {}] = y;
|
|
2033
|
+
T.at !== void 0 && (f = ni(f, T.at, d, h));
|
|
2034
|
+
let S = 0;
|
|
2035
|
+
const b = (A, V, P, k = 0, I = 0) => {
|
|
2036
|
+
const O = gl(A), Cn = V, { delay: he = 0, times: Z = Js(O), type: fe = "keyframes", repeat: Tt, repeatType: Ih, repeatDelay: jh = 0 } = Cn, Ho = U(Cn, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
|
|
2037
2037
|
let { ease: et = e.ease || "easeOut", duration: K } = V;
|
|
2038
|
-
const Sn = typeof
|
|
2038
|
+
const Sn = typeof he == "function" ? he(k, I) : he, wn = O.length, An = cn(fe) ? fe : s == null ? void 0 : s[fe || "keyframes"];
|
|
2039
2039
|
if (wn <= 2 && An) {
|
|
2040
2040
|
let St = 100;
|
|
2041
|
-
if (wn === 2 &&
|
|
2041
|
+
if (wn === 2 && xl(O)) {
|
|
2042
2042
|
const wt = O[1] - O[0];
|
|
2043
2043
|
St = Math.abs(wt);
|
|
2044
2044
|
}
|
|
2045
|
-
const
|
|
2046
|
-
K !== void 0 && (
|
|
2047
|
-
const
|
|
2048
|
-
et =
|
|
2045
|
+
const Nt = g({}, Ho);
|
|
2046
|
+
K !== void 0 && (Nt.duration = /* @__PURE__ */ G(K));
|
|
2047
|
+
const $t = Qs(Nt, St, An);
|
|
2048
|
+
et = $t.ease, K = $t.duration;
|
|
2049
2049
|
}
|
|
2050
2050
|
K != null || (K = a);
|
|
2051
|
-
const Pn =
|
|
2051
|
+
const Pn = f + Sn;
|
|
2052
2052
|
Z.length === 1 && Z[0] === 0 && (Z[1] = 1);
|
|
2053
2053
|
const En = Z.length - O.length;
|
|
2054
|
-
if (En > 0 &&
|
|
2055
|
-
q(Tt <
|
|
2056
|
-
const St = [...O],
|
|
2054
|
+
if (En > 0 && Zs(Z, En), O.length === 1 && O.unshift(null), Tt) {
|
|
2055
|
+
q(Tt < pl, "Repeat count too high, must be less than 20", "repeat-count-high"), K = al(K, Tt);
|
|
2056
|
+
const St = [...O], Nt = [...Z];
|
|
2057
2057
|
et = Array.isArray(et) ? [...et] : [et];
|
|
2058
|
-
const
|
|
2058
|
+
const $t = [...et];
|
|
2059
2059
|
for (let wt = 0; wt < Tt; wt++) {
|
|
2060
2060
|
O.push(...St);
|
|
2061
2061
|
for (let At = 0; At < St.length; At++)
|
|
2062
|
-
Z.push(
|
|
2062
|
+
Z.push(Nt[At] + (wt + 1)), et.push(At === 0 ? "linear" : qs($t, At - 1));
|
|
2063
2063
|
}
|
|
2064
|
-
|
|
2064
|
+
hl(Z, Tt);
|
|
2065
2065
|
}
|
|
2066
2066
|
const Vn = Pn + K;
|
|
2067
|
-
|
|
2067
|
+
cl(P, O, et, Z, Pn, Vn), S = Math.max(Sn + K, S), p = Math.max(Vn, p);
|
|
2068
2068
|
};
|
|
2069
2069
|
if (L(v)) {
|
|
2070
2070
|
const A = ii(v, c);
|
|
2071
|
-
|
|
2071
|
+
b(w, T, si("default", A));
|
|
2072
2072
|
} else {
|
|
2073
|
-
const A =
|
|
2073
|
+
const A = Ys(v, w, i, u), V = A.length;
|
|
2074
2074
|
for (let P = 0; P < V; P++) {
|
|
2075
|
-
|
|
2076
|
-
const k = A[P],
|
|
2077
|
-
for (const O in
|
|
2078
|
-
|
|
2075
|
+
w = w, T = T;
|
|
2076
|
+
const k = A[P], I = ii(k, c);
|
|
2077
|
+
for (const O in w)
|
|
2078
|
+
b(w[O], yl(T, O), si(O, I), P, V);
|
|
2079
2079
|
}
|
|
2080
2080
|
}
|
|
2081
|
-
|
|
2081
|
+
d = f, f += S;
|
|
2082
2082
|
}
|
|
2083
2083
|
return c.forEach((m, y) => {
|
|
2084
2084
|
for (const v in m) {
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2087
|
-
const T = [],
|
|
2088
|
-
for (let V = 0; V <
|
|
2089
|
-
const { at: P, value: k, easing:
|
|
2090
|
-
T.push(k),
|
|
2085
|
+
const w = m[v];
|
|
2086
|
+
w.sort(fl);
|
|
2087
|
+
const T = [], S = [], b = [];
|
|
2088
|
+
for (let V = 0; V < w.length; V++) {
|
|
2089
|
+
const { at: P, value: k, easing: I } = w[V];
|
|
2090
|
+
T.push(k), S.push(/* @__PURE__ */ yt(0, p, P)), b.push(I || "easeOut");
|
|
2091
2091
|
}
|
|
2092
|
-
|
|
2092
|
+
S[0] !== 0 && (S.unshift(0), T.unshift(T[0]), b.unshift(dl)), S[S.length - 1] !== 1 && (S.push(1), T.push(null)), l.has(y) || l.set(y, {
|
|
2093
2093
|
keyframes: {},
|
|
2094
2094
|
transition: {}
|
|
2095
2095
|
});
|
|
2096
2096
|
const A = l.get(y);
|
|
2097
2097
|
A.keyframes[v] = T, A.transition[v] = g(E(g({}, e), {
|
|
2098
2098
|
duration: p,
|
|
2099
|
-
ease:
|
|
2100
|
-
times:
|
|
2099
|
+
ease: b,
|
|
2100
|
+
times: S
|
|
2101
2101
|
}), n);
|
|
2102
2102
|
}
|
|
2103
2103
|
}), l;
|
|
@@ -2108,72 +2108,72 @@ function ii(t, e) {
|
|
|
2108
2108
|
function si(t, e) {
|
|
2109
2109
|
return e[t] || (e[t] = []), e[t];
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function gl(t) {
|
|
2112
2112
|
return Array.isArray(t) ? t : [t];
|
|
2113
2113
|
}
|
|
2114
|
-
function
|
|
2114
|
+
function yl(t, e) {
|
|
2115
2115
|
return t && t[e] ? g(g({}, t), t[e]) : g({}, t);
|
|
2116
2116
|
}
|
|
2117
|
-
const
|
|
2118
|
-
function
|
|
2117
|
+
const vl = (t) => typeof t == "number", xl = (t) => t.every(vl), bl = (t) => Array.isArray(t);
|
|
2118
|
+
function Tl(t, e, n) {
|
|
2119
2119
|
const i = t.getProps();
|
|
2120
|
-
return
|
|
2120
|
+
return Vs(i, e, i.custom, t);
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2122
|
+
function Sl(t, e, n) {
|
|
2123
2123
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, gt(n));
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2125
|
+
function wl(t) {
|
|
2126
2126
|
return bl(t) ? t[t.length - 1] || 0 : t;
|
|
2127
2127
|
}
|
|
2128
|
-
function
|
|
2129
|
-
let o =
|
|
2128
|
+
function Al(t, e) {
|
|
2129
|
+
let o = Tl(t, e) || {}, { transitionEnd: i = {}, transition: s = {} } = o, r = U(o, ["transitionEnd", "transition"]);
|
|
2130
2130
|
r = g(g({}, r), i);
|
|
2131
2131
|
for (const a in r) {
|
|
2132
|
-
const l =
|
|
2133
|
-
|
|
2132
|
+
const l = wl(r[a]);
|
|
2133
|
+
Sl(t, a, l);
|
|
2134
2134
|
}
|
|
2135
2135
|
}
|
|
2136
|
-
function
|
|
2136
|
+
function Pl(t) {
|
|
2137
2137
|
return !!(L(t) && t.add);
|
|
2138
2138
|
}
|
|
2139
|
-
function
|
|
2139
|
+
function El(t, e) {
|
|
2140
2140
|
const n = t.getValue("willChange");
|
|
2141
|
-
if (
|
|
2141
|
+
if (Pl(n))
|
|
2142
2142
|
return n.add(e);
|
|
2143
2143
|
if (!n && J.WillChange) {
|
|
2144
2144
|
const i = new J.WillChange("auto");
|
|
2145
2145
|
t.addValue("willChange", i), i.add(e);
|
|
2146
2146
|
}
|
|
2147
2147
|
}
|
|
2148
|
-
const
|
|
2149
|
-
function
|
|
2150
|
-
return t.props[
|
|
2148
|
+
const Vl = "framerAppearId", Cl = "data-" + rn(Vl);
|
|
2149
|
+
function to(t) {
|
|
2150
|
+
return t.props[Cl];
|
|
2151
2151
|
}
|
|
2152
|
-
const
|
|
2153
|
-
function
|
|
2154
|
-
const s = t.filter(
|
|
2152
|
+
const Ml = (t) => t !== null;
|
|
2153
|
+
function Dl(t, { repeat: e, repeatType: n = "loop" }, i) {
|
|
2154
|
+
const s = t.filter(Ml), r = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
|
|
2155
2155
|
return s[r];
|
|
2156
2156
|
}
|
|
2157
|
-
const
|
|
2157
|
+
const Rl = {
|
|
2158
2158
|
type: "spring",
|
|
2159
2159
|
stiffness: 500,
|
|
2160
2160
|
damping: 25,
|
|
2161
2161
|
restSpeed: 10
|
|
2162
|
-
},
|
|
2162
|
+
}, Ll = (t) => ({
|
|
2163
2163
|
type: "spring",
|
|
2164
2164
|
stiffness: 550,
|
|
2165
2165
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
2166
2166
|
restSpeed: 10
|
|
2167
|
-
}),
|
|
2167
|
+
}), Bl = {
|
|
2168
2168
|
type: "keyframes",
|
|
2169
2169
|
duration: 0.8
|
|
2170
|
-
},
|
|
2170
|
+
}, kl = {
|
|
2171
2171
|
type: "keyframes",
|
|
2172
2172
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2173
2173
|
duration: 0.3
|
|
2174
|
-
},
|
|
2175
|
-
function
|
|
2176
|
-
var
|
|
2174
|
+
}, Fl = (t, { keyframes: e }) => e.length > 2 ? Bl : bt.has(t) ? t.startsWith("scale") ? Ll(e[1]) : Rl : kl;
|
|
2175
|
+
function Ol(h) {
|
|
2176
|
+
var d = h, { when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: c } = d, u = U(d, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
|
|
2177
2177
|
return !!Object.keys(u).length;
|
|
2178
2178
|
}
|
|
2179
2179
|
function hn(t, e) {
|
|
@@ -2183,17 +2183,17 @@ function hn(t, e) {
|
|
|
2183
2183
|
function $e(t) {
|
|
2184
2184
|
t.duration = 0, t.type = "keyframes";
|
|
2185
2185
|
}
|
|
2186
|
-
function
|
|
2186
|
+
function xe(t, e, n) {
|
|
2187
2187
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
2188
2188
|
}
|
|
2189
|
-
function
|
|
2189
|
+
function Il({ hue: t, saturation: e, lightness: n, alpha: i }) {
|
|
2190
2190
|
t /= 360, e /= 100, n /= 100;
|
|
2191
2191
|
let s = 0, r = 0, o = 0;
|
|
2192
2192
|
if (!e)
|
|
2193
2193
|
s = r = o = n;
|
|
2194
2194
|
else {
|
|
2195
2195
|
const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
|
|
2196
|
-
s =
|
|
2196
|
+
s = xe(l, a, t + 1 / 3), r = xe(l, a, t), o = xe(l, a, t - 1 / 3);
|
|
2197
2197
|
}
|
|
2198
2198
|
return {
|
|
2199
2199
|
red: Math.round(s * 255),
|
|
@@ -2202,38 +2202,38 @@ function Ol({ hue: t, saturation: e, lightness: n, alpha: i }) {
|
|
|
2202
2202
|
alpha: i
|
|
2203
2203
|
};
|
|
2204
2204
|
}
|
|
2205
|
-
function
|
|
2205
|
+
function se(t, e) {
|
|
2206
2206
|
return (n) => n > 0 ? e : t;
|
|
2207
2207
|
}
|
|
2208
|
-
const
|
|
2208
|
+
const be = (t, e, n) => {
|
|
2209
2209
|
const i = t * t, s = n * (e * e - i) + i;
|
|
2210
2210
|
return s < 0 ? 0 : Math.sqrt(s);
|
|
2211
|
-
}, jl = [Re, rt, ht],
|
|
2211
|
+
}, jl = [Re, rt, ht], _l = (t) => jl.find((e) => e.test(t));
|
|
2212
2212
|
function oi(t) {
|
|
2213
|
-
const e =
|
|
2214
|
-
if (
|
|
2213
|
+
const e = _l(t);
|
|
2214
|
+
if (jt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
|
|
2215
2215
|
return !1;
|
|
2216
2216
|
let n = e.parse(t);
|
|
2217
|
-
return e === ht && (n =
|
|
2217
|
+
return e === ht && (n = Il(n)), n;
|
|
2218
2218
|
}
|
|
2219
2219
|
const ri = (t, e) => {
|
|
2220
2220
|
const n = oi(t), i = oi(e);
|
|
2221
2221
|
if (!n || !i)
|
|
2222
|
-
return
|
|
2222
|
+
return se(t, e);
|
|
2223
2223
|
const s = g({}, n);
|
|
2224
|
-
return (r) => (s.red =
|
|
2224
|
+
return (r) => (s.red = be(n.red, i.red, r), s.green = be(n.green, i.green, r), s.blue = be(n.blue, i.blue, r), s.alpha = M(n.alpha, i.alpha, r), rt.transform(s));
|
|
2225
2225
|
}, Ke = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2226
|
-
function
|
|
2226
|
+
function Ul(t, e) {
|
|
2227
2227
|
return Ke.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
2228
2228
|
}
|
|
2229
|
-
const
|
|
2230
|
-
function
|
|
2229
|
+
const Nl = (t, e) => (n) => e(t(n)), _t = (...t) => t.reduce(Nl);
|
|
2230
|
+
function $l(t, e) {
|
|
2231
2231
|
return (n) => M(t, e, n);
|
|
2232
2232
|
}
|
|
2233
2233
|
function fn(t) {
|
|
2234
|
-
return typeof t == "number" ?
|
|
2234
|
+
return typeof t == "number" ? $l : typeof t == "string" ? Qe(t) ? se : R.test(t) ? ri : Gl : Array.isArray(t) ? eo : typeof t == "object" ? R.test(t) ? ri : Kl : se;
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2236
|
+
function eo(t, e) {
|
|
2237
2237
|
const n = [...t], i = n.length, s = t.map((r, o) => fn(r)(r, e[o]));
|
|
2238
2238
|
return (r) => {
|
|
2239
2239
|
for (let o = 0; o < i; o++)
|
|
@@ -2241,7 +2241,7 @@ function to(t, e) {
|
|
|
2241
2241
|
return n;
|
|
2242
2242
|
};
|
|
2243
2243
|
}
|
|
2244
|
-
function
|
|
2244
|
+
function Kl(t, e) {
|
|
2245
2245
|
const n = g(g({}, t), e), i = {};
|
|
2246
2246
|
for (const s in n)
|
|
2247
2247
|
t[s] !== void 0 && e[s] !== void 0 && (i[s] = fn(t[s])(t[s], e[s]));
|
|
@@ -2251,7 +2251,7 @@ function $l(t, e) {
|
|
|
2251
2251
|
return n;
|
|
2252
2252
|
};
|
|
2253
2253
|
}
|
|
2254
|
-
function
|
|
2254
|
+
function Wl(t, e) {
|
|
2255
2255
|
var s;
|
|
2256
2256
|
const n = [], i = { color: 0, var: 0, number: 0 };
|
|
2257
2257
|
for (let r = 0; r < e.values.length; r++) {
|
|
@@ -2260,14 +2260,14 @@ function Kl(t, e) {
|
|
|
2260
2260
|
}
|
|
2261
2261
|
return n;
|
|
2262
2262
|
}
|
|
2263
|
-
const
|
|
2264
|
-
const n = st.createTransformer(e), i =
|
|
2265
|
-
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? Ke.has(t) && !s.values.length || Ke.has(e) && !i.values.length ?
|
|
2263
|
+
const Gl = (t, e) => {
|
|
2264
|
+
const n = st.createTransformer(e), i = Bt(t), s = Bt(e);
|
|
2265
|
+
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? Ke.has(t) && !s.values.length || Ke.has(e) && !i.values.length ? Ul(t, e) : _t(eo(Wl(i, s), s.values), n) : (jt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), se(t, e));
|
|
2266
2266
|
};
|
|
2267
|
-
function
|
|
2267
|
+
function no(t, e, n) {
|
|
2268
2268
|
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? M(t, e, n) : fn(t)(t, e);
|
|
2269
2269
|
}
|
|
2270
|
-
const
|
|
2270
|
+
const zl = (t) => {
|
|
2271
2271
|
const e = ({ timestamp: n }) => t(n);
|
|
2272
2272
|
return {
|
|
2273
2273
|
start: (n = !0) => C.update(e, n),
|
|
@@ -2276,18 +2276,18 @@ const Gl = (t) => {
|
|
|
2276
2276
|
* If we're processing this frame we can use the
|
|
2277
2277
|
* framelocked timestamp to keep things in sync.
|
|
2278
2278
|
*/
|
|
2279
|
-
now: () => F.isProcessing ? F.timestamp :
|
|
2279
|
+
now: () => F.isProcessing ? F.timestamp : j.now()
|
|
2280
2280
|
};
|
|
2281
|
-
},
|
|
2281
|
+
}, io = (t, e, n = 10) => {
|
|
2282
2282
|
let i = "";
|
|
2283
2283
|
const s = Math.max(Math.round(e / n), 2);
|
|
2284
2284
|
for (let r = 0; r < s; r++)
|
|
2285
2285
|
i += Math.round(t(r / (s - 1)) * 1e4) / 1e4 + ", ";
|
|
2286
2286
|
return `linear(${i.substring(0, i.length - 2)})`;
|
|
2287
|
-
},
|
|
2288
|
-
function
|
|
2289
|
-
const i = Math.max(e -
|
|
2290
|
-
return
|
|
2287
|
+
}, Hl = 5;
|
|
2288
|
+
function so(t, e, n) {
|
|
2289
|
+
const i = Math.max(e - Hl, 0);
|
|
2290
|
+
return Es(n - t(i), e - i);
|
|
2291
2291
|
}
|
|
2292
2292
|
const D = {
|
|
2293
2293
|
// Default spring physics
|
|
@@ -2318,16 +2318,16 @@ const D = {
|
|
|
2318
2318
|
minDamping: 0.05,
|
|
2319
2319
|
maxDamping: 1
|
|
2320
2320
|
}, Te = 1e-3;
|
|
2321
|
-
function
|
|
2321
|
+
function Yl({ duration: t = D.duration, bounce: e = D.bounce, velocity: n = D.velocity, mass: i = D.mass }) {
|
|
2322
2322
|
let s, r;
|
|
2323
|
-
|
|
2323
|
+
jt(t <= /* @__PURE__ */ G(D.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
2324
2324
|
let o = 1 - e;
|
|
2325
2325
|
o = X(D.minDamping, D.maxDamping, o), t = X(D.minDuration, D.maxDuration, /* @__PURE__ */ N(t)), o < 1 ? (s = (c) => {
|
|
2326
|
-
const u = c * o, h = u * t,
|
|
2327
|
-
return Te -
|
|
2326
|
+
const u = c * o, h = u * t, d = u - n, f = We(c, o), p = Math.exp(-h);
|
|
2327
|
+
return Te - d / f * p;
|
|
2328
2328
|
}, r = (c) => {
|
|
2329
|
-
const h = c * o * t,
|
|
2330
|
-
return (-s(c) + Te > 0 ? -1 : 1) * ((
|
|
2329
|
+
const h = c * o * t, d = h * n + n, f = Math.pow(o, 2) * Math.pow(c, 2) * t, p = Math.exp(-h), m = We(Math.pow(c, 2), o);
|
|
2330
|
+
return (-s(c) + Te > 0 ? -1 : 1) * ((d - f) * p) / m;
|
|
2331
2331
|
}) : (s = (c) => {
|
|
2332
2332
|
const u = Math.exp(-c * t), h = (c - n) * t + 1;
|
|
2333
2333
|
return -Te + u * h;
|
|
@@ -2335,7 +2335,7 @@ function Hl({ duration: t = D.duration, bounce: e = D.bounce, velocity: n = D.ve
|
|
|
2335
2335
|
const u = Math.exp(-c * t), h = (n - c) * (t * t);
|
|
2336
2336
|
return u * h;
|
|
2337
2337
|
});
|
|
2338
|
-
const a = 5 / t, l =
|
|
2338
|
+
const a = 5 / t, l = ql(s, r, a);
|
|
2339
2339
|
if (t = /* @__PURE__ */ G(t), isNaN(l))
|
|
2340
2340
|
return {
|
|
2341
2341
|
stiffness: D.stiffness,
|
|
@@ -2351,21 +2351,21 @@ function Hl({ duration: t = D.duration, bounce: e = D.bounce, velocity: n = D.ve
|
|
|
2351
2351
|
};
|
|
2352
2352
|
}
|
|
2353
2353
|
}
|
|
2354
|
-
const
|
|
2355
|
-
function
|
|
2354
|
+
const Xl = 12;
|
|
2355
|
+
function ql(t, e, n) {
|
|
2356
2356
|
let i = n;
|
|
2357
|
-
for (let s = 1; s <
|
|
2357
|
+
for (let s = 1; s < Xl; s++)
|
|
2358
2358
|
i = i - t(i) / e(i);
|
|
2359
2359
|
return i;
|
|
2360
2360
|
}
|
|
2361
2361
|
function We(t, e) {
|
|
2362
2362
|
return t * Math.sqrt(1 - e * e);
|
|
2363
2363
|
}
|
|
2364
|
-
const
|
|
2364
|
+
const Zl = ["duration", "bounce"], Jl = ["stiffness", "damping", "mass"];
|
|
2365
2365
|
function ai(t, e) {
|
|
2366
2366
|
return e.some((n) => t[n] !== void 0);
|
|
2367
2367
|
}
|
|
2368
|
-
function
|
|
2368
|
+
function Ql(t) {
|
|
2369
2369
|
let e = g({
|
|
2370
2370
|
velocity: D.velocity,
|
|
2371
2371
|
stiffness: D.stiffness,
|
|
@@ -2373,7 +2373,7 @@ function Jl(t) {
|
|
|
2373
2373
|
mass: D.mass,
|
|
2374
2374
|
isResolvedFromDuration: !1
|
|
2375
2375
|
}, t);
|
|
2376
|
-
if (!ai(t,
|
|
2376
|
+
if (!ai(t, Jl) && ai(t, Zl))
|
|
2377
2377
|
if (t.visualDuration) {
|
|
2378
2378
|
const n = t.visualDuration, i = 2 * Math.PI / (n * 1.2), s = i * i, r = 2 * X(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
|
|
2379
2379
|
e = E(g({}, e), {
|
|
@@ -2382,84 +2382,84 @@ function Jl(t) {
|
|
|
2382
2382
|
damping: r
|
|
2383
2383
|
});
|
|
2384
2384
|
} else {
|
|
2385
|
-
const n =
|
|
2385
|
+
const n = Yl(t);
|
|
2386
2386
|
e = E(g(g({}, e), n), {
|
|
2387
2387
|
mass: D.mass
|
|
2388
2388
|
}), e.isResolvedFromDuration = !0;
|
|
2389
2389
|
}
|
|
2390
2390
|
return e;
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2392
|
+
function Ft(t = D.visualDuration, e = D.bounce) {
|
|
2393
2393
|
const n = typeof t != "object" ? {
|
|
2394
2394
|
visualDuration: t,
|
|
2395
2395
|
keyframes: [0, 1],
|
|
2396
2396
|
bounce: e
|
|
2397
2397
|
} : t;
|
|
2398
2398
|
let { restSpeed: i, restDelta: s } = n;
|
|
2399
|
-
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: l, damping: c, mass: u, duration: h, velocity:
|
|
2399
|
+
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: l, damping: c, mass: u, duration: h, velocity: d, isResolvedFromDuration: f } = Ql(E(g({}, n), {
|
|
2400
2400
|
velocity: -/* @__PURE__ */ N(n.velocity || 0)
|
|
2401
|
-
})), p =
|
|
2402
|
-
i || (i =
|
|
2401
|
+
})), p = d || 0, m = c / (2 * Math.sqrt(l * u)), y = o - r, v = /* @__PURE__ */ N(Math.sqrt(l / u)), w = Math.abs(y) < 5;
|
|
2402
|
+
i || (i = w ? D.restSpeed.granular : D.restSpeed.default), s || (s = w ? D.restDelta.granular : D.restDelta.default);
|
|
2403
2403
|
let T;
|
|
2404
2404
|
if (m < 1) {
|
|
2405
|
-
const
|
|
2405
|
+
const b = We(v, m);
|
|
2406
2406
|
T = (A) => {
|
|
2407
2407
|
const V = Math.exp(-m * v * A);
|
|
2408
|
-
return o - V * ((p + m * v * y) /
|
|
2408
|
+
return o - V * ((p + m * v * y) / b * Math.sin(b * A) + y * Math.cos(b * A));
|
|
2409
2409
|
};
|
|
2410
2410
|
} else if (m === 1)
|
|
2411
|
-
T = (
|
|
2411
|
+
T = (b) => o - Math.exp(-v * b) * (y + (p + v * y) * b);
|
|
2412
2412
|
else {
|
|
2413
|
-
const
|
|
2413
|
+
const b = v * Math.sqrt(m * m - 1);
|
|
2414
2414
|
T = (A) => {
|
|
2415
|
-
const V = Math.exp(-m * v * A), P = Math.min(
|
|
2416
|
-
return o - V * ((p + m * v * y) * Math.sinh(P) +
|
|
2415
|
+
const V = Math.exp(-m * v * A), P = Math.min(b * A, 300);
|
|
2416
|
+
return o - V * ((p + m * v * y) * Math.sinh(P) + b * y * Math.cosh(P)) / b;
|
|
2417
2417
|
};
|
|
2418
2418
|
}
|
|
2419
|
-
const
|
|
2420
|
-
calculatedDuration:
|
|
2421
|
-
next: (
|
|
2422
|
-
const A = T(
|
|
2423
|
-
if (
|
|
2424
|
-
a.done =
|
|
2419
|
+
const S = {
|
|
2420
|
+
calculatedDuration: f && h || null,
|
|
2421
|
+
next: (b) => {
|
|
2422
|
+
const A = T(b);
|
|
2423
|
+
if (f)
|
|
2424
|
+
a.done = b >= h;
|
|
2425
2425
|
else {
|
|
2426
|
-
let V =
|
|
2427
|
-
m < 1 && (V =
|
|
2426
|
+
let V = b === 0 ? p : 0;
|
|
2427
|
+
m < 1 && (V = b === 0 ? /* @__PURE__ */ G(p) : so(T, b, A));
|
|
2428
2428
|
const P = Math.abs(V) <= i, k = Math.abs(o - A) <= s;
|
|
2429
2429
|
a.done = P && k;
|
|
2430
2430
|
}
|
|
2431
2431
|
return a.value = a.done ? o : A, a;
|
|
2432
2432
|
},
|
|
2433
2433
|
toString: () => {
|
|
2434
|
-
const
|
|
2435
|
-
return
|
|
2434
|
+
const b = Math.min(un(S), ie), A = io((V) => S.next(b * V).value, b, 30);
|
|
2435
|
+
return b + "ms " + A;
|
|
2436
2436
|
},
|
|
2437
2437
|
toTransition: () => {
|
|
2438
2438
|
}
|
|
2439
2439
|
};
|
|
2440
|
-
return
|
|
2440
|
+
return S;
|
|
2441
2441
|
}
|
|
2442
|
-
|
|
2443
|
-
const e =
|
|
2442
|
+
Ft.applyToOptions = (t) => {
|
|
2443
|
+
const e = Qs(t, 100, Ft);
|
|
2444
2444
|
return t.ease = e.ease, t.duration = /* @__PURE__ */ G(e.duration), t.type = "keyframes", t;
|
|
2445
2445
|
};
|
|
2446
2446
|
function Ge({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
2447
|
-
const h = t[0],
|
|
2447
|
+
const h = t[0], d = {
|
|
2448
2448
|
done: !1,
|
|
2449
2449
|
value: h
|
|
2450
|
-
},
|
|
2450
|
+
}, f = (P) => a !== void 0 && P < a || l !== void 0 && P > l, p = (P) => a === void 0 ? l : l === void 0 || Math.abs(a - P) < Math.abs(l - P) ? a : l;
|
|
2451
2451
|
let m = n * e;
|
|
2452
2452
|
const y = h + m, v = o === void 0 ? y : o(y);
|
|
2453
2453
|
v !== y && (m = v - h);
|
|
2454
|
-
const
|
|
2455
|
-
const k =
|
|
2456
|
-
|
|
2454
|
+
const w = (P) => -m * Math.exp(-P / i), T = (P) => v + w(P), S = (P) => {
|
|
2455
|
+
const k = w(P), I = T(P);
|
|
2456
|
+
d.done = Math.abs(k) <= c, d.value = d.done ? v : I;
|
|
2457
2457
|
};
|
|
2458
|
-
let
|
|
2458
|
+
let b, A;
|
|
2459
2459
|
const V = (P) => {
|
|
2460
|
-
d
|
|
2461
|
-
keyframes: [
|
|
2462
|
-
velocity:
|
|
2460
|
+
f(d.value) && (b = P, A = Ft({
|
|
2461
|
+
keyframes: [d.value, p(d.value)],
|
|
2462
|
+
velocity: so(T, P, d.value),
|
|
2463
2463
|
// TODO: This should be passing * 1000
|
|
2464
2464
|
damping: s,
|
|
2465
2465
|
stiffness: r,
|
|
@@ -2471,23 +2471,23 @@ function Ge({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2471
2471
|
calculatedDuration: null,
|
|
2472
2472
|
next: (P) => {
|
|
2473
2473
|
let k = !1;
|
|
2474
|
-
return !A &&
|
|
2474
|
+
return !A && b === void 0 && (k = !0, S(P), V(P)), b !== void 0 && P >= b ? A.next(P - b) : (!k && S(P), d);
|
|
2475
2475
|
}
|
|
2476
2476
|
};
|
|
2477
2477
|
}
|
|
2478
|
-
function
|
|
2479
|
-
const i = [], s = n || J.mix ||
|
|
2478
|
+
function tu(t, e, n) {
|
|
2479
|
+
const i = [], s = n || J.mix || no, r = t.length - 1;
|
|
2480
2480
|
for (let o = 0; o < r; o++) {
|
|
2481
2481
|
let a = s(t[o], t[o + 1]);
|
|
2482
2482
|
if (e) {
|
|
2483
2483
|
const l = Array.isArray(e) ? e[o] || _ : e;
|
|
2484
|
-
a =
|
|
2484
|
+
a = _t(l, a);
|
|
2485
2485
|
}
|
|
2486
2486
|
i.push(a);
|
|
2487
2487
|
}
|
|
2488
2488
|
return i;
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2490
|
+
function eu(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
2491
2491
|
const r = t.length;
|
|
2492
2492
|
if (q(r === e.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
|
|
2493
2493
|
return () => e[0];
|
|
@@ -2495,90 +2495,90 @@ function tu(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
|
2495
2495
|
return () => e[1];
|
|
2496
2496
|
const o = t[0] === t[1];
|
|
2497
2497
|
t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
2498
|
-
const a =
|
|
2498
|
+
const a = tu(e, i, s), l = a.length, c = (u) => {
|
|
2499
2499
|
if (o && u < t[0])
|
|
2500
2500
|
return e[0];
|
|
2501
2501
|
let h = 0;
|
|
2502
2502
|
if (l > 1)
|
|
2503
2503
|
for (; h < t.length - 2 && !(u < t[h + 1]); h++)
|
|
2504
2504
|
;
|
|
2505
|
-
const
|
|
2506
|
-
return a[h](
|
|
2505
|
+
const d = /* @__PURE__ */ yt(t[h], t[h + 1], u);
|
|
2506
|
+
return a[h](d);
|
|
2507
2507
|
};
|
|
2508
2508
|
return n ? (u) => c(X(t[0], t[r - 1], u)) : c;
|
|
2509
2509
|
}
|
|
2510
|
-
function
|
|
2510
|
+
function nu(t, e) {
|
|
2511
2511
|
return t.map((n) => n * e);
|
|
2512
2512
|
}
|
|
2513
|
-
const
|
|
2514
|
-
function
|
|
2513
|
+
const oo = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, iu = 1e-7, su = 12;
|
|
2514
|
+
function ou(t, e, n, i, s) {
|
|
2515
2515
|
let r, o, a = 0;
|
|
2516
2516
|
do
|
|
2517
|
-
o = e + (n - e) / 2, r =
|
|
2518
|
-
while (Math.abs(r) >
|
|
2517
|
+
o = e + (n - e) / 2, r = oo(o, i, s) - t, r > 0 ? n = o : e = o;
|
|
2518
|
+
while (Math.abs(r) > iu && ++a < su);
|
|
2519
2519
|
return o;
|
|
2520
2520
|
}
|
|
2521
|
-
function
|
|
2521
|
+
function Ut(t, e, n, i) {
|
|
2522
2522
|
if (t === e && n === i)
|
|
2523
2523
|
return _;
|
|
2524
|
-
const s = (r) =>
|
|
2525
|
-
return (r) => r === 0 || r === 1 ? r :
|
|
2524
|
+
const s = (r) => ou(r, 0, 1, t, n);
|
|
2525
|
+
return (r) => r === 0 || r === 1 ? r : oo(s(r), e, i);
|
|
2526
2526
|
}
|
|
2527
|
-
const
|
|
2527
|
+
const ru = /* @__PURE__ */ Ut(0.42, 0, 1, 1), au = /* @__PURE__ */ Ut(0, 0, 0.58, 1), ro = /* @__PURE__ */ Ut(0.42, 0, 0.58, 1), ao = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, lo = (t) => (e) => 1 - t(1 - e), uo = /* @__PURE__ */ Ut(0.33, 1.53, 0.69, 0.99), dn = /* @__PURE__ */ lo(uo), co = /* @__PURE__ */ ao(dn), ho = (t) => (t *= 2) < 1 ? 0.5 * dn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), pn = (t) => 1 - Math.sin(Math.acos(t)), fo = lo(pn), po = ao(pn), mo = (t) => Array.isArray(t) && typeof t[0] == "number", li = {
|
|
2528
2528
|
linear: _,
|
|
2529
|
-
easeIn:
|
|
2530
|
-
easeInOut:
|
|
2531
|
-
easeOut:
|
|
2529
|
+
easeIn: ru,
|
|
2530
|
+
easeInOut: ro,
|
|
2531
|
+
easeOut: au,
|
|
2532
2532
|
circIn: pn,
|
|
2533
|
-
circInOut:
|
|
2534
|
-
circOut:
|
|
2533
|
+
circInOut: po,
|
|
2534
|
+
circOut: fo,
|
|
2535
2535
|
backIn: dn,
|
|
2536
|
-
backInOut:
|
|
2537
|
-
backOut:
|
|
2538
|
-
anticipate:
|
|
2539
|
-
},
|
|
2540
|
-
if (
|
|
2536
|
+
backInOut: co,
|
|
2537
|
+
backOut: uo,
|
|
2538
|
+
anticipate: ho
|
|
2539
|
+
}, lu = (t) => typeof t == "string", ui = (t) => {
|
|
2540
|
+
if (mo(t)) {
|
|
2541
2541
|
q(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
2542
2542
|
const [e, n, i, s] = t;
|
|
2543
|
-
return
|
|
2544
|
-
} else if (
|
|
2543
|
+
return Ut(e, n, i, s);
|
|
2544
|
+
} else if (lu(t))
|
|
2545
2545
|
return q(li[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), li[t];
|
|
2546
2546
|
return t;
|
|
2547
2547
|
};
|
|
2548
|
-
function
|
|
2549
|
-
return t.map(() => e ||
|
|
2548
|
+
function uu(t, e) {
|
|
2549
|
+
return t.map(() => e || ro).splice(0, t.length - 1);
|
|
2550
2550
|
}
|
|
2551
2551
|
function pt({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }) {
|
|
2552
|
-
const s =
|
|
2552
|
+
const s = Xs(i) ? i.map(ui) : ui(i), r = {
|
|
2553
2553
|
done: !1,
|
|
2554
2554
|
value: e[0]
|
|
2555
|
-
}, o =
|
|
2555
|
+
}, o = nu(
|
|
2556
2556
|
// Only use the provided offsets if they're the correct length
|
|
2557
2557
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
2558
|
-
n && n.length === e.length ? n :
|
|
2558
|
+
n && n.length === e.length ? n : Js(e),
|
|
2559
2559
|
t
|
|
2560
|
-
), a =
|
|
2561
|
-
ease: Array.isArray(s) ? s :
|
|
2560
|
+
), a = eu(o, e, {
|
|
2561
|
+
ease: Array.isArray(s) ? s : uu(e, s)
|
|
2562
2562
|
});
|
|
2563
2563
|
return {
|
|
2564
2564
|
calculatedDuration: t,
|
|
2565
2565
|
next: (l) => (r.value = a(l), r.done = l >= t, r)
|
|
2566
2566
|
};
|
|
2567
2567
|
}
|
|
2568
|
-
const
|
|
2568
|
+
const cu = (t) => t !== null;
|
|
2569
2569
|
function mn(t, { repeat: e, repeatType: n = "loop" }, i, s = 1) {
|
|
2570
|
-
const r = t.filter(
|
|
2570
|
+
const r = t.filter(cu), a = s < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : r.length - 1;
|
|
2571
2571
|
return !a || i === void 0 ? r[a] : i;
|
|
2572
2572
|
}
|
|
2573
|
-
const
|
|
2573
|
+
const hu = {
|
|
2574
2574
|
decay: Ge,
|
|
2575
2575
|
inertia: Ge,
|
|
2576
2576
|
tween: pt,
|
|
2577
2577
|
keyframes: pt,
|
|
2578
|
-
spring:
|
|
2578
|
+
spring: Ft
|
|
2579
2579
|
};
|
|
2580
|
-
function
|
|
2581
|
-
typeof t.type == "string" && (t.type =
|
|
2580
|
+
function go(t) {
|
|
2581
|
+
typeof t.type == "string" && (t.type = hu[t.type]);
|
|
2582
2582
|
}
|
|
2583
2583
|
class gn {
|
|
2584
2584
|
constructor() {
|
|
@@ -2604,22 +2604,22 @@ class gn {
|
|
|
2604
2604
|
return this.finished.then(e, n);
|
|
2605
2605
|
}
|
|
2606
2606
|
}
|
|
2607
|
-
const
|
|
2607
|
+
const fu = (t) => t / 100;
|
|
2608
2608
|
class yn extends gn {
|
|
2609
2609
|
constructor(e) {
|
|
2610
2610
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
2611
2611
|
var n, i;
|
|
2612
2612
|
const { motionValue: s } = this.options;
|
|
2613
|
-
s && s.updatedAt !==
|
|
2613
|
+
s && s.updatedAt !== j.now() && this.tick(j.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (n = this.options).onStop) == null || i.call(n));
|
|
2614
2614
|
}, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
|
|
2615
2615
|
}
|
|
2616
2616
|
initAnimation() {
|
|
2617
2617
|
const { options: e } = this;
|
|
2618
|
-
|
|
2618
|
+
go(e);
|
|
2619
2619
|
const { type: n = pt, repeat: i = 0, repeatDelay: s = 0, repeatType: r, velocity: o = 0 } = e;
|
|
2620
2620
|
let { keyframes: a } = e;
|
|
2621
2621
|
const l = n || pt;
|
|
2622
|
-
process.env.NODE_ENV !== "production" && l !== pt && q(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== pt && typeof a[0] != "number" && (this.mixKeyframes =
|
|
2622
|
+
process.env.NODE_ENV !== "production" && l !== pt && q(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== pt && typeof a[0] != "number" && (this.mixKeyframes = _t(fu, no(a[0], a[1])), a = [0, 100]);
|
|
2623
2623
|
const c = l(E(g({}, e), { keyframes: a }));
|
|
2624
2624
|
r === "mirror" && (this.mirroredGenerator = l(E(g({}, e), {
|
|
2625
2625
|
keyframes: [...a].reverse(),
|
|
@@ -2636,22 +2636,22 @@ class yn extends gn {
|
|
|
2636
2636
|
const { generator: i, totalDuration: s, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: l } = this;
|
|
2637
2637
|
if (this.startTime === null)
|
|
2638
2638
|
return i.next(0);
|
|
2639
|
-
const { delay: c = 0, keyframes: u, repeat: h, repeatType:
|
|
2639
|
+
const { delay: c = 0, keyframes: u, repeat: h, repeatType: d, repeatDelay: f, type: p, onUpdate: m, finalKeyframe: y } = this.options;
|
|
2640
2640
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - s / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
|
|
2641
|
-
const v = this.currentTime - c * (this.playbackSpeed >= 0 ? 1 : -1),
|
|
2641
|
+
const v = this.currentTime - c * (this.playbackSpeed >= 0 ? 1 : -1), w = this.playbackSpeed >= 0 ? v < 0 : v > s;
|
|
2642
2642
|
this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = s);
|
|
2643
|
-
let T = this.currentTime,
|
|
2643
|
+
let T = this.currentTime, S = i;
|
|
2644
2644
|
if (h) {
|
|
2645
2645
|
const P = Math.min(this.currentTime, s) / a;
|
|
2646
|
-
let k = Math.floor(P),
|
|
2647
|
-
!
|
|
2646
|
+
let k = Math.floor(P), I = P % 1;
|
|
2647
|
+
!I && P >= 1 && (I = 1), I === 1 && k--, k = Math.min(k, h + 1), !!(k % 2) && (d === "reverse" ? (I = 1 - I, f && (I -= f / a)) : d === "mirror" && (S = o)), T = X(0, 1, I) * a;
|
|
2648
2648
|
}
|
|
2649
|
-
const
|
|
2650
|
-
r && (
|
|
2651
|
-
let { done: A } =
|
|
2652
|
-
!
|
|
2649
|
+
const b = w ? { done: !1, value: u[0] } : S.next(T);
|
|
2650
|
+
r && (b.value = r(b.value));
|
|
2651
|
+
let { done: A } = b;
|
|
2652
|
+
!w && l !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= s : this.currentTime <= 0);
|
|
2653
2653
|
const V = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
|
|
2654
|
-
return V && p !== Ge && (
|
|
2654
|
+
return V && p !== Ge && (b.value = mn(u, this.options, y, this.speed)), m && m(b.value), V && this.finish(), b;
|
|
2655
2655
|
}
|
|
2656
2656
|
/**
|
|
2657
2657
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -2679,7 +2679,7 @@ class yn extends gn {
|
|
|
2679
2679
|
return this.playbackSpeed;
|
|
2680
2680
|
}
|
|
2681
2681
|
set speed(e) {
|
|
2682
|
-
this.updateTime(
|
|
2682
|
+
this.updateTime(j.now());
|
|
2683
2683
|
const n = this.playbackSpeed !== e;
|
|
2684
2684
|
this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ N(this.currentTime));
|
|
2685
2685
|
}
|
|
@@ -2687,13 +2687,13 @@ class yn extends gn {
|
|
|
2687
2687
|
var e, n;
|
|
2688
2688
|
if (this.isStopped)
|
|
2689
2689
|
return;
|
|
2690
|
-
const { driver: i =
|
|
2690
|
+
const { driver: i = zl, startTime: s } = this.options;
|
|
2691
2691
|
this.driver || (this.driver = i((o) => this.tick(o))), (n = (e = this.options).onPlay) == null || n.call(e);
|
|
2692
2692
|
const r = this.driver.now();
|
|
2693
2693
|
this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = s != null ? s : r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
2694
2694
|
}
|
|
2695
2695
|
pause() {
|
|
2696
|
-
this.state = "paused", this.updateTime(
|
|
2696
|
+
this.state = "paused", this.updateTime(j.now()), this.holdTime = this.currentTime;
|
|
2697
2697
|
}
|
|
2698
2698
|
complete() {
|
|
2699
2699
|
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
@@ -2720,24 +2720,24 @@ class yn extends gn {
|
|
|
2720
2720
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), e.observe(this);
|
|
2721
2721
|
}
|
|
2722
2722
|
}
|
|
2723
|
-
const
|
|
2724
|
-
function
|
|
2725
|
-
|
|
2723
|
+
const du = (t) => t.startsWith("--");
|
|
2724
|
+
function pu(t, e, n) {
|
|
2725
|
+
du(e) ? t.style.setProperty(e, n) : t.style[e] = n;
|
|
2726
2726
|
}
|
|
2727
2727
|
// @__NO_SIDE_EFFECTS__
|
|
2728
2728
|
function vn(t) {
|
|
2729
2729
|
let e;
|
|
2730
2730
|
return () => (e === void 0 && (e = t()), e);
|
|
2731
2731
|
}
|
|
2732
|
-
const
|
|
2733
|
-
function
|
|
2732
|
+
const mu = /* @__PURE__ */ vn(() => window.ScrollTimeline !== void 0), gu = {};
|
|
2733
|
+
function yu(t, e) {
|
|
2734
2734
|
const n = /* @__PURE__ */ vn(t);
|
|
2735
2735
|
return () => {
|
|
2736
2736
|
var i;
|
|
2737
|
-
return (i =
|
|
2737
|
+
return (i = gu[e]) != null ? i : n();
|
|
2738
2738
|
};
|
|
2739
2739
|
}
|
|
2740
|
-
const
|
|
2740
|
+
const yo = /* @__PURE__ */ yu(() => {
|
|
2741
2741
|
try {
|
|
2742
2742
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
2743
2743
|
} catch (t) {
|
|
@@ -2755,18 +2755,18 @@ const go = /* @__PURE__ */ gu(() => {
|
|
|
2755
2755
|
backIn: /* @__PURE__ */ Et([0.31, 0.01, 0.66, -0.59]),
|
|
2756
2756
|
backOut: /* @__PURE__ */ Et([0.33, 1.53, 0.69, 0.99])
|
|
2757
2757
|
};
|
|
2758
|
-
function
|
|
2758
|
+
function vo(t, e) {
|
|
2759
2759
|
if (t)
|
|
2760
|
-
return typeof t == "function" ?
|
|
2760
|
+
return typeof t == "function" ? yo() ? io(t, e) : "ease-out" : mo(t) ? Et(t) : Array.isArray(t) ? t.map((n) => vo(n, e) || ci.easeOut) : ci[t];
|
|
2761
2761
|
}
|
|
2762
|
-
function
|
|
2762
|
+
function vu(t, e, n, { delay: i = 0, duration: s = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: l } = {}, c = void 0) {
|
|
2763
2763
|
const u = {
|
|
2764
2764
|
[e]: n
|
|
2765
2765
|
};
|
|
2766
2766
|
l && (u.offset = l);
|
|
2767
|
-
const h =
|
|
2767
|
+
const h = vo(a, s);
|
|
2768
2768
|
Array.isArray(h) && (u.easing = h);
|
|
2769
|
-
const
|
|
2769
|
+
const d = {
|
|
2770
2770
|
delay: i,
|
|
2771
2771
|
duration: s,
|
|
2772
2772
|
easing: Array.isArray(h) ? "linear" : h,
|
|
@@ -2774,12 +2774,12 @@ function yu(t, e, n, { delay: i = 0, duration: s = 300, repeat: r = 0, repeatTyp
|
|
|
2774
2774
|
iterations: r + 1,
|
|
2775
2775
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
2776
2776
|
};
|
|
2777
|
-
return c && (
|
|
2777
|
+
return c && (d.pseudoElement = c), t.animate(u, d);
|
|
2778
2778
|
}
|
|
2779
|
-
function
|
|
2779
|
+
function xu(n) {
|
|
2780
2780
|
var i = n, { type: t } = i, e = U(i, ["type"]);
|
|
2781
2781
|
var s, r;
|
|
2782
|
-
return cn(t) &&
|
|
2782
|
+
return cn(t) && yo() ? t.applyToOptions(e) : ((s = e.duration) != null || (e.duration = 300), (r = e.ease) != null || (e.ease = "easeOut"), e);
|
|
2783
2783
|
}
|
|
2784
2784
|
class bu extends gn {
|
|
2785
2785
|
constructor(e) {
|
|
@@ -2787,11 +2787,11 @@ class bu extends gn {
|
|
|
2787
2787
|
return;
|
|
2788
2788
|
const { element: n, name: i, keyframes: s, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: l } = e;
|
|
2789
2789
|
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = e, q(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
2790
|
-
const c =
|
|
2791
|
-
this.animation =
|
|
2790
|
+
const c = xu(e);
|
|
2791
|
+
this.animation = vu(n, i, s, c, r), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
2792
2792
|
if (this.finishedTime = this.time, !r) {
|
|
2793
2793
|
const u = mn(s, this.options, a, this.speed);
|
|
2794
|
-
this.updateMotionValue ? this.updateMotionValue(u) :
|
|
2794
|
+
this.updateMotionValue ? this.updateMotionValue(u) : pu(n, i, u), this.animation.cancel();
|
|
2795
2795
|
}
|
|
2796
2796
|
l == null || l(), this.notifyFinished();
|
|
2797
2797
|
};
|
|
@@ -2875,24 +2875,24 @@ class bu extends gn {
|
|
|
2875
2875
|
*/
|
|
2876
2876
|
attachTimeline({ timeline: e, observe: n }) {
|
|
2877
2877
|
var i;
|
|
2878
|
-
return this.allowFlatten && ((i = this.animation.effect) == null || i.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e &&
|
|
2878
|
+
return this.allowFlatten && ((i = this.animation.effect) == null || i.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && mu() ? (this.animation.timeline = e, _) : n(this);
|
|
2879
2879
|
}
|
|
2880
2880
|
}
|
|
2881
|
-
const
|
|
2882
|
-
anticipate:
|
|
2883
|
-
backInOut:
|
|
2884
|
-
circInOut:
|
|
2881
|
+
const xo = {
|
|
2882
|
+
anticipate: ho,
|
|
2883
|
+
backInOut: co,
|
|
2884
|
+
circInOut: po
|
|
2885
2885
|
};
|
|
2886
|
-
function xu(t) {
|
|
2887
|
-
return t in vo;
|
|
2888
|
-
}
|
|
2889
2886
|
function Tu(t) {
|
|
2890
|
-
|
|
2887
|
+
return t in xo;
|
|
2888
|
+
}
|
|
2889
|
+
function Su(t) {
|
|
2890
|
+
typeof t.ease == "string" && Tu(t.ease) && (t.ease = xo[t.ease]);
|
|
2891
2891
|
}
|
|
2892
2892
|
const Se = 10;
|
|
2893
|
-
class
|
|
2893
|
+
class wu extends bu {
|
|
2894
2894
|
constructor(e) {
|
|
2895
|
-
|
|
2895
|
+
Su(e), go(e), super(e), e.startTime !== void 0 && (this.startTime = e.startTime), this.options = e;
|
|
2896
2896
|
}
|
|
2897
2897
|
/**
|
|
2898
2898
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -2912,14 +2912,14 @@ class Su extends bu {
|
|
|
2912
2912
|
}
|
|
2913
2913
|
const a = new yn(E(g({}, o), {
|
|
2914
2914
|
autoplay: !1
|
|
2915
|
-
})), l = Math.max(Se,
|
|
2915
|
+
})), l = Math.max(Se, j.now() - this.startTime), c = X(0, Se, l - Se);
|
|
2916
2916
|
n.setWithVelocity(a.sample(Math.max(0, l - c)).value, a.sample(l).value, c), a.stop();
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
2919
|
const hi = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
2920
2920
|
(st.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
2921
2921
|
!t.startsWith("url("));
|
|
2922
|
-
function
|
|
2922
|
+
function Au(t) {
|
|
2923
2923
|
const e = t[0];
|
|
2924
2924
|
if (t.length === 1)
|
|
2925
2925
|
return !0;
|
|
@@ -2927,44 +2927,44 @@ function wu(t) {
|
|
|
2927
2927
|
if (t[n] !== e)
|
|
2928
2928
|
return !0;
|
|
2929
2929
|
}
|
|
2930
|
-
function
|
|
2930
|
+
function Pu(t, e, n, i) {
|
|
2931
2931
|
const s = t[0];
|
|
2932
2932
|
if (s === null)
|
|
2933
2933
|
return !1;
|
|
2934
2934
|
if (e === "display" || e === "visibility")
|
|
2935
2935
|
return !0;
|
|
2936
2936
|
const r = t[t.length - 1], o = hi(s, e), a = hi(r, e);
|
|
2937
|
-
return
|
|
2937
|
+
return jt(o === a, `You are trying to animate ${e} from "${s}" to "${r}". "${o ? r : s}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : Au(t) || (n === "spring" || cn(n)) && i;
|
|
2938
2938
|
}
|
|
2939
|
-
const
|
|
2939
|
+
const Eu = /* @__PURE__ */ new Set([
|
|
2940
2940
|
"opacity",
|
|
2941
2941
|
"clipPath",
|
|
2942
2942
|
"filter",
|
|
2943
2943
|
"transform"
|
|
2944
2944
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
2945
2945
|
// "background-color"
|
|
2946
|
-
]),
|
|
2947
|
-
function
|
|
2946
|
+
]), Vu = /* @__PURE__ */ vn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
2947
|
+
function Cu(t) {
|
|
2948
2948
|
var e;
|
|
2949
2949
|
const { motionValue: n, name: i, repeatDelay: s, repeatType: r, damping: o, type: a } = t;
|
|
2950
2950
|
if (!(((e = n == null ? void 0 : n.owner) == null ? void 0 : e.current) instanceof HTMLElement))
|
|
2951
2951
|
return !1;
|
|
2952
2952
|
const { onUpdate: c, transformTemplate: u } = n.owner.getProps();
|
|
2953
|
-
return
|
|
2953
|
+
return Vu() && i && Eu.has(i) && (i !== "transform" || !u) && /**
|
|
2954
2954
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
2955
2955
|
* no way to read the value from WAAPI every frame.
|
|
2956
2956
|
*/
|
|
2957
2957
|
!c && !s && r !== "mirror" && o !== 0 && a !== "inertia";
|
|
2958
2958
|
}
|
|
2959
|
-
const
|
|
2960
|
-
class
|
|
2961
|
-
constructor(
|
|
2962
|
-
var
|
|
2959
|
+
const Mu = 40;
|
|
2960
|
+
class Du extends gn {
|
|
2961
|
+
constructor(d) {
|
|
2962
|
+
var f = d, { autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: l, motionValue: c, element: u } = f, h = U(f, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
|
|
2963
2963
|
var p;
|
|
2964
2964
|
super(), this.stop = () => {
|
|
2965
|
-
var v,
|
|
2966
|
-
this._animation && (this._animation.stop(), (v = this.stopTimeline) == null || v.call(this)), (
|
|
2967
|
-
}, this.createdAt =
|
|
2965
|
+
var v, w;
|
|
2966
|
+
this._animation && (this._animation.stop(), (v = this.stopTimeline) == null || v.call(this)), (w = this.keyframeResolver) == null || w.cancel();
|
|
2967
|
+
}, this.createdAt = j.now();
|
|
2968
2968
|
const m = g({
|
|
2969
2969
|
autoplay: e,
|
|
2970
2970
|
delay: n,
|
|
@@ -2976,21 +2976,21 @@ class Mu extends gn {
|
|
|
2976
2976
|
motionValue: c,
|
|
2977
2977
|
element: u
|
|
2978
2978
|
}, h), y = (u == null ? void 0 : u.KeyframeResolver) || sn;
|
|
2979
|
-
this.keyframeResolver = new y(a, (v,
|
|
2979
|
+
this.keyframeResolver = new y(a, (v, w, T) => this.onKeyframesResolved(v, w, m, !T), l, c, u), (p = this.keyframeResolver) == null || p.scheduleResolve();
|
|
2980
2980
|
}
|
|
2981
2981
|
onKeyframesResolved(e, n, i, s) {
|
|
2982
2982
|
this.keyframeResolver = void 0;
|
|
2983
2983
|
const { name: r, type: o, velocity: a, delay: l, isHandoff: c, onUpdate: u } = i;
|
|
2984
|
-
this.resolvedAt =
|
|
2985
|
-
const h = s ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
2984
|
+
this.resolvedAt = j.now(), Pu(e, r, o, a) || ((J.instantAnimations || !l) && (u == null || u(mn(e, i, n))), e[0] = e[e.length - 1], $e(i), i.repeat = 0);
|
|
2985
|
+
const h = s ? this.resolvedAt ? this.resolvedAt - this.createdAt > Mu ? this.resolvedAt : this.createdAt : this.createdAt : void 0, d = E(g({
|
|
2986
2986
|
startTime: h,
|
|
2987
2987
|
finalKeyframe: n
|
|
2988
2988
|
}, i), {
|
|
2989
2989
|
keyframes: e
|
|
2990
|
-
}),
|
|
2991
|
-
element:
|
|
2992
|
-
})) : new yn(
|
|
2993
|
-
|
|
2990
|
+
}), f = !c && Cu(d) ? new wu(E(g({}, d), {
|
|
2991
|
+
element: d.motionValue.owner.current
|
|
2992
|
+
})) : new yn(d);
|
|
2993
|
+
f.finished.then(() => this.notifyFinished()).catch(_), this.pendingTimeline && (this.stopTimeline = f.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = f;
|
|
2994
2994
|
}
|
|
2995
2995
|
get finished() {
|
|
2996
2996
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -3001,7 +3001,7 @@ class Mu extends gn {
|
|
|
3001
3001
|
}
|
|
3002
3002
|
get animation() {
|
|
3003
3003
|
var e;
|
|
3004
|
-
return this._animation || ((e = this.keyframeResolver) == null || e.resume(),
|
|
3004
|
+
return this._animation || ((e = this.keyframeResolver) == null || e.resume(), Da()), this._animation;
|
|
3005
3005
|
}
|
|
3006
3006
|
get duration() {
|
|
3007
3007
|
return this.animation.duration;
|
|
@@ -3044,7 +3044,7 @@ class Mu extends gn {
|
|
|
3044
3044
|
this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel();
|
|
3045
3045
|
}
|
|
3046
3046
|
}
|
|
3047
|
-
const
|
|
3047
|
+
const xn = (t, e, n, i = {}, s, r) => (o) => {
|
|
3048
3048
|
const a = hn(i, t) || {}, l = a.delay || i.delay || 0;
|
|
3049
3049
|
let { elapsed: c = 0 } = i;
|
|
3050
3050
|
c = c - /* @__PURE__ */ G(l);
|
|
@@ -3054,8 +3054,8 @@ const bn = (t, e, n, i = {}, s, r) => (o) => {
|
|
|
3054
3054
|
velocity: e.getVelocity()
|
|
3055
3055
|
}, a), {
|
|
3056
3056
|
delay: -c,
|
|
3057
|
-
onUpdate: (
|
|
3058
|
-
e.set(
|
|
3057
|
+
onUpdate: (d) => {
|
|
3058
|
+
e.set(d), a.onUpdate && a.onUpdate(d);
|
|
3059
3059
|
},
|
|
3060
3060
|
onComplete: () => {
|
|
3061
3061
|
o(), a.onComplete && a.onComplete();
|
|
@@ -3064,64 +3064,64 @@ const bn = (t, e, n, i = {}, s, r) => (o) => {
|
|
|
3064
3064
|
motionValue: e,
|
|
3065
3065
|
element: r ? void 0 : s
|
|
3066
3066
|
});
|
|
3067
|
-
|
|
3067
|
+
Ol(a) || Object.assign(u, Fl(t, u)), u.duration && (u.duration = /* @__PURE__ */ G(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ G(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
3068
3068
|
let h = !1;
|
|
3069
3069
|
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && ($e(u), u.delay === 0 && (h = !0)), (J.instantAnimations || J.skipAnimations) && (h = !0, $e(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, h && !r && e.get() !== void 0) {
|
|
3070
|
-
const
|
|
3071
|
-
if (
|
|
3070
|
+
const d = Dl(u.keyframes, a);
|
|
3071
|
+
if (d !== void 0) {
|
|
3072
3072
|
C.update(() => {
|
|
3073
|
-
u.onUpdate(
|
|
3073
|
+
u.onUpdate(d), u.onComplete();
|
|
3074
3074
|
});
|
|
3075
3075
|
return;
|
|
3076
3076
|
}
|
|
3077
3077
|
}
|
|
3078
|
-
return a.isSync ? new yn(u) : new
|
|
3078
|
+
return a.isSync ? new yn(u) : new Du(u);
|
|
3079
3079
|
};
|
|
3080
|
-
function
|
|
3080
|
+
function Ru({ protectedKeys: t, needsAnimating: e }, n) {
|
|
3081
3081
|
const i = t.hasOwnProperty(n) && e[n] !== !0;
|
|
3082
3082
|
return e[n] = !1, i;
|
|
3083
3083
|
}
|
|
3084
|
-
function
|
|
3084
|
+
function Lu(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
3085
3085
|
var h;
|
|
3086
3086
|
let u = e, { transition: r = t.getDefaultTransition(), transitionEnd: o } = u, a = U(u, ["transition", "transitionEnd"]);
|
|
3087
3087
|
i && (r = i);
|
|
3088
3088
|
const l = [], c = s && t.animationState && t.animationState.getState()[s];
|
|
3089
|
-
for (const
|
|
3090
|
-
const
|
|
3091
|
-
if (p === void 0 || c &&
|
|
3089
|
+
for (const d in a) {
|
|
3090
|
+
const f = t.getValue(d, (h = t.latestValues[d]) != null ? h : null), p = a[d];
|
|
3091
|
+
if (p === void 0 || c && Ru(c, d))
|
|
3092
3092
|
continue;
|
|
3093
3093
|
const m = g({
|
|
3094
3094
|
delay: n
|
|
3095
|
-
}, hn(r || {},
|
|
3096
|
-
if (y !== void 0 && !
|
|
3095
|
+
}, hn(r || {}, d)), y = f.get();
|
|
3096
|
+
if (y !== void 0 && !f.isAnimating && !Array.isArray(p) && p === y && !m.velocity)
|
|
3097
3097
|
continue;
|
|
3098
3098
|
let v = !1;
|
|
3099
3099
|
if (window.MotionHandoffAnimation) {
|
|
3100
|
-
const T =
|
|
3100
|
+
const T = to(t);
|
|
3101
3101
|
if (T) {
|
|
3102
|
-
const
|
|
3103
|
-
|
|
3102
|
+
const S = window.MotionHandoffAnimation(T, d, C);
|
|
3103
|
+
S !== null && (m.startTime = S, v = !0);
|
|
3104
3104
|
}
|
|
3105
3105
|
}
|
|
3106
|
-
|
|
3107
|
-
const
|
|
3108
|
-
|
|
3106
|
+
El(t, d), f.start(xn(d, f, p, t.shouldReduceMotion && js.has(d) ? { type: !1 } : m, t, v));
|
|
3107
|
+
const w = f.animation;
|
|
3108
|
+
w && l.push(w);
|
|
3109
3109
|
}
|
|
3110
3110
|
return o && Promise.all(l).then(() => {
|
|
3111
3111
|
C.update(() => {
|
|
3112
|
-
o &&
|
|
3112
|
+
o && Al(t, o);
|
|
3113
3113
|
});
|
|
3114
3114
|
}), l;
|
|
3115
3115
|
}
|
|
3116
|
-
function
|
|
3116
|
+
function Bu(t, e) {
|
|
3117
3117
|
return t in e;
|
|
3118
3118
|
}
|
|
3119
|
-
class
|
|
3119
|
+
class ku extends Is {
|
|
3120
3120
|
constructor() {
|
|
3121
3121
|
super(...arguments), this.type = "object";
|
|
3122
3122
|
}
|
|
3123
3123
|
readValueFromInstance(e, n) {
|
|
3124
|
-
if (
|
|
3124
|
+
if (Bu(n, e)) {
|
|
3125
3125
|
const i = e[n];
|
|
3126
3126
|
if (typeof i == "string" || typeof i == "number")
|
|
3127
3127
|
return i;
|
|
@@ -3148,13 +3148,13 @@ class Bu extends Os {
|
|
|
3148
3148
|
function bo(t) {
|
|
3149
3149
|
return typeof t == "object" && t !== null;
|
|
3150
3150
|
}
|
|
3151
|
-
function
|
|
3151
|
+
function bn(t) {
|
|
3152
3152
|
return bo(t) && "ownerSVGElement" in t;
|
|
3153
3153
|
}
|
|
3154
|
-
function
|
|
3155
|
-
return
|
|
3154
|
+
function To(t) {
|
|
3155
|
+
return bn(t) && t.tagName === "svg";
|
|
3156
3156
|
}
|
|
3157
|
-
function
|
|
3157
|
+
function Fu(t) {
|
|
3158
3158
|
const e = {
|
|
3159
3159
|
presenceContext: null,
|
|
3160
3160
|
props: {},
|
|
@@ -3168,10 +3168,10 @@ function ku(t) {
|
|
|
3168
3168
|
},
|
|
3169
3169
|
latestValues: {}
|
|
3170
3170
|
}
|
|
3171
|
-
}, n =
|
|
3171
|
+
}, n = bn(t) && !To(t) ? new Hs(e) : new Gs(e);
|
|
3172
3172
|
n.mount(t), ut.set(t, n);
|
|
3173
3173
|
}
|
|
3174
|
-
function
|
|
3174
|
+
function Ou(t) {
|
|
3175
3175
|
const e = {
|
|
3176
3176
|
presenceContext: null,
|
|
3177
3177
|
props: {},
|
|
@@ -3181,41 +3181,41 @@ function Fu(t) {
|
|
|
3181
3181
|
},
|
|
3182
3182
|
latestValues: {}
|
|
3183
3183
|
}
|
|
3184
|
-
}, n = new
|
|
3184
|
+
}, n = new ku(e);
|
|
3185
3185
|
n.mount(t), ut.set(t, n);
|
|
3186
3186
|
}
|
|
3187
|
-
function
|
|
3187
|
+
function So(t, e, n) {
|
|
3188
3188
|
const i = L(t) ? t : gt(t);
|
|
3189
|
-
return i.start(
|
|
3189
|
+
return i.start(xn("", i, e, n)), i.animation;
|
|
3190
3190
|
}
|
|
3191
|
-
function
|
|
3191
|
+
function Iu(t, e) {
|
|
3192
3192
|
return L(t) || typeof t == "number" || typeof t == "string" && !an(e);
|
|
3193
3193
|
}
|
|
3194
|
-
function
|
|
3194
|
+
function wo(t, e, n, i) {
|
|
3195
3195
|
const s = [];
|
|
3196
|
-
if (
|
|
3197
|
-
s.push(
|
|
3196
|
+
if (Iu(t, e))
|
|
3197
|
+
s.push(So(t, an(e) && e.default || e, n && (n.default || n)));
|
|
3198
3198
|
else {
|
|
3199
|
-
const r =
|
|
3199
|
+
const r = Ys(t, e, i), o = r.length;
|
|
3200
3200
|
q(!!o, "No valid elements provided.", "no-valid-elements");
|
|
3201
3201
|
for (let a = 0; a < o; a++) {
|
|
3202
3202
|
const l = r[a];
|
|
3203
3203
|
q(l !== null, "You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.", "animate-null");
|
|
3204
|
-
const c = l instanceof Element ?
|
|
3204
|
+
const c = l instanceof Element ? Fu : Ou;
|
|
3205
3205
|
ut.has(l) || c(l);
|
|
3206
3206
|
const u = ut.get(l), h = g({}, n);
|
|
3207
|
-
"delay" in h && typeof h.delay == "function" && (h.delay = h.delay(a, o)), s.push(...
|
|
3207
|
+
"delay" in h && typeof h.delay == "function" && (h.delay = h.delay(a, o)), s.push(...Lu(u, E(g({}, e), { transition: h }), {}));
|
|
3208
3208
|
}
|
|
3209
3209
|
}
|
|
3210
3210
|
return s;
|
|
3211
3211
|
}
|
|
3212
3212
|
function ju(t, e, n) {
|
|
3213
3213
|
const i = [];
|
|
3214
|
-
return
|
|
3215
|
-
i.push(...
|
|
3214
|
+
return ml(t, e, n, { spring: Ft }).forEach(({ keyframes: r, transition: o }, a) => {
|
|
3215
|
+
i.push(...wo(a, r, o));
|
|
3216
3216
|
}), i;
|
|
3217
3217
|
}
|
|
3218
|
-
class
|
|
3218
|
+
class _u {
|
|
3219
3219
|
constructor(e) {
|
|
3220
3220
|
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
3221
3221
|
}
|
|
@@ -3288,31 +3288,31 @@ function fi(t, e) {
|
|
|
3288
3288
|
}
|
|
3289
3289
|
return n;
|
|
3290
3290
|
}
|
|
3291
|
-
class
|
|
3291
|
+
class Uu extends _u {
|
|
3292
3292
|
then(e, n) {
|
|
3293
3293
|
return this.finished.finally(e).then(() => {
|
|
3294
3294
|
});
|
|
3295
3295
|
}
|
|
3296
3296
|
}
|
|
3297
|
-
function
|
|
3297
|
+
function Nu(t) {
|
|
3298
3298
|
return Array.isArray(t) && t.some(Array.isArray);
|
|
3299
3299
|
}
|
|
3300
|
-
function
|
|
3300
|
+
function $u(t) {
|
|
3301
3301
|
function e(n, i, s) {
|
|
3302
3302
|
let r = [], o;
|
|
3303
|
-
if (
|
|
3303
|
+
if (Nu(n))
|
|
3304
3304
|
r = ju(n, i, t);
|
|
3305
3305
|
else {
|
|
3306
3306
|
const l = s || {}, { onComplete: c } = l, u = U(l, ["onComplete"]);
|
|
3307
|
-
typeof c == "function" && (o = c), r =
|
|
3307
|
+
typeof c == "function" && (o = c), r = wo(n, i, u, t);
|
|
3308
3308
|
}
|
|
3309
|
-
const a = new
|
|
3309
|
+
const a = new Uu(r);
|
|
3310
3310
|
return o && a.finished.then(o), a;
|
|
3311
3311
|
}
|
|
3312
3312
|
return e;
|
|
3313
3313
|
}
|
|
3314
|
-
const
|
|
3315
|
-
class
|
|
3314
|
+
const Ku = $u(), Wu = ["initial", "animate", "whileInView", "whileHover", "whilePress", "whileDrag", "whileFocus", "exit"];
|
|
3315
|
+
class Gu extends tt {
|
|
3316
3316
|
constructor(e) {
|
|
3317
3317
|
var n, i;
|
|
3318
3318
|
super(e), this.animateUpdates = ({
|
|
@@ -3323,7 +3323,7 @@ class Wu extends tt {
|
|
|
3323
3323
|
isExit: l
|
|
3324
3324
|
} = {}) => {
|
|
3325
3325
|
const { reducedMotion: c } = this.state.options.motionConfig;
|
|
3326
|
-
this.state.visualElement.shouldReduceMotion = c === "always" || c === "user" && !!
|
|
3326
|
+
this.state.visualElement.shouldReduceMotion = c === "always" || c === "user" && !!ne.current;
|
|
3327
3327
|
const u = this.state.target;
|
|
3328
3328
|
this.state.target = g({}, this.state.baseTarget);
|
|
3329
3329
|
let h = {};
|
|
@@ -3332,15 +3332,15 @@ class Wu extends tt {
|
|
|
3332
3332
|
directAnimate: r,
|
|
3333
3333
|
directTransition: o
|
|
3334
3334
|
}), this.state.finalTransition = h;
|
|
3335
|
-
const
|
|
3335
|
+
const d = this.createAnimationFactories(u, h, a), { getChildAnimations: f } = this.setupChildAnimations(h, this.state.activeStates);
|
|
3336
3336
|
return this.executeAnimations({
|
|
3337
|
-
factories:
|
|
3338
|
-
getChildAnimations:
|
|
3337
|
+
factories: d,
|
|
3338
|
+
getChildAnimations: f,
|
|
3339
3339
|
transition: h,
|
|
3340
3340
|
controlActiveState: s,
|
|
3341
3341
|
isExit: l
|
|
3342
3342
|
});
|
|
3343
|
-
}, this.state.visualElement =
|
|
3343
|
+
}, this.state.visualElement = ol(this.state.options.as, {
|
|
3344
3344
|
presenceContext: null,
|
|
3345
3345
|
parent: (n = this.state.parent) == null ? void 0 : n.visualElement,
|
|
3346
3346
|
props: E(g({}, this.state.options), {
|
|
@@ -3371,18 +3371,18 @@ class Wu extends tt {
|
|
|
3371
3371
|
isExit: r = !1
|
|
3372
3372
|
}) {
|
|
3373
3373
|
const o = () => Promise.all(e.map((h) => h()).filter(Boolean)), a = g({}, this.state.target), l = this.state.element, c = (h) => {
|
|
3374
|
-
var
|
|
3375
|
-
r && (this.state.isExiting = !0), l.dispatchEvent(
|
|
3374
|
+
var d, f;
|
|
3375
|
+
r && (this.state.isExiting = !0), l.dispatchEvent(jn("motionstart", a)), (f = (d = this.state.options).onAnimationStart) == null || f.call(d, a), h.then(() => {
|
|
3376
3376
|
var p, m, y, v;
|
|
3377
3377
|
if (r) {
|
|
3378
3378
|
this.state.isExiting = !1;
|
|
3379
|
-
const
|
|
3380
|
-
if (
|
|
3381
|
-
const T = this.state,
|
|
3382
|
-
(p = T.options) != null && p.layoutId && ((m =
|
|
3379
|
+
const w = this.state.options.animatePresenceContext;
|
|
3380
|
+
if (w != null && w.onMotionExitComplete && this.state.presenceContainer) {
|
|
3381
|
+
const T = this.state, S = T.visualElement.projection;
|
|
3382
|
+
(p = T.options) != null && p.layoutId && ((m = S.currentAnimation) == null ? void 0 : m.state) === "running" && !T.options.exit || w.onMotionExitComplete(T.presenceContainer, T);
|
|
3383
3383
|
}
|
|
3384
3384
|
}
|
|
3385
|
-
l.dispatchEvent(
|
|
3385
|
+
l.dispatchEvent(jn("motioncomplete", a, r)), (v = (y = this.state.options).onAnimationComplete) == null || v.call(y, a);
|
|
3386
3386
|
}).catch(_);
|
|
3387
3387
|
}, u = () => {
|
|
3388
3388
|
const h = i != null && i.when ? (i.when === "beforeChildren" ? o() : n()).then(() => i.when === "beforeChildren" ? n() : o()) : Promise.all([o(), n()]);
|
|
@@ -3398,12 +3398,12 @@ class Wu extends tt {
|
|
|
3398
3398
|
const s = this.state.visualElement;
|
|
3399
3399
|
if (!((i = s.variantChildren) != null && i.size) || !n)
|
|
3400
3400
|
return { getChildAnimations: () => Promise.resolve() };
|
|
3401
|
-
const { staggerChildren: r = 0, staggerDirection: o = 1, delayChildren: a = 0 } = e || {}, l = s.variantChildren.size, c = (l - 1) * r, u = typeof a == "function", h = u ? (
|
|
3401
|
+
const { staggerChildren: r = 0, staggerDirection: o = 1, delayChildren: a = 0 } = e || {}, l = s.variantChildren.size, c = (l - 1) * r, u = typeof a == "function", h = u ? (f) => a(f, l) : o === 1 ? (f = 0) => f * r : (f = 0) => c - f * r, d = Array.from(s.variantChildren).map((f, p) => f.state.animateUpdates({
|
|
3402
3402
|
controlActiveState: n,
|
|
3403
3403
|
controlDelay: (u ? 0 : a) + h(p)
|
|
3404
3404
|
}));
|
|
3405
3405
|
return {
|
|
3406
|
-
getChildAnimations: () => Promise.all(
|
|
3406
|
+
getChildAnimations: () => Promise.all(d.map((f) => f()))
|
|
3407
3407
|
};
|
|
3408
3408
|
}
|
|
3409
3409
|
createAnimationFactories(e, n, i) {
|
|
@@ -3411,13 +3411,13 @@ class Wu extends tt {
|
|
|
3411
3411
|
return Object.keys(this.state.target).forEach((r) => {
|
|
3412
3412
|
var l;
|
|
3413
3413
|
var o;
|
|
3414
|
-
if (!
|
|
3414
|
+
if (!_r(e[r], this.state.target[r]))
|
|
3415
3415
|
return;
|
|
3416
|
-
(l = (o = this.state.baseTarget)[r]) != null || (o[r] =
|
|
3417
|
-
const a = this.state.target[r] === "none" &&
|
|
3416
|
+
(l = (o = this.state.baseTarget)[r]) != null || (o[r] = ia.get(this.state.element, r));
|
|
3417
|
+
const a = this.state.target[r] === "none" && ee(Nn[r]) ? Nn[r] : this.state.target[r];
|
|
3418
3418
|
s.push(() => {
|
|
3419
3419
|
var c;
|
|
3420
|
-
return
|
|
3420
|
+
return Ku(
|
|
3421
3421
|
this.state.element,
|
|
3422
3422
|
{ [r]: a },
|
|
3423
3423
|
E(g({}, (n == null ? void 0 : n[r]) || n), {
|
|
@@ -3434,18 +3434,18 @@ class Wu extends tt {
|
|
|
3434
3434
|
}) {
|
|
3435
3435
|
let s = this.state.options.transition, r = {};
|
|
3436
3436
|
const { variants: o, custom: a, transition: l, animatePresenceContext: c } = this.state.options, u = a != null ? a : c == null ? void 0 : c.custom;
|
|
3437
|
-
return this.state.activeStates = g(g({}, this.state.activeStates), e),
|
|
3437
|
+
return this.state.activeStates = g(g({}, this.state.activeStates), e), Wu.forEach((h) => {
|
|
3438
3438
|
if (!this.state.activeStates[h] || On(this.state.options[h]))
|
|
3439
3439
|
return;
|
|
3440
|
-
const
|
|
3441
|
-
let
|
|
3440
|
+
const d = this.state.options[h];
|
|
3441
|
+
let f = ee(d) ? Mt(d, o, u) : void 0;
|
|
3442
3442
|
if (this.state.visualElement.isVariantNode) {
|
|
3443
|
-
const p =
|
|
3444
|
-
|
|
3443
|
+
const p = Mt(this.state.context[h], o, u);
|
|
3444
|
+
f = Object.assign(p ? p || {} : r, f);
|
|
3445
3445
|
}
|
|
3446
|
-
|
|
3447
|
-
}), n && (r =
|
|
3448
|
-
h !== "transition" && (this.state.target[h] =
|
|
3446
|
+
f && (h !== "initial" && (s = f.transition || this.state.options.transition || {}), r = Object.assign(r, f));
|
|
3447
|
+
}), n && (r = Mt(n, o, u), s = r.transition || i || l), Object.entries(r).forEach(([h, d]) => {
|
|
3448
|
+
h !== "transition" && (this.state.target[h] = d);
|
|
3449
3449
|
}), s;
|
|
3450
3450
|
}
|
|
3451
3451
|
/**
|
|
@@ -3454,13 +3454,13 @@ class Wu extends tt {
|
|
|
3454
3454
|
mount() {
|
|
3455
3455
|
var e, n;
|
|
3456
3456
|
const { element: i } = this.state;
|
|
3457
|
-
|
|
3457
|
+
Ss.set(i, this.state), ut.get(i) || (this.state.visualElement.mount(i), ut.set(i, this.state.visualElement)), this.state.visualElement.state = this.state, this.updateAnimationControlsSubscription();
|
|
3458
3458
|
const s = this.state.visualElement, r = s.parent;
|
|
3459
3459
|
if (s.enteringChildren = void 0, (e = this.state.parent) != null && e.isMounted() && !s.isControllingVariants && ((n = r == null ? void 0 : r.enteringChildren) != null && n.has(s))) {
|
|
3460
3460
|
const { delayChildren: o } = this.state.parent.finalTransition || {};
|
|
3461
3461
|
this.animateUpdates({
|
|
3462
3462
|
controlActiveState: this.state.parent.activeStates,
|
|
3463
|
-
controlDelay:
|
|
3463
|
+
controlDelay: rl(r.enteringChildren, s, o)
|
|
3464
3464
|
})();
|
|
3465
3465
|
}
|
|
3466
3466
|
}
|
|
@@ -3473,17 +3473,17 @@ class Wu extends tt {
|
|
|
3473
3473
|
(e = this.unmountControls) == null || e.call(this);
|
|
3474
3474
|
}
|
|
3475
3475
|
}
|
|
3476
|
-
function
|
|
3476
|
+
function zu(t) {
|
|
3477
3477
|
return bo(t) && "offsetHeight" in t;
|
|
3478
3478
|
}
|
|
3479
|
-
const
|
|
3479
|
+
const Hu = {
|
|
3480
3480
|
y: !1
|
|
3481
3481
|
};
|
|
3482
|
-
function
|
|
3483
|
-
return
|
|
3482
|
+
function Yu() {
|
|
3483
|
+
return Hu.y;
|
|
3484
3484
|
}
|
|
3485
|
-
const
|
|
3486
|
-
function
|
|
3485
|
+
const Ao = (t, e) => e ? t === e ? !0 : Ao(t, e.parentElement) : !1, Xu = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1;
|
|
3486
|
+
function Po(t, e) {
|
|
3487
3487
|
const n = ln(t), i = new AbortController(), s = E(g({
|
|
3488
3488
|
passive: !0
|
|
3489
3489
|
}, e), {
|
|
@@ -3491,17 +3491,17 @@ function Ao(t, e) {
|
|
|
3491
3491
|
});
|
|
3492
3492
|
return [n, s, () => i.abort()];
|
|
3493
3493
|
}
|
|
3494
|
-
const
|
|
3494
|
+
const qu = /* @__PURE__ */ new Set([
|
|
3495
3495
|
"BUTTON",
|
|
3496
3496
|
"INPUT",
|
|
3497
3497
|
"SELECT",
|
|
3498
3498
|
"TEXTAREA",
|
|
3499
3499
|
"A"
|
|
3500
3500
|
]);
|
|
3501
|
-
function
|
|
3502
|
-
return
|
|
3501
|
+
function Zu(t) {
|
|
3502
|
+
return qu.has(t.tagName) || t.isContentEditable === !0;
|
|
3503
3503
|
}
|
|
3504
|
-
const
|
|
3504
|
+
const Jt = /* @__PURE__ */ new WeakSet();
|
|
3505
3505
|
function di(t) {
|
|
3506
3506
|
return (e) => {
|
|
3507
3507
|
e.key === "Enter" && t(e);
|
|
@@ -3510,12 +3510,12 @@ function di(t) {
|
|
|
3510
3510
|
function we(t, e) {
|
|
3511
3511
|
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
3512
3512
|
}
|
|
3513
|
-
const
|
|
3513
|
+
const Ju = (t, e) => {
|
|
3514
3514
|
const n = t.currentTarget;
|
|
3515
3515
|
if (!n)
|
|
3516
3516
|
return;
|
|
3517
3517
|
const i = di(() => {
|
|
3518
|
-
if (
|
|
3518
|
+
if (Jt.has(n))
|
|
3519
3519
|
return;
|
|
3520
3520
|
we(n, "down");
|
|
3521
3521
|
const s = di(() => {
|
|
@@ -3526,28 +3526,28 @@ const Zu = (t, e) => {
|
|
|
3526
3526
|
n.addEventListener("keydown", i, e), n.addEventListener("blur", () => n.removeEventListener("keydown", i), e);
|
|
3527
3527
|
};
|
|
3528
3528
|
function pi(t) {
|
|
3529
|
-
return
|
|
3529
|
+
return Xu(t) && !0;
|
|
3530
3530
|
}
|
|
3531
|
-
function
|
|
3532
|
-
const [i, s, r] =
|
|
3531
|
+
function Qu(t, e, n = {}) {
|
|
3532
|
+
const [i, s, r] = Po(t, n), o = (a) => {
|
|
3533
3533
|
const l = a.currentTarget;
|
|
3534
3534
|
if (!pi(a))
|
|
3535
3535
|
return;
|
|
3536
|
-
|
|
3537
|
-
const c = e(l, a), u = (
|
|
3538
|
-
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel",
|
|
3539
|
-
}, h = (
|
|
3540
|
-
u(
|
|
3541
|
-
},
|
|
3542
|
-
u(
|
|
3536
|
+
Jt.add(l);
|
|
3537
|
+
const c = e(l, a), u = (f, p) => {
|
|
3538
|
+
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", d), Jt.has(l) && Jt.delete(l), pi(f) && typeof c == "function" && c(f, { success: p });
|
|
3539
|
+
}, h = (f) => {
|
|
3540
|
+
u(f, l === window || l === document || n.useGlobalTarget || Ao(l, f.target));
|
|
3541
|
+
}, d = (f) => {
|
|
3542
|
+
u(f, !1);
|
|
3543
3543
|
};
|
|
3544
|
-
window.addEventListener("pointerup", h, s), window.addEventListener("pointercancel",
|
|
3544
|
+
window.addEventListener("pointerup", h, s), window.addEventListener("pointercancel", d, s);
|
|
3545
3545
|
};
|
|
3546
3546
|
return i.forEach((a) => {
|
|
3547
|
-
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, s),
|
|
3547
|
+
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, s), zu(a) && (a.addEventListener("focus", (c) => Ju(c, s)), !Zu(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
3548
3548
|
}), r;
|
|
3549
3549
|
}
|
|
3550
|
-
function
|
|
3550
|
+
function Eo(t) {
|
|
3551
3551
|
return {
|
|
3552
3552
|
point: {
|
|
3553
3553
|
x: t.pageX,
|
|
@@ -3559,9 +3559,9 @@ function mi(t, e, n) {
|
|
|
3559
3559
|
const i = t.options;
|
|
3560
3560
|
i.whilePress && t.setActive("whilePress", n === "Start");
|
|
3561
3561
|
const s = `onPress${n === "End" ? "" : n}`, r = i[s];
|
|
3562
|
-
r && C.postRender(() => r(e,
|
|
3562
|
+
r && C.postRender(() => r(e, Eo(e)));
|
|
3563
3563
|
}
|
|
3564
|
-
class
|
|
3564
|
+
class tc extends tt {
|
|
3565
3565
|
isActive() {
|
|
3566
3566
|
const { whilePress: e, onPress: n, onPressCancel: i, onPressStart: s } = this.state.options;
|
|
3567
3567
|
return !!(e || n || i || s);
|
|
@@ -3578,7 +3578,7 @@ class Qu extends tt {
|
|
|
3578
3578
|
}
|
|
3579
3579
|
register() {
|
|
3580
3580
|
const e = this.state.element;
|
|
3581
|
-
!e || !this.isActive() || (this.unmount(), this.unmount =
|
|
3581
|
+
!e || !this.isActive() || (this.unmount(), this.unmount = Qu(
|
|
3582
3582
|
e,
|
|
3583
3583
|
(n, i) => (mi(this.state, i, "Start"), (s, { success: r }) => mi(
|
|
3584
3584
|
this.state,
|
|
@@ -3590,10 +3590,10 @@ class Qu extends tt {
|
|
|
3590
3590
|
}
|
|
3591
3591
|
}
|
|
3592
3592
|
function gi(t) {
|
|
3593
|
-
return !(t.pointerType === "touch" ||
|
|
3593
|
+
return !(t.pointerType === "touch" || Yu());
|
|
3594
3594
|
}
|
|
3595
|
-
function
|
|
3596
|
-
const [i, s, r] =
|
|
3595
|
+
function ec(t, e, n = {}) {
|
|
3596
|
+
const [i, s, r] = Po(t, n), o = (a) => {
|
|
3597
3597
|
if (!gi(a))
|
|
3598
3598
|
return;
|
|
3599
3599
|
const { target: l } = a, c = e(l, a);
|
|
@@ -3612,9 +3612,9 @@ function yi(t, e, n) {
|
|
|
3612
3612
|
const i = t.options;
|
|
3613
3613
|
i.whileHover && t.setActive("whileHover", n === "Start");
|
|
3614
3614
|
const s = `onHover${n}`, r = i[s];
|
|
3615
|
-
r && C.postRender(() => r(e,
|
|
3615
|
+
r && C.postRender(() => r(e, Eo(e)));
|
|
3616
3616
|
}
|
|
3617
|
-
class
|
|
3617
|
+
class nc extends tt {
|
|
3618
3618
|
isActive() {
|
|
3619
3619
|
const { whileHover: e, onHoverStart: n, onHoverEnd: i } = this.state.options;
|
|
3620
3620
|
return !!(e || n || i);
|
|
@@ -3631,7 +3631,7 @@ class ec extends tt {
|
|
|
3631
3631
|
}
|
|
3632
3632
|
register() {
|
|
3633
3633
|
const e = this.state.element;
|
|
3634
|
-
!e || !this.isActive() || (this.unmount(), this.unmount =
|
|
3634
|
+
!e || !this.isActive() || (this.unmount(), this.unmount = ec(
|
|
3635
3635
|
e,
|
|
3636
3636
|
(n, i) => (yi(this.state, i, "Start"), (s) => {
|
|
3637
3637
|
yi(this.state, s, "End");
|
|
@@ -3639,24 +3639,24 @@ class ec extends tt {
|
|
|
3639
3639
|
));
|
|
3640
3640
|
}
|
|
3641
3641
|
}
|
|
3642
|
-
const
|
|
3642
|
+
const ic = {
|
|
3643
3643
|
some: 0,
|
|
3644
3644
|
all: 1
|
|
3645
3645
|
};
|
|
3646
|
-
function
|
|
3646
|
+
function sc(t, e, { root: n, margin: i, amount: s = "some" } = {}) {
|
|
3647
3647
|
const r = ln(t), o = /* @__PURE__ */ new WeakMap(), a = (c) => {
|
|
3648
3648
|
c.forEach((u) => {
|
|
3649
3649
|
const h = o.get(u.target);
|
|
3650
3650
|
if (u.isIntersecting !== !!h)
|
|
3651
3651
|
if (u.isIntersecting) {
|
|
3652
|
-
const
|
|
3653
|
-
typeof
|
|
3652
|
+
const d = e(u.target, u);
|
|
3653
|
+
typeof d == "function" ? o.set(u.target, d) : l.unobserve(u.target);
|
|
3654
3654
|
} else typeof h == "function" && (h(u), o.delete(u.target));
|
|
3655
3655
|
});
|
|
3656
3656
|
}, l = new IntersectionObserver(a, {
|
|
3657
3657
|
root: n,
|
|
3658
3658
|
rootMargin: i,
|
|
3659
|
-
threshold: typeof s == "number" ? s :
|
|
3659
|
+
threshold: typeof s == "number" ? s : ic[s]
|
|
3660
3660
|
});
|
|
3661
3661
|
return r.forEach((c) => l.observe(c)), () => l.disconnect();
|
|
3662
3662
|
}
|
|
@@ -3666,7 +3666,7 @@ function vi(t, e, n) {
|
|
|
3666
3666
|
const s = `onViewport${n}`, r = i[s];
|
|
3667
3667
|
r && C.postRender(() => r(e));
|
|
3668
3668
|
}
|
|
3669
|
-
class
|
|
3669
|
+
class oc extends tt {
|
|
3670
3670
|
isActive() {
|
|
3671
3671
|
const { whileInView: e, onViewportEnter: n, onViewportLeave: i } = this.state.options;
|
|
3672
3672
|
return !!(e || n || i);
|
|
@@ -3680,7 +3680,7 @@ class sc extends tt {
|
|
|
3680
3680
|
return;
|
|
3681
3681
|
this.unmount();
|
|
3682
3682
|
const s = this.state.options.inViewOptions || {}, { once: n } = s, i = U(s, ["once"]);
|
|
3683
|
-
this.unmount =
|
|
3683
|
+
this.unmount = sc(
|
|
3684
3684
|
e,
|
|
3685
3685
|
(r, o) => {
|
|
3686
3686
|
if (vi(this.state, o, "Enter"), !n)
|
|
@@ -3697,17 +3697,17 @@ class sc extends tt {
|
|
|
3697
3697
|
update() {
|
|
3698
3698
|
const { props: e, prevProps: n } = this.state.visualElement;
|
|
3699
3699
|
["amount", "margin", "root"].some(
|
|
3700
|
-
|
|
3700
|
+
rc(e, n)
|
|
3701
3701
|
) && this.startObserver();
|
|
3702
3702
|
}
|
|
3703
3703
|
}
|
|
3704
|
-
function
|
|
3704
|
+
function rc({ inViewOptions: t = {} }, { inViewOptions: e = {} } = {}) {
|
|
3705
3705
|
return (n) => t[n] !== e[n];
|
|
3706
3706
|
}
|
|
3707
|
-
function
|
|
3707
|
+
function oe(t, e, n, i = { passive: !0 }) {
|
|
3708
3708
|
return t.addEventListener(e, n, i), () => t.removeEventListener(e, n);
|
|
3709
3709
|
}
|
|
3710
|
-
class
|
|
3710
|
+
class ac extends tt {
|
|
3711
3711
|
constructor() {
|
|
3712
3712
|
super(...arguments), this.isActive = !1;
|
|
3713
3713
|
}
|
|
@@ -3724,14 +3724,14 @@ class rc extends tt {
|
|
|
3724
3724
|
this.isActive && (this.state.setActive("whileFocus", !1), this.isActive = !1);
|
|
3725
3725
|
}
|
|
3726
3726
|
mount() {
|
|
3727
|
-
this.unmount =
|
|
3728
|
-
|
|
3729
|
-
|
|
3727
|
+
this.unmount = _t(
|
|
3728
|
+
oe(this.state.element, "focus", () => this.onFocus()),
|
|
3729
|
+
oe(this.state.element, "blur", () => this.onBlur())
|
|
3730
3730
|
);
|
|
3731
3731
|
}
|
|
3732
3732
|
}
|
|
3733
|
-
const
|
|
3734
|
-
class
|
|
3733
|
+
const lc = (t, e) => t.depth - e.depth;
|
|
3734
|
+
class uc {
|
|
3735
3735
|
constructor() {
|
|
3736
3736
|
this.children = [], this.isDirty = !1;
|
|
3737
3737
|
}
|
|
@@ -3739,33 +3739,33 @@ class lc {
|
|
|
3739
3739
|
en(this.children, e), this.isDirty = !0;
|
|
3740
3740
|
}
|
|
3741
3741
|
remove(e) {
|
|
3742
|
-
|
|
3742
|
+
ce(this.children, e), this.isDirty = !0;
|
|
3743
3743
|
}
|
|
3744
3744
|
forEach(e) {
|
|
3745
|
-
this.isDirty && this.children.sort(
|
|
3745
|
+
this.isDirty && this.children.sort(lc), this.isDirty = !1, this.children.forEach(e);
|
|
3746
3746
|
}
|
|
3747
3747
|
}
|
|
3748
3748
|
function Ae(t) {
|
|
3749
3749
|
return L(t) ? t.get() : t;
|
|
3750
3750
|
}
|
|
3751
|
-
const
|
|
3752
|
-
function
|
|
3751
|
+
const Vo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], cc = Vo.length, xi = (t) => typeof t == "string" ? parseFloat(t) : t, bi = (t) => typeof t == "number" || x.test(t);
|
|
3752
|
+
function hc(t, e, n, i, s, r) {
|
|
3753
3753
|
var o, a, l, c;
|
|
3754
|
-
s ? (t.opacity = M(0, (o = n.opacity) != null ? o : 1,
|
|
3755
|
-
for (let u = 0; u <
|
|
3756
|
-
const h = `border${
|
|
3757
|
-
let
|
|
3758
|
-
if (
|
|
3754
|
+
s ? (t.opacity = M(0, (o = n.opacity) != null ? o : 1, fc(i)), t.opacityExit = M((a = e.opacity) != null ? a : 1, 0, dc(i))) : r && (t.opacity = M((l = e.opacity) != null ? l : 1, (c = n.opacity) != null ? c : 1, i));
|
|
3755
|
+
for (let u = 0; u < cc; u++) {
|
|
3756
|
+
const h = `border${Vo[u]}Radius`;
|
|
3757
|
+
let d = Ti(e, h), f = Ti(n, h);
|
|
3758
|
+
if (d === void 0 && f === void 0)
|
|
3759
3759
|
continue;
|
|
3760
|
-
|
|
3760
|
+
d || (d = 0), f || (f = 0), d === 0 || f === 0 || bi(d) === bi(f) ? (t[h] = Math.max(M(xi(d), xi(f), i), 0), (Y.test(f) || Y.test(d)) && (t[h] += "%")) : t[h] = f;
|
|
3761
3761
|
}
|
|
3762
3762
|
(e.rotate || n.rotate) && (t.rotate = M(e.rotate || 0, n.rotate || 0, i));
|
|
3763
3763
|
}
|
|
3764
3764
|
function Ti(t, e) {
|
|
3765
3765
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
3766
3766
|
}
|
|
3767
|
-
const
|
|
3768
|
-
function
|
|
3767
|
+
const fc = /* @__PURE__ */ Co(0, 0.5, fo), dc = /* @__PURE__ */ Co(0.5, 0.95, _);
|
|
3768
|
+
function Co(t, e, n) {
|
|
3769
3769
|
return (i) => i < t ? 0 : i > e ? 1 : n(/* @__PURE__ */ yt(t, e, i));
|
|
3770
3770
|
}
|
|
3771
3771
|
function Si(t, e) {
|
|
@@ -3784,29 +3784,29 @@ function ze({ scale: t, scaleX: e, scaleY: n }) {
|
|
|
3784
3784
|
return !Pe(t) || !Pe(e) || !Pe(n);
|
|
3785
3785
|
}
|
|
3786
3786
|
function ot(t) {
|
|
3787
|
-
return ze(t) ||
|
|
3787
|
+
return ze(t) || Mo(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
3788
3788
|
}
|
|
3789
|
-
function
|
|
3789
|
+
function Mo(t) {
|
|
3790
3790
|
return Ai(t.x) || Ai(t.y);
|
|
3791
3791
|
}
|
|
3792
3792
|
function Ai(t) {
|
|
3793
3793
|
return t && t !== "0%";
|
|
3794
3794
|
}
|
|
3795
|
-
function
|
|
3795
|
+
function re(t, e, n) {
|
|
3796
3796
|
const i = t - n, s = e * i;
|
|
3797
3797
|
return n + s;
|
|
3798
3798
|
}
|
|
3799
3799
|
function Pi(t, e, n, i, s) {
|
|
3800
|
-
return s !== void 0 && (t =
|
|
3800
|
+
return s !== void 0 && (t = re(t, s, i)), re(t, n, i) + e;
|
|
3801
3801
|
}
|
|
3802
3802
|
function He(t, e = 0, n = 1, i, s) {
|
|
3803
3803
|
t.min = Pi(t.min, e, n, i, s), t.max = Pi(t.max, e, n, i, s);
|
|
3804
3804
|
}
|
|
3805
|
-
function
|
|
3805
|
+
function Do(t, { x: e, y: n }) {
|
|
3806
3806
|
He(t.x, e.translate, e.scale, e.originPoint), He(t.y, n.translate, n.scale, n.originPoint);
|
|
3807
3807
|
}
|
|
3808
3808
|
const Ei = 0.999999999999, Vi = 1.0000000000001;
|
|
3809
|
-
function
|
|
3809
|
+
function pc(t, e, n, i = !1) {
|
|
3810
3810
|
const s = n.length;
|
|
3811
3811
|
if (!s)
|
|
3812
3812
|
return;
|
|
@@ -3818,7 +3818,7 @@ function dc(t, e, n, i = !1) {
|
|
|
3818
3818
|
l && l.props.style && l.props.style.display === "contents" || (i && r.options.layoutScroll && r.scroll && r !== r.root && mt(t, {
|
|
3819
3819
|
x: -r.scroll.offset.x,
|
|
3820
3820
|
y: -r.scroll.offset.y
|
|
3821
|
-
}), o && (e.x *= o.x.scale, e.y *= o.y.scale,
|
|
3821
|
+
}), o && (e.x *= o.x.scale, e.y *= o.y.scale, Do(t, o)), i && ot(r.latestValues) && mt(t, r.latestValues));
|
|
3822
3822
|
}
|
|
3823
3823
|
e.x < Vi && e.x > Ei && (e.x = 1), e.y < Vi && e.y > Ei && (e.y = 1);
|
|
3824
3824
|
}
|
|
@@ -3832,17 +3832,17 @@ function Ci(t, e, n, i, s = 0.5) {
|
|
|
3832
3832
|
function mt(t, e) {
|
|
3833
3833
|
Ci(t.x, e.x, e.scaleX, e.scale, e.originX), Ci(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
3834
3834
|
}
|
|
3835
|
-
const
|
|
3835
|
+
const Ro = 1e-4, mc = 1 - Ro, gc = 1 + Ro, Lo = 0.01, yc = 0 - Lo, vc = 0 + Lo;
|
|
3836
3836
|
function $(t) {
|
|
3837
3837
|
return t.max - t.min;
|
|
3838
3838
|
}
|
|
3839
|
-
function
|
|
3839
|
+
function xc(t, e, n) {
|
|
3840
3840
|
return Math.abs(t - e) <= n;
|
|
3841
3841
|
}
|
|
3842
3842
|
function Mi(t, e, n, i = 0.5) {
|
|
3843
|
-
t.origin = i, t.originPoint = M(e.min, e.max, t.origin), t.scale = $(n) / $(e), t.translate = M(n.min, n.max, t.origin) - t.originPoint, (t.scale >=
|
|
3843
|
+
t.origin = i, t.originPoint = M(e.min, e.max, t.origin), t.scale = $(n) / $(e), t.translate = M(n.min, n.max, t.origin) - t.originPoint, (t.scale >= mc && t.scale <= gc || isNaN(t.scale)) && (t.scale = 1), (t.translate >= yc && t.translate <= vc || isNaN(t.translate)) && (t.translate = 0);
|
|
3844
3844
|
}
|
|
3845
|
-
function
|
|
3845
|
+
function Dt(t, e, n, i) {
|
|
3846
3846
|
Mi(t.x, e.x, n.x, i ? i.originX : void 0), Mi(t.y, e.y, n.y, i ? i.originY : void 0);
|
|
3847
3847
|
}
|
|
3848
3848
|
function Di(t, e, n) {
|
|
@@ -3854,50 +3854,50 @@ function bc(t, e, n) {
|
|
|
3854
3854
|
function Ri(t, e, n) {
|
|
3855
3855
|
t.min = e.min - n.min, t.max = t.min + $(e);
|
|
3856
3856
|
}
|
|
3857
|
-
function
|
|
3857
|
+
function ae(t, e, n) {
|
|
3858
3858
|
Ri(t.x, e.x, n.x), Ri(t.y, e.y, n.y);
|
|
3859
3859
|
}
|
|
3860
3860
|
function Li(t, e, n, i, s) {
|
|
3861
|
-
return t -= e, t =
|
|
3861
|
+
return t -= e, t = re(t, 1 / n, i), s !== void 0 && (t = re(t, 1 / s, i)), t;
|
|
3862
3862
|
}
|
|
3863
|
-
function
|
|
3863
|
+
function Tc(t, e = 0, n = 1, i = 0.5, s, r = t, o = t) {
|
|
3864
3864
|
if (Y.test(e) && (e = parseFloat(e), e = M(o.min, o.max, e / 100) - o.min), typeof e != "number")
|
|
3865
3865
|
return;
|
|
3866
3866
|
let a = M(r.min, r.max, i);
|
|
3867
3867
|
t === r && (a -= e), t.min = Li(t.min, e, n, a, s), t.max = Li(t.max, e, n, a, s);
|
|
3868
3868
|
}
|
|
3869
3869
|
function Bi(t, e, [n, i, s], r, o) {
|
|
3870
|
-
|
|
3870
|
+
Tc(t, e[n], e[i], e[s], e.scale, r, o);
|
|
3871
3871
|
}
|
|
3872
|
-
const
|
|
3872
|
+
const Sc = ["x", "scaleX", "originX"], wc = ["y", "scaleY", "originY"];
|
|
3873
3873
|
function ki(t, e, n, i) {
|
|
3874
|
-
Bi(t.x, e,
|
|
3874
|
+
Bi(t.x, e, Sc, n ? n.x : void 0, i ? i.x : void 0), Bi(t.y, e, wc, n ? n.y : void 0, i ? i.y : void 0);
|
|
3875
3875
|
}
|
|
3876
3876
|
function Fi(t) {
|
|
3877
3877
|
return t.translate === 0 && t.scale === 1;
|
|
3878
3878
|
}
|
|
3879
|
-
function
|
|
3879
|
+
function Bo(t) {
|
|
3880
3880
|
return Fi(t.x) && Fi(t.y);
|
|
3881
3881
|
}
|
|
3882
3882
|
function Oi(t, e) {
|
|
3883
3883
|
return t.min === e.min && t.max === e.max;
|
|
3884
3884
|
}
|
|
3885
|
-
function
|
|
3885
|
+
function Ac(t, e) {
|
|
3886
3886
|
return Oi(t.x, e.x) && Oi(t.y, e.y);
|
|
3887
3887
|
}
|
|
3888
|
-
function
|
|
3888
|
+
function Ii(t, e) {
|
|
3889
3889
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
3890
3890
|
}
|
|
3891
|
-
function
|
|
3892
|
-
return
|
|
3891
|
+
function ko(t, e) {
|
|
3892
|
+
return Ii(t.x, e.x) && Ii(t.y, e.y);
|
|
3893
3893
|
}
|
|
3894
|
-
function
|
|
3894
|
+
function ji(t) {
|
|
3895
3895
|
return $(t.x) / $(t.y);
|
|
3896
3896
|
}
|
|
3897
3897
|
function _i(t, e) {
|
|
3898
3898
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
3899
3899
|
}
|
|
3900
|
-
class
|
|
3900
|
+
class Pc {
|
|
3901
3901
|
constructor() {
|
|
3902
3902
|
this.members = [];
|
|
3903
3903
|
}
|
|
@@ -3905,7 +3905,7 @@ class Ac {
|
|
|
3905
3905
|
en(this.members, e), e.scheduleRender();
|
|
3906
3906
|
}
|
|
3907
3907
|
remove(e) {
|
|
3908
|
-
if (
|
|
3908
|
+
if (ce(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
|
|
3909
3909
|
const n = this.members[this.members.length - 1];
|
|
3910
3910
|
n && this.promote(n);
|
|
3911
3911
|
}
|
|
@@ -3951,12 +3951,12 @@ class Ac {
|
|
|
3951
3951
|
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
3952
3952
|
}
|
|
3953
3953
|
}
|
|
3954
|
-
function
|
|
3954
|
+
function Ec(t, e, n) {
|
|
3955
3955
|
let i = "";
|
|
3956
3956
|
const s = t.x.translate / e.x, r = t.y.translate / e.y, o = (n == null ? void 0 : n.z) || 0;
|
|
3957
3957
|
if ((s || r || o) && (i = `translate3d(${s}px, ${r}px, ${o}px) `), (e.x !== 1 || e.y !== 1) && (i += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
|
|
3958
|
-
const { transformPerspective: c, rotate: u, rotateX: h, rotateY:
|
|
3959
|
-
c && (i = `perspective(${c}px) ${i}`), u && (i += `rotate(${u}deg) `), h && (i += `rotateX(${h}deg) `),
|
|
3958
|
+
const { transformPerspective: c, rotate: u, rotateX: h, rotateY: d, skewX: f, skewY: p } = n;
|
|
3959
|
+
c && (i = `perspective(${c}px) ${i}`), u && (i += `rotate(${u}deg) `), h && (i += `rotateX(${h}deg) `), d && (i += `rotateY(${d}deg) `), f && (i += `skewX(${f}deg) `), p && (i += `skewY(${p}deg) `);
|
|
3960
3960
|
}
|
|
3961
3961
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
3962
3962
|
return (a !== 1 || l !== 1) && (i += `scale(${a}, ${l})`), i || "none";
|
|
@@ -3964,7 +3964,7 @@ function Pc(t, e, n) {
|
|
|
3964
3964
|
function Ui(t) {
|
|
3965
3965
|
return [t("x"), t("y")];
|
|
3966
3966
|
}
|
|
3967
|
-
const
|
|
3967
|
+
const Qt = {
|
|
3968
3968
|
/**
|
|
3969
3969
|
* Global flag as to whether the tree has animated since the last time
|
|
3970
3970
|
* we resized the window
|
|
@@ -3975,37 +3975,37 @@ const Jt = {
|
|
|
3975
3975
|
* update will be given a `data-projection-id` attribute.
|
|
3976
3976
|
*/
|
|
3977
3977
|
hasEverUpdated: !1
|
|
3978
|
-
}, Ee = ["", "X", "Y", "Z"],
|
|
3979
|
-
let
|
|
3978
|
+
}, Ee = ["", "X", "Y", "Z"], Vc = 1e3;
|
|
3979
|
+
let Cc = 0;
|
|
3980
3980
|
function Ve(t, e, n, i) {
|
|
3981
3981
|
const { latestValues: s } = e;
|
|
3982
3982
|
s[t] && (n[t] = s[t], e.setStaticValue(t, 0), i && (i[t] = 0));
|
|
3983
3983
|
}
|
|
3984
|
-
function
|
|
3984
|
+
function Fo(t) {
|
|
3985
3985
|
if (t.hasCheckedOptimisedAppear = !0, t.root === t)
|
|
3986
3986
|
return;
|
|
3987
3987
|
const { visualElement: e } = t.options;
|
|
3988
3988
|
if (!e)
|
|
3989
3989
|
return;
|
|
3990
|
-
const n =
|
|
3990
|
+
const n = to(e);
|
|
3991
3991
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
3992
3992
|
const { layout: s, layoutId: r } = t.options;
|
|
3993
3993
|
window.MotionCancelOptimisedAnimation(n, "transform", C, !(s || r));
|
|
3994
3994
|
}
|
|
3995
3995
|
const { parent: i } = t;
|
|
3996
|
-
i && !i.hasCheckedOptimisedAppear &&
|
|
3996
|
+
i && !i.hasCheckedOptimisedAppear && Fo(i);
|
|
3997
3997
|
}
|
|
3998
|
-
function
|
|
3998
|
+
function Oo({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: i, resetTransform: s }) {
|
|
3999
3999
|
return class {
|
|
4000
4000
|
constructor(o = {}, a = e == null ? void 0 : e()) {
|
|
4001
|
-
this.id =
|
|
4001
|
+
this.id = Cc++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
4002
4002
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
4003
4003
|
}, this.updateProjection = () => {
|
|
4004
|
-
this.projectionUpdateScheduled = !1, this.nodes.forEach(
|
|
4004
|
+
this.projectionUpdateScheduled = !1, this.nodes.forEach(Rc), this.nodes.forEach(Fc), this.nodes.forEach(Oc), this.nodes.forEach(Lc);
|
|
4005
4005
|
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = o, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
4006
4006
|
for (let l = 0; l < this.path.length; l++)
|
|
4007
4007
|
this.path[l].shouldResetTransform = !0;
|
|
4008
|
-
this.root === this && (this.nodes = new
|
|
4008
|
+
this.root === this && (this.nodes = new uc());
|
|
4009
4009
|
}
|
|
4010
4010
|
addEventListener(o, a) {
|
|
4011
4011
|
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new nn()), this.eventHandlers.get(o).add(a);
|
|
@@ -4023,34 +4023,34 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4023
4023
|
mount(o) {
|
|
4024
4024
|
if (this.instance)
|
|
4025
4025
|
return;
|
|
4026
|
-
this.isSVG =
|
|
4026
|
+
this.isSVG = bn(o) && !To(o), this.instance = o;
|
|
4027
4027
|
const { layoutId: a, layout: l, visualElement: c } = this.options;
|
|
4028
4028
|
if (c && !c.current && c.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
4029
4029
|
let u, h = 0;
|
|
4030
|
-
const
|
|
4030
|
+
const d = () => this.root.updateBlockedByResize = !1;
|
|
4031
4031
|
C.read(() => {
|
|
4032
4032
|
h = window.innerWidth;
|
|
4033
4033
|
}), t(o, () => {
|
|
4034
|
-
const
|
|
4035
|
-
|
|
4034
|
+
const f = window.innerWidth;
|
|
4035
|
+
f !== h && (h = f, this.root.updateBlockedByResize = !0, u && u(), u = br(d, 250), Qt.hasAnimatedSinceResize && (Qt.hasAnimatedSinceResize = !1, this.nodes.forEach(Ki)));
|
|
4036
4036
|
});
|
|
4037
4037
|
}
|
|
4038
|
-
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && c && (a || l) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: h, hasRelativeLayoutChanged:
|
|
4038
|
+
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && c && (a || l) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: h, hasRelativeLayoutChanged: d, layout: f }) => {
|
|
4039
4039
|
if (this.isTreeAnimationBlocked()) {
|
|
4040
4040
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4041
4041
|
return;
|
|
4042
4042
|
}
|
|
4043
|
-
const p = this.options.transition || c.getDefaultTransition() ||
|
|
4044
|
-
if (this.options.layoutRoot || this.resumeFrom ||
|
|
4043
|
+
const p = this.options.transition || c.getDefaultTransition() || Nc, { onLayoutAnimationStart: m, onLayoutAnimationComplete: y } = c.getProps(), v = !this.targetLayout || !ko(this.targetLayout, f), w = !h && d;
|
|
4044
|
+
if (this.options.layoutRoot || this.resumeFrom || w || h && (v || !this.currentAnimation)) {
|
|
4045
4045
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
4046
4046
|
const T = E(g({}, hn(p, "layout")), {
|
|
4047
4047
|
onPlay: m,
|
|
4048
4048
|
onComplete: y
|
|
4049
4049
|
});
|
|
4050
|
-
(c.shouldReduceMotion || this.options.layoutRoot) && (T.delay = 0, T.type = !1), this.startAnimation(T), this.setAnimationOrigin(u,
|
|
4050
|
+
(c.shouldReduceMotion || this.options.layoutRoot) && (T.delay = 0, T.type = !1), this.startAnimation(T), this.setAnimationOrigin(u, w);
|
|
4051
4051
|
} else
|
|
4052
4052
|
h || Ki(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4053
|
-
this.targetLayout =
|
|
4053
|
+
this.targetLayout = f;
|
|
4054
4054
|
});
|
|
4055
4055
|
}
|
|
4056
4056
|
unmount() {
|
|
@@ -4073,7 +4073,7 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4073
4073
|
}
|
|
4074
4074
|
// Note: currently only running on root node
|
|
4075
4075
|
startUpdate() {
|
|
4076
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
4076
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Ic), this.animationId++);
|
|
4077
4077
|
}
|
|
4078
4078
|
getTransformTemplate() {
|
|
4079
4079
|
const { visualElement: o } = this.options;
|
|
@@ -4084,7 +4084,7 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4084
4084
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
4085
4085
|
return;
|
|
4086
4086
|
}
|
|
4087
|
-
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear &&
|
|
4087
|
+
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Fo(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
4088
4088
|
return;
|
|
4089
4089
|
this.isLayoutDirty = !0;
|
|
4090
4090
|
for (let u = 0; u < this.path.length; u++) {
|
|
@@ -4106,15 +4106,15 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4106
4106
|
this.nodes.forEach($i);
|
|
4107
4107
|
return;
|
|
4108
4108
|
}
|
|
4109
|
-
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(
|
|
4110
|
-
const a =
|
|
4109
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(kc), this.nodes.forEach(Mc), this.nodes.forEach(Dc)) : this.nodes.forEach($i), this.clearAllSnapshots();
|
|
4110
|
+
const a = j.now();
|
|
4111
4111
|
F.delta = X(0, 1e3 / 60, a - F.timestamp), F.timestamp = a, F.isProcessing = !0, ye.update.process(F), ye.preRender.process(F), ye.render.process(F), F.isProcessing = !1;
|
|
4112
4112
|
}
|
|
4113
4113
|
didUpdate() {
|
|
4114
|
-
this.updateScheduled || (this.updateScheduled = !0,
|
|
4114
|
+
this.updateScheduled || (this.updateScheduled = !0, Os.read(this.scheduleUpdate));
|
|
4115
4115
|
}
|
|
4116
4116
|
clearAllSnapshots() {
|
|
4117
|
-
this.nodes.forEach(
|
|
4117
|
+
this.nodes.forEach(Bc), this.sharedNodes.forEach(jc);
|
|
4118
4118
|
}
|
|
4119
4119
|
scheduleUpdateProjection() {
|
|
4120
4120
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, C.preRender(this.updateProjection, !1, !0));
|
|
@@ -4157,13 +4157,13 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4157
4157
|
resetTransform() {
|
|
4158
4158
|
if (!s)
|
|
4159
4159
|
return;
|
|
4160
|
-
const o = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !
|
|
4160
|
+
const o = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Bo(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
4161
4161
|
o && this.instance && (a || ot(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4162
4162
|
}
|
|
4163
4163
|
measure(o = !0) {
|
|
4164
4164
|
const a = this.measurePageBox();
|
|
4165
4165
|
let l = this.removeElementScroll(a);
|
|
4166
|
-
return o && (l = this.removeTransform(l)),
|
|
4166
|
+
return o && (l = this.removeTransform(l)), $c(l), {
|
|
4167
4167
|
animationId: this.root.animationId,
|
|
4168
4168
|
measuredBox: a,
|
|
4169
4169
|
layoutBox: l,
|
|
@@ -4177,7 +4177,7 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4177
4177
|
if (!a)
|
|
4178
4178
|
return B();
|
|
4179
4179
|
const l = a.measureViewportBox();
|
|
4180
|
-
if (!(((o = this.scroll) == null ? void 0 : o.wasRoot) || this.path.some(
|
|
4180
|
+
if (!(((o = this.scroll) == null ? void 0 : o.wasRoot) || this.path.some(Kc))) {
|
|
4181
4181
|
const { scroll: u } = this.root;
|
|
4182
4182
|
u && (Yt(l.x, u.offset.x), Yt(l.y, u.offset.y));
|
|
4183
4183
|
}
|
|
@@ -4189,8 +4189,8 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4189
4189
|
if (W(l, o), (a = this.scroll) != null && a.wasRoot)
|
|
4190
4190
|
return l;
|
|
4191
4191
|
for (let c = 0; c < this.path.length; c++) {
|
|
4192
|
-
const u = this.path[c], { scroll: h, options:
|
|
4193
|
-
u !== this.root && h &&
|
|
4192
|
+
const u = this.path[c], { scroll: h, options: d } = u;
|
|
4193
|
+
u !== this.root && h && d.layoutScroll && (h.wasRoot && W(l, o), Yt(l.x, h.offset.x), Yt(l.y, h.offset.y));
|
|
4194
4194
|
}
|
|
4195
4195
|
return l;
|
|
4196
4196
|
}
|
|
@@ -4240,22 +4240,22 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4240
4240
|
const c = !!this.resumingFrom || this !== l;
|
|
4241
4241
|
if (!(o || c && this.isSharedProjectionDirty || this.isProjectionDirty || (a = this.parent) != null && a.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
|
|
4242
4242
|
return;
|
|
4243
|
-
const { layout: h, layoutId:
|
|
4244
|
-
if (!this.layout || !(h ||
|
|
4243
|
+
const { layout: h, layoutId: d } = this.options;
|
|
4244
|
+
if (!this.layout || !(h || d))
|
|
4245
4245
|
return;
|
|
4246
4246
|
this.resolvedRelativeTargetAt = F.timestamp;
|
|
4247
|
-
const
|
|
4248
|
-
|
|
4247
|
+
const f = this.getClosestProjectingParent();
|
|
4248
|
+
f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = B(), this.targetWithTransforms = B()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), bc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : W(this.target, this.layout.layoutBox), Do(this.target, this.targetDelta)) : W(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
|
|
4249
4249
|
}
|
|
4250
4250
|
getClosestProjectingParent() {
|
|
4251
|
-
if (!(!this.parent || ze(this.parent.latestValues) ||
|
|
4251
|
+
if (!(!this.parent || ze(this.parent.latestValues) || Mo(this.parent.latestValues)))
|
|
4252
4252
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
4253
4253
|
}
|
|
4254
4254
|
isProjecting() {
|
|
4255
4255
|
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
4256
4256
|
}
|
|
4257
4257
|
createRelativeTarget(o, a, l) {
|
|
4258
|
-
this.relativeParent = o, this.linkedParentVersion = o.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(),
|
|
4258
|
+
this.relativeParent = o, this.linkedParentVersion = o.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), ae(this.relativeTargetOrigin, a, l), W(this.relativeTarget, this.relativeTargetOrigin);
|
|
4259
4259
|
}
|
|
4260
4260
|
removeRelativeTarget() {
|
|
4261
4261
|
this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -4270,14 +4270,14 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4270
4270
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || h))
|
|
4271
4271
|
return;
|
|
4272
4272
|
W(this.layoutCorrected, this.layout.layoutBox);
|
|
4273
|
-
const
|
|
4274
|
-
|
|
4273
|
+
const d = this.treeScale.x, f = this.treeScale.y;
|
|
4274
|
+
pc(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = B());
|
|
4275
4275
|
const { target: p } = a;
|
|
4276
4276
|
if (!p) {
|
|
4277
4277
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4278
4278
|
return;
|
|
4279
4279
|
}
|
|
4280
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (wi(this.prevProjectionDelta.x, this.projectionDelta.x), wi(this.prevProjectionDelta.y, this.projectionDelta.y)),
|
|
4280
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (wi(this.prevProjectionDelta.x, this.projectionDelta.x), wi(this.prevProjectionDelta.y, this.projectionDelta.y)), Dt(this.projectionDelta, this.layoutCorrected, p, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== f || !_i(this.projectionDelta.x, this.prevProjectionDelta.x) || !_i(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", p));
|
|
4281
4281
|
}
|
|
4282
4282
|
hide() {
|
|
4283
4283
|
this.isVisible = !1;
|
|
@@ -4299,18 +4299,18 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4299
4299
|
setAnimationOrigin(o, a = !1) {
|
|
4300
4300
|
const l = this.snapshot, c = l ? l.latestValues : {}, u = g({}, this.latestValues), h = dt();
|
|
4301
4301
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4302
|
-
const
|
|
4302
|
+
const d = B(), f = l ? l.source : void 0, p = this.layout ? this.layout.source : void 0, m = f !== p, y = this.getStack(), v = !y || y.members.length <= 1, w = !!(m && !v && this.options.crossfade === !0 && !this.path.some(Uc));
|
|
4303
4303
|
this.animationProgress = 0;
|
|
4304
4304
|
let T;
|
|
4305
|
-
this.mixTargetDelta = (
|
|
4306
|
-
const
|
|
4307
|
-
Wi(h.x, o.x,
|
|
4305
|
+
this.mixTargetDelta = (S) => {
|
|
4306
|
+
const b = S / 1e3;
|
|
4307
|
+
Wi(h.x, o.x, b), Wi(h.y, o.y, b), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ae(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), _c(this.relativeTarget, this.relativeTargetOrigin, d, b), T && Ac(this.relativeTarget, T) && (this.isProjectionDirty = !1), T || (T = B()), W(T, this.relativeTarget)), m && (this.animationValues = u, hc(u, c, this.latestValues, b, w, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = b;
|
|
4308
4308
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4309
4309
|
}
|
|
4310
4310
|
startAnimation(o) {
|
|
4311
4311
|
var a, l, c;
|
|
4312
4312
|
this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (c = (l = this.resumingFrom) == null ? void 0 : l.currentAnimation) == null || c.stop(), this.pendingAnimation && (Q(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = C.update(() => {
|
|
4313
|
-
|
|
4313
|
+
Qt.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = gt(0)), this.currentAnimation = So(this.motionValue, [0, 1e3], E(g({}, o), {
|
|
4314
4314
|
velocity: 0,
|
|
4315
4315
|
isSync: !0,
|
|
4316
4316
|
onUpdate: (u) => {
|
|
@@ -4330,24 +4330,24 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4330
4330
|
o && o.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
4331
4331
|
}
|
|
4332
4332
|
finishAnimation() {
|
|
4333
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
4333
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Vc), this.currentAnimation.stop()), this.completeAnimation();
|
|
4334
4334
|
}
|
|
4335
4335
|
applyTransformsToTarget() {
|
|
4336
4336
|
const o = this.getLead();
|
|
4337
4337
|
let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = o;
|
|
4338
4338
|
if (!(!a || !l || !c)) {
|
|
4339
|
-
if (this !== o && this.layout && c &&
|
|
4339
|
+
if (this !== o && this.layout && c && Io(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
4340
4340
|
l = this.target || B();
|
|
4341
4341
|
const h = $(this.layout.layoutBox.x);
|
|
4342
4342
|
l.x.min = o.target.x.min, l.x.max = l.x.min + h;
|
|
4343
|
-
const
|
|
4344
|
-
l.y.min = o.target.y.min, l.y.max = l.y.min +
|
|
4343
|
+
const d = $(this.layout.layoutBox.y);
|
|
4344
|
+
l.y.min = o.target.y.min, l.y.max = l.y.min + d;
|
|
4345
4345
|
}
|
|
4346
|
-
W(a, l), mt(a, u),
|
|
4346
|
+
W(a, l), mt(a, u), Dt(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
4347
4347
|
}
|
|
4348
4348
|
}
|
|
4349
4349
|
registerSharedNode(o, a) {
|
|
4350
|
-
this.sharedNodes.has(o) || this.sharedNodes.set(o, new
|
|
4350
|
+
this.sharedNodes.has(o) || this.sharedNodes.set(o, new Pc()), this.sharedNodes.get(o).add(a);
|
|
4351
4351
|
const c = a.options.initialPromotionConfig;
|
|
4352
4352
|
a.promote({
|
|
4353
4353
|
transition: c ? c.transition : void 0,
|
|
@@ -4419,20 +4419,20 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4419
4419
|
o.visibility = "";
|
|
4420
4420
|
const u = c.animationValues || c.latestValues;
|
|
4421
4421
|
this.applyTransformsToTarget();
|
|
4422
|
-
let h =
|
|
4422
|
+
let h = Ec(this.projectionDeltaWithTransform, this.treeScale, u);
|
|
4423
4423
|
l && (h = l(u, h)), o.transform = h;
|
|
4424
|
-
const { x:
|
|
4425
|
-
o.transformOrigin = `${
|
|
4426
|
-
for (const y in
|
|
4424
|
+
const { x: d, y: f } = this.projectionDelta;
|
|
4425
|
+
o.transformOrigin = `${d.origin * 100}% ${f.origin * 100}% 0`, c.animationValues ? o.opacity = c === this ? (m = (p = u.opacity) != null ? p : this.latestValues.opacity) != null ? m : 1 : this.preserveOpacity ? this.latestValues.opacity : u.opacityExit : o.opacity = c === this ? u.opacity !== void 0 ? u.opacity : "" : u.opacityExit !== void 0 ? u.opacityExit : 0;
|
|
4426
|
+
for (const y in kt) {
|
|
4427
4427
|
if (u[y] === void 0)
|
|
4428
4428
|
continue;
|
|
4429
|
-
const { correct: v, applyTo:
|
|
4430
|
-
if (
|
|
4431
|
-
const
|
|
4432
|
-
for (let A = 0; A <
|
|
4433
|
-
o[
|
|
4429
|
+
const { correct: v, applyTo: w, isCSSVariable: T } = kt[y], S = h === "none" ? u[y] : v(u[y], c);
|
|
4430
|
+
if (w) {
|
|
4431
|
+
const b = w.length;
|
|
4432
|
+
for (let A = 0; A < b; A++)
|
|
4433
|
+
o[w[A]] = S;
|
|
4434
4434
|
} else
|
|
4435
|
-
T ? this.options.visualElement.renderState.vars[y] =
|
|
4435
|
+
T ? this.options.visualElement.renderState.vars[y] = S : o[y] = S;
|
|
4436
4436
|
}
|
|
4437
4437
|
this.options.layoutId && (o.pointerEvents = c === this ? Ae(a == null ? void 0 : a.pointerEvents) || "" : "none");
|
|
4438
4438
|
}
|
|
@@ -4448,36 +4448,36 @@ function Fo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4448
4448
|
}
|
|
4449
4449
|
};
|
|
4450
4450
|
}
|
|
4451
|
-
function
|
|
4451
|
+
function Mc(t) {
|
|
4452
4452
|
t.updateLayout();
|
|
4453
4453
|
}
|
|
4454
|
-
function
|
|
4454
|
+
function Dc(t) {
|
|
4455
4455
|
var e;
|
|
4456
4456
|
const n = ((e = t.resumeFrom) == null ? void 0 : e.snapshot) || t.snapshot;
|
|
4457
4457
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
4458
4458
|
const { layoutBox: i, measuredBox: s } = t.layout, { animationType: r } = t.options, o = n.source !== t.layout.source;
|
|
4459
4459
|
r === "size" ? Ui((h) => {
|
|
4460
|
-
const
|
|
4461
|
-
|
|
4462
|
-
}) :
|
|
4463
|
-
const
|
|
4464
|
-
|
|
4460
|
+
const d = o ? n.measuredBox[h] : n.layoutBox[h], f = $(d);
|
|
4461
|
+
d.min = i[h].min, d.max = d.min + f;
|
|
4462
|
+
}) : Io(r, n.layoutBox, i) && Ui((h) => {
|
|
4463
|
+
const d = o ? n.measuredBox[h] : n.layoutBox[h], f = $(i[h]);
|
|
4464
|
+
d.max = d.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + f);
|
|
4465
4465
|
});
|
|
4466
4466
|
const a = dt();
|
|
4467
|
-
|
|
4467
|
+
Dt(a, i, n.layoutBox);
|
|
4468
4468
|
const l = dt();
|
|
4469
|
-
o ?
|
|
4470
|
-
const c = !
|
|
4469
|
+
o ? Dt(l, t.applyTransform(s, !0), n.measuredBox) : Dt(l, i, n.layoutBox);
|
|
4470
|
+
const c = !Bo(a);
|
|
4471
4471
|
let u = !1;
|
|
4472
4472
|
if (!t.resumeFrom) {
|
|
4473
4473
|
const h = t.getClosestProjectingParent();
|
|
4474
4474
|
if (h && !h.resumeFrom) {
|
|
4475
|
-
const { snapshot:
|
|
4476
|
-
if (
|
|
4475
|
+
const { snapshot: d, layout: f } = h;
|
|
4476
|
+
if (d && f) {
|
|
4477
4477
|
const p = B();
|
|
4478
|
-
|
|
4478
|
+
ae(p, n.layoutBox, d.layoutBox);
|
|
4479
4479
|
const m = B();
|
|
4480
|
-
|
|
4480
|
+
ae(m, i, f.layoutBox), ko(p, m) || (u = !0), h.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = p, t.relativeParent = h);
|
|
4481
4481
|
}
|
|
4482
4482
|
}
|
|
4483
4483
|
}
|
|
@@ -4495,13 +4495,13 @@ function Mc(t) {
|
|
|
4495
4495
|
}
|
|
4496
4496
|
t.options.transition = void 0;
|
|
4497
4497
|
}
|
|
4498
|
-
function
|
|
4498
|
+
function Rc(t) {
|
|
4499
4499
|
t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
4500
4500
|
}
|
|
4501
|
-
function
|
|
4501
|
+
function Lc(t) {
|
|
4502
4502
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
4503
4503
|
}
|
|
4504
|
-
function
|
|
4504
|
+
function Bc(t) {
|
|
4505
4505
|
t.clearSnapshot();
|
|
4506
4506
|
}
|
|
4507
4507
|
function Ni(t) {
|
|
@@ -4510,20 +4510,20 @@ function Ni(t) {
|
|
|
4510
4510
|
function $i(t) {
|
|
4511
4511
|
t.isLayoutDirty = !1;
|
|
4512
4512
|
}
|
|
4513
|
-
function
|
|
4513
|
+
function kc(t) {
|
|
4514
4514
|
const { visualElement: e } = t.options;
|
|
4515
4515
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4516
4516
|
}
|
|
4517
4517
|
function Ki(t) {
|
|
4518
4518
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4519
4519
|
}
|
|
4520
|
-
function
|
|
4520
|
+
function Fc(t) {
|
|
4521
4521
|
t.resolveTargetDelta();
|
|
4522
4522
|
}
|
|
4523
|
-
function
|
|
4523
|
+
function Oc(t) {
|
|
4524
4524
|
t.calcProjection();
|
|
4525
4525
|
}
|
|
4526
|
-
function
|
|
4526
|
+
function Ic(t) {
|
|
4527
4527
|
t.resetSkewAndRotation();
|
|
4528
4528
|
}
|
|
4529
4529
|
function jc(t) {
|
|
@@ -4535,34 +4535,34 @@ function Wi(t, e, n) {
|
|
|
4535
4535
|
function Gi(t, e, n, i) {
|
|
4536
4536
|
t.min = M(e.min, n.min, i), t.max = M(e.max, n.max, i);
|
|
4537
4537
|
}
|
|
4538
|
-
function
|
|
4538
|
+
function _c(t, e, n, i) {
|
|
4539
4539
|
Gi(t.x, e.x, n.x, i), Gi(t.y, e.y, n.y, i);
|
|
4540
4540
|
}
|
|
4541
|
-
function
|
|
4541
|
+
function Uc(t) {
|
|
4542
4542
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
4543
4543
|
}
|
|
4544
|
-
const
|
|
4544
|
+
const Nc = {
|
|
4545
4545
|
duration: 0.45,
|
|
4546
4546
|
ease: [0.4, 0, 0.1, 1]
|
|
4547
4547
|
}, zi = (t) => typeof navigator != "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Hi = zi("applewebkit/") && !zi("chrome/") ? Math.round : _;
|
|
4548
4548
|
function Yi(t) {
|
|
4549
4549
|
t.min = Hi(t.min), t.max = Hi(t.max);
|
|
4550
4550
|
}
|
|
4551
|
-
function
|
|
4551
|
+
function $c(t) {
|
|
4552
4552
|
Yi(t.x), Yi(t.y);
|
|
4553
4553
|
}
|
|
4554
|
-
function
|
|
4555
|
-
return t === "position" || t === "preserve-aspect" && !
|
|
4554
|
+
function Io(t, e, n) {
|
|
4555
|
+
return t === "position" || t === "preserve-aspect" && !xc(ji(e), ji(n), 0.2);
|
|
4556
4556
|
}
|
|
4557
|
-
function
|
|
4557
|
+
function Kc(t) {
|
|
4558
4558
|
var e;
|
|
4559
4559
|
return t !== t.root && ((e = t.scroll) == null ? void 0 : e.wasRoot);
|
|
4560
4560
|
}
|
|
4561
|
-
function
|
|
4561
|
+
function Wc(t, e, n, i = { passive: !0 }) {
|
|
4562
4562
|
return t.addEventListener(e, n, i), () => t.removeEventListener(e, n);
|
|
4563
4563
|
}
|
|
4564
|
-
const
|
|
4565
|
-
attachResizeListener: (t, e) =>
|
|
4564
|
+
const Gc = Oo({
|
|
4565
|
+
attachResizeListener: (t, e) => Wc(t, "resize", e),
|
|
4566
4566
|
measureScroll: () => ({
|
|
4567
4567
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
4568
4568
|
y: document.documentElement.scrollTop || document.body.scrollTop
|
|
@@ -4570,14 +4570,14 @@ const Wc = Fo({
|
|
|
4570
4570
|
checkIsScrollRoot: () => !0
|
|
4571
4571
|
}), Ce = {
|
|
4572
4572
|
current: void 0
|
|
4573
|
-
},
|
|
4573
|
+
}, zc = Oo({
|
|
4574
4574
|
measureScroll: (t) => ({
|
|
4575
4575
|
x: t.scrollLeft,
|
|
4576
4576
|
y: t.scrollTop
|
|
4577
4577
|
}),
|
|
4578
4578
|
defaultParent: () => {
|
|
4579
4579
|
if (!Ce.current) {
|
|
4580
|
-
const t = new
|
|
4580
|
+
const t = new Gc({});
|
|
4581
4581
|
t.mount(window), t.setOptions({ layoutScroll: !0 }), Ce.current = t;
|
|
4582
4582
|
}
|
|
4583
4583
|
return Ce.current;
|
|
@@ -4591,7 +4591,7 @@ function jo(t) {
|
|
|
4591
4591
|
if (t)
|
|
4592
4592
|
return t.options.allowProjection !== !1 ? t.projection : jo(t.parent);
|
|
4593
4593
|
}
|
|
4594
|
-
const
|
|
4594
|
+
const _o = {
|
|
4595
4595
|
borderRadius: E(g({}, H), {
|
|
4596
4596
|
applyTo: [
|
|
4597
4597
|
"borderTopLeftRadius",
|
|
@@ -4604,18 +4604,18 @@ const Io = {
|
|
|
4604
4604
|
borderTopRightRadius: H,
|
|
4605
4605
|
borderBottomLeftRadius: H,
|
|
4606
4606
|
borderBottomRightRadius: H,
|
|
4607
|
-
boxShadow:
|
|
4607
|
+
boxShadow: vs
|
|
4608
4608
|
};
|
|
4609
4609
|
function Vt(t) {
|
|
4610
4610
|
return typeof t == "object" && t !== null && "nodeType" in t;
|
|
4611
4611
|
}
|
|
4612
|
-
class
|
|
4612
|
+
class Hc extends tt {
|
|
4613
4613
|
constructor(e) {
|
|
4614
|
-
super(e), bs(
|
|
4614
|
+
super(e), bs(_o);
|
|
4615
4615
|
}
|
|
4616
4616
|
initProjection() {
|
|
4617
4617
|
const e = this.state.options;
|
|
4618
|
-
this.state.visualElement.projection = new
|
|
4618
|
+
this.state.visualElement.projection = new zc(
|
|
4619
4619
|
this.state.visualElement.latestValues,
|
|
4620
4620
|
e["data-framer-portal-id"] ? void 0 : jo(this.state.visualElement.parent)
|
|
4621
4621
|
), this.state.visualElement.projection.isPresent = !0, this.setOptions();
|
|
@@ -4649,7 +4649,7 @@ class zc extends tt {
|
|
|
4649
4649
|
(e = this.state.visualElement.projection) == null || e.mount(this.state.element);
|
|
4650
4650
|
}
|
|
4651
4651
|
}
|
|
4652
|
-
function
|
|
4652
|
+
function Uo(t) {
|
|
4653
4653
|
return t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1;
|
|
4654
4654
|
}
|
|
4655
4655
|
function Tn(t, e = "page") {
|
|
@@ -4660,13 +4660,13 @@ function Tn(t, e = "page") {
|
|
|
4660
4660
|
}
|
|
4661
4661
|
};
|
|
4662
4662
|
}
|
|
4663
|
-
function
|
|
4664
|
-
return (e) =>
|
|
4663
|
+
function Yc(t) {
|
|
4664
|
+
return (e) => Uo(e) && t(e, Tn(e));
|
|
4665
4665
|
}
|
|
4666
|
-
function
|
|
4667
|
-
return
|
|
4666
|
+
function Rt(t, e, n, i) {
|
|
4667
|
+
return oe(t, e, Yc(n), i);
|
|
4668
4668
|
}
|
|
4669
|
-
function
|
|
4669
|
+
function No(t) {
|
|
4670
4670
|
let e = null;
|
|
4671
4671
|
return () => {
|
|
4672
4672
|
const n = () => {
|
|
@@ -4675,8 +4675,8 @@ function Uo(t) {
|
|
|
4675
4675
|
return e === null ? (e = t, n) : !1;
|
|
4676
4676
|
};
|
|
4677
4677
|
}
|
|
4678
|
-
const Xi =
|
|
4679
|
-
function
|
|
4678
|
+
const Xi = No("dragHorizontal"), qi = No("dragVertical");
|
|
4679
|
+
function Xc(t) {
|
|
4680
4680
|
let e = !1;
|
|
4681
4681
|
if (t === "y")
|
|
4682
4682
|
e = qi();
|
|
@@ -4693,11 +4693,11 @@ function Yc(t) {
|
|
|
4693
4693
|
function Ye(t) {
|
|
4694
4694
|
return t.max - t.min;
|
|
4695
4695
|
}
|
|
4696
|
-
function
|
|
4696
|
+
function qc(t, { min: e, max: n }, i) {
|
|
4697
4697
|
return e !== void 0 && t < e ? t = i ? M(e, t, i.min) : Math.max(t, e) : n !== void 0 && t > n && (t = i ? M(n, t, i.max) : Math.min(t, n)), t;
|
|
4698
4698
|
}
|
|
4699
4699
|
const Xe = 0.35;
|
|
4700
|
-
function
|
|
4700
|
+
function Zc(t, { top: e, left: n, bottom: i, right: s }) {
|
|
4701
4701
|
return {
|
|
4702
4702
|
x: Zi(t.x, n, s),
|
|
4703
4703
|
y: Zi(t.y, e, i)
|
|
@@ -4709,7 +4709,7 @@ function Zi(t, e, n) {
|
|
|
4709
4709
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
4710
4710
|
};
|
|
4711
4711
|
}
|
|
4712
|
-
function
|
|
4712
|
+
function Jc(t = Xe) {
|
|
4713
4713
|
return t === !1 ? t = 0 : t === !0 && (t = Xe), {
|
|
4714
4714
|
x: Ji(t, "left", "right"),
|
|
4715
4715
|
y: Ji(t, "top", "bottom")
|
|
@@ -4724,11 +4724,11 @@ function Ji(t, e, n) {
|
|
|
4724
4724
|
function Qi(t, e) {
|
|
4725
4725
|
return typeof t == "number" ? t : t[e] || 0;
|
|
4726
4726
|
}
|
|
4727
|
-
function
|
|
4727
|
+
function Qc(t, e) {
|
|
4728
4728
|
const n = {};
|
|
4729
4729
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
4730
4730
|
}
|
|
4731
|
-
function
|
|
4731
|
+
function th(t, e) {
|
|
4732
4732
|
return {
|
|
4733
4733
|
x: ts(t.x, e.x),
|
|
4734
4734
|
y: ts(t.y, e.y)
|
|
@@ -4738,63 +4738,63 @@ function ts(t, e) {
|
|
|
4738
4738
|
let n = e.min - t.min, i = e.max - t.max;
|
|
4739
4739
|
return e.max - e.min < t.max - t.min && ([n, i] = [i, n]), { min: n, max: i };
|
|
4740
4740
|
}
|
|
4741
|
-
function
|
|
4741
|
+
function eh(t, e) {
|
|
4742
4742
|
let n = 0.5;
|
|
4743
4743
|
const i = Ye(t), s = Ye(e);
|
|
4744
4744
|
return s > i ? n = /* @__PURE__ */ yt(e.min, e.max - i, t.min) : i > s && (n = /* @__PURE__ */ yt(t.min, t.max - s, e.min)), X(0, 1, n);
|
|
4745
4745
|
}
|
|
4746
4746
|
const es = (t, e) => Math.abs(t - e);
|
|
4747
|
-
function
|
|
4747
|
+
function nh(t, e) {
|
|
4748
4748
|
const n = es(t.x, e.x), i = es(t.y, e.y);
|
|
4749
|
-
return Math.sqrt(
|
|
4749
|
+
return Math.sqrt(de(n, 2) + de(i, 2));
|
|
4750
4750
|
}
|
|
4751
4751
|
const ns = /* @__PURE__ */ new Set(["auto", "scroll"]);
|
|
4752
|
-
class
|
|
4752
|
+
class $o {
|
|
4753
4753
|
constructor(e, n, { transformPagePoint: i, contextWindow: s, dragSnapToOrigin: r = !1, element: o } = {}) {
|
|
4754
|
-
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.onElementScroll = (
|
|
4755
|
-
this.handleScroll(
|
|
4754
|
+
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.onElementScroll = (d) => {
|
|
4755
|
+
this.handleScroll(d.target);
|
|
4756
4756
|
}, this.onWindowScroll = () => {
|
|
4757
4757
|
this.handleScroll(window);
|
|
4758
4758
|
}, this.updatePoint = () => {
|
|
4759
4759
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
4760
4760
|
return;
|
|
4761
|
-
const
|
|
4762
|
-
if (!
|
|
4761
|
+
const d = De(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, p = nh(d.offset, { x: 0, y: 0 }) >= 3;
|
|
4762
|
+
if (!f && !p)
|
|
4763
4763
|
return;
|
|
4764
|
-
const { point: m } =
|
|
4764
|
+
const { point: m } = d, { timestamp: y } = F;
|
|
4765
4765
|
this.history.push(E(g({}, m), { timestamp: y }));
|
|
4766
|
-
const { onStart: v, onMove:
|
|
4767
|
-
|
|
4768
|
-
}, this.handlePointerMove = (
|
|
4769
|
-
this.lastMoveEvent =
|
|
4770
|
-
}, this.handlePointerUp = (
|
|
4766
|
+
const { onStart: v, onMove: w } = this.handlers;
|
|
4767
|
+
f || (v && v(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), w && w(this.lastMoveEvent, d);
|
|
4768
|
+
}, this.handlePointerMove = (d, f) => {
|
|
4769
|
+
this.lastMoveEvent = d, this.lastMoveEventInfo = Me(f, this.transformPagePoint), C.update(this.updatePoint, !0);
|
|
4770
|
+
}, this.handlePointerUp = (d, f) => {
|
|
4771
4771
|
this.end();
|
|
4772
4772
|
const { onEnd: p, onSessionEnd: m, resumeAnimation: y } = this.handlers;
|
|
4773
4773
|
if ((this.dragSnapToOrigin || !this.startEvent) && y && y(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
4774
4774
|
return;
|
|
4775
4775
|
const v = De(
|
|
4776
|
-
|
|
4776
|
+
d.type === "pointercancel" ? this.lastMoveEventInfo : Me(f, this.transformPagePoint),
|
|
4777
4777
|
this.history
|
|
4778
4778
|
);
|
|
4779
|
-
this.startEvent && p && p(
|
|
4780
|
-
}, !
|
|
4779
|
+
this.startEvent && p && p(d, v), m && m(d, v);
|
|
4780
|
+
}, !Uo(e))
|
|
4781
4781
|
return;
|
|
4782
4782
|
this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = i, this.contextWindow = s || window;
|
|
4783
4783
|
const a = Tn(e), l = Me(a, this.transformPagePoint), { point: c } = l, { timestamp: u } = F;
|
|
4784
4784
|
this.history = [E(g({}, c), { timestamp: u })];
|
|
4785
4785
|
const { onSessionStart: h } = n;
|
|
4786
|
-
h && h(e, De(l, this.history)), this.removeListeners =
|
|
4787
|
-
|
|
4786
|
+
h && h(e, De(l, this.history)), this.removeListeners = _t(
|
|
4787
|
+
Rt(
|
|
4788
4788
|
this.contextWindow,
|
|
4789
4789
|
"pointermove",
|
|
4790
4790
|
this.handlePointerMove
|
|
4791
4791
|
),
|
|
4792
|
-
|
|
4792
|
+
Rt(
|
|
4793
4793
|
this.contextWindow,
|
|
4794
4794
|
"pointerup",
|
|
4795
4795
|
this.handlePointerUp
|
|
4796
4796
|
),
|
|
4797
|
-
|
|
4797
|
+
Rt(
|
|
4798
4798
|
this.contextWindow,
|
|
4799
4799
|
"pointercancel",
|
|
4800
4800
|
this.handlePointerUp
|
|
@@ -4870,22 +4870,22 @@ function is(t, e) {
|
|
|
4870
4870
|
function De({ point: t }, e) {
|
|
4871
4871
|
return {
|
|
4872
4872
|
point: t,
|
|
4873
|
-
delta: is(t,
|
|
4874
|
-
offset: is(t,
|
|
4875
|
-
velocity:
|
|
4873
|
+
delta: is(t, Ko(e)),
|
|
4874
|
+
offset: is(t, ih(e)),
|
|
4875
|
+
velocity: sh(e, 0.1)
|
|
4876
4876
|
};
|
|
4877
4877
|
}
|
|
4878
|
-
function
|
|
4878
|
+
function ih(t) {
|
|
4879
4879
|
return t[0];
|
|
4880
4880
|
}
|
|
4881
|
-
function
|
|
4881
|
+
function Ko(t) {
|
|
4882
4882
|
return t[t.length - 1];
|
|
4883
4883
|
}
|
|
4884
|
-
function
|
|
4884
|
+
function sh(t, e) {
|
|
4885
4885
|
if (t.length < 2)
|
|
4886
4886
|
return { x: 0, y: 0 };
|
|
4887
4887
|
let n = t.length - 1, i = null;
|
|
4888
|
-
const s =
|
|
4888
|
+
const s = Ko(t);
|
|
4889
4889
|
for (; n >= 0 && (i = t[n], !(s.timestamp - i.timestamp > /* @__PURE__ */ G(e))); )
|
|
4890
4890
|
n--;
|
|
4891
4891
|
if (!i)
|
|
@@ -4902,7 +4902,7 @@ function ih(t, e) {
|
|
|
4902
4902
|
return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
|
|
4903
4903
|
}
|
|
4904
4904
|
const ss = () => ({ min: 0, max: 0 });
|
|
4905
|
-
function
|
|
4905
|
+
function oh() {
|
|
4906
4906
|
return {
|
|
4907
4907
|
x: ss(),
|
|
4908
4908
|
y: ss()
|
|
@@ -4911,15 +4911,15 @@ function sh() {
|
|
|
4911
4911
|
function z(t) {
|
|
4912
4912
|
return [t("x"), t("y")];
|
|
4913
4913
|
}
|
|
4914
|
-
function
|
|
4914
|
+
function rh(t) {
|
|
4915
4915
|
return !!(L(t) && t.add);
|
|
4916
4916
|
}
|
|
4917
4917
|
function os(t, e) {
|
|
4918
4918
|
const n = t.getValue("willChange");
|
|
4919
|
-
if (
|
|
4919
|
+
if (rh(n))
|
|
4920
4920
|
return n.add(e);
|
|
4921
4921
|
}
|
|
4922
|
-
function
|
|
4922
|
+
function Wo({
|
|
4923
4923
|
top: t,
|
|
4924
4924
|
left: e,
|
|
4925
4925
|
right: n,
|
|
@@ -4930,7 +4930,7 @@ function Ko({
|
|
|
4930
4930
|
y: { min: t, max: i }
|
|
4931
4931
|
};
|
|
4932
4932
|
}
|
|
4933
|
-
function
|
|
4933
|
+
function ah(t, e) {
|
|
4934
4934
|
if (!e)
|
|
4935
4935
|
return t;
|
|
4936
4936
|
const n = e({ x: t.left, y: t.top }), i = e({ x: t.right, y: t.bottom });
|
|
@@ -4941,64 +4941,64 @@ function rh(t, e) {
|
|
|
4941
4941
|
right: i.x
|
|
4942
4942
|
};
|
|
4943
4943
|
}
|
|
4944
|
-
function
|
|
4944
|
+
function lh({ x: t, y: e }) {
|
|
4945
4945
|
return { top: e.min, right: t.max, bottom: e.max, left: t.min };
|
|
4946
4946
|
}
|
|
4947
4947
|
function rs(t, e) {
|
|
4948
4948
|
t.min = t.min + e, t.max = t.max + e;
|
|
4949
4949
|
}
|
|
4950
|
-
function
|
|
4951
|
-
return
|
|
4952
|
-
|
|
4950
|
+
function uh(t, e) {
|
|
4951
|
+
return Wo(
|
|
4952
|
+
ah(t.getBoundingClientRect(), e)
|
|
4953
4953
|
);
|
|
4954
4954
|
}
|
|
4955
|
-
function
|
|
4956
|
-
const i =
|
|
4955
|
+
function ch(t, e, n) {
|
|
4956
|
+
const i = uh(t, n), { scroll: s } = e;
|
|
4957
4957
|
return s && (rs(i.x, s.offset.x), rs(i.y, s.offset.y)), i;
|
|
4958
4958
|
}
|
|
4959
|
-
function
|
|
4959
|
+
function hh(t) {
|
|
4960
4960
|
var e;
|
|
4961
4961
|
return (e = t.projection) == null ? void 0 : e.isPresent;
|
|
4962
4962
|
}
|
|
4963
|
-
function
|
|
4963
|
+
function Go({ current: t }) {
|
|
4964
4964
|
return t ? t.ownerDocument.defaultView : null;
|
|
4965
4965
|
}
|
|
4966
|
-
const
|
|
4967
|
-
class
|
|
4966
|
+
const fh = /* @__PURE__ */ new WeakMap();
|
|
4967
|
+
class dh {
|
|
4968
4968
|
constructor(e) {
|
|
4969
|
-
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic =
|
|
4969
|
+
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = oh(), this.visualElement = e;
|
|
4970
4970
|
}
|
|
4971
4971
|
start(e, { snapToCursor: n = !1 } = {}) {
|
|
4972
4972
|
const i = (c) => {
|
|
4973
4973
|
n ? this.stopAnimation() : this.pauseAnimation(), n && this.snapToCursor(Tn(c, "page").point);
|
|
4974
4974
|
}, s = (c, u) => {
|
|
4975
4975
|
this.stopAnimation();
|
|
4976
|
-
const { drag: h, dragPropagation:
|
|
4977
|
-
if (h && !
|
|
4976
|
+
const { drag: h, dragPropagation: d, onDragStart: f } = this.getProps();
|
|
4977
|
+
if (h && !d && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Xc(h), !this.openGlobalLock))
|
|
4978
4978
|
return;
|
|
4979
4979
|
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), z((m) => {
|
|
4980
4980
|
let y = this.getAxisMotionValue(m).get() || 0;
|
|
4981
4981
|
if (Y.test(y)) {
|
|
4982
4982
|
const { projection: v } = this.visualElement;
|
|
4983
4983
|
if (v && v.layout) {
|
|
4984
|
-
const
|
|
4985
|
-
|
|
4984
|
+
const w = v.layout.layoutBox[m];
|
|
4985
|
+
w && (y = Ye(w) * (parseFloat(y) / 100));
|
|
4986
4986
|
}
|
|
4987
4987
|
}
|
|
4988
4988
|
this.originPoint[m] = y;
|
|
4989
|
-
}),
|
|
4989
|
+
}), f && C.postRender(() => f(c, u)), os(this.visualElement, "transform"), this.visualElement.state.setActive("whileDrag", !0);
|
|
4990
4990
|
}, r = (c, u) => {
|
|
4991
4991
|
const {
|
|
4992
4992
|
dragPropagation: h,
|
|
4993
|
-
dragDirectionLock:
|
|
4994
|
-
onDirectionLock:
|
|
4993
|
+
dragDirectionLock: d,
|
|
4994
|
+
onDirectionLock: f,
|
|
4995
4995
|
onDrag: p
|
|
4996
4996
|
} = this.getProps();
|
|
4997
4997
|
if (!h && !this.openGlobalLock)
|
|
4998
4998
|
return;
|
|
4999
4999
|
const { offset: m } = u;
|
|
5000
|
-
if (
|
|
5001
|
-
this.currentDirection =
|
|
5000
|
+
if (d && this.currentDirection === null) {
|
|
5001
|
+
this.currentDirection = ph(m), this.currentDirection !== null && f && f(this.currentDirection);
|
|
5002
5002
|
return;
|
|
5003
5003
|
}
|
|
5004
5004
|
this.updateAxis("x", u.point, m), this.updateAxis("y", u.point, m), this.visualElement.render(), p && p(c, u);
|
|
@@ -5008,7 +5008,7 @@ class fh {
|
|
|
5008
5008
|
return this.getAnimationState(c) === "paused" && ((u = this.getAxisMotionValue(c).animation) == null ? void 0 : u.play());
|
|
5009
5009
|
}
|
|
5010
5010
|
), { dragSnapToOrigin: l } = this.getProps();
|
|
5011
|
-
this.panSession = new
|
|
5011
|
+
this.panSession = new $o(
|
|
5012
5012
|
e,
|
|
5013
5013
|
{
|
|
5014
5014
|
onSessionStart: i,
|
|
@@ -5020,7 +5020,7 @@ class fh {
|
|
|
5020
5020
|
{
|
|
5021
5021
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
5022
5022
|
dragSnapToOrigin: l,
|
|
5023
|
-
contextWindow:
|
|
5023
|
+
contextWindow: Go(this.visualElement),
|
|
5024
5024
|
element: this.visualElement.current
|
|
5025
5025
|
}
|
|
5026
5026
|
);
|
|
@@ -5047,7 +5047,7 @@ class fh {
|
|
|
5047
5047
|
return;
|
|
5048
5048
|
const r = this.getAxisMotionValue(e);
|
|
5049
5049
|
let o = this.originPoint[e] + i[e];
|
|
5050
|
-
this.constraints && this.constraints[e] && (o =
|
|
5050
|
+
this.constraints && this.constraints[e] && (o = qc(
|
|
5051
5051
|
o,
|
|
5052
5052
|
this.constraints[e],
|
|
5053
5053
|
this.elastic[e]
|
|
@@ -5056,11 +5056,11 @@ class fh {
|
|
|
5056
5056
|
resolveConstraints() {
|
|
5057
5057
|
var e;
|
|
5058
5058
|
const { dragConstraints: n, dragElastic: i } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) == null ? void 0 : e.layout, r = this.constraints;
|
|
5059
|
-
n && Vt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && s ? this.constraints =
|
|
5059
|
+
n && Vt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && s ? this.constraints = Zc(
|
|
5060
5060
|
s.layoutBox,
|
|
5061
5061
|
n
|
|
5062
|
-
) : this.constraints = !1, this.elastic =
|
|
5063
|
-
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] =
|
|
5062
|
+
) : this.constraints = !1, this.elastic = Jc(i), r !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && z((o) => {
|
|
5063
|
+
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = Qc(
|
|
5064
5064
|
s.layoutBox[o],
|
|
5065
5065
|
this.constraints[o]
|
|
5066
5066
|
));
|
|
@@ -5071,27 +5071,27 @@ class fh {
|
|
|
5071
5071
|
if (!e || !Vt(e))
|
|
5072
5072
|
return !1;
|
|
5073
5073
|
const i = e;
|
|
5074
|
-
|
|
5074
|
+
ue(
|
|
5075
5075
|
i !== null,
|
|
5076
5076
|
"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."
|
|
5077
5077
|
);
|
|
5078
5078
|
const { projection: s } = this.visualElement;
|
|
5079
5079
|
if (!s || !s.layout)
|
|
5080
5080
|
return !1;
|
|
5081
|
-
const r =
|
|
5081
|
+
const r = ch(
|
|
5082
5082
|
i,
|
|
5083
5083
|
s.root,
|
|
5084
5084
|
this.visualElement.getTransformPagePoint()
|
|
5085
5085
|
);
|
|
5086
|
-
let o =
|
|
5086
|
+
let o = th(
|
|
5087
5087
|
s.layout.layoutBox,
|
|
5088
5088
|
r
|
|
5089
5089
|
);
|
|
5090
5090
|
if (n) {
|
|
5091
5091
|
const a = n(
|
|
5092
|
-
|
|
5092
|
+
lh(o)
|
|
5093
5093
|
);
|
|
5094
|
-
this.hasMutatedConstraints = !!a, a && (o =
|
|
5094
|
+
this.hasMutatedConstraints = !!a, a && (o = Wo(a));
|
|
5095
5095
|
}
|
|
5096
5096
|
return o;
|
|
5097
5097
|
}
|
|
@@ -5108,11 +5108,11 @@ class fh {
|
|
|
5108
5108
|
return;
|
|
5109
5109
|
let h = l && l[u] || {};
|
|
5110
5110
|
o && (h = { min: 0, max: 0 });
|
|
5111
|
-
const
|
|
5111
|
+
const d = s ? 200 : 1e6, f = s ? 40 : 1e7, p = g(g({
|
|
5112
5112
|
type: "inertia",
|
|
5113
5113
|
velocity: i ? e[u] : 0,
|
|
5114
|
-
bounceStiffness:
|
|
5115
|
-
bounceDamping:
|
|
5114
|
+
bounceStiffness: d,
|
|
5115
|
+
bounceDamping: f,
|
|
5116
5116
|
timeConstant: 750,
|
|
5117
5117
|
restDelta: 1,
|
|
5118
5118
|
restSpeed: 10
|
|
@@ -5124,7 +5124,7 @@ class fh {
|
|
|
5124
5124
|
startAxisValueAnimation(e, n) {
|
|
5125
5125
|
const i = this.getAxisMotionValue(e);
|
|
5126
5126
|
return os(this.visualElement, e), i.start(
|
|
5127
|
-
|
|
5127
|
+
xn(
|
|
5128
5128
|
e,
|
|
5129
5129
|
i,
|
|
5130
5130
|
0,
|
|
@@ -5135,7 +5135,7 @@ class fh {
|
|
|
5135
5135
|
);
|
|
5136
5136
|
}
|
|
5137
5137
|
stopAnimation() {
|
|
5138
|
-
|
|
5138
|
+
hh(this.visualElement) && z((e) => this.getAxisMotionValue(e).stop());
|
|
5139
5139
|
}
|
|
5140
5140
|
pauseAnimation() {
|
|
5141
5141
|
z((e) => {
|
|
@@ -5189,7 +5189,7 @@ class fh {
|
|
|
5189
5189
|
const a = this.getAxisMotionValue(o);
|
|
5190
5190
|
if (a && this.constraints !== !1) {
|
|
5191
5191
|
const l = a.get();
|
|
5192
|
-
s[o] =
|
|
5192
|
+
s[o] = eh(
|
|
5193
5193
|
{ min: l, max: l },
|
|
5194
5194
|
this.constraints[o]
|
|
5195
5195
|
);
|
|
@@ -5206,8 +5206,8 @@ class fh {
|
|
|
5206
5206
|
addListeners() {
|
|
5207
5207
|
if (!this.visualElement.current)
|
|
5208
5208
|
return;
|
|
5209
|
-
|
|
5210
|
-
const e = this.visualElement.current, n =
|
|
5209
|
+
fh.set(this.visualElement, this);
|
|
5210
|
+
const e = this.visualElement.current, n = Rt(
|
|
5211
5211
|
e,
|
|
5212
5212
|
"pointerdown",
|
|
5213
5213
|
(l) => {
|
|
@@ -5222,7 +5222,7 @@ class fh {
|
|
|
5222
5222
|
i
|
|
5223
5223
|
);
|
|
5224
5224
|
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), C.read(i);
|
|
5225
|
-
const o =
|
|
5225
|
+
const o = oe(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener(
|
|
5226
5226
|
"didUpdate",
|
|
5227
5227
|
({ delta: l, hasLayoutChanged: c }) => {
|
|
5228
5228
|
this.isDragging && c && (z((u) => {
|
|
@@ -5259,13 +5259,13 @@ class fh {
|
|
|
5259
5259
|
function Xt(t, e, n) {
|
|
5260
5260
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
5261
5261
|
}
|
|
5262
|
-
function
|
|
5262
|
+
function ph(t, e = 10) {
|
|
5263
5263
|
let n = null;
|
|
5264
5264
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
5265
5265
|
}
|
|
5266
|
-
class
|
|
5266
|
+
class mh extends tt {
|
|
5267
5267
|
constructor(e) {
|
|
5268
|
-
super(e), this.removeGroupControls = _, this.removeListeners = _, this.controls = new
|
|
5268
|
+
super(e), this.removeGroupControls = _, this.removeListeners = _, this.controls = new dh(e.visualElement);
|
|
5269
5269
|
}
|
|
5270
5270
|
mount() {
|
|
5271
5271
|
const { dragControls: e } = this.state.options;
|
|
@@ -5276,9 +5276,9 @@ class ph extends tt {
|
|
|
5276
5276
|
}
|
|
5277
5277
|
}
|
|
5278
5278
|
let Pt = !1;
|
|
5279
|
-
class
|
|
5279
|
+
class gh extends tt {
|
|
5280
5280
|
constructor(e) {
|
|
5281
|
-
super(e), bs(
|
|
5281
|
+
super(e), bs(_o), e.getSnapshot = this.getSnapshot.bind(this), e.didUpdate = this.didUpdate.bind(this);
|
|
5282
5282
|
}
|
|
5283
5283
|
beforeUpdate(e) {
|
|
5284
5284
|
this.getSnapshot(e, void 0);
|
|
@@ -5300,7 +5300,7 @@ class mh extends tt {
|
|
|
5300
5300
|
const r = s.getStack();
|
|
5301
5301
|
r != null && r.prevLead && !r.prevLead.snapshot && (r.prevLead.willUpdate(), Pt = !0), (e = i == null ? void 0 : i.group) == null || e.add(s);
|
|
5302
5302
|
}
|
|
5303
|
-
|
|
5303
|
+
Qt.hasEverUpdated = !0;
|
|
5304
5304
|
}
|
|
5305
5305
|
this.didUpdate();
|
|
5306
5306
|
}
|
|
@@ -5317,7 +5317,7 @@ class mh extends tt {
|
|
|
5317
5317
|
return;
|
|
5318
5318
|
Pt = !0;
|
|
5319
5319
|
const l = this.state.options;
|
|
5320
|
-
(s || l.layoutDependency !== r || r === void 0 ||
|
|
5320
|
+
(s || l.layoutDependency !== r || r === void 0 || ee(n) && i.isPresent !== n) && i.willUpdate(), ee(n) && n !== i.isPresent && (i.isPresent = n, n ? i.promote() : i.relegate());
|
|
5321
5321
|
}
|
|
5322
5322
|
}
|
|
5323
5323
|
function as(t) {
|
|
@@ -5325,17 +5325,17 @@ function as(t) {
|
|
|
5325
5325
|
t && C.postRender(() => t(e, n));
|
|
5326
5326
|
};
|
|
5327
5327
|
}
|
|
5328
|
-
class
|
|
5328
|
+
class yh extends tt {
|
|
5329
5329
|
constructor() {
|
|
5330
5330
|
super(...arguments), this.removePointerDownListener = _;
|
|
5331
5331
|
}
|
|
5332
5332
|
onPointerDown(e) {
|
|
5333
|
-
this.session = new
|
|
5333
|
+
this.session = new $o(
|
|
5334
5334
|
e,
|
|
5335
5335
|
this.createPanHandlers(),
|
|
5336
5336
|
{
|
|
5337
5337
|
transformPagePoint: this.state.visualElement.getTransformPagePoint(),
|
|
5338
|
-
contextWindow:
|
|
5338
|
+
contextWindow: Go(this.state.visualElement)
|
|
5339
5339
|
}
|
|
5340
5340
|
);
|
|
5341
5341
|
}
|
|
@@ -5360,7 +5360,7 @@ class gh extends tt {
|
|
|
5360
5360
|
};
|
|
5361
5361
|
}
|
|
5362
5362
|
mount() {
|
|
5363
|
-
this.removePointerDownListener =
|
|
5363
|
+
this.removePointerDownListener = Rt(
|
|
5364
5364
|
this.state.element,
|
|
5365
5365
|
"pointerdown",
|
|
5366
5366
|
this.onPointerDown.bind(this)
|
|
@@ -5372,39 +5372,39 @@ class gh extends tt {
|
|
|
5372
5372
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
5373
5373
|
}
|
|
5374
5374
|
}
|
|
5375
|
-
const
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
],
|
|
5375
|
+
const vh = [
|
|
5376
|
+
Gu,
|
|
5377
|
+
tc,
|
|
5378
|
+
nc,
|
|
5379
|
+
oc,
|
|
5380
|
+
ac,
|
|
5381
|
+
Hc,
|
|
5382
|
+
yh,
|
|
5383
|
+
mh,
|
|
5384
|
+
gh
|
|
5385
|
+
], xh = {
|
|
5386
5386
|
reducedMotion: "never",
|
|
5387
5387
|
transition: void 0,
|
|
5388
5388
|
nonce: void 0
|
|
5389
5389
|
}, [bh] = It("MotionConfig");
|
|
5390
|
-
function
|
|
5391
|
-
return bh(
|
|
5390
|
+
function Th() {
|
|
5391
|
+
return bh(qt(() => xh));
|
|
5392
5392
|
}
|
|
5393
|
-
const
|
|
5394
|
-
function
|
|
5393
|
+
const Sh = "data-ap-child", [wh] = It("AnimatePresenceContext");
|
|
5394
|
+
function le(t) {
|
|
5395
5395
|
if (t)
|
|
5396
|
-
return t.nodeType === 3 || t.nodeType === 8 ?
|
|
5396
|
+
return t.nodeType === 3 || t.nodeType === 8 ? le(t.nextSibling) : t;
|
|
5397
5397
|
}
|
|
5398
|
-
const [
|
|
5399
|
-
function
|
|
5398
|
+
const [Ah] = It("LazyMotionContext");
|
|
5399
|
+
function Ph(t) {
|
|
5400
5400
|
var e;
|
|
5401
|
-
const n =
|
|
5402
|
-
features:
|
|
5401
|
+
const n = Or(null), i = jr({}), s = Th(), r = wh({}), o = Ah({
|
|
5402
|
+
features: us([]),
|
|
5403
5403
|
strict: !1
|
|
5404
5404
|
});
|
|
5405
5405
|
if (process.env.NODE_ENV !== "production" && ((e = t.features) != null && e.length) && o.strict) {
|
|
5406
5406
|
const p = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
5407
|
-
t.ignoreStrict ? ft(!1, p) :
|
|
5407
|
+
t.ignoreStrict ? ft(!1, p) : ue(!1, p);
|
|
5408
5408
|
}
|
|
5409
5409
|
const a = tr();
|
|
5410
5410
|
function l() {
|
|
@@ -5426,22 +5426,22 @@ function Ah(t) {
|
|
|
5426
5426
|
function u() {
|
|
5427
5427
|
return g(g({}, a), c());
|
|
5428
5428
|
}
|
|
5429
|
-
const h = new
|
|
5429
|
+
const h = new Yr(
|
|
5430
5430
|
u(),
|
|
5431
5431
|
n
|
|
5432
5432
|
);
|
|
5433
|
-
|
|
5434
|
-
function
|
|
5435
|
-
var T,
|
|
5433
|
+
Ir(h);
|
|
5434
|
+
function d() {
|
|
5435
|
+
var T, S;
|
|
5436
5436
|
var p;
|
|
5437
5437
|
const m = h.type === "svg", y = g({}, a);
|
|
5438
|
-
Object.keys(a).forEach((
|
|
5439
|
-
L(a[
|
|
5438
|
+
Object.keys(a).forEach((b) => {
|
|
5439
|
+
L(a[b]) && (y[b] = a[b].get());
|
|
5440
5440
|
});
|
|
5441
5441
|
let v = g(g({}, t.style), m ? {} : ((p = h.visualElement) == null ? void 0 : p.latestValues) || h.baseTarget);
|
|
5442
5442
|
if (m) {
|
|
5443
|
-
const { attrs:
|
|
5444
|
-
(A.transform ||
|
|
5443
|
+
const { attrs: b, style: A } = la(g(g({}, h.isMounted() ? h.target : h.baseTarget), v));
|
|
5444
|
+
(A.transform || b.transformOrigin) && (A.transformOrigin = (T = b.transformOrigin) != null ? T : "50% 50%", delete b.transformOrigin), A.transform && (A.transformBox = (S = A.transformBox) != null ? S : "fill-box", delete b.transformBox), Object.assign(y, b), v = A;
|
|
5445
5445
|
}
|
|
5446
5446
|
t.drag && t.dragListener !== !1 && Object.assign(v, {
|
|
5447
5447
|
userSelect: "none",
|
|
@@ -5449,20 +5449,20 @@ function Ah(t) {
|
|
|
5449
5449
|
WebkitTouchCallout: "none",
|
|
5450
5450
|
touchAction: t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`
|
|
5451
5451
|
});
|
|
5452
|
-
const
|
|
5453
|
-
return
|
|
5452
|
+
const w = sa(v);
|
|
5453
|
+
return w && (y.style = w), y;
|
|
5454
5454
|
}
|
|
5455
|
-
const
|
|
5455
|
+
const f = er().proxy;
|
|
5456
5456
|
return nr(() => {
|
|
5457
5457
|
h.beforeMount();
|
|
5458
5458
|
}), ir(() => {
|
|
5459
|
-
if (h.mount(
|
|
5460
|
-
const p = h.element.closest(`[${
|
|
5459
|
+
if (h.mount(le(f.$el), u(), Vh(f)), r.register && h.element) {
|
|
5460
|
+
const p = h.element.closest(`[${Sh}]`);
|
|
5461
5461
|
p ? (h.presenceContainer = p, r.register(p, h)) : r.registerPending && r.registerPending(h);
|
|
5462
5462
|
}
|
|
5463
5463
|
}), sr(() => h.beforeUnmount()), or(() => {
|
|
5464
5464
|
r.unregisterPending && r.unregisterPending(h);
|
|
5465
|
-
const p =
|
|
5465
|
+
const p = le(f.$el);
|
|
5466
5466
|
p != null && p.isConnected || h.unmount();
|
|
5467
5467
|
}), rr(() => {
|
|
5468
5468
|
h.beforeUpdate(u());
|
|
@@ -5470,12 +5470,12 @@ function Ah(t) {
|
|
|
5470
5470
|
h.update(u());
|
|
5471
5471
|
}), {
|
|
5472
5472
|
getProps: c,
|
|
5473
|
-
getAttrs:
|
|
5473
|
+
getAttrs: d,
|
|
5474
5474
|
layoutGroup: i,
|
|
5475
5475
|
state: h
|
|
5476
5476
|
};
|
|
5477
5477
|
}
|
|
5478
|
-
const
|
|
5478
|
+
const Eh = {
|
|
5479
5479
|
ignoreStrict: { type: Boolean },
|
|
5480
5480
|
forwardMotionProps: { type: Boolean, default: !1 },
|
|
5481
5481
|
asChild: { type: Boolean, default: !1 },
|
|
@@ -5542,13 +5542,13 @@ const Ph = {
|
|
|
5542
5542
|
onPan: { type: Function },
|
|
5543
5543
|
onPanEnd: { type: Function }
|
|
5544
5544
|
};
|
|
5545
|
-
function
|
|
5545
|
+
function Vh(t) {
|
|
5546
5546
|
var e;
|
|
5547
|
-
const n = ((e =
|
|
5547
|
+
const n = ((e = le(t.$el)) == null ? void 0 : e.style.display) === "none";
|
|
5548
5548
|
return t.$.vnode.transition && n;
|
|
5549
5549
|
}
|
|
5550
|
-
const
|
|
5551
|
-
function
|
|
5550
|
+
const Ch = /* @__PURE__ */ new Map(), Mh = /* @__PURE__ */ new Map();
|
|
5551
|
+
function Dh(t) {
|
|
5552
5552
|
if (!Array.isArray(t))
|
|
5553
5553
|
return [t];
|
|
5554
5554
|
const e = [];
|
|
@@ -5556,15 +5556,15 @@ function Mh(t) {
|
|
|
5556
5556
|
Array.isArray(n) ? e.push(...n) : e.push(n);
|
|
5557
5557
|
return e;
|
|
5558
5558
|
}
|
|
5559
|
-
const
|
|
5560
|
-
function
|
|
5559
|
+
const Rh = ["area", "img", "input"];
|
|
5560
|
+
function Lh(t, e, n) {
|
|
5561
5561
|
var i, s;
|
|
5562
|
-
if (typeof t == "string" &&
|
|
5563
|
-
return
|
|
5562
|
+
if (typeof t == "string" && Rh.includes(t))
|
|
5563
|
+
return hs(t, e);
|
|
5564
5564
|
if (t === "template") {
|
|
5565
5565
|
if (!n.default)
|
|
5566
5566
|
return null;
|
|
5567
|
-
const r =
|
|
5567
|
+
const r = Dh(n.default()), o = r.findIndex((u) => u.type !== lr);
|
|
5568
5568
|
if (o === -1)
|
|
5569
5569
|
return r;
|
|
5570
5570
|
const a = r[o];
|
|
@@ -5580,12 +5580,12 @@ function Rh(t, e, n) {
|
|
|
5580
5580
|
}
|
|
5581
5581
|
function ls(t, e = {}) {
|
|
5582
5582
|
var n;
|
|
5583
|
-
const i = typeof t == "string", s = i ? t : t.name || "", r = ((n = e.features) == null ? void 0 : n.length) > 0 ?
|
|
5583
|
+
const i = typeof t == "string", s = i ? t : t.name || "", r = ((n = e.features) == null ? void 0 : n.length) > 0 ? Ch : Mh;
|
|
5584
5584
|
if (i && (r != null && r.has(t)))
|
|
5585
5585
|
return r.get(t);
|
|
5586
|
-
const o =
|
|
5586
|
+
const o = cs({
|
|
5587
5587
|
inheritAttrs: !1,
|
|
5588
|
-
props: E(g({},
|
|
5588
|
+
props: E(g({}, Eh), {
|
|
5589
5589
|
features: {
|
|
5590
5590
|
type: Object,
|
|
5591
5591
|
default: () => e.features || []
|
|
@@ -5594,27 +5594,27 @@ function ls(t, e = {}) {
|
|
|
5594
5594
|
}),
|
|
5595
5595
|
name: s ? `motion.${s}` : "Motion",
|
|
5596
5596
|
setup(a, { slots: l }) {
|
|
5597
|
-
const { getProps: c, getAttrs: u, state: h } =
|
|
5598
|
-
function
|
|
5599
|
-
const
|
|
5600
|
-
if ((!(typeof a.as == "object") || a.asChild) &&
|
|
5597
|
+
const { getProps: c, getAttrs: u, state: h } = Ph(a);
|
|
5598
|
+
function d() {
|
|
5599
|
+
const f = h.element;
|
|
5600
|
+
if ((!(typeof a.as == "object") || a.asChild) && f) {
|
|
5601
5601
|
const { style: m } = u();
|
|
5602
5602
|
if (m)
|
|
5603
5603
|
for (const [y, v] of Object.entries(m))
|
|
5604
|
-
|
|
5604
|
+
f.style[y] = v;
|
|
5605
5605
|
}
|
|
5606
5606
|
}
|
|
5607
5607
|
return () => {
|
|
5608
|
-
const
|
|
5609
|
-
onVnodeUpdated:
|
|
5610
|
-
}), v =
|
|
5611
|
-
return v !== null ? v :
|
|
5608
|
+
const f = c(), p = u(), m = a.asChild ? "template" : a.as, y = E(g(g({}, e.forwardMotionProps || a.forwardMotionProps ? f : {}), p), {
|
|
5609
|
+
onVnodeUpdated: d
|
|
5610
|
+
}), v = Lh(m, y, l);
|
|
5611
|
+
return v !== null ? v : hs(m, g({}, y), l);
|
|
5612
5612
|
};
|
|
5613
5613
|
}
|
|
5614
5614
|
});
|
|
5615
5615
|
return i && (r == null || r.set(t, o)), o;
|
|
5616
5616
|
}
|
|
5617
|
-
function
|
|
5617
|
+
function Bh(t = []) {
|
|
5618
5618
|
return new Proxy({}, {
|
|
5619
5619
|
get(e, n) {
|
|
5620
5620
|
return n === "create" ? (i, s) => ls(i, E(g({}, s), {
|
|
@@ -5625,69 +5625,70 @@ function Lh(t = []) {
|
|
|
5625
5625
|
}
|
|
5626
5626
|
});
|
|
5627
5627
|
}
|
|
5628
|
-
const
|
|
5629
|
-
|
|
5630
|
-
function
|
|
5631
|
-
|
|
5632
|
-
() => t.items.value.filter((l) => !l.disabled && !t.disabled.value)
|
|
5633
|
-
);
|
|
5634
|
-
function n(l) {
|
|
5628
|
+
const zo = Bh(vh);
|
|
5629
|
+
zo.create("div");
|
|
5630
|
+
function kh(t) {
|
|
5631
|
+
function e(l) {
|
|
5635
5632
|
return t.modelValue.value === l.value;
|
|
5636
5633
|
}
|
|
5637
|
-
function
|
|
5634
|
+
function n(l) {
|
|
5638
5635
|
return t.disabled.value || !!l.disabled;
|
|
5639
5636
|
}
|
|
5640
|
-
function
|
|
5641
|
-
|
|
5637
|
+
function i(l) {
|
|
5638
|
+
n(l) || e(l) || t.onSelect(l.value);
|
|
5639
|
+
}
|
|
5640
|
+
function s() {
|
|
5641
|
+
const l = t.items.value, c = l.findIndex((u) => u.value === t.modelValue.value);
|
|
5642
|
+
return c >= 0 && !n(l[c]) ? c : l.findIndex((u) => !n(u));
|
|
5642
5643
|
}
|
|
5643
5644
|
function r(l) {
|
|
5644
|
-
const
|
|
5645
|
-
return l ===
|
|
5645
|
+
const c = s();
|
|
5646
|
+
return c < 0 ? -1 : l === c ? 0 : -1;
|
|
5646
5647
|
}
|
|
5647
5648
|
function o(l, c) {
|
|
5648
5649
|
const u = t.items.value;
|
|
5649
5650
|
let h = l;
|
|
5650
|
-
for (let
|
|
5651
|
-
if (h = (h + c + u.length) % u.length, !
|
|
5651
|
+
for (let d = 0; d < u.length; d++)
|
|
5652
|
+
if (h = (h + c + u.length) % u.length, !n(u[h])) return h;
|
|
5652
5653
|
return l;
|
|
5653
5654
|
}
|
|
5654
5655
|
function a(l, c) {
|
|
5656
|
+
var p;
|
|
5655
5657
|
const u = t.items.value, h = u[c];
|
|
5656
|
-
if (!h ||
|
|
5657
|
-
let
|
|
5658
|
+
if (!h || n(h)) return;
|
|
5659
|
+
let d = null;
|
|
5658
5660
|
switch (l.key) {
|
|
5659
5661
|
case "ArrowRight":
|
|
5660
5662
|
case "ArrowDown":
|
|
5661
|
-
|
|
5663
|
+
d = o(c, 1);
|
|
5662
5664
|
break;
|
|
5663
5665
|
case "ArrowLeft":
|
|
5664
5666
|
case "ArrowUp":
|
|
5665
|
-
|
|
5667
|
+
d = o(c, -1);
|
|
5666
5668
|
break;
|
|
5667
5669
|
case "Home":
|
|
5668
|
-
|
|
5670
|
+
d = u.findIndex((m) => !n(m));
|
|
5669
5671
|
break;
|
|
5670
5672
|
case "End":
|
|
5671
|
-
|
|
5673
|
+
d = [...u].reverse().findIndex((m) => !n(m)), d >= 0 && (d = u.length - 1 - d);
|
|
5672
5674
|
break;
|
|
5673
5675
|
default:
|
|
5674
5676
|
return;
|
|
5675
5677
|
}
|
|
5676
|
-
if (
|
|
5678
|
+
if (d === null || d < 0 || d === c) return;
|
|
5677
5679
|
l.preventDefault();
|
|
5678
|
-
const
|
|
5679
|
-
|
|
5680
|
+
const f = u[d];
|
|
5681
|
+
f && (i(f), (p = t.focusIndex) == null || p.call(t, d));
|
|
5680
5682
|
}
|
|
5681
5683
|
return {
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
select: s,
|
|
5684
|
+
isSelected: e,
|
|
5685
|
+
isSegmentDisabled: n,
|
|
5686
|
+
select: i,
|
|
5686
5687
|
getTabIndex: r,
|
|
5687
5688
|
onKeydown: a
|
|
5688
5689
|
};
|
|
5689
5690
|
}
|
|
5690
|
-
const
|
|
5691
|
+
const Fh = ["aria-label", "aria-disabled"], Oh = ["aria-checked", "aria-label", "tabindex", "disabled", "onClick", "onKeydown"], $h = /* @__PURE__ */ cs({
|
|
5691
5692
|
__name: "index",
|
|
5692
5693
|
props: {
|
|
5693
5694
|
items: {},
|
|
@@ -5700,77 +5701,89 @@ const kh = ["aria-label", "aria-disabled"], Fh = ["aria-checked", "aria-label",
|
|
|
5700
5701
|
},
|
|
5701
5702
|
emits: ["update:modelValue"],
|
|
5702
5703
|
setup(t, { emit: e }) {
|
|
5703
|
-
const n = t, i = e, s =
|
|
5704
|
+
const n = t, i = e, s = pe(n, "items"), r = pe(n, "modelValue"), o = pe(n, "disabled"), a = us([]);
|
|
5705
|
+
function l(S, b) {
|
|
5706
|
+
a.value[b] = S;
|
|
5707
|
+
}
|
|
5708
|
+
const { isSelected: c, isSegmentDisabled: u, select: h, getTabIndex: d, onKeydown: f } = kh({
|
|
5704
5709
|
items: s,
|
|
5705
5710
|
modelValue: r,
|
|
5706
5711
|
disabled: o,
|
|
5707
|
-
onSelect: (
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5712
|
+
onSelect: (S) => i("update:modelValue", S),
|
|
5713
|
+
focusIndex: (S) => {
|
|
5714
|
+
var b;
|
|
5715
|
+
return (b = a.value[S]) == null ? void 0 : b.focus();
|
|
5716
|
+
}
|
|
5717
|
+
}), p = qt(() => {
|
|
5718
|
+
const S = n.items.findIndex((b) => b.value === n.modelValue);
|
|
5719
|
+
return S >= 0 ? S : 0;
|
|
5720
|
+
}), m = qt(() => {
|
|
5721
|
+
const S = n.items.length;
|
|
5722
|
+
if (S !== 0)
|
|
5723
|
+
return n.fullWidth ? `repeat(${S}, minmax(0, 1fr))` : `repeat(${S}, auto)`;
|
|
5724
|
+
}), y = qt(() => [
|
|
5715
5725
|
"segmented-control",
|
|
5716
5726
|
n.size === "s" ? "segmented-control--s" : "segmented-control--m",
|
|
5717
5727
|
n.fullWidth && "segmented-control--full-width",
|
|
5718
5728
|
n.ui.root
|
|
5719
5729
|
]);
|
|
5720
|
-
function
|
|
5730
|
+
function v(S) {
|
|
5721
5731
|
return [
|
|
5722
5732
|
"segmented-control__segment",
|
|
5723
|
-
|
|
5724
|
-
|
|
5733
|
+
c(S) && "segmented-control__segment--selected",
|
|
5734
|
+
c(S) ? n.ui.segmentSelected : n.ui.segment
|
|
5725
5735
|
].filter(Boolean);
|
|
5726
5736
|
}
|
|
5727
|
-
function
|
|
5737
|
+
function w(S) {
|
|
5728
5738
|
return [
|
|
5729
5739
|
"segmented-control__label",
|
|
5730
|
-
|
|
5731
|
-
|
|
5740
|
+
c(S) && "segmented-control__label--selected",
|
|
5741
|
+
c(S) ? n.ui.labelSelected : n.ui.label
|
|
5732
5742
|
].filter(Boolean);
|
|
5733
5743
|
}
|
|
5734
|
-
const
|
|
5744
|
+
const T = {
|
|
5735
5745
|
type: "spring",
|
|
5736
5746
|
visualDuration: 0.2,
|
|
5737
5747
|
bounce: 0.2
|
|
5738
5748
|
};
|
|
5739
|
-
return (
|
|
5749
|
+
return (S, b) => (Wt(), me("div", {
|
|
5740
5750
|
role: "radiogroup",
|
|
5741
|
-
class: Gt(
|
|
5742
|
-
style: ge({ gridTemplateColumns:
|
|
5751
|
+
class: Gt(y.value),
|
|
5752
|
+
style: ge(m.value ? { gridTemplateColumns: m.value } : void 0),
|
|
5743
5753
|
"aria-label": t.ariaLabel,
|
|
5744
5754
|
"aria-disabled": t.disabled || void 0
|
|
5745
5755
|
}, [
|
|
5746
|
-
hr(ct(
|
|
5756
|
+
t.items.length > 0 ? (Wt(), hr(ct(zo).div, {
|
|
5757
|
+
key: 0,
|
|
5747
5758
|
layout: "",
|
|
5748
5759
|
"data-state": t.modelValue,
|
|
5749
5760
|
class: Gt(["segmented-control__indicator", t.ui.indicator]),
|
|
5750
|
-
style: ge({ gridColumn:
|
|
5751
|
-
transition:
|
|
5761
|
+
style: ge({ gridColumn: p.value + 1, gridRow: 1 }),
|
|
5762
|
+
transition: T,
|
|
5752
5763
|
"aria-hidden": "true"
|
|
5753
|
-
}, null, 8, ["data-state", "class", "style"]),
|
|
5754
|
-
(
|
|
5755
|
-
key:
|
|
5764
|
+
}, null, 8, ["data-state", "class", "style"])) : fr("", !0),
|
|
5765
|
+
(Wt(!0), me(dr, null, pr(t.items, (A, V) => (Wt(), me("button", {
|
|
5766
|
+
key: A.value,
|
|
5767
|
+
ref_for: !0,
|
|
5768
|
+
ref: (P) => l(P, V),
|
|
5756
5769
|
type: "button",
|
|
5757
5770
|
role: "radio",
|
|
5758
|
-
class: Gt(
|
|
5759
|
-
style: ge({ gridColumn:
|
|
5760
|
-
"aria-checked": ct(
|
|
5761
|
-
"aria-label":
|
|
5762
|
-
tabindex: ct(
|
|
5763
|
-
disabled: ct(
|
|
5764
|
-
onClick: (
|
|
5765
|
-
onKeydown: (
|
|
5771
|
+
class: Gt(v(A)),
|
|
5772
|
+
style: ge({ gridColumn: V + 1, gridRow: 1 }),
|
|
5773
|
+
"aria-checked": ct(c)(A),
|
|
5774
|
+
"aria-label": A.label,
|
|
5775
|
+
tabindex: ct(d)(V),
|
|
5776
|
+
disabled: ct(u)(A),
|
|
5777
|
+
onClick: (P) => ct(h)(A),
|
|
5778
|
+
onKeydown: (P) => ct(f)(P, V)
|
|
5766
5779
|
}, [
|
|
5767
|
-
|
|
5768
|
-
class: Gt(
|
|
5769
|
-
},
|
|
5770
|
-
], 46,
|
|
5771
|
-
], 14,
|
|
5780
|
+
mr("span", {
|
|
5781
|
+
class: Gt(w(A))
|
|
5782
|
+
}, gr(A.label), 3)
|
|
5783
|
+
], 46, Oh))), 128))
|
|
5784
|
+
], 14, Fh));
|
|
5772
5785
|
}
|
|
5773
5786
|
});
|
|
5774
5787
|
export {
|
|
5775
|
-
|
|
5788
|
+
$h as AzSegmentedControl
|
|
5776
5789
|
};
|