@mkbabb/keyframes.js 6.1.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/engine/index.d.ts +14 -5
- package/dist/engine/index.js +820 -782
- package/dist/keyframes.d.ts +16 -5
- package/package.json +2 -2
package/dist/engine/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { D as e, S as t, T as n, _ as r, c as i, f as a, g as o, i as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, v as g, x as _ } from "../sequence-BUgKKePR.js";
|
|
2
|
-
import { C as v, D as y, E as b, S as
|
|
3
|
-
import { clamp as
|
|
4
|
-
import { easeInOutCubic as
|
|
5
|
-
import { convertColor as
|
|
6
|
-
import { coerceToSyntax as
|
|
7
|
-
import { isLayoutTrackingUnit as
|
|
8
|
-
import { PathGeometry as
|
|
2
|
+
import { C as v, D as y, E as b, S as x, T as ee, _ as S, a as te, b as ne, c as re, d as ie, f as ae, g as oe, h as se, i as ce, l as le, m as ue, n as de, o as fe, p as pe, r as me, s as he, t as ge, u as _e, v as ve, w as ye, x as be, y as C } from "../registry-CPtiwlwX.js";
|
|
3
|
+
import { clamp as xe, lerp as w, lerpArray as Se, scale as Ce } from "@mkbabb/value.js/math";
|
|
4
|
+
import { easeInOutCubic as we } from "@mkbabb/value.js/easing";
|
|
5
|
+
import { convertColor as Te, mixColors as Ee, oklab as De } from "@mkbabb/value.js/color";
|
|
6
|
+
import { coerceToSyntax as Oe, serializeCssColor as ke } from "@mkbabb/value.js/css";
|
|
7
|
+
import { isLayoutTrackingUnit as T } from "@mkbabb/value.js/value";
|
|
8
|
+
import { PathGeometry as Ae } from "@mkbabb/value.js/transform";
|
|
9
9
|
//#region \0rolldown/runtime.js
|
|
10
|
-
var
|
|
10
|
+
var je = Object.defineProperty, Me = (e, t) => {
|
|
11
11
|
let n = {};
|
|
12
|
-
for (var r in e)
|
|
12
|
+
for (var r in e) je(n, r, {
|
|
13
13
|
get: e[r],
|
|
14
14
|
enumerable: !0
|
|
15
15
|
});
|
|
16
|
-
return t ||
|
|
17
|
-
},
|
|
16
|
+
return t || je(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
17
|
+
}, Ne = [
|
|
18
18
|
"normal",
|
|
19
19
|
"reverse",
|
|
20
20
|
"alternate",
|
|
21
21
|
"alternate-reverse"
|
|
22
|
-
],
|
|
22
|
+
], Pe = [
|
|
23
23
|
"none",
|
|
24
24
|
"forwards",
|
|
25
25
|
"backwards",
|
|
26
26
|
"both"
|
|
27
|
-
],
|
|
27
|
+
], Fe = [
|
|
28
28
|
"rgb",
|
|
29
29
|
"hsl",
|
|
30
30
|
"hsv",
|
|
@@ -42,29 +42,29 @@ var Ne = Object.defineProperty, Pe = (e, t) => {
|
|
|
42
42
|
"rec2020",
|
|
43
43
|
"ictcp",
|
|
44
44
|
"jzazbz"
|
|
45
|
-
],
|
|
45
|
+
], Ie = [
|
|
46
46
|
"shorter",
|
|
47
47
|
"longer",
|
|
48
48
|
"increasing",
|
|
49
49
|
"decreasing"
|
|
50
|
-
],
|
|
50
|
+
], E = () => {}, D = {
|
|
51
51
|
duration: 1e3,
|
|
52
52
|
delay: 0,
|
|
53
53
|
iterationCount: 1,
|
|
54
54
|
direction: "normal",
|
|
55
55
|
fillMode: "forwards",
|
|
56
|
-
timingFunction: { fn:
|
|
56
|
+
timingFunction: { fn: we },
|
|
57
57
|
useWAAPI: !0,
|
|
58
58
|
respectReducedMotion: !1,
|
|
59
59
|
colorSpace: "oklab"
|
|
60
|
-
},
|
|
60
|
+
}, Le = {
|
|
61
61
|
zIndex: 0,
|
|
62
62
|
weight: 1,
|
|
63
63
|
op: "replace",
|
|
64
64
|
enabled: !0
|
|
65
|
-
},
|
|
66
|
-
typeof window < "u" && window.addEventListener("resize", () => (
|
|
67
|
-
var
|
|
65
|
+
}, Re = 0, ze = /* @__PURE__ */ new WeakMap(), Be = () => Re;
|
|
66
|
+
typeof window < "u" && window.addEventListener("resize", () => (ze = /* @__PURE__ */ new WeakMap(), ++Re), { passive: !0 });
|
|
67
|
+
var Ve = (e, t) => {
|
|
68
68
|
switch (t) {
|
|
69
69
|
case "cm": return 96 / 2.54 * e;
|
|
70
70
|
case "mm": return 96 / 25.4 * e;
|
|
@@ -74,7 +74,7 @@ var Ue = (e, t) => {
|
|
|
74
74
|
case "pc": return e * 16;
|
|
75
75
|
default: return e;
|
|
76
76
|
}
|
|
77
|
-
},
|
|
77
|
+
}, He = (e, t) => {
|
|
78
78
|
if (typeof window > "u") return;
|
|
79
79
|
let n = /^(sv|lv|dv|v)?(w|h|i|b|min|max)$/.exec(e);
|
|
80
80
|
if (!n) return;
|
|
@@ -87,7 +87,7 @@ var Ue = (e, t) => {
|
|
|
87
87
|
case "min": return Math.min(o, s);
|
|
88
88
|
case "max": return Math.max(o, s);
|
|
89
89
|
}
|
|
90
|
-
},
|
|
90
|
+
}, Ue = (e) => {
|
|
91
91
|
let t = e.parentElement;
|
|
92
92
|
for (; t;) {
|
|
93
93
|
let e = getComputedStyle(t).containerType;
|
|
@@ -95,17 +95,17 @@ var Ue = (e, t) => {
|
|
|
95
95
|
t = t.parentElement;
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
function
|
|
98
|
+
function We(e, t, n, r) {
|
|
99
99
|
let i = t === "em" || t === "rem" || t === "ex" || t === "ch" || t === "cap" || t === "ic" || t === "lh" || t === "rlh";
|
|
100
|
-
if (!
|
|
100
|
+
if (!T(t) && !i) return Ve(e, t);
|
|
101
101
|
if (t === "%" && n?.parentElement && r) {
|
|
102
102
|
let t = Number.parseFloat(getComputedStyle(n.parentElement).getPropertyValue(r));
|
|
103
103
|
return e / 100 * t;
|
|
104
104
|
}
|
|
105
|
-
let a =
|
|
105
|
+
let a = He(t, n);
|
|
106
106
|
if (a !== void 0) return e * a / 100;
|
|
107
107
|
if (t.startsWith("cq") && n) {
|
|
108
|
-
let r =
|
|
108
|
+
let r = Ue(n);
|
|
109
109
|
if (!r) return e;
|
|
110
110
|
let i = r.clientWidth, a = r.clientHeight, o = getComputedStyle(r).writingMode, s = o.startsWith("vertical") || o.startsWith("sideways");
|
|
111
111
|
return e * (t === "cqw" ? i : t === "cqh" ? a : t === "cqi" ? s ? a : i : t === "cqb" ? s ? i : a : t === "cqmin" ? Math.min(i, a) : Math.max(i, a)) / 100;
|
|
@@ -125,10 +125,10 @@ function Ke(e, t, n, r) {
|
|
|
125
125
|
let t = Number.parseFloat(s.lineHeight);
|
|
126
126
|
return e * (Number.isFinite(t) ? t : c * 1.2);
|
|
127
127
|
}
|
|
128
|
-
default: return
|
|
128
|
+
default: return Ve(e, t);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
var
|
|
131
|
+
var Ge = class extends TypeError {
|
|
132
132
|
property;
|
|
133
133
|
authoredValue;
|
|
134
134
|
actual;
|
|
@@ -136,14 +136,14 @@ var qe = class extends TypeError {
|
|
|
136
136
|
constructor(e, t, n) {
|
|
137
137
|
super(`Could not resolve "${y(t)}" for "${e}" to a numeric CSS scalar${n === "" ? "" : ` (computed: "${n}")`}.`), this.property = e, this.authoredValue = t, this.actual = n, this.name = "BrowserScalarResolutionError";
|
|
138
138
|
}
|
|
139
|
-
},
|
|
140
|
-
let r = () => new
|
|
139
|
+
}, Ke = (e, t, n) => {
|
|
140
|
+
let r = () => new Ge(n, t, e), i = C(ue(e), r);
|
|
141
141
|
if (i.payload.type !== "number") throw r();
|
|
142
142
|
return Object.freeze({
|
|
143
143
|
value: i.payload.value,
|
|
144
144
|
unit: i.payload.unit
|
|
145
145
|
});
|
|
146
|
-
},
|
|
146
|
+
}, qe = (e) => {
|
|
147
147
|
if (e.kind !== "call" || e.name !== "var") return;
|
|
148
148
|
let t = e.args[0];
|
|
149
149
|
if (t?.kind === "scalar" && t.payload.type === "keyword") return t.payload.value;
|
|
@@ -151,10 +151,10 @@ var qe = class extends TypeError {
|
|
|
151
151
|
let e = t.items[0];
|
|
152
152
|
if (e?.kind === "scalar" && e.payload.type === "keyword") return e.payload.value;
|
|
153
153
|
}
|
|
154
|
-
},
|
|
154
|
+
}, Je = (e, t, n) => {
|
|
155
155
|
if (e.kind === "scalar" && e.payload.type === "number") {
|
|
156
156
|
let { value: r, unit: i } = e.payload;
|
|
157
|
-
return
|
|
157
|
+
return T(i) || [
|
|
158
158
|
"em",
|
|
159
159
|
"rem",
|
|
160
160
|
"ex",
|
|
@@ -164,17 +164,17 @@ var qe = class extends TypeError {
|
|
|
164
164
|
"lh",
|
|
165
165
|
"rlh"
|
|
166
166
|
].includes(i) ? Object.freeze({
|
|
167
|
-
value:
|
|
167
|
+
value: We(r, i, t, n),
|
|
168
168
|
unit: "px"
|
|
169
169
|
}) : Object.freeze({
|
|
170
170
|
value: r,
|
|
171
171
|
unit: i
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
-
let r =
|
|
174
|
+
let r = qe(e);
|
|
175
175
|
if (r !== void 0) {
|
|
176
176
|
let i = getComputedStyle(t).getPropertyValue(r).trim(), a = t.style.getPropertyValue(r).trim();
|
|
177
|
-
return
|
|
177
|
+
return Ke(i || a, e, n);
|
|
178
178
|
}
|
|
179
179
|
let i = n.split(".", 1)[0] ?? n, a = t.style.getPropertyValue(i), o = t.style.getPropertyPriority(i), s = y(e), c = "";
|
|
180
180
|
try {
|
|
@@ -182,37 +182,37 @@ var qe = class extends TypeError {
|
|
|
182
182
|
} finally {
|
|
183
183
|
a === "" ? t.style.removeProperty(i) : t.style.setProperty(i, a, o);
|
|
184
184
|
}
|
|
185
|
-
return
|
|
185
|
+
return Ke(c, e, n);
|
|
186
186
|
};
|
|
187
|
-
function
|
|
188
|
-
if (!t.isConnected) return
|
|
189
|
-
let r =
|
|
190
|
-
r === void 0 && (r = /* @__PURE__ */ new WeakMap(),
|
|
187
|
+
function Ye(e, t, n) {
|
|
188
|
+
if (!t.isConnected) return Je(e, t, n);
|
|
189
|
+
let r = ze.get(e);
|
|
190
|
+
r === void 0 && (r = /* @__PURE__ */ new WeakMap(), ze.set(e, r));
|
|
191
191
|
let i = r.get(t);
|
|
192
192
|
i === void 0 && (i = /* @__PURE__ */ new Map(), r.set(t, i));
|
|
193
193
|
let a = i.get(n);
|
|
194
|
-
if (a?.epoch ===
|
|
195
|
-
let o =
|
|
194
|
+
if (a?.epoch === Re) return a.result;
|
|
195
|
+
let o = Je(e, t, n), s = Object.freeze({
|
|
196
196
|
result: o,
|
|
197
|
-
epoch:
|
|
197
|
+
epoch: Re
|
|
198
198
|
});
|
|
199
199
|
return i.set(n, s), o;
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region src/animation/compile/frame/interp-slot.ts
|
|
203
|
-
var
|
|
203
|
+
var Xe = {
|
|
204
204
|
deg: 1,
|
|
205
205
|
grad: .9,
|
|
206
206
|
rad: 180 / Math.PI,
|
|
207
207
|
turn: 360
|
|
208
|
-
},
|
|
208
|
+
}, Ze = {
|
|
209
209
|
ms: 1,
|
|
210
210
|
s: 1e3
|
|
211
|
-
},
|
|
211
|
+
}, Qe = {
|
|
212
212
|
dpi: 1,
|
|
213
213
|
dpcm: 2.54,
|
|
214
214
|
dppx: 96
|
|
215
|
-
},
|
|
215
|
+
}, $e = new Set(/* @__PURE__ */ "px.cm.mm.Q.in.pc.pt.em.ex.ch.cap.ic.rem.lh.rlh.vw.vh.vmin.vmax.vb.vi.svw.svh.svi.svb.svmin.svmax.lvw.lvh.lvi.lvb.lvmin.lvmax.dvw.dvh.dvi.dvb.dvmin.dvmax.cqw.cqh.cqi.cqb.cqmin.cqmax.%".split(".")), et = new Set([
|
|
216
216
|
"em",
|
|
217
217
|
"rem",
|
|
218
218
|
"ex",
|
|
@@ -221,16 +221,16 @@ var Qe = {
|
|
|
221
221
|
"ic",
|
|
222
222
|
"lh",
|
|
223
223
|
"rlh"
|
|
224
|
-
]),
|
|
225
|
-
let t =
|
|
224
|
+
]), tt = (e) => e.kind === "scalar" ? e.payload : void 0, nt = (e) => {
|
|
225
|
+
let t = tt(e);
|
|
226
226
|
return t?.type === "number" ? t : void 0;
|
|
227
|
-
},
|
|
228
|
-
let t =
|
|
227
|
+
}, rt = (e) => {
|
|
228
|
+
let t = tt(e);
|
|
229
229
|
return t?.type === "color" ? t.value : void 0;
|
|
230
|
-
},
|
|
230
|
+
}, it = (e) => e.kind === "call" && (e.name === "var" || e.name === "calc"), at = (e, t) => it(e) || it(t) || e.kind === "call" && t.kind === "call" && e.name !== t.name || e.kind !== t.kind && (e.kind === "call" || t.kind === "call"), ot = (e, t) => {
|
|
231
231
|
let n = e.unit, r = t.unit;
|
|
232
|
-
return e.value === 0 && n === "" && r !== "" && (n = r), t.value === 0 && r === "" && n !== "" && (r = n), n === r ||
|
|
233
|
-
},
|
|
232
|
+
return e.value === 0 && n === "" && r !== "" && (n = r), t.value === 0 && r === "" && n !== "" && (r = n), n === r || !$e.has(n) || !$e.has(r) ? !1 : T(n) || T(r) || et.has(n) || et.has(r);
|
|
233
|
+
}, st = (e, t, n) => ({
|
|
234
234
|
kind: "computed",
|
|
235
235
|
from: e,
|
|
236
236
|
to: t,
|
|
@@ -239,38 +239,38 @@ var Qe = {
|
|
|
239
239
|
property: n.property,
|
|
240
240
|
cache: void 0,
|
|
241
241
|
...n.target === void 0 ? {} : { target: n.target }
|
|
242
|
-
}),
|
|
242
|
+
}), ct = (e, t, n) => {
|
|
243
243
|
let r = e.unit, i = t.unit;
|
|
244
244
|
if (e.value === 0 && r === "" && i !== "" && (r = i), t.value === 0 && i === "" && r !== "" && (i = r), r === i) return [
|
|
245
245
|
e.value,
|
|
246
246
|
t.value,
|
|
247
247
|
r
|
|
248
248
|
];
|
|
249
|
-
let a =
|
|
249
|
+
let a = Xe[r], o = Xe[i];
|
|
250
250
|
if (a !== void 0 && o !== void 0) return [
|
|
251
251
|
e.value * a,
|
|
252
252
|
t.value * o,
|
|
253
253
|
"deg"
|
|
254
254
|
];
|
|
255
|
-
let s =
|
|
255
|
+
let s = Ze[r], c = Ze[i];
|
|
256
256
|
if (s !== void 0 && c !== void 0) return [
|
|
257
257
|
e.value * s,
|
|
258
258
|
t.value * c,
|
|
259
259
|
"ms"
|
|
260
260
|
];
|
|
261
|
-
let l =
|
|
261
|
+
let l = Qe[r], u = Qe[i];
|
|
262
262
|
if (l !== void 0 && u !== void 0) return [
|
|
263
263
|
e.value * l,
|
|
264
264
|
t.value * u,
|
|
265
265
|
"dpi"
|
|
266
266
|
];
|
|
267
|
-
if (
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
if ($e.has(r) && $e.has(i)) return [
|
|
268
|
+
We(e.value, r, n.target, n.property),
|
|
269
|
+
We(t.value, i, n.target, n.property),
|
|
270
270
|
"px"
|
|
271
271
|
];
|
|
272
272
|
throw TypeError(`Cannot interpolate incompatible CSS units "${r}" and "${i}" for "${n.property}".`);
|
|
273
|
-
},
|
|
273
|
+
}, lt = (e, t, n, r) => ct({
|
|
274
274
|
type: "number",
|
|
275
275
|
value: e.value,
|
|
276
276
|
unit: e.unit
|
|
@@ -283,14 +283,14 @@ var Qe = {
|
|
|
283
283
|
target: n,
|
|
284
284
|
property: r
|
|
285
285
|
});
|
|
286
|
-
function
|
|
287
|
-
let r =
|
|
286
|
+
function ut(e, t, n) {
|
|
287
|
+
let r = nt(e), i = nt(t);
|
|
288
288
|
if (r !== void 0 && i !== void 0) {
|
|
289
|
-
if (
|
|
289
|
+
if (ot(r, i)) {
|
|
290
290
|
if (r.unit === "%" || i.unit === "%") throw TypeError(`Cannot interpolate mixed percentage lengths for "${n.property}" without a property-specific percentage basis.`);
|
|
291
|
-
return
|
|
291
|
+
return st(e, t, n);
|
|
292
292
|
}
|
|
293
|
-
let [a, o, s] =
|
|
293
|
+
let [a, o, s] = ct(r, i, n);
|
|
294
294
|
return {
|
|
295
295
|
kind: "number",
|
|
296
296
|
from: a,
|
|
@@ -299,7 +299,7 @@ function dt(e, t, n) {
|
|
|
299
299
|
unit: s
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
let a =
|
|
302
|
+
let a = rt(e), o = rt(t);
|
|
303
303
|
if (a !== void 0 && o !== void 0) {
|
|
304
304
|
let e = {
|
|
305
305
|
kind: "color",
|
|
@@ -310,7 +310,7 @@ function dt(e, t, n) {
|
|
|
310
310
|
};
|
|
311
311
|
return n.hueMethod !== void 0 && (e.hue = n.hueMethod), e;
|
|
312
312
|
}
|
|
313
|
-
if (
|
|
313
|
+
if (at(e, t)) return st(e, t, n);
|
|
314
314
|
if (e.kind !== t.kind) throw TypeError(`Cannot interpolate unlike CSS value kinds "${e.kind}" and "${t.kind}" for "${n.property}".`);
|
|
315
315
|
return {
|
|
316
316
|
kind: "discrete",
|
|
@@ -319,13 +319,13 @@ function dt(e, t, n) {
|
|
|
319
319
|
current: e
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function dt(e, t, n) {
|
|
323
323
|
switch (e.kind) {
|
|
324
324
|
case "number":
|
|
325
|
-
e.current =
|
|
325
|
+
e.current = w(e.from, e.to, t);
|
|
326
326
|
return;
|
|
327
327
|
case "color": {
|
|
328
|
-
let n =
|
|
328
|
+
let n = Ee(e.from, e.to, t, {
|
|
329
329
|
space: e.space,
|
|
330
330
|
...e.hue === void 0 ? {} : { hue: e.hue }
|
|
331
331
|
});
|
|
@@ -334,12 +334,12 @@ function ft(e, t, n) {
|
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
336
|
case "computed": {
|
|
337
|
-
n !== void 0 &&
|
|
337
|
+
n !== void 0 && O(e, n);
|
|
338
338
|
let r = e.target;
|
|
339
339
|
if (r === void 0) throw TypeError(`Computed CSS interpolation for "${e.property}" requires a browser target at sample time.`);
|
|
340
|
-
let i =
|
|
340
|
+
let i = Be(), a = e.cache;
|
|
341
341
|
if (a === void 0 || a.epoch !== i || a.target !== r) {
|
|
342
|
-
let [t, n, o] =
|
|
342
|
+
let [t, n, o] = lt(Ye(e.from, r, e.property), Ye(e.to, r, e.property), r, e.property);
|
|
343
343
|
a = Object.freeze({
|
|
344
344
|
epoch: i,
|
|
345
345
|
target: r,
|
|
@@ -348,20 +348,20 @@ function ft(e, t, n) {
|
|
|
348
348
|
unit: o
|
|
349
349
|
}), e.cache = a;
|
|
350
350
|
}
|
|
351
|
-
e.current =
|
|
351
|
+
e.current = w(a.from, a.to, t), e.unit = a.unit;
|
|
352
352
|
return;
|
|
353
353
|
}
|
|
354
354
|
case "discrete": e.current = t < .5 ? e.from : e.to;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function O(e, t) {
|
|
358
358
|
e.kind !== "computed" || e.target === t || (t === void 0 ? delete e.target : e.target = t, e.cache = void 0);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function ft(e) {
|
|
361
361
|
switch (e.kind) {
|
|
362
362
|
case "number": return `${e.current}${e.unit}`;
|
|
363
363
|
case "color": {
|
|
364
|
-
let t =
|
|
364
|
+
let t = ke(e.current);
|
|
365
365
|
if (!t.ok) throw TypeError(`Color serialization failed: ${t.error.code}.`);
|
|
366
366
|
return t.value;
|
|
367
367
|
}
|
|
@@ -371,46 +371,46 @@ function pt(e) {
|
|
|
371
371
|
}
|
|
372
372
|
//#endregion
|
|
373
373
|
//#region src/animation/internal/helpers.ts
|
|
374
|
-
var
|
|
375
|
-
function
|
|
374
|
+
var k = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
375
|
+
function pt(e, t, n) {
|
|
376
376
|
for (let r = e - 1; r >= 0; r--) if (n(t[r])) return r;
|
|
377
377
|
}
|
|
378
378
|
//#endregion
|
|
379
379
|
//#region src/animation/compile/value/compile.ts
|
|
380
|
-
var
|
|
380
|
+
var mt = (e) => {
|
|
381
381
|
if (typeof e != "object" || !e) return !1;
|
|
382
382
|
let t = e.kind;
|
|
383
383
|
return t === "scalar" || t === "call" || t === "list";
|
|
384
|
-
},
|
|
384
|
+
}, ht = (e) => ({
|
|
385
385
|
kind: "scalar",
|
|
386
386
|
payload: {
|
|
387
387
|
type: "number",
|
|
388
388
|
value: e,
|
|
389
389
|
unit: ""
|
|
390
390
|
}
|
|
391
|
-
}),
|
|
392
|
-
if (
|
|
393
|
-
if (typeof e == "number") return
|
|
394
|
-
if (typeof e == "string") return
|
|
391
|
+
}), gt = (e, t) => {
|
|
392
|
+
if (mt(e)) return e;
|
|
393
|
+
if (typeof e == "number") return ht(e);
|
|
394
|
+
if (typeof e == "string") return C(se(e), ([e]) => /* @__PURE__ */ TypeError(`Invalid CSS value for "${t}" at ${e.start}-${e.end}: expected ${e.expected.join(" or ")}.`));
|
|
395
395
|
if (Array.isArray(e)) return {
|
|
396
396
|
kind: "list",
|
|
397
397
|
separator: "space",
|
|
398
|
-
items: e.map((e) =>
|
|
398
|
+
items: e.map((e) => gt(e, t))
|
|
399
399
|
};
|
|
400
400
|
throw TypeError(`Unsupported authored value for "${t}".`);
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function _t(e) {
|
|
403
403
|
let t = {}, n = (e, r) => {
|
|
404
|
-
if (typeof e == "object" && e && !Array.isArray(e) && !
|
|
404
|
+
if (typeof e == "object" && e && !Array.isArray(e) && !mt(e)) {
|
|
405
405
|
for (let [t, i] of Object.entries(e)) n(i, r === "" ? t : `${r}.${t}`);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
408
|
if (r === "") throw TypeError("An animation value requires a property name.");
|
|
409
|
-
t[r] =
|
|
409
|
+
t[r] = gt(e, r);
|
|
410
410
|
};
|
|
411
411
|
return n(e, ""), t;
|
|
412
412
|
}
|
|
413
|
-
var
|
|
413
|
+
var vt = {
|
|
414
414
|
brightness: {
|
|
415
415
|
value: 1,
|
|
416
416
|
unit: ""
|
|
@@ -515,8 +515,8 @@ var bt = {
|
|
|
515
515
|
value: 0,
|
|
516
516
|
unit: "deg"
|
|
517
517
|
}
|
|
518
|
-
},
|
|
519
|
-
let t =
|
|
518
|
+
}, yt = (e) => {
|
|
519
|
+
let t = vt[e.name];
|
|
520
520
|
if (t === void 0) throw TypeError(`No interpolation identity is defined for CSS function "${e.name}".`);
|
|
521
521
|
return {
|
|
522
522
|
kind: "call",
|
|
@@ -530,29 +530,29 @@ var bt = {
|
|
|
530
530
|
}
|
|
531
531
|
}))
|
|
532
532
|
};
|
|
533
|
-
},
|
|
533
|
+
}, bt = (e) => e.every((e) => e.kind === "call") ? new Set(e.map((e) => e.name)).size === e.length : !1, xt = (e, t) => {
|
|
534
534
|
let n = [...e.map((e) => e.name)];
|
|
535
535
|
for (let e of t) n.includes(e.name) || n.push(e.name);
|
|
536
536
|
let r = new Map(e.map((e) => [e.name, e])), i = new Map(t.map((e) => [e.name, e]));
|
|
537
|
-
return [n.map((e) => r.get(e) ??
|
|
538
|
-
},
|
|
537
|
+
return [n.map((e) => r.get(e) ?? yt(i.get(e))), n.map((e) => i.get(e) ?? yt(r.get(e)))];
|
|
538
|
+
}, St = (e) => e.kind === "call" && (e.name === "var" || e.name === "calc"), Ct = (e) => e.kind === "list" && e.items.length === 1 ? e.items[0] : void 0, A = (e, t) => t.kind === "list" ? {
|
|
539
539
|
kind: "list",
|
|
540
540
|
separator: t.separator,
|
|
541
541
|
items: t.items.map((t) => A(e, t))
|
|
542
542
|
} : e;
|
|
543
|
-
function
|
|
543
|
+
function wt(e, t, n) {
|
|
544
544
|
let r = [], i = (e, t) => {
|
|
545
|
-
let a = e, o = t, s =
|
|
546
|
-
if (s !== void 0 && o.kind !== "list" ? a = s : c !== void 0 && a.kind !== "list" ? o = c : a.kind === "scalar" && o.kind === "list" ? a = A(a, o) : o.kind === "scalar" && a.kind === "list" ? o = A(o, a) : !l && a.kind === "list" && s !== void 0 && o.kind === "list" && (a.separator !== o.separator || a.items.length !== o.items.length) ? a = A(s, o) : !l && o.kind === "list" && c !== void 0 && a.kind === "list" && (o.separator !== a.separator || o.items.length !== a.items.length) && (o = A(c, a)),
|
|
545
|
+
let a = e, o = t, s = Ct(a), c = Ct(o), l = a.kind === "list" && o.kind === "list" && bt(a.items) && bt(o.items);
|
|
546
|
+
if (s !== void 0 && o.kind !== "list" ? a = s : c !== void 0 && a.kind !== "list" ? o = c : a.kind === "scalar" && o.kind === "list" ? a = A(a, o) : o.kind === "scalar" && a.kind === "list" ? o = A(o, a) : !l && a.kind === "list" && s !== void 0 && o.kind === "list" && (a.separator !== o.separator || a.items.length !== o.items.length) ? a = A(s, o) : !l && o.kind === "list" && c !== void 0 && a.kind === "list" && (o.separator !== a.separator || o.items.length !== a.items.length) && (o = A(c, a)), St(a) || St(o) || a.kind === "call" && o.kind === "call" && a.name !== o.name || a.kind !== o.kind && (a.kind === "call" || o.kind === "call")) {
|
|
547
547
|
let e = r.length;
|
|
548
|
-
return r.push(
|
|
548
|
+
return r.push(ut(a, o, n)), {
|
|
549
549
|
kind: "slot",
|
|
550
550
|
index: e
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
if (a.kind === "scalar" && o.kind === "scalar") {
|
|
554
554
|
let e = r.length;
|
|
555
|
-
return r.push(
|
|
555
|
+
return r.push(ut(a, o, n)), {
|
|
556
556
|
kind: "slot",
|
|
557
557
|
index: e
|
|
558
558
|
};
|
|
@@ -569,7 +569,7 @@ function Tt(e, t, n) {
|
|
|
569
569
|
if (a.kind === "list" && o.kind === "list") {
|
|
570
570
|
if (a.separator !== o.separator) throw TypeError(`Cannot interpolate CSS lists with different separators for "${n.property}".`);
|
|
571
571
|
let e = a.items, t = o.items;
|
|
572
|
-
if (
|
|
572
|
+
if (bt(e) && bt(t)) [e, t] = xt(e, t);
|
|
573
573
|
else if (e.length !== t.length) throw TypeError(`Cannot interpolate CSS lists with different lengths for "${n.property}".`);
|
|
574
574
|
return {
|
|
575
575
|
kind: "list",
|
|
@@ -584,17 +584,17 @@ function Tt(e, t, n) {
|
|
|
584
584
|
slots: r
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
|
-
var
|
|
588
|
-
function
|
|
587
|
+
var Tt = (e) => e === "comma" ? ", " : e === "slash" ? " / " : " ";
|
|
588
|
+
function Et(e) {
|
|
589
589
|
let t = (n) => {
|
|
590
|
-
if (n.kind === "slot") return
|
|
591
|
-
if (n.kind === "list") return n.items.map(t).join(
|
|
590
|
+
if (n.kind === "slot") return ft(e.slots[n.index]);
|
|
591
|
+
if (n.kind === "list") return n.items.map(t).join(Tt(n.separator));
|
|
592
592
|
let r = n.name === "calc" ? " " : ", ";
|
|
593
593
|
return `${n.name}(${n.args.map(t).join(r)})`;
|
|
594
594
|
};
|
|
595
595
|
return t(e.template);
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function Dt(e, t) {
|
|
598
598
|
for (let n of t) for (let [t, r] of Object.entries(e)) {
|
|
599
599
|
if (r === void 0) {
|
|
600
600
|
n.style.removeProperty(t);
|
|
@@ -605,7 +605,7 @@ function Ot(e, t) {
|
|
|
605
605
|
}
|
|
606
606
|
//#endregion
|
|
607
607
|
//#region src/animation/compile/value/sink.ts
|
|
608
|
-
var
|
|
608
|
+
var Ot = (e) => e.template.kind === "slot" && e.slots.length === 1 && e.slots[0]?.kind === "number" && e.slots[0].unit === "", kt = (e, t) => {
|
|
609
609
|
let n = t.split("."), r = e;
|
|
610
610
|
for (let e = 0; e < n.length - 1; e++) {
|
|
611
611
|
let t = n[e], i = r[t];
|
|
@@ -616,10 +616,10 @@ var kt = (e) => e.template.kind === "slot" && e.slots.length === 1 && e.slots[0]
|
|
|
616
616
|
leaf: n.at(-1)
|
|
617
617
|
};
|
|
618
618
|
};
|
|
619
|
-
function
|
|
619
|
+
function At(e) {
|
|
620
620
|
let t = {}, n = {}, r = [];
|
|
621
621
|
for (let [i, a] of Object.entries(e)) {
|
|
622
|
-
let { parent: e, leaf: o } =
|
|
622
|
+
let { parent: e, leaf: o } = kt(t, i), s = Ot(a), c = s ? a.slots[0].current : Et(a);
|
|
623
623
|
e[o] = c, n[i] = c, r.push({
|
|
624
624
|
key: i,
|
|
625
625
|
parent: e,
|
|
@@ -634,13 +634,13 @@ function jt(e) {
|
|
|
634
634
|
writers: r
|
|
635
635
|
};
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function jt(e) {
|
|
638
638
|
let t = {};
|
|
639
639
|
return {
|
|
640
640
|
root: t,
|
|
641
641
|
flat: e,
|
|
642
642
|
writers: Object.keys(e).map((n) => {
|
|
643
|
-
let { parent: r, leaf: i } =
|
|
643
|
+
let { parent: r, leaf: i } = kt(t, n);
|
|
644
644
|
return r[i] = e[n], {
|
|
645
645
|
key: n,
|
|
646
646
|
parent: r,
|
|
@@ -649,12 +649,12 @@ function Mt(e) {
|
|
|
649
649
|
})
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function Mt(e) {
|
|
653
653
|
for (let t of e.writers) t.parent[t.leaf] = e.flat[t.key];
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Nt(e) {
|
|
656
656
|
for (let t of e.writers) {
|
|
657
|
-
let n = t.numeric ? t.value.slots[0].current :
|
|
657
|
+
let n = t.numeric ? t.value.slots[0].current : Et(t.value);
|
|
658
658
|
t.parent[t.leaf] = n, e.flat[t.key] = n;
|
|
659
659
|
}
|
|
660
660
|
}
|
|
@@ -677,17 +677,17 @@ var j = {
|
|
|
677
677
|
start: .75,
|
|
678
678
|
end: 1
|
|
679
679
|
}
|
|
680
|
-
},
|
|
681
|
-
function
|
|
682
|
-
return
|
|
680
|
+
}, Pt = 1e6;
|
|
681
|
+
function Ft(e) {
|
|
682
|
+
return C(oe(e), (t) => new n("start", e, `invalid keyframe selector — ${t.map(_e).join("; ")}`, e.trim() === "" ? "EMPTY_PARSE" : void 0));
|
|
683
683
|
}
|
|
684
|
-
var
|
|
684
|
+
var It = (e) => {
|
|
685
685
|
if (e.kind !== "named") throw new n("start", e, "named phase resolution requires a parsed named keyframe selector", "NAMED_SELECTOR_NO_TIMELINE");
|
|
686
686
|
let t = j[e.name];
|
|
687
687
|
if (t === void 0) throw new n("start", e, `no timeline phase is defined for ${JSON.stringify(e.name)}`, "NAMED_SELECTOR_NO_TIMELINE");
|
|
688
688
|
let r = e.offset ?? 0;
|
|
689
689
|
return t.start + r * (t.end - t.start);
|
|
690
|
-
},
|
|
690
|
+
}, Lt = (e) => {
|
|
691
691
|
let t = [], n = [];
|
|
692
692
|
for (let r of e) r.kind === "number" ? t.push(r) : n.push(r);
|
|
693
693
|
let r = new Float64Array(t.length), i = new Float64Array(t.length);
|
|
@@ -699,7 +699,7 @@ var Lt = (e) => {
|
|
|
699
699
|
to: i,
|
|
700
700
|
out: new Float64Array(t.length)
|
|
701
701
|
};
|
|
702
|
-
},
|
|
702
|
+
}, Rt = (e, r) => {
|
|
703
703
|
if (typeof r == "function") return { fn: r };
|
|
704
704
|
if (typeof r == "object") {
|
|
705
705
|
if (typeof r.fn == "function") return r;
|
|
@@ -708,7 +708,7 @@ var Lt = (e) => {
|
|
|
708
708
|
if (typeof r != "string") throw new n(e, r, "a timing-function name or CSS timing-function literal must be a string");
|
|
709
709
|
let i;
|
|
710
710
|
try {
|
|
711
|
-
i =
|
|
711
|
+
i = ge(r);
|
|
712
712
|
} catch {
|
|
713
713
|
throw new n(e, r, "unknown timing function — pass a callable TimingFunction, a typed Easing, a registry name, or a cubic-bezier() literal", "UNKNOWN_TIMING_FN");
|
|
714
714
|
}
|
|
@@ -720,14 +720,14 @@ var Lt = (e) => {
|
|
|
720
720
|
};
|
|
721
721
|
//#endregion
|
|
722
722
|
//#region src/animation/compile/frame/compiler.ts
|
|
723
|
-
function
|
|
723
|
+
function zt(e, t, n) {
|
|
724
724
|
let [r, i] = [e.start, t.start];
|
|
725
725
|
return {
|
|
726
726
|
start: r.kind === "percent" ? r.value * n : NaN,
|
|
727
727
|
stop: i.kind === "percent" ? i.value * n : NaN
|
|
728
728
|
};
|
|
729
729
|
}
|
|
730
|
-
var
|
|
730
|
+
var Bt = class {
|
|
731
731
|
_options;
|
|
732
732
|
templateFrames = [];
|
|
733
733
|
parsedVars = [];
|
|
@@ -745,12 +745,12 @@ var Vt = class {
|
|
|
745
745
|
}
|
|
746
746
|
addFrame(e, t, n, r, i) {
|
|
747
747
|
typeof e == "number" && (e = `${e}%`);
|
|
748
|
-
let a = typeof e == "string" ?
|
|
748
|
+
let a = typeof e == "string" ? Ft(e) : e, o = {
|
|
749
749
|
id: this.frameId,
|
|
750
750
|
start: a,
|
|
751
751
|
vars: t,
|
|
752
752
|
transform: n,
|
|
753
|
-
timingFunction: r == null ? this.options.timingFunction :
|
|
753
|
+
timingFunction: r == null ? this.options.timingFunction : Rt("timingFunction", r),
|
|
754
754
|
composition: i
|
|
755
755
|
};
|
|
756
756
|
this.templateFrames.push(o), this.frameId += 1;
|
|
@@ -759,17 +759,17 @@ var Vt = class {
|
|
|
759
759
|
let n = this.templateFrames[e], r = this.templateFrames[t], i = {
|
|
760
760
|
start: e,
|
|
761
761
|
stop: t
|
|
762
|
-
}, a =
|
|
762
|
+
}, a = zt(n, r, this.options.duration), o = n.transform;
|
|
763
763
|
if (o == null) {
|
|
764
|
-
let t =
|
|
765
|
-
o = (t === void 0 ? void 0 : this.templateFrames[t].transform) ??
|
|
764
|
+
let t = pt(e, this.templateFrames, (e) => e.transform != null);
|
|
765
|
+
o = (t === void 0 ? void 0 : this.templateFrames[t].transform) ?? E;
|
|
766
766
|
}
|
|
767
767
|
let s = n.timingFunction;
|
|
768
768
|
if (s == null) {
|
|
769
|
-
let t =
|
|
769
|
+
let t = pt(e, this.templateFrames, (e) => e.timingFunction != null);
|
|
770
770
|
s = (t === void 0 ? void 0 : this.templateFrames[t].timingFunction) ?? this.options.timingFunction;
|
|
771
771
|
}
|
|
772
|
-
let c = e *
|
|
772
|
+
let c = e * Pt + t, l = r.composition;
|
|
773
773
|
return {
|
|
774
774
|
id: c,
|
|
775
775
|
ixs: i,
|
|
@@ -806,14 +806,14 @@ var Vt = class {
|
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
parse(e) {
|
|
809
|
-
this._frames = [], this._targets = e, this.templateFrames.sort((e, t) => e.start.kind === "percent" && t.start.kind === "percent" ? e.start.value - t.start.value : 0), this.parsedVars = this.templateFrames.map((e) =>
|
|
809
|
+
this._frames = [], this._targets = e, this.templateFrames.sort((e, t) => e.start.kind === "percent" && t.start.kind === "percent" ? e.start.value - t.start.value : 0), this.parsedVars = this.templateFrames.map((e) => _t(e.vars));
|
|
810
810
|
for (let e = 0; e < this.templateFrames.length - 1; e++) this._frames.push(this.createFrame(e, e + 1));
|
|
811
811
|
let t = this.buildVarIndex();
|
|
812
812
|
this._frames.forEach((e, n) => this.reconcileVars(n, t)), this._frames.sort((e, t) => e.time.start === t.time.start ? e.time.stop - t.time.stop : e.time.start - t.time.start), this._frames = this._frames.filter((e) => e.interpVars != null && Object.keys(e.interpVars).length > 0), this._frames.forEach((e) => this.finalizeFrameVars(e));
|
|
813
813
|
}
|
|
814
814
|
finalizeFrameVars(e) {
|
|
815
|
-
let t =
|
|
816
|
-
e._sink = t, e.flatVars = t.flat, e.vars = t.root, e.allInterpVars = Object.values(e.interpVars).flatMap((e) => e.slots), e._numericPlan =
|
|
815
|
+
let t = At(e.interpVars);
|
|
816
|
+
e._sink = t, e.flatVars = t.flat, e.vars = t.root, e.allInterpVars = Object.values(e.interpVars).flatMap((e) => e.slots), e._numericPlan = Lt(e.allInterpVars);
|
|
817
817
|
}
|
|
818
818
|
renormalizeColors() {
|
|
819
819
|
for (let e of this._frames) {
|
|
@@ -822,32 +822,32 @@ var Vt = class {
|
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
compileValue(e, t, n) {
|
|
825
|
-
return
|
|
825
|
+
return wt(t, n, {
|
|
826
826
|
colorSpace: this.options.colorSpace,
|
|
827
827
|
property: e,
|
|
828
828
|
...this.options.hueMethod === void 0 ? {} : { hueMethod: this.options.hueMethod },
|
|
829
829
|
...this._targets[0] === void 0 ? {} : { target: this._targets[0] }
|
|
830
830
|
});
|
|
831
831
|
}
|
|
832
|
-
},
|
|
833
|
-
let t =
|
|
832
|
+
}, Vt = /* @__PURE__ */ new WeakMap(), M = (e) => {
|
|
833
|
+
let t = Vt.get(e);
|
|
834
834
|
if (t === void 0) throw TypeError("Animation compiler state is not initialized.");
|
|
835
835
|
return t;
|
|
836
|
-
},
|
|
837
|
-
|
|
836
|
+
}, Ht = (e, t) => {
|
|
837
|
+
Vt.set(e, t);
|
|
838
838
|
};
|
|
839
839
|
//#endregion
|
|
840
840
|
//#region src/animation/engine/play-lifecycle/events.ts
|
|
841
|
-
function
|
|
841
|
+
function Ut(e, t) {
|
|
842
842
|
if (!(typeof AnimationEvent > "u")) for (let n of e.targets) typeof n?.dispatchEvent == "function" && n.dispatchEvent(new AnimationEvent(t, {
|
|
843
843
|
animationName: e.name ?? "",
|
|
844
844
|
elapsedTime: e._playback.t / 1e3
|
|
845
845
|
}));
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Wt(e, t) {
|
|
848
848
|
return e === "reverse" || e === "alternate-reverse" && t % 2 == 0 || e === "alternate" && t % 2 == 1;
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Gt(e) {
|
|
851
851
|
if (e._playback.startTime !== void 0) {
|
|
852
852
|
let t = e._playback.t, n = e.options.duration - 2 * t;
|
|
853
853
|
e._playback.startTime -= n;
|
|
@@ -856,36 +856,36 @@ function Kt(e) {
|
|
|
856
856
|
}
|
|
857
857
|
//#endregion
|
|
858
858
|
//#region src/animation/engine/play-lifecycle/transport.ts
|
|
859
|
-
function
|
|
859
|
+
function Kt(e) {
|
|
860
860
|
e._playback.started && (e._playback.paused = !0);
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function qt(e) {
|
|
863
863
|
if (e._playback.started && e._playback.paused) if (e._playback.paused = !1, e._playback._waAnimations.length > 0) for (let t of e._playback._waAnimations) t.play();
|
|
864
864
|
else e.playback.running || e.playback.loop(e._playback._boundFrame);
|
|
865
865
|
}
|
|
866
|
+
function Jt(e) {
|
|
867
|
+
s(e._playback, () => Kt(e), () => qt(e));
|
|
868
|
+
}
|
|
866
869
|
function Yt(e) {
|
|
867
|
-
|
|
870
|
+
en(e), e.playback.stop(), N(e), $t(e);
|
|
868
871
|
}
|
|
869
872
|
function Xt(e) {
|
|
870
|
-
tn(e), e.playback.stop(), N(e), en(e);
|
|
871
|
-
}
|
|
872
|
-
function Zt(e) {
|
|
873
873
|
return f(e._playback);
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function Zt(e) {
|
|
876
876
|
return e._playback.reversed ? e.options.duration - e._playback.t : e._playback.t;
|
|
877
877
|
}
|
|
878
878
|
function N(e) {
|
|
879
|
-
e._playback.done = !1, e._playback.started = !1, e._playback.paused = !1, e._playback.reversed = !1, e._playback.iteration = 0, e._playback.startTime = void 0, e._playback.carriedStartTime = void 0, e._playback.anchorTick = void 0, e._playback.pausedTime = 0, e._playback.t = 0;
|
|
879
|
+
e._playback.done = !1, e._playback.started = !1, e._playback.paused = !1, e._playback.reversed = !1, e._playback.iteration = 0, e._playback.startTime = void 0, e._playback.carriedStartTime = void 0, e._playback.anchorTick = void 0, e._playback.startOwed = !1, e._playback.pausedTime = 0, e._playback.t = 0;
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
|
|
881
|
+
function Qt(e) {
|
|
882
|
+
en(e), e._playback.started && e.frames.length > 0 && e.fillBackwards(), N(e);
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function $t(e) {
|
|
885
885
|
let t = e._playback.resolvePromise;
|
|
886
886
|
e._playback.resolvePromise = null, t?.();
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function en(e) {
|
|
889
889
|
let t = e._playback._waAnimations;
|
|
890
890
|
if (t.length !== 0) {
|
|
891
891
|
for (let e of t) try {
|
|
@@ -896,7 +896,7 @@ function tn(e) {
|
|
|
896
896
|
}
|
|
897
897
|
//#endregion
|
|
898
898
|
//#region src/animation/waapi/eligibility.ts
|
|
899
|
-
var
|
|
899
|
+
var tn = new Set([
|
|
900
900
|
"em",
|
|
901
901
|
"rem",
|
|
902
902
|
"ex",
|
|
@@ -905,10 +905,10 @@ var nn = new Set([
|
|
|
905
905
|
"ic",
|
|
906
906
|
"lh",
|
|
907
907
|
"rlh"
|
|
908
|
-
]),
|
|
908
|
+
]), nn = (e) => typeof e == "string" && (T(e) || tn.has(e)), rn = (e) => {
|
|
909
909
|
if (e.kind === "call") return e.name;
|
|
910
910
|
if (!(e.kind !== "scalar" || e.payload.type !== "number")) return e.payload.unit;
|
|
911
|
-
},
|
|
911
|
+
}, an = new Set(["offset-distance"]), on = (e) => an.has(e) || an.has(e.split(".").pop() ?? e), sn = () => typeof globalThis.webkitConvertPointFromNodeToPage == "function";
|
|
912
912
|
function P(e) {
|
|
913
913
|
if (!e.targets || e.targets.length === 0) return {
|
|
914
914
|
eligible: !1,
|
|
@@ -934,14 +934,14 @@ function P(e) {
|
|
|
934
934
|
eligible: !1,
|
|
935
935
|
reason: "easing has no faithful CSS twin (would run bare linear on the compositor)"
|
|
936
936
|
};
|
|
937
|
-
if (n?.css?.startsWith("linear(") &&
|
|
937
|
+
if (n?.css?.startsWith("linear(") && sn()) return {
|
|
938
938
|
eligible: !1,
|
|
939
939
|
reason: "WebKit refuses HW-accel for linear() easing — the spring twin stays on the rAF path (CE-1.0)"
|
|
940
940
|
};
|
|
941
941
|
for (let e of t) for (let [t, n] of Object.entries(e.interpVars)) {
|
|
942
|
-
let e =
|
|
942
|
+
let e = on(t);
|
|
943
943
|
for (let t of n.slots) {
|
|
944
|
-
let n = t.kind === "number" ? t.unit : t.kind === "computed" ?
|
|
944
|
+
let n = t.kind === "number" ? t.unit : t.kind === "computed" ? rn(t.from) : void 0, r = t.kind === "number" ? t.unit : t.kind === "computed" ? rn(t.to) : void 0, i = e && t.kind === "number" && n === "%", a = e && t.kind === "number" && r === "%", o = nn(n) && !i, s = nn(r) && !a;
|
|
945
945
|
if (o || s) return {
|
|
946
946
|
eligible: !1,
|
|
947
947
|
reason: `layout-dependent unit (${String(n ?? r)}) would freeze to px under WAAPI`
|
|
@@ -954,11 +954,11 @@ function P(e) {
|
|
|
954
954
|
}
|
|
955
955
|
return { eligible: !0 };
|
|
956
956
|
}
|
|
957
|
-
var
|
|
957
|
+
var cn = .005, ln = /^(steps\(|step-start$|step-end$)/, un = (e) => {
|
|
958
958
|
let t = /* @__PURE__ */ new Map(), n = e.frames;
|
|
959
959
|
for (let e of n) {
|
|
960
960
|
let n = e.timingFunction.css;
|
|
961
|
-
if (n !== void 0 &&
|
|
961
|
+
if (n !== void 0 && ln.test(n.trim())) return !1;
|
|
962
962
|
for (let [n, r] of Object.entries(e.interpVars)) {
|
|
963
963
|
if (r.slots.length === 0 || r.slots.some((e) => e.kind !== "number")) return !1;
|
|
964
964
|
let e = JSON.stringify(r.template), i = t.get(n);
|
|
@@ -977,10 +977,10 @@ var ln = .005, un = /^(steps\(|step-start$|step-end$)/, dn = (e) => {
|
|
|
977
977
|
i.kind === "number" && Number.isFinite(i.current) && n.set(`${e}\u0000${r}`, i.current);
|
|
978
978
|
}
|
|
979
979
|
return n;
|
|
980
|
-
},
|
|
980
|
+
}, dn = 64, fn = (e, t, n) => {
|
|
981
981
|
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = n - t;
|
|
982
|
-
for (let n = 0; n <=
|
|
983
|
-
let o = F(e, t + a * n /
|
|
982
|
+
for (let n = 0; n <= dn; n++) {
|
|
983
|
+
let o = F(e, t + a * n / dn);
|
|
984
984
|
for (let [e, t] of o) {
|
|
985
985
|
let n = r.get(e), a = i.get(e);
|
|
986
986
|
(n === void 0 || t < n) && r.set(e, t), (a === void 0 || t > a) && i.set(e, t);
|
|
@@ -989,7 +989,7 @@ var ln = .005, un = /^(steps\(|step-start$|step-end$)/, dn = (e) => {
|
|
|
989
989
|
let o = /* @__PURE__ */ new Map();
|
|
990
990
|
for (let [e, t] of r) o.set(e, (i.get(e) ?? t) - t);
|
|
991
991
|
return o;
|
|
992
|
-
},
|
|
992
|
+
}, pn = (e, t, n, r, i, a) => {
|
|
993
993
|
let o = r - t, s = 0;
|
|
994
994
|
for (let r of [.25, .75]) {
|
|
995
995
|
let c = F(e, t + o * r);
|
|
@@ -1004,21 +1004,21 @@ var ln = .005, un = /^(steps\(|step-start$|step-end$)/, dn = (e) => {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
return s;
|
|
1006
1006
|
};
|
|
1007
|
-
function
|
|
1007
|
+
function mn(e, t, n) {
|
|
1008
1008
|
let r = /* @__PURE__ */ new Set();
|
|
1009
1009
|
if (n <= 0) return r;
|
|
1010
1010
|
for (let n = 1; n < t.length; n++) {
|
|
1011
1011
|
let i = t[n - 1], a = t[n];
|
|
1012
1012
|
if (a - i <= 0) continue;
|
|
1013
|
-
let o =
|
|
1013
|
+
let o = fn(e, i, a), s = F(e, i), c = F(e, a), l = (t, n, r, i) => ({
|
|
1014
1014
|
a: t,
|
|
1015
1015
|
sampleA: n,
|
|
1016
1016
|
b: r,
|
|
1017
1017
|
sampleB: i,
|
|
1018
|
-
error:
|
|
1018
|
+
error: pn(e, t, n, r, i, o)
|
|
1019
1019
|
}), u = [l(i, s, a, c)], d = 16;
|
|
1020
1020
|
for (; d > 0;) {
|
|
1021
|
-
let t = -1, n =
|
|
1021
|
+
let t = -1, n = cn;
|
|
1022
1022
|
for (let e = 0; e < u.length; e++) u[e].error > n && (n = u[e].error, t = e);
|
|
1023
1023
|
if (t === -1) break;
|
|
1024
1024
|
let i = u[t], a = (i.a + i.b) / 2;
|
|
@@ -1034,13 +1034,13 @@ function hn(e, t, n) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
//#endregion
|
|
1036
1036
|
//#region src/animation/waapi/emission.ts
|
|
1037
|
-
function
|
|
1038
|
-
let t = e.options.duration, n = [], r = e.frames.length > 1, i = r &&
|
|
1037
|
+
function hn(e) {
|
|
1038
|
+
let t = e.options.duration, n = [], r = e.frames.length > 1, i = r && un(e), a = r && !i ? e.frames[0]?.timingFunction.css : void 0;
|
|
1039
1039
|
if (r && !i && a === void 0) throw TypeError("A multi-segment structural WAAPI animation requires a faithful CSS easing.");
|
|
1040
1040
|
let o = /* @__PURE__ */ new Set();
|
|
1041
1041
|
for (let t of e.frames) o.add(t.time.start), o.add(t.time.stop);
|
|
1042
1042
|
let s = [...o].sort((e, t) => e - t), c = new Set(s);
|
|
1043
|
-
if (i) for (let n of
|
|
1043
|
+
if (i) for (let n of mn(e, s, t)) c.add(n);
|
|
1044
1044
|
let l = s.at(-1);
|
|
1045
1045
|
for (let r of [...c].sort((e, t) => e - t)) {
|
|
1046
1046
|
let i = e.interpFrames(r, !1);
|
|
@@ -1055,32 +1055,32 @@ function gn(e) {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
//#endregion
|
|
1057
1057
|
//#region src/animation/waapi/options.ts
|
|
1058
|
-
var
|
|
1058
|
+
var gn = {
|
|
1059
1059
|
normal: "normal",
|
|
1060
1060
|
reverse: "reverse",
|
|
1061
1061
|
alternate: "alternate",
|
|
1062
1062
|
"alternate-reverse": "alternate-reverse"
|
|
1063
|
-
},
|
|
1063
|
+
}, _n = {
|
|
1064
1064
|
none: "none",
|
|
1065
1065
|
forwards: "forwards",
|
|
1066
1066
|
backwards: "backwards",
|
|
1067
1067
|
both: "both"
|
|
1068
|
-
},
|
|
1068
|
+
}, vn = {
|
|
1069
1069
|
replace: "replace",
|
|
1070
1070
|
add: "add",
|
|
1071
1071
|
accumulate: "accumulate"
|
|
1072
|
-
},
|
|
1072
|
+
}, yn = (e) => {
|
|
1073
1073
|
for (let t of e.frames) {
|
|
1074
1074
|
let e = t.composition;
|
|
1075
|
-
if (e != null && e !== "replace") return
|
|
1075
|
+
if (e != null && e !== "replace") return vn[e] ?? "replace";
|
|
1076
1076
|
}
|
|
1077
1077
|
return "replace";
|
|
1078
1078
|
};
|
|
1079
|
-
function
|
|
1080
|
-
let t = e.options, n =
|
|
1079
|
+
function bn(e) {
|
|
1080
|
+
let t = e.options, n = gn[t.direction], r = _n[t.fillMode];
|
|
1081
1081
|
if (n == null) throw TypeError(`Unrecognised animation direction "${t.direction}".`);
|
|
1082
1082
|
if (r == null) throw TypeError(`Unrecognised animation fill mode "${t.fillMode}".`);
|
|
1083
|
-
let i = e.frames[0]?.timingFunction ?? e.options.timingFunction, a = e.frames.length > 1 ? "linear" : i.css ?? "linear", o =
|
|
1083
|
+
let i = e.frames[0]?.timingFunction ?? e.options.timingFunction, a = e.frames.length > 1 ? "linear" : i.css ?? "linear", o = yn(e), s = {
|
|
1084
1084
|
duration: t.duration,
|
|
1085
1085
|
delay: t.delay,
|
|
1086
1086
|
iterations: t.iterationCount === Infinity ? Infinity : t.iterationCount,
|
|
@@ -1092,8 +1092,8 @@ function xn(e) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
//#endregion
|
|
1094
1094
|
//#region src/animation/waapi/delegation.ts
|
|
1095
|
-
async function
|
|
1096
|
-
let n =
|
|
1095
|
+
async function xn(e, t) {
|
|
1096
|
+
let n = hn(e), r = bn(e), i = e.targets.map((e) => e.animate(n, r));
|
|
1097
1097
|
e._playback._waAnimations = i;
|
|
1098
1098
|
let a = () => {
|
|
1099
1099
|
if (!e.paused) {
|
|
@@ -1105,12 +1105,7 @@ async function Sn(e, t) {
|
|
|
1105
1105
|
if (e.paused) for (let e of i) e.pause();
|
|
1106
1106
|
return !e.done;
|
|
1107
1107
|
};
|
|
1108
|
-
e.playback.loop((n) =>
|
|
1109
|
-
if (e.done) return !1;
|
|
1110
|
-
if (o(e.options.respectReducedMotion, () => !0, () => !1)) return t.snapToReducedMotion(), !1;
|
|
1111
|
-
let r = e.advanceTo(n);
|
|
1112
|
-
return r && typeof r.then == "function" ? r.then(a) : a();
|
|
1113
|
-
});
|
|
1108
|
+
e.playback.loop((n) => e.done ? !1 : o(e.options.respectReducedMotion, () => !0, () => !1) ? (t.snapToReducedMotion(), !1) : (e.advanceTo(n), a()));
|
|
1114
1109
|
try {
|
|
1115
1110
|
await Promise.all(i.map((e) => e.finished));
|
|
1116
1111
|
for (let t of i) try {
|
|
@@ -1120,7 +1115,7 @@ async function Sn(e, t) {
|
|
|
1120
1115
|
e.playback.stop(), e._playback._waAnimations = [];
|
|
1121
1116
|
}
|
|
1122
1117
|
}
|
|
1123
|
-
function
|
|
1118
|
+
function Sn(e, t, n) {
|
|
1124
1119
|
let r = n?.eligibility ?? P(e);
|
|
1125
1120
|
if (!r.eligible) return {
|
|
1126
1121
|
attached: !1,
|
|
@@ -1131,8 +1126,8 @@ function Cn(e, t, n) {
|
|
|
1131
1126
|
attached: !1,
|
|
1132
1127
|
reason: "native scroll/view timeline unavailable (feature absent)"
|
|
1133
1128
|
};
|
|
1134
|
-
let a =
|
|
1135
|
-
...
|
|
1129
|
+
let a = hn(e), o = {
|
|
1130
|
+
...bn(e),
|
|
1136
1131
|
timeline: i
|
|
1137
1132
|
}, s = e.targets.map((e) => e.animate(a, o));
|
|
1138
1133
|
return e._playback._waAnimations = s, {
|
|
@@ -1142,85 +1137,83 @@ function Cn(e, t, n) {
|
|
|
1142
1137
|
}
|
|
1143
1138
|
//#endregion
|
|
1144
1139
|
//#region src/animation/engine/play-lifecycle/strategies.ts
|
|
1145
|
-
function
|
|
1140
|
+
function Cn(e) {
|
|
1146
1141
|
return new Promise((t) => {
|
|
1147
1142
|
e._playback.resolvePromise = t, e.playback.loop(e._playback._boundFrame);
|
|
1148
1143
|
});
|
|
1149
1144
|
}
|
|
1150
|
-
async function
|
|
1151
|
-
await
|
|
1145
|
+
async function wn(e) {
|
|
1146
|
+
await xn(e, { snapToReducedMotion: () => En(e) }), N(e);
|
|
1152
1147
|
}
|
|
1153
|
-
async function
|
|
1148
|
+
async function Tn(e) {
|
|
1154
1149
|
e._playback.started = !0, e.dispatchAnimationEvent("animationstart"), e.fillForwards(), e._playback.iteration = 0, e._playback.done = !0, e.dispatchAnimationEvent("animationend"), N(e);
|
|
1155
1150
|
}
|
|
1156
|
-
function
|
|
1157
|
-
|
|
1151
|
+
function En(e) {
|
|
1152
|
+
en(e), e.fillForwards(), e._playback.iteration = 0, e._playback.done = !0, e.dispatchAnimationEvent("animationend"), N(e), $t(e);
|
|
1158
1153
|
}
|
|
1159
|
-
async function
|
|
1154
|
+
async function Dn(e) {
|
|
1160
1155
|
if (e.managed) throw Error("Animation.play() called on a managed animation — the AnimationGroup owns the rAF loop. Call group.play() instead.");
|
|
1161
|
-
return e.assertNoUnresolvedNamedSelector(), l(e._playback, () => o(e.options.respectReducedMotion, () => (e.waapiIneligibleReason = void 0,
|
|
1156
|
+
return e.assertNoUnresolvedNamedSelector(), l(e._playback, () => o(e.options.respectReducedMotion, () => (e.waapiIneligibleReason = void 0, Tn(e)), () => {
|
|
1162
1157
|
if (e.options.useWAAPI) {
|
|
1163
1158
|
let t = P(e);
|
|
1164
|
-
return t.eligible ? (e.waapiIneligibleReason = void 0,
|
|
1159
|
+
return t.eligible ? (e.waapiIneligibleReason = void 0, wn(e)) : (e.waapiIneligibleReason = t.reason, Cn(e));
|
|
1165
1160
|
}
|
|
1166
|
-
return e.waapiIneligibleReason = void 0,
|
|
1161
|
+
return e.waapiIneligibleReason = void 0, Cn(e);
|
|
1167
1162
|
}));
|
|
1168
1163
|
}
|
|
1169
1164
|
//#endregion
|
|
1170
1165
|
//#region src/animation/engine/play-lifecycle/frame.ts
|
|
1171
|
-
var
|
|
1172
|
-
function
|
|
1173
|
-
|
|
1174
|
-
e._playback.paused = !1, e._playback.started = !0;
|
|
1175
|
-
});
|
|
1176
|
-
e._playback.started = !0;
|
|
1166
|
+
var On = (e) => e.options.delay > 0 && e._playback.iteration === 0;
|
|
1167
|
+
function kn(e) {
|
|
1168
|
+
e._playback.reversed = !1, Wt(e.options.direction, e._playback.iteration) && Gt(e), (e.options.fillMode === "backwards" || e.options.fillMode === "both") && e.fillBackwards(), e._playback.started = !0;
|
|
1177
1169
|
}
|
|
1178
|
-
function
|
|
1170
|
+
function An(e) {
|
|
1179
1171
|
e.paintRest(), e._playback.startTime = void 0, e._playback.iteration >= e.options.iterationCount - 1 ? (e._playback.done = !0, e._playback.iteration = 0, e.dispatchAnimationEvent("animationend")) : (e._playback.iteration += 1, e.dispatchAnimationEvent("animationiteration"));
|
|
1180
1172
|
}
|
|
1181
|
-
function
|
|
1173
|
+
function jn(e, t) {
|
|
1182
1174
|
if (e._playback.startTime === void 0) {
|
|
1183
|
-
let n =
|
|
1184
|
-
return
|
|
1175
|
+
let n = On(e) ? e.options.delay : 0;
|
|
1176
|
+
return kn(e), Mn(e, t, n, !1);
|
|
1185
1177
|
}
|
|
1186
|
-
return
|
|
1178
|
+
return Pn(e, t, !1);
|
|
1187
1179
|
}
|
|
1188
|
-
function
|
|
1180
|
+
function Mn(e, t, n, r) {
|
|
1189
1181
|
let i = e._playback.carriedStartTime;
|
|
1190
|
-
return e._playback.carriedStartTime = void 0, e._playback.startTime = i ?? t + n, i === void 0 && (e._playback.pausedTime = 0), e._playback.anchorTick = i === void 0
|
|
1182
|
+
return e._playback.carriedStartTime = void 0, e._playback.startTime = i ?? t + n, i === void 0 && (e._playback.pausedTime = 0), e._playback.anchorTick = i === void 0 ? t : void 0, e._playback.startOwed = n > 0, e._playback.startOwed || e.dispatchAnimationEvent("animationstart"), Pn(e, t, r);
|
|
1191
1183
|
}
|
|
1192
|
-
function
|
|
1184
|
+
function Nn(e, t) {
|
|
1193
1185
|
let n = e._playback.anchorTick;
|
|
1194
1186
|
if (n === void 0 || t <= n) return;
|
|
1195
1187
|
e._playback.anchorTick = void 0;
|
|
1196
1188
|
let i = t - n - r;
|
|
1197
1189
|
i > 0 && !e._playback.paused && (e._playback.startTime += i);
|
|
1198
1190
|
}
|
|
1199
|
-
function
|
|
1191
|
+
function Pn(e, t, n) {
|
|
1200
1192
|
if (e._playback.paused && e._playback.pausedTime === 0) return e._playback.pausedTime = t, e._playback.t;
|
|
1201
1193
|
if (e._playback.pausedTime > 0 && !e._playback.paused) {
|
|
1202
1194
|
let n = t - e._playback.pausedTime;
|
|
1203
1195
|
e._playback.startTime += n, e._playback.pausedTime = 0;
|
|
1204
1196
|
}
|
|
1205
|
-
if (e._playback.t = t - e._playback.startTime, e._playback.
|
|
1197
|
+
if (e._playback.t = t - e._playback.startTime, e._playback.startOwed) {
|
|
1198
|
+
if (e._playback.t < 0) return e._playback.t;
|
|
1199
|
+
e._playback.startOwed = !1, e.dispatchAnimationEvent("animationstart");
|
|
1200
|
+
}
|
|
1201
|
+
if (e._playback.t >= e.options.duration && n) e._playback.t = e.options.duration;
|
|
1206
1202
|
else if (e._playback.t >= e.options.duration) {
|
|
1207
1203
|
let n = e._playback.startTime + e.options.duration;
|
|
1208
|
-
if (
|
|
1204
|
+
if (An(e), e._playback.t = e.options.duration, !e._playback.done) return e._playback.carriedStartTime = n, kn(e), Mn(e, t, 0, !0);
|
|
1209
1205
|
}
|
|
1210
1206
|
return e._playback.t;
|
|
1211
1207
|
}
|
|
1212
|
-
function
|
|
1213
|
-
|
|
1214
|
-
Pn(e, t);
|
|
1215
|
-
let n = e.advanceTo(t);
|
|
1216
|
-
return typeof n == "number" ? Ln(e, n) : n.then((t) => Ln(e, t));
|
|
1208
|
+
function Fn(e, t) {
|
|
1209
|
+
return o(e.options.respectReducedMotion, () => !0, () => !1) ? (En(e), !1) : (Nn(e, t), In(e, e.advanceTo(t)));
|
|
1217
1210
|
}
|
|
1218
|
-
function
|
|
1219
|
-
return e._playback.paused ? !1 : e._playback.done ? (N(e),
|
|
1211
|
+
function In(e, t) {
|
|
1212
|
+
return e._playback.paused ? !1 : e._playback.done ? (N(e), $t(e), !1) : (e.interpFrames(t, !0, e._playback._interpOut), !0);
|
|
1220
1213
|
}
|
|
1221
1214
|
//#endregion
|
|
1222
1215
|
//#region src/animation/engine/playback-state.ts
|
|
1223
|
-
var
|
|
1216
|
+
var Ln = class {
|
|
1224
1217
|
resolvePromise = null;
|
|
1225
1218
|
_playingPromise = null;
|
|
1226
1219
|
_waAnimations = [];
|
|
@@ -1229,6 +1222,7 @@ var Rn = class {
|
|
|
1229
1222
|
startTime = void 0;
|
|
1230
1223
|
carriedStartTime = void 0;
|
|
1231
1224
|
anchorTick = void 0;
|
|
1225
|
+
startOwed = !1;
|
|
1232
1226
|
pausedTime = 0;
|
|
1233
1227
|
t = 0;
|
|
1234
1228
|
iteration = 0;
|
|
@@ -1242,50 +1236,50 @@ var Rn = class {
|
|
|
1242
1236
|
};
|
|
1243
1237
|
//#endregion
|
|
1244
1238
|
//#region src/animation/engine/composition.ts
|
|
1245
|
-
function
|
|
1239
|
+
function Rn(e) {
|
|
1246
1240
|
for (let t of e) if (t.composition != null && t.composition !== "replace") return !0;
|
|
1247
1241
|
return !1;
|
|
1248
1242
|
}
|
|
1249
|
-
function
|
|
1243
|
+
function zn(e, t, n) {
|
|
1250
1244
|
e.clear(), t.clear(), n?.clear();
|
|
1251
1245
|
}
|
|
1252
|
-
function
|
|
1246
|
+
function Bn(e, t) {
|
|
1253
1247
|
let n = e.composition;
|
|
1254
1248
|
if (!(n == null || n === "replace")) for (let [r, i] of Object.entries(e.interpVars)) {
|
|
1255
1249
|
if (i.slots.length === 0) continue;
|
|
1256
1250
|
if (!i.slots.every((e) => e.kind === "number")) {
|
|
1257
|
-
|
|
1251
|
+
Wn(r, n, t);
|
|
1258
1252
|
continue;
|
|
1259
1253
|
}
|
|
1260
1254
|
let a = i.slots, o = t.compositionBase.get(r);
|
|
1261
|
-
o === void 0 && (o =
|
|
1255
|
+
o === void 0 && (o = Hn(t.target, r, a.length, t.compositionPose), t.compositionBase.set(r, o));
|
|
1262
1256
|
let s = n === "accumulate" ? t.iteration : 0;
|
|
1263
1257
|
for (let n = 0; n < a.length; n++) {
|
|
1264
1258
|
let i = a[n], c = o[n] ?? 0;
|
|
1265
|
-
s > 0 ? i.current = c + s * (
|
|
1259
|
+
s > 0 ? i.current = c + s * (Un(e, r, n, t.compositionBase) - c) + i.current : i.current = c + i.current;
|
|
1266
1260
|
}
|
|
1267
1261
|
}
|
|
1268
1262
|
}
|
|
1269
|
-
var
|
|
1270
|
-
function
|
|
1263
|
+
var Vn = (e) => e.kind === "call" ? e.args.flatMap(Vn) : e.kind === "list" ? e.items.flatMap(Vn) : e.payload.type === "number" ? [e.payload.value] : [];
|
|
1264
|
+
function Hn(e, t, n, r) {
|
|
1271
1265
|
let i = Array(n).fill(0);
|
|
1272
1266
|
if (e == null || e.style == null) return i;
|
|
1273
1267
|
let a = t.split(".").pop() ?? t, o = r?.get(a);
|
|
1274
1268
|
if (o !== void 0) return o.slice(0, n);
|
|
1275
1269
|
let s = e.style.getPropertyValue(a) || e.style[a] || "";
|
|
1276
1270
|
if (!s) return i;
|
|
1277
|
-
let c =
|
|
1271
|
+
let c = be(() => se(s), (e) => Vn(e), []);
|
|
1278
1272
|
for (let e = 0; e < n && e < c.length; e++) {
|
|
1279
1273
|
let t = c[e];
|
|
1280
1274
|
Number.isFinite(t) && (i[e] = t);
|
|
1281
1275
|
}
|
|
1282
1276
|
return r?.set(a, i.slice()), i;
|
|
1283
1277
|
}
|
|
1284
|
-
function
|
|
1278
|
+
function Un(e, t, n, r) {
|
|
1285
1279
|
let i = e.interpVars[t]?.slots[n];
|
|
1286
1280
|
return i?.kind === "number" ? i.to : r.get(t)?.[n] ?? 0;
|
|
1287
1281
|
}
|
|
1288
|
-
function
|
|
1282
|
+
function Wn(e, t, n) {
|
|
1289
1283
|
n.compositionFallbackSeen.has(e) || (n.compositionFallbackSeen.add(e), n.diagnostics.push({
|
|
1290
1284
|
code: "COMPOSITION_FALLBACK",
|
|
1291
1285
|
message: `animation-composition: ${t} on a non-numeric leaf "${e}" has no faithful numeric add — composited as \`replace\` (the lerped value), never a wrong sum`,
|
|
@@ -1294,67 +1288,70 @@ function Gn(e, t, n) {
|
|
|
1294
1288
|
}
|
|
1295
1289
|
//#endregion
|
|
1296
1290
|
//#region src/animation/engine/interpolate.ts
|
|
1297
|
-
function
|
|
1291
|
+
function Gn(e) {
|
|
1298
1292
|
return e.options.fillMode === "forwards" || e.options.fillMode === "both" ? "final" : "initial";
|
|
1299
1293
|
}
|
|
1300
|
-
function
|
|
1301
|
-
|
|
1294
|
+
function Kn(e) {
|
|
1295
|
+
Gn(e) === "final" ? I(e, e.options.duration, !0) : I(e, 0, !0);
|
|
1302
1296
|
}
|
|
1303
|
-
function
|
|
1297
|
+
function qn(e) {
|
|
1304
1298
|
let t = e.templateFrames.find((e) => e.start.kind === "named");
|
|
1305
1299
|
if (t != null) {
|
|
1306
1300
|
let e = t.start.kind === "named" ? `${t.start.name}${t.start.offset === void 0 ? "" : ` ${t.start.offset * 100}%`}` : "";
|
|
1307
1301
|
throw new n("start", e, `named scroll-range selector ("${e}") requires a ScrollTimeline or ManualTimeline — call bindTimeline(timeline) before play() to resolve the named phase to a numeric position`, "NAMED_SELECTOR_NO_TIMELINE");
|
|
1308
1302
|
}
|
|
1309
1303
|
}
|
|
1310
|
-
function
|
|
1311
|
-
|
|
1304
|
+
function Jn(e, t, n = !1) {
|
|
1305
|
+
qn(e);
|
|
1312
1306
|
let r = e._playback.reversed;
|
|
1313
1307
|
e._playback.reversed = !1;
|
|
1314
|
-
let i = I(e,
|
|
1308
|
+
let i = I(e, xe(t, 0, 1) * e.options.duration, n);
|
|
1315
1309
|
return e._playback.reversed = r, i;
|
|
1316
1310
|
}
|
|
1317
1311
|
function I(e, t, n = !1, r) {
|
|
1312
|
+
let i = t < 0;
|
|
1313
|
+
i && (t = 0);
|
|
1314
|
+
let a = e.options.fillMode === "backwards" || e.options.fillMode === "both";
|
|
1318
1315
|
t = e._playback.reversed ? e.options.duration - t : t;
|
|
1319
|
-
let
|
|
1320
|
-
if (
|
|
1321
|
-
let
|
|
1322
|
-
for (let e =
|
|
1323
|
-
let n =
|
|
1316
|
+
let o = e.frames, s = o.length, c = i && !a ? -1 : _(o, t, (e) => e.time.start, (e) => e.time.stop);
|
|
1317
|
+
if (c === -1) return r === void 0 ? {} : (Yn(e, r), r);
|
|
1318
|
+
let l = c, u = c;
|
|
1319
|
+
for (let e = c - 1; e >= 0; e--) {
|
|
1320
|
+
let n = o[e];
|
|
1324
1321
|
if (t < n.time.start || t > n.time.stop) break;
|
|
1325
|
-
|
|
1322
|
+
l = e;
|
|
1326
1323
|
}
|
|
1327
|
-
for (let e =
|
|
1328
|
-
let n =
|
|
1324
|
+
for (let e = c + 1; e < s; e++) {
|
|
1325
|
+
let n = o[e];
|
|
1329
1326
|
if (t < n.time.start || t > n.time.stop) break;
|
|
1330
|
-
|
|
1327
|
+
u = e;
|
|
1331
1328
|
}
|
|
1332
|
-
for (let r =
|
|
1333
|
-
if (
|
|
1334
|
-
let t =
|
|
1335
|
-
return r === void 0 ? t : (
|
|
1329
|
+
for (let r = l; r <= u; r++) Xn(e, o[r], t, n);
|
|
1330
|
+
if (l === u) {
|
|
1331
|
+
let t = o[c].flatVars;
|
|
1332
|
+
return r === void 0 ? t : (Yn(e, r), Object.assign(r, t), r);
|
|
1336
1333
|
}
|
|
1337
|
-
let
|
|
1338
|
-
r !== void 0 &&
|
|
1339
|
-
for (let e =
|
|
1340
|
-
return
|
|
1334
|
+
let d = r ?? {};
|
|
1335
|
+
r !== void 0 && Yn(e, r);
|
|
1336
|
+
for (let e = l; e <= u; e++) Object.assign(d, o[e].flatVars);
|
|
1337
|
+
return d;
|
|
1341
1338
|
}
|
|
1342
|
-
function
|
|
1339
|
+
function Yn(e, t) {
|
|
1343
1340
|
let n = e._stableKeys;
|
|
1344
1341
|
for (let e = 0; e < n.length; e++) t[n[e]] = void 0;
|
|
1345
1342
|
}
|
|
1346
|
-
function
|
|
1347
|
-
let { start: i, stop: a } = t.time, o = i === a ? 1 :
|
|
1343
|
+
function Xn(e, t, n, r) {
|
|
1344
|
+
let { start: i, stop: a } = t.time, o = i === a ? 1 : Ce(n, i, a, 0, 1), s = t.timingFunction.fn(o), c = e.targets[0], l = t._numericPlan;
|
|
1348
1345
|
if (l !== void 0 && l.numeric.length > 0) {
|
|
1349
1346
|
let { numeric: e, from: t, to: n, out: r } = l;
|
|
1350
|
-
|
|
1347
|
+
Se(t, n, s, r);
|
|
1351
1348
|
for (let t = 0; t < e.length; t++) e[t].current = r[t];
|
|
1352
|
-
for (let e of l.residual)
|
|
1353
|
-
} else for (let e of t.allInterpVars)
|
|
1354
|
-
r && e._hasComposition && t.composition != null &&
|
|
1349
|
+
for (let e of l.residual) O(e, c), dt(e, s);
|
|
1350
|
+
} else for (let e of t.allInterpVars) O(e, c), dt(e, s);
|
|
1351
|
+
r && e._hasComposition && t.composition != null && Zn(e, t), Nt(t._sink), r && (e.unflatten ? t.transform(t.vars, n) : t.transform(t.flatVars, n));
|
|
1355
1352
|
}
|
|
1356
|
-
function
|
|
1357
|
-
|
|
1353
|
+
function Zn(e, t) {
|
|
1354
|
+
Bn(t, {
|
|
1358
1355
|
iteration: e._playback.iteration,
|
|
1359
1356
|
target: e.targets[0],
|
|
1360
1357
|
compositionBase: e._compositionBase,
|
|
@@ -1365,8 +1362,8 @@ function Qn(e, t) {
|
|
|
1365
1362
|
}
|
|
1366
1363
|
//#endregion
|
|
1367
1364
|
//#region src/animation/engine/options.ts
|
|
1368
|
-
var
|
|
1369
|
-
let t =
|
|
1365
|
+
var Qn = (e) => {
|
|
1366
|
+
let t = ie(ue(e), void 0);
|
|
1370
1367
|
if (t?.payload.type !== "number") return;
|
|
1371
1368
|
let { value: n, unit: r } = t.payload;
|
|
1372
1369
|
if (Number.isFinite(n)) {
|
|
@@ -1374,125 +1371,125 @@ var $n = (e) => {
|
|
|
1374
1371
|
if (r === "s") return n * 1e3;
|
|
1375
1372
|
}
|
|
1376
1373
|
};
|
|
1377
|
-
function
|
|
1378
|
-
return e == null ?
|
|
1374
|
+
function $n(e) {
|
|
1375
|
+
return e == null ? D.timingFunction : Rt("timingFunction", e);
|
|
1379
1376
|
}
|
|
1380
|
-
function
|
|
1381
|
-
return t == null ?
|
|
1377
|
+
function er(t) {
|
|
1378
|
+
return t == null ? D.iterationCount : t === "infinite" || t === "∞" || t === "Infinity" || t === Infinity ? Infinity : e("iterationCount", t, (e) => {
|
|
1382
1379
|
let t = typeof e == "string" ? Number.parseFloat(e.trim()) : e;
|
|
1383
1380
|
return typeof t == "number" && !Number.isNaN(t) && t >= 0 ? t : void 0;
|
|
1384
1381
|
}, "expected a non-negative count, \"infinite\", or Infinity");
|
|
1385
1382
|
}
|
|
1386
|
-
function
|
|
1383
|
+
function tr(t) {
|
|
1387
1384
|
if (t != null) return e("duration", t, (e) => {
|
|
1388
|
-
let t = typeof e == "string" ?
|
|
1385
|
+
let t = typeof e == "string" ? Qn(e) : e;
|
|
1389
1386
|
return typeof t == "number" && isFinite(t) && t > 0 ? t : void 0;
|
|
1390
1387
|
}, "expected a positive duration in milliseconds or a CSS time string");
|
|
1391
1388
|
}
|
|
1392
|
-
function
|
|
1393
|
-
return t == null ?
|
|
1394
|
-
let t = typeof e == "string" ?
|
|
1389
|
+
function nr(t) {
|
|
1390
|
+
return t == null ? D.delay : e("delay", t, (e) => {
|
|
1391
|
+
let t = typeof e == "string" ? Qn(e) : e;
|
|
1395
1392
|
return typeof t == "number" && isFinite(t) ? t : void 0;
|
|
1396
1393
|
}, "expected a delay in milliseconds or a CSS time string");
|
|
1397
1394
|
}
|
|
1398
|
-
function
|
|
1399
|
-
if (e == null) return
|
|
1400
|
-
if (!
|
|
1395
|
+
function rr(e) {
|
|
1396
|
+
if (e == null) return D.direction;
|
|
1397
|
+
if (!Ne.includes(e)) throw new n("direction", e, `expected one of: ${Ne.join(", ")}`);
|
|
1401
1398
|
return e;
|
|
1402
1399
|
}
|
|
1403
|
-
function
|
|
1404
|
-
if (e == null) return
|
|
1405
|
-
if (!
|
|
1400
|
+
function ir(e) {
|
|
1401
|
+
if (e == null) return D.fillMode;
|
|
1402
|
+
if (!Pe.includes(e)) throw new n("fillMode", e, `expected one of: ${Pe.join(", ")}`);
|
|
1406
1403
|
return e;
|
|
1407
1404
|
}
|
|
1408
|
-
function
|
|
1409
|
-
if (t == null) return
|
|
1405
|
+
function ar(e, t) {
|
|
1406
|
+
if (t == null) return D[e];
|
|
1410
1407
|
if (typeof t != "boolean") throw new n(e, t, "expected a boolean");
|
|
1411
1408
|
return t;
|
|
1412
1409
|
}
|
|
1413
|
-
function
|
|
1414
|
-
if (e == null) return
|
|
1415
|
-
if (!
|
|
1410
|
+
function or(e) {
|
|
1411
|
+
if (e == null) return D.colorSpace;
|
|
1412
|
+
if (!Fe.includes(e)) throw new n("colorSpace", e, `expected one of: ${Fe.join(", ")}`);
|
|
1416
1413
|
return e;
|
|
1417
1414
|
}
|
|
1418
|
-
function
|
|
1415
|
+
function sr(e) {
|
|
1419
1416
|
if (e != null) {
|
|
1420
|
-
if (!
|
|
1417
|
+
if (!Ie.includes(e)) throw new n("hueMethod", e, `expected one of: ${Ie.join(", ")}`);
|
|
1421
1418
|
return e;
|
|
1422
1419
|
}
|
|
1423
1420
|
}
|
|
1424
1421
|
//#endregion
|
|
1425
1422
|
//#region src/animation/engine/option-setters.ts
|
|
1426
|
-
function
|
|
1427
|
-
let n = e.options.timingFunction, r =
|
|
1423
|
+
function cr(e, t) {
|
|
1424
|
+
let n = e.options.timingFunction, r = $n(t);
|
|
1428
1425
|
if (e.options.timingFunction = r, r !== n) {
|
|
1429
1426
|
for (let t of e.templateFrames) t.timingFunction === n && (t.timingFunction = r);
|
|
1430
1427
|
for (let t of e.frames) t.timingFunction === n && (t.timingFunction = r);
|
|
1431
1428
|
}
|
|
1432
1429
|
}
|
|
1433
|
-
function
|
|
1434
|
-
e.options.iterationCount =
|
|
1430
|
+
function lr(e, t) {
|
|
1431
|
+
e.options.iterationCount = er(t);
|
|
1435
1432
|
}
|
|
1436
|
-
function
|
|
1433
|
+
function ur(e, t, n) {
|
|
1437
1434
|
n === void 0 ? delete e[t] : e[t] = n;
|
|
1438
1435
|
}
|
|
1439
|
-
function
|
|
1440
|
-
let r =
|
|
1436
|
+
function dr(e, t, n) {
|
|
1437
|
+
let r = tr(t);
|
|
1441
1438
|
if (r === void 0) return;
|
|
1442
1439
|
let i = r / e.options.duration;
|
|
1443
1440
|
for (let t = 0; t < e.frames.length; t++) {
|
|
1444
1441
|
let n = e.frames[t];
|
|
1445
1442
|
n.time.start *= i, n.time.stop *= i;
|
|
1446
1443
|
}
|
|
1447
|
-
e.options.duration = r,
|
|
1444
|
+
e.options.duration = r, ur(e.options, "durationUnit", n);
|
|
1448
1445
|
}
|
|
1449
|
-
function
|
|
1450
|
-
e.options.delay =
|
|
1446
|
+
function fr(e, t, n) {
|
|
1447
|
+
e.options.delay = nr(t), ur(e.options, "delayUnit", t == null ? void 0 : n);
|
|
1448
|
+
}
|
|
1449
|
+
function pr(e, t) {
|
|
1450
|
+
e.options.direction = rr(t), e._playback.reversed = Wt(e.options.direction, e._playback.iteration);
|
|
1451
1451
|
}
|
|
1452
1452
|
function mr(e, t) {
|
|
1453
|
-
e.options.
|
|
1453
|
+
e.options.fillMode = ir(t);
|
|
1454
1454
|
}
|
|
1455
1455
|
function hr(e, t) {
|
|
1456
|
-
e.options.
|
|
1456
|
+
e.options.useWAAPI = ar("useWAAPI", t);
|
|
1457
1457
|
}
|
|
1458
1458
|
function gr(e, t) {
|
|
1459
|
-
e.options.
|
|
1459
|
+
e.options.respectReducedMotion = ar("respectReducedMotion", t);
|
|
1460
1460
|
}
|
|
1461
1461
|
function _r(e, t) {
|
|
1462
|
-
e.options.
|
|
1462
|
+
e.options.colorSpace = or(t), e.frames.length > 0 && M(e).renormalizeColors();
|
|
1463
1463
|
}
|
|
1464
1464
|
function vr(e, t) {
|
|
1465
|
-
|
|
1466
|
-
}
|
|
1467
|
-
function yr(e, t) {
|
|
1468
|
-
let n = cr(t);
|
|
1465
|
+
let n = sr(t);
|
|
1469
1466
|
n !== void 0 && (e.options.hueMethod = n, e.frames.length > 0 && M(e).renormalizeColors());
|
|
1470
1467
|
}
|
|
1471
|
-
function
|
|
1468
|
+
function yr(e, t) {
|
|
1472
1469
|
t !== void 0 && (e.options.composite = t);
|
|
1473
1470
|
}
|
|
1474
|
-
function
|
|
1475
|
-
|
|
1471
|
+
function br(e, t) {
|
|
1472
|
+
cr(e, t.timingFunction), dr(e, t.duration, t.durationUnit), lr(e, t.iterationCount), fr(e, t.delay, t.delayUnit), pr(e, t.direction), mr(e, t.fillMode), hr(e, t.useWAAPI), gr(e, t.respectReducedMotion), _r(e, t.colorSpace), vr(e, t.hueMethod), yr(e, t.composite);
|
|
1476
1473
|
}
|
|
1477
1474
|
//#endregion
|
|
1478
1475
|
//#region src/animation/engine/compile-bridge.ts
|
|
1476
|
+
function xr(e) {
|
|
1477
|
+
M(e).parse(e.targets), Cr(e), Sr(e);
|
|
1478
|
+
}
|
|
1479
1479
|
function Sr(e) {
|
|
1480
|
-
|
|
1480
|
+
e._hasComposition = Rn(e.frames), zn(e._compositionBase, e._compositionFallbackSeen, e._compositionPose);
|
|
1481
1481
|
}
|
|
1482
1482
|
function Cr(e) {
|
|
1483
|
-
e._hasComposition = zn(e.frames), Bn(e._compositionBase, e._compositionFallbackSeen, e._compositionPose);
|
|
1484
|
-
}
|
|
1485
|
-
function wr(e) {
|
|
1486
1483
|
let t = /* @__PURE__ */ new Set();
|
|
1487
1484
|
for (let n of e.frames) for (let e in n.flatVars) t.add(e);
|
|
1488
1485
|
e._stableKeys = [...t];
|
|
1489
1486
|
}
|
|
1490
|
-
function
|
|
1487
|
+
function wr(e) {
|
|
1491
1488
|
let t;
|
|
1492
1489
|
for (let n of e.frames) {
|
|
1493
1490
|
let r = n.transform;
|
|
1494
1491
|
if (e.usesDefaultRenderer(r)) t ??= r;
|
|
1495
|
-
else if (r !==
|
|
1492
|
+
else if (r !== E) return {
|
|
1496
1493
|
declared: r,
|
|
1497
1494
|
own: r
|
|
1498
1495
|
};
|
|
@@ -1502,9 +1499,9 @@ function Tr(e) {
|
|
|
1502
1499
|
own: t
|
|
1503
1500
|
};
|
|
1504
1501
|
}
|
|
1505
|
-
function
|
|
1506
|
-
let n =
|
|
1507
|
-
|
|
1502
|
+
function Tr(e, t) {
|
|
1503
|
+
let n = wr(e), r = wr(t).declared, i = M(t);
|
|
1504
|
+
Ht(e, i), e.options = i.options;
|
|
1508
1505
|
let a = r === void 0 ? n.own : void 0;
|
|
1509
1506
|
if (a !== void 0) {
|
|
1510
1507
|
for (let t of e.templateFrames) t.transform = a;
|
|
@@ -1512,33 +1509,33 @@ function Er(e, t) {
|
|
|
1512
1509
|
}
|
|
1513
1510
|
(a === void 0 || n.declared === void 0) && (e.unflatten = t.unflatten);
|
|
1514
1511
|
let o = e.targets[0], s = e.frames;
|
|
1515
|
-
for (let e of s) for (let t of Object.values(e.interpVars)) for (let e of t.slots)
|
|
1516
|
-
|
|
1512
|
+
for (let e of s) for (let t of Object.values(e.interpVars)) for (let e of t.slots) O(e, o);
|
|
1513
|
+
Cr(e), Sr(e);
|
|
1517
1514
|
}
|
|
1518
1515
|
//#endregion
|
|
1519
1516
|
//#region src/animation/resolve/env.ts
|
|
1520
|
-
var
|
|
1517
|
+
var Er = () => {
|
|
1521
1518
|
let e = typeof globalThis < "u" && typeof globalThis.CSS?.supports == "function", t = typeof globalThis < "u" && typeof globalThis.matchMedia == "function";
|
|
1522
1519
|
return {
|
|
1523
1520
|
supports: e ? (e) => globalThis.CSS.supports(e) : () => !1,
|
|
1524
1521
|
matchMedia: t ? (e) => globalThis.matchMedia(e) : () => ({ matches: !1 })
|
|
1525
1522
|
};
|
|
1526
|
-
},
|
|
1523
|
+
}, Dr = (e, t, n) => {
|
|
1527
1524
|
let r = {
|
|
1528
1525
|
functions: e,
|
|
1529
1526
|
env: {
|
|
1530
|
-
...
|
|
1527
|
+
...Er(),
|
|
1531
1528
|
...t
|
|
1532
1529
|
},
|
|
1533
1530
|
seen: /* @__PURE__ */ new Set(),
|
|
1534
1531
|
depth: 0
|
|
1535
1532
|
};
|
|
1536
1533
|
return n !== void 0 && (r.diagnostics = n), r;
|
|
1537
|
-
}, L = Symbol("kf.resolve.drop"),
|
|
1534
|
+
}, L = Symbol("kf.resolve.drop"), Or = (e, t) => {
|
|
1538
1535
|
if (t.syntax === void 0) return e;
|
|
1539
|
-
let n =
|
|
1536
|
+
let n = Oe(y(e), t.syntax);
|
|
1540
1537
|
return n.ok ? n.value : t.default ?? L;
|
|
1541
|
-
},
|
|
1538
|
+
}, kr = (e) => {
|
|
1542
1539
|
if (e.kind !== "call" || e.name !== "var") return;
|
|
1543
1540
|
let t = e.args[0];
|
|
1544
1541
|
if (t?.kind === "scalar" && t.payload.type === "keyword") return t.payload.value;
|
|
@@ -1546,21 +1543,21 @@ var Dr = () => {
|
|
|
1546
1543
|
let e = t.items[0];
|
|
1547
1544
|
if (e?.kind === "scalar" && e.payload.type === "keyword") return e.payload.value;
|
|
1548
1545
|
}
|
|
1549
|
-
},
|
|
1546
|
+
}, Ar = (e, t) => Object.freeze({
|
|
1550
1547
|
kind: "call",
|
|
1551
1548
|
name: e.name,
|
|
1552
1549
|
args: Object.freeze(t)
|
|
1553
|
-
}),
|
|
1550
|
+
}), jr = (e, t) => Object.freeze({
|
|
1554
1551
|
kind: "list",
|
|
1555
1552
|
separator: e.separator,
|
|
1556
1553
|
items: Object.freeze(t)
|
|
1557
|
-
}),
|
|
1558
|
-
let n =
|
|
1554
|
+
}), Mr = (e, t) => {
|
|
1555
|
+
let n = kr(e);
|
|
1559
1556
|
if (n !== void 0) return t.get(n) ?? e;
|
|
1560
1557
|
if (e.kind === "scalar") return e;
|
|
1561
|
-
let r = e.kind === "call" ? e.args : e.items, i = r.map((e) =>
|
|
1562
|
-
return i.every((e, t) => e === r[t]) ? e : e.kind === "call" ?
|
|
1563
|
-
},
|
|
1558
|
+
let r = e.kind === "call" ? e.args : e.items, i = r.map((e) => Mr(e, t));
|
|
1559
|
+
return i.every((e, t) => e === r[t]) ? e : e.kind === "call" ? Ar(e, i) : jr(e, i);
|
|
1560
|
+
}, Nr = (e, t, n) => {
|
|
1564
1561
|
if (t.seen.has(e.name)) return L;
|
|
1565
1562
|
let r = t.functions.get(e.name);
|
|
1566
1563
|
if (r?.result === void 0) return L;
|
|
@@ -1568,7 +1565,7 @@ var Dr = () => {
|
|
|
1568
1565
|
if (e.args.length > i.length) return L;
|
|
1569
1566
|
let a = /* @__PURE__ */ new Map();
|
|
1570
1567
|
for (let n = 0; n < i.length; n++) {
|
|
1571
|
-
let r = i[n], o = e.args[n], s = o === void 0 ? r.default ?? L :
|
|
1568
|
+
let r = i[n], o = e.args[n], s = o === void 0 ? r.default ?? L : Or(o, r);
|
|
1572
1569
|
if (s === L) return t.diagnostics?.push({
|
|
1573
1570
|
code: "CUSTOM_FN_ARG_DROP",
|
|
1574
1571
|
property: r.name,
|
|
@@ -1576,7 +1573,7 @@ var Dr = () => {
|
|
|
1576
1573
|
}), L;
|
|
1577
1574
|
a.set(r.name, s);
|
|
1578
1575
|
}
|
|
1579
|
-
let o =
|
|
1576
|
+
let o = Mr(r.result, a);
|
|
1580
1577
|
t.seen.add(e.name);
|
|
1581
1578
|
try {
|
|
1582
1579
|
return n(o, {
|
|
@@ -1586,20 +1583,20 @@ var Dr = () => {
|
|
|
1586
1583
|
} finally {
|
|
1587
1584
|
t.seen.delete(e.name);
|
|
1588
1585
|
}
|
|
1589
|
-
}, R = (e, t) => e.kind === "scalar" && e.payload.type === "keyword" && e.payload.value.toLowerCase() === t,
|
|
1586
|
+
}, R = (e, t) => e.kind === "scalar" && e.payload.type === "keyword" && e.payload.value.toLowerCase() === t, Pr = (e) => {
|
|
1590
1587
|
if (e.length !== 0) return e.length === 1 ? e[0] : Object.freeze({
|
|
1591
1588
|
kind: "list",
|
|
1592
1589
|
separator: "space",
|
|
1593
1590
|
items: Object.freeze([...e])
|
|
1594
1591
|
});
|
|
1595
|
-
},
|
|
1592
|
+
}, Fr = (e) => {
|
|
1596
1593
|
let t = [[]];
|
|
1597
1594
|
for (let n of e.items) R(n, ";") ? t.push([]) : t.at(-1).push(n);
|
|
1598
1595
|
let n = [];
|
|
1599
1596
|
for (let e of t) {
|
|
1600
1597
|
let t = e.findIndex((e) => R(e, ":"));
|
|
1601
1598
|
if (t < 0) continue;
|
|
1602
|
-
let r =
|
|
1599
|
+
let r = Pr(e.slice(0, t)), i = Pr(e.slice(t + 1));
|
|
1603
1600
|
r === void 0 || i === void 0 || n.push(Object.freeze({
|
|
1604
1601
|
condition: r,
|
|
1605
1602
|
consequent: i,
|
|
@@ -1607,8 +1604,8 @@ var Dr = () => {
|
|
|
1607
1604
|
}));
|
|
1608
1605
|
}
|
|
1609
1606
|
return Object.freeze(n);
|
|
1610
|
-
},
|
|
1611
|
-
if (e.args.length === 1 && e.args[0]?.kind === "list") return
|
|
1607
|
+
}, Ir = (e) => {
|
|
1608
|
+
if (e.args.length === 1 && e.args[0]?.kind === "list") return Fr(e.args[0]);
|
|
1612
1609
|
let t = e.args[0], n = e.args[1];
|
|
1613
1610
|
if (t === void 0 || n === void 0) return [];
|
|
1614
1611
|
let r = [Object.freeze({
|
|
@@ -1627,7 +1624,7 @@ var Dr = () => {
|
|
|
1627
1624
|
consequent: i,
|
|
1628
1625
|
fallback: !0
|
|
1629
1626
|
})), Object.freeze(r);
|
|
1630
|
-
},
|
|
1627
|
+
}, Lr = (e) => e.args.map(y).join(", "), Rr = (e, t) => {
|
|
1631
1628
|
let n = e.args[0];
|
|
1632
1629
|
if (n === void 0) return !1;
|
|
1633
1630
|
if (n.kind === "scalar" && n.payload.type === "keyword") return t(n.payload.value) !== void 0;
|
|
@@ -1637,45 +1634,45 @@ var Dr = () => {
|
|
|
1637
1634
|
let a = t(i.payload.value);
|
|
1638
1635
|
if (a === void 0) return !1;
|
|
1639
1636
|
if (r < 0) return !0;
|
|
1640
|
-
let o =
|
|
1637
|
+
let o = Pr(n.items.slice(r + 1));
|
|
1641
1638
|
if (o === void 0) return !1;
|
|
1642
1639
|
let s = (e) => e.trim().replace(/\s+/g, " ");
|
|
1643
1640
|
return s(a) === s(y(o));
|
|
1644
|
-
},
|
|
1641
|
+
}, zr = (e, t) => {
|
|
1645
1642
|
if (R(e, "else")) return !0;
|
|
1646
1643
|
if (e.kind !== "call") return !1;
|
|
1647
|
-
if (e.name === "supports") return t.env.supports?.(
|
|
1648
|
-
if (e.name === "media") return t.env.matchMedia?.(
|
|
1644
|
+
if (e.name === "supports") return t.env.supports?.(Lr(e)) ?? !1;
|
|
1645
|
+
if (e.name === "media") return t.env.matchMedia?.(Lr(e))?.matches ?? !1;
|
|
1649
1646
|
if (e.name === "style") {
|
|
1650
1647
|
let n = t.env.customProps;
|
|
1651
|
-
return n === void 0 ? void 0 :
|
|
1648
|
+
return n === void 0 ? void 0 : Rr(e, n);
|
|
1652
1649
|
}
|
|
1653
1650
|
return !1;
|
|
1654
|
-
},
|
|
1655
|
-
let r =
|
|
1651
|
+
}, Br = (e, t, n) => {
|
|
1652
|
+
let r = Ir(e);
|
|
1656
1653
|
if (r.length === 0) return L;
|
|
1657
1654
|
for (let i of r) {
|
|
1658
|
-
let r = i.fallback ? !0 :
|
|
1655
|
+
let r = i.fallback ? !0 : zr(i.condition, t);
|
|
1659
1656
|
if (r === void 0) return e;
|
|
1660
1657
|
if (r) return n(i.consequent, t);
|
|
1661
1658
|
}
|
|
1662
1659
|
return L;
|
|
1663
|
-
},
|
|
1660
|
+
}, Vr = (e) => e.name === "if" && Ir(e).some((e) => e.condition.kind === "call" && e.condition.name === "style"), Hr = 32, Ur = (e) => Object.freeze({
|
|
1664
1661
|
kind: "scalar",
|
|
1665
1662
|
payload: Object.freeze({
|
|
1666
1663
|
type: "number",
|
|
1667
1664
|
value: e,
|
|
1668
1665
|
unit: ""
|
|
1669
1666
|
})
|
|
1670
|
-
}),
|
|
1667
|
+
}), Wr = (e, t) => Object.freeze({
|
|
1671
1668
|
kind: "call",
|
|
1672
1669
|
name: e.name,
|
|
1673
1670
|
args: Object.freeze(t)
|
|
1674
|
-
}),
|
|
1671
|
+
}), Gr = (e, t) => Object.freeze({
|
|
1675
1672
|
kind: "list",
|
|
1676
1673
|
separator: e.separator,
|
|
1677
1674
|
items: Object.freeze(t)
|
|
1678
|
-
}),
|
|
1675
|
+
}), Kr = (e, t) => {
|
|
1679
1676
|
let n = [], r = !1;
|
|
1680
1677
|
for (let i of e) {
|
|
1681
1678
|
let e = z(i, {
|
|
@@ -1690,35 +1687,50 @@ var Dr = () => {
|
|
|
1690
1687
|
}
|
|
1691
1688
|
return r ? Object.freeze(n) : e;
|
|
1692
1689
|
}, z = (e, t) => {
|
|
1693
|
-
if (t.depth >
|
|
1690
|
+
if (t.depth > Hr) return L;
|
|
1694
1691
|
if (e.kind === "scalar") return e;
|
|
1695
1692
|
if (e.kind === "list") {
|
|
1696
|
-
let n =
|
|
1697
|
-
return n === L ? L : n === e.items ? e :
|
|
1693
|
+
let n = Kr(e.items, t);
|
|
1694
|
+
return n === L ? L : n === e.items ? e : Gr(e, n);
|
|
1698
1695
|
}
|
|
1699
|
-
if (e.name === "if") return
|
|
1696
|
+
if (e.name === "if") return Br(e, {
|
|
1700
1697
|
...t,
|
|
1701
1698
|
depth: t.depth + 1
|
|
1702
1699
|
}, z);
|
|
1703
1700
|
if (e.name === "sibling-index") {
|
|
1704
1701
|
let n = t.env.siblingIndex;
|
|
1705
|
-
return n === void 0 ? e :
|
|
1702
|
+
return n === void 0 ? e : Ur(n());
|
|
1706
1703
|
}
|
|
1707
1704
|
if (e.name === "sibling-count") {
|
|
1708
1705
|
let n = t.env.siblingCount;
|
|
1709
|
-
return n === void 0 ? e :
|
|
1706
|
+
return n === void 0 ? e : Ur(n());
|
|
1710
1707
|
}
|
|
1711
|
-
if (e.name.startsWith("--") && t.functions.has(e.name)) return
|
|
1712
|
-
let n =
|
|
1713
|
-
return n === L ? L : n === e.args ? e :
|
|
1714
|
-
},
|
|
1708
|
+
if (e.name.startsWith("--") && t.functions.has(e.name)) return Nr(e, t, z);
|
|
1709
|
+
let n = Kr(e.args, t);
|
|
1710
|
+
return n === L ? L : n === e.args ? e : Wr(e, n);
|
|
1711
|
+
}, qr = (e, t) => z(e, t), Jr = (e) => {
|
|
1715
1712
|
if (typeof e != "object" || !e || !("kind" in e)) return !1;
|
|
1716
1713
|
let t = e;
|
|
1717
|
-
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(
|
|
1714
|
+
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(Jr) : t.name === "if" || t.name === "spring" || t.name === "sibling-index" || t.name === "sibling-count" || t.name.startsWith("--") ? !0 : t.args.some(Jr);
|
|
1718
1715
|
}, B = (e) => {
|
|
1719
1716
|
if (typeof e != "object" || !e || !("kind" in e)) return !1;
|
|
1720
1717
|
let t = e;
|
|
1721
|
-
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(B) : t.name === "sibling-index" || t.name === "sibling-count" ||
|
|
1718
|
+
return t.kind === "scalar" ? !1 : t.kind === "list" ? t.items.some(B) : t.name === "sibling-index" || t.name === "sibling-count" || Vr(t) ? !0 : t.args.some(B);
|
|
1719
|
+
}, V = {
|
|
1720
|
+
mass: 1,
|
|
1721
|
+
stiffness: 100,
|
|
1722
|
+
damping: 10,
|
|
1723
|
+
velocity: 0
|
|
1724
|
+
}, Yr = (e) => {
|
|
1725
|
+
let t = (t, n) => {
|
|
1726
|
+
let r = e[t];
|
|
1727
|
+
return typeof r == "number" && Number.isFinite(r) ? r : n;
|
|
1728
|
+
}, n = t(0, V.mass), r = t(1, V.stiffness), i = t(2, V.damping), a = t(3, V.velocity);
|
|
1729
|
+
return n > 0 || (n = V.mass), r > 0 || (r = V.stiffness), i >= 0 || (i = V.damping), {
|
|
1730
|
+
response: 2 * Math.PI * Math.sqrt(n / r),
|
|
1731
|
+
dampingFraction: i / (2 * Math.sqrt(r * n)),
|
|
1732
|
+
initialVelocity: a
|
|
1733
|
+
};
|
|
1722
1734
|
};
|
|
1723
1735
|
//#endregion
|
|
1724
1736
|
//#region src/animation/resolve/element-resolve.ts
|
|
@@ -1735,13 +1747,13 @@ function Xr(e) {
|
|
|
1735
1747
|
if (!n) return !1;
|
|
1736
1748
|
let r = $r(e);
|
|
1737
1749
|
if (r === void 0) return !1;
|
|
1738
|
-
let i =
|
|
1750
|
+
let i = Dr(/* @__PURE__ */ new Map(), r), a = !1;
|
|
1739
1751
|
for (let e of t) {
|
|
1740
1752
|
let t = e.vars;
|
|
1741
1753
|
for (let e in t) {
|
|
1742
1754
|
let n = t[e];
|
|
1743
1755
|
if (!Qr(n) || !B(n)) continue;
|
|
1744
|
-
let r =
|
|
1756
|
+
let r = qr(n, i);
|
|
1745
1757
|
if (r === L) {
|
|
1746
1758
|
delete t[e], a = !0;
|
|
1747
1759
|
continue;
|
|
@@ -1754,7 +1766,7 @@ function Xr(e) {
|
|
|
1754
1766
|
function Zr(e) {
|
|
1755
1767
|
if (Xr(e)) return;
|
|
1756
1768
|
let t = e.targets[0], n = e.frames;
|
|
1757
|
-
for (let e of n) for (let n of Object.values(e.interpVars)) for (let e of n.slots)
|
|
1769
|
+
for (let e of n) for (let n of Object.values(e.interpVars)) for (let e of n.slots) O(e, t);
|
|
1758
1770
|
}
|
|
1759
1771
|
var Qr = (e) => typeof e == "object" && !!e && "kind" in e && (e.kind === "scalar" || e.kind === "call" || e.kind === "list");
|
|
1760
1772
|
function $r(e) {
|
|
@@ -1768,7 +1780,7 @@ function $r(e) {
|
|
|
1768
1780
|
}
|
|
1769
1781
|
//#endregion
|
|
1770
1782
|
//#region src/animation/internal/animation-id.ts
|
|
1771
|
-
var
|
|
1783
|
+
var H = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = class {
|
|
1772
1784
|
id = ei++;
|
|
1773
1785
|
name;
|
|
1774
1786
|
superKey;
|
|
@@ -1837,16 +1849,16 @@ var V = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
1837
1849
|
get flatKeys() {
|
|
1838
1850
|
return this._stableKeys;
|
|
1839
1851
|
}
|
|
1840
|
-
_defaultTransform = (e) =>
|
|
1852
|
+
_defaultTransform = (e) => Dt(e, this.targets);
|
|
1841
1853
|
usesDefaultRenderer(e) {
|
|
1842
1854
|
return e === this._defaultTransform;
|
|
1843
1855
|
}
|
|
1844
1856
|
dispatchAnimationEvent(e) {
|
|
1845
|
-
|
|
1857
|
+
Ut(this, e);
|
|
1846
1858
|
}
|
|
1847
1859
|
constructor(e, t, n, r) {
|
|
1848
|
-
this.options = {},
|
|
1849
|
-
...
|
|
1860
|
+
this.options = {}, Ht(this, new Bt(this.options)), this._playback = new Ln(this._frame.bind(this)), this._ctorOptions = e ?? {}, this.setOptions({
|
|
1861
|
+
...D,
|
|
1850
1862
|
...this._ctorOptions
|
|
1851
1863
|
}), this.targets = t == null ? [] : Array.isArray(t) ? t : [t], this.name = n, this.superKey = r;
|
|
1852
1864
|
}
|
|
@@ -1873,49 +1885,49 @@ var V = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
1873
1885
|
return M(this).addFrame(e, t, n, r, i), this._compiled = !1, this;
|
|
1874
1886
|
}
|
|
1875
1887
|
parse() {
|
|
1876
|
-
return
|
|
1888
|
+
return xr(this), this._compiled = !0, this;
|
|
1877
1889
|
}
|
|
1878
1890
|
adoptCompiled(e) {
|
|
1879
|
-
return
|
|
1891
|
+
return Tr(this, e), this._compiled = e.compiled, this;
|
|
1880
1892
|
}
|
|
1881
1893
|
setTimingFunction(e) {
|
|
1882
|
-
return
|
|
1894
|
+
return cr(this, e), this;
|
|
1883
1895
|
}
|
|
1884
1896
|
setIterationCount(e) {
|
|
1885
|
-
return
|
|
1897
|
+
return lr(this, e), this;
|
|
1886
1898
|
}
|
|
1887
1899
|
setDuration(e) {
|
|
1888
|
-
return
|
|
1900
|
+
return dr(this, e), this;
|
|
1889
1901
|
}
|
|
1890
1902
|
setDelay(e) {
|
|
1891
|
-
return
|
|
1903
|
+
return fr(this, e), this;
|
|
1892
1904
|
}
|
|
1893
1905
|
setDirection(e) {
|
|
1894
|
-
return
|
|
1906
|
+
return pr(this, e), this;
|
|
1895
1907
|
}
|
|
1896
1908
|
setFillMode(e) {
|
|
1897
|
-
return
|
|
1909
|
+
return mr(this, e), this;
|
|
1898
1910
|
}
|
|
1899
1911
|
setUseWAAPI(e) {
|
|
1900
|
-
return
|
|
1912
|
+
return hr(this, e), this;
|
|
1901
1913
|
}
|
|
1902
1914
|
setRespectReducedMotion(e) {
|
|
1903
|
-
return
|
|
1915
|
+
return gr(this, e), this;
|
|
1904
1916
|
}
|
|
1905
1917
|
setColorSpace(e) {
|
|
1906
|
-
return
|
|
1918
|
+
return _r(this, e), this;
|
|
1907
1919
|
}
|
|
1908
1920
|
setHueMethod(e) {
|
|
1909
|
-
return
|
|
1921
|
+
return vr(this, e), this;
|
|
1910
1922
|
}
|
|
1911
1923
|
setComposite(e) {
|
|
1912
|
-
return
|
|
1924
|
+
return yr(this, e), this;
|
|
1913
1925
|
}
|
|
1914
1926
|
setOptions(e) {
|
|
1915
|
-
return
|
|
1927
|
+
return br(this, e), this;
|
|
1916
1928
|
}
|
|
1917
1929
|
reverse() {
|
|
1918
|
-
return
|
|
1930
|
+
return Gt(this), this;
|
|
1919
1931
|
}
|
|
1920
1932
|
fillForwards() {
|
|
1921
1933
|
this.interpFrames(this.options.duration, !0);
|
|
@@ -1924,61 +1936,61 @@ var V = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
1924
1936
|
this.interpFrames(0, !0);
|
|
1925
1937
|
}
|
|
1926
1938
|
get restPosition() {
|
|
1927
|
-
return
|
|
1939
|
+
return Gn(this);
|
|
1928
1940
|
}
|
|
1929
1941
|
paintRest() {
|
|
1930
|
-
|
|
1942
|
+
Kn(this);
|
|
1931
1943
|
}
|
|
1932
1944
|
assertNoUnresolvedNamedSelector() {
|
|
1933
|
-
|
|
1945
|
+
qn(this);
|
|
1934
1946
|
}
|
|
1935
1947
|
at(e, t = !1) {
|
|
1936
|
-
return
|
|
1948
|
+
return Jn(this, e, t);
|
|
1937
1949
|
}
|
|
1938
1950
|
interpFrames(e, t = !1, n) {
|
|
1939
1951
|
return I(this, e, t, n);
|
|
1940
1952
|
}
|
|
1941
1953
|
onStart() {
|
|
1942
|
-
|
|
1954
|
+
kn(this);
|
|
1943
1955
|
}
|
|
1944
1956
|
onEnd() {
|
|
1945
|
-
|
|
1957
|
+
An(this);
|
|
1946
1958
|
}
|
|
1947
1959
|
advanceTo(e) {
|
|
1948
|
-
return
|
|
1960
|
+
return jn(this, e);
|
|
1949
1961
|
}
|
|
1950
1962
|
_frame(e) {
|
|
1951
|
-
return
|
|
1963
|
+
return Fn(this, e);
|
|
1952
1964
|
}
|
|
1953
1965
|
get finished() {
|
|
1954
1966
|
return this._playback._playingPromise ?? Promise.resolve();
|
|
1955
1967
|
}
|
|
1956
1968
|
async play() {
|
|
1957
|
-
return
|
|
1969
|
+
return Dn(this);
|
|
1958
1970
|
}
|
|
1959
1971
|
pause() {
|
|
1960
|
-
return
|
|
1972
|
+
return Kt(this), this;
|
|
1961
1973
|
}
|
|
1962
1974
|
resume() {
|
|
1963
|
-
return
|
|
1975
|
+
return qt(this), this;
|
|
1964
1976
|
}
|
|
1965
1977
|
toggle() {
|
|
1966
|
-
return
|
|
1978
|
+
return Jt(this);
|
|
1967
1979
|
}
|
|
1968
1980
|
stop() {
|
|
1969
|
-
|
|
1981
|
+
Yt(this);
|
|
1970
1982
|
}
|
|
1971
1983
|
playing() {
|
|
1972
|
-
return
|
|
1984
|
+
return Xt(this);
|
|
1973
1985
|
}
|
|
1974
1986
|
get effectiveT() {
|
|
1975
|
-
return
|
|
1987
|
+
return Zt(this);
|
|
1976
1988
|
}
|
|
1977
1989
|
settle() {
|
|
1978
1990
|
return N(this), this;
|
|
1979
1991
|
}
|
|
1980
1992
|
reset() {
|
|
1981
|
-
return
|
|
1993
|
+
return Qt(this), this;
|
|
1982
1994
|
}
|
|
1983
1995
|
setTargets(...e) {
|
|
1984
1996
|
return this.targets = e, Zr(this), this;
|
|
@@ -1987,8 +1999,8 @@ var V = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
1987
1999
|
let n = {};
|
|
1988
2000
|
for (let r of e.declarations) {
|
|
1989
2001
|
let e = r.value;
|
|
1990
|
-
if (
|
|
1991
|
-
let n =
|
|
2002
|
+
if (Jr(e)) {
|
|
2003
|
+
let n = qr(e, t);
|
|
1992
2004
|
if (n === L) continue;
|
|
1993
2005
|
e = n;
|
|
1994
2006
|
}
|
|
@@ -2000,10 +2012,10 @@ var V = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
2000
2012
|
for (let n of e.selectors) n.kind === "percent" ? t.push(`${n.value * 100}%`) : t.push(n.offset === void 0 ? n.name : `${n.name} ${n.offset * 100}%`);
|
|
2001
2013
|
return t;
|
|
2002
2014
|
}, ii = (e) => {
|
|
2003
|
-
let t =
|
|
2015
|
+
let t = fe(e).filter((e) => e.path.length === 1), n = t[0]?.rule.name;
|
|
2004
2016
|
return n === void 0 ? [] : t.filter((e) => e.rule.name === n).at(-1)?.rule.rules ?? [];
|
|
2005
2017
|
}, ai = (e) => {
|
|
2006
|
-
let t =
|
|
2018
|
+
let t = me(S(e), []);
|
|
2007
2019
|
return {
|
|
2008
2020
|
ast: t.value,
|
|
2009
2021
|
issues: t.issues
|
|
@@ -2012,7 +2024,7 @@ var V = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
2012
2024
|
let t = /* @__PURE__ */ new Map();
|
|
2013
2025
|
for (let n of e) n.path.length === 1 && t.set(n.rule.name, n.rule.descriptor);
|
|
2014
2026
|
return t;
|
|
2015
|
-
}, si = (e) =>
|
|
2027
|
+
}, si = (e) => re(e).filter((e) => e.path.length === 1).at(-1)?.rule.declarations ?? [], ci = (e, t) => {
|
|
2016
2028
|
let n = [], r = (e, t) => {
|
|
2017
2029
|
n.push({
|
|
2018
2030
|
code: e,
|
|
@@ -2030,7 +2042,7 @@ var V = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
2030
2042
|
ii(t.ast).length > 0 && (a = t.ast, i = t.issues, o = ii(a));
|
|
2031
2043
|
}
|
|
2032
2044
|
if (typeof e == "string") for (let t of i) r("PARSE_ERROR", {
|
|
2033
|
-
message:
|
|
2045
|
+
message: _e(t),
|
|
2034
2046
|
input: e,
|
|
2035
2047
|
start: t.start,
|
|
2036
2048
|
end: t.end,
|
|
@@ -2041,7 +2053,7 @@ var V = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
2041
2053
|
message: "the input is non-empty but parsed to zero @keyframes rules (no animatable stops) — the resulting animation has no frames",
|
|
2042
2054
|
input: e
|
|
2043
2055
|
});
|
|
2044
|
-
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = oi(
|
|
2056
|
+
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = oi(te(a)), d = Dr(u, t, n);
|
|
2045
2057
|
for (let e of o) {
|
|
2046
2058
|
let t = ni(e, d);
|
|
2047
2059
|
for (let n of ri(e)) {
|
|
@@ -2058,19 +2070,19 @@ var V = (e) => typeof e == "string" ? e : e.name ?? String(e.id), ei = 0, ti = c
|
|
|
2058
2070
|
keyframes: s,
|
|
2059
2071
|
timingFunctions: c,
|
|
2060
2072
|
composition: l,
|
|
2061
|
-
properties: oi(
|
|
2073
|
+
properties: oi(he(a)),
|
|
2062
2074
|
functions: u,
|
|
2063
|
-
options:
|
|
2075
|
+
options: ce(si(a)).at(0) ?? {},
|
|
2064
2076
|
diagnostics: n,
|
|
2065
2077
|
stylesheet: a
|
|
2066
2078
|
};
|
|
2067
|
-
}, li = (e) =>
|
|
2079
|
+
}, li = (e) => re(e).at(-1)?.rule.declarations ?? [];
|
|
2068
2080
|
function ui(e) {
|
|
2069
2081
|
let t = {};
|
|
2070
2082
|
return e.duration != null && (t.duration = e.duration * 1e3, e.durationUnit != null && (t.durationUnit = e.durationUnit)), e.timingFunction != null && (t.timingFunction = b(e.timingFunction)), e.iterationCount !== void 0 && (t.iterationCount = e.iterationCount === null ? Infinity : e.iterationCount), e.direction != null && (t.direction = e.direction), e.delay != null && (t.delay = e.delay * 1e3, e.delayUnit != null && (t.delayUnit = e.delayUnit)), e.fillMode != null && (t.fillMode = e.fillMode), e.composition != null && (t.composite = e.composition), t;
|
|
2071
2083
|
}
|
|
2072
2084
|
function di(e) {
|
|
2073
|
-
let t =
|
|
2085
|
+
let t = le(li(e));
|
|
2074
2086
|
return Object.keys(t).length > 0 ? t : void 0;
|
|
2075
2087
|
}
|
|
2076
2088
|
function fi(e, t) {
|
|
@@ -2096,7 +2108,7 @@ function fi(e, t) {
|
|
|
2096
2108
|
}
|
|
2097
2109
|
//#endregion
|
|
2098
2110
|
//#region src/animation/engine/css/animation.ts
|
|
2099
|
-
var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
2111
|
+
var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function", U = class extends ti {
|
|
2100
2112
|
constructor(e, ...t) {
|
|
2101
2113
|
super(e, t), this.unflatten = !1;
|
|
2102
2114
|
}
|
|
@@ -2104,7 +2116,7 @@ var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2104
2116
|
let t = !1;
|
|
2105
2117
|
for (let e of this.templateFrames) e.start.kind === "named" && (e.start = {
|
|
2106
2118
|
kind: "percent",
|
|
2107
|
-
value:
|
|
2119
|
+
value: It(e.start)
|
|
2108
2120
|
}, t = !0);
|
|
2109
2121
|
return t && this.frames.length > 0 && this.parse(), this;
|
|
2110
2122
|
}
|
|
@@ -2139,7 +2151,7 @@ var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2139
2151
|
...this._ctorOptions
|
|
2140
2152
|
});
|
|
2141
2153
|
for (let [e, i] of r.keyframes.entries()) {
|
|
2142
|
-
let a = Object.fromEntries(Object.entries(i).map(([e, t]) => [e, pi(t) ? t.clone() : t])), o = r.timingFunctions.get(e), s = o ?
|
|
2154
|
+
let a = Object.fromEntries(Object.entries(i).map(([e, t]) => [e, pi(t) ? t.clone() : t])), o = r.timingFunctions.get(e), s = o ? ge(o) : void 0, c;
|
|
2143
2155
|
if (s) {
|
|
2144
2156
|
let e = o ? t(o) : void 0;
|
|
2145
2157
|
c = e ? {
|
|
@@ -2152,7 +2164,7 @@ var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2152
2164
|
}
|
|
2153
2165
|
return this.parse(), fi(this.propertyRegistry, this.diagnostics), this;
|
|
2154
2166
|
}
|
|
2155
|
-
}, mi = (e) => typeof e == "string" ? e :
|
|
2167
|
+
}, mi = (e) => typeof e == "string" ? e : H(e), W = (e, t, n) => {
|
|
2156
2168
|
let r = mi(t), i = e[r];
|
|
2157
2169
|
if (!i) throw Error(`AnimationGroup.${n}: no animation registered for key "${r}". Known keys: ${Object.keys(e).join(", ") || "(none)"}.`);
|
|
2158
2170
|
return i;
|
|
@@ -2175,7 +2187,7 @@ var pi = (e) => typeof e != "object" || !e ? !1 : typeof e.clone == "function",
|
|
|
2175
2187
|
}
|
|
2176
2188
|
}, vi = (e, t) => {
|
|
2177
2189
|
for (let n of e) n.animation.paused = t;
|
|
2178
|
-
},
|
|
2190
|
+
}, G = (e) => e.op === "replace" && (e.weightSpring !== void 0 || e.weight !== 1), yi = (e) => {
|
|
2179
2191
|
let t = e.weightSpring?.value ?? e.weight;
|
|
2180
2192
|
return e.weightSpring ? t : Number.isFinite(t) ? Math.min(1, Math.max(0, t)) : 0;
|
|
2181
2193
|
}, bi = (e) => Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : 0;
|
|
@@ -2201,7 +2213,7 @@ function xi(e) {
|
|
|
2201
2213
|
eligible: !1,
|
|
2202
2214
|
reason: "property-masked layer stays on rAF"
|
|
2203
2215
|
};
|
|
2204
|
-
if (
|
|
2216
|
+
if (G(e.layer) || e.layer.weightSpring) return {
|
|
2205
2217
|
eligible: !1,
|
|
2206
2218
|
reason: "weight-driven layer has no native composite equivalent"
|
|
2207
2219
|
};
|
|
@@ -2232,8 +2244,8 @@ function Si(e) {
|
|
|
2232
2244
|
try {
|
|
2233
2245
|
for (let e of t.entries) {
|
|
2234
2246
|
let r = e.layer.op;
|
|
2235
|
-
n.push(t.target.animate(
|
|
2236
|
-
...
|
|
2247
|
+
n.push(t.target.animate(hn(e.animation), {
|
|
2248
|
+
...bn(e.animation),
|
|
2237
2249
|
composite: r
|
|
2238
2250
|
}));
|
|
2239
2251
|
}
|
|
@@ -2325,7 +2337,7 @@ function Li(e, t) {
|
|
|
2325
2337
|
return e.paused ? !1 : (e.done = zi(e.getEntries()), e.render(t), e.done ? (e.settle(), Ei(e), !1) : !0);
|
|
2326
2338
|
}
|
|
2327
2339
|
function Ri(e, t) {
|
|
2328
|
-
for (let n = 0; n < e.length; n++)
|
|
2340
|
+
for (let n = 0; n < e.length; n++) Nn(e[n].animation, t);
|
|
2329
2341
|
}
|
|
2330
2342
|
function zi(e) {
|
|
2331
2343
|
for (let t = 0; t < e.length; t++) if (!e[t].animation.done) return !1;
|
|
@@ -2334,13 +2346,13 @@ function zi(e) {
|
|
|
2334
2346
|
//#endregion
|
|
2335
2347
|
//#region src/animation/group/seek.ts
|
|
2336
2348
|
function Bi(e, t) {
|
|
2337
|
-
let n =
|
|
2349
|
+
let n = W(e.animations, t, "elapsedOf").animation, { delay: r, duration: i } = n.options;
|
|
2338
2350
|
return Math.max(0, r) + n.iteration * Math.max(0, i) + n.t;
|
|
2339
2351
|
}
|
|
2340
2352
|
function Vi(e, t) {
|
|
2341
2353
|
for (let { animation: n } of Object.values(e.animations)) {
|
|
2342
|
-
let { delay: r, duration: i, iterationCount: a, direction: o } = n.options, s =
|
|
2343
|
-
i > 0 && (c = Math.floor(s / i), l = s - c * i, c >= a && (c = Math.max(0, Math.ceil(a) - 1), l = i)), c !== n.iteration && (n.iteration = c, n.reversed =
|
|
2354
|
+
let { delay: r, duration: i, iterationCount: a, direction: o } = n.options, s = t - Math.max(0, r), c = 0, l = Math.min(0, s);
|
|
2355
|
+
i > 0 && s >= 0 && (c = Math.floor(s / i), l = s - c * i, c >= a && (c = Math.max(0, Math.ceil(a) - 1), l = i)), c !== n.iteration && (n.iteration = c, n.reversed = Wt(o, c)), e.setChildTime(n, l);
|
|
2344
2356
|
}
|
|
2345
2357
|
}
|
|
2346
2358
|
//#endregion
|
|
@@ -2370,16 +2382,12 @@ function Gi() {
|
|
|
2370
2382
|
//#endregion
|
|
2371
2383
|
//#region src/animation/group/yield-batch.ts
|
|
2372
2384
|
var Ki = (e, t) => {
|
|
2373
|
-
let n;
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
if (e.paused && e.pausedTime !== 0) continue;
|
|
2377
|
-
let i = e.advanceTo(t);
|
|
2378
|
-
typeof i != "number" && (n ??= []).push(i);
|
|
2385
|
+
for (let n = 0; n < e.length; n++) {
|
|
2386
|
+
let r = e[n].animation;
|
|
2387
|
+
r.done || r.paused && r.pausedTime !== 0 || r.advanceTo(t);
|
|
2379
2388
|
}
|
|
2380
|
-
return n && Promise.all(n).then(() => void 0);
|
|
2381
2389
|
}, qi = async (e, t, n) => {
|
|
2382
|
-
for (let r = 0; r < e.length; r += n)
|
|
2390
|
+
for (let r = 0; r < e.length; r += n) Ki(e.slice(r, r + n), t), r + n < e.length && await Gi();
|
|
2383
2391
|
}, Ji = (e, t, n) => {
|
|
2384
2392
|
let r = new a({
|
|
2385
2393
|
...n,
|
|
@@ -2425,7 +2433,7 @@ var Ki = (e, t) => {
|
|
|
2425
2433
|
soaPlans: null,
|
|
2426
2434
|
compositeBuf: null
|
|
2427
2435
|
};
|
|
2428
|
-
},
|
|
2436
|
+
}, K = (e) => typeof e == "number", Qi = (e, t) => {
|
|
2429
2437
|
let { carriers: n, incomingSlots: r } = t, i = n.length;
|
|
2430
2438
|
if (i !== 0) {
|
|
2431
2439
|
for (let t = 0; t < i; t++) e[t] = n[t].values[n[t].key];
|
|
@@ -2433,7 +2441,7 @@ var Ki = (e, t) => {
|
|
|
2433
2441
|
let n = yi(t.layer);
|
|
2434
2442
|
for (let t = 0; t < i; t++) {
|
|
2435
2443
|
let i = r[t];
|
|
2436
|
-
e[t] =
|
|
2444
|
+
e[t] = w(e[t], i.values[i.key], n);
|
|
2437
2445
|
}
|
|
2438
2446
|
} else for (let t = 0; t < i; t++) {
|
|
2439
2447
|
let n = r[t];
|
|
@@ -2449,7 +2457,7 @@ var Ki = (e, t) => {
|
|
|
2449
2457
|
for (let t of e) {
|
|
2450
2458
|
let { layer: e, values: o } = t;
|
|
2451
2459
|
if (!e.enabled) continue;
|
|
2452
|
-
let s = e.properties, c = e.op, l =
|
|
2460
|
+
let s = e.properties, c = e.op, l = G(e);
|
|
2453
2461
|
if (c === "replace" && !l) {
|
|
2454
2462
|
for (let e in o) s && !s.has(e) || o[e] !== void 0 && (i[e] = {
|
|
2455
2463
|
values: n,
|
|
@@ -2463,7 +2471,7 @@ var Ki = (e, t) => {
|
|
|
2463
2471
|
let t = o[e];
|
|
2464
2472
|
if (t === void 0) continue;
|
|
2465
2473
|
let r = i[e], a = r?.values[e];
|
|
2466
|
-
r !== void 0 &&
|
|
2474
|
+
r !== void 0 && K(a) && K(t) ? (u.push(r), d.push({
|
|
2467
2475
|
values: o,
|
|
2468
2476
|
key: e
|
|
2469
2477
|
})) : (f.add(e), i[e] = {
|
|
@@ -2495,7 +2503,7 @@ function ta(e, t, n) {
|
|
|
2495
2503
|
n.interpFrames(n.t, !1, c);
|
|
2496
2504
|
let l = i.properties;
|
|
2497
2505
|
for (let e in c) l && !l.has(e) || c[e] !== void 0 && t.compositeState.mark(e);
|
|
2498
|
-
let u = i.op, d =
|
|
2506
|
+
let u = i.op, d = G(i);
|
|
2499
2507
|
if (u === "replace" && !d) {
|
|
2500
2508
|
for (let e in c) {
|
|
2501
2509
|
if (l && !l.has(e)) continue;
|
|
@@ -2513,7 +2521,7 @@ function ta(e, t, n) {
|
|
|
2513
2521
|
let { plans: e, compositeBuf: n } = $i(i, t.compositeBuf, r);
|
|
2514
2522
|
t.soaPlans = e, t.compositeBuf = n;
|
|
2515
2523
|
}
|
|
2516
|
-
if (e.done = s, t.compositeState.pruneInactive(), e.transform ===
|
|
2524
|
+
if (e.done = s, t.compositeState.pruneInactive(), e.transform === E) for (let t of e.getEntries()) {
|
|
2517
2525
|
let n = t.animation.frames[0];
|
|
2518
2526
|
if (n != null && n.transform != null) {
|
|
2519
2527
|
e.transform = n.transform, e.unflatten = t.animation.unflatten;
|
|
@@ -2522,7 +2530,7 @@ function ta(e, t, n) {
|
|
|
2522
2530
|
}
|
|
2523
2531
|
if (e.unflatten) {
|
|
2524
2532
|
let t = ea.get(e);
|
|
2525
|
-
t === void 0 ? (t =
|
|
2533
|
+
t === void 0 ? (t = jt(r), ea.set(e, t)) : Mt(t), e.transform(t.root, n);
|
|
2526
2534
|
} else e.transform(r, n);
|
|
2527
2535
|
return r;
|
|
2528
2536
|
}
|
|
@@ -2534,7 +2542,7 @@ function na(e, t, n, r, i, a) {
|
|
|
2534
2542
|
let o = t[e];
|
|
2535
2543
|
if (o === void 0) continue;
|
|
2536
2544
|
let s = n[e];
|
|
2537
|
-
|
|
2545
|
+
K(s) && K(o) ? n[e] = s + o : a ? a.copy(e, o) : n[e] = o;
|
|
2538
2546
|
}
|
|
2539
2547
|
return;
|
|
2540
2548
|
}
|
|
@@ -2544,24 +2552,24 @@ function na(e, t, n, r, i, a) {
|
|
|
2544
2552
|
let o = t[e];
|
|
2545
2553
|
if (o === void 0) continue;
|
|
2546
2554
|
let c = n[e];
|
|
2547
|
-
if (
|
|
2555
|
+
if (K(c) && K(o)) n[e] = w(c, o, s);
|
|
2548
2556
|
else if (a) {
|
|
2549
2557
|
let t = a.copy(e, o);
|
|
2550
|
-
|
|
2558
|
+
K(t) && (n[e] = w(0, t, s));
|
|
2551
2559
|
} else n[e] = o;
|
|
2552
2560
|
}
|
|
2553
2561
|
}
|
|
2554
2562
|
//#endregion
|
|
2555
2563
|
//#region src/animation/group/layer-api.ts
|
|
2556
2564
|
function ra(e, t, n) {
|
|
2557
|
-
let r =
|
|
2565
|
+
let r = W(e.animations, t, "setLayerConfig");
|
|
2558
2566
|
Object.assign(r.layer, n), e.invalidateEntries();
|
|
2559
2567
|
}
|
|
2560
2568
|
function ia(e, t) {
|
|
2561
2569
|
return e.animations[mi(t)]?.layer;
|
|
2562
2570
|
}
|
|
2563
2571
|
function aa(e, t, n) {
|
|
2564
|
-
let r =
|
|
2572
|
+
let r = W(e.animations, t, "transitionLayer").layer, i = bi(n.weight);
|
|
2565
2573
|
r.op = "replace";
|
|
2566
2574
|
let o = r.weightSpring;
|
|
2567
2575
|
o instanceof a ? o.target = i : r.weightSpring = Ji(bi(r.weight), i, n.spring), e._hasLayerSprings = !0, e.invalidateEntries();
|
|
@@ -2580,7 +2588,7 @@ function oa(e, t, n, r) {
|
|
|
2580
2588
|
//#region src/animation/group/group.ts
|
|
2581
2589
|
var sa = class e {
|
|
2582
2590
|
animations = {};
|
|
2583
|
-
transform =
|
|
2591
|
+
transform = E;
|
|
2584
2592
|
superKey;
|
|
2585
2593
|
paused = !1;
|
|
2586
2594
|
started = !1;
|
|
@@ -2624,13 +2632,13 @@ var sa = class e {
|
|
|
2624
2632
|
let t = [];
|
|
2625
2633
|
for (let n of e) {
|
|
2626
2634
|
let e, r;
|
|
2627
|
-
n instanceof ti ? e = n : (e = n.animation, r = n.layer), this.transform ===
|
|
2628
|
-
let i =
|
|
2635
|
+
n instanceof ti ? e = n : (e = n.animation, r = n.layer), this.transform === E && e.frames[0] != null && (this.transform = e.frames[0].transform, this.unflatten = e.unflatten);
|
|
2636
|
+
let i = H(e);
|
|
2629
2637
|
this.animations[i] = {
|
|
2630
2638
|
values: {},
|
|
2631
2639
|
animation: e,
|
|
2632
2640
|
layer: {
|
|
2633
|
-
...
|
|
2641
|
+
...Le,
|
|
2634
2642
|
...r
|
|
2635
2643
|
}
|
|
2636
2644
|
}, e.managed = !0, t.push(e);
|
|
@@ -2663,7 +2671,7 @@ var sa = class e {
|
|
|
2663
2671
|
return this._renders.subscribe(e);
|
|
2664
2672
|
}
|
|
2665
2673
|
setChildTime(e, t) {
|
|
2666
|
-
let n =
|
|
2674
|
+
let n = W(this.animations, e, "setChildTime").animation;
|
|
2667
2675
|
return n.t = t, n.startTime !== void 0 && (n.pausedTime = n.startTime + t), this;
|
|
2668
2676
|
}
|
|
2669
2677
|
seek(e) {
|
|
@@ -2675,8 +2683,8 @@ var sa = class e {
|
|
|
2675
2683
|
advanceTo(t) {
|
|
2676
2684
|
let n = this.lastTickTime === 0 ? 0 : t - this.lastTickTime;
|
|
2677
2685
|
this._hasLayerSprings && this.advanceLayerSprings(n), this.lastTickTime = t, this.started = !0;
|
|
2678
|
-
let r = this.getEntries(), i = e.YIELD_BATCH
|
|
2679
|
-
return
|
|
2686
|
+
let r = this.getEntries(), i = e.YIELD_BATCH;
|
|
2687
|
+
return r.length <= i ? (Ki(r, t), this) : qi(r, t, i).then(() => this);
|
|
2680
2688
|
}
|
|
2681
2689
|
get finished() {
|
|
2682
2690
|
return this._playingPromise ?? Promise.resolve();
|
|
@@ -2749,7 +2757,7 @@ function ua(e, t) {
|
|
|
2749
2757
|
let l = {
|
|
2750
2758
|
"0%": { "offset-distance": la(r) },
|
|
2751
2759
|
"100%": { "offset-distance": la(i) }
|
|
2752
|
-
}, u = new
|
|
2760
|
+
}, u = new U(s).fromKeyframes(l);
|
|
2753
2761
|
return u.setTargets(...c), o && u.play(), u;
|
|
2754
2762
|
}
|
|
2755
2763
|
var da = class extends ca {
|
|
@@ -2761,7 +2769,7 @@ var da = class extends ca {
|
|
|
2761
2769
|
if (!Number.isFinite(e) || e < 0 || e > 1) throw Error(`fromDrawSVG(): a numeric draw position is a 0..1 fraction, got ${JSON.stringify(e)} — pass a fraction in [0, 1] or a percent string ("0%".."100%").`);
|
|
2762
2770
|
return e;
|
|
2763
2771
|
}
|
|
2764
|
-
let t =
|
|
2772
|
+
let t = be(() => ue(e.trim()), ({ payload: e }) => e.type === "number" && e.unit === "%" && e.value >= 0 ? e.value / 100 : void 0, void 0);
|
|
2765
2773
|
if (t === void 0) throw Error(`fromDrawSVG(): invalid draw position ${JSON.stringify(e)} — pass a percent string ("0%".."100%") or a 0..1 number.`);
|
|
2766
2774
|
return t;
|
|
2767
2775
|
};
|
|
@@ -2773,14 +2781,14 @@ function pa(e, t = {}) {
|
|
|
2773
2781
|
let l = {
|
|
2774
2782
|
"0%": { "stroke-dashoffset": c * (1 - o) },
|
|
2775
2783
|
"100%": { "stroke-dashoffset": c * (1 - s) }
|
|
2776
|
-
}, u = new
|
|
2784
|
+
}, u = new U(a).fromKeyframes(l);
|
|
2777
2785
|
return u.setTargets(e), i && u.play(), u;
|
|
2778
2786
|
}
|
|
2779
2787
|
var ma = class extends ca {
|
|
2780
2788
|
constructor(e, t = {}) {
|
|
2781
2789
|
super(pa(e, t));
|
|
2782
2790
|
}
|
|
2783
|
-
},
|
|
2791
|
+
}, ha = (e) => `--morph-${e}-x`, ga = (e) => `--morph-${e}-y`, _a = (e) => `--morph-${e}-angle`, va = (e, t, n) => {
|
|
2784
2792
|
let r = Array(t + 1);
|
|
2785
2793
|
for (let i = 0; i <= t; i++) if (n) {
|
|
2786
2794
|
let n = e.sampleAtLength(e.totalLength * (i / t));
|
|
@@ -2791,12 +2799,12 @@ var ma = class extends ca {
|
|
|
2791
2799
|
};
|
|
2792
2800
|
} else r[i] = e.getPointAtT(i / t);
|
|
2793
2801
|
return r;
|
|
2794
|
-
},
|
|
2802
|
+
}, ya = (e) => Number.isInteger(e) ? `${e}` : e.toFixed(3), ba = (e) => {
|
|
2795
2803
|
if (e.length === 0) return "";
|
|
2796
|
-
let t = `M ${
|
|
2797
|
-
for (let n = 1; n < e.length; n++) t += ` L ${
|
|
2804
|
+
let t = `M ${ya(e[0].x)} ${ya(e[0].y)}`;
|
|
2805
|
+
for (let n = 1; n < e.length; n++) t += ` L ${ya(e[n].x)} ${ya(e[n].y)}`;
|
|
2798
2806
|
return t;
|
|
2799
|
-
},
|
|
2807
|
+
}, xa = (e, t) => {
|
|
2800
2808
|
let n = Array(t + 1);
|
|
2801
2809
|
for (let e = 0; e <= t; e++) n[e] = {
|
|
2802
2810
|
x: 0,
|
|
@@ -2805,74 +2813,82 @@ var ma = class extends ca {
|
|
|
2805
2813
|
return (r) => {
|
|
2806
2814
|
let i = r;
|
|
2807
2815
|
for (let e = 0; e <= t; e++) {
|
|
2808
|
-
let t = n[e], r = i[
|
|
2816
|
+
let t = n[e], r = i[ha(e)], a = i[ga(e)];
|
|
2809
2817
|
if (typeof r != "number" || typeof a != "number") throw Error(`morph render: point ${e} lost its coordinate leaf (engine invariant violated — xKey/yKey seeded at construction)`);
|
|
2810
2818
|
t.x = r, t.y = a;
|
|
2811
2819
|
}
|
|
2812
|
-
let a =
|
|
2820
|
+
let a = ba(n);
|
|
2813
2821
|
e.style.setProperty("--morph-d", a), e.style.setProperty("d", `path("${a}")`);
|
|
2814
2822
|
};
|
|
2815
2823
|
};
|
|
2816
2824
|
//#endregion
|
|
2817
2825
|
//#region src/animation/svg/morph-svg.ts
|
|
2818
|
-
function
|
|
2826
|
+
function Sa(e, t, r = {}) {
|
|
2819
2827
|
let { samples: i = 64, target: a, orient: o = !1, autoPlay: s = !0, ...c } = r;
|
|
2820
2828
|
if (typeof e != "string" || e.length === 0) throw new n("from", e, "fromMorphSVG(): `from` must be a non-empty SVG path `d` string.");
|
|
2821
2829
|
if (typeof t != "string" || t.length === 0) throw new n("to", t, "fromMorphSVG(): `to` must be a non-empty SVG path `d` string.");
|
|
2822
2830
|
if (!Number.isInteger(i) || i < 2) throw new n("samples", i, "fromMorphSVG(): `samples` must be an integer >= 2 (a 1-sample morph is just the two endpoints, with no body to interpolate).");
|
|
2823
|
-
let l = new
|
|
2831
|
+
let l = new Ae(e), u = new Ae(t);
|
|
2824
2832
|
if (l.totalLength === 0) throw new n("from", e, "fromMorphSVG(): the `from` path has zero arc-length — a morph between a zero-length path and anything is malformed input, not an identity animation.");
|
|
2825
2833
|
if (u.totalLength === 0) throw new n("to", t, "fromMorphSVG(): the `to` path has zero arc-length — a morph between a zero-length path and anything is malformed input, not an identity animation.");
|
|
2826
|
-
let d =
|
|
2827
|
-
for (let e = 0; e <= i; e++) p[
|
|
2834
|
+
let d = va(l, i, o), f = va(u, i, o), p = {}, m = {};
|
|
2835
|
+
for (let e = 0; e <= i; e++) p[ha(e)] = d[e].x, p[ga(e)] = d[e].y, m[ha(e)] = f[e].x, m[ga(e)] = f[e].y, o && (p[_a(e)] = d[e].angle ?? 0, m[_a(e)] = f[e].angle ?? 0);
|
|
2828
2836
|
let h = {
|
|
2829
2837
|
"0%": p,
|
|
2830
2838
|
"100%": m
|
|
2831
|
-
}, g = a == null ? void 0 :
|
|
2839
|
+
}, g = a == null ? void 0 : xa(a, i), _ = a;
|
|
2832
2840
|
a != null && typeof _.setAttribute == "function" && _.setAttribute("d", e);
|
|
2833
|
-
let v = new
|
|
2841
|
+
let v = new U(c).fromKeyframes(h, g);
|
|
2834
2842
|
return s && v.play(), v;
|
|
2835
2843
|
}
|
|
2836
|
-
var
|
|
2844
|
+
var Ca = class extends ca {
|
|
2837
2845
|
samples;
|
|
2838
2846
|
constructor(e, t, n = {}) {
|
|
2839
|
-
super(
|
|
2847
|
+
super(Sa(e, t, n)), this.samples = n.samples ?? 64;
|
|
2840
2848
|
}
|
|
2841
2849
|
sampleD(e) {
|
|
2842
2850
|
let t = (e < 0 ? 0 : e > 1 ? 1 : e) * this.animation.options.duration, n = this.animation.interpFrames(t, !1), r = Array(this.samples + 1);
|
|
2843
2851
|
for (let e = 0; e <= this.samples; e++) {
|
|
2844
|
-
let t = n[
|
|
2852
|
+
let t = n[ha(e)], i = n[ga(e)];
|
|
2845
2853
|
r[e] = {
|
|
2846
2854
|
x: (typeof t == "number" ? t : void 0) ?? 0,
|
|
2847
2855
|
y: (typeof i == "number" ? i : void 0) ?? 0
|
|
2848
2856
|
};
|
|
2849
2857
|
}
|
|
2850
|
-
return
|
|
2858
|
+
return ba(r);
|
|
2851
2859
|
}
|
|
2852
|
-
},
|
|
2860
|
+
}, wa = "\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n", Ta = "\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n", Ea = "\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.05);\n }\n", Da = "\n8%,\n41% {\n transform: translateX(-10px);\n}\n25%,\n58% {\n transform: translateX(10px);\n}\n75% {\n transform: translateX(-5px);\n}\n92% {\n transform: translateX(5px);\n}\n0%,\n100% {\n transform: translateX(0);\n}\n", Oa = "\n 0%, 20%, 50%, 80%, 100% {\n transform: translateY(0);\n }\n 40% {\n transform: translateY(-30px);\n }\n 60% {\n transform: translateY(-15px);\n }\n", ka = "\n 0% {\n transform: perspective(400px) rotateY(0);\n animation-timing-function: ease-out;\n }\n 40% {\n transform: perspective(400px) translateZ(150px) rotateY(170deg);\n animation-timing-function: ease-out;\n }\n 50% {\n transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);\n animation-timing-function: ease-in;\n }\n 80% {\n transform: perspective(400px) rotateY(360deg) scale(.95);\n animation-timing-function: ease-in;\n }\n 100% {\n transform: perspective(400px) scale(1);\n animation-timing-function: ease-in;\n }\n", Aa = "\n 0% {\n transform-origin: center;\n transform: rotate3d(0, 0, 1, -200deg);\n opacity: 0;\n }\n 100% {\n transform-origin: center;\n transform: none;\n opacity: 1;\n }\n", ja = "\n 0% {\n transform: translateY(1000px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n", Ma = "\n 0% {\n transform: scale(1);\n }\n 14% {\n transform: scale(1.3);\n }\n 28% {\n transform: scale(1);\n }\n 42% {\n transform: scale(1.3);\n }\n 70% {\n transform: scale(1);\n }\n", Na = "\n 0%, 100% {\n box-shadow: 0 0 5px rgb(0 0 0 / 20%);\n }\n 50% {\n box-shadow: 0 0 20px rgb(0 0 0 / 80%);\n }\n", Pa = "\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n", Fa = "\n 0% {\n color: red;\n }\n 15% {\n color: orange;\n }\n 30% {\n color: yellow;\n }\n 45% {\n color: green;\n }\n 60% {\n color: blue;\n }\n 75% {\n color: indigo;\n }\n 90% {\n color: violet;\n }\n 100% {\n color: red;\n }\n", Ia = "@keyframes keyframeDelete {\n 0% {\n transform: translateX(0%) rotate(0deg);\n opacity: 1;\n }\n 25% {\n transform: translateX(0%) rotate(5deg);\n opacity: 1;\n }\n 50% {\n transform: translateX(25%) rotate(10deg);\n opacity: 0.5;\n }\n 75% {\n transform: translateX(0%) rotate(0deg);\n opacity: 0.25;\n }\n 100% {\n transform: translateX(-100%);\n opacity: 0;\n }\n}", La = "@keyframes keyframeDelete {\n 0% {\n transform: translateX(0%) rotate(0deg);\n opacity: 1;\n }\n 25% {\n transform: translateX(0%) rotate(-5deg);\n opacity: 1;\n }\n 50% {\n transform: translateX(-25%) rotate(-10deg);\n opacity: 0.5;\n }\n 100% {\n transform: translateX(100%);\n opacity: 0;\n }\n}", Ra = "\n0% {\n filter: blur(10px);\n opacity: 0;\n}\n100% {\n filter: blur(0px);\n opacity: 1;\n}\n", za = "\n0% {\n filter: blur(0px);\n opacity: 1;\n}\n100% {\n filter: blur(10px);\n opacity: 0;\n}\n", Ba = "\n0% {\n filter: blur(0px);\n}\n50% {\n filter: blur(10px);\n}\n100% {\n filter: blur(0px);\n}\n", Va = "\n0% {\n width: 0%;\n background-color: #ff9999;\n}\n25% {\n width: 25%;\n background-color: #ffcc99;\n}\n50% {\n width: 50%;\n background-color: #ffff99;\n}\n75% {\n width: 75%;\n background-color: #99ff99;\n}\n100% {\n width: 100%;\n background-color: #99ccff;\n}\n", Ha = "\n0% {\n background-position: -200% 0;\n}\n100% {\n background-position: 200% 0;\n}\n", Ua = "\n0%, 100% {\n filter: blur(0px);\n opacity: 1;\n}\n50% {\n filter: blur(4px);\n opacity: 0.5;\n}\n", Wa = "\n0% {\n background-position: 0% 50%;\n}\n50% {\n background-position: 100% 50%;\n}\n100% {\n background-position: 0% 50%;\n}\n", Ga = "\n0% {\n transform: rotate(0deg) scale(1);\n}\n25% {\n transform: rotate(90deg) scale(1.1);\n}\n50% {\n transform: rotate(180deg) scale(1);\n}\n75% {\n transform: rotate(270deg) scale(0.9);\n}\n100% {\n transform: rotate(360deg) scale(1);\n}\n", Ka = "\n0%, 100% {\n border-right-color: transparent;\n}\n50% {\n border-right-color: black;\n}\n", qa = "\n0% {\n max-height: 0;\n opacity: 0;\n}\n100% {\n max-height: 1000px;\n opacity: 1;\n}\n", Ja = "\n0%, 100% {\n transform: translateY(0);\n}\n25% {\n transform: translateY(-10px);\n}\n50% {\n transform: translateY(0);\n}\n75% {\n transform: translateY(-5px);\n}\n", Ya = "\n0% {\n transform: rotate(0deg);\n border-radius: 50%;\n}\n25% {\n transform: rotate(90deg);\n border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;\n}\n50% {\n transform: rotate(180deg);\n border-radius: 50%;\n}\n75% {\n transform: rotate(270deg);\n border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%;\n}\n100% {\n transform: rotate(360deg);\n border-radius: 50%;\n}\n", Xa = "\n0% {\n background-position: 50% 0%;\n}\n100% {\n background-position: 50% 100%;\n}\n", Za = "\n0% {\n transform: translateX(-100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", Qa = "\n0% {\n transform: translateX(0);\n opacity: 1;\n}\n100% {\n transform: translateX(-100%);\n opacity: 0;\n}\n", $a = "\n0% {\n transform: translateX(100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", eo = "\n0% {\n transform: translateX(0%);\n opacity: 1;\n\n}\n100% {\n transform: translateX(100%);\n opacity: 0;\n}\n", to = "\n0% {\n transform: translateY(0px);\n}\n50% {\n transform: translateY(5px);\n}\n100% {\n transform: translateY(0px);\n}\n", no = "\n0% {\n transform: rotateZ(0deg) translateY(0px);\n}\n25% {\n transform: rotateZ(2.5deg) translateY(-3px);\n}\n50% {\n transform: rotateZ(0deg) translateY(0px);\n}\n75% {\n transform: rotateZ(-2.5deg) translateY(-3px);\n}\n100% {\n transform: rotateZ(0deg) translateY(0px);\n}\n", ro = "\n0% {\n transform: scale(0.2) rotate(-24deg);\n opacity: 0;\n}\n100% {\n transform: scale(1) rotate(0deg);\n opacity: 1;\n}\n", io = "@keyframes keyframeShift {\n0% {\n transform: translateY(0%);\n opacity: 1;\n}\n\n50% {\n transform: translateY(-50%);\n opacity: 0.75;\n}\n\n100% {\n transform: translateY(-100%);\n opacity: 1;\n}\n}", ao = "@keyframes keyframeShift {\n0% {\n transform: translateY(0%);\n opacity: 1;\n}\n\n50% {\n transform: translateY(50%);\n opacity: 0.75;\n}\n\n100% {\n transform: translateY(100%);\n opacity: 1;\n}\n}", q = (e) => {
|
|
2853
2861
|
let t = e.trim();
|
|
2854
2862
|
if (!t.startsWith("@keyframes")) return e;
|
|
2855
2863
|
let n = t.indexOf("{"), r = t.lastIndexOf("}");
|
|
2856
2864
|
if (n === -1 || r <= n) return e;
|
|
2857
2865
|
let i = t.slice(10, n).trim();
|
|
2858
2866
|
return i === "" || i.includes("{") ? e : t.slice(n + 1, r);
|
|
2859
|
-
},
|
|
2867
|
+
}, oo = {
|
|
2860
2868
|
response: .35,
|
|
2861
2869
|
dampingFraction: .78
|
|
2862
|
-
},
|
|
2870
|
+
}, so = {
|
|
2863
2871
|
response: .5,
|
|
2864
2872
|
dampingFraction: .5
|
|
2865
|
-
},
|
|
2873
|
+
}, co = {
|
|
2866
2874
|
response: .7,
|
|
2867
2875
|
dampingFraction: .95
|
|
2868
|
-
},
|
|
2876
|
+
}, { response: lo, dampingFraction: uo } = Yr([
|
|
2877
|
+
1,
|
|
2878
|
+
120,
|
|
2879
|
+
12,
|
|
2880
|
+
0
|
|
2881
|
+
]), fo = {
|
|
2882
|
+
response: lo,
|
|
2883
|
+
dampingFraction: uo
|
|
2884
|
+
}, po = {
|
|
2869
2885
|
springScaleInKeyframes: "\n 0% {\n transform: scale(0.6);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n",
|
|
2870
2886
|
springSlideInKeyframes: "\n 0% {\n transform: translateY(40px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n",
|
|
2871
2887
|
springPopKeyframes: "\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.15);\n }\n",
|
|
2872
2888
|
springWobbleKeyframes: "\n 0%, 100% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(8deg);\n }\n"
|
|
2873
|
-
},
|
|
2889
|
+
}, mo = {
|
|
2874
2890
|
fadeIn: {
|
|
2875
|
-
css: q(
|
|
2891
|
+
css: q(wa),
|
|
2876
2892
|
options: {
|
|
2877
2893
|
duration: 700,
|
|
2878
2894
|
timingFunction: "ease-in-out"
|
|
@@ -2880,7 +2896,7 @@ var Sa = class extends ca {
|
|
|
2880
2896
|
group: "enter"
|
|
2881
2897
|
},
|
|
2882
2898
|
fadeOut: {
|
|
2883
|
-
css: q(
|
|
2899
|
+
css: q(Ta),
|
|
2884
2900
|
options: {
|
|
2885
2901
|
duration: 700,
|
|
2886
2902
|
timingFunction: "ease-in-out"
|
|
@@ -2888,7 +2904,7 @@ var Sa = class extends ca {
|
|
|
2888
2904
|
group: "exit"
|
|
2889
2905
|
},
|
|
2890
2906
|
pulse: {
|
|
2891
|
-
css: q(
|
|
2907
|
+
css: q(Ea),
|
|
2892
2908
|
options: {
|
|
2893
2909
|
duration: 1e3,
|
|
2894
2910
|
timingFunction: "ease-in-out",
|
|
@@ -2897,7 +2913,7 @@ var Sa = class extends ca {
|
|
|
2897
2913
|
group: "attention"
|
|
2898
2914
|
},
|
|
2899
2915
|
shake: {
|
|
2900
|
-
css: q(
|
|
2916
|
+
css: q(Da),
|
|
2901
2917
|
options: {
|
|
2902
2918
|
duration: 820,
|
|
2903
2919
|
timingFunction: "ease-in-out"
|
|
@@ -2905,7 +2921,7 @@ var Sa = class extends ca {
|
|
|
2905
2921
|
group: "attention"
|
|
2906
2922
|
},
|
|
2907
2923
|
bounce: {
|
|
2908
|
-
css: q(
|
|
2924
|
+
css: q(Oa),
|
|
2909
2925
|
options: {
|
|
2910
2926
|
duration: 1e3,
|
|
2911
2927
|
timingFunction: "cubic-bezier(0.28, 0.84, 0.42, 1)"
|
|
@@ -2913,7 +2929,7 @@ var Sa = class extends ca {
|
|
|
2913
2929
|
group: "attention"
|
|
2914
2930
|
},
|
|
2915
2931
|
flipPreset: {
|
|
2916
|
-
css: q(
|
|
2932
|
+
css: q(ka),
|
|
2917
2933
|
options: {
|
|
2918
2934
|
duration: 1e3,
|
|
2919
2935
|
timingFunction: "ease-in-out"
|
|
@@ -2922,7 +2938,7 @@ var Sa = class extends ca {
|
|
|
2922
2938
|
taxonomyName: "flip"
|
|
2923
2939
|
},
|
|
2924
2940
|
rotateIn: {
|
|
2925
|
-
css: q(
|
|
2941
|
+
css: q(Aa),
|
|
2926
2942
|
options: {
|
|
2927
2943
|
duration: 1e3,
|
|
2928
2944
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -2930,7 +2946,7 @@ var Sa = class extends ca {
|
|
|
2930
2946
|
group: "enter"
|
|
2931
2947
|
},
|
|
2932
2948
|
slideIn: {
|
|
2933
|
-
css: q(
|
|
2949
|
+
css: q(ja),
|
|
2934
2950
|
options: {
|
|
2935
2951
|
duration: 1e3,
|
|
2936
2952
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -2938,7 +2954,7 @@ var Sa = class extends ca {
|
|
|
2938
2954
|
group: "enter"
|
|
2939
2955
|
},
|
|
2940
2956
|
heartbeat: {
|
|
2941
|
-
css: q(
|
|
2957
|
+
css: q(Ma),
|
|
2942
2958
|
options: {
|
|
2943
2959
|
duration: 1500,
|
|
2944
2960
|
timingFunction: "ease-in-out",
|
|
@@ -2947,7 +2963,7 @@ var Sa = class extends ca {
|
|
|
2947
2963
|
group: "loop"
|
|
2948
2964
|
},
|
|
2949
2965
|
glow: {
|
|
2950
|
-
css: q(
|
|
2966
|
+
css: q(Na),
|
|
2951
2967
|
options: {
|
|
2952
2968
|
duration: 2e3,
|
|
2953
2969
|
timingFunction: "ease-in-out",
|
|
@@ -2956,7 +2972,7 @@ var Sa = class extends ca {
|
|
|
2956
2972
|
group: "loop"
|
|
2957
2973
|
},
|
|
2958
2974
|
typewriter: {
|
|
2959
|
-
css: q(
|
|
2975
|
+
css: q(Pa),
|
|
2960
2976
|
options: {
|
|
2961
2977
|
duration: 3e3,
|
|
2962
2978
|
timingFunction: "steps(40, jump-end)",
|
|
@@ -2964,7 +2980,7 @@ var Sa = class extends ca {
|
|
|
2964
2980
|
}
|
|
2965
2981
|
},
|
|
2966
2982
|
rainbowText: {
|
|
2967
|
-
css: q(
|
|
2983
|
+
css: q(Fa),
|
|
2968
2984
|
options: {
|
|
2969
2985
|
duration: 5e3,
|
|
2970
2986
|
timingFunction: "linear",
|
|
@@ -2973,7 +2989,7 @@ var Sa = class extends ca {
|
|
|
2973
2989
|
group: "loop"
|
|
2974
2990
|
},
|
|
2975
2991
|
warpLeft: {
|
|
2976
|
-
css: q(
|
|
2992
|
+
css: q(Ia),
|
|
2977
2993
|
options: {
|
|
2978
2994
|
duration: 700,
|
|
2979
2995
|
timingFunction: "ease-in-bounce"
|
|
@@ -2981,7 +2997,7 @@ var Sa = class extends ca {
|
|
|
2981
2997
|
group: "exit"
|
|
2982
2998
|
},
|
|
2983
2999
|
warpRight: {
|
|
2984
|
-
css: q(
|
|
3000
|
+
css: q(La),
|
|
2985
3001
|
options: {
|
|
2986
3002
|
duration: 700,
|
|
2987
3003
|
timingFunction: "ease-in-bounce"
|
|
@@ -2989,7 +3005,7 @@ var Sa = class extends ca {
|
|
|
2989
3005
|
group: "exit"
|
|
2990
3006
|
},
|
|
2991
3007
|
blurIn: {
|
|
2992
|
-
css: q(
|
|
3008
|
+
css: q(Ra),
|
|
2993
3009
|
options: {
|
|
2994
3010
|
duration: 2e3,
|
|
2995
3011
|
timingFunction: "ease-in-out"
|
|
@@ -2997,7 +3013,7 @@ var Sa = class extends ca {
|
|
|
2997
3013
|
group: "enter"
|
|
2998
3014
|
},
|
|
2999
3015
|
blurOut: {
|
|
3000
|
-
css: q(
|
|
3016
|
+
css: q(za),
|
|
3001
3017
|
options: {
|
|
3002
3018
|
duration: 2e3,
|
|
3003
3019
|
timingFunction: "ease-in-out"
|
|
@@ -3005,14 +3021,14 @@ var Sa = class extends ca {
|
|
|
3005
3021
|
group: "exit"
|
|
3006
3022
|
},
|
|
3007
3023
|
blurInOut: {
|
|
3008
|
-
css: q(
|
|
3024
|
+
css: q(Ba),
|
|
3009
3025
|
options: {
|
|
3010
3026
|
duration: 2e3,
|
|
3011
3027
|
timingFunction: "ease-in-out"
|
|
3012
3028
|
}
|
|
3013
3029
|
},
|
|
3014
3030
|
progressBar: {
|
|
3015
|
-
css: q(
|
|
3031
|
+
css: q(Va),
|
|
3016
3032
|
options: {
|
|
3017
3033
|
duration: 3e3,
|
|
3018
3034
|
timingFunction: "linear",
|
|
@@ -3020,7 +3036,7 @@ var Sa = class extends ca {
|
|
|
3020
3036
|
}
|
|
3021
3037
|
},
|
|
3022
3038
|
skeletonLoading: {
|
|
3023
|
-
css: q(
|
|
3039
|
+
css: q(Ha),
|
|
3024
3040
|
options: {
|
|
3025
3041
|
duration: 1500,
|
|
3026
3042
|
timingFunction: "linear",
|
|
@@ -3029,14 +3045,14 @@ var Sa = class extends ca {
|
|
|
3029
3045
|
group: "loop"
|
|
3030
3046
|
},
|
|
3031
3047
|
textFocusBlur: {
|
|
3032
|
-
css: q(
|
|
3048
|
+
css: q(Ua),
|
|
3033
3049
|
options: {
|
|
3034
3050
|
duration: 2e3,
|
|
3035
3051
|
timingFunction: "ease-in-out"
|
|
3036
3052
|
}
|
|
3037
3053
|
},
|
|
3038
3054
|
gradientBackground: {
|
|
3039
|
-
css: q(
|
|
3055
|
+
css: q(Wa),
|
|
3040
3056
|
options: {
|
|
3041
3057
|
duration: 5e3,
|
|
3042
3058
|
timingFunction: "ease-in-out",
|
|
@@ -3045,14 +3061,14 @@ var Sa = class extends ca {
|
|
|
3045
3061
|
group: "loop"
|
|
3046
3062
|
},
|
|
3047
3063
|
rotateScale: {
|
|
3048
|
-
css: q(
|
|
3064
|
+
css: q(Ga),
|
|
3049
3065
|
options: {
|
|
3050
3066
|
duration: 2500,
|
|
3051
3067
|
timingFunction: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
3052
3068
|
}
|
|
3053
3069
|
},
|
|
3054
3070
|
typingCursor: {
|
|
3055
|
-
css: q(
|
|
3071
|
+
css: q(Ka),
|
|
3056
3072
|
options: {
|
|
3057
3073
|
duration: 800,
|
|
3058
3074
|
timingFunction: "steps(2, jump-start)",
|
|
@@ -3061,7 +3077,7 @@ var Sa = class extends ca {
|
|
|
3061
3077
|
group: "loop"
|
|
3062
3078
|
},
|
|
3063
3079
|
accordionExpand: {
|
|
3064
|
-
css: q(
|
|
3080
|
+
css: q(qa),
|
|
3065
3081
|
options: {
|
|
3066
3082
|
duration: 500,
|
|
3067
3083
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
|
|
@@ -3069,7 +3085,7 @@ var Sa = class extends ca {
|
|
|
3069
3085
|
}
|
|
3070
3086
|
},
|
|
3071
3087
|
notificationBounce: {
|
|
3072
|
-
css: q(
|
|
3088
|
+
css: q(Ja),
|
|
3073
3089
|
options: {
|
|
3074
3090
|
duration: 1e3,
|
|
3075
3091
|
timingFunction: "cubic-bezier(0.28, 0.84, 0.42, 1)"
|
|
@@ -3077,7 +3093,7 @@ var Sa = class extends ca {
|
|
|
3077
3093
|
group: "attention"
|
|
3078
3094
|
},
|
|
3079
3095
|
spinner: {
|
|
3080
|
-
css: q(
|
|
3096
|
+
css: q(Ya),
|
|
3081
3097
|
options: {
|
|
3082
3098
|
duration: 2e3,
|
|
3083
3099
|
timingFunction: "linear",
|
|
@@ -3086,7 +3102,7 @@ var Sa = class extends ca {
|
|
|
3086
3102
|
group: "loop"
|
|
3087
3103
|
},
|
|
3088
3104
|
parallaxScroll: {
|
|
3089
|
-
css: q(
|
|
3105
|
+
css: q(Xa),
|
|
3090
3106
|
options: {
|
|
3091
3107
|
duration: 1e4,
|
|
3092
3108
|
timingFunction: "linear",
|
|
@@ -3095,7 +3111,7 @@ var Sa = class extends ca {
|
|
|
3095
3111
|
group: "loop"
|
|
3096
3112
|
},
|
|
3097
3113
|
slideInLeft: {
|
|
3098
|
-
css: q(
|
|
3114
|
+
css: q(Za),
|
|
3099
3115
|
options: {
|
|
3100
3116
|
duration: 1e3,
|
|
3101
3117
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3103,7 +3119,7 @@ var Sa = class extends ca {
|
|
|
3103
3119
|
group: "enter"
|
|
3104
3120
|
},
|
|
3105
3121
|
slideOutLeft: {
|
|
3106
|
-
css: q(
|
|
3122
|
+
css: q(Qa),
|
|
3107
3123
|
options: {
|
|
3108
3124
|
duration: 1e3,
|
|
3109
3125
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3111,7 +3127,7 @@ var Sa = class extends ca {
|
|
|
3111
3127
|
group: "exit"
|
|
3112
3128
|
},
|
|
3113
3129
|
slideInRight: {
|
|
3114
|
-
css: q(
|
|
3130
|
+
css: q($a),
|
|
3115
3131
|
options: {
|
|
3116
3132
|
duration: 1e3,
|
|
3117
3133
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3119,7 +3135,7 @@ var Sa = class extends ca {
|
|
|
3119
3135
|
group: "enter"
|
|
3120
3136
|
},
|
|
3121
3137
|
slideOutRight: {
|
|
3122
|
-
css: q(
|
|
3138
|
+
css: q(eo),
|
|
3123
3139
|
options: {
|
|
3124
3140
|
duration: 1e3,
|
|
3125
3141
|
timingFunction: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
@@ -3127,7 +3143,7 @@ var Sa = class extends ca {
|
|
|
3127
3143
|
group: "exit"
|
|
3128
3144
|
},
|
|
3129
3145
|
hover: {
|
|
3130
|
-
css: q(
|
|
3146
|
+
css: q(to),
|
|
3131
3147
|
options: {
|
|
3132
3148
|
duration: 3e3,
|
|
3133
3149
|
timingFunction: "ease-in-out",
|
|
@@ -3137,8 +3153,28 @@ var Sa = class extends ca {
|
|
|
3137
3153
|
},
|
|
3138
3154
|
group: "loop"
|
|
3139
3155
|
},
|
|
3156
|
+
garlandSway: {
|
|
3157
|
+
css: no,
|
|
3158
|
+
options: {
|
|
3159
|
+
duration: 4200,
|
|
3160
|
+
timingFunction: "ease-in-out",
|
|
3161
|
+
iterationCount: Infinity,
|
|
3162
|
+
fillMode: "none",
|
|
3163
|
+
direction: "normal"
|
|
3164
|
+
},
|
|
3165
|
+
group: "loop"
|
|
3166
|
+
},
|
|
3167
|
+
unfurl: {
|
|
3168
|
+
css: ro,
|
|
3169
|
+
options: {
|
|
3170
|
+
duration: 900,
|
|
3171
|
+
timingFunction: i(fo),
|
|
3172
|
+
fillMode: "none"
|
|
3173
|
+
},
|
|
3174
|
+
group: "enter"
|
|
3175
|
+
},
|
|
3140
3176
|
jumpUp: {
|
|
3141
|
-
css: q(
|
|
3177
|
+
css: q(io),
|
|
3142
3178
|
options: {
|
|
3143
3179
|
duration: 700,
|
|
3144
3180
|
timingFunction: "ease-in-bounce"
|
|
@@ -3146,7 +3182,7 @@ var Sa = class extends ca {
|
|
|
3146
3182
|
group: "enter"
|
|
3147
3183
|
},
|
|
3148
3184
|
jumpDown: {
|
|
3149
|
-
css: q(
|
|
3185
|
+
css: q(ao),
|
|
3150
3186
|
options: {
|
|
3151
3187
|
duration: 700,
|
|
3152
3188
|
timingFunction: "ease-in-bounce"
|
|
@@ -3154,141 +3190,143 @@ var Sa = class extends ca {
|
|
|
3154
3190
|
group: "exit"
|
|
3155
3191
|
},
|
|
3156
3192
|
springScaleIn: {
|
|
3157
|
-
css:
|
|
3193
|
+
css: po.springScaleInKeyframes,
|
|
3158
3194
|
options: {
|
|
3159
3195
|
duration: 600,
|
|
3160
|
-
timingFunction: i(
|
|
3196
|
+
timingFunction: i(so)
|
|
3161
3197
|
},
|
|
3162
3198
|
group: "enter"
|
|
3163
3199
|
},
|
|
3164
3200
|
springSlideIn: {
|
|
3165
|
-
css:
|
|
3201
|
+
css: po.springSlideInKeyframes,
|
|
3166
3202
|
options: {
|
|
3167
3203
|
duration: 600,
|
|
3168
|
-
timingFunction: i(
|
|
3204
|
+
timingFunction: i(oo)
|
|
3169
3205
|
},
|
|
3170
3206
|
group: "enter"
|
|
3171
3207
|
},
|
|
3172
3208
|
springPop: {
|
|
3173
|
-
css:
|
|
3209
|
+
css: po.springPopKeyframes,
|
|
3174
3210
|
options: {
|
|
3175
3211
|
duration: 700,
|
|
3176
|
-
timingFunction: i(
|
|
3212
|
+
timingFunction: i(so)
|
|
3177
3213
|
},
|
|
3178
3214
|
group: "attention"
|
|
3179
3215
|
},
|
|
3180
3216
|
springWobble: {
|
|
3181
|
-
css:
|
|
3217
|
+
css: po.springWobbleKeyframes,
|
|
3182
3218
|
options: {
|
|
3183
3219
|
duration: 800,
|
|
3184
|
-
timingFunction: i(
|
|
3220
|
+
timingFunction: i(co)
|
|
3185
3221
|
},
|
|
3186
3222
|
group: "attention"
|
|
3187
3223
|
}
|
|
3188
|
-
},
|
|
3224
|
+
}, ho = (e) => (t) => new U({
|
|
3189
3225
|
...e.options,
|
|
3190
3226
|
...t ?? {}
|
|
3191
|
-
}).fromString(e.css),
|
|
3192
|
-
enter:
|
|
3193
|
-
exit:
|
|
3194
|
-
attention:
|
|
3195
|
-
loop:
|
|
3196
|
-
},
|
|
3197
|
-
accordionExpand: () =>
|
|
3198
|
-
attentionPresets: () =>
|
|
3199
|
-
blurIn: () =>
|
|
3200
|
-
blurInOut: () =>
|
|
3201
|
-
blurOut: () =>
|
|
3202
|
-
bounce: () =>
|
|
3203
|
-
enterPresets: () =>
|
|
3204
|
-
exitPresets: () =>
|
|
3205
|
-
fadeIn: () =>
|
|
3206
|
-
fadeOut: () =>
|
|
3207
|
-
flipPreset: () =>
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3227
|
+
}).fromString(e.css), go = Object.fromEntries(Object.entries(mo).map(([e, t]) => [e, ho(t)])), { fadeIn: _o, fadeOut: vo, pulse: yo, shake: bo, bounce: xo, flipPreset: So, rotateIn: Co, slideIn: wo, heartbeat: To, glow: Eo, typewriter: Do, rainbowText: Oo, warpLeft: ko, warpRight: Ao, blurIn: jo, blurOut: Mo, blurInOut: No, progressBar: Po, skeletonLoading: Fo, textFocusBlur: Io, gradientBackground: Lo, rotateScale: Ro, typingCursor: zo, accordionExpand: Bo, notificationBounce: Vo, spinner: Ho, parallaxScroll: Uo, slideInLeft: Wo, slideOutLeft: Go, slideInRight: Ko, slideOutRight: qo, hover: Jo, garlandSway: Yo, unfurl: Xo, jumpUp: Zo, jumpDown: Qo, springScaleIn: $o, springSlideIn: es, springPop: ts, springWobble: ns } = go, rs = (e) => Object.fromEntries(Object.entries(mo).filter(([, t]) => t.group === e).map(([e, t]) => [t.taxonomyName ?? e, go[e]])), is = rs("enter"), as = rs("exit"), os = rs("attention"), ss = rs("loop"), cs = {
|
|
3228
|
+
enter: is,
|
|
3229
|
+
exit: as,
|
|
3230
|
+
attention: os,
|
|
3231
|
+
loop: ss
|
|
3232
|
+
}, ls = /* @__PURE__ */ Me({
|
|
3233
|
+
accordionExpand: () => Bo,
|
|
3234
|
+
attentionPresets: () => os,
|
|
3235
|
+
blurIn: () => jo,
|
|
3236
|
+
blurInOut: () => No,
|
|
3237
|
+
blurOut: () => Mo,
|
|
3238
|
+
bounce: () => xo,
|
|
3239
|
+
enterPresets: () => is,
|
|
3240
|
+
exitPresets: () => as,
|
|
3241
|
+
fadeIn: () => _o,
|
|
3242
|
+
fadeOut: () => vo,
|
|
3243
|
+
flipPreset: () => So,
|
|
3244
|
+
garlandSway: () => Yo,
|
|
3245
|
+
glow: () => Eo,
|
|
3246
|
+
gradientBackground: () => Lo,
|
|
3247
|
+
heartbeat: () => To,
|
|
3248
|
+
hover: () => Jo,
|
|
3249
|
+
jumpDown: () => Qo,
|
|
3250
|
+
jumpUp: () => Zo,
|
|
3251
|
+
loopPresets: () => ss,
|
|
3252
|
+
notificationBounce: () => Vo,
|
|
3253
|
+
parallaxScroll: () => Uo,
|
|
3254
|
+
presetTaxonomy: () => cs,
|
|
3255
|
+
progressBar: () => Po,
|
|
3256
|
+
pulse: () => yo,
|
|
3257
|
+
rainbowText: () => Oo,
|
|
3258
|
+
rotateIn: () => Co,
|
|
3259
|
+
rotateScale: () => Ro,
|
|
3260
|
+
shake: () => bo,
|
|
3261
|
+
skeletonLoading: () => Fo,
|
|
3262
|
+
slideIn: () => wo,
|
|
3263
|
+
slideInLeft: () => Wo,
|
|
3264
|
+
slideInRight: () => Ko,
|
|
3265
|
+
slideOutLeft: () => Go,
|
|
3266
|
+
slideOutRight: () => qo,
|
|
3267
|
+
spinner: () => Ho,
|
|
3268
|
+
springPop: () => ts,
|
|
3269
|
+
springScaleIn: () => $o,
|
|
3270
|
+
springSlideIn: () => es,
|
|
3271
|
+
springWobble: () => ns,
|
|
3272
|
+
textFocusBlur: () => Io,
|
|
3273
|
+
typewriter: () => Do,
|
|
3274
|
+
typingCursor: () => zo,
|
|
3275
|
+
unfurl: () => Xo,
|
|
3276
|
+
warpLeft: () => ko,
|
|
3277
|
+
warpRight: () => Ao
|
|
3278
|
+
}), us = (e, t, n, r = {}) => {
|
|
3241
3279
|
e.push({
|
|
3242
3280
|
code: t,
|
|
3243
3281
|
message: n,
|
|
3244
3282
|
...r
|
|
3245
3283
|
});
|
|
3246
|
-
},
|
|
3284
|
+
}, ds = (e) => {
|
|
3247
3285
|
if (typeof CSSKeyframesRule < "u" && e instanceof CSSKeyframesRule) return !0;
|
|
3248
3286
|
let t = e;
|
|
3249
3287
|
return t.type === 7 && typeof t.name == "string" && typeof t.cssText == "string";
|
|
3250
|
-
},
|
|
3288
|
+
}, fs = 32, ps = (e) => {
|
|
3251
3289
|
let t = (t) => typeof e?.getPropertyValue == "function" ? String(e.getPropertyValue(t) ?? "") : "", n = `${t("animation-name")} ${t("animation")}`;
|
|
3252
3290
|
return new Set(n.split(/[\s,]+/).filter((e) => e !== ""));
|
|
3253
|
-
},
|
|
3291
|
+
}, ms = (e) => e.cssRules !== void 0 && !ds(e), hs = (e, t, n, r = 0) => {
|
|
3254
3292
|
let i = [];
|
|
3255
3293
|
for (let t = 0; t < e.length; t++) {
|
|
3256
3294
|
let n = e[t];
|
|
3257
3295
|
n?.type === 1 && typeof n.cssText == "string" && i.push({
|
|
3258
3296
|
cssText: n.cssText,
|
|
3259
|
-
names:
|
|
3297
|
+
names: ps(n.style)
|
|
3260
3298
|
});
|
|
3261
3299
|
}
|
|
3262
3300
|
for (let r = 0; r < e.length; r++) {
|
|
3263
3301
|
let a = e[r];
|
|
3264
|
-
if (a == null || !
|
|
3302
|
+
if (a == null || !ds(a)) continue;
|
|
3265
3303
|
let o = a.name;
|
|
3266
3304
|
if (n.animationName != null && o !== n.animationName) continue;
|
|
3267
|
-
let s = i.find((e) => e.names.has(o))?.cssText, c = [], l =
|
|
3305
|
+
let s = i.find((e) => e.names.has(o))?.cssText, c = [], l = gs(a.cssText, s, n.options, c);
|
|
3268
3306
|
l != null && t.set(o, {
|
|
3269
3307
|
name: o,
|
|
3270
3308
|
animation: l,
|
|
3271
3309
|
diagnostics: c
|
|
3272
3310
|
});
|
|
3273
3311
|
}
|
|
3274
|
-
if (r <
|
|
3312
|
+
if (r < fs) for (let i = 0; i < e.length; i++) {
|
|
3275
3313
|
let a = e[i];
|
|
3276
|
-
a == null || !
|
|
3314
|
+
a == null || !ms(a) || hs(a.cssRules, t, n, r + 1);
|
|
3277
3315
|
}
|
|
3278
|
-
},
|
|
3316
|
+
}, gs = (e, t, n, r) => {
|
|
3279
3317
|
try {
|
|
3280
|
-
let i = new
|
|
3318
|
+
let i = new U(n ?? {}), a = t ? `${t}\n${e}` : e;
|
|
3281
3319
|
i.fromString(a);
|
|
3282
3320
|
for (let e of i.diagnostics) r.push(e);
|
|
3283
3321
|
return i;
|
|
3284
3322
|
} catch (t) {
|
|
3285
|
-
|
|
3323
|
+
us(r, "PARSE_ERROR", `@keyframes rule could not be reconstructed: ${t instanceof Error ? t.message : String(t)} — the source CSS could not be parsed faithfully (refused, not approximated)`, { input: e });
|
|
3286
3324
|
return;
|
|
3287
3325
|
}
|
|
3288
|
-
},
|
|
3326
|
+
}, _s = (e, t = {}) => {
|
|
3289
3327
|
let n = /* @__PURE__ */ new Map(), r = [], i;
|
|
3290
3328
|
if (e == null) {
|
|
3291
|
-
if (typeof document > "u") return
|
|
3329
|
+
if (typeof document > "u") return us(r, "CORS_SKIP", "no document in scope — resolveLiveKeyframes() needs a Document, a ShadowRoot, a CSSStyleSheet[], or a CSSStyleSheet (SSR has no live CSSOM)"), {
|
|
3292
3330
|
animations: n,
|
|
3293
3331
|
diagnostics: r
|
|
3294
3332
|
};
|
|
@@ -3300,18 +3338,18 @@ var Sa = class extends ca {
|
|
|
3300
3338
|
i = e.cssRules;
|
|
3301
3339
|
} catch (t) {
|
|
3302
3340
|
let n = e.href ?? "(inline)";
|
|
3303
|
-
|
|
3341
|
+
us(r, "CORS_SKIP", `cross-origin stylesheet skipped: ${n} — its cssRules threw ${t instanceof Error ? t.name : "an error"} (no Access-Control-Allow-Origin + crossorigin). The sheet is REPORTED, not silently dropped.`, { input: n });
|
|
3304
3342
|
continue;
|
|
3305
3343
|
}
|
|
3306
|
-
i != null &&
|
|
3344
|
+
i != null && hs(i, n, t);
|
|
3307
3345
|
}
|
|
3308
3346
|
return {
|
|
3309
3347
|
animations: n,
|
|
3310
3348
|
diagnostics: r
|
|
3311
3349
|
};
|
|
3312
|
-
},
|
|
3350
|
+
}, vs = (e, t = {}) => _s(e, t), ys = (e, t = {}) => {
|
|
3313
3351
|
let n = /* @__PURE__ */ new Map(), r = [], i = e ?? (typeof document < "u" ? document : void 0);
|
|
3314
|
-
if (i == null || typeof i.getAnimations != "function") return
|
|
3352
|
+
if (i == null || typeof i.getAnimations != "function") return us(r, "CORS_SKIP", "no getAnimations() in scope — fromLiveAnimations() needs a Document or Element with the Web Animations API (SSR has none)"), {
|
|
3315
3353
|
animations: n,
|
|
3316
3354
|
diagnostics: r
|
|
3317
3355
|
};
|
|
@@ -3322,7 +3360,7 @@ var Sa = class extends ca {
|
|
|
3322
3360
|
}
|
|
3323
3361
|
let o = (i instanceof Document ? i : i.ownerDocument ?? (typeof document < "u" ? document : void 0)) ?? void 0;
|
|
3324
3362
|
for (let e of a) {
|
|
3325
|
-
let i =
|
|
3363
|
+
let i = _s(o, {
|
|
3326
3364
|
...t,
|
|
3327
3365
|
animationName: e
|
|
3328
3366
|
});
|
|
@@ -3333,11 +3371,11 @@ var Sa = class extends ca {
|
|
|
3333
3371
|
animations: n,
|
|
3334
3372
|
diagnostics: r
|
|
3335
3373
|
};
|
|
3336
|
-
},
|
|
3374
|
+
}, bs = (e) => {
|
|
3337
3375
|
if (typeof e != "object" || !e) return !1;
|
|
3338
3376
|
let t = e;
|
|
3339
3377
|
return typeof t.value == "number" && typeof t.unit == "string";
|
|
3340
|
-
},
|
|
3378
|
+
}, xs = async (e, t) => {
|
|
3341
3379
|
let n = [], { animationName: r, commit: i = !0 } = t;
|
|
3342
3380
|
if (typeof e.getAnimations != "function") return n.push({
|
|
3343
3381
|
code: "WAAPI_INELIGIBLE",
|
|
@@ -3358,7 +3396,7 @@ var Sa = class extends ca {
|
|
|
3358
3396
|
};
|
|
3359
3397
|
let o = a.currentTime, s = null, c = 0;
|
|
3360
3398
|
if (typeof o == "number" && Number.isFinite(o)) c = o;
|
|
3361
|
-
else if (
|
|
3399
|
+
else if (bs(o)) if (o.unit === "percent" && Number.isFinite(o.value)) s = o.value / 100;
|
|
3362
3400
|
else return n.push({
|
|
3363
3401
|
code: "ADOPT_REFUSE",
|
|
3364
3402
|
message: `the running animation "${r}" reports a currentTime in an unsupported unit "${String(o.unit)}" — adoptRunning() refuses (only a numeric ms playhead or a scroll-driven "percent" CSSUnitValue can seed the takeover faithfully)`
|
|
@@ -3367,7 +3405,7 @@ var Sa = class extends ca {
|
|
|
3367
3405
|
currentTime: 0,
|
|
3368
3406
|
diagnostics: n
|
|
3369
3407
|
};
|
|
3370
|
-
let l =
|
|
3408
|
+
let l = _s(e.ownerDocument ?? (typeof document < "u" ? document : void 0) ?? void 0, {
|
|
3371
3409
|
...t,
|
|
3372
3410
|
animationName: r
|
|
3373
3411
|
});
|
|
@@ -3389,14 +3427,14 @@ var Sa = class extends ca {
|
|
|
3389
3427
|
try {
|
|
3390
3428
|
a.cancel();
|
|
3391
3429
|
} catch {}
|
|
3392
|
-
return
|
|
3430
|
+
return Ss(d, f), {
|
|
3393
3431
|
animation: d,
|
|
3394
3432
|
currentTime: f,
|
|
3395
3433
|
diagnostics: n
|
|
3396
3434
|
};
|
|
3397
|
-
},
|
|
3435
|
+
}, Ss = (e, t) => {
|
|
3398
3436
|
e.setUseWAAPI(!1), e.setDelay(0), e.onStart(), e.started = !0, e.startTime = (typeof performance < "u" && performance.now ? performance.now() : Date.now()) - t, e.t = t, e.play();
|
|
3399
|
-
},
|
|
3437
|
+
}, Cs = {
|
|
3400
3438
|
entry: j.entry,
|
|
3401
3439
|
cover: j.cover,
|
|
3402
3440
|
contain: j.contain,
|
|
@@ -3414,7 +3452,7 @@ var Sa = class extends ca {
|
|
|
3414
3452
|
end: 1
|
|
3415
3453
|
}
|
|
3416
3454
|
};
|
|
3417
|
-
function
|
|
3455
|
+
function ws(e) {
|
|
3418
3456
|
if (e == null) return null;
|
|
3419
3457
|
let t = e.trim();
|
|
3420
3458
|
if (t.endsWith("%")) {
|
|
@@ -3423,24 +3461,24 @@ function gs(e) {
|
|
|
3423
3461
|
}
|
|
3424
3462
|
return null;
|
|
3425
3463
|
}
|
|
3426
|
-
function
|
|
3464
|
+
function Ts(e, t) {
|
|
3427
3465
|
if (e == null) return t;
|
|
3428
|
-
let n =
|
|
3466
|
+
let n = ws(e.offset);
|
|
3429
3467
|
if (n != null) {
|
|
3430
3468
|
if (e.phase != null && e.phase !== "normal") {
|
|
3431
|
-
let t =
|
|
3469
|
+
let t = Cs[e.phase];
|
|
3432
3470
|
return t.start + n * (t.end - t.start);
|
|
3433
3471
|
}
|
|
3434
3472
|
return n;
|
|
3435
3473
|
}
|
|
3436
|
-
return e.phase == null ? t :
|
|
3474
|
+
return e.phase == null ? t : Cs[e.phase].start;
|
|
3437
3475
|
}
|
|
3438
|
-
function
|
|
3476
|
+
function Es(e) {
|
|
3439
3477
|
if (e == null) return {
|
|
3440
3478
|
start: 0,
|
|
3441
3479
|
end: 1
|
|
3442
3480
|
};
|
|
3443
|
-
let t =
|
|
3481
|
+
let t = Ts(e.start, 0), n = Ts(e.end, 1);
|
|
3444
3482
|
return n > t ? {
|
|
3445
3483
|
start: t,
|
|
3446
3484
|
end: n
|
|
@@ -3451,7 +3489,7 @@ function vs(e) {
|
|
|
3451
3489
|
}
|
|
3452
3490
|
//#endregion
|
|
3453
3491
|
//#region src/animation/scroll/scene.ts
|
|
3454
|
-
var
|
|
3492
|
+
var Ds = class {
|
|
3455
3493
|
resolvedRange;
|
|
3456
3494
|
snapPoints;
|
|
3457
3495
|
snapSpring;
|
|
@@ -3462,7 +3500,7 @@ var ys = class {
|
|
|
3462
3500
|
wasInside = !1;
|
|
3463
3501
|
subscribers = new Map([["enter", /* @__PURE__ */ new Set()], ["leave", /* @__PURE__ */ new Set()]]);
|
|
3464
3502
|
constructor(e = {}) {
|
|
3465
|
-
if (this.resolvedRange =
|
|
3503
|
+
if (this.resolvedRange = Es(e.range), this.scrubSeconds = e.scrub ?? 0, this.snapPoints = e.snap != null && e.snap.length > 0 ? e.snap : void 0, this.scrubSeconds > 0) {
|
|
3466
3504
|
let t = g(1 / (this.scrubSeconds * 60 + 1), .01, 1);
|
|
3467
3505
|
this.smoother = new d({
|
|
3468
3506
|
damping: t,
|
|
@@ -3512,12 +3550,12 @@ var ys = class {
|
|
|
3512
3550
|
for (let n of this.subscribers.get(e)) n(t);
|
|
3513
3551
|
}
|
|
3514
3552
|
};
|
|
3515
|
-
function
|
|
3516
|
-
return new
|
|
3553
|
+
function Os(e = {}) {
|
|
3554
|
+
return new Ds(e);
|
|
3517
3555
|
}
|
|
3518
3556
|
//#endregion
|
|
3519
3557
|
//#region src/animation/scroll/dispatch.ts
|
|
3520
|
-
function
|
|
3558
|
+
function ks(e) {
|
|
3521
3559
|
let { animation: t, nativeSpec: n, scrub: r, snap: i, velocity: a } = e;
|
|
3522
3560
|
if (r) return {
|
|
3523
3561
|
backend: "js",
|
|
@@ -3545,7 +3583,7 @@ function xs(e) {
|
|
|
3545
3583
|
backend: "js",
|
|
3546
3584
|
reason: "native scroll/view timeline unavailable (feature absent)"
|
|
3547
3585
|
};
|
|
3548
|
-
let c =
|
|
3586
|
+
let c = Sn(t, n, {
|
|
3549
3587
|
eligibility: o,
|
|
3550
3588
|
timeline: s
|
|
3551
3589
|
});
|
|
@@ -3557,13 +3595,13 @@ function xs(e) {
|
|
|
3557
3595
|
reason: c.reason
|
|
3558
3596
|
};
|
|
3559
3597
|
}
|
|
3560
|
-
function
|
|
3598
|
+
function As(e) {
|
|
3561
3599
|
let t = ["position: sticky;"];
|
|
3562
3600
|
return e?.bottom == null ? t.push(`top: ${e?.top ?? 0}px;`) : t.push(`bottom: ${e.bottom}px;`), t.join(" ");
|
|
3563
3601
|
}
|
|
3564
3602
|
//#endregion
|
|
3565
3603
|
//#region src/animation/scroll/trigger.ts
|
|
3566
|
-
function
|
|
3604
|
+
function js() {
|
|
3567
3605
|
let e = globalThis.CSS;
|
|
3568
3606
|
if (e == null || typeof e.supports != "function") return !1;
|
|
3569
3607
|
try {
|
|
@@ -3572,7 +3610,7 @@ function Cs() {
|
|
|
3572
3610
|
return !1;
|
|
3573
3611
|
}
|
|
3574
3612
|
}
|
|
3575
|
-
var
|
|
3613
|
+
var Ms = class {
|
|
3576
3614
|
type;
|
|
3577
3615
|
triggerRange;
|
|
3578
3616
|
_state = "idle";
|
|
@@ -3582,7 +3620,7 @@ var ws = class {
|
|
|
3582
3620
|
wasInside = !1;
|
|
3583
3621
|
everEntered = !1;
|
|
3584
3622
|
constructor(e = {}) {
|
|
3585
|
-
this.type = e.type ?? "once", this.triggerRange =
|
|
3623
|
+
this.type = e.type ?? "once", this.triggerRange = Es(e.range);
|
|
3586
3624
|
}
|
|
3587
3625
|
get state() {
|
|
3588
3626
|
return this._state;
|
|
@@ -3600,7 +3638,7 @@ var ws = class {
|
|
|
3600
3638
|
return this.triggerRange;
|
|
3601
3639
|
}
|
|
3602
3640
|
get usesNative() {
|
|
3603
|
-
return
|
|
3641
|
+
return js();
|
|
3604
3642
|
}
|
|
3605
3643
|
triggerProgress(e) {
|
|
3606
3644
|
let t = g(e, 0, 1), { start: n, end: r } = this.triggerRange, i = r - n, a = i > 0 ? g((t - n) / i, 0, 1) : 0, o = t >= n && t <= r, s = o && !this.wasInside, c = !o && this.wasInside, l = c && t > r;
|
|
@@ -3639,18 +3677,18 @@ var ws = class {
|
|
|
3639
3677
|
return this._direction === "forward" ? e : 1 - e;
|
|
3640
3678
|
}
|
|
3641
3679
|
};
|
|
3642
|
-
function
|
|
3643
|
-
return new
|
|
3680
|
+
function Ns(e = {}) {
|
|
3681
|
+
return new Ms("trigger" in e && e.trigger != null ? e.trigger : e);
|
|
3644
3682
|
}
|
|
3645
3683
|
//#endregion
|
|
3646
3684
|
//#region src/animation/scroll/drive.ts
|
|
3647
|
-
function
|
|
3685
|
+
function Ps(e) {
|
|
3648
3686
|
return typeof e == "object" && !!e && "targets" in e && "play" in e;
|
|
3649
3687
|
}
|
|
3650
|
-
function
|
|
3688
|
+
function Fs(e) {
|
|
3651
3689
|
return typeof Element < "u" && e instanceof Element;
|
|
3652
3690
|
}
|
|
3653
|
-
function
|
|
3691
|
+
function Is(e, t, n) {
|
|
3654
3692
|
if (n.nativeSpec != null) return n.nativeSpec;
|
|
3655
3693
|
let r = e.timeline;
|
|
3656
3694
|
if (r?.kind === "scroll") return {
|
|
@@ -3659,7 +3697,7 @@ function Os(e, t, n) {
|
|
|
3659
3697
|
...n.axis ?? r.axis ? { axis: n.axis ?? r.axis } : {}
|
|
3660
3698
|
};
|
|
3661
3699
|
if (r?.kind === "view") {
|
|
3662
|
-
let e = n.subject ?? (
|
|
3700
|
+
let e = n.subject ?? (Fs(t) ? t : Ps(t) && Fs(t.targets[0]) ? t.targets[0] : void 0);
|
|
3663
3701
|
return e == null ? void 0 : {
|
|
3664
3702
|
kind: "view",
|
|
3665
3703
|
subject: e,
|
|
@@ -3668,13 +3706,13 @@ function Os(e, t, n) {
|
|
|
3668
3706
|
};
|
|
3669
3707
|
}
|
|
3670
3708
|
}
|
|
3671
|
-
function
|
|
3672
|
-
let r =
|
|
3709
|
+
function Ls(e, t, n = {}) {
|
|
3710
|
+
let r = Ps(t) ? t : n.animation, { nativeSpec: i, animation: a, velocity: o, source: s, subject: c, axis: l, inset: u, ...d } = n, f = Os({
|
|
3673
3711
|
...d,
|
|
3674
3712
|
range: e.range
|
|
3675
|
-
}), p = e.trigger == null ? void 0 :
|
|
3713
|
+
}), p = e.trigger == null ? void 0 : Ns(e), m = ks({
|
|
3676
3714
|
animation: r,
|
|
3677
|
-
nativeSpec:
|
|
3715
|
+
nativeSpec: Is(e, t, n),
|
|
3678
3716
|
scrub: n.scrub != null && n.scrub > 0,
|
|
3679
3717
|
snap: n.snap != null && n.snap.length > 0,
|
|
3680
3718
|
velocity: n.velocity
|
|
@@ -3688,35 +3726,35 @@ function ks(e, t, n = {}) {
|
|
|
3688
3726
|
}
|
|
3689
3727
|
//#endregion
|
|
3690
3728
|
//#region src/animation/scroll/grammar.ts
|
|
3691
|
-
var
|
|
3692
|
-
function
|
|
3693
|
-
return
|
|
3729
|
+
var Rs = (e) => ([t]) => /* @__PURE__ */ TypeError(`Invalid CSS value ${JSON.stringify(e)}: ${t.code} at ${t.start}-${t.end}.`);
|
|
3730
|
+
function zs(e) {
|
|
3731
|
+
return C(pe(e), Rs(e));
|
|
3694
3732
|
}
|
|
3695
|
-
function
|
|
3696
|
-
return
|
|
3733
|
+
function Bs(e) {
|
|
3734
|
+
return C(ae(e), Rs(e));
|
|
3697
3735
|
}
|
|
3698
|
-
function
|
|
3699
|
-
return
|
|
3736
|
+
function Vs(e) {
|
|
3737
|
+
return le(re(typeof e == "string" ? C(S(e), Rs(e)) : e).at(-1)?.rule.declarations ?? []);
|
|
3700
3738
|
}
|
|
3701
|
-
function
|
|
3702
|
-
return
|
|
3739
|
+
function Hs(e) {
|
|
3740
|
+
return ne(e);
|
|
3703
3741
|
}
|
|
3704
|
-
function
|
|
3705
|
-
let t =
|
|
3742
|
+
function Us(e) {
|
|
3743
|
+
let t = Vs(e);
|
|
3706
3744
|
return {
|
|
3707
3745
|
options: t,
|
|
3708
|
-
declarations:
|
|
3746
|
+
declarations: Hs(t)
|
|
3709
3747
|
};
|
|
3710
3748
|
}
|
|
3711
3749
|
//#endregion
|
|
3712
3750
|
//#region src/animation/compile/emit/backward/walk.ts
|
|
3713
|
-
function
|
|
3751
|
+
function Ws(e) {
|
|
3714
3752
|
let t = [];
|
|
3715
3753
|
for (let n of Object.keys(e.animations)) {
|
|
3716
|
-
let r = e.animations[n], i = r.layer.op, a =
|
|
3754
|
+
let r = e.animations[n], i = r.layer.op, a = G(r.layer) && r.layer.weightSpring != null, o = G(r.layer) && r.layer.weightSpring == null, s = i === "add" || i === "accumulate" ? i : o ? "accumulate" : "replace";
|
|
3717
3755
|
t.push({
|
|
3718
3756
|
animation: r.animation,
|
|
3719
|
-
name: J(
|
|
3757
|
+
name: J(H(r.animation)),
|
|
3720
3758
|
composition: s,
|
|
3721
3759
|
weightBlend: a,
|
|
3722
3760
|
...o ? { staticWeight: r.layer.weight } : {},
|
|
@@ -3725,21 +3763,21 @@ function Is(e) {
|
|
|
3725
3763
|
}
|
|
3726
3764
|
return t;
|
|
3727
3765
|
}
|
|
3728
|
-
function
|
|
3766
|
+
function Gs(e) {
|
|
3729
3767
|
return e.entries.map((e) => ({
|
|
3730
3768
|
animation: e.animation,
|
|
3731
|
-
name: J(
|
|
3769
|
+
name: J(H(e.animation)),
|
|
3732
3770
|
composition: "replace",
|
|
3733
3771
|
weightBlend: !1,
|
|
3734
3772
|
delay: e.at
|
|
3735
3773
|
}));
|
|
3736
3774
|
}
|
|
3737
|
-
function
|
|
3775
|
+
function Ks(e) {
|
|
3738
3776
|
return e.map((e, t) => {
|
|
3739
3777
|
let n = "animation" in e ? e.animation : e;
|
|
3740
3778
|
return {
|
|
3741
3779
|
animation: n,
|
|
3742
|
-
name: J(
|
|
3780
|
+
name: J(H(n) || `anim-${t}`),
|
|
3743
3781
|
composition: "replace",
|
|
3744
3782
|
weightBlend: !1,
|
|
3745
3783
|
delay: 0
|
|
@@ -3752,30 +3790,30 @@ function J(e) {
|
|
|
3752
3790
|
}
|
|
3753
3791
|
//#endregion
|
|
3754
3792
|
//#region src/animation/compile/emit/easing-serialize.ts
|
|
3755
|
-
var
|
|
3756
|
-
function
|
|
3793
|
+
var qs = /^(linear|ease|ease-in|ease-out|ease-in-out|step-start|step-end)$/;
|
|
3794
|
+
function Js(e, t = 32) {
|
|
3757
3795
|
return h(Array.from({ length: t + 1 }, (n, r) => e(r / t)));
|
|
3758
3796
|
}
|
|
3759
3797
|
function Y(e) {
|
|
3760
3798
|
if (e.css !== void 0) return e.css;
|
|
3761
|
-
let t =
|
|
3799
|
+
let t = de.find(([t, n]) => n === e.fn)?.[0];
|
|
3762
3800
|
if (t === void 0) throw new n("timingFunction", e.fn, "a custom TimingFunction has no CSS animation-timing-function representation — attach a faithful Easing.css twin, or use a registry name / cubic-bezier() / linear() literal");
|
|
3763
|
-
let r =
|
|
3764
|
-
return
|
|
3801
|
+
let r = k(t);
|
|
3802
|
+
return qs.test(r) ? r : Js(e.fn);
|
|
3765
3803
|
}
|
|
3766
3804
|
//#endregion
|
|
3767
3805
|
//#region src/animation/compile/emit/format/options.ts
|
|
3768
|
-
function
|
|
3806
|
+
function Ys(e, t = "animation") {
|
|
3769
3807
|
let n = "";
|
|
3770
3808
|
n += ` animation-name: ${t};\n`;
|
|
3771
3809
|
let r = v(e.duration, e.durationUnit);
|
|
3772
3810
|
n += ` animation-duration: ${r};\n`, n += ` animation-timing-function: ${Y(e.timingFunction)};\n`, n += ` animation-iteration-count: ${isFinite(e.iterationCount) ? e.iterationCount : "infinite"};\n`, n += ` animation-direction: ${e.direction};\n`, n += ` animation-fill-mode: ${e.fillMode};\n`, e.delay > 0 && (n += ` animation-delay: ${v(e.delay, e.delayUnit)};\n`);
|
|
3773
|
-
let i = e.composite == null ? void 0 :
|
|
3811
|
+
let i = e.composite == null ? void 0 : Zs(e.composite);
|
|
3774
3812
|
return i != null && (n += ` ${i}\n`), n = `.${t} {\n${n}}\n`, n;
|
|
3775
3813
|
}
|
|
3776
|
-
function
|
|
3777
|
-
let n = Y(e.timingFunction), r =
|
|
3778
|
-
return
|
|
3814
|
+
function Xs(e, t) {
|
|
3815
|
+
let n = Y(e.timingFunction), r = C(ve(n), () => /* @__PURE__ */ TypeError(`Cannot serialize timing function ${JSON.stringify(n)}.`));
|
|
3816
|
+
return x({
|
|
3779
3817
|
name: t,
|
|
3780
3818
|
duration: e.duration,
|
|
3781
3819
|
...e.durationUnit == null ? {} : { durationUnit: e.durationUnit },
|
|
@@ -3789,14 +3827,14 @@ function Hs(e, t) {
|
|
|
3789
3827
|
} : {}
|
|
3790
3828
|
});
|
|
3791
3829
|
}
|
|
3792
|
-
function
|
|
3830
|
+
function Zs(e) {
|
|
3793
3831
|
return e === "replace" ? void 0 : `animation-composition: ${e};`;
|
|
3794
3832
|
}
|
|
3795
|
-
function
|
|
3833
|
+
function Qs(e) {
|
|
3796
3834
|
let t = e.propertyRegistry;
|
|
3797
3835
|
if (t == null || t.size === 0) return "";
|
|
3798
3836
|
let n = [];
|
|
3799
|
-
for (let [e, r] of t) n.push(
|
|
3837
|
+
for (let [e, r] of t) n.push(ee({
|
|
3800
3838
|
kind: "property",
|
|
3801
3839
|
name: e,
|
|
3802
3840
|
descriptor: r
|
|
@@ -3805,9 +3843,9 @@ function Ws(e) {
|
|
|
3805
3843
|
}
|
|
3806
3844
|
//#endregion
|
|
3807
3845
|
//#region src/animation/compile/emit/format/format.ts
|
|
3808
|
-
function
|
|
3846
|
+
function $s(e, t, n) {
|
|
3809
3847
|
let r = e.parsedVars[t] ?? {}, i = e.templateFrames[t], a = Object.entries(r).map(([e, t]) => ({
|
|
3810
|
-
prop:
|
|
3848
|
+
prop: k(e),
|
|
3811
3849
|
value: y(t),
|
|
3812
3850
|
declared: t
|
|
3813
3851
|
})), o = i.timingFunction ? Y(i.timingFunction) : n;
|
|
@@ -3821,7 +3859,7 @@ function Gs(e, t, n) {
|
|
|
3821
3859
|
value: s
|
|
3822
3860
|
}), a;
|
|
3823
3861
|
}
|
|
3824
|
-
var
|
|
3862
|
+
var ec = (e, t) => {
|
|
3825
3863
|
if (e.kind === "scalar") return e.payload.type === "number" ? {
|
|
3826
3864
|
kind: "scalar",
|
|
3827
3865
|
payload: {
|
|
@@ -3830,96 +3868,96 @@ var Ks = (e, t) => {
|
|
|
3830
3868
|
}
|
|
3831
3869
|
} : void 0;
|
|
3832
3870
|
if (e.kind === "call") {
|
|
3833
|
-
let n = e.args.map((e) =>
|
|
3871
|
+
let n = e.args.map((e) => ec(e, t));
|
|
3834
3872
|
return n.some((e) => e === void 0) ? void 0 : {
|
|
3835
3873
|
kind: "call",
|
|
3836
3874
|
name: e.name,
|
|
3837
3875
|
args: n
|
|
3838
3876
|
};
|
|
3839
3877
|
}
|
|
3840
|
-
let n = e.items.map((e) =>
|
|
3878
|
+
let n = e.items.map((e) => ec(e, t));
|
|
3841
3879
|
if (!n.some((e) => e === void 0)) return {
|
|
3842
3880
|
kind: "list",
|
|
3843
3881
|
separator: e.separator,
|
|
3844
3882
|
items: n
|
|
3845
3883
|
};
|
|
3846
3884
|
};
|
|
3847
|
-
function
|
|
3848
|
-
return `{\n${
|
|
3885
|
+
function tc(e, t, n) {
|
|
3886
|
+
return `{\n${$s(e, t, n).map(({ prop: e, value: t }) => ` ${e}: ${t};`).join("\n")}\n}`;
|
|
3849
3887
|
}
|
|
3850
|
-
var
|
|
3888
|
+
var nc = async (e) => {
|
|
3851
3889
|
let t = Y(e.options.timingFunction);
|
|
3852
|
-
return e.templateFrames.map((n, r) => `${
|
|
3890
|
+
return e.templateFrames.map((n, r) => `${ye(n.start)}\n${tc(e, r, t)}\n`);
|
|
3853
3891
|
};
|
|
3854
|
-
function
|
|
3892
|
+
function rc(e) {
|
|
3855
3893
|
let t = e.indexOf("{"), n = t === -1 ? e : e.slice(t + 1), r = n.lastIndexOf("}");
|
|
3856
3894
|
return (r !== -1 && n.slice(r + 1).trim() === "" ? n.slice(0, r) : n).split("\n").map((e) => e.startsWith(" ") ? e.slice(2) : e).join("\n").trim();
|
|
3857
3895
|
}
|
|
3858
|
-
function
|
|
3896
|
+
function ic(e, t, n) {
|
|
3859
3897
|
let r = Y(e.options.timingFunction), i = /* @__PURE__ */ new Map();
|
|
3860
3898
|
e.templateFrames.forEach((t, a) => {
|
|
3861
|
-
let o = n?.get(a) ??
|
|
3899
|
+
let o = n?.get(a) ?? tc(e, a, r), s = i.get(o), c = ye(t.start);
|
|
3862
3900
|
s ? s.push(c) : i.set(o, [c]);
|
|
3863
3901
|
});
|
|
3864
3902
|
let a = "";
|
|
3865
3903
|
for (let [e, t] of i) a += ` ${t.join(", ")} ${e.replace(/\n/g, "\n ")}\n`;
|
|
3866
3904
|
return `@keyframes ${t} {\n${a}}`;
|
|
3867
3905
|
}
|
|
3868
|
-
function
|
|
3906
|
+
function ac(e, t, n) {
|
|
3869
3907
|
let r = Y(e.options.timingFunction), i = /* @__PURE__ */ new Map();
|
|
3870
3908
|
for (let t = 0; t < e.templateFrames.length; t++) {
|
|
3871
3909
|
let a = e.templateFrames[t], o = e.parsedVars[t] ?? {}, s = {};
|
|
3872
3910
|
for (let [e, t] of Object.entries(o)) {
|
|
3873
|
-
let r =
|
|
3911
|
+
let r = ec(t, n);
|
|
3874
3912
|
if (r === void 0) return {
|
|
3875
3913
|
refused: !0,
|
|
3876
3914
|
key: e
|
|
3877
3915
|
};
|
|
3878
3916
|
s[e] = r;
|
|
3879
3917
|
}
|
|
3880
|
-
let c = Object.entries(s).map(([e, t]) => ` ${
|
|
3918
|
+
let c = Object.entries(s).map(([e, t]) => ` ${k(e)}: ${y(t)};`), l = a.timingFunction ? Y(a.timingFunction) : r;
|
|
3881
3919
|
l !== r && c.push(` animation-timing-function: ${l};`);
|
|
3882
3920
|
let u = a.composition;
|
|
3883
3921
|
u != null && u !== "replace" && c.push(` animation-composition: ${u};`);
|
|
3884
|
-
let d = `{\n${c.join("\n")}\n}`, f = i.get(d), p =
|
|
3922
|
+
let d = `{\n${c.join("\n")}\n}`, f = i.get(d), p = ye(a.start);
|
|
3885
3923
|
f ? f.push(p) : i.set(d, [p]);
|
|
3886
3924
|
}
|
|
3887
3925
|
let a = "";
|
|
3888
3926
|
for (let [e, t] of i) a += ` ${t.join(", ")} ${e.replace(/\n/g, "\n ")}\n`;
|
|
3889
3927
|
return { block: `@keyframes ${t} {\n${a}}` };
|
|
3890
3928
|
}
|
|
3891
|
-
async function
|
|
3929
|
+
async function oc(e, t = "animation") {
|
|
3892
3930
|
let n = e.options, r = /* @__PURE__ */ new Map(), i = Y(n.timingFunction);
|
|
3893
3931
|
e.templateFrames.forEach((t, n) => {
|
|
3894
|
-
let a =
|
|
3932
|
+
let a = ye(t.start), o = tc(e, n, i);
|
|
3895
3933
|
r.has(o) ? r.get(o).push(a) : r.set(o, [a]);
|
|
3896
3934
|
});
|
|
3897
3935
|
let a = "";
|
|
3898
3936
|
for (let [e, t] of r) a += ` ${t.join(", ")} ${e.replace(/\n/g, "\n ")}\n`;
|
|
3899
|
-
let o =
|
|
3937
|
+
let o = Ys(n, t), s = Qs(e);
|
|
3900
3938
|
return `${`${s ? `${s}\n\n` : ""}${o}\n@keyframes ${t} {\n${a}}`.replace(/\(\s*\{/g, "{").replace(/\}\s*\)/g, "}")}\n`;
|
|
3901
3939
|
}
|
|
3902
3940
|
//#endregion
|
|
3903
3941
|
//#region src/animation/compile/emit/densify.ts
|
|
3904
|
-
var
|
|
3942
|
+
var sc = (e) => {
|
|
3905
3943
|
if (e.kind === "percent") return e.value * 100;
|
|
3906
3944
|
throw TypeError(`Cannot densify named keyframe selector "${e.name}" without a bound timeline.`);
|
|
3907
3945
|
};
|
|
3908
|
-
function
|
|
3909
|
-
let i = e.parsedVars[t] ?? {}, a = Object.fromEntries(Object.entries(i).filter(([e]) => !r.has(e))), o = Object.entries(a).map(([e, t]) => `${
|
|
3946
|
+
function cc(e, t, n, r) {
|
|
3947
|
+
let i = e.parsedVars[t] ?? {}, a = Object.fromEntries(Object.entries(i).filter(([e]) => !r.has(e))), o = Object.entries(a).map(([e, t]) => `${k(e)}: ${y(t)};`), s = e.templateFrames[t], c = s.timingFunction ? Y(s.timingFunction) : n;
|
|
3910
3948
|
c !== n && o.push(`animation-timing-function: ${c};`);
|
|
3911
3949
|
let l = s.composition;
|
|
3912
3950
|
return l != null && l !== "replace" && o.push(`animation-composition: ${l};`), o;
|
|
3913
3951
|
}
|
|
3914
|
-
function
|
|
3952
|
+
function lc(e, t, n) {
|
|
3915
3953
|
let r = Y(e.options.timingFunction), i = new Set(n.keys), a = /* @__PURE__ */ new Map(), o = [], s = (e) => {
|
|
3916
3954
|
let t = a.get(e);
|
|
3917
3955
|
return t || (t = [], a.set(e, t), o.push(e)), t;
|
|
3918
3956
|
};
|
|
3919
3957
|
for (let [e, t] of n.byPct) s(e).push(...t);
|
|
3920
3958
|
e.templateFrames.forEach((t, n) => {
|
|
3921
|
-
let a =
|
|
3922
|
-
a.length > 0 && s(
|
|
3959
|
+
let a = cc(e, n, r, i);
|
|
3960
|
+
a.length > 0 && s(sc(t.start)).push(...a);
|
|
3923
3961
|
}), o.sort((e, t) => e - t);
|
|
3924
3962
|
let c = "";
|
|
3925
3963
|
for (let e of o) c += ` ${e}% {\n ${a.get(e).join("\n ")}\n }\n`;
|
|
@@ -3927,23 +3965,23 @@ function tc(e, t, n) {
|
|
|
3927
3965
|
}
|
|
3928
3966
|
//#endregion
|
|
3929
3967
|
//#region src/animation/compile/emit/backward/color.ts
|
|
3930
|
-
var X = (e) => Math.round(e * 1e4) / 1e4,
|
|
3968
|
+
var X = (e) => Math.round(e * 1e4) / 1e4, uc = (e) => {
|
|
3931
3969
|
if (typeof e != "object" || !e) return !1;
|
|
3932
3970
|
let t = e.kind;
|
|
3933
3971
|
return t === "scalar" || t === "call" || t === "list";
|
|
3934
|
-
},
|
|
3972
|
+
}, dc = (e) => {
|
|
3935
3973
|
if (e.kind === "scalar") return e.payload.type === "color" ? e.payload.value : void 0;
|
|
3936
3974
|
let t = e.kind === "call" ? e.args : e.items;
|
|
3937
3975
|
for (let e of t) {
|
|
3938
|
-
let t =
|
|
3976
|
+
let t = dc(e);
|
|
3939
3977
|
if (t !== void 0) return t;
|
|
3940
3978
|
}
|
|
3941
|
-
},
|
|
3942
|
-
let t =
|
|
3979
|
+
}, fc = (e) => uc(e) && dc(e) !== void 0, pc = (e) => {
|
|
3980
|
+
let t = Te(e, "oklab");
|
|
3943
3981
|
if (!t.ok) throw TypeError(`Value 4 color conversion failed: ${t.error.code}.`);
|
|
3944
3982
|
return t.value;
|
|
3945
3983
|
}, Z = (e) => {
|
|
3946
|
-
let [t, n, r] =
|
|
3984
|
+
let [t, n, r] = pc(e).channels;
|
|
3947
3985
|
if (typeof t != "number" || typeof n != "number" || typeof r != "number") throw TypeError("OKLab densification requires numeric channels.");
|
|
3948
3986
|
return [
|
|
3949
3987
|
t,
|
|
@@ -3951,28 +3989,28 @@ var X = (e) => Math.round(e * 1e4) / 1e4, nc = (e) => {
|
|
|
3951
3989
|
r
|
|
3952
3990
|
];
|
|
3953
3991
|
}, Q = (e) => {
|
|
3954
|
-
let t =
|
|
3992
|
+
let t = pc(e), [n, r, i] = Z(t), a = t.alpha === 1 ? "" : ` / ${t.alpha}`;
|
|
3955
3993
|
return `oklab(${X(n)} ${X(r)} ${X(i)}${a})`;
|
|
3956
|
-
},
|
|
3994
|
+
}, mc = (e, t) => {
|
|
3957
3995
|
let [n, r, i] = Z(e), [a, o, s] = Z(t);
|
|
3958
3996
|
return Math.hypot(a - n, o - r, s - i);
|
|
3959
|
-
},
|
|
3960
|
-
let r =
|
|
3997
|
+
}, hc = (e, t, n) => {
|
|
3998
|
+
let r = De(e, t, n);
|
|
3961
3999
|
if (!r.ok) throw TypeError(`Value 4 OKLab construction failed: ${r.error.code}.`);
|
|
3962
4000
|
return r.value;
|
|
3963
|
-
},
|
|
4001
|
+
}, gc = (e, t) => {
|
|
3964
4002
|
let [n, r, i] = Z(e), [a, o, s] = Z(t);
|
|
3965
|
-
return
|
|
3966
|
-
},
|
|
4003
|
+
return hc((n + a) / 2, (r + o) / 2, (i + s) / 2);
|
|
4004
|
+
}, _c = (e) => {
|
|
3967
4005
|
if (e.kind === "percent") return e.value * 100;
|
|
3968
4006
|
throw TypeError(`Cannot densify named keyframe selector "${e.name}" without a bound timeline.`);
|
|
3969
4007
|
}, $ = (e, t, n) => {
|
|
3970
4008
|
let r = (e.parsedVars[t] ?? {})[n];
|
|
3971
|
-
return r === void 0 ? void 0 :
|
|
3972
|
-
},
|
|
4009
|
+
return r === void 0 ? void 0 : dc(r);
|
|
4010
|
+
}, vc = (e, t, n, r, i) => {
|
|
3973
4011
|
let a = [];
|
|
3974
4012
|
for (let o = 0; o < n; o++) {
|
|
3975
|
-
let s =
|
|
4013
|
+
let s = Ee(e, t, n === 1 ? 0 : o / (n - 1), {
|
|
3976
4014
|
space: r,
|
|
3977
4015
|
...i === void 0 ? {} : { hue: i }
|
|
3978
4016
|
});
|
|
@@ -3981,12 +4019,12 @@ var X = (e) => Math.round(e * 1e4) / 1e4, nc = (e) => {
|
|
|
3981
4019
|
}
|
|
3982
4020
|
return a;
|
|
3983
4021
|
};
|
|
3984
|
-
function
|
|
4022
|
+
function yc(e, t, n, r, i) {
|
|
3985
4023
|
let a = t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), o = [], s = 0;
|
|
3986
4024
|
for (let a = 0; a + 1 < e.templateFrames.length; a++) {
|
|
3987
4025
|
let c = $(e, a, t), l = $(e, a + 1, t);
|
|
3988
4026
|
if (!c || !l) continue;
|
|
3989
|
-
let u =
|
|
4027
|
+
let u = _c(e.templateFrames[a].start), d = _c(e.templateFrames[a + 1].start);
|
|
3990
4028
|
if (Q(c) === Q(l)) {
|
|
3991
4029
|
o.push({
|
|
3992
4030
|
pct: u,
|
|
@@ -3994,7 +4032,7 @@ function dc(e, t, n, r, i) {
|
|
|
3994
4032
|
});
|
|
3995
4033
|
continue;
|
|
3996
4034
|
}
|
|
3997
|
-
let f = c, p = l, m =
|
|
4035
|
+
let f = c, p = l, m = vc(f, p, n, r, i.hueMethod);
|
|
3998
4036
|
for (let e = 0; e < m.length; e++) {
|
|
3999
4037
|
let t = e / (m.length - 1), n = u + (d - u) * t;
|
|
4000
4038
|
o.push({
|
|
@@ -4002,15 +4040,15 @@ function dc(e, t, n, r, i) {
|
|
|
4002
4040
|
css: Q(m[e])
|
|
4003
4041
|
});
|
|
4004
4042
|
}
|
|
4005
|
-
let h =
|
|
4043
|
+
let h = vc(f, p, 1024, r, i.hueMethod);
|
|
4006
4044
|
for (let e = 0; e + 1 < m.length; e++) {
|
|
4007
|
-
let t = (e + .5) / (m.length - 1), n = h[Math.round(t * 1023)], r =
|
|
4008
|
-
s = Math.max(s,
|
|
4045
|
+
let t = (e + .5) / (m.length - 1), n = h[Math.round(t * 1023)], r = gc(m[e], m[e + 1]);
|
|
4046
|
+
s = Math.max(s, mc(r, n));
|
|
4009
4047
|
}
|
|
4010
4048
|
}
|
|
4011
4049
|
let c = e.templateFrames.length - 1, l = $(e, c, t);
|
|
4012
4050
|
if (l) {
|
|
4013
|
-
let t =
|
|
4051
|
+
let t = _c(e.templateFrames[c].start);
|
|
4014
4052
|
o[o.length - 1]?.pct !== t && o.push({
|
|
4015
4053
|
pct: t,
|
|
4016
4054
|
css: Q(l)
|
|
@@ -4022,12 +4060,12 @@ function dc(e, t, n, r, i) {
|
|
|
4022
4060
|
worstDelta: s
|
|
4023
4061
|
};
|
|
4024
4062
|
}
|
|
4025
|
-
function
|
|
4063
|
+
function bc(e, t, n) {
|
|
4026
4064
|
let r = [], i = /* @__PURE__ */ new Set();
|
|
4027
4065
|
for (let t = 0; t + 1 < e.templateFrames.length; t++) {
|
|
4028
4066
|
let n = e.parsedVars[t] ?? {};
|
|
4029
4067
|
for (let [a, o] of Object.entries(n)) {
|
|
4030
|
-
if (i.has(a) || !
|
|
4068
|
+
if (i.has(a) || !fc(o)) continue;
|
|
4031
4069
|
let n = $(e, t, a), s = $(e, t + 1, a);
|
|
4032
4070
|
n && s && Q(n) !== Q(s) && (r.push(a), i.add(a));
|
|
4033
4071
|
}
|
|
@@ -4035,7 +4073,7 @@ function fc(e, t, n) {
|
|
|
4035
4073
|
if (r.length === 0) return null;
|
|
4036
4074
|
let a = Math.max(3, t), o = e.options.colorSpace === "oklch" ? "oklch" : "oklab", s = e.options.hueMethod ? { hueMethod: e.options.hueMethod } : {}, c = 0, l = /* @__PURE__ */ new Map();
|
|
4037
4075
|
for (let t of r) {
|
|
4038
|
-
let n =
|
|
4076
|
+
let n = yc(e, t, a, o, s);
|
|
4039
4077
|
c = Math.max(c, n.worstDelta);
|
|
4040
4078
|
for (let { pct: e, css: t } of n.stops) {
|
|
4041
4079
|
let r = l.get(e);
|
|
@@ -4052,7 +4090,7 @@ function fc(e, t, n) {
|
|
|
4052
4090
|
}
|
|
4053
4091
|
//#endregion
|
|
4054
4092
|
//#region src/animation/compile/emit/refusal-probes.ts
|
|
4055
|
-
function
|
|
4093
|
+
function xc(e) {
|
|
4056
4094
|
let { animation: t, name: n } = e;
|
|
4057
4095
|
if (e.weightBlend) return {
|
|
4058
4096
|
name: n,
|
|
@@ -4073,10 +4111,10 @@ function pc(e) {
|
|
|
4073
4111
|
};
|
|
4074
4112
|
}
|
|
4075
4113
|
}
|
|
4076
|
-
function
|
|
4077
|
-
let { animation: i, name: a } = e, o =
|
|
4114
|
+
function Sc(e, t, r) {
|
|
4115
|
+
let { animation: i, name: a } = e, o = xc(e);
|
|
4078
4116
|
if (o) return r.push(o), null;
|
|
4079
|
-
let s =
|
|
4117
|
+
let s = bc(i, t.densifyStops ?? 16, t.deltaEEpsilon ?? .04);
|
|
4080
4118
|
if (s && "refused" in s) return r.push({
|
|
4081
4119
|
name: a,
|
|
4082
4120
|
reason: "perceptual-oklab",
|
|
@@ -4084,7 +4122,7 @@ function mc(e, t, r) {
|
|
|
4084
4122
|
}), null;
|
|
4085
4123
|
let c;
|
|
4086
4124
|
if (e.staticWeight != null) {
|
|
4087
|
-
let t =
|
|
4125
|
+
let t = ac(i, a, e.staticWeight);
|
|
4088
4126
|
if ("refused" in t) return r.push({
|
|
4089
4127
|
name: a,
|
|
4090
4128
|
reason: "weight-blend",
|
|
@@ -4094,7 +4132,7 @@ function mc(e, t, r) {
|
|
|
4094
4132
|
}
|
|
4095
4133
|
let l, u;
|
|
4096
4134
|
try {
|
|
4097
|
-
l = c ?? (s && "byPct" in s ?
|
|
4135
|
+
l = c ?? (s && "byPct" in s ? lc(i, a, s) : ic(i, a)), u = Xs(i.options, a);
|
|
4098
4136
|
} catch (e) {
|
|
4099
4137
|
if (!(e instanceof n) || e.option !== "timingFunction") throw e;
|
|
4100
4138
|
return r.push({
|
|
@@ -4103,18 +4141,18 @@ function mc(e, t, r) {
|
|
|
4103
4141
|
message: "easing has no faithful CSS timing-function twin (a custom closure cannot be CSS) — attach an Easing.css twin or use a registry name / cubic-bezier() / linear(); the JS playback is the only faithful path"
|
|
4104
4142
|
}), null;
|
|
4105
4143
|
}
|
|
4106
|
-
let d =
|
|
4144
|
+
let d = Zs(e.composition), f = d ? `\n ${d}` : "", p = e.delay > 0 ? `\n animation-delay: ${v(e.delay)};` : "", m = Cc(i), h = `${t.selectorFor ? t.selectorFor(a) : `.${a}`} {\n animation: ${u};${f}${p}${m}\n}`;
|
|
4107
4145
|
return `${l}\n\n${h}`;
|
|
4108
4146
|
}
|
|
4109
|
-
function
|
|
4147
|
+
function Cc(e) {
|
|
4110
4148
|
let t = e.scrollOptions;
|
|
4111
4149
|
if (t == null) return "";
|
|
4112
|
-
let n =
|
|
4150
|
+
let n = Hs(t), r = "";
|
|
4113
4151
|
for (let [e, t] of Object.entries(n)) t != null && (r += `\n ${e}: ${t};`);
|
|
4114
4152
|
return r;
|
|
4115
4153
|
}
|
|
4116
|
-
async function
|
|
4117
|
-
let n = e instanceof sa ?
|
|
4154
|
+
async function wc(e, t = {}) {
|
|
4155
|
+
let n = e instanceof sa ? Ws(e) : e instanceof m ? Gs(e) : Ks(e), r = /* @__PURE__ */ new Map();
|
|
4118
4156
|
for (let e of n) {
|
|
4119
4157
|
let t = r.get(e.name) ?? 0;
|
|
4120
4158
|
r.set(e.name, t + 1), t > 0 && (e.name = `${e.name}-${t + 1}`);
|
|
@@ -4125,7 +4163,7 @@ async function gc(e, t = {}) {
|
|
|
4125
4163
|
});
|
|
4126
4164
|
let i = [], a = [];
|
|
4127
4165
|
for (let e of n) {
|
|
4128
|
-
let n =
|
|
4166
|
+
let n = Sc(e, t, i);
|
|
4129
4167
|
n && a.push(n);
|
|
4130
4168
|
}
|
|
4131
4169
|
let o = i.length === 0;
|
|
@@ -4141,14 +4179,14 @@ async function gc(e, t = {}) {
|
|
|
4141
4179
|
}
|
|
4142
4180
|
//#endregion
|
|
4143
4181
|
//#region src/animation/compile/emit/view-transition.ts
|
|
4144
|
-
var
|
|
4182
|
+
var Tc = new Set([
|
|
4145
4183
|
"transform",
|
|
4146
4184
|
"opacity",
|
|
4147
4185
|
"filter",
|
|
4148
4186
|
"backdrop-filter",
|
|
4149
4187
|
"mix-blend-mode",
|
|
4150
4188
|
"clip-path"
|
|
4151
|
-
]),
|
|
4189
|
+
]), Ec = new Set([
|
|
4152
4190
|
"cqw",
|
|
4153
4191
|
"cqh",
|
|
4154
4192
|
"cqi",
|
|
@@ -4156,31 +4194,31 @@ var _c = new Set([
|
|
|
4156
4194
|
"cqmin",
|
|
4157
4195
|
"cqmax"
|
|
4158
4196
|
]);
|
|
4159
|
-
function
|
|
4197
|
+
function Dc(e) {
|
|
4160
4198
|
let t = Y(e.options.timingFunction), n = [];
|
|
4161
|
-
for (let r = 0; r < e.templateFrames.length; r++) n.push(
|
|
4199
|
+
for (let r = 0; r < e.templateFrames.length; r++) n.push(...$s(e, r, t));
|
|
4162
4200
|
return n;
|
|
4163
4201
|
}
|
|
4164
|
-
var
|
|
4202
|
+
var Oc = (e) => {
|
|
4165
4203
|
if (e == null) return null;
|
|
4166
4204
|
if (e.kind === "call") {
|
|
4167
4205
|
if (e.name.toLowerCase() === "var") return "var";
|
|
4168
4206
|
for (let t of e.args) {
|
|
4169
|
-
let e =
|
|
4207
|
+
let e = Oc(t);
|
|
4170
4208
|
if (e != null) return e;
|
|
4171
4209
|
}
|
|
4172
4210
|
return null;
|
|
4173
4211
|
}
|
|
4174
4212
|
if (e.kind === "list") {
|
|
4175
4213
|
for (let t of e.items) {
|
|
4176
|
-
let e =
|
|
4214
|
+
let e = Oc(t);
|
|
4177
4215
|
if (e != null) return e;
|
|
4178
4216
|
}
|
|
4179
4217
|
return null;
|
|
4180
4218
|
}
|
|
4181
|
-
return e.payload.type === "number" &&
|
|
4182
|
-
},
|
|
4183
|
-
function
|
|
4219
|
+
return e.payload.type === "number" && Ec.has(e.payload.unit.toLowerCase()) ? "cq" : null;
|
|
4220
|
+
}, kc = (e) => e.split(".")[0].replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
4221
|
+
function Ac(e, t, n, r, i, a) {
|
|
4184
4222
|
let o = [], s = `${t}-${e}`;
|
|
4185
4223
|
if (r.scrollOptions != null) return o.push({
|
|
4186
4224
|
name: s,
|
|
@@ -4190,8 +4228,8 @@ function Sc(e, t, n, r, i, a) {
|
|
|
4190
4228
|
chunk: null,
|
|
4191
4229
|
refusals: o
|
|
4192
4230
|
};
|
|
4193
|
-
for (let { prop: t, declared: n } of
|
|
4194
|
-
let r =
|
|
4231
|
+
for (let { prop: t, declared: n } of Dc(r)) {
|
|
4232
|
+
let r = Oc(n);
|
|
4195
4233
|
if (r != null) return o.push({
|
|
4196
4234
|
name: s,
|
|
4197
4235
|
reason: "vt-element-scoped-computed",
|
|
@@ -4200,7 +4238,7 @@ function Sc(e, t, n, r, i, a) {
|
|
|
4200
4238
|
chunk: null,
|
|
4201
4239
|
refusals: o
|
|
4202
4240
|
};
|
|
4203
|
-
if (!
|
|
4241
|
+
if (!Tc.has(kc(t))) return o.push({
|
|
4204
4242
|
name: s,
|
|
4205
4243
|
reason: "vt-snapshot-inapplicable",
|
|
4206
4244
|
message: `"${t}" does not apply to a replaced-content ::view-transition-${e} snapshot (only transform/opacity/filter/mix-blend-mode animate there) — refused per property, never silently dropped`
|
|
@@ -4215,7 +4253,7 @@ function Sc(e, t, n, r, i, a) {
|
|
|
4215
4253
|
composition: "replace",
|
|
4216
4254
|
weightBlend: !1,
|
|
4217
4255
|
delay: 0
|
|
4218
|
-
}, u = [], d =
|
|
4256
|
+
}, u = [], d = Sc(l, {
|
|
4219
4257
|
...a.densifyStops == null ? {} : { densifyStops: a.densifyStops },
|
|
4220
4258
|
...a.deltaEEpsilon == null ? {} : { deltaEEpsilon: a.deltaEEpsilon },
|
|
4221
4259
|
selectorFor: () => c
|
|
@@ -4226,7 +4264,7 @@ function Sc(e, t, n, r, i, a) {
|
|
|
4226
4264
|
refusals: o
|
|
4227
4265
|
};
|
|
4228
4266
|
}
|
|
4229
|
-
function
|
|
4267
|
+
function jc(e) {
|
|
4230
4268
|
let t = e.group;
|
|
4231
4269
|
if (t != null) return "options" in t && "templateFrames" in t ? {
|
|
4232
4270
|
duration: t.options.duration,
|
|
@@ -4243,7 +4281,7 @@ function Cc(e) {
|
|
|
4243
4281
|
easing: Y(n.options.timingFunction)
|
|
4244
4282
|
};
|
|
4245
4283
|
}
|
|
4246
|
-
async function
|
|
4284
|
+
async function Mc(e, t = {}) {
|
|
4247
4285
|
let n = [], r = [], i = [], a = t.types, o = a && a.length > 0 ? `:root:active-view-transition-type(${a.join(", ")})` : "", s = t.emitGroup ?? !0, c = /* @__PURE__ */ new Map();
|
|
4248
4286
|
for (let t of Object.keys(e)) {
|
|
4249
4287
|
let e = J(t), n = c.get(e);
|
|
@@ -4262,12 +4300,12 @@ async function wc(e, t = {}) {
|
|
|
4262
4300
|
for (let i of ["old", "new"]) {
|
|
4263
4301
|
let a = c[i];
|
|
4264
4302
|
if (a == null) continue;
|
|
4265
|
-
let { chunk: s, refusals: l } =
|
|
4303
|
+
let { chunk: s, refusals: l } = Ac(i, e, u, a, o, t);
|
|
4266
4304
|
for (let e of l) n.push(e);
|
|
4267
4305
|
s && r.push(s);
|
|
4268
4306
|
}
|
|
4269
4307
|
if (s && (c.old != null || c.new != null || c.group != null)) {
|
|
4270
|
-
let e =
|
|
4308
|
+
let e = jc(c);
|
|
4271
4309
|
e != null && r.push(`${o}::view-transition-group(${u}) {\n animation-duration: ${v(e.duration, e.durationUnit)};\n animation-timing-function: ${e.easing};\n}`);
|
|
4272
4310
|
}
|
|
4273
4311
|
}
|
|
@@ -4287,10 +4325,10 @@ async function wc(e, t = {}) {
|
|
|
4287
4325
|
}
|
|
4288
4326
|
//#endregion
|
|
4289
4327
|
//#region src/animation/compile/emit/entry.ts
|
|
4290
|
-
var
|
|
4328
|
+
var Nc = (e) => e.kind === "scalar" ? e.payload.type === "color" : (e.kind === "call" ? e.args : e.items).some(Nc), Pc = (e) => {
|
|
4291
4329
|
if (e.kind === "scalar") {
|
|
4292
4330
|
if (e.payload.type !== "color") return e;
|
|
4293
|
-
let t =
|
|
4331
|
+
let t = Te(e.payload.value, "oklab");
|
|
4294
4332
|
if (!t.ok) throw TypeError(`Value 4 color conversion failed: ${t.error.code}.`);
|
|
4295
4333
|
return {
|
|
4296
4334
|
kind: "scalar",
|
|
@@ -4303,42 +4341,42 @@ var Tc = (e) => e.kind === "scalar" ? e.payload.type === "color" : (e.kind === "
|
|
|
4303
4341
|
return e.kind === "call" ? {
|
|
4304
4342
|
kind: "call",
|
|
4305
4343
|
name: e.name,
|
|
4306
|
-
args: e.args.map(
|
|
4344
|
+
args: e.args.map(Pc)
|
|
4307
4345
|
} : {
|
|
4308
4346
|
kind: "list",
|
|
4309
4347
|
separator: e.separator,
|
|
4310
|
-
items: e.items.map(
|
|
4348
|
+
items: e.items.map(Pc)
|
|
4311
4349
|
};
|
|
4312
4350
|
};
|
|
4313
|
-
function
|
|
4351
|
+
function Fc(e, t) {
|
|
4314
4352
|
let n = e.parsedVars[t] ?? {}, r = [];
|
|
4315
4353
|
for (let [e, t] of Object.entries(n)) {
|
|
4316
|
-
let n =
|
|
4354
|
+
let n = k(e);
|
|
4317
4355
|
r.push({
|
|
4318
4356
|
prop: n,
|
|
4319
|
-
value: y(
|
|
4357
|
+
value: y(Pc(t))
|
|
4320
4358
|
});
|
|
4321
4359
|
}
|
|
4322
4360
|
return r;
|
|
4323
4361
|
}
|
|
4324
|
-
function
|
|
4362
|
+
function Ic(e) {
|
|
4325
4363
|
let t = e.templateFrames.length;
|
|
4326
4364
|
return e.options.direction === "reverse" ? [t - 1, 0] : [0, t - 1];
|
|
4327
4365
|
}
|
|
4328
|
-
function
|
|
4366
|
+
function Lc(e) {
|
|
4329
4367
|
for (let t = 0; t < e.templateFrames.length; t++) {
|
|
4330
4368
|
let n = e.parsedVars[t] ?? {};
|
|
4331
|
-
for (let e of Object.values(n)) if (
|
|
4369
|
+
for (let e of Object.values(n)) if (Nc(e)) return !0;
|
|
4332
4370
|
}
|
|
4333
4371
|
return !1;
|
|
4334
4372
|
}
|
|
4335
|
-
function
|
|
4373
|
+
function Rc(e) {
|
|
4336
4374
|
for (let t = 0; t < e.templateFrames.length; t++) {
|
|
4337
4375
|
let n = e.parsedVars[t] ?? {};
|
|
4338
4376
|
for (let [e, t] of Object.entries(n)) if (t.kind === "list" && t.items.length === 0) return e;
|
|
4339
4377
|
}
|
|
4340
4378
|
}
|
|
4341
|
-
function
|
|
4379
|
+
function zc(e) {
|
|
4342
4380
|
let t = e.options;
|
|
4343
4381
|
if (e.templateFrames.length > 2) return {
|
|
4344
4382
|
reason: "entry-multi-keyframe",
|
|
@@ -4357,11 +4395,11 @@ function jc(e) {
|
|
|
4357
4395
|
reason: "entry-scroll-grammar",
|
|
4358
4396
|
detail: "scroll grammar has no transition twin — the JS ScrollScene driver is the only faithful path"
|
|
4359
4397
|
};
|
|
4360
|
-
if ((t.colorSpace === "oklch" || t.hueMethod != null) &&
|
|
4398
|
+
if ((t.colorSpace === "oklch" || t.hueMethod != null) && Lc(e)) return {
|
|
4361
4399
|
reason: "entry-color-space",
|
|
4362
4400
|
detail: `colorSpace=${t.colorSpace}${t.hueMethod ? `, hueMethod=${t.hueMethod}` : ""} — transitions expose no interpolation-space control; native Oklab is the default feature (only non-default spaces refuse)`
|
|
4363
4401
|
};
|
|
4364
|
-
let i =
|
|
4402
|
+
let i = Rc(e);
|
|
4365
4403
|
if (i != null) return {
|
|
4366
4404
|
reason: "computed-unit-drift",
|
|
4367
4405
|
detail: `"${i}" has an empty declared value — it cannot be re-emitted as a faithful transition endpoint`
|
|
@@ -4379,7 +4417,7 @@ function jc(e) {
|
|
|
4379
4417
|
};
|
|
4380
4418
|
}
|
|
4381
4419
|
}
|
|
4382
|
-
var
|
|
4420
|
+
var Bc = {
|
|
4383
4421
|
"custom-renderer": "custom renderer — the JS playback is the only faithful path",
|
|
4384
4422
|
"weight-blend": "layer weight has no transition twin",
|
|
4385
4423
|
"computed-unit-drift": "computed-unit drift — the endpoint cannot be re-emitted faithfully",
|
|
@@ -4390,42 +4428,42 @@ var Mc = {
|
|
|
4390
4428
|
"entry-color-space": "a non-default color space (oklch/hueMethod) — transitions expose no space control",
|
|
4391
4429
|
"entry-easing-twin": "the easing has no faithful CSS timing-function twin"
|
|
4392
4430
|
};
|
|
4393
|
-
function
|
|
4431
|
+
function Vc(e, t) {
|
|
4394
4432
|
let n = /* @__PURE__ */ new Set();
|
|
4395
4433
|
for (let t of e) n.add(t.prop);
|
|
4396
4434
|
for (let e of t) n.add(e.prop);
|
|
4397
4435
|
return [...n];
|
|
4398
4436
|
}
|
|
4399
|
-
function
|
|
4437
|
+
function Hc(e, t, n, r) {
|
|
4400
4438
|
let i = e.filter((e) => e !== "display" && e !== "overlay").map((e) => `${e} ${t} ${n}`);
|
|
4401
4439
|
return i.push(`display ${t} allow-discrete`), r && i.push(`overlay ${t} allow-discrete`), i.join(", ");
|
|
4402
4440
|
}
|
|
4403
|
-
var
|
|
4404
|
-
async function
|
|
4441
|
+
var Uc = (e, t) => [...e.map((e) => ` ${e.prop}: ${e.value};`), ...t].join("\n");
|
|
4442
|
+
async function Wc(e, t = {}) {
|
|
4405
4443
|
let n = t.openSelector ?? ".open", r = t.display ?? "block", i = t.overlay ?? !0, a = [], o = [];
|
|
4406
4444
|
for (let [t, s] of Object.entries(e)) {
|
|
4407
4445
|
let e = s.enter;
|
|
4408
4446
|
if (e == null) continue;
|
|
4409
4447
|
let c = s.exit ? [e, s.exit] : [e], l = !1;
|
|
4410
4448
|
for (let e of c) {
|
|
4411
|
-
let n =
|
|
4449
|
+
let n = zc(e);
|
|
4412
4450
|
if (n) {
|
|
4413
4451
|
a.push({
|
|
4414
4452
|
name: t,
|
|
4415
4453
|
reason: n.reason,
|
|
4416
|
-
message: `${
|
|
4454
|
+
message: `${Bc[n.reason]} — ${n.detail}`
|
|
4417
4455
|
}), l = !0;
|
|
4418
4456
|
break;
|
|
4419
4457
|
}
|
|
4420
4458
|
}
|
|
4421
4459
|
if (l) continue;
|
|
4422
|
-
let [u, d] =
|
|
4460
|
+
let [u, d] = Ic(e), f = Fc(e, u), p = Fc(e, d), m = Vc(f, p), h = v(e.options.duration, e.options.durationUnit), g = Y(e.options.timingFunction), _, y, b, x;
|
|
4423
4461
|
if (s.exit) {
|
|
4424
|
-
let [, e] =
|
|
4425
|
-
_ =
|
|
4426
|
-
} else _ = f, y = m, b = h,
|
|
4427
|
-
let
|
|
4428
|
-
o.push(`${
|
|
4462
|
+
let [, e] = Ic(s.exit), t = Ic(s.exit)[0];
|
|
4463
|
+
_ = Fc(s.exit, e), y = Vc(Fc(s.exit, t), _), b = v(s.exit.options.duration, s.exit.options.durationUnit), x = Y(s.exit.options.timingFunction);
|
|
4464
|
+
} else _ = f, y = m, b = h, x = g;
|
|
4465
|
+
let ee = `${t}${n}`, S = `${t} {\n${Uc(_, [" display: none;", ` transition: ${Hc(y, b, x, i)};`])}\n}`, te = `${ee} {\n${Uc(p, [` display: ${r};`, ` transition: ${Hc(m, h, g, i)};`])}\n}`, ne = `@starting-style {\n ${ee} {\n${Uc(f, []).split("\n").map((e) => ` ${e}`).join("\n")}\n }\n}`;
|
|
4466
|
+
o.push(`${S}\n\n${te}\n\n${ne}`);
|
|
4429
4467
|
}
|
|
4430
4468
|
let s = a.length === 0;
|
|
4431
4469
|
return o.length === 0 ? {
|
|
@@ -4440,9 +4478,9 @@ async function Ic(e, t = {}) {
|
|
|
4440
4478
|
}
|
|
4441
4479
|
//#endregion
|
|
4442
4480
|
//#region src/animation/validate.ts
|
|
4443
|
-
var
|
|
4444
|
-
async function
|
|
4445
|
-
let n =
|
|
4481
|
+
var Gc = (e) => new U().fromString(e);
|
|
4482
|
+
async function Kc(e, t = {}) {
|
|
4483
|
+
let n = Gc(e), r = [...n.diagnostics], i = r.some((e) => e.code === "EMPTY_PARSE"), a = e.trim().length > 0 && !i, o = await wc([n], t.compile ?? {}), s = P(n);
|
|
4446
4484
|
return {
|
|
4447
4485
|
parseable: a,
|
|
4448
4486
|
eligible: o.eligible,
|
|
@@ -4451,9 +4489,9 @@ async function Rc(e, t = {}) {
|
|
|
4451
4489
|
waapi: s
|
|
4452
4490
|
};
|
|
4453
4491
|
}
|
|
4454
|
-
var
|
|
4455
|
-
async function
|
|
4456
|
-
let n = await
|
|
4492
|
+
var qc = (e) => be(() => S(e), (e) => [...new Set(fe(e).map(({ rule: e }) => e.name))], []);
|
|
4493
|
+
async function Jc(e, t = {}) {
|
|
4494
|
+
let n = await Kc(e, t), r = qc(e), i = r.length > 0 ? r.join(", ") : "(no @keyframes block)", a = [];
|
|
4457
4495
|
a.push(`@keyframes ${i}:`), a.push(` parseable: ${n.parseable ? "yes" : "no"}`), a.push(` compile-eligible: ${n.eligible ? "yes" : "no"}`);
|
|
4458
4496
|
for (let e of n.refusals) a.push(` – ${e.reason}: ${e.message}`);
|
|
4459
4497
|
if (a.push(` waapi-eligible: ${n.waapi.eligible ? "yes" : "no"}`), n.waapi.eligible || a.push(` – ${n.waapi.reason}`), n.diagnostics.length > 0) {
|
|
@@ -4463,4 +4501,4 @@ async function Bc(e, t = {}) {
|
|
|
4463
4501
|
return a.join("\n");
|
|
4464
4502
|
}
|
|
4465
4503
|
//#endregion
|
|
4466
|
-
export { sa as AnimationGroup,
|
|
4504
|
+
export { sa as AnimationGroup, U as CSSKeyframesAnimation, oc as CSSKeyframesToString, nc as CSSKeyframesToStrings, Ne as DIRECTIONS, ma as DrawSVG, Pe as FILL_MODES, ti as KeyframesAnimation, Ca as MorphSVG, da as MotionPath, Ds as ScrollScene, Ms as TriggerScene, xs as adoptRunning, wc as compileToCSS, Wc as compileToEntry, Mc as compileToViewTransition, Os as createScrollScene, Ns as createTriggerScene, J as cssIdent, Le as defaultLayerConfig, D as defaultOptions, ks as dispatchScrollBackend, Ls as driveScrollCSS, Jc as explain, rc as formatCSSKeyframeString, pa as fromDrawSVG, ys as fromLiveAnimations, Sa as fromMorphSVG, ua as fromMotionPath, vs as fromStyleSheets, H as getAnimationId, Vs as parseScrollCSS, Bs as parseScrollRange, zs as parseScrollTimeline, As as pinCSS, ls as presets, ci as resolveKeyframes, _s as resolveLiveKeyframes, Es as resolveRange, ge as resolveTimingFunction, v as reverseCSSTime, Us as roundTripScrollCSS, Hs as serializeScrollOptions, b as serializeTimingFunction, js as supportsNativeTrigger, de as timingFunctionEntries, Dt as transformTargetsStyle, Kc as validate, Gi as yieldToMain };
|