@algorisys/tinyfly 0.88.0 → 0.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/lib/addons/adapters.js +208 -177
- package/lib/addons/characters.js +2215 -1493
- package/lib/browser/tinyfly.iife.js +4 -4
- package/lib/browser/tinyfly.js +4944 -4128
- package/lib/browser/tinyfly.umd.js +4 -4
- package/lib/engine/tinyfly-engine.js +828 -765
- package/lib/engine/tinyfly-engine.umd.cjs +2 -2
- package/lib/headless/headless.js +45 -7
- package/lib/types/adapters/canvas/camera.d.ts +46 -0
- package/lib/types/adapters/canvas/index.d.ts +1 -0
- package/lib/types/browser/index.d.ts +2 -0
- package/lib/types/characters/acting/act-tracks.d.ts +28 -0
- package/lib/types/characters/acting/acting.d.ts +187 -0
- package/lib/types/characters/acting/effects.d.ts +65 -0
- package/lib/types/characters/acting/gags.d.ts +54 -0
- package/lib/types/characters/acting/index.d.ts +12 -0
- package/lib/types/characters/acting/lip-sync.d.ts +115 -0
- package/lib/types/characters/acting/rigs.d.ts +9 -0
- package/lib/types/characters/acting/script.d.ts +83 -0
- package/lib/types/characters/character.d.ts +7 -0
- package/lib/types/characters/gaits.d.ts +141 -0
- package/lib/types/characters/index.d.ts +2 -0
- package/lib/types/characters/stick-figure.d.ts +22 -0
- package/lib/types/engine/authoring/camera-shots.d.ts +73 -0
- package/lib/types/engine/authoring/index.d.ts +1 -0
- package/lib/types/engine/core/clock.d.ts +7 -0
- package/lib/types/headless/video-scene.d.ts +21 -0
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Fe(t) {
|
|
2
2
|
return typeof t == "object" && t !== null && t.type === "cubic-bezier";
|
|
3
3
|
}
|
|
4
4
|
function xt(t) {
|
|
5
5
|
return typeof t == "object" && t !== null && t.type !== "cubic-bezier";
|
|
6
6
|
}
|
|
7
|
-
const
|
|
8
|
-
function
|
|
7
|
+
const Nt = 2;
|
|
8
|
+
function re(t) {
|
|
9
9
|
return t.some((e) => e.interpolation !== void 0) ? 2 : 1;
|
|
10
10
|
}
|
|
11
11
|
function $t(t) {
|
|
@@ -17,16 +17,16 @@ function V(t) {
|
|
|
17
17
|
function j(t) {
|
|
18
18
|
return t.kind === "spring" && "spring" in t;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function se(t) {
|
|
21
21
|
return t.property === "motionPath" && "motionPathConfig" in t;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function vr(t) {
|
|
24
24
|
return typeof t == "object" && t !== null && "x" in t && "y" in t && "angle" in t;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function Xe(t) {
|
|
27
27
|
return "keyframes" in t;
|
|
28
28
|
}
|
|
29
|
-
class
|
|
29
|
+
class Pr {
|
|
30
30
|
_currentTime = 0;
|
|
31
31
|
_isRunning = !1;
|
|
32
32
|
onTick = null;
|
|
@@ -52,7 +52,7 @@ class Ar {
|
|
|
52
52
|
this._currentTime = e;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
class
|
|
55
|
+
class $r {
|
|
56
56
|
_currentTime = 0;
|
|
57
57
|
_isRunning = !1;
|
|
58
58
|
_lastFrameTime = null;
|
|
@@ -99,7 +99,12 @@ class wr {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Rr(t, e) {
|
|
103
|
+
if (!(e > 0)) return t;
|
|
104
|
+
const n = 1e3 / e;
|
|
105
|
+
return Math.floor(t / n + 1e-9) * n;
|
|
106
|
+
}
|
|
107
|
+
function oe(t, e, n = "start") {
|
|
103
108
|
if (e <= 1) return 0;
|
|
104
109
|
if (typeof n == "number") {
|
|
105
110
|
const r = Math.max(0, Math.min(e - 1, n));
|
|
@@ -116,27 +121,27 @@ function se(t, e, n = "start") {
|
|
|
116
121
|
return t;
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
|
-
function
|
|
124
|
+
function Ne(t, e = "start") {
|
|
120
125
|
if (t <= 1) return 0;
|
|
121
126
|
let n = 0;
|
|
122
127
|
for (let r = 0; r < t; r++)
|
|
123
|
-
n = Math.max(n,
|
|
128
|
+
n = Math.max(n, oe(r, t, e));
|
|
124
129
|
return n;
|
|
125
130
|
}
|
|
126
|
-
function
|
|
131
|
+
function ae(t, e, n) {
|
|
127
132
|
if (n.offsets) return n.offsets[t] ?? 0;
|
|
128
|
-
const r = n.from ?? "start", s =
|
|
133
|
+
const r = n.from ?? "start", s = oe(t, e, r);
|
|
129
134
|
if (n.amount !== void 0) {
|
|
130
|
-
const o =
|
|
135
|
+
const o = Ne(e, r);
|
|
131
136
|
return o === 0 ? 0 : n.amount * s / o;
|
|
132
137
|
}
|
|
133
138
|
return n.each !== void 0 ? n.each * s : 0;
|
|
134
139
|
}
|
|
135
|
-
function
|
|
136
|
-
return Array.from({ length: t }, (n, r) =>
|
|
140
|
+
function Ye(t, e) {
|
|
141
|
+
return Array.from({ length: t }, (n, r) => ae(r, t, e));
|
|
137
142
|
}
|
|
138
143
|
function Rt(t, e) {
|
|
139
|
-
return t <= 1 ? 0 : Math.max(...
|
|
144
|
+
return t <= 1 ? 0 : Math.max(...Ye(t, e));
|
|
140
145
|
}
|
|
141
146
|
const tt = 1, ie = 6e4, st = ie / tt, L = {
|
|
142
147
|
stiffness: 180,
|
|
@@ -145,7 +150,7 @@ const tt = 1, ie = 6e4, st = ie / tt, L = {
|
|
|
145
150
|
velocity: 0,
|
|
146
151
|
restDelta: 0.01,
|
|
147
152
|
restSpeed: 0.1
|
|
148
|
-
},
|
|
153
|
+
}, Dr = {
|
|
149
154
|
gentle: { stiffness: 120, damping: 18, mass: 1 },
|
|
150
155
|
default: { stiffness: 180, damping: 12, mass: 1 },
|
|
151
156
|
snappy: { stiffness: 280, damping: 20, mass: 1 },
|
|
@@ -214,10 +219,10 @@ class ut {
|
|
|
214
219
|
if (this.settledStep !== null) return;
|
|
215
220
|
const n = Math.min(e, st + 1), r = tt / 1e3;
|
|
216
221
|
for (; this.samples.length < n; ) {
|
|
217
|
-
const s = this.samples[this.samples.length - 1], o = s - this.to,
|
|
222
|
+
const s = this.samples[this.samples.length - 1], o = s - this.to, a = -this.stiffness * o, i = -this.damping * this.velocity, c = (a + i) / this.mass;
|
|
218
223
|
this.velocity += c * r;
|
|
219
|
-
const
|
|
220
|
-
if (this.samples.push(
|
|
224
|
+
const l = s + this.velocity * r;
|
|
225
|
+
if (this.samples.push(l), this.isAtRest(l)) {
|
|
221
226
|
this.settledStep = this.samples.length - 1;
|
|
222
227
|
return;
|
|
223
228
|
}
|
|
@@ -225,29 +230,29 @@ class ut {
|
|
|
225
230
|
this.samples.length > st && (this.settledStep = st);
|
|
226
231
|
}
|
|
227
232
|
}
|
|
228
|
-
function
|
|
233
|
+
function Cr(t, e) {
|
|
229
234
|
return new ut(t).valueAt(e);
|
|
230
235
|
}
|
|
231
|
-
function
|
|
236
|
+
function Ir(t) {
|
|
232
237
|
return new ut(t).settleTime();
|
|
233
238
|
}
|
|
234
|
-
function
|
|
239
|
+
function Er(t) {
|
|
235
240
|
const e = t.stiffness ?? L.stiffness, n = t.damping ?? L.damping, r = t.mass ?? L.mass;
|
|
236
241
|
return n < 2 * Math.sqrt(e * r);
|
|
237
242
|
}
|
|
238
|
-
function
|
|
243
|
+
function Lr(t) {
|
|
239
244
|
const e = t.stiffness ?? L.stiffness, n = t.mass ?? L.mass;
|
|
240
245
|
return 2 * Math.sqrt(e * n);
|
|
241
246
|
}
|
|
242
|
-
const
|
|
247
|
+
const Yt = 4, ze = 2e-3, Ue = 1e-4, Ve = 6e4;
|
|
243
248
|
function lt(t) {
|
|
244
|
-
const e = t.friction ??
|
|
245
|
-
return e > 0 ? e :
|
|
249
|
+
const e = t.friction ?? Yt;
|
|
250
|
+
return e > 0 ? e : Yt;
|
|
246
251
|
}
|
|
247
|
-
function
|
|
252
|
+
function je(t) {
|
|
248
253
|
return t.from + t.velocity / lt(t);
|
|
249
254
|
}
|
|
250
|
-
function
|
|
255
|
+
function He(t, e) {
|
|
251
256
|
if (e === void 0) return t;
|
|
252
257
|
if (typeof e == "number")
|
|
253
258
|
return e > 0 ? Math.round(t / e) * e : t;
|
|
@@ -258,16 +263,16 @@ function Ue(t, e) {
|
|
|
258
263
|
return n;
|
|
259
264
|
}
|
|
260
265
|
function ht(t) {
|
|
261
|
-
let e =
|
|
266
|
+
let e = He(je(t), t.end);
|
|
262
267
|
return t.min !== void 0 && (e = Math.max(t.min, e)), t.max !== void 0 && (e = Math.min(t.max, e)), e;
|
|
263
268
|
}
|
|
264
269
|
function ft(t) {
|
|
265
270
|
const e = Math.abs(ht(t) - t.from);
|
|
266
271
|
if (e === 0) return 0;
|
|
267
|
-
const n = t.restDelta ?? Math.max(
|
|
272
|
+
const n = t.restDelta ?? Math.max(Ue, e * ze);
|
|
268
273
|
if (n >= e) return 0;
|
|
269
274
|
const r = Math.log(e / n) / lt(t);
|
|
270
|
-
return Math.min(
|
|
275
|
+
return Math.min(Ve, r * 1e3);
|
|
271
276
|
}
|
|
272
277
|
function kt(t, e) {
|
|
273
278
|
if (e <= 0) return t.from;
|
|
@@ -276,47 +281,47 @@ function kt(t, e) {
|
|
|
276
281
|
const r = lt(t);
|
|
277
282
|
return t.from + (n - t.from) * (1 - Math.exp(-r * e / 1e3));
|
|
278
283
|
}
|
|
279
|
-
function
|
|
284
|
+
function Or(t, e) {
|
|
280
285
|
const n = lt(t), r = ht(t);
|
|
281
286
|
return e >= ft(t) ? 0 : (r - t.from) * n * Math.exp(-n * Math.max(0, e) / 1e3);
|
|
282
287
|
}
|
|
283
|
-
const St = (t) => t,
|
|
288
|
+
const St = (t) => t, Be = (t) => t * t, We = (t) => 1 - (1 - t) * (1 - t), Qe = (t) => t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2, ce = (t) => t * t * t, ue = (t) => 1 - Math.pow(1 - t, 3), le = (t) => t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2, Ge = ce, Ke = ue, Ze = le, qe = {
|
|
284
289
|
linear: St,
|
|
285
|
-
"ease-in":
|
|
286
|
-
"ease-out":
|
|
287
|
-
"ease-in-out":
|
|
288
|
-
"ease-in-quad":
|
|
289
|
-
"ease-out-quad":
|
|
290
|
-
"ease-in-out-quad":
|
|
291
|
-
"ease-in-cubic":
|
|
292
|
-
"ease-out-cubic":
|
|
293
|
-
"ease-in-out-cubic":
|
|
290
|
+
"ease-in": Ge,
|
|
291
|
+
"ease-out": Ke,
|
|
292
|
+
"ease-in-out": Ze,
|
|
293
|
+
"ease-in-quad": Be,
|
|
294
|
+
"ease-out-quad": We,
|
|
295
|
+
"ease-in-out-quad": Qe,
|
|
296
|
+
"ease-in-cubic": ce,
|
|
297
|
+
"ease-out-cubic": ue,
|
|
298
|
+
"ease-in-out-cubic": le
|
|
294
299
|
};
|
|
295
|
-
function
|
|
296
|
-
const [e, n, r, s] = t, o = 3 * e,
|
|
297
|
-
let g =
|
|
300
|
+
function Je(t) {
|
|
301
|
+
const [e, n, r, s] = t, o = 3 * e, a = 3 * (r - e) - o, i = 1 - o - a, c = 3 * n, l = 3 * (s - n) - c, h = 1 - c - l, u = (p) => ((i * p + a) * p + o) * p, f = (p) => ((h * p + l) * p + c) * p, d = (p) => (3 * i * p + 2 * a) * p + o, m = (p) => {
|
|
302
|
+
let g = p;
|
|
298
303
|
for (let k = 0; k < 8; k++) {
|
|
299
|
-
const
|
|
300
|
-
if (Math.abs(
|
|
304
|
+
const S = u(g) - p;
|
|
305
|
+
if (Math.abs(S) < 1e-7)
|
|
301
306
|
return g;
|
|
302
|
-
const
|
|
303
|
-
if (Math.abs(
|
|
307
|
+
const b = d(g);
|
|
308
|
+
if (Math.abs(b) < 1e-7)
|
|
304
309
|
break;
|
|
305
|
-
g -=
|
|
310
|
+
g -= S / b;
|
|
306
311
|
}
|
|
307
|
-
let
|
|
308
|
-
for (g =
|
|
309
|
-
const k =
|
|
310
|
-
if (Math.abs(k -
|
|
312
|
+
let M = 0, y = 1;
|
|
313
|
+
for (g = p; M < y; ) {
|
|
314
|
+
const k = u(g);
|
|
315
|
+
if (Math.abs(k - p) < 1e-7)
|
|
311
316
|
return g;
|
|
312
|
-
|
|
317
|
+
p > k ? M = g : y = g, g = (M + y) / 2;
|
|
313
318
|
}
|
|
314
319
|
return g;
|
|
315
320
|
};
|
|
316
|
-
return (
|
|
317
|
-
if (
|
|
318
|
-
if (
|
|
319
|
-
const g =
|
|
321
|
+
return (p) => {
|
|
322
|
+
if (p <= 0) return 0;
|
|
323
|
+
if (p >= 1) return 1;
|
|
324
|
+
const g = m(p);
|
|
320
325
|
return f(g);
|
|
321
326
|
};
|
|
322
327
|
}
|
|
@@ -325,11 +330,11 @@ function gt(t, e = "out") {
|
|
|
325
330
|
const n = (r) => 1 - t(1 - r);
|
|
326
331
|
return e === "in" ? n : (r) => r < 0.5 ? n(r * 2) / 2 : t(r * 2 - 1) / 2 + 0.5;
|
|
327
332
|
}
|
|
328
|
-
function
|
|
333
|
+
function tn(t = 1, e = 0.3) {
|
|
329
334
|
const n = Math.max(1, t), r = e / (2 * Math.PI) * Math.asin(1 / n);
|
|
330
335
|
return (s) => s <= 0 ? 0 : s >= 1 ? 1 : n * Math.pow(2, -10 * s) * Math.sin((s - r) * (2 * Math.PI) / e) + 1;
|
|
331
336
|
}
|
|
332
|
-
const
|
|
337
|
+
const en = (t) => {
|
|
333
338
|
if (t <= 0) return 0;
|
|
334
339
|
if (t >= 1) return 1;
|
|
335
340
|
if (t < 1 / 2.75) return 7.5625 * t * t;
|
|
@@ -344,7 +349,7 @@ const qe = (t) => {
|
|
|
344
349
|
const r = t - 2.625 / 2.75;
|
|
345
350
|
return 7.5625 * r * r + 0.984375;
|
|
346
351
|
};
|
|
347
|
-
function
|
|
352
|
+
function nn(t = 1.70158) {
|
|
348
353
|
return (e) => {
|
|
349
354
|
if (e <= 0) return 0;
|
|
350
355
|
if (e >= 1) return 1;
|
|
@@ -352,7 +357,7 @@ function Je(t = 1.70158) {
|
|
|
352
357
|
return n * n * ((t + 1) * n + t) + 1;
|
|
353
358
|
};
|
|
354
359
|
}
|
|
355
|
-
function
|
|
360
|
+
function rn(t, e = "end") {
|
|
356
361
|
const n = Math.max(1, Math.floor(t));
|
|
357
362
|
return (r) => {
|
|
358
363
|
if (r >= 1) return 1;
|
|
@@ -370,22 +375,22 @@ function tn(t, e = "end") {
|
|
|
370
375
|
}
|
|
371
376
|
};
|
|
372
377
|
}
|
|
373
|
-
function
|
|
378
|
+
function sn(t) {
|
|
374
379
|
switch (t.type) {
|
|
375
380
|
case "steps":
|
|
376
|
-
return
|
|
381
|
+
return rn(t.count, t.position);
|
|
377
382
|
case "elastic":
|
|
378
|
-
return gt(
|
|
383
|
+
return gt(tn(t.amplitude, t.period), t.mode);
|
|
379
384
|
case "bounce":
|
|
380
|
-
return gt(
|
|
385
|
+
return gt(en, t.mode);
|
|
381
386
|
case "back":
|
|
382
|
-
return gt(
|
|
387
|
+
return gt(nn(t.overshoot), t.mode);
|
|
383
388
|
}
|
|
384
389
|
}
|
|
385
|
-
function
|
|
386
|
-
return t === void 0 ? St :
|
|
390
|
+
function he(t) {
|
|
391
|
+
return t === void 0 ? St : Fe(t) ? Je(t.points) : xt(t) ? sn(t) : qe[t] ?? St;
|
|
387
392
|
}
|
|
388
|
-
const
|
|
393
|
+
const zt = 32, on = 256, W = /* @__PURE__ */ new Map(), an = /[MmLlHhVvCcSsQqTtAaZz]/, cn = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/, un = {
|
|
389
394
|
M: 2,
|
|
390
395
|
L: 2,
|
|
391
396
|
H: 1,
|
|
@@ -397,7 +402,7 @@ const Yt = 32, nn = 256, W = /* @__PURE__ */ new Map(), rn = /[MmLlHhVvCcSsQqTtA
|
|
|
397
402
|
A: 7,
|
|
398
403
|
Z: 0
|
|
399
404
|
};
|
|
400
|
-
function
|
|
405
|
+
function ln(t) {
|
|
401
406
|
const e = [];
|
|
402
407
|
let n = 0, r = null;
|
|
403
408
|
const s = () => {
|
|
@@ -405,52 +410,52 @@ function an(t) {
|
|
|
405
410
|
};
|
|
406
411
|
for (; n < t.length && (s(), !(n >= t.length)); ) {
|
|
407
412
|
const o = t[n];
|
|
408
|
-
if (
|
|
413
|
+
if (an.test(o)) {
|
|
409
414
|
r = { type: o, args: [] }, e.push(r), n++;
|
|
410
415
|
continue;
|
|
411
416
|
}
|
|
412
417
|
if (!r) break;
|
|
413
|
-
const
|
|
414
|
-
if (
|
|
418
|
+
const a = r.type === "A" || r.type === "a", i = r.args.length % 7;
|
|
419
|
+
if (a && (i === 3 || i === 4)) {
|
|
415
420
|
if (o !== "0" && o !== "1") break;
|
|
416
421
|
r.args.push(o === "1" ? 1 : 0), n++;
|
|
417
422
|
continue;
|
|
418
423
|
}
|
|
419
|
-
const c =
|
|
424
|
+
const c = cn.exec(t.slice(n));
|
|
420
425
|
if (!c) break;
|
|
421
426
|
r.args.push(parseFloat(c[0])), n += c[0].length;
|
|
422
427
|
}
|
|
423
428
|
return e;
|
|
424
429
|
}
|
|
425
|
-
function
|
|
426
|
-
if (t ===
|
|
427
|
-
let
|
|
428
|
-
if (
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
431
|
-
const R = Math.sqrt(
|
|
432
|
-
|
|
433
|
-
}
|
|
434
|
-
const k = o ===
|
|
435
|
-
const
|
|
430
|
+
function hn(t, e, n, r, s, o, a, i, c) {
|
|
431
|
+
if (t === i && e === c) return [];
|
|
432
|
+
let l = Math.abs(n), h = Math.abs(r);
|
|
433
|
+
if (l === 0 || h === 0) return [[t, e, i, c, i, c]];
|
|
434
|
+
const u = s * Math.PI / 180, f = Math.cos(u), d = Math.sin(u), m = (t - i) / 2, p = (e - c) / 2, g = f * m + d * p, M = -d * m + f * p, y = g * g / (l * l) + M * M / (h * h);
|
|
435
|
+
if (y > 1) {
|
|
436
|
+
const R = Math.sqrt(y);
|
|
437
|
+
l *= R, h *= R;
|
|
438
|
+
}
|
|
439
|
+
const k = o === a ? -1 : 1, S = l * l * h * h - l * l * M * M - h * h * g * g, b = l * l * M * M + h * h * g * g, v = k * Math.sqrt(Math.max(0, S / b)), A = v * l * M / h, D = -v * h * g / l, _ = f * A - d * D + (t + i) / 2, T = d * A + f * D + (e + c) / 2, x = (R, I, E, H) => {
|
|
440
|
+
const pt = R * E + I * H, rt = Math.sqrt((R * R + I * I) * (E * E + H * H)), Z = Math.acos(Math.max(-1, Math.min(1, pt / rt)));
|
|
436
441
|
return R * H - I * E < 0 ? -Z : Z;
|
|
437
|
-
},
|
|
438
|
-
let $ = x((g - A) /
|
|
439
|
-
!
|
|
440
|
-
const P = Math.max(1, Math.ceil(Math.abs($) / (Math.PI / 2))),
|
|
441
|
-
const I =
|
|
442
|
-
return [f * I -
|
|
442
|
+
}, w = x(1, 0, (g - A) / l, (M - D) / h);
|
|
443
|
+
let $ = x((g - A) / l, (M - D) / h, (-g - A) / l, (-M - D) / h);
|
|
444
|
+
!a && $ > 0 && ($ -= 2 * Math.PI), a && $ < 0 && ($ += 2 * Math.PI);
|
|
445
|
+
const P = Math.max(1, Math.ceil(Math.abs($) / (Math.PI / 2))), dt = $ / P, nt = 4 / 3 * Math.tan(dt / 4), Ot = (R) => {
|
|
446
|
+
const I = l * Math.cos(R), E = h * Math.sin(R);
|
|
447
|
+
return [f * I - d * E + _, d * I + f * E + T];
|
|
443
448
|
}, Ft = (R) => {
|
|
444
|
-
const I = -
|
|
445
|
-
return [f * I -
|
|
446
|
-
},
|
|
449
|
+
const I = -l * Math.sin(R), E = h * Math.cos(R);
|
|
450
|
+
return [f * I - d * E, d * I + f * E];
|
|
451
|
+
}, Xt = [];
|
|
447
452
|
for (let R = 0; R < P; R++) {
|
|
448
|
-
const I =
|
|
449
|
-
|
|
453
|
+
const I = w + R * dt, E = I + dt, [H, pt] = Ot(I), [rt, Z] = R === P - 1 ? [i, c] : Ot(E), [Ie, Ee] = Ft(I), [Le, Oe] = Ft(E);
|
|
454
|
+
Xt.push([H + nt * Ie, pt + nt * Ee, rt - nt * Le, Z - nt * Oe, rt, Z]);
|
|
450
455
|
}
|
|
451
|
-
return
|
|
456
|
+
return Xt;
|
|
452
457
|
}
|
|
453
|
-
function
|
|
458
|
+
function Y(t, e, n, r, s) {
|
|
454
459
|
const o = 1 - s;
|
|
455
460
|
return o * o * o * t + 3 * o * o * s * e + 3 * o * s * s * n + s * s * s * r;
|
|
456
461
|
}
|
|
@@ -471,172 +476,172 @@ function q(t, e, n, r) {
|
|
|
471
476
|
};
|
|
472
477
|
}
|
|
473
478
|
function ot(t, e, n) {
|
|
474
|
-
const [r, s, o,
|
|
475
|
-
let
|
|
476
|
-
for (let
|
|
477
|
-
const
|
|
478
|
-
f += Math.hypot(
|
|
479
|
+
const [r, s, o, a, i, c] = n, l = [0];
|
|
480
|
+
let h = t, u = e, f = 0;
|
|
481
|
+
for (let d = 1; d <= zt; d++) {
|
|
482
|
+
const m = d / zt, p = Y(t, r, o, i, m), g = Y(e, s, a, c, m);
|
|
483
|
+
f += Math.hypot(p - h, g - u), l.push(f), h = p, u = g;
|
|
479
484
|
}
|
|
480
485
|
return {
|
|
481
486
|
subpath: 0,
|
|
482
487
|
type: "C",
|
|
483
|
-
points: [r, s, o,
|
|
488
|
+
points: [r, s, o, a, i, c],
|
|
484
489
|
startX: t,
|
|
485
490
|
startY: e,
|
|
486
|
-
endX:
|
|
491
|
+
endX: i,
|
|
487
492
|
endY: c,
|
|
488
493
|
length: f,
|
|
489
|
-
lengths:
|
|
494
|
+
lengths: l
|
|
490
495
|
};
|
|
491
496
|
}
|
|
492
497
|
function G(t) {
|
|
493
498
|
const e = W.get(t);
|
|
494
499
|
if (e) return e;
|
|
495
500
|
const n = [];
|
|
496
|
-
let r = 0, s = 0, o = 0,
|
|
497
|
-
const
|
|
498
|
-
|
|
501
|
+
let r = 0, s = 0, o = 0, a = 0, i = null, c = null, l = -1;
|
|
502
|
+
const h = /* @__PURE__ */ new Set(), u = (p) => {
|
|
503
|
+
l < 0 && (l = 0), p.subpath = l, n.push(p);
|
|
499
504
|
};
|
|
500
|
-
for (const { type:
|
|
501
|
-
const
|
|
502
|
-
if (
|
|
503
|
-
(r !== o || s !==
|
|
505
|
+
for (const { type: p, args: g } of ln(t)) {
|
|
506
|
+
const M = p.toUpperCase(), y = p !== M, k = un[M];
|
|
507
|
+
if (M === "Z") {
|
|
508
|
+
(r !== o || s !== a) && u(q(r, s, o, a)), l >= 0 && h.add(l), r = o, s = a, i = c = null;
|
|
504
509
|
continue;
|
|
505
510
|
}
|
|
506
|
-
for (let
|
|
507
|
-
const
|
|
508
|
-
let D = null,
|
|
509
|
-
switch (
|
|
511
|
+
for (let S = 0; S + k <= g.length; S += k) {
|
|
512
|
+
const b = g.slice(S, S + k), v = y ? r : 0, A = y ? s : 0;
|
|
513
|
+
let D = null, _ = null;
|
|
514
|
+
switch (M) {
|
|
510
515
|
case "M":
|
|
511
|
-
|
|
516
|
+
S === 0 ? (r = b[0] + v, s = b[1] + A, o = r, a = s, (l < 0 || n[n.length - 1]?.subpath === l) && l++) : (u(q(r, s, b[0] + v, b[1] + A)), r = b[0] + v, s = b[1] + A);
|
|
512
517
|
break;
|
|
513
518
|
case "L":
|
|
514
|
-
|
|
519
|
+
u(q(r, s, b[0] + v, b[1] + A)), r = b[0] + v, s = b[1] + A;
|
|
515
520
|
break;
|
|
516
521
|
case "H":
|
|
517
|
-
|
|
522
|
+
u(q(r, s, b[0] + v, s)), r = b[0] + v;
|
|
518
523
|
break;
|
|
519
524
|
case "V":
|
|
520
|
-
|
|
525
|
+
u(q(r, s, r, b[0] + A)), s = b[0] + A;
|
|
521
526
|
break;
|
|
522
527
|
case "C": {
|
|
523
|
-
const T = [
|
|
524
|
-
|
|
528
|
+
const T = [b[0] + v, b[1] + A, b[2] + v, b[3] + A, b[4] + v, b[5] + A];
|
|
529
|
+
u(ot(r, s, T)), D = [T[2], T[3]], r = T[4], s = T[5];
|
|
525
530
|
break;
|
|
526
531
|
}
|
|
527
532
|
case "S": {
|
|
528
|
-
const [T, x] =
|
|
529
|
-
|
|
533
|
+
const [T, x] = i ? [2 * r - i[0], 2 * s - i[1]] : [r, s], w = [T, x, b[0] + v, b[1] + A, b[2] + v, b[3] + A];
|
|
534
|
+
u(ot(r, s, w)), D = [w[2], w[3]], r = w[4], s = w[5];
|
|
530
535
|
break;
|
|
531
536
|
}
|
|
532
537
|
case "Q":
|
|
533
538
|
case "T": {
|
|
534
539
|
let T = r, x = s;
|
|
535
|
-
|
|
536
|
-
const
|
|
537
|
-
|
|
540
|
+
M === "Q" ? (T = b[0] + v, x = b[1] + A) : c && (T = 2 * r - c[0], x = 2 * s - c[1]);
|
|
541
|
+
const w = M === "Q" ? b[2] + v : b[0] + v, $ = M === "Q" ? b[3] + A : b[1] + A;
|
|
542
|
+
u(
|
|
538
543
|
ot(r, s, [
|
|
539
544
|
r + 2 / 3 * (T - r),
|
|
540
545
|
s + 2 / 3 * (x - s),
|
|
541
|
-
|
|
546
|
+
w + 2 / 3 * (T - w),
|
|
542
547
|
$ + 2 / 3 * (x - $),
|
|
543
|
-
|
|
548
|
+
w,
|
|
544
549
|
$
|
|
545
550
|
])
|
|
546
|
-
),
|
|
551
|
+
), _ = [T, x], r = w, s = $;
|
|
547
552
|
break;
|
|
548
553
|
}
|
|
549
554
|
case "A": {
|
|
550
|
-
const T =
|
|
551
|
-
let
|
|
552
|
-
for (const P of
|
|
553
|
-
|
|
555
|
+
const T = b[5] + v, x = b[6] + A;
|
|
556
|
+
let w = r, $ = s;
|
|
557
|
+
for (const P of hn(r, s, b[0], b[1], b[2], b[3], b[4], T, x))
|
|
558
|
+
u(ot(w, $, P)), w = P[4], $ = P[5];
|
|
554
559
|
r = T, s = x;
|
|
555
560
|
break;
|
|
556
561
|
}
|
|
557
562
|
}
|
|
558
|
-
|
|
563
|
+
i = D, c = _;
|
|
559
564
|
}
|
|
560
565
|
}
|
|
561
|
-
const f = n.reduce((
|
|
562
|
-
for (let
|
|
563
|
-
const g = n[
|
|
564
|
-
let
|
|
565
|
-
for (;
|
|
566
|
-
const k = n[
|
|
567
|
-
|
|
566
|
+
const f = n.reduce((p, g) => p + g.length, 0), d = [];
|
|
567
|
+
for (let p = 0; p < n.length; ) {
|
|
568
|
+
const g = n[p].subpath;
|
|
569
|
+
let M = p, y = 0;
|
|
570
|
+
for (; M < n.length && n[M].subpath === g; ) y += n[M++].length;
|
|
571
|
+
const k = n[p], S = n[M - 1], b = h.has(g) || Math.abs(S.endX - k.startX) < 1e-9 && Math.abs(S.endY - k.startY) < 1e-9;
|
|
572
|
+
d.push({ start: p, end: M, length: y, closed: b }), p = M;
|
|
568
573
|
}
|
|
569
|
-
const
|
|
570
|
-
return W.size >=
|
|
574
|
+
const m = { segments: n, totalLength: f, subpaths: d };
|
|
575
|
+
return W.size >= on && W.delete(W.keys().next().value), W.set(t, m), m;
|
|
571
576
|
}
|
|
572
|
-
function
|
|
577
|
+
function fn(t, e) {
|
|
573
578
|
const n = t.lengths;
|
|
574
579
|
if (e <= 0) return 0;
|
|
575
580
|
if (e >= t.length) return 1;
|
|
576
581
|
let r = 0, s = n.length - 1;
|
|
577
582
|
for (; r < s - 1; ) {
|
|
578
|
-
const
|
|
579
|
-
n[
|
|
583
|
+
const i = r + s >> 1;
|
|
584
|
+
n[i] < e ? r = i : s = i;
|
|
580
585
|
}
|
|
581
|
-
const o = n[s] - n[r],
|
|
582
|
-
return (r +
|
|
586
|
+
const o = n[s] - n[r], a = o > 0 ? (e - n[r]) / o : 0;
|
|
587
|
+
return (r + a) / (n.length - 1);
|
|
583
588
|
}
|
|
584
|
-
function
|
|
589
|
+
function dn(t, e) {
|
|
585
590
|
if (t.type === "L") {
|
|
586
|
-
const
|
|
591
|
+
const u = t.length > 0 ? Math.max(0, Math.min(1, e / t.length)) : 0;
|
|
587
592
|
return {
|
|
588
|
-
x: t.startX + (t.endX - t.startX) *
|
|
589
|
-
y: t.startY + (t.endY - t.startY) *
|
|
593
|
+
x: t.startX + (t.endX - t.startX) * u,
|
|
594
|
+
y: t.startY + (t.endY - t.startY) * u,
|
|
590
595
|
angle: Math.atan2(t.endY - t.startY, t.endX - t.startX) * 180 / Math.PI
|
|
591
596
|
};
|
|
592
597
|
}
|
|
593
|
-
const [n, r, s, o,
|
|
594
|
-
let
|
|
595
|
-
if (Math.hypot(
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
+
const [n, r, s, o, a, i] = t.points, c = fn(t, e);
|
|
599
|
+
let l = Ut(t.startX, n, s, a, c), h = Ut(t.startY, r, o, i, c);
|
|
600
|
+
if (Math.hypot(l, h) < 1e-9) {
|
|
601
|
+
const u = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3), f = Y(t.startX, n, s, a, u), d = Y(t.startY, r, o, i, u), m = Y(t.startX, n, s, a, c), p = Y(t.startY, r, o, i, c);
|
|
602
|
+
l = c < 0.5 ? f - m : m - f, h = c < 0.5 ? d - p : p - d;
|
|
598
603
|
}
|
|
599
604
|
return {
|
|
600
|
-
x:
|
|
601
|
-
y:
|
|
602
|
-
angle: Math.atan2(
|
|
605
|
+
x: Y(t.startX, n, s, a, c),
|
|
606
|
+
y: Y(t.startY, r, o, i, c),
|
|
607
|
+
angle: Math.atan2(h, l) * 180 / Math.PI
|
|
603
608
|
};
|
|
604
609
|
}
|
|
605
|
-
function
|
|
610
|
+
function fe(t, e, n = 0, r = t.length) {
|
|
606
611
|
if (r <= n) return { x: 0, y: 0, angle: 0 };
|
|
607
612
|
let s = 0;
|
|
608
613
|
for (let o = n; o < r; o++) {
|
|
609
|
-
const
|
|
610
|
-
if (s +
|
|
611
|
-
return
|
|
612
|
-
s +=
|
|
614
|
+
const a = t[o];
|
|
615
|
+
if (s + a.length >= e || o === r - 1)
|
|
616
|
+
return dn(a, e - s);
|
|
617
|
+
s += a.length;
|
|
613
618
|
}
|
|
614
619
|
return { x: 0, y: 0, angle: 0 };
|
|
615
620
|
}
|
|
616
|
-
function
|
|
621
|
+
function pn(t, e) {
|
|
617
622
|
const { segments: n, totalLength: r } = G(t);
|
|
618
|
-
return
|
|
623
|
+
return fe(n, Math.max(0, Math.min(1, e)) * r);
|
|
619
624
|
}
|
|
620
|
-
function
|
|
625
|
+
function Fr() {
|
|
621
626
|
W.clear();
|
|
622
627
|
}
|
|
623
|
-
function
|
|
628
|
+
function Xr(t) {
|
|
624
629
|
return G(t).totalLength;
|
|
625
630
|
}
|
|
626
|
-
const
|
|
627
|
-
let
|
|
631
|
+
const gn = 24, mn = 320, yn = 2.5, J = 72, Nr = 64, Mn = 0.2, _n = 128, et = /* @__PURE__ */ new Map();
|
|
632
|
+
let at = 0, N;
|
|
628
633
|
const Vt = (t) => Math.round(t * 100) / 100;
|
|
629
634
|
function jt(t, e) {
|
|
630
635
|
const { segments: n, subpaths: r, totalLength: s } = G(t);
|
|
631
636
|
if (n.length === 0) return [];
|
|
632
637
|
if (e) {
|
|
633
|
-
const o = r.every((
|
|
638
|
+
const o = r.every((a) => a.closed);
|
|
634
639
|
return [{ segments: n, start: 0, end: n.length, length: s, closed: o }];
|
|
635
640
|
}
|
|
636
641
|
return r.filter((o) => o.length > 0).map((o) => ({ segments: n, start: o.start, end: o.end, length: o.length, closed: o.closed }));
|
|
637
642
|
}
|
|
638
|
-
function
|
|
639
|
-
const n = t.closed ? (e % 1 + 1) % 1 : Math.max(0, Math.min(1, e)), r =
|
|
643
|
+
function wt(t, e) {
|
|
644
|
+
const n = t.closed ? (e % 1 + 1) % 1 : Math.max(0, Math.min(1, e)), r = fe(t.segments, n * t.length, t.start, t.end);
|
|
640
645
|
return [r.x, r.y];
|
|
641
646
|
}
|
|
642
647
|
function Ht(t) {
|
|
@@ -649,7 +654,7 @@ function Ht(t) {
|
|
|
649
654
|
function Bt(t, e) {
|
|
650
655
|
const n = [];
|
|
651
656
|
for (let r = 0; r < e; r++)
|
|
652
|
-
n.push(
|
|
657
|
+
n.push(wt(t, t.closed ? r / e : r / (e - 1)));
|
|
653
658
|
return n;
|
|
654
659
|
}
|
|
655
660
|
function Wt(t) {
|
|
@@ -658,184 +663,184 @@ function Wt(t) {
|
|
|
658
663
|
e += r, n += s;
|
|
659
664
|
return e /= t.length, n /= t.length, t.map(([r, s]) => [r - e, s - n]);
|
|
660
665
|
}
|
|
661
|
-
function
|
|
666
|
+
function bn(t, e, n) {
|
|
662
667
|
const r = t.closed && e.closed;
|
|
663
668
|
if (n !== void 0)
|
|
664
669
|
return { offset: r ? Math.abs(n) % J / J : 0, reversed: n < 0 };
|
|
665
|
-
const s = Wt(Bt(t, J)), o = Wt(Bt(e, J)),
|
|
666
|
-
let
|
|
667
|
-
for (const
|
|
668
|
-
const
|
|
669
|
-
for (let
|
|
670
|
+
const s = Wt(Bt(t, J)), o = Wt(Bt(e, J)), a = J;
|
|
671
|
+
let i = { offset: 0, reversed: !1 }, c = 1 / 0;
|
|
672
|
+
for (const l of [!1, !0]) {
|
|
673
|
+
const h = r ? a : 1;
|
|
674
|
+
for (let u = 0; u < h; u++) {
|
|
670
675
|
let f = 0;
|
|
671
|
-
for (let
|
|
672
|
-
const
|
|
673
|
-
f +=
|
|
676
|
+
for (let d = 0; d < a && f < c; d++) {
|
|
677
|
+
const m = r ? l ? (u - d + a) % a : (d + u) % a : l ? a - 1 - d : d, p = s[d][0] - o[m][0], g = s[d][1] - o[m][1];
|
|
678
|
+
f += p * p + g * g;
|
|
674
679
|
}
|
|
675
|
-
f < c && (c = f,
|
|
680
|
+
f < c && (c = f, i = { offset: r ? u / a : 0, reversed: l });
|
|
676
681
|
}
|
|
677
682
|
}
|
|
678
|
-
return
|
|
683
|
+
return i;
|
|
679
684
|
}
|
|
680
|
-
function
|
|
685
|
+
function Tn(t, e, n) {
|
|
681
686
|
return n ? ((e.reversed ? e.offset - t : t + e.offset) % 1 + 1) % 1 : e.reversed ? 1 - t : t;
|
|
682
687
|
}
|
|
683
|
-
function
|
|
688
|
+
function xn(t, e, n) {
|
|
684
689
|
return n ? ((e.reversed ? e.offset - t : t - e.offset) % 1 + 1) % 1 : e.reversed ? 1 - t : t;
|
|
685
690
|
}
|
|
686
|
-
function
|
|
687
|
-
const r = t.closed && e.closed, s =
|
|
688
|
-
|
|
689
|
-
Math.min(
|
|
690
|
-
),
|
|
691
|
-
for (let
|
|
692
|
-
for (const
|
|
693
|
-
for (const
|
|
694
|
-
let c = [...
|
|
695
|
-
r && (c = c.filter((
|
|
696
|
-
const
|
|
697
|
-
for (const
|
|
698
|
-
|
|
699
|
-
return
|
|
700
|
-
}
|
|
701
|
-
function
|
|
691
|
+
function kn(t, e, n) {
|
|
692
|
+
const r = t.closed && e.closed, s = bn(t, e, n.shapeIndex), o = Math.max(
|
|
693
|
+
gn,
|
|
694
|
+
Math.min(mn, Math.ceil(Math.max(t.length, e.length) / yn))
|
|
695
|
+
), a = /* @__PURE__ */ new Set(), i = (u) => a.add(Math.round(u * 1e7) / 1e7);
|
|
696
|
+
for (let u = 0; u <= o; u++) i(u / o);
|
|
697
|
+
for (const u of Ht(t)) i(u);
|
|
698
|
+
for (const u of Ht(e)) i(xn(u, s, r));
|
|
699
|
+
let c = [...a].sort((u, f) => u - f);
|
|
700
|
+
r && (c = c.filter((u) => u < 1));
|
|
701
|
+
const l = [], h = [];
|
|
702
|
+
for (const u of c)
|
|
703
|
+
l.push(...wt(t, u)), h.push(...wt(e, Tn(u, s, r)));
|
|
704
|
+
return Sn({ from: l, to: h, closed: r });
|
|
705
|
+
}
|
|
706
|
+
function Sn(t) {
|
|
702
707
|
const e = t.from.length / 2;
|
|
703
708
|
if (e <= 3) return t;
|
|
704
709
|
const n = new Uint8Array(e);
|
|
705
710
|
n[0] = 1, n[e - 1] = 1;
|
|
706
711
|
const r = [[0, e - 1]];
|
|
707
712
|
for (; r.length > 0; ) {
|
|
708
|
-
const [
|
|
709
|
-
let c = -1,
|
|
710
|
-
for (let
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
+
const [a, i] = r.pop();
|
|
714
|
+
let c = -1, l = Mn;
|
|
715
|
+
for (let h = a + 1; h < i; h++) {
|
|
716
|
+
const u = Math.max(Qt(t.from, a, i, h), Qt(t.to, a, i, h));
|
|
717
|
+
u > l && (l = u, c = h);
|
|
713
718
|
}
|
|
714
|
-
c !== -1 && (n[c] = 1, r.push([
|
|
719
|
+
c !== -1 && (n[c] = 1, r.push([a, c], [c, i]));
|
|
715
720
|
}
|
|
716
721
|
const s = [], o = [];
|
|
717
|
-
for (let
|
|
718
|
-
n[
|
|
722
|
+
for (let a = 0; a < e; a++)
|
|
723
|
+
n[a] && (s.push(t.from[a * 2], t.from[a * 2 + 1]), o.push(t.to[a * 2], t.to[a * 2 + 1]));
|
|
719
724
|
return { from: s, to: o, closed: t.closed };
|
|
720
725
|
}
|
|
721
726
|
function Qt(t, e, n, r) {
|
|
722
|
-
const s = t[e * 2], o = t[e * 2 + 1],
|
|
723
|
-
return Math.hypot(c -
|
|
727
|
+
const s = t[e * 2], o = t[e * 2 + 1], a = t[n * 2] - s, i = t[n * 2 + 1] - o, c = t[r * 2] - s, l = t[r * 2 + 1] - o, h = a * a + i * i, u = h === 0 ? 0 : Math.max(0, Math.min(1, (c * a + l * i) / h));
|
|
728
|
+
return Math.hypot(c - u * a, l - u * i);
|
|
724
729
|
}
|
|
725
|
-
function
|
|
730
|
+
function wn(t, e, n) {
|
|
726
731
|
const r = n.shapeIndex;
|
|
727
|
-
if (
|
|
732
|
+
if (N && N.from === t && N.to === e && N.shapeIndex === r) return N.plan;
|
|
728
733
|
const o = et.get(String(r ?? "auto"))?.get(t)?.get(e);
|
|
729
734
|
if (o)
|
|
730
|
-
return
|
|
731
|
-
const
|
|
732
|
-
pairs:
|
|
735
|
+
return N = { from: t, to: e, shapeIndex: r, plan: o }, o;
|
|
736
|
+
const a = G(t).subpaths.filter((d) => d.length > 0).length === G(e).subpaths.filter((d) => d.length > 0).length, i = jt(t, !a), c = jt(e, !a), l = {
|
|
737
|
+
pairs: i.map((d, m) => kn(d, c[m], n))
|
|
733
738
|
};
|
|
734
|
-
|
|
735
|
-
const
|
|
736
|
-
et.set(
|
|
737
|
-
const f =
|
|
738
|
-
return
|
|
739
|
+
at >= _n && (et.clear(), at = 0);
|
|
740
|
+
const h = String(r ?? "auto"), u = et.get(h) ?? /* @__PURE__ */ new Map();
|
|
741
|
+
et.set(h, u);
|
|
742
|
+
const f = u.get(t) ?? /* @__PURE__ */ new Map();
|
|
743
|
+
return u.set(t, f), f.set(e, l), at++, N = { from: t, to: e, shapeIndex: r, plan: l }, l;
|
|
739
744
|
}
|
|
740
|
-
function
|
|
745
|
+
function An(t, e, n, r = {}) {
|
|
741
746
|
if (!t) return e;
|
|
742
747
|
if (!e) return t;
|
|
743
748
|
const s = Math.max(0, Math.min(1, n));
|
|
744
749
|
if (s === 0) return t;
|
|
745
750
|
if (s === 1) return e;
|
|
746
|
-
const o =
|
|
751
|
+
const o = wn(t, e, r);
|
|
747
752
|
if (o.pairs.length === 0) return s < 0.5 ? t : e;
|
|
748
|
-
let
|
|
749
|
-
for (const
|
|
750
|
-
for (let c = 0; c <
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
+
let a = "";
|
|
754
|
+
for (const i of o.pairs) {
|
|
755
|
+
for (let c = 0; c < i.from.length; c += 2) {
|
|
756
|
+
const l = Vt(i.from[c] + (i.to[c] - i.from[c]) * s), h = Vt(i.from[c + 1] + (i.to[c + 1] - i.from[c + 1]) * s);
|
|
757
|
+
a += `${c === 0 ? a ? " M" : "M" : " L"}${l} ${h}`;
|
|
753
758
|
}
|
|
754
|
-
|
|
759
|
+
i.closed && (a += " Z");
|
|
755
760
|
}
|
|
756
|
-
return
|
|
761
|
+
return a;
|
|
757
762
|
}
|
|
758
|
-
function
|
|
759
|
-
et.clear(),
|
|
763
|
+
function Yr() {
|
|
764
|
+
et.clear(), at = 0, N = void 0;
|
|
760
765
|
}
|
|
761
|
-
function
|
|
766
|
+
function vn(t) {
|
|
762
767
|
return /^\s*[Mm]\s*[-+]?(?:\d|\.\d)/.test(t);
|
|
763
768
|
}
|
|
764
|
-
const Q = Math.PI / 180,
|
|
769
|
+
const Q = Math.PI / 180, Pn = 0.9995;
|
|
765
770
|
function Dt() {
|
|
766
771
|
return [0, 0, 0, 1];
|
|
767
772
|
}
|
|
768
|
-
function
|
|
773
|
+
function it(t, e) {
|
|
769
774
|
const n = Math.hypot(t[0], t[1], t[2]);
|
|
770
775
|
if (n === 0) return Dt();
|
|
771
776
|
const r = e * Q / 2, s = Math.sin(r) / n;
|
|
772
777
|
return [t[0] * s, t[1] * s, t[2] * s, Math.cos(r)];
|
|
773
778
|
}
|
|
774
|
-
function
|
|
775
|
-
return
|
|
779
|
+
function $n(t, e, n) {
|
|
780
|
+
return At(At(it([0, 1, 0], e), it([1, 0, 0], t)), it([0, 0, 1], n));
|
|
776
781
|
}
|
|
777
|
-
function
|
|
778
|
-
const [e, n, r, s] =
|
|
779
|
-
return Math.abs(c) < 0.9999999 ? [f / Q, Math.atan2(o,
|
|
782
|
+
function Rn(t) {
|
|
783
|
+
const [e, n, r, s] = z(t), o = 2 * (e * r + n * s), a = 2 * (e * n + r * s), i = 1 - 2 * (e * e + r * r), c = 2 * (n * r - e * s), l = 1 - 2 * (n * n + r * r), h = 2 * (e * r - n * s), u = 1 - 2 * (e * e + n * n), f = Math.asin(Math.max(-1, Math.min(1, -c)));
|
|
784
|
+
return Math.abs(c) < 0.9999999 ? [f / Q, Math.atan2(o, u) / Q, Math.atan2(a, i) / Q] : [f / Q, Math.atan2(-h, l) / Q, 0];
|
|
780
785
|
}
|
|
781
|
-
function
|
|
782
|
-
const [n, r, s, o] = t, [
|
|
786
|
+
function At(t, e) {
|
|
787
|
+
const [n, r, s, o] = t, [a, i, c, l] = e;
|
|
783
788
|
return [
|
|
784
|
-
o *
|
|
785
|
-
o *
|
|
786
|
-
o * c + n *
|
|
787
|
-
o *
|
|
789
|
+
o * a + n * l + r * c - s * i,
|
|
790
|
+
o * i - n * c + r * l + s * a,
|
|
791
|
+
o * c + n * i - r * a + s * l,
|
|
792
|
+
o * l - n * a - r * i - s * c
|
|
788
793
|
];
|
|
789
794
|
}
|
|
790
|
-
function
|
|
795
|
+
function de(t, e) {
|
|
791
796
|
return t[0] * e[0] + t[1] * e[1] + t[2] * e[2] + t[3] * e[3];
|
|
792
797
|
}
|
|
793
798
|
function pe(t) {
|
|
794
799
|
return Math.hypot(t[0], t[1], t[2], t[3]);
|
|
795
800
|
}
|
|
796
|
-
function
|
|
801
|
+
function z(t) {
|
|
797
802
|
const e = pe(t);
|
|
798
803
|
return e === 0 ? Dt() : [t[0] / e, t[1] / e, t[2] / e, t[3] / e];
|
|
799
804
|
}
|
|
800
|
-
function
|
|
805
|
+
function Dn(t) {
|
|
801
806
|
return [-t[0], -t[1], -t[2], t[3]];
|
|
802
807
|
}
|
|
803
|
-
function
|
|
804
|
-
const r =
|
|
805
|
-
let s =
|
|
806
|
-
if (o < 0 && (s = [-s[0], -s[1], -s[2], -s[3]], o = -o), o >
|
|
807
|
-
return
|
|
808
|
+
function ge(t, e, n) {
|
|
809
|
+
const r = z(t);
|
|
810
|
+
let s = z(e), o = de(r, s);
|
|
811
|
+
if (o < 0 && (s = [-s[0], -s[1], -s[2], -s[3]], o = -o), o > Pn)
|
|
812
|
+
return z([
|
|
808
813
|
r[0] + (s[0] - r[0]) * n,
|
|
809
814
|
r[1] + (s[1] - r[1]) * n,
|
|
810
815
|
r[2] + (s[2] - r[2]) * n,
|
|
811
816
|
r[3] + (s[3] - r[3]) * n
|
|
812
817
|
]);
|
|
813
|
-
const
|
|
814
|
-
return
|
|
815
|
-
r[0] * c + s[0] *
|
|
816
|
-
r[1] * c + s[1] *
|
|
817
|
-
r[2] * c + s[2] *
|
|
818
|
-
r[3] * c + s[3] *
|
|
818
|
+
const a = Math.acos(o), i = Math.sin(a), c = Math.sin((1 - n) * a) / i, l = Math.sin(n * a) / i;
|
|
819
|
+
return z([
|
|
820
|
+
r[0] * c + s[0] * l,
|
|
821
|
+
r[1] * c + s[1] * l,
|
|
822
|
+
r[2] * c + s[2] * l,
|
|
823
|
+
r[3] * c + s[3] * l
|
|
819
824
|
]);
|
|
820
825
|
}
|
|
821
|
-
function
|
|
822
|
-
const [n, r, s, o] =
|
|
823
|
-
return [e[0] + o *
|
|
826
|
+
function Cn(t, e) {
|
|
827
|
+
const [n, r, s, o] = z(t), a = 2 * (r * e[2] - s * e[1]), i = 2 * (s * e[0] - n * e[2]), c = 2 * (n * e[1] - r * e[0]);
|
|
828
|
+
return [e[0] + o * a + (r * c - s * i), e[1] + o * i + (s * a - n * c), e[2] + o * c + (n * i - r * a)];
|
|
824
829
|
}
|
|
825
|
-
const
|
|
830
|
+
const zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
826
831
|
__proto__: null,
|
|
827
|
-
conjugate:
|
|
828
|
-
dot:
|
|
829
|
-
fromAxisAngle:
|
|
830
|
-
fromEuler:
|
|
832
|
+
conjugate: Dn,
|
|
833
|
+
dot: de,
|
|
834
|
+
fromAxisAngle: it,
|
|
835
|
+
fromEuler: $n,
|
|
831
836
|
identity: Dt,
|
|
832
837
|
length: pe,
|
|
833
|
-
multiply:
|
|
834
|
-
normalize:
|
|
835
|
-
rotateVec3:
|
|
836
|
-
slerp:
|
|
837
|
-
toEuler:
|
|
838
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
838
|
+
multiply: At,
|
|
839
|
+
normalize: z,
|
|
840
|
+
rotateVec3: Cn,
|
|
841
|
+
slerp: ge,
|
|
842
|
+
toEuler: Rn
|
|
843
|
+
}, Symbol.toStringTag, { value: "Module" })), X = (t, e, n) => t + (e - t) * n, me = 512, mt = /* @__PURE__ */ new Map(), yt = /* @__PURE__ */ new Map();
|
|
839
844
|
function Gt(t) {
|
|
840
845
|
const e = mt.get(t);
|
|
841
846
|
if (e) return e;
|
|
@@ -844,56 +849,56 @@ function Gt(t) {
|
|
|
844
849
|
parseInt(n.slice(2, 4), 16),
|
|
845
850
|
parseInt(n.slice(4, 6), 16)
|
|
846
851
|
];
|
|
847
|
-
return mt.size <
|
|
852
|
+
return mt.size < me && mt.set(t, r), r;
|
|
848
853
|
}
|
|
849
|
-
const Kt = (t) => t.charCodeAt(0) === 35, Zt = (t) => t.startsWith("rgb"), qt = (t) => t.startsWith("rgba"),
|
|
850
|
-
function
|
|
854
|
+
const Kt = (t) => t.charCodeAt(0) === 35, Zt = (t) => t.startsWith("rgb"), qt = (t) => t.startsWith("rgba"), In = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/, Mt = (t) => Math.round(t).toString(16).padStart(2, "0");
|
|
855
|
+
function En(t, e, n) {
|
|
851
856
|
return `#${Mt(t)}${Mt(e)}${Mt(n)}`;
|
|
852
857
|
}
|
|
853
858
|
function Jt(t) {
|
|
854
859
|
const e = yt.get(t);
|
|
855
860
|
if (e) return e;
|
|
856
|
-
const n = t.match(
|
|
861
|
+
const n = t.match(In);
|
|
857
862
|
if (!n)
|
|
858
863
|
throw new Error(`Invalid rgb color: ${t}`);
|
|
859
|
-
const r = parseInt(n[1], 10), s = parseInt(n[2], 10), o = parseInt(n[3], 10),
|
|
860
|
-
return yt.size <
|
|
864
|
+
const r = parseInt(n[1], 10), s = parseInt(n[2], 10), o = parseInt(n[3], 10), a = n[4] !== void 0 ? [r, s, o, parseFloat(n[4])] : [r, s, o];
|
|
865
|
+
return yt.size < me && yt.set(t, a), a;
|
|
861
866
|
}
|
|
862
|
-
const
|
|
867
|
+
const Ln = (t, e, n) => {
|
|
863
868
|
if (Kt(t) && Kt(e)) {
|
|
864
|
-
const [r, s, o] = Gt(t), [
|
|
865
|
-
return
|
|
869
|
+
const [r, s, o] = Gt(t), [a, i, c] = Gt(e), l = X(r, a, n), h = X(s, i, n), u = X(o, c, n);
|
|
870
|
+
return En(l, h, u);
|
|
866
871
|
}
|
|
867
872
|
if ((Zt(t) || qt(t)) && (Zt(e) || qt(e))) {
|
|
868
|
-
const r = Jt(t), s = Jt(e), o = Math.round(
|
|
873
|
+
const r = Jt(t), s = Jt(e), o = Math.round(X(r[0], s[0], n)), a = Math.round(X(r[1], s[1], n)), i = Math.round(X(r[2], s[2], n));
|
|
869
874
|
if (r.length === 4 || s.length === 4) {
|
|
870
|
-
const c = r[3] ?? 1,
|
|
871
|
-
return `rgba(${o}, ${
|
|
875
|
+
const c = r[3] ?? 1, l = s[3] ?? 1, h = X(c, l, n);
|
|
876
|
+
return `rgba(${o}, ${a}, ${i}, ${h})`;
|
|
872
877
|
}
|
|
873
|
-
return `rgb(${o}, ${
|
|
878
|
+
return `rgb(${o}, ${a}, ${i})`;
|
|
874
879
|
}
|
|
875
880
|
return n < 1 ? t : e;
|
|
876
|
-
},
|
|
881
|
+
}, On = (t, e, n) => {
|
|
877
882
|
const r = Math.min(t.length, e.length), s = [];
|
|
878
883
|
for (let o = 0; o < r; o++)
|
|
879
|
-
s.push(
|
|
884
|
+
s.push(X(t[o], e[o], n));
|
|
880
885
|
return s;
|
|
881
|
-
},
|
|
882
|
-
function
|
|
883
|
-
return e === "slerp" ?
|
|
886
|
+
}, Fn = (t, e, n) => ge(t, e, n), te = (t, e, n) => n < 1 ? t : e, Xn = (t, e, n) => An(t, e, n);
|
|
887
|
+
function ye(t, e) {
|
|
888
|
+
return e === "slerp" ? Fn : typeof t == "number" ? X : Array.isArray(t) ? On : typeof t == "string" ? t.startsWith("#") || t.startsWith("rgb") ? Ln : vn(t) ? Xn : te : te;
|
|
884
889
|
}
|
|
885
|
-
const
|
|
886
|
-
function
|
|
890
|
+
const Me = 1e3 / 60;
|
|
891
|
+
function _e(t, e = {}) {
|
|
887
892
|
if (!j(t))
|
|
888
893
|
throw new Error(`bakeSpringTrack: track "${t.id}" is not a spring track`);
|
|
889
894
|
const n = new ut(t.spring);
|
|
890
|
-
return
|
|
895
|
+
return Te(t, (r) => n.valueAt(r), n.settleTime(), t.spring.from, t.spring.to, e);
|
|
891
896
|
}
|
|
892
|
-
function
|
|
897
|
+
function be(t, e = {}) {
|
|
893
898
|
if (!V(t))
|
|
894
899
|
throw new Error(`bakeInertiaTrack: track "${t.id}" is not an inertia track`);
|
|
895
900
|
const n = t.inertia;
|
|
896
|
-
return
|
|
901
|
+
return Te(
|
|
897
902
|
t,
|
|
898
903
|
(r) => kt(n, r),
|
|
899
904
|
ft(n),
|
|
@@ -902,66 +907,66 @@ function _e(t, e = {}) {
|
|
|
902
907
|
e
|
|
903
908
|
);
|
|
904
909
|
}
|
|
905
|
-
function
|
|
906
|
-
const
|
|
907
|
-
for (let
|
|
908
|
-
|
|
909
|
-
const
|
|
910
|
-
return !
|
|
910
|
+
function Te(t, e, n, r, s, o) {
|
|
911
|
+
const a = o.intervalMs ?? Me, i = o.tolerance ?? 0.01, c = t.delay ?? 0, l = [];
|
|
912
|
+
for (let u = 0; u <= n; u += a)
|
|
913
|
+
l.push({ time: u + c, value: e(u), easing: "linear" });
|
|
914
|
+
const h = l[l.length - 1];
|
|
915
|
+
return !h || h.time < n + c ? l.push({ time: n + c, value: s, easing: "linear" }) : h.value = s, c > 0 && l.unshift({ time: 0, value: r, easing: "linear" }), {
|
|
911
916
|
id: t.id,
|
|
912
917
|
target: t.target,
|
|
913
918
|
property: t.property,
|
|
914
|
-
keyframes:
|
|
919
|
+
keyframes: i > 0 ? zn(l, i) : l,
|
|
915
920
|
...t.targets && { targets: [...t.targets] },
|
|
916
921
|
...t.stagger && { stagger: { ...t.stagger } }
|
|
917
922
|
};
|
|
918
923
|
}
|
|
919
|
-
function
|
|
920
|
-
const s = r.intervalMs ??
|
|
921
|
-
if (
|
|
924
|
+
function Nn(t, e, n, r = {}) {
|
|
925
|
+
const s = r.intervalMs ?? Me, o = typeof n == "function" ? n : he(n), a = ye(t.value, r.interpolation), i = e.time - t.time;
|
|
926
|
+
if (i <= 0) return [e];
|
|
922
927
|
const c = [];
|
|
923
|
-
for (let
|
|
924
|
-
const
|
|
928
|
+
for (let h = s; h < i; h += s) {
|
|
929
|
+
const u = h / i;
|
|
925
930
|
c.push({
|
|
926
|
-
time: t.time +
|
|
927
|
-
value:
|
|
931
|
+
time: t.time + h,
|
|
932
|
+
value: a(t.value, e.value, o(u)),
|
|
928
933
|
easing: "linear"
|
|
929
934
|
});
|
|
930
935
|
}
|
|
931
|
-
const
|
|
932
|
-
return c.push({ ...e, ...
|
|
936
|
+
const l = o(1);
|
|
937
|
+
return c.push({ ...e, ...l !== 1 && { value: a(t.value, e.value, l) }, easing: "linear" }), c;
|
|
933
938
|
}
|
|
934
|
-
function
|
|
935
|
-
return j(t) ?
|
|
939
|
+
function Ur(t, e) {
|
|
940
|
+
return j(t) ? _e(t, e) : V(t) ? be(t, e) : t;
|
|
936
941
|
}
|
|
937
|
-
function
|
|
942
|
+
function Yn(t, e = {}) {
|
|
938
943
|
const n = t.keyframes;
|
|
939
944
|
if (!n.some((o) => xt(o.easing))) return t;
|
|
940
945
|
const r = n.length > 0 ? [n[0]] : [], s = { ...e, interpolation: t.interpolation ?? e.interpolation };
|
|
941
946
|
for (let o = 1; o < n.length; o++) {
|
|
942
|
-
const
|
|
943
|
-
xt(
|
|
947
|
+
const a = n[o];
|
|
948
|
+
xt(a.easing) ? r.push(...Nn(n[o - 1], a, a.easing, s)) : r.push(a);
|
|
944
949
|
}
|
|
945
950
|
return { ...t, keyframes: r };
|
|
946
951
|
}
|
|
947
|
-
function
|
|
948
|
-
return t.filter(
|
|
949
|
-
t.filter(j).map((n) =>
|
|
950
|
-
t.filter(V).map((n) =>
|
|
952
|
+
function Vr(t, e) {
|
|
953
|
+
return t.filter(Xe).map((n) => Yn(n, e)).concat(
|
|
954
|
+
t.filter(j).map((n) => _e(n, e)),
|
|
955
|
+
t.filter(V).map((n) => be(n, e))
|
|
951
956
|
);
|
|
952
957
|
}
|
|
953
|
-
function
|
|
958
|
+
function zn(t, e) {
|
|
954
959
|
if (t.length <= 2) return t;
|
|
955
960
|
const n = [t[0]];
|
|
956
961
|
for (let r = 1; r < t.length - 1; r++) {
|
|
957
|
-
const s = n[n.length - 1], o = t[r],
|
|
958
|
-
if (
|
|
959
|
-
const c = (o.time - s.time) /
|
|
960
|
-
Math.abs(o.value -
|
|
962
|
+
const s = n[n.length - 1], o = t[r], a = t[r + 1], i = a.time - s.time;
|
|
963
|
+
if (i <= 0) continue;
|
|
964
|
+
const c = (o.time - s.time) / i, l = s.value + (a.value - s.value) * c;
|
|
965
|
+
Math.abs(o.value - l) > e && n.push(o);
|
|
961
966
|
}
|
|
962
967
|
return n.push(t[t.length - 1]), n;
|
|
963
968
|
}
|
|
964
|
-
function
|
|
969
|
+
function Un(t) {
|
|
965
970
|
const e = [...t.keyframes].sort((n, r) => n.time - r.time);
|
|
966
971
|
return {
|
|
967
972
|
...t,
|
|
@@ -973,7 +978,7 @@ function U(t) {
|
|
|
973
978
|
}
|
|
974
979
|
function K(t, e, n, r) {
|
|
975
980
|
const s = n ?? 0;
|
|
976
|
-
return !r || e <= 1 ? s : s +
|
|
981
|
+
return !r || e <= 1 ? s : s + ae(t, e, r);
|
|
977
982
|
}
|
|
978
983
|
class _t {
|
|
979
984
|
track;
|
|
@@ -999,8 +1004,8 @@ class _t {
|
|
|
999
1004
|
getTargetValues(e) {
|
|
1000
1005
|
const n = this.targets.length, r = [];
|
|
1001
1006
|
for (let s = 0; s < n; s++) {
|
|
1002
|
-
const o = K(s, n, this.track.delay, this.track.stagger),
|
|
1003
|
-
|
|
1007
|
+
const o = K(s, n, this.track.delay, this.track.stagger), a = this.valueForOffset(e - o);
|
|
1008
|
+
a !== void 0 && r.push({ target: this.targets[s], value: a, start: o + this.track.keyframes[0].time });
|
|
1004
1009
|
}
|
|
1005
1010
|
return r;
|
|
1006
1011
|
}
|
|
@@ -1035,8 +1040,8 @@ class _t {
|
|
|
1035
1040
|
return;
|
|
1036
1041
|
if (r.time === e)
|
|
1037
1042
|
return r.value;
|
|
1038
|
-
const o = s.time - r.time,
|
|
1039
|
-
return
|
|
1043
|
+
const o = s.time - r.time, a = (e - r.time) / o, c = he(s.easing)(a);
|
|
1044
|
+
return ye(r.value, this.track.interpolation)(r.value, s.value, c);
|
|
1040
1045
|
}
|
|
1041
1046
|
/**
|
|
1042
1047
|
* Find the keyframes surrounding a given time.
|
|
@@ -1049,7 +1054,7 @@ class _t {
|
|
|
1049
1054
|
return { from: null, to: null };
|
|
1050
1055
|
}
|
|
1051
1056
|
}
|
|
1052
|
-
class
|
|
1057
|
+
class Vn {
|
|
1053
1058
|
track;
|
|
1054
1059
|
targets;
|
|
1055
1060
|
sampler;
|
|
@@ -1076,7 +1081,7 @@ class zn {
|
|
|
1076
1081
|
return this.track;
|
|
1077
1082
|
}
|
|
1078
1083
|
}
|
|
1079
|
-
class
|
|
1084
|
+
class jn {
|
|
1080
1085
|
track;
|
|
1081
1086
|
targets;
|
|
1082
1087
|
duration;
|
|
@@ -1103,53 +1108,53 @@ class Yn {
|
|
|
1103
1108
|
return this.track;
|
|
1104
1109
|
}
|
|
1105
1110
|
}
|
|
1106
|
-
function
|
|
1107
|
-
const n = { ...
|
|
1111
|
+
function xe(t, e) {
|
|
1112
|
+
const n = { ...pn(t.pathData, e) };
|
|
1108
1113
|
if (t.matrix) {
|
|
1109
|
-
const [r, s, o,
|
|
1110
|
-
n.x = r *
|
|
1111
|
-
const
|
|
1112
|
-
n.angle = Math.atan2(s * f +
|
|
1114
|
+
const [r, s, o, a, i, c] = t.matrix, { x: l, y: h } = n;
|
|
1115
|
+
n.x = r * l + o * h + i, n.y = s * l + a * h + c;
|
|
1116
|
+
const u = n.angle * Math.PI / 180, f = Math.cos(u), d = Math.sin(u);
|
|
1117
|
+
n.angle = Math.atan2(s * f + a * d, r * f + o * d) * 180 / Math.PI;
|
|
1113
1118
|
}
|
|
1114
1119
|
return t.autoRotate && t.rotateOffset && (n.angle += t.rotateOffset), n;
|
|
1115
1120
|
}
|
|
1116
|
-
function
|
|
1121
|
+
function jr(t, e, n, r) {
|
|
1117
1122
|
const s = e + (n - e) * r;
|
|
1118
|
-
return
|
|
1123
|
+
return xe(t, s);
|
|
1119
1124
|
}
|
|
1120
1125
|
const bt = {
|
|
1121
1126
|
upperCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
1122
1127
|
lowerCase: "abcdefghijklmnopqrstuvwxyz",
|
|
1123
1128
|
upperAndLowerCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
1124
1129
|
numbers: "0123456789"
|
|
1125
|
-
},
|
|
1126
|
-
function
|
|
1130
|
+
}, Hn = 20;
|
|
1131
|
+
function Bn(t) {
|
|
1127
1132
|
const e = bt[t ?? "upperCase"] ?? t ?? bt.upperCase, n = Array.from(e);
|
|
1128
1133
|
return n.length > 0 ? n : Array.from(bt.upperCase);
|
|
1129
1134
|
}
|
|
1130
|
-
function
|
|
1135
|
+
function Wn(t, e, n) {
|
|
1131
1136
|
let r = (t | 0) ^ Math.imul(e + 1, 2654435761) ^ Math.imul(n + 1, 2246822507);
|
|
1132
1137
|
return r = Math.imul(r ^ r >>> 16, 2146121005), r = Math.imul(r ^ r >>> 15, 2221713035), (r ^ r >>> 16) >>> 0;
|
|
1133
1138
|
}
|
|
1134
|
-
function
|
|
1139
|
+
function Qn(t, e, n = 0) {
|
|
1135
1140
|
const r = t.from ?? "", s = t.to, o = Math.max(0, Math.min(1, e));
|
|
1136
1141
|
if (o <= 0) return r;
|
|
1137
1142
|
if (o >= 1) return s;
|
|
1138
|
-
const
|
|
1143
|
+
const a = Array.from(r), i = Array.from(s), c = t.rightToLeft ?? !1;
|
|
1139
1144
|
if (t.mode === "type") {
|
|
1140
|
-
const
|
|
1141
|
-
return c ?
|
|
1145
|
+
const y = Math.round(o * Math.max(a.length, i.length));
|
|
1146
|
+
return c ? a.slice(0, Math.max(0, a.length - y)).join("") + i.slice(Math.max(0, i.length - y)).join("") : i.slice(0, y).join("") + a.slice(y).join("");
|
|
1142
1147
|
}
|
|
1143
|
-
const
|
|
1144
|
-
let
|
|
1145
|
-
for (let
|
|
1146
|
-
const k = c ?
|
|
1147
|
-
k &&
|
|
1148
|
-
` ?
|
|
1148
|
+
const l = Math.max(0, Math.min(0.999, t.revealDelay ?? 0)), h = Math.max(0, (o - l) / (1 - l)), u = Math.floor(h * i.length), f = t.tweenLength === !1 ? i.length : Math.round(a.length + (i.length - a.length) * o), d = Bn(t.chars), m = t.refreshRate ?? Hn, p = m > 0 ? Math.floor(n * m / 1e3) : 0, g = t.seed ?? 1;
|
|
1149
|
+
let M = "";
|
|
1150
|
+
for (let y = 0; y < f; y++) {
|
|
1151
|
+
const k = c ? y >= f - u : y < u, S = c ? i[i.length - (f - y)] : i[y];
|
|
1152
|
+
k && S !== void 0 || S === " " || S === `
|
|
1153
|
+
` ? M += S : M += d[Wn(g, y, p) % d.length];
|
|
1149
1154
|
}
|
|
1150
|
-
return
|
|
1155
|
+
return M;
|
|
1151
1156
|
}
|
|
1152
|
-
class
|
|
1157
|
+
class ke {
|
|
1153
1158
|
id;
|
|
1154
1159
|
name;
|
|
1155
1160
|
_captions;
|
|
@@ -1264,15 +1269,15 @@ class Bn {
|
|
|
1264
1269
|
return;
|
|
1265
1270
|
let s = e * this.speed;
|
|
1266
1271
|
if (this._repeatDelayRemaining > 0) {
|
|
1267
|
-
const
|
|
1268
|
-
if (this._repeatDelayRemaining -=
|
|
1272
|
+
const i = Math.min(this._repeatDelayRemaining, s);
|
|
1273
|
+
if (this._repeatDelayRemaining -= i, s -= i, this._repeatDelayRemaining > 0) {
|
|
1269
1274
|
this.onUpdate?.(this.getStateAtTime(this._currentTime));
|
|
1270
1275
|
return;
|
|
1271
1276
|
}
|
|
1272
1277
|
this._wrapAfterDelay && (this._wrapAfterDelay = !1, this._currentTime = 0);
|
|
1273
1278
|
}
|
|
1274
1279
|
const o = 1e3;
|
|
1275
|
-
for (let
|
|
1280
|
+
for (let i = 0; i < o && s > 0 && this._playbackState === "playing"; i++)
|
|
1276
1281
|
if (this._direction === "forward") {
|
|
1277
1282
|
const c = n - this._currentTime;
|
|
1278
1283
|
if (s >= c) {
|
|
@@ -1288,8 +1293,8 @@ class Bn {
|
|
|
1288
1293
|
} else
|
|
1289
1294
|
this._currentTime -= s, s = 0;
|
|
1290
1295
|
}
|
|
1291
|
-
const
|
|
1292
|
-
this.onUpdate?.(
|
|
1296
|
+
const a = this.getStateAtTime(this._currentTime);
|
|
1297
|
+
this.onUpdate?.(a);
|
|
1293
1298
|
}
|
|
1294
1299
|
/**
|
|
1295
1300
|
* Get the animation state at a specific time.
|
|
@@ -1301,8 +1306,8 @@ class Bn {
|
|
|
1301
1306
|
else
|
|
1302
1307
|
for (const [r, s] of this._trackPlayers) {
|
|
1303
1308
|
const o = s.getTrack().property;
|
|
1304
|
-
for (const { target:
|
|
1305
|
-
this._write(n, r,
|
|
1309
|
+
for (const { target: a, value: i, start: c } of s.getTargetValues(e))
|
|
1310
|
+
this._write(n, r, a, o, i, e - c);
|
|
1306
1311
|
}
|
|
1307
1312
|
return {
|
|
1308
1313
|
values: n,
|
|
@@ -1328,35 +1333,35 @@ class Bn {
|
|
|
1328
1333
|
_resolveShared(e, n) {
|
|
1329
1334
|
const r = /* @__PURE__ */ new Map();
|
|
1330
1335
|
for (const [s, o] of this._trackPlayers) {
|
|
1331
|
-
const
|
|
1332
|
-
for (const { target:
|
|
1333
|
-
const
|
|
1334
|
-
(!f || (
|
|
1336
|
+
const a = o.getTrack().property;
|
|
1337
|
+
for (const { target: i, value: c, start: l } of o.getTargetValues(e)) {
|
|
1338
|
+
const h = `${i}\0${a}`, u = l <= e, f = r.get(h);
|
|
1339
|
+
(!f || (u !== f.started ? u : u ? l >= f.start : l <= f.start)) && r.set(h, { trackId: s, target: i, property: a, value: c, start: l, started: u });
|
|
1335
1340
|
}
|
|
1336
1341
|
}
|
|
1337
|
-
for (const { trackId: s, target: o, property:
|
|
1338
|
-
this._write(n, s, o,
|
|
1342
|
+
for (const { trackId: s, target: o, property: a, value: i, start: c } of r.values())
|
|
1343
|
+
this._write(n, s, o, a, i, e - c);
|
|
1339
1344
|
}
|
|
1340
1345
|
/**
|
|
1341
1346
|
* Write one track's value for a target, expanding the progress of motion paths
|
|
1342
1347
|
* (into x/y/rotation) and text tracks (into the string). `elapsed` is the time
|
|
1343
1348
|
* since this target's animation on the track started.
|
|
1344
1349
|
*/
|
|
1345
|
-
_write(e, n, r, s, o,
|
|
1350
|
+
_write(e, n, r, s, o, a) {
|
|
1346
1351
|
if (o === void 0) return;
|
|
1347
|
-
let
|
|
1348
|
-
|
|
1352
|
+
let i = e.get(r);
|
|
1353
|
+
i || (i = /* @__PURE__ */ new Map(), e.set(r, i));
|
|
1349
1354
|
const c = this._textTracks.get(n);
|
|
1350
1355
|
if (c && typeof o == "number") {
|
|
1351
|
-
|
|
1356
|
+
i.set("text", Qn(c.textConfig, o, Math.max(0, a)));
|
|
1352
1357
|
return;
|
|
1353
1358
|
}
|
|
1354
|
-
const
|
|
1355
|
-
if (
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1359
|
+
const l = this._motionPathTracks.get(n);
|
|
1360
|
+
if (l && typeof o == "number") {
|
|
1361
|
+
const h = xe(l.motionPathConfig, o);
|
|
1362
|
+
i.set("motionPathX", h.x), i.set("motionPathY", h.y), l.motionPathConfig.autoRotate && i.set("motionPathRotate", h.angle);
|
|
1358
1363
|
} else
|
|
1359
|
-
|
|
1364
|
+
i.set(s, o);
|
|
1360
1365
|
}
|
|
1361
1366
|
/** Cached: does any target+property have more than one track? */
|
|
1362
1367
|
_sharedWrites = null;
|
|
@@ -1381,16 +1386,16 @@ class Bn {
|
|
|
1381
1386
|
*/
|
|
1382
1387
|
addTrack(e) {
|
|
1383
1388
|
if (this._tracks.push(e), this._sharedWrites = null, V(e)) {
|
|
1384
|
-
this._trackPlayers.set(e.id, new
|
|
1389
|
+
this._trackPlayers.set(e.id, new jn(e));
|
|
1385
1390
|
return;
|
|
1386
1391
|
}
|
|
1387
1392
|
if (j(e)) {
|
|
1388
|
-
this._trackPlayers.set(e.id, new
|
|
1393
|
+
this._trackPlayers.set(e.id, new Vn(e)), this._springTracks.set(e.id, e);
|
|
1389
1394
|
return;
|
|
1390
1395
|
}
|
|
1391
1396
|
if ($t(e))
|
|
1392
1397
|
this._trackPlayers.set(e.id, new _t(e)), this._textTracks.set(e.id, e);
|
|
1393
|
-
else if (
|
|
1398
|
+
else if (se(e)) {
|
|
1394
1399
|
const n = {
|
|
1395
1400
|
id: e.id,
|
|
1396
1401
|
target: e.target,
|
|
@@ -1474,19 +1479,19 @@ class Bn {
|
|
|
1474
1479
|
const r = this._tracks[n], s = this.getTrackSpan(r.id);
|
|
1475
1480
|
if (s)
|
|
1476
1481
|
for (let o = 0; o < n; o++) {
|
|
1477
|
-
const
|
|
1478
|
-
if (
|
|
1479
|
-
const
|
|
1480
|
-
if (
|
|
1481
|
-
const c = this.getTrackSpan(
|
|
1482
|
+
const a = this._tracks[o];
|
|
1483
|
+
if (a.property !== r.property) continue;
|
|
1484
|
+
const i = U(a).filter((u) => U(r).includes(u));
|
|
1485
|
+
if (i.length === 0) continue;
|
|
1486
|
+
const c = this.getTrackSpan(a.id);
|
|
1482
1487
|
if (!c || !(c.from <= s.to && s.from <= c.to)) continue;
|
|
1483
|
-
const
|
|
1484
|
-
for (const
|
|
1488
|
+
const h = s.from >= c.from;
|
|
1489
|
+
for (const u of i)
|
|
1485
1490
|
e.push({
|
|
1486
|
-
target:
|
|
1491
|
+
target: u,
|
|
1487
1492
|
property: r.property,
|
|
1488
|
-
losingTrackId:
|
|
1489
|
-
winningTrackId:
|
|
1493
|
+
losingTrackId: h ? a.id : r.id,
|
|
1494
|
+
winningTrackId: h ? r.id : a.id
|
|
1490
1495
|
});
|
|
1491
1496
|
}
|
|
1492
1497
|
}
|
|
@@ -1505,7 +1510,7 @@ class Bn {
|
|
|
1505
1510
|
*/
|
|
1506
1511
|
toDefinition() {
|
|
1507
1512
|
return {
|
|
1508
|
-
formatVersion:
|
|
1513
|
+
formatVersion: re(this._tracks),
|
|
1509
1514
|
id: this.id,
|
|
1510
1515
|
name: this.name,
|
|
1511
1516
|
config: { ...this._config },
|
|
@@ -1563,31 +1568,31 @@ class Bn {
|
|
|
1563
1568
|
return this._config.alternate && (e === -1 || this._loopIteration < e) ? (this._loopIteration++, this._armRepeatDelay(), this._direction = "forward", this._repeatDelayRemaining === 0) : (this._playbackState = "idle", this.onComplete?.(), !1);
|
|
1564
1569
|
}
|
|
1565
1570
|
}
|
|
1566
|
-
const
|
|
1567
|
-
function
|
|
1568
|
-
const s = [], o = [], { duration:
|
|
1569
|
-
o.push([
|
|
1570
|
-
const
|
|
1571
|
-
t.forEach((
|
|
1572
|
-
(
|
|
1573
|
-
}),
|
|
1574
|
-
for (const
|
|
1571
|
+
const Gn = 100;
|
|
1572
|
+
function Hr(t, e, n, r) {
|
|
1573
|
+
const s = [], o = [], { duration: a, alternate: i } = r, c = (d, m, p, g) => {
|
|
1574
|
+
o.push([d, m]);
|
|
1575
|
+
const M = [];
|
|
1576
|
+
t.forEach((y, k) => {
|
|
1577
|
+
(p === "forward" ? (g ? y >= d : y > d) && y <= m : (g ? y <= d : y < d) && y >= m) && M.push(k);
|
|
1578
|
+
}), M.sort((y, k) => (p === "forward" ? t[y] - t[k] : t[k] - t[y]) || y - k);
|
|
1579
|
+
for (const y of M) s.push({ kind: "event", index: y, direction: p });
|
|
1575
1580
|
};
|
|
1576
|
-
let
|
|
1577
|
-
const f = Math.min(
|
|
1578
|
-
for (let
|
|
1579
|
-
const
|
|
1580
|
-
c(
|
|
1581
|
+
let l = e.time, h = e.direction, u = e.fresh === !0;
|
|
1582
|
+
const f = Math.min(Gn, Math.max(0, n.iteration - e.iteration));
|
|
1583
|
+
for (let d = 0; d < f; d++) {
|
|
1584
|
+
const m = h === "forward" ? a : 0;
|
|
1585
|
+
c(l, m, h, u), s.push({ kind: "repeat" }), i ? (h = h === "forward" ? "reverse" : "forward", l = m, u = !1) : (l = h === "forward" ? 0 : a, u = !0);
|
|
1581
1586
|
}
|
|
1582
|
-
return f > 0 && r.holding && !
|
|
1587
|
+
return f > 0 && r.holding && !i ? { crossings: s, passes: o } : (c(l, n.time, h, u), { crossings: s, passes: o });
|
|
1583
1588
|
}
|
|
1584
|
-
function
|
|
1589
|
+
function Kn(t) {
|
|
1585
1590
|
return V(t) ? {
|
|
1586
1591
|
id: t.id,
|
|
1587
1592
|
target: t.target,
|
|
1588
1593
|
property: t.property,
|
|
1589
1594
|
kind: "inertia",
|
|
1590
|
-
inertia:
|
|
1595
|
+
inertia: Se(t.inertia),
|
|
1591
1596
|
...F(t)
|
|
1592
1597
|
} : j(t) ? {
|
|
1593
1598
|
id: t.id,
|
|
@@ -1603,7 +1608,7 @@ function Qn(t) {
|
|
|
1603
1608
|
textConfig: { ...t.textConfig },
|
|
1604
1609
|
keyframes: t.keyframes.map(Tt),
|
|
1605
1610
|
...F(t)
|
|
1606
|
-
} :
|
|
1611
|
+
} : se(t) ? {
|
|
1607
1612
|
id: t.id,
|
|
1608
1613
|
target: t.target,
|
|
1609
1614
|
property: "motionPath",
|
|
@@ -1619,7 +1624,7 @@ function Qn(t) {
|
|
|
1619
1624
|
...F(t)
|
|
1620
1625
|
};
|
|
1621
1626
|
}
|
|
1622
|
-
function
|
|
1627
|
+
function Se(t) {
|
|
1623
1628
|
return { ...t, ...Array.isArray(t.end) && { end: [...t.end] } };
|
|
1624
1629
|
}
|
|
1625
1630
|
function Tt(t) {
|
|
@@ -1638,7 +1643,7 @@ function F(t) {
|
|
|
1638
1643
|
...t.stagger !== void 0 && { stagger: { ...t.stagger } }
|
|
1639
1644
|
};
|
|
1640
1645
|
}
|
|
1641
|
-
function
|
|
1646
|
+
function Zn(t) {
|
|
1642
1647
|
if (V(t)) {
|
|
1643
1648
|
const e = t;
|
|
1644
1649
|
return {
|
|
@@ -1646,7 +1651,7 @@ function Gn(t) {
|
|
|
1646
1651
|
target: e.target,
|
|
1647
1652
|
property: e.property,
|
|
1648
1653
|
kind: "inertia",
|
|
1649
|
-
inertia:
|
|
1654
|
+
inertia: Se(e.inertia),
|
|
1650
1655
|
...F(e)
|
|
1651
1656
|
};
|
|
1652
1657
|
}
|
|
@@ -1683,7 +1688,7 @@ function Gn(t) {
|
|
|
1683
1688
|
...F(e)
|
|
1684
1689
|
};
|
|
1685
1690
|
}
|
|
1686
|
-
return
|
|
1691
|
+
return Un({
|
|
1687
1692
|
id: t.id,
|
|
1688
1693
|
target: t.target,
|
|
1689
1694
|
property: t.property,
|
|
@@ -1692,10 +1697,10 @@ function Gn(t) {
|
|
|
1692
1697
|
...F(t)
|
|
1693
1698
|
});
|
|
1694
1699
|
}
|
|
1695
|
-
function
|
|
1700
|
+
function qn(t) {
|
|
1696
1701
|
const e = t._config.markers;
|
|
1697
1702
|
return {
|
|
1698
|
-
formatVersion:
|
|
1703
|
+
formatVersion: re(t.tracks),
|
|
1699
1704
|
id: t.id,
|
|
1700
1705
|
name: t.name,
|
|
1701
1706
|
config: {
|
|
@@ -1706,38 +1711,38 @@ function Kn(t) {
|
|
|
1706
1711
|
repeatDelay: t._config.repeatDelay,
|
|
1707
1712
|
...e && { markers: e.map((n) => ({ ...n })) }
|
|
1708
1713
|
},
|
|
1709
|
-
tracks: t.tracks.map(
|
|
1714
|
+
tracks: t.tracks.map(Kn),
|
|
1710
1715
|
...t.captions && { captions: JSON.parse(JSON.stringify(t.captions)) }
|
|
1711
1716
|
};
|
|
1712
1717
|
}
|
|
1713
|
-
function
|
|
1718
|
+
function Jn(t) {
|
|
1714
1719
|
const e = t.formatVersion ?? 1;
|
|
1715
|
-
if (e >
|
|
1720
|
+
if (e > Nt)
|
|
1716
1721
|
throw new Error(
|
|
1717
|
-
`tinyfly: this animation uses format version ${e}, but this tinyfly reads up to version ${
|
|
1722
|
+
`tinyfly: this animation uses format version ${e}, but this tinyfly reads up to version ${Nt}. Update tinyfly to play it.`
|
|
1718
1723
|
);
|
|
1719
|
-
return new
|
|
1724
|
+
return new ke({
|
|
1720
1725
|
id: t.id,
|
|
1721
1726
|
name: t.name,
|
|
1722
1727
|
config: t.config,
|
|
1723
|
-
tracks: t.tracks.map(
|
|
1728
|
+
tracks: t.tracks.map(Zn),
|
|
1724
1729
|
captions: t.captions
|
|
1725
1730
|
});
|
|
1726
1731
|
}
|
|
1727
|
-
function
|
|
1728
|
-
return JSON.stringify(
|
|
1732
|
+
function Br(t) {
|
|
1733
|
+
return JSON.stringify(qn(t));
|
|
1729
1734
|
}
|
|
1730
|
-
function
|
|
1735
|
+
function Wr(t) {
|
|
1731
1736
|
const e = JSON.parse(t);
|
|
1732
|
-
return
|
|
1737
|
+
return Jn(e);
|
|
1733
1738
|
}
|
|
1734
|
-
function
|
|
1739
|
+
function Qr(t) {
|
|
1735
1740
|
let e = 2166136261;
|
|
1736
1741
|
for (let n = 0; n < t.length; n++)
|
|
1737
1742
|
e ^= t.charCodeAt(n), e = Math.imul(e, 16777619);
|
|
1738
1743
|
return e >>> 0;
|
|
1739
1744
|
}
|
|
1740
|
-
function
|
|
1745
|
+
function we(t) {
|
|
1741
1746
|
let e = t >>> 0 || 2654435769;
|
|
1742
1747
|
return {
|
|
1743
1748
|
seed: t >>> 0,
|
|
@@ -1746,281 +1751,337 @@ function qn(t) {
|
|
|
1746
1751
|
}
|
|
1747
1752
|
};
|
|
1748
1753
|
}
|
|
1749
|
-
function
|
|
1754
|
+
function Ae(t, e, n) {
|
|
1750
1755
|
return e + t.next() * (n - e);
|
|
1751
1756
|
}
|
|
1752
|
-
function
|
|
1753
|
-
if (r <= 0) return
|
|
1757
|
+
function tr(t, e, n, r) {
|
|
1758
|
+
if (r <= 0) return Ae(t, e, n);
|
|
1754
1759
|
const s = Math.floor((n - e) / r), o = Math.round(t.next() * s);
|
|
1755
1760
|
return e + o * r;
|
|
1756
1761
|
}
|
|
1757
|
-
function
|
|
1762
|
+
function Gr(t, e) {
|
|
1758
1763
|
if (e.length !== 0)
|
|
1759
1764
|
return e[Math.floor(t.next() * e.length)];
|
|
1760
1765
|
}
|
|
1761
|
-
const
|
|
1762
|
-
function
|
|
1763
|
-
return typeof t != "string" ? !1 :
|
|
1766
|
+
const ve = /^([+\-*/])=\s*(-?[\d.]+)$/, Pe = /^random\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*(?:,\s*(-?[\d.]+)\s*)?\)$/i;
|
|
1767
|
+
function Kr(t) {
|
|
1768
|
+
return typeof t != "string" ? !1 : ve.test(t.trim()) || Pe.test(t.trim());
|
|
1764
1769
|
}
|
|
1765
|
-
function
|
|
1770
|
+
function $e(t, e = {}) {
|
|
1766
1771
|
if (typeof t != "string") return t;
|
|
1767
|
-
const n = t.trim(), r =
|
|
1772
|
+
const n = t.trim(), r = ve.exec(n);
|
|
1768
1773
|
if (r) {
|
|
1769
|
-
const [, o,
|
|
1774
|
+
const [, o, a] = r, i = e.base ?? 0, c = Number.parseFloat(a);
|
|
1770
1775
|
switch (o) {
|
|
1771
1776
|
case "+":
|
|
1772
|
-
return
|
|
1777
|
+
return i + c;
|
|
1773
1778
|
case "-":
|
|
1774
|
-
return
|
|
1779
|
+
return i - c;
|
|
1775
1780
|
case "*":
|
|
1776
|
-
return
|
|
1781
|
+
return i * c;
|
|
1777
1782
|
case "/":
|
|
1778
|
-
return c === 0 ?
|
|
1783
|
+
return c === 0 ? i : i / c;
|
|
1779
1784
|
}
|
|
1780
1785
|
}
|
|
1781
|
-
const s =
|
|
1786
|
+
const s = Pe.exec(n);
|
|
1782
1787
|
if (s) {
|
|
1783
1788
|
if (!e.random)
|
|
1784
1789
|
throw new Error(
|
|
1785
1790
|
`resolveValue: "${n}" needs a random source — pass one via context.random`
|
|
1786
1791
|
);
|
|
1787
|
-
const o = Number.parseFloat(s[1]),
|
|
1788
|
-
return
|
|
1792
|
+
const o = Number.parseFloat(s[1]), a = Number.parseFloat(s[2]), i = s[3] !== void 0 ? Number.parseFloat(s[3]) : void 0;
|
|
1793
|
+
return i !== void 0 ? tr(e.random, o, a, i) : Ae(e.random, o, a);
|
|
1789
1794
|
}
|
|
1790
1795
|
return t;
|
|
1791
1796
|
}
|
|
1792
|
-
function
|
|
1797
|
+
function er(t, e = 0, n) {
|
|
1793
1798
|
const r = [];
|
|
1794
1799
|
let s = e;
|
|
1795
1800
|
for (const o of t) {
|
|
1796
|
-
const
|
|
1797
|
-
r.push(
|
|
1801
|
+
const a = $e(o, { base: s, random: n });
|
|
1802
|
+
r.push(a), typeof a == "number" && (s = a);
|
|
1798
1803
|
}
|
|
1799
1804
|
return r;
|
|
1800
1805
|
}
|
|
1801
|
-
class
|
|
1806
|
+
class Zr {
|
|
1802
1807
|
random;
|
|
1803
1808
|
constructor(e) {
|
|
1804
|
-
this.random =
|
|
1809
|
+
this.random = we(e);
|
|
1805
1810
|
}
|
|
1806
1811
|
/** The seed, to be stored alongside the timeline so this can be reproduced. */
|
|
1807
1812
|
get seed() {
|
|
1808
1813
|
return this.random.seed;
|
|
1809
1814
|
}
|
|
1810
1815
|
resolve(e, n = 0) {
|
|
1811
|
-
return
|
|
1816
|
+
return $e(e, { base: n, random: this.random });
|
|
1812
1817
|
}
|
|
1813
1818
|
resolveSequence(e, n = 0) {
|
|
1814
|
-
return
|
|
1819
|
+
return er(e, n, this.random);
|
|
1815
1820
|
}
|
|
1816
1821
|
}
|
|
1817
|
-
const
|
|
1818
|
-
function
|
|
1822
|
+
const nr = 600;
|
|
1823
|
+
function qr(t) {
|
|
1819
1824
|
if (Array.isArray(t)) {
|
|
1820
|
-
const [f,
|
|
1821
|
-
return { fn: ee(f,
|
|
1825
|
+
const [f, d, m, p] = t;
|
|
1826
|
+
return { fn: ee(f, d, m, p), bezier: [f, d, m, p] };
|
|
1822
1827
|
}
|
|
1823
1828
|
const { segments: e } = G(t);
|
|
1824
1829
|
if (e.length === 0) throw new Error(`customEase: no curve in "${t}"`);
|
|
1825
|
-
const n = e[0].startX, r = e[0].startY, s = e[e.length - 1], o = s.endX - n,
|
|
1826
|
-
if (o === 0 ||
|
|
1827
|
-
const
|
|
1830
|
+
const n = e[0].startX, r = e[0].startY, s = e[e.length - 1], o = s.endX - n, a = s.endY - r;
|
|
1831
|
+
if (o === 0 || a === 0) throw new Error(`customEase: "${t}" must move along both axes`);
|
|
1832
|
+
const i = (f) => (f - n) / o, c = (f) => (f - r) / a;
|
|
1828
1833
|
if (e.length === 1 && s.type === "C") {
|
|
1829
|
-
const [f,
|
|
1834
|
+
const [f, d, m, p] = s.points, g = [i(f), c(d), i(m), c(p)];
|
|
1830
1835
|
return { fn: ee(...g), bezier: g };
|
|
1831
1836
|
}
|
|
1832
|
-
const
|
|
1837
|
+
const l = [], h = [], u = Math.max(8, Math.ceil(nr / e.length));
|
|
1833
1838
|
for (const f of e)
|
|
1834
|
-
for (let
|
|
1835
|
-
const [
|
|
1836
|
-
|
|
1839
|
+
for (let d = l.length === 0 ? 0 : 1; d <= u; d++) {
|
|
1840
|
+
const [m, p] = rr(f, d / u);
|
|
1841
|
+
l.push(i(m)), h.push(c(p));
|
|
1837
1842
|
}
|
|
1838
|
-
return { fn:
|
|
1843
|
+
return { fn: sr(l, h) };
|
|
1839
1844
|
}
|
|
1840
|
-
function
|
|
1845
|
+
function Jr(t = {}) {
|
|
1841
1846
|
const n = 0.1 + Math.max(0, Math.min(1, t.strength ?? 0.7)) * 0.7, r = [1];
|
|
1842
1847
|
for (let o = n; o > 2e-3; o *= n) r.push(2 * Math.sqrt(o));
|
|
1843
|
-
const s = r.reduce((o,
|
|
1848
|
+
const s = r.reduce((o, a) => o + a, 0);
|
|
1844
1849
|
return (o) => {
|
|
1845
1850
|
if (o <= 0) return 0;
|
|
1846
1851
|
if (o >= 1) return 1;
|
|
1847
|
-
let
|
|
1848
|
-
for (let
|
|
1849
|
-
if (
|
|
1850
|
-
if (
|
|
1851
|
-
const c = r[
|
|
1852
|
-
return 1 - (
|
|
1852
|
+
let a = o * s;
|
|
1853
|
+
for (let i = 0; i < r.length; i++) {
|
|
1854
|
+
if (a <= r[i]) {
|
|
1855
|
+
if (i === 0) return (a / r[0]) ** 2;
|
|
1856
|
+
const c = r[i] / 2, l = c * c, h = a - c;
|
|
1857
|
+
return 1 - (l - h * h);
|
|
1853
1858
|
}
|
|
1854
|
-
|
|
1859
|
+
a -= r[i];
|
|
1855
1860
|
}
|
|
1856
1861
|
return 1;
|
|
1857
1862
|
};
|
|
1858
1863
|
}
|
|
1859
|
-
function
|
|
1864
|
+
function ts(t = {}) {
|
|
1860
1865
|
const e = Math.max(1, t.wiggles ?? 10), n = t.type ?? "easeOut", r = (s) => n === "uniform" ? 1 : n === "easeInOut" ? Math.sin(Math.PI * s) : (1 - s) ** 2;
|
|
1861
1866
|
return (s) => s <= 0 || s >= 1 ? 0 : Math.sin(s * e * Math.PI * 2) * r(s);
|
|
1862
1867
|
}
|
|
1863
|
-
function
|
|
1868
|
+
function rr(t, e) {
|
|
1864
1869
|
if (t.type === "L") {
|
|
1865
|
-
const [
|
|
1866
|
-
return [t.startX + (
|
|
1870
|
+
const [l, h] = t.points;
|
|
1871
|
+
return [t.startX + (l - t.startX) * e, t.startY + (h - t.startY) * e];
|
|
1867
1872
|
}
|
|
1868
|
-
const [n, r, s, o,
|
|
1873
|
+
const [n, r, s, o, a, i] = t.points, c = 1 - e;
|
|
1869
1874
|
return [
|
|
1870
|
-
c * c * c * t.startX + 3 * c * c * e * n + 3 * c * e * e * s + e * e * e *
|
|
1871
|
-
c * c * c * t.startY + 3 * c * c * e * r + 3 * c * e * e * o + e * e * e *
|
|
1875
|
+
c * c * c * t.startX + 3 * c * c * e * n + 3 * c * e * e * s + e * e * e * a,
|
|
1876
|
+
c * c * c * t.startY + 3 * c * c * e * r + 3 * c * e * e * o + e * e * e * i
|
|
1872
1877
|
];
|
|
1873
1878
|
}
|
|
1874
|
-
function
|
|
1879
|
+
function sr(t, e) {
|
|
1875
1880
|
return (n) => {
|
|
1876
1881
|
if (n <= t[0]) return e[0];
|
|
1877
1882
|
if (n >= t[t.length - 1]) return e[e.length - 1];
|
|
1878
1883
|
let r = 0, s = t.length - 1;
|
|
1879
1884
|
for (; s - r > 1; ) {
|
|
1880
|
-
const
|
|
1881
|
-
t[
|
|
1885
|
+
const a = r + s >> 1;
|
|
1886
|
+
t[a] <= n ? r = a : s = a;
|
|
1882
1887
|
}
|
|
1883
1888
|
const o = t[s] - t[r];
|
|
1884
1889
|
return o === 0 ? e[s] : e[r] + (n - t[r]) / o * (e[s] - e[r]);
|
|
1885
1890
|
};
|
|
1886
1891
|
}
|
|
1887
1892
|
function ee(t, e, n, r) {
|
|
1888
|
-
const s = (
|
|
1889
|
-
return (
|
|
1890
|
-
if (
|
|
1891
|
-
if (
|
|
1892
|
-
let
|
|
1893
|
-
for (let
|
|
1894
|
-
const
|
|
1895
|
-
if (Math.abs(
|
|
1893
|
+
const s = (a, i, c) => 3 * (1 - a) * (1 - a) * a * i + 3 * (1 - a) * a * a * c + a * a * a, o = (a, i, c) => 3 * (1 - a) * (1 - a) * i + 6 * (1 - a) * a * (c - i) + 3 * a * a * (1 - c);
|
|
1894
|
+
return (a) => {
|
|
1895
|
+
if (a <= 0) return 0;
|
|
1896
|
+
if (a >= 1) return 1;
|
|
1897
|
+
let i = a;
|
|
1898
|
+
for (let h = 0; h < 8; h++) {
|
|
1899
|
+
const u = s(i, t, n) - a, f = o(i, t, n);
|
|
1900
|
+
if (Math.abs(u) < 1e-6) return s(i, e, r);
|
|
1896
1901
|
if (Math.abs(f) < 1e-6) break;
|
|
1897
|
-
|
|
1902
|
+
i -= u / f;
|
|
1898
1903
|
}
|
|
1899
|
-
let c = 0,
|
|
1900
|
-
|
|
1901
|
-
for (let
|
|
1902
|
-
s(
|
|
1903
|
-
return s(
|
|
1904
|
+
let c = 0, l = 1;
|
|
1905
|
+
i = a;
|
|
1906
|
+
for (let h = 0; h < 40; h++)
|
|
1907
|
+
s(i, t, n) < a ? c = i : l = i, i = (c + l) / 2;
|
|
1908
|
+
return s(i, e, r);
|
|
1904
1909
|
};
|
|
1905
1910
|
}
|
|
1906
|
-
const
|
|
1907
|
-
function
|
|
1908
|
-
const n = e.lead ??
|
|
1909
|
-
let
|
|
1910
|
-
return t.forEach((
|
|
1911
|
-
const
|
|
1912
|
-
let
|
|
1913
|
-
|
|
1911
|
+
const or = 350, ar = 300, ir = 550;
|
|
1912
|
+
function es(t, e = {}) {
|
|
1913
|
+
const n = e.lead ?? or, r = e.gap ?? ar, s = e.tail ?? ir, o = [];
|
|
1914
|
+
let a = 0;
|
|
1915
|
+
return t.forEach((i, c) => {
|
|
1916
|
+
const l = [];
|
|
1917
|
+
let h = a + n;
|
|
1918
|
+
i.lines.forEach((f, d) => {
|
|
1914
1919
|
if (!(f.duration >= 0))
|
|
1915
|
-
throw new Error(`narration: scene ${c} line ${
|
|
1916
|
-
|
|
1917
|
-
id: f.id ?? `s${c}-l${
|
|
1920
|
+
throw new Error(`narration: scene ${c} line ${d} has an invalid duration (${f.duration})`);
|
|
1921
|
+
d > 0 && (h += r), l.push({
|
|
1922
|
+
id: f.id ?? `s${c}-l${d}`,
|
|
1918
1923
|
scene: c,
|
|
1919
|
-
line:
|
|
1920
|
-
start:
|
|
1921
|
-
end:
|
|
1924
|
+
line: d,
|
|
1925
|
+
start: h,
|
|
1926
|
+
end: h + f.duration,
|
|
1922
1927
|
text: f.text
|
|
1923
|
-
}),
|
|
1928
|
+
}), h += f.duration;
|
|
1924
1929
|
});
|
|
1925
|
-
const
|
|
1926
|
-
o.push({ id:
|
|
1927
|
-
}), { duration:
|
|
1930
|
+
const u = h + s + (i.tail ?? 0);
|
|
1931
|
+
o.push({ id: i.id ?? `s${c}`, start: a, duration: u - a, cues: l }), a = u;
|
|
1932
|
+
}), { duration: a, scenes: o, cues: o.flatMap((i) => i.cues) };
|
|
1928
1933
|
}
|
|
1929
|
-
function
|
|
1934
|
+
function ns(t) {
|
|
1930
1935
|
return t.cues.map((e) => ({ id: e.id, time: e.start, label: e.text }));
|
|
1931
1936
|
}
|
|
1932
|
-
function
|
|
1937
|
+
function rs(t, e) {
|
|
1933
1938
|
let n = t.scenes[0];
|
|
1934
1939
|
for (const r of t.scenes)
|
|
1935
1940
|
if (e >= r.start) n = r;
|
|
1936
1941
|
else break;
|
|
1937
1942
|
return n;
|
|
1938
1943
|
}
|
|
1939
|
-
const
|
|
1944
|
+
const Re = (t) => 6e4 / t.bpm;
|
|
1940
1945
|
function Ct(t, e) {
|
|
1941
|
-
return t.offset + e *
|
|
1946
|
+
return t.offset + e * Re(t);
|
|
1942
1947
|
}
|
|
1943
1948
|
function It(t, e) {
|
|
1944
|
-
return (e - t.offset) /
|
|
1949
|
+
return (e - t.offset) / Re(t);
|
|
1945
1950
|
}
|
|
1946
|
-
function
|
|
1951
|
+
function ss(t, e) {
|
|
1947
1952
|
return Ct(t, Math.round(It(t, e)));
|
|
1948
1953
|
}
|
|
1949
|
-
function
|
|
1954
|
+
function os(t, e) {
|
|
1950
1955
|
return Ct(t, Math.ceil(It(t, e) - 1e-9));
|
|
1951
1956
|
}
|
|
1952
|
-
function
|
|
1957
|
+
function as(t, e, n) {
|
|
1953
1958
|
const r = Math.max(1, Math.round(t.beatsPerBar ?? 4)), s = [];
|
|
1954
1959
|
if (!(t.bpm > 0) || n < e) return s;
|
|
1955
1960
|
for (let o = Math.ceil(It(t, e) - 1e-9); ; o++) {
|
|
1956
|
-
const
|
|
1957
|
-
if (
|
|
1958
|
-
s.push({ time:
|
|
1961
|
+
const a = Ct(t, o);
|
|
1962
|
+
if (a > n + 1e-9) break;
|
|
1963
|
+
s.push({ time: a, bar: (o % r + r) % r === 0, n: o });
|
|
1959
1964
|
}
|
|
1960
1965
|
return s;
|
|
1961
1966
|
}
|
|
1962
1967
|
const B = 100;
|
|
1963
|
-
function
|
|
1964
|
-
const r = n.minBpm ?? 70, s = n.maxBpm ?? 180, o = Math.max(1, Math.round(e / B)),
|
|
1965
|
-
if (
|
|
1966
|
-
const c = new Float64Array(
|
|
1967
|
-
for (let
|
|
1968
|
+
function is(t, e, n = {}) {
|
|
1969
|
+
const r = n.minBpm ?? 70, s = n.maxBpm ?? 180, o = Math.max(1, Math.round(e / B)), a = Math.min(t.length, Math.round((n.maxSeconds ?? 60) * e)), i = Math.floor(a / o);
|
|
1970
|
+
if (i < 4) return { bpm: 120, offset: 0, confidence: 0 };
|
|
1971
|
+
const c = new Float64Array(i);
|
|
1972
|
+
for (let _ = 0; _ < i; _++) {
|
|
1968
1973
|
let T = 0;
|
|
1969
|
-
for (let x =
|
|
1970
|
-
c[
|
|
1971
|
-
}
|
|
1972
|
-
const
|
|
1973
|
-
for (let
|
|
1974
|
-
const
|
|
1975
|
-
for (let
|
|
1976
|
-
const
|
|
1974
|
+
for (let x = _ * o; x < (_ + 1) * o; x++) T += t[x] * t[x];
|
|
1975
|
+
c[_] = Math.log(1e-6 + T / o);
|
|
1976
|
+
}
|
|
1977
|
+
const l = new Float64Array(i);
|
|
1978
|
+
for (let _ = 1; _ < i; _++) l[_] = Math.max(0, c[_] - c[_ - 1]);
|
|
1979
|
+
const h = l.reduce((_, T) => _ + T, 0) / i;
|
|
1980
|
+
for (let _ = 0; _ < i; _++) l[_] = Math.max(0, l[_] - h);
|
|
1981
|
+
const u = Math.max(1, Math.floor(60 * B / s)), f = Math.min(i - 1, Math.ceil(60 * B / r)), d = (_) => {
|
|
1977
1982
|
let T = 0;
|
|
1978
|
-
for (let x =
|
|
1979
|
-
return T / (
|
|
1983
|
+
for (let x = _; x < i; x++) T += l[x] * l[x - _];
|
|
1984
|
+
return T / (i - _);
|
|
1980
1985
|
};
|
|
1981
|
-
let
|
|
1982
|
-
for (let
|
|
1983
|
-
|
|
1984
|
-
let
|
|
1985
|
-
for (let
|
|
1986
|
-
const T = 60 * B /
|
|
1987
|
-
|
|
1988
|
-
}
|
|
1989
|
-
const
|
|
1990
|
-
const T = Math.floor(
|
|
1991
|
-
return T < 0 || T + 1 >=
|
|
1992
|
-
},
|
|
1986
|
+
let m = 0;
|
|
1987
|
+
for (let _ = 0; _ < i; _++) m += l[_] * l[_];
|
|
1988
|
+
m /= i;
|
|
1989
|
+
let p = u, g = -1 / 0;
|
|
1990
|
+
for (let _ = u; _ <= f; _++) {
|
|
1991
|
+
const T = 60 * B / _, x = Math.exp(-0.5 * (Math.log2(T / 120) / 0.9) ** 2), w = d(_) * x;
|
|
1992
|
+
w > g && (g = w, p = _);
|
|
1993
|
+
}
|
|
1994
|
+
const M = (_) => {
|
|
1995
|
+
const T = Math.floor(_);
|
|
1996
|
+
return T < 0 || T + 1 >= i ? 0 : l[T] + (l[T + 1] - l[T]) * (_ - T);
|
|
1997
|
+
}, y = (_, T) => {
|
|
1993
1998
|
let x = 0;
|
|
1994
|
-
for (let
|
|
1999
|
+
for (let w = T; w < i; w += _) x += M(w);
|
|
1995
2000
|
return x;
|
|
1996
2001
|
};
|
|
1997
|
-
let k =
|
|
1998
|
-
for (let
|
|
1999
|
-
if (
|
|
2000
|
-
const T = Math.max(1, Math.round(
|
|
2002
|
+
let k = p, S = 0, b = -1 / 0;
|
|
2003
|
+
for (let _ = p - 0.6; _ <= p + 0.6 + 1e-9; _ += 0.02) {
|
|
2004
|
+
if (_ < 1) continue;
|
|
2005
|
+
const T = Math.max(1, Math.round(_ * 4));
|
|
2001
2006
|
for (let x = 0; x < T; x++) {
|
|
2002
|
-
const
|
|
2003
|
-
$ >
|
|
2007
|
+
const w = x / T * _, $ = y(_, w);
|
|
2008
|
+
$ > b && (b = $, S = w, k = _);
|
|
2004
2009
|
}
|
|
2005
2010
|
}
|
|
2006
|
-
const v = 60 * B / k, A =
|
|
2011
|
+
const v = 60 * B / k, A = m > 0 ? Math.max(0, Math.min(1, d(p) / m)) : 0, D = (S + 0.5) * 1e3 / B;
|
|
2007
2012
|
return { bpm: Math.round(v * 100) / 100, offset: Math.round(D % (6e4 / v)), confidence: A };
|
|
2008
2013
|
}
|
|
2014
|
+
const cr = 600, ur = 250, ne = 1;
|
|
2015
|
+
function cs(t, e) {
|
|
2016
|
+
const n = e.target ?? "Camera", r = { x: e.stage.width / 2, y: e.stage.height / 2 }, s = {}, o = (u, f, d, m) => {
|
|
2017
|
+
const p = s[u] ??= [];
|
|
2018
|
+
for (; p.length > 0 && p[p.length - 1].time >= f; ) p.pop();
|
|
2019
|
+
p.push({ time: f, value: d, ...m ? { easing: m } : {} });
|
|
2020
|
+
}, a = (u) => {
|
|
2021
|
+
const f = u.rotate * Math.PI / 180, d = (u.focusX - r.x) * u.scale, m = (u.focusY - r.y) * u.scale;
|
|
2022
|
+
return {
|
|
2023
|
+
x: -(d * Math.cos(f) - m * Math.sin(f)),
|
|
2024
|
+
y: -(d * Math.sin(f) + m * Math.cos(f)),
|
|
2025
|
+
scale: u.scale,
|
|
2026
|
+
rotate: u.rotate
|
|
2027
|
+
};
|
|
2028
|
+
}, i = (u, f, d) => {
|
|
2029
|
+
const m = a(f);
|
|
2030
|
+
for (const p of ["x", "y", "scale", "rotate"]) o(p, u, m[p], d);
|
|
2031
|
+
};
|
|
2032
|
+
let c = { focusX: r.x, focusY: r.y, scale: 1, rotate: 0 };
|
|
2033
|
+
const l = [...t].sort((u, f) => u.at - f.at), h = l.filter((u) => !("shake" in u));
|
|
2034
|
+
h.length > 0 && i(0, c);
|
|
2035
|
+
for (const u of h)
|
|
2036
|
+
if ("frame" in u) {
|
|
2037
|
+
const f = Math.max(ne, u.duration ?? cr);
|
|
2038
|
+
i(u.at, c), c = {
|
|
2039
|
+
focusX: u.frame.focus?.x ?? r.x,
|
|
2040
|
+
focusY: u.frame.focus?.y ?? r.y,
|
|
2041
|
+
scale: u.frame.scale ?? 1,
|
|
2042
|
+
rotate: u.frame.rotate ?? 0
|
|
2043
|
+
}, i(u.at + f, c, u.easing ?? (f > ne ? "ease-in-out" : void 0));
|
|
2044
|
+
} else {
|
|
2045
|
+
const { follow: f } = u, d = f.lag ?? ur, m = new ke({ id: "follow", tracks: [{ id: "x", target: "s", property: "x", keyframes: f.x }] }), p = (y) => m.getStateAtTime(y).values.get("s")?.get("x") ?? c.focusX, g = [u.at, ...f.x.map((y) => y.time).filter((y) => y > u.at && y < u.until), u.until];
|
|
2046
|
+
i(u.at, c);
|
|
2047
|
+
const M = (y) => ({
|
|
2048
|
+
focusX: p(y) + (f.lead ?? 0),
|
|
2049
|
+
focusY: f.y ?? c.focusY,
|
|
2050
|
+
scale: f.scale ?? c.scale,
|
|
2051
|
+
rotate: c.rotate
|
|
2052
|
+
});
|
|
2053
|
+
for (const y of g) {
|
|
2054
|
+
const k = f.x.find((S) => S.time === y)?.easing;
|
|
2055
|
+
i(y + d, M(y), y === u.at ? "ease-in-out" : k);
|
|
2056
|
+
}
|
|
2057
|
+
c = M(u.until);
|
|
2058
|
+
}
|
|
2059
|
+
for (const u of l.filter((f) => "shake" in f)) {
|
|
2060
|
+
const f = u.shake.strength ?? 12, d = u.shake.roll ?? 1.5, m = 1e3 / (u.shake.frequency ?? 24), p = we(u.shake.seed ?? Math.round(u.at) + 1), g = () => p.next() * 2 - 1;
|
|
2061
|
+
for (const M of ["shakeX", "shakeY", "shakeRotate"]) o(M, u.at, 0);
|
|
2062
|
+
for (let M = u.at + m; M < u.at + u.duration; M += m) {
|
|
2063
|
+
const y = 1 - (M - u.at) / u.duration;
|
|
2064
|
+
o("shakeX", M, g() * f * y), o("shakeY", M, g() * f * y), o("shakeRotate", M, g() * d * y);
|
|
2065
|
+
}
|
|
2066
|
+
for (const M of ["shakeX", "shakeY", "shakeRotate"]) o(M, u.at + u.duration, 0, "ease-out");
|
|
2067
|
+
}
|
|
2068
|
+
return Object.entries(s).map(([u, f]) => ({ id: `${n}-${u}`, target: n, property: u, keyframes: f }));
|
|
2069
|
+
}
|
|
2009
2070
|
const O = (t) => Math.round(t * 1e3) / 1e3;
|
|
2010
|
-
function
|
|
2071
|
+
function us(t, e = {}) {
|
|
2011
2072
|
if (t.length === 0) return "";
|
|
2012
2073
|
const n = e.curviness ?? 1, r = e.closed ?? !1, s = t.length;
|
|
2013
2074
|
let o = `M${O(t[0].x)} ${O(t[0].y)}`;
|
|
2014
2075
|
if (s === 1) return o;
|
|
2015
|
-
const
|
|
2016
|
-
for (let c = 0; c <
|
|
2017
|
-
const
|
|
2076
|
+
const a = (c) => r ? t[(c % s + s) % s] : t[Math.max(0, Math.min(s - 1, c))], i = r ? s : s - 1;
|
|
2077
|
+
for (let c = 0; c < i; c++) {
|
|
2078
|
+
const l = a(c - 1), h = a(c), u = a(c + 1), f = a(c + 2);
|
|
2018
2079
|
if (n === 0) {
|
|
2019
|
-
o += ` L${O(
|
|
2080
|
+
o += ` L${O(u.x)} ${O(u.y)}`;
|
|
2020
2081
|
continue;
|
|
2021
2082
|
}
|
|
2022
|
-
const
|
|
2023
|
-
o += ` C${O(
|
|
2083
|
+
const d = n / 6, m = h.x + (u.x - l.x) * d, p = h.y + (u.y - l.y) * d, g = u.x - (f.x - h.x) * d, M = u.y - (f.y - h.y) * d;
|
|
2084
|
+
o += ` C${O(m)} ${O(p)} ${O(g)} ${O(M)} ${O(u.x)} ${O(u.y)}`;
|
|
2024
2085
|
}
|
|
2025
2086
|
return r ? `${o} Z` : o;
|
|
2026
2087
|
}
|
|
@@ -2028,12 +2089,12 @@ const C = (t, e = 0) => {
|
|
|
2028
2089
|
const n = parseFloat(t ?? "");
|
|
2029
2090
|
return Number.isFinite(n) ? n : e;
|
|
2030
2091
|
};
|
|
2031
|
-
function
|
|
2092
|
+
function lr(t) {
|
|
2032
2093
|
const e = (t ?? "").trim().split(/[\s,]+/).filter(Boolean).map(Number), n = [];
|
|
2033
2094
|
for (let r = 0; r + 1 < e.length; r += 2) n.push({ x: e[r], y: e[r + 1] });
|
|
2034
2095
|
return n;
|
|
2035
2096
|
}
|
|
2036
|
-
function
|
|
2097
|
+
function ls(t) {
|
|
2037
2098
|
const e = t.attributes;
|
|
2038
2099
|
switch (t.tag.toLowerCase()) {
|
|
2039
2100
|
case "path":
|
|
@@ -2045,14 +2106,14 @@ function os(t) {
|
|
|
2045
2106
|
}
|
|
2046
2107
|
case "rect": {
|
|
2047
2108
|
const n = C(e.x), r = C(e.y), s = C(e.width), o = C(e.height);
|
|
2048
|
-
let
|
|
2049
|
-
return
|
|
2109
|
+
let a = e.rx != null ? C(e.rx) : e.ry != null ? C(e.ry) : 0, i = e.ry != null ? C(e.ry) : a;
|
|
2110
|
+
return a = Math.min(a, s / 2), i = Math.min(i, o / 2), a === 0 || i === 0 ? `M${n} ${r} H${n + s} V${r + o} H${n} Z` : `M${n + a} ${r} H${n + s - a} A${a} ${i} 0 0 1 ${n + s} ${r + i} V${r + o - i} A${a} ${i} 0 0 1 ${n + s - a} ${r + o} H${n + a} A${a} ${i} 0 0 1 ${n} ${r + o - i} V${r + i} A${a} ${i} 0 0 1 ${n + a} ${r} Z`;
|
|
2050
2111
|
}
|
|
2051
2112
|
case "line":
|
|
2052
2113
|
return `M${C(e.x1)} ${C(e.y1)} L${C(e.x2)} ${C(e.y2)}`;
|
|
2053
2114
|
case "polyline":
|
|
2054
2115
|
case "polygon": {
|
|
2055
|
-
const n =
|
|
2116
|
+
const n = lr(e.points);
|
|
2056
2117
|
if (n.length === 0) return null;
|
|
2057
2118
|
const r = n.map((s, o) => `${o === 0 ? "M" : "L"}${s.x} ${s.y}`).join(" ");
|
|
2058
2119
|
return t.tag.toLowerCase() === "polygon" ? `${r} Z` : r;
|
|
@@ -2061,53 +2122,53 @@ function os(t) {
|
|
|
2061
2122
|
return null;
|
|
2062
2123
|
}
|
|
2063
2124
|
}
|
|
2064
|
-
function
|
|
2125
|
+
function hs(t, e, n) {
|
|
2065
2126
|
const r = Math.max(2, Math.round(n.samples ?? 32)), s = Math.max(0, n.length), o = n.since !== void 0 ? Math.max(e - s, n.since) : e - s;
|
|
2066
2127
|
if (o >= e) return [];
|
|
2067
|
-
const
|
|
2128
|
+
const a = n.period, i = [];
|
|
2068
2129
|
for (let c = 0; c < r; c++) {
|
|
2069
|
-
const
|
|
2070
|
-
|
|
2130
|
+
const l = o + (e - o) * c / (r - 1), h = a && a > 0 && c < r - 1 ? (l % a + a) % a : l;
|
|
2131
|
+
i.push({ at: t(h), time: l, age: s > 0 ? (e - l) / s : 0 });
|
|
2071
2132
|
}
|
|
2072
|
-
return
|
|
2133
|
+
return i;
|
|
2073
2134
|
}
|
|
2074
|
-
const
|
|
2075
|
-
function
|
|
2076
|
-
const e = [], n = [], r = t.length, s = (o,
|
|
2077
|
-
for (let
|
|
2078
|
-
const c = (t[
|
|
2079
|
-
if (
|
|
2135
|
+
const hr = 2.5;
|
|
2136
|
+
function fs(t) {
|
|
2137
|
+
const e = [], n = [], r = t.length, s = (o, a) => {
|
|
2138
|
+
for (let i = o + a; i >= 0 && i < r; i += a) {
|
|
2139
|
+
const c = (t[i].x - t[o].x) * a, l = (t[i].y - t[o].y) * a, h = Math.hypot(c, l);
|
|
2140
|
+
if (h > 1e-9) return [c / h, l / h];
|
|
2080
2141
|
}
|
|
2081
2142
|
return null;
|
|
2082
2143
|
};
|
|
2083
2144
|
for (let o = 0; o < r; o++) {
|
|
2084
|
-
const
|
|
2085
|
-
let
|
|
2086
|
-
const
|
|
2087
|
-
|
|
2088
|
-
const
|
|
2089
|
-
e.push({ x:
|
|
2145
|
+
const a = t[o], i = s(o, -1), c = s(o, 1), l = i ?? c ?? [1, 0], h = c ?? i ?? [1, 0];
|
|
2146
|
+
let u = l[0] + h[0], f = l[1] + h[1];
|
|
2147
|
+
const d = Math.hypot(u, f);
|
|
2148
|
+
d < 1e-9 ? (u = l[0], f = l[1]) : (u /= d, f /= d);
|
|
2149
|
+
const m = u * l[0] + f * l[1], p = Math.min(hr, 1 / Math.max(m, 1e-6)), g = a.width / 2 * p;
|
|
2150
|
+
e.push({ x: a.x - f * g, y: a.y + u * g }), n.push({ x: a.x + f * g, y: a.y - u * g });
|
|
2090
2151
|
}
|
|
2091
2152
|
return { left: e, right: n };
|
|
2092
2153
|
}
|
|
2093
|
-
function
|
|
2154
|
+
function ds(t) {
|
|
2094
2155
|
const e = t.length;
|
|
2095
2156
|
if (e < 2) return null;
|
|
2096
2157
|
const n = t[e - 1];
|
|
2097
2158
|
for (let r = e - 2; r >= 0; r--) {
|
|
2098
|
-
const s = n.x - t[r].x, o = n.y - t[r].y,
|
|
2099
|
-
if (
|
|
2100
|
-
return { x: n.x, y: n.y, radius: n.width / 2, start: Math.atan2(s /
|
|
2159
|
+
const s = n.x - t[r].x, o = n.y - t[r].y, a = Math.hypot(s, o);
|
|
2160
|
+
if (a > 1e-9)
|
|
2161
|
+
return { x: n.x, y: n.y, radius: n.width / 2, start: Math.atan2(s / a, -o / a) };
|
|
2101
2162
|
}
|
|
2102
2163
|
return null;
|
|
2103
2164
|
}
|
|
2104
|
-
function
|
|
2165
|
+
function fr(t, e) {
|
|
2105
2166
|
return [t[0] + e[0], t[1] + e[1], t[2] + e[2]];
|
|
2106
2167
|
}
|
|
2107
2168
|
function Et(t, e) {
|
|
2108
2169
|
return [t[0] - e[0], t[1] - e[1], t[2] - e[2]];
|
|
2109
2170
|
}
|
|
2110
|
-
function
|
|
2171
|
+
function De(t, e) {
|
|
2111
2172
|
return [t[0] * e, t[1] * e, t[2] * e];
|
|
2112
2173
|
}
|
|
2113
2174
|
function ct(t, e) {
|
|
@@ -2119,48 +2180,48 @@ function vt(t, e) {
|
|
|
2119
2180
|
function Lt(t) {
|
|
2120
2181
|
return Math.hypot(t[0], t[1], t[2]);
|
|
2121
2182
|
}
|
|
2122
|
-
function
|
|
2183
|
+
function dr(t, e) {
|
|
2123
2184
|
return Lt(Et(t, e));
|
|
2124
2185
|
}
|
|
2125
2186
|
function Pt(t) {
|
|
2126
2187
|
const e = Lt(t);
|
|
2127
|
-
return e === 0 ? [0, 0, 0] :
|
|
2188
|
+
return e === 0 ? [0, 0, 0] : De(t, 1 / e);
|
|
2128
2189
|
}
|
|
2129
|
-
function
|
|
2190
|
+
function pr(t, e, n) {
|
|
2130
2191
|
return [t[0] + (e[0] - t[0]) * n, t[1] + (e[1] - t[1]) * n, t[2] + (e[2] - t[2]) * n];
|
|
2131
2192
|
}
|
|
2132
|
-
const
|
|
2193
|
+
const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2133
2194
|
__proto__: null,
|
|
2134
|
-
add:
|
|
2195
|
+
add: fr,
|
|
2135
2196
|
cross: vt,
|
|
2136
|
-
distance:
|
|
2197
|
+
distance: dr,
|
|
2137
2198
|
dot: ct,
|
|
2138
2199
|
length: Lt,
|
|
2139
|
-
lerp:
|
|
2200
|
+
lerp: pr,
|
|
2140
2201
|
normalize: Pt,
|
|
2141
|
-
scale:
|
|
2202
|
+
scale: De,
|
|
2142
2203
|
subtract: Et
|
|
2143
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2144
|
-
function
|
|
2204
|
+
}, Symbol.toStringTag, { value: "Module" })), gr = Math.PI / 180;
|
|
2205
|
+
function mr() {
|
|
2145
2206
|
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
2146
2207
|
}
|
|
2147
|
-
function
|
|
2208
|
+
function yr(t, e) {
|
|
2148
2209
|
const n = new Array(16);
|
|
2149
2210
|
for (let r = 0; r < 4; r++)
|
|
2150
2211
|
for (let s = 0; s < 4; s++) {
|
|
2151
2212
|
let o = 0;
|
|
2152
|
-
for (let
|
|
2213
|
+
for (let a = 0; a < 4; a++) o += t[a * 4 + s] * e[r * 4 + a];
|
|
2153
2214
|
n[r * 4 + s] = o;
|
|
2154
2215
|
}
|
|
2155
2216
|
return n;
|
|
2156
2217
|
}
|
|
2157
|
-
function
|
|
2218
|
+
function Mr(t) {
|
|
2158
2219
|
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t[0], t[1], t[2], 1];
|
|
2159
2220
|
}
|
|
2160
|
-
function
|
|
2221
|
+
function _r(t) {
|
|
2161
2222
|
return [t[0], 0, 0, 0, 0, t[1], 0, 0, 0, 0, t[2], 0, 0, 0, 0, 1];
|
|
2162
2223
|
}
|
|
2163
|
-
function
|
|
2224
|
+
function Ce(t) {
|
|
2164
2225
|
const [e, n, r, s] = t;
|
|
2165
2226
|
return [
|
|
2166
2227
|
1 - 2 * (n * n + r * r),
|
|
@@ -2181,49 +2242,49 @@ function $e(t) {
|
|
|
2181
2242
|
1
|
|
2182
2243
|
];
|
|
2183
2244
|
}
|
|
2184
|
-
function
|
|
2185
|
-
const r =
|
|
2245
|
+
function br(t, e, n) {
|
|
2246
|
+
const r = Ce(e);
|
|
2186
2247
|
for (let s = 0; s < 3; s++)
|
|
2187
2248
|
r[s] *= n[0], r[4 + s] *= n[1], r[8 + s] *= n[2];
|
|
2188
2249
|
return r[12] = t[0], r[13] = t[1], r[14] = t[2], r;
|
|
2189
2250
|
}
|
|
2190
|
-
function
|
|
2251
|
+
function Tr(t) {
|
|
2191
2252
|
const e = new Array(16);
|
|
2192
2253
|
for (let n = 0; n < 4; n++) for (let r = 0; r < 4; r++) e[r * 4 + n] = t[n * 4 + r];
|
|
2193
2254
|
return e;
|
|
2194
2255
|
}
|
|
2195
|
-
function
|
|
2196
|
-
const [e, n, r, s, o,
|
|
2256
|
+
function xr(t) {
|
|
2257
|
+
const [e, n, r, s, o, a, i, c, l, h, u, f, d, m, p, g] = t, M = e * a - n * o, y = e * i - r * o, k = e * c - s * o, S = n * i - r * a, b = n * c - s * a, v = r * c - s * i, A = l * m - h * d, D = l * p - u * d, _ = l * g - f * d, T = h * p - u * m, x = h * g - f * m, w = u * g - f * p, $ = M * w - y * x + k * T + S * _ - b * D + v * A;
|
|
2197
2258
|
if (Math.abs($) < 1e-12) return null;
|
|
2198
2259
|
const P = 1 / $;
|
|
2199
2260
|
return [
|
|
2200
|
-
(
|
|
2201
|
-
(r * x - n *
|
|
2202
|
-
(
|
|
2203
|
-
(
|
|
2204
|
-
(
|
|
2205
|
-
(e *
|
|
2206
|
-
(
|
|
2207
|
-
(
|
|
2208
|
-
(o * x -
|
|
2209
|
-
(n *
|
|
2210
|
-
(
|
|
2211
|
-
(
|
|
2212
|
-
(
|
|
2261
|
+
(a * w - i * x + c * T) * P,
|
|
2262
|
+
(r * x - n * w - s * T) * P,
|
|
2263
|
+
(m * v - p * b + g * S) * P,
|
|
2264
|
+
(u * b - h * v - f * S) * P,
|
|
2265
|
+
(i * _ - o * w - c * D) * P,
|
|
2266
|
+
(e * w - r * _ + s * D) * P,
|
|
2267
|
+
(p * k - d * v - g * y) * P,
|
|
2268
|
+
(l * v - u * k + f * y) * P,
|
|
2269
|
+
(o * x - a * _ + c * A) * P,
|
|
2270
|
+
(n * _ - e * x - s * A) * P,
|
|
2271
|
+
(d * b - m * k + g * M) * P,
|
|
2272
|
+
(h * k - l * b - f * M) * P,
|
|
2273
|
+
(a * D - o * T - i * A) * P,
|
|
2213
2274
|
(e * T - n * D + r * A) * P,
|
|
2214
|
-
(
|
|
2215
|
-
(
|
|
2275
|
+
(m * y - d * S - p * M) * P,
|
|
2276
|
+
(l * S - h * y + u * M) * P
|
|
2216
2277
|
];
|
|
2217
2278
|
}
|
|
2218
|
-
function
|
|
2219
|
-
const s = 1 / Math.tan(t *
|
|
2279
|
+
function kr(t, e, n, r) {
|
|
2280
|
+
const s = 1 / Math.tan(t * gr / 2), o = 1 / (n - r);
|
|
2220
2281
|
return [s / e, 0, 0, 0, 0, s, 0, 0, 0, 0, (r + n) * o, -1, 0, 0, 2 * r * n * o, 0];
|
|
2221
2282
|
}
|
|
2222
|
-
function
|
|
2223
|
-
const
|
|
2224
|
-
return [2 *
|
|
2283
|
+
function Sr(t, e, n, r, s, o) {
|
|
2284
|
+
const a = 1 / (e - t), i = 1 / (r - n), c = 1 / (o - s);
|
|
2285
|
+
return [2 * a, 0, 0, 0, 0, 2 * i, 0, 0, 0, 0, -2 * c, 0, -(e + t) * a, -(r + n) * i, -(o + s) * c, 1];
|
|
2225
2286
|
}
|
|
2226
|
-
function
|
|
2287
|
+
function wr(t, e, n = [0, 1, 0]) {
|
|
2227
2288
|
const r = Pt(Et(t, e)), s = Pt(vt(n, r)), o = vt(r, s);
|
|
2228
2289
|
return [
|
|
2229
2290
|
s[0],
|
|
@@ -2244,145 +2305,147 @@ function xr(t, e, n = [0, 1, 0]) {
|
|
|
2244
2305
|
1
|
|
2245
2306
|
];
|
|
2246
2307
|
}
|
|
2247
|
-
function
|
|
2308
|
+
function Ar(t, e) {
|
|
2248
2309
|
const n = t[0] * e[0] + t[4] * e[1] + t[8] * e[2] + t[12], r = t[1] * e[0] + t[5] * e[1] + t[9] * e[2] + t[13], s = t[2] * e[0] + t[6] * e[1] + t[10] * e[2] + t[14], o = t[3] * e[0] + t[7] * e[1] + t[11] * e[2] + t[15];
|
|
2249
2310
|
return o === 1 || o === 0 ? [n, r, s] : [n / o, r / o, s / o];
|
|
2250
2311
|
}
|
|
2251
|
-
const
|
|
2312
|
+
const gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2252
2313
|
__proto__: null,
|
|
2253
|
-
compose:
|
|
2254
|
-
fromQuat:
|
|
2255
|
-
identity:
|
|
2256
|
-
invert:
|
|
2257
|
-
lookAt:
|
|
2258
|
-
multiply:
|
|
2259
|
-
orthographic:
|
|
2260
|
-
perspective:
|
|
2261
|
-
scaling:
|
|
2262
|
-
transformPoint:
|
|
2263
|
-
translation:
|
|
2264
|
-
transpose:
|
|
2314
|
+
compose: br,
|
|
2315
|
+
fromQuat: Ce,
|
|
2316
|
+
identity: mr,
|
|
2317
|
+
invert: xr,
|
|
2318
|
+
lookAt: wr,
|
|
2319
|
+
multiply: yr,
|
|
2320
|
+
orthographic: Sr,
|
|
2321
|
+
perspective: kr,
|
|
2322
|
+
scaling: _r,
|
|
2323
|
+
transformPoint: Ar,
|
|
2324
|
+
translation: Mr,
|
|
2325
|
+
transpose: Tr
|
|
2265
2326
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2266
2327
|
export {
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2328
|
+
$r as Clock,
|
|
2329
|
+
Me as DEFAULT_BAKE_INTERVAL_MS,
|
|
2330
|
+
Yt as DEFAULT_INERTIA_FRICTION,
|
|
2270
2331
|
L as DEFAULT_SPRING,
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2332
|
+
Nt as FORMAT_VERSION,
|
|
2333
|
+
Ve as INERTIA_MAX_DURATION_MS,
|
|
2334
|
+
jn as InertiaTrackPlayer,
|
|
2335
|
+
Nr as MORPH_SAMPLES,
|
|
2336
|
+
Pr as ManualClock,
|
|
2276
2337
|
ie as SPRING_MAX_DURATION_MS,
|
|
2277
|
-
|
|
2338
|
+
Dr as SPRING_PRESETS,
|
|
2278
2339
|
tt as SPRING_STEP_MS,
|
|
2279
2340
|
ut as SpringSampler,
|
|
2280
|
-
|
|
2281
|
-
|
|
2341
|
+
Vn as SpringTrackPlayer,
|
|
2342
|
+
ke as Timeline,
|
|
2282
2343
|
_t as TrackPlayer,
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2344
|
+
Zr as ValueResolver,
|
|
2345
|
+
nn as backOut,
|
|
2346
|
+
Nn as bakeEasing,
|
|
2347
|
+
be as bakeInertiaTrack,
|
|
2348
|
+
_e as bakeSpringTrack,
|
|
2288
2349
|
It as beatAtTime,
|
|
2289
|
-
|
|
2350
|
+
Re as beatLength,
|
|
2290
2351
|
Ct as beatTime,
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2352
|
+
as as beatsBetween,
|
|
2353
|
+
en as bounceOut,
|
|
2354
|
+
cs as cameraTracks,
|
|
2355
|
+
Bn as charactersFor,
|
|
2356
|
+
Yr as clearMorphCache,
|
|
2357
|
+
Fr as clearPathCache,
|
|
2358
|
+
Je as createCubicBezier,
|
|
2359
|
+
we as createRandom,
|
|
2360
|
+
Un as createTrack,
|
|
2361
|
+
Lr as criticalDamping,
|
|
2362
|
+
Jr as customBounce,
|
|
2363
|
+
qr as customEase,
|
|
2364
|
+
ts as customWiggle,
|
|
2365
|
+
Jn as deserializeTimeline,
|
|
2366
|
+
Zn as deserializeTrack,
|
|
2367
|
+
is as detectTempo,
|
|
2368
|
+
Ge as easeIn,
|
|
2369
|
+
ce as easeInCubic,
|
|
2370
|
+
Ze as easeInOut,
|
|
2371
|
+
le as easeInOutCubic,
|
|
2372
|
+
Qe as easeInOutQuad,
|
|
2373
|
+
Be as easeInQuad,
|
|
2374
|
+
Ke as easeOut,
|
|
2375
|
+
ue as easeOutCubic,
|
|
2376
|
+
We as easeOutQuad,
|
|
2377
|
+
tn as elasticOut,
|
|
2378
|
+
Yn as expandParametricEasings,
|
|
2379
|
+
re as formatVersionFor,
|
|
2380
|
+
Wr as fromJSON,
|
|
2381
|
+
he as getEasingFunction,
|
|
2382
|
+
ye as getInterpolator,
|
|
2383
|
+
xe as getMotionPathPoint,
|
|
2384
|
+
Xr as getPathLength,
|
|
2385
|
+
pn as getPointAtProgress,
|
|
2386
|
+
Xe as hasKeyframes,
|
|
2387
|
+
Qr as hashSeed,
|
|
2388
|
+
Rr as heldTime,
|
|
2326
2389
|
ft as inertiaDuration,
|
|
2327
2390
|
ht as inertiaRest,
|
|
2328
2391
|
kt as inertiaValueAt,
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2392
|
+
Or as inertiaVelocityAt,
|
|
2393
|
+
On as interpolateArray,
|
|
2394
|
+
Ln as interpolateColor,
|
|
2395
|
+
jr as interpolateMotionPath,
|
|
2396
|
+
X as interpolateNumber,
|
|
2397
|
+
Xn as interpolatePathString,
|
|
2398
|
+
Fn as interpolateQuaternion,
|
|
2336
2399
|
te as interpolateString,
|
|
2337
|
-
|
|
2400
|
+
Fe as isCubicBezierEasing,
|
|
2338
2401
|
V as isInertiaTrack,
|
|
2339
|
-
|
|
2340
|
-
|
|
2402
|
+
vr as isMotionPathPoint,
|
|
2403
|
+
se as isMotionPathTrack,
|
|
2341
2404
|
xt as isParametricEasing,
|
|
2342
|
-
|
|
2405
|
+
vn as isPathData,
|
|
2343
2406
|
j as isSpringTrack,
|
|
2344
2407
|
$t as isTextTrack,
|
|
2345
|
-
|
|
2346
|
-
|
|
2408
|
+
Er as isUnderdamped,
|
|
2409
|
+
Kr as isUnresolved,
|
|
2347
2410
|
St as linear,
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2411
|
+
gs as mat4,
|
|
2412
|
+
Ne as maxStaggerDistance,
|
|
2413
|
+
An as morphPath,
|
|
2414
|
+
ns as narrationMarkers,
|
|
2415
|
+
rs as narrationSceneAt,
|
|
2416
|
+
je as naturalRest,
|
|
2417
|
+
ss as nearestBeat,
|
|
2418
|
+
os as nextBeat,
|
|
2419
|
+
sn as parametricEasing,
|
|
2357
2420
|
G as parsePath,
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2421
|
+
es as planNarration,
|
|
2422
|
+
Hr as playheadCrossings,
|
|
2423
|
+
fe as pointAtDistance,
|
|
2424
|
+
us as pointsToPath,
|
|
2425
|
+
zr as quat,
|
|
2426
|
+
Ae as randomBetween,
|
|
2427
|
+
Gr as randomChoice,
|
|
2428
|
+
tr as randomSnapped,
|
|
2429
|
+
er as resolveSequence,
|
|
2430
|
+
$e as resolveValue,
|
|
2431
|
+
fs as ribbon,
|
|
2432
|
+
ds as ribbonHeadCap,
|
|
2433
|
+
qn as serializeTimeline,
|
|
2434
|
+
Kn as serializeTrack,
|
|
2435
|
+
ls as shapeToPathData,
|
|
2436
|
+
zn as simplifyKeyframes,
|
|
2437
|
+
Ir as springDuration,
|
|
2438
|
+
Cr as springValueAt,
|
|
2439
|
+
oe as staggerDistance,
|
|
2440
|
+
ae as staggerOffset,
|
|
2441
|
+
Ye as staggerOffsets,
|
|
2379
2442
|
Rt as staggerSpan,
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2443
|
+
rn as stepsEasing,
|
|
2444
|
+
Qn as textAt,
|
|
2445
|
+
Br as toJSON,
|
|
2446
|
+
Ur as toKeyframedTrack,
|
|
2447
|
+
Vr as toKeyframedTracks,
|
|
2385
2448
|
U as trackTargets,
|
|
2386
|
-
|
|
2387
|
-
|
|
2449
|
+
hs as trailSamples,
|
|
2450
|
+
ps as vec3
|
|
2388
2451
|
};
|